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
Der Test soll ueberpruefen, ob die Methode containsSubject(), ob ein Subject Objekt in dem Set enthalten ist.
@Test public void testContainsSubject() { assertTrue(teachu1.containsSubject(sub1)); assertFalse(teachu1.containsSubject(sub2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testGetSubjects() {\r\n\t\tassertTrue(teachu1.getSubjects().contains(sub1));\r\n\t\tassertFalse(teachu1.getSubjects().contains(sub2));\r\n\t}", "@Test\r\n\tpublic void testSetSubjects() {\r\n\t\tteachu1.setSubjects(newSubjects);\r\n\r\n\t\tassertTrue(teachu1.getSubjects().contains(sub2));\r\n\t\tassertFalse(teachu1.getSubjects().contains(sub1));\r\n\t}", "@Test\n public void subjectSetTest() {\n // TODO: test subjectSet\n }", "boolean isSetSubject();", "public void setSubject(Subject subject);", "@Override\n public boolean isSubject() {\n return false;\n }", "@Test\n public void subjectTest() {\n // TODO: test subject\n }", "@Test\n public void testAddIterateRemove() {\n final Registrar<Object> testSubject = onCreateTestSubject();\n final Object testObserver = new Object();\n\n testSubject.addListener(testObserver);\n\n int iterations = 0;\n boolean foundSubject = false;\n for (Object listener : testSubject) {\n if (listener == testObserver) {\n foundSubject = true;\n }\n ++iterations;\n }\n assertTrue(foundSubject);\n assertEquals(1, iterations);\n }", "public void setSubject (String s) {\n subject = s;\n }", "public void setSubject(String subject)\n {\n _subject = subject;\n }", "public void setSubject(String v) \n {\n \n if (!ObjectUtils.equals(this.subject, v))\n {\n this.subject = v;\n setModified(true);\n }\n \n \n }", "@Override\n public boolean followsSubject(String subjectType) {\n return false;\n }", "public void addSubject(Subject s) {\n // TODO implement here\n }", "public void setSubject(String subject) {\n this.subject = subject;\n }", "public void setSubject(String subject) {\n this.subject = subject;\n }", "public Subject getSubject();", "public void setSubject(String subject) {\r\n\t\tthis.subject= subject;\r\n\t}", "@Test\n public void subjectIdTest() {\n // TODO: test subjectId\n }", "public void setSubject(String subject)\r\n {\r\n m_subject = subject;\r\n }", "Object getSubject();", "public void setSubject(String s)\r\n {\r\n mySubject = s;\r\n }", "@Test\n public void testForumSubscribe() {\n try {\n ForumDTO forumDTO = forumService.subscribeTo(FORUM_ID, USER_ID_2);\n assertTrue(forumDTO.getSubscribers().stream()\n .map(UserDTO::getUsername)\n .collect(Collectors.toSet())\n .contains(USER_NAME)\n );\n assertTrue(forumDTO.getSubscribers().stream()\n .map(UserDTO::getUsername)\n .collect(Collectors.toSet())\n .contains(USER_NAME_2)\n );\n } catch (Exception e) {\n fail(e.getMessage());\n }\n }", "public void isEmpty() {\n if (!Iterables.isEmpty(getSubject())) {\n fail(\"is empty\");\n }\n }", "public void setSubject(Subject subject) {\n\t\tthis.subject = subject;\n\t}", "java.lang.String getSubject();", "java.lang.String getSubject();", "java.lang.String getSubject();", "public String getSubject() {\n return this.subject;\n }", "public String getSubject() {\n return this.subject;\n }", "public void setSubject(String subject) {\n\t\tthis.subject = subject;\n\t}", "public void setSubject(List<String> subject) {\n\t this.subject = subject;\n\t}", "public String getSubject()\r\n {\r\n return subject;\r\n }", "public Name getSubject() {\r\n return subject;\r\n }", "@Test\n public void getSubjectTest() throws Exception {\n SubjectKey userKey = getUserKey(\"jdoe\");\n IPSubject ip = new IPSubject();\n\n Subject[] hosts = {\n newSubject(\"router\", \"IP\", \"router\", \"172.16.1.1\", \"support@ebayopensource.org\"),\n newSubject(\"localip\", \"IP\", \"locaip\", \"172.16.1.100\", \"support@ebayopensource.org\"),\n newSubject(\"localhost\", \"IP\", \"localhost\", \"127.0.0.1\", \"support@ebayopensource.org\"),\n };\n int len = hosts.length;\n \n int idx = -1;\n SubjectKey[] keys = new SubjectKey[len];\n for (Subject host : hosts) {\n keys[++idx] = ip.createSubject(host, userKey);\n assertEquals(hosts[idx].getSubjectName(), keys[idx].getSubjectName());\n }\n \n for (SubjectKey key : keys) {\n Long subjectId = key.getSubjectId();\n Map<Long, Subject> result = ip.getSubjectById(subjectId);\n\n assertNotNull(result);\n \n Subject value = result.values().toArray(new Subject[1])[0];\n assertEquals(subjectId, result.keySet().toArray(new Long[1])[0]);\n assertEquals(key.getSubjectName(), value.getSubjectName());\n }\n\n for (SubjectKey key : keys) {\n String subjectName = key.getSubjectName();\n Map<Long, Subject> result = ip.getSubjectByName(subjectName);\n \n assertNotNull(result);\n \n Subject value = result.values().toArray(new Subject[1])[0];\n assertEquals(key.getSubjectId(), result.keySet().toArray(new Long[1])[0]);\n assertEquals(key.getSubjectName(), value.getSubjectName());\n }\n }", "public void setSubject(Name subject) {\r\n this.subject = subject;\r\n }", "public void setSubject(String newValue);", "public String getSubject() {\n return subject;\n }", "public String getSubject() {\n return subject;\n }", "public String getSubject() {\n return subject;\n }", "@Test\n public void getSubjectAssignmentOfSubjectGroupTest() throws Exception\n {\n createSubjectGroupTest();\n \n String groupName = \"network\";\n IPSubject ip = new IPSubject();\n\n Map<Long, SubjectGroup> result = ip.getSubjectGroupInfoByName(groupName);\n\n assertNotNull(result);\n Long groupId = result.keySet().toArray(new Long[1])[0];\n\n Map<Long, Subject> resultSubject = ip.getSubjectAssignmentOfSubjectGroup(groupId);\n \n assertNotNull(resultSubject);\n Subject[] subjectList = resultSubject.values().toArray(new Subject[0]);\n \n assertEquals(2, subjectList.length);\n assertEquals(\"workstation\", subjectList[0].getSubjectName());\n assertEquals(\"gateway\", subjectList[1].getSubjectName());\n }", "public String getSubject() {\r\n\t\treturn subject;\r\n\t}", "public String getSubject() {\r\n\t\treturn subject;\r\n\t}", "Subject getSubject(){\n\t\treturn subject;\n\t}", "public void setmSubject(String mSubject) {\n this.mSubject = mSubject;\n }", "public Subject getSubject() {\n\t\treturn subject;\n\t}", "@Test\n public void createSubjectTest() throws Exception {\n SubjectKey userKey = getUserKey(\"jdoe\");\n IPSubject ip = new IPSubject();\n \n Subject localhost = newSubject(\"localhost\", \"IP\", \"localhost\", \"127.0.0.1/24\", \"support@ebayopensource.org\");\n SubjectKey ipKey = ip.createSubject(localhost, userKey);\n \n EntityManagerContext.open(factory);\n try {\n org.ebayopensource.turmeric.policyservice.model.Subject savedSubject =\n EntityManagerContext.get().find(\n org.ebayopensource.turmeric.policyservice.model.Subject.class, \n ipKey.getSubjectId());\n assertNotNull(savedSubject);\n } finally {\n EntityManagerContext.close();\n }\n }", "public void testRegisterSubjectForStudent() {\n System.out.println(\"registerSubjectForStudent\");\n Map<String, Object> request = null;\n RegisterService instance = new RegisterService();\n instance.registerSubjectForStudent(request);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void addSubject(Subject subject) {\n\t\t\r\n\t}", "@Test\n public void testGetBusinessObjectDefinitionSubjectMatterExpertDuplicateSubjectMatterExperts() throws Exception\n {\n BusinessObjectDefinitionEntity businessObjectDefinitionEntity =\n businessObjectDefinitionDaoTestHelper.createBusinessObjectDefinitionEntity(BDEF_NAMESPACE, BDEF_NAME, DATA_PROVIDER_NAME, BDEF_DESCRIPTION);\n\n // Create duplicate business object definition subject matter experts.\n businessObjectDefinitionSubjectMatterExpertDaoTestHelper\n .createBusinessObjectDefinitionSubjectMatterExpertEntity(businessObjectDefinitionEntity, USER_ID.toUpperCase());\n businessObjectDefinitionSubjectMatterExpertDaoTestHelper\n .createBusinessObjectDefinitionSubjectMatterExpertEntity(businessObjectDefinitionEntity, USER_ID.toLowerCase());\n\n // Try to get business object definition subject matter expert when business object definition has duplicate subject matter experts.\n try\n {\n businessObjectDefinitionSubjectMatterExpertDao.getBusinessObjectDefinitionSubjectMatterExpert(businessObjectDefinitionEntity, USER_ID);\n fail();\n }\n catch (IllegalArgumentException e)\n {\n assertEquals(String.format(\"Found more than one business object definition subject matter expert instance with parameters {namespace=\\\"%s\\\", \" +\n \"businessObjectDefinitionName=\\\"%s\\\", userId=\\\"%s\\\"}.\", BDEF_NAMESPACE, BDEF_NAME, USER_ID), e.getMessage());\n }\n }", "public SubjectInfo getSubject() {\n return this.subject;\n }", "public String getSubject() {\n\t\treturn subject;\n\t}", "public String getSubject() {\n\t\treturn subject;\n\t}", "void setSubject(org.hl7.fhir.ResourceReference subject);", "public void setSubjects(String subjects) {\r\n this.subjects = subjects;\r\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj == this)\n\t\t\treturn true;\n\t\tif (obj.getClass() != this.getClass())\n\t\t\treturn false;\n\t\tSubject sb = (Subject)obj;\n\t\tif(sb.getCode() == this.getCode())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public void setForSubject(boolean forSubject) {\n\t\t_forSubject = forSubject;\n\t}", "public Subject getSubject(){\n\t\treturn sub;\n\t}", "@Test\n public void getSubjectTypeInfoTest() throws Exception {\n IPSubject subjType = new IPSubject();\n \n SubjectTypeInfo typeInfo = subjType.getSubjectTypeInfo();\n assertEquals(\"IP\", typeInfo.getName());\n assertEquals(false, typeInfo.isExternal());\n }", "@Override\n\tpublic List<Tsubject> randomOneFindSubject() {\n\t\treturn subjectMapper.randomOneFindSubject();\n\t}", "public String getmSubject() {\n return mSubject;\n }", "String getSubject();", "String getSubject();", "@Override\r\n public boolean equals(Object o) {\r\n if(o != null && o instanceof Biography){\r\n Biography biography = (Biography) o;\r\n if(o == this || this.subject.equals(biography.getSubject())){\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public void containsNoDuplicates() {\n List<Entry<T>> duplicates = Lists.newArrayList();\n for (Multiset.Entry<T> entry : LinkedHashMultiset.create(getSubject()).entrySet()) {\n if (entry.getCount() > 1) {\n duplicates.add(entry);\n }\n }\n if (!duplicates.isEmpty()) {\n failWithRawMessage(\"%s has the following duplicates: <%s>\", getDisplaySubject(), duplicates);\n }\n }", "@Test\n public void testGetBusinessObjectDefinitionSubjectMatterExpertByKeyDuplicateSubjectMatterExperts() throws Exception\n {\n BusinessObjectDefinitionEntity businessObjectDefinitionEntity =\n businessObjectDefinitionDaoTestHelper.createBusinessObjectDefinitionEntity(BDEF_NAMESPACE, BDEF_NAME, DATA_PROVIDER_NAME, BDEF_DESCRIPTION);\n\n // Create duplicate business object definition subject matter experts.\n businessObjectDefinitionSubjectMatterExpertDaoTestHelper\n .createBusinessObjectDefinitionSubjectMatterExpertEntity(businessObjectDefinitionEntity, USER_ID.toUpperCase());\n businessObjectDefinitionSubjectMatterExpertDaoTestHelper\n .createBusinessObjectDefinitionSubjectMatterExpertEntity(businessObjectDefinitionEntity, USER_ID.toLowerCase());\n\n // Try to get business object definition subject matter expert when business object definition has duplicate subject matter experts.\n try\n {\n businessObjectDefinitionSubjectMatterExpertDao\n .getBusinessObjectDefinitionSubjectMatterExpertByKey(new BusinessObjectDefinitionSubjectMatterExpertKey(BDEF_NAMESPACE, BDEF_NAME, USER_ID));\n fail();\n }\n catch (IllegalArgumentException e)\n {\n assertEquals(String.format(\"Found more than one business object definition subject matter expert instance with parameters {namespace=\\\"%s\\\", \" +\n \"businessObjectDefinitionName=\\\"%s\\\", userId=\\\"%s\\\"}.\", BDEF_NAMESPACE, BDEF_NAME, USER_ID), e.getMessage());\n }\n }", "public List<String> getSubject() {\n\t return this.subject;\n\t}", "@Test\n public void testClickSubject() {\n Matcher<View> viewMatcher = withId(R.id.subjectRecyclerView);\n ViewInteraction viewInteraction = onView(viewMatcher);\n\n // Click on first subject in RecyclerView\n ViewAction viewAction = actionOnItemAtPosition(0, click());\n viewInteraction.perform(viewAction);\n }", "public void AssertMailSubjectContentContains(jakarta.mail.Message message, String content)\n {\n try {\n if (!message.getSubject().contains(content)) {\n failStep(\"Message does not contain subject '\" + content + \"'. Found '\" + message.getSubject() + \"'\");\n }\n\n passStep(\"Message contains subject '\" + content + \"'\");\n } catch (MessagingException e) {\n e.printStackTrace();\n\n failStep(e.getMessage());\n }\n }", "public void contains(@Nullable Object element) {\n if (!Iterables.contains(getSubject(), element)) {\n failWithRawMessage(\"%s should have contained <%s>\", getDisplaySubject(), element);\n }\n }", "public boolean canTeach(Subject subject) {\r\n if (subject.getSpecialism() == 4) {\r\n return true;\r\n } else {\r\n return super.canTeach(subject);\r\n }\r\n }", "@Test\n public void updateSubjectGroupTest() throws Exception\n {\n createSubjectGroupTest();\n \n String groupName = \"network\";\n SubjectKey userKey = getUserKey(\"jdoe\");\n IPSubject ip = new IPSubject();\n \n Map<Long, SubjectGroup> result = ip.getSubjectGroupInfoByName(groupName);\n \n assertNotNull(result);\n SubjectGroup subjectGroup = result.values().toArray(new SubjectGroup[1])[0];\n Long groupId = result.keySet().toArray(new Long[1])[0];\n \n SubjectGroupEditObject sgEditObj = new SubjectGroupEditObject();\n List<Long> addList = sgEditObj.getAddSubjectList();\n addList.add(ip.getSubjectByName(\"server\").keySet().toArray(new Long[1])[0]);\n List<Long> remList = sgEditObj.getRemoveSubjectList();\n remList.add(ip.getSubjectByName(\"workstation\").keySet().toArray(new Long[1])[0]);\n\n SubjectGroupKey groupKey = ip.updateSubjectGroup(subjectGroup, sgEditObj, userKey);\n EntityManagerContext.open(factory);\n try {\n Query query = EntityManagerContext.get().createQuery(\"select sg.subjects from \" +\n \"org.ebayopensource.turmeric.policyservice.model.SubjectGroup as sg \" + \n \"where sg.id = \" + groupId);\n List<org.ebayopensource.turmeric.policyservice.model.Subject> subjectList =\n query.getResultList();\n assertEquals(2, subjectList.size());\n assertEquals(\"gateway\", subjectList.get(0).getSubjectName());\n assertEquals(\"server\", subjectList.get(1).getSubjectName());\n } finally {\n EntityManagerContext.close();\n }\n }", "public String getSubject()\r\n {\r\n return (m_subject);\r\n }", "@Test\n public void fieldSubject() throws Exception {\n Document doc = new Document();\n\n // Set a value for the document's \"Subject\" built-in property.\n doc.getBuiltInDocumentProperties().setSubject(\"My subject\");\n\n // Create a SUBJECT field to display the value of that built-in property.\n DocumentBuilder builder = new DocumentBuilder(doc);\n FieldSubject field = (FieldSubject) builder.insertField(FieldType.FIELD_SUBJECT, true);\n field.update();\n\n Assert.assertEquals(field.getFieldCode(), \" SUBJECT \");\n Assert.assertEquals(field.getResult(), \"My subject\");\n\n // If we give the SUBJECT field's Text property value and update it, the field will\n // overwrite the current value of the \"Subject\" built-in property with the value of its Text property,\n // and then display the new value.\n field.setText(\"My new subject\");\n field.update();\n\n Assert.assertEquals(field.getFieldCode(), \" SUBJECT \\\"My new subject\\\"\");\n Assert.assertEquals(field.getResult(), \"My new subject\");\n\n Assert.assertEquals(\"My new subject\", doc.getBuiltInDocumentProperties().getSubject());\n\n doc.save(getArtifactsDir() + \"Field.SUBJECT.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.SUBJECT.docx\");\n\n Assert.assertEquals(\"My new subject\", doc.getBuiltInDocumentProperties().getSubject());\n\n field = (FieldSubject) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_SUBJECT, \" SUBJECT \\\"My new subject\\\"\", \"My new subject\", field);\n Assert.assertEquals(\"My new subject\", field.getText());\n }", "private static Set<Subject> findEquivalentSubjects(SubjectInfo subjectInfo, Subject targetSubject) {\n Set<Subject> subjects = new HashSet<Subject>();\n //first to try if this is a person \n AuthUtils.findPersonsSubjects(subjects, subjectInfo, targetSubject);\n if(subjects.isEmpty() || subjects.size() == 1) {\n //the return subjects from looking persons is o or 1. This means it can be group or a person without any groups.\n //let's try the group\n findEquivalentSubjectsForGroup(subjects, subjectInfo, targetSubject);\n }\n return subjects;\n }", "public void addSubject(Subject subject) {\n\t\tsub_dao.addSubject(subject);\r\n\t\t\r\n\t}", "@Test\n public void testGetBusinessObjectDefinitionSubjectMatterExpert()\n {\n BusinessObjectDefinitionEntity businessObjectDefinitionEntity =\n businessObjectDefinitionDaoTestHelper.createBusinessObjectDefinitionEntity(BDEF_NAMESPACE, BDEF_NAME, DATA_PROVIDER_NAME, DESCRIPTION);\n\n // Create a business object definition subject matter expert entity.\n BusinessObjectDefinitionSubjectMatterExpertEntity businessObjectDefinitionSubjectMatterExpertEntity =\n businessObjectDefinitionSubjectMatterExpertDaoTestHelper\n .createBusinessObjectDefinitionSubjectMatterExpertEntity(businessObjectDefinitionEntity, USER_ID);\n\n // Get business object definition subject matter expert.\n assertEquals(businessObjectDefinitionSubjectMatterExpertEntity,\n businessObjectDefinitionSubjectMatterExpertDao.getBusinessObjectDefinitionSubjectMatterExpert(businessObjectDefinitionEntity, USER_ID));\n\n // Get business object definition subject matter expert by passing all case-insensitive parameters in uppercase.\n assertEquals(businessObjectDefinitionSubjectMatterExpertEntity, businessObjectDefinitionSubjectMatterExpertDao\n .getBusinessObjectDefinitionSubjectMatterExpert(businessObjectDefinitionEntity, USER_ID.toUpperCase()));\n\n // Get business object definition subject matter expert by passing all case-insensitive parameters in lowercase.\n assertEquals(businessObjectDefinitionSubjectMatterExpertEntity, businessObjectDefinitionSubjectMatterExpertDao\n .getBusinessObjectDefinitionSubjectMatterExpert(businessObjectDefinitionEntity, USER_ID.toLowerCase()));\n\n // Try invalid values for all input parameters.\n assertNull(businessObjectDefinitionSubjectMatterExpertDao.getBusinessObjectDefinitionSubjectMatterExpert(\n businessObjectDefinitionDaoTestHelper.createBusinessObjectDefinitionEntity(BDEF_NAMESPACE, BDEF_NAME_2, DATA_PROVIDER_NAME, DESCRIPTION), USER_ID));\n assertNull(\n businessObjectDefinitionSubjectMatterExpertDao.getBusinessObjectDefinitionSubjectMatterExpert(businessObjectDefinitionEntity, \"I_DO_NOT_EXIST\"));\n }", "public void isNotEmpty() {\n if (Iterables.isEmpty(getSubject())) {\n // TODO(user): \"Not true that <[]> is not empty\" doesn't really need the <[]>,\n // since it's empty. But would the bulkier \"the subject\" really be better?\n // At best, we could *replace* <[]> with a given label (rather than supplementing it).\n // Perhaps the right failure message is just \"<[]> should not have been empty\"\n fail(\"is not empty\");\n }\n }", "@Test\n public void getSubjectGroupTest() throws Exception {\n createSubjectGroupTest();\n \n IPSubject ip = new IPSubject();\n \n String groupName = \"network\";\n Map<Long, SubjectGroup> resultByName = ip.getSubjectGroupInfoByName(groupName);\n \n assertNotNull(resultByName);\n assertEquals(groupName, resultByName.values().toArray(new SubjectGroup[1])[0].getSubjectGroupName());\n \n Long groupId = resultByName.keySet().toArray(new Long[1])[0];\n Map<Long, SubjectGroup> resultById = ip.getSubjectGroupInfoById(groupId);\n \n assertNotNull(resultById);\n assertEquals(groupName, resultById.values().toArray(new SubjectGroup[1])[0].getSubjectGroupName());\n assertEquals(groupId, resultById.keySet().toArray(new Long[1])[0]);\n \n Map<Long, SubjectGroup> resByType = ip.getSubjectGroupInfoByType();\n \n assertNotNull(resByType);\n assertEquals(1, resByType.size());\n\n Map<Long, Subject> resultSubject = ip.getSubjectByName(\"workstation\");\n assertNotNull(resultSubject);\n \n Long subjectId = resultSubject.keySet().toArray(new Long[1])[0];\n Map<Long, SubjectGroup> resBySubject = ip.findSubjectGroupInfoBySubject(subjectId);\n \n assertNotNull(resultById);\n assertEquals(groupName, resBySubject.values().toArray(new SubjectGroup[1])[0].getSubjectGroupName());\n assertEquals(groupId, resBySubject.keySet().toArray(new Long[1])[0]);\n }", "protected void assertSubject(MessageInfo message, String validatedString) {\n assertEquals(validatedString, message.getSubject());\n }", "public void setPublicSubject(String publicSubject) {\n this.publicSubject = publicSubject;\n }", "public void setSubject(String subj) {\n/* 296 */ getCOSObject().setString(COSName.SUBJ, subj);\n/* */ }", "@Test\n public void contains() {\n Observable.just(2, 30, 22, 5, 60, 1)\n .contains(22)\n .subscribe(mList::add);\n assertEquals(mList, Collections.singletonList(true));\n }", "public Builder setSubject(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n subject_ = value;\n onChanged();\n return this;\n }", "public Builder setSubject(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n subject_ = value;\n onChanged();\n return this;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof GPEdata)) {\n return false;\n }\n GPEdata other = (GPEdata) object;\n if ((this.subjectId == null && other.subjectId != null) || (this.subjectId != null && !this.subjectId.equals(other.subjectId))) {\n return false;\n }\n return true;\n }", "public Subject createSubject(Subject subject);", "@Test\r\n\tpublic void testsetMembers() {\r\n\t\tSet<Person> persons1 = new HashSet<Person>();\r\n\t\tmeetingu1.setMembers(persons1);\r\n\t\tassertTrue(meetingu1.getMembers().equals(persons1));\r\n\t}", "@Test\n public void testAddTwoIterate() {\n final Registrar<Object> testSubject = onCreateTestSubject();\n final Object testObserver0 = new Object();\n final Object testObserver1 = new Object();\n\n testSubject.addListener(testObserver0);\n testSubject.addListener(testObserver1);\n\n boolean foundSubject0 = false;\n boolean foundSubject1 = false;\n\n int iterations = 0;\n for (Object listener : testSubject) {\n ++iterations;\n if (listener == testObserver0) {\n foundSubject0 = true;\n } else if (listener == testObserver1) {\n foundSubject1 = true;\n }\n }\n assertTrue(foundSubject0);\n assertTrue(foundSubject1);\n assertEquals(2, iterations);\n }", "com.google.protobuf.ByteString getSubjectBytes();", "public XMessage checkSubjects(OpProjectSession session, XMessage request) {\r\n List subjectLocators = (List) (request.getArgument(SUBJECT_IDS));\r\n //get Everyone Group\r\n OpBroker broker = session.newBroker();\r\n try {\r\n checkSubjects(session, broker, subjectLocators);\r\n }\r\n catch (XServiceException exc) {\r\n XMessage reply = new XMessage();\r\n reply.setError(exc.getError());\r\n return (reply);\r\n }\r\n finally {\r\n broker.close();\r\n }\r\n return null;\r\n }", "public void setSubject(javax.security.auth.Subject subject)\n {\n __m_Subject = subject;\n }", "@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}", "public void validateSubjectIsCorrect(String expected) {\n assertTrue(\"The subject \" + subject.getText() + \" contains \" + expected, subject.getText().contains(expected));\n }", "@Override\n\t\tpublic Resource getSubject() {\n\t\t\treturn subject;\n\t\t}", "public void setSubjects(List<ACSubjectInfo> subjects) {\n this.subjects = subjects;\n }", "@Override\r\n public void setSubject(ISubject sub) {\n this.topic=sub;\r\n\r\n }", "@Test\r\n public void testisMenber1() {\r\n Assert.assertEquals(true, set1.isMember(4));\r\n }", "@Test\r\n\tpublic void test() {\r\n\t\tassertEquals(subscribe.getTopic() , \"room1\");\r\n\t\tassertEquals(subscribe.getTypeMap() , \"Galilei\");\r\n\t\tassertTrue(subscribe.isPossible(server));\r\n\t\tassertTrue(!subscribe2.isPossible(server));\r\n\t}", "public CheckPrincipalAccessRequest setSubject(SubjectInfo subject) {\n this.subject = subject;\n return this;\n }", "public void createNoSubject() {\n\n }" ]
[ "0.7864306", "0.77377284", "0.75855774", "0.7432765", "0.6795146", "0.6766592", "0.6527588", "0.641111", "0.6404243", "0.6394561", "0.6387878", "0.6376053", "0.6357919", "0.63174295", "0.63174295", "0.6294235", "0.62789786", "0.62709165", "0.62481976", "0.6246965", "0.6244417", "0.6221732", "0.62092537", "0.6193937", "0.6190771", "0.6190771", "0.6190771", "0.6175129", "0.6175129", "0.6146776", "0.6121895", "0.6116265", "0.61149365", "0.60918546", "0.6089156", "0.60804975", "0.6071989", "0.6071989", "0.6061246", "0.6039991", "0.6026119", "0.6026119", "0.6005738", "0.5995504", "0.5988893", "0.5983738", "0.5980979", "0.59707254", "0.59570783", "0.5956956", "0.5956305", "0.5956305", "0.5951482", "0.5932998", "0.5925981", "0.59177476", "0.59156924", "0.591177", "0.591001", "0.59073937", "0.5905979", "0.5905979", "0.59019405", "0.5869538", "0.58671397", "0.5861313", "0.5851956", "0.58329415", "0.58257127", "0.5817235", "0.58086115", "0.58049417", "0.5790785", "0.57323897", "0.5725187", "0.5721727", "0.57104284", "0.5689343", "0.5685444", "0.5676979", "0.56725734", "0.5671957", "0.5669678", "0.5669678", "0.5669163", "0.56304693", "0.56295407", "0.5628035", "0.5627453", "0.56249344", "0.56149477", "0.561395", "0.5607854", "0.5603236", "0.5602284", "0.5596653", "0.55883175", "0.5574865", "0.5563118", "0.5559108" ]
0.8158654
0
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View mView = inflater.inflate(R.layout.fragment_empty, container, false); listView = mView.findViewById(R.id.tomb_list); block_spinner = mView.findViewById(R.id.search_block); search_lot = mView.findViewById(R.id.search_lot); List<String> items = dataSource.block(); ArrayAdapter<String> adapter = new ArrayAdapter<>(Objects.requireNonNull(getActivity()), android.R.layout.simple_spinner_item, items); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); block_spinner.setAdapter(adapter); display(block_spin); search_lot.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { if(charSequence.length() == 0) { display(block_spin); } else { searchMe(charSequence.toString(),block_spin); } } @Override public void afterTextChanged(Editable editable) { } }); block_spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { block_spin = adapterView.getItemAtPosition(i).toString(); if(block_spin.equalsIgnoreCase("9")) { display(block_spin); } else { display(block_spin); } } @Override public void onNothingSelected(AdapterView<?> adapterView) { } }); listView.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { @Override public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) { final DataItems items = dataItems.get(i); AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(getActivity())); dialog.setCancelable(false); dialog.setTitle("Add"); dialog.setMessage("Are you sure you want to add new record?"); dialog.setPositiveButton("Add", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { Intent intent = new Intent(getActivity(),SettingActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP| Intent.FLAG_ACTIVITY_NEW_TASK| Intent.FLAG_ACTIVITY_NO_HISTORY); intent.putExtra(ADD_KEY ,items); startActivity(intent); getActivity().finish(); } }) .setNegativeButton("Cancel ", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); final AlertDialog alert = dialog.create(); alert.show(); return false; } }); add_lot = mView.findViewById(R.id.add_lot); add_lot.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(getActivity(), LotActivity.class); startActivity(intent); } }); return mView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6740675", "0.6725193", "0.67224836", "0.6699259", "0.6691596", "0.668896", "0.6687658", "0.66861755", "0.667755", "0.66756433", "0.6667425", "0.66667783", "0.6665166", "0.66614723", "0.66549766", "0.665031", "0.6643759", "0.6639389", "0.66378653", "0.66345453", "0.6626348", "0.66202056", "0.66176945", "0.66094035", "0.65976113", "0.65937936", "0.6585841", "0.6585124", "0.65741223", "0.65721804", "0.65698904", "0.65695107", "0.6569451", "0.6568099", "0.6565633", "0.6554688", "0.65533894", "0.65447044", "0.65432465", "0.6542017", "0.65385425", "0.6537571", "0.65369105", "0.6535379", "0.6533447", "0.6533258", "0.65316767", "0.6529574", "0.6528449", "0.65262675", "0.6525467", "0.6525181", "0.6524235", "0.6523963", "0.65187466", "0.65138274", "0.65137535", "0.6513218", "0.6513202", "0.65115535", "0.651113", "0.6510943", "0.6510124", "0.65094703", "0.65082514", "0.65038425", "0.65023196", "0.6501983", "0.65014684", "0.64982104", "0.64945936", "0.6492533", "0.6491023", "0.6488248", "0.64879525", "0.6487852", "0.6487744", "0.64873713", "0.6487171", "0.64851", "0.6485003", "0.6483167", "0.6482433", "0.64824027", "0.6481711", "0.6480902", "0.64779234", "0.64767206", "0.6476515", "0.6475657", "0.64747864", "0.64715266", "0.64714354", "0.64711314", "0.6470619", "0.6468112", "0.6466466", "0.64631015", "0.646268", "0.6462456", "0.64620507" ]
0.0
-1
Creates new form VSales
public VAdmin() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SalesView() {\n initComponents();\n salesDetailTable.setAutoCreateColumnsFromModel(false);\n jdcTransaksi.setDate(new Date());\n enableForm(false);\n buttonConfig();\n salesDetailTable.getTableHeader().setFont(new Font(\"Segoe UI\", 0, 18)); \n }", "public SalesPanel() {\n initComponents();\n tblSalesDetail.setAutoCreateColumnsFromModel(false);\n jdcTransaction.setDate(new Date());\n enableForm(false);\n btnDelete.setEnabled(false);\n btnAdd.setEnabled(true);\n btnCancel.setEnabled(false);\n btnEdit.setEnabled(false);\n btnSave.setEnabled(false);\n }", "public void create(Sale sale) {\n sale_dao.create(sale);\n }", "void newSale(double totalWithTaxes);", "public Sales() {\n\n initComponents();\n //loadSales();\n fillComboTienda();\n fillComboTitulos();\n }", "public void saveJpmProductSaleNew(JpmProductSaleNew jpmProductSaleNew);", "public SalesVan(String name) {\n super(name);\n }", "public void startNewSale() {\n sale = new Sale(cashRegister);\n }", "@Test\n public void createCatalogSaleTest() {\n CatalogSale catalogSale = null;\n // CatalogSale response = api.createCatalogSale(catalogSale);\n\n // TODO: test validations\n }", "private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }", "public void saleAct() {\t\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.saleTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic boolean makeNewSale() throws PreconditionException {\n\t\t/* check precondition */\n\t\tif (true) \n\t\t{ \n\t\t\t/* Logic here */\n\t\t\t//return primitive type\t\n\t\t\tSale s = null;\n\t\t\ts = (Sale) EntityManager.createObject(\"Sale\");\n\t\t\ts.setBelongedCashDesk(currentCashDesk);\n\t\t\tcurrentCashDesk.addContainedSales(s);\n\t\t\ts.setIsComplete(false);\n\t\t\ts.setIsReadytoPay(false);\n\t\t\tthis.setCurrentSale(s);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new PreconditionException();\t\t\t\t\n\t\t}\n\t\t//all relevant vars : s this\n\t\t//all relevant entities : Sale \n\t}", "public void createSales(String date1, String cname, String quan,\n\t\t\tString rate1, String amt1, String desc1) {\n\t\tContentValues cv=new ContentValues();\n\t\tcv.put(Sales_Date, date1);\n\t\tcv.put(Sales_Cname, cname);\n\t\t\n\t\tcv.put(Sales_Quan, Integer.parseInt(quan));\n\t\tcv.put(Sales_Rate, Integer.parseInt(rate1));\n\t\tcv.put(Sales_Amt, Integer.parseInt(amt1));\n\t\tcv.put(Sales_Des, desc1);\n\t\tourDatabase.insert(DATABASE_TABLE2, null, cv);\n\n\t}", "@Override\n public boolean createCustomerBySales(SalesCustomerBean salescustomer) {\n // TODO Auto-generated method stub\n salescustomer.setGendate(C_Util_Date.generateDate());\n salescustomer.setStatus(\"NEW\");\n insertorupdate = in_salescustdao.createSalesCustomer(salescustomer);\n return insertorupdate;\n }", "@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }", "public void salesScreen()\n {\n onSales = true;\n salesItem = new SalesItem[50];\n Button timbitAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add timbit:\");\n Button doughnutAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add doughnut:\");\n Button coffeeAdd = new Button(24, \"button-blue.png\", \"button-green.png\", \"Add coffee:\");\n \n addObject(timbitAdd, 400, 100);\n addObject(doughnutAdd, 400, 200);\n addObject(coffeeAdd, 400, 300);\n }", "@PostMapping(\"/product-sales-summaries\")\n @Timed\n public ResponseEntity<ProductSalesSummaryDTO> createProductSalesSummary(@Valid @RequestBody ProductSalesSummaryDTO productSalesSummaryDTO) throws URISyntaxException {\n log.debug(\"REST request to save ProductSalesSummary : {}\", productSalesSummaryDTO);\n if (productSalesSummaryDTO.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"productSalesSummary\", \"idexists\", \"A new productSalesSummary cannot already have an ID\")).body(null);\n }\n ProductSalesSummary productSalesSummary = productSalesSummaryMapper.productSalesSummaryDTOToProductSalesSummary(productSalesSummaryDTO);\n productSalesSummary = productSalesSummaryRepository.save(productSalesSummary);\n ProductSalesSummaryDTO result = productSalesSummaryMapper.productSalesSummaryToProductSalesSummaryDTO(productSalesSummary);\n return ResponseEntity.created(new URI(\"/api/product-sales-summaries/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"productSalesSummary\", result.getId().toString()))\n .body(result);\n }", "x0401.oecdStandardAuditFileTaxPT1.ProductDocument.Product addNewProduct();", "public SalesRecord() {\n super(Sales.SALES);\n }", "public void setNumSales(int numSales){\r\n this.sales = numSales;\r\n }", "public com.alain.puntocoma.model.Catalogo create(long catalogoId);", "public salesDetail() throws SQLException {\n monthsVal=new HashMap();\n String months=\"Jan Feb Mar Apr May Jun Jul Aug Sept Oct Nov Dec\";\n String[] monthsList = months.split(\" \");\n int mthCount=1;\n \n for(String mthVal:monthsList)\n { String mth=\"1\";\n if(mthCount<10)\n mth=\"0\"+mthCount;\n else mth=mthCount+\"\";\n monthsVal.put(mthVal,mth);\n mthCount++;\n }\n dft=new DefaultTableModel();\n dft.addColumn(\"Date\");\n dft.addColumn(\"Bill No.\");\n dft.addColumn(\"Sales Man\");\n dft.addColumn(\"Item\");\n dft.addColumn(\"Quantity\");\n dft.addColumn(\"Rate\");\n dft.addColumn(\"Amount\");\n SalesModel sm = new SalesModel(); \n Vector<Vector<String>> resultSet=sm.getAllDetails();\n for(Vector<String> list : resultSet)\n {\n dft.addRow(list);\n }\n \n usr=new DefaultTableModel();\n usr.addColumn(\"User Name\");\n usr.addColumn(\"Amount(NRS)\");\n Calendar currentDate = Calendar.getInstance(); //Get the current date\n SimpleDateFormat formatter= new SimpleDateFormat(\"yyyy-MM-dd\"); //format it as per your requirement\n String dateStr = formatter.format(currentDate.getTime());\n resultSet=sm.userSalesRecord(dateStr);\n for(Vector<String> list : resultSet)\n {\n usr.addRow(list);\n } \ninitComponents();\ngraphPanel=new GraphPanel(); \ngraphPanel.setBackground(new java.awt.Color(204, 204, 204));\nthis.add(graphPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 340,700,350));\nthis.setVisible(true);\n }", "public int addSale(SaleVO vo) {\n\t\treturn sale.Add(vo);\r\n\t}", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "Salesman() {\n super();\n super.setType(EMPLOYEE_TYPE);\n this.setAnnualSales(-1);\n }", "@FXML\n\tpublic void createProduct(ActionEvent event) {\n\t\tif (!txtProductName.getText().equals(\"\") && !txtProductPrice.getText().equals(\"\")\n\t\t\t\t&& ComboSize.getValue() != null && ComboType.getValue() != null && selectedIngredients.size() != 0) {\n\n\t\t\tProduct objProduct = new Product(txtProductName.getText(), ComboSize.getValue(), txtProductPrice.getText(),\n\t\t\t\t\tComboType.getValue(), selectedIngredients);\n\n\t\t\ttry {\n\t\t\t\trestaurant.addProduct(objProduct, empleadoUsername);\n\n\t\t\t\ttxtProductName.setText(null);\n\t\t\t\ttxtProductPrice.setText(null);\n\t\t\t\tComboSize.setValue(null);\n\t\t\t\tComboType.setValue(null);\n\t\t\t\tChoiceIngredients.setValue(null);\n\t\t\t\tselectedIngredients.clear();\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben de ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar los datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "public ProductCreate() {\n initComponents();\n }", "public SalesReportView() {\n initComponents();\n }", "public NewConsultasS() {\n initComponents();\n limpiar();\n bloquear();\n }", "Rental createRental();", "public void createInvoice() {\n\t}", "@Override\r\n public int createDetalleventa(Detalleventa dv) {\r\n sql = \"INSERT INTO public.detalle_venta(id_venta, item, igv, sub_total, descuento, id_producto_stock, cantidad, precio_unit) \"\r\n + \"VALUES(\"+dv.getId_venta()+\",\"+dv.getItem()+\",\"+dv.getIgv()+\",\"+dv.getSub_total()+\",\"+dv.getDescuento()+\",\"+dv.getId_producto_stock()+\",\"+dv.getCantidad()+\", \"+dv.getPrecio_unit()+\")\";\r\n return cx.performKeys(sql);\r\n }", "public void startSale() {\n sale = new Sale();\n }", "@Override\n public boolean createSalesOrder(SalesOrderBean salesoder) {\n salesoder.setGendate(C_Util_Date.generateDate());\n return in_salesorderdao.createSalesOrder(salesoder);\n }", "public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }", "public void startSale(){\n this.sale = new Sale();\n this.inventory = new Inventory();\n this.accounting = new Accounting();\n }", "public static Sale validateSale(TextField billno, LocalDate startdate, ComboBox customername, TextField nextdate, String onekgQty, String twokgQty, String fourkgQty, String fivekgQty, String sixkgQty, String ninekgQty, String onekgAmt, String twokgAmt, String fourkgAmt, String fivekgAmt, String sixkgAmt, String ninekgAmt, TextField amount) {\r\n Sale sale = new Sale();\r\n try {\r\n if (billno.getText().isEmpty() || startdate == null || customername.getValue() == null || nextdate.getText().isEmpty() || amount.getText().isEmpty()) {\r\n new PopUp(\"Error\", \"Field is Empty\").alert();\r\n } else {\r\n sale = new Sale();\r\n Date ndd = new SimpleDateFormat(\"dd-MM-yyyy\").parse(nextdate.getText());\r\n java.sql.Date nd = new java.sql.Date(ndd.getTime());\r\n sale.setBillno(Integer.valueOf(billno.getText()));\r\n sale.setStartdate(java.sql.Date.valueOf(startdate));\r\n sale.setShopname(customername.getValue().toString());\r\n sale.setNextdate(nd);\r\n if (onekgQty == null) {\r\n onekgQty = \"0\";\r\n }\r\n if (twokgQty == null) {\r\n twokgQty = \"0\";\r\n }\r\n if (fourkgQty == null) {\r\n fourkgQty = \"0\";\r\n }\r\n if (fivekgQty == null) {\r\n fivekgQty = \"0\";\r\n }\r\n if (sixkgQty == null) {\r\n sixkgQty = \"0\";\r\n }\r\n if (ninekgQty == null) {\r\n ninekgQty = \"0\";\r\n }\r\n sale.setOnekgqty(Integer.valueOf(onekgQty));\r\n sale.setTwokgqty(Integer.valueOf(twokgQty));\r\n sale.setFourkgqty(Integer.valueOf(fourkgQty));\r\n sale.setFivekgqty(Integer.valueOf(fivekgQty));\r\n sale.setSixkgqty(Integer.valueOf(sixkgQty));\r\n sale.setNinekgqty(Integer.valueOf(ninekgQty));\r\n if (onekgAmt == null) {\r\n onekgAmt = \"0.00\";\r\n }\r\n if (twokgAmt == null) {\r\n twokgAmt = \"0.00\";\r\n }\r\n if (fourkgAmt == null) {\r\n fourkgAmt = \"0.00\";\r\n }\r\n if (fivekgAmt == null) {\r\n fivekgAmt = \"0.00\";\r\n }\r\n if (sixkgAmt == null) {\r\n sixkgAmt = \"0.00\";\r\n }\r\n if (ninekgAmt == null) {\r\n ninekgAmt = \"0.00\";\r\n }\r\n sale.setOnekgamount(BigDecimal.valueOf(Double.valueOf(onekgAmt)));\r\n sale.setTwokgamount(BigDecimal.valueOf(Double.valueOf(twokgAmt)));\r\n sale.setFourkgamount(BigDecimal.valueOf(Double.valueOf(fourkgAmt)));\r\n sale.setFivekgamount(BigDecimal.valueOf(Double.valueOf(fivekgAmt)));\r\n sale.setSixkgamount(BigDecimal.valueOf(Double.valueOf(sixkgAmt)));\r\n sale.setNinekgamount(BigDecimal.valueOf(Double.valueOf(ninekgAmt)));\r\n sale.setAmount(BigDecimal.valueOf(Double.valueOf(amount.getText())));\r\n\r\n }\r\n } catch (ParseException error) {\r\n error.printStackTrace();\r\n }\r\n return sale;\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnExit = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n btnSave = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n btnEdit = new javax.swing.JButton();\n btnAdd = new javax.swing.JButton();\n btnSearch = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblSalesDetail = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n txtProductId = new javax.swing.JTextField();\n btnLookupProduct = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txtId = new javax.swing.JTextField();\n jdcTransaction = new com.toedter.calendar.JDateChooser();\n lblTotal = new javax.swing.JLabel();\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n setTitle(\"Penjualan\");\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n formInternalFrameClosing(evt);\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n btnExit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnudoor.png\"))); // NOI18N\n btnExit.setText(\"Keluar\");\n btnExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnExitActionPerformed(evt);\n }\n });\n\n btnCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnuCancel.png\"))); // NOI18N\n btnCancel.setText(\"Batal\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n\n btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnuSave.png\"))); // NOI18N\n btnSave.setText(\"Simpan\");\n btnSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSaveActionPerformed(evt);\n }\n });\n\n btnDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnudelete.png\"))); // NOI18N\n btnDelete.setText(\"Hapus\");\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n\n btnEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnuManuaEdit.png\"))); // NOI18N\n btnEdit.setText(\"Edit\");\n btnEdit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEditActionPerformed(evt);\n }\n });\n\n btnAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnuNew.png\"))); // NOI18N\n btnAdd.setText(\"Tambah\");\n btnAdd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddActionPerformed(evt);\n }\n });\n\n btnSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/mnuFind.png\"))); // NOI18N\n btnSearch.setText(\"Cari\");\n btnSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSearchActionPerformed(evt);\n }\n });\n\n tblSalesDetail.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Kode Barang\", \"Nama Barang\", \"Harga Satuan\", \"Kuantitas\", \"Sub Total\"\n }\n ));\n tblSalesDetail.setCellSelectionEnabled(true);\n jScrollPane1.setViewportView(tblSalesDetail);\n\n jLabel1.setText(\"Kode Barang\");\n\n txtProductId.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtProductIdActionPerformed(evt);\n }\n });\n\n btnLookupProduct.setText(\"...\");\n btnLookupProduct.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLookupProductActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"ID Transaksi\");\n\n jLabel3.setText(\"Tanggal\");\n\n txtId.setEnabled(false);\n\n jdcTransaction.setEnabled(false);\n\n lblTotal.setFont(new java.awt.Font(\"Courier New\", 1, 36)); // NOI18N\n lblTotal.setText(\"Rp. 0\");\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnAdd)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnEdit)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnDelete)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSave)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnCancel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSearch)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnExit)\n .addGap(73, 73, 73))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 630, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(txtProductId, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnLookupProduct))\n .addComponent(txtId, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jdcTransaction, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(80, 80, 80))\n .addGroup(layout.createSequentialGroup()\n .addComponent(lblTotal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())))))\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnAdd, btnCancel, btnDelete, btnEdit, btnExit, btnSave, btnSearch});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnDelete)\n .addComponent(btnSave)\n .addComponent(btnCancel)\n .addComponent(btnEdit)\n .addComponent(btnSearch)\n .addComponent(btnExit))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jdcTransaction, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtProductId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnLookupProduct)))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(9, 9, 9)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 347, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnAdd, btnCancel, btnDelete, btnEdit, btnExit, btnSave, btnSearch});\n\n pack();\n }", "Purchase create(Purchase purchase) throws SQLException, DAOException;", "public Boolean insertSale(Sale s) throws SQLException{\n\t\t// reset variables\n\t\tConnection dbConnection = null;\n\t\tPreparedStatement preparedStatement= null;\n\t\t// query for inserting a new vehicle\n\t\tString query = \"INSERT INTO sales (vehicle_id, sold_date, sold_price, status) VALUES (?,?,?,?)\";\n\t\ttry{\n\t\t\t// connect to database\n\t\t\tdbConnection = getDBConnection();\n\t\t\tpreparedStatement = dbConnection.prepareStatement(query);\n\t\t\t// set variables into each questionmark\n\t\t\tpreparedStatement.setInt(1,s.getVehicle_id());\n\t\t\tpreparedStatement.setString(2,s.getSold_date());\n\t\t\tpreparedStatement.setInt(3,s.getSold_price());\n\t\t\tpreparedStatement.setString(4,s.getStatus());\n\t\t\tSystem.out.println(\"DBQuery = \"+query);\n\t\t\t// execute query\n\t\t\tpreparedStatement.executeUpdate();\n\t\t} catch(Exception e){return false;}\n\t\t\n\t\tfinally{\n\t\t\t// close connection\n\t\t\tif (preparedStatement != null){preparedStatement.close();}\n\t\t\tif (dbConnection != null){dbConnection.close();}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public void newSale(double payment) {\n calculateTotalRevenue(payment);\n showTotalRevenue();\n }", "public AddCustomer() {\n initComponents();\n loadAllToTable();\n\n tblCustomers.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tblCustomers.getSelectedRow() == -1) {\n return;\n }\n\n String cusId = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 0).toString();\n\n String cusName = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 1).toString();\n String contact = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 2).toString();\n String creditLimi = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 3).toString();\n String credidays = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 4).toString();\n\n txtCustId.setText(cusId);\n txtCustomerN.setText(cusName);\n\n txtContact.setText(contact);\n txtCreditLimit.setText(creditLimi);\n txtCreditDays.setText(credidays);\n\n }\n });\n }", "private void createSerie(ws.Serie entity) {\n ws.DrawdedeWebService port = service.getDrawdedeWebServicePort();\n port.createSerie(entity);\n }", "public InvoiceCreate() {\n initComponents();\n }", "public SalesRecords() {\n super();\n }", "public Sale(InventoryHandler inv){\n this.saleInfo = new SaleInfo();\n this.inventory = inv;\n }", "public New_shipment() {\n initComponents();\n init();\n \n }", "public JpmProductSaleNew getJpmProductSaleNew(final Long uniNo);", "public static Result newProduct() {\n Form<models.Product> productForm = form(models.Product.class).bindFromRequest();\n if(productForm.hasErrors()) {\n return badRequest(\"Tag name cannot be 'tag'.\");\n }\n models.Product product = productForm.get();\n product.save();\n return ok(product.toString());\n }", "public void addSales(double totalSales) {\n this.total_sales = totalSales;\n }", "public SalesRecords(Long id, Long opportunityId, Long salesmanId, Integer departmentId, Boolean status, Double money, Date createDate) {\n this.id = id;\n this.opportunityId = opportunityId;\n this.salesmanId = salesmanId;\n this.departmentId = departmentId;\n this.status = status;\n this.money = money;\n this.createDate = createDate;\n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "@Auth({User.Role.Admin, User.Role.Customer})\n public static Result create(Long id) {\n Form<Product> form = null;\n List<Manufacturer> manufacturers = Manufacturer.find.all();\n if(id == 0)\n form = Form.form(Product.class).fill(new Product());\n else\n form = Form.form(Product.class).fill(Product.findById(id.intValue()));\n return ok(views.html.product.form.render(form, manufacturers));\n }", "public SoftwareSales(int qty){\n\t\tunitsSold = qty;\n\t\tbasePrice(RETAIL_PRICE, unitsSold);\n\t\tsalesTotal();\n\t\t}", "public String add(Calendar calendar, Car car, String salesPerson, String type, Double salePrice){\n id = (int)(Math.random() * 300);\n Transaction newTransaction = new Transaction(id, calendar,car, salesPerson, type, salePrice);\n LinkedList<Transaction> tempTransactionByTime = new LinkedList<Transaction>();\n int m = calendar.get(Calendar.MONTH);\n int tempCount = 0;\n accSystem.put(id, newTransaction);\n allTransactionsID.add(id);\n\n if (type.equals(\"BUY\")){\n currentBuyID = id;\n totalSalesCount++;\n totalSaleProfit += car.getPrice();\n if (highestSalesMonth.get(m) != null){\n tempCount = highestSalesMonth.get(m) + 1;\n }\n }else if (type.equals(\"RETURN\") || type.equals(\"RET\")){\n currentBuyID = -1;\n totalSaleProfit -= car.getPrice();\n totalSalesCount--;\n totalReturnCount++;\n if (highestSalesMonth.get(m) != null){\n tempCount = highestSalesMonth.get(m) - 1;\n }\n }\n highestSalesMonth.put(m, tempCount);\n \n if (transactionByTime.get(m) != null){\n tempTransactionByTime.addAll(transactionByTime.get(m)); \n }\n tempTransactionByTime.add(newTransaction);\n transactionByTime.put(m, tempTransactionByTime);\n\n return newTransaction.display();\n }", "public void setSalesProp(String salesProp) {\n this.salesProp = salesProp;\n }", "public SalesLead addSL(String _empID) {\n SalesLead sl = new SalesLead(cCount++);\n\n System.out.println(\"Employee ID: \" + _empID);\n sl.setSL_empID(_empID);\n\n System.out.println(\"Please enter location ( 'SantaRosa' / 'Waterfall' ) \");\n sl_location = Exception.testLocation(Exception.getInput());\n sl.setSL_location(sl_location);\n\n System.out.println(\"Please enter SL first name: \");\n sl_firstName = Exception.testAlpha(Exception.getInput());\n sl.setSl_firstName(sl_firstName);\n\n System.out.println(\"Please enter SL last name: \");\n sl_lastName = Exception.testAlpha(Exception.getInput());\n sl.setSl_lastName(sl_lastName);\n\n System.out.println(\"Please enter date: \");\n salesLeadDate = Exception.testDate(Exception.getInput());\n sl.setSl_Date(salesLeadDate);\n\n System.out.println(\"Please enter SL phone number: \\n Please use this format: (343) 322-1232)\");\n sl_phoneNumber = Exception.testPhone(Exception.getInput());\n sl.setSl_phoneNumber(sl_phoneNumber);\n\n System.out.println(\"Please enter SL email: \");\n sl_Email = Exception.testEmail(Exception.getInput());\n sl.setSl_Email(sl_Email);\n\n sl.setSalesLeadID(cCount);\n\n\n return sl;\n }", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "@Override\n\tpublic void salvar() {\n\t\t\n\t\tPedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\n\t\tPedidoCompra.setAtivo(true);\n//\t\tPedidoCompra.setNome(nome.getText());\n\t\tPedidoCompra.setStatus(StatusPedido.valueOf(status.getSelectionModel().getSelectedItem().name()));\n//\t\tPedidoCompra.setSaldoinicial(\"0.00\");\n\t\t\n\t\tPedidoCompra.setData(new Date());\n\t\tPedidoCompra.setIspago(false);\n\t\tPedidoCompra.setData_criacao(new Date());\n\t\tPedidoCompra.setFornecedor(cbfornecedores.getSelectionModel().getSelectedItem());\n\t\tPedidoCompra.setTotal(PedidoCompra.CalcularTotal(PedidoCompra.getItems()));\n\t\tPedidoCompra.setTotalpago(PedidoCompra.CalculaTotalPago(PedidoCompra.getFormas()));\n\t\t\n\t\tgetservice().save(PedidoCompra);\n\t\tsaveAlert(PedidoCompra);\n\t\tclearFields();\n\t\tdesligarLuz();\n\t\tloadEntityDetails();\n\t\tatualizar.setDisable(true);\n\t\tsalvar.setDisable(false);\n\t\t\n\t\tsuper.salvar();\n\t}", "@RequestMapping(value = \"/buy/create.do\", method = RequestMethod.POST)\r\n public ModelAndView create(HttpServletRequest request, BuyVO buyVO) {\n ModelAndView mav = new ModelAndView();\r\n mav.setViewName(\"/review/message\"); // webapp/buy/message.jsp\r\n \r\n ArrayList<String> msgs = new ArrayList<String>();\r\n ArrayList<String> links = new ArrayList<String>();\r\n \r\n String root = request.getContextPath();\r\n if (buyProc.create(buyVO) == 1) {\r\n\r\n // 수정된 부분\r\n msgs.add(\"<i class='fa fa-normal fa-check-circle' style='font-size:5em;'></i>\");\r\n msgs.add(\"게시물을 등록했습니다.\");\r\n links.add(\"<a class='button' href='./create.do?'>계속 등록</a>\");\r\n\r\n } else {\r\n // 수정된 부분\r\n msgs.add(\"<i class='fa fa-normal fa-exclamation-circle' style='font-size:5em;'></i>\");\r\n msgs.add(\"게시물 등록에 실패했습니다.\");\r\n msgs.add(\"다시한번 시도해주세요.\");\r\n links.add(\"<a class='button' href='history.back()'>다시 시도</a>\");\r\n\r\n }\r\n // 수정된 부분\r\n links.add(\"<a class='button' href='./list.do?'>목록</a>\");\r\n links.add(\"<a class='button' href='\" + root + \"/home.do'>홈페이지</a>\");\r\n\r\n mav.addObject(\"msgs\", msgs);\r\n mav.addObject(\"links\", links);\r\n \r\n return mav;\r\n }", "public PnNewCustomer() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Title = new javax.swing.JLabel();\n NAME = new javax.swing.JLabel();\n txt_name = new javax.swing.JTextField();\n PROVIDER = new javax.swing.JLabel();\n ComboBox_provider = new javax.swing.JComboBox<>();\n CATEGORY = new javax.swing.JLabel();\n ComboBox_category = new javax.swing.JComboBox<>();\n Trademark = new javax.swing.JLabel();\n ComboBox_trademark = new javax.swing.JComboBox<>();\n COLOR = new javax.swing.JLabel();\n ComboBox_color = new javax.swing.JComboBox<>();\n SIZE = new javax.swing.JLabel();\n ComboBox_size = new javax.swing.JComboBox<>();\n MATERIAL = new javax.swing.JLabel();\n ComboBox_material = new javax.swing.JComboBox<>();\n PRICE = new javax.swing.JLabel();\n txt_price = new javax.swing.JTextField();\n SAVE = new javax.swing.JButton();\n CANCEL = new javax.swing.JButton();\n Background = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n Title.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n Title.setForeground(new java.awt.Color(255, 255, 255));\n Title.setText(\"NEW PRODUCT\");\n getContentPane().add(Title, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 33, -1, -1));\n\n NAME.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n NAME.setForeground(new java.awt.Color(255, 255, 255));\n NAME.setText(\"Name\");\n getContentPane().add(NAME, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 150, 70, 30));\n\n txt_name.setBackground(new java.awt.Color(51, 51, 51));\n txt_name.setForeground(new java.awt.Color(255, 255, 255));\n getContentPane().add(txt_name, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 150, 100, 30));\n\n PROVIDER.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n PROVIDER.setForeground(new java.awt.Color(255, 255, 255));\n PROVIDER.setText(\"Provider\");\n getContentPane().add(PROVIDER, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 200, 70, 30));\n\n ComboBox_provider.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_provider.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_provider.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_provider, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 200, 100, 30));\n\n CATEGORY.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n CATEGORY.setForeground(new java.awt.Color(255, 255, 255));\n CATEGORY.setText(\"Category\");\n getContentPane().add(CATEGORY, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 250, 70, 30));\n\n ComboBox_category.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_category.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_category.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_category, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 250, 100, 30));\n\n Trademark.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n Trademark.setForeground(new java.awt.Color(255, 255, 255));\n Trademark.setText(\"Trademark\");\n getContentPane().add(Trademark, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 300, 70, 30));\n\n ComboBox_trademark.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_trademark.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_trademark.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n ComboBox_trademark.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ComboBox_trademarkActionPerformed(evt);\n }\n });\n getContentPane().add(ComboBox_trademark, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 300, 100, 30));\n\n COLOR.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n COLOR.setForeground(new java.awt.Color(255, 255, 255));\n COLOR.setText(\"Color\");\n getContentPane().add(COLOR, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 150, 70, 30));\n\n ComboBox_color.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_color.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_color.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_color, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 150, 100, 30));\n\n SIZE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n SIZE.setForeground(new java.awt.Color(255, 255, 255));\n SIZE.setText(\"Size\");\n getContentPane().add(SIZE, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 200, 70, 30));\n\n ComboBox_size.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_size.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_size.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_size, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 200, 100, 30));\n\n MATERIAL.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n MATERIAL.setForeground(new java.awt.Color(255, 255, 255));\n MATERIAL.setText(\"Material\");\n getContentPane().add(MATERIAL, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 250, 70, 30));\n\n ComboBox_material.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_material.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_material.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_material, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 250, 100, 30));\n\n PRICE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n PRICE.setForeground(new java.awt.Color(255, 255, 255));\n PRICE.setText(\"Price\");\n getContentPane().add(PRICE, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 300, 70, 30));\n\n txt_price.setBackground(new java.awt.Color(51, 51, 51));\n txt_price.setForeground(new java.awt.Color(255, 255, 255));\n txt_price.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_priceActionPerformed(evt);\n }\n });\n getContentPane().add(txt_price, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 300, 100, 30));\n\n SAVE.setBackground(new java.awt.Color(25, 25, 25));\n SAVE.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar-A.png\"))); // NOI18N\n SAVE.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n SAVE.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar-B.png\"))); // NOI18N\n SAVE.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar.png\"))); // NOI18N\n SAVE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SAVEActionPerformed(evt);\n }\n });\n getContentPane().add(SAVE, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 480, 50, 50));\n\n CANCEL.setBackground(new java.awt.Color(25, 25, 25));\n CANCEL.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no-A.png\"))); // NOI18N\n CANCEL.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n CANCEL.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no-B.png\"))); // NOI18N\n CANCEL.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no.png\"))); // NOI18N\n CANCEL.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CANCELActionPerformed(evt);\n }\n });\n getContentPane().add(CANCEL, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 480, 50, 50));\n\n Background.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/fondo_windows2.jpg\"))); // NOI18N\n getContentPane().add(Background, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n }", "@OnClick (R.id.create_course_btn)\n public void createCourse()\n {\n\n CourseData courseData = new CourseData();\n courseData.CreateCourse( getView() ,UserData.user.getId() ,courseName.getText().toString() , placeName.getText().toString() , instructor.getText().toString() , Integer.parseInt(price.getText().toString()), date.getText().toString() , descreption.getText().toString() ,location.getText().toString() , subField.getSelectedItem().toString() , field.getSelectedItem().toString());\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\n\t\t\tString name=\"\";\n\t\t\tname=view.getNameTF().getText();\n\t\t\tString price=\"\";\n\t\t\tprice=view.getPriceTF().getText();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif(name.equals(\"\") ||price.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tthrow new BadInput(\"Nu au fost completate toate casutele pentru a se putea realiza CREATE!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdouble p=Double.parseDouble(price);\n\t\t\t\t\n\t\t\t\tMenuItem nou=new BaseProduct(name,p);\n\t\t\t\t\n\t\t\t\trestaurant.createMenuItem(nou);\n\t\t\t\tview.updateList(name);\n\t\t\t\t\n\t\t\t}catch(NumberFormatException ex)\n\t\t\t{\n\t\t\t\tview.showError(\"Nu s-a introdus o valoare valida pentru pret!\");\n\t\t\t}\n\t\t\tcatch(BadInput ex)\n\t\t\t{\n\t\t\t\tview.showError(ex.getMessage());\n\t\t\t}\n\t\t\tcatch(AssertionError er)\n\t\t\t{\n\t\t\t\tview.showError(\"Nu se poate adauga produsul deoarece acesta EXISTA deja!!!\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "public void createNewExpense(View view) {\n EditText newExpenseNameInput = (EditText) findViewById(R.id.newExpenseName);\n EditText newDateInput = (EditText) findViewById(R.id.addExpenseDateEditText);\n Spinner newWhoPaidSpinner = (Spinner) findViewById(R.id.addExpensePayerSpinner);\n\n String newExpenseName = newExpenseNameInput.getText().toString();\n Long newAmount = totalDebt;\n Date newDate = null;\n try {\n newDate = new SimpleDateFormat(\"dd/MM/yyyy\").parse(newDateInput.getText().toString());\n } catch (ParseException e) {\n e.printStackTrace();\n }\n String newWhoPaid = newWhoPaidSpinner.getSelectedItem().toString();\n List<String> newPayees = new ArrayList<String>();\n\n int payeeListItemHoldersSize = payeeListItemHolders.size();\n List<Long> newOwedAmounts = new ArrayList<Long>();\n\n for (int i = 0; i < payeeListItemHoldersSize; i++) {\n if (payeeListItemHolders.get(i).getCheckBox().isChecked()) {\n newPayees.add(payeeListItemHolders.get(i).getCheckBox().getText().toString());\n newOwedAmounts.add(payeeListItemHolders.get(i).getDebt());\n }\n }\n\n Expense newExpense = new Expense(newExpenseName, newAmount, newDate, newWhoPaid, newPayees, newOwedAmounts, group);\n\n try {\n newExpense.save();\n } catch (com.parse.ParseException e) {\n e.printStackTrace();\n }\n\n // finish activity\n Intent intent = setUpBackIntent();\n setResult(RESULT_OK, intent);\n finish();\n }", "public void createExpense(ExpenseBE expenseBE) {\n\n }", "public ControllerNewCRV(newCRV fenetre, DAOProduit DaoProd, DAOCategorie DaoCat,DAOMedecin daoMed,DAOVisiteur daoVisi, DAOCompteRendu daoCRV) {\n\t\t\n\t\tthis.fenetre = fenetre;\n\t\tthis.daoCat = DaoCat;\n\t\tthis.daoProd = DaoProd;\n\t\tthis.daoMed = daoMed;\n\t\tthis.daoVisi = daoVisi;\n\t\tthis.daoCRV = daoCRV;\n\t\tfenetre.getBtnRetour().addActionListener(this);\n\t\tfenetre.getBtnValider().addActionListener(this);\n\t\tfenetre.getBtnAjouter().addActionListener(this);\n\t\tfenetre.getComboBox_cat().addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent event) {\n\t //\n\t // Get the source of the component, which is our combo\n\t // box.\n\t //\n\t JComboBox comboBox = (JComboBox) event.getSource();\n\t String comboBoxname = comboBox.getName();\n\t \t\t\n\t \t\tswitch (comboBoxname) {\n\t \t\tcase \"selectionner\":\n\t \t\t\tviewProduit();\n\t \t\t\tbreak;\t\n\n\t \t\tdefault:\n\t \t\t\tbreak;\n\t \t\t}\t\t\n\t \n\n\t }\n\t });\n\t}", "@FXML\n\tpublic void buttonCreateProductType(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtProductTypeName.getText();\n\t\tif (!name.equals(empty)) {\n\t\t\tProductType obj = new ProductType(txtProductTypeName.getText());\n\t\t\ttry {\n\t\t\t\tboolean found = restaurant.addProductType(obj, empleadoUsername); // Se añade a la lista de tipos de\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// producto DEL RESTAURANTE\n\t\t\t\tif (found == false) {\n\t\t\t\t\ttypeOptions.add(name);// Se añade a la lista de tipos de producto para ser mostrada en los combobox\n\t\t\t\t}\n\t\t\t\ttxtProductTypeName.setText(\"\");\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"El tipo de producto a crear debe tener un nombre \");\n\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\tdialog.show();\n\n\t\t}\n\t}", "public CadastroProdutoNew() {\n initComponents();\n }", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "public void setSale_num(Integer sale_num) {\n this.sale_num = sale_num;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnAdd = new javax.swing.JButton();\n btnEdit = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n btnSave = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n btnExit = new javax.swing.JButton();\n btnSearch = new javax.swing.JButton();\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n txtId = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jdcTransaksi = new com.toedter.calendar.JDateChooser();\n jLabel3 = new javax.swing.JLabel();\n txtIdBarang = new javax.swing.JTextField();\n btnBrowseId = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n salesDetailTable = new javax.swing.JTable();\n jLabel4 = new javax.swing.JLabel();\n txtTotal = new javax.swing.JTextField();\n\n setClosable(true);\n setTitle(\"Penjualan\");\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 formInternalFrameClosed(evt);\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent 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 btnAdd.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnAdd.setText(\"Tambah\");\n btnAdd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddActionPerformed(evt);\n }\n });\n\n btnEdit.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnEdit.setText(\"Edit\");\n btnEdit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnEditActionPerformed(evt);\n }\n });\n\n btnDelete.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnDelete.setText(\"Hapus\");\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n\n btnSave.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnSave.setText(\"Simpan\");\n btnSave.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSaveActionPerformed(evt);\n }\n });\n\n btnCancel.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnCancel.setText(\"Batal\");\n btnCancel.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnCancelActionPerformed(evt);\n }\n });\n\n btnExit.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnExit.setText(\"Keluar\");\n btnExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnExitActionPerformed(evt);\n }\n });\n\n btnSearch.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnSearch.setText(\"Cari\");\n btnSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSearchActionPerformed(evt);\n }\n });\n\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));\n\n jLabel1.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n jLabel1.setText(\"ID Transaksi :\");\n\n txtId.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n\n jLabel2.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n jLabel2.setText(\"Tanggal :\");\n\n jdcTransaksi.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n\n jLabel3.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n jLabel3.setText(\"Kode Barang :\");\n\n txtIdBarang.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n txtIdBarang.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtIdBarangActionPerformed(evt);\n }\n });\n\n btnBrowseId.setFont(new java.awt.Font(\"Segoe UI\", 0, 12)); // NOI18N\n btnBrowseId.setText(\"...\");\n btnBrowseId.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBrowseIdActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(txtIdBarang)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnBrowseId))\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jdcTransaksi, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jdcTransaksi, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtIdBarang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnBrowseId))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n salesDetailTable.setFont(new java.awt.Font(\"Segoe UI\", 0, 18)); // NOI18N\n salesDetailTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Tandai\", \"ID Barang\", \"Nama Barang\", \"Harga\", \"Kuantitas\", \"Subtotal\"\n }\n ));\n salesDetailTable.setCellSelectionEnabled(true);\n salesDetailTable.setGridColor(new java.awt.Color(204, 204, 204));\n salesDetailTable.setRowHeight(26);\n salesDetailTable.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n salesDetailTableKeyReleased(evt);\n }\n });\n jScrollPane1.setViewportView(salesDetailTable);\n\n jLabel4.setFont(new java.awt.Font(\"Segoe UI\", 1, 36)); // NOI18N\n jLabel4.setText(\"Total :\");\n\n txtTotal.setFont(new java.awt.Font(\"Segoe UI\", 1, 36)); // NOI18N\n txtTotal.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnAdd)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnEdit)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnDelete)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSave)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnCancel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnExit)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSearch)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 459, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n\n layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnAdd, btnCancel, btnDelete, btnEdit, btnExit, btnSave, btnSearch});\n\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnAdd)\n .addComponent(btnEdit)\n .addComponent(btnDelete)\n .addComponent(btnSave)\n .addComponent(btnCancel)\n .addComponent(btnExit)\n .addComponent(btnSearch))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 315, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "@Override\n\tpublic void createItem(Object result) {\n\t\t\n\t\tunloadform();\n\t\tif (result != null) {\n\t\t\tIOTransactionLogic tr = (IOTransactionLogic) result;\n\t\t\tint year = Calendar.getInstance().get(Calendar.YEAR);\n\t\t\tint month = Calendar.getInstance().get(Calendar.MONTH);\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tcal.setTime(tr.getDate());\n\t\t\tint trYear = cal.get(Calendar.YEAR);\n\t\t\tint trMonth = cal.get(Calendar.MONTH);\n\t\t\t\n\t\t\tif ((year == trYear) && (month == trMonth)\n\t\t\t\t\t&& tr.getBankAccountID() == bal.getId()) {\n\t\t\t\ttransactionDisplayer trDisplayer = new transactionDisplayer(tr);\n\t\t\t\tsetDataLineChart();\n\t\t\t\tsetDataPieChart();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@RequestMapping(params = \"new\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String createProductForm(Model model) { \t\n \t\n\t\t//Security information\n\t\tmodel.addAttribute(\"admin\",security.isAdmin()); \n\t\tmodel.addAttribute(\"loggedUser\", security.getLoggedInUser());\n\t\t\n\t model.addAttribute(\"product\", new Product());\n\t return \"products/newProduct\";\n\t}", "@RequestMapping(value = \"/create\", method = RequestMethod.POST)\n public ModelAndView create(@RequestParam(\"horasalida\") Date horasalida,@RequestParam(\"horallegada\") Date horallegada,@RequestParam(\"aeropuerto_idaeropuerto\") Long aeropuerto_idaeropuerto,\n \t\t@RequestParam(\"aeropuerto_idaeropuerto2\") Long aeropuerto_idaeropuerto2,@RequestParam(\"avion_idavion\") Long avion_idavion) {\n Vuelo post=new Vuelo();\n post.setHorallegada(horallegada);\n post.setHorasalida(horasalida);\n\t\t\n post.setAeropuerto_idaeropuerto(aeropuerto_idaeropuerto);\n post.setAeropuerto_idaeropuerto2(aeropuerto_idaeropuerto2);\n post.setAvion_idavion(avion_idavion);\n repository.save(post);\n return new ModelAndView(\"redirect:/vuelos\");\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.BusinessIndustryLicense addNewBusinessIndustryLicenses();", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "@Valid\n\tvoid create(Price Price);", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t \t\n\t \tboolean custCreated = createCustomer();\n\t \t\n\t \t\t\n\t \tif(custCreated){\n\t \t\tdispose();\n\t \t\thome home = new home(cust);\n\t \t\thome.setLocationRelativeTo(null);\n\t \t\thome.setVisible(true);\n\t \t}\n\t \t\n\t \t\n\t }", "@Test(groups = \"Transactions Tests\", description = \"Create new transaction\")\n\tpublic void createNewTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickAddTransactionBtn();\n\t\tTransactionsScreen.typeTransactionDescription(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionAmount(\"300\");\n\t\tTransactionsScreen.clickTransactionType();\n\t\tTransactionsScreen.typeTransactionNote(\"Extra income from this month\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"Sub-account created successfully and the value is correct\");\n\n\t\t//Testing if the transaction was created in the 'Double Entry' account, if the value is correct and logging the result to the report\n\t\treturnToHomeScreen();\n\t\tMainScreen.clickAccountItem(\"Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Current Assets\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Cash in Wallet\");\n\t\tTransactionsScreen.transactionItem(\"Extra income\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$300\"));\n\t\ttest.log(Status.PASS, \"'Double Entry' account also have the transaction and the value is correct\");\n\n\t}", "public Purchase(String name, String date) {\n movName = name;\n movDate = date;\n initComponents();\n this.setLocationRelativeTo(null);//!Centers the window.\n movieDetailsTF.setText(\"The movie you have selected is:\\n\" + movName\n + \"\\n and your chosen date and time is: \\n\" + movDate);\n }", "public void setSalesRep_ID (int SalesRep_ID);", "public void setSalesRep_ID (int SalesRep_ID);", "void recordSale(Customer customer, Movie movie, SaleDetails saleDetails) {\n System.out.println(\"Connecting to Sales server\");\n AcmeSalesServer salesServer = AcmeSalesServer.connect();\n System.out.println(\"Adding sale to server\");\n salesServer.addSale(customer, movie, saleDetails);\n System.out.println(\"Sale added\");\n }", "public static void create_Product(String productid, String productType, String purchaseAccount, String salesAccount,\n\t\t\tWebDriver driver) throws IOException, InterruptedException, AWTException {\n\t\tProperties pro = Utilities.fetchProValue(\"OR_ProductMaster.properties\");\n\t\tString productName = productid + \"Name\";\n\t\tString productDes = productid + \" : product created on [\" + Utilities.currentDate(\"dd-MM-yyyy\") + \"]\";\n\t\tString xpathOfLoading = \"//*[contains(@style,'visible')]//*[contains(text(),'Please wait..')]\";\n\t\ttry {\n\t\t\tUtilities.click_element(pro.getProperty(\"createProductIcon\"), driver);\n\t\t\t// ------------- General Tab\n\t\t\t// ----------------------------------------------\n\t\t\tUtilities.click_element(pro.getProperty(\"qaenable\"), driver);\n\t\t\t\n\t\t\tUtilities.enterTextNormalBox(productName, pro.getProperty(\"productName\"), driver);\n\t\t\tUtilities.enterTextNormalBox(productDes, pro.getProperty(\"productDes\"), driver);\n\t\t\tUtilities.enterTextInDropDown(\"NA\", pro.getProperty(\"sequenceformat\"), driver);\n\t\t\tUtilities.enterTextNormalBox(productid, pro.getProperty(\"productId\"), driver);\n\t\t\t\n\t\t\tcustom(driver); //FAISAL\n\t\t\t\n\t\t\t// if Batch\n\t\t\tif (productType.equalsIgnoreCase(\"BATCH\")) {\n\t\t\t\tUtilities.click_element(pro.getProperty(\"BatchCheck\"), driver);\n\t\t\t}\n\t\t\t// if Serial\n\t\t\tif (productType.equalsIgnoreCase(\"SERIAL\")) {\n\t\t\t\tUtilities.click_element(pro.getProperty(\"SerialCheck\"), driver);\n\t\t\t}\n\t\t\t// if BatchSerial\n\t\t\tif (productType.equalsIgnoreCase(\"BatchSerial\")) {\n\t\t\t\tUtilities.click_element(pro.getProperty(\"BatchCheck\"), driver);\n\t\t\t\tUtilities.click_element(pro.getProperty(\"SerialCheck\"), driver);\n\t\t\t}\n\n\t\t\t// ------------- Purchase Tab\n\t\t\t// ----------------------------------------------\n\t\t\tUtilities.HoverandClick(pro.getProperty(\"purchaseTab\"), driver);\n\t\t\tUtilities.enterTextandSelect(purchaseAccount, pro.getProperty(\"purchaseAccount\"), driver);\n\t\t\tUtilities.enterTextNormalBox(\"10\", pro.getProperty(\"initialPurchasePrice\"), driver);\n\n\t\t\t// ------------- Sales Tab\n\t\t\t// ----------------------------------------------\n\t\t\tUtilities.HoverandClick(pro.getProperty(\"salesTab\"), driver);\n\t\t\tUtilities.enterTextandSelect(salesAccount, pro.getProperty(\"salesAccount\"), driver);\n\t\t\tUtilities.enterTextNormalBox(\"20\", pro.getProperty(\"initialSalesPrice\"), driver);\n\n\t\t\t// ------------- Inventory Tab\n\t\t\t// ----------------------------------------------\n\t\t\tUtilities.HoverandClick(pro.getProperty(\"inventoryDataTab\"), driver);\n\t\t\tUtilities.enterTextandSelect(\"Unit\", pro.getProperty(\"umo\"), driver);\n\t\t\tUtilities.enterTextandSelect(\"DS - Default Store\", pro.getProperty(\"warehouse\"), driver);\n\t\t\tUtilities.enterTextandSelect(\"Default Location\", pro.getProperty(\"location\"), driver);\n\t\t\tWebElement countable = driver.findElement(By.xpath(pro.getProperty(\"countable\")));\n\t\t\tif (countable.isEnabled()) {\n\t\t\t\tif (!countable.isSelected()) {\n\t\t\t\t\tcountable.click();\n\t\t\t\t}\n\t\t\t\tWebElement cyclecountfrequency = driver.findElement(By.xpath(pro.getProperty(\"cyclecountfrequency\")));\n\t\t\t\tcyclecountfrequency.click();\n\t\t\t\tRobot r3 = new Robot();\n\t\t\t\tr3.keyPress(KeyEvent.VK_DOWN);\n\t\t\t\tr3.keyRelease(KeyEvent.VK_DOWN);\n\t\t\t\tThread.sleep(2000);\n\t\t\t\tList<WebElement> comboItems = driver.findElements(\n\t\t\t\t\t\tBy.cssSelector(\".x-combo-list[style*='visibility: visible;'] .x-combo-list-item\"));\n\t\t\t\tfor (int i = 0; i < comboItems.size(); i++) {\n\t\t\t\t\tWebElement item = comboItems.get(i);\n\t\t\t\t\tif (item.getText().equals(\"Daily\") || item.getText().equals(\"Weekly\")\n\t\t\t\t\t\t\t|| item.getText().equals(\"Fortnightly\") || item.getText().equals(\"Monthly\")) {\n\t\t\t\t\t\titem.click();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tUtilities.HoverandClick(pro.getProperty(\"saveButton\"), driver);\n\t\t\tUtilities.isElementGone(xpathOfLoading, 120, driver);\n\t\t\ttry {\n\t\t\t\tproductAfterSaveOKBtn(driver);\n\t\t\t} catch (Exception noOk) {\n\t\t\t\t// System.out.println(\"No Ok button\");\n\t\t\t}\n\n\t\t\tUtilities.click_element(pro.getProperty(\"closeProductReport\"), driver);\n\t\t\tUtilities.click_element(pro.getProperty(\"CloseMainProductTab\"), driver);\n\t\t\tSystem.out.println(\"********** Product [ \" + productType + \" ] with [ \" + productid\n\t\t\t\t\t+ \" ] Successfully created *************\");\n\t\t} catch (Exception Ex) {\n\t\t\tUtilities.handleError(Ex, driver);\n\t\t}\n\t}", "public void buttonNew(View view) {\n Intent intent = new Intent(this, ProductNewActivity.class);\n startActivity(intent);\n }", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "stockFilePT102.StockDocument.Stock addNewStock();", "Salesman(String name, int salary, int annualSales, int year) {\n super(name, salary, year);\n super.setType(EMPLOYEE_TYPE);\n this.setAnnualSales(annualSales);\n }", "public void addTrans(View v)\r\n {\r\n Log.d(TAG, \"Add transaction button clicked!\");\r\n\r\n EditText editLabel = (EditText) findViewById(R.id.edit_label);\r\n String label = (editLabel == null)? \"\" : editLabel.getText().toString();\r\n\r\n EditText editAmount = (EditText) findViewById(R.id.edit_amount);\r\n double amount = ((editAmount == null) || (editAmount.getText().toString().equals(\"\")))? 0 :\r\n Double.valueOf(editAmount.getText().toString());\r\n\r\n CheckBox chkBill = (CheckBox) findViewById(R.id.chk_bill);\r\n CheckBox chkLoan = (CheckBox) findViewById(R.id.chk_loan);\r\n String special = \"\";\r\n special = (chkBill == null || !chkBill.isChecked())? special : \"Bill\";\r\n special = (chkLoan == null || !chkLoan.isChecked())? special : \"Loan\";\r\n\r\n\r\n EditText editTag = (EditText) findViewById(R.id.edit_tag);\r\n String tag = (editTag == null)? \"\" : editTag.getText().toString();\r\n\r\n Transaction t = new Transaction(false, amount, label, special, tag);\r\n\r\n Week weekAddedTo = BasicFinancialMainActivity.weeks\r\n .get(BasicFinancialMainActivity.currentWeekIndex);\r\n weekAddedTo.addTrans(t);\r\n BasicFinancialMainActivity.weeks.set(BasicFinancialMainActivity.currentWeekIndex, weekAddedTo);\r\n BasicFinancialMainActivity.saveWeeksData();\r\n\r\n startActivity(new Intent(this, BasicFinancialMainActivity.class));\r\n }", "void fillEditTransactionForm(Transaction transaction);", "public static AddNewScheduleDialog createInstance(int quantity){\n AddNewScheduleDialog frag = new AddNewScheduleDialog();\n frag.quantity = quantity;\n return frag;\n }", "public String crea() {\n c.setId(0);\n clienteDAO.crea(c); \n //Post-Redirect-Get\n return \"visualiza?faces-redirect=true&id=\"+c.getId();\n }", "public SalesEmployee(String firstName, String lastName, String number, double salary, double commission){\r\n this.firstname = firstName;\r\n this.lastname = lastName;\r\n this.number = number;\r\n this.salary = salary;\r\n this.commission = commission;\r\n }", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tdropdown.clear();\r\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\tSpielplanErstellenForm erstellen = new SpielplanErstellenForm();\r\n\r\n\t\t\tRootPanel.get(\"details\").add(erstellen);\r\n\t\t}", "public AddExpensesForm() {\n initComponents();\n }", "public Integer create(Caseresultparameters newInstance) throws ServiceException;", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jb_report = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n jcb_customers = new javax.swing.JComboBox<>();\n jb_findCustomer = new javax.swing.JButton();\n jb_customerSales = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jcb_products = new javax.swing.JComboBox<>();\n jb_findProduct = new javax.swing.JButton();\n jb_productSales = new javax.swing.JButton();\n jb_allSales = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jt_salesTable = new javax.swing.JTable();\n\n setBackground(new java.awt.Color(63, 81, 181));\n\n jLabel1.setBackground(new java.awt.Color(0, 121, 107));\n jLabel1.setFont(new java.awt.Font(\"Trebuchet MS\", 1, 14)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"REPORTE DE VENTAS\");\n\n jb_report.setBackground(new java.awt.Color(48, 63, 159));\n jb_report.setFont(new java.awt.Font(\"Trebuchet MS\", 1, 14)); // NOI18N\n jb_report.setForeground(new java.awt.Color(255, 255, 255));\n jb_report.setText(\"VER REPORTE\");\n jb_report.setBorder(null);\n jb_report.setBorderPainted(false);\n\n jLabel3.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 14)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Nombre\");\n\n jcb_customers.setBackground(new java.awt.Color(48, 63, 159));\n jcb_customers.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 14)); // NOI18N\n jcb_customers.setForeground(new java.awt.Color(255, 255, 255));\n jcb_customers.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Rubi\", \"Sergio\", \"Alessandra\", \"Oswaldo\", \"Sarah\" }));\n jcb_customers.setBorder(null);\n jcb_customers.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jcb_customersActionPerformed(evt);\n }\n });\n\n jb_findCustomer.setBackground(new java.awt.Color(48, 63, 159));\n jb_findCustomer.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 14)); // NOI18N\n jb_findCustomer.setForeground(new java.awt.Color(255, 255, 255));\n jb_findCustomer.setText(\"Buscar\");\n jb_findCustomer.setBorder(null);\n jb_findCustomer.setBorderPainted(false);\n\n jb_customerSales.setBackground(new java.awt.Color(48, 63, 159));\n jb_customerSales.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 14)); // NOI18N\n jb_customerSales.setForeground(new java.awt.Color(255, 255, 255));\n jb_customerSales.setText(\"CLIENTES\");\n jb_customerSales.setBorder(null);\n jb_customerSales.setBorderPainted(false);\n\n jLabel4.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 14)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"Producto\");\n\n jcb_products.setBackground(new java.awt.Color(48, 63, 159));\n jcb_products.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 14)); // NOI18N\n jcb_products.setForeground(new java.awt.Color(255, 255, 255));\n jcb_products.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Chocolate\", \"Cereal\", \"Galletas\", \"Pasta\", \"Atún\" }));\n jcb_products.setBorder(null);\n jcb_products.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jcb_productsActionPerformed(evt);\n }\n });\n\n jb_findProduct.setBackground(new java.awt.Color(48, 63, 159));\n jb_findProduct.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 14)); // NOI18N\n jb_findProduct.setForeground(new java.awt.Color(255, 255, 255));\n jb_findProduct.setText(\"Buscar\");\n jb_findProduct.setBorder(null);\n jb_findProduct.setBorderPainted(false);\n\n jb_productSales.setBackground(new java.awt.Color(48, 63, 159));\n jb_productSales.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 14)); // NOI18N\n jb_productSales.setForeground(new java.awt.Color(255, 255, 255));\n jb_productSales.setText(\"PRODUCTOS\");\n jb_productSales.setBorder(null);\n jb_productSales.setBorderPainted(false);\n jb_productSales.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jb_productSalesActionPerformed(evt);\n }\n });\n\n jb_allSales.setBackground(new java.awt.Color(48, 63, 159));\n jb_allSales.setFont(new java.awt.Font(\"Trebuchet MS\", 1, 14)); // NOI18N\n jb_allSales.setForeground(new java.awt.Color(255, 255, 255));\n jb_allSales.setText(\"TODAS\");\n jb_allSales.setBorder(null);\n jb_allSales.setBorderPainted(false);\n\n jScrollPane1.setBorder(null);\n jScrollPane1.setForeground(new java.awt.Color(255, 255, 255));\n\n jt_salesTable.setBackground(new java.awt.Color(48, 63, 159));\n jt_salesTable.setFont(new java.awt.Font(\"Trebuchet MS\", 0, 10)); // NOI18N\n jt_salesTable.setForeground(new java.awt.Color(255, 255, 255));\n jt_salesTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null},\n {null},\n {null},\n {null},\n {null},\n {null},\n {null},\n {null}\n },\n new String [] {\n \"Compras de la tienda\"\n }\n ));\n jt_salesTable.setGridColor(new java.awt.Color(63, 81, 181));\n jt_salesTable.setSelectionBackground(new java.awt.Color(48, 63, 159));\n jt_salesTable.setSelectionForeground(new java.awt.Color(255, 255, 255));\n jScrollPane1.setViewportView(jt_salesTable);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 733, Short.MAX_VALUE)\n .addComponent(jb_report, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jb_allSales, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jcb_products, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jcb_customers, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jb_findProduct, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jb_productSales, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jb_findCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jb_customerSales, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 733, 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(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jb_findCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jcb_customers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jb_customerSales, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jb_findProduct, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jcb_products, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jb_productSales, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jb_allSales, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jb_report, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n }" ]
[ "0.5930976", "0.5841161", "0.57656187", "0.5715994", "0.56769323", "0.567002", "0.56671876", "0.5662007", "0.56539935", "0.56225675", "0.5588811", "0.5545181", "0.543233", "0.5402855", "0.5399894", "0.5391293", "0.5373824", "0.53605056", "0.535733", "0.534379", "0.5323543", "0.5304652", "0.52721316", "0.52638674", "0.5255332", "0.51857245", "0.5184396", "0.51459783", "0.5118273", "0.51162094", "0.510202", "0.51006323", "0.50987476", "0.5091647", "0.5081173", "0.5067647", "0.50591475", "0.505114", "0.50470537", "0.50463617", "0.5045861", "0.50277", "0.50271744", "0.5012445", "0.5005672", "0.49994832", "0.4993581", "0.49822554", "0.4981981", "0.49780115", "0.49768722", "0.49676502", "0.49627867", "0.49575588", "0.49487323", "0.4948286", "0.4941586", "0.49378255", "0.49219903", "0.49131736", "0.49126923", "0.490622", "0.49041325", "0.49035016", "0.4902639", "0.49017113", "0.4898396", "0.48956832", "0.48895332", "0.48853958", "0.48802412", "0.48797685", "0.4878395", "0.4878352", "0.4870514", "0.485888", "0.48548555", "0.48532742", "0.4849659", "0.48481956", "0.4846619", "0.48460498", "0.48403007", "0.48392665", "0.48349455", "0.48349455", "0.48334762", "0.48327047", "0.48283544", "0.48271134", "0.48202944", "0.48181605", "0.48161724", "0.4814439", "0.48135614", "0.48120248", "0.48112243", "0.48089236", "0.48078677", "0.48075864", "0.48042655" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jButton1 = new javax.swing.JButton(); jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel2 = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jPasswordField1 = new javax.swing.JPasswordField(); jTextField1 = new javax.swing.JTextField(); jTextField2 = new javax.swing.JTextField(); jButton2 = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jComboBox1 = new javax.swing.JComboBox<>(); jLabel10 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jTextField3 = new javax.swing.JTextField(); jTextField4 = new javax.swing.JTextField(); jPasswordField2 = new javax.swing.JPasswordField(); jComboBox2 = new javax.swing.JComboBox<>(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); jButton3 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); jPanel4 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jTextField5 = new javax.swing.JTextField(); jButton5 = new javax.swing.JButton(); jPanel5 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jButton6 = new javax.swing.JButton(); jLabel13 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); jTable3 = new javax.swing.JTable(); jButton8 = new javax.swing.JButton(); jLabel14 = new javax.swing.JLabel(); jPanel6 = new javax.swing.JPanel(); jPanel11 = new javax.swing.JPanel(); jScrollPane7 = new javax.swing.JScrollPane(); jTable2 = new javax.swing.JTable(); jButton7 = new javax.swing.JButton(); jPanel15 = new javax.swing.JPanel(); jLabel37 = new javax.swing.JLabel(); jLabel39 = new javax.swing.JLabel(); jLabel40 = new javax.swing.JLabel(); jLabel41 = new javax.swing.JLabel(); jLabel42 = new javax.swing.JLabel(); jLabel43 = new javax.swing.JLabel(); jLabel44 = new javax.swing.JLabel(); jButton10 = new javax.swing.JButton(); jScrollPane3 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jTextField6 = new javax.swing.JTextField(); jTextField7 = new javax.swing.JTextField(); jTextField8 = new javax.swing.JTextField(); jTextField9 = new javax.swing.JTextField(); jTextField16 = new javax.swing.JTextField(); jLabel15 = new javax.swing.JLabel(); jPanel7 = new javax.swing.JPanel(); jLabel38 = new javax.swing.JLabel(); jLabel46 = new javax.swing.JLabel(); jLabel47 = new javax.swing.JLabel(); jLabel48 = new javax.swing.JLabel(); jLabel49 = new javax.swing.JLabel(); jLabel50 = new javax.swing.JLabel(); jLabel51 = new javax.swing.JLabel(); jButton11 = new javax.swing.JButton(); jButton12 = new javax.swing.JButton(); jLabel52 = new javax.swing.JLabel(); jScrollPane4 = new javax.swing.JScrollPane(); jTextArea2 = new javax.swing.JTextArea(); jTextField11 = new javax.swing.JTextField(); jTextField12 = new javax.swing.JTextField(); jTextField13 = new javax.swing.JTextField(); jTextField14 = new javax.swing.JTextField(); jTextField15 = new javax.swing.JTextField(); jTextField17 = new javax.swing.JTextField(); jLabel16 = new javax.swing.JLabel(); jPanel8 = new javax.swing.JPanel(); jLabel45 = new javax.swing.JLabel(); jLabel53 = new javax.swing.JLabel(); jButton13 = new javax.swing.JButton(); jTextField10 = new javax.swing.JTextField(); jPanel10 = new javax.swing.JPanel(); jButton9 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jButton1.setText("Logout"); jTabbedPane1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel1.setText("Input Data Karyawan"); jButton2.setText("Submit"); jLabel4.setText("Username"); jLabel5.setText("Nama"); jLabel6.setText("Password"); jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "koki", "sales", "admin" })); jComboBox1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBox1ActionPerformed(evt); } }); jLabel10.setText("Role"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(95, 95, 95) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton2)) .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel6) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel4) .addGap(18, 18, 18) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(jLabel10))) .addContainerGap(94, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton2) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel10)) .addGap(16, 16, 16)) ); jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel2.setText("Update Data Karyawan"); jTextField3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField3ActionPerformed(evt); } }); jTextField4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField4ActionPerformed(evt); } }); jPasswordField2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jPasswordField2ActionPerformed(evt); } }); jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "koki", "sales", "admin" })); jComboBox2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBox2ActionPerformed(evt); } }); jLabel7.setText("Username"); jLabel8.setText("Nama"); jLabel9.setText("Password"); jLabel11.setText("Role"); jButton3.setText("Update"); jButton4.setText("Cek Data"); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(jLabel7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 312, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jButton4)) .addGroup(jPanel3Layout.createSequentialGroup() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel9) .addComponent(jLabel8) .addComponent(jLabel11)) .addGap(8, 8, 8) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 177, Short.MAX_VALUE) .addComponent(jButton3)) .addComponent(jTextField4) .addComponent(jPasswordField2)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel2) .addGap(18, 18, 18) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7) .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton4)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel8) .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9) .addComponent(jPasswordField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel11) .addComponent(jButton3)) .addContainerGap(64, Short.MAX_VALUE)) ); jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel3.setText("Delete Data Karyawan"); jLabel12.setText("Username"); jButton5.setText("Delete"); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(jLabel12) .addGap(18, 18, 18) .addComponent(jTextField5)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addComponent(jLabel3) .addGap(310, 310, 310)) .addComponent(jButton5, javax.swing.GroupLayout.Alignment.TRAILING)))) .addGap(5, 5, 5)) ); jPanel4Layout.setVerticalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel12) .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton5) .addContainerGap(29, Short.MAX_VALUE)) ); jPanel5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null} }, new String [] { "Username", "Nama", "Role" } )); jScrollPane1.setViewportView(jTable1); jButton6.setText("Refresh"); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); jLabel13.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel13.setText("Data Karyawan"); jTable3.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null} }, new String [] { "Nama", "Stok", "Keterangan" } )); jScrollPane2.setViewportView(jTable3); jButton8.setText("Refresh"); jLabel14.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel14.setText("Data Bahan Yang Kurang"); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(jLabel13) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton6)) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 292, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(jPanel5Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 408, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel5Layout.createSequentialGroup() .addGap(100, 100, 100) .addComponent(jLabel14) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton8))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel5Layout.setVerticalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton6) .addComponent(jButton8) .addComponent(jLabel14)) .addComponent(jLabel13)) .addContainerGap(201, Short.MAX_VALUE)) ); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(767, Short.MAX_VALUE))) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(67, 67, 67) .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(31, 31, 31)) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(520, Short.MAX_VALUE))) ); jTabbedPane1.addTab("Karyawan", jPanel2); jPanel11.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jTable2.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null}, {null, null, null, null, null} }, new String [] { "ID", "Pembayaran", "Keterangan", "Tanggal", "Uang" } )); jScrollPane7.setViewportView(jTable2); jButton7.setText("Refresh"); javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11); jPanel11.setLayout(jPanel11Layout); jPanel11Layout.setHorizontalGroup( jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel11Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 788, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jButton7))) .addContainerGap()) ); jPanel11Layout.setVerticalGroup( jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel11Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton7) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel15.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabel37.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel37.setText("Input Data Transaksi"); jLabel39.setText("Keterangan"); jLabel40.setText("Tanggal"); jLabel41.setText("DD"); jLabel42.setText("MM"); jLabel43.setText("YYYY"); jLabel44.setText("Uang"); jButton10.setText("Submit"); jTextArea1.setColumns(20); jTextArea1.setRows(5); jScrollPane3.setViewportView(jTextArea1); jTextField7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField7ActionPerformed(evt); } }); jTextField8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField8ActionPerformed(evt); } }); jLabel15.setText("Pembayaran"); javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15); jPanel15.setLayout(jPanel15Layout); jPanel15Layout.setHorizontalGroup( jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel15Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel15Layout.createSequentialGroup() .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel15Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jButton10)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel15Layout.createSequentialGroup() .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel39) .addComponent(jLabel15)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTextField16) .addComponent(jScrollPane3)))) .addGap(49, 49, 49)) .addGroup(jPanel15Layout.createSequentialGroup() .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel37) .addGroup(jPanel15Layout.createSequentialGroup() .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel15Layout.createSequentialGroup() .addGap(74, 74, 74) .addComponent(jLabel41)) .addGroup(jPanel15Layout.createSequentialGroup() .addGap(8, 8, 8) .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel44) .addGroup(jPanel15Layout.createSequentialGroup() .addComponent(jLabel40) .addGap(18, 18, 18) .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel42, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTextField7)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel43) .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel15Layout.createSequentialGroup() .addGap(74, 74, 74) .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 272, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) ); jPanel15Layout.setVerticalGroup( jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel15Layout.createSequentialGroup() .addGap(12, 12, 12) .addComponent(jLabel37) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel15)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel39)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel40) .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel41) .addComponent(jLabel42) .addComponent(jLabel43)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel44) .addComponent(jTextField9, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton10) .addGap(5, 5, 5)) ); jPanel7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabel38.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel38.setText("Update Data Transaksi"); jLabel46.setText("Keterangan"); jLabel47.setText("Tanggal"); jLabel48.setText("DD"); jLabel49.setText("MM"); jLabel50.setText("YYYY"); jLabel51.setText("Uang"); jButton11.setText("Update"); jButton12.setText("Cek"); jLabel52.setText("ID"); jTextArea2.setColumns(20); jTextArea2.setRows(5); jScrollPane4.setViewportView(jTextArea2); jTextField13.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField13ActionPerformed(evt); } }); jTextField17.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField17ActionPerformed(evt); } }); jLabel16.setText("Pembayaran"); javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel38) .addGroup(jPanel7Layout.createSequentialGroup() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addGap(36, 36, 36) .addComponent(jLabel51)) .addGroup(jPanel7Layout.createSequentialGroup() .addGap(53, 53, 53) .addComponent(jLabel52)) .addComponent(jLabel16, javax.swing.GroupLayout.Alignment.TRAILING)) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addGap(12, 12, 12) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField17, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel7Layout.createSequentialGroup() .addGap(18, 18, 18) .addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(jPanel7Layout.createSequentialGroup() .addGap(6, 6, 6) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel47) .addComponent(jLabel46)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel7Layout.createSequentialGroup() .addComponent(jLabel48) .addGap(18, 18, 18) .addComponent(jLabel49)) .addGroup(jPanel7Layout.createSequentialGroup() .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(1, 1, 1))) .addGap(18, 18, 18) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel50) .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(jButton11, javax.swing.GroupLayout.Alignment.TRAILING)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton12))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel7Layout.setVerticalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel38) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel52) .addComponent(jButton12) .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTextField17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel16)) .addGap(16, 16, 16) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel46)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel47)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel50, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel49) .addComponent(jLabel48)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel51) .addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton11) .addGap(14, 14, 14)) ); jPanel8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabel45.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jLabel45.setText("Delete Data Transaksi"); jLabel53.setText("ID"); jButton13.setText("Delete"); jButton13.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton13ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); jPanel8.setLayout(jPanel8Layout); jPanel8Layout.setHorizontalGroup( jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup() .addGap(22, 22, 22) .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel45) .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jButton13) .addGroup(jPanel8Layout.createSequentialGroup() .addComponent(jLabel53) .addGap(18, 18, 18) .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, 299, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel8Layout.setVerticalGroup( jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel45) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel53) .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(12, 12, 12) .addComponent(jButton13) .addContainerGap()) ); jPanel10.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jButton9.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jButton9.setText("Lihat Grafik Laporan Keuangan"); javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup() .addContainerGap() .addComponent(jButton9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jPanel10Layout.setVerticalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup() .addContainerGap() .addComponent(jButton9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jPanel15, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 426, Short.MAX_VALUE) .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(23, 23, 23)) ); jPanel6Layout.setVerticalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, 308, Short.MAX_VALUE)) .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jTabbedPane1.addTab("Transaksi", jPanel6); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jTabbedPane1) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 760, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public PatientUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Magasin() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public MusteriEkle() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\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 .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public vpemesanan1() {\n initComponents();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\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\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\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\tGroupLayout.PREFERRED_SIZE,\n\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\tGroupLayout.DEFAULT_SIZE,\n\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\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\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\tlayout.createSequentialGroup()\n\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.addGap(3)\n\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.addComponent(\n\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\tlabel23,\n\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\tGroupLayout.PREFERRED_SIZE,\n\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\tGroupLayout.DEFAULT_SIZE,\n\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\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.7321342", "0.7292121", "0.7292121", "0.7292121", "0.72863305", "0.7249828", "0.7213628", "0.7209084", "0.7197292", "0.71912086", "0.7185135", "0.7159969", "0.7148876", "0.70944786", "0.70817256", "0.7057678", "0.69884527", "0.69786763", "0.69555986", "0.69548863", "0.69453996", "0.69434965", "0.69369817", "0.6933186", "0.6929363", "0.69259083", "0.69255763", "0.69123995", "0.6911665", "0.6894565", "0.6894252", "0.68922615", "0.6891513", "0.68894076", "0.6884006", "0.68833494", "0.6882281", "0.6879356", "0.68761575", "0.68752", "0.6872568", "0.68604666", "0.68577915", "0.6856901", "0.68561065", "0.6854837", "0.68547136", "0.6853745", "0.6853745", "0.68442935", "0.6838013", "0.6837", "0.6830046", "0.68297213", "0.68273175", "0.682496", "0.6822801", "0.6818054", "0.68177056", "0.6812038", "0.68098444", "0.68094784", "0.6809155", "0.680804", "0.68033874", "0.6795021", "0.67937285", "0.6793539", "0.6791893", "0.6790516", "0.6789873", "0.67883795", "0.67833847", "0.6766774", "0.6766581", "0.67658913", "0.67575616", "0.67566", "0.6754101", "0.6751978", "0.6741716", "0.6740939", "0.6738424", "0.6737342", "0.6734709", "0.672855", "0.6728138", "0.6721558", "0.6716595", "0.6716134", "0.6715878", "0.67096144", "0.67083293", "0.6703436", "0.6703149", "0.6701421", "0.67001027", "0.66999036", "0.66951054", "0.66923416", "0.6690235" ]
0.0
-1
End of variables declaration//GENEND:variables
public JButton getjButton1() { return jButton1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void kk12() {\n\n\t}", "private void assignment() {\n\n\t\t\t}", "public void gored() {\n\t\t\n\t}", "public void mo21779D() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "protected boolean func_70041_e_() { return false; }", "public void mo4359a() {\n }", "public void mo21782G() {\n }", "private void m50366E() {\n }", "public void mo12930a() {\n }", "public void mo115190b() {\n }", "public void method_4270() {}", "public void mo1403c() {\n }", "public void mo3376r() {\n }", "public void mo3749d() {\n }", "public void mo21793R() {\n }", "protected boolean func_70814_o() { return true; }", "public void mo21787L() {\n }", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo21780E() {\n }", "public void mo21792Q() {\n }", "public void mo21791P() {\n }", "public void mo12628c() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo97908d() {\n }", "public void mo21878t() {\n }", "public void mo9848a() {\n }", "public void mo21825b() {\n }", "public void mo23813b() {\n }", "public void mo3370l() {\n }", "public void mo21879u() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo21785J() {\n }", "public void mo21795T() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void m23075a() {\n }", "public void mo21789N() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21794S() {\n }", "public final void mo12688e_() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void mo6944a() {\n }", "private Rekenhulp()\n\t{\n\t}", "public static void listing5_14() {\n }", "public void mo1405e() {\n }", "public final void mo91715d() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo9137b() {\n }", "void mo57277b();", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void func_70295_k_() {}", "public void mo21877s() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "public void mo115188a() {\n }", "public void mo21880v() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo21784I() {\n }", "private stendhal() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo56167c() {\n }", "public void mo44053a() {\n }", "public void mo21781F() {\n }", "public void mo2740a() {\n }", "public void mo21783H() {\n }", "public void mo1531a() {\n }", "double defendre();", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "public void stg() {\n\n\t}", "void m1864a() {\r\n }", "private void poetries() {\n\n\t}", "public void skystonePos4() {\n }", "public void mo2471e() {\n }", "private void yy() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "static void feladat4() {\n\t}", "@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public void furyo ()\t{\n }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "protected void mo6255a() {\n }" ]
[ "0.6360145", "0.6282893", "0.6186978", "0.6094459", "0.60944235", "0.60737914", "0.60544986", "0.60539776", "0.6004647", "0.5989471", "0.59729135", "0.5970356", "0.5968699", "0.5967672", "0.5963926", "0.5943424", "0.59112847", "0.5898038", "0.5893516", "0.588492", "0.5881512", "0.5855667", "0.5853236", "0.58531165", "0.5843616", "0.5841497", "0.58363086", "0.58245045", "0.5811529", "0.580449", "0.5796217", "0.57882947", "0.5786058", "0.5784402", "0.5784092", "0.57765645", "0.57645494", "0.57607734", "0.57473165", "0.5744892", "0.57347417", "0.57347417", "0.57347417", "0.57347417", "0.57347417", "0.57347417", "0.57347417", "0.5734512", "0.5732289", "0.5728332", "0.5724991", "0.57186735", "0.5707604", "0.57000875", "0.56990325", "0.5692306", "0.56910056", "0.5688467", "0.567593", "0.56632906", "0.5654305", "0.5647444", "0.5644958", "0.56446546", "0.5643932", "0.56422544", "0.563283", "0.56306255", "0.56304276", "0.5624234", "0.56193763", "0.56152105", "0.5613365", "0.5612306", "0.5608389", "0.5605015", "0.5604485", "0.56024903", "0.5593198", "0.55877763", "0.55784553", "0.5572396", "0.5569556", "0.5557138", "0.55557233", "0.5552684", "0.555154", "0.5549941", "0.5549108", "0.5547919", "0.5547532", "0.55451584", "0.5543851", "0.55430084", "0.5541896", "0.5539187", "0.552823", "0.5525178", "0.5517867", "0.5504386", "0.55031735" ]
0.0
-1
End of added block of code for assessment 2 / // CONSTRUCTORS Modified block of code for assessment 2 Construct a AIBoat object at point (x,y) with default size and a custom texture.
public AIBoat(int x, int y, String texture_path) { super(x, y, texture_path); initialise(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AIBoat(int x, int y) {\n super(x, y);\n\n initialise();\n }", "public Bout()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n CreaBoutique();\n\n }", "AREA createAREA();", "public Hero(int x, int y) {\r\n this.centerX = x;\r\n this.centerY = y;\r\n this.currentHealth = 100;\r\n rect1 = new FloatRect (100,630,80,110);\r\n imgTexture = new Texture ();\r\n try {\r\n imgTexture.loadFromFile (Paths.get (ImageFile));\r\n } catch (IOException ex) {\r\n ex.printStackTrace ();\r\n }\r\n imgTexture.setSmooth (true);\r\n\r\n img = new Sprite (imgTexture);\r\n img.setOrigin (Vector2f.div (new Vector2f (imgTexture.getSize ()), 2));\r\n img.setPosition (x, y);\r\n // Store references to object and key methods\r\n obj = img;\r\n setPosition = img::setPosition;\r\n\r\n background = new Sprite (bg.loadTextures ());\r\n background.setOrigin(Vector2f.div(new Vector2f(bg.getTexture1 ()), 1000000));\r\n background.setPosition (0,0);\r\n }", "public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }", "public Ant(){ // The position and direction of the ant is completely randomizated in it's creation\n this.position[0] = (int)Math.floor(Math.random() * 20); \n this.position[1] = (int)Math.floor(Math.random() * 20);\n this.image = (int)Math.floor(Math.random() * 4);\n }", "public void atacar() {\n texture = new Texture(Gdx.files.internal(\"recursos/ataques.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][b];\n animation = new Animation((float) 0.1, regions);\n tiempo = 0f;\n }\n break;\n }\n }", "public Stage1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 900, 1);\n \n GreenfootImage image = getBackground();\n image.setColor(Color.BLACK);\n image.fill();\n star();\n \n \n \n //TurretBase turretBase = new TurretBase();\n playerShip = new PlayerShip();\n scoreDisplay = new ScoreDisplay();\n addObject(scoreDisplay, 100, 50);\n addObject(playerShip, 100, 450);\n \n }", "public void init(Map<String, String> attributes) {\r\n\r\n\t\tif (attributes.containsKey(\"p0\"))\r\n\t\t\tp0 = new Vec(attributes.get(\"p0\"));\r\n\t\tif (attributes.containsKey(\"p1\"))\r\n\t\t\tp1 = new Vec(attributes.get(\"p1\"));\r\n\t\tif (attributes.containsKey(\"p2\"))\r\n\t\t\tp2 = new Vec(attributes.get(\"p2\"));\r\n\t\tif (attributes.containsKey(\"p3\"))\r\n\t\t\tp3 = new Vec(attributes.get(\"p3\"));\r\n\r\n\t\tp4 = Vec.add(Vec.add(Vec.sub(p1, p0), Vec.sub(p3, p0)), p0);\r\n\t\tp5 = Vec.add(Vec.add(Vec.sub(p2, p0), Vec.sub(p3, p0)), p0);\r\n\t\tp6 = Vec.add(Vec.add(Vec.sub(p5, p3), Vec.sub(p4, p3)), p3);\r\n\r\n\t\tbase = new Rectangle(p0, p1, p3, attributes);\r\n\t\tfacep0p2p1 = new Rectangle(p0, p2, p1, attributes);\r\n\t\tfacep0p2p3 = new Rectangle(p0, p2, p3, attributes);\r\n\t\tfacep3p4p5 = new Rectangle(p3, p5, p4, attributes);\r\n\t\tfacep4p1p6 = new Rectangle(p4, p1, p6, attributes);\r\n\t\ttop = new Rectangle(p5, p2, p6, attributes);\r\n\r\n\t\tsuper.init(attributes);\r\n\t}", "public Texture() {\n }", "@Override\n\tpublic void init() {\n\t\tEffect().registerEffect(40, 40, 3, \"ExplosionSheet.png\");\n\t\tbg = new Background();\n\t\tobj = new TestObj();\n\t\tobj.init();\n\t\ttest = new Test2[50];\n\t\tfor(int x = 0; x < test.length; x++ )\n\t\t\ttest[x] = new Test2(x*30-600,30 *(float)Math.pow(-1, x), \"g.png\");\n\t\t\n\t\ttest2 = new Test2[50000];\n\t\tfor(int x = 0; x < test2.length; x++ )\n\t\t\ttest2[x] = new Test2(x*30-600,150+30 *(float)Math.pow(-1, x), \"AlienPawn.png\");\n\t\t\n\t\ttest3 = new Test2[50000];\n\t\tfor(int x = 0; x < test3.length; x++ )\n\t\t\ttest3[x] = new Test2(x*30-600,-200+30 *(float)Math.pow(-1, x), \"AlienPawn - Copy.png\");\n\t\n\t}", "void addTextureCoordinate(Vector t);", "Actor(int x, int y, Texture image) {\n this.setX(x);\n this.setY(y);\n setImage(image);\n }", "public Boat() {\n batch = new SpriteBatch();\n }", "BasicObject(){\n posX = -1;\n posY = -1;\n velX = 0;\n velY = 0;\n accX = 0;\n accY = 0;\n classOfObejct = 0;\n }", "public SaboWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(counter, 100, 380); //Add the scoreboard\n addObject(healthBar, 300, 370); //Add the health bar\n addObject(turret, getWidth()/2-5, getHeight()-turret.getImage().getWidth()); \n }", "public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }", "public Asteroid(String textureFileName, float x, float y, int sizeX, int sizeY){\r\n super(textureFileName, x, y, sizeX, sizeY);\r\n rotationNumber = randomRotation();\r\n setRotation(rotationNumber);\r\n getSprite().setOriginCenter();\r\n }", "public static void init() {\n // init quad VAO\n vao = glGenVertexArrays();\n glBindVertexArray(vao);\n int positionVbo = glGenBuffers();\n FloatBuffer fb = BufferUtils.createFloatBuffer(2 * 4);\n fb.put(0.0f).put(0.0f);\n fb.put(1.0f).put(0.0f);\n fb.put(1.0f).put(1.0f);\n fb.put(0.0f).put(1.0f);\n fb.flip();\n glBindBuffer(GL_ARRAY_BUFFER, positionVbo);\n glBufferData(GL_ARRAY_BUFFER, fb, GL_STATIC_DRAW);\n glVertexAttribPointer(Main.shader.inPositionLoc, 2, GL_FLOAT, false, 0, 0L);\n glEnableVertexAttribArray(Main.shader.inPositionLoc);\n glBindBuffer(GL_ARRAY_BUFFER, 0);\n glBindVertexArray(0);\n \n // init texture\n IntBuffer width = BufferUtils.createIntBuffer(1);\n IntBuffer height = BufferUtils.createIntBuffer(1);\n IntBuffer components = BufferUtils.createIntBuffer(1);\n byte[] dataArr = Main.loadResource(\"resources/font DF.png\");\n ByteBuffer data = BufferUtils.createByteBuffer(dataArr.length);\n data.put(dataArr).rewind();\n data = Objects.requireNonNull(stbi_load_from_memory(data, width, height, components, 1));\n int imgWidth = width.get();\n int imgHeight = height.get();\n charWidth = imgWidth / 16;\n charHeight = imgHeight / 16;\n \n texture = glGenTextures();\n glBindTexture(GL_TEXTURE_2D, texture);\n glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, imgWidth, imgHeight, 0, GL_RED, GL_UNSIGNED_BYTE, data);\n stbi_image_free(data);\n \n // set texScale uniform\n glUniform2f(Main.shader.texScaleLoc, 1/16f, 1/16f);\n }", "GameObject(int x, int y){\n loadSprite();\n this.x = x;\n this.y = y;\n }", "public MTImage(PApplet pApplet, PImage texture) {\n super(pApplet, -7, -7, texture.width + 14, texture.height + 14);\n\n image = new MTRectangle(pApplet, texture);\n image.setStrokeColor(new MTColor(255, 255, 255, 255));\n image.setPickable(false);\n this.addChild(image);\n\n //Draw this component and its children above\n //everything previously drawn and avoid z-fighting\n this.setDepthBufferDisabled(true);\n }", "private void createObstacole()\n {\n //Create Obstacole\n Obstacole topObstacole = new Obstacole(\"top\");\n Obstacole botObstacole = new Obstacole(\"bottom\");\n Obstacole midObstacole = new Obstacole(\"mid\");\n //amount of space between obstacole\n int ObstacoleSpacing = 150;\n \n //get object image\n GreenfootImage image = botObstacole.getImage();\n \n //random number to vary\n int numOfObstacoles = Greenfoot.getRandomNumber(40) + 15;\n \n //counter increment to 50\n ObstacoleCounter++;\n if (ObstacoleCounter == 50)\n {\n if (getObjects(Obstacole.class).size() < numOfObstacoles)\n {\n addObject(botObstacole, getWidth(), getHeight() / 2 + image.getHeight() - Greenfoot.getRandomNumber(100) - 10);\n addObject(topObstacole, getWidth(), botObstacole.getY() - image.getHeight() - ObstacoleSpacing);\n addObject(midObstacole, getWidth(), botObstacole.getY() + image.getHeight() / 3 + ObstacoleSpacing);\n }\n ObstacoleCounter = 0;\n }\n }", "public Bat(TutorialWorld world) {\n\t super(new Sprite(TutorialWorld.MEDIA_URL.concat(\"bat.gif\")), speed); \n\t }", "Sprite(float x, float y, float w, float h) {\n _img = createImage(1, 1, RGB);\n _x = x;\n _y = y;\n _w = w;\n _h = h;\n _rotVector = new PVector(1, 0, 0);\n resetRectHitbox();\n }", "public MyWorld()\n { \n // Create a new world with 1600x1200 cells with a cell size of 1x1 pixels.\n super(1125, 1125, 1);\n //Adds the Cornucopia to the center of the Arena.\n int centerX = this.getWidth()/2;\n int centerY = this.getHeight()/2;\n this.addObject(new Cornucopia(), centerX, centerY);\n \n //The following adds the main character for the game.\n int CharacterX = 1125/2;\n int CharacterY = 770;\n this.addObject(new Character(), CharacterX, CharacterY);\n \n //The following code adds 6 \"Careers\" into the arena.\n int CareerX = 405;\n int CareerY = 328;\n this.addObject(new Careers(), CareerX, CareerY);\n this.addObject(new Careers(), CareerX+310, CareerY-5);\n this.addObject(new Careers(), CareerX+90, CareerY+430);\n this.addObject(new Careers(), CareerX+290, CareerY+405);\n this.addObject(new Careers(), CareerX+190, CareerY-60);\n \n //The following code add the remaining 17 Tributes to the arena.\n //Also, I cannot add like a normal person so there will only be twenty-three tributes. The Capitol goofed this year.\n int TribX = 660;\n int TribY = 288;\n this.addObject(new Tributes(), TribX, TribY);\n this.addObject(new Tributes(), TribX-200, TribY);\n this.addObject(new Tributes(), TribX-227, TribY+443);\n this.addObject(new Tributes(), TribX-280, TribY+400);\n this.addObject(new Tributes(), TribX-34, TribY+467);\n this.addObject(new Tributes(), TribX+86, TribY+397);\n this.addObject(new Tributes(), TribX-134, TribY-22);\n this.addObject(new Tributes(), TribX+103, TribY+82);\n this.addObject(new Tributes(), TribX+139, TribY+144);\n this.addObject(new Tributes(), TribX+150, TribY+210);\n this.addObject(new Tributes(), TribX+150, TribY+280);\n this.addObject(new Tributes(), TribX+120, TribY+342);\n this.addObject(new Tributes(), TribX-338, TribY+275);\n this.addObject(new Tributes(), TribX-319, TribY+343);\n this.addObject(new Tributes(), TribX-343, TribY+210);\n this.addObject(new Tributes(), TribX-330, TribY+150);\n this.addObject(new Tributes(), TribX-305, TribY+80);\n \n //The following code should add the forest onto the map.\n int ForX = this.getWidth()/2;\n int ForY = 900;\n this.addObject(new Forest(), ForX, ForY);\n \n //The following code should add the lake to the map.\n int LakX = 790;\n int LakY = 990;\n this.addObject(new Lake(), LakX, LakY);\n \n //The following should add the cave to the map.\n int CavX = 125;\n int CavY = 110;\n this.addObject(new Cave(), CavX, CavY);\n \n \n int actorCount = getObjects(Tributes.class).size();\n if(actorCount == 17) {\n int BeastX = 200;\n int BeastY = 200;\n this.addObject(new Beasts(), BeastX, BeastY);\n this.addObject(new Beasts(), BeastX+100, BeastY+100);\n }\n }", "BasicObject(int posX,int posY,int velX,int velY, int accX, int accY, int classOfObejct){\n this.posX = posX;\n this.posY = posY;\n this.velX = velX;\n this.velY = velY;\n this.accX = accX;\n this.accY = accY;\n this.classOfObejct = classOfObejct;\n }", "public Ocean()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n BF bf = new BF();\n addObject(bf,500,300);\n SF sf = new SF();\n addObject(sf,100,300);\n }", "Block create(int xpos, int ypos);", "public ClassTester()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(new NonScrollingBackground(\"Stage - 0.jpg\"),300,131);\n addObject(playerMage,35,170);\n addObject(new AbilityDisplayer(playerMage),125,268);\n }", "public A(){ \n super();\n AtrEA = new GreenfootImage(\"AtrEA.png\");\n DerEA1 = new GreenfootImage(\"DerEA1.png\");\n DerEA2 = new GreenfootImage(\"DerEA2.png\");\n DerEA3 = new GreenfootImage(\"DerEA3.png\");\n FrtEA1 = new GreenfootImage(\"FrtEA1.png\");\n FrtEA2 = new GreenfootImage(\"FrtEA2.png\");\n FrtEA3 = new GreenfootImage(\"FrtEA3.png\");\n IzqEA1 = new GreenfootImage(\"IzqEA1.png\");\n IzqEA2 = new GreenfootImage(\"IzqEA2.png\");\n IzqEA3 = new GreenfootImage(\"IzqEA3.png\"); \n animationE = 0;\n start = 1; \n }", "@Override\n protected void initGame() {\n\n// entityBuilder()\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(getAppWidth() - 64, getAppHeight() - 64)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(0, getAppHeight() / 2 - 32)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .with(new ProjectileComponent(new Point2D(1, 0), 150))\n// .buildAndAttach();\n }", "private void\nsetUpDefaultCoordSpace(SoAction action)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoNode tail = action.getCurPathTail();\n//#ifdef DEBUG\n// if (!tail->isOfType(SoShape::getClassTypeId())) {\n// SoDebugError::post(\n// \"SoTextureCoordinateBundle::setUpDefaultCoordSpace\",\n// \"Tail of path is not a shape node!\");\n// }\n//#endif\n SoShape shape = (SoShape )tail;\n\n final SbBox3f box = new SbBox3f();\n final SbVec3f center = new SbVec3f();\n shape.computeBBox(action, box, center);\n\n final SbVec3f min = box.getMin();\n final SbVec3f boxSize = box.getMax().operator_minus(min);\n\n // Look for the largest two dimensions of the box\n if (boxSize.getValueRead()[0] > boxSize.getValueRead()[1] && boxSize.getValueRead()[0] > boxSize.getValueRead()[2]) {\n coordS = 0;\n coordT = boxSize.getValueRead()[1] > boxSize.getValueRead()[2] ? 1 : 2;\n }\n else if (boxSize.getValueRead()[1] > boxSize.getValueRead()[2]) {\n coordS = 1;\n coordT = boxSize.getValueRead()[0] > boxSize.getValueRead()[2] ? 0 : 2;\n }\n else {\n coordS = 2;\n coordT = boxSize.getValueRead()[0] > boxSize.getValueRead()[1] ? 0 : 1;\n }\n\n // Set up vectors for S and T coordinates. The length of the\n // vectors should be the size of the box in that dimension. Since\n // we want the texture to remain square, we use the same length\n // for both dimensions.\n float tmp = 1.0f / boxSize.getValueRead()[coordS];\n sVector.setValue(0.0f, 0.0f, 0.0f, -min.getValueRead()[coordS] * tmp);\n tVector.setValue(0.0f, 0.0f, 0.0f, -min.getValueRead()[coordT] * tmp);\n sVector.getValue()[coordS] = tVector.getValue()[coordT] = tmp;\n}", "@Override\n\tpublic void create () {\n\t\t//IntrigueGraphicalDebugger.enable();\n\t\tIntrigueGraphicSys = new IntrigueGraphicSystem();\n\t\tIntrigueTotalPhysicsSys = new IntrigueTotalPhysicsSystem();\n\t\t\n\t\tfinal int team1 = 1;\n\t\tfinal int team2 = 2;\n\t\t\n\t\tstage = new Stage();\n\t\ttable = new Table();\n\t\ttable.bottom();\n\t\ttable.left();\n\t\ttable.setFillParent(true);\n\t\t\n\t\tLabelStyle textStyle;\n\t\tBitmapFont font = new BitmapFont();\n\t\t\n\n\t\ttextStyle = new LabelStyle();\n\t\ttextStyle.font = font;\n\n\t\ttext = new Label(\"Intrigue\",textStyle);\n\t\tLabel text2 = new Label(\"@author: Matt\", textStyle);\n\t\tLabel text3 = new Label(\"OPERATION 1\", textStyle);\n\t\t\n\t\ttext.setFontScale(1f,1f);\n\t\ttable.add(text);\n\t\ttable.row();\n\t\ttable.add(text2);\n\t\ttable.row();\n\t\ttable.add(text3);\n\t\tstage.addActor(table);\n\n\t\ttable.setDebug(true);\n\t\tString path_to_char = \"3Dmodels/Soldier/ArmyPilot/ArmyPilot.g3dj\";\n //String path_to_road = \"3Dmodels/Road/roadV2.g3db\";\n\t\t//String path_to_rink = \"3Dmodels/Rink/Rink2.g3dj\";\n\t\tString path_to_snow_terrain = \"3Dmodels/Snow Terrain/st5.g3dj\";\n\t\tString path_to_crosshair = \"2Dart/Crosshairs/rifle_cross.png\";\n\t\n\t\tMatrix4 trans = new Matrix4();\n\t\tMatrix4 iceTrans = new Matrix4();\n\t\tMatrix4 iceTrans2 = new Matrix4();\n\t\tMatrix4 iceTrans3 = new Matrix4();\n\t\tMatrix4 iceTrans4 = new Matrix4();\n\t\tMatrix4 trans2 = new Matrix4();\n\t\tMatrix4 trans3 = new Matrix4();\n\t\n\t\ttrans.translate(-3000,6000,-500);\n\t\t//Vector3 halfExtents = new Vector3(30f,90f,25f);\n\t\tbtCapsuleShape person_shape = new btCapsuleShape(30f, 90f);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(player_guid)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char).IntrigueControllerComponent(1)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.DecalComponent()\n\t\t\t\t\t.ThirdPersonCameraComponent()\n .CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable(path_to_crosshair)\n\t\t\t\t\t.TargetingAI(team1)\n\t\t\t\t\t//.CharacterSoundComponent(\"SoundEffects/Character/walking/step-spur.mp3\", \"SoundEffects/guns/M4A1.mp3\")\n\t\t\t\t\t.Build());\n\t\tJson json_test = new Json(); \n\t\tEntity d = mamaDukes.get(player_guid);\n\t\t//System.out.println(json_test.prettyPrint(d));\n\t\t\n\t\t\n\t\tmamaDukes.get(player_guid).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans, Entity.class));\n\t\t\t\t/*\n\t\t\t\tnew DrifterObject.DrifterObjectBuilder(1)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(1)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\n\t\t\t\t\t\t\t\"3DParticles/blizzard.pfx\",new Vector3(1000,1000, -2500), \n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\ttrans2.translate(-1000,1000,1500);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(2)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans2)\n\t\t\t\t\t.ParticleComponent(\"Blood\", \"3DParticles/Character/Blood.pfx\", \n\t\t\t\t\t\t\tnew Vector3(), new Vector3(1f,1f,1f))\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent()\n\t\t\t\t\t.Fireable()\n\t\t\t\t\t.ShootingSoldierAI()\n\t\t\t\t\t.TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody()\n\t\t\t\t\t.getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\t\n\t\tmamaDukes.get(2).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setUserIndex(2);\n\t\t\n\t\ttrans3.translate(-1000, 1000, 2000);\n\t\t\n\t\tmamaDukes.add(new Entity.Builder(3)\n\t\t\t\t\t.IntrigueModelComponent(path_to_char)\n\t\t\t\t\t.IntriguePhysicalComponent(person_shape, 200f, trans3)\n\t\t\t\t\t.MotionComponent()\n\t\t\t\t\t.AimingComponent()\n\t\t\t\t\t.CharacterActionsComponent()\n\t\t\t\t\t.AnimationComponent().Fireable()\n\t\t\t\t\t.ShootingSoldierAI().TargetingAI(team2)\n\t\t\t\t\t.Build());\n\t\t\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setAngularFactor(new Vector3(0,0,0));\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody()\n\t\t\t\t\t.setActivationState(Collision.DISABLE_DEACTIVATION);\n\t\tmamaDukes.get(3).getPhysicalComponent()\n\t\t\t\t\t.getPhysicsBody().getRigidBody().setUserIndex(3);\n\t\t\n\t\tVector3 rpos = new Vector3();\n\t\t\n\t\tmamaDukes.get(1).getModelComponent().getModel()\n\t\t\t\t\t.transform.getTranslation(rpos);\n\t\t\n\t\ticeTrans2.translate(0, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"SoundEffects/stages/snow stage/wind1.mp3\",\n\t\t\t\t\"3DParticles/blizzard.pfx\", iceTrans2, Entity.class));\n\t\t\n\t\t\t\t\t/*new DrifterObject.DrifterObjectBuilder(4)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(4)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans2)\n\t\t\t\t\t.IntrigueLevelComponent(\"SoundEffects/stages/snow stage/wind1.mp3\")\n\t\t\t\t\t.Build())\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(0, 0, 6185.332f),\n\t\t\t\t\t\t\tnew Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build());*/\n\t\t\n\t\tmamaDukes.get(4).getModelComponent().getModel().transform.translate(new Vector3(0, 0, 6185.332f)); //btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\ticeTrans3.translate(-6149.6568f, 0, 6185.332f);\n\t\t\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans3, Entity.class));\n\t\t/**\n\t\t * btStaticMeshShapes do not update their motionStates. The model Translation must be set manually in these cases.\n\t\t */\n\t\tmamaDukes.get(5).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 6185.332f)); \n\t\t\n\t\ticeTrans4.translate(-6149.6568f, 0, 0);\n\t\tmamaDukes.add(level_factory.createLevel(path_to_snow_terrain,\n\t\t\t\t\"3DParticles/blizzard.pfx\" , iceTrans4, Entity.class));\n\t\t\t\t\t/**new DrifterObject.DrifterObjectBuilder(6)\n\t\t\t\t\t.BaseObject(new Gobject.Builder(6)\n\t\t\t\t\t.IntrigueModelComponent(path_to_snow_terrain)\n\t\t\t\t\t.IntriguePhysicalComponent(iceMass, iceTrans4)\n\t\t\t\t\t.ParticleComponent(\"Blizzard\",\"3DParticles/blizzard.pfx\",\n\t\t\t\t\t\t\tnew Vector3(-6149.6568f, 0, 0), new Vector3(3000, 1000,2000 ))\n\t\t\t\t\t.Build())\n\t\t\t\t\t.Build());*/\n\t\tmamaDukes.get(6).getModelComponent().getModel().transform.translate(new Vector3(-6149.6568f, 0, 0)); \n\t\t\n\t}", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "public AbstractGameObject(Level linksTo, int atX, int atY) {\n level = linksTo;\n xPosition = atX;\n yPosition = atY;\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"FILL\", (Content) null, 12, 12, false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(12, homeTexture0, 12, homeTexture0, 12, 12);\n homeEnvironment0.getSkyTexture();\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(12, homeEnvironment0.getLightColor());\n assertEquals(12, homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(12, homeEnvironment0.getSkyColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(12.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "public Cenario1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(900, 600, 1);\n adicionar();\n \n }", "private void initialize() {\n //Asteroid Shape (8 sided)\n polygon = new Vector2f[]{new Vector2f(400, -800), new Vector2f(-400, -800), new Vector2f(-800, -400),\n new Vector2f(-800, 400), new Vector2f(-400, 800), new Vector2f(400, 800), new Vector2f(800, 400), new Vector2f(800, -400)};\n //Translation variables\n this.tx = spawnX;\n this.ty = spawnY; //Start above screen to gain momentum\n this.velocity = new Vector2f();\n\n //World initialize\n this.world = new Matrix3x3f();\n\n }", "public GridCell(int xPosition, int yPosition, char actor) // Based on the actor we are creating respective object.\n {\n\t xPos = xPosition;\n\t yPos = yPosition;\n\t if(actor == Constants.PATH)\n\t {\n\t\t a = new Actor();\n\t }\n\t if( actor == Constants.ROBOT)\n\t {\n\t\t a = new PlayerRobotManual();// creating PlayerRobotManual object.\n\t }\n\t if(actor == 'x' || actor == Constants.WALL)\n\t {\n\t\t a = new Wall();// wall object.\n\t }\n\t if(actor == 'b' || actor == Constants.BOMB)\n\t {\n\t\t a = new Bomb(); // Bomb objection.\n\t }\n\t if(actor == Constants.SMALL_CANDY ) \n\t {\n\t\t a = new Candy(Constants.SMALL_CANDY); // candy object of type small.\n\t }\n\t if(actor == Constants.SMALL_CANDY ) \n\t {\n\t\t a = new Candy(Constants.SMALL_CANDY);\n\t }\n\t if(actor == Constants.BIG_CANDY)\n\t {\n\t\t a = new Candy(Constants.BIG_CANDY);// candy object of type Big.\n\t }\n\t if(actor == Constants.DUMB_ENEMY)\n\t {\n\t\t a = new DumbEnemy(); // object of dumb enemy which moves in random direction.\n\t }\n\t if(actor == Constants.SENTINEL_ENEMY)\n\t {\n\t\t a = new SentinelEnemy();// THis will be at one fixed postion and will kill the robot if its in neighbour cell.\n\t }\n\t if(actor == Constants.WALKING_SENTINEL)\n\t {\n\t\t a = new WalkingSentinelEnemy();// object for walking sentinel enemy.\n\t }\n\t if(actor == Constants.PLAYER_CHASER)\n\t {\n\t\t a = new SmartEnemy();// object for player chaser enemy.\n\t }\n\t if(actor == Constants.CANDY_CHASER)\n\t {\n\t\t a = new WatcherEnemy();// object for candy chaser enemy.\n\t }\n\t if(actor == Constants.ROBOT_HOLDING_BOMB)\n\t {\n\t\t a = new PlayerRobotHoldingBomb();// object used to repersent the player holding bomb.\n\t }\n\t if(actor == Constants.FLYING_BOMB)\n\t {\n\t\t a = new FlyingBomb(); // Object used to represent the flying bomb.\n\t }\n\t if((int)actor >= 49 && (int)actor <=57)\n\t {\n\t\t a = new WarpZone(actor);\n\t }\n\t if(actor == 'i')\n\t {\n\t\t a = new InvisibleCloak();\n\t\t\t\t \n\t }\n\t}", "@Override\r\n\tpublic void create() {\n\t\tbatch = new SpriteBatch();\r\n\t\tcamera = new OrthographicCamera();\r\n\t\tassets = new AssetManager();\r\n\t\t\r\n\t\tcamera.setToOrtho(false,WIDTH,HEIGHT);\r\n\t\t\r\n\t\tTexture.setAssetManager(assets);\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tsetScreen(new SplashScreen(this));\r\n\t}", "public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }", "protected GameObject(double x, double y, double xSize, double ySize, ID id) {\n\t\tthis.pos = new Point2D(x, y);\n\t\tthis.body = new Rectangle2D.Double(pos.getX(), pos.getY(), xSize, ySize);\n\t\tthis.id = id;\n\t}", "public zombie_bg()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1010,900, 1); \n setPaintOrder(ScoreBoard.class, player.class, zomb_gen.class, options.class);\n populate();\n \n }", "SurfaceTexture mo17006a();", "public SmallAsteroid(int angle, int x, int y,FloatBuffer vertexBuffer)\n {\n super(angle, x, y,vertexBuffer);\n this.index = 16;\n this.radius /= 4;\n this.width = 13;\n this.height = 13;\n }", "public void func_180435_a(TextureAtlasSprite p_180435_1_) {\n/* 215 */ int var2 = getFXLayer();\n/* */ \n/* 217 */ if (var2 == 1) {\n/* */ \n/* 219 */ this.particleIcon = p_180435_1_;\n/* */ }\n/* */ else {\n/* */ \n/* 223 */ throw new RuntimeException(\"Invalid call to Particle.setTex, use coordinate methods\");\n/* */ } \n/* */ }", "void texImage2D(int target, int level, int resourceId, int border);", "public pr3s1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n prepare();\n }", "Position_abscisse createPosition_abscisse();", "public GameObject(String name, int x, int y) {\n this.image = GameObject.processing.loadImage(\"images\" + File.separator + name + \".png\");\n this.xPosition = x;\n this.yPosition = y;\n this.active = true;\n }", "AliciaLab createAliciaLab();", "public AABB a(World paramaqu, BlockPosition paramdt, Block parambec, float paramFloat, EnumDirection paramej)\r\n/* 147: */ {\r\n/* 148:175 */ if ((parambec.getType() == this) || (parambec.getType().getMaterial() == Material.air)) {\r\n/* 149:176 */ return null;\r\n/* 150: */ }\r\n/* 151:178 */ AABB localbrt = parambec.getType().a(paramaqu, paramdt, parambec);\r\n/* 152:180 */ if (localbrt == null) {\r\n/* 153:181 */ return null;\r\n/* 154: */ }\r\n/* 155:184 */ double d1 = localbrt.minX;\r\n/* 156:185 */ double d2 = localbrt.minY;\r\n/* 157:186 */ double d3 = localbrt.minZ;\r\n/* 158:187 */ double d4 = localbrt.maxX;\r\n/* 159:188 */ double d5 = localbrt.maxY;\r\n/* 160:189 */ double d6 = localbrt.maxZ;\r\n/* 161:192 */ if (paramej.g() < 0) {\r\n/* 162:193 */ d1 -= paramej.g() * paramFloat;\r\n/* 163: */ } else {\r\n/* 164:195 */ d4 -= paramej.g() * paramFloat;\r\n/* 165: */ }\r\n/* 166:197 */ if (paramej.h() < 0) {\r\n/* 167:198 */ d2 -= paramej.h() * paramFloat;\r\n/* 168: */ } else {\r\n/* 169:200 */ d5 -= paramej.h() * paramFloat;\r\n/* 170: */ }\r\n/* 171:202 */ if (paramej.i() < 0) {\r\n/* 172:203 */ d3 -= paramej.i() * paramFloat;\r\n/* 173: */ } else {\r\n/* 174:205 */ d6 -= paramej.i() * paramFloat;\r\n/* 175: */ }\r\n/* 176:207 */ return new AABB(d1, d2, d3, d4, d5, d6);\r\n/* 177: */ }", "public void usa(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(192,0,11);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,0,67);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n //green\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n //green\n fill(192,0,11);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n }", "public void init(){\n\t\n\t\t//background init\n\t\tthis.background = new Sprite(this.scene, \"space-backdrop.png\", 1280 * 5, 800 * 5);\n\t\tthis.background.setBoundAction(\"background\");\n\t\tthis.background.setSpeedScale(0.2);\n\t\tthis.background.setSpeed(0);\n\t\tthis.sprites.add(this.background);\n\t\t\n\t\t//compass init\n\t\tthis.compass = new Sprite(this.scene, \"compass.png\", 100, 100);\n\t\tthis.compass.setSpeed(0);\n\t\tthis.compass.setPosition(this.compass.getWidth() / 2, this.scene.getHeight() - this.compass.getHeight() / 2);\n\t\t\n\t\t//earth init\n\t\tthis.earth = new Planet(this.scene, \"earth.png\", 4800, 4800);\n\t\tthis.earth.setSpeed(0);\n\t\tthis.earth.setPosition(0, 7000);\n\t\tthis.earth.setBoundAction(\"continue\");\n\t\tthis.sprites.add(this.earth);\n\t\t\n\t\t//ship init\n\t\tthis.mainSprite = new Ship(this.scene, \"cannon.png\", 50, 50, this.k);\n\t\tthis.mainSprite.keyListen = true;\n\t\tthis.mainSprite.setSpeed(0);\n\t\tthis.mainSprite.setPosition(this.scene.getWidth() / 2, this.scene.getHeight() / 2);\n\t\t\n\t\t//asteroids init\n\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", 250, 250, this));\n\t\tthis.asteroids.get(0).setBoundAction(\"continue\");\n\t\tthis.asteroids.get(0).setSpeed(0);\n\t\tthis.asteroids.get(0).setPosition(0, 0);\n\t\tthis.sprites.add(this.asteroids.get(0));\n\t\t\n\t\tfor(int i = 1; i < 200; i++){\n\t\t\t\n\t\t\tint size = (int) Math.round(Math.random() * 400 + 50);\n\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\n\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t}\n\t\t\t\n\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t}\n\t\t\t\n\t\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", size, size, this));\n\t\t\tthis.asteroids.get(i).setBoundAction(\"continue\");\n\t\t\tthis.asteroids.get(i).setSpeed(0);\n\t\t\tthis.asteroids.get(i).setPosition(x, y);\n\t\t\t\n\t\t\tthis.sprites.add(this.asteroids.get(i));\n\t\t}\n\t\t\n\t\t\n\t\t//chest init\n\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\tthis.chests.get(0).setBoundAction(\"continue\");\n\t\tthis.chests.get(0).setSpeed(0);\n\t\tthis.chests.get(0).setPosition(500, 500);\n\t\tthis.sprites.add(this.chests.get(0));\n\t\t\n\t\tfor(int i = 1; i < this.numChests; i++){\n\t\t\t\n\t\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\t\tthis.chests.get(i).setBoundAction(\"continue\");\n\t\t\tthis.chests.get(i).setSpeed(0);\n\t\t\t\n\t\t\tboolean keepGoing = true;\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t\n\t\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.chests.get(i).setPosition(x, y);\n\t\t\t\t\n\t\t\t\t//check for collisions with asteroids\n\t\t\t\tboolean colliding = false;\n\t\t\t\tfor(int j = 0; j < this.asteroids.size() && colliding == false; j++){\n\t\t\t\t\tif(this.asteroids.get(j).collidesWith(this.chests.get(i))){\n\t\t\t\t\t\tcolliding = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tkeepGoing = colliding;\n\t\t\t\t\n\t\t\t}while(keepGoing);\n\t\t\t\n\t\t\tthis.sprites.add(this.chests.get(i));\n\t\t\t\n\t\t}//end for\n\t\n\t\tthis.scene.start();\n\t\t\n\t\tSystem.out.println(\"==== Welcome to Space Smuggler! ====\");\n\t\tSystem.out.println(\"(WASD to move)\");\n\t\tSystem.out.println(\"Follow your compass in the bottom left corner to find treasure.\");\n\t\tSystem.out.println(\"Collect all of the treasure, then follow your compass to Earth!\");\n\t\tSystem.out.println(\"Watch out for the asteroids though, their gravitational pull is strong!\");\n\t\tSystem.out.println(\"Crashing into one will certainly kill you! D:\");\n\t\tSystem.out.println(\"Good Luck!\");\n\t\t\n\t}", "public Actor(double topLeftX, double topLeftY, double width, double height,\n double mass, boolean grav, Image texture, int hp) {\n this.addComponent(new PhysicsComponent(topLeftX, topLeftY, width, height, mass, grav)); //physics\n this.addComponent(new VisualTextureComponent(texture, new Rectangle(0, 0, 1, 1))); //texture\n this.addComponent(new HpComponent(hp)); //hp\n }", "public Ogre(int x, int y) {\r\n\t\tsuper(\"resources/ogre.gif\", x, y);\r\n\t}", "public void setup() {\n\t\tthis.image = new BufferedImage(maxXPos, maxYPos, BufferedImage.TYPE_4BYTE_ABGR);\n\t\tthis.graphics = getImage().createGraphics();\n\t}", "SurfaceTexture mo17015a();", "private IndexBitmapObject() {\n\t}", "public Awale(Awale awale) {\r\n\tthis.listeners = new ArrayList<AwaleListener>();\r\n\tthis.currentSide = awale.currentSide;\r\n\tthis.size = awale.size;\r\n\tthis.territory = new short[2][size];\r\n\tSystem.arraycopy(awale.territory[0], 0, this.territory[0], 0,\r\n\t awale.territory[0].length);\r\n\tSystem.arraycopy(awale.territory[1], 0, this.territory[1], 0,\r\n\t awale.territory[1].length);\r\n\tthis.simulateTerritory = new short[2][size];\r\n\tSystem\r\n\t .arraycopy(awale.simulateTerritory[0], 0,\r\n\t this.simulateTerritory[0], 0,\r\n\t awale.simulateTerritory[0].length);\r\n\tSystem\r\n\t .arraycopy(awale.simulateTerritory[1], 0,\r\n\t this.simulateTerritory[1], 0,\r\n\t awale.simulateTerritory[1].length);\r\n\tthis.points = new short[2];\r\n\tSystem.arraycopy(awale.points, 0, this.points, 0, this.points.length);\r\n\r\n }", "@Override\n\tpublic void create() {\n\t\tthis.batch = new SpriteBatch();\n\t\t\n//\t\tgame.batch.begin();\n// player.draw(game.batch);\n// \n// game.batch.end();\n\t\t\n\t\tmanager = new AssetManager();\n\t\tmanager.setLoader(TiledMap.class, new TmxMapLoader(new InternalFileHandleResolver()));\n\t\tmanager.load(\"data/level1.tmx\", TiledMap.class);\n\t\tmanager.load(\"data/background.png\", Texture.class);\n//\t\tmanager.load(\"level1.tsx\", TiledMapTileSet.class);\n\t\tmanager.finishLoading();\n\t\tscreen = new GameScreen(this);\n\t\tsetScreen(screen);\n\t\t\n\t}", "protected GameObject(double x, double y, Sprite[] images, double axi, double vxi, double vxmax, Program program) {\n\t\tassert(isValidX(x));\n\t\tassert(isValidX(y));\n\t\tassert((program == null) || !(this instanceof Mazub) || (this instanceof Buzam));\n\t\t\n\t\tsetX(x);\n\t\tsetY(y);\n\t\tthis.images = images;\n\t\tthis.axi = axi;\n\t\tthis.vxi = vxi;\n\t\tsetVxmax(vxmax);\n\t\tthis.program = program;\n\t\t\n\t\tsetVx(0);\n\t\tsetVy(0);\n\t\tsetAx(0);\n\t\tsetAy(0);\n\t\tsetHitpoints(100);\n\t}", "void createSurface(SurfaceTexture surfaceTexture);", "public AGG_GuidePacket( int i, double x, double y )\n {\n xPixel = x;\n yPixel = y;\n }", "public Sprite() {}", "public AbstractGameObject(Level linksTo, Point at) {\n level = linksTo;\n xPosition = at.x;\n yPosition = at.y;\n }", "public Actor(ActorType type, double x, double y) {\n this.location = new Location(x, y);\n this.type = type;\n setImage(type);\n }", "public Building (Pixmap image,\n Location3D center,\n Dimension size,\n Sound sound,\n int playerID,\n int health,\n double buildTime) {\n super(image, center, size, sound, playerID, MAXHEALTH, buildTime);\n myRallyPoint = new Location3D(getWorldLocation().getX(), getWorldLocation().getY() + 150, 0);\n \n }", "public Asteroid () {\n\t\tImage asteroid = new Image(getClass().getClassLoader().getResourceAsStream(\"asteroid.png\"));\n\t\timage = new ImageView(asteroid);\n\t\tsetX(Math.random() * (Main.SIZEX - this.getXSize()));\n\t\tsetY(0);\n\t\tvelocityY = -45;\n\t\tvelocityX = 0;\n\t}", "public BoardFactory(PacManSprites spriteStore) {Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\");this.sprites = spriteStore; Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\", \"689\");}", "@Override\n\tpublic void create () {\n\t\tmBatch = new SpriteBatch();\n mFont = new BitmapFont();\n\t\tmCamera = new OrthographicCamera();\n\t\tmCamera.setToOrtho(false, 800, 480); // Regardless of resolution, project screen onto 800 x 480 orthographic matrix\n\n\t\tmGameBackgrounds = new Texture[6]; // Six frames describing six states of damage to the castle, from pristine to broken\n\t\tmGameBackgrounds[0] = new Texture(\"castle_v1.png\");\n\t\tmGameBackgrounds[1] = new Texture(\"castle_v1_dam1.png\");\n\t\tmGameBackgrounds[2] = new Texture(\"castle_v1_dam2.png\");\n\t\tmGameBackgrounds[3] = new Texture(\"castle_v1_dam3.png\");\n\t\tmGameBackgrounds[4] = new Texture(\"castle_v1_dam4.png\");\n\t\tmGameBackgrounds[5] = new Texture(\"castle_v1_dam5.png\");\n\n\t\t// Assign value to list so it may be given objects to store\n\t\tmAttackers = new Attacker[ATTACKER_ARRAY_SIZE];\n\t\tmButtons = new DefenderButtons[7];\n\t\tmButtons[0] = new DefenderButtons(DefenderButtons.TYPE_NEW_GAME);\n\t\tmButtons[1] = new DefenderButtons(DefenderButtons.TYPE_RESUME_SAVED_GAME);\n\t\tmButtons[2] = new DefenderButtons(DefenderButtons.TYPE_PAUSE_GAME);\n\t\tmButtons[3] = new DefenderButtons(DefenderButtons.TYPE_RESUME_PAUSED_GAME);\n\t\tmButtons[4] = new DefenderButtons(DefenderButtons.TYPE_REPAIR_CASTLE);\n\t\tmButtons[5] = new DefenderButtons(DefenderButtons.TYPE_CONTINUE_NEXT_ROUND);\n\t\tmButtons[6] = new DefenderButtons(DefenderButtons.TYPE_SAVE_GAME);\n\n\t\tmButtons[0].setTexture(new Texture(\"button1.png\"));\n\t\tmButtons[1].setTexture(new Texture(\"button1.png\"));\n\t\tmButtons[2].setTexture(new Texture(\"button2.png\"));\n\t\tmButtons[3].setTexture(new Texture(\"button2.png\"));\n\t\tmButtons[4].setTexture(new Texture(\"button3.png\"));\n\t\tmButtons[5].setTexture(new Texture(\"button3.png\"));\n\t\tmButtons[6].setTexture(new Texture(\"button3.png\"));\n\n\t\t// Create the object that tracks the touch coordinates\n\t\tmLastTouch = new Vector3();\n\n // Assign value to miscellaneous game variables\n mRoundTimeElapsed = 0;\n mRoundMaxTime = 25f; // Counted in SECONDS\n\t\tmCastleMaxHealth = 1000f;\n mCastleHealth = mCastleMaxHealth; // Will last 1,000 frames if attacked by one single standard attacker constantly\n\t\tmCastleDamageStage = 0;\n mRoundScore = 0f;\n mTotalScore = 0f;\n mRoundNumber = 1;\n\t\tmGameState = STATE_PRE_GAME;\n\t\tmAttackerDelay = 0;\n mRoundMaxAttackers = 5;\n\t\tmRepairCost = 1000f;\n\t\tmLivingAttackerCount = 0;\n\t\tmKnightSpawnChance = 0.35f; // 35% chance to spawn a knight instead of normal under regular circumstances\n mPaused = false;\n\t\tmRoundSaved = false;\n mHealthText = \"Castle Strength: \" + mCastleHealth;\n mRoundScoreText = \"This Round Score: \" + mRoundScore;\n\t\tmTotalScoreText = \"Total Game Score: \" + mTotalScore;\n\t\tmGameTitle = \"Castle Defender\";\n\t\tmGameSavedText = \"Game Saved!\";\n\t\tmRoundText = \"Round :\" + mRoundNumber;\n\t\tmRandom = new Random();\n\t\t//TEMPORARY! Will change the logic later\n mSpawnTime = 100;\n\t\tmMonsterHouseSpawn = 10;\n\n\t\t// Pull out the normal attacker's frames through temporary objects\n\t\tTexture walkTexture = new Texture(\"attackerSheet.png\");\n\t\tTextureRegion[][] walkTempArray = TextureRegion.split(walkTexture, 64, 64);\n\t\tTextureRegion[] walkFrames = new TextureRegion[16];\n\n\t\tint index = 0; // Cut the animation's frames up using this temporary jagged array (8 by 2 matches the image file rows / cols)\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tfor (int j = 0; j < 8; j++) {\n\t\t\t\twalkFrames[index++] = walkTempArray[i][j];\n\t\t\t}\n\t\t}\n\n\t\tmStandardAttackerWalk = new Animation(0.055f, walkFrames);\n\n\t\t// Do the same process for the knight animations\n\t\tTexture knightWalk = new Texture(\"knight_sheet_walk.png\");\n\t\tTexture knightAttack = new Texture(\"knight_sheet_attack.png\");\n\n\t\tTextureRegion[][] knightWalkTemp = TextureRegion.split(knightWalk, 64, 128);\n\t\tTextureRegion[][] knightAtkTemp = TextureRegion.split(knightAttack, 64, 128);\n\n\t\tTextureRegion[] knightWalkFrames = new TextureRegion[8];\n\t\tTextureRegion[] knightAtkFrames = new TextureRegion[4];\n\n\t\tindex = 0;\n\t\tfor(int i = 0; i < 2; i++) {\n\t\t\tfor(int j = 0; j < 4; j++) {\n\t\t\t\tknightWalkFrames[index++] = knightWalkTemp[i][j];\n\t\t\t}\n\t\t}\n\n\t\tindex = 0;\n\t\tfor(int i = 0; i < 4; i++) {\n\t\t\tknightAtkFrames[index++] = knightAtkTemp[0][i];\n\t\t}\n\n\t\tmKnightAttackerAttack = new Animation(0.25f, knightAtkFrames);\n\t\tmKnightAttackerWalk = new Animation(0.125f, knightWalkFrames);\n\n\t\t// Populate the mAttackers array with 50 total attackers, 25 of each\n\t\tfor(int i = 0; i < ATTACKER_ARRAY_SIZE; i++){\n\t\t\t// Grab a walk speed between constant minimum and maximum\n\t\t\tfloat walkSpeed = mRandom.nextFloat() * MAX_SPEED_VARIANCE;\n\t\t\twalkSpeed += MIN_SPEED; // Ensures the speed is AT LEAST 60 \"units\"\n\t\t\t// Spawn at a random y coordinate starting at MIN_SPAWN_Y, varying by MAX_SPAWN_Y_VARIANCE\n\t\t\tfloat spawnY = mRandom.nextFloat() * MAX_SPAWN_Y_VARIANCE;\n\t\t\tspawnY += MIN_SPAWN_Y;\n\n\t\t\tif(i < ATTACKER_HALF_SIZE) {\n\t\t\t\t// The first half of the array are normal attackers\n\t\t\t\tmAttackers[i] = new Attacker(1f, walkSpeed, -100f, spawnY, 64f, 64f, \"normal\");\n\t\t\t\tmAttackers[i].addAnimation(mStandardAttackerWalk, \"walk\");\n\t\t\t} else {\n\t\t\t\t// The second half of the array are \"knight\" attackers\n\t\t\t\tmAttackers[i] = new Attacker(2f, walkSpeed * 0.75f, -100f, spawnY, 64f, 128f, \"knight\");\n\t\t\t\tmAttackers[i].addAnimation(mKnightAttackerWalk, \"walk\");\n\t\t\t\tmAttackers[i].addAnimation(mKnightAttackerAttack, \"attack\");\n\t\t\t}\n\t\t}\n\t}", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "private oa a(int paramInt)\r\n/* 185: */ {\r\n/* 186:195 */ if (c[paramInt] == null) {\r\n/* 187:196 */ c[paramInt] = new oa(String.format(\"textures/font/unicode_page_%02x.png\", new Object[] { Integer.valueOf(paramInt) }));\r\n/* 188: */ }\r\n/* 189:199 */ return c[paramInt];\r\n/* 190: */ }", "public void init() {\n setSize(466, 700); // Hago el applet de un tamaño 900, 500\n bAvanzaBloque = false;\n iNumBloques = 54; // Cantidad exacta para que se forme la figura\n iVidas = 3; // El jugador tendra 3 oportunidades\n iScore = 0; // El score empieza en 0\n iNivel = 1; // Empezara en el 1er nivel\n // La direccion que nos interesa es: false: Abajo true: Arriba.\n bDireccionY = false;\n // La direccion que nos interesa es: false: Izq. true: Dererecha\n bDireccionX = true;\n\n // El juego empieza pausado\n bPausado = true;\n // El juego no empieza hasta que el usuario lo desee\n bEmpieza = false;\n // El jugador no ha perdido\n bPerdio = false;\n\n // se obtiene la imagen para la barra\n URL urlImagenBarra = this.getClass().getResource(\"remolqueBB.png\");\n // se crea la barra tipo Objeto\n objBarra = new Objeto(0, 0,\n Toolkit.getDefaultToolkit().getImage(urlImagenBarra));\n // se posiciona la barra centrada en la parte de abajo\n objBarra.setX((getWidth() / 2) - (objBarra.getAncho() / 2));\n objBarra.setY(getHeight() - objBarra.getAlto());\n // se le asigna una velocidad de 9\n objBarra.setVelocidad(20);\n\n // se carga la imagen para el proyectil\n URL urlImagenProyectil\n = this.getClass().getResource(\"cristalAzulBB2.png\");\n // se crea al objeto Proyectil de la clase objeto\n objProyectil = new Objeto(0, 0,\n Toolkit.getDefaultToolkit().getImage(urlImagenProyectil));\n // se posiciona el proyectil en el centro arriba de barra\n objProyectil.setX((getWidth() / 2) - (objProyectil.getAncho() / 2));\n objProyectil.setY(objBarra.getY() - objProyectil.getAlto());\n // se le asigna una velocidad de 5\n objProyectil.setVelocidad(5);\n\n // se crea la lista de bloques a destruir\n lnkBloques = new LinkedList();\n // se llena y acomoda la lista de bloques\n try {\n acomodaBloques();\n } catch (IOException ioeError) {\n System.out.println(\"Hubo un error al cargar el juego: \"\n + ioeError.toString());\n }\n\n // se crea el sonido para el choque de con la barra\n socSonidoChoqueBarra = new SoundClip(\"ChoqueBarra.wav\");\n\n // se crea el sonido para el choque con los bloques\n socSonidoChoqueBloque = new SoundClip(\"ChoqueBloque.wav\");\n\n /* se le añade la opcion al applet de ser escuchado por los eventos\n /* del teclado */\n addKeyListener(this);\n }", "public OverWorld()\n { \n // Create a new world with 800x600 cells with a cell size of 1x1 pixels.\n super(1024, 600, 1, false);\n Setup();\n }", "public SoTextureCoordinateBundle(SoAction action, boolean forRendering) {\n \tthis(action, forRendering, true);\n }", "private void\nsetUpForGLRender(SoAction action)\n//\n////////////////////////////////////////////////////////////////////////\n{\n int unit = SoTextureUnitElement.get(action.getState()); // COIN 3D YB\t\n\t\n if (! SoGLMultiTextureEnabledElement.get(action.getState(),unit))\n needCoords = isFunc = false;\n\n else {\n // Access a GL version of the element for sending texture\n // coordinates to GL\n texCoordElt = SoMultiTextureCoordinateElement.getInstance(state);\n GLTexCoordElt = ( SoGLMultiTextureCoordinateElement ) texCoordElt;\n\n switch (GLTexCoordElt.getType(unit)) {\n\n \tcase DEFAULT:\n this.initDefault(action);\n break;\n case EXPLICIT:\n if (GLTexCoordElt.getNum(unit) > 0) {\n needCoords = true;\n isFunc = false;\n } else {\n // Set up the default coordinate function before it is\n // used by the SoGLTextureCoordinateElement\n setUpDefaultCoordSpace(action);\n\n // Set up a texture coordinate function that will do the\n // correct tex gen stuff. We need to do this through the\n // element so the state can be restored correctly.\n state.push();\n setFunction = true;\n SoNode currentNode = action.getCurPathTail();\n SoGLMultiTextureCoordinateElement.\n setTexGen(state, currentNode, setUpTexGenCB, this,\n generateCoordCB, this);\n\n // Get the new instance in here\n texCoordElt = SoMultiTextureCoordinateElement.getInstance(state);\n GLTexCoordElt = ( SoGLMultiTextureCoordinateElement )\n texCoordElt;\n\n\n // No longer need coordinates, since texgen does the job\n needCoords = false;\n\n // Set this flag to true so that if we are using primitive\n // generation to do the rendering, we can tell that we\n // have a function to use\n isFunc = true;\n }\n break;\n\n case FUNCTION:\n//#ifdef DEBUG\n// SoDebugError.post(\n// \"SoTextureCoordinateBundle.setUpForGLRender\",\n// \"GLTextureCoordinateElement is FUNCTION!\");\n//#endif\n needCoords = isFunc = false;\n break;\n }\n }\n}", "public Entity(int x, int y){\n \t\tlocation = new Point(x,y);\n \t\twidth = 0;\n\t\theight = 0;\n\t\timage = null;\n\t\t\n\t\tvisible = false;\n \t}", "private void DrawBraid(GL gl, float x, float y, float size,\n\t\t\tfloat r, float g, float b) {\n\n float reflected_x=0, reflected_y=0;\n float reflected_vector_angle=0, reflected_image_angle=0, reflected_rotate=0;\n\n // Degeneracy = do not want\n\t\tif (m_length == 0.0f || m_width == 0.0f) {\n\t\t\treturn;\n\t\t}\n\n\t\t////int mct = (int) (1 / this.GetPEngine().m_uniscale);\n\t\t////mct = (mct / 2) / 100 * 100;\n\n //Do the reflection\n if(m_x_reflection==0 && m_y_reflection==0)\n {\n reflected_x=x;\n reflected_y=y;\n reflected_image_angle=m_slope;\n reflected_vector_angle=m_slope;\n reflected_rotate= m_rotate;\n }\n else if(m_x_reflection==1 && m_y_reflection==0)\n {\n reflected_x=x;\n reflected_y=-y;\n reflected_image_angle=90-m_slope;\n reflected_vector_angle=-m_slope;\n reflected_rotate= -m_rotate;\n }\n else if(m_x_reflection==0 && m_y_reflection==1)\n {\n reflected_x=-x;\n reflected_y=y;\n reflected_image_angle=-90-m_slope;\n reflected_vector_angle=180-m_slope;\n reflected_rotate= -m_rotate;\n }\n else if(m_x_reflection==1 && m_y_reflection==1)\n {\n reflected_x=-x;\n reflected_y=-y;\n reflected_image_angle=m_slope-180;\n reflected_vector_angle=m_slope+180;\n reflected_rotate= m_rotate;\n }\n\n\t\tfloat start_image_theta = (float) Math.toRadians(reflected_image_angle);\n \t\tfloat start_vector_theta = (float) Math.toRadians(reflected_vector_angle);\n\t\tfloat rotate_theta = (float) Math.toRadians(reflected_rotate);\n\t\tfloat cur_image_theta = 0f, cur_vector_theta = 0f;\n\t\tdouble image_costheta = 0, vector_costheta = 0;\n\t\tdouble image_sintheta = 0, vector_sintheta = 0;\n\t\tfloat xP = 0f;\n\t\tfloat yP = 0f;\n\t\tfloat xO = 0f, nextXO = 0f;\n\t\tfloat yO = 0f, nextYO = 0f;\n\n\t\t//if (txt == null) {\n\t\t//\ttxt = load(\"img/plaitWhite.png\");\n\t\t//}\n\t\tTextureCoords tc = m_txt.getImageTexCoords();\n\t\txO = nextXO = reflected_x;\n\t\tyO = nextYO = reflected_y;\n xP = m_cx * m_starting_dilation;\n\t\tyP = m_cy * m_starting_dilation;\n //vector\n\t\tcur_vector_theta = start_vector_theta;\n vector_costheta = Math.cos(cur_vector_theta);\n\t\tvector_sintheta = Math.sin(cur_vector_theta);\n //image\n cur_image_theta = start_image_theta;\n\t\timage_costheta = Math.cos(cur_image_theta);\n\t\timage_sintheta = Math.sin(cur_image_theta);\n\t\t\n\t\tfor (int i = 0; i < Iteration; i++) {\t\t\t\n DrawPlait(gl, xO, yO, xP / 2, yP / 2, image_costheta, image_sintheta, tc);\n\t\t\t//vector\n cur_vector_theta += rotate_theta;\n\t\t\tvector_costheta = Math.cos(cur_vector_theta);\n\t\t\tvector_sintheta = Math.sin(cur_vector_theta);\n //image\n\t\t\tcur_image_theta += rotate_theta;\n\t\t\timage_costheta = Math.cos(cur_image_theta);\n\t\t\timage_sintheta = Math.sin(cur_image_theta);\n //next centor position\n\t\t\tnextXO = xO + (float) (xP * m_translate * vector_costheta);\n\t\t\tnextYO = yO + (float) (yP * m_translate * vector_sintheta);\n\t\t\tif (m_vector) {\n\t\t\t\tDrawVector(gl, xO, yO, nextXO, nextYO, xP, cur_vector_theta);\n\t\t\t}\n\t\t\txO = nextXO;\n\t\t\tyO = nextYO;\n\t\t\txP *= m_dilate;\n\t\t\tyP *= m_dilate;\n\t\t}\n\t}", "public Font(Obj paramObj) {\n/* 113 */ this.a = paramObj.__GetHandle();\n/* 114 */ this.b = paramObj.__GetRefHandle();\n/* */ }", "Ball create(int xpos, int ypos);", "public salida()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(600, 400, 1); \r\n }", "private void\nsetUpForPrimGen(SoAction action,\n boolean setUpDefault)\n//\n////////////////////////////////////////////////////////////////////////\n{\n // Primitive generation always requires texture coordinates\n needCoords = true;\n\n texCoordElt = SoMultiTextureCoordinateElement.getInstance(state);\n GLTexCoordElt = null;\n \n int unit = SoTextureUnitElement.get(state); // COIN 3D YB\n\n switch (texCoordElt.getType(unit)) { // COIN 3D YB\n\n case EXPLICIT:\n if (texCoordElt.getNum(unit) < 1) {\n // Don't bother computing the function if not requested\n if (setUpDefault) {\n // Set up a texture coordinate function that compute the\n // texture coordinates. We need to do this through the\n // element so the state can be restored correctly.\n state.push();\n SoNode currentNode = action.getCurPathTail(); \n SoMultiTextureCoordinateElement.setFunction(state, currentNode,\n generateCoordCB, this);\n // Get the new instance in here\n texCoordElt = SoMultiTextureCoordinateElement.getInstance(state);\n\n setUpDefaultCoordSpace(action);\n\n setFunction = true;\n }\n isFunc = true;\n } else {\n isFunc = false;\n }\n break;\n\n case FUNCTION:\n isFunc = true;\n break;\n }\n}", "Wall(Sprite sprite) {Collect.Hit(\"BoardFactory.java\",\"Wall(Sprite sprite)\");this.background = sprite; Collect.Hit(\"BoardFactory.java\",\"Wall(Sprite sprite)\", \"2420\");}", "public FrameBodyASPI() {\r\n super();\r\n }", "Sprite(String url, float x, float y, float w, float h) {\n _img = loadImage(url);\n _x = x;\n _y = y;\n _w = w;\n _h = h;\n _rotVector = new PVector(1, 0, 0);\n resetRectHitbox();\n }", "public Cowboy(int initialX, int initialY) throws Exception {\n super(Image.createImage(\"/images/cowboy.png\"), WIDTH, HEIGHT);\n myInitialX = initialX;\n myInitialY = initialY;\n // we define the reference pixel to be in the middle\n // of the cowboy image so that when the cowboy turns\n // from right to left (and vice versa) he does not\n // appear to move to a different location.\n defineReferencePixel(WIDTH / 2, 0);\n setRefPixelPosition(myInitialX, myInitialY);\n setFrameSequence(FRAME_SEQUENCE);\n }", "BOp createBOp();", "@Override\n\t\tpublic void create() {\n\t\t\tcannon = new CannonLogic();\n\t\t\tlines = new LineLogic();\n\t\t\tboxes = new BoxLogic();\n\t\t\tcontroller = new PlayerController();\n\t\t\tshapeList = new ArrayList<Shape>();\n\t\t\t\n\t\t\tGdx.gl11.glEnableClientState(GL11.GL_VERTEX_ARRAY);\n\t\t\tGdx.gl11.glClearColor(0.4f, 0.6f, 1.0f, 1.0f);\n\t\t\tvertexBuffer = BufferUtils.newFloatBuffer(8);\n\t\t\tvertexBuffer.put(new float[] {-50,-50, -50,50, 50,-50, 50,50});\n\t\t\tvertexBuffer.rewind();\n\t\t}", "public void init() {\n fIconkit = new Iconkit(this);\n\n\t\tsetLayout(new BorderLayout());\n\n fView = createDrawingView();\n\n Panel attributes = createAttributesPanel();\n createAttributeChoices(attributes);\n add(\"North\", attributes);\n\n Panel toolPanel = createToolPalette();\n createTools(toolPanel);\n add(\"West\", toolPanel);\n\n add(\"Center\", fView);\n Panel buttonPalette = createButtonPanel();\n createButtons(buttonPalette);\n add(\"South\", buttonPalette);\n\n initDrawing();\n setBufferedDisplayUpdate();\n setupAttributes();\n }", "@Override\n\tpublic void create() {\n\t\t// TODO: create completely new batches for sprites and models\n\t\tsprites = new SpriteBatch();\n\t\tmodelBatch = new ModelBatch();\n\n\t\t// TODO: create a new environment\n\t\t// set a new color attribute for ambient light in the environment\n\t\t// add a new directional light to the environment\n\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 0.1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// create a new logo texture from the \"data/firstorder.png\" file\n\t\tlogo = new Texture(\"data/firstorder.png\");\n\n\t\t// TODO: create a new perspective camera with a field-of-view of around 70,\n\t\t// and the width and height found in the Gdx.graphics class\n\t\t// set the position of the camera to (100, 100, 100)\n\t\t// set the camera to look at the origin point (0, 0, 0)\n\t\t// set the near and far planes of the camera to 1 and 300\n\t\t// update the camera\n\t\tint width = Gdx.graphics.getWidth();\n\t\tint height = Gdx.graphics.getHeight();\n\t\tcam = new PerspectiveCamera(70f, width, height);\n\t\tcam.position.set(100f,100f,100f);\n\t\tcam.lookAt(0f, 0f, 0f);\n\t\tcam.near = 1f;\n\t\tcam.far = 300f;\n\t\tcam.update();\n\n\t\tbackgroundMusic = Gdx.audio.newMusic(Gdx.files.internal(\"data/StarWarsMusicTheme.mp3\"));\n\t\tbackgroundMusic.setLooping(true);\n\t\tbackgroundMusic.play();\n\n\t\t// create a new model loader\n\t\tfinal ModelLoader modelLoader = new ObjLoader();\n\n\t\t// TODO: load the internal file \"data/stormtrooper.obj\" into the model variable\n\t\tmodel = modelLoader.loadModel(Gdx.files.internal(\"data/stormtrooper_unwrapped.obj\"));\n\n\t\t// TODO: create a new model instance and scale it to 20% it's original size (it's huge...)\n\t\tinstance = new ModelInstance(model); // ← our model instance is here\n\t\tinstance.transform.scale(0.2f, 0.2f, 0.2f);\n\n\t\t// TODO: set the helmet details material to a new diffuse black color attribute\n\n\t\tgetHelmetDetails().material = new Material(ColorAttribute.createDiffuse(Color.BLACK));\n\t\tgetHelmetMoreDetails().material = new Material(ColorAttribute.createDiffuse(Color.DARK_GRAY));\n\t\tgetHelmetBase().material = new Material(ColorAttribute.createDiffuse(Color.WHITE));\n\n\t\t// set the input processor to work with our custom input:\n\t\t// clicking the image in the lower right should change the colors of the helmets\n\t\t// bonus points: implement your own GestureDetector and an input processor based on it\n\t\tGdx.app.log(\"instance node size\", \"\"+String.valueOf(instance.nodes.size));\n\n\n\t\tGdx.input.setInputProcessor(new FirstOrderInputProcessor(cam, new Runnable() {\n\t\t\tprivate Texture camouflage = new Texture(\"data/camouflage.png\");\n\t\t\tprivate Texture paper = new Texture(\"data/paper.png\");\n\t\t\tprivate Texture hive = new Texture(\"data/hive.png\");\n\t\t\tprivate Texture strips = new Texture(\"data/strip.png\");\n\t\t\tprivate Texture grass = new Texture(\"data/grass.jpeg\");\n\t\t\tpublic void run() {\n\t\t\t\t// TODO: change the helmet details material to a new diffuse random color\n\n\t\t\t\tgetHelmetDetails().material = getRandomMaterial();\n\t\t\t\tgetHelmetMoreDetails().material = getRandomMaterial();\n\n\t\t\t\t// bonus points:\n\t\t\t\t// randomly change the material of the helmet base to a texture\n\t\t\t\t// from the files aloha.png and camouflage.png (or add your own!)\n\t\t\t\tgetHelmetBase().material = getRandomMaterial();\n\t\t\t\tsetRandomLight();\n\n\t\t\t}\n\n\t\t\tprivate Material getRandomMaterial() {\n\t\t\t\tint rand = (int) (MathUtils.random() * 100) % 8;\n\t\t\t\tGdx.app.log(\"Random\", \"\" + rand);\n\n\t\t\t\t//Texture aloha = new Texture(\"data/aloha.png\");\n\t\t\t\tMaterial randMaterial = null;\n\n\t\t\t\tswitch (rand) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createReflection(Color.WHITE));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(paper));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(hive));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(camouflage));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createDiffuse(getRandomColor()));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(strips));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(grass));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn randMaterial;\n\t\t\t}\n\t\t}));\n\t}", "private ModelInstance newText(String text)\n {\n BufferedImage onePixelImage = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\n Graphics2D awtGraphics2D = onePixelImage.createGraphics();\n awtGraphics2D.setFont(awtFont != null ? awtFont : DEFAULT_FONT);\n FontMetrics awtFontMetrics = awtGraphics2D.getFontMetrics();\n int textWidthPixels = text.isEmpty() ? 1 : awtFontMetrics.stringWidth(text);\n int textHeightPixels = awtFontMetrics.getHeight();\n awtGraphics2D.dispose();\n\n // Create image for use in texture\n BufferedImage bufferedImageRGBA8 = new BufferedImage(textWidthPixels, textHeightPixels, BufferedImage.TYPE_INT_ARGB);\n awtGraphics2D = bufferedImageRGBA8.createGraphics();\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION, RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING, RenderingHints.VALUE_COLOR_RENDER_QUALITY);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n awtGraphics2D.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);\n awtGraphics2D.setFont(awtFont != null ? awtFont : DEFAULT_FONT);\n awtFontMetrics = awtGraphics2D.getFontMetrics();\n awtGraphics2D.setColor(awtColor);\n int x = 0;\n int y = awtFontMetrics.getAscent();\n if (!text.isEmpty())\n awtGraphics2D.drawString(text, x, y);\n awtGraphics2D.dispose();\n\n Pixmap pixmap = new Pixmap(textWidthPixels, textHeightPixels, Pixmap.Format.RGBA8888);\n BytePointer rgba8888BytePointer = new BytePointer(pixmap.getPixels());\n DataBuffer dataBuffer = bufferedImageRGBA8.getRaster().getDataBuffer();\n for (int i = 0; i < dataBuffer.getSize(); i++)\n {\n rgba8888BytePointer.putInt(i * Integer.BYTES, dataBuffer.getElem(i));\n }\n\n Texture libGDXTexture = new Texture(new PixmapTextureData(pixmap, null, false, false));\n Material material = new Material(TextureAttribute.createDiffuse(libGDXTexture),\n ColorAttribute.createSpecular(1, 1, 1, 1),\n new BlendingAttribute(GL41.GL_SRC_ALPHA, GL41.GL_ONE_MINUS_SRC_ALPHA));\n long attributes = VertexAttributes.Usage.Position | VertexAttributes.Usage.Normal | VertexAttributes.Usage.TextureCoordinates;\n\n float textWidthMeters = textHeightMeters * (float) textWidthPixels / (float) textHeightPixels;\n\n float x00 = 0.0f;\n float y00 = 0.0f;\n float z00 = 0.0f;\n float x10 = textWidthMeters;\n float y10 = 0.0f;\n float z10 = 0.0f;\n float x11 = textWidthMeters;\n float y11 = textHeightMeters;\n float z11 = 0.0f;\n float x01 = 0.0f;\n float y01 = textHeightMeters;\n float z01 = 0.0f;\n float normalX = 0.0f;\n float normalY = 0.0f;\n float normalZ = 1.0f;\n Model model = modelBuilder.createRect(x00, y00, z00, x10, y10, z10, x11, y11, z11, x01, y01, z01, normalX, normalY, normalZ, material, attributes);\n return new ModelInstance(model);\n }", "public void GoombaInit(double x, double y) {\n\t\tGoomba = new Entity(x, y, 25, 25, Id.enemy, goombaGImage);\n\t\tPhysics.addMovable(Goomba);\n\t\tGoomba.yVel = 0;\n\t\tGoomba.xVel = Goomba.xVelMax = 2;\n\t\tGoomba.yVelMax = 10;\n\t\tGoomba.xDirection = Goomba.yDirection = Goomba.lastDirection = \"\";\n\t}", "public Bomb(int x, int y){\r\n\t\t\r\n\t\t//Bomb image.\r\n\t\tImageIcon bombIMG = new ImageIcon(\"src/sprites/bullet9.png\");\r\n\t\tsetImage(bombIMG.getImage());\r\n\t\t\r\n\t\t//It just so works out that the bombs drop nicely from the alien sprite so no offset is needed.\r\n\t\tsetx(x);\r\n\t\tsety(y);\r\n\t\t\r\n\t}", "public Asteroid()\r\n\t{\r\n\t\tsuper.setDirection(rn.nextInt(360));\r\n\t\tsuper.setSpeed(rn.nextInt(100));\r\n\t\tsuper.setLocalX(rn.nextFloat() * 1024);\r\n\t\tsuper.setLocalY(rn.nextFloat() * 786);\r\n\t\tsuper.setColor(250);\r\n\t\tsize = rn.nextInt(10);\r\n\t\t\r\n\t}", "public Enemy01(Resources res, float x, float y) {\n this.x = x;\n this.y = y;\n enemy = BitmapFactory.decodeResource(res, R.mipmap.enemy01);\n curImage = enemy;\n width = curImage.getWidth();\n height = curImage.getHeight();\n dpi = res.getDisplayMetrics().densityDpi;\n screenHeight = res.getDisplayMetrics().heightPixels;\n screenWidth = res.getDisplayMetrics().widthPixels;\n }", "public BalaEnemiga(int x, int y, String s) {\r\n super(x, y,\"BalaEnemiga.png\");\r\n this.hit=true;\r\n }", "@Override\n public TileEntity createNewTileEntity(World world) {\n return new TileEntityAscender();\n }", "public Generator(int x, int y, int length){\r\n super(x, y, length, 30);\r\n setOn(true);\r\n try{setImage(ImageIO.read(new File(\"Resources/Blocks/grey.png\")));}catch(IOException e){e.printStackTrace();}\r\n }", "public CrabWorld()\n {\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n musica=new GreenfootSound(\"Ufo-t-balt.mp3\");\n super(560,560, 1);\n }" ]
[ "0.6231413", "0.59839606", "0.5860701", "0.58597493", "0.5782398", "0.56838816", "0.56544685", "0.5620635", "0.5618302", "0.56175494", "0.5591217", "0.5588645", "0.558772", "0.55831265", "0.5573876", "0.5562705", "0.5516441", "0.5513396", "0.55104643", "0.5501327", "0.5480439", "0.5469482", "0.5454046", "0.54459476", "0.54440737", "0.54306394", "0.54295367", "0.54258543", "0.5420754", "0.5411699", "0.54020756", "0.53945726", "0.53809315", "0.5376453", "0.5367575", "0.5351982", "0.5317453", "0.5309032", "0.5305108", "0.53049654", "0.52968514", "0.52964854", "0.52881044", "0.52860683", "0.52851534", "0.528276", "0.5280059", "0.5271741", "0.52653176", "0.52643824", "0.525772", "0.5255476", "0.5253106", "0.5251687", "0.5249227", "0.5241571", "0.5222914", "0.52071697", "0.52052677", "0.51942474", "0.51924735", "0.5187036", "0.51855403", "0.51830536", "0.51821625", "0.5178352", "0.5176057", "0.5175662", "0.51733816", "0.5166895", "0.51635355", "0.5162315", "0.5162279", "0.51536065", "0.5147719", "0.5144125", "0.51439637", "0.51350826", "0.51319987", "0.5130372", "0.5129936", "0.51219183", "0.5121013", "0.5120553", "0.5117694", "0.51120985", "0.5108709", "0.51081187", "0.5101904", "0.5101615", "0.51015145", "0.5098527", "0.50941455", "0.5091746", "0.5091387", "0.50905776", "0.5088661", "0.5082325", "0.50796425", "0.5077173" ]
0.7175734
0
Construct a AIBoat object at point (x,y) with default size and default texture.
public AIBoat(int x, int y) { super(x, y); initialise(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AIBoat(int x, int y, String texture_path) {\n super(x, y, texture_path);\n\n initialise();\n }", "public Bout()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n CreaBoutique();\n\n }", "public Asteroid(String textureFileName, float x, float y, int sizeX, int sizeY){\r\n super(textureFileName, x, y, sizeX, sizeY);\r\n rotationNumber = randomRotation();\r\n setRotation(rotationNumber);\r\n getSprite().setOriginCenter();\r\n }", "Actor(int x, int y, Texture image) {\n this.setX(x);\n this.setY(y);\n setImage(image);\n }", "public Entity(int x, int y){\n \t\tlocation = new Point(x,y);\n \t\twidth = 0;\n\t\theight = 0;\n\t\timage = null;\n\t\t\n\t\tvisible = false;\n \t}", "GameObject(int x, int y){\n loadSprite();\n this.x = x;\n this.y = y;\n }", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "public void GoombaInit(double x, double y) {\n\t\tGoomba = new Entity(x, y, 25, 25, Id.enemy, goombaGImage);\n\t\tPhysics.addMovable(Goomba);\n\t\tGoomba.yVel = 0;\n\t\tGoomba.xVel = Goomba.xVelMax = 2;\n\t\tGoomba.yVelMax = 10;\n\t\tGoomba.xDirection = Goomba.yDirection = Goomba.lastDirection = \"\";\n\t}", "public Hero(int x, int y) {\r\n this.centerX = x;\r\n this.centerY = y;\r\n this.currentHealth = 100;\r\n rect1 = new FloatRect (100,630,80,110);\r\n imgTexture = new Texture ();\r\n try {\r\n imgTexture.loadFromFile (Paths.get (ImageFile));\r\n } catch (IOException ex) {\r\n ex.printStackTrace ();\r\n }\r\n imgTexture.setSmooth (true);\r\n\r\n img = new Sprite (imgTexture);\r\n img.setOrigin (Vector2f.div (new Vector2f (imgTexture.getSize ()), 2));\r\n img.setPosition (x, y);\r\n // Store references to object and key methods\r\n obj = img;\r\n setPosition = img::setPosition;\r\n\r\n background = new Sprite (bg.loadTextures ());\r\n background.setOrigin(Vector2f.div(new Vector2f(bg.getTexture1 ()), 1000000));\r\n background.setPosition (0,0);\r\n }", "public Asteroid () {\n\t\tImage asteroid = new Image(getClass().getClassLoader().getResourceAsStream(\"asteroid.png\"));\n\t\timage = new ImageView(asteroid);\n\t\tsetX(Math.random() * (Main.SIZEX - this.getXSize()));\n\t\tsetY(0);\n\t\tvelocityY = -45;\n\t\tvelocityX = 0;\n\t}", "public Boat() {\n batch = new SpriteBatch();\n }", "public Bomb(int x, int y){\r\n\t\t\r\n\t\t//Bomb image.\r\n\t\tImageIcon bombIMG = new ImageIcon(\"src/sprites/bullet9.png\");\r\n\t\tsetImage(bombIMG.getImage());\r\n\t\t\r\n\t\t//It just so works out that the bombs drop nicely from the alien sprite so no offset is needed.\r\n\t\tsetx(x);\r\n\t\tsety(y);\r\n\t\t\r\n\t}", "Sprite(float x, float y, float w, float h) {\n _img = createImage(1, 1, RGB);\n _x = x;\n _y = y;\n _w = w;\n _h = h;\n _rotVector = new PVector(1, 0, 0);\n resetRectHitbox();\n }", "public Ant(){ // The position and direction of the ant is completely randomizated in it's creation\n this.position[0] = (int)Math.floor(Math.random() * 20); \n this.position[1] = (int)Math.floor(Math.random() * 20);\n this.image = (int)Math.floor(Math.random() * 4);\n }", "public Asteroid(int x, int y) {\r\n super(x, y);\r\n speed = 1;\r\n initialY = y;\r\n initAsteroid();\r\n }", "protected GameObject(double x, double y, double xSize, double ySize, ID id) {\n\t\tthis.pos = new Point2D(x, y);\n\t\tthis.body = new Rectangle2D.Double(pos.getX(), pos.getY(), xSize, ySize);\n\t\tthis.id = id;\n\t}", "BasicObject(){\n posX = -1;\n posY = -1;\n velX = 0;\n velY = 0;\n accX = 0;\n accY = 0;\n classOfObejct = 0;\n }", "public Ogre(int x, int y) {\r\n\t\tsuper(\"resources/ogre.gif\", x, y);\r\n\t}", "public Texture() {\n }", "public PantallaVictoria()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(400, 600, 1); \n prepare();\n }", "public SmallAsteroid(int angle, int x, int y,FloatBuffer vertexBuffer)\n {\n super(angle, x, y,vertexBuffer);\n this.index = 16;\n this.radius /= 4;\n this.width = 13;\n this.height = 13;\n }", "public wall() { //default constructor makes a 10x10 square extending right and down from the pixel located at 5,5\r\n x = 5;\r\n y = 5;\r\n height = 10;\r\n width = 10;\r\n }", "public Ninja(int x, int y)\r\n {\r\n super(x, y, 5);\r\n }", "public Bat(TutorialWorld world) {\n\t super(new Sprite(TutorialWorld.MEDIA_URL.concat(\"bat.gif\")), speed); \n\t }", "private void initialize() {\n //Asteroid Shape (8 sided)\n polygon = new Vector2f[]{new Vector2f(400, -800), new Vector2f(-400, -800), new Vector2f(-800, -400),\n new Vector2f(-800, 400), new Vector2f(-400, 800), new Vector2f(400, 800), new Vector2f(800, 400), new Vector2f(800, -400)};\n //Translation variables\n this.tx = spawnX;\n this.ty = spawnY; //Start above screen to gain momentum\n this.velocity = new Vector2f();\n\n //World initialize\n this.world = new Matrix3x3f();\n\n }", "public AbstractGameObject(Level linksTo, int atX, int atY) {\n level = linksTo;\n xPosition = atX;\n yPosition = atY;\n }", "public Bomba(Bitmap bitmap, int x, int y) {\n\t\tthis.bitmap = bitmap;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\n\t}", "public Asteroid()\r\n\t{\r\n\t\tsuper.setDirection(rn.nextInt(360));\r\n\t\tsuper.setSpeed(rn.nextInt(100));\r\n\t\tsuper.setLocalX(rn.nextFloat() * 1024);\r\n\t\tsuper.setLocalY(rn.nextFloat() * 786);\r\n\t\tsuper.setColor(250);\r\n\t\tsize = rn.nextInt(10);\r\n\t\t\r\n\t}", "public Cow(int x, int y) {\n\t\tsuper(x, y);\n\t\tloadImages();\n\t}", "public Actor(ActorType type, double x, double y) {\n this.location = new Location(x, y);\n this.type = type;\n setImage(type);\n }", "public Ocean()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n BF bf = new BF();\n addObject(bf,500,300);\n SF sf = new SF();\n addObject(sf,100,300);\n }", "Block create(int xpos, int ypos);", "public Box(int x, int y) {\r\n\t\tsuper(x,y);\r\n\t\tloadImage(\"box.png\");\r\n\t\tgetImageDimensions();\r\n\t}", "public void init(ALIEN_TYPE type, float x, float y){\n\t\tthis.type = type;\n\t\tthis.visible = true;\n\t\t\n\t\tvelAngle = 0;\n\t\t\n\t\tspeed = (type.MAX_SPEED-type.MIN_SPEED)*Krakjam.rand.nextFloat()+type.MIN_SPEED;\n\t\tsprite.setRegion(type.sides[0]);\n\t\tsprite.setSize(type.WIDTH, type.HEIGHT);\n\t\t\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\t\n\t\tthis.life = type.MAX_LIFE;\n\t\t\n\t\tsuper.init();\n\t\t\n\t\tthis.width = type.WIDTH;\n\t\tthis.height = type.HEIGHT;\n\t\t\n\t\tradius = type.RADIUS;\n\t}", "public GameObject(String name, int x, int y) {\n this.image = GameObject.processing.loadImage(\"images\" + File.separator + name + \".png\");\n this.xPosition = x;\n this.yPosition = y;\n this.active = true;\n }", "public SaboWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(counter, 100, 380); //Add the scoreboard\n addObject(healthBar, 300, 370); //Add the health bar\n addObject(turret, getWidth()/2-5, getHeight()-turret.getImage().getWidth()); \n }", "public InGameDisplay(int x, int y) {\n super(ResourceManager.getImage(\"IngameHUD.png\"), 0, 600, 1200, ALLOCATED_HEIGHT);\n healthToDraw = 1;\n maxHealthToDraw = 1;\n minesToDraw = 0;\n maxMinesToDraw = 1;\n skillsToDraw = new Skill[4];\n }", "Ball create(int xpos, int ypos);", "public Adderall(String id,\n int x,\n int y,\n Room currentRoom) {\n \n // Pass arguments to superclass\n super(id,\n x,\n y,\n currentRoom,\n // Name of item.\n \"Adderall\");\n\n // Pass path of texture to superclass.\n super.setEntityImage(adderallImage);\n }", "public Asteroid() {\n\t\t// create, seed random number\n\t\trandomNumber = new Random();\n\n\t\t// random location\n\t\tlocation = new Tuple(\n\t\t\t\t(randomNumber.nextDouble() - 0.5) * FIELD_SIZE, \n\t\t\t\t(randomNumber.nextDouble() - 0.5) * FIELD_SIZE, \n\t\t\t\t(randomNumber.nextDouble() - 0.5) * FIELD_SIZE);\n\n\t\t// random movement vector\n\t\tmovement = new Tuple(\n\t\t\t\t(randomNumber.nextDouble() - 0.5) * MAX_SPEED,\n\t\t\t\t(randomNumber.nextDouble() - 0.5) * MAX_SPEED, \n\t\t\t\t(randomNumber.nextDouble() - 0.5) * MAX_SPEED);\n\t\t\n\t\t// random radius\n\t\tsize = randomNumber.nextInt() % 20 + 1;\n\t\t\n\t\t// create Sphere\n\t\tsphere = new Sphere(size, location);\n\n\t}", "Oval(int width, int height, int x, int y){\n setWidth(width);\n setHeight(height);\n setX(x);\n setY(y);\n }", "public Hobbit(int x, int y) {\n\t\tthis(x, y, GameConstants.HOBBIT_HEALTH, GameConstants.HOBBIT_DAMAGE);\n\t\trewardMana = GameConstants.HOBBIT_REWARD;\n\t\ttryLoad(new File(\"resources/images/hobbit_16p.png\"));\n\t}", "public Bombas(int x,int y) {\n \tsuper(x,y);\n }", "public Sprite() {}", "@Override\n\tprotected void init() {\n\t\tsuper.init();\n\t\tisAnchorPointForPosition = true;\n\t\tsetContentSize(Screen.GAME_W, Screen.GAME_H);\n\t\tsetAnchor(Graphics.HCENTER | Graphics.VCENTER);\n\t}", "public Shape(int x, int y) {\n\t\tthis(x, y, DEFAULT_DELTA_X, DEFAULT_DELTA_Y, DEFAULT_WIDTH, DEFAULT_HEIGHT);\n\t}", "public AGG_GuidePacket( int i, double x, double y )\n {\n xPixel = x;\n yPixel = y;\n }", "public void init(Map<String, String> attributes) {\r\n\r\n\t\tif (attributes.containsKey(\"p0\"))\r\n\t\t\tp0 = new Vec(attributes.get(\"p0\"));\r\n\t\tif (attributes.containsKey(\"p1\"))\r\n\t\t\tp1 = new Vec(attributes.get(\"p1\"));\r\n\t\tif (attributes.containsKey(\"p2\"))\r\n\t\t\tp2 = new Vec(attributes.get(\"p2\"));\r\n\t\tif (attributes.containsKey(\"p3\"))\r\n\t\t\tp3 = new Vec(attributes.get(\"p3\"));\r\n\r\n\t\tp4 = Vec.add(Vec.add(Vec.sub(p1, p0), Vec.sub(p3, p0)), p0);\r\n\t\tp5 = Vec.add(Vec.add(Vec.sub(p2, p0), Vec.sub(p3, p0)), p0);\r\n\t\tp6 = Vec.add(Vec.add(Vec.sub(p5, p3), Vec.sub(p4, p3)), p3);\r\n\r\n\t\tbase = new Rectangle(p0, p1, p3, attributes);\r\n\t\tfacep0p2p1 = new Rectangle(p0, p2, p1, attributes);\r\n\t\tfacep0p2p3 = new Rectangle(p0, p2, p3, attributes);\r\n\t\tfacep3p4p5 = new Rectangle(p3, p5, p4, attributes);\r\n\t\tfacep4p1p6 = new Rectangle(p4, p1, p6, attributes);\r\n\t\ttop = new Rectangle(p5, p2, p6, attributes);\r\n\r\n\t\tsuper.init(attributes);\r\n\t}", "public DoorTile(int x, int y) {\r\n\t\tsuper(\"resources/door.gif\", x, y);\r\n\t}", "public salida()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(600, 400, 1); \r\n }", "public void init(int x, int y, ILevel level);", "public Stage1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 900, 1);\n \n GreenfootImage image = getBackground();\n image.setColor(Color.BLACK);\n image.fill();\n star();\n \n \n \n //TurretBase turretBase = new TurretBase();\n playerShip = new PlayerShip();\n scoreDisplay = new ScoreDisplay();\n addObject(scoreDisplay, 100, 50);\n addObject(playerShip, 100, 450);\n \n }", "public void init(float x, float y) {\n\t\tthis.position.set(x, y);\r\n\t\tthis.oriPosition.set(x, y);\r\n\t\talive = true;\r\n\t}", "public Shape() {\n\t\tthis(DEFAULT_X_POS, DEFAULT_Y_POS, DEFAULT_DELTA_X, DEFAULT_DELTA_Y, DEFAULT_WIDTH, DEFAULT_HEIGHT);\n\t}", "public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }", "public Enemy01(Resources res, float x, float y) {\n this.x = x;\n this.y = y;\n enemy = BitmapFactory.decodeResource(res, R.mipmap.enemy01);\n curImage = enemy;\n width = curImage.getWidth();\n height = curImage.getHeight();\n dpi = res.getDisplayMetrics().densityDpi;\n screenHeight = res.getDisplayMetrics().heightPixels;\n screenWidth = res.getDisplayMetrics().widthPixels;\n }", "public Key(int x, int y){\n\t\tsetBounds(x, y, WIDTH, HEIGHT);\n\t\ttry {\n\t\t\timg = ImageIO.read(new File(\"images/key.png\"));\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public MTImage(PApplet pApplet, PImage texture) {\n super(pApplet, -7, -7, texture.width + 14, texture.height + 14);\n\n image = new MTRectangle(pApplet, texture);\n image.setStrokeColor(new MTColor(255, 255, 255, 255));\n image.setPickable(false);\n this.addChild(image);\n\n //Draw this component and its children above\n //everything previously drawn and avoid z-fighting\n this.setDepthBufferDisabled(true);\n }", "public Point()\n\t{ \n\t\t// Instantiate default properties\n\t\tx = 0;\n\t\ty = 0;\n\t}", "public Image()\r\n {\r\n super();\r\n setBounds( 0, 0, 10, 10 );\r\n }", "Enemy(int x, int y, Bitmap image) {\n super(x, y, image);\n }", "Polymorph(int x, int y, int height, int width){\n \t this.x = x;\n \t this.y = y;\n \t this.height = height;\n \t this.width = width;\n }", "@Override\n protected void initGame() {\n\n// entityBuilder()\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(getAppWidth() - 64, getAppHeight() - 64)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .buildAndAttach();\n//\n// entityBuilder()\n// .at(0, getAppHeight() / 2 - 32)\n// .view(new Rectangle(64, 64, Color.BLUE))\n// .with(new ProjectileComponent(new Point2D(1, 0), 150))\n// .buildAndAttach();\n }", "public Entity() {\n this.position = new Point(0,0);\n realX=0;\n realY=0;\n }", "public Mountain(int x, int y, double scale, GWindow window) {\r\n\t\t// Initialize the instance fields\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\toriginaly = bottom;\r\n\t\tthis.window = window;\r\n\t\tthis.scale = scale;\r\n\t\tmountainSize = (int) (this.scale * 100);\r\n\t\tside1 = this.x + mountainSize / 8;\r\n\t\tside2 = this.x + (mountainSize / 8) * 3;\r\n\t\tthis.direction = OUT;\r\n\r\n\t\t// Draw the boat\r\n\t\tthis.draw();\r\n\t}", "Sprite(String url, float x, float y, float w, float h) {\n _img = loadImage(url);\n _x = x;\n _y = y;\n _w = w;\n _h = h;\n _rotVector = new PVector(1, 0, 0);\n resetRectHitbox();\n }", "public OverWorld()\n { \n // Create a new world with 800x600 cells with a cell size of 1x1 pixels.\n super(1024, 600, 1, false);\n Setup();\n }", "public Rectangle() {\n this(50, 40);\n }", "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "public Titik(){\r\n this.x = 0;\r\n this.y = 0;\r\n }", "public JewelSprite(int type, int x, int y) {\n\t this.type = type;\n\t setxPos(x);\n\t setyPos(y);\n\n\t String imagePath = \"/\" + Integer.toString(type) + \".png\";\n\t jewelImage = new Image(Jewel.class.getResourceAsStream(imagePath));\n\t ImageView jewelImageView = new ImageView();\n\t jewelImageView.setImage(jewelImage);\n\t jewelImageView.setStyle(\"-fx-background-color:transparent;\");\n\n\t setNode(jewelImageView);\n\t }", "public AbstractGameObject(Level linksTo, Point at) {\n level = linksTo;\n xPosition = at.x;\n yPosition = at.y;\n }", "Coordinate createCoordinate();", "Rectangle(){\n height = 1;\n width = 1;\n }", "public Ship(float x, float y) {\r\n\t\tthis.bounds = new Rectangle(x, y, width, height);\r\n\t}", "public BoundingBox()\n\t{\n\t\tcenter = new Vector2(0.0, 0.0);\n\t\twidth = 1.0;\n\t\theight = 1.0;\n\t}", "private void initialiseRobotImage(int x, int y) {\r\n\t\trobotImage = new RobotImageComponent(Constant.ROBOTIMAGEPATHS[this.getDirection()], Constant.ROBOTWIDTH, Constant.ROBOTHEIGHT);\r\n\t\tframe.add(robotImage);\r\n\t\trobotImage.setLocation(Constant.MARGINLEFT + (Constant.GRIDWIDTH * 3 - Constant.ROBOTWIDTH)/2 + (x-1) * Constant.GRIDWIDTH, Constant.MARGINTOP + (Constant.GRIDHEIGHT * 3 - Constant.ROBOTHEIGHT)/2 + (y-1) * Constant.GRIDHEIGHT);\r\n\t}", "@Override\r\n\tpublic void create() {\n\t\tbatch = new SpriteBatch();\r\n\t\tcamera = new OrthographicCamera();\r\n\t\tassets = new AssetManager();\r\n\t\t\r\n\t\tcamera.setToOrtho(false,WIDTH,HEIGHT);\r\n\t\t\r\n\t\tTexture.setAssetManager(assets);\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tsetScreen(new SplashScreen(this));\r\n\t}", "public Food(int x, int y) {\n\t\tsuper(\"FOOD.png\",x,y);\n\t}", "public AiBar(int x, int y, GameManager gm, Color color){\n\t\tsuper(x, y, gm, color);\n\t\try0 = (double) height / 100 * ((100 - rangePercent)/2);\n\t\try1 = (double) height / 100 * rangePercent + ry0;\n\t\tballx = 0;\n\t\tbally = gm.h;\n\t}", "public Bomb(int x, int y) {\n\t\tsuper(x, y);\n\t\tthis.state = new Spawned();\n\t\tthis.visualStatus = new SimpleIntegerProperty(0);\n\t}", "private void\nsetUpDefaultCoordSpace(SoAction action)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoNode tail = action.getCurPathTail();\n//#ifdef DEBUG\n// if (!tail->isOfType(SoShape::getClassTypeId())) {\n// SoDebugError::post(\n// \"SoTextureCoordinateBundle::setUpDefaultCoordSpace\",\n// \"Tail of path is not a shape node!\");\n// }\n//#endif\n SoShape shape = (SoShape )tail;\n\n final SbBox3f box = new SbBox3f();\n final SbVec3f center = new SbVec3f();\n shape.computeBBox(action, box, center);\n\n final SbVec3f min = box.getMin();\n final SbVec3f boxSize = box.getMax().operator_minus(min);\n\n // Look for the largest two dimensions of the box\n if (boxSize.getValueRead()[0] > boxSize.getValueRead()[1] && boxSize.getValueRead()[0] > boxSize.getValueRead()[2]) {\n coordS = 0;\n coordT = boxSize.getValueRead()[1] > boxSize.getValueRead()[2] ? 1 : 2;\n }\n else if (boxSize.getValueRead()[1] > boxSize.getValueRead()[2]) {\n coordS = 1;\n coordT = boxSize.getValueRead()[0] > boxSize.getValueRead()[2] ? 0 : 2;\n }\n else {\n coordS = 2;\n coordT = boxSize.getValueRead()[0] > boxSize.getValueRead()[1] ? 0 : 1;\n }\n\n // Set up vectors for S and T coordinates. The length of the\n // vectors should be the size of the box in that dimension. Since\n // we want the texture to remain square, we use the same length\n // for both dimensions.\n float tmp = 1.0f / boxSize.getValueRead()[coordS];\n sVector.setValue(0.0f, 0.0f, 0.0f, -min.getValueRead()[coordS] * tmp);\n tVector.setValue(0.0f, 0.0f, 0.0f, -min.getValueRead()[coordT] * tmp);\n sVector.getValue()[coordS] = tVector.getValue()[coordT] = tmp;\n}", "Item(int x, int y) {\n this.posX = x;\n this.posY = y;\n }", "public ClassTester()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1);\n addObject(new NonScrollingBackground(\"Stage - 0.jpg\"),300,131);\n addObject(playerMage,35,170);\n addObject(new AbilityDisplayer(playerMage),125,268);\n }", "protected GameObject(double x, double y, Sprite[] images, double axi, double vxi, double vxmax, Program program) {\n\t\tassert(isValidX(x));\n\t\tassert(isValidX(y));\n\t\tassert((program == null) || !(this instanceof Mazub) || (this instanceof Buzam));\n\t\t\n\t\tsetX(x);\n\t\tsetY(y);\n\t\tthis.images = images;\n\t\tthis.axi = axi;\n\t\tthis.vxi = vxi;\n\t\tsetVxmax(vxmax);\n\t\tthis.program = program;\n\t\t\n\t\tsetVx(0);\n\t\tsetVy(0);\n\t\tsetAx(0);\n\t\tsetAy(0);\n\t\tsetHitpoints(100);\n\t}", "public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1000, 600, 1);\n planets();\n stars();\n }", "public Asteroid() {\n setShape(new Polygon(astx, asty, astx.length));\n setAlive(true);\n setColor(new Color(160, 82, 45));\n }", "public Entity( int x, int y){\n this.x = x;\n this.y = y;\n }", "Rectangle()\n {\n this(1.0,1.0);\n }", "public Shape()\n {\n this(Anchor.CENTER.anchoredAt(Anchor.CENTER.ofView()).sized(100, 100));\n }", "public zombie_bg()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1010,900, 1); \n setPaintOrder(ScoreBoard.class, player.class, zomb_gen.class, options.class);\n populate();\n \n }", "private Alien spawnAlien() {\n Float[] offset = Util.randomCoordOffset(-((float)Util.TILEWIDTH/2), ((float)Util.TILEWIDTH/2), 0.8f);\n return new Alien(new Coordinate(position.x + (Util.TILEWIDTH/2) + offset[0], position.y + (Util.TILEHEIGHT/2) + offset[1]), this);\n }", "AREA createAREA();", "public Bathroom(int size) {\n this.size = size;\n myBathtub = new Bathtub(100); //instantiate bathtub object during Bathroom object creation\n }", "public Block() {\n this.xPos = 0;\n this.yPos = 0;\n this.width = 0;\n this.height = 0;\n this.color = Color.MINTCREAM;\n }", "public Cenario1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(900, 600, 1);\n adicionar();\n \n }", "public PaperAirplane (int x, int y)\n\t{\n\t\tsuper (x, y);\t//Superclass called to set x and y\n\t\t\n\t\txPoints = new int [3];\t//sets xPoints to have 3 elements\n\t\tyPoints = new int [3];\t//sets yPoints to have 3 elements\n\t\t\n\t\t//Using the getX_Pos () set in the superclass, the following sets the\n\t\t//xDimensions.\n\t\txDimension1 = getX_Pos () - 23;\n\t\txDimension2 = getX_Pos () - 18;\n\t\txDimension3 = getX_Pos () + 22;\n\t\t\n\t\t//Using the getY_Pos () set in the superclass, the following sets the\n\t\t//yDimensions.\n\t\tyDimension1 = getY_Pos() - 2;\n\t\tyDimension2 = getY_Pos() - 17;\n\t\tyDimension3 = getY_Pos() + 5;\n\t\t\n\t\t//The following sets the same dimensions from above, but these never\n\t\t//change and can be used for reconstruction\n\t\trXD1 = getX_Pos () - 23;\n\t\trXD2 = getX_Pos () - 18;\n\t\trXD3 = getX_Pos () + 22;\n\t\trYD1 = getY_Pos() - 2;\n\t\trYD2 = getY_Pos() - 17;\n\t\trYD3 = getY_Pos() + 5;\n\t}", "public Actor(double topLeftX, double topLeftY, double width, double height,\n double mass, boolean grav, Image texture, int hp) {\n this.addComponent(new PhysicsComponent(topLeftX, topLeftY, width, height, mass, grav)); //physics\n this.addComponent(new VisualTextureComponent(texture, new Rectangle(0, 0, 1, 1))); //texture\n this.addComponent(new HpComponent(hp)); //hp\n }", "public Cowboy(int initialX, int initialY) throws Exception {\n super(Image.createImage(\"/images/cowboy.png\"), WIDTH, HEIGHT);\n myInitialX = initialX;\n myInitialY = initialY;\n // we define the reference pixel to be in the middle\n // of the cowboy image so that when the cowboy turns\n // from right to left (and vice versa) he does not\n // appear to move to a different location.\n defineReferencePixel(WIDTH / 2, 0);\n setRefPixelPosition(myInitialX, myInitialY);\n setFrameSequence(FRAME_SEQUENCE);\n }", "public City(){\n this.x = (int)(Math.random()*200);\n this.y = (int)(Math.random()*200);\n }" ]
[ "0.75313604", "0.5964946", "0.58722997", "0.58580905", "0.5848522", "0.5809989", "0.5754429", "0.5740117", "0.5735165", "0.5712868", "0.5638827", "0.55977005", "0.5587751", "0.5550365", "0.55253726", "0.5517721", "0.5497709", "0.5477412", "0.54716605", "0.5451162", "0.5447489", "0.5429566", "0.5426542", "0.5414898", "0.5410513", "0.54074013", "0.5394543", "0.53823847", "0.5381994", "0.5377668", "0.5376395", "0.5370956", "0.5359958", "0.5358128", "0.53576195", "0.53529155", "0.5338057", "0.53324", "0.5332213", "0.53164786", "0.53015226", "0.528879", "0.5272345", "0.52701974", "0.52644724", "0.52504474", "0.524631", "0.523603", "0.52315855", "0.5228889", "0.5224138", "0.52204883", "0.5218607", "0.5213608", "0.52088267", "0.52081907", "0.5207644", "0.51984686", "0.5195531", "0.5193023", "0.5182361", "0.5174942", "0.51718086", "0.51669145", "0.5164928", "0.5158624", "0.515794", "0.5156882", "0.51568496", "0.51502377", "0.5150036", "0.5142837", "0.5141348", "0.5139446", "0.5139179", "0.51359713", "0.513592", "0.513534", "0.5129902", "0.51276296", "0.51236135", "0.5120859", "0.5117675", "0.5117581", "0.5114984", "0.51144487", "0.51112175", "0.51104504", "0.51103115", "0.5110118", "0.5109627", "0.51043844", "0.5102589", "0.50944656", "0.50927913", "0.5090482", "0.5089668", "0.5087798", "0.50806415", "0.5080073" ]
0.6889614
1
End of modified block of code for assessment 2 Shared initialisation functionality among all constructors. Initialises the ray properties. Rays are used to help the AI control the boat based on visual feedback of its environment i.e. obstacles such as movable obstacles and static lane wall obstacles.
public void initialise() { number_of_rays = 4; // how many rays are fired from the boat ray_angle_range = 145; // the range of the angles that the boat will fire rays out at ray_range = 30; // the range of each ray ray_step_size = (float) 10; regen = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initializeObliqueLaunch(){\r\n world = new Environment();\r\n cannon = new Thrower();\r\n ball = new Projectile();\r\n this.setInitialValues();\r\n }", "private void initialize() {\n //Asteroid Shape (8 sided)\n polygon = new Vector2f[]{new Vector2f(400, -800), new Vector2f(-400, -800), new Vector2f(-800, -400),\n new Vector2f(-800, 400), new Vector2f(-400, 800), new Vector2f(400, 800), new Vector2f(800, 400), new Vector2f(800, -400)};\n //Translation variables\n this.tx = spawnX;\n this.ty = spawnY; //Start above screen to gain momentum\n this.velocity = new Vector2f();\n\n //World initialize\n this.world = new Matrix3x3f();\n\n }", "protected void initialize() {\n \tsetShowStartScreen(false);\n \t\n \t// do not preload resources, for this very simple game\n \t// preloadResources();\n \t\n \t// Max number of balls is just 17\n \tchains.setMaxBalls(17);\n }", "protected void initialize()\n\t{\n\t\tRobot.intake.setSpeed(new double[] { leftSpeed, rightSpeed });\n\t}", "private void Initialize()\n {\n \tEcran = new Rectangle(Framework.gauche, Framework.haut, Framework.frameWidth\n\t\t\t\t- Framework.droite - Framework.gauche, Framework.frameHeight - Framework.bas\n\t\t\t\t- Framework.haut);\n\t\tCentreEcranX = (int)(Ecran.getWidth()/2);\n\t\tCentreEcranY = (int)(Ecran.getHeight()/2);\n\t\twidth = Ecran.getWidth();\n\t\theight = Ecran.getHeight();\t\t\n\t\tpH=height/768;\t\t\n\t\tpW=width/1366;\n\t\tObjets = new ArrayList<Objet>(); // Créer la liste chainée en mémoire\n\t\tMissiles = new ArrayList<Missile>(); // Créer la liste chainée en mémoire\n\t\tStations = new ArrayList<Station>(); // Créer la liste chainée en mémoire\n\t\tJoueurs = new ArrayList<Joueur>();\n\t\tlastTrajectoires = new ArrayList<Trajectoire>();\n\n\t\tDisposeAstres(Framework.niveauChoisi);\n\t\tstationCourante = Stations.get(0);\n\n\t\tetat = ETAT.PREPARATION;\n\t\tmouseClicked = mousePressed = mouseReleased = false;\n\t}", "protected void initialize() {\n Robot.m_drivetrain.resetPath();\n Robot.m_drivetrain.addPoint(0, 0);\n Robot.m_drivetrain.addPoint(3, 0);\n Robot.m_drivetrain.generatePath();\n \n\t}", "public void initialize( )\n\t{\n\t\twakeupOn( m_WakeupCondition );\n\n\t\tColor3f objColor = new Color3f( 1.0f, 0.1f, 0.2f );\n\t\tColor3f black = new Color3f( 0.0f, 0.0f, 0.0f );\n\t\tcollideMaterial = new Material( objColor, black, objColor, black, 80.0f );\n\n\t\tobjColor = new Color3f( 0.0f, 0.1f, 0.8f );\n\t\tmissMaterial = new Material( objColor, black, objColor, black, 80.0f );\n\n\t\tobjectAppearance.setMaterial( missMaterial );\n\t}", "protected void initialize() {\n\t\t// startAngle = drive.getAngle();\n\t\tdrive.resetBothEncoders();\n\t\tpLeft = speed;\n\t\tpRight = speed;\n\t}", "public void init(){\n hp = DEFAULT_MAX_HEALTH;\n bulletsFired = new ArrayList<>();\n initial_y = -1;\n\n //Sets the byte to identify the state of movement\n //For animation purposes in the renderer\n //0 = stationary\n //1 = jumping\n //2 = moving left\n //3 = jumping left\n //4 = right\n //5 = Jumping right\n //6 = crouching\n //8 = crouching left\n //10 = crouching right\n stateOfMovement = 0;\n }", "protected void initialize() {\n \tRobot.m_elevator.setSetpoint(setpoint);\n \tRobot.m_elevator.setAbsoluteTolerance(tolerance);\n \tRobot.m_elevator.setPID(.3, 0, 0);\n \tRobot.m_elevator.enable();\n }", "protected void initialize() {\n \t\n \t// TODO: Switch to execute on changes based on alignment\n \tRobot.lightingControl.set(LightingObjects.BALL_SUBSYSTEM,\n LightingControl.FUNCTION_BLINK,\n LightingControl.COLOR_ORANGE,\n 0,\t\t// nspace - don't care\n 300);\t// period_ms \n }", "protected void initialize() {\n Timer.delay(7);\n ballIntake.turnOnHorizontalConveyor();\n ballIntake.verticalConveyor.set(-.3);\n }", "public void robotInit() {\n RobotMap.init();\n initDashboardInput();\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n driveTrain = new DriveTrain();\n power = new Power();\n arm = new Arm();\n sensors = new Sensors();\n ballGrabberSubsystem = new BallGrabberSubsystem();\n winch = new Winch();\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n\n // instantiate the command used for the autonomous period\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n arcadeDrive = new ArcadeDrive();\n\n readPreferences();\n }", "protected void initialize() {\n \tRobot.driveTrain.arcade(MOVE_SPEED_PERCENT, Robot.driveTrain.gyroPReturn(direction));\n }", "public void robotInit() {\n\t\trightFront = new CANTalon(1);\n\t\tleftFront = new CANTalon(3);\n\t\trightBack = new CANTalon(2);\n\t\tleftBack = new CANTalon(4);\n\t\t\n\t\trightBack.changeControlMode(CANTalon.TalonControlMode.Follower);\n\t\tleftBack.changeControlMode(CANTalon.TalonControlMode.Follower);\n\t\t\n\t\tleftBack.set(leftFront.getDeviceID());\n\t\trightBack.set(rightFront.getDeviceID());\n\t\t\n\t\tturn = new Joystick(0);\n\t\tthrottle = new Joystick(1);\n\t}", "public void initialize() {\n // create a runner using a function\n this.createScreenBorders();\n // create a keyboard sensor.\n this.keyboard = this.runner.getGUI().getKeyboardSensor();\n //create the environment for the game (game environment and sprites collection)\n this.createEnvironment();\n // BACKGROUND CREATION //\n this.createBackground();\n // create the counters for the game.\n this.createCounters();\n // LISTENERS CREATION //\n //create a message printing listener.\n HitListener phl = new PrintingHitListener();\n //create a new block remover listener.\n HitListener blockrmv = new BlockRemover(this, blockCounter);\n //create a new ball remover listener.\n HitListener ballrmv = new BallRemover(this, ballCounter);\n //create a new score counter listener.\n HitListener scorelstn = new ScoreTrackingListener(this.scoreCounter);\n // BLOCKS CREATION //\n this.createBlocks(phl, blockrmv, scorelstn);\n // SIDE BLOCKS CREATION //\n this.createSideBlocks();\n // DEATH BLOCK CREATION //\n this.createDeathBlock(ballrmv);\n // LEVEL'S NAME //\n LevelsName name = new LevelsName(this.levelInfo.levelName());\n // add the whole-game indicators to the sprites list.\n this.sprites.addSprite(scoreIndi);\n this.sprites.addSprite(lifeIndi);\n this.sprites.addSprite(name);\n }", "public void init() {\r\n\t\t\r\n\t\tsetSize(WIDTH, HEIGHT);\r\n\t\tColor backgroundColor = new Color(60, 0, 60);\r\n\t\tsetBackground(backgroundColor);\r\n\t\tintro = new GImage(\"EvilMehranIntroGraphic.png\");\r\n\t\tintro.setLocation(0,0);\r\n\t\tadd(intro);\r\n\t\tplayMusic(new File(\"EvilMehransLairThemeMusic.wav\"));\r\n\t\tinitAnimationArray();\r\n\t\taddKeyListeners();\r\n\t\taddMouseListeners();\r\n\t\twaitForClick();\r\n\t\tbuildWorld();\r\n\t}", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized Interative TeleOp Mode\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.dcMotor.get(\"leftDrive\");\n rightDrive = hardwareMap.dcMotor.get(\"rightDrive\");\n armMotor = hardwareMap.dcMotor.get(\"armMotor\");\n\n leftGrab = hardwareMap.servo.get(\"leftGrab\");\n rightGrab = hardwareMap.servo.get(\"rightGrab\");\n colorArm = hardwareMap.servo.get(\"colorArm\");\n leftTop = hardwareMap.servo.get(\"leftTop\");\n rightTop = hardwareMap.servo.get(\"rightTop\");\n\n /*\n left and right drive = motion of robot\n armMotor = motion of arm (lifting the grippers)\n extendingArm = motion of slider (used for dropping the fake person)\n left and right grab = grippers to get the blocks\n */\n\n }", "@Override\n protected void initialize() {\n if(sClimber.PreparedToClimb == true){\n sClimber.StageOneStart();\n sClimber.StageTwoStart();\n } else {\n end();\n }\n //sIntake.WristMove(mWristAngle);\n //sElevator.setHighGear(false);\n //sElevator.setPositionLowGear(mElevatorHieght);\n }", "private void init() \n\t{\n\t\tgoalReached = false;\n\t\tGdx.input.setInputProcessor(this);\n\t\tcameraHelper = new CameraHelper();\n\t\tlives = Constants.LIVES_START;\n\t\tlivesVisual = lives;\n\t\ttimeLeftGameOverDelay = 0;\n\t\tinitLevel();\n\n\t}", "protected void initialize() {\n\t\tL.ogInit(this);\n\t\t_timesRumbled = 0;\n\t}", "protected void initialize() {\n \tRobot.driveTrain.driveMotionMagic(distanceToTravel);\n }", "public RayTracerBasic(Scene scene)\r\n\t{\r\n\t\tsuper(scene);\r\n\t}", "@Override\n protected void initialize() {\n rightTarget = this.distanceInches + Robot.driveTrain.getRightEncoderDistanceInches();\n leftTarget = this.distanceInches + Robot.driveTrain.getLeftEncoderDistanceInches();\n Robot.driveTrain.tankDrive(0, 0);\n this.direction = distanceInches > 0;\n turnPID.resetPID();\n }", "protected void initialize() {\n\t\tright = left = throttle = turn = forward = 0;\n\t}", "public RayTracer() {\n\t\tspheres = new ArrayList<Sphere>();\n\t\tspheres.add(new Sphere(-2.0f, 0.0f, -15.0f, 4.0f, 1.00f, 0.32f, 0.36f, 0.1f, 0.8f, 100.0f));\n\t\tspheres.add(new Sphere(5.0f, 5.0f, -15.0f, 2.0f, 0.00f, 0.92f, 0.36f, 0.1f, 0.8f, 100.0f));\n\t\tspheres.add(new Sphere(10.0f, -8.0f, -30.0f, 6.0f, 0.36f, 0.32f, 1.00f, 0.1f, 0.8f, 100.0f));\n\n\t\tlight = new Light(5.0f, 10.0f, 10.0f, 1.0f); // (x, y, z, intensity).\n\t\tcamera = new Camera(512, 512, 50.0f); // (width, height, fov).\n\t}", "protected void initialize() {\n Constants.frontClimbPlatformPositionSetpoint = SmartDashboard.getNumber(\"Front Climb Platform Setpoint\", Constants.frontClimbPlatformPositionSetpoint);\n\n Constants.frontClimbCommandTimeout = SmartDashboard.getNumber(\"Front Climb Command Timeout\", Constants.frontClimbCommandTimeout);\n\n \tsetTimeout(Constants.frontClimbCommandTimeout);\n\n \tFrontClimb._legState = FrontClimb.LegState.LEGS_MOVING; \t\t\n Robot._frontClimber.moveToPosition(Constants.frontClimbPlatformPositionSetpoint);\n }", "Reflexion(final Ray ray, final Raytracer tracer){\n\t\tthis.ray = ray;\n\t\tthis.tracer = tracer;\n\t}", "@Override \n public void init() {\n intakeLeft = hardwareMap.crservo.get(\"intakeLeft\");\n intakeRight = hardwareMap.crservo.get(\"intakeRight\");\n topLeft = hardwareMap.servo.get(\"topLeft\");\n bottomLeft = hardwareMap.servo.get(\"bottomRight\");\n topRight = hardwareMap.servo.get(\"topRight\");\n bottomRight = hardwareMap.servo.get(\"bottomRight\");\n lift = hardwareMap.dcMotor.get(\"lift\");\n }", "@Override\n protected void initialize() {\n isStarted = false;\n setTimeout(12);\n isDone = false;\n // Start the climb\n Robot.climber.frontDown();\n Robot.climber.rearDown();\n\n }", "@Override\n public void init() {\n runtime.reset();\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n }", "public static void init() {\r\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\r\n driveTrainSubsystemleftFront = new Jaguar(1, 1);\r\n\tLiveWindow.addActuator(\"DriveTrainSubsystem\", \"leftFront\", (Jaguar) driveTrainSubsystemleftFront);\r\n \r\n driveTrainSubsystemleftRear = new Jaguar(1, 5);\r\n\tLiveWindow.addActuator(\"DriveTrainSubsystem\", \"leftRear\", (Jaguar) driveTrainSubsystemleftRear);\r\n \r\n driveTrainSubsystemrightFront = new Jaguar(1, 6);\r\n\tLiveWindow.addActuator(\"DriveTrainSubsystem\", \"rightFront\", (Jaguar) driveTrainSubsystemrightFront);\r\n \r\n driveTrainSubsystemrightRear = new Jaguar(1, 7);\r\n\tLiveWindow.addActuator(\"DriveTrainSubsystem\", \"rightRear\", (Jaguar) driveTrainSubsystemrightRear);\r\n \r\n driveTrainSubsystemRobotDrive = new RobotDrive(driveTrainSubsystemleftFront, driveTrainSubsystemleftRear,\r\n driveTrainSubsystemrightFront, driveTrainSubsystemrightRear);\r\n\t\r\n driveTrainSubsystemRobotDrive.setSafetyEnabled(true);\r\n driveTrainSubsystemRobotDrive.setExpiration(0.1);\r\n driveTrainSubsystemRobotDrive.setSensitivity(0.5);\r\n driveTrainSubsystemRobotDrive.setMaxOutput(1.0);\r\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\r\n }", "@Override\n public void initialize() {\n conveyor.setBallCount(0);\n conveyor.startTime(); \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}", "@Override\n protected void init() {\n lastHorizontalDirection = direction = Math.random() < 0.5 ? Direction.LEFT : Direction.RIGHT;\n lastVerticalDirection = Direction.UP;\n setBody(new PolygonShape(BODY_WIDTH2, BODY_HEIGHT2), Body.Mode.CHARACTER);\n body().restitution = 0.0;\n size().set(WIDTH, HEIGHT);\n\n this.addAnimation(\"walk\")\n .addFrames(\"smick\", 4, 5, 0, 2)\n .setSpeed(10)\n .loop(true);\n this.addAnimation(\"eatRadish\")\n .addFrames(\"smick\", 4, 5, 8, 9)\n .setSpeed(10)\n .loop(true);\n this.addAnimation(\"eatHector\")\n .addFrames(\"smick\", 4, 5, 10, 10)\n .setSpeed(10)\n .loop(true);\n this.addAnimation(\"jump\")\n .addFrames(\"smick\", 4, 5, 11, 11)\n .setSpeed(10)\n .loop(false);\n this.addAnimation(\"climb\")\n .addFrames(\"smick\", 4, 5, 12, 13)\n .setSpeed(10)\n .loop(false);\n this.addAnimation(\"eatHectorOnRope\")\n .addFrames(\"smick\", 4, 5, 14, 14)\n .setSpeed(10)\n .loop(false);\n this.addAnimation(\"crushing\")\n .addFrames(\"smick\", 4, 5, 16, 16)\n .setSpeed(10)\n .loop(false);\n }", "protected void initialize() {\n \ttime.start();\n \tRobot.camera.setExposureManual(20);\n \tzach();\n\t\tSystem.out.println(\"josh\");\n\t\t\n }", "@Override\n public void init() {\n super.init();\n prev1 = new Gamepad();\n prev2 = new Gamepad();\n armExtended = false;\n\n glyphLiftState = GlyphLiftState.ASCENDING;\n }", "public void robotInit() {\n // North.registerCommand(\"setSetpoint\", (params) -> ??, [\"Setpoint\"]);\n // North.registerCondition(\"atSetpoint\", elevator::atSetpoint);\n\n //NOTE: init(name, size, logic provider, drive & nav)\n North.init(/*NorthUtils.readText(\"name.txt\")*/ \"lawn chair\", 24/12, 24/12, drive);\n North.default_drive_controller = HoldController.I;\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n }", "protected void initialize() {\n \tstartTime = System.currentTimeMillis();\n \tintake.setLeftPower(power);\n \tintake.setRightPower(power);\n }", "private void init() {\n \t\t// Initialise border cells as already visited\n \t\tfor (int x = 0; x < size + 2; x++) {\n \t\t\tvisited[x][0] = true;\n \t\t\tvisited[x][size + 1] = true;\n \t\t}\n \t\tfor (int y = 0; y < size + 2; y++) {\n \t\t\tvisited[0][y] = true;\n \t\t\tvisited[size + 1][y] = true;\n \t\t}\n \t\t\n \t\t\n \t\t// Initialise all walls as present\n \t\tfor (int x = 0; x < size + 2; x++) {\n \t\t\tfor (int y = 0; y < size + 2; y++) {\n \t\t\t\tnorth[x][y] = true;\n \t\t\t\teast[x][y] = true;\n \t\t\t\tsouth[x][y] = true;\n \t\t\t\twest[x][y] = true;\n \t\t\t}\n \t\t}\n \t}", "public void init()\n\t{\n\t\tpaused = false;\n\t\tbg.play();\n\t\tdeath.setVolume(10);\n\t\texplosion.setVolume(20);\n\t\tsetGameOver(false);\n\t\tscore = 0;\n\t\tlives = 3;\n\t\tgameTime = 0;\n\t\tgameObj = new GameWorldCollection();\n\t\tshipSpawned = false;\n\t\tsound = true;\n\t\ttotalNPS = 0;\n\t\tcollisionVectorPS = new Vector<ICollider>();\n\t\tcollisionVectorNPS\t = new Vector<ICollider>();\n\t\tcollisionVectorAsteroid = new Vector<ICollider>();\n\t\ttrash\t\t\t\t\t= new Vector<ICollider>();\n\t\tnotifyObservers();\t\n\t}", "public void init()\n\t{\n\t\tplanet = new Planet(750,600);\n\t\tship = new Ship(20.0,750,600,planet);\n\t\tmakeGUI();\n\n\t\tdisplayRefresher = new Thread(gamePanel);\n\t\tmotionThread = new Thread(ship);\n\t\tlabelRefresher = new Thread(buttonPanel);\n\t\ttimer = new Timer();\n\t\ttimerThread = new Thread(timer);\n\n\t\tdisplayRefresher.start();\n\t\tmotionThread.start();\n\t\tlabelRefresher.start();\n\t\ttimerThread.start();\n\t}", "public void init()\r\n\t{\r\n\t\tm_behaviorName = \"Wander\";\r\n\t\t\r\n\t\t// Punkt auf dem Kreis festlegen\r\n\t\tRandom rand = new Random();\r\n\t\t\r\n\t\tVector2d vect = new Vector2d(rand.nextInt(),rand.nextInt());\r\n\t\t\r\n\t\t// evtl. negative Werte\r\n\t\t\r\n\t\tif (rand.nextInt() > 0.5) vect.setX(vect.getX() * (-1));\r\n\t\tif (rand.nextInt() > 0.5) vect.setY(vect.getY() * (-1));\r\n\t\t\r\n\t\t// Punkt auf dem Kreis festlegen durch Normalisierung u. Skalierung\r\n\t\tvect.normalize(); vect.scale(m_r);\r\n\t\tm_seekPoint = new Point2d(m_pos);\r\n\t\tm_seekPoint = m_seekPoint.add(vect); \r\n\t}", "protected void initialize() {\n\t\tRobot.conveyor.Forward();\n\n\t}", "@Override\n public void init(String[] args) {\n super.init(args);\n\t\tbridge.connect(\"ws://localhost:9090\", true);\n\t\tlogger.info(\"Environment started, connection with ROS established.\");\t\n\t\t\n\t\t/* Subscribe for calculating the distance between the Gantry and the human */\n\t\tbridge.subscribe(SubscriptionRequestMsg.generate(\"/ariac_human/state\") \n\t\t\t\t.setType(\"ariac_msgs/msg/HumanState\") \n\t\t\t\t.setThrottleRate(1)\n\t\t\t\t.setQueueLength(1),\n\t\t\tnew RosListenDelegate() {\n\t\t\t\tpublic void receive(JsonNode data, String stringRep) {\n\t\t\t\t\tMessageUnpacker<HumanState> unpacker = new MessageUnpacker<HumanState>(HumanState.class);\n\t\t\t\t\tHumanState msg = unpacker.unpackRosMessage(data);\n\n\t\t\t\t\tgpX = msg.robot_position.x; hpX = msg.human_position.x;\n\t\t\t\t\tgpY = msg.robot_position.y; hpY = msg.human_position.y;\n\t\t\t\t\tgpZ = msg.robot_position.z;\n\t\t\t\t\t\n\t\t\t\t\tdouble distance_robotHuman = calculateDistanceRH(msg);\n\t\t\t\t\tdouble safe_distanceRH = calSafeDistanceRH(msg);\n\n\t\t\t\t\t//Check if they are approximating (getting close from each other)\n\t\t\t\t\tif(distance_robotHuman < previousDistance)\n\t\t\t\t\t\tisAproximating = true;\n\t\t\t\t\telse \n\t\t\t\t\t\tisAproximating = false;\n\t\t\t\t\tpreviousDistance = distance_robotHuman;\n\n\t\t\t\t\tlong timeNow = System.currentTimeMillis(); //Time check\n\n\t\t\t\t\tif ((distance_robotHuman < safe_distanceRH*1.75) && \n\t\t\t\t\t\t(timeNow-lastHumanState_MsgT > 20000) && (isAproximating == true)){\n\t\t\t\t\t\t//clearPercepts(\"human\");\n\t\t\t\t\t\tlastHumanState_MsgT=timeNow;\n\t\t\t\t\t\tlogger.info(\"SAFE[\"+ safe_distanceRH +\"] I see the Gantry robot in \" + distance_robotHuman +\" meters: gantry_detected\");\n\t\t\t\t\t\tLiteral gDetectedLit = new LiteralImpl(\"gantry_detected\"); \n\t\t\t\t\t\tgDetectedLit.addTerm(new NumberTermImpl(ctrDt++)); \n\t\t\t\t\t\tif(simulationStarted==true)\n\t\t\t\t\t\t\taddPercept(\"human\",gDetectedLit); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t); // END bridge.subscribe(...\"/ariac_human/state\") \n\t\n\t\t/* Subscriber for getting the information that the Gantry has been disabled */\n\t\tbridge.subscribe(SubscriptionRequestMsg.generate(\"/ariac_human/unsafe_distance\") \n\t\t\t\t.setType(\"std_msgs/Bool\")\n\t\t\t\t.setThrottleRate(1)\n\t\t\t\t.setQueueLength(1),\n\t\t\tnew RosListenDelegate() {\n\t\t\t\tpublic void receive(JsonNode data, String stringRep) {\n\t\t\t\t\tlong timeNow = System.currentTimeMillis(); //Time check\n\n\t\t\t\t\tMessageUnpacker<PrimitiveMsg<Boolean>> unpacker = new MessageUnpacker<PrimitiveMsg<Boolean>>(PrimitiveMsg.class);\n\t\t\t\t\tPrimitiveMsg<Boolean> msg = unpacker.unpackRosMessage(data);\n\t\t\t\t\tif((simulationStarted==true) && (timeNow-lastUnsafeD_MsgT > 10000)){ \n\t\t\t\t\t\t//clearPercepts(\"human\");\n\t\t\t\t\t\tlastUnsafeD_MsgT = timeNow;\n\n\t\t\t\t\t\tif(msg.data){ \n\t\t\t\t\t\t\tlogger.info(\"Gantry has been disabled!\");\n\t\t\t\t\t\t\tLiteral gUnsafeLit = new LiteralImpl(\"gantry_disabled\"); \n\t\t\t\t\t\t\tgUnsafeLit.addTerm(new NumberTermImpl(ctrUnsf++)); \n\t\t\t\t\t\t\taddPercept(\"human\",gUnsafeLit); \n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{ \n\t\t\t\t\t\t\tlogger.info(\"UAV danger!\");\n\t\t\t\t\t\t\tLiteral gUnsafeLit = new LiteralImpl(\"agv_danger\"); \n\t\t\t\t\t\t\tgUnsafeLit.addTerm(new NumberTermImpl(ctrUnsf++)); \n\t\t\t\t\t\t\taddPercept(\"human\",gUnsafeLit); \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}\n\t\t); // END bridge.subscribe(...\"/ariac_human/unsafe_distance\") \n\t\n\t\t/* Subscriber for move_base result */\t\t\n\t\tbridge.subscribe(SubscriptionRequestMsg.generate(\"/ariac_human/position_reached\")\n\t\t\t\t.setType(\"std_msgs/Bool\")\n\t\t\t\t.setThrottleRate(1)\n\t\t\t\t.setQueueLength(1),\n\t\t\tnew RosListenDelegate() {\n\t\t\t\tpublic void receive(JsonNode data, String stringRep) {\n\t\t\t\t\tMessageUnpacker<PrimitiveMsg<Boolean>> unpacker = new MessageUnpacker<PrimitiveMsg<Boolean>>(PrimitiveMsg.class);\n\t\t\t\t\tPrimitiveMsg<Boolean> msg = unpacker.unpackRosMessage(data);\n\t\t\t\t\t//clearPercepts(\"human\");\n\t\t\t\t\tlogger.info(\"Human reached waypoint\t!\");\n\t\t\t\t\tLiteral movebase_result = new LiteralImpl(\"work_completed\"); \n\t\t\t\t\tmovebase_result.addTerm(new NumberTermImpl(cont++)); \n\t\t\t\t\tlogger.info(\"cont: \"+cont);\n\t\t\t\t\tif(simulationStarted==true)\n\t\t\t\t\t\t\taddPercept(\"human\", movebase_result);\n\t\t\t\t}\n\t\t\t}\n\t ); // END bridge.subscribe(...\"/ariac_human/position_reached\")\n\t\t\n\t\t/* Subscriber for getting the START message */\n\t\tbridge.subscribe(SubscriptionRequestMsg.generate(\"/ariac/start_human\") \n\t\t\t\t.setType(\"std_msgs/Bool\")\n\t\t\t\t.setThrottleRate(1)\n\t\t\t\t.setQueueLength(1),\n\t\t\tnew RosListenDelegate() {\n\t\t\t\tpublic void receive(JsonNode data, String stringRep) {\n\t\t\t\t\tMessageUnpacker<PrimitiveMsg<Boolean>> unpacker = new MessageUnpacker<PrimitiveMsg<Boolean>>(PrimitiveMsg.class);\n\t\t\t\t\tPrimitiveMsg<Boolean> msg = unpacker.unpackRosMessage(data);\n\t\t\t\t\t//logger.info(\"Simulation will start!\");\n\t\t\t\t\tif (msg.data){\n\t\t\t\t\t\t//clearPercepts(\"human\");\n\t\t\t\t\t\tlogger.info(\"Simulation started!\");\n\t\t\t\t\t\taddPercept(\"human\",Literal.parseLiteral(\"human_start\"));\n\t\t\t\t\t\tsimulationStarted = true; \n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t); // END bridge.subscribe(...\"/ariac/start_human\")\n\t}", "protected void initialize() {\r\n x = 0;\r\n y = 0;\r\n driveTrain.reInit();\r\n }", "private void init() {\n\t\tcircle.init();\n\n\t\tcircle.startCircle();\n\t\tboard.startUpdating();\n\t}", "@Override\n public void init() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Initialized\"); //\n }", "protected void initialize() {\n \tRobot.intake.runIntake(this.m_speed, this.m_speed);\n }", "public void init() {\n\t\t// init lists\n\t\t_examinationWaiters = new LinkedList();\n\t\t_xrayWaiters = new LinkedList();\n\t\t_backFromXrayWaiters = new LinkedList();\n\t\t_gonePatients = new Vector();\n\n\t\t// init doctors\n\t\t_doctors = new Person[NUMBER_OF_DOCTORS];\n\t\tfor (int i = 0; i < _doctors.length; ++i) {\n\t\t\t_doctors[i] = new Person(\"d\" + (i + 1));\n\t\t}\n\t\t_xrayDoctor = new Person(\"x\");\n\n\t\t// init examination time computing helper arrays\n\t\t_examinationMins =\n\t\t\tnew int[] {\n\t\t\t\t0,\n\t\t\t\tFIRST_EXAMINATION_MIN,\n\t\t\t\tXRAY_EXAMINATION_MIN,\n\t\t\t\tSECOND_EXAMINATION_MIN };\n\t\t_examinationMaxs =\n\t\t\tnew int[] {\n\t\t\t\t0,\n\t\t\t\tFIRST_EXAMINATION_MAX,\n\t\t\t\tXRAY_EXAMINATION_MAX,\n\t\t\t\tSECOND_EXAMINATION_MAX };\n\n\t\t// create enterAmbulanceEvents\n\t\tVector v = new Vector();\n\t\tint i = 0;\n\t\tfor (int t = OPEN_TIME + getPoisson();\n\t\t\tt < CLOSE_TIME;\n\t\t\tt += getPoisson()) {\n\t\t\tv.add(\n\t\t\t\tnew Event(Event.NEW_PATIENT, t, new Person(\"p\" + (++i)), null));\n\t\t}\n\n\t\t// init eventQueue\n\t\t_eventQueue = new EventQueue(v);\n\n\t\t// init timer\n\t\ttime = OPEN_TIME;\n\t}", "@Override\n protected void initialize() {\n ramper.reset();\n Robot.toteLifterSubsystem.setGateState(GateState.OPEN);\n }", "protected void initialize() {\n \t\n \ttimeStarted = System.currentTimeMillis();\n \tangle = driveTrain.gyro.getYaw();\n \tspeed = RobotMap.speedAtFullVoltage * power;\n \ttimeToGo = (long)(distance / speed) * 1000;\n }", "public void addRayTrajectories()\n\t{\n\t\tclear();\n\t\t\n\t\tdouble sin = Math.sin(hyperboloidAngle);\n\n\t\t// Three vectors which form an orthogonal system.\n\t\t// a points in the direction of the axis and is of length cos(coneAngle);\n\t\t// u and v are both of length sin(coneAngle).\n\t\tVector3D\n\t\ta = axisDirection.getWithLength(Math.cos(hyperboloidAngle)),\n\t\tu = Vector3D.getANormal(axisDirection).getNormalised(),\n\t\tv = Vector3D.crossProduct(axisDirection, u).getNormalised();\n\t\t\n\t\tfor(int i=0; i<numberOfRays; i++)\n\t\t{\n\t\t\tdouble\n\t\t\t\tphi = 2*Math.PI*i/numberOfRays,\n\t\t\t\tcosPhi = Math.cos(phi),\n\t\t\t\tsinPhi = Math.sin(phi);\n\t\t\taddSceneObject(\n\t\t\t\t\tnew EditableRayTrajectory(\n\t\t\t\t\t\t\t\"trajectory of ray #\" + i,\n\t\t\t\t\t\t\tVector3D.sum(\n\t\t\t\t\t\t\t\t\tstartPoint,\n\t\t\t\t\t\t\t\t\tu.getProductWith(waistRadius*cosPhi),\n\t\t\t\t\t\t\t\t\tv.getProductWith(waistRadius*sinPhi)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tstartTime,\n\t\t\t\t\t\t\tVector3D.sum(\n\t\t\t\t\t\t\t\t\ta,\n\t\t\t\t\t\t\t\t\tu.getProductWith(-sin*sinPhi),\n\t\t\t\t\t\t\t\t\tv.getProductWith( sin*cosPhi)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\trayRadius,\n\t\t\t\t\t\t\tsurfaceProperty,\n\t\t\t\t\t\t\tmaxTraceLevel,\n\t\t\t\t\t\t\tfalse,\t// reportToConsole\n\t\t\t\t\t\t\tthis,\t// parent\n\t\t\t\t\t\t\tgetStudio()\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t}\n\t}", "public void initialize() {\n\t\tmaze = new Block[width][height];\n\t\tborder();\n\t}", "protected void initialize() {\n Robot.limelight.setPipeline(0.0);\n }", "private void init(){\n \tdimension.set(0.5f, 0.5f);\n \tsetAnimation(Assets.instance.goldCoin.animGoldCoin);\n \tstateTime = MathUtils.random(0.0f,1.0f);\n \t\n \t//regGoldCoin = Assets.instance.goldCoin.goldCoin;\n \t // Set bounding box for collision detection\n \tbounds.set(0,0,dimension.x, dimension.y);\n \tcollected = false;\n }", "@Override\n protected void initialize() {\n mDrive.resetGyroPosition();\n try {\n Trajectory left_trajectory = PathfinderFRC.getTrajectory(pathName + \".left\");\n Trajectory right_trajectory = PathfinderFRC.getTrajectory(pathName + \".right\");\n\n m_left_follower = new EncoderFollower(left_trajectory);\n m_right_follower = new EncoderFollower(right_trajectory);\n\n if(isBackwards) {\n initBackwards();\n } else {\n initForwards();\n }\n } catch (IOException e) {\n\t\t e.printStackTrace();\n\t }\n }", "void initialise() {\n this.sleep = false;\n this.owner = this;\n renewNeighbourClusters();\n recalLocalModularity();\n }", "public AbstractDemo(String title) {\n this.title = title;\n pressed = new HashSet<Integer>();\n foreground = Color.black;\n background = Color.white;\n bodyColor = Color.black;\n rayColor = Color.red;\n\n BruteForce bf = new BruteForce();\n ConfigurableBodyOverlapper overlapper = new ConfigurableBodyOverlapper();\n overlapper.registerDefaults();\n space = new Space(bf, overlapper);\n\n ConfigurableRayBodyIntersector intersector = new ConfigurableRayBodyIntersector();\n intersector.registerDefaults();\n space.equipForRays(bf, intersector);\n }", "public void init() {\n robot.init(hardwareMap);\n robot.liftUpDown.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftRotate.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftRotate.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot.liftUpDown.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n robot.blinkinLedDriver.setPattern(RevBlinkinLedDriver.BlinkinPattern.GREEN);\n\n }", "protected void initialize() {\n\t\tRobot._driveTrain.setAuton(true);\n\t\tRobot._driveTrain.clearEncoder();\n\t\tRobot._driveTrain.clearGyro();\n\t\tdistanceToCenter = SmartDashboard.getNumber(\"toteOffset\", 0);\n\t\tif (Robot._pneumatics.getArms() != DoubleSolenoid.Value.kReverse) {\n\t\t\tRobot._pneumatics.setArms(DoubleSolenoid.Value.kReverse);\n\t\t}\n\t}", "protected void initialize() {\n\t\tsetBodyColor(Color.BLACK);\r\n\t\tsetGunColor(Color.BLACK);\r\n\t\tsetRadarColor(Color.BLACK);\r\n\t\tsetScanColor(Color.BLUE);\r\n\t\tsetBulletColor(Color.RED);\r\n\t}", "@Override\n public void init() {\n robot.init(hardwareMap);\n telemetry.addData(\"Status\", \"Initialized\");\n }", "protected void initialize() {\n \tbrakeFactor = 0.0;\n }", "protected void initialize() {\n \tif (Robot.shifters.getGear() == Shifters.Gear.HIGH) {\n \tRobot.shifters.shift(Shifters.Gear.LOW);\n \t} else {\n \tRobot.shifters.shift(Shifters.Gear.HIGH);\n \t}\n }", "private void init() {\n\t\t\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager);\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\t\n\t\t//Adding the mouseManager to the canvas reduces glitches\n\t\tdisplay.getCanvas().addMouseListener(mouseManager); \n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\t\n\t\t\n\t\tVisuals.init();\n\n\t\tManager.init(this); // Setting up our manager singleton\n\n\t\tgameCamera = new GameCamera(0, 0);\n\t\tgameTimer = new GameTimer();\n\n\t\tgameState = new GameState();\n\t\t//We want to initialise the states we may switch to for easy access\n\t\t//The main menu state\n\t\tState menuState = new MenuState();\n\t\t//The state for the settings menu\n\t\tState settingState = new SettingState();\n\t\t\n\t\tState.setState(gameState); //This sets the state of the program to our game\n\t\t\n\t}", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n // robot.leftBumper.setPosition(.5);\n // robot.leftStageTwo.setPosition(1);\n // robot.rightStageTwo.setPosition(0.1);\n robot.colorDrop.setPosition(0.45);\n robot.align.setPosition(0.95);\n\n // robot.rightBumper.setPosition(.7);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "public RayTracerBase(Scene scene) {\n _scene = scene;\n }", "public RayTracerBase(Scene scene) {\n _scene = scene;\n }", "protected void initialize() {\n \t_finalTickTargetLeft = _ticksToTravel + Robot.driveTrain.getEncoderLeft();\n \t_finalTickTargetRight = _ticksToTravel + Robot.driveTrain.getEncoderRight();\n \t\n }", "protected void initialize() {\n \t\n \n \t\n \tRobotMap.motorLeftTwo.setSelectedSensorPosition(0,0,0);\n\t\tRobotMap.motorRightTwo.setSelectedSensorPosition(0,0,0);\n \t\n \torientation.setSetPoint(desiredAngle);\n \tstartTime = Timer.getFPGATimestamp();\n }", "public void init(){\n\t\n\t\t//background init\n\t\tthis.background = new Sprite(this.scene, \"space-backdrop.png\", 1280 * 5, 800 * 5);\n\t\tthis.background.setBoundAction(\"background\");\n\t\tthis.background.setSpeedScale(0.2);\n\t\tthis.background.setSpeed(0);\n\t\tthis.sprites.add(this.background);\n\t\t\n\t\t//compass init\n\t\tthis.compass = new Sprite(this.scene, \"compass.png\", 100, 100);\n\t\tthis.compass.setSpeed(0);\n\t\tthis.compass.setPosition(this.compass.getWidth() / 2, this.scene.getHeight() - this.compass.getHeight() / 2);\n\t\t\n\t\t//earth init\n\t\tthis.earth = new Planet(this.scene, \"earth.png\", 4800, 4800);\n\t\tthis.earth.setSpeed(0);\n\t\tthis.earth.setPosition(0, 7000);\n\t\tthis.earth.setBoundAction(\"continue\");\n\t\tthis.sprites.add(this.earth);\n\t\t\n\t\t//ship init\n\t\tthis.mainSprite = new Ship(this.scene, \"cannon.png\", 50, 50, this.k);\n\t\tthis.mainSprite.keyListen = true;\n\t\tthis.mainSprite.setSpeed(0);\n\t\tthis.mainSprite.setPosition(this.scene.getWidth() / 2, this.scene.getHeight() / 2);\n\t\t\n\t\t//asteroids init\n\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", 250, 250, this));\n\t\tthis.asteroids.get(0).setBoundAction(\"continue\");\n\t\tthis.asteroids.get(0).setSpeed(0);\n\t\tthis.asteroids.get(0).setPosition(0, 0);\n\t\tthis.sprites.add(this.asteroids.get(0));\n\t\t\n\t\tfor(int i = 1; i < 200; i++){\n\t\t\t\n\t\t\tint size = (int) Math.round(Math.random() * 400 + 50);\n\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\n\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t}\n\t\t\t\n\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t}\n\t\t\t\n\t\t\tthis.asteroids.add(new Body(this.scene, \"asteroid.png\", size, size, this));\n\t\t\tthis.asteroids.get(i).setBoundAction(\"continue\");\n\t\t\tthis.asteroids.get(i).setSpeed(0);\n\t\t\tthis.asteroids.get(i).setPosition(x, y);\n\t\t\t\n\t\t\tthis.sprites.add(this.asteroids.get(i));\n\t\t}\n\t\t\n\t\t\n\t\t//chest init\n\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\tthis.chests.get(0).setBoundAction(\"continue\");\n\t\tthis.chests.get(0).setSpeed(0);\n\t\tthis.chests.get(0).setPosition(500, 500);\n\t\tthis.sprites.add(this.chests.get(0));\n\t\t\n\t\tfor(int i = 1; i < this.numChests; i++){\n\t\t\t\n\t\t\tthis.chests.add(new Chest(this.scene, \"chest.png\", 100, 50));\n\t\t\tthis.chests.get(i).setBoundAction(\"continue\");\n\t\t\tthis.chests.get(i).setSpeed(0);\n\t\t\t\n\t\t\tboolean keepGoing = true;\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tlong x = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\tlong y = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t\n\t\t\t\twhile(x > 0 && x < this.scene.getWidth()){\n\t\t\t\t\tx = Math.round(Math.random() * this.background.getWidth() - (this.background.getWidth() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twhile(y > 0 && y < this.scene.getHeight()){\n\t\t\t\t\ty = Math.round(Math.random() * this.background.getHeight() - (this.background.getHeight() / 2));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tthis.chests.get(i).setPosition(x, y);\n\t\t\t\t\n\t\t\t\t//check for collisions with asteroids\n\t\t\t\tboolean colliding = false;\n\t\t\t\tfor(int j = 0; j < this.asteroids.size() && colliding == false; j++){\n\t\t\t\t\tif(this.asteroids.get(j).collidesWith(this.chests.get(i))){\n\t\t\t\t\t\tcolliding = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tkeepGoing = colliding;\n\t\t\t\t\n\t\t\t}while(keepGoing);\n\t\t\t\n\t\t\tthis.sprites.add(this.chests.get(i));\n\t\t\t\n\t\t}//end for\n\t\n\t\tthis.scene.start();\n\t\t\n\t\tSystem.out.println(\"==== Welcome to Space Smuggler! ====\");\n\t\tSystem.out.println(\"(WASD to move)\");\n\t\tSystem.out.println(\"Follow your compass in the bottom left corner to find treasure.\");\n\t\tSystem.out.println(\"Collect all of the treasure, then follow your compass to Earth!\");\n\t\tSystem.out.println(\"Watch out for the asteroids though, their gravitational pull is strong!\");\n\t\tSystem.out.println(\"Crashing into one will certainly kill you! D:\");\n\t\tSystem.out.println(\"Good Luck!\");\n\t\t\n\t}", "protected void initialize() {\n\t\t\n\t\tif (trajectoryToFollow.highGear) {\n\t\t\tRobot.pneumatics.drivetrainShiftUp();\n\t\t}else {\n\t\t\t//Robot.pneumatics.drivetrainShiftDown();\n\t\t\tRobot.pneumatics.drivetrainShiftUp();\n\t\t}\n\n\t\tsetUpTalon(leftTalon);\n\t\tsetUpTalon(rightTalon);\n\n\t\tsetValue = SetValueMotionProfile.Disable;\n\n\t\trightTalon.set(ControlMode.MotionProfileArc, setValue.value);\n\t\tleftTalon.follow(rightTalon, FollowerType.AuxOutput1);\n\n\t\tloadLeftBuffer = new Notifier(\n\t\t\t\tnew BufferLoader(rightTalon, trajectoryToFollow.centerProfile, trajectoryToFollow.flipped,\n\t\t\t\t\t\tRobot.drivetrain.getDistance()));\n\n\t\tloadLeftBuffer.startPeriodic(.005);\n\t}", "protected void initialize() {\n finished = false;\n Robot.shooter.Spin();//Spin up wheels\n Timer.delay(3);\n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n \n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n \n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n //Robot.shooter.Stop();\n Robot.shooter.TriggerExtend();//Reset Trigger\n \n Robot.driveTrain.DriveBack();//Drives backwards from pyramid\n Timer.delay(1.5);\n Robot.driveTrain.TurnAround();//Turns Bob around\n Timer.delay(1);\n Robot.driveTrain.Stop();//Stops Bob\n \n Robot.pneumatics.CompressorOn();//Turns compressor on\n }", "private void GameInitialize()\r\n { \r\n // set to fullscreen to use the entire \r\n // display or false to only use\r\n // the area inbetween the two bars on the display\r\n setFullScreenMode(true);\r\n\r\n // setup 3D\r\n try\r\n {\r\n Object3D[] buffer = Loader.load(\"/RaptorWalk.m3g\");\r\n\r\n for(int i = 0; i < buffer.length; i++)\r\n {\r\n if(buffer[i] instanceof World)\r\n {\r\n // get our world node\r\n mWorld = (World)buffer[i];\r\n mEnemy = (SkinnedMesh)mWorld.find(56);\r\n mEnemyTimer = 0;\r\n break;\r\n }\r\n }\r\n }\r\n catch(Exception e) \r\n { System.out.println(\"Loading error!\" + e.getMessage()); }\r\n\r\n // create a game font\r\n mGameFont = Font.getFont(Font.FACE_MONOSPACE, \r\n Font.STYLE_PLAIN, Font.SIZE_SMALL);\r\n\r\n // Get the active camera from the world\r\n mCam = mWorld.getActiveCamera();\r\n mCam.translate(0, 1.0f, 0);\r\n\r\n // Create an ambient light and add it to the world node\r\n Light light = new Light();\r\n light.setMode(Light.AMBIENT);\r\n light.setIntensity(3);\r\n mWorld.addChild(light);\r\n }", "public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }", "public static void init() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n\n frisbeeRollerFrisbeeRoller = new Talon(FRISBEE_ROLLER_CHANNEL);\n\n conveyorMotor = new Talon(CONV_MOTOR_CHANNEL);\n\n spatulaMotor = new Relay(SPATULA_MOTOR_CHANNEL);\n\n loadTalon = new Talon(LOADER_TALON);\n\n elevateTalon = new Talon(ELEVATE_TALON);\n\n try {\n driveTrainrearRightTalon = new CANJaguar(REAR_RIGHT_JAG_CHANNEL);\n\n driveTrainfrontRightTalon = new CANJaguar(FRONT_RIGHT_JAG_CHANNEL);\n\n driveTrainfrontLeftTalon = new CANJaguar(FRONT_LEFT_JAG_CHANNEL);\n\n driveTrainrearLeftTalon = new CANJaguar(REAR_LEFT_JAG_CHANNEL);\n\n shootershooterJag = new CANJaguar(SHOOTER_JAG_CHANNEL);\n } catch (CANTimeoutException ex) {\n ex.printStackTrace();\n }\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }", "@Override\n protected void initialize() {\n arm.getElbow().enableCoastMode();\n arm.getElbow().stop();\n arm.getWrist().enableCoastMode();\n arm.getWrist().stop();\n arm.getExtension().enableCoastMode();\n arm.getExtension().stop();\n }", "@Override\r\n public void init() {\r\n /* Initialize the hardware variables.\r\n * The init() method of the hardware class does all the work here\r\n */\r\n robot.init(hardwareMap);\r\n\r\n // Send telemetry message to signify robot waiting;\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n }", "@Override\n\tpublic void init(String[] args) {\n\t\tsuper.init(args);\n\t\tmodel = new ArenaModel();\n\t\tview = new ArenaView(model);\n\t\tmodel.setView(view);\n\t\tupdatePercepts();\n\t}", "@Override\n public void initialize() {\n\n distanceTraveled = 0.0;\n timer.start();\n startTime = timer.get();\n\n leftEncoderStart = drivetrain.getMasterLeftEncoderPosition();\n rightEncoderStart = drivetrain.getMasterRightEncoderPosition();\n\n angleCorrection = 0;\n angleError = 0;\n speedCorrection = 1;\n\n shifter.shiftUp();\n\n }", "protected void initialize() {\n timeStarted = timeSinceInitialized();\n RobotMap.shootState=true;\n this.setTimeout(2.0);\n }", "protected void initialize() {\r\n \t((Launcher) Robot.fuelLauncher).controlSpeed(i);\r\n }", "public void robotInit() {\n RobotMap.init();\n driveWithJoystick = new DriveTrain();\n \n oi = new OI();\n }", "public void robotInit() {\n\t\tmyRobot = new RobotDrive(0,1);\n\t\tteleop = new Teleop(myRobot);\n\t\tauto = new AutonomousDrive(myRobot);\n\t}", "public void robotInit() {\r\n\r\n shootstate = down;\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n initialpot = Components.ShooterPot.getAverageVoltage();\r\n //shootpotdown +=initialpot;\r\n //shootpotlow+= initialpot;\r\n //shootpotmiddle+= initialpot;\r\n //shootpothigh+=initialpot;\r\n\r\n }", "private void initiate(){\n carDef = new BodyDef();\n\t carDef.type = BodyType.DynamicBody;\n\n\t shape = new PolygonShape();\n\t shape.setAsBox(width*0.8f, height*0.9f, new Vector2(0,0),0);\t\n\n\t // fixture \t\n\t fixture = new FixtureDef();\n\t fixture.shape = shape;\n\t fixture.restitution = 0.75f; \n\t fixture.friction = 0.75f;\n\t fixture.density = 1;\n\n\t}", "public void initialize() {\n // RobotContainer.drive.zeroAngle();\n this.angle = this.angle + RobotContainer.drive.getAngle();\n }", "@Override\n\n //-----------------\n\n public void init() {\n //test(); // <---------------- Uncomment to TEST!\n\n // %-distribution of RED, BLUE and NONE\n double[] dist = {0.49, 0.49, 0.02};\n\n // Number of locations (places) in world (square)\n int nLocations = 950;\n\n Actor[] distArray = distribution(nLocations, dist); //Generates array with correct distribution.\n distArray = shuffle(distArray); //Shuffles array\n world = toMatrix(distArray, nLocations, world); //Generates the start world.\n // Should be last\n fixScreenSize(nLocations);\n }", "private void init() {\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager); //lets us access keyboard\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\tAssets.init();\n\t\t\n\t\tgameCamera = new GameCamera(this, 0,0);\n\t\thandler = new Handler(this);\n\t\t\n\t\tgameState = new GameState(handler);\n\t\tmenuState = new MenuState(handler);\n\t\tsettingState = new SettingState(handler);\n\t\tmapState = new mapState(handler);\n\t\tmansionState = new mansionState(handler);\n\t\tparkState = new parkState(handler);\n\t\tjazzState = new jazzState(handler);\n\t\tmansionGardenState = new mansionGardenState(handler);\n\t\tmansionArcadeState = new mansionArcadeState(handler);\n\t\tmansionStudyState = new mansionStudyState(handler);\n\t\tjazzPRoomState = new jazzPRoomState(handler);\n\t\tState.setState(menuState);\n\t}", "private void init()\n\t{\n\t\tinitOpenGL();\n\t\tlatestStroke = new Stroke(this, true);\n\t}", "public void initialize() {\n\t\tdrivetrain.resetGyro();\n\t\tdrivetrain.setAngleTarget(getTargetAngle());\n\t\tLog.debug(this.getClass().toString()+ \".initialize called drivetrain.setAngleTarget(\" + getTargetAngle() + \")\");\n\t\t\n\n\t}", "@Before\n public void initJUnitTest() {\n final double[] location = {0, 0};\n final String bodyFace = \"initial back\";\n final String bodyLocation = \"initial arm\";\n body = new BodyLocation(location, bodyFace, bodyLocation);\n }", "public static void init() {\n\t\tdrive = Drive.getInstance();\n\t\toi = OI.getInstance();\n\t\tshooter = Shooter.getInstance();\n\t\tarmservo = ArmServo.getInstance();\n\t\t//pneumatic = Pneumatic.getInstance();\n\t\tarmMotor = ArmMotor.getInstance();\n\t\tramp = RampMotor.getInstance();\n\t\tif(shooter == null) {\n\t\t\tSystem.out.println(\"Shooter in NULL in init\");\n\t\t}\n\t\t\n\t}", "@Override\n\tvoid init(GameContainer gc) {\t\t\n\t\taddAnimation(\"HellWormHead.png\", 0, 0, 0, 0, 1000, \"head\");\t\n\t\tthis.setCurrentAnimation(\"head\");\n\t\tthis.borderColor = Color.red;\n\t\tthis.fillRectColor = Color.red;\n\t\t//this.showFillRect = true;\n\t\tthis.showBorders = false;\n\t\tthis.checkForCollision = true;\n\t\tthis.checkForGravity = true;\n\t\t//this.faction = -1;\t\n\t\tthis.checkForGravity = false;\n\t\tim = this.currentAnimation.getCurrentFrame();\n\t}", "@Override\n protected void initialize() {\n Robot.leftDriveEncoder.reset();\n Robot.rightDriveEncoder.reset();\n tempTargetDirection = Robot.targetDirection + Robot.navX.getYaw();\n\n\n }", "@Override\n public void init() {\n robot.init(hardwareMap, telemetry, false);\n //robot.resetServo();\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"Status\", \"Initialized\");\n // robot.FL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.FR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }", "@Override\n public void init() {\n \n \n rightFront = hardwareMap.dcMotor.get(\"frontR\");\n rightBack = hardwareMap.dcMotor.get(\"backR\");\n \n \n \n rightFront.setDirection(DcMotor.Direction.FORWARD); \n rightBack.setDirection(DcMotor.Direction.FORWARD);\n \n \n \n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "@Override\n\tpublic void robotInit() {\n\t\tleftDriveBack = new VictorSP(0); // PWM Port, madke sure this is set correctly.\n\t\tleftDriveFront = new VictorSP(1);\n\t\t\n\t\trightDriveFront = new VictorSP(2);\n\t\trightDriveBack = new VictorSP(3);\n\t\t\n\t\tleftIntake = new Spark(5);\n\t\trightIntake = new Spark(6);\n\t\t\n\t\tarmMotor = new TalonSRX(10);\n\t\tarmMotor.setNeutralMode(NeutralMode.Brake);\n\t\tarmMotor.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Absolute, 0, 0);\n\t\tarmMotor.configPeakCurrentLimit(30, 0);\n\t\tarmMotor.configPeakCurrentDuration(250, 0);\n\t\tarmMotor.configContinuousCurrentLimit(20, 0);\n\t\tarmMotor.configClosedloopRamp(0.25, 0);\n\t\tarmMotor.configOpenloopRamp(0.375, 0);\n\t\tarmMotor.enableCurrentLimit(true);\n\t\t\n\t\tarmMotor.configPeakOutputForward(1.0, 0);\n\t\tarmMotor.configPeakOutputReverse(-1.0, 0);\n\t\t\n\t\tarmMotor.config_kP(0, 0.0, 0);\n\t\t\n\t\tarmSetpoint = armMotor.getSelectedSensorPosition(0);\n\t\t\n\t\tstick = new Joystick(0);\n\t\tstickReversed = false;\n\t\txbox = new XboxController(1); // USB port, set in driverstation.\n\t\t\n\t\tdriveCamera = CameraServer.getInstance().startAutomaticCapture(0);\n\t}", "protected void initialize() {\n ////TEST CODE\n \tRobotMap.frontLeftTurn.set(0);\n \tRobotMap.frontRightTurn.set(0);\n \tRobotMap.backLeftTurn.set(0);\n \tRobotMap.backRightTurn.set(0);\n \t\n \t//Spin motors\n \tRobotMap.frontLeftTurn.set(85);\n \tRobotMap.frontRightTurn.set(85);\n \tRobotMap.backLeftTurn.set(85);\n \tRobotMap.backRightTurn.set(85);\n \tTimer.delay(2.75);\n \t\n \t//Stop Spin\n \tRobotMap.frontLeftTurn.set(0);\n \tRobotMap.frontRightTurn.set(0);\n \tRobotMap.backLeftTurn.set(0);\n \tRobotMap.backRightTurn.set(0);\n \tTimer.delay(2.75);\n \t\n \t//Move Back\n \tRobotMap.frontLeftDrive.set(0.2);\n \tRobotMap.frontRightDrive.set(0.2);\n \tRobotMap.backLeftDrive.set(0.2);\n \tRobotMap.backRightDrive.set(0.2); \t\n \tTimer.delay(2.75); \n \t\n \t//Stop\n \t\n \tRobotMap.frontLeftDrive.set(0);\n \tRobotMap.frontRightDrive.set(0);\n \tRobotMap.backLeftDrive.set(0);\n \tRobotMap.backRightDrive.set(0);\n }" ]
[ "0.6743172", "0.65814054", "0.6556125", "0.6251762", "0.6195978", "0.61829996", "0.61789453", "0.61680996", "0.6164158", "0.6154767", "0.61324596", "0.61124814", "0.61050916", "0.61035466", "0.6082269", "0.6063526", "0.6060195", "0.60492927", "0.6043729", "0.60360837", "0.6028086", "0.6026931", "0.6025585", "0.6014012", "0.60086983", "0.6005668", "0.5997699", "0.5996531", "0.59965223", "0.5991162", "0.5978796", "0.5978512", "0.5976547", "0.59704834", "0.5962456", "0.59588057", "0.5957058", "0.59531987", "0.5947233", "0.5947022", "0.5943752", "0.5940128", "0.5936816", "0.5921647", "0.591459", "0.5895997", "0.58954406", "0.5894673", "0.5891934", "0.5890937", "0.5880756", "0.5867298", "0.5865305", "0.5859551", "0.58546007", "0.5852839", "0.5849821", "0.5848712", "0.58443016", "0.5830366", "0.5827356", "0.5825413", "0.5824214", "0.582024", "0.58185285", "0.5817178", "0.58147335", "0.5807194", "0.5807194", "0.5795613", "0.5795458", "0.5793728", "0.57885593", "0.57782394", "0.5771901", "0.5769783", "0.57655716", "0.5761416", "0.57529336", "0.5751686", "0.5751618", "0.57504606", "0.5740452", "0.5739634", "0.5732592", "0.57299954", "0.57287735", "0.57281196", "0.5725725", "0.57255197", "0.57229984", "0.5722036", "0.5720769", "0.5720477", "0.5720051", "0.57192934", "0.5718855", "0.571871", "0.5710742", "0.57101274" ]
0.81406695
0
Modified block of code for assessment 2 Updates position of objects AIBoat based on acceleration and stamina. Checks if AIBoat can turn and updates position accordingly based on any collision objects that may overlap.
public void updatePosition(List<CollisionObject> collidables) { double start = 0; // If the boat does not need to regenerate stamina, then they accelerate if (!regen) { this.accelerate(); // When stamina gets low, regen is set to true, meaning the boat will regenerate stamina if (stamina <= 0.2) { regen = true; } } else { //We calculate a random number here so that we can add some variety //to the AI boat's behaviour while (start <= 0.3 ) { start = Math.random(); } if (stamina >= start ) { regen = false; } } this.check_turn(collidables); super.updatePosition(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateIntention() {\n\n // First, rotate the front line\n double distanceToGoal = MathUtils.quickRoot1((float)((anchorX - goalX) * (anchorX - goalX) + (anchorY - goalY) * (anchorY - goalY)));\n double moveAngle, moveSpeed;\n double moveSpeedX, moveSpeedY;\n double speedModifier;\n double[] deltaVel;\n switch (state) {\n case FIGHTING:\n // TODO(sonpham): Come up with a way to change FIGHTING to IN_POSITION when comebat with a unit is over.\n if (unitFoughtAgainst.getNumAlives() == 0) {\n state = UnitState.STANDING;\n anchorAngle = goalAngle;\n unitFoughtAgainst = null;\n break;\n }\n goalAngle = MathUtils.atan2(unitFoughtAgainst.getAverageY() - averageY,\n unitFoughtAgainst.getAverageX() - averageX);\n goalX = unitFoughtAgainst.getAverageX();\n goalY = unitFoughtAgainst.getAverageY();\n\n // If army still rotating, half the speed\n moveAngle = MathUtils.atan2(goalY - anchorY, goalX - anchorX); // TODO: This is currently repeated too much\n moveSpeed = speed / 2;\n\n // Apply speed modifier by terrain\n moveSpeedX = Math.cos(moveAngle) * moveSpeed;\n moveSpeedY = Math.sin(moveAngle) * moveSpeed;\n deltaVel = terrain.getDeltaVelFromPos(anchorX, anchorY);\n speedModifier = MathUtils.ratioProjection(deltaVel[0], deltaVel[1], moveSpeedX, moveSpeedY);\n speedModifier = MathUtils.capMinMax(speedModifier,\n UniversalConstants.MINIMUM_TERRAIN_EFFECT,\n UniversalConstants.MAXIMUM_TERRAIN_EFFECT);\n moveSpeed *= (1 + speedModifier);\n if (distanceToGoal > moveSpeed) {\n double moveUnitX = Math.cos(moveAngle);\n double moveUnitY = Math.sin(moveAngle);\n anchorX += moveUnitX * moveSpeed;\n anchorY += moveUnitY * moveSpeed;\n } else {\n anchorX = goalX;\n anchorY = goalY;\n }\n\n // Update flanker status. If the flank has not engaged with the enemy for a long time, they will join\n // the flanker, which will have a different goal position.\n if (gameSettings.isEnableFlankingMechanics()) {\n for (int i = 0; i < width; i++) {\n if (flankersCount[i] < troops.size() / width && aliveTroopsFormation[flankersCount[i]][i] != null) {\n if (aliveTroopsFormation[0][i].getCombatDelay() < 0) {\n frontLinePatientCounters[i] += 1;\n } else {\n frontLinePatientCounters[i] = 0;\n }\n }\n if (frontLinePatientCounters[i] == GameplayConstants.FLANKER_PATIENT) {\n // If the front-liner has waited for too long, they will join the flanker.\n flankersCount[i] += 1;\n\n // Pick an offset for the flankers\n Triplet<Integer, Integer, Integer> pos;\n Iterator<Triplet<Integer, Integer, Integer>> it;\n // TODO: If the flanker troop is right in the middle, then it should select either\n // iterator half the time.\n if (i < width / 2) {\n it = leftFlankerIndices.iterator();\n } else {\n it = rightFlankerIndices.iterator();\n }\n pos = it.next();\n\n // Generate a new goal offset position for that flanker\n double flankingSpacing = GameplayConstants.FLANKING_SPACING_RATIO * unitStats.spacing;\n double[] offset = MathUtils.generateOffsetBasedOnHexTripletIndices(\n pos.x, pos.y, pos.z, flankingSpacing);\n double positionalJiggling = GameplayConstants.FLANKING_POSITION_JIGGLING_RATIO * flankingSpacing;\n offset[0] += MathUtils.randDouble(-1.0, 1.0) * positionalJiggling;\n offset[1] += MathUtils.randDouble(-1.0, 1.0) * positionalJiggling;\n\n // Assign that position to flanker positions\n flankerOffsets[i].add(offset);\n\n // Change the set of candidates\n leftFlankerIndices.remove(pos);\n rightFlankerIndices.remove(pos);\n if (leftFlankerIndices.size() == 0) {\n leftRingIndex += 1;\n leftFlankerIndices = MathUtils.getHexagonalIndicesRingAtOffset(leftRingIndex);\n Set<Triplet<Integer, Integer, Integer>> removalSet = new HashSet<>();\n for (Triplet<Integer, Integer, Integer> triplet : leftFlankerIndices) {\n if (triplet.z > 0) {\n removalSet.add(triplet);\n } else if (triplet.y < triplet.x) {\n removalSet.add(triplet);\n }\n }\n for (Triplet<Integer, Integer, Integer> triplet : removalSet) {\n leftFlankerIndices.remove(triplet);\n }\n }\n if (rightFlankerIndices.size() == 0) {\n rightRightIndex += 1;\n rightFlankerIndices = MathUtils.getHexagonalIndicesRingAtOffset(rightRightIndex);\n Set<Triplet<Integer, Integer, Integer>> removalSet = new HashSet<>();\n for (Triplet<Integer, Integer, Integer> triplet : rightFlankerIndices) {\n if (triplet.z > 0) {\n removalSet.add(triplet);\n } else if (triplet.y > triplet.x) {\n removalSet.add(triplet);\n }\n }\n for (Triplet<Integer, Integer, Integer> triplet : removalSet) {\n rightFlankerIndices.remove(triplet);\n }\n }\n\n // Reset patient counters.\n frontLinePatientCounters[i] = 0;\n }\n }\n }\n break;\n case ROUTING:\n // Update the direction that the unit ought to run away from, it should be the opposite vector of\n // the sum of difference in unit location difference.\n double dx = 0;\n double dy = 0;\n int numVisibleEnemies = 0;\n for (BaseUnit unit : visibleUnits) {\n if (unit.getPoliticalFaction() != politicalFaction) {\n numVisibleEnemies += 1;\n dx += unit.getAliveTroopsSet().size() * (averageX - unit.averageX);\n dy += unit.getAliveTroopsSet().size() * (averageY - unit.averageY);\n }\n }\n // Invert dx and dy. We need to run in the opposite direction.\n // Also, only change goalAngle if there are more than 1 visible enemy units. Otherwise, atan2 function\n // will return PI / 2 and change the unit direction, which is undesirable. It doesn't make sense for\n // unit to change their direction once they no longer see their enemy.\n if (numVisibleEnemies > 0) {\n goalAngle = MathUtils.atan2(dy, dx);\n }\n break;\n case MOVING:\n // If army is moving, the the army shall move at normal speed.\n moveAngle = MathUtils.atan2(goalY - anchorY, goalX - anchorX); // TODO: This is currently repeated too much\n moveSpeed = speed * turningSpeedRatio;\n\n // Apply speed modifier by terrain\n moveSpeedX = Math.cos(moveAngle) * moveSpeed;\n moveSpeedY = Math.sin(moveAngle) * moveSpeed;\n deltaVel = terrain.getDeltaVelFromPos(anchorX, anchorY);\n speedModifier = MathUtils.ratioProjection(deltaVel[0], deltaVel[1], moveSpeedX, moveSpeedY);\n speedModifier = MathUtils.capMinMax(speedModifier,\n UniversalConstants.MINIMUM_TERRAIN_EFFECT,\n UniversalConstants.MAXIMUM_TERRAIN_EFFECT);\n moveSpeed *= (1 + speedModifier);\n\n if (MathUtils.doubleEqual(moveAngle, anchorAngle)) {\n isTurning = false;\n turningSpeedRatio = 1.0;\n } else {\n isTurning = true;\n turningSpeedRatio = 1.0;\n turningSpeedRatio = Math.max(\n 0.0, turningSpeedRatio - GameplayConstants.TURNING_UNIT_SPEED_DECELERATION_RATIO);\n }\n\n // Rotate towards the goal\n anchorAngle = MovementUtils.rotate(anchorAngle, moveAngle, unitStats.rotationSpeed);\n\n if (distanceToGoal > moveSpeed) {\n double moveUnitX = Math.cos(anchorAngle);\n double moveUnitY = Math.sin(anchorAngle);\n anchorX += moveUnitX * moveSpeed;\n anchorY += moveUnitY * moveSpeed;\n } else {\n anchorX = goalX;\n anchorY = goalY;\n if (path != null && node == path.getNodes().getLast()) {\n path = null;\n node = null;\n state = UnitState.STANDING;\n } else if (path != null) {\n path.getNodes().pollFirst();\n node = path.getNodes().get(0);\n goalX = node.getX();\n goalY = node.getY();\n } else {\n path = null;\n node = null;\n state = UnitState.STANDING;\n }\n }\n break;\n case STANDING:\n anchorAngle = MovementUtils.rotate(anchorAngle, goalAngle, unitStats.rotationSpeed);\n isTurning = false;\n break;\n }\n\n // Update goal positions\n updateGoalPositions();\n\n // Update troop intentions\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.updateIntention();\n }\n }", "public void AIDamage() {\r\n\t\tif (attackStyle == 2) {\r\n\t\t\tfor(int i = 0; i < AIObject.length; i++) {\r\n\t\t\t\tif ((inFlight) && (Math.abs(aX-AIObject[i].getAIX()) < 5) && (Math.abs(aY-AIObject[i].getAIY())) < 4 ) {\r\n\t\t\t\t\tAIObject[i].setHealth(-25 * damageReduction);\r\n\t\t\t\t\tdrawArrow = false;\r\n\t\t\t\t\tcooldown = 15;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tif (mouseLeft) {\r\n\t\t\t\tfor(int i = 0; i < AIObject.length; i++){\r\n\t\t\t\t\tif ((drawSword) && (cooldown == 0) && (playerObject[0].getX() -AIObject[i].getAIX() <85) && (playerObject[0].getX()-AIObject[i].getAIX() >-1) && (playerObject[0].getY() - AIObject[i].getAIY() < 20) && (playerObject[0].getY()-AIObject[i].getAIY()>-5)) {\r\n\t\t\t\t\t\tAIObject[i].setHealth(-50 * damageReduction);\r\n\t\t\t\t\t\tcooldown = 5;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else {\r\n\t\t\t\tfor(int i=0; i < AIObject.length; i++){\r\n\t\t\t\t\tif ((drawSword) && (cooldown == 0) && (AIObject[i].getAIX()-playerObject[0].getX() <85) && (AIObject[i].getAIX() - playerObject[0].getX() > -1) && (playerObject[0].getY() - AIObject[i].getAIY() < 20) && (playerObject[0].getY()-AIObject[i].getAIY()>-5)) {\r\n\t\t\t\t\t\tAIObject[i].setHealth(-50 * damageReduction);\r\n\t\t\t\t\t\tcooldown = 5;\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\tfor(int i=0; i < AIObject.length; i++){\r\n\t\t\t//checks if AI is close enough to attack with melee\r\n\t\t\tfor (int j = 0; j < playerObject.length; j++) {\r\n\t\t\t\tif ((!shield) && (Math.abs(AIObject[i].getAIX() - playerObject[j].getX()) <= 10) && (Math.abs(AIObject[i].getAIY() - playerObject[j].getY())) <= 3) {\r\n\t\t\t\t\tplayerObject[j].setHealth(DAMAGE_AMOUNT * difficulty);\r\n\t\t\t\t\tif (playerObject[j].getHealth() <= 0) {\r\n\t\t\t\t\t\tdead = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void act() \n {\n World myWorld = getWorld();\n \n Mapa mapa = (Mapa)myWorld;\n \n EnergiaMedicZ vidaMZ = mapa.getEnergiaMedicZ();\n \n EnergiaGuerriZ vidaGZ = mapa.getEnergiaGuerriZ();\n \n EnergiaConstrucZ vidaCZ = mapa.getEnergiaConstrucZ();\n \n GasZerg gasZ = mapa.getGasZerg();\n \n CristalZerg cristalZ = mapa.getCristalZerg();\n \n BunkerZerg bunkerZ = mapa.getBunkerZerg();\n \n Mina1 mina1 = mapa.getMina1();\n Mina2 mina2 = mapa.getMina2();\n Mina3 mina3 = mapa.getMina3();\n \n \n //movimiento del personaje\n if(Greenfoot.isKeyDown(\"b\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }\n }\n else if(Greenfoot.isKeyDown(\"z\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }}\n //encuentro con objeto\n \n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"s\"))\n {\n setLocation(getX(),getY()-1);\n }\n \n \n //probabilida de daño al enemigo\n \n if(isTouching(MedicTerran.class) && Greenfoot.getRandomNumber(100)==3)\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n if(isTouching(ConstructorTerran.class) && (Greenfoot.getRandomNumber(100)==3 ||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n if(isTouching(GuerreroTerran.class) && (Greenfoot.getRandomNumber(100)==3||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1||Greenfoot.getRandomNumber(100)==4||Greenfoot.getRandomNumber(100)==5))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n \n \n //encuentro con Bunker\n \n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"s\"))\n \n {\n setLocation(getX(),getY()-1);\n }\n \n //AccionesUnicas\n \n if(isTouching(YacimientoDeGas.class) && gasZ.gasZ < 100)\n {\n \n gasZ.addGasZ();\n \n }\n \n \n if(isTouching(Mina1.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina1.removemina1();\n \n }\n \n if(isTouching(Mina2.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina2.removemina2();\n \n }\n \n if(isTouching(Mina3.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina3.removemina3();\n \n }\n \n \n if(isTouching(DepositoZ.class) && gasZ.gasZ > 4 && bunkerZ.bunkerZ() < 400){\n \n gasZ.removeGasZ();\n bunkerZ.addbunkerZ();\n }\n \n if(isTouching(DepositoZ.class) && cristalZ.cristalZ() > 0 && bunkerZ.bunkerZ() < 400 ){\n \n cristalZ.removeCristalZ();\n bunkerZ.addbunkerZ();\n }\n \n //determinar si la vida llega a 0\n \n if( vidaCZ.vidaCZ <= 0 )\n {\n \n getWorld().removeObjects(getWorld().getObjects(EnergiaConstrucZ.class)); \n \n getWorld().removeObjects(getWorld().getObjects(ConstructorZerg.class));\n \n EnergiaZerg energiaZ = mapa.getEnergiaZerg(); \n \n energiaZ.removenergiaCZ();\n }\n \n if( mina1.mina1() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina1.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal1.class));\n \n }\n \n if( mina2.mina2() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina2.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal2.class));\n \n }\n \n if( mina3.mina3() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina3.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal3.class));\n \n }\n \n \n}", "public void abstractUpdateAI()\n {\n player.setClock(player.getClock()+1);\n \n if (player.getClock() > 15 && player.getAlive()) { \n updateAI();\n } \n }", "public void update(){\n\t\tthis.game.atacarZombies(this.x, this.y, this.damage, 1, false); //Misma fila\n\t\tthis.game.atacarZombies(this.x-1, this.y, this.damage, 1, false); //Fila arriba\n\t\tthis.game.atacarZombies(this.x+1, this.y, this.damage, 1, false); //Fila abajo\n\t\tthis.turno++;\n\t}", "public void update() {\n\n if (!isSelected){\n goalManagement();\n }\n\n if (chair != null){ // si une chaise lui est désigné\n if (!hasAGoal && !isSelected){ // et qu'il n'a pas d'objectif\n setSit(true);\n position.setX(chair.getX());\n }\n\n if (isSit){\n chair.setChairState(Chair.ChairState.OCCUPIED);\n }else {\n chair.setChairState(Chair.ChairState.RESERVED);\n }\n }\n\n if (tired > 0 ){\n tired -= Constants.TIRED_LOSE;\n }\n\n if (isSit && comfort>0){\n comfort -= Constants.COMFORT_LOSE;\n }\n\n if (isSitOnSofa && comfort<100){\n comfort += Constants.COMFORT_WIN;\n }\n\n if (!hasAGoal && moveToCoffee && coffeeMachine!=null){\n moveToCoffee = false;\n tired=100;\n\n coffeeMachine.setCoffeeTimer(new GameTimer()) ;\n coffeeMachine.getCoffeeTimer().setTimeLimit(Constants.COFFEE_TIME_TO_AVAILABLE);\n coffeeMachine = null;\n backToSpawn();\n }\n\n if (!hasAGoal && moveToSofa){\n moveToSofa = false;\n isSitOnSofa = true;\n dir = 0 ;\n position.setY(position.getY()-Constants.TILE_SIZE);\n }\n\n if (isSelected){\n flashingColor ++;\n if (flashingColor > 2 * flashingSpeed){\n flashingColor = 0;\n }\n }\n\n }", "public void doAi(){\n\t\t\tif(MathHelper.getRandom(0, Game.FRAMERATE * 5) == 5){\n\t\t\t\tsetScared(true);\n\t\t\t}\n\t\t\n\t\t//Update rectangle\n\t\tsetRectangle(getX(), getY(), getTexture().getWidth(), getTexture().getHeight());\n\t\t\n\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\n\t\tif(rect.intersects(getRectangle())){\n\t\t\t\n\t\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\t\t\n\t\t\t\t\tsetDestinationX(StateGame.player.getX());\n\t\t\t\t\t\n\t\t\t\t\tsetDestinationY(StateGame.player.getY());\n\t\t\t\t\t\n\t\t\t\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\t\t\treachedDestination = (true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check for collision with jelly\n\t\tint checkedJelly = (0);\n\t\twhile(checkedJelly < EntityJelly.JELLY.size() && EntityJelly.JELLY.get(checkedJelly) != null){\n\t\t\tif(EntityJelly.JELLY.get(checkedJelly).getDead() == false){\n\t\t\t\tif(getRectangle().intersects(EntityJelly.JELLY.get(checkedJelly).getRectangle())){\n\t\t\t\t\tsetHealth(getHealth() - 2);\n\t\t\t\t\tif(MathHelper.getRandom(1, 10) == 10){\n\t\t\t\t\tAnnouncer.addAnnouncement(\"-2\", 60, EntityJelly.JELLY.get(checkedJelly).getX(), EntityJelly.JELLY.get(checkedJelly).getY());\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedJelly++;\n\t\t}\n\t\t\n\t\t//If we're out of health, kill the entity\n\t\tif(getHealth() < 0){\n\t\t\tsetDead(true);\n\t\t}\n\t\t\n\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\tif(reachedDestination == true){\n\t\t\t\tif(getScared() == false){\n\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(getScared() == false){\n\t\t\t\tif(getX() < getDestinationX())\n\t\t\t\t\tsetX(getX() + getSpeed());\n\t\t\t\tif(getX() > getDestinationX())\n\t\t\t\t\tsetX(getX() - getSpeed());\n\t\t\t\tif(getY() < getDestinationY())\n\t\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\tif(getY() > getDestinationY())\n\t\t\t\t\tsetY(getY() - getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void updateBit() {\r\n float frameTime = 10f;\r\n xVel += (xAccel * frameTime);\r\n yVel += (yAccel * frameTime);\r\n\r\n float xS = (xVel / 20) * frameTime; //PROVIDE THE ANGULE OF THE POSITION\r\n float yS = (yVel / 20) * frameTime; // WITH LESS DENOMINADOR THE BALL MOVE IS MORE DIFFICULT\r\n\r\n xPos -= xS;\r\n yPos -= yS;\r\n\r\n if (xPos > xMax) {\r\n xPos = xMax;\r\n } else if (xPos < 0) {\r\n xPos = 0;\r\n }\r\n\r\n if (yPos > yMax) {\r\n yPos = yMax;\r\n } else if (yPos < 0) {\r\n yPos = 0;\r\n }\r\n\r\n\r\n }", "private boolean processMovingObject()\n {\n MovingObject[] ap_objects = p_gsb.ap_MovingObjects;\n for (int li = 0;li < ap_objects.length;li++)\n {\n MovingObject p_obj = ap_objects[li];\n\n if (!p_obj.lg_Active) continue;\n\n if (p_obj.process())\n {\n if (p_obj.i_State == MovingObject.STATE_EXPLODE)\n {\n p_obj.lg_Active = false;\n continue;\n }\n }\n\n if (p_obj.i_State == MovingObject.STATE_EXPLODE) continue;\n\n switch (p_obj.i_Type)\n {\n case MovingObject.TYPE_ARROW:\n {\n p_obj.i_scry -= ARROWSPEED;\n if (p_obj.i_scry <= (0 - p_obj.i_height))\n {\n p_obj.lg_Active = false;\n continue;\n }\n }\n ;\n break;\n case MovingObject.TYPE_ASSAULTER:\n {\n if (getRandomInt(1000) <= p_gsb.i_shotfreq)\n {\n MovingObject p_arrow = p_gsb.getInactiveMovingObject();\n if (p_arrow != null)\n {\n p_arrow.activate(MovingObject.TYPE_ARROW,MovingObject.STATE_UP);\n p_arrow.i_scrx = p_obj.i_scrx;\n p_arrow.i_scry = p_obj.i_scry - p_arrow.i_height;\n }\n }\n\n if (p_obj.i_State != MovingObject.STATE_DOWN) generateLadderAndDamForAssaulter(p_obj);\n\n switch (p_obj.i_State)\n {\n case MovingObject.STATE_LEFT:\n {\n if (p_obj.i_scrx - ASSAULTER_HORZSPEED < 0)\n {\n p_obj.setState(MovingObject.STATE_RIGHT,false);\n }\n else\n {\n p_obj.i_scrx -= ASSAULTER_HORZSPEED;\n }\n }\n ;\n break;\n case MovingObject.STATE_RIGHT:\n {\n if (p_obj.i_scrx + p_obj.i_width + ASSAULTER_HORZSPEED >= i_screenWidth)\n {\n p_obj.setState(MovingObject.STATE_LEFT,false);\n }\n else\n {\n p_obj.i_scrx += ASSAULTER_HORZSPEED;\n }\n }\n ;\n break;\n case MovingObject.STATE_UP:\n {\n p_obj.i_scry -= ASSAULTER_VERTSPEED;\n if ((p_obj.i_scry + (p_obj.i_height >> 1)) / VIRTUALCELL_HEIGHT == 0/*p_gsb.i_playeralt*/) return true;\n }\n ;\n break;\n case MovingObject.STATE_DOWN:\n {\n p_obj.i_scry += ASSAULTER_VERTSPEED;\n int i_cellx = p_obj.i_scrx / VIRTUALCELL_WIDTH;\n int i_celly = (p_obj.i_scry + p_obj.i_height - 1) / VIRTUALCELL_HEIGHT;\n boolean lg_stop = false;\n if (i_celly < FIELD_HEIGHT-p_gsb.i_playeralt)\n {\n if (Assault_GSB.getElement(i_cellx,i_celly) != Assault_GSB.CELL_NONE) lg_stop = true;\n }\n else\n {\n lg_stop = true;\n i_celly--;\n }\n\n if (lg_stop)\n {\n p_obj.i_scry = i_celly * VIRTUALCELL_HEIGHT;\n if (getRandomInt(40) >= 20)\n {\n p_obj.setState(MovingObject.STATE_LEFT,false);\n }\n else\n {\n p_obj.setState(MovingObject.STATE_RIGHT,false);\n }\n }\n }\n ;\n break;\n }\n }\n ;\n break;\n case MovingObject.TYPE_STONE:\n {\n if (p_obj.i_State == MovingObject.STATE_DOWN)\n {\n p_obj.i_scry += STONESPEED;\n if ((p_obj.i_scry + p_obj.i_height) >= FIELD_HEIGHT * VIRTUALCELL_HEIGHT)\n {\n p_obj.i_scry = (FIELD_HEIGHT * VIRTUALCELL_HEIGHT) - p_obj.i_height - 1;\n p_obj.setState(MovingObject.STATE_EXPLODE,false);\n }\n }\n }\n ;\n break;\n }\n }\n return false;\n }", "public void updateGoalPositions() {\n // Convert angle to unit vector\n double downUnitX = MathUtils.quickCos((float) (anchorAngle + Math.PI));\n double downUnitY = MathUtils.quickSin((float) (anchorAngle + Math.PI));\n double sideUnitX = MathUtils.quickCos((float) (anchorAngle + Math.PI / 2));\n double sideUnitY = MathUtils.quickSin((float) (anchorAngle + Math.PI / 2));\n\n // Create troops and set starting positions for each troop\n double topX = anchorX - (width - 1) * unitStats.spacing * sideUnitX / 2;\n double topY = anchorY - (width - 1) * unitStats.spacing * sideUnitY / 2;\n\n // Update troops goal positions\n for (int row = 0; row < aliveTroopsFormation.length; row++) {\n for (int col = 0; col < aliveTroopsFormation[0].length; col++) {\n BaseSingle troop = aliveTroopsFormation[row][col];\n if (troop == null) continue;\n double xGoalSingle;\n double yGoalSingle;\n // If the person is the flanker, go straight to the assigned position in flankers offset.\n if (state == UnitState.FIGHTING) {\n if (row < flankersCount[col]) {\n double offsetSide = flankerOffsets[col].get(row)[0];\n double offsetDown = flankerOffsets[col].get(row)[1];\n xGoalSingle = this.unitFoughtAgainst.getAverageX() + offsetSide * sideUnitX + offsetDown * downUnitX;\n yGoalSingle = this.unitFoughtAgainst.getAverageY() + offsetSide * sideUnitY + offsetDown * downUnitY;\n } else {\n xGoalSingle = topX + col * unitStats.spacing * sideUnitX\n + (row - flankersCount[col]) * unitStats.spacing * downUnitX;\n yGoalSingle = topY + col * unitStats.spacing * sideUnitY\n + (row - flankersCount[col]) * unitStats.spacing * downUnitY;\n }\n } else {\n xGoalSingle = topX + col * unitStats.spacing * sideUnitX\n + row * unitStats.spacing * downUnitX;\n yGoalSingle = topY + col * unitStats.spacing * sideUnitY\n + row * unitStats.spacing * downUnitY;\n }\n // Set the goal and change the state\n troop.setxGoal(xGoalSingle);\n troop.setyGoal(yGoalSingle);\n troop.setAngleGoal(anchorAngle);\n }\n }\n }", "private void updateAi() {\n this.paddleL.setY(this.fakeBall.getY() - this.paddleL.getHeight()/2 + this.fakeBall.getHeight()/2);\n\n // Boundary check\n if (this.paddleL.y < 0) {\n this.paddleL.setY(0);\n } else if (this.paddleL.y + this.paddleL.getHeight() > this.getHeight()) {\n this.paddleL.setY(this.getHeight() - this.paddleL.getHeight());\n }\n }", "private void accelerate() {\r\n\t\tif(physics.angleTo(closestShipPhysics) < 0){\r\n\t\t\tphysics.move(true, RIGHT);\r\n\t\t}\r\n\t\tif(physics.angleTo(closestShipPhysics) > 0){\r\n\t\t\tphysics.move(true, LEFT);\r\n\t\t}\r\n\t\telse{\r\n\t\tphysics.move(true, STRIGHT);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void update() {\n\t\tcanBuild = true;\n\t\tfor (Ship s : SceneManager.sm.currSector.ships) {\n\t\t\tif (!s.isPlayer) {\n\t\t\t\tif (s.cm.distanceTo(p.cm) < 2500) {\n\t\t\t\t\tcanBuild = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (SceneManager.sm.endSector.clear && SceneManager.sm.currSector.pos.isSame(SceneManager.sm.endSector.pos)) {\n\t\t\tSystem.out.println(\"Game WON\");\n\t\t\tthis.setActive(false);\n\t\t\tSceneManager.ws.setActive(true);\n\t\t}\n\t\tif (p.destroyed) {\n\t\t\tSystem.out.println(\"Game LOST\");\n\t\t\tthis.setActive(false);\n\t\t\tSceneManager.ls.setActive(true);\n\t\t}\n\n\t\tshipYard.update();\n\t\tstarMap.update();\n\n\t\t// TODO remove before flight: to draw where mouse is - temp\n\t\t// if (InputManager.mouse[2]) {\n\t\t// System.out.println(InputManager.mPos.toString());\n\t\t// }\n\n\t\tif (InputManager.keys[81])\n\t\t\tp.cmdRotate(false);\n\t\tif (InputManager.keys[69])\n\t\t\tp.cmdRotate(true);\n\t\tif (InputManager.keys[87])\n\t\t\tp.cmdMove(0, 1);\n\t\tif (InputManager.keys[83])\n\t\t\tp.cmdMove(2, 1);\n\t\tif (InputManager.keys[65])\n\t\t\tp.cmdMove(3, 1);\n\t\tif (InputManager.keys[68])\n\t\t\tp.cmdMove(1, 1);\n\t\tif (InputManager.keys[38]) {\n\t\t\tCamera.yOff += 10 * (1 / Camera.scale);\n\t\t\tcamFocus = null;\n\t\t\teyeFocused = false;\n\t\t}\n\t\tif (InputManager.keys[40]) {\n\t\t\tCamera.yOff -= 10 * (1 / Camera.scale);\n\t\t\tcamFocus = null;\n\t\t\teyeFocused = false;\n\t\t}\n\t\tif (InputManager.keys[39]) {\n\t\t\tcamFocus = null;\n\t\t\teyeFocused = false;\n\t\t\tCamera.xOff -= 10 * (1 / Camera.scale);\n\t\t}\n\t\tif (InputManager.keys[37]) {\n\t\t\tcamFocus = null;\n\t\t\teyeFocused = false;\n\t\t\tCamera.xOff += 10 * (1 / Camera.scale);\n\t\t}\n\n\t\t// key to go to build area - b\n\t\tif (canBuild && InputManager.keysReleased[66] || shipYard.clicked) {\n\t\t\tswtichToBuild();\n\t\t}\n\t\tif (InputManager.keysReleased[77] || starMap.clicked) {\n\t\t\tswtichToStarMap();\n\t\t}\n\t\t\n\t\t// key to select a ship - no use atm\n\t\tif (InputManager.mouse[1]) {\n\t\t\t//selected = SceneManager.sm.currSector.getClickShip();\n\t\t\t// now have a ship selected\n\t\t}\n\t\t\n\t\tif(InputManager.keysReleased[32]) {\n\t\t\tcamFocus = p.cm;\n\t\t}\n\n\t\t// key to move the camera to a ship or area\n\t\tif (InputManager.mouseReleased[2]) {\n\t\t\teyeFocused = false;\n\t\t\tif(SceneManager.sm.currSector.getClickShip() != null)\n\t\t\t{\n\t\t\t\tcamFocus = SceneManager.sm.currSector.getClickShip().cm;\n\t\t\t}else if(Camera.toScreen(eyeLoc).distanceTo(InputManager.mPos) < 40){\n\t\t\t\tcamFocus = eyeLoc;\n\t\t\t\teyeFocused = true;\n\t\t\t}else {\n\t\t\t\tcamFocus = Camera.toMap(InputManager.mPos.x, InputManager.mPos.y);\n\t\t\t}\n\t\t}\n\t\tif (partTarget != null && partTarget.health <= 0)\n\t\t\tpartTarget = null;\n\n\t\tif (partTarget == null && target != null)\n\t\t\tp.shoot(target);\n\n\t\tif (partTarget == null && target == null)\n\t\t\tp.ceaseFire();\n\n\t\tif (target != null && InputManager.mouseReleased[3] && !target.destroyed) {\n\t\t\tpartTarget = SceneManager.sm.currSector.getClickShipPart(target);\n\t\t\tp.shoot(partTarget);\n\t\t}\n\n\t\tif (InputManager.mouseReleased[3]) {\n\t\t\ttarget = SceneManager.sm.currSector.getClickShip();\n\t\t\tif (target != null && partTarget == null) {\n\t\t\t\tp.shoot(target);\n\t\t\t}\n\t\t}\n\t\tif (target != null && (target.destroyed || target.isPlayer)) {\n\t\t\ttarget = null;\n\t\t\tpartTarget = null;\n\t\t\tp.ceaseFire();\n\t\t}\n\n\t\tif (camFocus != null)\n\t\t\tCamera.focus(camFocus);\n\t\t// if(selected != null) selected.vel.print();\n\n\t\tSceneManager.sm.currSector.update();\n\t}", "public void gameUpdate()\n {\n\t\tcheckCollisions();\n\t\t\n\t\tif(up)\t\tcraft.accelerat();\t\t\n\t\tif(left)\tcraft.rotateLeft();\n\t\tif(right) \tcraft.rotateRight();\n\t\t\n\t\tcraft.move();\n\t\tmoveAstroids();\n }", "public void act() \n {\n // need to explicitly cast as the World subclass (i.e., Game)\n playField = (Game)getWorld();\n \n // behavior depends on the game status\n if ( playField.getGameStatus() == Status.NOT_PLAYING )\n {\n // don't do anything\n }\n else if ( playField.getGameStatus() == Status.PLAYING )\n {\n move();\n \n /* \n * Check for intersection with the player's paddle \n */\n Paddle possiblePaddle = (Paddle)( getOneObjectAtOffset(-4,0,Paddle.class) );\n if ( possiblePaddle != null )\n {\n // Display debug message\n System.out.printf(\"Ball has intersected with %s\\n\",possiblePaddle.toString());\n \n // compute return angle and increase speed by 10%\n // TODO: Since this code is duplicated elsewhere, I probably \n // should move it into a separate method in this class\n double hitLocation = (this.getExactY()-4.0) - (possiblePaddle.getExactY()-32.0);\n int returnAngle = (int)( 315.0 + (90.0/64.0)*hitLocation );\n getMovement().setDirection( returnAngle );\n getMovement().scale( 1.1 );\n playField.playHighBlip();\n } // end if\n \n /* \n * Check for intersection with the CPU paddle \n */\n CPUPaddle possibleCPUPaddle = (CPUPaddle)( getOneObjectAtOffset(+4,0,CPUPaddle.class) );\n if ( possibleCPUPaddle != null )\n {\n // Display debug message\n System.out.printf(\"Ball has intersected with %s\\n\",possibleCPUPaddle.toString());\n \n // compute return angle and increase speed by 10%\n // TODO: Since this code is duplicated elsewhere, I probably \n // should move it into a separate method in this class\n double hitLocation = (this.getExactY()-4.0) - (possibleCPUPaddle.getExactY()-32.0);\n int returnAngle = (int)( 225.0 - (90.0/64.0)*hitLocation );\n getMovement().setDirection( returnAngle );\n getMovement().scale( 1.1 );\n playField.playHighBlip();\n } // end if\n \n /*\n * If the ball hits the boundary, simply have it reflect off the \n * surface in the opposite Y direction \n */\n Boundary possibleTopBoundary = (Boundary)( getOneObjectAtOffset(0,-4,Boundary.class) );\n Boundary possibleBottomBoundary = (Boundary)( getOneObjectAtOffset(0,4,Boundary.class) );\n if ( possibleTopBoundary != null || possibleBottomBoundary != null )\n {\n getMovement().revertVertical();\n playField.playLowBlip();\n } // end if \n \n // check if the ball has passed the player's paddle\n if ( getExactX() <= 0 )\n {\n playField.updateScore( PLAYER_TWO );\n \n // TODO: Since this code is duplicated elsewhere, I probably \n // should move it into a separate method in this class\n setLocation( playField.GAME_WIDTH / 2, playField.GAME_HEIGHT / 2 );\n getMovement().setNeutral();\n getMovement().add( new Vector( -45 + Greenfoot.getRandomNumber( 90 ), 3.0 ) );\n \n if ( Greenfoot.getRandomNumber( 2 ) == 0 )\n {\n getMovement().revertHorizontal();\n } // end inner if\n \n playField.playLongBeep();\n } // end outer if\n \n // check if the ball has passed the CPU's paddle\n if ( getExactX() >= playField.GAME_WIDTH )\n {\n playField.updateScore( PLAYER_ONE );\n \n // TODO: Since this code is duplicated elsewhere, I probably \n // should move it into a separate method in this class\n setLocation( playField.GAME_WIDTH / 2, playField.GAME_HEIGHT / 2 );\n getMovement().setNeutral();\n getMovement().add( new Vector( -45 + Greenfoot.getRandomNumber( 90 ), 3.0 ) );\n \n if ( Greenfoot.getRandomNumber( 2 ) == 0 )\n {\n getMovement().revertHorizontal();\n } // end inner if\n \n playField.playLongBeep();\n } // end outer if\n \n } \n else if ( playField.getGameStatus() == Status.GAME_OVER )\n {\n playField.removeObject( this );\n } // end multiway if/else\n \n }", "@Override\r\n public void update() {\r\n super.update();\r\n hero.checkForTileCollision(getXOverlap(hero.oldx,hero.oldx+width,hero.x,hero.x+width), getYOverlap(hero.oldy,hero.oldy+hero.height,hero.y, hero.y+hero.height));\r\n int i = 0;\r\n\r\n while (turningPoints[i]!= null)\r\n {\r\n if (intersects(turningPoints[i].x,turningPoints[i].y, turningPoints[i].width,turningPoints[i].height))\r\n {\r\n vx = -vx;\r\n vy = -vy;\r\n }\r\n i++;\r\n }\r\n }", "protected void updatePos()\r\n\t{\r\n\t\t// storing all birds of this flock into ArrayList\r\n\t\tArrayList<Bird> bird_list = new ArrayList<Bird>();\r\n\t\tbird_list = getFlock().getBirds();\r\n\t\tPosition currPos = getPos();\r\n\t\tdouble move_x=0,move_y=0,temp_x=0,temp_y=0,normal=0;\r\n\t\t// taking the current positions\r\n int x = currPos.getX();\r\n int y = currPos.getY();\r\n if (!isleader)\r\n\t\t{\r\n Position leader_pos = getFlock().getLeader().getPos();\r\n setTarget(leader_pos.getX(),leader_pos.getY());\r\n }\r\n\t\t// giving the target positions\r\n int x_target = getTarget().getX();\r\n int y_target = getTarget().getY();\r\n\t\t// if normal is zero give some initial value to normal\r\n\t\tnormal = Math.pow(Math.pow(y_target-y,2)+Math.pow(x_target-x,2),0.5);\r\n\t\tif(normal==0) normal = 10;\r\n\t\tmove_x = ((x_target-x)*getMaxSpeed())/normal;\r\n\t\tmove_y = ((y_target-y)*getMaxSpeed())/normal;\r\n\t\t// checking all other birds in the flock for avoiding collisions\r\n\t\tfor(Bird b:bird_list)\r\n\t\t{\r\n\t\t\ttemp_x = b.getPos().getX();\r\n\t\t\ttemp_y = b.getPos().getY();\r\n\t\t\tnormal = Math.pow(Math.pow(temp_x-x,2)+Math.pow(temp_y-y,2),0.5);\r\n\t\t\t// if distance between two birds is less than 2*maxSpeed,giving the bird\r\n\t\t\t// velocity in other direction and atlast taking resultant\r\n\t\t\tif(normal<2*(getMaxSpeed()+5) && normal!=0)\r\n\t\t\t{\r\n\t\t\t\tmove_x += ((x - temp_x)*getMaxSpeed())/normal;\r\n\t\t\t\tmove_y += ((y - temp_y)*getMaxSpeed())/normal;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// updating the position of the bird by avoiding collisions\r\n\t\tsetPos(x+(int)move_x, y+(int)move_y);\r\n\t}", "public void movbolitas() {\n x += vx;\n y += vy;\n if (x > width || x < 0) {\n vx *= -1;\n }\n if (y > height || y < 0) {\n vy *= -1;\n }\n }", "public void update(){\n if (boatStats.getSpeed() > 0){\n boatStats.setSpeed(boatStats.getSpeed() - boatStats.getDeceleration());\n boatPosition.setPosY(boatPosition.getPosY() + boatStats.getSpeed());\n } else {\n boatStats.setSpeed(0);\n }\n }", "public void update()\n\t{\n\t\tgameTime++;\n\t\tfor(int i = 0; i<gameObj.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < gameObj[i].size(); j++)\n\t\t\t{\n\t\t\t\t/*If the object implements movable\n\t\t\t\t * call the move method in each object\n\t\t\t\t */\n\t\t\t\tif(gameObj[i].get(j) instanceof Imovable)\n\t\t\t\t\t((MovableObject)gameObj[i].get(j)).move();\n\t\t\t\t/*call CheckBlink() method in SpaceStation\n\t\t\t\t * if the time % blinkRate == 0\n\t\t\t\t * the visibility with be switched\n\t\t\t\t */\n\t\t\t\tif(gameObj[i].get(j) instanceof SpaceStation)\n\t\t\t\t\t((SpaceStation)gameObj[i].get(j)).checkBlink(gameTime);\n\t\t\t\t/*check if missiles are out of fuel\n\t\t\t\tand remove if fuel = 0\n\t\t\t\t*/\n\t\t\t\tif(gameObj[i].get(j) instanceof Missile)\n\t\t\t\t\tif(((Missile)gameObj[i].get(j)).getFuel() <= 0)\n\t\t\t\t\t\tgameObj[i].remove(j);\n\t\t\t}\n\t\t}\t\t\n\t\tSystem.out.println(\"World updated\");\n\t}", "public void move(){\n switch(image){\n case 0: // Case 0: Ant moves up/north. If the ant hits the top of the screen the ant will appear at the bottom of it\n this.position[0] -= 1;\n if(this.position[0] < 0){\n this.position[0] = 19;\n }\n break;\n case 1: // Case 1: Ant moves right/east. If the ant hits the right border of the screen the ant will appear at the left border of it\n this.position[1] += 1;\n if(this.position[1] == 20){\n this.position[1] = 0;\n }\n break;\n case 2: // Case 2: Ant moves down/south. If the ant hits the top of the screen the ant will appear at the bottom of it\n this.position[0] += 1;\n if(this.position[0] == 20){\n this.position[0] = 0;\n }\n break;\n case 3: // Case 3: Ant moves left/west. If the ant hits the left border of the screen the ant will appear at the right border of it\n this.position[1] -= 1;\n if(this.position[1] < 0){\n this.position[1] = 19;\n }\n break;\n default: // Default: This shouldn't happen on a normal run. It prints an error.\n System.err.println(\"Something went wrong while the ant was trying to move\");\n }\n }", "@Override\n\tpublic void update_logic()\n\t{\n\t\tArrayList<Double> angleList = new ArrayList<Double>();\n\t\tfor(GameObject item : sightList)\n\t\t{\n\t\t\tangleList.add(ALL.point_direction(x, y, item.getX(), item.getY()));\n\t\t}\n\t\t\n\t\t// only if there is something to run from\n\t\tif (angleList.size() > 0)\n\t\t{\n\t\t\trunFromOthers(angleList);\n\t\t} else {\n\t\t\tmotion_set(direction, 0);\n\t\t}\n\t\t\n\t\t// show a debug message\n\t\tdebugString = Integer.toString(resources);\n\n\t}", "public void AI()\r\n\t{\r\n\t\tRandom random = new Random();\r\n\t\tspeed = random.nextInt(2) + 1;\r\n\t\tif (canMove)\r\n\t\t{\r\n\t\t\tif (randomAxis == 1)\r\n\t\t\t{\r\n\t\t\t\tif (xDestination < this.x)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.x -= this.speed;\r\n\t\t\t\t\tthis.hitBox.addX(-(this.speed));\r\n\t\t\t\t\tdirection = KeysDefiner.LEFT;\r\n\t\t\t\t}\r\n\t\t\t\telse if (xDestination > this.x)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.x += this.speed;\r\n\t\t\t\t\tthis.hitBox.addX(this.speed);\r\n\t\t\t\t\tdirection = KeysDefiner.RIGHT;\r\n\t\t\t\t}\r\n\t\t\t\telse if (xDestination == this.x)\r\n\t\t\t\t\trandomAxis = 2;\r\n\t\t\t}\r\n\t\t\telse if (randomAxis == 2)\r\n\t\t\t{\r\n\t\t\t\tif (yDestination < this.y)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.y -= this.speed;\r\n\t\t\t\t\tthis.hitBox.addY(-(this.speed));\r\n\t\t\t\t\tdirection = KeysDefiner.UP;\r\n\t\t\t\t}\r\n\t\t\t\telse if (yDestination > this.y)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.y += this.speed;\r\n\t\t\t\t\tthis.hitBox.addY(this.speed);\r\n\t\t\t\t\tdirection = KeysDefiner.DOWN;\r\n\t\t\t\t}\r\n\t\t\t\telse if (yDestination == this.y)\r\n\t\t\t\t\trandomAxis = 1;\r\n\t\t\t}\r\n\t\t\tif (yDestination == this.y && xDestination == this.x)\r\n\t\t\t{\r\n\t\t\t\tif (spotsNumber == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\txDestination = random.nextInt(SCREEN_W / 2) * 2;\r\n\t\t\t\t\tyDestination = random.nextInt(SCREEN_H / 2) * 2;\r\n\t\t\t\t\tspotsNumber++;\r\n\t\t\t\t}\r\n\t\t\t\telse if (spotsNumber == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\txDestination = -(SCREEN_W / 21);\r\n\t\t\t\t\tyDestination = -(SCREEN_H / 12);\r\n\t\t\t\t\tspotsNumber++;\r\n\t\t\t\t}\r\n\t\t\t\telse lastDestinationReached = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void Obstaclemove() {\n for (int i = 0; i < getNumberObstacles(); i++) {\n if (ObstacleDeplace.class.isInstance(getObstacle()[i])) {\n getObstacle()[i].setX(getObstacle()[i].getX() - getObstacle()[i].getSpeed());\n\n if (getObstacle()[i].getX() < -200) {\n getObstacle()[i].setX(600);\n getObstacle()[i].setSpeed(randomGenerator.nextFloat());\n }\n }\n setChanged();\n notifyObstacle(i, getObstacle()[i].getX(), getObstacle()[i].getY());\n }\n }", "private void move() {\n acceleration.accelerate(velocity, position);\r\n }", "public void updateACUI() {\n CanDataInfo.CAN_ACInfo mAcInfo = Can.mACInfo;\n Can.mACInfo.Update = 0;\n this.mLeftTemp.setText(mAcInfo.szLtTemp);\n setWindValue(mAcInfo.nWindValue);\n int footWind = mAcInfo.fgDownWind;\n int headWind = mAcInfo.fgParallelWind;\n int winWind = mAcInfo.fgForeWindMode;\n if (i2b(footWind) && i2b(headWind)) {\n setAcMode(1);\n } else if (i2b(headWind)) {\n setAcMode(0);\n } else if (i2b(footWind) && i2b(winWind)) {\n setAcMode(3);\n } else if (i2b(footWind)) {\n setAcMode(2);\n } else if (i2b(winWind)) {\n setAcMode(4);\n } else {\n setAcMode(-1);\n }\n this.mStatusWindow.SetSel(mAcInfo.fgDFBL);\n this.mStatusWindowRear.SetSel(mAcInfo.fgRearLight);\n this.mStatusAc.SetSel(mAcInfo.fgAC);\n this.mStatusAuto.SetSel(mAcInfo.nAutoLight);\n this.mStatusClosed.SetSel(mAcInfo.PWR);\n if (mAcInfo.fgInnerLoop != 0) {\n this.mStatusOutLoop.setStateDrawable(R.drawable.can_rh7_nxh_up, R.drawable.can_rh7_nxh_dn, R.drawable.can_rh7_nxh_dn);\n } else {\n this.mStatusOutLoop.setStateDrawable(R.drawable.can_rh7_wxh_up, R.drawable.can_rh7_wxh_dn, R.drawable.can_rh7_wxh_dn);\n }\n this.mStatusOutLoop.setSelected(true);\n }", "public void update() {\n double newAngle = angle - 90;\n Coordinate nextCenterPointCoordinate = new Coordinate(\n this.centerPointCoordinate.getXCoordinate() - (Constants.BULLET_SPEED * Math.cos(Math.toRadians(newAngle))),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(newAngle)))\n );\n\n\n ArrayList<Wall> walls = new ArrayList<>();\n walls.addAll(TankTroubleMap.getDestructibleWalls());\n walls.addAll(TankTroubleMap.getIndestructibleWalls());\n ArrayList<Coordinate> nextCoordinatesArrayList = makeCoordinatesFromCenterCoordinate(nextCenterPointCoordinate);\n Wall wallToCheck = null;\n for (Wall wall : walls) {\n if (TankTroubleMap.checkOverLap(wall.getPointsArray(), nextCoordinatesArrayList)) {\n wallToCheck = wall;\n }\n }\n\n if (wallToCheck != null) {\n if (horizontalCrash(wallToCheck)) { //if the bullet would only go over horizontal side of any walL\n nextCenterPointCoordinate = flipH();\n } else if (verticalCrash(wallToCheck)) { // if the bullet would only go over vertical side any wall\n nextCenterPointCoordinate = flipV();\n } else {// if the bullet would only go over corner of any wall\n int cornerCrashState = cornerCrash(wallToCheck);\n nextCenterPointCoordinate = flipCorner(cornerCrashState);\n }\n\n if (wallToCheck.isDestroyable()) {//crashing destructible\n //System.out.println(\"bullet damage:\"+ damage);\n //System.out.println(\"wall health:\"+ ((DestructibleWall) wallToCheck).getHealth());\n ((DestructibleWall) wallToCheck).receiveDamage(damage);\n if (((DestructibleWall) wallToCheck).getHealth() <= 0) {\n TankTroubleMap.getDestructibleWalls().remove(wallToCheck);\n }\n bulletsBlasted = true;\n tankTroubleMap.getBullets().remove(this);\n }\n }\n this.centerPointCoordinate = nextCenterPointCoordinate;\n updateArrayListCoordinates();\n\n // Tanks / users\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getUsers().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getUsers().get(i).getUserTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getUsers().get(i).getUserTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getUsers().get(i).getUserTank().getHealth());\n if (tankTroubleMap.getUsers().get(i).getUserTank().getHealth() <= 0) {\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().remove(finalI);\n gameOverCheck();\n if (isUserTank) {\n tankTroubleMap.getUsers().get(tankIndex).getUserTank().setNumberOfDestroyedTank(tankTroubleMap.getUsers().get(tankIndex).getUserTank().getNumberOfDestroyedTank() + 1);\n }\n tankTroubleMap.getAudience().add(tankTroubleMap.getUsers().get(finalI));\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n\n // Tanks / bots\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getBots().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getBots().get(i).getAiTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getBots().get(i).getAiTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getBots().get(i).getAiTank().getHealth());\n if (tankTroubleMap.getBots().get(i).getAiTank().getHealth() <= 0) {\n // System.out.println(\"Blasted Tank.......\");\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().remove(finalI);\n gameOverCheck();\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n }", "private void spawnStuff(PlayScreen screen, float delta) {\n if (stageId!=3 && stageId!=5) {\n isCombatEnabled = true;\n int where;\n boolean spawnRight = true;\n float speed;\n\n\n //Alien Spawn\n if (System.currentTimeMillis() - lastASpawn >= SpawnATimer + extraTimer) {\n speed = (float)(Utils.doRandom(250,400));\n lastASpawn = System.currentTimeMillis();\n int count = 3;\n if (stageId==4) count = 1;\n for (int i = 0; i < count; i++) {\n if (stageId==4){\n speed = (float) (speed*0.75);\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - Alien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - Alien.width, y, Alien.width, Alien.height)))\n hits = true;\n }\n }\n screen.entities.add(new Alien(new Vector2(x, y), 1, screen.alienImages, speed, screen.player));\n }else{\n int x = 0 - Alien.width;\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - Alien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + Alien.width*2 , y, Alien.width, Alien.height)))\n hits = true;\n }\n }\n screen.entities.add(new Alien(new Vector2(x, y), 1, screen.alienImages, speed, screen.player,false));\n }\n }\n }\n //AcidAlien Spawn\n if (System.currentTimeMillis() - lastBSpawn >= SpawnBTimer + extraTimer) {\n speed = 200;\n lastBSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - AcidAlien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - AcidAlien.width, y, AcidAlien.width, AcidAlien.height)))\n hits = true;\n }\n }\n screen.entities.add(new AcidAlien(new Vector2(x, y), screen.alien2Images, screen.acidImage, speed, screen.player));\n }else{\n int x = 0 - AcidAlien.width;\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - AcidAlien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + AcidAlien.width*2, y, AcidAlien.width, AcidAlien.height)))\n hits = true;\n }\n }\n screen.entities.add(new AcidAlien(new Vector2(x, y), screen.alien2Images, screen.acidImage, speed, screen.player,false));\n }\n }\n //FastAlien Spawn\n if (System.currentTimeMillis() - lastCSpawn >= SpawnCTimer + extraTimer) {\n speed= Utils.doRandom(250,400);\n lastCSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - FastAlien.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - FastAlien.width, y, FastAlien.width, FastAlien.height)))\n hits = true;\n }\n }\n screen.entities.add(new FastAlien(new Vector2(x, y), 1, screen.alien3Images,speed, screen.player));\n }else{\n int x = 0 - FastAlien.width;\n int y =0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - FastAlien.height);\n for (int h=0;h<collisions.size();h++){\n if (Collision.checkWalls(collisions.get(h),new Rectangle(x-FastAlien.width*2,y,FastAlien.width,FastAlien.height))) hits = true;\n }\n }\n screen.entities.add(new FastAlien(new Vector2(x, y), 1, screen.alien3Images, speed,screen.player,false));\n }\n\n }\n\n //Item Spawn\n if (System.currentTimeMillis() - lastCapsuleSpawn >= SpawnTimerCapsule ) {\n speed = 500;\n int x = 0;\n int y = 0;\n lastCapsuleSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n x = (int) screen.gameViewport.getWorldWidth();\n y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - BlueBulletItem.width, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n }else{\n x = 0 - BlueBulletItem.width;\n y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + BlueBulletItem.width *2, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n }\n\n int capsule = screen.random.nextInt(2);\n\n if (capsule == 0) {\n if (spawnRight) {\n screen.items.add(new RedBulletItem(x, y, speed, screen.itemRedImages));\n }else{\n screen.items.add(new RedBulletItem(x, y, speed, screen.itemRedImages,false));\n }\n } else if (capsule == 1) {\n if (spawnRight) {\n screen.items.add(new BlueBulletItem(x, y, speed, screen.itemBlueImages));\n }else{\n screen.items.add(new BlueBulletItem(x, y, speed, screen.itemBlueImages,false));\n }\n }\n\n }\n if (System.currentTimeMillis() - lastHealthSpawn >= SpawnTimerHealth) {\n speed = 500;\n lastHealthSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - BlueBulletItem.width, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new GreenCapsuleItem(x, y, speed, screen.itemGreenImages));\n }else{\n int x = 0 - BlueBulletItem.width;\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + BlueBulletItem.width*2, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new GreenCapsuleItem(x, y, speed, screen.itemGreenImages,false));\n }\n }\n /*if (System.currentTimeMillis() - lastBombSpawn >= SpawnTimerBomb) {\n lastBombSpawn = System.currentTimeMillis();\n int x = (int) screen.gameViewport.getWorldWidth();\n int y =0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - PurpleCapsuleItem.height);\n for (int h=0;h<collisions.size();h++){\n if (Collision.checkWalls(collisions.get(h),new Rectangle(x,y,PurpleCapsuleItem.width,PurpleCapsuleItem.height))) hits = true;\n }\n }\n screen.items.add(new PurpleCapsuleItem(x, y, 500, screen.itemPurpleImages));\n }*/\n }else{\n if (stageId==3) {\n //SPACE STAGE\n ///SPAWN ENEMY SHIP:\n //TODO\n if (PlayScreen.entities.size() == 1) {\n isCombatEnabled = false;\n //no enemy spawned, so spawn:\n if (spawnIterator >= killCount) {\n //TODO END STAGE\n } else {\n System.out.println(\"SPAWNS SHIP\");\n spawnIterator++;\n screen.entities.add(new EnemyShipOne(new Vector2(0, 0), 100, screen.enemyShipOne, true, screen.player));\n\n }\n }\n //Items:\n //Item Spawn\n if (System.currentTimeMillis() - lastCapsuleSpawn >= SpawnTimerCapsule) {\n lastCapsuleSpawn = System.currentTimeMillis();\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new BlackBulletItem(x, y, 1000, screen.itemBlackImages));\n\n\n }\n }else{\n if (stageId == 5){\n isCombatEnabled = true;\n float speed;\n boolean spawnRight=true;\n int where=0;\n //TODO FINAL STAGE\n if (!isBossSpawned){\n //TODO\n screen.entities.add(new Boss(new Vector2(PlayScreen.gameViewport.getWorldWidth(),PlayScreen.gameViewport.getWorldHeight()/2 - Boss.height/2),screen.player));\n isBossSpawned=true;\n }\n //Item Spawn\n if (System.currentTimeMillis() - lastCapsuleSpawn >= SpawnTimerCapsule ) {\n speed = 500;\n int x = 0;\n int y = 0;\n lastCapsuleSpawn = System.currentTimeMillis();\n if (stageId==4){\n speed = speed/2;\n where = Utils.doRandom(0,100);\n if (where < 50){\n spawnRight = true;\n }else{\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n x = (int) screen.gameViewport.getWorldWidth();\n y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - BlueBulletItem.width, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n }else{\n x = 0 - BlueBulletItem.width;\n y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + BlueBulletItem.width *2, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n }\n\n int capsule = screen.random.nextInt(2);\n\n if (capsule == 0) {\n if (spawnRight) {\n screen.items.add(new RedBulletItem(x, y, speed, screen.itemRedImages));\n }else{\n screen.items.add(new RedBulletItem(x, y, speed, screen.itemRedImages,false));\n }\n } else if (capsule == 1) {\n if (spawnRight) {\n screen.items.add(new BlueBulletItem(x, y, speed, screen.itemBlueImages));\n }else{\n screen.items.add(new BlueBulletItem(x, y, speed, screen.itemBlueImages,false));\n }\n }\n\n }\n if (System.currentTimeMillis() - lastHealthSpawn >= SpawnTimerHealth) {\n speed = 500;\n lastHealthSpawn = System.currentTimeMillis();\n if (stageId == 4) {\n speed = speed / 2;\n where = Utils.doRandom(0, 1);\n if (where < 50) {\n spawnRight = true;\n } else {\n spawnRight = false;\n }\n\n }\n if (spawnRight) {\n int x = (int) screen.gameViewport.getWorldWidth();\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x - BlueBulletItem.width, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new GreenCapsuleItem(x, y, speed, screen.itemGreenImages));\n } else {\n int x = 0 - BlueBulletItem.width;\n int y = 0;\n boolean hits = true;\n while (hits) {\n hits = false;\n y = screen.random.nextInt((int) screen.gameViewport.getWorldHeight() - BlueBulletItem.height);\n for (int h = 0; h < collisions.size(); h++) {\n if (Collision.checkWalls(collisions.get(h), new Rectangle(x + BlueBulletItem.width * 2, y, BlueBulletItem.width, BlueBulletItem.height)))\n hits = true;\n }\n }\n screen.items.add(new GreenCapsuleItem(x, y, speed, screen.itemGreenImages, false));\n }\n }\n //TODO\n }\n }\n }\n\n //run .update(delta) on all objects\n for (int i=0; i<screen.entities.size();i++){\n screen.entities.get(i).update(delta);\n }\n\n for (int i=0; i<screen.items.size();i++){\n screen.items.get(i).update(delta);\n }\n\n //labels set:\n screen.labelHealth.setText(\"Health: \" + screen.player.health + \"/\" + screen.player.maxHealth);\n if (scoreBased) {\n screen.labelInfo.setText(\"Score: \" + screen.player.score + \"/\" + scoreGoal);\n }else{\n if (killCount>0){\n screen.labelInfo.setText(\"Score: \" + screen.player.score + \"/\" + killCount);\n }else{\n if (boss){\n screen.labelInfo.setText(\"Boss: \"+screen.player.score + \"/\" + Boss.bossHealth);\n }else{\n screen.labelInfo.setText(\"\");\n }\n\n }\n }\n if (this.stageId == 999) {\n screen.labelInfo.setText(\"Score: \" + screen.player.score);\n }\n\n\n }", "public void updateTrifecta() {\n\n\t\taccelX = (xl.getX() - 0) * 9.8 * Math.cos(angleToForward * (Math.PI / 180.0)); //convert from g's\n\t\taccelY = (xl.getY() - 0) * 9.8 * Math.sin(angleToForward * (Math.PI / 180.0));\n\t\taccelZ = (xl.getZ() - 0) * 9.8;\n\t\t\n\t\t//velocity updated by acceleration integral\n\t\tvelX += accelX * dT;\n\t\tvelY += accelY * dT;\n\t\tvelZ += accelZ * dT;\n\t\t\n\t\t//position updated by velocity integral and adjusted for robot rotation\n\t\tposX += velX * dT;\n\t\tposY += velY * dT;\n\t\tposZ += velZ * dT;\n\t}", "private void tick() {\n keyManager.tick();\n if (keyManager.pause == false) {\n if (gameOver) {\n\n // advancing player with colision\n player.tick();\n //if there's a shot.\n\n int alienBombIndex = (int) (Math.random() * aliens.size());\n for (int i = 0; i < aliens.size(); i++) {\n Alien alien = aliens.get(i);\n alien.tick();\n if (shotVisible && shot.intersectAlien(alien)) {\n Assets.hitSound.play();\n alien.setDying(true);\n alien.setDeadCounter(6);\n shotVisible = false;\n }\n \n if(alien.isDead()){\n aliens.remove(i);\n if (aliens.size() == 0) {\n gameOver = false;\n }\n }\n\n alien.act(direction);\n }\n\n //Controlar el movimiento de los aliens\n for (Alien alien : aliens) {\n int x = alien.getX();\n if (x >= getWidth() - 30 && direction != -1) {\n direction = -1;\n alien.setDirection(-1);\n Iterator i1 = aliens.iterator();\n while (i1.hasNext()) {\n Alien a2 = (Alien) i1.next();\n a2.setY(a2.getY() + 15);\n }\n }\n if (x <= 5 && direction != 1) {\n direction = 1;\n alien.setDirection(1);\n Iterator i2 = aliens.iterator();\n while (i2.hasNext()) {\n Alien a = (Alien) i2.next();\n a.setY(a.getY() + 15);\n }\n }\n }\n\n //Controlar el spawning de las bombas\n Random generator = new Random();\n for (Alien alien : aliens) {\n int num = generator.nextInt(15);\n Bomb b = alien.getBomb();\n\n if (num == CHANCE && b.isDestroyed()) {\n b.setDestroyed(false);\n b.setX(alien.getX());\n b.setY(alien.getY());\n }\n\n b.tick();\n if (b.intersecta(player)) {\n Assets.deathSound.play();\n player.die();\n gameOver = false;\n }\n\n }\n\n if (shotVisible) {\n shot.tick();\n }\n if (!player.isDead() && keyManager.spacebar) {\n shoot();\n Assets.shotSound.play();\n }\n for (int i = 0; i < aliens.size(); i++) {\n if (aliens.get(i).getY() > 500) {\n gameOver = false;\n }\n }\n\n }\n }\n /// Save game in file\n if (keyManager.save) {\n try {\n\n vec.add(player);\n vec.add(shot);\n if(keyManager.pause){\n vec.add(new String(\"Pause\")); \n } else if (!gameOver){\n vec.add(new String(\"Game Over\"));\n } else {\n vec.add(new String(\"Active\"));\n }\n for (Alien alien : aliens) {\n vec.add(alien);\n }\n //Graba el vector en el archivo.\n grabaArchivo();\n } catch (IOException e) {\n System.out.println(\"Error\");\n }\n }\n /// Load game\n if (keyManager.load == true) {\n try {\n //Graba el vector en el archivo.\n leeArchivo();\n } catch (IOException e) {\n System.out.println(\"Error en cargar\");\n }\n }\n\n }", "public void update(double delta){\n \tthis.av.update();\n \t\n \t//checar� a cada update se haver� colis�o\n \tfor(int i=0;i<10;i++){\n \t\t//se houver colis�o entre Avatar e os lixos normais, ser�o acrescidos 10 pontos ao player\n\t\t\tif(this.lixo[i].collision(av, lixo[i])){\n\t\t\t\tScorePanel.score += 10;\n\t\t\t}\n\t\t}\n \t\n \t//Checa se todos os lixos Foram coletados\n<<<<<<< HEAD\n \tif(ScorePanel.getScore() == 100 && telaConcluida == false){\n \t\ttelaConcluida = true;\n \t\t//JOptionPane.showMessageDialog(null, \"Fase 1 conclu�da!!!\");\n \t\t//ScorePanel.setScoreToZero();\n=======\n \tif(Garbage.getScore() == 100){\n \t\tJOptionPane.showMessageDialog(null, \"Fase 1 conclu�da!!!\");\n \t\tGarbage.setScoreToZero();\n>>>>>>> c1516bff6596a16ab28a02b04aa726b8350d9899\n \t}\n \t\n \t//se houver colis�o entre Avatar e o lixo especial, ser�o acrescidos 10 segundos a mais para o player\n \tif(lixoEspecial.collision(av, lixoEspecial)){\n \t\tTimerGameplay.tempo += 10; \n \t}\n }\n \n //atualiza renderização\n public void draw(){\n \tthis.repaint();\n }\n\t\n\t@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t/*/limites do campo e coordenadas\n\t\tSystem.out.println(\"ACTION EVENT\");\n\t\t\n\t\tif(this.av.x<0){\n\t\t\tthis.av.vx = 0;\n\t\t\tthis.av.x = 0;\n\t\t}\n\t\t\n\t\tif(this.av.x> 800){\n\t\t\tthis.av.vx = 0;\n\t\t\tthis.av.x = 800;\n\t\t}\n\t\t\n\t\tif(this.av.y<0){\n\t\t\tthis.av.vy = 0;\n\t\t\tthis.av.y = 0;\n\t\t}\n\t\t\n\t\tif(this.av.y> 570){\n\t\t\tthis.av.vy = 0;\n\t\t\tthis.av.y = 570;\n\t\t}\n\t\tthis.av.x = this.av.x + this.av.vx;\n\t\tthis.av.y = this.av.y + this.av.vy;\n\t\t\n\t\t//repaint();//*/\n\t}//*/\n\n\t@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tthis.av.keyPressed(e);\n\t}\n\n\t@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\tthis.av.keyReleased(e);\n\t}\n\n\t@Override\n\tpublic void keyTyped(KeyEvent e) {}", "@Override\n\tpublic void update()\n\t{\n\t\tsuper.update();\n\n\t\tcalcAcceleration();\n\t\tsetVelocity(Vector2D.add(getVelocity(), getAcceleration()));\n\n\t\tcalcVelocity();\n\t\tsetPosition(Vector2D.add(getPosition(), getVelocity()));\n\n\t\tbm.update(getPosition(), getWidth(), getHeight());\n\t}", "@Model\n\tprotected double advanceAy() {\n\t\t\n\t\tList<List<List<Object>>> collisions = getCollisions();\n\t\tif ((!noObjectMovementBlocking(collisions.get(3).get(0)) || collisions.get(3).get(1).contains(Feature.ground)\n\t\t\t\t|| (int) getY() <= 0) && !getJustJumped()) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn -10;\n\t\t}\n\t}", "public void update()\n {\n //Update the asteroids\n for (int i = 0; i < numAsteroids; i++)\n {\n asteroids[i].update(i);\n }\n }", "private void move(){\n \n currentAnimation = idleDown;\n \n if(playerKeyInput.allKeys[VK_W]){\n int ty = (int) (objectCoordinateY - speed + bounds.y) / 16;\n \n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY -= speed;\n currentAnimation = upWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_S]){\n int ty = (int) (objectCoordinateY + speed + bounds.y + bounds.height) / 16;\n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY += speed;\n currentAnimation = downWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_A]){\n int tx = (int) (objectCoordinateX - speed + bounds.x) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX -= speed;\n currentAnimation = sideWalkLeft;\n }\n } \n \n if(playerKeyInput.allKeys[VK_D]){\n int tx = (int) (objectCoordinateX + speed + bounds.x + bounds.width) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX += speed;\n currentAnimation = sideWalkRight;\n }\n } \n \n if(playerKeyInput.allKeys[VK_E]){\n currentAnimation = pickUp;\n } \n }", "private void updatePhysics()\n {\n HashMap<Integer, Spaceship> ships = this.game.getPlayers();\n Collection<Bullet> bullets = this.game.getBullets();\n Collection<Asteroid> asteroids = this.game.getAsteroids();\n\n asteroids.forEach(GameObject::nextStep);\n bullets.forEach(GameObject::nextStep);\n for (Spaceship ship : ships.values()) {\n if (ship.isDestroyed()) continue;\n ship.nextStep();\n\n if (ship.canFireWeapon()) {\n double direction = ship.getDirection();\n bullets.add(\n new Bullet(\n ship.getLocation().getX(),\n ship.getLocation().getY(),\n ship.getVelocity().x + Math.sin(direction) * 15,\n ship.getVelocity().y - Math.cos (direction) * 15\n )\n );\n ship.setFired();\n }\n }\n\n\n this.checkCollisions();\n this.removeDestroyedObjects();\n\n // Every 200 game ticks, try and spawn a new asteroid.\n if (this.updateCounter % 200 == 0 && asteroids.size() < this.asteroidsLimit) {\n this.addRandomAsteroid();\n }\n this.updateCounter++;\n }", "public void update()\n {\n if(RobotMap.manipController.getRawButton(XboxMap.X)==true)\n {\n activateDumpSolenoid(forward);\n }\n\n //when b is pressed, put gate back up\n if(RobotMap.manipController.getRawButton(XboxMap.B)==true)\n {\n activateDumpSolenoid(reverse);\n }\n\n //If A is pressed (auto)\n if(RobotMap.driveController.getRawButton(XboxMap.A)==true)\n {\n if(distanceSensor.checkDistance() < 270 && distanceSensor.checkDistance() != 0)\n {\n activateDumpSolenoid(forward);\n myRobot.setAutoDoneTrue();\n }\n }\n }", "private void move() {\n if(this.movement[0]) {\n moveRight();\n } else {\n moveLeft();\n }\n if(this.movement[1]) {\n moveDown();\n } else {\n moveUp();\n }\n\n //Checking boundaries of the game\n if(this.XPosition + this.ballWidth > instance.getWidth()) {\n this.movement[0] = false;\n } else if(XPosition <= 0) {\n this.movement[0] = true;\n } else if(YPosition <= 0) {\n this.movement[1] = true;\n } else if(YPosition + ballHeight >= instance.getHeight()) {\n instance.missedBall();\n if (instance.getBalls() > 0){\n this.lostLife.play();\n }\n this.XPosition = instance.getWidth() / 2;\n this.YPosition = instance.getHeight() - 43;\n this.movement[1] = false;\n Player.setPlayerX((instance.getWidth() - 111) / 2);\n Player.setPlayerY(instance.getHeight() - 19);\n instance.isPaused(true);\n }\n\n if (this.boundingBox.intersects(this.playerBoundingBox)){\n Rectangle leftHalfOfPlayer = new Rectangle((int)this.playerBoundingBox.getWidth() / 2, (int)this.playerBoundingBox.getHeight(),\n this.playerBoundingBox.x, this.playerBoundingBox.y);\n this.movement[0] = !this.boundingBox.intersects(leftHalfOfPlayer);\n this.movement[1] = false;\n } else {\n // Check if ball collides with brick;\n for (Bricks[] bricks : instance.getBricks()){\n for (Bricks brick: bricks){\n if (brick.collidesWith(new Rectangle(this.XPosition , this.YPosition , this.ballWidth , this.ballHeight))){\n Rectangle iRect = brick.brickHitBox.intersection(this.boundingBox);\n brick.destroy();\n //Sound brickBreak = new Sound(\"res/Break-Sound.wav\");\n this.brickBreak.play();\n // make logic\n this.movement[1] = true;\n if ((this.boundingBox.x+(this.boundingBox.width/2))<(iRect.x+(iRect.width/2))) {\n this.movement[0] = false;\n }\n if ((this.boundingBox.x+(this.boundingBox.width/2))>(iRect.x+(iRect.width/2))) {\n this.movement[0] = true;\n }\n if ((this.boundingBox.y+(this.boundingBox.height/2))<(iRect.y+(iRect.height/2))) {\n this.movement[1] = false;\n }\n }\n }\n }\n\n }\n\n }", "public void update() {\n if (acceleration.x < 0) facing = Direction.LEFT;\n if (acceleration.x > 0) facing = Direction.RIGHT;\n// body.setPosition(location.getX(), location.getY(), layer);\n// body.setRotation(Conversions.mat4fToOdeMat3f(MatrixUtil.rotate(rotation.x, rotation.y, -rotation.z)));\n handleAnimations();\n\n// if (interactingWithX != null || interactingWithY != null) {\n// onInteract(interactingWithX, interactingWithY);\n// if (interactingWithX != null && interactingWithX.equals(interactingWithY)) {\n// interactingWithX.onInteract(this, this);\n// } else {\n// if (interactingWithX != null) interactingWithX.onInteract(this, null);\n// if (interactingWithY != null) interactingWithY.onInteract(null, this);\n// }\n// }\n }", "public void laserUpdate3() {\n\n\t\t// makes laser & ship stay coupled (maybe a better way to do this?)\n\t\tif (StartingClass.downEnemies.get(StartingClass.currentIndex).isMovingY()) {\n\t\t\tcenterY = StartingClass.downEnemies.get(StartingClass.currentIndex).getCenterY();\n\t\t\tcenterX = StartingClass.downEnemies.get(StartingClass.currentIndex).getCenterX();\n\t\t}\n\t\tif (StartingClass.MIDDLE_Y > StartingClass.downLasers.get(StartingClass.currentIndex).getCenterY()) {\n\t\t\tcenterY += 3;\n\t\t} else {\n\t\t\tcenterX = StartingClass.downEnemies.get(StartingClass.currentIndex).getCenterX() + 1;\n\t\t\tcenterY = StartingClass.downEnemies.get(StartingClass.currentIndex).getCenterY();\n\t\t}\n\t}", "public void actualiza() {\n //Determina el tiempo que ha transcurrido desde que el Applet inicio su ejecución\n long tiempoTranscurrido = System.currentTimeMillis() - tiempoActual;\n \n //Guarda el tiempo actual\n \t tiempoActual += tiempoTranscurrido;\n \n //Actualiza la animación con base en el tiempo transcurrido\n if (direccion != 0) {\n barril.actualiza(tiempoTranscurrido);\n }\n \n \n //Actualiza la animación con base en el tiempo transcurrido para cada malo\n if (click) {\n banana.actualiza(tiempoTranscurrido);\n }\n \n \n \n \n //Actualiza la posición de cada malo con base en su velocidad\n //banana.setPosY(banana.getPosY() + banana.getVel());\n \n \n \n if (banana.getPosX() != 50 || banana.getPosY() != getHeight() - 100) {\n semueve = false;\n }\n \n if (click) { // si click es true hara movimiento parabolico\n banana.setPosX(banana.getPosX() + banana.getVelX());\n banana.setPosY(banana.getPosY() - banana.getVelY());\n banana.setVelY(banana.getVelY() - gravity);\n }\n \n if (direccion == 1) { // velocidad de las barrils entre menos vidas menor el movimiento\n barril.setPosX(barril.getPosX() - vidas - 2);\n }\n \n else if (direccion == 2) {\n barril.setPosX(barril.getPosX() + vidas + 2);\n }\n }", "public void move(){\n\t\tswitch(state){\r\n\t\t\tcase ATField.SPRITE_STAND:\r\n\t\t\t\tspriteX = 0;\r\n\t\t\t\tcoords = standbySprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\r\n\t\t\tcase ATField.SPRITE_WALK:\r\n\t\t\t\tif(spriteX >walkSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcoords = walkSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_RUN:\r\n\t\t\t\t\r\n\t\t\t\tif(spriteX >runSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = runSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_JUMP:\r\n\t\t\t\tif(spriteX >5){\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = jumpSprite.get(0);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void update(){\n if(player.getPlaying()) {\n // update player animation.\n player.update();\n // update background animation.\n bg.update();\n // checks if skater has finished falling animation to end the game.\n if (player.animate instanceof FallAnimate && player.animate.getDone()) {\n player.setPlaying(false);\n player.setFall(false);\n System.out.println(\"End \" + player.getPlaying());\n }\n // checks if player has reached required points.\n if(player.getScore() > TARGETSCORE){\n player.setPlaying(false);\n levelCompleted = true;\n levelReset = System.nanoTime();\n }\n // increment jumpcounter while crouched.\n if (player.animate instanceof CrouchingAnimate && (jumpCounter <= 25)) {\n jumpCounter++;\n }\n // Creating Bananas:\n long bananaElapsed = (System.nanoTime() - bananaStartTime) / 1000000;\n if(bananaElapsed > 10500 && MainActivity.difficulty != 0){\n bananas.add(new Banana(BitmapFactory.decodeResource(getResources(),\n R.drawable.bigbanana), WIDTH + 10, (int) (HEIGHT * 0.85), 40, 40, 1));\n bananaStartTime = System.nanoTime();\n }\n //collision detection:\n for (int i = 0; i < bananas.size(); i++) {\n bananas.get(i).update();\n if (collision(bananas.get(i), player)) {\n bananas.remove(i);\n player.setFall(true);\n player.setPlaying(false);\n break;\n }\n // removing bananas when off screen\n if (bananas.get(i).getX() < -100) {\n bananas.remove(i);\n break;\n }\n }\n // Creating Cones:\n long coneElapsed = (System.nanoTime() - coneStartTime) / 1000000;\n if (coneElapsed > 5000) {\n cones.add(new TallBricks(BitmapFactory.decodeResource(getResources(),\n R.drawable.tallbricks), WIDTH + 10, (int) (HEIGHT * 0.59), 100, 161, 1));\n coneStartTime = System.nanoTime();\n }\n // update and check collisions.\n for (int i = 0; i < cones.size(); i++) {\n\n cones.get(i).update();\n if (collision(cones.get(i), player) && MainActivity.difficulty == 0) {\n cones.remove(i);\n player.forceSetScore(-500);\n break;\n }\n\n if (collision(cones.get(i), player) && MainActivity.difficulty != 0) {\n cones.remove(i);\n player.setFall(true);\n break;\n }\n // removing cones when off screen\n if (cones.get(i).getX() < -100) {\n cones.remove(i);\n break;\n }\n\n if((cones.get(i).getX() < player.getX() -15) ){\n cones.remove(i);\n player.setPendingPoints(1000);\n break;\n }\n }\n }\n else if(player.getPlaying() == false && levelCompleted){\n long resetElapsed = (System.nanoTime()-levelReset)/1000000;\n if(resetElapsed > 4000) {\n Intent resultIntent = new Intent();\n resultIntent.putExtra(\"result\",true);\n ((Activity)context).setResult(Activity.RESULT_OK,resultIntent);\n ((Activity)context).finish();\n }\n }\n else if(player.getPlaying() == false && !levelCompleted){\n if(!reset){\n newGameCreated = false;\n startReset = System.nanoTime();\n reset = true;\n }\n\n long resetElapsed = (System.nanoTime()-startReset)/1000000;\n\n if(resetElapsed > 2500 && !newGameCreated){\n newGame();\n }\n else if(resetElapsed < 2500 && started){\n player.update();\n }\n }\n }", "public void updateAcceleration (Body[] bodies) {\n\n boolean collision;\n\n for (int i = 0; i < bodies.length; i ++) {\n\n Body otherBody = bodies[i];\n if (this.merged == false && otherBody.merged == false) {\n collision = this.collisionDetection(otherBody);\n\n // if there's a collision between this and another body, stop the loop\n if (collision == true) {\n this.collisionPhsysics(otherBody);\n System.out.println(\"Collision occured!\");\n break;\n }\n else {\n if (otherBody.name != this.name){ // makes sure a body doesn't calculate acc on itself\n double r = Math.sqrt(Math.pow((this.x - otherBody.x),2) + Math.pow((this.y - otherBody.y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){\n // catch division / 0\n temp_acc = 0;\n }\n this.ax += temp_acc * (otherBody.x - this.x);\n this.ay += temp_acc * (otherBody.y - this.y);\n }\n\n if (otherBody.name != this.name){\n // computes and updates axplusone and ayplusone\n\n double r = Math.sqrt(Math.pow((this.euler_x - otherBody.euler_x),2) + Math.pow((this.euler_y - otherBody.euler_y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){\n temp_acc = 0;\n }\n this.axplusone += temp_acc * (otherBody.euler_x - this.euler_x);\n this.ayplusone += temp_acc * (otherBody.euler_y - this.euler_y);\n }\n }\n }\n }\n\n }", "private void collide() {\n int collisionRange;\n \n if(isObstacle) {\n for(Thing thg: proximity) {\n if(\n thg.isObstacle\n &&\n !thg.equals(this)\n ) {\n collisionRange = (thg.size + this.size)/2;\n deltaA = this.distance(thg);\n \n if( \n Math.abs(deltaA[0]) <= collisionRange\n &&\n Math.abs(deltaA[1]) <= collisionRange\n ){\n if(deltaA[0] > deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == 1) {\n dA[0] = 0;\n }\n }\n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == -1) {\n dA[1] = 0;\n }\n }\n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n if(dA[0] != 0) {\n dA[1] = dA[0];\n }\n if(dA[1] != 0) {\n dA[0] = dA[1];\n }\n }\n }\n \n if(deltaA[0] < deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == -1) {\n dA[0] = 0;\n }\n } \n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == 1) {\n dA[1] = 0;\n }\n } \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = dA[0];\n }\n }\n \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = -dA[0];\n }\n }\n }\n }\n }\n }", "public void update(){\n if(newPlayer.getRunning()) {\n\n if (botborder.isEmpty())\n {\n newPlayer.setRunning(false);\n return;\n }\n if (topborder.isEmpty())\n {\n newPlayer.setRunning(false);\n return;\n }\n\n background.update();\n newPlayer.update();\n\n\n //A threshold that the border can have based on the score\n maxBorderHeight = 30+newPlayer.getScore()/difficulty;\n if (maxBorderHeight > height/4){\n maxBorderHeight = height/4;\n minBorderHeight = 5+newPlayer.getScore()/difficulty;\n }\n\n for (int i = 0; i < topborder.size(); i++){\n if (collision(topborder.get(i), newPlayer)){\n newPlayer.setRunning(false);\n }\n }\n for (int i = 0; i < botborder.size(); i++){\n if (collision(botborder.get(i), newPlayer)){\n newPlayer.setRunning(false);\n }\n }\n\n this.updateTopBorder();\n //Create the borders\n this.updateBotBorder();\n\n //Adds smoke from spaceship from the timer\n long timeElapsed = (System.nanoTime() - outTimer)/1000000;\n if(timeElapsed > 120){\n effect.add(new Effects(newPlayer.getX(), newPlayer.getY()+30)); //Balls will appear out of backside of spaceship.\n outTimer = System.nanoTime();\n }\n for (int i = 0; i < effect.size(); i++){\n //Go through every ball and then update\n effect.get(i).update();\n if (effect.get(i).getX()<-10){\n effect.remove(i); //Removes the balls that are off the screen\n }\n }\n\n //Adds enemies in, first one in middle, rest are random\n long enemyElapsed = (System.nanoTime()- enemyStart)/1000000;\n //Higher the score is, the less delay there is\n if (enemyElapsed> (1500 - newPlayer.getScore()/4)){\n\n if (enemy.size() == 0){\n enemy.add(new Enemy(BitmapFactory.decodeResource(getResources(),R.drawable.enemy1), width+10, height + 50,25, 30, 30, 1));\n }\n else {\n enemy.add(new Enemy(BitmapFactory.decodeResource(getResources(),R.drawable.enemy1), width + 10, (int) (rng.nextDouble()*(height-(maxBorderHeight*2))+maxBorderHeight),25,30, newPlayer.getScore(), 1));\n }\n //Reset Timer\n enemyStart = System.nanoTime();\n\n }\n\n long shipElapsed = (System.nanoTime()-secondaryTimer)/1000000;\n\n\n if (newPlayer.getScore() == 150){\n level = 2;\n }\n\n //Randomised spot for secondary enemy\n if (newPlayer.getScore()%150==0) {\n if (newEnemy.size() == 0) {\n newEnemy.add(new secondaryEnemy(BitmapFactory.decodeResource(getResources(), R.drawable.enemy2), width + 5, (int) (rng.nextDouble() * (height - (maxBorderHeight * 2)) + maxBorderHeight), 32, 26, 5, 1));\n newEnemy.add(new secondaryEnemy(BitmapFactory.decodeResource(getResources(), R.drawable.enemy2), width + 5, (int) (rng.nextDouble() * (height - (maxBorderHeight * 2)) + maxBorderHeight), 32, 26, 5, 1));\n }\n\n secondaryTimer = System.nanoTime();\n }\n\n long thirdElapsed = (System.nanoTime()- tertiaryTimer)/1000000;\n\n if (newPlayer.getScore() == 300){\n level = 3;\n }\n if (level == 3) {\n if (enemyElapsed> (1500 - newPlayer.getScore()/4))\n\n //CHANGE THIS YOU PLEB!!!!\n if (thirdEnemy.size() == 0) {\n thirdEnemy.add(new thirdShip(BitmapFactory.decodeResource(getResources(), R.drawable.longship), width + 10, (int) (rng.nextDouble() * (height - (maxBorderHeight * 2)) + maxBorderHeight), 31, 49, 45, 1));\n } else {\n thirdEnemy.add(new thirdShip(BitmapFactory.decodeResource(getResources(), R.drawable.longship), width + 10, (int) (rng.nextDouble() * (height - (maxBorderHeight * 2)) + maxBorderHeight), 31, 49, newPlayer.getScore()/4, 1));\n }\n\n //Reset Timer\n tertiaryTimer = System.nanoTime();\n }\n\n //Go through every enemy and collision will check if two game objects are colliding.\n for (int i = 0; i < enemy.size(); i++){\n enemy.get(i).update();\n if(collision(enemy.get(i), newPlayer)){\n enemy.remove(i);\n newPlayer.setRunning(false);\n break;\n }\n if (enemy.get(i).getX()<-100){\n enemy.remove(i);\n break;\n }\n }\n\n for (int i = 0; i < newEnemy.size(); i++) {\n newEnemy.get(i).update();\n if (collision(newEnemy.get(i), newPlayer)) {\n newEnemy.remove(i);\n newPlayer.setRunning(false);\n break;\n }\n if (newEnemy.get(i).getX() < -100) {\n newEnemy.remove(i);\n break;\n }\n }\n\n for (int i = 0; i < thirdEnemy.size(); i++) {\n thirdEnemy.get(i).update();\n if (collision(thirdEnemy.get(i), newPlayer)) {\n thirdEnemy.remove(i);\n newPlayer.setRunning(false);\n break;\n }\n if (thirdEnemy.get(i).getX() < -100) {\n thirdEnemy.remove(i);\n break;\n }\n }\n\n }\n else {\n //Reset the acceleration of the player, if not reset then the start death animation will occur and everything will reset\n newPlayer.resetAcceleration();\n if (!reset){\n gamenew = false;\n startDeath = System.nanoTime();\n reset = true;\n disappear = true;\n death = new deathAnimation(BitmapFactory.decodeResource(getResources(),R.drawable.damage), newPlayer.getX(),newPlayer.getY()-30,329,137,1);\n level = 1;\n }\n death.update();\n\n long timeElapsed = (System.nanoTime()-startDeath)/1000000;\n\n //If time has passed and there is no new game yet, then create a new game.\n if (timeElapsed > 2500 && !gamenew){\n newGame();\n }\n\n }\n }", "public static StateVector acceleration( StateVector state, int ai ){\r\n double x, y, z, r, a;\r\n double G = 6.671984315419034E-11; // G = NASA mu / b[0].m Orbit3D sep 2017 value\r\n a = 0;\r\n StateVector acc = new StateVector();\r\n StateVector s = new StateVector();\r\n\r\n acc.copyStateVectors( state ); // set accelerations to zero\r\n acc.ax = 0;\r\n acc.ay = 0;\r\n acc.az = 0;\r\n\r\n for( int n=0; n<ap.ss.nbodies; n++ ) {\r\n if ( body.activated && body.inFreeMotion && (n != body.num) && (ap.ss.b[n].status == 3) ) {\r\n\r\n x = state.x - ap.ss.b[n].advanced[ai].x; // x distance from m\r\n y = state.y - ap.ss.b[n].advanced[ai].y; // y distance .. ..\r\n z = state.z - ap.ss.b[n].advanced[ai].z; // z distance .. ..\r\n r = Math.sqrt(x * x + y * y + z * z); // distance .. ..\r\n\r\n // only find interactions with massive bodies > 1 kg mass\r\n if ( ap.ss.b[n].m > 1.0 ) {\r\n\r\n // gravitational accelerations act on bodies if > 5 metres distance (to avoid large accelarations)\r\n if ( ap.ss.b[n].status == 3 && ap.ss.b[n].activated && ( r > 5.0 ) ) {\r\n a = -(G * ap.ss.b[n].m) / (r * r); // acceleration towards that\r\n acc.ax = acc.ax + a * x / r; // x component of accel\r\n acc.ay = acc.ay + a * y / r; // y component of accel\r\n acc.az = acc.az + a * z / r; // z component of accel\r\n }\r\n }\r\n }\r\n }\r\n\r\n return( acc );\r\n }", "public void update() {\n if(triCollide(safeSpace, radius)==false) {\n if (triCollide(collisionRectangle, radius-10)) {\n if(survivor==true) {\n Intent intent = new Intent(getApplicationContext(), Main3Activity.class);\n intent.putExtra(\"level\", level);\n startActivity(intent);\n finish();\n } else {\n Intent intent = new Intent(getApplicationContext(), Main3Activity.class);\n intent.putExtra(\"survivor\", false);\n intent.putExtra(\"level\", level);\n intent.putExtra(\"completed\", false);\n startActivity(intent);\n finish();\n }\n }\n }\n boolean win = false;\n\n if(xPosition>=width || xPosition<=0 || yPosition>=(height-100) || yPosition<=0) {\n if(survivor==true) {\n Intent intent = new Intent(getApplicationContext(), Main2Activity.class);\n //System.out.println(\"LEVEL\" + level);\n intent.putExtra(\"level\", level);\n intent.putExtra(\"offsetX\", offsetX);\n intent.putExtra(\"offsetY\", offsetY);\n intent.putExtra(\"innerOffsetX\", innerOffsetX);\n intent.putExtra(\"innerOffsetY\", innerOffsetY);\n intent.putExtra(\"speed\", speed);\n intent.putExtra(\"changeColors\", changeColors);\n intent.putExtra(\"numLines\", numLines);\n intent.putExtra(\"collRectLength\", collRectLength);\n startActivity(intent);\n finish();\n } else {\n Intent intent = new Intent(getApplicationContext(), Main2Activity.class);\n intent.putExtra(\"survivor\", false);\n intent.putExtra(\"level\", level);\n intent.putExtra(\"completed\", true);\n startActivity(intent);\n finish();\n }\n }\n\n if(count>=0) {\n if ((initialX >= endX && xPosition <= initialX && xPosition >= endX) || (initialX <= endX && xPosition >= initialX && xPosition <= endX)) {\n if ((initialY >= endY && yPosition <= initialY && yPosition >= endY) || (initialY <= endY && yPosition >= initialY && yPosition <= endY)) {\n if (fingerUp) {\n double t = dX * (xPosition - initialX) + dY * (yPosition - initialY);\n double eX = t * dX + initialX;\n double eY = t * dY + initialY;\n double LEC = Math.sqrt(Math.pow((eX - xPosition), 2) + Math.pow((eY - yPosition), 2));\n\n if (LEC <= radius) {\n //double dt = Math.sqrt(625-Math.pow(LEC, 2));\n // compute first intersection point\n //double fX = (t-dt)*dX + initialX;\n //double fY = (t-dt)*dY + initialY;\n\n // compute second intersection point\n //double gX = (t+dt)*dX + initialX;\n //double gY = (t+dt)*dY + initialY;\n ball = new Vector2f(xPosition - ballInitialX, yPosition - ballInitialY);\n Vector2f ballProjLine = ball.proj(line);\n Vector2f ballPerpLine = ball.sub(ballProjLine);\n Vector2f newBall = ballProjLine.sub(ballPerpLine);\n //System.out.println(multiplier);\n walkSpeedPerSecond = walkSpeedPerSecond * multiplier * (newBall.x() / ball.x());\n vertical_speed = vertical_speed * multiplier * (newBall.y() / ball.y());\n //System.out.println(randomNum + \" color randomNum\");\n\n color = lineColor;\n\n hasHit = true;\n initialX = 0;\n initialY = 0;\n endX = 0;\n endY = 0;\n ballInitialX = xPosition;\n ballInitialY = yPosition;\n }\n }\n }\n }\n }\n if(fps!=0 && hasTouched == true){\n\n xPosition = xPosition + (walkSpeedPerSecond / fps);\n yPosition = yPosition + (vertical_speed / fps);\n }\n\n }", "public void movement()\n\t{\n\t\tballoonY = balloonY + speedBalloonY1;\n\t\tif(balloonY > 700)\n\t\t{\n\t\t\tballoonY = -50;\n\t\t\tballoonX = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon2Y = balloon2Y + speedBalloonY2;\n\t\tif(balloon2Y > 700)\n\t\t{\n\t\t\tballoon2Y = -50;\n\t\t\tballoon2X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon3Y = balloon3Y + speedBalloonY3;\n\t\tif(balloon3Y > 700)\n\t\t{\n\t\t\tballoon3Y = -50;\n\t\t\tballoon3X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon4Y = balloon4Y + speedBalloonY4;\n\t\tif(balloon4Y > 700)\n\t\t{\n\t\t\tballoon4Y = -50;\n\t\t\tballoon4X = (gen.nextInt(900)-75);\n\t\t}\n\t\t\n\t\tballoon5Y = balloon5Y + speedBalloonY5;\n\t\tif(balloon5Y > 700)\n\t\t{\n\t\t\tballoon5Y = -50;\n\t\t\tballoon5X = (gen.nextInt(900)-75);\n\t\t}\n\t}", "private void UpdateAcceleration()\n\t{\n\t\tVector2 newAcceleration = new Vector2(0,0);\n\t\t\n\t\tfor(int i=0;i<forcesList.size();i++)\n\t\t{\n\t\t\tnewAcceleration.x += forcesList.get(i).force.x / mass;\n\t\t\tnewAcceleration.y += forcesList.get(i).force.y / mass;\n\t\t\t\n\t\t\tif(forcesList.get(i).mode == ForceMode.Impulse)\n\t\t\t{\n\t\t\t\tRemoveForce(forcesList.get(i));\n\t\t\t}\n\t\t}\n\t\tacceleration = newAcceleration;\n\t\t\n\t\tfloat newAngularAcc = 0;\n\t\t\n\t\tfor(int i=0;i<torqueList.size();i++)\n\t\t{\n\t\t\tnewAngularAcc += torqueList.get(i).torqueVal / mass;\n\t\t\tif(torqueList.get(i).mode == ForceMode.Impulse)\n\t\t\t{\n\t\t\t\tRemoveTorque(torqueList.get(i));\n\t\t\t}\n\t\t}\n\t\tangularAcceleration = newAngularAcc;\n\t\t\n\t}", "public void updateAccelerations(double xLimit, double yLimit) {\n // Loop all entities and update their accelerations in parallel\n entities.parallelStream().forEach(cur -> {\n int alignmentNeighbors = 0;\n int cohesionNeighbors = 0;\n int separationNeighbors = 0;\n Vector2D alignment = new Vector2D();\n Vector2D cohesion = new Vector2D();\n Vector2D separation = new Vector2D();\n\n // Use nearby entities to determinate forces\n for (Entity ee : entities) {\n if (ee == cur) continue;\n //if (cur.angleToEntity(ee) > detectionAngleBox.val/2) continue;\n double dist = Math.max(cur.distanceFrom(ee), 0.001);\n\n if (dist < alignmentDistanceBox.val) {\n alignmentNeighbors++;\n alignment.add(ee.getVelocity());\n }\n if (dist < cohesionDistanceBox.val) {\n cohesionNeighbors++;\n cohesion.add(ee.getPosition());\n }\n if (dist < separationDistanceBox.val) {\n separationNeighbors++;\n separation.add(new Vector2D(cur.getPosition()).subtract(ee.getPosition())\n .ensureDirection()\n .divide(dist*dist));\n }\n }\n\n if (alignmentNeighbors != 0)\n alignment\n .divide(alignmentNeighbors)\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n if (cohesionNeighbors != 0)\n cohesion\n .divide(cohesionNeighbors)\n .subtract(cur.getPosition())\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n if (separationNeighbors != 0)\n separation\n .divide(separationNeighbors)\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n\n cur.getAcceleration()\n .add(alignment.multiply(alignmentMultiplierBox.val))\n .add(cohesion.multiply(cohesionMultiplierBox.val))\n .add(separation.multiply(separationMultiplierBox.val))\n .limit(maxSpeedBox.val);\n\n // Border force\n double bfX = cur.getX() < xLimit/2 ? 100/Math.pow(cur.getX(),2) : -100/Math.pow(xLimit - cur.getX(),2);\n double bfY = cur.getY() < yLimit/2 ? 100/Math.pow(cur.getY(),2) : -100/Math.pow(yLimit - cur.getY(),2);\n cur.getAcceleration().add(new Vector2D(bfX, bfY)).limit(maxSpeedBox.val);\n });\n }", "@Override\n\tpublic void RacialAIUpdate(CharactherComponent cc, AIComponent aic, float delta, PositionComponent pc,\n\t\t\tVelocityComponent vc) {\n\n\t}", "public void act() \n {\n movegas();\n \n atingido2(); \n \n }", "public void update() {\n super.update();\n // Code specific to the ship gameObject\n action = ctrl.action();\n direction.rotate(action.turn * STEER_RATE * Constants.DT);\n velocity.addScaled(direction, (MAG_ACC * Constants.DT * action.thrust));\n position.addScaled(velocity, DRAG * Constants.DT);\n position.wrap(Constants.FRAME_WIDTH, Constants.FRAME_HEIGHT);\n\n // Checks if the user is pressing forwards\n if(action.thrust == 1){\n thrusting = true;\n } else{\n thrusting = false;\n }\n time -= 1;\n if(action.shoot && time <= 0){\n mkBullet();\n time = 30;\n }\n\n if(invincible)\n color = Color.blue;\n else\n color = Color.cyan;\n }", "void update() {\n for( int i= 0; i < masses.length; i++) {\n masses[i].posX += masses[i].vx*dt;\n masses[i].posY += masses[i].vy*dt;\n }\n\n for( int i = 0; i < springs.length; i++) {\n if( !springs[i].mass1.fixed ) {\n springs[i].mass1.vx += ( springs[i].forceX() + nx(springs[i].mass1)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass1.vx ) * dt;\n springs[i].mass1.vy += ( springs[i].forceY() + ny(springs[i].mass1)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass1.vy ) * dt;\n }\n\n if( !springs[i].mass2.fixed ) {\n springs[i].mass2.vx += ( (-1)*springs[i].forceX() + nx(springs[i].mass2)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass2.vx ) * dt;\n springs[i].mass2.vy += ( (-1)*springs[i].forceY() + ny(springs[i].mass2)*Math.pow(dist(springs[i].mass1)/(width*Math.sqrt(2)),2) - 0.005*springs[i].mass2.vy ) * dt;\n }\n }\n }", "public AABB a(World paramaqu, BlockPosition paramdt, Block parambec, float paramFloat, EnumDirection paramej)\r\n/* 147: */ {\r\n/* 148:175 */ if ((parambec.getType() == this) || (parambec.getType().getMaterial() == Material.air)) {\r\n/* 149:176 */ return null;\r\n/* 150: */ }\r\n/* 151:178 */ AABB localbrt = parambec.getType().a(paramaqu, paramdt, parambec);\r\n/* 152:180 */ if (localbrt == null) {\r\n/* 153:181 */ return null;\r\n/* 154: */ }\r\n/* 155:184 */ double d1 = localbrt.minX;\r\n/* 156:185 */ double d2 = localbrt.minY;\r\n/* 157:186 */ double d3 = localbrt.minZ;\r\n/* 158:187 */ double d4 = localbrt.maxX;\r\n/* 159:188 */ double d5 = localbrt.maxY;\r\n/* 160:189 */ double d6 = localbrt.maxZ;\r\n/* 161:192 */ if (paramej.g() < 0) {\r\n/* 162:193 */ d1 -= paramej.g() * paramFloat;\r\n/* 163: */ } else {\r\n/* 164:195 */ d4 -= paramej.g() * paramFloat;\r\n/* 165: */ }\r\n/* 166:197 */ if (paramej.h() < 0) {\r\n/* 167:198 */ d2 -= paramej.h() * paramFloat;\r\n/* 168: */ } else {\r\n/* 169:200 */ d5 -= paramej.h() * paramFloat;\r\n/* 170: */ }\r\n/* 171:202 */ if (paramej.i() < 0) {\r\n/* 172:203 */ d3 -= paramej.i() * paramFloat;\r\n/* 173: */ } else {\r\n/* 174:205 */ d6 -= paramej.i() * paramFloat;\r\n/* 175: */ }\r\n/* 176:207 */ return new AABB(d1, d2, d3, d4, d5, d6);\r\n/* 177: */ }", "private void updatePos() {\n var ballBounds = ball.getMesh().getRelativeRectangleBounds().getBounds2D();\n var hookBallBounds = hook.getHookBall().getMesh().getRelativeRectangleBounds().getBounds2D();\n var ballCenter = new Vector2(ballBounds.getCenterX(), ballBounds.getCenterY());\n var hookBallCenter = new Vector2(hookBallBounds.getCenterX(), hookBallBounds.getCenterY());\n fullDirection = hookBallCenter.subtracted(ballCenter);\n var oposDir = ballCenter.subtracted(hookBallCenter).normalized();\n oposDir.multiplyBy(hookBallBounds.getWidth() / 2);\n hookBallCenter.add(oposDir);\n direction = hookBallCenter.subtracted(ballCenter);\n getTransform().setPosition(ballCenter);\n getTransform().setRotation(GeometryHelper.vectorToAngle(hookBallCenter.subtracted(ballCenter)));\n getTransform().translate(0, -GameSettings.ROPE_HEIGHT / 2 - 1);\n }", "public void tick()\n\t{\n\t\tgameTime++;\n\t\tif(gameTime == 1)\n\t\t\taddPlayerShip();\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif (current instanceof Imovable)\n\t\t\t\t((MovableObject)current).move(fps);\n\t\t\tif (current instanceof SpaceStation)\n\t\t\t\t((SpaceStation)current).checkBlink(gameTime);\n\t\t\tif(current instanceof Missile)\n\t\t\t\tif(((Missile) current).getFuel() <= 0)\n\t\t\t\t\titer.remove();\n\t\t}\n\t\t\n\t\t//Identify collision\n\t\titer = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tICollider curObj = (ICollider)iter.getNext();\n\t\t\t\n\t\t\tIIterator iter2 = gameObj.getIterator();\n\t\t\twhile(iter2.hasNext())\n\t\t\t{\n\t\t\t\tICollider otherObj = (ICollider)iter2.getNext();\n\t\t\t\tif(otherObj != curObj)\n\t\t\t\t\tif(curObj.collidesWith(otherObj))\n\t\t\t\t\t\tif (curObj instanceof PlayerShip)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcollisionVectorPS.add(curObj);\n\t\t\t\t\t\t\tcollisionVectorPS.add(otherObj);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(curObj instanceof NonPlayerShip)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcollisionVectorNPS.add(curObj);\n\t\t\t\t\t\t\tcollisionVectorNPS.add(otherObj);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(curObj instanceof Asteroid)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(collisionVectorAsteroid.isEmpty())\n\t\t\t\t\t\t\t\tcollisionVectorAsteroid.add(curObj);\n\t\t\t\t\t\t\tcollisionVectorAsteroid.add(otherObj);\t\t\t\n\t\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Handle Collisions for playership\n\t\tif(!collisionVectorPS.isEmpty())\n\t\t{\n\t\t\t//return iterator for collion vector\n\t\t\tIterator<ICollider> psIterator = collisionVectorPS.iterator();\n\t\t\tICollider ship = collisionVectorPS.elementAt(0);\n\t\t\twhile(psIterator.hasNext())\n\t\t\t{\n\t\t\t\tICollider curObj = psIterator.next();\n\t\t\t\tif(curObj != ship)\n\t\t\t\t\tship.handleCollision(curObj);\n\t\t\t\t\n\t\t\t\t//if an asteroid is detected\n\t\t\t\tif(curObj instanceof Asteroid)\n\t\t\t\t\tcrashAsteroidPS(psIterator,curObj,ship);\n\t\t\t\t\n\t\t\t\t//if an enemy missile is detected\n\t\t\t\telse if(curObj instanceof Missile && ((Missile)curObj).isEnemy())\n\t\t\t\t\tPSShot(psIterator,curObj,ship);\n\t\t\t\t\n\t\t\t\t//if a non player ship is detected\n\t\t\t\telse if(curObj instanceof NonPlayerShip)\n\t\t\t\t\tthis.crashNPS(psIterator,curObj,ship);\n\t\t\t\t\n\t\t\t\telse if(curObj instanceof SpaceStation)\n\t\t\t\t\tthis.refillMissiles(psIterator,curObj,ship);\n\t\t\t}\n\t\t\t//clear the collision vector and spawn a new ship\n\t\t\tcollisionVectorPS.clear();\n\t\t\t\n\t\t}\n\t\tif(!collisionVectorNPS.isEmpty())\n\t\t{\n\t\t\t//return iterator for collion vector\n\t\t\tIterator<ICollider> npsIterator = collisionVectorNPS.iterator();\n\t\t\tICollider nps = collisionVectorNPS.elementAt(0);\n\t\t\twhile(npsIterator.hasNext())\n\t\t\t{\n\t\t\t\tICollider curObj = npsIterator.next();\n\t\t\t\tif(curObj != nps)\n\t\t\t\t\tnps.handleCollision(curObj);\n\t\t\t\tif(curObj instanceof Missile && !((Missile)curObj).isEnemy())\n\t\t\t\t\tthis.NPSShot(npsIterator,curObj,nps);\n\t\t\t\telse if(curObj instanceof Asteroid)\n\t\t\t\t\tthis.crashAsteroidNPS(npsIterator,curObj,nps);\n\t\t\t\telse if(curObj instanceof SpaceStation)\n\t\t\t\t\tthis.refillMissiles(npsIterator,curObj,nps);\n\t\t\t}\n\t\t\tcollisionVectorNPS.clear();\n\t\t}\n\t\tif(!collisionVectorAsteroid.isEmpty())\n\t\t{\n\t\t\tIterator<ICollider> astIterator = collisionVectorAsteroid.iterator();\n\t\t\tICollider ast = collisionVectorAsteroid.elementAt(0);\n\t\t\twhile(astIterator.hasNext())\n\t\t\t{\n\t\t\t\tICollider curObj = astIterator.next();\n\t\t\t\tif(curObj != ast)\n\t\t\t\t\tast.handleCollision(curObj);\n\t\t\t\tif(curObj instanceof Missile && !((Missile)curObj).isEnemy())\n\t\t\t\t\tthis.asteroidShot(astIterator,curObj,ast);\n\t\t\t\telse if(curObj instanceof Asteroid && curObj != ast)\n\t\t\t\t\tthis.asteroidCol(astIterator,curObj,ast);\n\t\t\t}\n\t\t\tcollisionVectorAsteroid.clear();\n\t\t}\n\t\t//delete collided objects\n\t\tIterator<ICollider> trashIterator = trash.iterator();\n\t\twhile (trashIterator.hasNext())\n\t\t{\n\t\t\tICollider curObj = trashIterator.next();\n\t\t\tremove(curObj);\n\t\t}\n\t\tnotifyObservers();\n\t}", "public void update() {\n\t\tint xa = 0, ya = 0; \n\t\tif(game.getPlayer().x < 0){\n\t\t\txa -= 2;\n\t\t}else if(game.getPlayer().x + 32 > game.getScreen().width){\n\t\t\txa += 2;\n\t\t}\n\t\tif(game.getPlayer().y < 0){\n\t\t\tya -= 2;\n\t\t}else if(game.getPlayer().y + 32 > game.getScreen().height){\n\t\t\tya +=2;\n\t\t}\n\t\t\n\t\tif (xa != 0 || ya!= 0) move(xa, ya);\n\t\t\n\t\t//detects if the mouse is clicking on the interface\n\t\t/*if(Mouse.getButton() == 1 && Mouse.getX() >= 0 && Mouse.getX() <= 1200 && Mouse.getY() > 525 && Mouse.getY() < 675) {\n\t\t\tclicked = true;\n\t\t} else {\n\t\t\tclicked = false;\n\t\t}*/\n\t\t\n\t\treturn;\n\t}", "void accelerate() {\n isAccelerating = true;\n Bukkit.getScheduler().scheduleSyncRepeatingTask(Cars.getInstance(), new BukkitRunnable() {\n @Override\n public void run() {\n if (!isAccelerating) {\n cancel();\n return;\n } else if (CAR.getAcceleration(DIRECTION.getOpposite()).isAccelerating) {\n // Just stop the car if both cars are accelerating because it means the driver is holding down 's'\n // and 'w' at the same time.\n CAR.stopCompletely();\n return;\n }\n\n Minecart minecart = CAR.getMinecart();\n Vector velocity = minecart.getVelocity();\n velocity.add(/* TODO ACCELERATION direction*/new Vector());\n if (velocity.length() >= minecart.getMaxSpeed()) isAccelerating = false;\n minecart.setDerailedVelocityMod(velocity);\n }\n }, 1, 1);\n }", "public void update()\r\n {\n for (MapObject mo : gameData.getMap().getObjects())\r\n {\r\n mo.getAI().advance();\r\n }\r\n \r\n // update the UI\r\n for (UIElement uiEl : ui.getUIElements())\r\n {\r\n uiEl.update();\r\n }\r\n\r\n // Move the map objects\r\n movHandler.moveObjects();\r\n\r\n // Refresh the screen position\r\n Player player = gameData.getPlayer();\r\n this.centerScreen((int) player.getX() + Tile.TILESIZE / 2, (int) player.getY() + Tile.TILESIZE / 2);\r\n }", "private void updatePosition() {\n position.add(deltaPosition);\n Vector2[] points = getRotatedPoints();\n\n for (Vector2 point : points) {\n if (point.getX() < bound.getX() || point.getX() > bound.getX() + bound.getWidth()) { //If the point is outside of the bounds because of X\n position.addX(-deltaPosition.getX() * 2); //Undo the move so it is back in bounds\n deltaPosition.setX(-deltaPosition.getX()); //Make the direction it is going bounce to the other direction\n break;\n }\n if (point.getY() < bound.getY() || point.getY() > bound.getY() + bound.getHeight()) { //If the point is outside of the bounds because of Y\n position.addY(-deltaPosition.getY() * 2); //Undo the move so it is back in bounds\n deltaPosition.setY(-deltaPosition.getY()); //Make the direction it is going bounce to the other direction\n break;\n }\n }\n deltaPosition.scale(.98);\n }", "private void startGame() {\n\t\tfor (int j = 0; j< this.game_.getSaveBaby().size();j++){\n\t\t\tBabyBunnies b = this.game_.getSaveBaby().get(j);\n this.object_batch.begin();\n this.object_batch.draw(img_baby,b.getPosition().y,b.getPosition().x,150,150);\n this.object_batch.end();\n\t\t\tthis.pos=b.getPosition();\n\t\t}\n\n/**\n * Apparition du loup et mv\n * et reset de position quand il va trop loin\n */\n\t\tif ((this.game_.getNbBunnies()%10) == 0 && this.game_.getNbBunnies()!= 0 ){\n\t\t\tthis.game_.hunt(this.pos);\n this.object_batch.begin();\n this.object_batch.draw(wolf,this.game_.getWolf().getPosition().y,this.game_.getWolf().getPosition().x,150,150);\n this.object_batch.end();\n\t\t\tthis.game_.getWolf().move(this.game_.getNbBunnies()/10);\n Gdx.app.log(\"wolf\",\"pos lapon \"+this.game_.getSaveBaby().get(0).getPosition());\n Gdx.app.log(\"wolf\",\"pos du loup \"+this.game_.getWolf().getPosition());\n\t\t}\n\t\tif (this.game_.getWolf().getPosition().y>=width || this.game_.getWolf().getPosition().y<0){\n\t\t\tthis.game_.getWolf().restPost();\n\t\t}\n\n/**\n * Check + mv accelerometre\n */\n\t\tif (this.isOnAccelerometer) {\n\t\t\tif (this.mvX < 0 ){\n this.mvX=height;\n\t\t\t}\n\t\t\tif (this.mvY < 0) {\n this.mvY = width;\n\t\t\t}\n\t\t\tif (this.mvX >height){\n this.mvX=0;\n\t\t\t}\n\t\t\tif (this.mvY> width){\n this.mvY = 0;\n\t\t\t}\n\n this.mvX +=-Gdx.input.getAccelerometerX()*1.50;\n this.mvY += Gdx.input.getAccelerometerY()*2.50;\n\t\t\tthis.game_.getBunnyHood().setPosition((int)(mvX),(int)(mvY));\n\t\t\tcollision();\n this.player_batch.begin();\n this.player_batch.draw(this.img_bunnyHood,this.game_.getBunnyHood().getPosition().y,this.game_.getBunnyHood().getPosition().x,200,200);\n this.player_batch.end();\n\n\t\t\tGdx.app.log(\"Score\",Integer.toString(this.game_.getNbBunnies()));\n\n\t\t}\n\t}", "public void guardUpdate(){\r\n\t\t//check if a enemy has been spotted\r\n\t\tif (checkSight()){\r\n\t\t\tseen = true;\r\n\t\t} if (seen) {\r\n\t\t\tcreature.setSpeed(1.5);\r\n\t\t\tchaseEnemy(seenEnemy, 5);\r\n\t\t\treturn; //if player has been spotted end method here\r\n\t\t}\r\n\t\t//if no enemy has been spotted\r\n\t\tcreature.setSpeed(1);\r\n\t\tif (creature.getCreature().equals(CreatureType.PGuard) || creature.getCreature().equals(CreatureType.SGuard)){ //Patrol Guards and Stationary Guards\r\n\t\t\tif (index > checkpoints.size()-1){\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t\tgoToLocation (checkpoints.get(index));\r\n\t\t} else if(creature.getCreature().equals(CreatureType.RGuard)){ //Roaming Guards\r\n\t\t\troamArea();\r\n\t\t} if (!checkCollision(x, y)) {\r\n\t\t\tgoToLocation(x, y);\r\n\t\t}\r\n\t}", "void checkPositions() {\n //check if any bullets have hit any asteroids\n for (int i = 0; i < bullets.size(); i++) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHit(bullets.get(i).pos)) {\n shotsHit++;\n bullets.remove(i);//remove bullet\n score +=1;\n break;\n }\n }\n }\n //check if player has been hit\n if (immortalityTimer <=0) {\n for (int j = 0; j < asteroids.size(); j++) {\n if (asteroids.get(j).checkIfHitPlayer(position)) {\n playerHit();\n }\n }\n }\n }", "public void move() {\n if (!isCollision(xMove, 0))\n moveX();\n //else\n // adjustX(xMove);\n\n if (!isCollision(0, yMove))\n moveY();\n //else\n // adjustY(yMove);\n //check isCollision(gameObject) with calculating the position for next move\n\n }", "public void mueveBala() {\n switch (direccion) {\n case NORTE:\n posY -= velocidadBala;\n break;\n case SUR:\n posY += velocidadBala;\n break;\n case ESTE:\n posX += velocidadBala;\n break;\n case OESTE:\n posX -= velocidadBala;\n break;\n }\n actualizaHitbox();\n }", "public void updateOptimalCollisionArea();", "public void updateMhos() { \r\n\r\n\t\tfor (int i = 0; i < 12; i++) {\r\n\t\t\tif (Mhos[i].isAlive) {// Mho AI\r\n\t\t\t\t\r\n\t\t\t\tif (Mhos[i].x == p.x) // directly vertical\r\n\t\t\t\t\tif (Mhos[i].y > p.y) // move up\r\n\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\telse // move down\r\n\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\r\n\t\t\t\telse if (Mhos[i].y == p.y) { // directly horizontal\r\n\t\t\t\t\tif (Mhos[i].x > p.x) {\r\n\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tint relPos = Mhos[i].relToPlayer(p.x, p.y);\r\n\t\t\t\t\tint horDist = Math.abs(Mhos[i].x - p.x);\r\n\t\t\t\t\tint verDist = Math.abs(Mhos[i].y - p.y);\r\n\r\n\t\t\t\t\tif (relPos == 1) { // top right\r\n\t\t\t\t\t\tif (!(board[Mhos[i].x - 1][Mhos[i].y + 1] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x - 1][Mhos[i].y + 1] instanceof Mho)) {\r\n\t\t\t\t\t\t\t// directly diagonal\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 1);\r\n\t\t\t\t\t\t} else if (horDist >= verDist && !(board[Mhos[i].x - 1][Mhos[i].y] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x - 1][Mhos[i].y] instanceof Mho)) // horizontal\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\r\n\t\t\t\t\t\telse if (horDist <= verDist && !(board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence) // vertical\r\n\t\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// tries to move on a fence now\r\n\t\t\t\t\t\telse if (board[Mhos[i].x - 1][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 1);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x - 1][Mhos[i].y] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\r\n\t\t\t\t\t} else if (relPos == 2) { // top left\r\n\t\t\t\t\t\tif (!(board[Mhos[i].x + 1][Mhos[i].y + 1] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x + 1][Mhos[i].y + 1] instanceof Mho)) {\r\n\t\t\t\t\t\t\t// directly diagonal\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 1);\r\n\t\t\t\t\t\t} else if (horDist >= verDist && !(board[Mhos[i].x + 1][Mhos[i].y] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x + 1][Mhos[i].y] instanceof Mho)) // horizontal\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\r\n\t\t\t\t\t\telse if (horDist <= verDist && !(board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence) // vertical\r\n\t\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// tries to move on a fence now\r\n\t\t\t\t\t\telse if (board[Mhos[i].x + 1][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 1);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x + 1][Mhos[i].y] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x][Mhos[i].y + 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 0, 1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else if (relPos == 3) { // bottom left\r\n\t\t\t\t\t\tif (!(board[Mhos[i].x + 1][Mhos[i].y - 1] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x + 1][Mhos[i].y - 1] instanceof Mho)) {\r\n\t\t\t\t\t\t\t// directly diagonal\r\n\t\t\t\t\t\t\tmoveMho(i, 1, -1);\r\n\t\t\t\t\t\t} else if (horDist >= verDist && !(board[Mhos[i].x + 1][Mhos[i].y] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x + 1][Mhos[i].y] instanceof Mho)) // horizontal\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\r\n\t\t\t\t\t\telse if (horDist <= verDist && !(board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence) // vertical\r\n\t\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// tries to move on a fence now\r\n\t\t\t\t\t\telse if (board[Mhos[i].x + 1][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 1, -1);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x + 1][Mhos[i].y] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 1, 0);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} else if (relPos == 4) { // bottom right\r\n\t\t\t\t\t\tif (!(board[Mhos[i].x - 1][Mhos[i].y - 1] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x - 1][Mhos[i].y - 1] instanceof Mho)) {\r\n\t\t\t\t\t\t\t// directly diagonal\r\n\t\t\t\t\t\t\tmoveMho(i, -1, -1);\r\n\t\t\t\t\t\t} else if (horDist >= verDist && !(board[Mhos[i].x - 1][Mhos[i].y] instanceof Fence\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x - 1][Mhos[i].y] instanceof Mho)) // horizontal\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\r\n\t\t\t\t\t\telse if (horDist <= verDist && !(board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\t\t|| board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence) // vertical\r\n\t\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// tries to move on a fence now\r\n\t\t\t\t\t\telse if (board[Mhos[i].x - 1][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, -1, -1);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x - 1][Mhos[i].y] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, -1, 0);\r\n\t\t\t\t\t\telse if (horDist >= verDist && board[Mhos[i].x][Mhos[i].y - 1] instanceof Fence)\r\n\t\t\t\t\t\t\tmoveMho(i, 0, -1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public interface AI {\n\n /**\n * Sets the new enemy position.\n * @param pos the new enemy position\n */\n void setEnemyPos(Point2D pos);\n\n /**\n * Returns the new position for the enemy to\n * move to.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @param map\n * @return the position to move to\n */\n Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);\n\n /**\n * Returns the new enemy rotation based on the\n * state in which the enemy is in.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @return the angle that the enemy should face\n */\n double getRotation(Point2D target, boolean pursuit);\n\n /**\n * Returns if the enemy is in pursuit of the target\n * by calculating if the noise radius overlap with the\n * two.\n * @param target the position that wants to be tracked\n * @param noise the radius of the noise made by a player action\n * @return the state in which the enemy will be in\n * @see Player\n */\n boolean isInPursuit(Point2D target, double noise);\n\n /**\n * Returns if the enemy has the {@code target} in line of\n * sight and is close enough to get the enemy attention\n * to shoot.\n * @param target the position that wants to be tracked\n * @return the action that should be performed by the enemy\n */\n boolean isShooting(Point2D target);\n\n /**\n * Returns the collection of all position to check\n * if target is obscured by a wall used to JUnit\n * tests purpose.\n * @return the collections of all wall objects position\n */\n Set<Point2D> getWallSet();\n\n}", "@Override\r\n public void update() {\n for (int i = 0; i < super.npcShips.size(); i++){\r\n super.npcShips.get(i).owner.update();\r\n for (int ii = 0; ii < Server.serverClientsList.size(); ii++) {\r\n AbstractShip ship = Server.serverClientsList.get(ii).pilot.ship;\r\n if ((Math.abs(ship.x - super.npcShips.get(i).x) < sightLength) && (Math.abs(ship.y - super.npcShips.get(i).y) < sightLength)){\r\n if (super.npcShips.get(i) instanceof Asteroid) {\r\n int asteroidNr = (super.npcShips.get(i).moving) ? 1 : 0;\r\n Server.send((\"/a/,\" + super.npcShips.get(i).name + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).x) + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).y) + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).rotationRadians) + \",\" + asteroidNr + \",\").getBytes(), Server.serverClientsList.get(ii).address, Server.serverClientsList.get(ii).port);\r\n } else {\r\n int moving = (super.npcShips.get(i).moving) ? 1 : 0;\r\n int turbo = (super.npcShips.get(i).turbo) ? 1 : 0;\r\n Server.send((\"/s/,\" + super.npcShips.get(i).name + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).x)\r\n + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).y)\r\n + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).rotationRadians)\r\n + \",\" + moving + \",\" + super.npcShips.get(i).engineLevel + \",\" + super.npcShips.get(i).gunLevel\r\n + \",\" + super.npcShips.get(i).gunCount + \",\" + super.npcShips.get(i).constitution + \",\" + turbo\r\n + \",\" + String.format(Locale.US, \"%1$.3f\", super.npcShips.get(i).curHP) + \",\" + (int)super.npcShips.get(i).owner.getPointerForGunsX() + \",\" + (int)super.npcShips.get(i).owner.getPointerForGunsY() + \",\").getBytes(), Server.serverClientsList.get(ii).address, Server.serverClientsList.get(ii).port);\r\n }\r\n }\r\n }\r\n if (super.npcShips.get(i).curHP <= 0) {\r\n if (npcShips.get(i).owner instanceof ClientPlayer) {\r\n tiles[super.npcShips.get(i).currentTile].ships.remove(super.npcShips.get(i));\r\n ClientPlayer owner = (ClientPlayer)super.npcShips.get(i).owner;\r\n BasicShip ship = new BasicShip(this, super.npcShips.get(i).owner);\r\n owner.ship = ship;\r\n ship.name = super.npcShips.get(i).name;\r\n if (Server.serverClients.get(ship.name) == null) {\r\n super.npcShips.remove(super.npcShips.get(i));\r\n super.npcShipsByName.remove(ship.name);\r\n i--;\r\n continue;\r\n }\r\n Server.serverClients.get(ship.name).pilot = owner;\r\n super.npcShips.remove(super.npcShips.get(i));\r\n super.npcShips.add(ship);\r\n super.npcShipsByName.remove(ship.name);\r\n super.npcShipsByName.put(ship.name, ship);\r\n i--;\r\n continue;\r\n }\r\n tiles[super.npcShips.get(i).currentTile].ships.remove(super.npcShips.get(i));\r\n npcShips.remove(super.npcShips.get(i));\r\n i--;\r\n }\r\n }\r\n\r\n //update every projectile, if removed then remove\r\n for (int i = 0; i < super.projectiles.size(); i++){\r\n super.projectiles.get(i).update();\r\n //Server.sendToAll(\"/p/,\" + super.projectiles.get(i).x + \",\" + super.projectiles.get(i).y + \",\" + super.projectiles.get(i));\r\n if (super.projectiles.get(i).removed) {\r\n super.projectiles.remove(i);\r\n i--;\r\n }\r\n }\r\n\r\n }", "@Override\n\tpublic void act(float delta) {\n\t\tsuper.act(delta);\n\t\t\n\t\tif(PWM.instance().pointIsInObstacle(this.getX(), this.getY())){\n\t\t\tif(!PWM.instance().pointIsInObstacle(this.getX(), lastPos.y)){\n\t\t\t\tthis.setPosition(this.getX(), lastPos.y);\n\t\t\t}else if(!PWM.instance().pointIsInObstacle(lastPos.x, this.getY())){\n\t\t\t\tthis.setPosition(lastPos.x, this.getY());\n\t\t\t}else{\n\t\t\t\tthis.setPosition(lastPos.x, lastPos.y);\n\t\t\t}\n\t\t\t\n\t\t\tthis.lastPos.x = this.getX();\n\t\t\tthis.lastPos.y = this.getY();\n\t\t\t\n\t\t}\t\t\t\t\n\t\t\n\t\tmainCameraFollowHero();\n\t\t\n\t\t\n\t}", "void updatePositionAndAcceleration(double massObject, double gravConstant, double x_coord, double y_coord){\n\t\tthis.x = (this.x - this.x_velocity);\n\t\tthis.y = (this.y - this.y_velocity);\n\t\t\n\t\t//find distance between subject and object\n\t\tdouble distance = Point2D.distance(this.getX(), this.getY(), x_coord, y_coord);\n\t\t//calculates the acceleration upon the orbiting Point (metres per second per second if seconds = 1)\n\t\tdouble acceleration = (gravConstant * massObject) / (distance * distance);\n\t\t//finds direction of acceleration, as a modifier for X and modifier for Y.\n\t\tdouble xDiff = x_coord - this.getX(); //if point is to the right of centerMass, xDiff is positive\n\t\tdouble yDiff = y_coord - this.getY(); //if point is below center, yDiff is positive\n\t\t//find angle from orbiting point to center\n\t\tdouble oppOverAdj = yDiff / xDiff;\n\t\tdouble angleR = Math.atan(oppOverAdj);\n\t\t//share acceleration out between both vectors\n\t\tdouble xChange = Math.cos(angleR) * acceleration;\n\t\tdouble yChange = Math.sin(angleR) * acceleration;\n\t\tif (xDiff < 0) {\n\t\t//change velocity variables.\n\t\t\tthis.x_velocity = this.x_velocity + xChange;\n\t\t\tthis.y_velocity = this.y_velocity + yChange;\n\t\t} else {\n\t\t\tthis.x_velocity = this.x_velocity - xChange;\n\t\t\tthis.y_velocity = this.y_velocity - yChange;\n\t\t}\n\t}", "private synchronized void actualizarAsteroides(){\n\t\tfor(int i=0;i<numAsteroides;i++){\n\t\t\t\n\t\t\tasteroides[i].mover(this.getWidth(), this.getHeight());\n\t\t\n\t\t\ttry{\n\t\t\t\n\t\t\t\tif(asteroides[i].naveColision(nave) && nave!=null){\n\t\t\t\t\tanadirPuntos(asteroides[i].getPuntuacion());\n\t\t\t\t\tif(asteroides[i].getNumDisparos()>1 && nave!=null){\n\t\t\t\t\t\tfor(int k=0;k<asteroides[i].getNumDivision(); k++){\n\t\t\t\t\t\t\tañadirAsteroide(asteroides[i].crearDivisionAsteroide(minAstVel,maxAstVel));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\teliminarAsteroide(i);\n\t\t\t\t\ti--;\n\t\t\t\t\t\n\t\t\t\t\tquitarVida();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(enemigo.isVivo()==true && asteroides[i].enemigoColision(enemigo) && enemigo.isVivo() && nave!=null){\n\t\t\t\t\tif(asteroides[i].getNumDisparos()>1 && nave!=null){\n\t\t\t\t\t\tfor(int k=0;k<asteroides[i].getNumDivision(); k++){\n\t\t\t\t\t\t\tañadirAsteroide(asteroides[i].crearDivisionAsteroide(minAstVel,maxAstVel));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\teliminarAsteroide(i);\n\t\t\t\t\tenemigo.setVivo(false);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int j=0;j<numDisparos;j++){\n\t\t\t\t\tif(asteroides[i].disparoColision(disparos[j]) && nave!=null){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(disparos[j]!=null){\n\t\t\t\t\t\t\teliminarDisparos(j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanadirPuntos(asteroides[i].getPuntuacion());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(asteroides[i].getNumDisparos()>1 && nave!=null){\n\t\t\t\t\t\t\tfor(int k=0;k<asteroides[i].getNumDivision(); k++){\n\t\t\t\t\t\t\t\tañadirAsteroide(asteroides[i].crearDivisionAsteroide(minAstVel,maxAstVel));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\teliminarAsteroide(i);\n\t\t\t\t\t\tj=numDisparos; \n\t\t\t\t\t\t\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor(int j=0;j<numDisparosE;j++){\n\t\t\t\t\tif(asteroides[i].disparoColision(disparosE[j]) && !enemigo.isVivo()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(disparosE[j]!=null && nave!=null){\n\t\t\t\t\t\t\teliminarDisparosE(j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(asteroides[i].getNumDisparos()>1 && nave!=null){\n\t\t\t\t\t\t\tfor(int k=0;k<asteroides[i].getNumDivision(); k++){\n\t\t\t\t\t\t\t\tañadirAsteroide(asteroides[i].crearDivisionAsteroide(minAstVel,maxAstVel));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\teliminarAsteroide(i);\n\t\t\t\t\t\tj=numDisparosE;\n\t\t\t\t\t\n\t\t\t\t\t\ti--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e) {}\n\t\t}\n\t}", "public void act(){\n if (alive) {\n x = x + vx * dt;\n vx = vx * (1. - daempfung); //Luftwiderstand, eventuell muss dass nur in der Spielerklasse implementiert\n //werden, damit die Pilze nicht abgebremst werden.\n if (bewegung == Bewegung.fallen) {\n y = y + vy * dt;\n vy = vy + g * dt;\n }\n }\n }", "public void updateState() {\n\n // After each frame, the unit has a slight morale recovery, but only up to the full base morale.\n morale = Math.min(morale + GameplayConstants.MORALE_RECOVERY, GameplayConstants.BASE_MORALE);\n\n if (morale < GameplayConstants.PANIC_MORALE) {\n state = UnitState.ROUTING;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.switchState(SingleState.ROUTING);\n }\n } else if (state == UnitState.ROUTING && morale > GameplayConstants.RECOVER_MORALE) {\n this.repositionTo(averageX, averageY, goalAngle);\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.switchState(SingleState.MOVING);\n }\n }\n\n // Update the state of each single and the average position\n double sumX = 0;\n double sumY = 0;\n double sumZ = 0;\n int count = 0;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n single.updateState();\n sumX += single.getX();\n sumY += single.getY();\n sumZ += single.getZ();\n count += 1;\n }\n averageX = sumX / count;\n averageY = sumY / count;\n averageZ = sumZ / count;\n\n // Updating soundSink\n soundSink.setX(averageX);\n soundSink.setY(averageY);\n soundSink.setZ(averageZ);\n\n // Update the bounding box.\n updateBoundingBox();\n\n // Update stamina\n updateStamina();\n }", "public void movement2()\n\t{\n\t\tballoon6Y = balloon6Y + speedBalloonY1;\n\t\tif(balloon6Y > 700)\n\t\t{\n\t\t\tballoon6Y = -100;\n\t\t\tballoon6X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon7Y = balloon7Y + speedBalloonY2;\n\t\tif(balloon7Y > 700)\n\t\t{\n\t\t\tballoon7Y = -100;\n\t\t\tballoon7X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon8Y = balloon8Y + speedBalloonY3;\n\t\tif(balloon8Y > 700)\n\t\t{\n\t\t\tballoon8Y = -100;\n\t\t\tballoon8X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon9Y = balloon9Y + speedBalloonY4;\n\t\tif(balloon9Y > 700)\n\t\t{\n\t\t\tballoon9Y = -100;\n\t\t\tballoon9X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon10Y = balloon10Y + speedBalloonY5;\n\t\tif(balloon10Y > 700)\n\t\t{\n\t\t\tballoon10Y = -100;\n\t\t\tballoon10X = (gen.nextInt(900)-75);\n\t\t}\n\t}", "public void updateLogic(){\n\t\t\n\t\tif(gameMode){\n\t\t\tif(firstTouchdown){\n\t\t\t\t//linear x movement of the cube \n\t\t\t\tthis.applyBodyForceToCenter(Gsing.get().cSpeed, 0, true); \n\t\t\t\tthis.setBodyLinearDamping(0.3f); \n\t\t\t}\n\t\t\t\n\t\t\tif(!stopInc){\n\t\t\t\tthis.applyBodyForceToCenter(0, 50*this.getBodyMass(), true);\n\t\t\t}\n\t\t\t\n\t\t\tif(jump && isTouching){\n\t\t\t\tjump = false; \n\t\t\t\tisTouching = false; \n\t\t\t\tcheckInAirRotation = true; \n\t\t\t\tpos = this.getBodyWorldCenter();\n//\t\t\t\tthis.setBodyLinearVelocity(this.getBodyLinearVelocity().x, 17); \n\t\t\t\tthis.applyBodyLinearImpulse(new Vector2(0, Gsing.get().cImpulse), pos, true);\n\t\t\t}\n\t\t\t\n\t\t\tif(flyMode){\n\t\t\t\tpos = this.getBodyWorldCenter();\n\t\t\t\tthis.applyBodyForceToCenter(0, 35*this.getBodyMass(), true);\n\t\t\t\t\n\t\t\t\tif(fly){\n\t\t\t\t\tfly = false; \n\t\t\t\t\tthis.applyBodyForceToCenter(0, Gsing.get().cForce, true); \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(specialJump && isTouching){\n\t\t\t\tangle = Math.random()*Math.PI*2; \n\t\t\t\tspecialJump = false; \n\t\t\t\tisTouching = false; \n\t\t\t\tpos = this.getBodyWorldCenter(); \n\t\t\t\tthis.applyBodyLinearImpulse(specialImpulse, pos, true); \n\t\t\t\tLogger.log(\"jumped in a special way\"); \n\t\t\t}\n\t\t\t\n\t\t\tif(checkInAirRotation){\n\t\t\t\tsetDrawAngle(); \n\t\t\t}\n\t\t\t\n\t\t\tif(cubeDamageCnt == 6){\n\t\t\t\tcubeDead = true; \n\t\t\t}\n\t\t\t\n\t\t\t//check if the cube has encountered an obstacle\n\t\t\tif(isHurt)\n\t\t\t{\n\t\t\t\temitParticle(); \n\t\t\t}\n\t\t\t\n\t\t\tif(cubeDead){\n\t\t\t\tScreenHub.s.transitionTo(2, ScreenManager.TransactionType.SLICE); \n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse{\n\t\t\t\n\t\t\tif(this.getBodyLinearVelocity().x < .1 && !itsTheEnd){\n\t\t\t\tif(this.getBodyWorldCenter().y <= Gdx.graphics.getHeight()*.75){\n\t\t\t\t\tthis.applyBodyForceToCenter(0, 700f, true);\n//\t\t\t\t\tthis.getBody().setTransform(this.getBodyPosition(), 0);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\temitParticle(); \n\t\t\t\t\titsTheEnd = true; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcheckParticles4Destruction();\n\t}", "void updateStick() { \n Arrow a = (Arrow) this.arrow;\n a.updateArrow(this.strokeAcc, this.golfBall.coord);\n }", "public void update()\n {\n // always roatating time by 7 for fixed point calculation\n x = (velocity*cos(theta) *time) >> 21;\n int yFirstPart = (int)(velocity*sin(theta)*time) >> 21;\n int ySecondPart = (int)((g*time*time) >> 15);\n y = yFirstPart - ySecondPart;\n y =initialY - y;\n x= x + initialX;\n time+= updateSpeed;\n if(lastY == -1)\n {\n lastY = y;\n }else{\n int direction = lastY - y;\n if(lastDirection == -1)\n {\n lastDirection = direction;\n }else{\n if(lastDirection != 0 && direction != 0)\n {\n \n int signOfDirection = lastDirection / Math.abs(lastDirection);\n int signOfLastDirection = direction / Math.abs(direction);\n if(signOfDirection != signOfLastDirection)\n {\n if(!reachedTop)\n {\n onTop();\n reachedTop = true;\n }\n \n setIsOnHalf(true);\n }\n }\n lastY = y;\n }\n \n }\n }", "@Override\n \tpublic int step( ArrayList<Boid> school ) {\n \t//public void update( PVector accel ) {\n \t\t\n \t\tPVector accel = calculateAccel( school );\n \t\taccel = avoidEgdes(accel);\n \t\t\n \t\t\n \t\t// If accel == null, skip down to end\n \t\tif( accel != null ) {\n \t\t\t\n \t\t\tPVector accelLocal = matrixMult( Fish.inverse(basis), accel );\n \t\t\t\t// accelLocal is now a cordinate vector in the fish's local coordinate system,\n \t\t\t\t// defined by the fish's basis\t\t\t\n \t\t\t\n \t\t\t/*\n \t\t\t * To limit it's max steering angle to a defined degree, we make sure the acceleration perpendicular \n \t\t\t * to its velocity is <= the parallel acceleration.\n \t\t\t */\n \t\t\t\n \t\t\t// TODO should we be doing this w/ speed, not accel?\n \t\t\t// If turning angle is greater than the maximum allowed ...\n \t\t\tif( Math.abs( accelLocal.y)/Math.abs(accelLocal.x) > MAX_TURN_RATIO ) {\n \n \t\t\t\t\n \t\t\t\t// Sets y's magnitude to x's magnitude, keeping y's sign\n \t\t\t\taccelLocal.y = ((accelLocal.y < 0) ? -1 : 1) * Math.abs(accelLocal.x);\n \t\t\t\t\n \t\t\t\t// TODO put in settings for min coasting speed\n \t\t\t\t// If we are turning extremely slowly (and we're here because we want to turn hard),\n \t\t\t\t// speed up so we can turn\n \t\t\t\tif( accelLocal.mag() < Set.FISH_MaxAccel/3 ) {\n \t\t\t\t\taccelLocal.normalize();\n \t\t\t\t\taccelLocal.mult( Set.FISH_MaxAccel/3 );\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// If the desired acceleration is > max, set it to max\n \t\t\tif( accel.mag() > Set.FISH_MaxAccel ) {\n \t\t\t\taccel.normalize();\n \t\t\t\taccel.mult(Set.FISH_MaxAccel);\n \t\t\t}\n \t\t\t\n \t\t\t// not sure TODO\n \t\t\tif( speed.mag() + accelLocal.x < Set.FISH_MinSpeed) {\n \t\t\t\taccelLocal.x = -accelLocal.x;\n \t\t\t}\n \t\t\t\n \t\t\t// Update recentAccel. basis * accelLocal -> accel in global\n \t\t\trecentAccel = matrixMult(basis, accelLocal); \t\n \t\t\t\n \t\t\t// update speed. \n \t\t\tspeed.add( recentAccel );\n \t\t\t\n \t\t\t// If the new speed is > max, set it to max\n \t\t\tif( speed.mag() > Set.FISH_MaxSpeed ) {\n \t\t\t\tspeed.normalize();\n \t\t\t\tspeed.mult(Set.FISH_MaxSpeed);\n \t\t\t}\t\n \t\t\t\n \t\t} else { // Jumps to here if accel == null\n \t\t\trecentAccel = null;\n \t\t}\n \t\t\n \t\t\n \t\t// Update position\n \t\tposition.add(speed);\n \t\t\n \t\t// Make sure the new position is onscreen; if not, wrap it\n \t\tif( position.x < 0 ) position.x += Set.SCREEN_Width;\n \t\tif( position.y < 0 ) position.y += Set.SCREEN_Height;\n \t\tposition.x %= Set.SCREEN_Width;\n \t\tposition.y %= Set.SCREEN_Height;\n \t\t\n \t\t// Update basis\n \t\tbasis[0].set(speed);\n \t\tPVector.cross( basis[0], Z_VECTOR, basis[1]);\n \t\tbasis[0].normalize();\n \t\tbasis[1].normalize();\n \t\t\n \t\t// Update opacity\n \t\tcolor = Sim.colors.get( COLOR_OFFSETS[style]+(Sim.frameCounter+FRAME_OFFSET)%Set.FISH_ShimmerCycle );\n \t\thead_color = Sim.colors.get( Set.FISH_ShimmerCycle+COLOR_OFFSETS[style]+(Sim.frameCounter+FRAME_OFFSET)%Set.FISH_ShimmerCycle );\n \t\t\n \t\t// no change in school\n \t\treturn 0;\n \t}", "public void act() \n {\n if(getY()>=30 && !cambia)\n {\n direccion = -1;\n }\n else\n {\n cambia = true;\n }\n if(getY() <= getWorld().getHeight()-30 && cambia)\n {\n direccion = 1;\n }\n else\n {\n cambia = false;\n }\n \n setLocation(getX(),getY()+(velocidad*direccion));\n reglas();\n ataque();\n \n \n \n }", "private void update(){\n boolean bumped = false;\n\n // Has the player lost\n boolean lost = false;\n\n // Move the player's ship\n defender.update(fps);\n\n // Update the invaders if visible\n for(int i = 0; i < numInvaders; i++){\n\n if(invaders[i].getVisibility()) {\n // Move the next invader\n invaders[i].update(fps);\n\n // Does he want to take a shot?\n if(invaders[i].takeAim(defender.getX(),\n defender.getLength())){\n\n // If so try and spawn a bullet\n if(invadersBullets[nextBullet].shoot(invaders[i].getX() + invaders[i].getLength() / 2, invaders[i].getY(), bullet.DOWN)) {\n soundPool.play(invaderShootID, 1, 1, 0, 0, 1);\n\n // Shot fired\n // Prepare for the next shot\n nextBullet++;\n\n // Loop back to the first one if we have reached the last\n if (nextBullet == maxInvaderBullets) {\n // This stops the firing of another bullet until one completes its journey\n // Because if bullet 0 is still active shoot returns false.\n nextBullet = 0;\n }\n }\n }\n // If that move caused them to bump the screen change bumped to true\n if (invaders[i].getX() > screenX - ExcessX - invaders[i].getLength()\n || invaders[i].getX() < ExcessX){\n\n bumped = true;\n }\n }\n }\n\n // Update all the invaders bullets if active\n for(int i = 0; i < invadersBullets.length; i++){\n if(invadersBullets[i].getStatus()) {\n invadersBullets[i].update(fps);\n }\n }\n\n // Did an invader bump into the edge of the screen\n if(bumped){\n\n // Move all the invaders down and change direction\n for(int i = 0; i < numInvaders; i++){\n invaders[i].dropDownAndReverse();\n // Have the invaders landed\n if(invaders[i].getY() > screenY - screenY / 10){\n lost = true;\n }\n }\n\n // Increase the menace level\n // By making the sounds more frequent\n menaceInterval = menaceInterval - 80;\n }\n\n if(lost){\n prepareLevel();\n }\n\n // Update the players bullet\n if(bullet.getStatus()){\n bullet.update(fps);\n }\n\n // Has the player's bullet hit the top of the screen\n if(bullet.getImpactPointY() < 0){\n bullet.setInactive();\n }\n\n // Has an invaders bullet hit the bottom of the screen\n for(int i = 0; i < invadersBullets.length; i++){\n if(invadersBullets[i].getImpactPointY() > screenY){\n invadersBullets[i].setInactive();\n }\n }\n\n // Has the player's bullet hit an invader\n if(bullet.getStatus()) {\n for (int i = 0; i < numInvaders; i++) {\n if (invaders[i].getVisibility()) {\n if (RectF.intersects(bullet.getRect(), invaders[i].getRect())) {\n invaders[i].setInvisible();\n explosionAnimation = true;\n explosionX = invaders[i].getX() - invaders[i].getLength()/2;\n explosionY = invaders[i].getY() - invaders[i].getHeight()/2;\n soundPool.play(invaderExplodeID, 1, 1, 0, 0, 1);\n bullet.setInactive();\n score = (10 * level) * multiplier;\n totalScore = totalScore + score;\n cash = cash + 10;\n invadersLeft = invadersLeft - 1;\n\n // Has the player won\n if(invadersLeft == 0){\n shields = shields + 1;\n cash = cash + (10 * multiplier);\n totalScore = totalScore + ((100 * level) * multiplier);\n level = level + 1;\n noHitStreak = noHitStreak + 1;\n if (noHitStreak > 0) {\n multiplier = noHitStreak * 2;\n if (multiplier > 16) {\n multiplier = 16;\n }\n } else {\n multiplier = 1;\n }\n noHitStreak = noHitStreak + 1;\n openUpgradesMenu = true;\n prepareLevel();\n }\n }\n }\n }\n }\n\n // Has an invader bullet hit the player ship\n for(int i = 0; i < invadersBullets.length; i++){\n if(invadersBullets[i].getStatus()){\n if(RectF.intersects(defender.getRect(), invadersBullets[i].getRect())){\n invadersBullets[i].setInactive();\n damageAnimation = true;\n if (shields == 0) {\n alive = false;\n } else if (shields == 1) {\n soundPool.play(severeDamageID, 1, 1, 0, 0, 1);\n shields = shields - 1;\n } else {\n shields = shields - 1;\n }\n soundPool.play(shieldImpactID, 1, 1, 0, 0, 1);\n noHitStreak = 0;\n multiplier = 1;\n\n // Is it game over?\n if(!alive){\n soundPool.play(playerExplodeID, 1, 1, 0, 0, 1);\n wavesSurvived = level-1;\n finalScore = totalScore;\n shields = 3;\n alive = true;\n cash = 0;\n multiplier = 1;\n totalScore = 0;\n level = 1;\n invadersColumn = 5 ;\n invadersRow = 3;\n openGameOverMenu = true;\n prepareLevel();\n }\n }\n }\n }\n }", "public void act() \n {\n move(-16);\n \n \n if (isAtEdge())\n {\n setLocation(700,getY());\n }\n \n if (isTouching(Shots.class))\n {\n getWorld().addObject(new SpaceObject(), 500,Greenfoot.getRandomNumber(400));\n }\n \n }", "public void moverCeldaArriba(){\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J'&& laberinto.celdas[item.x][item.y-1].tipo !='P' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n }\n if (laberinto.celdas[item.x][item.y-1].tipo == 'C') {\n \n laberinto.celdas[item.x][item.y].tipo = 'V';\n laberinto.celdas[anchuraMundoVirtual/2][alturaMundoVirtual/2].tipo = 'I';\n \n player1.run();\n player2.run();\n }\n /* if (item.y > 0) {\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n if (laberinto.celdas[item.x][item.y-1].tipo == 'I') {\n if (item.y-2 > 0) {\n laberinto.celdas[item.x][item.y-2].tipo = 'I';\n laberinto.celdas[item.x][item.y-1].tipo = 'V';\n }\n }else{\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n // laberinto.celdas[item.x][item.y].indexSprite=Rand_Mod_Sprite()+3;\n } \n } \n }*/\n }", "public void update() {\n\t\t// shooting and moving! This results in a slower movement, and unit self-targeting.\n\t\tif (action == 3 && !(this instanceof Grenadier) && !(this instanceof Sniper)) { // can't be a tank\n\t\t\tif (stop()) { // the method stop detects if we have arrived at correct position or reached max distance\n\t\t\t\txa = 0;\n\t\t\t\tya = 0;\n\t\t\t} else move(xa - xa / 8 * 5, ya - ya / 8 * 5); // SLOWS DOWN MOVEMENT\n\n\t\t\tUnit u = target(); // this is the enemy unit it is targeting.\n\t\t\tif (u != null) {\n\t\t\t\tdir = Math.atan2(u.getY() - y, u.getX() - x);\n\t\t\t\tupdateShooting();\n\t\t\t}\n\t\t}\n\n\t\t// shooting only\n\t\telse if (action == 2) {\n\t\t\tupdateShooting();\n\t\t}\n\t\t\n\t\t// moving only\n\t\telse if (action == 1) {\n\t\t\tif (unitType.equals(\"Assassin\") || unitType.equals(\"Zombie\")) { // these are units that deal with collisions!\n\t\t\t\tunitCollision(); // these three units have methods that specialize in collision\n\t\t\t}\n\n\t\t\tif (stop()) { // the method stop detects if we have arrived at correct position!\n\t\t\t\txa = 0;\n\t\t\t\tya = 0;\n\t\t\t\taction = 0;\n\t\t\t} else move(xa, ya); // YOU MUST ROUND TO A CERTAIN NUMBER OF DECIMAL PLACES IN ORDER TO REDUCE CHOPPINESS OF MOVEMENT\n\t\t}\n\t\tupdateAnimation();\n\n\t}", "private void updateBoundingBox()\n\t{\n\t\tif (this.facingDirection != null)\n\t\t{\n\t\t\tdouble d0 = (double) this.hangingPosition.getX() + 0.5D;\n\t\t\tdouble d1 = (double) this.hangingPosition.getY() + 0.5D;\n\t\t\tdouble d2 = (double) this.hangingPosition.getZ() + 0.5D;\n\t\t\tdouble d3 = 0.46875D;\n\t\t\tdouble d4 = this.someFunc(this.getWidthPixels());\n\t\t\tdouble d5 = this.someFunc(this.getHeightPixels());\n\t\t\td0 = d0 - (double) this.facingDirection.getFrontOffsetX() * 0.46875D;\n\t\t\td2 = d2 - (double) this.facingDirection.getFrontOffsetZ() * 0.46875D;\n\t\t\td1 = d1 + d5;\n\t\t\tEnumFacing enumfacing = this.facingDirection.rotateYCCW();\n\t\t\td0 = d0 + d4 * (double) enumfacing.getFrontOffsetX();\n\t\t\td2 = d2 + d4 * (double) enumfacing.getFrontOffsetZ();\n\t\t\tthis.posX = d0;\n\t\t\tthis.posY = d1;\n\t\t\tthis.posZ = d2;\n\t\t\tdouble d6 = (double) this.getWidthPixels();\n\t\t\tdouble d7 = (double) this.getHeightPixels();\n\t\t\tdouble d8 = (double) this.getWidthPixels();\n\n\t\t\tif (this.facingDirection.getAxis() == EnumFacing.Axis.Z)\n\t\t\t{\n\t\t\t\td8 = 1.0D;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\td6 = 1.0D;\n\t\t\t}\n\n\t\t\t// ???\n\n\t\t\td6 = d6 / (this.getWidthPixels() / this.blocksToTakeUp() * 2D);\n\t\t\td7 = d7 / (this.getHeightPixels() / this.blocksToTakeUp() * 2D);\n\t\t\td8 = d8 / (this.getWidthPixels() / this.blocksToTakeUp() * 2D);\n\t\t\tthis.setEntityBoundingBox(new AxisAlignedBB(d0 - d6, d1 - d7, d2 - d8, d0 + d6, d1 + d7, d2 + d8));\n\t\t}\n\t}", "@Override\n\tpublic void updatePosition()\n\t{\n\t\tif(!fired && !pathfinding)\n\t\t{\n\t\t\tif(x == destX && y == destY)\n\t\t\t{\n\t\t\t\tfired = true;\n\t\t\t\tvehicle.msgAnimationDestinationReached();\n\t\t\t\tcurrentDirection = MovementDirection.None;\n\t\t\t\t\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\tif(cIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t{\n\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\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\tif(nextIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t{\n\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(allowedToMove || drunk)\n\t\t\t{\n\t\t\t\tswitch(currentDirection)\n\t\t\t\t{\n\t\t\t\t\tcase Right:\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Down:\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:\n\t\t\t\t\t\tx--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x % CityPanel.GRID_SIZE == 0 && y % CityPanel.GRID_SIZE == 0 && !moves.isEmpty())\n\t\t\t{\t\n\t\t\t\tif(allowedToMove || drunk)\n\t\t\t\t{\n\t\t\t\t\tcurrentDirection = moves.pop();\n\t\t\t\t\n\t\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\t\n\t\t\t\t\tif(current != next)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tguiList.remove(this);\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\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrent = next;\n\t\t\t\t\t\n\t\t\t\t\tswitch(currentDirection)\n\t\t\t\t\t{\n\t\t\t\t\tcase Down:next = new Point(current.x,current.y + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:next = new Point(current.x - 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Right:next = new Point(current.x + 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:next = new Point(current.x,current.y - 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:next = current;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[next.y][next.x].tryAcquire())\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\treturn;\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\tif(cIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(next.y).get(next.x);\n\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(Pathfinder.isCrossWalk(next, city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(Gui g : guiList)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(g instanceof PassengerGui)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\t\treturn;\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\tif(nextIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextIntersection.acquireAll();\n\t\t\t\t\t\t\t\t\tallowedToMove = true;\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\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tguiList.add(this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!allowedToMove && drunk)\n\t\t{\n\t\t\tcity.addGui(new ExplosionGui(x,y));\n\t\t\tSystem.out.println(\"DESTROYING\");\n\t\t\tcity.removeGui(this);\n\t\t\tvehicle.stopThread();\n\t\t\tsetPresent(false);\n\t\t\t\n\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\n\t\t\tif(cIntersection == null)\n\t\t\t{\n\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t{\n\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t{\n\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t}\n\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public void handle(ActionEvent event) {\n for (int i = 0; i < Asteroids.length; i++) {\r\n Asteroids[i].setCenterX(Asteroids[i].getCenterX() + deltaX[i]);\r\n Asteroids[i].setCenterY(Asteroids[i].getCenterY() + deltaY[i]);\r\n\r\n //Code executed when the asteroids colide with the player\r\n if (hasCollided(Asteroids[i], player)) {\r\n Text te1 = new Text(\"Game Over!\");\r\n Text te2 = new Text(\"Try Again!\");\r\n te1.setX(38);\r\n te1.setY(400);\r\n te2.setX(120);\r\n te2.setY(620);\r\n te1.setFont(new Font(180));\r\n te1.setFill(Color.WHITE);\r\n te2.setFont(new Font(180));\r\n te2.setFill(Color.WHITE);\r\n //Red colour background after you lose\r\n \r\n //This will remove the player/ship after it collides\r\n root.getChildren().remove(Asteroids[i]);\r\n root.getChildren().remove(player);\r\n \r\n \r\n //Add text on screen\r\n root.getChildren().add(te1);\r\n root.getChildren().add(te2);\r\n //This will close the scene automatically after 2 seconds\r\n new Timer().schedule(new TimerTask() {\r\n public void run () { System.exit(0); }\r\n }, 2000); \r\n\r\n }\r\n\r\n //if the Asteroid is on the left or right wall\r\n if (Asteroids[i].getCenterX() + Asteroids[i].getRadius() >= SCENE_WIDTH || Asteroids[i].getCenterX() - Asteroids[i].getRadius() <= 0) {\r\n deltaX[i] = -deltaX[i]; //bounce in the x direction\r\n }\r\n //if the Asteroid is on the top or bottom wall\r\n if (Asteroids[i].getCenterY() + Asteroids[i].getRadius() >= SCENE_HEIGHT || Asteroids[i].getCenterY() - Asteroids[i].getRadius() <= 0) {\r\n deltaY[i] = -deltaY[i];\r\n }\r\n\r\n //check if this Asteroid has collided with any of the other Asteroids\r\n for (int j = i + 1; j < Asteroids.length; j++) {\r\n if (hasCollided(Asteroids[i], Asteroids[j])) {\r\n deltaX[i] = -deltaX[i];\r\n deltaY[i] = -deltaY[i];\r\n deltaX[j] = -deltaX[j];\r\n deltaY[j] = -deltaY[j];\r\n\r\n }\r\n }\r\n }\r\n }", "@Override\n public void update() {\n if(alive==false){\n afterBeKilled();\n return;\n }\n animate();\n chooseState();\n checkBeKilled();\n if(attack){\n if(timeBetweenShot<0){\n chooseDirection();\n attack();\n timeBetweenShot=15;\n }\n else{\n timeBetweenShot--;\n }\n\n }\n else{\n calculateMove();\n setRectangle();\n }\n }", "public void randomWalkingAI(boolean hostile, ArrayList<Bullet> projectileList, ArrayList<ZOrderableSprite> zOrderableSpriteList) {\n if(aiTimer > aiTimeToChangeDecision) {\n currentDecision = (int)(Math.random()*3);\n aiTimer = 0;\n }\n // Randomize angle to walk\n if(aiTimer2 > aiTimeToAction) {\n\n angleToWalk = (float)(Math.random()*360);\n if(angleToWalk >= 270 || angleToWalk < 90) {\n direction = \"right\";\n } else {\n direction = \"left\";\n }\n\t\t\tanimation.setxFlipped(direction);\n aiTimer2 = 0f;\n }\n // Decisions and courses of action\n if(currentDecision == 0) {\n isMoving = false;\n } else if(currentDecision >= 1) {\n isMoving = true;\n float fpsBoundMoveSpeed = moveSpeed * (Gdx.graphics.getDeltaTime() * 60);\n float offsetX = (float)(fpsBoundMoveSpeed * Math.cos(Math.toRadians(angleToWalk)));\n float offsetY = (float)(fpsBoundMoveSpeed * Math.sin(Math.toRadians(angleToWalk)));\n if(offsetX < 0) {\n \tupdateMovementStepByStep(0, offsetX);\n\t\t\t} else if(offsetX > 0) {\n\t\t\t\tupdateMovementStepByStep(2, offsetX);\n\t\t\t}\n\t\t\tif(offsetY < 0) {\n\t\t\t\tupdateMovementStepByStep(1, offsetY);\n\t\t\t} else if(offsetY > 0) {\n\t\t\t\tupdateMovementStepByStep(3, offsetY);\n\t\t\t}\n }\n\n // hostile is true fs aiType = 1, false if aiType = 0\n // Verify is player is close enough to attack\n if(hostile && euclidianDistance(hitbox.getCenterX(), hitbox.getCenterY(), player.getHitbox().getCenterX(), player.getHitbox().getCenterY()) < hostileRange) {\n // Face player\n if(player.getHitbox().getX() <= hitbox.getCenterX()) {\n direction = \"left\";\n } else {\n direction = \"right\";\n }\n\t\t\tanimation.setxFlipped(direction);\n updateAttack(projectileList, zOrderableSpriteList);\n\n }\n }", "@Override\n public void act(float delta)\n {\n SCALE = PlayScreen.scale;\n\n if(actCount < 4)actCount++;\n\n dt=delta;\n if(!initialized)\n {\n mirror.setRotation(initRotation);\n\n dt = delta;\n positionChanged();\n\n if (hittime > (1.0 / 5.0))\n {\n if (hit >= 0) hit--;\n hittime = 0;\n\n //Set rotation to the nearest multiple of 90\n mirror.setRotation(90 * (Math.round(mirror.getRotation() / 90)));\n\n if (mirror.getRotation() >= 360)\n {\n mirror.setRotation(((mirror.getRotation() - 360 * (int) (mirror.getRotation() / 360)) / 90) * 90);\n }\n\n //setRotation(mirror.getRotation());\n }\n //setOrigin(mirror.getOriginX(), mirror.getOriginY());\n }\n\n if(initialized && hit>0)\n {\n positionChanged();\n\n if(hittime>=(1.0/5.0))\n {\n if(hit>0)hit--;\n hittime = 0;\n if (hit == 0)\n {\n\n //Set rotation to the nearest multiple of 90\n mirror.setRotation(90 * (Math.round(mirror.getRotation() / 90)));\n\n if (mirror.getRotation() >= 360)\n {\n mirror.setRotation(((mirror.getRotation() - 360 * (int) (mirror.getRotation() / 360)) / 90) * 90);\n }\n\n //setRotation(mirror.getRotation());\n }\n }\n\n }\n\n //Handles fading in/out of obstacle when triggered by a Toggle object\n if(fadeIn || fadeOut)\n {\n if(fadeIn)\n {\n if(mirror.getColor().a <0.95f)\n {\n mirror.setColor(mirror.getColor().r, mirror.getColor().g, mirror.getColor().b, mirror.getColor().a + 1 * delta * 8 / 4.0f);\n }\n else\n {\n mirror.setColor(mirror.getColor().r, mirror.getColor().g, mirror.getColor().b, 1f);\n fadeIn = false;\n fadeOut = false;\n }\n }\n else\n {\n if(mirror.getColor().a >= 0.39f)\n {\n mirror.setColor(mirror.getColor().r, mirror.getColor().g, mirror.getColor().b, mirror.getColor().a - 1 * delta * 15 / 4.0f);\n }\n else\n {\n mirror.setColor(mirror.getColor().r, mirror.getColor().g, mirror.getColor().b, Toggle.fadealpha);\n fadeIn = false;\n fadeOut = false;\n }\n }\n }\n\n\n\n\n if(!initialized)\n {\n initialized = true;\n }\n\n if(actCount<4){defineBody(); calculateTriangle(mirror.getX(), mirror.getY(), mirror.getRotation());}\n\n if(poly.getRotation() != mirror.getRotation()){calculateTriangle(mirror.getX(), mirror.getY(), mirror.getRotation());}\n\n super.act(delta);\n }", "@Override\n public void update() {\n App.updateScore();\n App.updateRocketsCount();\n checkLevel();\n\n if(pickupSpawnCooldown > 0){\n pickupSpawnCooldown--;\n }\n\n player.setSpeed(new Point2D(player.getSpeed().getX()*0.98,player.getSpeed().getY()*0.98));\n int rand = random.nextInt(100);\n if(rand == 0 && asteroidsNumber<asteroidsMaxNumber){\n createAsteroid();\n asteroidsNumber++;\n }\n rand = random.nextInt(500);\n if(rand == 0 && astronautsNumber<astronautsMaxNumber){\n createAstronaut();\n astronautsNumber++;\n }\n }", "private void makeAIMove(){\n final GamePiece opponentPiece = mGame.getmCurrentlyPlaying();\n\n // Creating new thread for A.I. move calculation, just in case the calculation would be too long.\n // (So the A.I. move calculation won't freeze the screen).\n new Thread(new Runnable() {\n\n @Override\n public void run() {\n\n // Making the play:\n mGame.makeAIMove(mDifficulty);\n\n // Now back to UI thread:\n runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n\n // Updating the grid:\n ((TileAdapter)mGrid.getAdapter()).notifyDataSetChanged();\n\n // Playing proper sound:\n if(mSoundStatus.equals(Constants.ON)) mPutPieceSound.start();\n\n // Updating Counters:\n mBlackCounter.setText(\"\" + mGame.getmBoard().getmNumberOfBlackPieces());\n mWhiteCounter.setText(\"\" + mGame.getmBoard().getmNumberOfWhitePieces());\n\n // Update playableTiles:\n mPlayableTiles = mGame.getmBoard().getPlayableTiles(mPlayerGamePiece);\n\n // While the UI changes, make a proper sound for flipping pieces (after a short delay):\n // And then move on (update UI, let player play next, end game, etc.)\n new Thread(new Runnable() {\n\n @Override\n public void run() {\n\n try {\n Thread.sleep(200);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n if(mSoundStatus.equals(Constants.ON)) mFlipPieceSound.start(); // Playing proper sound.\n\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n // Now back to UI thread in order to update UI:\n runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n\n // If game is still ongoing:\n if(mGame.getmGameStatus() == Game.GameStatus.ONGOING){\n\n // If turn was toggled:\n if(mGame.getmCurrentlyPlaying() != opponentPiece) {\n\n // Updating colors for profile areas:\n mPlayerProfileArea.setBackgroundResource(R.drawable.user_area_green);\n mPlayerUsername.setBackgroundResource(R.color.colorGreenDarkAlpha);\n mOpponentProfileArea.setBackgroundResource(R.drawable.user_area_gray);\n mOpponentUsername.setBackgroundResource(R.color.colorGrayDarkAlpha);\n\n // Now Player should make a move:\n showGuidelines();\n mIsAllowedToPlay = true;\n\n }\n\n // Otherwise, opponent gets another turn:\n else{\n makeAIMove();\n }\n\n }\n\n else{ // Otherwise (game has ended)\n handleGameEnding();\n }\n\n }\n });\n\n\n }\n\n }).start();\n\n\n }\n });\n\n\n }\n }).start();\n\n }", "public void update()\r\n\t{\n\t\t\r\n\t\tif (Game.clock > nextMoveTime)\r\n\t\t{\r\n\t\t\t//If there is a mob in front of the arrow, damage it. Otherwise, move the arrow\r\n\t\t\tTile frontTile = getAdjacentTile(rotation);\r\n\t\t\tMob frontMob = null;\r\n\t\t\tif (frontTile != null)\r\n\t\t\t{\r\n\t\t\t\tfrontMob = frontTile.getMob();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (frontMob != null)\r\n\t\t\t{\r\n\t\t\t\t//damage the mob, then remove this arrow\r\n\t\t\t\tfrontMob.damage(atkDmg);\r\n\t\t\t\tGame.tiles.get(y).get(x).getItems().remove(this);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmove();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//set the next move time (only allow moves during an update check)\r\n\t\t\tnextMoveTime = Game.clock + timePerMove;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void update() {\n\t\tmove();\n\t\tplace();\n\t}", "public void act() \n {\n World w = getWorld();\n int height = w.getHeight();\n \n setLocation(getX(),getY()+1);\n if (getY() <=0 || getY() >= height || getX() <= 0) // off the world\n {\n w.removeObject(this);\n return;\n }\n \n \n SaboWorld thisWorld = (SaboWorld) getWorld();\n Turret turret = thisWorld.getTurret();\n Actor turretActor = getOneIntersectingObject(Turret.class);\n Actor bullet = getOneIntersectingObject(Projectile.class);\n \n if (turretActor!=null && bullet==null) // hit the turret!\n {\n \n turret.bombed(); //Turret loses health\n explode();\n w.removeObject(this);\n } else if (turret==null && bullet!=null) //hit by a bullet!\n {\n explode();\n w.removeObject(this);\n }\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n caterpillar.move();\n \n if (caterpillar.getShapeX() < 39) {\n caterpillar.setDirection(0);\n caterpillar.decrease_section(sections);\n }\n else if (caterpillar.getShapeX() > getWidth() - 41) {\n caterpillar.setDirection(180);\n caterpillar.decrease_section(sections);\n }\n else if (caterpillar.getShapeY() < 39) {\n caterpillar.setDirection(90);\n caterpillar.decrease_section(sections);\n }\n else if (caterpillar.getShapeY() > getHeight() - 61) {\n caterpillar.setDirection(270);\n caterpillar.decrease_section(sections);\n }\n \n for (Section section : sections) {\n section.move();\n }\n for (int i = 0; i < sections.size(); i++) {\n if (i == 0) {\n sections.get(i).setFollowX(caterpillar.getShapeX());\n sections.get(i).setFollowY(caterpillar.getShapeY());\n }\n else {\n sections.get(i).setFollowX(sections.get(i - 1).getShapeX());\n sections.get(i).setFollowY(sections.get(i - 1).getShapeY());\n }\n }\n \n enemy.setSpeed(rand.nextInt(19));\n enemy.move();\n for (int i = 0; i < block_num; i++) {\n while(enemy.collision_detection(poizon.get(i)) || enemy.collision_detection(apple)) {\n enemy.setSpeed(rand.nextInt(19));\n enemy.move();\n }\n }\n enemy_2.setSpeed(rand.nextInt(19));\n enemy_2.move();\n for (int i = 0; i < block_num; i++) {\n while(enemy_2.collision_detection(poizon.get(i)) || enemy_2.collision_detection(apple)) {\n enemy_2.setSpeed(rand.nextInt(19));\n enemy_2.move();\n }\n }\n \n if (apple.collision_detection(caterpillar)) {\n Section newSection = new Section(sections.get(sections.size() - 1).getShapeX(),\n sections.get(sections.size() - 1).getShapeY(), 20, 0,\n sections.get(sections.size() - 1).getShapeX(),\n sections.get(sections.size() - 1).getShapeY());\n this.add(newSection, BorderLayout.CENTER);\n this.setVisible(true);\n sections.add(newSection);\n }\n\n for (MoveShape poizonApple : poizon) {\n if (poizonApple.collision_detection(caterpillar))\n caterpillar.decrease_section(sections);\n }\n \n if (enemy.collision_detection(caterpillar)) {\n caterpillar.dying();\n }\n for (Section section : sections) {\n if (enemy.collision_detection(section)) {\n caterpillar.dying();\n }\n }\n\n if (enemy_2.collision_detection(caterpillar)) {\n caterpillar.dying();\n }\n for (Section section : sections) {\n if (enemy_2.collision_detection(section)) {\n caterpillar.dying();\n }\n }\n time_add += speed;\n if (time_add % 10000 == 0) {\n caterpillar.decrease_section(sections);\n }\n repaint();\n if (sections.size() == 0) {\n caterpillar.dying();\n }\n }", "@Override\n\tpublic boolean updatePos(Physical_passive map) {\n\t\tupdate_animSpeed();\n\t\t// if (!map.getPhysicalRectangle().contains(getPhysicalShape()))\n\t\t// return false;\n\t\tif (!isDead()) {\n\t\t\tResolveUnreleasedMovements();\n\t\t\tgetWeapon().update();\n\t\t\tupdatePush();\n\t\t\t/*\n\t\t\t * if (!isBlock_down()) { // Por lo visto esto controla el salto if\n\t\t\t * (getJumpTTL() != 0) { moveJump(); } else // Y este 3 es la\n\t\t\t * gravedad., lo paso a un metodo de actor // para decirle q empiece\n\t\t\t * a caer fall(); // ; }\n\t\t\t */\n\t\t\t// Aqui es donde realmente cambiamos la posicion una vez calculado\n\t\t\t// donde va a ir.\n\t\t\t// updateLegsRotation(getSpeed().add(getPosition()));\n\t\t\tgetLegs().setLocation(new Point((int) getPosition().x(), (int) getPosition().y()));\n\t\t\tsetPosition(getPosition().add(getSpeed().add(getPush())));\n\t\t\tgetTorax().setLocation(new Point((int) getPosition().x(), (int) getPosition().y()));\n\t\t\t// setPosition(getPosition().add(getSpeed().add(getPush()))); //\n\t\t\t// CAmbiado;\n\t\t\tLine2D line = new Line2D.Float((float) getKillTracer().getTrace().getLine().getX1(),\n\t\t\t\t\t(float) getKillTracer().getTrace().getLine().getY1(), (float) getSpeed().x(),\n\t\t\t\t\t(float) getSpeed().y());\n\t\t\tgetKillTracer().getTrace().setLine(line);\n\t\t\tArrayList<Entity> hits = getKillTracer().getCollision(getMap());\n\t\t\tfor (Entity ent : hits) {\n\t\t\t\tif (ent instanceof Player && ent != this) {\n\t\t\t\t\tPlayer plent = (Player) ent;\n\t\t\t\t\tplent.die();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "private void aretes_aB(){\n\t\tthis.cube[22] = this.cube[12]; \n\t\tthis.cube[12] = this.cube[48];\n\t\tthis.cube[48] = this.cube[39];\n\t\tthis.cube[39] = this.cube[3];\n\t\tthis.cube[3] = this.cube[22];\n\t}" ]
[ "0.63351977", "0.6273479", "0.61771256", "0.6041843", "0.5994541", "0.5952944", "0.59324914", "0.5916731", "0.58697003", "0.58617103", "0.5849799", "0.58009523", "0.5780735", "0.57674575", "0.5762622", "0.5749406", "0.56624705", "0.56527454", "0.5639201", "0.56320745", "0.5623935", "0.5622805", "0.5604662", "0.5597884", "0.55963904", "0.5592797", "0.5589609", "0.55885154", "0.55821204", "0.5577854", "0.5561647", "0.5557077", "0.55566007", "0.5554104", "0.5541719", "0.5538765", "0.5531884", "0.55254275", "0.5511054", "0.54936486", "0.549074", "0.5490497", "0.5487769", "0.5470589", "0.54700965", "0.5464826", "0.5460395", "0.54567", "0.54548293", "0.5450939", "0.5449401", "0.5449241", "0.544528", "0.54446787", "0.5434406", "0.5433838", "0.5432631", "0.5424909", "0.542384", "0.5423602", "0.5419306", "0.5401373", "0.53970677", "0.5389805", "0.5389032", "0.53837746", "0.5370042", "0.53692335", "0.53687733", "0.53687584", "0.53628373", "0.5350432", "0.5345511", "0.533797", "0.53318995", "0.5327461", "0.53193873", "0.53131723", "0.53033227", "0.5301665", "0.53009665", "0.5300265", "0.5300254", "0.5300147", "0.5296168", "0.52886343", "0.5284669", "0.52830285", "0.5262224", "0.52621955", "0.5258119", "0.5257427", "0.5248415", "0.5243213", "0.52382094", "0.5234262", "0.52342576", "0.52293736", "0.52226794", "0.522253" ]
0.6619611
0
End of modified block of code for assessment 2 Returns true if AIBoat should exist on the screen.
@Override public boolean isShown() { return super.isShown(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isItaDraw(){\n\t\tboolean flag=false;\n\t\tfor(int row=0;row<9;row++){\n\t\t\tfor(int column=0;column<25;column++){\n\t\t\t\tif(Board[row][column] == 'O'){\n\t\t\t\t\tflag=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tflag=true;\n\t\t\t}\n\t\t\tif(flag==false)\n\t\t\t\tbreak;\n\t\t}\n\t\tif (flag == true)\n\t\t\tSystem.out.println(\"It's a draw\");\n\t\treturn flag;\n\t}", "public boolean ariFight(){\n\t\tint Xari = 0;\n\t\tint Yari = 0;\n\t\tint Xyou = 1;\n\t\tint Yyou = 1;\n\t\tfor(int i = 0 ; i < this.Ari.length;i++){\n\t\t\tfor(int p = 0; p < this.Ari.length;p++){\n\t\t\t\tif(this.Ari[i][p] == 1){\n\t\t\t\t\tYari = i;\n\t\t\t\t\tXari = p;\n\t\t\t\t}\n\t\t\t\tif(this.position[i][p] == 1){\n\t\t\t\t\tYyou = i;\n\t\t\t\t\tXyou = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}//end of outter for\n\t\tif(Yari==Yyou && Xari==Xyou){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean AssetIDEnable() {\r\n\t\t// return IsElementEnabledStatus(DefineSetup_AssetID_txtBx);\r\n\t\t// DefineSetup_AssetID_txtBx.isDisplayed();\r\n\t\t// return DefineSetup_AssetID_txtBx.isDisplayed();\r\n\t\treturn IsElementEnabledStatus(DefineSetup_AssetID_txtBx);\r\n\t}", "public boolean hasAI ( ) {\n\t\t// TODO: backwards compatibility required\n\t\treturn extract ( handle -> handle.hasAI ( ) );\n\t}", "public boolean getAmAI()\n\t{\n\t\tif (myAmAI)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n public boolean activate() {\n //When will this activate?\n return Areas.FALADOR.contains(ctx.players.local().tile())\n && ctx.widgets.component(1371,0).visible()\n && !ctx.objects.select().name(\"Waterpump\").within(6.0).isEmpty();\n }", "boolean hasAlreadShowCard();", "final boolean hanArribatAlFinal() {\n int cont = 0;\n for (int i = 0; i < soldats.size(); i++) {\n if (soldats.get(i).isHaArribat()) {\n cont++;\n }\n }\n\n if (cont == soldats.size()) {\n\n return true;\n }\n\n return false;\n\n }", "public boolean isAI() {\r\n\t\treturn AI;\r\n\t}", "public boolean ifAvia() {\n return choiceSelect == AVIA_CHOICE;\n }", "public boolean canOfferInsurance() {\n\t\treturn this.hand.getCards().get(0) == Card.ACE;\n\t}", "public boolean containsAAAMneumonics() {\n\t\tswitch(this) {\n\t\t\n\t\tcase NOP -> \t{return true;}\n\t\tcase DECI -> \t{return true;}\n\t\tcase DECO -> \t{return true;}\n\t\tcase STRO -> \t{return true;}\n\t\tcase CHARI -> \t{return true;}\n\t\tcase CHARO -> \t{return true;}\n\t\t\n//\t\tcase RETn\n\t\t\n\t\tcase ADDSP -> \t{return true;}\n\t\tcase SUBSP -> \t{return true;}\n\t\t\n\t\tdefault -> {return false;}\n\t\t\n\t\t}\n\t\t\n\t}", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "@Override\n public boolean habitatIncludesAboardStarship() {\n return false;\n }", "protected boolean checkAAField()\n {\n if (this.pdWidget.getActions() != null)\n {\n ctx.addValidationError(new ValidationError(ERROR_ANNOT_FORBIDDEN_AA));\n return false;\n }\n return true;\n }", "boolean hasAuvLoc();", "public boolean checkAnchorState (){ return isAnchored;}", "@Override\n\tpublic void atirou() {\n\n\t\t\tatirou=true;\n\t\t\t\n\t\t\n\t}", "@Override\n public boolean isAiOn()\n {\n return aiIsOn;\n }", "public boolean affordCard() {\n \t\treturn (FREE_BUILD || getResources(Type.WOOL) >= 1\n \t\t\t\t&& getResources(Type.GRAIN) >= 1 && getResources(Type.ORE) >= 1);\n \t}", "public boolean didEatAxe(Axe axe) {\n //Is this kibble in the snake? It should be in the same square as the snake's head\n if (axe.getKibbleX() == snakeHeadX && axe.getKibbleY() == snakeHeadY) {\n return axe.isVisible();\n }\n return false;\n }", "private static boolean checkAlgae(Critter foo) throws InvalidCritterException {\n\t\tboolean x =false;\n\t\ttry {\n\t\t\tList<Critter> tmp = getInstances(\"assignment4.Algae\");\n\t\t\tif(!tmp.isEmpty()){\n\t\t\t\tx=true;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tcatch(assignment4.InvalidCritterException e){\n\n\t\t\tthrow new InvalidCritterException(\"\");\n\t\t}\n\t\treturn x;\n\t}", "public boolean hasAnio()\r\n {\r\n return this._has_anio;\r\n }", "public boolean isAIEnabled() {\r\n\t\treturn true;\r\n\t}", "boolean hasUa();", "public boolean hasAA() {\n return fieldSetFlags()[17];\n }", "protected boolean allBoatsArePlaced() {\n for(BoatDrawing boat : boatMap.values()) {\n if (!boat.isPlaced()) {\n return false;\n }\n }\n logMsg(\"click now on 'valider' button to begin game\");\n return true;\n }", "public boolean checkForAce() {\n\t\thandIterator = new HandIterator(hand.getCards());\n\t\twhile (handIterator.hasNext()) {\n\t\t\tCard card = (Card) handIterator.next();\n\t\t\tif (card.getCardName().equals(\"A\"))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected boolean isAIEnabled()\n {\n return true;\n }", "void isOK()\r\n\t{\n\t\tboolean[] array = new boolean[table.getRowCount()];\r\n\t\tfor (int i = 0; i < array.length; i++)\r\n\t\t\tarray[i] = (Boolean) table.getValueAt(i, 2);\r\n\r\n\t\tint active = 0;\r\n\t\tfor (boolean b: array)\r\n\t\t\tif (b) active++;\r\n\r\n\t\t// Copy ONLY the selected traits into a new array\r\n\t\tint[] traits = new int[active];\r\n\t\tfor (int i = 0, j = 0; i < array.length; i++)\r\n\t\t\tif (array[i])\r\n\t\t\t\ttraits[j++] = i;\r\n\r\n\t\tPrefs.guiTruncateTraits = checkTruncate.isSelected();\r\n\r\n\t\t// Assign the selected traits back to the view\r\n\t\tif (mode == SelectTraitsDialog.HEATMAP_TRAITS)\r\n\t\t\tviewSet.setTraits(traits);\r\n\t\telse\r\n\t\t\tviewSet.setTxtTraits(traits);\r\n\t}", "public boolean containsRAAAMneumonics() {\n\t\tswitch(this) {\n\t\t\n\t\tcase ADDA -> \t{return true;}\n\t\tcase SUBA -> \t{return true;}\n\t\tcase ANDA -> \t{return true;}\n\t\tcase ORA -> \t{return true;}\n\t\tcase CPA -> \t{return true;}\n\t\tcase LDA -> \t{return true;}\n\t\tcase LDBYTEA -> {return true;}\n\t\tcase STA -> \t{return true;}\n\t\tcase STBYTEA -> {return true;}\n\t\t\n\t\tdefault -> {return false;}\n\t\t\n\t\t}\n\t\t\n\t}", "@Override\n protected boolean isFinished() {\n return (Math.abs(hpIntake.getWristPosition()) - HatchPanelIntake.positions[position.ordinal()] < Math.PI/12);\n }", "public boolean isAlface(){\n return salada.isAlface();\n }", "private boolean quickVerify(Location loc)\n {\n //quickly check if 2 blocks above this is clear\n Block oneAbove = loc.getBlock();\n Block twoAbove = oneAbove.getRelative(BlockFace.UP, 1);\n return oneAbove.getType().equals(Material.AIR) && twoAbove.getType().equals(Material.AIR);\n }", "private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}", "public abstract boolean captchalogue(SylladexItem item);", "public void updateACUI() {\n CanDataInfo.CAN_ACInfo mAcInfo = Can.mACInfo;\n Can.mACInfo.Update = 0;\n this.mLeftTemp.setText(mAcInfo.szLtTemp);\n setWindValue(mAcInfo.nWindValue);\n int footWind = mAcInfo.fgDownWind;\n int headWind = mAcInfo.fgParallelWind;\n int winWind = mAcInfo.fgForeWindMode;\n if (i2b(footWind) && i2b(headWind)) {\n setAcMode(1);\n } else if (i2b(headWind)) {\n setAcMode(0);\n } else if (i2b(footWind) && i2b(winWind)) {\n setAcMode(3);\n } else if (i2b(footWind)) {\n setAcMode(2);\n } else if (i2b(winWind)) {\n setAcMode(4);\n } else {\n setAcMode(-1);\n }\n this.mStatusWindow.SetSel(mAcInfo.fgDFBL);\n this.mStatusWindowRear.SetSel(mAcInfo.fgRearLight);\n this.mStatusAc.SetSel(mAcInfo.fgAC);\n this.mStatusAuto.SetSel(mAcInfo.nAutoLight);\n this.mStatusClosed.SetSel(mAcInfo.PWR);\n if (mAcInfo.fgInnerLoop != 0) {\n this.mStatusOutLoop.setStateDrawable(R.drawable.can_rh7_nxh_up, R.drawable.can_rh7_nxh_dn, R.drawable.can_rh7_nxh_dn);\n } else {\n this.mStatusOutLoop.setStateDrawable(R.drawable.can_rh7_wxh_up, R.drawable.can_rh7_wxh_dn, R.drawable.can_rh7_wxh_dn);\n }\n this.mStatusOutLoop.setSelected(true);\n }", "protected abstract boolean isCardActivatable(Card card);", "@Override\n\tpublic boolean zIsActive() throws HarnessException {\n\t\tif ( !MyApplication.zIsLoaded() )\n\t\t\tthrow new HarnessException(\"Admin Console application is not active!\");\n\n\n\t\tboolean present = sIsElementPresent(\"\");\n\t\tif ( !present ) {\n\t\t\treturn (false);\n\t\t}\n\n\t\tString attrs = sGetAttribute(\"\");\n\t\tif ( !attrs.contains(\"ZSelected\") ) {\n\t\t\treturn (false);\n\t\t}\n\n\t\treturn (true);\n\n\t}", "public boolean kontrolEt(){\n \n for (Ates ateskontrolAtes : atesler) {\n \n if (new Rectangle(ateskontrolAtes.getX(),ateskontrolAtes.getY(),10,20).intersects(new Rectangle(topX,0,20,20))) {\n \n return true;\n \n }\n \n }\n return false;\n \n }", "public boolean iAmCrawling();", "public interface IsDisplayInfoBar\n {\n /**\n * not show\n */\n String UN_SHOW = \"0\";\n\n /**\n * show\n */\n String SHOW = \"1\";\n }", "public void testAreaInfo()\n\t{\n\t\tGameArea ga = new GameArea();\n\t\tga.areaInfo();\n\t\tga.setConditionsMet(true);\n\t\tga.setAreaProgress(1);\n\t\tga.areaInfo();\n\t\tga.areaInfo();\n\t\tga.setLoot(null);\n\t\tga.areaInfo();\n\t}", "@Override\n\tpublic boolean isAIEnabled() {\n\t\treturn true;\n\t}", "public final boolean aox() {\n return false;\n }", "private void checkAttoAmministrativoNonAbbinato() {\n\t\tAllegatoAtto aa = allegatoAttoDad.findAllegatoAttoByAttoAmministrativo(allegatoAtto.getAttoAmministrativo());\n\t\tif(aa!=null){\n\t\t\tres.setAllegatoAtto(aa);\n\t\t\tthrow new BusinessException(ErroreFin.ATTO_GIA_ABBINATO.getErrore(\"\"));\n\t\t}\n\t}", "public static boolean isAOInstrument(ISPObsComponent obsComp) {\n return (obsComp.getType().broadType.equals(AOConstants.AO_BROAD_TYPE));\n }", "public boolean a() {\n if (getChildCount() == 0) {\n ArrayList<Drawable> arrayList = this.f2858d;\n if (arrayList == null || arrayList.size() == 0) {\n return true;\n }\n }\n return false;\n }", "public void showArming();", "public void verifyAccessibilityLink() {\n accessibilityFooterLink.assertState().enabled();\n accessibilityFooterLink.assertContains().text(\"Accessibility\");\n }", "public boolean checkForTreasure(){\n Object obj=charactersOccupiedTheLocation[3];\n if(obj!=null){return true;}\n return false; \n }", "public static String _activity_create(boolean _firsttime) throws Exception{\nmostCurrent._activity.LoadLayout(\"regis\",mostCurrent.activityBA);\n //BA.debugLineNum = 31;BA.debugLine=\"Activity.Title = \\\"Register\\\"\";\nmostCurrent._activity.setTitle(BA.ObjectToCharSequence(\"Register\"));\n //BA.debugLineNum = 33;BA.debugLine=\"ImageView1.Visible = False\";\nmostCurrent._imageview1.setVisible(anywheresoftware.b4a.keywords.Common.False);\n //BA.debugLineNum = 35;BA.debugLine=\"End Sub\";\nreturn \"\";\n}", "private boolean checkBarcodeImg(Barcode barcode) {\n//\t\tif(barcode.getImg())\n\t\treturn true;\n\t}", "private void checkForInstability(boolean overshoot) { \n if (overshoot == true) {\n setUnstable();\n } else {\n setStable();\n }\n }", "public boolean isAtivada() {\n return ativada;\n }", "private boolean isApnTypeActive(String type) {\n return mActiveApn != null && mActiveApn.canHandleType(type);\n }", "boolean hasAccY();", "public boolean myHealthVisible()\n\t{\n\t\tIntBitmap lifeBar = IntBitmap.getInstance(takeScreenshot(ScreenRegion.LIFE_RECT));\n\t\tRatioFilter.maintainRatio(lifeBar, FilterType.LIFE);\n\t\tBinaryImage bin = lifeBar.toGreyscale().doubleCutoff(30);\n\t\treturn bin.countWhite() > 1000;\n\t\t//return imageMatches(IntBitmap.getInstance(takeScreenshot(ScreenRegion.FIND_HEALTH_RECT)), ImageLibrary.MY_HEALTH_ICON.get());\n\t}", "public boolean isAtmo() {\n return atmo;\n }", "boolean isDisplay();", "boolean isDisplay();", "boolean hasAchievementType();", "protected boolean mo11180a() {\n return true;\n }", "public boolean hasArmedMASC() {\n for (Mounted m : getEquipment()) {\n if (!m.isDestroyed() && !m.isBreached() && (m.getType() instanceof MiscType) && m.getType().hasFlag(MiscType.F_MASC) && m.curMode().equals(\"Armed\")) {\n return true;\n }\n }\n return false;\n }", "public boolean isCardToAccuse() {\n\t\treturn (getOwner() == CASE_FILE_PLAYER);\n\t}", "private boolean shouldBeDrawn(Object annotationType) {\n \t\treturn contains(annotationType, fAllowedAnnotationTypes, fConfiguredAnnotationTypes);\n \t}", "public void accuse()\n {\n //show the accusation window\n accusationScreen = new AccusationScreen(this, false, null);\n accusationScreen.setVisible(true);\n }", "public boolean check_About_Buttom_AppBar_Presence() {\r\n\t\tWebElement bottomMenu_About_Icon = driver.findElementByAccessibilityId(\"AboutAppBarButton\");\r\n\t\treturn IsElementVisibleStatus(bottomMenu_About_Icon);\r\n\t}", "public void AIDamage() {\r\n\t\tif (attackStyle == 2) {\r\n\t\t\tfor(int i = 0; i < AIObject.length; i++) {\r\n\t\t\t\tif ((inFlight) && (Math.abs(aX-AIObject[i].getAIX()) < 5) && (Math.abs(aY-AIObject[i].getAIY())) < 4 ) {\r\n\t\t\t\t\tAIObject[i].setHealth(-25 * damageReduction);\r\n\t\t\t\t\tdrawArrow = false;\r\n\t\t\t\t\tcooldown = 15;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tif (mouseLeft) {\r\n\t\t\t\tfor(int i = 0; i < AIObject.length; i++){\r\n\t\t\t\t\tif ((drawSword) && (cooldown == 0) && (playerObject[0].getX() -AIObject[i].getAIX() <85) && (playerObject[0].getX()-AIObject[i].getAIX() >-1) && (playerObject[0].getY() - AIObject[i].getAIY() < 20) && (playerObject[0].getY()-AIObject[i].getAIY()>-5)) {\r\n\t\t\t\t\t\tAIObject[i].setHealth(-50 * damageReduction);\r\n\t\t\t\t\t\tcooldown = 5;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else {\r\n\t\t\t\tfor(int i=0; i < AIObject.length; i++){\r\n\t\t\t\t\tif ((drawSword) && (cooldown == 0) && (AIObject[i].getAIX()-playerObject[0].getX() <85) && (AIObject[i].getAIX() - playerObject[0].getX() > -1) && (playerObject[0].getY() - AIObject[i].getAIY() < 20) && (playerObject[0].getY()-AIObject[i].getAIY()>-5)) {\r\n\t\t\t\t\t\tAIObject[i].setHealth(-50 * damageReduction);\r\n\t\t\t\t\t\tcooldown = 5;\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\tfor(int i=0; i < AIObject.length; i++){\r\n\t\t\t//checks if AI is close enough to attack with melee\r\n\t\t\tfor (int j = 0; j < playerObject.length; j++) {\r\n\t\t\t\tif ((!shield) && (Math.abs(AIObject[i].getAIX() - playerObject[j].getX()) <= 10) && (Math.abs(AIObject[i].getAIY() - playerObject[j].getY())) <= 3) {\r\n\t\t\t\t\tplayerObject[j].setHealth(DAMAGE_AMOUNT * difficulty);\r\n\t\t\t\t\tif (playerObject[j].getHealth() <= 0) {\r\n\t\t\t\t\t\tdead = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean Infographic (int steps, int inputVal, int expected, int actualPass, int actualFail, boolean withATU) throws Exception {\n\t\tboolean passed = false;\n\t\t\n\t\tclickInfographic(0, 0, 0, 0, false);\n\t\n\t\tString url = driver.getCurrentUrl();\n\t\tif(url.contains(\"/infographic\")){\n\t\t\tpassed = true;\n\t\t\tdriver.navigate().back();\n\t\t}\n\t\t\n\t\tif(withATU) {\n\t\t\tif(passed){\n\t\t\t\tatu.performATU(input[steps],input[inputVal],input[expected],input[actualPass],true,true);//pass\n\t\t\t}else {\n\t\t\t\tatu.performATU(input[steps],input[inputVal],input[expected],input[actualFail],true,false);//fail\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(passed){\n\t\t\tpass(\"Infographic page is available and screen layout is correct.\");\n\t\t}else {\n\t\t\tfail(\"Infographic page is not available.\");\n\t\t}\n\t\treturn passed;\n\t}", "public void atrapar() {\n if( una == false) {\n\t\tif ((app.mouseX > 377 && app.mouseX < 591) && (app.mouseY > 336 && app.mouseY < 382)) {\n\t\t\tint aleotoridad = (int) app.random(0, 4);\n\n\t\t\tif (aleotoridad == 3) {\n\n\t\t\t\tSystem.out.print(\"Lo atrapaste\");\n\t\t\t\tcambioEnemigo = 3;\n\t\t\t\tsuerte = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\t\t\tif (aleotoridad == 1 || aleotoridad == 2 || aleotoridad == 0) {\n\n\t\t\t\tSystem.out.print(\"Mala Suerte\");\n\t\t\t\tcambioEnemigo = 4;\n\t\t\t\tmal = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\n\t\t}\n }\n\t}", "private boolean waitForAO()\n {\n int countOfRetry = 15;\n do\n {\n try\n {\n log.debug(\"Attempting to wait for AO.\");\n activeObjects.count(MessageMapping.class);\n log.debug(\"Attempting to wait for AO - DONE.\");\n stop = true;\n return true;\n }\n catch (PluginException e)\n {\n countOfRetry--;\n try\n {\n Thread.sleep(5000);\n }\n catch (InterruptedException ie)\n {\n // nothing to do\n }\n }\n }\n while (countOfRetry > 0 && !stop);\n log.debug(\"Attempting to wait for AO - UNSUCCESSFUL.\");\n return false;\n }", "private void requestForValidationOfQibla() {\n TextView textView2 = (TextView) findViewById(R.id.location_text_line2);\n ImageView arrow = ((ImageView) findViewById(R.id.arrowImage));\n ImageView compass = ((ImageView) findViewById(R.id.compassImage));\n ImageView frame = ((ImageView) findViewById(R.id.frameImage));\n FrameLayout qiblaFrame = ((FrameLayout) findViewById(R.id.qiblaLayout));\n LinearLayout noLocationLayout = ((LinearLayout) findViewById(R.id.noLocationLayout));\n\n if (faceUp && (gpsLocationFound || currentLocation != null)) {\n textView2.setVisibility(View.VISIBLE);\n textView2.setText(location_line2);\n findViewById(R.id.textLayout)\n .setVisibility(View.VISIBLE);\n noLocationLayout.setVisibility(View.INVISIBLE);\n qiblaFrame.setVisibility(View.VISIBLE);\n arrow.setVisibility(View.VISIBLE);\n compass.setVisibility(View.VISIBLE);\n frame.setVisibility(View.VISIBLE);\n } else {\n if (!faceUp) {\n onScreenDown();\n } else if (!(gpsLocationFound || currentLocation != null)) {\n onGPSOn();\n }\n }\n }", "void checkCurrentScreen();", "public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}", "@Override\n\tpublic boolean puedoAtacar(ElementoAlien a) {\n\t\treturn true;\n\t}", "public boolean isAiTurn() {\n return whosTurn() == aiPlayer;\n }", "public abstract boolean istAusgeliefert();", "@Override\n public boolean validate()\n {\n return inRSArea(TUTORIAL_ISLAND_ACC_CREATOR);\n }", "public boolean didILose() {\n return (shipsSunk.size() == NUM_BOATS);\n }", "@Test\n\tpublic void testIsVisible() {\n\t\tip = new ImagePlus();\n\t\tassertFalse(ip.isVisible());\n\t}", "public boolean createAe() {\n\t\tif ((cseService == null) || ! createACP()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tAE ae = new AE();\n\t\tae.setName(RESOURCE_ID);\n\t\tae.setAppName(FRIENDLY_HOME_MONITORING_NAME);\n\t\tae.setAppID(RESOURCE_ID);\n\t\tae.setRequestReachability(Boolean.TRUE);\n\t\tae.getLabels().add(HOME_MONITORING_RESOURCE_ID);\n\t\tae.getLabels().add(RESOURCE_TYPE);\n\t\tae.getAccessControlPolicyIDs().add(registeredAcp.getResourceID());\n\t\tae.getPointOfAccess().add(POA);\n\n\t\tRequestPrimitive request = new RequestPrimitive();\n\t\trequest.setOperation(Operation.CREATE);\n\t\trequest.setFrom(Constants.ADMIN_REQUESTING_ENTITY);\n\t\trequest.setTo(\"/\" + Constants.CSE_ID + \"/\" + Constants.CSE_NAME);\n\t\trequest.setResourceType(ResourceType.AE);\n\t\trequest.setReturnContentType(MimeMediaType.OBJ);\n\t\trequest.setRequestContentType(MimeMediaType.OBJ);\n\t\trequest.setContent(ae);\n\n\t\tResponsePrimitive response = cseService.doRequest(request);\n\t\t// check response status code\n\t\tif (! ResponseStatusCode.CREATED.equals(response.getResponseStatusCode())) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// retrieve created application\n\t\ttry {\n\t\t\tregisteredApplication = (AE) response.getContent();\n\t\t} catch (ClassCastException e) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// create a Container to store the icon\n\t\tContainer iconContainer = createContainer(registeredApplication.getResourceID(), \"ICON\");\n\t\tif (iconContainer != null) {\n\t\t\tcreateContentInstance(iconContainer, \"/\" + IMAGES + \"logo.png\");\n\t\t}\n\t\t\n\t\tContainer presentationUrlContainer = createContainer(registeredApplication.getResourceID(), \"PRESENTATION_URL\");\n\t\tif (presentationUrlContainer != null) {\n\t\t\tcreateContentInstance(presentationUrlContainer, \"/\" + WEBAPPS + \"login.html\");\n\t\t}\n\t\t\n\t\t// ok\n\t\treturn true;\n\t}", "public boolean visible_SetupAssetIDField() {\r\n\t\treturn IsElementVisibleStatus(DefineSetup_AssetID_txtBx);\r\n\t}", "@Override\n\tpublic boolean puedoAtacar(ElementoPiedra a) {\n\t\treturn true;\n\t}", "@java.lang.Override\n public boolean hasAabbValue() {\n return typeCase_ == 12;\n }", "private boolean isGameOverAutomatico() {\n\t\tif(this.getEquipesAtivas().size() == 1)\n\t\t\treturn true;\n\t\t\n\t\tboolean temCosmo = false;\n\t\tfor(Equipe equipe : this.getEquipesAtivas()){\n\t\t\tif(equipe.getCosmo() > 0){\n\t\t\t\ttemCosmo = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn !temCosmo;\n\t}", "public boolean isAluno() {\n\t\treturn aluno != null;\n\t}", "public boolean isAltACTGN() {\n for (Alt a : alts) {\n if (a.isSeq()) {\n if (!a.getSeq().toString().matches(\"[ACTGN]*\")) {\n return false;\n }\n }\n }\n return true;\n }", "public final boolean Aei(C27702CNw cNw) {\n String str;\n boolean z;\n C13150hy.A02(cNw, \"item\");\n ProductSourceOverrideState productSourceOverrideState = this.A00.A00.A02;\n String str2 = null;\n if (productSourceOverrideState != null) {\n str = productSourceOverrideState.A02;\n } else {\n str = null;\n }\n CharSequence charSequence = str;\n if (charSequence != null) {\n int length = charSequence.length();\n z = false;\n }\n z = true;\n if (!z) {\n ProductSourceOverrideState productSourceOverrideState2 = this.A00.A00.A02;\n if (productSourceOverrideState2 != null) {\n str2 = productSourceOverrideState2.A02;\n }\n C27781CQz cQz = cNw.A00;\n C13150hy.A01(cQz, \"item.layoutContent\");\n CR3 cr3 = cQz.A00;\n if (cr3 == null) {\n C13150hy.A00();\n }\n C13150hy.A01(cr3, \"item.layoutContent.publi…ctListCollectionContent!!\");\n CRA cra = cr3.A01;\n C13150hy.A01(cra, \"item.layoutContent.publi…lectionContent!!.metaData\");\n if (C13150hy.A05(str2, cra.A01)) {\n return true;\n }\n return false;\n }\n return true;\n }", "protected boolean isfull() {\n return this.numSeats == this.bookedSeats;\n }", "private boolean show(AttributeModel am) {\n\t\t// never show invisible or LOB attributes\n\t\tif (!am.isVisible() || AttributeType.LOB.equals(am.getAttributeType())) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// show multiple value attributes only if they would normally show up in a table\n\t\tif (AttributeType.DETAIL.equals(am.getAttributeType())\n\t\t || AttributeType.ELEMENT_COLLECTION.equals(am.getAttributeType())) {\n\t\t\treturn am.isVisibleInTable();\n\t\t}\n\t\treturn true;\n\t}", "private boolean checkMultiplePlaneEdit(){\r\n\t\tboolean flag=false;\r\n\t\tfor(UiAirplaneModel model:uiAirplaneModel.getAirplaneList()){\r\n\t\t\tif(model.isInputDisplayItem()){\r\n\t\t\t\tflag=true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "@java.lang.Override\n public boolean hasAabbValue() {\n return typeCase_ == 12;\n }", "public void verifyQuickNavigatorIsDisplayed() {\n\t\tmoveToElement(burgerButton);\n\t\tAssert.assertTrue(isElementPresent(burgerButton));\n\t\treportInfo();\n\t\t}", "public void ativa() {\n this.ativada = true;\n }", "@Override\n public boolean active() {\n General.sleep(100); // Sleep to reduce CPU usage.\n return fishing_spots[0].isOnScreen();\n }", "public static /* synthetic */ boolean m125697a(ZHPagerAdapter eVar) {\n return eVar.getCurrentPrimaryItem() != null;\n }", "public boolean checkForLotus(){\n Object obj=charactersOccupiedTheLocation[2];\n if(obj!=null){return true;}\n return false;\n }", "@Override\n public boolean activate() {\n // We only want to go to the bank if our inventory is full and we aren't already there.\n return Mining.isInvFull() && !Constants.BANK_AREA.contains(Players.getLocal());\n }", "boolean outOfSight();", "boolean testOffscreenShip(Tester t) {\n return t.checkExpect(this.ship1.isOffScreen(100, 100), true)\n && t.checkExpect(this.ship1.isOffScreen(200, 200), false)\n && t.checkExpect(this.ship3.isOffScreen(50, 50), false);\n }" ]
[ "0.66617066", "0.6283781", "0.6215886", "0.6049373", "0.60243773", "0.5912871", "0.58820534", "0.5829571", "0.5788723", "0.57506967", "0.5734053", "0.5726287", "0.56343305", "0.5594256", "0.55855626", "0.557572", "0.5543502", "0.55205953", "0.55113816", "0.5480503", "0.5476726", "0.54713285", "0.546706", "0.54467463", "0.5435114", "0.5409878", "0.5406208", "0.5397456", "0.5394377", "0.53836936", "0.5380899", "0.5370008", "0.53621966", "0.5361971", "0.535765", "0.5347508", "0.53468907", "0.5340143", "0.5337799", "0.5327817", "0.5327226", "0.5325189", "0.53249055", "0.5322304", "0.532081", "0.53191715", "0.5306997", "0.5304109", "0.5295371", "0.5293046", "0.52905506", "0.5286374", "0.5285992", "0.5282773", "0.5279918", "0.52728033", "0.5270864", "0.52669704", "0.52638876", "0.52609926", "0.52609926", "0.5258735", "0.52534264", "0.52495766", "0.5244199", "0.5235912", "0.5228975", "0.5227596", "0.5225823", "0.5219611", "0.5217301", "0.52049786", "0.51953006", "0.5189127", "0.5184399", "0.51742226", "0.5171298", "0.5161399", "0.51611507", "0.5160665", "0.51545316", "0.5148496", "0.5147607", "0.51438934", "0.5143644", "0.51380444", "0.5133058", "0.5130271", "0.51295334", "0.51204556", "0.5118421", "0.5114768", "0.51140714", "0.5113277", "0.5110688", "0.51097304", "0.5108338", "0.5106528", "0.51064384", "0.51002204", "0.50978655" ]
0.0
-1
Return centre coordinates of point where ray is fired.
protected Vector2 get_ray_fire_point() { Vector2 p = new Vector2( sprite.getX() + (sprite.getWidth() / 2), sprite.getY() + (sprite.getHeight())); Vector2 p1 = p.rotateAround(new Vector2( sprite.getX() + (sprite.getWidth() / 2), sprite.getY() + (sprite.getHeight() / 2)), sprite.getRotation()); return p1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Point getCenter();", "Point getCenter();", "public FPointType calculateCenter() {\n fRectBound = getBounds2D();\n FPointType fptCenter = new FPointType();\n fptCenter.x = fRectBound.x + fRectBound.width / 2.0f;\n fptCenter.y = fRectBound.y + fRectBound.height / 2.0f;\n calculate(fptCenter);\n \n rotateRadian = 0.0f;\n \n return fptCenter;\n }", "public Point2D.Double GetCentrePoint() {\n \t\treturn new Point2D.Double(centrePoint.getX(), centrePoint.getY());\n \t}", "double[] circleCentre()\n\t{\n\t\tdouble toOriginLength = Math.sqrt(originX*originX + originY*originY);\n\t\tdouble toCentreLength = toOriginLength + radius;\n\t\t\n\t\tdouble[] centrePoint = new double[2];\n\t\t\n\t\tcentrePoint[0] = (toCentreLength * originX)/toOriginLength;\n\t\tcentrePoint[1] = (toCentreLength * originY)/toOriginLength;\n\t\t\n\t\treturn centrePoint;\n\t}", "public Point getCenter() {\n \treturn new Point(x+width/2,y+height/2);\n }", "public float getCentreX() {\n return centreX;\n }", "public Point2D getCentre() {\n return new Point2D.Float(centreX, centreY);\n }", "public final Vector getCenter() {\n\t\treturn (center == null) ? computeCenter() : center;\n\t}", "public Coords getCenter()\r\n {\r\n return new Coords(Math.round(x + width / 2), Math.round(y + height / 2));\r\n }", "public final Point getCenterPointOnScreen() {\n\t\treturn Calculations.tileToScreen(getLocalRegionX(), getLocalRegionY(),\n\t\t\t\t0.5D, 0.5D, 0);\n\t}", "public Point getCentrePoint()\n\t\t{\n\t\t\tif(shape.equals(\"circle\") || shape.equals(\"ellipse\"))\n\t\t\t\treturn new Point((int)((Ellipse2D)obj).getCenterX(),(int)((Ellipse2D)obj).getCenterY());\n\t\t\tif(shape.equals(\"poly\"))\n\t\t\t{\n\t\t\t\tint xtot = 0;\n\t\t\t\tint ytot = 0;\n\t\t\t\tfor(int i=0; i < coords.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif((i % 2) == 0)\n\t\t\t\t\t\txtot += coords[i];\n\t\t\t\t\telse\n\t\t\t\t\t\tytot += coords[i];\n\t\t\t\t}\n\t\t\t\treturn new Point((xtot*2)/coords.length,(ytot*2)/coords.length);\n\t\t\t}else\n\t\t\t{\n\t\t\t\treturn new Point((int)((Rectangle)obj).getCenterX(),(int)((Rectangle)obj).getCenterY());\n\t\t\t}\n\t\t}", "public int getCenterX() {\n\t\t\treturn (int) origin.x + halfWidth;\n\t\t}", "public Vec2 getCenter()\n {\n int numTriangles = numPoints - 2;\n\n // Calculate the average midpoint of each composite triangle\n Vec2 averageMidpoint = new Vec2(0, 0);\n float area = 0;\n for (int i=0; i<numTriangles; i++)\n {\n Triangle t = new Triangle(points[0], points[i+1], points[i+2]);\n Vec2 triangleMidpoint = t.getCenter();\n float triangleArea = t.getArea();\n\n averageMidpoint.addX(triangleMidpoint.getX() * triangleArea);\n averageMidpoint.addY(triangleMidpoint.getY() * triangleArea);\n\n area += triangleArea;\n\n// Color color;\n// if (i==0) color = Color.GREEN;\n// else color = Color.ORANGE;\n// SumoGame.ADD_DEBUG_DOT(points[0].getX(), points[0].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(points[i+1].getX(), points[i+1].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(points[i+2].getX(), points[i+2].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(triangleMidpoint.getX(), triangleMidpoint.getY(), triangleArea/2000, color);\n }\n\n averageMidpoint.div(area);\n\n// SumoGame.ADD_DEBUG_DOT(averageMidpoint.getX(), averageMidpoint.getY(), 20, Color.RED);\n\n return averageMidpoint;\n }", "PVector _getCenter() {\n PVector cen = new PVector(_hitboxCenter.x, _hitboxCenter.y);\n cen.rotate(_rotVector.heading() - _front);\n cen.x += _x;\n cen.y += _y;\n return cen;\n }", "public Point getCenter() {\n return new Point((int) getCenterX(), (int) getCenterY());\n }", "public final int centerX() {\n return (left + right) >> 1;\n }", "public Vector3D getCentrePosition()\n\t{\n\t\treturn centrePosition;\n\t}", "public Point getCenter() {\r\n\t\treturn center;\r\n\t}", "public PointF getCenter() {\n return center;\n }", "private static PointF touchCenter(MotionEvent event) {\n return new PointF((event.getX(0) + event.getX(1)) / 2.0f,\n (event.getY(0) + event.getY(1)) / 2.0f);\n }", "private Point getCentreCoordinate(Point t)\n {\n \treturn new Point (t.x + Constants.cell_length /2f, t.y, t.z+Constants.cell_length/2f );\n }", "public final float exactCenterX() {\n return (left + right) * 0.5f;\n }", "public double getCenter() {\n return 0.5 * (lo + hi);\n }", "public Point2D.Float getCenter() {\r\n\t\treturn center;\r\n\t}", "public int centerX() {\n return mRect.centerX();\n }", "public LatLng getCentrePos() {\n double lat = 0;\n double lon = 0;\n for (int i=0; i<newHazards.size(); i++) {\n lat += frags.get(i).getHazard().getLatitude();\n lon += frags.get(i).getHazard().getLongitude();\n }\n return new LatLng(lat / newHazards.size(), lon / newHazards.size());\n }", "public Point getCenter() {\r\n return this.center;\r\n }", "private void calculateCentre() {\n \t\t// The size of the centre is presently one 5th of the maze size\n \t\tcentreSize = size / 5;\n \t\t// System.out.println(\"centreSize is: \" + centreSize);\n \n \t\t// Min and max are the start points of the centre\n \t\tint min = (int) Math.ceil((centreSize * 2.0));\n \t\tint max = min + centreSize;\n \t\tmin++; // this adjusts for the border\n \t\tmax++;\n \t\t// System.out.println(\"min is: \" + min);\n \t\t// System.out.println(\"max is: \" + max);\n \n \t\t// centre is the centre point of the maze\n \t\tdouble centre = (centreSize / 2.0) + min;\n \t\t// System.out.println(\"centre is: \" + centre);\n \t\tcentrePoint = new Point2D.Double(centre, centre);\n \t\t\n \t\t//set the min and max points for the centre\n \t\tcentreMin = min;\n \t\tcentreMax = max;\n \t}", "public final Point getCenterPointOnScreen() {\n return bot.getManagers().getCalculations().tileToScreen(localRegionX, localRegionY,\n 0.5D, 0.5D, 0);\n }", "public Point getCenter() {\n return center;\n }", "public double getCenterX() { return centerX.get(); \t}", "public Vector2 getCenter() {\n\t\treturn new Vector2(position.x + size / 4f, position.y + size / 4f);\n\t}", "public double getCenterX() {\n\t\treturn centerX;\n\t}", "public Vector3f getSphereCenter() {\n\t\tfloat[] arr = getMinMax();\n\t\t\n\t\treturn new Vector3f((arr[0]+arr[1])/2,(arr[2]+arr[3])/2,(arr[4]+arr[5])/2);\n\t}", "public abstract Vector computeCenter();", "public float getCenterX() {\n return cPosition.getX() + (float) cFishSizeX / 2;\n }", "public Coordinate getCenter() {\n return center;\n }", "public Vector2 getCenter() {\n return new Vector2(rectangle.centerX(), rectangle.centerY());\n }", "public GJPoint2D center();", "final public Vector2 getCenter()\n\t{\n\t\treturn center;\n\t}", "private int getMidPoint(int cordinate)\n {\n int mid_point = ((cordinate + Player.getWidth_of_box()) / 2);\n return mid_point;\n }", "public Point getCenterPx(){\n\t\tint centerX = images[0].getWidth()/2;\n\t\tint centerY = images[0].getHeight()/2;\n\t\tPoint centerPx = new Point(centerX,centerY);\n\t\treturn centerPx;\n\t}", "public Vector3f getCenter() {\r\n return center;\r\n }", "public Point2D centerOfMass() \n {\n double cx = 0, cy = 0;\n double area = areaUnsigned();\n double factor = 0;\n for (Line2D line : lines) \n {\n factor = line.getP1().getX() * line.getP2().getY() - line.getP2().getX() * line.getP1().getY();\n cx += (line.getP1().getX() + line.getP2().getX()) * factor;\n cy += (line.getP1().getY() + line.getP2().getY()) * factor;\n }\n area *= 6.0d;\n factor = 1 / area;\n cx *= factor;\n cy *= factor;\n return new Point2D.Double(cx, cy);\n }", "public Vector2 getCenter() {\n return center;\n }", "public Vector getCentroid() {\n return centroid;\n }", "public Point getCenter() {\n return location.center();\n }", "public double[] getCenter() {\n return this.center;\n }", "public ImageWorkSpacePt findCurrentCenterPoint() {\n WebPlot plot= getPrimaryPlot();\n\n\n int screenW= plot.getScreenWidth();\n int screenH= plot.getScreenHeight();\n int sw= getScrollWidth();\n int sh= getScrollHeight();\n int cX;\n int cY;\n if (screenW<sw) {\n cX= screenW/2;\n }\n else {\n int scrollX = getScrollX();\n cX= scrollX+sw/2- wcsMarginX;\n }\n\n if (screenH<sh) {\n cY= screenH/2;\n }\n else {\n int scrollY = getScrollY();\n cY= scrollY+sh/2- wcsMarginY;\n }\n\n ScreenPt pt= new ScreenPt(cX,cY);\n\n return plot.getImageWorkSpaceCoords(pt);\n }", "private double centerX() {\n return (piece.boundingBox().getWidth() % 2) / 2.0;\n }", "public Coord3d getCenter() {\n return new Coord3d((xmin + xmax) / 2, (ymin + ymax) / 2, (zmin + zmax) / 2);\n }", "public Vector3D getCenter() {\n return center;\n }", "public Point centeroid ()\r\n {\r\n return new Point ((v1.getX()+v2.getX()+v3.getX())/3,(v1.getY()+v2.getY()+v3.getY())/3);\r\n }", "private int get_x() {\n return center_x;\n }", "public Coordinates getCentroid() {\r\n return centroid;\r\n }", "public Coordinate getCenteredCoordinate() {\n return coordinate.add(getHalfSize());\n }", "private static Point areaCentre() {\r\n\t\tvar centreLon = (lonLB + lonUB)/2;\r\n\t\tvar centreLat = (latLB + latUB)/2;\r\n\t\treturn Point.fromLngLat(centreLon, centreLat);\r\n\t}", "public Line2D.Double\ncenterAtMidPt()\n{\n\tPoint2D midPt = this.getMidPt();\n\treturn new Line2D.Double(\n\t\tgetX1() - midPt.getX(),\n\t\tgetY1() - midPt.getY(),\n\t\tgetX2() - midPt.getX(),\n\t\tgetY2() - midPt.getY());\n}", "public double getCenterX() {\n return this.getLayoutSlot().getX() + (int) (this.getLayoutSlot().getWidth() / 2);\n }", "public Location3D getCenter() {\n\t\treturn new Location3D(world, lowPoint.getBlockX() + getXSize() / 2, lowPoint.getBlockY() + getYSize() / 2, lowPoint.getBlockZ() + getZSize() / 2);\n\t}", "private Point2D getCenterLatLon(){\n Point2D.Double result = new Point2D.Double();\n Point2D.Double screenCenter = new Point2D.Double();\n screenCenter.x = getWidth()/2; //contentpane width/height\n screenCenter.y = getHeight()/2;\n try{\n transform.inverseTransform(screenCenter,result); //transform to lat/lon using the current transform\n } catch (NoninvertibleTransformException e) {\n throw new RuntimeException(e);\n }\n return result;\n }", "public double getCenterX()\n {\n return mainVBox.getTranslateX() + (mainVBox.getWidth() / 2);\n }", "private GPoint findCenterCorner(double r, double x, double y) {\n\t\tdouble cornerX = (lastClick.getX() + x)/2.0 - r;\n\t\tdouble cornerY = lastClick.getY() - r;\n\t\tGPoint point = new GPoint(cornerX,cornerY);\n\t\treturn point;\n\t}", "public int getX() {\r\n return (int) center.getX();\r\n }", "public float[] getCenterCo(float x, float y)\n\t{\n\t\tfloat[] co = new float[2];\n\t\tint xco = getXVal(x);\n\t\tco[0] = (xco*PIXEL_WIDTH) - (PIXEL_WIDTH/2);\n\t\t\n\t\tint yco = getYVal(y);\n\t\tco[1] = (yco*PIXEL_HEIGHT) - (PIXEL_HEIGHT/2);\n\t\t\n\t\treturn co;\n\t}", "public Vec3d getCenter() {\n\t\treturn set;\n\t}", "public Vector3f getCenterOfProjection() {\n\t\treturn mCenterOfProjection;\n\t}", "public Point getLocation() {\r\n\t\treturn this.center;\r\n\t}", "public Vector2f getPosition() { return new Vector2f(centroid_pos); }", "public int getX() {\n return (int) center.getX();\n }", "@Override\n\tpublic Object getCentroid() {\n\t\treturn centroid;\n\t}", "public int getCenter() {\n\t\t\treturn center;\n\t\t}", "public double getMeanCenterDifferenceFromStart(){\n double[] meanCenter = getMeanCenter();\n float[] trans = getTranslationVector(center.getX(),center.getY(),BITMAP_SIZE,BITMAP_SIZE,CONSTANT);\n Log.e(\"Points\",\"Actual (X,Y) = \"+\"(\"+((center.getX()*CONSTANT)+trans[0])+\",\"+((center.getY()*CONSTANT)+trans[1])+\")\");\n Log.e(\"Points\",\"Mean (X,Y) = \" + \"(\"+meanCenter[0]+\",\"+meanCenter[1]+\")\");\n double result = Math.sqrt(\n Math.pow(((center.getX()*CONSTANT)+trans[0]) - meanCenter[0],2)+\n Math.pow(((center.getY()*CONSTANT)+trans[1]) - meanCenter[1],2)\n );\n return result;\n }", "public Point2D getLeftCenterPoint()\n {\n double x = mainVBox.getTranslateX();\n double y = mainVBox.getTranslateY() + (mainVBox.getHeight() / 2);\n return new Point2D(x, y);\n }", "public int getCenterX(){\r\n return centerX;\r\n }", "public Vector2D getArithmeticCenter()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tVector2D center = Vector2D.ZERO;\n\n\t\tfor (Unit unit : this)\n\t\t{\n\t\t\tcenter = center.add(Vector2DMath.toVector(unit.getPosition()));\n\t\t}\n\t\tcenter = center.scale(1.0f / size());\n\n\t\treturn center;\n\t}", "public int getX() {\n return (int) this.center.getX();\n }", "public PointF centroid()\n {\n if (cachedCentroid == null)\n {\n PointF centroid = new PointF();\n\n for (int i = 0; i < size(); i++)\n {\n PointF curr = get(i);\n PointF next = get(i + 1);\n\n float mult = curr.x * next.y - next.x * curr.y;\n centroid.x += (curr.x + next.x) * mult;\n centroid.y += (curr.y + next.y) * mult;\n }\n\n centroid.x /= 6 * signedArea();\n centroid.y /= 6 * signedArea();\n\n cachedCentroid = centroid;\n }\n\n return Geometry.clone(cachedCentroid);\n }", "public Location getCenter() {\n return new Location(location.getWorld(), (float) getRectangle().getCenterX(), (float) getRectangle().getCenterY());\n }", "public Point centroid() {\n\t\t\tdouble xSum = 0.0;\n\t\t\tdouble ySum = 0.0;\n\t\t\tfor(Point point : clusterPointsList){\n\t\t\t\txSum += point.x;\n\t\t\t\tySum += point.y;\n\t\t\t}\n\t\t\tPoint centroid = new Point();\n\t\t\tcentroid.x = xSum / size();\n\t\t\tcentroid.y = ySum / size();\n\t\t\t\n\t\t\treturn centroid;\n\t\t}", "public static int getCenter() {\n\t\treturn Center;\n\t}", "private double[] getMeanCenter(){\n double[] meanXY = new double[2];\n float[] trans = getTranslationVector(center.getX(),center.getY(),BITMAP_SIZE,BITMAP_SIZE,CONSTANT);\n // Plot points\n for (MeasurementService.DataPoint p: list) {\n meanXY[0] += (p.getX()*CONSTANT)+trans[0];\n meanXY[1] += (p.getY()*CONSTANT)+trans[1];\n }\n\n meanXY[0] = meanXY[0] / list.size();\n meanXY[1] = meanXY[1] / list.size();\n return meanXY;\n }", "public abstract Vector2 getCentreOfMass();", "public Vector3d getCurrentCollisionCenter() {\r\n return new Vector3d(collisionCenter.x + currentPosition.x, collisionCenter.y + currentPosition.y, collisionCenter.z + currentPosition.z);\r\n }", "public float distanceToCenter(float x, float y) {\n /* 317 */\n MPPointF c = getCenterOffsets();\n /* */\n /* 319 */\n float dist = 0.0F;\n /* */\n /* 321 */\n float xDist = 0.0F;\n /* 322 */\n float yDist = 0.0F;\n /* */\n /* 324 */\n if (x > c.x) {\n /* 325 */\n xDist = x - c.x;\n /* */\n } else {\n /* 327 */\n xDist = c.x - x;\n /* */\n }\n /* */\n /* 330 */\n if (y > c.y) {\n /* 331 */\n yDist = y - c.y;\n /* */\n } else {\n /* 333 */\n yDist = c.y - y;\n /* */\n }\n /* */\n /* */\n /* 337 */\n dist = (float) Math.sqrt(Math.pow(xDist, 2.0D) + Math.pow(yDist, 2.0D));\n /* */\n /* 339 */\n MPPointF.recycleInstance(c);\n /* */\n /* 341 */\n return dist;\n /* */\n }", "private double findCenterRadius(double x, double y) {\n\t\tdouble dX = Math.abs(lastClick.getX() - x);\n\t\tdouble dY = Math.abs(lastClick.getY() - y);\n\t\tdouble dSquared = Math.pow(dX, 2) + Math.pow(dY, 2);\n\t\tdouble r = Math.sqrt(dSquared) / 2.0;\n\t\treturn r;\n\t}", "public Point2D getGraphViewCenter() {\n \n \t\t// be explicit\n \t\treturn (graphViewCenterX != null && graphViewCenterY != null) ? new Point2D.Double(\n \t\t\t\tgraphViewCenterX.doubleValue(), graphViewCenterY.doubleValue())\n \t\t\t\t: null;\n \t}", "public static Point2D.Double getCenter(Shape shape) {\n\t\tRectangle bounds = shape.getBounds();\n\t\tdouble x = bounds.getX() + bounds.getWidth()/2;\n\t\tdouble y = bounds.getY() + bounds.getHeight()/2;\n\t\treturn new Point2D.Double(x,y);\n\t}", "private Point middleLeft() {\n return this.topLeft.add(0, this.height / 2).asPoint();\n }", "public int getXCenter() {\n return getXOrigin() + panelWidth/2;\n }", "private Point findCenter(MatOfPoint2f triangle) {\n\t\t// Find moments for the triangle.\n\t\tMoments moments = Imgproc.moments(triangle);\n\t\t\n\t\t// Create point and set x, and y positions.\n\t\tPoint center = new Point();\n\t\tcenter.x = moments.get_m10() / moments.get_m00();\n\t\tcenter.y = moments.get_m01() / moments.get_m00();\n\t\t\n\t\t// Return the found center point.\n\t\treturn center;\n\t}", "private Point findCenter(MatOfPoint2f triangle) {\n\t\t// Find moments for the triangle.\n\t\tMoments moments = Imgproc.moments(triangle);\n\t\t\n\t\t// Create point and set x, and y positions.\n\t\tPoint center = new Point();\n\t\tcenter.x = moments.get_m10() / moments.get_m00();\n\t\tcenter.y = moments.get_m01() / moments.get_m00();\n\t\t\n\t\t// Return the found center point.\n\t\treturn center;\n\t}", "public float getCentreY() {\n return centreY;\n }", "private double distanceToCenterOfDisplay(double x, double y) {\n\t\t// A^2 + B^2 = C^2\n\t\tdouble centerx = VIEWING_AREA_WIDTH / 2;\n\t\tdouble centery = VIEWING_AREA_HEIGHT / 2;\n\t\tdouble diffx = abs(centerx - x);\n\t\tdouble diffy = abs(centery - y);\n\t\tdiffx *= diffx;\n\t\tdiffy *= diffy;\n\t\treturn sqrt(diffx + diffy);\n\t}", "private float[] getCentroid (float[][] inArray) {\n\n\t\tfloat ones = inArray.length;\n\t\tfloat xSum = 0;\n\t\tfloat ySum = 0;\n\n\t\tfor (int i = 0; i < inArray.length; i++) {\n\t\t\txSum += inArray[i][0];\n\t\t\tySum += inArray[i][1];\n\t\t}\n\n\t\t// Compute x and y coordinates of centroid\n\n\t\tfloat xCen = (1/ones)*(xSum);\n\t\tfloat yCen = (1/ones)*(ySum);\n\n\t\tfloat[] tempArr = new float[2];\n\t\ttempArr[0] = xCen;\n\t\ttempArr[1] = yCen;\n\n\t\treturn tempArr;\n\t}", "public void centerOn(float x, float y) {\r\n\t\tposx_ = x - w() / 2;\r\n\t\tposy_ = y - h() / 2;\r\n\t}", "public float getTapPointX() {\n return this.tapRect.centerX();\n }", "public Point3d get3DCenter() {\n double xOfCenter = 0;\n double yOfCenter = 0;\n double zOfCenter = 0;\n for (IAtom atom : atoms) {\n xOfCenter += atom.getPoint3d().x;\n yOfCenter += atom.getPoint3d().y;\n zOfCenter += atom.getPoint3d().z;\n }\n\n return new Point3d(xOfCenter / getAtomCount(),\n yOfCenter / getAtomCount(),\n zOfCenter / getAtomCount());\n }", "public void calculateCentroids(float x, float y) {\n\t\t\tpCX = pCY = qCX = qCY = 0;\n\t\t\tfloat total = 0;\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tfloat w = w(x, y, pX[i], pY[i]);\n\t\t\t\ttotal += w;\n\t\t\t\tpCX += w * pX[i];\n\t\t\t\tpCY += w * pY[i];\n\t\t\t\tqCX += w * qX[i];\n\t\t\t\tqCY += w * qY[i];\n\t\t\t}\n\t\t\tpCX /= total;\n\t\t\tpCY /= total;\n\t\t\tqCX /= total;\n\t\t\tqCY /= total;\n\t\t}", "private PointF getCenterOfCropRect() {\n return new PointF(\n cropRect.centerX(),\n cropRect.centerY());\n }" ]
[ "0.70196474", "0.70196474", "0.69864595", "0.6931454", "0.69183767", "0.6904742", "0.6845452", "0.6829825", "0.6806345", "0.6757297", "0.6748849", "0.67174536", "0.6692997", "0.6691679", "0.6687606", "0.66856205", "0.664878", "0.664204", "0.66170555", "0.6614918", "0.6604253", "0.65958554", "0.65852934", "0.6570191", "0.6564709", "0.65599376", "0.6558316", "0.65553284", "0.65267026", "0.65226966", "0.651853", "0.6507662", "0.6494398", "0.6481066", "0.64763397", "0.64614254", "0.64443916", "0.64317065", "0.64203686", "0.64131635", "0.641084", "0.6408853", "0.63934577", "0.63895094", "0.6380682", "0.63793474", "0.63723254", "0.63501084", "0.6334467", "0.63091576", "0.6307597", "0.6303949", "0.63015336", "0.6294988", "0.62591654", "0.62414056", "0.62387174", "0.6228827", "0.6191501", "0.61910564", "0.6179445", "0.61730736", "0.61701083", "0.61629754", "0.6150552", "0.6149451", "0.6144678", "0.61352533", "0.61273813", "0.6120664", "0.61174315", "0.60835755", "0.60729265", "0.60647744", "0.60436606", "0.60427105", "0.60366887", "0.60096425", "0.5991188", "0.5987476", "0.5980266", "0.59603256", "0.59473646", "0.5940092", "0.5939773", "0.5938753", "0.58854795", "0.5882247", "0.5868119", "0.58650684", "0.58630866", "0.5860884", "0.5860884", "0.5841724", "0.5839735", "0.58291817", "0.5811274", "0.5807329", "0.58038485", "0.57937", "0.57894844" ]
0.0
-1
Fire a number of rays with limited distance out the front of the boat, select a ray that isn't obstructed by an object, preference the middle (maybe put a preference to side as well) if every ray is obstructed either (keep turning [left or right] on the spot until one is, or choose the one that is obstructed furthest away the second option (choose the one that is obstructed furthest away) is better
protected void check_turn(List<CollisionObject> collidables) { //Firing rays //select an area of 180 degrees (pi radians) boolean turn = true; Vector2 start_point = get_ray_fire_point(); for (int ray = 0; ray <= number_of_rays; ray++) { if (turn) { ray--; float ray_angle = sprite.getRotation() + ((ray_angle_range / (number_of_rays / 2)) * ray); turn = false; } else { float ray_angle = sprite.getRotation() - ((ray_angle_range / (number_of_rays / 2)) * ray); turn = true; } float ray_angle = ((ray_angle_range / number_of_rays) * ray) + sprite.getRotation(); for (float dist = 0; dist <= ray_range; dist += ray_step_size) { double tempx = (Math.cos(Math.toRadians(ray_angle)) * dist) + (start_point.x); double tempy = (Math.sin(Math.toRadians(ray_angle)) * dist) + (start_point.y); //check if there is a collision hull (other than self) at (tempx, tempy) for (CollisionObject collideable : collidables) { if (collideable.isShown() && ((Obstacle) collideable).getSprite().getY() > sprite.getY() - 200 && ((Obstacle) collideable).getSprite().getY() < sprite.getY() + 200 && ((Obstacle) collideable).getSprite().getX() > sprite.getX() - 200 && ((Obstacle) collideable).getSprite().getX() < sprite.getX() + 200) for (Shape2D bound : collideable.getBounds().getShapes()) { if (bound.contains((float) tempx, (float) tempy)) { // Determines which side the ai should turn to if (turn) { turn(-1); return; } else { turn(1); return; } } } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void frighten(ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n Random r = new Random();\r\n int targetX = 25;\r\n int targetY = 25;\r\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls,0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if(isIntersection) {\r\n\r\n if(!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - targetX,2) + Math.pow(yPos - targetY,2);\r\n }\r\n if(!isLeftCollision && this.direction !=2) {\r\n leftDistance = Math.pow((xPos - 20) - targetX,2) + Math.pow(yPos - targetY,2);\r\n }\r\n if(!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - targetX,2) + Math.pow((yPos-20) - targetY,2);\r\n }\r\n if(!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - targetX,2) + Math.pow((yPos+20) - targetY,2);\r\n }\r\n if(upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n }\r\n else if(downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n }\r\n\r\n else if(rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n }\r\n\r\n else if(leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if(this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if(this.direction ==1) {\r\n yPos = yPos + 5;\r\n }\r\n if(this.direction ==2) {\r\n xPos = xPos + 5;\r\n }\r\n if(this.direction == 3) {\r\n xPos = xPos - 5;\r\n }\r\n }", "private void drive(int e) {\r\n if (endx[e] + 120 >= width - radius[e] && directionend[e] == 0) {\r\n endx[e] += 20;\r\n endy[e] -= 20;\r\n directionend[e]++;\r\n radius[e] -= 60;\r\n directionchanged[e] = true;\r\n } else if (endy[e] + 120 >= height - radius[e] && directionend[e] == 1) {\r\n\r\n endx[e] += 20;\r\n endy[e] += 20;\r\n directionend[e]++;\r\n radius[e] -= 60;\r\n directionchanged[e] = true;\r\n } else if (endx[e] - 120 <= radius[e] && directionend[e] == 2) {\r\n endx[e] -= 20;\r\n endy[e] += 20;\r\n radius[e] -= 60;\r\n directionend[e]++;\r\n directionchanged[e] = true;\r\n } else if (endy[e] - 80 <= radius[e] && directionend[e] == 3) {\r\n endx[e] -= 20;\r\n endy[e] -= 20;\r\n radius[e] -= 60;\r\n directionend[e] = 0;\r\n directionchanged[e] = true;\r\n } else {\r\n directionchanged[e] = false;\r\n }\r\n }", "@Override\n\tpublic void act(long now) {\n\n\t\tcheckIsFrogAtTheEdge();\n\t\t\tif (getIntersectingObjects(Car.class).size() >= 1 ||\n\t\t\t\tgetIntersectingObjects(Truck.class).size() >= 1 ||\n\t\t\t\tgetIntersectingObjects(LongTruck.class).size() >= 1)\n\t\t\t\t{\n\t\t\t\t\tintersectCar = true;\n\t\t\t\t}\n\n\t\t\telse if (getIntersectingObjects(Log.class).size() >= 1 && !death) {\n\t\t\t\tmove(frogSpeed.ObjSpeed(frogLevel, 6), 0);\n\t\t\t}\n\n\t\t\telse if (getIntersectingObjects(LongLog.class).size() >= 1 && !death) {\n\n\t\t\t\tmove(frogSpeed.ObjSpeed(frogLevel, 8), 0);\n\t\t\t}\n\n\t\t\telse if (getIntersectingObjects(Turtle.class).size() >= 1) {\n\t\t\t\tmove(frogSpeed.ObjSpeed(frogLevel, 7), 0);\n\t\t\t}\n\t\t\telse if (getIntersectingObjects(WetTurtle.class).size() >= 1){\n\t\t\t\tif (getIntersectingObjects(WetTurtle.class).get(0).isSunk()) {\n\t\t\t\t\tintersectWater = true;\n\t\t\t\t} else {\n\t\t\t\t\tmove(frogSpeed.ObjSpeed(frogLevel, 7), 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t else if (getIntersectingObjects(End.class).size() >= 1) {\n\n\t\t\t\t\tIntersectEnd();\n\t\t\t\t}\n\n\t\t\telse if (getY() < waterPositionY) {\n\t\t\t\tintersectWater = true;\n\t\t\t}\n\t\t\tgetlives();\n\n\t\t\tCheckIntersect(intersectCar, intersectWater, now);\n\t\t}", "public static RayTraceResult checkForImpact(World world, Entity entity, Entity shooter, double hitBox, boolean flag) \r\n\t{\r\n\t\tVec3d vec3 = new Vec3d(entity.posX, entity.posY, entity.posZ);\r\n\t\tVec3d vec31 = new Vec3d(entity.posX + entity.motionX, entity.posY + entity.motionY, entity.posZ + entity.motionZ);\r\n\r\n\t\tRayTraceResult raytraceresult = world.rayTraceBlocks(vec3, vec31, false, true, false);\r\n\t\tvec3 = new Vec3d(entity.posX, entity.posY, entity.posZ);\r\n\t\tvec31 = new Vec3d(entity.posX + entity.motionX, entity.posY + entity.motionY, entity.posZ + entity.motionZ);\r\n\r\n\t\tif (raytraceresult != null) \r\n\t\t{\r\n\t\t\tvec31 = new Vec3d(raytraceresult.hitVec.x, raytraceresult.hitVec.y, raytraceresult.hitVec.z);\r\n\t\t}\r\n\r\n\t\tEntity target = null;\r\n\t\tList<Entity> list = world.getEntitiesWithinAABBExcludingEntity(entity, entity.getEntityBoundingBox().expand(entity.motionX, entity.motionY, entity.motionZ).expand(1.0D, 1.0D, 1.0D));\r\n\t\tdouble d0 = 0.0D;\r\n\t\t//double hitBox = 0.3D;\r\n\r\n\t\tfor (int i = 0; i < list.size(); ++i) \r\n\t\t{\r\n\t\t\tEntity entity1 = (Entity) list.get(i);\r\n\r\n\t\t\tif (entity1.canBeCollidedWith() && (entity1 != shooter || flag)) \r\n\t\t\t{\r\n\t\t\t\tAxisAlignedBB axisalignedbb = entity1.getEntityBoundingBox().expand(hitBox, hitBox, hitBox);\r\n\t\t\t\tRayTraceResult mop1 = axisalignedbb.calculateIntercept(vec3, vec31);\r\n\r\n\t\t\t\tif (mop1 != null) \r\n\t\t\t\t{\r\n\t\t\t\t\tdouble d1 = vec3.distanceTo(mop1.hitVec);\r\n\r\n\t\t\t\t\tif (d1 < d0 || d0 == 0.0D) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttarget = entity1;\r\n\t\t\t\t\t\td0 = d1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (target != null) \r\n\t\t{\r\n\t\t\traytraceresult = new RayTraceResult(target);\r\n\t\t}\r\n\r\n\t\tif (raytraceresult != null && raytraceresult.entityHit instanceof EntityPlayer) \r\n\t\t{\r\n\t\t\tEntityPlayer player = (EntityPlayer) raytraceresult.entityHit;\r\n\r\n\t\t\tif (player.capabilities.disableDamage || (shooter instanceof EntityPlayer\r\n\t\t\t\t\t&& !((EntityPlayer) shooter).canAttackPlayer(player)))\r\n\t\t\t{\r\n\t\t\t\traytraceresult = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn raytraceresult;\r\n\t}", "private void collide() {\n int collisionRange;\n \n if(isObstacle) {\n for(Thing thg: proximity) {\n if(\n thg.isObstacle\n &&\n !thg.equals(this)\n ) {\n collisionRange = (thg.size + this.size)/2;\n deltaA = this.distance(thg);\n \n if( \n Math.abs(deltaA[0]) <= collisionRange\n &&\n Math.abs(deltaA[1]) <= collisionRange\n ){\n if(deltaA[0] > deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == 1) {\n dA[0] = 0;\n }\n }\n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == -1) {\n dA[1] = 0;\n }\n }\n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n if(dA[0] != 0) {\n dA[1] = dA[0];\n }\n if(dA[1] != 0) {\n dA[0] = dA[1];\n }\n }\n }\n \n if(deltaA[0] < deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == -1) {\n dA[0] = 0;\n }\n } \n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == 1) {\n dA[1] = 0;\n }\n } \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = dA[0];\n }\n }\n \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = -dA[0];\n }\n }\n }\n }\n }\n }", "public void chase(int targetX, int targetY, ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls, 0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if (isIntersection) {\r\n if (!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - targetX, 2) + Math.pow(yPos - targetY, 2);\r\n }\r\n if (!isLeftCollision && this.direction != 2) {\r\n leftDistance = Math.pow((xPos - 20) - targetX, 2) + Math.pow(yPos - targetY, 2);\r\n }\r\n if (!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - targetX, 2) + Math.pow((yPos - 20) - targetY, 2);\r\n }\r\n if (!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - targetX, 2) + Math.pow((yPos + 20) - targetY, 2);\r\n }\r\n if (upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n } else if (downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n } else if (rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n } else if (leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if (this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if (this.direction == 1) {\r\n yPos = yPos + 5;\r\n }\r\n if (this.direction == 2) {\r\n xPos = xPos + 5;\r\n }\r\n if (this.direction == 3) {\r\n xPos = xPos - 5;\r\n }\r\n\r\n }", "public void lookHere(int x, int y, int ID){\n\n\n\n switch (ID){\n case FLY:\n //find faces close enough\n /*for(int i=0;i<mFaces.size();i++){\n Face face = mFaces.get(i);\n if(ViewTools.getDistancetoNonSQRTD(x,y,face.getCenterX(),face.getCenterY())<FlyFocusDistanceNONSQRTD){\n lookHere(x,y,face,FLY);\n }else StopLookingOne(FLY, face);\n }*/\n\n //pick one face\n class faceDistance{\n public float distance;\n public Face face;\n faceDistance(float distance, Face face) {\n this.distance = distance;\n this.face = face;\n }\n\n }\n ArrayList<faceDistance> distances = new ArrayList<faceDistance>();\n for(int i=0;i<mFaces.size();i++){\n Face face = mFaces.get(i);\n float flyDistance = ViewTools.getDistancetoNonSQRTD(x, y, face.getCenterX(), face.getCenterY());\n //Log.d(\"BRAIN\", \"FLY DISTANCE SQUARED:\" + FlyFocusDistanceNONSQRTD + \" this face distance: \"+ flyDistance);\n if(flyDistance <FlyFocusDistanceNONSQRTD){\n distances.add(new faceDistance(flyDistance,mFaces.get(i)));\n }else StopLookingOne(FLY, face);\n\n }\n\n ArrayList<faceDistance> distancesSorted = new ArrayList<faceDistance>();\n if(distances.size()>0)distancesSorted.add(distances.get(0));\n for(int i=1;i<distances.size();i++){\n int distanceSortedSize=distancesSorted.size();\n for(int i2=0;i2<distanceSortedSize;i2++){\n if(i2==distancesSorted.size()-1)distancesSorted.add(distances.get(i));\n else if(distances.get(i).distance<distancesSorted.get(i2).distance){\n distancesSorted.add(i2,distances.get(i));\n i2=distancesSorted.size();\n }\n }\n\n }\n\n\n for(int i=0;i<distancesSorted.size();i++){\n if(i< MAX_FLY_FOCUSES||MAX_FLY_FOCUSES==UNRESTRICTED)lookHere(x,y,distancesSorted.get(i).face,FLY);\n else StopLookingOne(FLY,distancesSorted.get(i).face);\n\n }\n\n ///picking one face\n\n\n break;\n case FINGER:\n for(int i=0;i<mFaces.size();i++){\n Face face = mFaces.get(i);\n if(ViewTools.getDistancetoNonSQRTD(x,y,face.getCenterX(),face.getCenterY())<FlyFocusDistanceNONSQRTD*2){\n lookHere(x,y,face,FINGER);\n }else StopLookingOne(FINGER, face);\n }\n break;\n case FROG:\n ///select a face to look at the frog\n //command to look only sent once, eyes stay looking at frog, until relase code sent\n int faceSelected = mRandom.nextInt(mFaces.size()-1);\n if(faceSelected== mFrogIndex)faceSelected++;\n mFaces.get(faceSelected).SetEyeAdjustDuration(true);\n lookHere(x, y, mFaces.get(faceSelected), FROG);\n\n new lookAway(mFaces.get(faceSelected),mFrog.getFrogLookAttentionLength());\n\n //mFrog.setFrogLookAttentionLength(mFrog.getFrogLookAttentionLength()*2);\n //mFrog.setFrogLookInterval((long) (mFrog.getFrogLookInterval()*.90));\n //Log.d(\"Brain\", \"frog look interval:\"+ mFrog.getFrogLookInterval());\n //Log.d(\"Brain\", \"frog look lenght:\"+ mFrog.getFrogLookAttentionLength());\n\n break;\n case REVEALED_FROG:\n ///\n break;\n\n }\n\n }", "void object_calculations_touch_ground(){\n\n if (down_angle < 0 && up_angle > 0)//base case\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n base_case();\n } else if ((down_angle > 0 && up_angle > 0) && (down_angle < up_angle))//smaller object\n {\n double temp = up_angle;\n up_angle = down_angle;\n down_angle = temp;\n measure_small_object();\n } else if (up_angle < 0 && down_angle > 0)//base case\n base_case();\n else //smaller object\n measure_small_object();\n }", "private void thinkAboutNext(ArrayList<Point> pos, boolean hit, boolean destroyedIt) {\n if (!searching && hit) {\n betweenTwo = false;\n System.out.println(\"WAS A NEW TARGET\");\n if(!destroyedIt) {\n int[] d = Direction.DOWN.getDirectionVector();\n Point n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.DOWN);\n\n d = Direction.UP.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.UP);\n\n d = Direction.LEFT.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.LEFT);\n\n d = Direction.RIGHT.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.RIGHT);\n\n directionLooking = directionsToGo.get(directionsToGo.size() - 1);\n }\n }\n else if (searching) {\n //FILTER OUT ALREADY ATTACKED\n\n System.out.println(\"WAS AN OLD TARGET\");\n\n //FAILED\n if(!hit) {\n justBefore = firstHit;\n int size = directionsToGo.size();\n\n for(int i = size - 1; i >= 0; i--){\n Point n = new Point(justBefore.x + directionsToGo.get(i).getDirectionVector()[0],\n justBefore.y + directionsToGo.get(i).getDirectionVector()[1]);\n if(!pos.contains(n))\n directionsToGo.remove(i);\n }\n directionLooking = directionsToGo.get(0);\n }\n else\n if(!pos.contains(pWD(justBefore, directionLooking))) {\n justBefore = firstHit;\n directionLooking = directionLooking.getOpposite();\n }\n\n }\n if(hit) {\n searching = !destroyedIt;\n }\n }", "@Override\n\tpublic void intersect(Ray ray, IntersectResult result) {\n\t\t\t\tdouble tmin,tmax;\n\t\t\t\tdouble xmin, xmax, ymin, ymax, zmin, zmax;\n\t\t\t\t//find which face to cross\n\n\t\t\t\tif(ray.viewDirection.x>0){\n\t\t\t\t\txmin=(min.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t\txmax=(max.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t}else{\n\t\t\t\t\txmin=(max.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t\txmax=(min.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t}\n\t\t\t\tif(ray.viewDirection.y>0){\n\t\t\t\t\tymin=(min.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t\tymax=(max.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t}else{\n\t\t\t\t\tymin=(max.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t\tymax=(min.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t}\n\t\t\t\tif(ray.viewDirection.z>0){\n\t\t\t\t\tzmin=(min.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t\tzmax=(max.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t}else{\n\t\t\t\t\tzmin=(max.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t\tzmax=(min.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmin=Double.max(xmin, ymin);\n\t\t\t\ttmin=Double.max(tmin, zmin);\n\t\t\t\ttmax=Double.min(xmax, ymax);\n\t\t\t\ttmax=Double.min(tmax, zmax);\n\t\t\t\t\n\t\t\t\t \n\t\t\t\tif(tmin<tmax && tmin>0){\n\t\t\t\t\t\n\t\t\t\t\tresult.material=material;\n\t\t\t\t\tresult.t=tmin;\n\t\t\t\t\tPoint3d p=new Point3d(ray.viewDirection);\n\t\t\t\t\tp.scale(tmin);\n\t\t\t\t\tp.add(ray.eyePoint);\n\t\t\t\t\tresult.p=p;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tfinal double epsilon=1e-9;\n\t\t\t\t\t// find face and set the normal\n\t\t\t\t\tif(Math.abs(p.x-min.x)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(-1,0,0);\n\t\t\t\t\t}else if(Math.abs(p.x-max.x)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(1,0,0);\n\t\t\t\t\t}else if(Math.abs(p.y-min.y)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,-1,0);\n\t\t\t\t\t}else if(Math.abs(p.y-max.y)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,1,0);\n\t\t\t\t\t}else if(Math.abs(p.z-min.z)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,0,-1);\n\t\t\t\t\t}else if(Math.abs(p.z-max.z)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,0,1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t}", "public static boolean rayTraceBlocks(World world, Vec3d vec, Vec3d vecEnd, boolean collideOnAllSolids)\n {\n world.profiler.startSection(\"Fantastic Lib: Improved Raytrace\");\n if (vec.x < vecEnd.x)\n {\n Vec3d swap = vec;\n vec = vecEnd;\n vecEnd = swap;\n }\n\n int x = MathHelper.floor(vec.x);\n int y = MathHelper.floor(vec.y);\n int z = MathHelper.floor(vec.z);\n\n int endX = MathHelper.floor(vecEnd.x);\n int endY = MathHelper.floor(vecEnd.y);\n int endZ = MathHelper.floor(vecEnd.z);\n\n //Check starting block\n BlockPos blockPos = new BlockPos(x, y, z);\n if (!world.isBlockLoaded(blockPos))\n {\n world.profiler.endSection();\n return false;\n }\n\n\n IBlockState blockState = world.getBlockState(blockPos);\n if ((collideOnAllSolids || !canSeeThrough(blockState)) && blockState.getCollisionBoundingBox(world, blockPos) != Block.NULL_AABB)\n {\n if (blockState.collisionRayTrace(world, blockPos, vec, vecEnd) != null)\n {\n world.profiler.endSection();\n return false;\n }\n }\n\n //Iterate through all non-starting blocks and check them\n for (int i = 1; i <= MAX_ITERATIONS; i++)\n {\n if (x == endX && y == endY && z == endZ)\n {\n world.profiler.endSection();\n return true;\n }\n\n boolean xMotion = true;\n boolean yMotion = true;\n boolean zMotion = true;\n\n double x2 = 999;\n double y2 = 999;\n double z2 = 999;\n\n if (endX > x) x2 = x + 1;\n else if (endX < x) x2 = x;\n else xMotion = false;\n\n if (endY > y) y2 = y + 1;\n else if (endY < y) y2 = y;\n else yMotion = false;\n\n if (endZ > z) z2 = z + 1;\n else if (endZ < z) z2 = z;\n else zMotion = false;\n\n double x3 = 999;\n double y3 = 999;\n double z3 = 999;\n\n double xDif = vecEnd.x - vec.x;\n double yDif = vecEnd.y - vec.y;\n double zDif = vecEnd.z - vec.z;\n\n if (xMotion) x3 = (x2 - vec.x) / xDif;\n if (yMotion) y3 = (y2 - vec.y) / yDif;\n if (zMotion) z3 = (z2 - vec.z) / zDif;\n\n //Make sure they wanted to use -0.0001 here (they were using -1.0E-4D, which is -0.0001)\n if (x3 == 0) x3 = -0.0001;\n if (y3 == 0) y3 = -0.0001;\n if (z3 == 0) z3 = -0.0001;\n\n EnumFacing enumfacing;\n\n if (x3 < y3 && x3 < z3)\n {\n enumfacing = endX > x ? EnumFacing.WEST : EnumFacing.EAST;\n vec = new Vec3d(x2, vec.y + yDif * x3, vec.z + zDif * x3);\n }\n else if (y3 < z3)\n {\n enumfacing = endY > y ? EnumFacing.DOWN : EnumFacing.UP;\n vec = new Vec3d(vec.x + xDif * y3, y2, vec.z + zDif * y3);\n }\n else\n {\n enumfacing = endZ > z ? EnumFacing.NORTH : EnumFacing.SOUTH;\n vec = new Vec3d(vec.x + xDif * z3, vec.y + yDif * z3, z2);\n }\n\n x = MathHelper.floor(vec.x) - (enumfacing == EnumFacing.EAST ? 1 : 0);\n y = MathHelper.floor(vec.y) - (enumfacing == EnumFacing.UP ? 1 : 0);\n z = MathHelper.floor(vec.z) - (enumfacing == EnumFacing.SOUTH ? 1 : 0);\n\n blockPos = new BlockPos(x, y, z);\n if (!world.isBlockLoaded(blockPos))\n {\n world.profiler.endSection();\n return false;\n }\n\n blockState = world.getBlockState(blockPos);\n if ((collideOnAllSolids || !canSeeThrough(blockState)) && blockState.getCollisionBoundingBox(world, blockPos) != Block.NULL_AABB)\n {\n if (blockState.collisionRayTrace(world, blockPos, vec, vecEnd) != null)\n {\n world.profiler.endSection();\n return false;\n }\n }\n }\n\n world.profiler.endSection();\n return false; //Too far to see\n }", "private Point3 _getIntersection(Point3 eye, Point3 direction) {\n int size = NORMALS.length;\n float tresult;\n Point4 norm; // normal of face hit\n Plane plane; // plane equation\n float tnear, tfar, t, vn, vd;\n int front = 0, back = 0; // front/back face # hit\n\n tnear = -1.0e+20f; // -HUGE_VAL\n tfar = +1.0e+20f; // tmax\n for (int i = 0; i < size; i++) {\n\n plane = _planes[i];\n\n vd = plane.dot(direction);\n vn = plane.distance(eye);\n if (vd == 0.0f) {\n // ray is parallel to plane -\n // check if ray origin is inside plane's\n // half-space\n if (vn < 0.0f) {\n return null;\n }\n\n } else {\n // ray not parallel - get distance to plane\n t = -vn / vd;\n if (vd > 0.0f) {\n\n if (t > tfar) {\n return null;\n }\n if (t > tnear) {\n // hit near face, update normal\n front = i;\n tnear = t;\n }\n } else {\n // back face - T is a far point\n\n if (t < tnear) {\n return null;\n }\n if (t < tfar) {\n // hit far face, update normal\n\n back = i;\n tfar = t;\n }\n }\n }\n }\n // survived all tests\n // Note: if ray originates on polyhedron,\n // may want to change 0.0 to some\n // epsilon to avoid intersecting the originating face.\n //\n if (tnear >= 0.0f) {\n // outside, hitting front face\n norm = _planes[front]._normal;\n tresult = tnear;\n return Point3.addition(eye, direction.scaled(tresult));\n } else {\n if (tfar < 1.0e+20f) {\n // inside, hitting back face\n norm = _planes[back]._normal;\n tresult = tfar;\n return Point3.addition(eye, direction.scaled(tresult));\n } else {\n // inside, but back face beyond tmax//\n return null;\n }\n }\n }", "public MovingObjectPosition rayTraceEntities(World world, Vector3 target)\n {\n MovingObjectPosition pickedEntity = null;\n Vec3 startingPosition = this.toVec3();\n Vec3 look = target.toVec3();\n double reachDistance = this.distance(target);\n Vec3 reachPoint = Vec3.createVectorHelper(startingPosition.xCoord + look.xCoord * reachDistance, startingPosition.yCoord + look.yCoord * reachDistance, startingPosition.zCoord + look.zCoord * reachDistance);\n\n double checkBorder = 1.1 * reachDistance;\n AxisAlignedBB boxToScan = AxisAlignedBB.getAABBPool().getAABB(-checkBorder, -checkBorder, -checkBorder, checkBorder, checkBorder, checkBorder).offset(this.x, this.y, this.z);\n\n @SuppressWarnings(\"unchecked\")\n List<Entity> entitiesHit = world.getEntitiesWithinAABBExcludingEntity(null, boxToScan);\n double closestEntity = reachDistance;\n\n if (entitiesHit == null || entitiesHit.isEmpty())\n {\n return null;\n }\n for (Entity entityHit : entitiesHit)\n {\n if (entityHit != null && entityHit.canBeCollidedWith() && entityHit.boundingBox != null)\n {\n float border = entityHit.getCollisionBorderSize();\n AxisAlignedBB aabb = entityHit.boundingBox.expand(border, border, border);\n MovingObjectPosition hitMOP = aabb.calculateIntercept(startingPosition, reachPoint);\n\n if (hitMOP != null)\n {\n if (aabb.isVecInside(startingPosition))\n {\n if (0.0D < closestEntity || closestEntity == 0.0D)\n {\n pickedEntity = new MovingObjectPosition(entityHit);\n if (pickedEntity != null)\n {\n pickedEntity.hitVec = hitMOP.hitVec;\n closestEntity = 0.0D;\n }\n }\n }\n else\n {\n double distance = startingPosition.distanceTo(hitMOP.hitVec);\n\n if (distance < closestEntity || closestEntity == 0.0D)\n {\n pickedEntity = new MovingObjectPosition(entityHit);\n pickedEntity.hitVec = hitMOP.hitVec;\n closestEntity = distance;\n }\n }\n }\n }\n }\n return pickedEntity;\n }", "public void\nrayPickBoundingBox(SoRayPickAction action, final SbBox3f bbox)\n//\n////////////////////////////////////////////////////////////////////////\n{\n // Save the state so we don't affect the real complexity\n action.getState().push();\n\n // Change the complexity\n SoComplexityElement.set(action.getState(), 0.0f);\n SoComplexityTypeElement.set(action.getState(),\n SoComplexityTypeElement.Type.OBJECT_SPACE);\n\n // Change the current matrix to scale and translate the cube to the\n // correct spot. (We can't just use an extra matrix passed to\n // computeObjectSpaceRay(), since the points generated by\n // generatePrimitives() have to be transformed, not just the ray.)\n final SbVec3fSingle size = new SbVec3fSingle();\n bbox.getSize(size);\n\n // If any of the dimensions is 0, beef it up a little bit to avoid\n // scaling by 0\n if (size.getValueRead()[0] == 0.0)\n size.getValue()[0] = 0.00001f;\n if (size.getValueRead()[1] == 0.0)\n size.getValue()[1] = 0.00001f;\n if (size.getValueRead()[2] == 0.0)\n size.getValue()[2] = 0.00001f;\n\n SoModelMatrixElement.translateBy(action.getState(), this,\n bbox.getCenter());\n SoModelMatrixElement.scaleBy(action.getState(), this,\n size.operator_mul(0.5f));\n\n // Compute the picking ray in the space of the shape\n computeObjectSpaceRay(action);\n\n // Pick using primitive generation. Make sure we know that we are\n // picking on just a bounding box of another shape, so details\n // won't be created.\n pickingBoundingBox = true;\n generatePrimitives(action);\n\n // Restore the state\n action.getState().pop();\n}", "@Override\n\tpublic RaySceneObjectIntersection getClosestRayIntersection(Ray ray)\n\t{\n\t\tVector3D v=Vector3D.difference(ray.getP(), pointOnAxis);\n\t\tVector3D vP = v.getDifferenceWith(v.getProjectionOnto(normalisedAxisDirection));\t// part of v that's perpendicular to a\n\t\tVector3D dP = ray.getD().getDifferenceWith(ray.getD().getProjectionOnto(normalisedAxisDirection));\t// part of ray.d that's perpendicular to a\n\t\t\n\t\t// coefficients in the quadratic equation for t\n\t\tdouble a = dP.getModSquared();\n\t\t\n\t\tif(a==0.0) return RaySceneObjectIntersection.NO_INTERSECTION;\t// would give division by zero later\n\n\t\tdouble\n\t\t\tb2 = Vector3D.scalarProduct(vP, dP),\t// b/2\n\t\t\tc = vP.getModSquared() - radius*radius,\n\t\t\tdiscriminant4 = b2*b2 - a*c;\t// discriminant/4\n\n\t\t// first check if the discriminant is >0; if it isn't, then there is no intersection at all\n\t\tif(discriminant4 < 0.0) return RaySceneObjectIntersection.NO_INTERSECTION;\n\t\t\n\t\t// okay, the discriminant is positive; take its square root, which is what we actually need\n\t\tdouble sqrtDiscriminant2 = Math.sqrt(discriminant4);\t// sqrt(discriminant)/2\n\t\t\t\n\t\t// calculate the factor t corresponding to the\n\t\t// intersection with the greater t factor;\n\t\t// the further-away intersection is then ray.p + tBigger*ray.d\n\t\tdouble tBigger=((a>0)?(-b2+sqrtDiscriminant2)/a:(-b2-sqrtDiscriminant2)/a);\n\t\t\n\t\t//if tBigger<0, then the intersection with the lesser t factor will have to be even more negative;\n\t\t// therefore, both intersections will be \"behind\" the starting point\n\t\tif(tBigger < 0.0) return RaySceneObjectIntersection.NO_INTERSECTION;\n\n\t\t// calculate the factor tSmaller corresponding to the\n\t\t// intersection with the lesser t factor\n\t\tdouble tSmaller=((a>0)?(-b2-sqrtDiscriminant2)/a:(-b2+sqrtDiscriminant2)/a);\n\n\t\tRay rayAtIntersectionPoint;\n\t\t\n\t\t// first check if the intersection point with the lesser t factor is an option\n\t\tif(tSmaller > 0.0)\n\t\t{\n\t\t\t// the intersection with the lesser t factor lies in front of the starting point, so it might correspond to the intersection point\n\t\t\t\n\t\t\t// calculate the ray advanced to the intersection point\n\t\t\trayAtIntersectionPoint = ray.getAdvancedRay(tSmaller);\n\t\t\t\n\t\t\treturn new RaySceneObjectIntersection(rayAtIntersectionPoint.getP(), this, rayAtIntersectionPoint.getT());\n\t\t}\n\t\t\n\t\t// If the program reaches this point, the intersection with the lesser t factor was not the right intersection.\n\t\t// Now try the intersection point with the greater t factor.\n\t\t\n\t\t// calculate the ray advanced to the intersection point\n\t\trayAtIntersectionPoint = ray.getAdvancedRay(tBigger);\n\n\t\treturn new RaySceneObjectIntersection(rayAtIntersectionPoint.getP(), this, rayAtIntersectionPoint.getT());\n\t}", "public double findRayIntersection(Vec3 origin, Vec3 direction, Vec3 normal)\n {\n double scale = width/obj.getScale();\n double ox = origin.x*scale+0.5*width;\n double oy = origin.y*scale+0.5*width;\n double oz = origin.z*scale+0.5*width;\n double dx = direction.x;\n double dy = direction.y;\n double dz = direction.z;\n\n // Find the intersection of the ray with the bounding box.\n\n double mint = -Double.MAX_VALUE;\n double maxt = Double.MAX_VALUE;\n if (dx == 0.0)\n {\n if (ox < minx || ox > maxx)\n return 0.0;\n }\n else\n {\n double t1 = (minx-ox)/dx;\n double t2 = (maxx-ox)/dx;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (dy == 0.0)\n {\n if (oy < miny || oy > maxy)\n return 0.0;\n }\n else\n {\n double t1 = (miny-oy)/dy;\n double t2 = (maxy-oy)/dy;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (dz == 0.0)\n {\n if (oz < minz || oz > maxz)\n return 0.0;\n }\n else\n {\n double t1 = (minz-oz)/dz;\n double t2 = (maxz-oz)/dz;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (mint < 0.0)\n mint = 0.0;\n\n // Find the first voxel and initialize variables.\n\n double xpos = ox+mint*dx;\n double ypos = oy+mint*dy;\n double zpos = oz+mint*dz;\n int x = Math.max(Math.min((int) xpos, maxx), minx);\n int y = Math.max(Math.min((int) ypos, maxy), miny);\n int z = Math.max(Math.min((int) zpos, maxz), minz);\n int stepx, stepy, stepz;\n int finalx, finaly, finalz;\n double tdeltax, tdeltay, tdeltaz;\n double tmaxx, tmaxy, tmaxz;\n if (dx < 0.0)\n {\n stepx = -1;\n finalx = minx-1;\n tdeltax = -1.0/dx;\n tmaxx = (x-ox)/dx;\n }\n else if (dx > 0.0)\n {\n stepx = 1;\n finalx = maxx+1;\n tdeltax = 1.0/dx;\n tmaxx = (x+1-ox)/dx;\n }\n else\n {\n stepx = 0;\n finalx = 0;\n tdeltax = 0.0;\n tmaxx = Double.MAX_VALUE;\n }\n if (dy < 0.0)\n {\n stepy = -1;\n finaly = miny-1;\n tdeltay = -1.0/dy;\n tmaxy = (y-oy)/dy;\n }\n else if (dy > 0.0)\n {\n stepy = 1;\n finaly = maxy+1;\n tdeltay = 1.0/dy;\n tmaxy = (y+1-oy)/dy;\n }\n else\n {\n stepy = 0;\n finaly = 0;\n tdeltay = 0.0;\n tmaxy = Double.MAX_VALUE;\n }\n if (dz < 0.0)\n {\n stepz = -1;\n finalz = minz-1;\n tdeltaz = -1.0/dz;\n tmaxz = (z-oz)/dz;\n }\n else if (dz > 0.0)\n {\n stepz = 1;\n finalz = maxz+1;\n tdeltaz = 1.0/dz;\n tmaxz = (z+1-oz)/dz;\n }\n else\n {\n stepz = 0;\n finalz = 0;\n tdeltaz = 0.0;\n tmaxz = Double.MAX_VALUE;\n }\n\n // Step through the voxels, looking for intersections.\n\n VoxelOctree voxels = obj.getVoxels();\n byte values[] = new byte[8];\n while (true)\n {\n int index = x*width*width+y*width+z;\n if ((flags[index/32]&(1<<(index%32))) != 0)\n {\n // There is a piece of the surface in this voxel, so see if the ray intersects it.\n // First find the values of t at which the ray enters and exits it.\n \n double tenter = -Double.MAX_VALUE;\n double texit = Double.MAX_VALUE;\n if (dx != 0.0)\n {\n double t1 = (x-ox)/dx;\n double t2 = (x+1-ox)/dx;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (dy != 0.0)\n {\n double t1 = (y-oy)/dy;\n double t2 = (y+1-oy)/dy;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (dz != 0.0)\n {\n double t1 = (z-oz)/dz;\n double t2 = (z+1-oz)/dz;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (tenter < 0.0)\n continue; // Ignore intersections in the voxel containing the origin.\n\n // Look up the values at the eight corners of the voxel.\n\n values[0] = voxels.getValue(x, y, z);\n values[1] = voxels.getValue(x, y, z+1);\n values[2] = voxels.getValue(x, y+1, z);\n values[3] = voxels.getValue(x, y+1, z+1);\n values[4] = voxels.getValue(x+1, y, z);\n values[5] = voxels.getValue(x+1, y, z+1);\n values[6] = voxels.getValue(x+1, y+1, z);\n values[7] = voxels.getValue(x+1, y+1, z+1);\n\n // Find the positions within the voxel where the ray enters and exits.\n\n double xenter = ox+dx*tenter-x;\n double yenter = oy+dy*tenter-y;\n double zenter = oz+dz*tenter-z;\n double xexit = ox+dx*texit-x;\n double yexit = oy+dy*texit-y;\n double zexit = oz+dz*texit-z;\n\n // Interpolate the find the values at those points.\n\n double enterValue = values[0]*(1.0-xenter)*(1.0-yenter)*(1.0-zenter)\n +values[1]*(1.0-xenter)*(1.0-yenter)*zenter\n +values[2]*(1.0-xenter)*yenter*(1.0-zenter)\n +values[3]*(1.0-xenter)*yenter*zenter\n +values[4]*xenter*(1.0-yenter)*(1.0-zenter)\n +values[5]*xenter*(1.0-yenter)*zenter\n +values[6]*xenter*yenter*(1.0-zenter)\n +values[7]*xenter*yenter*zenter;\n double exitValue = values[0]*(1.0-xexit)*(1.0-yexit)*(1.0-zexit)\n +values[1]*(1.0-xexit)*(1.0-yexit)*zexit\n +values[2]*(1.0-xexit)*yexit*(1.0-zexit)\n +values[3]*(1.0-xexit)*yexit*zexit\n +values[4]*xexit*(1.0-yexit)*(1.0-zexit)\n +values[5]*xexit*(1.0-yexit)*zexit\n +values[6]*xexit*yexit*(1.0-zexit)\n +values[7]*xexit*yexit*zexit;\n if ((enterValue > 0 && exitValue <= 0) || (enterValue <= 0 && exitValue > 0))\n {\n // Find the intersection point.\n\n double weight1 = Math.abs(exitValue);\n double weight2 = Math.abs(enterValue);\n double d = 1.0/(weight1+weight2);\n weight1 *= d;\n weight2 *= d;\n double tintersect = (tenter*weight1 + texit*weight2)/scale;\n if (normal != null)\n {\n normal.set(values[0]+values[1]+values[2]+values[3]-values[4]-values[5]-values[6]-values[7],\n values[0]+values[1]-values[2]-values[3]+values[4]+values[5]-values[6]-values[7],\n values[0]-values[1]+values[2]-values[3]+values[4]-values[5]+values[6]-values[7]);\n normal.normalize();\n }\n return tintersect;\n }\n }\n\n // Advance to the next voxel.\n\n if (tmaxx < tmaxy)\n {\n if (tmaxx < tmaxz)\n {\n x += stepx;\n if (x == finalx)\n return 0.0;\n tmaxx += tdeltax;\n }\n else\n {\n z += stepz;\n if (z == finalz)\n return 0.0;\n tmaxz += tdeltaz;\n }\n }\n else\n {\n if (tmaxy < tmaxz)\n {\n y += stepy;\n if (y == finaly)\n return 0.0;\n tmaxy += tdeltay;\n }\n else\n {\n z += stepz;\n if (z == finalz)\n return 0.0;\n tmaxz += tdeltaz;\n }\n }\n }\n }", "@Test\n public void nearestObjectHighlighted() {\n radar.loop();\n assertTrue(world.getPasslist().get(0).isHighlightedWhenRadarIsOn());\n }", "public double rayIntersect(Vector3D rayOrigin, Vector3D rayDirection, boolean goingOut, int[] faceIndex, LinkedTransferQueue simVis) {\n double tmin = -1;\n int x = 0;\n int y = 1;\n int z = 2;\n int face = -1;\n if (java.lang.Math.abs(rayDirection.getNorm() - 1) > 1e-8) {\n System.out.println(\"direction not normalized in rayIntersect\");\n }\n\n double ox = rayOrigin.getX();\n double oy = rayOrigin.getY();\n double oz = rayOrigin.getZ();\n\n double dx = rayDirection.getX();\n double dy = rayDirection.getY();\n double dz = rayDirection.getZ();\n\n cacheVerticesAndFaces();\n// System.out.println(\"Checking part\" + this.part.name);\n int vis = this.mesh.getVertexFormat().getVertexIndexSize();\n\n for (int i = 0; i < faces.length; i += 6) {\n double t = Util.Math.rayTriangleIntersect(ox, oy, oz, dx, dy, dz,\n vertices[3 * faces[i] + x], vertices[3 * faces[i] + y], vertices[3 * faces[i] + z],\n goingOut ? vertices[3 * faces[i + 2 * vis] + x] : vertices[3 * faces[i + vis] + x],\n goingOut ? vertices[3 * faces[i + 2 * vis] + y] : vertices[3 * faces[i + vis] + y],\n goingOut ? vertices[3 * faces[i + 2 * vis] + z] : vertices[3 * faces[i + vis] + z],\n goingOut ? vertices[3 * faces[i + vis] + x] : vertices[3 * faces[i + 2 * vis] + x],\n goingOut ? vertices[3 * faces[i + vis] + y] : vertices[3 * faces[i + 2 * vis] + y],\n goingOut ? vertices[3 * faces[i + vis] + z] : vertices[3 * faces[i + 2 * vis] + z]\n );\n if (t != -1) {\n if (tmin != -1) {\n if (t < tmin) {\n tmin = t;\n face = i;\n }\n } else {\n tmin = t;\n face = i;\n }\n }\n }\n // report back the face index if asked for\n if (faceIndex != null) {\n faceIndex[0] = face;\n }\n\n return tmin;\n }", "@Override\n\tpublic Intersection intersect(Ray ray) {\n\t\tdouble maxDistance = 10;\n\t\tdouble stepSize = 0.001; \n\t\tdouble t = 0;\n\t\t\n\t\twhile(t<maxDistance) {\t\t\t\n\t\t\tVector point = ray.m_Origin.add(ray.m_Direction.mul(t));\t\t\t\n\t\t\tdouble eval = torus(point);\t\t\t\n\t\t\tif(Math.abs(eval)<0.001) {\n\t\t\t\tVector normal = estimateNormal(point);\n\t\t return new Intersection(this, ray, t, normal, point);\n\t\t\t}\t\t\t\n\t\t\tt += stepSize;\n\t\t}\t\t\n\t\treturn null;\n\t}", "public boolean\n doIntersection(Ray inOutRay) {\n double t, min_t = Double.MAX_VALUE;\n double x2 = size.x/2; // OJO: Esto deberia venir precalculado\n double y2 = size.y/2; // OJO: Esto deberia venir precalculado\n double z2 = size.z/2; // OJO: Esto deberia venir precalculado\n Vector3D p = new Vector3D();\n GeometryIntersectionInformation info = \n new GeometryIntersectionInformation();\n\n inOutRay.direction.normalize();\n\n // (1) Plano superior: Z = size.z/2\n if ( Math.abs(inOutRay.direction.z) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Z=size.z/2\n t = (z2-inOutRay.origin.z)/inOutRay.direction.z;\n if ( t > -VSDK.EPSILON ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.y >= -y2 && p.y <= y2 ) {\n info.p = new Vector3D(p);\n min_t = t;\n lastPlane = 1;\n }\n }\n }\n\n // (2) Plano inferior: Z = -size.z/2\n if ( Math.abs(inOutRay.direction.z) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Z=-size.z/2\n t = (-z2-inOutRay.origin.z)/inOutRay.direction.z;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.y >= -y2 && p.y <= y2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 2;\n }\n }\n }\n\n // (3) Plano frontal: Y = size.y/2\n if ( Math.abs(inOutRay.direction.y) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Y=size.y/2\n t = (y2-inOutRay.origin.y)/inOutRay.direction.y;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 3;\n }\n }\n }\n\n // (4) Plano posterior: Y = -size.y/2\n if ( Math.abs(inOutRay.direction.y) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Y=-size.y/2\n t = (-y2-inOutRay.origin.y)/inOutRay.direction.y;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 4;\n }\n }\n }\n\n // (5) Plano X = size.x/2\n if ( Math.abs(inOutRay.direction.x) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano X=size.x/2\n t = (x2-inOutRay.origin.x)/inOutRay.direction.x;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.y >= -y2 && p.y <= y2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 5;\n }\n }\n }\n\n // (6) Plano X = -size.x/2\n if ( Math.abs(inOutRay.direction.x) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano X=-size.x/2\n t = (-x2-inOutRay.origin.x)/inOutRay.direction.x;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.y >= -y2 && p.y <= y2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 6;\n }\n }\n }\n\n if ( min_t < Double.MAX_VALUE ) {\n inOutRay.t = min_t;\n lastInfo.clone(info);\n return true;\n }\n return false;\n }", "private void testForWallCollision() {\n\t\tVector2 n1 = temp;\n\t\tVector2 hitPoint = temp2;\n\t\t\n\t\tArrayList<Vector2> list;\n\t\tdouble angleOffset;\n\t\t\n\t\tfor (int w=0; w < 2; w++) {\n\t\t\tif (w == 0) {\n\t\t\t\tlist = walls1;\n\t\t\t\tangleOffset = Math.PI/2;\n\t\t\t} else {\n\t\t\t\tlist = walls2;\n\t\t\t\tangleOffset = -Math.PI/2;\n\t\t\t}\n\t\t\tn1.set(list.get(0));\n\t\t\t\n\t\t\tfor (int i=1; i < list.size(); i++) {\n\t\t\t\tVector2 n2 = list.get(i);\n\t\t\t\tif (Intersector.intersectSegments(n1, n2, oldPos, pos, hitPoint)) {\n\t\t\t\t\t// bounceA is technically the normal. angleOffset is used\n\t\t\t\t\t// here to get the correct side of the track segment.\n\t\t\t\t\tfloat bounceA = (float) (Math.atan2(n2.y-n1.y, n2.x-n1.x) + angleOffset);\n\t\t\t\t\tVector2 wall = new Vector2(1, 0);\n\t\t\t\t\twall.setAngleRad(bounceA).nor();\n\t\t\t\t\t\n\t\t\t\t\t// move the car just in front of the wall.\n\t\t\t\t\tpos.set(hitPoint.add((float)Math.cos(bounceA)*0.05f, (float)Math.sin(bounceA)*0.05f));\n\t\t\t\t\t\n\t\t\t\t\t// Lower the speed depending on which angle you hit the wall in.\n\t\t\t\t\ttemp2.setAngleRad(angle).nor();\n\t\t\t\t\tfloat wallHitDot = wall.dot(temp2);\n\t\t\t\t\tspeed *= (1 - Math.abs(wallHitDot)) * 0.85;\n\t\t\t\t\t\n\t\t\t\t\t// calculate the bounce using the reflection formula.\n\t\t\t\t\tfloat dot = vel.dot(wall);\n\t\t\t\t\tvel.sub(wall.scl(dot*2));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tn1.set(n2);\n\t\t\t}\n\t\t}\n\t}", "public void checkForCollisions()\r\n\t{\r\n\t\t//collision detection\r\n\t\tfor(PolygonD obj : objects)\r\n\t\t{\r\n\t\t\t//find points in character that intersected with the scene\r\n\t\t\tfor(PointD p : aSquare.getBoundary().getVerts())\r\n\t\t\t{\r\n\t\t\t\tif(obj.contains(p)){\r\n\t\t\t\t\t//find side that intersected\r\n\t\t\t\t\tdouble minDist = Double.MAX_VALUE;\r\n\t\t\t\t\tPointD prev = obj.getVerts().get(obj.getVerts().size()-1);\r\n\t\t\t\t\tPointD closestPoint = null;\r\n\t\t\t\t\tfor(PointD vert : obj.getVerts())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDouble d = distanceToLine(new Vector(prev, vert), p);\r\n\t\t\t\t\t\tif(d != null && d < minDist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\t\tclosestPoint = getNearestPointOnLine(new Vector(prev, vert),p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprev = vert;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tVector offset = new Vector(p, closestPoint);\r\n\t\t\t\t\taSquare.translate(offset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//find points in scene that intersected with the character\r\n\t\t\tfor(PointD p : obj.getVerts())\r\n\t\t\t{\r\n\t\t\t\tif(aSquare.getBoundary().contains(p)){\r\n\t\t\t\t\t//find side that intersected\r\n\t\t\t\t\tdouble minDist = Double.MAX_VALUE;\r\n\t\t\t\t\tPointD prev = aSquare.getBoundary().getVerts().get(aSquare.getBoundary().getVerts().size()-1);\r\n\t\t\t\t\tPointD closestPoint = null;\r\n\t\t\t\t\tfor(PointD vert : aSquare.getBoundary().getVerts())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tDouble d = distanceToLine(new Vector(prev, vert), p);\r\n\t\t\t\t\t\tif(d != null && d < minDist)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tminDist = d;\r\n\t\t\t\t\t\t\tclosestPoint = getNearestPointOnLine(new Vector(prev, vert),p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tprev = vert;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//get the angle of object by 'feeling' it\r\n\t\t\t\t\tint numVerts = obj.verts.size();\r\n\t\t\t\t\tint objI = obj.verts.indexOf(p);\r\n\t\t\t\t\tint lastI = (objI - 1) % numVerts;\r\n\t\t\t\t\tif(lastI == -1)\r\n\t\t\t\t\t\tlastI = numVerts - 1;\r\n\t\t\t\t\tint nextI = (objI + 1) % numVerts;\r\n\t\t\t\t\t\r\n\t\t\t\t\tint angle = (int)Math.round((new Vector(obj.verts.get(objI), obj.verts.get(lastI))).angleBetween(new Vector(obj.verts.get(objI), obj.verts.get(nextI))));\r\n\t\t\t\t\t\r\n\t\t\t\t\taSquare.sendMsg(new Msg(aSquare, \"Felt Vertex: \" + angle + \"deg\"));//null means status message\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//reverse direction to make aSquare move out of wall\r\n\t\t\t\t\tVector offset = new Vector(closestPoint, p);\r\n\t\t\t\t\taSquare.translate(offset);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\taSquare.getCenter();\r\n\t}", "@Test\n public void intersectsWithAutoCarPolygon() {\n // creating the needed movement vector\n radar.loop();\n radar.loop();\n List<WorldObject> list = radar.getRelevantObjectsForAEB();\n assertTrue(list.stream().anyMatch(t -> t.getId().equals(\"roadsign_speed_40_1\")));\n radar.loop();\n list = radar.getRelevantObjectsForAEB();\n assertEquals(0, list.size());\n }", "public void\nrayPick(SoRayPickAction action)\n//\n////////////////////////////////////////////////////////////////////////\n{\n\t if (!shouldRayPick(action)) return;\n\n\t SoMaterialBindingElement.Binding binding =\n\t SoMaterialBindingElement.get(action.getState());\n\n\t boolean materialPerPart =\n\t (binding == SoMaterialBindingElement.Binding.PER_PART ||\n\t binding == SoMaterialBindingElement.Binding.PER_PART_INDEXED);\n\n\t SoPick.sopick_pick_cube(this.width.getValue(),\n\t this.height.getValue(),\n\t this.depth.getValue(),\n\t materialPerPart ? SoPick.SOPICK_MATERIAL_PER_PART : 0,\n\t this, action);\n\t}", "boolean fenced(int x, int y);", "public void onHitRobot(HitRobotEvent e) {\r\n\t\tif(state == 0) {\r\n\t\t\t/* ============== WALL =========== */\r\n\t\t\t\r\n\t\t\t// If he's in front of us, set back up a bit.\r\n\t\t\tif (e.getBearing() > -90 && e.getBearing() < 90) {\r\n\t\t\t\tback(100);\r\n\t\t\t} // else he's in back of us, so set ahead a bit.\r\n\t\t\telse {\r\n\t\t\t\tahead(100);\r\n\t\t\t}\r\n\t\t\t/* ============== WALL =========== */\r\n\t\t}\r\n\t\telse if(state == 1) {\r\n\t\t\tif (e.getBearing() > -10 && e.getBearing() < 10) {\r\n\t\t\t\tfire(2);\r\n\t\t\t}\r\n\t\t\tif (e.isMyFault()) {\r\n\t\t\t\tturnRight(10);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void scatter(ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n final int MAXTILE = 160;\r\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls,0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if(isIntersection) {\r\n if(!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - SCATTERX,2) + Math.pow(yPos - SCATTERY,2);\r\n }\r\n if(!isLeftCollision && this.direction !=2) {\r\n leftDistance = Math.pow((xPos - 20) - SCATTERX,2) + Math.pow(yPos - SCATTERY,2);\r\n }\r\n if(!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - SCATTERX,2) + Math.pow((yPos-20) - SCATTERY,2);\r\n }\r\n if(!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - SCATTERX,2) + Math.pow((yPos+20) - SCATTERY,2);\r\n }\r\n if(upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n }\r\n else if(downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n }\r\n\r\n else if(rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n }\r\n\r\n else if(leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if(this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if(this.direction ==1) {\r\n yPos = yPos + 5;\r\n }\r\n if(this.direction ==2) {\r\n xPos = xPos + 5;\r\n }\r\n if(this.direction == 3) {\r\n xPos = xPos -5;\r\n }\r\n\r\n }", "public boolean rayCrossesSegment(LatLng point, LatLng a, LatLng b) {\n double px = point.longitude,\n py = point.latitude,\n ax = a.longitude,\n ay = a.latitude,\n bx = b.longitude,\n by = b.latitude;\n if (ay > by) {\n ax = b.longitude;\n ay = b.latitude;\n bx = a.longitude;\n by = a.latitude;\n }\n // alter longitude to cater for 180 degree crossings\n if (px < 0 || ax < 0 || bx < 0) {\n px += 360;\n ax += 360;\n bx += 360;\n }\n // if the point has the same latitude as a or b, increase slightly py\n if (py == ay || py == by) py += 0.00000001;\n\n\n // if the point is above, below or to the right of the segment, it returns false\n if ((py > by || py < ay) || (px > Math.max(ax, bx))) {\n return false;\n }\n // if the point is not above, below or to the right and is to the left, return true\n else if (px < Math.min(ax, bx)) {\n return true;\n }\n // if the two above conditions are not met, you have to compare the slope of segment [a,b] (the red one here) and segment [a,p] (the blue one here) to see if your point is to the left of segment [a,b] or not\n else {\n double red = (ax != bx) ? ((by - ay) / (bx - ax)) : Double.POSITIVE_INFINITY;\n double blue = (ax != px) ? ((py - ay) / (px - ax)) : Double.POSITIVE_INFINITY;\n return (blue >= red);\n }\n\n }", "@Override\n public RayHit rayIntersectObj(Ray3D ray) {\n // Next check if ray hits this quadric\n Point3D hitPoint = findHitPoint(ray);\n if (hitPoint == null || !isWithinBounds(hitPoint)) {\n return RayHit.NO_HIT;\n }\n double distance = hitPoint.subtract(ray.getPoint()).length();\n Point3D normal = findNormalAtPoint(hitPoint);\n return new RayHit(hitPoint, distance, normal, this, new TextureCoordinate(0, 0));\n }", "public ObjectHit getHit(Ray ray) {\n\t\t\n\t\tObjectHit nearestHit = new ObjectHit(Hit.MISS, null);\n\t\t\n\t\tfor(int i = 0; i < scene.objects.size(); i++) {\n\t\t\tWorldObject object = scene.objects.get(i);\n\t\t\t\n\t\t\tObjectHit hit = new ObjectHit(object.intersect(ray), object.material);\n\t\t\t\n\t\t\tif(hit.hit && hit.distance < nearestHit.distance) {\n\t\t\t\tnearestHit = hit;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn nearestHit;\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t//2. create an array of 5 robots.\n\tRobot[] robs = new Robot[5];\n\t//3. use a for loop to initialize the robots.\n\tfor (int i = 0; i < robs.length; i++) {\n\t\t\trobs[i] = new Robot();\n\t\t\trobs[i].setX(100 * i + 100);\n\t\t\trobs[i].setY(500);\n\t\t\trobs[i].setSpeed(10);\n\t}\n\t\t//4. make each robot start at the bottom of the screen, side by side, facing up\n\t\t\n\t//5. use another for loop to iterate through the array and make each robot move \n\t// a random amount less than 50.\n\tfor (int i = 0; i < robs.length; i++) {\n\t\tRandom rnd = new Random();\n\t\trobs[i].move(rnd.nextInt(50)+1);\n\t}\n\t//6. use a while loop to repeat step 5 until a robot has reached the top of the screen.\n\tboolean notwon = true;\n\tint winner = -250;\n\twhile(notwon) {\n\t\tfor (int i = 0; i < robs.length; i++) {\n\t\t\tRandom rnd = new Random();\n\t\t\trobs[i].move(rnd.nextInt(50)+1);\n\t\t}\n\t\tfor (int i = 0; i < robs.length; i++) {\n\t\t\tif (notwon && winner == -250 && robs[i].getY() <= 72) {\n\t\t\t\twinner = i;\n\t\t\t\tnotwon = false;\n\t\t\t}\n\t\t}\n\t}\n\t\n\trobs[winner].sparkle();\n\t//7. declare that robot the winner and throw it a party!\n\t\n\t//8. try different races with different amounts of robots.\n\n\t//9. make the robots race around a circular track.\n}", "private void setCofR() {\n\t\t\n Vector3f pos_vec = new Vector3f();\n Point3f pos = new Point3f();\n Vector3f dir = new Vector3f();\n\t\tMatrix4f view_mtx = new Matrix4f();\n\t\tMatrix4f nav_mtx = new Matrix4f();\n Point3f cor = new Point3f();\n\t\t\n\t\tnavigationTransform.getTransform(nav_mtx);\n\t\t\n\t\tdata.viewpointTransform.getTransform(view_mtx);\n\t\tview_mtx.get(pos_vec);\n\t\t\n\t\t// the eye point\n\t\tpos.set(pos_vec);\n\t\t\n\t\t// the eye direction\n\t\tdir.x = view_mtx.m02;\n\t\tdir.y = view_mtx.m12;\n\t\tdir.z = view_mtx.m22;\n\t\tdir.negate();\n\t\tdir.normalize();\n\t\t\n\t\t// transform into world space\n\t\tnav_mtx.transform(pos);\n\t\tnav_mtx.transform(dir);\n\t\t\n\t\tArrayList pickResults = new ArrayList();\n\t\tPickRequest pickRequest = new PickRequest();\n\t\tpickRequest.pickGeometryType = PickRequest.PICK_RAY;\n\t\tpickRequest.pickSortType = PickRequest.SORT_ORDERED;\n\t\tpickRequest.pickType = PickRequest.FIND_GENERAL;\n\t\tpickRequest.useGeometry = false;\n\t\tpickRequest.foundPaths = pickResults;\n\t\t\n\t\t// initialize the pick request\n\t\tpickRequest.origin[0] = pos.x;\n\t\tpickRequest.origin[1] = pos.y;\n\t\tpickRequest.origin[2] = pos.z;\n\t\t\n\t\tpickRequest.destination[0] = dir.x;\n\t\tpickRequest.destination[1] = dir.y;\n\t\tpickRequest.destination[2] = dir.z;\n\t\t\n\t\trootGroup.pickSingle(pickRequest);\n\t\t\n\t\tif (pickRequest.pickCount > 0) {\n\t\t\t\n \tPoint3f intersectPoint = new Point3f();\n \tVector3f intersectVector = new Vector3f();\n\t\t\n\t\t\tfloat min_distance = Float.MAX_VALUE;\n\t\t\t// sort through the bounds intersections\n\t\t\tint num_pick = pickResults.size();\n\t\t\tfor (int i = 0; i < num_pick; i++) {\n\t\t\t\t\n\t\t\t\tSceneGraphPath sgp = (SceneGraphPath)pickResults.get(i);\n\t\t\t\tsgp.getTransform(view_mtx);\n\t\t\t\t\n\t\t\t\tShape3D shape = (Shape3D)sgp.getTerminalNode();\n\t\t\t\tVertexGeometry geom = (VertexGeometry)shape.getGeometry();\n\t\t\t\t\n\t\t\t\t//determine if there was an actual geometry intersection\n\t\t\t\tboolean intersect = iutils.rayUnknownGeometry(\n\t\t\t\t\tpos,\n\t\t\t\t\tdir,\n\t\t\t\t\t0,\n\t\t\t\t\tgeom,\n\t\t\t\t\tview_mtx,\n\t\t\t\t\tintersectPoint,\n\t\t\t\t\tfalse);\n\t\t\t\t\n\t\t\t\tif (intersect) {\n\t\t\t\t\tintersectVector.set(\n\t\t\t\t\t\tintersectPoint.x - pos.x,\n\t\t\t\t\t\tintersectPoint.y - pos.y,\n\t\t\t\t\t\tintersectPoint.z - pos.z);\n\n\t\t\t\t\tfloat distance = intersectVector.length();\n\t\t\t\t\tif (distance < min_distance) {\n\t\t\t\t\t\tmin_distance = distance;\n\t\t\t\t\t\tcor.set(intersectPoint);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t\tnav_mtx.invert();\n\t\t\tnav_mtx.transform(cor);\n\t\t}\n\t\tcenterOfRotation.set(cor);\n\t}", "@Override\n public void intersect( Ray ray, IntersectResult result ) {\n \t\tVector3d e = new Vector3d(ray.eyePoint);\n \t\te.sub(this.center);\n \t\tdouble a = ray.viewDirection.dot(ray.viewDirection);\n \t\tdouble b = 2 * ray.viewDirection.dot(e);\n \t\tdouble c = e.dot(e) - this.radius * this.radius;\n \t\tdouble discriminant = b*b - 4*a*c;\n \t\t\n \t\tif (discriminant == 0.0) {\n \t\t\t\n \t\t\tdouble t_pos = -0.5 * b / a;\n \t\t\t// scale ray viewDirection to be t_pos length\n\t\t\t// point of intersection is at ray.eyePoint + scaled viewDirection vector\n\t\t\tPoint3d point_of_intersection = new Point3d(ray.viewDirection);\n\t\t\tpoint_of_intersection.scale(t_pos);\n\t\t\tpoint_of_intersection.add(ray.eyePoint);\n\t\t\t\n\t\t\t// normal is point_of_intersection - sphere.center\n\t\t\tVector3d normal = new Vector3d();\n\t\t\tnormal.add(point_of_intersection);\n\t\t\tnormal.sub(this.center);\n\t\t\tnormal.normalize();\n\t\t\t\n\t\t\tresult.p.set(point_of_intersection);\n\t\t\tresult.material = this.material;\n\t\t\tresult.t = t_pos;\n\t\t\tresult.n.set(normal);\n \t\t\t\n \t\t}\n \t\telse if (discriminant > 0.0) {\n \t\t\t\n \t\t\t// solve quadratic formula\n \t\t\tdouble q = (b > 0) ? -0.5 * (b + Math.sqrt(discriminant)) : -0.5 * (b - Math.sqrt(discriminant));\n \t\t\tdouble t_pos = q / a;\n \t\t\tdouble t_neg = c / q;\n \t\t\t\n \t\t\tif (t_pos < t_neg) {\n \t\t\t\tdouble temp = t_pos;\n \t\t\t\tt_pos = t_neg;\n \t\t\t\tt_neg = temp;\n \t\t\t}\n \t\t\t\t\n \t\t\tif (t_neg > 0) {\n \t\t\t\t// scale ray viewDirection to be t_neg length\n \t\t\t\t// point of intersection is at ray.eyePoint + scaled viewDirection vector\n \t\t\tPoint3d point_of_intersection = new Point3d(ray.viewDirection);\n \t\t\tpoint_of_intersection.scale(t_neg);\n \t\t\tpoint_of_intersection.add(ray.eyePoint);\n \t\t\t\n \t\t\t// normal is point_of_intersection - sphere.center\n \t\t\tVector3d normal = new Vector3d();\n \t\t\tnormal.add(point_of_intersection);\n \t\t\tnormal.sub(this.center);\n \t\t\tnormal.normalize();\n \t\t\t\n \t\t\tresult.p.set(point_of_intersection);\n \t\t\tresult.material = this.material;\n \t\t\tresult.t = t_neg;\n \t\t\tresult.n.set(normal);\n \t\t\t}\n\t\n \t\t}\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n\n }", "public void intersections(){\n\n \tif (ball.intersect(paddle.getX(), paddle.getY(), paddle.getWidth(), paddle.getHeight())){\n\t\t\tball.bouncePaddle(paddle.getX(),paddle.getY(),paddle.getWidth(),paddle.getHeight());\n\t\t}\n\n\t\t//WHEN POWERUP HITS PADDLE\n\n\t\tfor (int i = 0; i < powerups.size(); i++){\n\t\t\tif (paddle.intersect(powerups.get(i).getX(), powerups.get(i).getY(), powerups.get(i).getWidth(), powerups.get(i).getHeight())) {\n\t\t\t\tif (powerups.get(i).getType() != 4){\n\t\t\t\t\tpaddle.setType(powerups.get(i).getType());\n\t\t\t\t}else{\n\t\t\t\t\tball.setType(1);\n\t\t\t\t}\n\t\t\t\tpowerups.remove(i);\n\t\t\t}\n\t\t}\n\n\t\t//WHEN LASER HITS BRICK\n\n\t\tfor (int i = 0; i < lasers.size() ; i++){\n\t\t\tfor (int j = 0; j < bricks.size(); j++){\n\n\t\t\t\tif (lasers.size() != 0 && lasers.get(i).intersect(bricks.get(j).getX(), bricks.get(j).getY(), bricks.get(j).getWidth(), bricks.get(j).getHeight())){\n\t\t\t\t\tbricks.get(j).hit(0);\n\t\t\t\t\tlasers.remove(i);\n\t\t\t\t\tif (i > 0){\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\n\t\t//BRICKS\n\t\tfor (int i = 0; i < bricks.size(); i++){\n\t\t\t//WHEN BALL HITS BRICK\n\t\t\tif (ball.intersect(bricks.get(i).getX(), bricks.get(i).getY(), bricks.get(i).getWidth(), bricks.get(i).getHeight())){\n\t\t\t\t\n\t\t\t\tball.bounceBrick(ball.hitOnSide(bricks.get(i).getX(), bricks.get(i).getY(), bricks.get(i).getWidth(), bricks.get(i).getHeight()));\n\t\t\t\tball.move();\n\n\n\t\t\t\tbricks.get(i).hit(ball.getType());\n\t\t\t\tif (ball.getType() == 1){\n\t\t\t\t\tfor (int j = 0; j < bricks.size(); j++){\n\t\t\t\t\t\tif (bricks.get(j).getX() > ball.getX()-50 && bricks.get(j).getX() < ball.getX()+50){\n\t\t\t\t\t\t\tif (bricks.get(j).getY() > ball.getY()-75 && bricks.get(j).getY() < ball.getY()+75){\n\t\t\t\t\t\t\t\tbricks.get(j).hit(1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tball.setType(0);\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t//WHEN BRICK DIES\n\t\tfor (int i = bricks.size()-1; i>=0; i--){\n\t\t\tif (bricks.get(i).isDead()){\n\t\t\t\tif (bricks.get(i).spawnPowerup()){\n\t\t\t\t\tpowerups.add(new Powerup(bricks.get(i).getX(), bricks.get(i).getY(), paddle));\n\t\t\t\t}\n\t\t\t\tbricks.remove(i);\n\t\t\t}\n\t\t}\n\n }", "public void step(double timeStep){\n\t\t\n\t\t//Base case of the recursive implementation --> end if we've basically reached negligible\n\t\t//amounts of time\n\t\tif(timeStep < TIME_EPSILON){\n\t\t\treturn;\n\t\t}\n\t\t\n//\t\t//Modify the velocities of all of the balls according to gravity and friction\n//\t\tfor(Ball ball : balls){\n//\t\t\tdouble vY = ball.getVel().y();\n//\t\t\tdouble vX = ball.getVel().x();\n//\t\t double newVY = vY + GRAVITY * timeStep;\n//\t\t double newVX = vX * (1 - MU_1 * timeStep - MU_2 * Math.abs(vX) * timeStep);\n//\t\t newVY = newVY * (1 - MU_1 * timeStep - MU_2 * Math.abs(newVY) * timeStep);\n//\t\t \n//\t\t ball.setVel(new Vect(newVX, newVY));\n//\t\t}\n\t\t\n\t\tBall collisionBall1 = null;\n\t\tBall collisionBall2 = null;\n\t\tBall collisionBall3 = null;\n\t\tGadget collisionGadget = null;\n\t\t\n\t\t//With the current velocities and positions determine the time for the next ball-ball\n\t\t//collision as well as the balls that actually collide\n\t\tdouble minTimeUntilBallBallCollision = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif(balls.size() > 1){\n\t\t\tcollisionBall1 = balls.get(0);\n\t\t\tcollisionBall2 = balls.get(1);\n\t\t\tfor(int i = 0; i < balls.size() - 1; i++){\n\t\t\t\tfor(int j = i + 1; j < balls.size(); j++){\n\t\t\t\t\tBall ball1 = balls.get(i);\n\t\t\t\t\tBall ball2 = balls.get(j);\n\t\t\t\t\tif(!ball1.getInAbsorber() && !ball2.getInAbsorber()){\t\n\t\t\t\t\t\tdouble timeUntilCollision = ball1.impactCalc(ball2)[0];\n\t\t\t\t\t\tif (timeUntilCollision < minTimeUntilBallBallCollision){\n\t\t\t\t\t\t\tminTimeUntilBallBallCollision = timeUntilCollision;\n\t\t\t\t\t\t\tcollisionBall1 = ball1;\n\t\t\t\t\t\t\tcollisionBall2 = ball2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//With the current velocities and positions determine the time for the next ball-gadget\n\t\t//collision and determine the objects involved in that collision\n\t\tdouble minTimeUntilBallGadgetCollision = Double.POSITIVE_INFINITY;\n\t\tif(balls.size() > 0 && gadgets.size() > 0){\n\t\t\tcollisionBall3 = balls.get(0);\n\t\t\tcollisionGadget = gadgets.get(0);\n\t\t\tfor(Ball b : balls){\n\t\t\t\tif(!b.getInAbsorber()){\n\t\t\t\t\tfor(Gadget g : gadgets){\n\t\t\t\t\t\tdouble timeUntilCollision = ((BoardObject) g).impactCalc(b)[0];\n\t\t\t\t\t\t//System.out.println(g.getID() + \" \" +timeUntilCollision);\n\t\t\t\t\t\tif (timeUntilCollision < minTimeUntilBallGadgetCollision){\n\t\t\t\t\t\t\tminTimeUntilBallGadgetCollision = timeUntilCollision;\n\t\t\t\t\t\t\tcollisionBall3 = b;\n\t\t\t\t\t\t\tcollisionGadget = g;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t\t\n\t\t//Trivially progress the board if the next determined collision of any kind doesn't happen\n\t\t//within the time step\n\t\tif(Math.min(minTimeUntilBallBallCollision, minTimeUntilBallGadgetCollision) > timeStep){\n\t\t\tprogress(timeStep - TIME_EPSILON);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//If a ball-ball collision happens within the time step, progress the board trivially until\n\t\t//just before the collision, modify the ball velocities accordingly and recursively call the\n\t\t//step function passing the remaining time as the argument for step()\n\t\tif(minTimeUntilBallBallCollision < minTimeUntilBallGadgetCollision){\n\t\t\tprogress(minTimeUntilBallBallCollision - TIME_EPSILON);\n\t\t\t\n\t\t\tVect ball1Vel = new Vect(collisionBall2.impactCalc(collisionBall1)[1], collisionBall2.impactCalc(collisionBall1)[2]);\n\t\t\tVect ball2Vel = new Vect(collisionBall1.impactCalc(collisionBall2)[1], collisionBall1.impactCalc(collisionBall2)[2]);\n\t\t\t\n\t\t\tcollisionBall1.setVel(ball1Vel);\n\t\t\tcollisionBall2.setVel(ball2Vel);\n\t\t\t\n\t\t\tstep(timeStep - minTimeUntilBallBallCollision);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//In the final case, a ball-gadget collision occurs within the time step. In this case we\n\t\t//progress the board trivially until just before the collision, modify the ball velocity\n\t\t//and trigger the gadget. Then recursively call the step function passing the remaining time \n\t\t//as the argument for step()\n\t\t\n\t\tprogress(minTimeUntilBallGadgetCollision - TIME_EPSILON);\n\t\t\n\t\tVect ball3Vel = new Vect(((BoardObject)collisionGadget).impactCalc(collisionBall3)[1], ((BoardObject)collisionGadget).impactCalc(collisionBall3)[2]);\n\t\t\n\t\tif(collisionGadget instanceof Absorber){\n\t\t\tcollisionBall3.setVel(new Vect(0,0));\n\t\t\tVect newPos = new Vect(collisionGadget.getX() + collisionGadget.getWidth() - 0.25, collisionGadget.getY() + collisionGadget.getHeight() - 0.25);\n\t\t\tcollisionBall3.setPos(newPos);\n\t\t\tcollisionBall3.setInAbsorber(true);\n\t\t\t((Absorber) collisionGadget).addBallToAbsorber(collisionBall3);\n\t } else if(!(collisionGadget instanceof OuterWall) || ((OuterWall)collisionGadget).getConnectedBoard() == this && ((OuterWall)collisionGadget).getConnectedWall().equals(collisionGadget.getID())){\n\t\t\tcollisionBall3.setVel(ball3Vel);\n\t\t} else{\n\t\t\t//TODO @DANA, this has to do with the client/server ball passing stuff\n\t\t}\n\t\t\n\t\n\t\tcollisionGadget.trigger();\n\n\t\t\n\t\tstep(timeStep - minTimeUntilBallBallCollision);\n\t\treturn;\t\n\t}", "public Color ray_trace(Ray ray) {\r\n int index = -1;\r\n float t = Float.MAX_VALUE;\r\n \r\n for(int i = 0; i < spheres.size(); i++) {\r\n float xd, yd, zd, xo, yo, zo, xc, yc, zc, rc, A, B, C, disc, t0, t1;\r\n \r\n xd = ray.getDirection().getX();\r\n yd = ray.getDirection().getY();\r\n zd = ray.getDirection().getZ();\r\n xo = ray.getOrigin().getX();\r\n yo = ray.getOrigin().getY();\r\n zo = ray.getOrigin().getZ();\r\n xc = spheres.get(i).getCenter().getX();\r\n yc = spheres.get(i).getCenter().getY();\r\n zc = spheres.get(i).getCenter().getZ();\r\n rc = spheres.get(i).getRadius();\r\n \r\n A = xd*xd + yd*yd + zd*zd;\r\n B = 2*(xd*(xo-xc) + yd*(yo-yc) + zd*(zo-zc));\r\n C = (xo-xc)*(xo-xc) + (yo-yc)*(yo-yc) + (zo-zc)*(zo-zc) - rc*rc;\r\n \r\n disc = B*B - (4*A*C);\r\n \r\n if(disc < 0) {\r\n continue;\r\n }\r\n\r\n if(disc == 0) {\r\n t0 = -B/(2*A);\r\n if(t0 < t && t0 > 0) {\r\n t=t0;\r\n index = i;\r\n }\r\n } else {\r\n t0 = (-B + (float) Math.sqrt(disc))/(2*A);\r\n t1 = (-B - (float) Math.sqrt(disc))/(2*A);\r\n\r\n if( t0 > t1) {\r\n float flip = t0;\r\n t0 = t1;\r\n t1 = flip;\r\n }\r\n\r\n if(t1 < 0) {\r\n continue;\r\n }\r\n\r\n if(t0 < 0 && t1 < t) {\r\n t = t1;\r\n index = i;\r\n } else if(t0 > 0 && t0 < t) {\r\n t = t0;\r\n index = i;\r\n }\r\n }\r\n }// end of for loop\r\n if(index < 0) {\r\n return background;\r\n } else {\r\n Point intersect = (ray.getDirection().const_mult(t)).point_add(window.getEye());\r\n return shade_ray(index, intersect);\r\n } \r\n }", "public void mousePressed(MouseEvent e)\r\n\t{\r\n\t\tboolean hit = false;\r\n\t\tif(cars[fastIndex].contains(e.getX(), e.getY()))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"You caught the fastest car!\");\r\n\t\t\thit = true;\r\n\t\t}\r\n\t\tfor(int i=cars.length-1; i>=0; i--)\r\n\t\t{\r\n\t\t\tif(cars[i].contains(e.getX(), e.getY()) && i!=fastIndex && !hit)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Wrong car. Try again.\");\r\n\t\t\t\thit = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i=0; i<roads.length; i++)\r\n\t\t{\r\n\t\t\tif(roads[i].contains(e.getX(),e.getY()) && !hit)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"You hit the road. Try again.\");\r\n\t\t\t\thit = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "private static RayIntersection findClosestIntersection(Scene scene, Ray ray) {\r\n\t\tRayIntersection closest = null;\r\n\t\tfor (GraphicalObject g : scene.getObjects()) {\r\n\t\t\tRayIntersection current = g.findClosestRayIntersection(ray);\r\n\t\t\tif (current == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\tif (closest == null) {\r\n\t\t\t\t\tclosest = current;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (current.getDistance() < closest.getDistance()) {\r\n\t\t\t\t\t\tclosest = current;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn closest;\r\n\t}", "public void levelBrain2(ArrayList<GameObject> gameobject) {\n if ((_win_Level == true)&&(_save_Progres == false))\r\n { _save_Progres = true;\r\n gameobject.get(_player_Found_Value).setPlayerState(Static.PLAYER_STATE_LEVEL_COMPLETE);\r\n }\r\n\r\n\r\n\r\n if(_flag == 0)\r\n {\r\n\r\n\r\n int objectstofind = 1;\r\n\r\n int lenght = gameobject.size();\r\n for(int i = 0; i < lenght; i++)\r\n {\r\n if(_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n\r\n gameobject.get(i).setOffScreenProjectile(0, GamePanel.HEIGHT / (100 / 50), 0, 150);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(GamePanel.WIDTH / (100 / 45), 0, GamePanel.HEIGHT, GamePanel.WIDTH / (100 / 10), Color.GREEN);\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if(_objects_Found == objectstofind)\r\n {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if((_lvl_2_Points == 1)&&(_flag == 1))\r\n {\r\n\r\n int objectstofind = 3;\r\n\r\n int lenght = gameobject.size();\r\n for(int i = 0; i < lenght; i++)\r\n {\r\n if(_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(1, 0, 270, 80);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n\r\n if (_objects_Found == 1) {\r\n gameobject.get(i).setOffScreenProjectile(1, GamePanel.HEIGHT / (100 / 55), 270, 80);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 2) {\r\n gameobject.get(i).setOffScreenProjectile(0, -(GamePanel.HEIGHT / (100 / 40)), 0, 150);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(0, -(GamePanel.HEIGHT / (100 / 40)), GamePanel.HEIGHT/ (100 / 50), GamePanel.WIDTH, Color.RED);\r\n }\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if(_objects_Found == objectstofind)\r\n {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n\r\n }\r\n if((_lvl_2_Points == 4)&&(_flag ==2)) {\r\n\r\n int objectstofind = 1;\r\n\r\n\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++) {\r\n if (_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(2, GamePanel.HEIGHT, 170, 40);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(GamePanel.WIDTH / (100 / 20), (GamePanel.HEIGHT / (100 / 30)), GamePanel.HEIGHT/ (100 / 20), GamePanel.WIDTH /(100 / 20), Color.YELLOW);\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if (_objects_Found == objectstofind) {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n }\r\n //Ain't no smooth sailing from here, make sure their parting gift from level one is special.\r\n if((_lvl_2_Points == 5)&&(_flag == 3)) {\r\n int objectstofind = 3;\r\n\r\n\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++) {\r\n if (_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n if (_objects_Found == 0) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(0, GamePanel.HEIGHT / (100 / 30) + GamePanel.HEIGHT / (100 / 20), 0, 400);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(0, (GamePanel.HEIGHT / (100 / 30))+ GamePanel.HEIGHT / (100 / 20), GamePanel.HEIGHT / (100 / 50), GamePanel.WIDTH, Color.RED);\r\n }\r\n if (_objects_Found == 1) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(3, GamePanel.WIDTH / (100 / 20) + GamePanel.WIDTH /(100 / 20), 90, 400);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n gameobject.get(i).setGetToPoint(GamePanel.WIDTH / (100 / 40), (GamePanel.HEIGHT / (100 / 50)), GamePanel.HEIGHT , GamePanel.WIDTH / (100 / 20), Color.RED);\r\n }\r\n if (_objects_Found == 2) {\r\n\r\n gameobject.get(i).setOffScreenProjectile(1, GamePanel.WIDTH / (100 / 20) + GamePanel.WIDTH /(100 / 15), 270, 500);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n\r\n _objects_Found++;\r\n }\r\n }\r\n } else if (_objects_Found == objectstofind) {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n\r\n }\r\n\r\n }\r\n if((_lvl_2_Points == 8)&&(_flag == 4))\r\n {\r\n\r\n int objectstofind = 2;\r\n\r\n int lenght = gameobject.size();\r\n for(int i = 0; i < lenght; i++)\r\n {\r\n if(_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n\r\n if (_objects_Found == 0) {\r\n gameobject.get(i).setOffScreenProjectile(2, 0, 180, 80);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 1) {\r\n gameobject.get(i).setOffScreenProjectile(2, -(GamePanel.HEIGHT / (100 / 40)), 180, 150);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if(_objects_Found == objectstofind)\r\n {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n\r\n }\r\n if((_lvl_2_Points == 10)&&(_flag == 5))\r\n {\r\n int objectstofind = 5;\r\n\r\n int lenght = gameobject.size();\r\n for(int i = 0; i < lenght; i++)\r\n {\r\n if(_objects_Found < objectstofind) {\r\n if (gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getObjectState() == Static.GENERAL_OBJECT_STATE_NEUTRAL) {\r\n\r\n\r\n if (_objects_Found == 0) {\r\n gameobject.get(i).setOffScreenProjectile(2, 0, 195, 80);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 1) {\r\n gameobject.get(i).setOffScreenProjectile(2, -(GamePanel.HEIGHT / (100 / 40)), 160, 400);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 2) {\r\n gameobject.get(i).setOffScreenProjectile(3, -(GamePanel.WIDTH/(100/1)) , 150, 200);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 3) {\r\n gameobject.get(i).setOffScreenProjectile(0, 0, 0, 150);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n if (_objects_Found == 4) {\r\n gameobject.get(i).setOffScreenProjectile(1, -GamePanel.WIDTH/(100/20), 270, 90);\r\n gameobject.get(i).setObjectState(Static.GENERAL_OBJECT_STATE_ACTIVE);\r\n }\r\n _objects_Found++;\r\n }\r\n }\r\n }\r\n else if(_objects_Found == objectstofind)\r\n {\r\n _objects_Found = 0;\r\n _flag++;\r\n break;\r\n }\r\n }\r\n\r\n }\r\n\r\n //THE PLAYER WON! KICK THEM THE FUCK OUT!\r\n if(_lvl_2_Points >= 15)\r\n {\r\n _win_Level = true;\r\n }\r\n\r\n //Check for scored points\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++) {\r\n if(gameobject.get(i).getObjectType() == Static.FLOATINGICEBLOCK) {\r\n if (gameobject.get(i).getSpecialBooleanVar() == true) {\r\n _lvl_2_Points++;\r\n\r\n gameobject.get(i).setSpecialBooleanVar(false);\r\n _fx.play(_sound_ID, 1, 1, 0, 0, 1);\r\n\r\n }\r\n }\r\n }\r\n\r\n if(_save_Progres == true) {\r\n if(gameobject.get(_player_Found_Value).getObjectStatus() == Static.OBJECT_STATUS_INACTIVE)\r\n {\r\n //The player now has permission to go to level 2 but they won't make it much further.\r\n if (_readFile.returnProgress() < 3) {\r\n _readFile.saveLevelProgress(3);\r\n endMusic();\r\n gameobject.get(_player_Found_Value).returnToMenu();\r\n }\r\n endMusic();\r\n gameobject.get(_player_Found_Value).returnToMenu();\r\n }\r\n }\r\n }", "private Point3D findHitPoint(Ray3D ray) {\n // We plug paramaterization of x, y, z for ray into our general quartic equation\n // to get standard form: At^2 + Bt + C = 0, then use the quadratic equation to solve for t.\n // The coefficients A, B, and C are quite ugly, and the derivation is described in the linked\n // resource\n Point3D P = ray.getPoint(); // Ray starting point\n Point3D D = ray.getDirection(); // Ray direction\n // First coefficient of quadratic equation of t\n double A = a * sq(D.getX()) + b * sq(D.getY()) + c * sq(D.getZ())\n + d * D.getY() * D.getZ() + e * D.getX() * D.getZ() + f * D.getX() * D.getY();\n // Second coefficient of quadratic equation of t\n double B = 2 * (a * P.getX() * D.getX() + b * P.getY() * D.getY() + c * P.getZ() * D.getZ())\n + d * (P.getY() * D.getZ() + P.getZ() * D.getY())\n + e * (P.getX() * D.getZ() + P.getZ() * D.getX())\n + f * (P.getX() * D.getY() + P.getY() * D.getX())\n + g * D.getX() + h * D.getY() + i * D.getZ();\n // Third coefficient of quadratic equation of t\n double C = a * sq(P.getX()) + b * sq(P.getY()) + c * sq(P.getZ()) + d * P.getY() * P.getZ()\n + e * P.getX() * P.getZ() + f * P.getX() * P.getY() + g * P.getX() + h * P.getY() + i * P.getZ() + j;\n\n double discriminant = sq(B) - 4 * A * C;\n\n // Find intersection Point\n Point3D intersection = null;\n if (discriminant >= 0) {\n double t1 = (-B - Math.sqrt(discriminant)) / (2 * A);\n double t2 = (-B + Math.sqrt(discriminant)) / (2 * A);\n Point3D p1 = ray.atTime(t1);\n Point3D p2 = ray.atTime(t2);\n if (t1 > 0 && t2 > 0 && isWithinBounds(p1) && isWithinBounds(p2)) {\n intersection = t1 <= t2 ? p1 : p2;\n } else if (t1 > 0 && isWithinBounds(p1)) {\n intersection = p1;\n } else if (t2 > 0 && isWithinBounds(p2)) {\n intersection = p2;\n }\n }\n return intersection;\n }", "private E3DCollision getClosestCollisionWithCollisionDetectableObject(IE3DCollisionDetector collisionDetector, boolean useBoundingObjectsIfPossible,\r\n boolean notifyAllObjectsCollided, IE3DCollisionDetectableObject sourceObject, \r\n E3DVector3F sourceStartPos, E3DVector3F sourceEndPos, IE3DCollisionDetectableObject possibleCollidee, E3DWorld world)\r\n {\r\n E3DCollision collision = null, closestCollision = null;\r\n if(useBoundingObjectsIfPossible && possibleCollidee.getBoundingObject() != null)\r\n {\r\n collision = collisionDetector.checkForCollisionWithBoundingObject(sourceObject, sourceStartPos, sourceEndPos, possibleCollidee.getBoundingObject());\r\n if(collision != null)\r\n {\r\n collision.setCollideeObject(possibleCollidee); \r\n collision.setCollideeBoundingObject(possibleCollidee.getBoundingObject());\r\n collision.setCollisionSector(possibleCollidee.getSector());\r\n collision.setCollisionWorld(world);\r\n }\r\n }\r\n else\r\n {\r\n ArrayList triangleList = possibleCollidee.getTriangleList();\r\n E3DTriangle triangle = null;\r\n for(int i=0; i<triangleList.size(); i++)\r\n {\r\n triangle = (E3DTriangle)triangleList.get(i);\r\n \r\n //put the detectable's triangles into worldspace coords\r\n scratchTriangle.setVertexPosA(possibleCollidee.getOrientation().getWorldVector(triangle.getVertexPosA()));\r\n scratchTriangle.setVertexPosB(possibleCollidee.getOrientation().getWorldVector(triangle.getVertexPosB()));\r\n scratchTriangle.setVertexPosC(possibleCollidee.getOrientation().getWorldVector(triangle.getVertexPosC()));\r\n \r\n collision = collisionDetector.checkForCollisionWithTriangle(sourceObject, sourceStartPos, sourceEndPos, scratchTriangle);\r\n if(collision != null)\r\n {\r\n collision.setCollideeObject(possibleCollidee); \r\n collision.setCollideeBoundingObject(triangle);\r\n collision.setCollisionSector(possibleCollidee.getSector());\r\n collision.setCollisionWorld(world);\r\n\r\n if(closestCollision == null)\r\n closestCollision = collision;\r\n else\r\n {\r\n if(Math.abs(collision.getIntersectionPt().subtract(sourceStartPos).getLengthSquared()) < \r\n Math.abs(closestCollision.getIntersectionPt().subtract(sourceStartPos).getLengthSquared()))\r\n closestCollision = collision;\r\n }\r\n }\r\n }\r\n collision = closestCollision;\r\n }\r\n \r\n //Only notify one time if necessary for the closest collision (before it was notifying for every triangle it hit, UGH!)\r\n if(collision != null && notifyAllObjectsCollided && collision.getCollideeObject() != null) //notify the object this one collided with.\r\n notifyCollidedObject(sourceObject, collision);\r\n\r\n return collision;\r\n }", "private int threshFind(int[] ray){\n int min = 0;\n int max = 0;\n for(int i = 0; i < ray.length; i++){\n if(min > ray[i]) min = ray[i];\n else if(max < ray[i]) max = ray[i];\n }\n\n return (min + max) / 2;\n }", "private GObject getCollidingObject(GOval ball) {\n GObject result = null;\n GPoint[] borderPoints = createArrayOfBallBorders(ball);\n for (GPoint someBorderPoint : borderPoints) {\n result = getElementAt(someBorderPoint);\n if (result != null){\n break;\n }\n }\n return result;\n }", "private void handleMazeCollisions() {\n final ArrayList<Rectangle> segs = maze.getCollisionCandidates(getCenter());\n\n for (int i = 0; i < segs.size(); i++) {\n if (!checkCollision(segs.get(i).getPolygon())) {\n // The tank does not intersect the seg.\n segs.remove(i);\n i--;\n }\n }\n\n if (segs.size() == 0) {\n // The tank does not intersect any of the segs.\n return;\n }\n\n Runnable reverseOp = null;\n // Backtrack.\n final Tank tank = this;\n // Need to declare this up here instead of in each case because java's switch cases share scope. So java would think\n // we are redeclaring a variable.\n final Point2D decomposedVelocity;\n switch (lastMovementOp) {\n case FORWARD:\n decomposedVelocity = Physics.decomposeVector(-1, theta);\n reverseOp = () -> tank.moveBy(decomposedVelocity);\n break;\n case REVERSE:\n decomposedVelocity = Physics.decomposeVector(1, theta);\n reverseOp = () -> tank.moveBy(decomposedVelocity);\n break;\n case RIGHT:\n reverseOp = () -> tank.rotate(-TURNING_ANGLE / 12);\n break;\n case LEFT:\n reverseOp = () -> tank.rotate(TURNING_ANGLE / 12);\n break;\n }\n do {\n assert reverseOp != null;\n reverseOp.run();\n\n for (int i = 0; i < segs.size(); i++) {\n if (!checkCollision(segs.get(i).getPolygon())) {\n segs.remove(i);\n i--;\n }\n }\n } while (segs.size() > 0);\n }", "private void analyzeForObstacles() {\n \t\n \t\n \tStack<Rect> bestFound = new Stack<Rect>();//This is a stack as the algorithm moves along x linearly\n \tboolean[][] blackWhiteGrid = getBlackWhiteGrid();\n \tint[] cache = new int[grid.length];\n \t\n \twhile (true) {\n\t\t\tboolean noneFound = true;\n\t\t\t\n\t\t\tfor (int i = 0; i<cache.length; i++)\n\t\t\t\tcache[i] = 0;\n\t\t\tfor (int llx = grid.length -1; llx >= 0; llx--) {\n\t\t\t\tupdate_cache(blackWhiteGrid,cache, llx);\n\t\t\t\tfor (int lly = 0; lly < grid.length; lly++) {\n\t\t\t\t\tRect bestOfRound = new Rect(llx,lly,llx,lly);\n\t\t\t\t\tint y = lly;\n\t\t\t\t\tint x_max = 9999;\n\t\t\t\t\tint x = llx;\n\t\t\t\t\twhile (y+1<grid.length && blackWhiteGrid[llx][y]) {\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tx = Math.min(llx+cache[y]-1, x_max);\n\t\t\t\t\t\tx_max = x;\n\t\t\t\t\t\tRect tryRect = new Rect(llx,lly-1,x,y);\n\t\t\t\t\t\tif (tryRect.area() > bestOfRound.area()) {\n\t\t\t\t\t\t\tbestOfRound = tryRect;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (bestOfRound.area() > 40) {\n\t\t\t\t\t\tif (noneFound) {\n\t\t\t\t\t\t\tbestFound.push(bestOfRound);\n\t\t\t\t\t\t\tnoneFound = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tRect lastRect = bestFound.peek();\n\t\t\t\t\t\t\tif (lastRect.area() < bestOfRound.area()) {\n\t\t\t\t\t\t\t\tbestFound.pop();\n\t\t\t\t\t\t\t\tbestFound.push(bestOfRound);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (noneFound)\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tclearFoundRectangle(blackWhiteGrid, bestFound.peek());\n \t}\n \t\n \t//add found rectanlges\n \tobstacles.clear();\n \tobstacles.addAll(bestFound);\n \tSystem.out.println(\"Sweep done:\");\n \tfor (Rect r : bestFound){\n \t\tSystem.out.println(\"Rect: llx=\" + (r.llx-400) + \"\\tlly=\" + (r.lly-400) + \"\\turx=\" + (r.urx-400) + \"\\tury=\" + (r.ury-400));\n \t\tList<Point2D.Double> corners = new ArrayList<Point2D.Double>();\n \t\tcorners.add(new Point2D.Double((r.llx-400),(r.lly-400)));\n \t\tcorners.add(new Point2D.Double((r.llx-400),(r.ury-400)));\n \t\tcorners.add(new Point2D.Double((r.urx-400),(r.lly-400)));\n \t\tcorners.add(new Point2D.Double((r.urx-400),(r.ury-400)));\n \t\tobstaclesF.add(new Obstacle(corners));\n \t}\n \t\n \ttoExplore.clear();\n \tint i = 0;\n \tRandom rand = new Random();\n \twhile (toExplore.size() < 10 && i < 1000) {\n \t\tint x = rand.nextInt(grid.length);\n \t\tint y = rand.nextInt(grid.length);\n \t\tif (grid[x][y] == .5) {\n \t\t\ttoExplore.add(new Flag(\"blue\",x,y));\n \t\t}\n \t}\n }", "private void movePoint(ArrayList<Point2D.Double> polygon)\n\t{\t\n\t\tfor(int i = 0; i < polygon.size(); ++i)\n\t\t{\n\t\t\tint a = i + 1;\n\t\t\t\n\t\t\t//makes sure we dont try and compare an index that is not there\n\t\t\tif(a > polygon.size() - 1)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(pastLine(polygon.get(i), polygon.get(a), currentPoint, moveVec))\n\t\t\t{\t\n\t\t\t\t//counts the number of hits\n\t\t\t\t++hitCount;\n\t\t\t\t//create the norm vector of the wall\n\t\t\t\tPoint2D.Double normalVec = calcNormVec(polygon.get(i).getX(), polygon.get(a).getX(), \n\t\t\t\t\t\tpolygon.get(i).getY(), polygon.get(a).getY());\n\t\t\t\t//gets the unit vec\n\t\t\t\tnormalVec = calcUnitVec(normalVec);\n\t\t\t\t//get the reflection vec\n\t\t\t\tPoint2D.Double reflectionVec = calcReflection(normalVec, moveVec);\n\t\t\t\t//set the old moving vec to the new refelction vec\n\t\t\t\tmoveVec = reflectionVec;\n\t\t\t\t//only allow shape 4 to randomly change the speed after collision\n\t\t\t\tif(shape4)\n\t\t\t\t{\n\t\t\t\t\trandNum = r.nextInt(200 + 1 - 1) + 1;\n\t\t\t\t\trandNum = randNum / 100;\n\t\t\t\t\t//set the movement vecs components\n\t\t\t\t\tmoveVec.setLocation(moveVec.getX() * randNum, moveVec.getY() * randNum);\n\t\t\t\t}\n\t\t\t\t//change the color randomly on a bounce\n\t\t\t\tchangeShapeColor(r.nextInt(255-0) + 0,r.nextInt(255-0), r.nextInt(255-0));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//set the current location of the point;\n\t\tcurrentPoint.setLocation(currentPoint.getX() + moveVec.getX(), currentPoint.getY() + moveVec.getY());\n\t}", "private void circleCollison() {\n\t\t\n\t}", "public Vector traceRay(Ray ray, int bounces) {\n\t\t\n\t\t/* Terminate after too many bounces. */\n\t\tif(bounces > this.numBounces)\n\t\t\treturn new Vector(0.0, 0.0, 0.0);\n\t\t\n\t\t/* Trace ray. */\n\t\tObjectHit hit = getHit(ray);\n\n\t\tif(hit.hit) {\n\t\t\t\n\t\t\t/* Light emitted by the hit location. */\n\t\t\tVector color = hit.material.getEmission(hit.textureCoordinates.x, hit.textureCoordinates.y);\n\t\t\t\n\t\t\t/* Light going into the hit location. */\n\t\t\tVector incoming = new Vector(0.0, 0.0, 0.0);\n\t\t\t\n\t\t\t/* Do secondary rays. */\n\t\t\tVector selfColor = hit.material.getColor(hit.textureCoordinates.x, hit.textureCoordinates.y);\n\t\t\tdouble diffuseness = hit.material.getDiffuseness();\n\t\t\t\n\t\t\tfor(int i = 0; i < this.numSecondaryRays; i++) {\n\n\t\t\t\tRay newRay = new Ray(hit.hitPoint, new Vector(0.0, 0.0, 0.0));\n\t\t\t\t\t\t\n\t\t\t\tVector diffuseSample = new Vector(0.0, 0.0, 0.0);\n\t\t\t\tVector specularSample = new Vector(0.0, 0.0, 0.0);\n\t\t\t\t\n\t\t\t\tif(diffuseness > 0.0) {\n\t\t\t\t\tVector diffuseVector = Material.getDiffuseVector(hit.normal);\n\t\t\t\t\tnewRay.direction = diffuseVector;\n\t\t\t\t\tdiffuseSample = traceRay(newRay, bounces + 1);\n\t\t\t\t\tdiffuseSample = diffuseSample.times(diffuseVector.dot(hit.normal)).times(selfColor);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(diffuseness < 1.0) {\n\t\t\t\t\tVector specularVector = Material.getReflectionVector(hit.normal, ray.direction, hit.material.getGlossiness());\n\t\t\t\t\tnewRay.direction = specularVector;\n\t\t\t\t\tspecularSample = traceRay(newRay, bounces + 1);\n\t\t\t\t\t\n\t\t\t\t\tif(!hit.material.isPlastic())\n\t\t\t\t\t\tspecularSample = specularSample.times(selfColor);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tVector total = diffuseSample.times(hit.material.getDiffuseness()).plus(specularSample.times(1 - hit.material.getDiffuseness()));\n\t\t\t\tincoming = incoming.plus(total);\n\t\t\t}\n\t\t\t\n\t\t\tincoming = incoming.divBy(this.numSecondaryRays);\n\t\t\treturn color.plus(incoming);\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t/* If the ray missed return the ambient color. */\n\t\t\tVector d = new Vector(0.0, 0.0, 0.0).minus(ray.direction);\n\t\t\tdouble u = 0.5 + Math.atan2(d.z, d.x) / (2 * Math.PI);\n\t\t\tdouble v = 0.5 - Math.asin(d.y) / Math.PI;\n\t\t\t\n\t\t\treturn skyMaterial.getColor(u, v).times(255).plus(skyMaterial.getEmission(u, v));\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) \n\t{\n\t\tmouseSO.makeSolidObject(e.getX(), e.getY(), 5, 5);\n\t\t\n\t\t\tif(mouseRect.isCollidingWith(balloon1))\n\t\t\t{\n\t\t\t\tballoonY = 100;\n\t\t\t\tballoonX = (gen.nextInt(650)-75);\n\t\t\t\tif(randomColor.equals(Color.green))\n\t\t\t\t{\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tscore--;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(mouseRect.isCollidingWith(balloon2))\n\t\t\t\t{\n\t\t\t\tballoon2Y = 100;\n\t\t\t\tballoon2X = (gen.nextInt(650)-75);\n\t\t\t\tif(randomColor.equals(Color.red))\n\t\t\t\t{\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tscore--;\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(mouseRect.isCollidingWith(balloon3))\n\t\t\t\t\t{\n\t\t\t\t\t\tballoon3Y = 100;\n\t\t\t\t\t\tballoon3X = (gen.nextInt(650)-75);\n\t\t\t\t\t\tif(randomColor.equals(Color.blue))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tscore++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tscore--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon4))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tballoon4Y = 100;\n\t\t\t\t\t\t\tballoon4X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\tif(randomColor.equals(Color.yellow))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tscore++;\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\tscore--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon5))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tballoon5Y = 100;\n\t\t\t\t\t\t\t\tballoon5X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\t\tif(randomColor.equals(Color.magenta))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tscore++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tscore--;\n\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{\n\t\t\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon6))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tballoon6Y = 50;\n\t\t\t\t\t\t\t\t\tballoon6X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\t\t\tif(randomColor.equals(Color.green))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tscore++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tscore--;\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\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon7))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tballoon7Y = 50;\n\t\t\t\t\t\t\t\t\t\tballoon7X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\t\t\t\tif(randomColor.equals(Color.red))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tscore++;\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{\n\t\t\t\t\t\t\t\t\t\t\tscore--;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon8))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tballoon8Y = 50;\n\t\t\t\t\t\t\t\t\t\t\tballoon8X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\t\t\t\t\tif(randomColor.equals(Color.blue))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tscore++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tscore--;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon9))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tballoon9Y = 50;\n\t\t\t\t\t\t\t\t\t\t\t\tballoon9X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\t\t\t\t\t\tif(randomColor.equals(Color.yellow))\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\t\tscore++;\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\telse\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\t\tscore--;\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\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif(mouseRect.isCollidingWith(balloon10))\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\t\tballoon10Y = 50;\n\t\t\t\t\t\t\t\t\t\t\t\t\tballoon10X = (gen.nextInt(650)-75);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(randomColor.equals(Color.magenta))\n\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\tscore++;\n\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\telse\n\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\tscore--;\n\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}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t}", "public void checkBallCollisions(Ball ball, Board board, ArrayList<Brick> bricks) {\n float currDir = ball.getDirection();\n // check if the ball has hit any of the bricks\n for(Brick brick : bricks){\n boolean hitBrick = false;\n boolean hitCorner = false;\n\n if (ball.intersects(brick.getTopLeftCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getTopLeftCorner());\n if ((!ball.hasPositiveXDirection()) && angle<reverseVerticalDirection(angle)) ball.reverseVerticalDirection();\n else if (ball.hasPositiveYDirection() && angle>reverseHorizontalDirection(angle)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n } else if (ball.intersects(brick.getTopRightCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getTopRightCorner());\n if (ball.hasPositiveXDirection() && angle>reverseVerticalDirection(angle) && angle<Math.PI) ball.reverseVerticalDirection();\n else if (ball.hasPositiveYDirection() && (angle<reverseHorizontalDirection(angle)\n || angle>Math.PI)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n } else if (ball.intersects(brick.getBottomLeftCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getBottomLeftCorner());\n if ((!ball.hasPositiveXDirection()) && angle>reverseVerticalDirection(angle)) ball.reverseVerticalDirection();\n else if ((!ball.hasPositiveYDirection()) && angle<reverseHorizontalDirection(angle)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n } else if (ball.intersects(brick.getBottomRightCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getBottomRightCorner());\n if (ball.hasPositiveXDirection() && angle<reverseVerticalDirection(angle) && angle>Math.PI) ball.reverseVerticalDirection();\n else if ((!ball.hasPositiveYDirection()) && angle>reverseHorizontalDirection(angle)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n }\n if (hitCorner) {\n brick.decrementLife(); Points.getInstance().addPoints(10);\n break;\n }\n if (ball.intersects(brick.getNorthLine()) && Math.PI<=currDir\n && currDir<=2*Math.PI) {\n ball.reverseVerticalDirection();\n hitBrick = true;\n } else if (ball.intersects(brick.getSouthLine()) && 0<=currDir\n && currDir<=Math.PI) {\n ball.reverseVerticalDirection();\n hitBrick = true;\n } else if (ball.intersects(brick.getWestLine()) && ((0<=currDir\n && currDir<=(Math.PI)/2) || ((3*Math.PI)/2<=currDir\n && currDir<=2*Math.PI))) {\n ball.reverseHorizontalDirection();\n hitBrick = true;\n } else if (ball.intersects(brick.getEastLine()) && (Math.PI)/2<=currDir\n && currDir<=(3*Math.PI)/2) {\n ball.reverseHorizontalDirection();\n hitBrick = true;\n }\n if (hitBrick) {\n brick.decrementLife(); Points.getInstance().addPoints(10);\n break;\n }\n }\n\n // check if the ball has hit the ceiling or one of the walls\n if (ball.getY() <= ceilingPos) {\n ball.setY(ceilingPos);\n ball.reverseVerticalDirection();\n } else if (ball.getMaxX() >= rightWallPos) {\n ball.setX(rightWallPos - 2 * ball.getRadius());\n ball.reverseHorizontalDirection();\n } else if (ball.getX() <= leftwallPos) {\n ball.setX(leftwallPos);\n ball.reverseHorizontalDirection();\n }\n\n // check if the ball has hit the board\n if (currDir>((Math.PI)/6) && currDir<((3*Math.PI)/6)) return;\n if (ball.intersects(board.getBody()) && currDir>Math.PI) {\n ball.reverseVerticalDirection();\n } else if (ball.intersects(board.getLeftEdge())) {\n float angle = getDirectionAfterCollisionWithCircle(ball, board.getLeftEdge());\n if (angle<((Math.PI)/2) || angle>(3*Math.PI)/2) ball.reverseVerticalDirection();\n else ball.setDirection(angle);\n } else if (ball.intersects(board.getRightEdge())) {\n float angle = getDirectionAfterCollisionWithCircle(ball, board.getRightEdge());\n if (angle>((Math.PI)/2) && angle<(3*Math.PI)/2) ball.reverseVerticalDirection();\n else ball.setDirection(angle);\n }\n }", "void object_calculations_doesnt_touch_ground(){\n if(angle_with_ground>0&&down_angle>0&&up_angle<0)\n object_on_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle<0&&up_angle<0)\n object_upper_eyes_level_calc();\n else if(angle_with_ground>0&&down_angle>0&&up_angle>0)\n object_below_eyes_level_calc();\n }", "private void handleIntersection()\n\t{\n\t\tstop();\n\t\tgoForward(50);\n\t\t\n\t\tswitch(SEQUENCE[0])\n\t\t{\n\t\tcase FORWARD:\n\t\t\t//Keep going, don't turn.\n\t\t\tbreak;\n\t\tcase RIGHT:\n\t\t\tturnRight();\n\t\t\tbreak;\n\t\tcase LEFT:\n\t\t\tturnLeft();\n\t\t\tbreak;\n\t\t}\n\t\tnextMovement();\n\t}", "@Override\n ArrayList<Hit> object_hit_detec(Point S_t, Vector c_t, Intersection intersection) {\n ArrayList<Hit> hit_times = new ArrayList<>();\n double A = Math.pow(c_t.get_X(), 2) + Math.pow(c_t.get_Y(), 2) + Math.pow(c_t.get_Z(), 2);\n double B = c_t.get_X() * S_t.get_X() + c_t.get_Y() * S_t.get_Y() + c_t.get_Z() * S_t.get_Z();\n double C = Math.pow(S_t.get_X(), 2) + Math.pow(S_t.get_Y(), 2) + Math.pow(S_t.get_Z(), 2) - 1;\n double Discriminant = Math.pow(B, 2) - A * C;\n// System.out.println(A);\n// System.out.println(B);\n// System.out.println(C);\n //double t_hit = 0;\n if (Discriminant < 0) {\n //System.out.println(\"Geen hitpunten\");\n } else if (Discriminant == 0) {\n double t_hit = (-B) / A;\n Hit hit = new Hit(t_hit, false);\n //System.out.println(\"hit\");\n } else {\n double t_hit1 = (-B) / A + Math.sqrt(Discriminant) / A;\n double t_hit2 = (-B) / A - Math.sqrt(Discriminant) / A;\n //Find lowest hit time (for entering hit time)\n double t_in = Math.min(t_hit1, t_hit2);\n double t_out = Math.max(t_hit1, t_hit2);\n Hit hit_in = new Hit(t_in, true);\n hit_times.add(hit_in);\n Hit hit_out = new Hit(t_out, false);\n hit_times.add(hit_out);\n //t_hit = Math.min(t_hit1, t_hit2);\n //System.out.println(\"hit\");\n }\n return hit_times;\n }", "public void decision(Entity[][] map, int y, int x){ \r\n if (!getTired()){\r\n // check if surrounding area is another animal\r\n if ((x > 0) && (y > 0) && (map[y-1][x-1] instanceof Animal )){\r\n destroyArea(map, x, y);\r\n }else if ((x < map.length-1) && (y < map.length -1) && (map[y+1][x+1] instanceof Animal)){\r\n destroyArea(map, x, y);\r\n }else if ((y > 0) && map[y-1][x] instanceof Animal){\r\n destroyArea(map, x, y);\r\n }else if ((x < map.length -1) && (y > 0) && (map[y-1][x+1] instanceof Animal)){\r\n destroyArea(map, x, y);\r\n }else if(( x < map.length -1) && (map[y][x+1] instanceof Animal)){\r\n destroyArea(map, x, y);\r\n }else if(( x > 0) && (map[y][x-1] instanceof Animal)){\r\n destroyArea(map, x, y);\r\n }else if( (y < map.length-1) && (map[y+1][x] instanceof Animal)){\r\n destroyArea(map, x, y);\r\n }else if((x > 0) && (y < map.length -1) && (map[y+1][x-1] instanceof Animal)){\r\n destroyArea(map, x, y);\r\n }else if (numOfTurns == 3){\r\n numOfTurns = 0;\r\n moveRandom(map, y, x);\r\n }\r\n }\r\n numOfTurns ++;\r\n }", "public void moveRobber(Tile t){\r\n for(Tile tile: tiles){\r\n tile.setRobber(false);\r\n }\r\n t.setRobber(true);\r\n }", "@Override\r\n\tpublic void mouseMoved(MouseEvent e) {\r\n\t\tlastPointOnScreen = e.getPoint();\t\t\t\r\n\t\t\r\n\t\tif(screenWidth != 0)//control looking around for first person\r\n\t\t{\r\n\t\taSquare.setAngularVelocity(2*Math.pow((e.getX() - screenWidth/2)/(screenWidth/2.),3));\r\n\t\t}\r\n\t\t\r\n\t\tif(showDebug)//select closest point to cursor for global var\r\n\t\t{\r\n\t\t\tdouble minDistance = 100.0;\r\n\t\t\tclosestPointToCursor = null;\r\n\t\t\t\r\n\t\t\tArrayList<PolygonD> objectsInScene = new ArrayList<PolygonD>();\r\n\t\t\tobjectsInScene.addAll(objects);\r\n\t\t\tobjectsInScene.add(currentShape);\r\n\r\n\t\t\t//iterate over all of the verts in all of the objects in the scene\r\n\t\t\tfor(PolygonD obj : objectsInScene)\r\n\t\t\t\tfor(PointD p : obj.getVerts())\r\n\t\t\t\t{\r\n\t\t\t\t\tdouble distance = (double)(new Vector(\r\n\t\t\t\t\t\t\tp, \r\n\t\t\t\t\t\t\tnew PointD(\r\n\t\t\t\t\t\t\t\t\te.getPoint().x - worldCenter.getX(),\r\n\t\t\t\t\t\t\t\t\te.getPoint().y - worldCenter.getY()\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t)).getMag();\r\n\t\t\t\t\tif(distance < minDistance)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//set closest point to cursor\r\n\t\t\t\t\t\tminDistance = distance;\r\n\t\t\t\t\t\tclosestPointToCursor = p;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "public boolean tileFence(float xTile, float yTile)\r\n/* 202: */ {\r\n/* 203:226 */ return (tileInBounds(xTile, yTile)) && (this.door[((int)xTile)][((int)yTile)] != 0);\r\n/* 204: */ }", "public void CheckCollision(Ball b){\n\n if( b.getDirX() < 0f ){\n if( (b.getPosX() - b.getSizeX() ) < px + sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n } \n }else{\n if( (b.getPosX() + b.getSizeX() ) > px - sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n }\n }\n }", "void hitEvent(Block beingHit, Ball hitter);", "void hitEvent(Block beingHit, Ball hitter);", "public abstract boolean overlap(Catcher catcher, FallingObject object);", "private boolean detectCollisions(GameState mGaemState,ArrayList<GameObject> objects,SoundEngine se,ParticleSystem ps){\n boolean playerHit = false;\n for (GameObject go1:objects){\n if (go1.checkActive()){\n //the 1st object is active\n //so worth checking\n\n for (GameObject go2:objects){\n if (go2.checkActive()){\n //the 2nd object is active\n //so worth checking\n if (RectF.intersects(go1.getTransform().getCollider(),go2.getTransform().getCollider())){\n\n //switch goes here\n //there has been a collision\n //but does it matter?\n switch (go1.getTag() + \" with \" + go2.getTag()){\n case \"Player with Alien Laser\":\n playerHit = true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player with Alien\":\n playerHit =true;\n mGaemState.lostLife(se);\n\n break;\n\n case \"Player Laser with Alien\":\n mGaemState.increaseScore();\n //respawn the alien\n ps.emitParticles(new PointF(go2.getTransform().getLocation().x,go2.getTransform().getLocation().y));\n go2.setInactive();\n go2.spawn(objects.get(Level.PLAYER_INDEX).getTransform());\n go1.setInactive();\n se.playAlienExplode();\n\n break;\n\n default:\n break;\n }\n\n }\n }\n }\n }\n }\n return playerHit;\n }", "@Override\n\tpublic RaySceneObjectIntersection getClosestRayIntersection(Ray ray)\n\t{\t\t//this is calculating the \"term under the square root\"\n\t\tVector3D v=Vector3D.difference(ray.getP(), centre);\t\t\t\t\t\t//which must be greater than 0 for intersection\n\n\t\t// coefficients in the quadratic equation for t\n\t\tdouble \n\t\tquadraticA = ray.getD().getModSquared(),\n\t\tquadraticB2 = Vector3D.scalarProduct(v, ray.getD()),\t// b/2\n\t\tquadraticC = v.getModSquared() - MyMath.square(radius);\n\n\t\t// discriminant/2\n\t\tdouble discriminant2 = quadraticB2*quadraticB2-quadraticA*quadraticC;\n\n\n\t\tif(discriminant2<0.0) {\n\t\t\t//returns NaN if there is no intersection\n\t\t\treturn RaySceneObjectIntersection.NO_INTERSECTION;\n\t\t}\n\n\t\tdouble t1=(-quadraticB2+Math.sqrt(discriminant2))/quadraticA;\n\n\t\tif(t1<0.0) {\n\t\t\t//if t1<0 then t2 must be less than zero\n\t\t\treturn RaySceneObjectIntersection.NO_INTERSECTION;\n\t\t}\n\n\t\tdouble t2=(-quadraticB2-Math.sqrt(discriminant2))/quadraticA;\n\t\t\n\t\tRay rayAtIntersectionPoint = ray.getAdvancedRay((t2<0.0)?t1:t2);\n\n\t\treturn new RaySceneObjectIntersection(\n\t\t\t\trayAtIntersectionPoint.getP(),\n\t\t\t\tthis,\n\t\t\t\trayAtIntersectionPoint.getT()\n\t\t\t);\n\t}", "public void algorithm() {\n\t\tpoly = data.getPolygon();\n\t\tint ps = poly.size();\n\t\tint iterations = 0;\t\t// if iterations == ps, then we've seen every wall in the maze\n\t\t// the current position\n\t\tpos = data.getNavigatorPos();\n\t\t// the current los\n\t\tlos = data.getLOSPoint();\n\t\t// save the start LOS\n\t\tPoint a = data.getLOSLine().p1;\n\t\tPoint b = data.getLOSLine().p2;\n\t\tPoint prev = null;\n\t\t\n\t\t// pick a direction\n\t\tint direction = 1;\n\t\tif( Math.random() > 0.5 ) {\n\t\t\tdirection = -1;\n\t\t\ta = b;\n\t\t\tb = data.getLOSLine().p1;\n\t\t}\n\t\t// currently, A is the 'previous' point, B is in the direction of the next one\n\t\t\n\t\t// get the index of point B in the polygon\n\t\tint index = -1;\n\t\tfor(int i = 0; i < ps; i++) {\n\t\t\tPoint t = poly.get(i);\n\t\t\tif( t.equals( b ) ) {\n\t\t\t\tindex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\twhile( iterations < ps && !Thread.currentThread().isInterrupted() ) {\n\t\t\t\tif( iterations != 0 )\n\t\t\t\t\tsleep( 1000 );\n\t\t\t\titerations++;\n\t\t\t\tdata.resetLinesToDraw();\n\t\t\t\tdata.resetPointsToDraw();\n\t\t\t\tcontroller.repaint();\n\t\t\t\tindex = (index + direction) % ps;\n\t\t\t\tif( index < 0) index += ps;\n\t\t\t\tprev = a;\t// we need this for the concave case\n\t\t\t\ta = b;\n\t\t\t\tb = poly.get(index);\n\t\t\t\t// check if we have a clear line of sight on the ENTIRE next wall:\n\t\t\t\tif( hasLosOnEntireWall(a,b) ) {\n\t\t\t\t\t// move towards the wall we are CURRENTLY facing\n\t\t\t\t\tPoint m = g.getPointOnLine(pos, los, data.getPolygon());\n\t\t\t\t\tupdatePos(m);\n\t\t\t\t}\n\t\t\t\t// check whether we are in the convex or concave case\n\t\t\t\tboolean convex = g.pointsOnSameSideOfLine(pos, b, prev, a);\n\t\n\t\t\t\tif( convex ) {\n\t\t\t\t\tgetLosOnWall(a,b);\n\t\t\t\t\tsleep( 500 );\n\t\t\t\t\tdata.resetLinesToDraw();\n\t\t\t\t\tdata.resetPointsToDraw();\n\t\t\t\t\tcontroller.repaint();\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"CONVEX!\");\n\t\t\t\t\t// extend the prev/a line and get a point on that line\n\t\t\t\t\tPoint target = g.extendPolygonLine(prev, a, poly);\n\t\t\t\t\tPoint p = g.getPointOnLine(a, target, data.getPolygon());\n\t\t\t\t\tmoveToPoint(p, target);\n\t\t\t\t\t\n\t\t\t\t\tArrayList<Point> inTriangle = g.pointsInTriangle(poly, pos, a, b);\n\t\t\t\t\tif( inTriangle == null) {\n\t\t\t\t\t\tupdateLOS( g.getPointOnLine(a, b, data.getPolygon()));\n\t\t\t\t\t\tredrawAndSleep(300);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tArrayList<Point> intersects = new ArrayList<Point>();\n\t\t\t\t\t\tfor(int i = 0, is = inTriangle.size(); i < is; i++)\n\t\t\t\t\t\t\tintersects.add( g.lineIntersect(pos, inTriangle.get(i), a, b));\n\t\t\t\t\t\tg.orderPoints(intersects, a, b);\n\t\t\t\t\t\tupdateLOS( g.getPointOnLine(a, intersects.get(0), data.getPolygon()));\n\t\t\t\t\t}\n\t\t\t\t\t//getLosOnWall(a,b);\n\t\t\t\t}\n\t\t\t\tsleep( 500 );\n\t\t\t}\n\t\t\tcontroller.algorithmDone();\n\t\t} catch( InterruptedException e) {\n\t\t\t// apparently we were interrupted :P so stop\n\t\t}\n\t}", "public void checkIsFrogAtTheEdge() {\n\t\tif (getY()<0 || getY()>800) {\n\t\t\tsetY(FrogPositionY);\t\n\t\t}\n\t\tif (getX()<-20) {\n\t\t\tmove(movementX*2, 0);\n\t\t} else if (getX()>600) {\n\t\t\tmove(-movementX*2, 0);\n\t\t}\n\t\tif (getY()<130 && ! ((getIntersectingObjects(End.class).size() >= 1))) {\n\t\t\tmove(0, movementY*2);\n\t\t\t\n\t\t}\n\t}", "public void levelBrain1(ArrayList<GameObject> gameobject) {\r\n\r\n //The scrub has unfortunately survived..... for now.\r\n if ((_win_Level == true)&&(_save_Progres == false))\r\n { _save_Progres = true;\r\n gameobject.get(_player_Found_Value).setPlayerState(Static.PLAYER_STATE_LEVEL_COMPLETE);\r\n }\r\n\r\n\r\n // Make the scrub work harder when they hit a flag\r\n if((_lvl_1_Points == 10)&&(_flag == 0))\r\n {\r\n _flag++;\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n }\r\n if((_lvl_1_Points == 20)&&(_flag == 1))\r\n {\r\n _flag++;\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n }\r\n if((_lvl_1_Points == 50)&&(_flag ==2))\r\n {\r\n _flag++;\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n }\r\n //Ain't no smooth sailing from here, make sure their parting gift from level one is special.\r\n if((_lvl_1_Points == 70)&&(_flag == 3))\r\n {\r\n _flag++;\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n gameobject.add(new ObjectFireBall(BitmapFactory.decodeResource(_context.getResources(), R.drawable.redcyrstal)));\r\n }\r\n\r\n //THE PLAYER WON! KICK THEM THE FUCK OUT!\r\n if(_lvl_1_Points >= 100)\r\n {\r\n _win_Level = true;\r\n }\r\n\r\n //Check for scored points\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++) {\r\n if(gameobject.get(i).getObjectType() == Static.FIREBALL) {\r\n if (gameobject.get(i).getSpecialBooleanVar() == true) {\r\n _lvl_1_Points++;\r\n gameobject.get(i).setSpecialBooleanVar(false);\r\n _fx.play(_sound_ID, 1, 1, 0, 0, 1);\r\n }\r\n }\r\n }\r\n\r\n if(_save_Progres == true) {\r\n if(gameobject.get(_player_Found_Value).getObjectStatus() == Static.OBJECT_STATUS_INACTIVE)\r\n {\r\n //The player now has permission to go to level 2 but they won't make it much further.\r\n if (_readFile.returnProgress() < 2) {\r\n _readFile.saveLevelProgress(2);\r\n endMusic();\r\n gameobject.get(_player_Found_Value).returnToMenu();\r\n }\r\n endMusic();\r\n gameobject.get(_player_Found_Value).returnToMenu();\r\n }\r\n }\r\n }", "public boolean shouldExecute() {\n/* 25 */ if (!this.field_190859_a.getLeashed() && !this.field_190859_a.func_190718_dR()) {\n/* */ \n/* 27 */ List<EntityLlama> list = this.field_190859_a.world.getEntitiesWithinAABB(this.field_190859_a.getClass(), this.field_190859_a.getEntityBoundingBox().expand(9.0D, 4.0D, 9.0D));\n/* 28 */ EntityLlama entityllama = null;\n/* 29 */ double d0 = Double.MAX_VALUE;\n/* */ \n/* 31 */ for (EntityLlama entityllama1 : list) {\n/* */ \n/* 33 */ if (entityllama1.func_190718_dR() && !entityllama1.func_190712_dQ()) {\n/* */ \n/* 35 */ double d1 = this.field_190859_a.getDistanceSqToEntity((Entity)entityllama1);\n/* */ \n/* 37 */ if (d1 <= d0) {\n/* */ \n/* 39 */ d0 = d1;\n/* 40 */ entityllama = entityllama1;\n/* */ } \n/* */ } \n/* */ } \n/* */ \n/* 45 */ if (entityllama == null)\n/* */ {\n/* 47 */ for (EntityLlama entityllama2 : list) {\n/* */ \n/* 49 */ if (entityllama2.getLeashed() && !entityllama2.func_190712_dQ()) {\n/* */ \n/* 51 */ double d2 = this.field_190859_a.getDistanceSqToEntity((Entity)entityllama2);\n/* */ \n/* 53 */ if (d2 <= d0) {\n/* */ \n/* 55 */ d0 = d2;\n/* 56 */ entityllama = entityllama2;\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* 62 */ if (entityllama == null)\n/* */ {\n/* 64 */ return false;\n/* */ }\n/* 66 */ if (d0 < 4.0D)\n/* */ {\n/* 68 */ return false;\n/* */ }\n/* 70 */ if (!entityllama.getLeashed() && !func_190858_a(entityllama, 1))\n/* */ {\n/* 72 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 76 */ this.field_190859_a.func_190715_a(entityllama);\n/* 77 */ return true;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 82 */ return false;\n/* */ }", "public void makeBestMove(String method, double angle, String who){\n\t\tif (method==\"avoid\"){\n\t\t\tif (!blocked1){\n\t\t\t\tthis.convertToMotion(move1x,move1y, who);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (!blocked2){\n\t\t\t\t\tthis.convertToMotion(move2x,move2y, who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif (!blocked3){\n\t\t\t\t\t\tthis.convertToMotion(move3x,move3y, who);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tif (!blocked4){\n\t\t\t\t\t\t\tthis.convertToMotion(move4x,move4y, who);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//Dependent on most dominant vector component. Else, NPC stays put.\n\t\tif (method==\"freeze\"){\n\t\t\tif (!blocked1){\n\t\t\t\tthis.convertToMotion(move1x,move1y, who);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (who==\"Trainer\"){\n\t\t\t\t\tif(move1x==0 && move1y==1){\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).faceDown();\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).setNextDir(1+4);\n\t\t\t\t\t\t}\n\t\t\t\t\telse if(move1x==0 && move1y==-1){\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).faceUp();\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).setNextDir(0+4);\n\t\t\t\t\t\t}\n\t\t\t\t\telse if(move1x==1 && move1y==0){\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).faceRight();\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).setNextDir(2+4);\n\t\t\t\t\t\t}\n\t\t\t\t\telse if(move1x==-1 && move1y==0){\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).faceLeft();\n\t\t\t\t\t\tthis._movingTrainers.get(_thisTrainer).setNextDir(3+4);\n\t\t\t\t\t\t}\n\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t\n\t\t\t\t\tthis.repaint();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(method==\"vert\"){\n\t\t\tint moveVx=0;\n\t\t\tint moveVy=0;\n\t\t\tint xIndex;\n\t\t\tint yIndex;\n\t\t\t\n\t\t\tif (who==\"Trainer\"){\n\t\t\t\txIndex=this._movingTrainers.get(_thisTrainer).getXIndex();\n\t\t\t\tyIndex=this._movingTrainers.get(_thisTrainer).getYIndex();\n\t\t\t}\n\t\t\telse{\n\t\t\t\txIndex=this._xIndex;\n\t\t\t\tyIndex=this._yIndex;\n\t\t\t}\n\t\t\tboolean blockedV=false;\n\t\t\t\n\t\t\tif (angle>0 && angle<180){\n\t\t\t\tmoveVy=1;\n\t\t\t\tmoveVx=0;\n\t\t\t}\n\t\t\tif (angle>180 && angle<360){\n\t\t\t\tmoveVy=-1;\n\t\t\t\tmoveVx=0;\n\t\t\t}\n\t\t\tif (angle==0 || angle==360){\n\t\t\t\tmoveVx=-1;\n\t\t\t\tmoveVy=0;\n\t\t\t}\n\t\t\tif (angle==180){\n\t\t\t\tmoveVx=1;\n\t\t\t\tmoveVy=0;\n\t\t\t}\t\n\t\t\t\n\t\t\t\n\t\t\tif((!_gbs.getPlayer().isIgnoring() && who == \"Player\") || who == \"Trainer\"){\n\t\t\t\tif(xIndex + moveVx<=this._room.getX() && yIndex + moveVy<=this._room.getY() && xIndex + moveVx>=0 && yIndex + moveVy>=0){\n\t\t\t\t\t char nextV=this._room._roomGrid[xIndex + moveVx][yIndex + moveVy];\n\t\t\t\t\t if(nextV==NO || nextV==TRAINER || nextV == CUT || nextV==VERTICAL || nextV == RIGHT_LEDGE || nextV == LEFT_LEDGE|| ((nextV==DOOR || nextV== SEAMLESS) && !this._approachTimer.isRunning())|| (nextV== SURF && !this._movingTrainers.get(_thisTrainer).canSurf()) || ((nextV== FREE || nextV == GRASS) && this._movingTrainers.get(_thisTrainer).canSurf()) || (xIndex + moveVx ==this.xObs && yIndex+moveVy==this.yObs)){\n\t\t\t\t blockedV=true;\n\t\t\t\t }\n\t\t\t\t\t for(int j=0; j<this._movingTrainers.size();j++){\n\t\t\t\t\t\t if(xIndex + moveVx ==this._movingTrainers.get(_thisTrainer).getXIndex() && yIndex + moveVy ==this._movingTrainers.get(_thisTrainer).getYIndex()){\n\t\t\t\t\t\t\t if(this._movingTrainers.get(j).isDefeated() && this._movingTrainers.get(j).getVanishing()){}\n\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t blockedV=true;\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\telse{\n\t\t\t\t\tblockedV=true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!blockedV){\n\t\t\t\tthis.convertToMotion(moveVx,moveVy, who);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\tif(xIndex + moveVx==_xIndex && yIndex + moveVy==_yIndex){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).facePlayer(this._xIndex, this._yIndex);\n\t\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\tif(method==\"horiz\"){\n\t\t\tint moveHx=0;\n\t\t\tint moveHy=0;\n\t\t\tint xIndex;\n\t\t\tint yIndex;\n\t\t\t\n\t\t\tif (who==\"Trainer\"){\n\t\t\txIndex=this._movingTrainers.get(_thisTrainer).getXIndex();\n\t\t\tyIndex=this._movingTrainers.get(_thisTrainer).getYIndex();\n\t\t\t}\n\t\t\telse{\n\t\t\t\txIndex=this._xIndex;\n\t\t\t\tyIndex=this._yIndex;\n\t\t\t}\n\t\t\t\n\t\t\tboolean blockedH=false;\n\n\t\t\tif (angle>90 && angle<270){\n\t\t\t\tmoveHy=0;\n\t\t\t\tmoveHx=1;\n\t\t\t}\n\t\t\tif ((angle>270 && angle <=360)||(angle>=0 && angle<90)){\n\t\t\t\tmoveHy=0;\n\t\t\t\tmoveHx=-1;\n\t\t\t}\t\n\t\t\tif (angle==90){\n\t\t\t\tmoveHx=0;\n\t\t\t\tmoveHy=1;\n\t\t\t}\n\t\t\tif (angle==270){\n\t\t\t\tmoveHx=0;\n\t\t\t\tmoveHy=-1;\n\t\t\t}\n\n\t\t\t\n\t\t\tif((!_gbs.getPlayer().isIgnoring() && who == \"Player\") || who == \"Trainer\"){\n\t\t\t\tif(xIndex + moveHx<=this._room.getX() && yIndex + moveHy<=this._room.getY() && xIndex + moveHx>=0 && yIndex + moveHy>=0){\n\t\t\t\t\t char nextH=this._room._roomGrid[xIndex + moveHx][yIndex + moveHy];\n\t\t\t\t\t if(nextH==NO || nextH==TRAINER || nextH == CUT || nextH==VERTICAL || nextH == RIGHT_LEDGE || nextH == LEFT_LEDGE|| ((nextH==DOOR || nextH== SEAMLESS) && !this._approachTimer.isRunning())|| (nextH== SURF && !this._movingTrainers.get(_thisTrainer).canSurf()) || ((nextH== FREE || nextH == GRASS) && this._movingTrainers.get(_thisTrainer).canSurf()) || (xIndex + moveHx ==this.xObs && yIndex+moveHy==this.yObs)){\n\t\t\t\t blockedH=true;\n\t\t\t\t }\n\t\t\t\t\t for(int j=0; j<this._movingTrainers.size();j++){\n\t\t\t\t\t\t if(xIndex + moveHx ==this._movingTrainers.get(_thisTrainer).getXIndex() && yIndex + moveHy ==this._movingTrainers.get(_thisTrainer).getYIndex()){\n\t\t\t\t\t\t\t if(this._movingTrainers.get(j).isDefeated() && this._movingTrainers.get(j).getVanishing()){}\n\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t blockedH=true;\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\telse{\n\t\t\t\t\tblockedH=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (!blockedH){\n\t\t\t\tthis.convertToMotion(moveHx,moveHy, who);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(method==\"drunk\"){\n\t\t\tRandom r = new Random();\n\t\t\tint rand = r.nextInt(100);\n\t\t\t\n\t\t\t//Probabilities:\n\t\t\t//Best move = 50%\n\t\t\tint p1=50;\n\t\t\t//Second best = 15%\n\t\t\tint p2=65;\n\t\t\t//Third best = 10%\n\t\t\tint p3=75;\n\t\t\t//Worst move = 10%\n\t\t\tint p4=85;\n\t\t\t//Doesn't move at all. = 15%\n\t\t\tint p5=100;\n\t\t\t\n\t\t\tif(rand<=p1){\n\t\t\t\tif(!blocked1){\n\t\t\t\t\tthis.convertToMotion(move1x, move1y,who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p2){\n\t\t\t\tif(!blocked2){\n\t\t\t\t\tthis.convertToMotion(move2x, move2y, who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p3){\n\t\t\t\tif(!blocked3){\n\t\t\t\t\tthis.convertToMotion(move3x, move3y,who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p4){\n\t\t\t\tif(!blocked4){\n\t\t\t\t\tthis.convertToMotion(move4x, move4y,who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p5){\n\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(method==\"wander\"){\n\t\t\tRandom r = new Random();\n\t\t\tint rand = r.nextInt(100);\n\t\t\t\n\t\t\t//Probabilities:\n\t\t\t//Best move = 65%\n\t\t\tint p1=65;\n\t\t\t//Second best = 10%\n\t\t\tint p2=75;\n\t\t\t//Third best = 5%\n\t\t\tint p3=80;\n\t\t\t//Worst move = 5%\n\t\t\tint p4=85;\n\t\t\t//Doesn't move at all. = 15%\n\t\t\tint p5=100;\n\t\t\t\n\t\t\tif(rand<=p1){\n\t\t\t\tif(!blocked1){\n\t\t\t\t\tthis.convertToMotion(move1x, move1y,who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p2){\n\t\t\t\tif(!blocked2){\n\t\t\t\t\tthis.convertToMotion(move2x, move2y, who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p3){\n\t\t\t\tif(!blocked3){\n\t\t\t\t\tthis.convertToMotion(move3x, move3y,who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p4){\n\t\t\t\tif(!blocked4){\n\t\t\t\t\tthis.convertToMotion(move4x, move4y,who);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(rand<=p5){\n\t\t\t\tif(who==\"Trainer\"){\n\t\t\t\t\tthis.getMovingTrainers().get(_thisTrainer).setCanMove(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t}", "public void action() throws Exception {\n // Cop move to another place\n move();\n\n // Search for agents nearby\n ArrayList<Position> occupiedNeighbor = this.getPosition().getOccupiedNeighborhood();\n ArrayList<Agent> arrestList = new ArrayList<>();\n for (Position neighbor : occupiedNeighbor) {\n Person person = neighbor.getOccupiedPerson();\n String className = person.getClass().getName();\n // if this is a agent and is active\n if (className.equals(Person.AGENT)) {\n if (((Agent) person).isActive()) {\n arrestList.add((Agent) person);\n }\n }\n }\n\n // If there at least one agent nearby\n if (0 != arrestList.size()) {\n // Randomly pick active agent to jail\n Random random = new Random();\n int maxIndex = arrestList.size();\n int randomIndex = random.nextInt(maxIndex);\n Agent arrestAgent = arrestList.get(randomIndex);\n int jailTerm = random.nextInt(getPersonEnvironment().getMaxJailTerm());\n arrestAgent.beArrested(jailTerm, this);\n }\n }", "private Solid.Intersection castRayOnSolids(Ray ray) {\n // We need to shift the ray to avoid shadow acne\n ray = ray.getShifted(MINIMUM_RAY_LENGTH);\n\n double closestPointDistanceSquared = Double.POSITIVE_INFINITY;\n Solid.Intersection closestIntersection = null;\n for (Solid solid : solids) {\n Solid.Intersection intersection = solid.castRay(ray);\n if (intersection != null) {\n double distanceToIntersectionSquared =\n GeometryHelpers.vectorLengthSquared(intersection.info.pointOfIntersection.subtract(ray.origin));\n\n // To avoid hitting the shape from which the ray was shot, the ray has to have a minimum length\n if (distanceToIntersectionSquared > MINIMUM_RAY_LENGTH*MINIMUM_RAY_LENGTH) {\n if (distanceToIntersectionSquared < closestPointDistanceSquared) {\n closestPointDistanceSquared = distanceToIntersectionSquared;\n closestIntersection = intersection;\n }\n }\n }\n }\n return closestIntersection;\n }", "@Test\n public void RandomBallLocationStopped() {\n final boolean seenAll[] = new boolean[1];\n seenAll[0] = false;\n\n WheelObserver wheelObserver = new WheelObserver() {\n Set<Integer> seen = new HashSet<Integer>();\n public void stopped(final int location) {\n if (location < 0 || location > 36)\n throw new IllegalArgumentException();\n seen.add(location);\n if (seen.size() == 37) seenAll[0] = true;\n }\n };\n RouletteWheel wheel = new RouletteWheel(wheelObserver);\n\n for (int x = 0; x < 1000; x++)\n {\n wheel.spin(0);\n wheel.tick(20000);\n }\n\n assertTrue(seenAll[0]);\n }", "private void bounceIfWallCollision() {\n \tdouble x = ball.getX();\n \tdouble y = ball.getY();\n \t\n \t// Ball hits side\n \tif (x <= 0 || (x + BALL_RADIUS * 2) >= getWidth()) vx = -vx;\n \t\n \t// Ball hits top\n \tif (y <= 0) vy = -vy;\n }", "Velocity hit(Ball hitter, Point collisionPoint, Velocity currentVelocity);", "public void knockBack(Entity entity, float par2, double par3, double par5, double par6) {\n\t\tif (this.rand.nextDouble() >= this.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).getAttributeValue()) {\n\t\t\tthis.isAirBorne = true;\n\t\t\tfloat f1 = MathHelper.sqrt_double(par3 * par3 + par5 * par5);\n\t\t\tfloat f2 = 0.4F;\n\t\t\tthis.motionX /= 2.0D;\n\t\t\tthis.motionY /= 2.0D;\n\t\t\tthis.motionZ /= 2.0D;\n\t\t\tthis.motionX -= par3 / (double)f1 * (double)f2;\n\t\t\tthis.motionY += (double)f2;\n\t\t\tthis.motionZ -= par5 / (double)f1 * (double)f2;\n\t\t\tif (this.motionY > par6) {\n\t\t\t\tthis.motionY = par6;\n\t\t\t}\n\t\t}\n\t}", "private LightSource.Intersection castRayOnLights(Ray ray) {\n double closestPointDistanceSquared = Double.POSITIVE_INFINITY;\n LightSource.Intersection closestIntersection = null;\n for (LightSource light : lightSources) {\n LightSource.Intersection intersection = light.castRay(ray);\n if (intersection != null) {\n double distanceToIntersectionSquared =\n GeometryHelpers.vectorLengthSquared(intersection.info.pointOfIntersection.subtract(ray.origin));\n\n // To avoid hitting the shape from which the ray was shot, the ray has to have a minimum length\n if (distanceToIntersectionSquared > MINIMUM_RAY_LENGTH*MINIMUM_RAY_LENGTH) {\n if (distanceToIntersectionSquared < closestPointDistanceSquared) {\n closestPointDistanceSquared = distanceToIntersectionSquared;\n closestIntersection = intersection;\n }\n }\n }\n }\n return closestIntersection;\n }", "private void scanForBlockFarAway() {\r\n\t\tList<MapLocation> locations = gameMap.senseNearbyBlocks();\r\n\t\tlocations.removeAll(stairs);\r\n\t\tif (locations.size() == 0) {\r\n\t\t\tblockLoc = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/* remove blocks that can be sensed */\r\n\t\tIterator<MapLocation> iter = locations.iterator();\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tMapLocation loc = iter.next();\r\n\t\t\tif (myRC.canSenseSquare(loc))\r\n\t\t\t\titer.remove();\r\n\t\t} \r\n\t\t\r\n\t\tlocations = navigation.sortLocationsByDistance(locations);\r\n\t\t//Collections.reverse(locations);\r\n\t\tfor (MapLocation block : locations) {\r\n\t\t\tif (gameMap.get(block).robotAtLocation == null){\r\n\t\t\t\t/* this location is unoccupied */\r\n\t\t\t\tblockLoc = block;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tblockLoc = null;\r\n\t}", "public boolean hitObject(BasicObject obj){\n if(abs(obj.posX - posX) < obj.wid/ 2 && abs(obj.posY - posY) < obj.hei/ 2){\n return true;\n }\n else{\n return false;\n }\n }", "@Override\n public MovingObjectPosition collisionRayTrace(World world, BlockPos pos, Vec3 vec0, Vec3 vec1) {\n this.setBlockBoundsBasedOnState(world, pos);\n vec0 = vec0.addVector((double)(-pos.getX()), (double)(-pos.getY()), (double)(-pos.getZ()));\n vec1 = vec1.addVector((double) (-pos.getX()), (double) (-pos.getY()), (double) (-pos.getZ()));\n Vec3 vec2 = vec0.getIntermediateWithXValue(vec1, this.minX);\n Vec3 vec3 = vec0.getIntermediateWithXValue(vec1, this.maxX);\n Vec3 vec4 = vec0.getIntermediateWithYValue(vec1, this.minY);\n Vec3 vec5 = vec0.getIntermediateWithYValue(vec1, this.maxY);\n Vec3 vec6 = vec0.getIntermediateWithZValue(vec1, this.minZ);\n Vec3 vec7 = vec0.getIntermediateWithZValue(vec1, this.maxZ);\n Vec3 vec8 = null;\n if (!this.isVecInsideYZBounds(world, pos, vec2)) {\n vec2 = null;\n }\n if (!this.isVecInsideYZBounds(world, pos, vec3)) {\n vec3 = null;\n }\n if (!this.isVecInsideXZBounds(world, pos, vec4)) {\n vec4 = null;\n }\n if (!this.isVecInsideXZBounds(world, pos, vec5)) {\n vec5 = null;\n }\n if (!this.isVecInsideXYBounds(world, pos, vec6)) {\n vec6 = null;\n }\n if (!this.isVecInsideXYBounds(world, pos, vec7)) {\n vec7 = null;\n }\n if (vec2 != null) {\n vec8 = vec2;\n }\n if (vec3 != null && (vec8 == null || vec0.squareDistanceTo(vec3) < vec0.squareDistanceTo(vec8))) {\n vec8 = vec3;\n }\n if (vec4 != null && (vec8 == null || vec0.squareDistanceTo(vec4) < vec0.squareDistanceTo(vec8))) {\n vec8 = vec4;\n }\n if (vec5 != null && (vec8 == null || vec0.squareDistanceTo(vec5) < vec0.squareDistanceTo(vec8))) {\n vec8 = vec5;\n }\n if (vec6 != null && (vec8 == null || vec0.squareDistanceTo(vec6) < vec0.squareDistanceTo(vec8))) {\n vec8 = vec6;\n }\n if (vec7 != null && (vec8 == null || vec0.squareDistanceTo(vec7) < vec0.squareDistanceTo(vec8))) {\n vec8 = vec7;\n }\n if (vec8 == null) {\n return null;\n } else {\n EnumFacing enumfacing = null;\n if (vec8 == vec3) {\n enumfacing = EnumFacing.WEST;\n }\n if (vec8 == vec2) {\n enumfacing = EnumFacing.EAST;\n }\n if (vec8 == vec3) {\n enumfacing = EnumFacing.DOWN;\n }\n if (vec8 == vec4) {\n enumfacing = EnumFacing.UP;\n }\n if (vec8 == vec5) {\n enumfacing = EnumFacing.NORTH;\n }\n if (vec8 == vec6) {\n enumfacing = EnumFacing.SOUTH;\n }\n return new MovingObjectPosition(vec8.addVector((double) pos.getX(), (double) pos.getY(), (double) pos.getZ()), enumfacing, pos);\n }\n }", "public abstract void collide(InteractiveObject obj);", "public synchronized boolean MoveThatFigure(Figures.Color color, Figures.Type typ, Point pozice, Point direction, ArrayList<ModelObject> objekty) {\n for (Object obj : objekty) {\r\n objectsForMovement.add((ModelObject) obj);\r\n }\r\n\r\n Point pomPozice = new Point(pozice);\r\n Point pomDirxM = new Point(direction);\r\n Point pomDiryM = new Point(direction);\r\n Point pomDirxP = new Point(direction);\r\n Point pomDiryP = new Point(direction);\r\n Point BeforeLast = new Point();\r\n\r\n pomDirxM.x = pomDirxM.x - 1;\r\n pomDiryM.y = pomDiryM.y - 1;\r\n pomDirxP.x = pomDirxP.x + 1;\r\n pomDiryP.y = pomDiryP.y + 1;\r\n\r\n if (color == Figures.Color.White) {\r\n if (typ == Figures.Type.Pawn) {\r\n if ((direction.x == pozice.x && direction.y == pozice.y - 1)\r\n && free.isFree(direction, objectsForMovement)) {\r\n side = false;\r\n return true;\r\n }\r\n if ((direction.x == pozice.x - 1 && direction.y == pozice.y - 1\r\n || direction.x == pozice.x + 1 && direction.y == pozice.y - 1)\r\n && !free.isFree(direction, objectsForMovement)) {\r\n side = false;\r\n this.pawnTaking = true;\r\n return true;\r\n }\r\n }\r\n\r\n if (typ == Figures.Type.Rook) {\r\n // if ((CanTake(direction, Figures.Color.Black)) || free.isFree(direction, objectsForMovement)) {\r\n if (pozice.equals(pomDirxM)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.equals(pomDirxP)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.equals(pomDiryM)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.equals(pomDiryP)) {\r\n side = false;\r\n return true;\r\n } else {\r\n do {\r\n if ((direction.x == pomPozice.x && direction.y >= pomPozice.y)) {\r\n pomPozice.y = pomPozice.y + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDiryM;\r\n } else if (direction.x == pomPozice.x && direction.y <= pomPozice.y) {\r\n pomPozice.y = pomPozice.y - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDiryP;\r\n } else if (direction.x <= pomPozice.x && direction.y == pomPozice.y) {\r\n pomPozice.x = pomPozice.x - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDirxP;\r\n } else if (direction.x >= pomPozice.x && direction.y == pomPozice.y) {\r\n pomPozice.x = pomPozice.x + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDirxM;\r\n }\r\n if (mahmadan == false) {\r\n break;\r\n }\r\n\r\n } while ((pomPozice.x != BeforeLast.x) || (pomPozice.y != BeforeLast.y));\r\n if (mahmadan == true) {\r\n side = false;\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n // }\r\n\r\n if (typ == Figures.Type.Knight) {\r\n // if ((CanTake(direction, Figures.Color.Black)) || free.isFree(direction, objectsForMovement)) {\r\n if ((direction.x == pozice.x + 2 && direction.y == pozice.y - 1)\r\n || (direction.x == pozice.x - 2 && direction.y == pozice.y - 1)\r\n || (direction.x == pozice.x - 2 && direction.y == pozice.y + 1)\r\n || (direction.x == pozice.x + 2 && direction.y == pozice.y + 1)\r\n || (direction.x == pozice.x + 1 && direction.y == pozice.y + 2)\r\n || (direction.x == pozice.x + 1 && direction.y == pozice.y - 2)\r\n || (direction.x == pozice.x - 1 && direction.y == pozice.y - 2)\r\n || (direction.x == pozice.x - 1 && direction.y == pozice.y + 2)) {\r\n side = false;\r\n return true;\r\n }\r\n }\r\n // }\r\n\r\n if (typ == Figures.Type.Bishop) {\r\n // if ((CanTake(direction, Figures.Color.Black)) || free.isFree(direction, objectsForMovement)) {\r\n if (Math.abs(pozice.x - direction.x) == Math.abs(pozice.y - direction.y)) {\r\n if (pozice.x == pomDirxM.x && pozice.y == pomDiryM.y) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDirxP.x && pozice.y == pomDiryP.y) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDiryM.x && pozice.y == pomDiryP.y) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDiryP.x && pozice.y == pomDiryM.y) {\r\n side = false;\r\n return true;\r\n } else {\r\n do {\r\n if (direction.x >= pozice.x && direction.y >= pozice.y) {\r\n pomPozice.y = pomPozice.y + 1;\r\n pomPozice.x = pomPozice.x + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxM.x;\r\n BeforeLast.y = pomDiryM.y;\r\n } else if (direction.x <= pozice.x && direction.y >= pozice.y) {\r\n pomPozice.y = pomPozice.y + 1;\r\n pomPozice.x = pomPozice.x - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxP.x;\r\n BeforeLast.y = pomDiryM.y;\r\n } else if (direction.x <= pozice.x && direction.y <= pozice.y) {\r\n pomPozice.y = pomPozice.y - 1;\r\n pomPozice.x = pomPozice.x - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxP.x;\r\n BeforeLast.y = pomDiryP.y;\r\n } else if (direction.x >= pozice.x && direction.y <= pozice.y) {\r\n pomPozice.y = pomPozice.y - 1;\r\n pomPozice.x = pomPozice.x + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxM.x;\r\n BeforeLast.y = pomDiryP.y;\r\n }\r\n if (mahmadan == false) {\r\n break;\r\n }\r\n } while ((pomPozice.x != BeforeLast.x) && (pomPozice.y != BeforeLast.y));\r\n if (mahmadan == true) {\r\n side = false;\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n // }\r\n\r\n if (typ == Figures.Type.Queen) {\r\n // if ((CanTake(direction, Figures.Color.Black)) || free.isFree(direction, objectsForMovement)) {\r\n if (pozice.equals(pomDirxM)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.equals(pomDirxP)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.equals(pomDiryM)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.equals(pomDiryP)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDirxM.x && pozice.y == pomDiryM.y) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDirxP.x && pozice.y == pomDiryP.y) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDiryM.x && pozice.y == pomDiryP.y) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDiryP.x && pozice.y == pomDiryM.y) {\r\n side = false;\r\n return true;\r\n } else {\r\n if (((direction.x >= pozice.x && direction.y >= pozice.y)\r\n || (direction.x <= pozice.x && direction.y >= pozice.y)\r\n || (direction.x <= pozice.x && direction.y <= pozice.y)\r\n || (direction.x >= pozice.x && direction.y <= pozice.y))\r\n && (Math.abs(pozice.x - direction.x) == Math.abs(pozice.y - direction.y))) {\r\n do {\r\n if (direction.x >= pozice.x && direction.y >= pozice.y) {\r\n pomPozice.y = pomPozice.y + 1;\r\n pomPozice.x = pomPozice.x + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxM.x;\r\n BeforeLast.y = pomDiryM.y;\r\n } else if (direction.x <= pozice.x && direction.y >= pozice.y) {\r\n pomPozice.y = pomPozice.y + 1;\r\n pomPozice.x = pomPozice.x - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxP.x;\r\n BeforeLast.y = pomDiryM.y;\r\n } else if (direction.x <= pozice.x && direction.y <= pozice.y) {\r\n pomPozice.y = pomPozice.y - 1;\r\n pomPozice.x = pomPozice.x - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxP.x;\r\n BeforeLast.y = pomDiryP.y;\r\n } else if (direction.x >= pozice.x && direction.y <= pozice.y) {\r\n pomPozice.y = pomPozice.y - 1;\r\n pomPozice.x = pomPozice.x + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxM.x;\r\n BeforeLast.y = pomDiryP.y;\r\n }\r\n if (mahmadan == false) {\r\n break;\r\n }\r\n } while ((pomPozice.x != BeforeLast.x) && (pomPozice.y != BeforeLast.y));\r\n if ((Math.abs(pozice.x - direction.x) == Math.abs(pozice.y - direction.y)) && mahmadan == true) {\r\n side = false;\r\n return true;\r\n }\r\n }\r\n if ((direction.x == pozice.x && direction.y >= pozice.y)\r\n || (direction.x == pozice.x && direction.y <= pozice.y)\r\n || (direction.x <= pozice.x && direction.y == pozice.y)\r\n || (direction.x >= pozice.x && direction.y == pozice.y)) {\r\n do {\r\n if ((direction.x == pomPozice.x && direction.y >= pomPozice.y)) {\r\n pomPozice.y = pomPozice.y + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDiryM;\r\n } else if (direction.x == pomPozice.x && direction.y <= pomPozice.y) {\r\n pomPozice.y = pomPozice.y - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDiryP;\r\n } else if (direction.x <= pomPozice.x && direction.y == pomPozice.y) {\r\n pomPozice.x = pomPozice.x - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDirxP;\r\n } else if (direction.x >= pomPozice.x && direction.y == pomPozice.y) {\r\n pomPozice.x = pomPozice.x + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDirxM;\r\n }\r\n if (mahmadan == false) {\r\n break;\r\n }\r\n\r\n } while ((pomPozice.x != BeforeLast.x) || (pomPozice.y != BeforeLast.y));\r\n if (mahmadan == true) {\r\n side = false;\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n // }\r\n\r\n if (typ == Figures.Type.King) {\r\n // if ((CanTake(direction, Figures.Color.Black)) || free.isFree(direction, objectsForMovement)) {\r\n if (direction.x == pozice.x && direction.y == pozice.y - 1 || direction.x == pozice.x - 1 && direction.y == pozice.y - 1\r\n || direction.x == pozice.x && direction.y == pozice.y + 1 || direction.x == pozice.x - 1 && direction.y == pozice.y + 1\r\n || direction.x == pozice.x + 1 && direction.y == pozice.y || direction.x == pozice.x + 1 && direction.y == pozice.y - 1\r\n || direction.x == pozice.x - 1 && direction.y == pozice.y || direction.x == pozice.x + 1 && direction.y == pozice.y + 1) {\r\n side = false;\r\n return true;\r\n }\r\n }\r\n //}\r\n\r\n } else if (color == Figures.Color.Black) {/* && side == false*/\r\n\r\n if (typ == Figures.Type.Pawn) {\r\n if ((direction.x == pozice.x && direction.y == pozice.y + 1)\r\n && free.isFree(direction, objectsForMovement)) {\r\n side = true;\r\n return true;\r\n }\r\n if (CanTake(direction, Figures.Color.White)) {\r\n if ((direction.x == pozice.x - 1 && direction.y == pozice.y + 1\r\n || direction.x == pozice.x + 1 && direction.y == pozice.y + 1)\r\n && !free.isFree(direction, objectsForMovement)) {\r\n side = true;\r\n this.pawnTaking = true;\r\n return true;\r\n }\r\n }\r\n }\r\n if (typ == Figures.Type.Rook) {\r\n if ((CanTake(direction, Figures.Color.White)) || free.isFree(direction, objectsForMovement)) {\r\n if (pozice.equals(pomDirxM)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.equals(pomDirxP)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.equals(pomDiryM)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.equals(pomDiryP)) {\r\n side = false;\r\n return true;\r\n } else {\r\n do {\r\n if ((direction.x == pomPozice.x && direction.y >= pomPozice.y)) {\r\n pomPozice.y = pomPozice.y + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDiryM;\r\n } else if (direction.x == pomPozice.x && direction.y <= pomPozice.y) {\r\n pomPozice.y = pomPozice.y - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDiryP;\r\n } else if (direction.x <= pomPozice.x && direction.y == pomPozice.y) {\r\n pomPozice.x = pomPozice.x - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDirxP;\r\n } else if (direction.x >= pomPozice.x && direction.y == pomPozice.y) {\r\n pomPozice.x = pomPozice.x + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDirxM;\r\n }\r\n if (mahmadan == false) {\r\n break;\r\n }\r\n\r\n } while ((pomPozice.x != BeforeLast.x) || (pomPozice.y != BeforeLast.y));\r\n if (mahmadan == true) {\r\n side = false;\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (typ == Figures.Type.Knight) {\r\n if ((CanTake(direction, Figures.Color.White)) || free.isFree(direction, objectsForMovement)) {\r\n if ((direction.x == pozice.x + 2 && direction.y == pozice.y - 1)\r\n || (direction.x == pozice.x - 2 && direction.y == pozice.y - 1)\r\n || (direction.x == pozice.x - 2 && direction.y == pozice.y + 1)\r\n || (direction.x == pozice.x + 2 && direction.y == pozice.y + 1)\r\n || (direction.x == pozice.x + 1 && direction.y == pozice.y + 2)\r\n || (direction.x == pozice.x + 1 && direction.y == pozice.y - 2)\r\n || (direction.x == pozice.x - 1 && direction.y == pozice.y - 2)\r\n || (direction.x == pozice.x - 1 && direction.y == pozice.y + 2)) {\r\n side = true;\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n if (typ == Figures.Type.Bishop) {\r\n if (Math.abs(pozice.x - direction.x) == Math.abs(pozice.y - direction.y)) {\r\n if ((CanTake(direction, Figures.Color.White)) || free.isFree(direction, objectsForMovement)) {\r\n if (pozice.x == pomDirxM.x && pozice.y == pomDiryM.y) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDirxP.x && pozice.y == pomDiryP.y) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDiryM.x && pozice.y == pomDiryP.y) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDiryP.x && pozice.y == pomDiryM.y) {\r\n side = false;\r\n return true;\r\n } else {\r\n do {\r\n if (direction.x >= pozice.x && direction.y >= pozice.y) {\r\n pomPozice.y = pomPozice.y + 1;\r\n pomPozice.x = pomPozice.x + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxM.x;\r\n BeforeLast.y = pomDiryM.y;\r\n } else if (direction.x <= pozice.x && direction.y >= pozice.y) {\r\n pomPozice.y = pomPozice.y + 1;\r\n pomPozice.x = pomPozice.x - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxP.x;\r\n BeforeLast.y = pomDiryM.y;\r\n } else if (direction.x <= pozice.x && direction.y <= pozice.y) {\r\n pomPozice.y = pomPozice.y - 1;\r\n pomPozice.x = pomPozice.x - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxP.x;\r\n BeforeLast.y = pomDiryP.y;\r\n } else if (direction.x >= pozice.x && direction.y <= pozice.y) {\r\n pomPozice.y = pomPozice.y - 1;\r\n pomPozice.x = pomPozice.x + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxM.x;\r\n BeforeLast.y = pomDiryP.y;\r\n }\r\n if (mahmadan == false) {\r\n break;\r\n }\r\n } while ((pomPozice.x != BeforeLast.x) && (pomPozice.y != BeforeLast.y));\r\n if ((Math.abs(pozice.x - direction.x) == Math.abs(pozice.y - direction.y)) && mahmadan == true) {\r\n side = false;\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (typ == Figures.Type.Queen) {\r\n if ((CanTake(direction, Figures.Color.White)) || free.isFree(direction, objectsForMovement)) {\r\n if (pozice.equals(pomDirxM)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.equals(pomDirxP)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.equals(pomDiryM)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.equals(pomDiryP)) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDirxM.x && pozice.y == pomDiryM.y) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDirxP.x && pozice.y == pomDiryP.y) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDiryM.x && pozice.y == pomDiryP.y) {\r\n side = false;\r\n return true;\r\n }\r\n if (pozice.x == pomDiryP.x && pozice.y == pomDiryM.y) {\r\n side = false;\r\n return true;\r\n } else {\r\n if (((direction.x >= pozice.x && direction.y >= pozice.y)\r\n || (direction.x <= pozice.x && direction.y >= pozice.y)\r\n || (direction.x <= pozice.x && direction.y <= pozice.y)\r\n || (direction.x >= pozice.x && direction.y <= pozice.y))\r\n && (Math.abs(pozice.x - direction.x) == Math.abs(pozice.y - direction.y))) {\r\n do {\r\n if (direction.x >= pozice.x && direction.y >= pozice.y) {\r\n pomPozice.y = pomPozice.y + 1;\r\n pomPozice.x = pomPozice.x + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxM.x;\r\n BeforeLast.y = pomDiryM.y;\r\n } else if (direction.x <= pozice.x && direction.y >= pozice.y) {\r\n pomPozice.y = pomPozice.y + 1;\r\n pomPozice.x = pomPozice.x - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxP.x;\r\n BeforeLast.y = pomDiryM.y;\r\n } else if (direction.x <= pozice.x && direction.y <= pozice.y) {\r\n pomPozice.y = pomPozice.y - 1;\r\n pomPozice.x = pomPozice.x - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxP.x;\r\n BeforeLast.y = pomDiryP.y;\r\n } else if (direction.x >= pozice.x && direction.y <= pozice.y) {\r\n pomPozice.y = pomPozice.y - 1;\r\n pomPozice.x = pomPozice.x + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast.x = pomDirxM.x;\r\n BeforeLast.y = pomDiryP.y;\r\n }\r\n if (mahmadan == false) {\r\n break;\r\n }\r\n } while ((pomPozice.x != BeforeLast.x) && (pomPozice.y != BeforeLast.y));\r\n if ((Math.abs(pozice.x - direction.x) == Math.abs(pozice.y - direction.y)) && mahmadan == true) {\r\n side = false;\r\n return true;\r\n }\r\n }\r\n if ((direction.x == pozice.x && direction.y >= pozice.y)\r\n || (direction.x == pozice.x && direction.y <= pozice.y)\r\n || (direction.x <= pozice.x && direction.y == pozice.y)\r\n || (direction.x >= pozice.x && direction.y == pozice.y)) {\r\n do {\r\n if ((direction.x == pomPozice.x && direction.y >= pomPozice.y)) {\r\n pomPozice.y = pomPozice.y + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDiryM;\r\n } else if (direction.x == pomPozice.x && direction.y <= pomPozice.y) {\r\n pomPozice.y = pomPozice.y - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDiryP;\r\n } else if (direction.x <= pomPozice.x && direction.y == pomPozice.y) {\r\n pomPozice.x = pomPozice.x - 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDirxP;\r\n } else if (direction.x >= pomPozice.x && direction.y == pomPozice.y) {\r\n pomPozice.x = pomPozice.x + 1;\r\n mahmadan = free.isWayClear(pomPozice, objectsForMovement);\r\n BeforeLast = pomDirxM;\r\n }\r\n if (mahmadan == false) {\r\n break;\r\n }\r\n\r\n } while ((pomPozice.x != BeforeLast.x) || (pomPozice.y != BeforeLast.y));\r\n if (mahmadan == true) {\r\n side = false;\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (typ == Figures.Type.King) {\r\n if ((CanTake(direction, Figures.Color.White)) || free.isFree(direction, objectsForMovement)) {\r\n if (direction.x == pozice.x && direction.y == pozice.y - 1\r\n || direction.x == pozice.x - 1 && direction.y == pozice.y - 1\r\n || direction.x == pozice.x && direction.y == pozice.y + 1\r\n || direction.x == pozice.x - 1 && direction.y == pozice.y + 1\r\n || direction.x == pozice.x + 1 && direction.y == pozice.y\r\n || direction.x == pozice.x + 1 && direction.y == pozice.y - 1\r\n || direction.x == pozice.x - 1 && direction.y == pozice.y\r\n || direction.x == pozice.x + 1 && direction.y == pozice.y + 1) {\r\n side = true;\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public void explore() {\n\t\t\tif(getSpeed() < CAR_MAX_SPEED){ // Need speed to turn and progress toward the exit\n\t\t\t\tapplyForwardAcceleration(); // Tough luck if there's a wall in the way\n\t\t\t}\n\t\t\tif (isFollowingWall) {\n\t\t\t\t// if already been to this tile, stop following the wall\n\t\t\t\tif (travelled.contains(new Coordinate(getPosition()))) {\n\t\t\t\t\tisFollowingWall = false;\n\t\t\t\t} else {\n\t\t\t\t\tif(!checkFollowingWall(getOrientation(), map)) {\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If wall on left and wall straight ahead, turn right\n\t\t\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\t\t\tif (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tapplyReverseAcceleration();\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 {\n\t\t\t\t// Start wall-following (with wall on left) as soon as we see a wall straight ahead\n\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\tif (!checkWallRight(getOrientation(), map) && !checkWallLeft(getOrientation(), map)) {\n\t\t\t\t\t\t// implementing some randomness so doesn't get stuck in loop\n\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\tint n = rand.nextInt(2);\n\t\t\t\t\t\tif (n==0) {\n\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void bounceOffEdge()\n {\n int margin = 2;\n\n if (getX() <= margin || getX() >= getWorld().getWidth() - margin) //left or right side\n {\n turn(180);\n }\n if (getY() <= margin || getY() >= getWorld().getHeight() - margin) //top or bottom side\n {\n turn(180);\n }\n }", "@Test\n public void GivenTwoRobotsInLaserBeamThenOnlyClosestOneGetsHitByLaser() {\n int healthRobot1BeforeLaser = robot.getRobotHealthPoint();\n int healthRobot2BeforeLaser = robot2.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after laser\n int healthrobot1afterlaser = robot.getRobotHealthPoint();\n int healthrobot2afterlaser = robot2.getRobotHealthPoint();\n\n //only the assert for robot close to laser should fail (this is intentional)\n assertNotEquals(healthRobot1BeforeLaser, healthrobot1afterlaser);\n assertEquals(healthRobot2BeforeLaser, healthrobot2afterlaser);\n }", "boolean move(int a, int b, int ring) {//TODO: effizienter schreiben\t\n\t\tif(this.Ring == ring) {\n\t\t\t//interring bewegung\n\t\t\t\t//Bedingung1: Abstand=1\n\t\t\t\tif(Math.abs(X-a)+Math.abs(Y-b) == 1)return true;\n\t\t}\n\t\t//extraring bewegung\n\t\tif(this.Ring != ring) { \n\t\t\tif(Math.abs(Ring-ring) == 1 && X==a && Y==b)return true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean boulderObstructed(List<Entity> entities) {\r\n for (Entity e : entities) {\r\n if (e instanceof Exit) return true;\r\n if (e instanceof Door) return true;\r\n if (e instanceof Wall) return true;\r\n }\r\n return false;\r\n }", "private Set<Cell> findShortestRoad(Set<Cell> b, Land land) {\n\t\tfor (Cell cell : b) {\n\t\t\tif (isNextToRoad(cell.i, cell.j, land))\n\t\t\t\treturn new HashSet<Cell>();\n\t\t}\n\t\t\n\t\tSet<Cell> output = new HashSet<Cell>();\n\t\tboolean[][] checked = new boolean[land.side][land.side];\n\t\tQueue<Cell> queue = new LinkedList<Cell>();\n\t\t// add border cells that don't have a road currently\n\t\t// dummy cell to serve as road connector to perimeter cells\n\t\tCell source = new Cell(Integer.MAX_VALUE, Integer.MAX_VALUE);\n\t\tfor (int z = 0; z < land.side; z++) {\n\t\t\tif (b.contains(new Cell(0, z)) || b.contains(new Cell(z, 0)) || b.contains(new Cell(land.side - 1, z))\n\t\t\t\t\t|| b.contains(new Cell(z, land.side - 1)))\n\t\t\t\treturn output;\n\t\t\tif (land.unoccupied(0, z))\n\t\t\t\tqueue.add(new Cell(0, z, source));\n\t\t\tif (land.unoccupied(z, 0))\n\t\t\t\tqueue.add(new Cell(z, 0, source));\n\t\t\tif (land.unoccupied(z, land.side - 1))\n\t\t\t\tqueue.add(new Cell(z, land.side - 1, source));\n\t\t\tif (land.unoccupied(land.side - 1, z))\n\t\t\t\tqueue.add(new Cell(land.side - 1, z, source));\n\t\t}\n\t\t// add cells adjacent to current road cells\n\t\tfor (Cell p : road_cells) {\n\t\t\tfor (Cell q : p.neighbors()) {\n\t\t\t\tif (!road_cells.contains(q) && land.unoccupied(q) && !b.contains(q))\n\t\t\t\t\tqueue.add(new Cell(q.i, q.j, p)); // use tail field of cell\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to keep track of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// previous road cell\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// during the search\n\t\t\t}\n\t\t}\n\t\twhile (!queue.isEmpty()) {\n\t\t\tCell p = queue.remove();\n\t\t\tchecked[p.i][p.j] = true;\n\t\t\tfor (Cell x : p.neighbors()) {\n\t\t\t\tif (b.contains(x)) { // trace back through search tree to find\n\t\t\t\t\t\t\t\t\t\t// path\n\t\t\t\t\tCell tail = p;\n\t\t\t\t\twhile (!b.contains(tail) && !road_cells.contains(tail) && !tail.equals(source)) {\n\t\t\t\t\t\toutput.add(new Cell(tail.i, tail.j));\n\t\t\t\t\t\ttail = tail.previous;\n\t\t\t\t\t}\n\t\t\t\t\tif (!output.isEmpty())\n\t\t\t\t\t\treturn output;\n\t\t\t\t} else if (!checked[x.i][x.j] && land.unoccupied(x.i, x.j)) {\n\t\t\t\t\tx.previous = p;\n\t\t\t\t\tqueue.add(x);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tif (output.isEmpty() && queue.isEmpty())\n\t\t\treturn null;\n\t\telse\n\t\t\treturn output;\n\t}", "private void collision(GameObjectContainer<GameObject> object) {\n \tGameObject renderObject = null;\r\n\t\tfor (int i = 0; i < object.getSize(); i++) {\r\n\t\t\trenderObject = object.iterator().next();\r\n\r\n\t\t\tif (renderObject.getType() == \"BLOCK\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(renderObject.getBoundsInParent())) {\r\n\t\t\t\t\tSystem.out.println(\"intersected\");\r\n\t\t\t\t\tthis.setTranslateY(renderObject.getTranslateY() - renderObject.getHeight());\r\n\t\t\t\t\tfalling = false;\r\n\t\t\t\t\tjump = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfalling = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (renderObject.getType() == \"NURSE\") {\r\n\t\t\t\tif (this.getBoundsInParent().intersects(renderObject.getBoundsInParent())) {\r\n\t\t\t\t\tSystem.out.println(\"nurse\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}else {\r\n\t\t\t\tfalling = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n }", "public Hit intersectsRay(Ray ray) {\n\t\tVector3D dst = Vector3D.sub(ray.b, pos);\n\t\tfloat B = dst.dot(ray.d);\n\t\tfloat C = dst.dot(dst) - radius2;\n\t\tfloat D = B*B - C;\n\t\tfloat t = (float) (-B - Math.sqrt(D));\n\t\tif (!(t > 0)) return null; // escape case: no collision or outside fov\n\t\tVector3D hitPos = Vector3D.add(ray.b, Vector3D.mult(ray.d, t));\n\t\tVector3D n = getNormal(hitPos);\n\t\treturn new Hit(this, t, hitPos, n);\n\t}", "public boolean hitObject(BasicObject oppose){\n if (oppose.classOfObejct != classOfObejct){\n if (abs(posX - oppose.posX) < (wid / 2 + oppose.wid/2) && abs(posY - oppose.posY) < (hei / 2 + oppose.hei/2)){\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "@Test\n public void findClosestPointTest() {\n Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100));\n\n List<Point3D> list = new LinkedList<Point3D>();\n list.add(new Point3D(1, 1, -100));\n list.add(new Point3D(-1, 1, -99));\n list.add(new Point3D(0, 2, -10));\n list.add(new Point3D(0.5, 0, -100));\n\n assertEquals(list.get(2), ray.findClosestPoint(list));\n\n // =============== Boundary Values Tests ==================\n //TC01: the list is empty\n List<Point3D> list2 = null;\n assertNull(\"try again\",ray.findClosestPoint(list2));\n\n //TC11: the closest point is the first in the list\n List<Point3D> list3 = new LinkedList<Point3D>();\n list3.add(new Point3D(0, 2, -10));\n list3.add(new Point3D(-1, 1, -99));\n list3.add(new Point3D(1, 1, -100));\n list3.add(new Point3D(0.5, 0, -100));\n assertEquals(list3.get(0), ray.findClosestPoint(list3));\n\n //TC12: the closest point is the last in the list\n List<Point3D> list4 = new LinkedList<Point3D>();\n list4.add(new Point3D(1, 1, -100));\n list4.add(new Point3D(0.5, 0, -100));\n list4.add(new Point3D(-1, 1, -99));\n list4.add(new Point3D(0, 2, -10));\n assertEquals(list4.get(3), ray.findClosestPoint(list4));\n\n }", "@Test\n public void findClosestGeoPointTest() {\n Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100));\n Geometry geo = new Sphere(new Point3D(1,1,1),2);\n\n List<Intersectable.GeoPoint> list = new LinkedList<Intersectable.GeoPoint>();\n list.add(new GeoPoint(geo,new Point3D(1, 1, -100)));\n list.add(new GeoPoint(geo,new Point3D(-1, 1, -99)));\n list.add(new GeoPoint(geo,new Point3D(0, 2, -10)));\n list.add(new GeoPoint(geo,new Point3D(0.5, 0, -100)));\n\n\n\n assertEquals(list.get(2), ray.findClosestGeoPoint(list));\n\n // =============== Boundary Values Tests ==================\n //TC01: the list is empty\n List<GeoPoint> list2 = null;\n assertNull(\"try again\",ray.findClosestGeoPoint(list2));\n\n //TC11: the closest point is the first in the list\n List<GeoPoint> list3 = new LinkedList<GeoPoint>();\n list3.add(new GeoPoint(geo,new Point3D(0, 2, -10)));\n list3.add(new GeoPoint(geo,new Point3D(-1, 1, -99)));\n list3.add(new GeoPoint(geo,new Point3D(1, 1, -100)));\n list3.add(new GeoPoint(geo,new Point3D(0.5, 0, -100)));\n\n assertEquals(list3.get(0), ray.findClosestGeoPoint(list3));\n\n //TC12: the closest point is the last in the list\n List<GeoPoint> list4 = new LinkedList<GeoPoint>();\n list4.add(new GeoPoint(geo,new Point3D(1, 1, -100)));\n list4.add(new GeoPoint(geo,new Point3D(0.5, 0, -100)));\n list4.add(new GeoPoint(geo,new Point3D(-1, 1, -99)));\n list4.add(new GeoPoint(geo,new Point3D(0, 2, -10)));\n\n assertEquals(list4.get(3), ray.findClosestGeoPoint(list4));\n }", "private void dist2Pos3Beacons()\n {\n //Betrachtung bei 3 Empfaengern\n double dist12 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[1][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[1][1], 2));\n double dist13 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[2][1], 2));\n double dist23 = Math.sqrt(Math.pow(posReceiver[1][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[1][1] - posReceiver[2][1], 2));\n\n boolean temp12 = Math.abs(radius[0] - radius[1]) > dist12;\n boolean temp23 = Math.abs(radius[1] - radius[2]) > dist23;\n boolean temp13 = Math.abs(radius[0] - radius[2]) > dist13;\n\n //Zwei Kreise innerhalb eines anderen Kreises\n if ((temp12 && temp23) || (temp12 && temp13) || (temp23 && temp13))\n {\n double f0 = (dist12 / radius[0] + dist13 / radius[0]) / 2;\n double f1 = (dist12 / radius[1] + dist23 / radius[1]) / 2;\n double f2 = (dist12 / radius[2] + dist13 / radius[2]) / 2;\n\n radius[0] = radius[0] * f0;\n radius[1] = radius[1] * f1;\n radius[2] = radius[2] * f2;\n }\n //Kreis 2 in Kreis 1\n if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[0] > radius[1]))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[0],radius[1],radius[2]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kreis 1 in Kreis 2\n else if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[1] > radius[0]))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[1],radius[0],radius[2]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 1\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[0] > radius[2]))//Kreis 3 in 1\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[2],radius[0],radius[1]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 1 in Kreis 3\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[2] > radius[0]))//Kreis 1 in 3\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[0],radius[2],radius[1]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 2\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[1] > radius[2]))//Kreis 3 in 2\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[2],radius[1],radius[0]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 2 in Kreis 3\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[2] > radius[1]))//Kreis 2 ind 3\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[1],radius[2],radius[0]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kein Kreis liegt innerhalb eines Anderen\n else\n {\n\n if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double p1[] = new double[2];\t//x\n double p2[] = new double[2];\t//y\n\n double norm12 = norm(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1]);\n // Verbindungspunkte Kreis 1 und 2\n p1[0] = posReceiver[0][0] + (radius[0]/ norm12) * (posReceiver[1][0] - posReceiver[0][0]); //x-P1\n p1[1] = posReceiver[0][1] + (radius[0]/ norm12) * (posReceiver[1][1] - posReceiver[0][1]); //y-P1\n p2[0] = posReceiver[1][0] + (radius[1]/ norm12) * (posReceiver[0][0] - posReceiver[1][0]); //x-P2\n p2[1] = posReceiver[1][1] + (radius[1]/ norm12) * (posReceiver[0][1] - posReceiver[1][1]); //y-P2\n double m12[] = new double[2];\n m12[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m12[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm23 = norm(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1]);\n // Verbindungspunkte Kreis 2 und 3\n p1[0] = posReceiver[1][0] + (radius[1]/ norm23) * (posReceiver[2][0] - posReceiver[1][0]); //x-P1\n p1[1] = posReceiver[1][1] + (radius[1]/ norm23) * (posReceiver[2][1] - posReceiver[1][1]); //y-P1\n p2[0] = posReceiver[2][0] + (radius[2]/ norm23) * (posReceiver[1][0] - posReceiver[2][0]); //x-P2\n p2[1] = posReceiver[2][1] + (radius[2]/ norm23) * (posReceiver[1][1] - posReceiver[2][1]); //y-P2\n double m23[] = new double[2];\n m23[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m23[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm31 = norm(posReceiver[2][0], posReceiver[2][1], posReceiver[0][0], posReceiver[0][1]);\n // Verbindungspunkte Kreis 3 und 1\n p1[0] = posReceiver[2][0] + (radius[2]/ norm31) * (posReceiver[0][0] - posReceiver[2][0]); //x-P1\n p1[1] = posReceiver[2][1] + (radius[2]/ norm31) * (posReceiver[0][1] - posReceiver[2][1]); //y-P1\n p2[0] = posReceiver[0][0] + (radius[0]/ norm31) * (posReceiver[2][0] - posReceiver[0][0]); //x-P2\n p2[1] = posReceiver[0][1] + (radius[0]/ norm31) * (posReceiver[2][1] - posReceiver[0][1]); //y-P2\n double m31[] = new double[2];\n m31[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m31[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n // Norm der drei Punkte berechnen\n double a_p = Math.sqrt((m12[0] * m12[0]) + (m12[1] * m12[1]));\n double b_p = Math.sqrt((m23[0] * m23[0]) + (m23[1] * m23[1]));\n double c_p = Math.sqrt((m31[0] * m31[0]) + (m31[1] * m31[1]));\n\n double denominator = 2 * (((m12[0] * m23[1]) - (m12[1] * m23[0])) + (m23[0] * m31[1] - m23[1] * m31[0]) + (m31[0] * m12[1] - m31[1] * m12[0]));\n xPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*(-m12[1]) + (c_p * c_p - a_p * a_p)* (-m23[1]) + (a_p * a_p - b_p * b_p)*(-m31[1])));\n yPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*m12[0] + (c_p * c_p - a_p * a_p)* m23[0] + (a_p * a_p - b_p * b_p)*m31[0]));\n errRad_func = norm(xPos_func, yPos_func, m12[0], m12[1]);\n\n }\n // Kreis 1 und 3 schneiden sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc2Circle(posRec,rad);\n }\n //Kreis 2 und 3 schneide sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc2Circle(posRec,rad);\n }\n //Kreis 1 und 2 schneiden sich\n else if ((dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc2Circle(posRec,rad);\n }\n else if ((dist12 > (radius[0] + radius[1])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc1Circle(posRec,rad);\n }\n else if ((dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc1Circle(posRec,rad);\n }\n else if ((dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc1Circle(posRec,rad);\n }\n else\n {\n double x1 = 0, y1 = 0, x2 = 0, y2 = 0, x3 = 0, y3 = 0;\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n double pos12[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1], radius[0], radius[1]);\n double pos23[][] = circlepoints2(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1], radius[1], radius[2]);\n double pos13[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[2][0], posReceiver[2][1], radius[0], radius[2]);\n\n if(radius[0] >= norm(pos23[0][0],pos23[0][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[0][0];\n y1 = pos23[0][1];\n }\n else if(radius[0] >= norm(pos23[1][0], pos23[1][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[1][0];\n y1 = pos23[1][1];\n }\n\n if(radius[1] >= norm(pos13[0][0], pos13[0][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[0][0];\n y2 = pos13[0][1];\n }\n else if(radius[1] >= norm(pos13[1][0], pos13[1][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[1][0];\n y2 = pos13[1][1];\n }\n\n if(radius[2] >= norm(pos12[0][0], pos12[0][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[0][0];\n y3 = pos12[0][1];\n }\n else if(radius[2] >= norm(pos12[1][0], pos12[1][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[1][0];\n y3 = pos12[1][1];\n }\n\n double tempD = x1 * y2 + x2 * y3 + x3 * y1 - x1 * y3 - x2 * y1 - x3 * y2;\n\n xPos_func = (0.5*(\n -y1*(y2*y2)\n +y1*(y3*y3)\n -y1*(x2*x2)\n +y1*(x3*x3)\n\n +y2*(y1*y1)\n -y2*(y3*y3)\n +y2*(x1*x1)\n -y2*(x3*x3)\n\n -y3*(y1*y1)\n +y3*(y2*y2)\n -y3*(x1*x1)\n +y3*(x2*x2)\n ))/ tempD;\n\n yPos_func = (0.5*(\n +x1*(x2*x2)\n -x1*(x3*x3)\n +x1*(y2*y2)\n -x1*(y3*y3)\n\n -x2*(x1*x1)\n +x2*(x3*x3)\n -x2*(y1*y1)\n +x2*(y3*y3)\n\n +x3*(x1*x1)\n -x3*(x2*x2)\n +x3*(y1*y1)\n -x3*(y2*y2)\n ))/ tempD;\n\n errRad_func = norm(x1, y1, xPos_func, yPos_func);\n }\n }\n }", "void collisions(){\n float tmp;\n \n if (dist(redX, redY, yelX, yelY) < 30 ){ // Red and Yellow\n tmp = yelDX; yelDX = redDX; redDX = tmp;\n tmp= yelDY; yelDY = redDY; redDY = tmp;\n }\n \n if (dist(redX, redY, bluX, bluY) < 30){ // Red and Blue\n tmp = bluDX; bluDX = redDX; redDX = tmp;\n tmp = bluDY; bluDY = redDY; redDY = tmp;\n }\n \n if (dist(bluX, bluY, yelX, yelY) < 30){ // Blue and Yellow\n tmp = yelDX; yelDX = bluDX; bluDX = tmp;\n tmp = yelDY; yelDY = bluDY; bluDY = tmp;\n }\n if (dist(cueX, cueY, redX, redY) < 30){ // Cue and Red\n tmp = redDX; redDX = cueDX; cueDX = tmp;\n tmp = redDY; redDY = cueDY; cueDY = tmp;\n }\n if (dist(cueX, cueY, bluX, bluY) < 30){ // Cue and Blue\n tmp = bluDX; bluDX = cueDX; cueDX = tmp;\n tmp = bluDY; bluDY = cueDY; cueDY = tmp;\n }\n if (dist(cueX, cueY, yelX, yelY) < 30){ // Cue and Yellow\n tmp = yelDX; yelDX = cueDX; cueDX = tmp;\n tmp = yelDY; yelDY = cueDY; cueDY = tmp;\n }\n}", "@Override\n // public Map<Geometry, List<Point3D>> findIntersections(Ray myRay) {\n public List<Point3D> FindIntersections(Ray myRay) {\n\n List<Point3D> geometryListMap = new ArrayList<>();\n List<Point3D> listOfIntersections = new ArrayList<Point3D>();\n\n // the bottom base of the cylinder\n Plane plane1 = new Plane(orientation.getPOO(), orientation.getDirection());\n\n // the top base of the cylinder\n Plane plane2 = new Plane(top, orientation.getDirection());\n\n List<Point3D> temp1 = plane1.FindIntersections(myRay);\n\n List<Point3D> temp2 = plane2.FindIntersections(myRay);\n\n // removing all points that beyond the radius\n if (temp1 != null)\n for (Point3D p1 : temp1) {\n if (new Vector(Point3D.substract(orientation.getPOO(), p1)).length() <= _radius && p1 != null)\n listOfIntersections.add(p1);\n\n }\n\n if (temp2 != null)\n for (Point3D p2 : temp2) {\n if (new Vector(Point3D.substract(orientation.getPOO(), p2)).length() <= _radius && p2 != null)\n listOfIntersections.add(p2);\n\n }\n\n // using the infinity cylinder to find all the intersections in the body of the limited cylinder\n geometryListMap = super.FindIntersections(myRay);\n\n for (Point3D p : geometryListMap) {\n if (isOnCylinder(p))\n listOfIntersections.add(p);\n\n }\n if (listOfIntersections.isEmpty())\n return null;\n //geometryListMap.put(this, listOfIntersections);\n return geometryListMap;\n }", "public static double wallSmoothing(Rectangle2D.Double field, double bfWidth,\n double bfHeight, Point2D.Double startLocation, double startAngleRadians,\n int orientation, double wallStick) {\n\n/*\n double angle = startAngle;\n _lastWallSmoothAway = false;\n while (!field.contains(x + Math.sin(Math.toRadians(angle))*WALL_STICK,\n y+Math.cos(Math.toRadians(angle))*WALL_STICK)) {\n angle += orientation*smoothNormal*7.0;\n if (smoothNormal == -1) { _lastWallSmoothAway = true; }\n }\n\n return angle;\n*/\n // Trying to do almost exactly the equivalent of the above in more\n // code but less CPU time. The above needs a low increment to work\n // perfectly smoothly, which results in very slow execution.\n //\n // NOTE: The two algorithms can give slightly different results,\n // but that is mainly because the iterative one never tests a\n // very specific angle in a corner that would turn up \"in bounds\";\n // if it increased the angle var by (1/INFINITY), they'd be the\n // same (as far as I can tell.)\n\n double angle = startAngleRadians;\n double wallDistanceX = Math.min(startLocation.x - 18,\n bfWidth - startLocation.x - 18);\n double wallDistanceY = Math.min(startLocation.y - 18,\n bfHeight - startLocation.y - 18);\n\n if (wallDistanceX > wallStick && wallDistanceY > wallStick) {\n return startAngleRadians;\n }\n\n double testX = startLocation.x + (Math.sin(angle) * wallStick);\n double testY = startLocation.y + (Math.cos(angle) * wallStick);\n double testDistanceX = Math.min(testX - 18, bfWidth - testX - 18);\n double testDistanceY = Math.min(testY - 18, bfHeight - testY - 18);\n\n double adjacent = 0;\n int g = 0;\n\n while (!field.contains(testX, testY) && g++ < 25) {\n if (angle < 0) {\n angle += (2 * Math.PI);\n }\n if (testDistanceY < 0 && testDistanceY < testDistanceX) {\n // wall smooth North or South wall\n angle = ((int) ((angle + (Math.PI / 2)) / Math.PI)) * Math.PI;\n adjacent = Math.abs(wallDistanceY);\n } else if (testDistanceX < 0 && testDistanceX <= testDistanceY) {\n // wall smooth East or West wall\n angle = (((int) (angle / Math.PI)) * Math.PI) + (Math.PI / 2);\n adjacent = Math.abs(wallDistanceX);\n }\n\n angle += orientation *\n (Math.abs(Math.acos(adjacent / wallStick)) + 0.0005);\n\n testX = startLocation.x + (Math.sin(angle) * wallStick);\n testY = startLocation.y + (Math.cos(angle) * wallStick);\n testDistanceX = Math.min(testX - 18, bfWidth - testX - 18);\n testDistanceY = Math.min(testY - 18, bfHeight - testY - 18);\n }\n\n return angle;\n }", "public boolean isBlocked(java.util.List<Ball> myObjects)\n {\n boolean _isBlocked = false;\n for(Ball that : myObjects)\n {\n // beruehrt eines der Objekte das OutputHole\n if(this.touches(that))\n {\n // WENN ja DANN ist OutPutHole blockiert\n _isBlocked = _isBlocked || true;\n }\n }\n\n return _isBlocked;\n }", "public void plan()\n {\n turnRight();\n while(isFrontClear())\n {\n while(isBrainHere()) {\n takeBrain();\n }\n move();\n }\n \n if (isBrainHere()) {\n takeBrain();\n }\n \n turnRight();\n if (!isFrontClear()) {\n turnAround();\n }\n \n goCenter();\n \n turnAround();\n move();\n win();\n }", "public static void main(String[] args) {\r\n\tOlympicRings_Threaded ort = new OlympicRings_Threaded();\r\n\tort.setup();\r\n//\tRobot rob = new Robot(600,500);\r\n//\trob.hide();\r\n//\trob.setPenColor(Color.BLUE);\r\n//\tRobot rob1 = new Robot(700, 500);\r\n//\trob1.hide();\r\n//\trob1.setPenColor(Color.BLACK);\r\n//\tRobot rob2 = new Robot(800, 500);\r\n//\trob2.hide();\r\n//\trob2.setPenColor(Color.RED);\r\n//\tRobot rob3 = new Robot(650, 550);\r\n//\trob3.hide();\r\n//\trob3.setPenColor(Color.YELLOW);\r\n//\tRobot rob4 = new Robot(750,550);\r\n//\trob4.hide();\r\n//\trob4.setPenColor(Color.GREEN);\r\n//\trob.setSpeed(1000000);\r\n//\trob1.setSpeed(1000000);\r\n//\trob2.setSpeed(1000000);\r\n//\trob3.setSpeed(1000000);\r\n//\trob4.setSpeed(1000000);\r\n//\t\r\n//\t\r\n//\trob.penDown();\r\n//\trob1.penDown();\r\n//\trob2.penDown();\r\n//\trob3.penDown();\r\n//\trob4.penDown();\r\n//\t\r\n//\t\r\n//\tfor (int i = 0; i < 360; i++) {\r\n//\trob.move(1);\r\n//\trob.turn(1);\r\n//\t\t\r\n//\trob1.move(1);\r\n//\trob1.turn(1);\r\n//\t\r\n//\trob2.move(1);\r\n//\trob2.turn(1);\r\n//\t\r\n//\trob3.move(1);\r\n//\trob3.turn(1);\r\n//\t\r\n//\trob4.move(1);\r\n//\trob4.turn(1);\r\n//\t\r\n//\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n//\trob1.move(400);\r\n//\trob1.turn(90);\r\n//\trob1.move(400);\r\n//\trob2.move(400);\r\n//\trob2.turn(90);\r\n//\trob2.move(400);\r\n//\trob3.move(400);\r\n//\trob3.turn(90);\r\n//\trob3.move(400);\r\n//\trob4.move(400);\r\n//\trob4.turn(90);\r\n//\trob4.move(400);\r\n//\t\r\n//\trob1.moveTo(150, 700);\r\n//\trob2.moveTo(550, 700);\r\n//\trob3.moveTo(950, 700);\r\n//\trob4.moveTo(1350, 700);\r\n//\t\r\n//\t\r\n//\t\r\n//\t\r\n//\t\r\n//Thread r1 = new Thread(()->rob1.move(400));\r\n//\tThread r2 = new Thread(()->rob2.move(400));\r\n//\tThread r3 = new Thread(()->rob3.move(400));\r\n//\tThread r4 = new Thread(()->rob4.move(400));\r\n//\t\r\n//\tr1.start();\r\n//\tr2.start();\r\n//\tr3.start();\r\n//\tr4.start();\r\n\r\n}", "public abstract void process(Ray ray, Stack<Ray> bifurcations);", "void evt_BranchSelectedObjects()\r\n {\r\n short num;\r\n CObject pHO, pHOPrev;\r\n int oil;\r\n CObjInfo oilPtr;\r\n\r\n for (oil = 0; oil < rhPtr.rhMaxOI; oil++)\r\n {\r\n oilPtr = rhPtr.rhOiList[oil];\r\n if (oilPtr.oilEventCountOR == rh4EventCountOR)\r\n {\r\n oilPtr.oilEventCount = rh2EventCount;\r\n\r\n num = oilPtr.oilObject;\r\n pHOPrev = null;\r\n while (num >= 0)\r\n {\r\n pHO = rhPtr.rhObjectList[num];\r\n if (pHO.hoSelectedInOR != 0)\r\n {\r\n if (pHOPrev != null)\r\n {\r\n pHOPrev.hoNextSelected = num;\r\n }\r\n else\r\n {\r\n oilPtr.oilListSelected = num;\r\n }\r\n pHO.hoNextSelected = -1;\r\n pHOPrev = pHO;\r\n }\r\n num = pHO.hoNumNext;\r\n }\r\n }\r\n }\r\n }" ]
[ "0.5774905", "0.57693714", "0.574738", "0.55758905", "0.55690217", "0.550281", "0.54577994", "0.5432201", "0.54316735", "0.53845215", "0.5360398", "0.5356502", "0.5306001", "0.52698463", "0.52459145", "0.52346146", "0.5232867", "0.52230406", "0.5219159", "0.52159286", "0.5200571", "0.5189121", "0.51883626", "0.5167751", "0.51638615", "0.5155534", "0.5139182", "0.51277137", "0.51178914", "0.5107002", "0.50760835", "0.50647074", "0.5058515", "0.5020364", "0.49988446", "0.49785107", "0.4976979", "0.49726757", "0.4971792", "0.49648583", "0.4958307", "0.49449262", "0.49261326", "0.48980358", "0.48709804", "0.4862264", "0.48483813", "0.48440325", "0.48392743", "0.48392028", "0.48374587", "0.48318073", "0.48261592", "0.4821496", "0.48017508", "0.4801449", "0.48001197", "0.4797113", "0.47952995", "0.47952995", "0.47951475", "0.47903362", "0.47868794", "0.47850457", "0.47849384", "0.4784657", "0.47832698", "0.47745693", "0.47741324", "0.47727305", "0.47726548", "0.47610435", "0.4756231", "0.47557056", "0.4749819", "0.473331", "0.47277918", "0.47270894", "0.4725165", "0.47249013", "0.47227547", "0.47220683", "0.4714884", "0.47134933", "0.47130835", "0.47115368", "0.47086892", "0.4706107", "0.47032085", "0.47018108", "0.47009686", "0.46991974", "0.46974668", "0.46969837", "0.4696855", "0.46948725", "0.469111", "0.4690668", "0.46843663", "0.4680721" ]
0.5858326
0
a StanzaRelay receiving stanzas which are targeted to serverlocal JIDs
public void setInternalRelay(StanzaRelay internalRelay) { this.internalRelay = internalRelay; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ChatWithServer.Relay getChatWithServerRelay();", "public void setStunServer(String server);", "public static void serverBroadcast(JSONObject obj,Socket source,boolean f){\n\t\t\n\t\tfor(Connection con:Control.getInstance().getConnections()){\n\t\t\tString conAddr = con.getSocket().getRemoteSocketAddress().toString();\n\t\t\tif(f){\n\t\t\t\tif(LocalserverStorage.getInstance().getAuthServers().contains(conAddr)){//all linked servers\n\t\t\t\t\tcon.writeMsg(obj.toJSONString());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tString sourceAddr = source.getRemoteSocketAddress().toString();\n\t\t\t\tif(!sourceAddr.equals(conAddr)){//not to source\n\t\t\t\t\tif(LocalserverStorage.getInstance().getAuthServers().contains(conAddr)){//not to source\n\t\t\t\t\t\tcon.writeMsg(obj.toJSONString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private UDPSender(final URI serverURI) {\n\t\tsuper(serverURI);\n\t\t\n\t\t\t\t\n\t\t//InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory());\n\t\tchannelStateListener.addChannelStateAware(this);\n\t\tloggingHandler = new LoggingHandler(InternalLogLevel.ERROR, true);\t\t\n\t\tchannelFactory = new NioDatagramChannelFactory(workerPool);\n\t\tbstrap = new ConnectionlessBootstrap(channelFactory);\n\t\tbstrap.setPipelineFactory(this);\n\t\tbstrap.setOption(\"broadcast\", true);\n\t\tbstrap.setOption(\"localAddress\", new InetSocketAddress(0));\n\t\tbstrap.setOption(\"remoteAddress\", new InetSocketAddress(serverURI.getHost(), serverURI.getPort()));\n\t\tbstrap.setOption(\"receiveBufferSizePredictorFactory\", new FixedReceiveBufferSizePredictorFactory(2048));\n\t\t\n\t\tlisteningSocketAddress = new InetSocketAddress(\"0.0.0.0\", 0);\n\t\t//listeningSocketAddress = new InetSocketAddress(\"127.0.0.1\", 0);\n\t\t\t\n\t\t//senderChannel = (NioDatagramChannel) channelFactory.newChannel(getPipeline());\n\t\tsenderChannel = bstrap.bind();\n\t\tcloseGroup.add(senderChannel);\n\t\tlog(\"Listening on [\" + senderChannel.getLocalAddress()+ \"]\");\t\t\t\t\t\n\t\t\n\t\t\n//\t\tsenderChannel.bind().addListener(new ChannelFutureListener() {\n//\t\t\tpublic void operationComplete(ChannelFuture f) throws Exception {\n//\t\t\t\tif(f.isSuccess()) {\n//\t\t\t\t\tlog(\"Listening on [\" + f.getChannel().getLocalAddress()+ \"]\");\t\t\t\t\t\n//\t\t\t\t} else {\n//\t\t\t\t\tlog(\"Failed to start listener. Stack trace follows\");\n//\t\t\t\t\tf.getCause().printStackTrace(System.err);\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\tsenderChannel.getConfig().setBufferFactory(new DirectChannelBufferFactory());\n//\t\tsenderChannel.connect(socketAddress).addListener(new ChannelFutureListener() {\n//\t\t\t@Override\n//\t\t\tpublic void operationComplete(ChannelFuture future) throws Exception {\n//\t\t\t\tconnected.set(true);\t\n//\t\t\t\tsentryState.setState(SentryState.CALLBACK);\n//\t\t\t}\n//\t\t});\n\t\t\n\t\t\n\t\t//socketAddress = new InetSocketAddress(\"239.192.74.66\", 25826);\n\t\tsendHello();\n\t}", "@Override\n public void beforeAll(ExtensionContext context) {\n localServer = RSocketFactory.receive()\n .acceptor((setupPayload, rSocket) -> Mono.just(new SimpleResponderImpl(setupPayload, rSocket)))\n .transport(LocalServerTransport.create(\"test\"))\n .start()\n .block();\n }", "public void startInbound();", "@Override\r\n\tpublic void receiveItems(Stanza stanza, String node, List<String> items) {\n\t\t\r\n\t}", "public void run() {\n JabberPacket packet=null;\n\n do {\n try {\n packet=queue.pull();\n\n if (packet!=null) {\n PacketHandler h=null;\n if (((JabberSkypeSettings) Main.Settings()).getDebug()) {\n \tSystem.out.println(\"Client: \" + packet.generateXML());\n }\n String e=packet.getElement();\n if (e!=null) {\n String key=null;\n\n if (e.equals(\"iq\")) {\n JabberPacket pQuery=packet.getFirstChild(\"query\");\n\n if (pQuery!=null) {\n key=pQuery.getAttribute(\"xmlns\");\n } else {\n \tJabberPacket pVcard=packet.getFirstChild(\"vcard\");\n \tif (pVcard!= null) {\n \t\tkey=pVcard.getAttribute(\"xmlns\");\n \t\t//need to do difference between setting vcard, and getting it for a user\n \t}\n }\n } else\n key=e;\n\n if (key!=null) {\n h=(PacketHandler)mHandlers.get(key);\n\n if (h==null)\n h=getDefaultHandler();\n\n h.processPacket(packet);\n } //key!=null\n } //e!=null\n } //packet!=null\n } //try\n catch (Exception e) {\n server.getLogger().severe(\"Caught exception: \"+e.getMessage());\n }\n } while (packet!=null && server.getRunning());\n }", "public String getStunServer();", "private void processPacket(DatagramPacket packet) {\n String data = new String(packet.getData());\n if (data.startsWith(\"/c/\")) {\n int ID = UniqueIdentifier.getIdentifier();\n clients.add(new ServerClient(data.split(\"/c/|/e/\")[1], packet.getAddress(), packet.getPort(), ID));\n System.out.println(\"Client connected with the name: '\" + data.split(\"/c/|/e/\")[1] + \"' @ \" + packet.getAddress() + \":\" + packet.getPort() + \" and is now using the ID: \" + ID);\n send((\"/c/\" + ID + \"/e/\").getBytes(), packet.getAddress(), packet.getPort());\n } else if (data.startsWith(\"/d/\")) {\n disconnect(Integer.parseInt(data.split(\"/d/|/e/\")[1]), true);\n } else if (data.startsWith(\"/sa/\")) {\n sendToAll((\"/m/\" + data.split(\"/sa/|/e/\")[1] + \"/e/\").getBytes());\n } else if (data.startsWith(\"/s/\")) { //TODO - FIX INDIVIDUAL PACKET SENDING\n String decodedData = data.split(\"/s/|/e/\")[1];\n String targetID = decodedData;\n targetID = targetID.substring(targetID.indexOf(\"&\") + 1);\n targetID = targetID.substring(0, targetID.indexOf(\"&\"));\n int id = Integer.parseInt(targetID);\n decodedData = decodedData.replace(\"&\" + id + \"&\", \"\");\n ServerClient targetClient = null;\n for (ServerClient item : clients) {\n if (item.getID() == id) {\n targetClient = item;\n break;\n }\n }\n assert targetClient != null;\n send(decodedData.getBytes(), targetClient.getAddress(), targetClient.getPort());\n } else if (data.startsWith(\"/p/\")) {\n clientResponse.add(Integer.parseInt(data.split(\"/p/|/e/\")[1]));\n } else if (data.startsWith(\"/dp/\")) {\n sendToAll(data.substring(0, data.length() - 3).getBytes());\n } else {\n System.out.println(packet.getAddress() + \":\" + packet.getPort() + \" sent an unknown packet: \" + data);\n }\n }", "private void requestServerId() {\n connection.startClient(lbInfo.getIp(), lbInfo.getPort());\n System.out.println(\"Connected!\");\n connection.sendMessage(connectionInfo);\n }", "@Override\r\n\tpublic void receiveResult(Stanza stanza, Object payload) {\n\t\t\r\n\t}", "@Override\n\tpublic void StartListening()\n\t{\n\t\t\n\t}", "public void setExternalRelay(StanzaRelay externalRelay) {\n this.externalRelay = externalRelay;\n }", "public static void main(String[] args) {\n\t\tClientResource resource = new ClientResource(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"http://shironambd.com/api/v1/receiver/?access_key=529a2d308333d14178f5c54d&format=json\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"&mapId=0\");\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tRepresentation representation = resource.get();\r\n\t\t\tresponse = representation.getText();\r\n\t\t} catch (ResourceException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tList<Receiver> receivers = new ArrayList<Receiver>();\r\n\t\ttry {\r\n\t\t\tJsonElement jelement = new JsonParser().parse(response);\r\n\t\t\tJsonObject jobject = jelement.getAsJsonObject();\r\n\t\t\tJsonArray jarray = jobject.getAsJsonArray(\"objects\");\r\n\r\n\t\t\tint receiverId = 0;\r\n\r\n\t\t\tint arrayLength = jarray.size();\r\n\t\t\tfor (int i = 0; i < arrayLength; i++) {\r\n\t\t\t\tjobject = jarray.get(i).getAsJsonObject();\r\n\t\t\t\treceiverId = Integer.parseInt(jobject.get(\"receiverId\").toString().trim());\r\n\t\t\t\tint x = jobject.get(\"x\").getAsInt();\r\n\t\t\t\tint y = jobject.get(\"y\").getAsInt();\r\n\t\t\t\tint mapId = jobject.get(\"mapId\").getAsInt();\r\n\t\t\t\tReceiver receiver = new Receiver(receiverId);\r\n\t\t\t\treceiver.setxPos(x);\r\n\t\t\t\treceiver.setyPos(y);\r\n\t\t\t\treceivers.add(receiver);\r\n\t\t\t\tSystem.out.println(receiver);\r\n\t\t\t\tSystem.out.println(mapId);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public interface Transport {\n\n /**\n * This method returns id of the current transport\n * @return\n */\n String id();\n\n /**\n * This methos returns Id of the upstream node\n * @return\n */\n String getUpstreamId();\n\n /**\n * This method returns random\n *\n * @param id\n * @param exclude\n * @return\n */\n String getRandomDownstreamFrom(String id, String exclude);\n\n /**\n * This method returns consumer that accepts messages for delivery\n * @return\n */\n Consumer<VoidMessage> outgoingConsumer();\n\n /**\n * This method returns flow of messages for parameter server\n * @return\n */\n Publisher<INDArrayMessage> incomingPublisher();\n\n /**\n * This method starts this Transport instance\n */\n void launch();\n\n /**\n * This method will start this Transport instance\n */\n void launchAsMaster();\n\n /**\n * This method shuts down this Transport instance\n */\n void shutdown();\n\n /**\n * This method will send message to the network, using tree structure\n * @param message\n */\n void propagateMessage(VoidMessage message, PropagationMode mode) throws IOException;\n\n /**\n * This method will send message to the node specified by Id\n *\n * @param message\n * @param id\n */\n void sendMessage(VoidMessage message, String id);\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id) throws InterruptedException;\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id, long waitTime, TimeUnit timeUnit) throws InterruptedException;\n\n /**\n * This method will be invoked for all incoming messages\n * PLEASE NOTE: this method is mostly suited for tests\n *\n * @param message\n */\n void processMessage(VoidMessage message);\n\n\n /**\n * This method allows to set callback instance, which will be called upon restart event\n * @param callback\n */\n void setRestartCallback(RestartCallback callback);\n\n /**\n * This methd allows to set callback instance for various\n * @param cls\n * @param callback\n * @param <T1> RequestMessage class\n * @param <T2> ResponseMessage class\n */\n <T extends RequestMessage> void addRequestConsumer(Class<T> cls, Consumer<T> consumer);\n\n /**\n * This method will be called if mesh update was received\n *\n * PLEASE NOTE: This method will be called ONLY if new mesh differs from current one\n * @param mesh\n */\n void onMeshUpdate(MeshOrganizer mesh);\n\n /**\n * This method will be called upon remap request\n * @param id\n */\n void onRemap(String id);\n\n /**\n * This method returns total number of nodes known to this Transport\n * @return\n */\n int totalNumberOfNodes();\n\n\n /**\n * This method returns ID of the root node\n * @return\n */\n String getRootId();\n\n /**\n * This method checks if all connections required for work are established\n * @return true\n */\n boolean isConnected();\n\n /**\n * This method checks if this node was properly introduced to driver\n * @return\n */\n boolean isIntroduced();\n\n /**\n * This method checks connection to the given node ID, and if it's not connected - establishes connection\n * @param id\n */\n void ensureConnection(String id);\n}", "protected abstract void transfer(UUID[] players, String server, IntConsumer response);", "public void run()\n {\n parentProvider.getConnection()\n .removeAsyncStanzaListener(this);\n\n // init ssList\n ssContactList.init(contactChangesListener);\n\n // as we have dispatched the contact list and Roster is ready\n // lets start the jingle nodes discovery\n parentProvider.startJingleNodesDiscovery();\n }", "@Override\r\n\tpublic void receiveMessage(Stanza stanza, Object payload) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void receiveInfo(Stanza stanza, String node, XMPPInfo info) {\n\t\t\r\n\t}", "public void run() {\n System.out.println(\"NS: in service NameServer worker!\");\n\n PrintStream out;\n BufferedReader in;\n\n try {\n out = new PrintStream(serv.getOutputStream());\n in = new BufferedReader(new InputStreamReader(serv.getInputStream()));\n\n String input = in.readLine();\n StringTokenizer parsedIn = new StringTokenizer(input, \"&\");\n\n \n //if the message sent is a host registering, take the info and put it in\n //the host info list.\n if (input.contains(\"HOST:\")) {\n parsedIn.nextToken();\n String ip = parsedIn.nextToken();\n int port = Integer.parseInt(parsedIn.nextToken());\n HostInfo newHost = new HostInfo(ip, port);\n HostInfoList.add(newHost);\n\n out.println(\"Host registered with NameServer: \" + newHost.toString());\n out.flush();\n\n } else if (input.startsWith(\"NEWAGENT:\")) {\n //register agent with its ID number... assign it a name\n //give all the names of group members\n parsedIn.nextToken();\n AgentInfo agent = newAgent(parsedIn);\n\n out.println(\"NEWAGENT:&\" + agent.getName() + \"&\" + agent.getGroupId());\n out.flush();\n\n\n } else if (input.startsWith(\"AGENTMIGRATE:\")) {\n /*\n * updates info on the agent.\n */\n parsedIn.nextToken();\n String agentId = parsedIn.nextToken();\n AgentInfo agent = null;\n List<AgentInfo> agentList = AgentInfoList.getList();\n for (AgentInfo a : agentList){\n if (a.agentId.equals(agentId))\n agent = a;\n }\n\n //agent.getCurLocation().setNumAgents(agent.getCurLocation().getNumAgents() - 1);\n agent.getCurLocation().incNumAgents();\n HostInfo newHost = HostInfoList.getRandomHost();\n agent.setCurLocation(newHost);\n //newHost.setNumAgents(newHost.getNumAgents() + 1);\n newHost.incNumAgents();\n\n out.println(\"AGENTMIGRATE:&\" + newHost.getIp() + \"&\" + newHost.getPort());\n out.flush();\n\n \n\n \n \n } else if (input.startsWith(\"REAGENT:\")){\n System.out.println(\"NS: receiving: \");\n parsedIn.nextToken();\n String agentId = parsedIn.nextToken();\n int newPort = Integer.parseInt(parsedIn.nextToken());\n List<AgentInfo> agentList = AgentInfoList.getList();\n for (AgentInfo a : agentList){\n if (a.agentId.equals(agentId))\n a.setPort(newPort);\n }\n \n }\n else {\n System.out.println(\"NS: Agent or HostServer requesting unimplemented action from service port.\");\n }\n\n\n } catch (IOException e) {\n System.out.println(\"NS: issue with connection in service NameServer worker!\");\n }\n\n\n }", "private void mergeChatWithServerRelay(ChatWithServer.Relay value) {\n if (rspCase_ == 3 &&\n rsp_ != ChatWithServer.Relay.getDefaultInstance()) {\n rsp_ = ChatWithServer.Relay.newBuilder((ChatWithServer.Relay) rsp_)\n .mergeFrom(value).buildPartial();\n } else {\n rsp_ = value;\n }\n rspCase_ = 3;\n }", "public void startListening(){\n if (listeningThread == null) {\n listeningThread = new Thread(new Runnable() {\n @Override\n public void run() {\n while (!Thread.interrupted()) {\n try {\n serverSocket = new ServerSocket(port);\n Socket remoteClientSocket = serverSocket.accept();\n clients.add(new RemoteClient(UUID.randomUUID().toString(), remoteClientSocket));\n\n // Read the client's message\n //ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(remoteClientSocket.getInputStream()));\n //Object raw = ois.readObject();\n int vol = 0;\n Scanner s = new Scanner(new BufferedReader(new InputStreamReader(remoteClientSocket.getInputStream())));\n if (s.hasNextLine()) {\n vol = Integer.parseInt(s.nextLine());\n System.out.println(\"[Server] Message from client: \" + vol);\n\n }\n\n\n int maxLoud = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);\n audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, vol, 0);\n\n PrintWriter pw = new PrintWriter(new OutputStreamWriter(remoteClientSocket.getOutputStream()));\n pw.println(\"set to\" +vol);\n pw.flush();\n\n\n remoteClientSocket.close();\n serverSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }\n });\n listeningThread.start();\n\n }\n }", "public SubscriptionListener() {\n this.protocol = \"stomp\";\n }", "public void testMediaManager() {\n\n resetCounter();\n \n XMPPConnection x0 = getConnection(0);\n XMPPConnection x1 = getConnection(1);\n\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 20004);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 20040);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n\n try {\n \n JingleMediaManager jingleMediaManager = new JingleMediaManager(ftm0) {\n // Media Session Implementation\n public JingleMediaSession createMediaSession(final PayloadType payloadType, final TransportCandidate remote,\n final TransportCandidate local, final JingleSession jingleSession) {\n return new JingleMediaSession(payloadType, remote, local, null, null) {\n\n public void initialize() {\n\n }\n\n public void startTrasmit() {\n incCounter();\n System.out.println(\"Transmit\");\n }\n\n public void startReceive() {\n incCounter();\n System.out.println(\"Receive\");\n }\n\n public void setTrasmit(boolean active) {\n }\n\n public void stopTrasmit() {\n incCounter();\n System.out.println(\"Stop Transmit\");\n }\n\n public void stopReceive() {\n incCounter();\n System.out.println(\"Stop Receive\");\n }\n };\n }\n\n public List<PayloadType> getPayloads() {\n return getTestPayloads1();\n }\n\n public PayloadType.Audio getPreferredAudioPayloadType() {\n return (PayloadType.Audio) getTestPayloads1().get(0);\n }\n\n };\n \n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(jingleMediaManager);\n\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(jingleMediaManager);\n\n JingleManager jm0 = new JingleManager(x0, trl0);\n JingleManager jm1 = new JingleManager(x1, trl1);\n\n jm1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n public void sessionRequested(final JingleSessionRequest request) {\n\n try {\n\n JingleSession session = request.accept();\n\n session.startIncoming();\n } catch (XMPPException e) {\n e.printStackTrace();\n }\n\n }\n });\n\n JingleSession js0 = jm0.createOutgoingJingleSession(x1.getUser());\n\n js0.startOutgoing();\n\n Thread.sleep(10000);\n js0.terminate();\n\n Thread.sleep(3000);\n\n System.out.println(valCounter());\n\n assertTrue(valCounter() == 8);\n\n Thread.sleep(15000);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private void runLocally() {\n\n // don't run if this is DAS **and** DAS is not in the server list.\n // otherwise we are in an instance and definitely want to run!\n if (isDas() && !dasIsInList())\n return;\n\n // say the pattern is \"something\" -->\n // we want \"server.something\" for DAS and \"i1.server.something\" for i1\n // Yes -- this is difficult to get perfect!!! What if user entered\n //\"server.something\"?\n\n String localPattern = prependServerDot(pattern);\n org.glassfish.flashlight.datatree.TreeNode tn = datareg.get(serverEnv.getInstanceName());\n\n if (tn == null) {\n // No monitoring data, so nothing to list\n // officially this is considered a \"success\"\n setSuccess(Strings.get(\"admin.get.monitoring.empty\"));\n return;\n }\n\n List<org.glassfish.flashlight.datatree.TreeNode> ltn = tn.getNodes(localPattern);\n boolean singleStat = false;\n\n if (ltn == null || ltn.isEmpty()) {\n org.glassfish.flashlight.datatree.TreeNode parent = tn.getPossibleParentNode(localPattern);\n\n if (parent != null) {\n ltn = new ArrayList<org.glassfish.flashlight.datatree.TreeNode>(1);\n ltn.add(parent);\n singleStat = true;\n }\n }\n\n if (!singleStat)\n localPattern = null; // signal to method call below. localPattern was already used above...\n\n if (outputType == OutputType.GET)\n doGet(localPattern, ltn);\n else if (outputType == OutputType.LIST)\n doList(localPattern, ltn);\n\n if (plainReporter != null) {\n plainReporter.appendMessage(cliOutput.toString());\n }\n }", "public void testFullTest() {\n\n resetCounter();\n \n XMPPConnection x0 = getConnection(0);\n XMPPConnection x1 = getConnection(1);\n\n XMPPConnection.DEBUG_ENABLED = true;\n\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 20080);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n JmfMediaManager jmf0 = new JmfMediaManager(ftm0);\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(jmf0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 20040);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n JmfMediaManager jmf1 = new JmfMediaManager(ftm1);\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(jmf1);\n\n JingleManager man0 = new JingleManager(x0, trl0);\n JingleManager man1 = new JingleManager(x1, trl1);\n \n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n public void sessionRequested(final JingleSessionRequest request) {\n\n try {\n\n JingleSession session = request.accept();\n session.addListener(new JingleSessionListener() {\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Establish In\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n\n public void sessionClosed(String reason, JingleSession jingleSession) {\n // incCounter();\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n // incCounter();\n }\n });\n\n session.startIncoming();\n } catch (XMPPException e) {\n e.printStackTrace();\n }\n\n }\n });\n\n for (int i = 0; i < 3; i++)\n try {\n\n JingleSession js0 = man0.createOutgoingJingleSession(x1.getUser());\n\n js0.addListener(new JingleSessionListener() {\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Establish Out\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n\n public void sessionClosed(String reason, JingleSession jingleSession) {\n // incCounter();\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n // incCounter();\n }\n });\n\n js0.startOutgoing();\n\n Thread.sleep(8000);\n js0.terminate();\n\n Thread.sleep(3000);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n System.out.println(valCounter());\n assertTrue(valCounter() == 6);\n }", "public static void sendCoordinatorMsg() {\n int numberOfRequestsNotSent = 0;\n for ( int key : ServerState.getInstance().getServers().keySet() ) {\n if ( key != ServerState.getInstance().getSelfID() ){\n Server destServer = ServerState.getInstance().getServers().get(key);\n\n try {\n MessageTransfer.sendServer(\n ServerMessage.getCoordinator( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent leader ID to s\"+destServer.getServerID());\n }\n catch(Exception e) {\n numberOfRequestsNotSent += 1;\n System.out.println(\"WARN : Server s\"+destServer.getServerID()+\n \" has failed, it will not receive the leader\");\n }\n }\n }\n if( numberOfRequestsNotSent == ServerState.getInstance().getServers().size()-1 ) {\n // add self clients and chat rooms to leader state\n List<String> selfClients = ServerState.getInstance().getClientIdList();\n List<List<String>> selfRooms = ServerState.getInstance().getChatRoomList();\n\n for( String clientID : selfClients ) {\n LeaderState.getInstance().addClientLeaderUpdate( clientID );\n }\n\n for( List<String> chatRoom : selfRooms ) {\n LeaderState.getInstance().addApprovedRoom( chatRoom.get( 0 ),\n chatRoom.get( 1 ), Integer.parseInt(chatRoom.get( 2 )) );\n }\n\n leaderUpdateComplete = true;\n }\n }", "@Override\n public int getServerBroadcastPort() {\n return 10081;\n }", "public void startListening();", "protected boolean mStartServerService() {//170926 Start listening for a client to relay to (170926\n if (oBTServer == null) {\n oBTServer = new cRelay2Client();//170922\n }\n if (oBTServer.bRelayState ==cKonst.eSerial.kListening) {\n mMsgLog(9,\"Already listening\");\n return false;\n }\n oBTServer.mOpenService(mContext, oBTadapter);//170922\n return true;\n }", "public interface ServerStrategie {\n\t/**\n\t * Sendet dem Client das Signal, dass der Name OK ist.\n\t */\n\tpublic void sendeHello();\n\t\n\t/**\n\t * Sendet dem Client das Signal, dass der Name bereits belegt ist.\n\t */\n\tpublic void sendeFehlerHelo();\n\t\n\t/**\n\t * Sendet dem Client das Signal, dass ein neuer Spieler die Lobby betreten hat.\n\t * \n\t * @param spieler Der Name des neuen Spielers.\n\t */\n\tpublic void sendeNeuerSpieler(String spieler);\n\t\n\t/**\n\t * Sendet dem Client das Signal, dass ein Spieler die Lobby verlassen hat.\n\t * \n\t * @param spieler Der Name des Spielers, der die Lobby verlassen hat.\n\t */\n\tpublic void sendeSpielerWeg(String spieler);\n\t\n\t/**\n\t * Sendet dem Client die Lobby.\n\t */\n\tpublic void sendeLobby();\n\t\n\t/**\n\t * Sendet dem Client das Signal zum Starten des Spiels.\n\t */\n\tpublic void sendeSpielStarten();\n\t\n\t/**\n\t * Sendet dem Client das Spielfeld.\n\t */\n\tpublic void sendeSpielfeld();\n\t\n\t/**\n\t * Sendet dem Client den Namen des Spielers, der am Zug ist.\n\t * \n\t * @param spieler Der Spieler, der am Zug ist.\n\t */\n\tpublic void sendeRate(String spieler);\n\t\n\t/**\n\t * Sendet dem Client einen Zug, den ein Spieler gemacht hat.\n\t * \n\t * @param zug Die Position der Karte, die aufgedeckt wurde (als String)\n\t */\n\tpublic void sendeZug(String zug);\n\t\n\t/**\n\t * Sendet dem Client das Signal, dass das Spiel zuende ist.\n\t */\n\tpublic void sendeBeenden();\n\t\n\t/**\n\t * Setzt den Namen des Spielers, den diese Verbindung repräsentiert.\n\t * \n\t * @param name Der Name, der gesetzt werden soll.\n\t */\n\tpublic void setName(String name);\n\t\n\t/**\n\t * Trennt die Verbindung zum Client.\n\t */\n\tpublic void trenneVerbindung();\n\t\n\t/**\n\t * Die String-Repräsentation einer Verbindung ist der Name des Spielers, den sie repräsentiert.\n\t * \n\t * @return Der Name des Spielers.\n\t */\n\tpublic String toString();\n}", "private void handleServers() throws XMLStreamException {\n printf(\"FOUND SERVERS\");\n\n while (skipToStartButNotPast(SERVER, SERVERS)) {\n handleServer();\n }\n }", "public static void relayActivityBroadcastToClients(JSONObject payload) {\n for(Connection conn : getLoggedInUserConnections()) {\n Message.relayActivityBroadcast(conn, payload);\n }\n for(Connection conn : anonClients) {\n if (conn != null)\n Message.relayActivityBroadcast(conn, payload);\n }\n }", "public void testSenderOrderWithMultipleSiteMasters() throws Exception {\n MyReceiver<Object> rx=new MyReceiver<>().rawMsgs(true).verbose(true),\n ry=new MyReceiver<>().rawMsgs(true).verbose(true), rz=new MyReceiver<>().rawMsgs(true).verbose(true);\n final int NUM=512;\n final String sm_picker_impl=SiteMasterPickerImpl.class.getName();\n a=createNode(LON, \"A\", LON_CLUSTER, 2, sm_picker_impl, null);\n b=createNode(LON, \"B\", LON_CLUSTER, 2, sm_picker_impl, null);\n c=createNode(LON, \"C\", LON_CLUSTER, 2, sm_picker_impl, null);\n Util.waitUntilAllChannelsHaveSameView(10000, 1000, a,b,c);\n\n x=createNode(SFO, \"X\", SFO_CLUSTER, 2, sm_picker_impl, rx);\n y=createNode(SFO, \"Y\", SFO_CLUSTER, 2, sm_picker_impl, ry);\n z=createNode(SFO, \"Z\", SFO_CLUSTER, 2, sm_picker_impl, rz);\n Util.waitUntilAllChannelsHaveSameView(10000, 1000, x,y,z);\n\n waitForBridgeView(4, 10000, 1000, a,b,x,y);\n\n // C in LON sends messages to the site master of SFO (via either SM A or B); everyone in SFO (x,y,z)\n // must receive them in correct order\n SiteMaster target_sm=new SiteMaster(SFO);\n System.out.printf(\"%s: sending %d messages to %s:\\n\", c.getAddress(), NUM, target_sm);\n for(int i=1; i <= NUM; i++) {\n Message msg=new BytesMessage(target_sm, i); // the seqno is in the payload of the message\n c.send(msg);\n }\n\n boolean running=true;\n for(int i=0; running && i < 10; i++) {\n for(MyReceiver<Object> r: Arrays.asList(rx,ry,rz)) {\n if(r.size() >= NUM) {\n running=false;\n break;\n }\n }\n Util.sleep(1000);\n }\n\n System.out.printf(\"X: size=%d\\nY: size=%d\\nZ: size=%d\\n\", rx.size(), ry.size(), rz.size());\n assert rx.size() == NUM || ry.size() == NUM;\n assert rz.size() == 0;\n }", "private void startListening(long currentTime) throws IOException {\n System.out.println(\"Start UDP listening and slave map size + \" + slaveMap.size());\n //logger.debug(\"Start UDP listening and slave map size + \" + slaveMap.size());\n try {\n listener = new DatagramSocket(SDUtil.heatbeatsPort);\n } catch (SocketException e) {\n e.printStackTrace();\n }\n\n //if UDP socket creates successfully\n if(listener != null){\n\n //prepare buffer\n byte[] buf = new byte[1024];\n DatagramPacket packet = new DatagramPacket(buf, 1024);\n\n while(true){\n //next timeout computation\n long interval = getCurrentTimeInMillionSeconds() - currentTime;\n int timeout = (int) (SDUtil.heartbeatsIntervalMillionSeconds - interval);\n if(timeout <= 0){\n break;\n }\n //start listening\n try {\n listener.setSoTimeout(timeout);\n listener.receive(packet);\n\n String receiveBuf = new String(packet.getData(), 0, packet.getLength());\n String key = packet.getAddress().getHostAddress() + receiveBuf;\n if(slaveMap.containsKey(key)){\n responderList.put(slaveMap.get(key), true);\n }else{\n SDUtil.fatalError(\"Wrong slave key!!!!\");\n }\n } catch (SocketTimeoutException e){\n System.err.println(\"UDP socket time out\");\n //logger.error(\"UDP socket time out\");\n }\n }\n listener.close();\n }\n }", "private void setStreamMediaAddressList(){\n\n if (mCallBack != null){\n mCallBack.onGetServerAddressListCompleted(mServerAddressList);\n }\n }", "private void setChatWithServerRelay(ChatWithServer.Relay value) {\n if (value == null) {\n throw new NullPointerException();\n }\n rsp_ = value;\n rspCase_ = 3;\n }", "void reply(Server server);", "@Override\n public void run() {\n final Node node = infoData.getNode(query.getPath());\n if (!node.isEmpty()) {\n List<? extends Event> infoEvents =\n infoSyncTree.applyServerOverwrite(query.getPath(), node);\n postEvents(infoEvents);\n onComplete.onListenComplete(null);\n }\n }", "@Test\n public void testServer() throws Exception{\n ServerMain s=new ServerMain(1,3,2,\"test\",InetAddress.getLocalHost(),null);\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.PM);\n uut.serverVisit(new Client(\"test\",s).getServerVisitor());\n\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.MATCH);\n uut.serverVisit(new Client(\"test\",s).getServerVisitor());\n\n uut=new ChatMessageRequest(\"test\",\"test2\",\"test\",MessageTypes.MATCH);\n uut.serverVisit(new Client(\"testInvalid\",s).getServerVisitor());\n }", "ServerSwitcherTransmitter getServerSwitcherTransmitter();", "public void startRunning(){\n\t\ttry{\n\t\t\tserver = new ServerSocket(6789, 100);\n\t\t\t//int Port Number int 100 connections max (backlog / queue link)\n\t\t\twhile(true){\n\t\t\t\ttry{\n\t\t\t\t\twaitForConnection();\n\t\t\t\t\tsetupStreams();\n\t\t\t\t\twhileChatting();\n\t\t\t\t\t//connect and have conversation\n\t\t\t\t}catch(EOFException eofe){\n\t\t\t\t\tshowMessage(\"\\n Punk Ass Bitch.\");\n\t\t\t\t}finally{\n\t\t\t\t\tcloseChat();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(IOException ioe){\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}\n\t}", "private void getRTPStream(String session, String source, int portl, int portr, int payloadFormat ){\n \t InetAddress addr;\r\n \t\ttry {\r\n \t\t\taddr = InetAddress.getLocalHost();\r\n \t\t // Get IP Address\r\n // \t\t\tLAN_IP_ADDR = addr.getHostAddress();\r\n \t\t\tLAN_IP_ADDR = \"192.168.1.125\";\r\n \t\t\tLog.d(TAG, \"using client IP addr \" +LAN_IP_ADDR);\r\n \t\t \r\n \t\t} catch (UnknownHostException e1) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te1.printStackTrace();\r\n \t\t}\r\n\r\n \t\t\r\n final CountDownLatch latch = new CountDownLatch(2);\r\n\r\n RtpParticipant local1 = RtpParticipant.createReceiver(new RtpParticipantInfo(1), LAN_IP_ADDR, portl, portl+=1);\r\n // RtpParticipant local1 = RtpParticipant.createReceiver(new RtpParticipantInfo(1), \"127.0.0.1\", portl, portl+=1);\r\n RtpParticipant remote1 = RtpParticipant.createReceiver(new RtpParticipantInfo(2), source, portr, portr+=1);\r\n \r\n \r\n remote1.getInfo().setSsrc( Long.parseLong(ssrc, 16));\r\n session1 = new SingleParticipantSession(session, payloadFormat, local1, remote1);\r\n \r\n Log.d(TAG, \"remote ssrc \" +session1.getRemoteParticipant().getInfo().getSsrc());\r\n \r\n session1.init();\r\n \r\n session1.addDataListener(new RtpSessionDataListener() {\r\n @Override\r\n public void dataPacketReceived(RtpSession session, RtpParticipantInfo participant, DataPacket packet) {\r\n // System.err.println(\"Session 1 received packet: \" + packet + \"(session: \" + session.getId() + \")\");\r\n \t//TODO close the file, flush the buffer\r\n// \tif (_sink != null) _sink.getPackByte(packet);\r\n \tgetPackByte(packet);\r\n \t\r\n // \tSystem.err.println(\"Ssn 1 packet seqn: typ: datasz \" +packet.getSequenceNumber() + \" \" +packet.getPayloadType() +\" \" +packet.getDataSize());\r\n // \tSystem.err.println(\"Ssn 1 packet sessn: typ: datasz \" + session.getId() + \" \" +packet.getPayloadType() +\" \" +packet.getDataSize());\r\n // latch.countDown();\r\n }\r\n\r\n });\r\n // DataPacket packet = new DataPacket();\r\n // packet.setData(new byte[]{0x45, 0x45, 0x45, 0x45});\r\n // packet.setSequenceNumber(1);\r\n // session1.sendDataPacket(packet);\r\n\r\n\r\n// try {\r\n // latch.await(2000, TimeUnit.MILLISECONDS);\r\n // } catch (Exception e) {\r\n // fail(\"Exception caught: \" + e.getClass().getSimpleName() + \" - \" + e.getMessage());\r\n \r\n // }\r\n \t}", "public static void main(String[] args) {\n\t\trouter = new CommandRouter();\n\t\ttry {\n\t\t\t// setup our socket connection to the tv, but don't connect yet\n\t\t\tconn = new Connection(HOST, PORT, router);\n\n\t\t\t// Tell out router which network connection to use\n\t\t\trouter.setConnection(conn);\n\n\t\t\t// setup a handler for incoming GrantedSessionCommand message\n\t\t\t// objects\n\t\t\ttry {\n\t\t\t\trouter.registerCommandSubscriber(new ICommandSubscriber() {\n\t\t\t\t\tpublic void onCommandReceived(AbstractCommand command) {\n\t\t\t\t\t\t// Filter out the messages we care about\n\t\t\t\t\t\tif (command instanceof GrantedSessionCommand) {\n\t\t\t\t\t\t\t// Print our our unique key, this will be used for\n\t\t\t\t\t\t\t// subsequent connections\n\t\t\t\t\t\t\tUtilities.log(\"Your instanceId is \" + ((GrantedSessionCommand) command).getInstanceId());\n\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t//let's make the dock show up on the TV\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_yahoo\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(2000); //sleep for 2 seconds so the animation to dock finishes\n\n\t\t\t\t\t\t\t\t// Lets do something cool, like tell the TV to navigate to the right. Then do a little dance\n\t\t\t\t\t\t\t\t// This is the same as pressing \"right\" on your remote\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t// slide to the left\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//slide to the right\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//take it back now, y'all\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\t//cha cha cha\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\tUtilities.log(\"Problem writing to the network connection\");\n\t\t\t\t\t\t\t\tconn.close();\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Notify the main thread that everything we wanted to\n\t\t\t\t\t\t\t// do is done.\n\t\t\t\t\t\t\tsynchronized (conn) {\n\t\t\t\t\t\t\t\tconn.notifyAll();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // print out the others for educational purposes\n\t\t\t\t\t\t\tUtilities.log(\"Received: \" + command.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void onConnectionLost(Connection conn) {\n\t\t\t\t\t\tUtilities.log(\"Connection Lost!\");\n\t\t\t\t\t}\n\t\t\t\t}, GrantedSessionCommand.class);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// Establish a connection\n\t\t\t\tconn.establish();\n\t\t\t\t// Since this is the first time we are connecting, we must\n\t\t\t\t// create a new session\n\t\t\t\trouter.publishCommand(new CreateSessionCommand(APP_ID, CONSUMER_KEY, SECRET, APP_NAME));\n\n\t\t\t\tString message = getUserInput(\"Code: \");\n\t\t\t\trouter.publishCommand(new AuthSessionCommand(message, conn.getPeerCertificate()));\n\n\t\t\t\t// Let's wait until everything is done. This thread will get\n\t\t\t\t// notified once we are ready to clean up\n\t\t\t\ttry {\n\t\t\t\t\tsynchronized (conn) {\n\t\t\t\t\t\tconn.wait();\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tUtilities.log(\"Error establishing connection to \" + HOST + \":\" + PORT);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tUtilities.log(\"Error establishing connection to \" + HOST + \":\" + PORT);\n\t\t\t}\n\n\t\t\t// It is always good practice to clean up after yourself\n\t\t\tconn.close();\n\n\t\t} catch (UnknownHostException e) {\n\t\t\tUtilities.log(\"Error resolving \" + HOST);\n\t\t\tSystem.exit(-1);\n\t\t} catch (IOException e) {\n\t\t\tUtilities.log(\"Problem writing to the network connection\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\tSystem.exit(1);\n\t}", "PToP.S2BRelay getS2BRelay();", "Seen.ServerToB getSeenServerToB();", "public void testStagesSession() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 54222);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 54567);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads2());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n\n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n try {\n // We accept the request\n JingleSession session1 = request.accept();\n\n session1.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionClosed().\");\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n System.out.println(\"sessionClosedOnError().\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionDeclined().\");\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, final TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Responder: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n });\n\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n\n session0.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Initiator: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n });\n session0.startOutgoing();\n\n Thread.sleep(20000);\n\n assertTrue(valCounter() == 2);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }", "public void shoutMessage(Talker t) {\n\t\tfor (Listener l: mListenerSet) {\n\t\t\tl.onMessageReceived(t.getMessage());\n\t\t}\n\t}", "@Override\n public void completed(AsynchronousSocketChannel sockChannel, AsynchronousServerSocketChannel serverSock ) {\n serverSock.accept( serverSock, this );\n\n try{\n //Print IP Address\n System.out.println( sockChannel.getLocalAddress().toString());\n\n //Add To Client List\n list.add(list.size(), sockChannel);\n\n }catch(IOException e) {\n e.printStackTrace();\n }\n\n //start to read message from the client\n startRead( sockChannel );\n \n }", "public ServerNMS() {\n\t\tclients = new LinkedList<PrintWriter>();\n\t}", "static void ReadingHandler(String scope, String sender, String receiver,\n\t\t\tString direction, String broadcast, KeyValueList kvList) {\n\n\t\tif (sender != null && !sender.equals(\"\")) {\n\t\t\t// a sender is required\n\n\t\t\tif (receiver != null) {\n\t\t\t\tif (broadcast != null && broadcast.equals(\"True\")) {\n\n\t\t\t\t\t/*\n\t\t\t\t\t * all \"RECEIVER\" in the broadcast hierarchy can receive\n\t\t\t\t\t * (scope startsWith)\n\t\t\t\t\t */\n\t\t\t\t\tif (direction != null && direction.equals(\"Up\")) {\n\n\t\t\t\t\t\tSISServer.mapping.entrySet().stream()\n\t\t\t\t\t\t\t\t.filter(x -> (scope.startsWith(x.getKey().scope)\n\t\t\t\t\t\t\t\t\t\t&& (x.getKey().name.equals(receiver)\n\t\t\t\t\t\t\t\t\t\t\t\t|| x.getKey().componentType == ComponentType.Debugger)\n\t\t\t\t\t\t\t\t&& x.getValue().encoder != null)).forEach(x -> {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t// re-route this message to each\n\t\t\t\t\t\t\t\t\t\t// qualified\n\t\t\t\t\t\t\t\t\t\t// component\n\t\t\t\t\t\t\t\t\t\tx.getValue().encoder.sendMsg(kvList);\n\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\t\t\"ERROR: Fail to send \" + kvList\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \", abort subtask\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t} else if (direction != null && direction.equals(\"Down\")) {\n\n\t\t\t\t\t\tSISServer.mapping.entrySet().stream()\n\t\t\t\t\t\t\t\t.filter(x -> (x.getKey().scope.startsWith(scope)\n\t\t\t\t\t\t\t\t\t\t&& (x.getKey().name.equals(receiver)\n\t\t\t\t\t\t\t\t\t\t\t\t|| x.getKey().componentType == ComponentType.Debugger)\n\t\t\t\t\t\t\t\t&& x.getValue().encoder != null)).forEach(x -> {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t// re-route this message to each\n\t\t\t\t\t\t\t\t\t\t// qualified\n\t\t\t\t\t\t\t\t\t\t// component\n\t\t\t\t\t\t\t\t\t\tx.getValue().encoder.sendMsg(kvList);\n\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\t\t\"ERROR: Fail to send \" + kvList\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \", abort subtask\");\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}\n\n\t\t\t\t} else {\n\t\t\t\t\t/*\n\t\t\t\t\t * Only \"RECEIVER\" in specified scope can receive\n\t\t\t\t\t * (scope equals)\n\t\t\t\t\t */\n\t\t\t\t\tSISServer.mapping.entrySet().stream()\n\t\t\t\t\t\t\t.filter(x -> (x.getKey().scope.equals(scope)\n\t\t\t\t\t\t\t\t\t&& (x.getKey().name.equals(receiver)\n\t\t\t\t\t\t\t\t\t\t\t|| x.getKey().componentType == ComponentType.Debugger)\n\t\t\t\t\t\t\t&& x.getValue().encoder != null)).forEach(x -> {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t// re-route this message to each\n\t\t\t\t\t\t\t\t\t// qualified\n\t\t\t\t\t\t\t\t\t// component\n\t\t\t\t\t\t\t\t\tx.getValue().encoder.sendMsg(kvList);\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"ERROR: Fail to send \"\n\t\t\t\t\t\t\t\t\t\t\t+ kvList + \", abort subtask\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tif (broadcast != null && broadcast.equals(\"True\")) {\n\t\t\t\t\t/*\n\t\t\t\t\t * all components in the hierarchy (up/down)\n\t\t\t\t\t * (scope startsWith)\n\t\t\t\t\t */\n\t\t\t\t\tif (direction != null && direction.equals(\"Up\")) {\n\t\t\t\t\t\tSISServer.mapping.entrySet().stream()\n\t\t\t\t\t\t\t\t.filter(x -> (scope.startsWith(x.getKey().scope)\n\t\t\t\t\t\t\t\t\t\t&& (x.getKey().componentType == ComponentType.Monitor\n\t\t\t\t\t\t\t\t\t\t\t\t|| x.getKey().componentType == ComponentType.Debugger)\n\t\t\t\t\t\t\t\t&& x.getValue().encoder != null)).forEach(x -> {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t// re-route this message to each\n\t\t\t\t\t\t\t\t\t\t// qualified\n\t\t\t\t\t\t\t\t\t\t// component\n\t\t\t\t\t\t\t\t\t\tx.getValue().encoder.sendMsg(kvList);\n\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\t\t\"ERROR: Fail to send \" + kvList\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \", abort subtask\");\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} else if (direction != null && direction.equals(\"Down\")) {\n\t\t\t\t\t\tSISServer.mapping.entrySet().stream()\n\t\t\t\t\t\t\t\t.filter(x -> (x.getKey().scope.startsWith(scope)\n\t\t\t\t\t\t\t\t\t\t&& (x.getKey().componentType == ComponentType.Monitor\n\t\t\t\t\t\t\t\t\t\t\t\t|| x.getKey().componentType == ComponentType.Debugger)\n\t\t\t\t\t\t\t\t&& x.getValue().encoder != null)).forEach(x -> {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t// re-route this message to each\n\t\t\t\t\t\t\t\t\t\t// qualified\n\t\t\t\t\t\t\t\t\t\t// component\n\t\t\t\t\t\t\t\t\t\tx.getValue().encoder.sendMsg(kvList);\n\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\t\t\t\t\"ERROR: Fail to send \" + kvList\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \", abort subtask\");\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}\n\t\t\t\t} else {\n\t\t\t\t\t/*\n\t\t\t\t\t * All components in specified scope can receive\n\t\t\t\t\t * (scope equals)\n\t\t\t\t\t */\n\t\t\t\t\tSISServer.mapping.entrySet().stream()\n\t\t\t\t\t\t\t.filter(x -> (x.getKey().scope.equals(scope)\n\t\t\t\t\t\t\t\t\t&& (x.getKey().componentType == ComponentType.Monitor\n\t\t\t\t\t\t\t\t\t\t\t|| x.getKey().componentType == ComponentType.Debugger)\n\t\t\t\t\t\t\t&& x.getValue().encoder != null)).forEach(x -> {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t// re-route this message to each\n\t\t\t\t\t\t\t\t\t// qualified\n\t\t\t\t\t\t\t\t\t// component\n\t\t\t\t\t\t\t\t\tx.getValue().encoder.sendMsg(kvList);\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"ERROR: Fail to send \"\n\t\t\t\t\t\t\t\t\t\t\t+ kvList + \", abort subtask\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// no sender no distribution\n\t}", "@Override\r\n\tpublic void start() {\n\t\tscavenger.start();\r\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\twhile (!serverSocket.isClosed()) {\r\n\t\t\t\t\tSocket socket = null;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsocket = serverSocket.accept();\r\n\t\t\t\t\t\tscavenger.addSocket(socket);\r\n\t\t\t\t\t\tnew SynchronousSocketThread(socket).start();\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\t}", "public static void main(String[] args) throws Exception {\n\tint port = 8989;\n\t \n AsynchronousServerSocketChannel server = AsynchronousServerSocketChannel\n .open();\n InetSocketAddress sAddr = new InetSocketAddress(port);\n server.bind(sAddr);\n System.out.format(\"Server is listening at %s%n\", sAddr);\n \n InetAddress iAddress = InetAddress.getLocalHost();\n String currentIp = iAddress.getHostAddress();\n System.out.println(\"Current IP address : \" +currentIp); //gives only host address\n \n DesertedServer dserver = new DesertedServer(server);\n Attachment attach = new Attachment();\n attach.server = dserver;\n server.accept(attach, new ConnectionHandler());\n Thread.currentThread().join();\n }", "public void run(){\n\tSystem.out.println(\"ServerListenerThread started!\");\n\t\t\t\twhile (parent.isWorking)\n\t\t\t\t{\n\n\t\t\t\t\tint t=0;\n\t\t\t\t\tString user = null,message=null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tt =Integer.parseInt(parent.inputStream.readLine());\n\t\t\t\t\t\tuser=parent.inputStream.readLine();\n\t\t\t\t\t\tmessage=parent.inputStream.readLine();\n\t\t\t\t\t\tif(t==MessageType.WILL)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\">\"+user+\" wants to play!\");\n\t\t\t\t\t\t\tparent.parent.addWaiter(parent,user);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(t==MessageType.PRIVATE || t==MessageType.MOVE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Inside message from: \"+user);\n\t\t\t\t\t\t\tparent.parent.sendPlayed(t,user,message);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparent.parent.sendMessage(t, user, message);\n\t\t\t\t\t\t\tif(!parent.socket.isConnected())break;\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\n\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"Recevied a message from: \"+user+\": \"+message);\n\n\t\t\t\t}\n\t\t\t//END\n\t\t\tsynchronized(this)\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\tparent.inputStream.close();\n\t\t\t\t\tparent.outputStream.close();\n\t\t \tparent.socket.close();\n\t\t \tSystem.out.println(\"ServerListenerThread closed!\");\n\t\t }\n\t\t catch (IOException e) {\n\t\t e.printStackTrace();\n\t\t }\n\t\t\t}\n}", "public void start()\n throws IOException, StunException\n {\n localSocket = new IceUdpSocketWrapper(\n new SafeCloseDatagramSocket(serverAddress));\n\n stunStack.addSocket(localSocket);\n stunStack.addRequestListener(serverAddress, this);\n\n }", "private void starter(QuorumPeer self, QuorumCnxManager manager) {\n this.self = self;\n proposedLeader = -1;\n proposedZxid = -1;\n\n sendqueue = new LinkedBlockingQueue<>();\n recvqueue = new LinkedBlockingQueue<>();\n this.messenger = new Messenger(manager);\n }", "@Override\n public void sendFromAllAccounts(Stanza stanza)\n throws RemoteException\n {\n BuddycloudService.this.sendFromAllAccounts(stanza);\n }", "private Channel getServersChannel(ProcessSet processes, int id) {\r\n\t\tLayer[] qos = { new TcpCompleteLayer(), new TcpBasedPFDLayer(),\r\n\t\t\t\tnew BasicBroadcastLayer(), // new EagerRBLayer(),\r\n\t\t\t\tnew ServerClientApplLayer() };\r\n\r\n\t\t/* Create a QoS */\r\n\t\tQoS myQoS = null;\r\n\t\ttry {\r\n\t\t\tmyQoS = new QoS(\"ServerClient QoS for \" + \"server \" + id, qos);\r\n\t\t} catch (AppiaInvalidQoSException ex) {\r\n\t\t\tLogger.getLogger(ServerAppl.class.getName()).severe(\"Invalid QoS\");\r\n\t\t\tLogger.getLogger(ServerAppl.class.getName())\r\n\t\t\t\t\t.severe(ex.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t/* Create a channel. Uses default event scheduler. */\r\n\t\tChannel channel = myQoS\r\n\t\t\t\t.createUnboundChannel(\"ServerClient channel for \" + \"server \"\r\n\t\t\t\t\t\t+ id);\r\n\t\t/*\r\n\t\t * Application Session requires special arguments: filename and . A\r\n\t\t * session is created and binded to the stack. Remaining ones are\r\n\t\t * created by default\r\n\t\t */\r\n\t\tServerClientApplSession sas = (ServerClientApplSession) qos[qos.length - 1]\r\n\t\t\t\t.createSession();\r\n\t\tsas.init(processes, this, this, this, false);\r\n\r\n\t\tChannelCursor cc = channel.getCursor();\r\n\r\n\t\t/*\r\n\t\t * Application is the last session of the array. Positioning in it is\r\n\t\t * simple\r\n\t\t */\r\n\t\ttry {\r\n\t\t\tcc.top();\r\n\t\t\tcc.setSession(sas);\r\n\t\t\tcc.bottom();\r\n\t\t\tChannelCursor ccc = this.zabChannel.getCursor();\r\n\t\t\tccc.bottom();\r\n\t\t\tcc.setSession(ccc.getSession());\r\n\t\t\tccc.up();\r\n\t\t\tcc.up();\r\n\t\t\tcc.setSession(ccc.getSession());\r\n\t\t} catch (AppiaCursorException ex) {\r\n\t\t\tLogger.getLogger(ServerAppl.class.getName()).severe(\r\n\t\t\t\t\t\"Unexpected exception in main. Type code:\" + ex.type);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\treturn channel;\r\n\t}", "private void process(DatagramPacket packet){\n\t\tString string = new String(packet.getData());\r\n\t\tstring = string.split(\"/end/\")[0];\r\n\t\tInetAddress address = packet.getAddress();\r\n\t\tint port = packet.getPort();\r\n\t\tif(string.startsWith(\"/ping/\")) {\r\n\t\t\tsend(\"/ping/\".getBytes(), address, port);\r\n\t\t}else if(string.startsWith(\"/r/\")) {\r\n\t\t\tclients.add(new ServerClient(address, port));\r\n\t\t\tclients.get(clients.size() - 1).username = string.split(\"/u/|/p/\")[1];\r\n\t\t\tclients.get(clients.size() - 1).password = string.split(\"/p/|/m/\")[1];\r\n\t\t\tclients.get(clients.size() - 1).mail = string.split(\"/m/|/a/\")[1];\r\n\t\t\tclients.get(clients.size() - 1).age = string.split(\"/a/|/c/\")[1];\r\n\t\t\tclients.get(clients.size() - 1).country = string.split(\"/c/|/s/\")[1];\r\n\t\t\tclients.get(clients.size() - 1).sex = string.split(\"/s/|/pn/\")[1];\r\n\t\t\tclients.get(clients.size() - 1).phoneNum = string.split(\"/pn/|/er/\")[1];\r\n\t\t\t\r\n\t\t\tint id = clients.get(clients.size() - 1).userID;\r\n\t\t\t\r\n\t\t\tsave();\r\n\t\t\t\r\n\t\t\tsend(getBynaryFtomInt(id), clients.get(clients.size() - 1).address, clients.get(clients.size() - 1).port);\r\n\t\t\t\r\n\t\t}else if(string.startsWith(\"/e/\")) {\r\n\t\t\tint ID = Integer.parseInt(string.split(\"/id/|/u/\")[1]);\r\n\t\t\tfor(int i = 0; i < clients.size(); i++) {\r\n\t\t\t\tServerClient c = clients.get(i);\r\n\t\t\t\tif(ID == c.userID) {\r\n\t\t\t\t\tc.username = string.split(\"/u/|/p/\")[1];\r\n\t\t\t\t\tc.password = string.split(\"/p/|/m/\")[1];\r\n\t\t\t\t\tc.mail = string.split(\"/m/|/a/\")[1];\r\n\t\t\t\t\tc.age = string.split(\"/a/|/c/\")[1];\r\n\t\t\t\t\tc.country = string.split(\"/c/|/s/\")[1];\r\n\t\t\t\t\tc.sex = string.split(\"/s/|/pn/\")[1];\r\n\t\t\t\t\tc.phoneNum = string.split(\"/pn/|/ee/\")[1];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsave();\r\n\t\t\t\r\n\t\t}else if(string.startsWith(\"/d/\")) {\r\n\t\t\tint ID = Integer.parseInt(string.split(\"/id/|/u/\")[1]);\r\n\t\t\tfor(int i = 0; i < clients.size(); i++) {\r\n\t\t\t\tif(ID == clients.get(i).userID) {\r\n\t\t\t\t\tremove(i);\r\n\t\t\t\t\tclients.remove(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsave();\r\n\t\t}else if(string.startsWith(\"/l/\")) {\r\n\t\t\tfor(int i = 0; i < clients.size(); i++) {\r\n\t\t\t\tServerClient c = clients.get(i);\r\n\t\t\t\tif(c.username.equals(string.split(\"/u/|/p/\")[1]) && c.password.equals(string.split(\"/p/|/el/\")[1])) {\r\n\t\t\t\t\tc.address = packet.getAddress();\r\n\t\t\t\t\tc.port = packet.getPort();\r\n\t\t\t\t\t\r\n\t\t\t\t\tString information = \"/i/\" + \"/id/\" + c.userID + \"/u/\" + c.username + \"/p/\" + c.password + \"/m/\" + c.mail + \"/a/\" + c.age + \"/c/\" + c.country + \"/s/\" + c.sex + \"/pn/\" + c.phoneNum + \"/ei/\" + \"/\" + \"/end/\";\r\n\t\t\t\t\tsend(information.getBytes(), c.address, c.port);\r\n\t\t\t\t\t\r\n\t\t\t\t\twrong = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(wrong) {\r\n\t\t\t\tString information = \"/w/\" + \"/end/\";\r\n\t\t\t\tsend(information.getBytes(), packet.getAddress(), packet.getPort());\r\n\t\t\t}else {\r\n\t\t\t\twrong = true;\r\n\t\t\t}\r\n\t\t}/*else if(string.startsWith(\"/photo/\")) {\r\n\t\t\tfor(int i = 0; i < clients.size(); i++) {\r\n\t\t\t\tServerClient c = clients.get(i);\r\n\t\t\t\tif(Integer.parseInt(string.split(\"/photo/|//\")[1]) == c.userID) {\r\n\t\t\t\t\tc.pixels = string.split(\"//|/e/\")[1].getBytes();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsave();\r\n\t\t}*/\r\n\t\t\r\n\t\t\t\r\n\t}", "public static void startChatServer() {\n\t\tbyte[] buffer = new byte[1024];\n\t\tStreamConnectionNotifier cn = null;\n\t\ttry {\n\t\t\tLocalDevice local = LocalDevice.getLocalDevice();\n\t\t\tlocal.setDiscoverable(DiscoveryAgent.GIAC);\n\t\t\tcn = (StreamConnectionNotifier) Connector.open(INSECURE_URL);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tOutputThread t = null;\n\t\t\tStreamConnection sock = null;\n\t\t\tInputStream is = null;\n\t\t\tOutputStream os = null;\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"accepting connection:\");\n\t\t\t\tsock = cn.acceptAndOpen();\n\t\t\t\tSystem.out.println(\"accept!: \" + Charset.defaultCharset());\n\t\t\t\tis = sock.openInputStream();\n\t\t\t\tos = sock.openOutputStream();\n\n\t\t\t\tt = new OutputThread(os);\n\t\t\t\tt.start();\n\n\t\t\t\twhile (t.isAlive()) {\n\t\t\t\t\t//TODO: use timeout read?\n\t\t\t\t\tint len = is.read(buffer);\n\t\t\t\t\t// printAsHex(buffer, len);\n\t\t\t\t\tif (len > 0) {\n\t\t\t\t\t\tSystem.out.println(\"received message(\" + len + \"): \" + new String(buffer, 0, len));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//TODO: check connection is live or not,\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\tt.interrupt();\n\t\t\t\tt = null;\n\t\t\t\ttry {\n\t\t\t\t\tsock.close();\n\t\t\t\t\tcn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t//\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void processPacket(IQ incomingPacket){\n\t\t\t\t\t\t\n\t\tif (incomingPacket instanceof JingleIQPacket) {\n\t\t\tJingleIQPacket jiqPacket = (JingleIQPacket) incomingPacket;\n\t\t\t\n\t\t\tLog.i(XMPPClientLogger.TAG, \"JIQPacket Received in MUCBuddy: \" + \n\t\t\t\t\t\"From: \" + jiqPacket.getFrom()+ \"To: \" + jiqPacket.getTo() +\n\t\t\t\t\t\"Initiator: \" + jiqPacket.getAttributeInitiator() + \n\t\t\t\t\t\"Responder: \" + jiqPacket.getAttributeResponder() + \"Action: \" + jiqPacket.getAttributeAction());\n\t\t\t\n\t\t\t// Send ACK\n\t\t\tiqMessageSender.sendResultAck(jiqPacket);\n\t\t\t\n\t\t\tString action = jiqPacket.getAttributeAction();\n\t\t\tif(state.getSessionState() == SessionCallStateMachine.STATE_ENDED){\n\t\t\t\tif(action.equals(JingleIQPacket.AttributeActionValues.SESSION_INITIATE)){\n\t\t\t\t\tstate.changeSessionState(action); // Sets to Pending\n\t\t\t\t\t\n\t\t\t\t\t// Check to see if we can respond with session accept or with session_terminate\n\t\t\t\t\tif(supportApplication(jiqPacket)){\t\t\t\t\t\t\n\t\t\t\t\t\tif(supportTransport(jiqPacket)){\n\t\t\t\t\t\t\t// Get the initiator's IP and Ports\n\t\t\t\t\t\t\tString ipAddress = jiqPacket.getElementContent().get(0).getElementTransport().getCandidates().get(0).getAttributeIP();\n\t\t\t\t\t\t\tInteger port = (int)jiqPacket.getElementContent().get(0).getElementTransport().getCandidates().get(0).getAttributePort(); \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsetRemoteIPAddress(ipAddress);\n\t\t\t\t\t\t\tsetRemotePort(port);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Can send out session_accept\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tjiqActionMessageSender.sendSessionAccept(jiqPacket, this);\n\t\t\t\t\t\t\t// TODO: Time to send RTP Comfort Noise\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// TODO: If not received RTP Noise upto certain time, terminate session.\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// TODO: If receive Noise, then : \n\t\t\t\t\t\t\tstate.changeSessionState(JingleIQPacket.AttributeActionValues.SESSION_ACCEPT); // sets to Active.\n\t\t\t\t\t\t\tLog.i(XMPPClientLogger.TAG, \"State: \" + state.getSessionStateString());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tLog.i(\"MUCBuddy\", \"Starting receiver on port \" + this.getLocalPort());\n\t\t\t\t\t\t\t\tSipdroidSocket recv_socket = new SipdroidSocket(this.getLocalPort());\n\t\t\t\t\t\t\t\treceiver = new ReceiverThread(recv_socket);\n\t\t\t\t\t\t\t\treceiver.start();\n\t\t\t\t\t\t\t\tint sendPort = PortHandler.getInstance().getSendPort();\n\t\t\t\t\t\t\t\tSipdroidSocket send_socket = new SipdroidSocket(sendPort);\n\t\t\t\t\t\t\t\tBlockingQueue<short[]> queue = new LinkedBlockingQueue<short[]>();\n\t\t\t\t\t\t\t\tLog.i(\"MUCBuddy\", \"Starting sender to \" + this.getRemoteIPAddress() + \":\" + this.getRemotePort() + \" on port \" + sendPort);\n\t\t\t\t\t\t\t\tsender = new SenderThread(true, 8000/160, 160, send_socket, this.getRemoteIPAddress(), this.getRemotePort(), queue);\n\t\t\t\t\t\t\t\t//pusher = AudioPusher.getInstance(\"/test3.wav\", buddyJID, queue);\n\t\t\t\t\t\t\t\tMicrophonePusher pusher = MicrophonePusher.getInstance(String.valueOf(sendPort), queue);\n\t\t\t\t\t\t\t\tsender.start();\n\t\t\t\t\t\t\t\tif (!pusher.isRunning()) pusher.start();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// send terminate\n\t\t\t\t\t\t\tReasonElementType reason = new ReasonElementType(ReasonElementType.TYPE_UNSUPPORTED_TRANSPORTS, null);\n\t\t\t\t\t\t\treason.setAttributeSID(jiqPacket.getAttributeSID());\n\t\t\t\t\t\t\tjiqActionMessageSender.sendSessionTerminate(jiqPacket.getTo(), jiqPacket.getFrom(), jiqPacket.getAttributeSID(), reason, this);\n\t\t\t\t\t\t\tstate.changeSessionState(JingleIQPacket.AttributeActionValues.SESSION_TERMINATE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// send terminate\n\t\t\t\t\t\tReasonElementType reason = new ReasonElementType(ReasonElementType.TYPE_UNSUPPORTED_APPLICATIONS, null);\n\t\t\t\t\t\treason.setAttributeSID(jiqPacket.getAttributeSID());\n\t\t\t\t\t\tjiqActionMessageSender.sendSessionTerminate(jiqPacket.getTo(), jiqPacket.getFrom(), jiqPacket.getAttributeSID(), reason, this);\n\t\t\t\t\t\tstate.changeSessionState(JingleIQPacket.AttributeActionValues.SESSION_TERMINATE);\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tLog.i(XMPPClientLogger.TAG, \"This Combination not supported yet \" + \n\t\t\t\t\t\t\t\"State: \" + state.getSessionStateString() +\n\t\t\t\t\t\t\t\"Action: \" + action);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if(state.getSessionState() == SessionCallStateMachine.STATE_PENDING){\n\t\t\t\tif(action.equals(JingleIQPacket.AttributeActionValues.SESSION_ACCEPT)){\t\t\n\t\t\t\t\tString ipAddress = jiqPacket.getElementContent().get(0).getElementTransport().getCandidates().get(0).getAttributeIP();\n\t\t\t\t\tInteger port = (int)jiqPacket.getElementContent().get(0).getElementTransport().getCandidates().get(0).getAttributePort(); \n\t\t\t\t\t\n\t\t\t\t\tsetRemoteIPAddress(ipAddress);\n\t\t\t\t\tsetRemotePort(port);\n\t\t\t\t\t\n\t\t\t\t\t// Can send out session_accept\t\t\t\t\t\t\t\n\t\t\t\t\t// jiqActionMessageSender.sendSessionAccept(jiqPacket, this);\n\t\t\t\t\t// TODO: Time to send RTP Comfort Noise\n\t\t\t\t\t\n\t\t\t\t\t// TODO: If not received RTP Noise upto certain time, terminate session.\n\t\t\t\t\t\n\t\t\t\t\t// TODO: If receive Noise, then : state.changeSessionState(action); // set to Active\n\t\t\t\t\t\n\t\t\t\t\tstate.changeSessionState(JingleIQPacket.AttributeActionValues.SESSION_ACCEPT); // sets to Active.\n\t\t\t\t\tLog.i(XMPPClientLogger.TAG, \"State: \" + state.getSessionStateString());\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.i(\"MUCBuddy\", \"Starting receiver on port \" + this.getLocalPort());\n\t\t\t\t\t\tSipdroidSocket recv_socket = new SipdroidSocket(this.getLocalPort());\n\t\t\t\t\t\treceiver = new ReceiverThread(recv_socket);\n\t\t\t\t\t\treceiver.start();\n\t\t\t\t\t\tint sendPort = PortHandler.getInstance().getSendPort();\n\t\t\t\t\t\tSipdroidSocket send_socket = new SipdroidSocket(sendPort);\n\t\t\t\t\t\tBlockingQueue<short[]> queue = new LinkedBlockingQueue<short[]>();\n\t\t\t\t\t\tLog.i(\"MUCBuddy\", \"Starting sender to \" + this.getRemoteIPAddress() + \":\" + this.getRemotePort() + \" on port \" + sendPort);\n\t\t\t\t\t\tsender = new SenderThread(true, 8000/160, 160, send_socket, this.getRemoteIPAddress(), this.getRemotePort(), queue);\n\t\t\t\t\t\t//pusher = AudioPusher.getInstance(\"/test3.wav\", buddyJID, queue);\n\t\t\t\t\t\tMicrophonePusher pusher = MicrophonePusher.getInstance(String.valueOf(sendPort), queue);\n\t\t\t\t\t\tsender.start();\n\t\t\t\t\t\tif (!pusher.isRunning()) pusher.start();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} else if(action.equals(JingleIQPacket.AttributeActionValues.SESSION_TERMINATE)){\n\t\t\t\t\tstate.changeSessionState(action); // set to Terminate\n\t\t\t\t} else {\n\t\t\t\t\tLog.i(XMPPClientLogger.TAG, \"This Combination not supported yet \" + \n\t\t\t\t\t\t\t\"State: \" + state.getSessionStateString() +\n\t\t\t\t\t\t\t\"Action: \" + action);\n\t\t\t\t}\n\t\t\t} else if(state.getSessionState() == SessionCallStateMachine.STATE_ACTIVE){\n\t\t\t\tif(action.equals(JingleIQPacket.AttributeActionValues.SESSION_TERMINATE)){\n\t\t\t\t\tstate.changeSessionState(action); // set to Terminate\n\t\t\t\t\tif (receiver.isRunning()) receiver.halt();\n\t\t\t\t\tif (sender.isRunning()) sender.halt();\n\t\t\t\t\tpusher.removeQueue(buddyJID);\n\t\t\t\t\tif (pusher.isRunning() && pusher.numQueues() == 0) pusher.halt();\n\t\t\t\t} else {\n\t\t\t\t\tLog.i(XMPPClientLogger.TAG, \"This Combination not supported yet \" + \n\t\t\t\t\t\t\t\"State: \" + state.getSessionStateString() +\n\t\t\t\t\t\t\t\"Action: \" + action);\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t\n\t\t} else if (incomingPacket instanceof IQ) {\n\t\t\tIQ iq = (IQ) incomingPacket;\n\t\t\tLog.i(XMPPClientLogger.TAG, \"IQ Received in MUCBuddy \" + \"From: \" + iq.getFrom()+ \n\t\t\t\t\t\"To: \" + iq.getTo() + \"Type: \" + iq.getType());\n\t\t\t\n\t\t\tif (iq.getType() == IQ.Type.RESULT) {\n\t\t\t\tif(state.getSessionState() == SessionCallStateMachine.STATE_PENDING){\n\t\t\t\t\tstate.setSessionState(SessionCallStateMachine.STATE_PENDING); // Stay in pending\n\t\t\t\t} else if (state.getSessionState() == SessionCallStateMachine.STATE_ACTIVE){\n\t\t\t\t\t\n\t\t\t\t} else if (state.getSessionState() == SessionCallStateMachine.STATE_ENDED){\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public static void main (String args[]){\n\t\ttry{\n\t\tfinal String magicNumber = \"15540\";\n\t\tString id;\n\t\tDatagramSocket listenSocket = new DatagramSocket();\t\n\t\tSystem.out.println(\"Port: \" + listenSocket.getLocalPort());\n\t\tint portServer = Integer.parseInt(args[1]);\n\t\tInetAddress ipServer = InetAddress.getByName(args[0]);\n\t\tString message = \"REQUEST_TO_JOIN/\";\n\t\tbyte[] sendData = new byte[1024];\n\t\tsendData = message.getBytes();\n\t\tDatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, ipServer, portServer);\n\t\tlistenSocket.send(sendPacket);\n\t\tSystem.out.println(\"REQUEST_TO_JOIN\");\n\t\tlistenSocket.setSoTimeout(5000);\n\t\tArrayList<Job> jobQueue = new ArrayList<Job>();\n\n\t\t//Now waiting for server to acknowledge the Request\n\n\t\tbyte[] receiveData = new byte[1024];\n \t\tDatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);\n \t\tStringTokenizer st = null;\n \t\twhile (true){\n \t\t\ttry {\n\t \t\t\n\t \t\tlistenSocket.receive(receivePacket);\n\t \t\tSystem.out.println(\"Check1\");\n\t \t\tString fromServer = new String(receivePacket.getData());\n\t \t\tif (receivePacket.getAddress().toString().substring(1).equals(args[0]) && receivePacket.getPort() == portServer) // Checking if packet is received from server\n\t \t\t{\n\t \t\t\tst = new StringTokenizer(fromServer, \"/\");\n\t \t\t\tmessage = st.nextToken();\n\t \t\t\tid = st.nextToken();\n\t \t \t\tSystem.out.println(id);\t\n\t \t\t\tbreak;\n\t \t\t}\t\n\t\t\t}catch (SocketTimeoutException e) \n\t\t\t{\n\t \t\t\tSystem.out.println(\"Connection to Server: Timed out\");\n\t \t\t\treturn;\n\t\t\t}\n\t\t\t catch (Exception e) {e.printStackTrace();}\n\t\t\t}\n\t \t\t\n\t \t\t\n\t \tSystem.out.println(\"Connection to Server Established\");\n\t\tlistenSocket.setSoTimeout(100);\n\t\tboolean initFlag = true; // true if a job is currently \n\n\t\tJob currentJob = new Job();\n\t\t// waiting for commands from the server\n\t\twhile (true){\n\n\t\t\ttry {\n\t\t\tlistenSocket.receive(receivePacket);\n\t\t\tString fromServer = new String(receivePacket.getData());\n\t\t\tst = new StringTokenizer(fromServer, \"/\");\n\t\t\tmessage = st.nextToken();\n\n\t\t\tif (!message.equals(magicNumber))\n\t\t\t\tcontinue;\n\t\t\tmessage = st.nextToken();\n\n\t\t\t}catch (SocketTimeoutException e) {message = \"\";}\n\n\t\t\n\t\t\t// if not magic number, continue to next iteration\n\n\n\t\t\tif (!jobQueue.isEmpty() && !currentJob.running)\n\t\t\t{\n\t\t\t\t// System.out.println(\"Job Thread starting\");\n\t\t\t\tcurrentJob = jobQueue.remove(0);\n\t\t\t\tSystem.out.println(currentJob.rangeEnd);\n\t\t\t\tThread thread = new Thread(new WorkerThread(currentJob, ipServer, portServer, id));\n\t\t\t\tthread.start();\n\t\t\t}\n\n//=======================================================================================================================================================================\n// New job being assigned. Send JOB_ACK only if the current job is complete\n//=======================================================================================================================================================================\n\t\t\tif (message.equals(\"JOB\"))\n\t\t\t{\n\t\t\t\tif (!jobQueue.isEmpty())\n\t\t\t\t\tcontinue;\n\t\t\t\tString rangeStart = st.nextToken();\n\t\t\t\tString rangeEnd = st.nextToken();\n\t\t\t\tString hash = st.nextToken();\n\t\t\t\tSystem.out.println(\"=============== New Job Received ===============\");\n\t\t\t\tSystem.out.println(rangeStart);\n\t\t\t\tSystem.out.println(rangeEnd);\n\t\t\t\tSystem.out.println(\"=============== New Job Received ===============\");\t\t\t\t\n\t\t\t\tJob newJob = new Job(rangeStart, rangeEnd, hash);\n\t\t\t\tjobQueue.add(newJob);\n\t\t\t\tmessage = \"ACK_JOB/\" + rangeStart + '/' + rangeEnd + '/' + hash + '/';\n\t\t\t\tsendData = new byte[1024];\n\t\t\t\tsendData = message.getBytes();\n\t\t\t\tInetAddress ip = InetAddress.getByName(receivePacket.getAddress().toString().substring(1));\n\t\t\t\tint port = receivePacket.getPort();\n\t\t\t\tsendPacket = new DatagramPacket(sendData, sendData.length, ip, port);\n\t\t\t\tlistenSocket.send(sendPacket);\n\t\t\t}\n\t\t\t\n//=====================================================================================================================================\n// Do I make the server send additional details such as rangeStart, rangeEnd and hash while sending the cancel command?\n// Currently, working under the assumption that only CANCEL_JOB is being sent\n//=====================================================================================================================================\n\t\t\telse if (message.equals(\"CANCEL_JOB\"))\n\t\t\t{\t\n\t\t\t\tString hash = st.nextToken();\n\t\t\t\tif (currentJob.hash.equals(hash) && currentJob.running){\n\t\t\t\t\tcurrentJob.running = false;\n\t\t\t\tif (!jobQueue.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tJob queued = jobQueue.get(0);\n\t\t\t\t\tif (queued.hash.equals(hash))\n\t\t\t\t\t\tjobQueue.remove(0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n//=====================================================================================================================================\n// Send the Server the status of the current job\n//=====================================================================================================================================\n\n\t\t\telse if (message.equals(\"PING\"))\n\t\t\t{\n\n\t\t\t\tSystem.out.println(\"Ping Received\");\n\t\t\t\tif (!currentJob.running)\n\t\t\t\t{\n\t\t\t\t\tmessage = \"NO_JOB/\";\n\t\t\t\t}\n\t\t\t\tInetAddress ip = InetAddress.getByName(receivePacket.getAddress().toString().substring(1));\n\t\t\t\tint port = receivePacket.getPort();\n\n\t\t\t\tif (currentJob.running){\n\t\t\t\t\tString speed = Integer.toString(currentJob.speed);\n\t\t\t\t\tString rangeEnd = new String(currentJob.rangeEnd);\n\t\t\t\t\tString completed = new String(currentJob.completed);\n\t\t\t\t\tString command = \"1/\";\n\t\t\t\t\tmessage = Integer.toString(currentJob.speed) + '/' + currentJob.completed + '/' + rangeEnd + '/' + currentJob.hash + '/';\n\t\t\t\t\tif (!jobQueue.isEmpty()){\n\t\t\t\t\t\tJob queued = jobQueue.get(0);\n\t\t\t\t\t\tcommand = \"2/\";\n\t\t\t\t\t\tcompleted = new String(queued.rangeStart);\n\t\t\t\t\t\trangeEnd = new String(queued.rangeEnd);\n\t\t\t\t\t\tmessage = message + completed + '/' + rangeEnd + '/' + queued.hash + '/';\n\t\t\t\t\t}\n\n\t\t\t\t\tmessage = command + message;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(message);\n\t\t\t\tsendData = new byte[1024];\n\t\t\t\tsendData = message.getBytes();\n\t\t\t\tsendPacket = new DatagramPacket(sendData, sendData.length, ip, port);\n\t\t\t\tlistenSocket.send(sendPacket);\n\t\t\t}\n//=====================================================================================================================================\n// When timeout occurs code gets directly to this point\n//=====================================================================================================================================\n\t\t}\n\n\t} catch (Exception e) {e.printStackTrace();}\n}", "public void testEqualPayloadsSetSession() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 54213);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 54531);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n \n man0.addCreationListener(ftm0);\n man1.addCreationListener(ftm1);\n \n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n try {\n // We accept the request\n JingleSession session1 = request.accept();\n\n session1.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionClosed().\");\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n System.out.println(\"sessionClosedOnError().\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionDeclined().\");\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Responder: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n });\n\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request with equal payloads, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n session0.startOutgoing();\n\n Thread.sleep(20000);\n\n assertTrue(valCounter() == 1);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }", "synchronized void receiveJETON(){\n\tif(SC){\n\t\tJeton = true;\n\t}else{\n\t\tif (procId==0){\n\t\t\tSyncMessage sm = new SyncMessage(MsgType.JETON, 0, procId);\n\t\t\tsendTo(0, sm);\n\t\t}else{\n\t\t\tSyncMessage sm = new SyncMessage(MsgType.JETON, 1, procId);\n\t\t\tsendTo(1, sm);\n\t\t}\n\t}\n\tthis.notifyAll();\n\n}", "private void processServerPresence(PresenceMessage message) throws Exception {\n\n\t\tif (message.getFrom().getNode() == null) {\n\t\t\tprocessRayoNodePresence(message);\n\t\t} else {\n\t\t\t// find if presence is from a mixer or from a call\n\t\t\tGatewayMixer mixer = gatewayStorageService.getMixer(message.getFrom().getNode());\n\t\t\tif (mixer != null) {\n\t\t\t\tprocessMixerPresence(message, mixer);\n\t\t\t} else {\n\t\t\t\tprocessCallPresence(message);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run() {\n ZMQ.Context context = ZMQ.context(2);\n\n ZMQ.Socket publisher = context.socket(ZMQ.PUB);\n publisher.setAffinity(1);\n publisher.setHWM(0);\n publisher.bind(\"tcp://*:5556\");\n //publisher.bind(\"ipc://weather\");\n\n ZMQ.Socket incoming = context.socket(ZMQ.PULL);\n incoming.setHWM(0);\n incoming.setAffinity(2);\n incoming.bind(\"tcp://*:5557\");\n\n System.out.println(\"Sequencer is alive\");\n\n ZMQ.proxy(incoming, publisher, null);\n // while (! Thread.currentThread().isInterrupted()) {\n // byte[] data = incoming.recv(0);\n // //System.out.printf(\"Received message with %d bytes\\n\", data.length);\n // publisher.send(data, 0);\n // }\n\n publisher.close();\n incoming.close();\n context.term();\n }", "private void resumeListening() {\n Thread listener = new Thread() {\n @Override\n public void run() {\n try {\n mListenerSocket = new ServerSocket();\n mListenerSocket.setReuseAddress(true);\n mListenerSocket.bind(new InetSocketAddress(LOCAL_PORT));\n while (true) {\n Socket connSocket = mListenerSocket.accept();\n Scanner sc = new Scanner(connSocket.getInputStream());\n String encMsg = sc.nextLine();\n connSocket.close();\n sc.close();\n Message msg = mHandler.obtainMessage();\n msg.obj = encMsg;\n mHandler.sendMessage(msg);\n }\n } catch (IOException e) {\n Log.d(\"LANConnection\", \"Stopping listener thread due to error\", e);\n }\n }\n };\n listener.start();\n }", "private JavashipsServer() {\n\t\ttry {\n\t\t\tServerSocket server = new ServerSocket(PORT);\n\n\t\t\tSystem.out.println(new Date().toString() + \" - Now accepting clients.\");\n\n\t\t\t/* Listen for connecting players */\n\t\t\twhile (true) {\n\t\t\t\tSystem.out.println(\"Waiting for 2 players to connect.\");\n\n\t\t\t\t/* Intercept the first player. */\n\t\t\t\tPlayer player1 = new Player(server.accept(), \"Player 1\");\n\t\t\t\tSystem.out.println(new Date().toString() +\n\t\t\t\t\t\t\" - First player has been found: \" +\n\t\t\t\t\t\tplayer1.playerSocket.getInetAddress().getHostAddress() +\n\t\t\t\t\t\t\"/\" +\n\t\t\t\t\t\tplayer1.playerSocket.getPort());\n\n\t\t\t\tplayer1.setFirstAttacker();\n\n\t\t\t\t/* Intercept the second player. */\n\t\t\t\tPlayer player2 = new Player(server.accept(), \"Player 2\");\n\t\t\t\tSystem.out.println(new Date().toString() +\n\t\t\t\t\t\t\" - Second player has been found: \" +\n\t\t\t\t\t\tplayer2.playerSocket.getInetAddress().getHostAddress() +\n\t\t\t\t\t\t\"/\" +\n\t\t\t\t\t\tplayer2.playerSocket.getPort());\n\n\t\t\t\t/* Let the players know who to talk to when talking to their opponent. */\n\t\t\t\tplayer1.setOpponent(player2);\n\t\t\t\tplayer2.setOpponent(player1);\n\n\t\t\t\tplayer1.start();\n\t\t\t\tplayer2.start();\n\t\t\t}\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void addAnnouncedServers(ArrayList<ServerAddress> servers);", "public void findSongsAtDest(Messenger handler){\n switch(dh.getDestinationService()){\n case DataHandler.DEST_SPOTIFY: apiFindSongsOnSpotify(handler);//call to search music\n break;\n case DataHandler.DEST_APPLEMUSIC: apiFindSongsOnAppleMusic(handler);//call to search music\n break;\n\n default: msg = new Message();\n msg.obj = \"Destination is not specified or supported!\";\n msg.what = STATUS_ERROR;\n try {\n handler.send(msg);\n stopSelf();\n } catch (RemoteException e) {\n e.printStackTrace();\n } break;\n\n }\n }", "public interface ISwaListener {\n\n /**\n * Receives an SWA command. The server must use the given watcher in the following fuzzing process. If the client\n * did not send such a key \"watcher\", the given watcher will be empty. If the listener cannot process the command\n * for whatever reason it must throw an ProtocolExecutionException.\n *\n * @param watcher the watcher the client has chosen\n * @throws ProtocolExecutionException if the listener could not process the command\n */\n void receive(String watcher) throws ProtocolExecutionException;\n}", "public String listen(){\t\n\t\tSystem.out.println(\"Server lauscht.\");\n\t\treturn receiveString();\n\t}", "public void run() throws IOException {\n @SuppressWarnings(\"resource\")\n //Listens for a connection on the port number.\n ServerSocket s0 = new ServerSocket(PORT_NUMBER);\n Socket s = s0.accept();\n\n //Sets up the buffers to read and to write on the socket.\n BufferedReader r = new BufferedReader(new InputStreamReader(\n s.getInputStream(), StandardCharsets.UTF_8));\n BufferedWriter w = new BufferedWriter(new OutputStreamWriter(\n s.getOutputStream(), StandardCharsets.UTF_8));\n \n \n String command;\n\n //Reads the commands wrote on the socket line per line\n while ((command = r.readLine()) != null) {\n String[] msg = split(' ', command);\n\n switch (JassCommand.valueOf(msg[COMMAND_INDEX])) {\n\n case PLRS:\n \n //Creates the players map with the arguments and calls the setPlayers function of the underlyingPlayer.\n Map<PlayerId, String> players = new HashMap<>();\n for (int i = 0; i < PlayerId.COUNT; i++) {\n players.put(PlayerId.ALL.get(i),\n deserializeString(split(',', msg[ARG_2_INDEX])[i]));\n }\n localPlayer.setPlayers(PlayerId.ALL.get(deserializeInt(msg[ARG_1_INDEX])),\n players);\n break;\n\n case CARD:\n \n //Calls the cardToPlay function of the underlying function with the arguments of the message.\n String[] st = split(',', msg[ARG_1_INDEX]);\n TurnState state = TurnState.ofPackedComponents(\n deserializeLong(st[ARG_0_INDEX]), deserializeLong(st[ARG_1_INDEX]),\n deserializeInt(st[ARG_2_INDEX]));\n Card c = localPlayer.cardToPlay(state,\n CardSet.ofPacked(deserializeLong(msg[ARG_2_INDEX])));\n w.write(serializeInt(c.packed()));\n w.newLine();\n w.flush();\n break;\n\n case HAND: \n localPlayer\n .updateHand(CardSet.ofPacked(deserializeLong(msg[ARG_1_INDEX])));\n break;\n\n case TRMP:\n localPlayer.setTrump(Color.ALL.get(deserializeInt(msg[ARG_1_INDEX])));\n break;\n\n case SCOR:\n localPlayer\n .updateScore(Score.ofPacked(deserializeLong(msg[ARG_1_INDEX])));\n break;\n\n case TRCK:\n localPlayer.updateTrick(Trick.ofPacked(deserializeInt(msg[ARG_1_INDEX])));\n break;\n\n case WINR:\n localPlayer\n .setWinningTeam(TeamId.ALL.get(deserializeInt(msg[ARG_1_INDEX])));\n break;\n\n default:\n }\n }\n }", "public void relay(Message msg) {\n if (roles.containsKey(msg.dst)) {\n roles.get(msg.dst).deliver(msg);\n //System.out.println(msg.print());\n } else {\n if (debug) {\n System.out.print(\"\\nServer: \" + index + \": Dst not found: \" + msg.print());\n }\n }\n }", "@Override\n public void completed(AsynchronousSocketChannel sockChannel, AsynchronousServerSocketChannel serverSockMain ) {\n serverSockMain.accept( serverSockMain, this );\n\n //Print IP Address\n try{\n System.out.println( sockChannel.getLocalAddress());\n clientChannel = sockChannel;\n }catch(IOException e) {\n\n e.printStackTrace();\n }\n\n //Add To Client List\n //list.add(list.size(), sockChannel);\n\n //start to read message from the client\n startRead( sockChannel );\n \n }", "public static void echo_server_single( int portno ) \nthrows IOException\n {\n ServerSocket acc = new ServerSocket( portno );\n print_my_host_port( portno );\n while( true )\n {\n stdout.printf(\"accepting incoming connections (hash== %s) ...\\n\", \n acc.hashCode());\n Socket com = acc.accept();\n tcp_peeraddr_print( com );\n EchoServerWorker esw = new EchoServerWorker(com);\n esw.run();\n } // while\n}", "public Long[] getInitiatorIDs() { return this.initiatorIDs; }", "@Override\n\tpublic void onNetStart(String id) {\n\t\t\n\t}", "public void sendDirectedPresence() {\n Cursor cursor = getContentResolver().query(\n Roster.CONTENT_URI,\n new String[]{Roster.LAST_UPDATED},\n null, null, \"last_updated desc\"\n );\n if (cursor.moveToFirst()) {\n long after = cursor.getLong(\n cursor.getColumnIndex(Roster.LAST_UPDATED));\n Presence presence = new Presence(Type.available);\n presence.setTo(\"broadcaster.buddycloud.com\");\n client.sendFromAllResources(presence);\n }\n cursor.close();\n }", "public ServerTool(JavaPlugin plugin) {\n\t\tthis.plugin = plugin;\n\t\tthis.queue = new ArrayList<String[]>();\n\t\tBukkit.getMessenger().registerOutgoingPluginChannel(this.plugin, \"BungeeCord\");\n\t\tBukkit.getMessenger().registerIncomingPluginChannel(this.plugin, \"BungeeCord\", this);\n\t}", "public void processStart(){\n initWorkerQueue();\n DataBean serverArgs = new DataBean();\n serverArgs.setValue(\"mode\",\"server\");\n serverArgs.setValue(\"messagekey\",\"72999\");\n serverArgs.setValue(\"user\",\"auth\");\n serverArgs.setValue(\"messagechannel\",\"/esb/system\");\n messageClient = new MessageClient(this,serverArgs);\n Helper.writeLog(1,\"starting message server\");\n messageClient.addHandler(this);\n \n }", "private static void setupServerStreams(ProjectType project) throws IOException{\r\n serverObjectOutputStream = new ObjectOutputStream(socket.getOutputStream());\r\n serverObjectOutputStream.flush();\r\n serverObjectInputStream = new ObjectInputStream(socket.getInputStream());\r\n System.out.println(\"Server: Streams were configured properly!\");\r\n prepareInstructionPacket(project);\r\n }", "public synchronized void listen() {\n// synchronized (this) {\n try {\n String input;\n if ((input = in.readLine()) != null) {\n parseCommand(input);\n }\n } catch (IOException ex) {\n Logger.getLogger(ClientIO.class.getName()).log(Level.SEVERE, null, ex);\n }\n// }\n }", "void startListening()\n {\n if (outstanding_accept != null || open_connection != null) {\n return;\n }\n \n outstanding_accept = new AcceptThread(bt_adapter, handler);\n outstanding_accept.start();\n }", "@Override\r\n public void onStartListening() {\r\n Tile tile = getQsTile();\r\n context = getApplicationContext();\r\n int savedNetworkType = mSharedPreferences.getNetworkType(context);\r\n int subId = -1;\r\n int slotIndex = -1;\r\n int simState = -1;\r\n int newNetworkType = -1;\r\n SimService service = SimService.getInstance(context);\r\n\r\n if (permissionsGranted()) {\r\n subId = service.getDefaultDataSubId(context);\r\n if(subId > 0) {\r\n slotIndex = service.getSlotIndex(context, subId);\r\n if(slotIndex > -1) {\r\n simState = service.getSimState(context, slotIndex);\r\n if (simState == Constants.SIM_READY) {\r\n newNetworkType = service.getPreferredNetworkType(context);\r\n mSharedPreferences.saveNetworkType(context, newNetworkType);\r\n }\r\n }\r\n }\r\n if(newNetworkType > -1) {\r\n int tileState;\r\n if (Constants.NON_LTE_NETWORK_TYPES.contains(newNetworkType)) {\r\n tileState = Tile.STATE_INACTIVE;\r\n } else {\r\n tileState = Tile.STATE_ACTIVE;\r\n }\r\n updateTileState(tileState, tile);\r\n }\r\n else{\r\n updateTileState(getNewTileState(newNetworkType, tile), tile);\r\n }\r\n\r\n } else {\r\n initTileState();\r\n }\r\n //Log.d(TAG, \"onStartListening old network type: \" + savedNetworkType + \", new network type: \" + newNetworkType + \", subId: \" + subId\r\n //+ \", simState: \" + simState + \", slotIndex: \" + slotIndex);\r\n }", "public ServerA(){}", "Seen.AToServer getSeenAToServer();", "ResponseDTO startAllServers();", "@Subscribe(threadMode = ThreadMode.MAIN)\n public void onNetworkInfoReceived(OnReceiverNetInfoEvent event){\n\n WifiP2pInfo info = event.getInfo();\n\n // InetAddress from WifiP2pInfo struc.\n groupOwnerAddress = info.groupOwnerAddress.getHostAddress();\n // String port = \"8888\";\n\n\n // After the group negotiation, we can determine the group owner\n // (server).\n if(info.groupFormed && info.isGroupOwner){\n Toast.makeText(getContext(), \"Group formed. Host\", Toast.LENGTH_SHORT).show();\n if(peersDialog.isShowing())peersDialog.dismiss();\n\n // starting a data thread with the latest connected device\n Wifip2pService mService = new Wifip2pService(getContext(), mHandler,port, true, groupOwnerAddress);\n // assign the name of the latest connect device to this thread so we keep track\n mService.deviceName = devicesConnected.get(devicesConnected.size() - 1);\n connectionThreads.add(mService);\n\n\n // One common case is creating a group owner thread and accepting\n // incoming connections.\n } else if(info.groupFormed){\n Toast.makeText(getContext(), \"Connected as Peer\", Toast.LENGTH_SHORT).show();\n if(peersDialog.isShowing())peersDialog.dismiss();\n\n // starting a data thread with the owner\n Wifip2pService mService = new Wifip2pService(getContext(), mHandler, port, false, groupOwnerAddress);\n mService.deviceName = devicesConnected.get(devicesConnected.size() - 1);\n connectionThreads.add(mService);\n\n }\n\n }", "private void createAndListen() {\n\n\t\t\n\t}", "private static void unicast_recv(String sourceIdAndMsg, ConcurrentLinkedQueue<String> sharedRecbuf) {\n \tsynchronized(chatter3.class) { \n \t\tsharedRecbuf.add(sourceIdAndMsg + \" \" + new Timestamp(System.currentTimeMillis()).toString());\n \t}\n\t}", "void receive(String watcher) throws ProtocolExecutionException;", "@Override\n default IServerPrx ice_batchDatagram()\n {\n return (IServerPrx)_ice_batchDatagram();\n }", "private void handleSubscribeReceived(final Jid fromID,\n final String displayName)\n {\n // run waiting for user response in different thread\n // as this seems to block the packet dispatch thread\n // and we don't receive anything till we unblock it\n new Thread(new Runnable() {\n public void run()\n {\n if (logger.isTraceEnabled())\n {\n logger.trace(\n fromID\n + \" wants to add you to its contact list\");\n }\n\n // buddy want to add you to its roster\n ContactJabberImpl srcContact\n = ssContactList.findContactById(fromID);\n\n Presence.Type responsePresenceType = null;\n\n if(srcContact == null)\n {\n srcContact = createVolatileContact(fromID, displayName);\n }\n else\n {\n if(srcContact.isPersistent())\n responsePresenceType = Presence.Type.subscribed;\n }\n\n if(responsePresenceType == null)\n {\n AuthorizationRequest req = new AuthorizationRequest();\n AuthorizationResponse response\n = handler.processAuthorisationRequest(\n req, srcContact);\n\n if(response != null)\n {\n if(response.getResponseCode()\n .equals(AuthorizationResponse.ACCEPT))\n {\n responsePresenceType\n = Presence.Type.subscribed;\n if (logger.isInfoEnabled())\n logger.info(\n \"Sending Accepted Subscription\");\n }\n else if(response.getResponseCode()\n .equals(AuthorizationResponse.REJECT))\n {\n responsePresenceType\n = Presence.Type.unsubscribed;\n if (logger.isInfoEnabled())\n logger.info(\n \"Sending Rejected Subscription\");\n }\n }\n }\n\n // subscription ignored\n if(responsePresenceType == null)\n return;\n\n Presence responsePacket = new Presence(\n responsePresenceType);\n\n responsePacket.setTo(fromID);\n try\n {\n parentProvider.getConnection().sendStanza(responsePacket);\n }\n catch (NotConnectedException | InterruptedException e)\n {\n logger.error(\"Could not send presence repsonse\", e);\n }\n }}).start();\n }", "public void testAcceptJingleSession() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 54222);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 54567);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads2());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n \n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n incCounter();\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n\n // We accept the request\n try {\n JingleSession session1 = request.accept();\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n session0.startOutgoing();\n\n Thread.sleep(20000);\n\n assertTrue(valCounter() > 0);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if(!SipInfo.devList.isEmpty()) {\n for (int position=0;position<SipInfo.devList.size();position++) {\n SipURL remote = new SipURL(SipInfo.devList.get(position).getUserid(), SipInfo.serverIp, SipInfo.SERVER_PORT_USER);\n SipInfo.toUser = new NameAddress(SipInfo.devList.get(position).getUserid(), remote);\n SipInfo.sipUser.sendMessage(SipMessageFactory.createNotifyRequest(SipInfo.sipUser, SipInfo.toUser\n , SipInfo.user_from, BodyFactory.createAlarm(userId)));\n }\n }\n }", "@Override\n public void sendFromAllResources(Stanza stanza)\n throws RemoteException\n {\n BuddycloudService.this.sendFromAllResources(stanza);\n }", "Set<StreamSessionHandler> getSubscribers();", "private void addPresenceListener() {\n StanzaTypeFilter presenceFilter = new StanzaTypeFilter(Presence.class);\n\n connection.addAsyncStanzaListener(new StanzaListener() {\n @Override\n public void processPacket(Stanza packet) throws SmackException.NotConnectedException {\n Presence presence = (Presence) packet;\n String username = presence.getFrom();\n username = TextUtils.split(username, \"@\")[0];\n String status = Presence.Type.available.equals(((Presence) packet).getType())\n ? \"online\" : \"offline\";\n if (rosterListener != null) {\n rosterListener.presenceCallback(username, status);\n }\n }\n }, presenceFilter);\n }", "public void run() \r\n {\r\n String talkingPartner = \"server\";\r\n String message = \"\";\r\n boolean keepGoing = true;\r\n while(keepGoing) \r\n {\r\n\r\n try \r\n {\r\n message = (String) in.readObject();\r\n System.out.println(message);\r\n displayMessage(message);\r\n }\r\n catch (IOException e)\r\n {\r\n displayMessage(username + \" Exception reading Streams: \" + e);\r\n break;\r\n }\r\n catch(ClassNotFoundException e2)\r\n {\r\n break;\r\n }\r\n //logout command \r\n if (message.equals(\"/logout\"))\r\n {\r\n broadcast(\"***ATTEMPTING LOGOUT***\", talkingPartner);\r\n removeClient(id);\r\n keepGoing = false;\r\n }\r\n //help command\r\n if (message.equals(\"/help\"))\r\n {\r\n broadcast(\"***COMMANDS /help /logout /chat***\", talkingPartner);\r\n\r\n }\r\n //private chat command then takes a follow up name\r\n if (message.equals(\"/chat\"))\r\n {\r\n broadcast(\"***PLEASE TYPE THE NAME OF A USER***\", talkingPartner);\r\n String name = \"unselected\";\r\n try {\r\n\r\n name = (String) in.readObject();\r\n }\r\n catch (IOException e)\r\n {\r\n displayMessage(username + \" Exception reading Streams: \" + e);\r\n break;\r\n }\r\n catch(ClassNotFoundException e2) \r\n {\r\n break;\r\n }\r\n for(int i = 0; i < userNames.size(); i++ )\r\n {\r\n if(name.equals(userNames.get(i))){\r\n broadcast(\"user found starting chat!\", talkingPartner);\r\n }\r\n }\r\n\r\n }\r\n //broadcasts the message to everyone for group chat\r\n broadcast(username + \": \" + message, \"server\");\r\n }\r\n\r\n //shuts it down\r\n removeClient(id);\r\n close();\r\n }" ]
[ "0.5277132", "0.5237409", "0.50047624", "0.5003333", "0.49945447", "0.49735516", "0.49572733", "0.49305794", "0.49021775", "0.4814952", "0.48103452", "0.47946343", "0.47825676", "0.4780619", "0.47641528", "0.4763219", "0.47600695", "0.4754315", "0.4728996", "0.4726136", "0.46998838", "0.4696233", "0.46921244", "0.46868047", "0.46603355", "0.46591416", "0.46241543", "0.46188658", "0.4603171", "0.45917183", "0.45882076", "0.458797", "0.45860156", "0.45805144", "0.4579969", "0.457259", "0.45669168", "0.45641053", "0.4563755", "0.45587245", "0.45571017", "0.45533648", "0.45506752", "0.4543249", "0.4537887", "0.45343143", "0.45339015", "0.45264065", "0.45197302", "0.45169467", "0.45162147", "0.4515423", "0.45123225", "0.45111027", "0.4508608", "0.45054024", "0.45009166", "0.44937208", "0.4492682", "0.44720387", "0.4471607", "0.44680393", "0.44640455", "0.4463241", "0.44611594", "0.44589177", "0.44539952", "0.44537196", "0.4439142", "0.44334614", "0.44331366", "0.44326612", "0.44286528", "0.44258153", "0.44231215", "0.4415105", "0.44133952", "0.44111052", "0.4410469", "0.440903", "0.4400875", "0.4398079", "0.43953866", "0.43950412", "0.43873793", "0.43872494", "0.43817312", "0.43805957", "0.43797484", "0.4377163", "0.43738452", "0.4370503", "0.43697378", "0.43696848", "0.43681428", "0.43644315", "0.43602246", "0.43598676", "0.4359429", "0.43591896", "0.4359101" ]
0.0
-1
a StanzaRelay receiving stanzas which are targeted to JIDs which are external to this server
public void setExternalRelay(StanzaRelay externalRelay) { this.externalRelay = externalRelay; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ChatWithServer.Relay getChatWithServerRelay();", "public interface Transport {\n\n /**\n * This method returns id of the current transport\n * @return\n */\n String id();\n\n /**\n * This methos returns Id of the upstream node\n * @return\n */\n String getUpstreamId();\n\n /**\n * This method returns random\n *\n * @param id\n * @param exclude\n * @return\n */\n String getRandomDownstreamFrom(String id, String exclude);\n\n /**\n * This method returns consumer that accepts messages for delivery\n * @return\n */\n Consumer<VoidMessage> outgoingConsumer();\n\n /**\n * This method returns flow of messages for parameter server\n * @return\n */\n Publisher<INDArrayMessage> incomingPublisher();\n\n /**\n * This method starts this Transport instance\n */\n void launch();\n\n /**\n * This method will start this Transport instance\n */\n void launchAsMaster();\n\n /**\n * This method shuts down this Transport instance\n */\n void shutdown();\n\n /**\n * This method will send message to the network, using tree structure\n * @param message\n */\n void propagateMessage(VoidMessage message, PropagationMode mode) throws IOException;\n\n /**\n * This method will send message to the node specified by Id\n *\n * @param message\n * @param id\n */\n void sendMessage(VoidMessage message, String id);\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id) throws InterruptedException;\n\n /**\n * This method will send message to specified node, and will return its response\n *\n * @param message\n * @param id\n * @param <T>\n * @return\n */\n <T extends ResponseMessage> T sendMessageBlocking(RequestMessage message, String id, long waitTime, TimeUnit timeUnit) throws InterruptedException;\n\n /**\n * This method will be invoked for all incoming messages\n * PLEASE NOTE: this method is mostly suited for tests\n *\n * @param message\n */\n void processMessage(VoidMessage message);\n\n\n /**\n * This method allows to set callback instance, which will be called upon restart event\n * @param callback\n */\n void setRestartCallback(RestartCallback callback);\n\n /**\n * This methd allows to set callback instance for various\n * @param cls\n * @param callback\n * @param <T1> RequestMessage class\n * @param <T2> ResponseMessage class\n */\n <T extends RequestMessage> void addRequestConsumer(Class<T> cls, Consumer<T> consumer);\n\n /**\n * This method will be called if mesh update was received\n *\n * PLEASE NOTE: This method will be called ONLY if new mesh differs from current one\n * @param mesh\n */\n void onMeshUpdate(MeshOrganizer mesh);\n\n /**\n * This method will be called upon remap request\n * @param id\n */\n void onRemap(String id);\n\n /**\n * This method returns total number of nodes known to this Transport\n * @return\n */\n int totalNumberOfNodes();\n\n\n /**\n * This method returns ID of the root node\n * @return\n */\n String getRootId();\n\n /**\n * This method checks if all connections required for work are established\n * @return true\n */\n boolean isConnected();\n\n /**\n * This method checks if this node was properly introduced to driver\n * @return\n */\n boolean isIntroduced();\n\n /**\n * This method checks connection to the given node ID, and if it's not connected - establishes connection\n * @param id\n */\n void ensureConnection(String id);\n}", "@Override\r\n\tpublic void receiveResult(Stanza stanza, Object payload) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void receiveMessage(Stanza stanza, Object payload) {\n\t\t\r\n\t}", "public void run()\n {\n parentProvider.getConnection()\n .removeAsyncStanzaListener(this);\n\n // init ssList\n ssContactList.init(contactChangesListener);\n\n // as we have dispatched the contact list and Roster is ready\n // lets start the jingle nodes discovery\n parentProvider.startJingleNodesDiscovery();\n }", "public void startInbound();", "public static void relayActivityBroadcastToClients(JSONObject payload) {\n for(Connection conn : getLoggedInUserConnections()) {\n Message.relayActivityBroadcast(conn, payload);\n }\n for(Connection conn : anonClients) {\n if (conn != null)\n Message.relayActivityBroadcast(conn, payload);\n }\n }", "@Override\r\n\tpublic void receiveInfo(Stanza stanza, String node, XMPPInfo info) {\n\t\t\r\n\t}", "public void testMediaManager() {\n\n resetCounter();\n \n XMPPConnection x0 = getConnection(0);\n XMPPConnection x1 = getConnection(1);\n\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 20004);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 20040);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n\n try {\n \n JingleMediaManager jingleMediaManager = new JingleMediaManager(ftm0) {\n // Media Session Implementation\n public JingleMediaSession createMediaSession(final PayloadType payloadType, final TransportCandidate remote,\n final TransportCandidate local, final JingleSession jingleSession) {\n return new JingleMediaSession(payloadType, remote, local, null, null) {\n\n public void initialize() {\n\n }\n\n public void startTrasmit() {\n incCounter();\n System.out.println(\"Transmit\");\n }\n\n public void startReceive() {\n incCounter();\n System.out.println(\"Receive\");\n }\n\n public void setTrasmit(boolean active) {\n }\n\n public void stopTrasmit() {\n incCounter();\n System.out.println(\"Stop Transmit\");\n }\n\n public void stopReceive() {\n incCounter();\n System.out.println(\"Stop Receive\");\n }\n };\n }\n\n public List<PayloadType> getPayloads() {\n return getTestPayloads1();\n }\n\n public PayloadType.Audio getPreferredAudioPayloadType() {\n return (PayloadType.Audio) getTestPayloads1().get(0);\n }\n\n };\n \n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(jingleMediaManager);\n\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(jingleMediaManager);\n\n JingleManager jm0 = new JingleManager(x0, trl0);\n JingleManager jm1 = new JingleManager(x1, trl1);\n\n jm1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n public void sessionRequested(final JingleSessionRequest request) {\n\n try {\n\n JingleSession session = request.accept();\n\n session.startIncoming();\n } catch (XMPPException e) {\n e.printStackTrace();\n }\n\n }\n });\n\n JingleSession js0 = jm0.createOutgoingJingleSession(x1.getUser());\n\n js0.startOutgoing();\n\n Thread.sleep(10000);\n js0.terminate();\n\n Thread.sleep(3000);\n\n System.out.println(valCounter());\n\n assertTrue(valCounter() == 8);\n\n Thread.sleep(15000);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "@Override\r\n\tpublic void receiveItems(Stanza stanza, String node, List<String> items) {\n\t\t\r\n\t}", "private void handleSubscribeReceived(final Jid fromID,\n final String displayName)\n {\n // run waiting for user response in different thread\n // as this seems to block the packet dispatch thread\n // and we don't receive anything till we unblock it\n new Thread(new Runnable() {\n public void run()\n {\n if (logger.isTraceEnabled())\n {\n logger.trace(\n fromID\n + \" wants to add you to its contact list\");\n }\n\n // buddy want to add you to its roster\n ContactJabberImpl srcContact\n = ssContactList.findContactById(fromID);\n\n Presence.Type responsePresenceType = null;\n\n if(srcContact == null)\n {\n srcContact = createVolatileContact(fromID, displayName);\n }\n else\n {\n if(srcContact.isPersistent())\n responsePresenceType = Presence.Type.subscribed;\n }\n\n if(responsePresenceType == null)\n {\n AuthorizationRequest req = new AuthorizationRequest();\n AuthorizationResponse response\n = handler.processAuthorisationRequest(\n req, srcContact);\n\n if(response != null)\n {\n if(response.getResponseCode()\n .equals(AuthorizationResponse.ACCEPT))\n {\n responsePresenceType\n = Presence.Type.subscribed;\n if (logger.isInfoEnabled())\n logger.info(\n \"Sending Accepted Subscription\");\n }\n else if(response.getResponseCode()\n .equals(AuthorizationResponse.REJECT))\n {\n responsePresenceType\n = Presence.Type.unsubscribed;\n if (logger.isInfoEnabled())\n logger.info(\n \"Sending Rejected Subscription\");\n }\n }\n }\n\n // subscription ignored\n if(responsePresenceType == null)\n return;\n\n Presence responsePacket = new Presence(\n responsePresenceType);\n\n responsePacket.setTo(fromID);\n try\n {\n parentProvider.getConnection().sendStanza(responsePacket);\n }\n catch (NotConnectedException | InterruptedException e)\n {\n logger.error(\"Could not send presence repsonse\", e);\n }\n }}).start();\n }", "public void run() {\n JabberPacket packet=null;\n\n do {\n try {\n packet=queue.pull();\n\n if (packet!=null) {\n PacketHandler h=null;\n if (((JabberSkypeSettings) Main.Settings()).getDebug()) {\n \tSystem.out.println(\"Client: \" + packet.generateXML());\n }\n String e=packet.getElement();\n if (e!=null) {\n String key=null;\n\n if (e.equals(\"iq\")) {\n JabberPacket pQuery=packet.getFirstChild(\"query\");\n\n if (pQuery!=null) {\n key=pQuery.getAttribute(\"xmlns\");\n } else {\n \tJabberPacket pVcard=packet.getFirstChild(\"vcard\");\n \tif (pVcard!= null) {\n \t\tkey=pVcard.getAttribute(\"xmlns\");\n \t\t//need to do difference between setting vcard, and getting it for a user\n \t}\n }\n } else\n key=e;\n\n if (key!=null) {\n h=(PacketHandler)mHandlers.get(key);\n\n if (h==null)\n h=getDefaultHandler();\n\n h.processPacket(packet);\n } //key!=null\n } //e!=null\n } //packet!=null\n } //try\n catch (Exception e) {\n server.getLogger().severe(\"Caught exception: \"+e.getMessage());\n }\n } while (packet!=null && server.getRunning());\n }", "public static void main(String[] args) {\n\t\tClientResource resource = new ClientResource(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"http://shironambd.com/api/v1/receiver/?access_key=529a2d308333d14178f5c54d&format=json\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"&mapId=0\");\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tRepresentation representation = resource.get();\r\n\t\t\tresponse = representation.getText();\r\n\t\t} catch (ResourceException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tList<Receiver> receivers = new ArrayList<Receiver>();\r\n\t\ttry {\r\n\t\t\tJsonElement jelement = new JsonParser().parse(response);\r\n\t\t\tJsonObject jobject = jelement.getAsJsonObject();\r\n\t\t\tJsonArray jarray = jobject.getAsJsonArray(\"objects\");\r\n\r\n\t\t\tint receiverId = 0;\r\n\r\n\t\t\tint arrayLength = jarray.size();\r\n\t\t\tfor (int i = 0; i < arrayLength; i++) {\r\n\t\t\t\tjobject = jarray.get(i).getAsJsonObject();\r\n\t\t\t\treceiverId = Integer.parseInt(jobject.get(\"receiverId\").toString().trim());\r\n\t\t\t\tint x = jobject.get(\"x\").getAsInt();\r\n\t\t\t\tint y = jobject.get(\"y\").getAsInt();\r\n\t\t\t\tint mapId = jobject.get(\"mapId\").getAsInt();\r\n\t\t\t\tReceiver receiver = new Receiver(receiverId);\r\n\t\t\t\treceiver.setxPos(x);\r\n\t\t\t\treceiver.setyPos(y);\r\n\t\t\t\treceivers.add(receiver);\r\n\t\t\t\tSystem.out.println(receiver);\r\n\t\t\t\tSystem.out.println(mapId);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private UDPSender(final URI serverURI) {\n\t\tsuper(serverURI);\n\t\t\n\t\t\t\t\n\t\t//InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory());\n\t\tchannelStateListener.addChannelStateAware(this);\n\t\tloggingHandler = new LoggingHandler(InternalLogLevel.ERROR, true);\t\t\n\t\tchannelFactory = new NioDatagramChannelFactory(workerPool);\n\t\tbstrap = new ConnectionlessBootstrap(channelFactory);\n\t\tbstrap.setPipelineFactory(this);\n\t\tbstrap.setOption(\"broadcast\", true);\n\t\tbstrap.setOption(\"localAddress\", new InetSocketAddress(0));\n\t\tbstrap.setOption(\"remoteAddress\", new InetSocketAddress(serverURI.getHost(), serverURI.getPort()));\n\t\tbstrap.setOption(\"receiveBufferSizePredictorFactory\", new FixedReceiveBufferSizePredictorFactory(2048));\n\t\t\n\t\tlisteningSocketAddress = new InetSocketAddress(\"0.0.0.0\", 0);\n\t\t//listeningSocketAddress = new InetSocketAddress(\"127.0.0.1\", 0);\n\t\t\t\n\t\t//senderChannel = (NioDatagramChannel) channelFactory.newChannel(getPipeline());\n\t\tsenderChannel = bstrap.bind();\n\t\tcloseGroup.add(senderChannel);\n\t\tlog(\"Listening on [\" + senderChannel.getLocalAddress()+ \"]\");\t\t\t\t\t\n\t\t\n\t\t\n//\t\tsenderChannel.bind().addListener(new ChannelFutureListener() {\n//\t\t\tpublic void operationComplete(ChannelFuture f) throws Exception {\n//\t\t\t\tif(f.isSuccess()) {\n//\t\t\t\t\tlog(\"Listening on [\" + f.getChannel().getLocalAddress()+ \"]\");\t\t\t\t\t\n//\t\t\t\t} else {\n//\t\t\t\t\tlog(\"Failed to start listener. Stack trace follows\");\n//\t\t\t\t\tf.getCause().printStackTrace(System.err);\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\tsenderChannel.getConfig().setBufferFactory(new DirectChannelBufferFactory());\n//\t\tsenderChannel.connect(socketAddress).addListener(new ChannelFutureListener() {\n//\t\t\t@Override\n//\t\t\tpublic void operationComplete(ChannelFuture future) throws Exception {\n//\t\t\t\tconnected.set(true);\t\n//\t\t\t\tsentryState.setState(SentryState.CALLBACK);\n//\t\t\t}\n//\t\t});\n\t\t\n\t\t\n\t\t//socketAddress = new InetSocketAddress(\"239.192.74.66\", 25826);\n\t\tsendHello();\n\t}", "public void testFullTest() {\n\n resetCounter();\n \n XMPPConnection x0 = getConnection(0);\n XMPPConnection x1 = getConnection(1);\n\n XMPPConnection.DEBUG_ENABLED = true;\n\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 20080);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n JmfMediaManager jmf0 = new JmfMediaManager(ftm0);\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(jmf0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 20040);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n JmfMediaManager jmf1 = new JmfMediaManager(ftm1);\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(jmf1);\n\n JingleManager man0 = new JingleManager(x0, trl0);\n JingleManager man1 = new JingleManager(x1, trl1);\n \n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n public void sessionRequested(final JingleSessionRequest request) {\n\n try {\n\n JingleSession session = request.accept();\n session.addListener(new JingleSessionListener() {\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Establish In\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n\n public void sessionClosed(String reason, JingleSession jingleSession) {\n // incCounter();\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n // incCounter();\n }\n });\n\n session.startIncoming();\n } catch (XMPPException e) {\n e.printStackTrace();\n }\n\n }\n });\n\n for (int i = 0; i < 3; i++)\n try {\n\n JingleSession js0 = man0.createOutgoingJingleSession(x1.getUser());\n\n js0.addListener(new JingleSessionListener() {\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Establish Out\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n\n public void sessionClosed(String reason, JingleSession jingleSession) {\n // incCounter();\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n // incCounter();\n }\n });\n\n js0.startOutgoing();\n\n Thread.sleep(8000);\n js0.terminate();\n\n Thread.sleep(3000);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n System.out.println(valCounter());\n assertTrue(valCounter() == 6);\n }", "public static void serverBroadcast(JSONObject obj,Socket source,boolean f){\n\t\t\n\t\tfor(Connection con:Control.getInstance().getConnections()){\n\t\t\tString conAddr = con.getSocket().getRemoteSocketAddress().toString();\n\t\t\tif(f){\n\t\t\t\tif(LocalserverStorage.getInstance().getAuthServers().contains(conAddr)){//all linked servers\n\t\t\t\t\tcon.writeMsg(obj.toJSONString());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tString sourceAddr = source.getRemoteSocketAddress().toString();\n\t\t\t\tif(!sourceAddr.equals(conAddr)){//not to source\n\t\t\t\t\tif(LocalserverStorage.getInstance().getAuthServers().contains(conAddr)){//not to source\n\t\t\t\t\t\tcon.writeMsg(obj.toJSONString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "PToP.S2BRelay getS2BRelay();", "public JID getFromJID() {\n return fromJID;\n }", "@Override\n\tpublic void StartListening()\n\t{\n\t\t\n\t}", "private void requestServerId() {\n connection.startClient(lbInfo.getIp(), lbInfo.getPort());\n System.out.println(\"Connected!\");\n connection.sendMessage(connectionInfo);\n }", "private void processPacket(DatagramPacket packet) {\n String data = new String(packet.getData());\n if (data.startsWith(\"/c/\")) {\n int ID = UniqueIdentifier.getIdentifier();\n clients.add(new ServerClient(data.split(\"/c/|/e/\")[1], packet.getAddress(), packet.getPort(), ID));\n System.out.println(\"Client connected with the name: '\" + data.split(\"/c/|/e/\")[1] + \"' @ \" + packet.getAddress() + \":\" + packet.getPort() + \" and is now using the ID: \" + ID);\n send((\"/c/\" + ID + \"/e/\").getBytes(), packet.getAddress(), packet.getPort());\n } else if (data.startsWith(\"/d/\")) {\n disconnect(Integer.parseInt(data.split(\"/d/|/e/\")[1]), true);\n } else if (data.startsWith(\"/sa/\")) {\n sendToAll((\"/m/\" + data.split(\"/sa/|/e/\")[1] + \"/e/\").getBytes());\n } else if (data.startsWith(\"/s/\")) { //TODO - FIX INDIVIDUAL PACKET SENDING\n String decodedData = data.split(\"/s/|/e/\")[1];\n String targetID = decodedData;\n targetID = targetID.substring(targetID.indexOf(\"&\") + 1);\n targetID = targetID.substring(0, targetID.indexOf(\"&\"));\n int id = Integer.parseInt(targetID);\n decodedData = decodedData.replace(\"&\" + id + \"&\", \"\");\n ServerClient targetClient = null;\n for (ServerClient item : clients) {\n if (item.getID() == id) {\n targetClient = item;\n break;\n }\n }\n assert targetClient != null;\n send(decodedData.getBytes(), targetClient.getAddress(), targetClient.getPort());\n } else if (data.startsWith(\"/p/\")) {\n clientResponse.add(Integer.parseInt(data.split(\"/p/|/e/\")[1]));\n } else if (data.startsWith(\"/dp/\")) {\n sendToAll(data.substring(0, data.length() - 3).getBytes());\n } else {\n System.out.println(packet.getAddress() + \":\" + packet.getPort() + \" sent an unknown packet: \" + data);\n }\n }", "@Override\n public void sendFromAllAccounts(Stanza stanza)\n throws RemoteException\n {\n BuddycloudService.this.sendFromAllAccounts(stanza);\n }", "private void mergeChatWithServerRelay(ChatWithServer.Relay value) {\n if (rspCase_ == 3 &&\n rsp_ != ChatWithServer.Relay.getDefaultInstance()) {\n rsp_ = ChatWithServer.Relay.newBuilder((ChatWithServer.Relay) rsp_)\n .mergeFrom(value).buildPartial();\n } else {\n rsp_ = value;\n }\n rspCase_ = 3;\n }", "void subscribe(String id);", "public SubscriptionListener() {\n this.protocol = \"stomp\";\n }", "public void connectToAudio() {\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.CONNECT));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.CONNECT) {\n isConnecting = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n };\n }", "public void findSongsAtDest(Messenger handler){\n switch(dh.getDestinationService()){\n case DataHandler.DEST_SPOTIFY: apiFindSongsOnSpotify(handler);//call to search music\n break;\n case DataHandler.DEST_APPLEMUSIC: apiFindSongsOnAppleMusic(handler);//call to search music\n break;\n\n default: msg = new Message();\n msg.obj = \"Destination is not specified or supported!\";\n msg.what = STATUS_ERROR;\n try {\n handler.send(msg);\n stopSelf();\n } catch (RemoteException e) {\n e.printStackTrace();\n } break;\n\n }\n }", "Set<StreamSessionHandler> getSubscribers();", "public void sendDirectedPresence() {\n Cursor cursor = getContentResolver().query(\n Roster.CONTENT_URI,\n new String[]{Roster.LAST_UPDATED},\n null, null, \"last_updated desc\"\n );\n if (cursor.moveToFirst()) {\n long after = cursor.getLong(\n cursor.getColumnIndex(Roster.LAST_UPDATED));\n Presence presence = new Presence(Type.available);\n presence.setTo(\"broadcaster.buddycloud.com\");\n client.sendFromAllResources(presence);\n }\n cursor.close();\n }", "@Override\n public void sendFromAllResources(Stanza stanza)\n throws RemoteException\n {\n BuddycloudService.this.sendFromAllResources(stanza);\n }", "public void shoutMessage(Talker t) {\n\t\tfor (Listener l: mListenerSet) {\n\t\t\tl.onMessageReceived(t.getMessage());\n\t\t}\n\t}", "private void getRTPStream(String session, String source, int portl, int portr, int payloadFormat ){\n \t InetAddress addr;\r\n \t\ttry {\r\n \t\t\taddr = InetAddress.getLocalHost();\r\n \t\t // Get IP Address\r\n // \t\t\tLAN_IP_ADDR = addr.getHostAddress();\r\n \t\t\tLAN_IP_ADDR = \"192.168.1.125\";\r\n \t\t\tLog.d(TAG, \"using client IP addr \" +LAN_IP_ADDR);\r\n \t\t \r\n \t\t} catch (UnknownHostException e1) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te1.printStackTrace();\r\n \t\t}\r\n\r\n \t\t\r\n final CountDownLatch latch = new CountDownLatch(2);\r\n\r\n RtpParticipant local1 = RtpParticipant.createReceiver(new RtpParticipantInfo(1), LAN_IP_ADDR, portl, portl+=1);\r\n // RtpParticipant local1 = RtpParticipant.createReceiver(new RtpParticipantInfo(1), \"127.0.0.1\", portl, portl+=1);\r\n RtpParticipant remote1 = RtpParticipant.createReceiver(new RtpParticipantInfo(2), source, portr, portr+=1);\r\n \r\n \r\n remote1.getInfo().setSsrc( Long.parseLong(ssrc, 16));\r\n session1 = new SingleParticipantSession(session, payloadFormat, local1, remote1);\r\n \r\n Log.d(TAG, \"remote ssrc \" +session1.getRemoteParticipant().getInfo().getSsrc());\r\n \r\n session1.init();\r\n \r\n session1.addDataListener(new RtpSessionDataListener() {\r\n @Override\r\n public void dataPacketReceived(RtpSession session, RtpParticipantInfo participant, DataPacket packet) {\r\n // System.err.println(\"Session 1 received packet: \" + packet + \"(session: \" + session.getId() + \")\");\r\n \t//TODO close the file, flush the buffer\r\n// \tif (_sink != null) _sink.getPackByte(packet);\r\n \tgetPackByte(packet);\r\n \t\r\n // \tSystem.err.println(\"Ssn 1 packet seqn: typ: datasz \" +packet.getSequenceNumber() + \" \" +packet.getPayloadType() +\" \" +packet.getDataSize());\r\n // \tSystem.err.println(\"Ssn 1 packet sessn: typ: datasz \" + session.getId() + \" \" +packet.getPayloadType() +\" \" +packet.getDataSize());\r\n // latch.countDown();\r\n }\r\n\r\n });\r\n // DataPacket packet = new DataPacket();\r\n // packet.setData(new byte[]{0x45, 0x45, 0x45, 0x45});\r\n // packet.setSequenceNumber(1);\r\n // session1.sendDataPacket(packet);\r\n\r\n\r\n// try {\r\n // latch.await(2000, TimeUnit.MILLISECONDS);\r\n // } catch (Exception e) {\r\n // fail(\"Exception caught: \" + e.getClass().getSimpleName() + \" - \" + e.getMessage());\r\n \r\n // }\r\n \t}", "public void startListening();", "public JID getToJID() {\n return toJID;\n }", "protected abstract void transfer(UUID[] players, String server, IntConsumer response);", "public void testAddRelay2ToAnAlreadyConnectedChannel() throws Exception {\n // Create and connect a channel.\n a=new JChannel();\n a.connect(SFO_CLUSTER);\n System.out.println(\"Channel \" + a.getName() + \" is connected. View: \" + a.getView());\n\n // Add RELAY2 protocol to the already connected channel.\n RELAY2 relayToInject = createRELAY2(SFO);\n // Util.setField(Util.getField(relayToInject.getClass(), \"local_addr\"), relayToInject, a.getAddress());\n\n a.getProtocolStack().insertProtocolAtTop(relayToInject);\n for(Protocol p=relayToInject; p != null; p=p.getDownProtocol())\n p.setAddress(a.getAddress());\n relayToInject.setProtocolStack(a.getProtocolStack());\n relayToInject.configure();\n relayToInject.handleView(a.getView());\n\n // Check for RELAY2 presence\n RELAY2 ar=a.getProtocolStack().findProtocol(RELAY2.class);\n assert ar != null;\n\n waitUntilRoute(SFO, true, 10000, 500, a);\n\n assert !ar.printRoutes().equals(\"n/a (not site master)\") : \"This member should be site master\";\n\n Route route=getRoute(a, SFO);\n System.out.println(\"Route at sfo to sfo: \" + route);\n assert route != null;\n }", "public Traverson allIngredientsTraverson() {\n Traverson traverson = new Traverson(URI.create(INGREDIENTS_URI), MediaTypes.HAL_JSON);\n return traverson;\n }", "public void testAcceptJingleSession() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 54222);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 54567);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads2());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n \n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n incCounter();\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n\n // We accept the request\n try {\n JingleSession session1 = request.accept();\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n session0.startOutgoing();\n\n Thread.sleep(20000);\n\n assertTrue(valCounter() > 0);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }", "private void start(Outgoing incoming){\n log.info(\"{} start with incoming data: {}\", sb.id, incoming);\n\n peerSources = incoming.sources; // deepCopy\n peerId = incoming.id;\n\n if(!streamOptions.isReadable()){\n shakeHands(new Update[0]);\n return;\n }\n\n if( AsyncScuttlebutt.class.isAssignableFrom(sb.getClass())){\n AsyncScuttlebutt asyncSb = (AsyncScuttlebutt) sb;\n asyncSb.reentrantLock(() -> { // 读取history,和监听sb上的update必须是原子性的,否则可能漏消息\n Update[] history = sb.history(peerSources);\n shakeHands(history);\n });\n }else{\n Update[] history = sb.history(peerSources);\n shakeHands(history);\n }\n\n }", "public PacketIDFilter(String stanzaID)\n\t{\n\t\tif (stanzaID == null)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"Packet ID cannot be null.\");\n\t\t}\n\t\tthis.stanzaID = stanzaID;\n\t}", "public void setInternalRelay(StanzaRelay internalRelay) {\n this.internalRelay = internalRelay;\n }", "public void testEqualPayloadsSetSession() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 54213);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 54531);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n \n man0.addCreationListener(ftm0);\n man1.addCreationListener(ftm1);\n \n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n try {\n // We accept the request\n JingleSession session1 = request.accept();\n\n session1.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionClosed().\");\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n System.out.println(\"sessionClosedOnError().\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionDeclined().\");\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Responder: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n });\n\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request with equal payloads, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n session0.startOutgoing();\n\n Thread.sleep(20000);\n\n assertTrue(valCounter() == 1);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }", "@Subscribe(threadMode = ThreadMode.MAIN)\n public void onNetworkInfoReceived(OnReceiverNetInfoEvent event){\n\n WifiP2pInfo info = event.getInfo();\n\n // InetAddress from WifiP2pInfo struc.\n groupOwnerAddress = info.groupOwnerAddress.getHostAddress();\n // String port = \"8888\";\n\n\n // After the group negotiation, we can determine the group owner\n // (server).\n if(info.groupFormed && info.isGroupOwner){\n Toast.makeText(getContext(), \"Group formed. Host\", Toast.LENGTH_SHORT).show();\n if(peersDialog.isShowing())peersDialog.dismiss();\n\n // starting a data thread with the latest connected device\n Wifip2pService mService = new Wifip2pService(getContext(), mHandler,port, true, groupOwnerAddress);\n // assign the name of the latest connect device to this thread so we keep track\n mService.deviceName = devicesConnected.get(devicesConnected.size() - 1);\n connectionThreads.add(mService);\n\n\n // One common case is creating a group owner thread and accepting\n // incoming connections.\n } else if(info.groupFormed){\n Toast.makeText(getContext(), \"Connected as Peer\", Toast.LENGTH_SHORT).show();\n if(peersDialog.isShowing())peersDialog.dismiss();\n\n // starting a data thread with the owner\n Wifip2pService mService = new Wifip2pService(getContext(), mHandler, port, false, groupOwnerAddress);\n mService.deviceName = devicesConnected.get(devicesConnected.size() - 1);\n connectionThreads.add(mService);\n\n }\n\n }", "public void startListening(){\n if (listeningThread == null) {\n listeningThread = new Thread(new Runnable() {\n @Override\n public void run() {\n while (!Thread.interrupted()) {\n try {\n serverSocket = new ServerSocket(port);\n Socket remoteClientSocket = serverSocket.accept();\n clients.add(new RemoteClient(UUID.randomUUID().toString(), remoteClientSocket));\n\n // Read the client's message\n //ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(remoteClientSocket.getInputStream()));\n //Object raw = ois.readObject();\n int vol = 0;\n Scanner s = new Scanner(new BufferedReader(new InputStreamReader(remoteClientSocket.getInputStream())));\n if (s.hasNextLine()) {\n vol = Integer.parseInt(s.nextLine());\n System.out.println(\"[Server] Message from client: \" + vol);\n\n }\n\n\n int maxLoud = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);\n audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, vol, 0);\n\n PrintWriter pw = new PrintWriter(new OutputStreamWriter(remoteClientSocket.getOutputStream()));\n pw.println(\"set to\" +vol);\n pw.flush();\n\n\n remoteClientSocket.close();\n serverSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }\n });\n listeningThread.start();\n\n }\n }", "public interface ISwaListener {\n\n /**\n * Receives an SWA command. The server must use the given watcher in the following fuzzing process. If the client\n * did not send such a key \"watcher\", the given watcher will be empty. If the listener cannot process the command\n * for whatever reason it must throw an ProtocolExecutionException.\n *\n * @param watcher the watcher the client has chosen\n * @throws ProtocolExecutionException if the listener could not process the command\n */\n void receive(String watcher) throws ProtocolExecutionException;\n}", "List<String> getSubProtocols();", "@Override\n public boolean send(Stanza stanza) throws RemoteException {\n return BuddycloudService.this.send(stanza);\n }", "public String getStanza() {\n return stanza;\n }", "public void onXMPPMsg(XMPPMsg xmppMsg) {\n\t\tlog.info(String.format(\"XMPP - %s %s\", xmppMsg.msg.getFrom(), xmppMsg.msg.getBody()));\n\n\t\t// not exactly the same model as onConnect - so we try to add each time\n\t\tString user = xmpp.getEntry(xmppMsg.msg.getFrom()).getName();\n\t\tconns.addConnection(xmppMsg.msg.getFrom(), user);\n\n\t\tShout shout = createShout(TYPE_USER, xmppMsg.msg.getBody());\n\t\tshout.from = user;\n\n\t\t// shouts.add(shout);\n\t\tMessage out = createMessage(\"shoutclient\", \"onShout\", Encoder.toJson(shout));\n\n\t\tonShout(xmppMsg.msg.getFrom(), out);\n\n\t\t/*\n\t\t * Shout shout = createShout(TYPE_USER, xmppMsg.msg.getBody());\n\t\t * shout.user = user;\n\t\t * \n\t\t * shouts.add(shout); Message out = createMessage(\"shoutclient\",\n\t\t * \"onShout\", Encoder.toJson(shout)); webgui.sendToAll(out); if (xmpp !=\n\t\t * null){ for (int i = 0; i < xmppRelays.size(); ++i){\n\t\t * log.info(String.format(\"sending xmpp client %s %s\",shout.user,\n\t\t * shout.msg)); xmpp.sendMessage(String.format(\"%s:%s\", shout.user,\n\t\t * shout.msg), xmppRelays.get(i)); } } archive(shout);\n\t\t */\n\t}", "synchronized void receiveJETON(){\n\tif(SC){\n\t\tJeton = true;\n\t}else{\n\t\tif (procId==0){\n\t\t\tSyncMessage sm = new SyncMessage(MsgType.JETON, 0, procId);\n\t\t\tsendTo(0, sm);\n\t\t}else{\n\t\t\tSyncMessage sm = new SyncMessage(MsgType.JETON, 1, procId);\n\t\t\tsendTo(1, sm);\n\t\t}\n\t}\n\tthis.notifyAll();\n\n}", "public void testStagesSession() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 54222);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 54567);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads2());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n\n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n System.out.println(\"Session request detected, from \" + request.getFrom() + \": accepting.\");\n try {\n // We accept the request\n JingleSession session1 = request.accept();\n\n session1.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionClosed().\");\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n System.out.println(\"sessionClosedOnError().\");\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n System.out.println(\"sessionDeclined().\");\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, final TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Responder: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n });\n\n session1.startIncoming();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n\n session0.addListener(new JingleSessionListener() {\n public void sessionClosed(String reason, JingleSession jingleSession) {\n }\n\n public void sessionClosedOnError(XMPPException e, JingleSession jingleSession) {\n }\n\n public void sessionDeclined(String reason, JingleSession jingleSession) {\n }\n\n public void sessionEstablished(PayloadType pt, TransportCandidate rc, TransportCandidate lc,\n JingleSession jingleSession) {\n incCounter();\n System.out.println(\"Initiator: the session is fully established.\");\n System.out.println(\"+ Payload Type: \" + pt.getId());\n System.out.println(\"+ Local IP/port: \" + lc.getIp() + \":\" + lc.getPort());\n System.out.println(\"+ Remote IP/port: \" + rc.getIp() + \":\" + rc.getPort());\n }\n\n public void sessionRedirected(String redirection, JingleSession jingleSession) {\n }\n\n public void sessionMediaReceived(JingleSession jingleSession, String participant) {\n // Do Nothing\n }\n });\n session0.startOutgoing();\n\n Thread.sleep(20000);\n\n assertTrue(valCounter() == 2);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }", "public void processPacket(IQ incomingPacket){\n\t\t\t\t\t\t\n\t\tif (incomingPacket instanceof JingleIQPacket) {\n\t\t\tJingleIQPacket jiqPacket = (JingleIQPacket) incomingPacket;\n\t\t\t\n\t\t\tLog.i(XMPPClientLogger.TAG, \"JIQPacket Received in MUCBuddy: \" + \n\t\t\t\t\t\"From: \" + jiqPacket.getFrom()+ \"To: \" + jiqPacket.getTo() +\n\t\t\t\t\t\"Initiator: \" + jiqPacket.getAttributeInitiator() + \n\t\t\t\t\t\"Responder: \" + jiqPacket.getAttributeResponder() + \"Action: \" + jiqPacket.getAttributeAction());\n\t\t\t\n\t\t\t// Send ACK\n\t\t\tiqMessageSender.sendResultAck(jiqPacket);\n\t\t\t\n\t\t\tString action = jiqPacket.getAttributeAction();\n\t\t\tif(state.getSessionState() == SessionCallStateMachine.STATE_ENDED){\n\t\t\t\tif(action.equals(JingleIQPacket.AttributeActionValues.SESSION_INITIATE)){\n\t\t\t\t\tstate.changeSessionState(action); // Sets to Pending\n\t\t\t\t\t\n\t\t\t\t\t// Check to see if we can respond with session accept or with session_terminate\n\t\t\t\t\tif(supportApplication(jiqPacket)){\t\t\t\t\t\t\n\t\t\t\t\t\tif(supportTransport(jiqPacket)){\n\t\t\t\t\t\t\t// Get the initiator's IP and Ports\n\t\t\t\t\t\t\tString ipAddress = jiqPacket.getElementContent().get(0).getElementTransport().getCandidates().get(0).getAttributeIP();\n\t\t\t\t\t\t\tInteger port = (int)jiqPacket.getElementContent().get(0).getElementTransport().getCandidates().get(0).getAttributePort(); \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsetRemoteIPAddress(ipAddress);\n\t\t\t\t\t\t\tsetRemotePort(port);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Can send out session_accept\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tjiqActionMessageSender.sendSessionAccept(jiqPacket, this);\n\t\t\t\t\t\t\t// TODO: Time to send RTP Comfort Noise\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// TODO: If not received RTP Noise upto certain time, terminate session.\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// TODO: If receive Noise, then : \n\t\t\t\t\t\t\tstate.changeSessionState(JingleIQPacket.AttributeActionValues.SESSION_ACCEPT); // sets to Active.\n\t\t\t\t\t\t\tLog.i(XMPPClientLogger.TAG, \"State: \" + state.getSessionStateString());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tLog.i(\"MUCBuddy\", \"Starting receiver on port \" + this.getLocalPort());\n\t\t\t\t\t\t\t\tSipdroidSocket recv_socket = new SipdroidSocket(this.getLocalPort());\n\t\t\t\t\t\t\t\treceiver = new ReceiverThread(recv_socket);\n\t\t\t\t\t\t\t\treceiver.start();\n\t\t\t\t\t\t\t\tint sendPort = PortHandler.getInstance().getSendPort();\n\t\t\t\t\t\t\t\tSipdroidSocket send_socket = new SipdroidSocket(sendPort);\n\t\t\t\t\t\t\t\tBlockingQueue<short[]> queue = new LinkedBlockingQueue<short[]>();\n\t\t\t\t\t\t\t\tLog.i(\"MUCBuddy\", \"Starting sender to \" + this.getRemoteIPAddress() + \":\" + this.getRemotePort() + \" on port \" + sendPort);\n\t\t\t\t\t\t\t\tsender = new SenderThread(true, 8000/160, 160, send_socket, this.getRemoteIPAddress(), this.getRemotePort(), queue);\n\t\t\t\t\t\t\t\t//pusher = AudioPusher.getInstance(\"/test3.wav\", buddyJID, queue);\n\t\t\t\t\t\t\t\tMicrophonePusher pusher = MicrophonePusher.getInstance(String.valueOf(sendPort), queue);\n\t\t\t\t\t\t\t\tsender.start();\n\t\t\t\t\t\t\t\tif (!pusher.isRunning()) pusher.start();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// send terminate\n\t\t\t\t\t\t\tReasonElementType reason = new ReasonElementType(ReasonElementType.TYPE_UNSUPPORTED_TRANSPORTS, null);\n\t\t\t\t\t\t\treason.setAttributeSID(jiqPacket.getAttributeSID());\n\t\t\t\t\t\t\tjiqActionMessageSender.sendSessionTerminate(jiqPacket.getTo(), jiqPacket.getFrom(), jiqPacket.getAttributeSID(), reason, this);\n\t\t\t\t\t\t\tstate.changeSessionState(JingleIQPacket.AttributeActionValues.SESSION_TERMINATE);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// send terminate\n\t\t\t\t\t\tReasonElementType reason = new ReasonElementType(ReasonElementType.TYPE_UNSUPPORTED_APPLICATIONS, null);\n\t\t\t\t\t\treason.setAttributeSID(jiqPacket.getAttributeSID());\n\t\t\t\t\t\tjiqActionMessageSender.sendSessionTerminate(jiqPacket.getTo(), jiqPacket.getFrom(), jiqPacket.getAttributeSID(), reason, this);\n\t\t\t\t\t\tstate.changeSessionState(JingleIQPacket.AttributeActionValues.SESSION_TERMINATE);\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tLog.i(XMPPClientLogger.TAG, \"This Combination not supported yet \" + \n\t\t\t\t\t\t\t\"State: \" + state.getSessionStateString() +\n\t\t\t\t\t\t\t\"Action: \" + action);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if(state.getSessionState() == SessionCallStateMachine.STATE_PENDING){\n\t\t\t\tif(action.equals(JingleIQPacket.AttributeActionValues.SESSION_ACCEPT)){\t\t\n\t\t\t\t\tString ipAddress = jiqPacket.getElementContent().get(0).getElementTransport().getCandidates().get(0).getAttributeIP();\n\t\t\t\t\tInteger port = (int)jiqPacket.getElementContent().get(0).getElementTransport().getCandidates().get(0).getAttributePort(); \n\t\t\t\t\t\n\t\t\t\t\tsetRemoteIPAddress(ipAddress);\n\t\t\t\t\tsetRemotePort(port);\n\t\t\t\t\t\n\t\t\t\t\t// Can send out session_accept\t\t\t\t\t\t\t\n\t\t\t\t\t// jiqActionMessageSender.sendSessionAccept(jiqPacket, this);\n\t\t\t\t\t// TODO: Time to send RTP Comfort Noise\n\t\t\t\t\t\n\t\t\t\t\t// TODO: If not received RTP Noise upto certain time, terminate session.\n\t\t\t\t\t\n\t\t\t\t\t// TODO: If receive Noise, then : state.changeSessionState(action); // set to Active\n\t\t\t\t\t\n\t\t\t\t\tstate.changeSessionState(JingleIQPacket.AttributeActionValues.SESSION_ACCEPT); // sets to Active.\n\t\t\t\t\tLog.i(XMPPClientLogger.TAG, \"State: \" + state.getSessionStateString());\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tLog.i(\"MUCBuddy\", \"Starting receiver on port \" + this.getLocalPort());\n\t\t\t\t\t\tSipdroidSocket recv_socket = new SipdroidSocket(this.getLocalPort());\n\t\t\t\t\t\treceiver = new ReceiverThread(recv_socket);\n\t\t\t\t\t\treceiver.start();\n\t\t\t\t\t\tint sendPort = PortHandler.getInstance().getSendPort();\n\t\t\t\t\t\tSipdroidSocket send_socket = new SipdroidSocket(sendPort);\n\t\t\t\t\t\tBlockingQueue<short[]> queue = new LinkedBlockingQueue<short[]>();\n\t\t\t\t\t\tLog.i(\"MUCBuddy\", \"Starting sender to \" + this.getRemoteIPAddress() + \":\" + this.getRemotePort() + \" on port \" + sendPort);\n\t\t\t\t\t\tsender = new SenderThread(true, 8000/160, 160, send_socket, this.getRemoteIPAddress(), this.getRemotePort(), queue);\n\t\t\t\t\t\t//pusher = AudioPusher.getInstance(\"/test3.wav\", buddyJID, queue);\n\t\t\t\t\t\tMicrophonePusher pusher = MicrophonePusher.getInstance(String.valueOf(sendPort), queue);\n\t\t\t\t\t\tsender.start();\n\t\t\t\t\t\tif (!pusher.isRunning()) pusher.start();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} else if(action.equals(JingleIQPacket.AttributeActionValues.SESSION_TERMINATE)){\n\t\t\t\t\tstate.changeSessionState(action); // set to Terminate\n\t\t\t\t} else {\n\t\t\t\t\tLog.i(XMPPClientLogger.TAG, \"This Combination not supported yet \" + \n\t\t\t\t\t\t\t\"State: \" + state.getSessionStateString() +\n\t\t\t\t\t\t\t\"Action: \" + action);\n\t\t\t\t}\n\t\t\t} else if(state.getSessionState() == SessionCallStateMachine.STATE_ACTIVE){\n\t\t\t\tif(action.equals(JingleIQPacket.AttributeActionValues.SESSION_TERMINATE)){\n\t\t\t\t\tstate.changeSessionState(action); // set to Terminate\n\t\t\t\t\tif (receiver.isRunning()) receiver.halt();\n\t\t\t\t\tif (sender.isRunning()) sender.halt();\n\t\t\t\t\tpusher.removeQueue(buddyJID);\n\t\t\t\t\tif (pusher.isRunning() && pusher.numQueues() == 0) pusher.halt();\n\t\t\t\t} else {\n\t\t\t\t\tLog.i(XMPPClientLogger.TAG, \"This Combination not supported yet \" + \n\t\t\t\t\t\t\t\"State: \" + state.getSessionStateString() +\n\t\t\t\t\t\t\t\"Action: \" + action);\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t\n\t\t} else if (incomingPacket instanceof IQ) {\n\t\t\tIQ iq = (IQ) incomingPacket;\n\t\t\tLog.i(XMPPClientLogger.TAG, \"IQ Received in MUCBuddy \" + \"From: \" + iq.getFrom()+ \n\t\t\t\t\t\"To: \" + iq.getTo() + \"Type: \" + iq.getType());\n\t\t\t\n\t\t\tif (iq.getType() == IQ.Type.RESULT) {\n\t\t\t\tif(state.getSessionState() == SessionCallStateMachine.STATE_PENDING){\n\t\t\t\t\tstate.setSessionState(SessionCallStateMachine.STATE_PENDING); // Stay in pending\n\t\t\t\t} else if (state.getSessionState() == SessionCallStateMachine.STATE_ACTIVE){\n\t\t\t\t\t\n\t\t\t\t} else if (state.getSessionState() == SessionCallStateMachine.STATE_ENDED){\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\n\t}", "private Channel getServersChannel(ProcessSet processes, int id) {\r\n\t\tLayer[] qos = { new TcpCompleteLayer(), new TcpBasedPFDLayer(),\r\n\t\t\t\tnew BasicBroadcastLayer(), // new EagerRBLayer(),\r\n\t\t\t\tnew ServerClientApplLayer() };\r\n\r\n\t\t/* Create a QoS */\r\n\t\tQoS myQoS = null;\r\n\t\ttry {\r\n\t\t\tmyQoS = new QoS(\"ServerClient QoS for \" + \"server \" + id, qos);\r\n\t\t} catch (AppiaInvalidQoSException ex) {\r\n\t\t\tLogger.getLogger(ServerAppl.class.getName()).severe(\"Invalid QoS\");\r\n\t\t\tLogger.getLogger(ServerAppl.class.getName())\r\n\t\t\t\t\t.severe(ex.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t/* Create a channel. Uses default event scheduler. */\r\n\t\tChannel channel = myQoS\r\n\t\t\t\t.createUnboundChannel(\"ServerClient channel for \" + \"server \"\r\n\t\t\t\t\t\t+ id);\r\n\t\t/*\r\n\t\t * Application Session requires special arguments: filename and . A\r\n\t\t * session is created and binded to the stack. Remaining ones are\r\n\t\t * created by default\r\n\t\t */\r\n\t\tServerClientApplSession sas = (ServerClientApplSession) qos[qos.length - 1]\r\n\t\t\t\t.createSession();\r\n\t\tsas.init(processes, this, this, this, false);\r\n\r\n\t\tChannelCursor cc = channel.getCursor();\r\n\r\n\t\t/*\r\n\t\t * Application is the last session of the array. Positioning in it is\r\n\t\t * simple\r\n\t\t */\r\n\t\ttry {\r\n\t\t\tcc.top();\r\n\t\t\tcc.setSession(sas);\r\n\t\t\tcc.bottom();\r\n\t\t\tChannelCursor ccc = this.zabChannel.getCursor();\r\n\t\t\tccc.bottom();\r\n\t\t\tcc.setSession(ccc.getSession());\r\n\t\t\tccc.up();\r\n\t\t\tcc.up();\r\n\t\t\tcc.setSession(ccc.getSession());\r\n\t\t} catch (AppiaCursorException ex) {\r\n\t\t\tLogger.getLogger(ServerAppl.class.getName()).severe(\r\n\t\t\t\t\t\"Unexpected exception in main. Type code:\" + ex.type);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\treturn channel;\r\n\t}", "@Override\n public int getServerBroadcastPort() {\n return 10081;\n }", "private Relay relayBuilder(JSONObject jsonRelay) {\n\t\tRelay relay = new Relay();\n\n\t\tif (isPresent(jsonRelay, \"advertised_bandwidth\")) {\n\t\t\trelay.setAdvertisedBandwidth((Integer) jsonRelay.get(\"advertised_bandwidth\"));\n\t\t} else {\n\t\t\trelay.setAdvertisedBandwidth(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"alleged_family\")) {\n\t\t\tArrayList<String> allegedFamily = new ArrayList<String>();\n\t\t\tJSONArray jsonAllegedFamily = jsonRelay.getJSONArray(\"alleged_family\");\n\t\t\tfor (int i = 0; i < jsonAllegedFamily.length(); i++) {\n\t\t\t\tallegedFamily.add(jsonAllegedFamily.getString(i));\n\t\t\t}\n\t\t\trelay.setAllegedFamily(allegedFamily);\n\t\t} else {\n\t\t\trelay.setAllegedFamily(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"as_name\")) {\n\t\t\trelay.setASName(jsonRelay.getString(\"as_name\"));\n\t\t} else {\n\t\t\trelay.setASName(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"as_number\")) {\n\t\t\trelay.setASNumber(jsonRelay.getString(\"as_number\"));\n\t\t} else {\n\t\t\trelay.setASNumber(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"bandwidth_burst\")) {\n\t\t\trelay.setBandwidthBurst((Integer) jsonRelay.get(\"bandwidth_burst\"));\n\t\t} else {\n\t\t\trelay.setBandwidthBurst(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"bandwidth_rate\")) {\n\t\t\trelay.setBandwidthRate((Integer) jsonRelay.get(\"bandwidth_rate\"));\n\t\t} else {\n\t\t\trelay.setBandwidthRate(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"city_name\")) {\n\t\t\trelay.setCityName(jsonRelay.getString(\"city_name\"));\n\t\t} else {\n\t\t\trelay.setCityName(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"consensus_weight\")) {\n\t\t\trelay.setConsensusWeight((Integer) jsonRelay.get(\"consensus_weight\"));\n\t\t} else {\n\t\t\trelay.setConsensusWeight(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"consensus_weight_fraction\")) {\n\t\t\trelay.setConsensusWeightFraction((Double) jsonRelay.get(\"consensus_weight_fraction\"));\n\t\t} else {\n\t\t\trelay.setConsensusWeightFraction(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"contact\")) {\n\t\t\trelay.setContact(jsonRelay.getString(\"contact\"));\n\t\t} else {\n\t\t\trelay.setContact(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"country\")) {\n\t\t\trelay.setCountryCode(jsonRelay.getString(\"country\"));\n\t\t} else {\n\t\t\trelay.setCountryCode(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"country_name\")) {\n\t\t\trelay.setCountryName(jsonRelay.getString(\"country_name\"));\n\t\t} else {\n\t\t\trelay.setCountryName(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"dir_address\")) {\n\t\t\trelay.setDirAddress(jsonRelay.getString(\"dir_address\"));\n\t\t} else {\n\t\t\trelay.setDirAddress(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"effective_family\")) {\n\t\t\tArrayList<String> effectiveFamily = new ArrayList<String>();\n\t\t\tJSONArray jsonEffectiveFamily = jsonRelay.getJSONArray(\"effective_family\");\n\t\t\tfor (int i = 0; i < jsonEffectiveFamily.length(); i++) {\n\t\t\t\teffectiveFamily.add(jsonEffectiveFamily.getString(i));\n\t\t\t}\n\n\t\t\trelay.setFamily(effectiveFamily);\n\t\t} else {\n\t\t\trelay.setEffectiveFamily(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"exit_policy\")) {\n\t\t\tArrayList<String> exitPolicy = new ArrayList<String>();\n\t\t\tJSONArray jsonExitPolicy = jsonRelay.getJSONArray(\"exit_policy\");\n\t\t\tfor (int i = 0; i < jsonExitPolicy.length(); i++) {\n\t\t\t\texitPolicy.add(jsonExitPolicy.getString(i));\n\t\t\t}\n\t\t\trelay.setExitPolicy(exitPolicy);\n\t\t} else {\n\t\t\trelay.setExitPolicy(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"exit_policy_summary\")) {\n\t\t\tExitPolicySummary exitPolicySummary = new ExitPolicySummary();\n\t\t\tJSONObject jsonExitPolicySummary = jsonRelay.getJSONObject(\"exit_policy_summary\");\n\n\t\t\tif (isPresent(jsonExitPolicySummary, \"accept\")) {\n\t\t\t\tArrayList<String> accept = new ArrayList<String>();\n\t\t\t\tJSONArray jsonAccept = jsonExitPolicySummary.getJSONArray(\"accept\");\n\t\t\t\tfor (int i = 0; i < jsonAccept.length(); i++) {\n\t\t\t\t\taccept.add(jsonAccept.getString(i));\n\t\t\t\t}\n\t\t\t\texitPolicySummary.setAccept(accept);\n\n\t\t\t}\n\n\t\t\tif (isPresent(jsonExitPolicySummary, \"reject\")) {\n\t\t\t\tArrayList<String> reject = new ArrayList<String>();\n\t\t\t\tJSONArray jsonReject = jsonExitPolicySummary.getJSONArray(\"reject\");\n\t\t\t\tfor (int i = 0; i < jsonReject.length(); i++) {\n\t\t\t\t\treject.add(jsonReject.getString(i));\n\t\t\t\t}\n\t\t\t\texitPolicySummary.setReject(reject);\n\t\t\t}\n\n\t\t\trelay.setExitPolicySummary(exitPolicySummary);\n\t\t} else {\n\t\t\trelay.setExitPolicySummary(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"exit_policy_v6_summary\")) {\n\t\t\tExitPolicyV6Summary exitPolicyV6Summary = new ExitPolicyV6Summary();\n\t\t\tJSONObject jsonExitPolicyV6Summary = jsonRelay.getJSONObject(\"exit_policy_v6_summary\");\n\n\t\t\tif (isPresent(jsonExitPolicyV6Summary, \"accept\")) {\n\t\t\t\tArrayList<String> accept = new ArrayList<String>();\n\t\t\t\tJSONArray jsonAccept = jsonExitPolicyV6Summary.getJSONArray(\"accept\");\n\t\t\t\tfor (int i = 0; i < jsonAccept.length(); i++) {\n\t\t\t\t\taccept.add(jsonAccept.getString(i));\n\t\t\t\t}\n\t\t\t\texitPolicyV6Summary.setAccept(accept);\n\n\t\t\t}\n\n\t\t\tif (isPresent(jsonExitPolicyV6Summary, \"reject\")) {\n\t\t\t\tArrayList<String> reject = new ArrayList<String>();\n\t\t\t\tJSONArray jsonReject = jsonExitPolicyV6Summary.getJSONArray(\"reject\");\n\t\t\t\tfor (int i = 0; i < jsonReject.length(); i++) {\n\t\t\t\t\treject.add(jsonReject.getString(i));\n\t\t\t\t}\n\t\t\t\texitPolicyV6Summary.setReject(reject);\n\t\t\t}\n\n\t\t\trelay.setExitPolicyV6Summary(exitPolicyV6Summary);\n\t\t} else {\n\t\t\trelay.setExitPolicyV6Summary(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"exit_probability\")) {\n\t\t\trelay.setExitProbability((Double) jsonRelay.get(\"exit_probability\"));\n\t\t} else {\n\t\t\trelay.setExitProbability(null);\n\t\t}\n\t\tif (isPresent(jsonRelay, \"family\")) {\n\t\t\tArrayList<String> family = new ArrayList<String>();\n\t\t\tJSONArray jsonFamily = jsonRelay.getJSONArray(\"family\");\n\t\t\tfor (int i = 0; i < jsonFamily.length(); i++) {\n\t\t\t\tfamily.add(jsonFamily.getString(i));\n\t\t\t}\n\n\t\t\trelay.setFamily(family);\n\t\t} else {\n\t\t\trelay.setFamily(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"fingerprint\")) {\n\t\t\trelay.setFingerprint(jsonRelay.getString(\"fingerprint\"));\n\t\t} else {\n\t\t\trelay.setFingerprint(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"first_seen\")) {\n\t\t\trelay.setFirstSeen(jsonRelay.getString(\"first_seen\"));\n\t\t} else {\n\t\t\trelay.setFirstSeen(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"flags\")) {\n\t\t\tArrayList<String> flags = new ArrayList<String>();\n\t\t\tJSONArray jsonFlags = jsonRelay.getJSONArray(\"flags\");\n\t\t\tfor (int i = 0; i < jsonFlags.length(); i++) {\n\t\t\t\tflags.add(jsonFlags.getString(i));\n\t\t\t}\n\n\t\t\trelay.setFlags(flags);\n\t\t} else {\n\t\t\trelay.setFlags(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"guard_probability\")) {\n\t\t\trelay.setGuardProbability((Double) jsonRelay.get(\"guard_probability\"));\n\t\t} else {\n\t\t\trelay.setGuardProbability(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"host_name\")) {\n\t\t\trelay.setHostName(jsonRelay.getString(\"host_name\"));\n\t\t} else {\n\t\t\trelay.setHostName(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"last_changed_address_or_port\")) {\n\t\t\trelay.setLastChangedAddressOrPort(jsonRelay.getString(\"last_changed_address_or_port\"));\n\t\t} else {\n\t\t\trelay.setLastChangedAddressOrPort(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"last_restarted\")) {\n\t\t\trelay.setLastRestarted(jsonRelay.getString(\"last_restarted\"));\n\t\t} else {\n\t\t\trelay.setLastRestarted(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"last_seen\")) {\n\t\t\trelay.setLastSeen(jsonRelay.getString(\"last_seen\"));\n\t\t} else {\n\t\t\trelay.setLastSeen(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"latitude\")) {\n\t\t\trelay.setLatitude((Double) jsonRelay.get(\"latitude\"));\n\t\t} else {\n\t\t\trelay.setLatitude(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"longitude\")) {\n\t\t\trelay.setLongitude((Double) jsonRelay.get(\"longitude\"));\n\t\t} else {\n\t\t\trelay.setLongitude(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"measured\")) {\n\t\t\trelay.setMeasured((Boolean) jsonRelay.get(\"measured\"));\n\t\t} else {\n\t\t\trelay.setMeasured(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"middle_probability\")) {\n\t\t\trelay.setMiddleProbability((Double) jsonRelay.get(\"middle_probability\"));\n\t\t} else {\n\t\t\trelay.setMiddleProbability(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"nickname\")) {\n\t\t\trelay.setNickname(jsonRelay.getString(\"nickname\"));\n\t\t} else {\n\t\t\trelay.setNickname(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"observed_bandwidth\")) {\n\t\t\trelay.setObservedBandwidth((Integer) jsonRelay.get(\"observed_bandwidth\"));\n\t\t} else {\n\t\t\trelay.setObservedBandwidth(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"or_addresses\")) {\n\t\t\tArrayList<String> orAddresses = new ArrayList<String>();\n\t\t\tJSONArray jsonORAddresses = jsonRelay.getJSONArray(\"or_addresses\");\n\t\t\tfor (int i = 0; i < jsonORAddresses.length(); i++) {\n\t\t\t\torAddresses.add(jsonORAddresses.getString(i));\n\t\t\t}\n\n\t\t\trelay.setOrAddresses(orAddresses);\n\t\t} else {\n\t\t\trelay.setOrAddresses(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"platform\")) {\n\t\t\trelay.setPlatform(jsonRelay.getString(\"platform\"));\n\t\t} else {\n\t\t\trelay.setPlatform(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"recommended_version\")) {\n\t\t\trelay.setRecommendedVersion((Boolean) jsonRelay.get(\"recommended_version\"));\n\t\t} else {\n\t\t\trelay.setRecommendedVersion(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"region_name\")) {\n\t\t\trelay.setRegionName(jsonRelay.getString(\"region_name\"));\n\t\t} else {\n\t\t\trelay.setRegionName(null);\n\t\t}\n\n\t\tif (isPresent(jsonRelay, \"running\")) {\n\t\t\trelay.setRunning((Boolean) jsonRelay.get(\"running\"));\n\t\t} else {\n\t\t\trelay.setRunning(null);\n\t\t}\n\n\t\treturn relay;\n\n\t}", "public Long[] getInitiatorIDs() { return this.initiatorIDs; }", "public interface DsViaListenInterface extends DsListenInterface {\n\n /** @return port to be used as the source port of outgoing requests */\n public int getSourcePort();\n\n /** @return the interface to be used as the source port of outgoing requests */\n public InetAddress getSourceAddress();\n}", "private void setStreamMediaAddressList(){\n\n if (mCallBack != null){\n mCallBack.onGetServerAddressListCompleted(mServerAddressList);\n }\n }", "@Override\n public void run() {\n ZMQ.Context context = ZMQ.context(2);\n\n ZMQ.Socket publisher = context.socket(ZMQ.PUB);\n publisher.setAffinity(1);\n publisher.setHWM(0);\n publisher.bind(\"tcp://*:5556\");\n //publisher.bind(\"ipc://weather\");\n\n ZMQ.Socket incoming = context.socket(ZMQ.PULL);\n incoming.setHWM(0);\n incoming.setAffinity(2);\n incoming.bind(\"tcp://*:5557\");\n\n System.out.println(\"Sequencer is alive\");\n\n ZMQ.proxy(incoming, publisher, null);\n // while (! Thread.currentThread().isInterrupted()) {\n // byte[] data = incoming.recv(0);\n // //System.out.printf(\"Received message with %d bytes\\n\", data.length);\n // publisher.send(data, 0);\n // }\n\n publisher.close();\n incoming.close();\n context.term();\n }", "public StreamManager(String _id, int _srtp, int _drtp)\n\t{\n\t\tRTPGw = new RTPGateway(_id, \"localhost\", _srtp, _drtp, this);\n\t\tinit(_id);\n\t}", "public String receiveStones(Stone stone) throws IOException {\n openConnection();\n JSONArray commandArray = new JSONArray();\n commandArray.add(\"receive-stones\");\n commandArray.add(stone.getStone());\n this.outputWriter.println(commandArray.toJSONString());\n this.outputWriter.flush();\n return this.proxyPlayer.receiveStones(stone);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n serverPortText = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n jList1 = new javax.swing.JList<>();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jButton1.setText(\"Start Listenining\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel1.setText(\"Port :\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jLabel2.setText(\"Online Useres\");\n\n jLabel3.setText(\"Status \");\n\n jTextField2.setEditable(false);\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n\n jList1.setModel(new javax.swing.AbstractListModel<String>() {\n String[] strings = {};\n public int getSize() { return strings.length; }\n public String getElementAt(int i) { return strings[i]; }\n });\n jList1.addContainerListener(new java.awt.event.ContainerAdapter() {\n public void componentAdded(java.awt.event.ContainerEvent evt) {\n jList1ComponentAdded(evt);\n }\n });\n jList1.addAncestorListener(new javax.swing.event.AncestorListener() {\n public void ancestorAdded(javax.swing.event.AncestorEvent evt) {\n jList1AncestorAdded(evt);\n }\n public void ancestorMoved(javax.swing.event.AncestorEvent evt) {\n }\n public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {\n }\n });\n jList1.addInputMethodListener(new java.awt.event.InputMethodListener() {\n public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {\n }\n public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {\n jList1InputMethodTextChanged(evt);\n }\n });\n jList1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {\n public void propertyChange(java.beans.PropertyChangeEvent evt) {\n jList1PropertyChange(evt);\n }\n });\n jList1.addVetoableChangeListener(new java.beans.VetoableChangeListener() {\n public void vetoableChange(java.beans.PropertyChangeEvent evt)throws java.beans.PropertyVetoException {\n jList1VetoableChange(evt);\n }\n });\n jList1.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n jList1ValueChanged(evt);\n }\n });\n jScrollPane1.setViewportView(jList1);\n\n jButton2.setText(\"Hi\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(jLabel1)\n .addGap(31, 31, 31)\n .addComponent(serverPortText, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34)\n .addComponent(jButton1)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel3)\n .addGap(27, 27, 27)\n .addComponent(jTextField2)))\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addGap(43, 43, 43)\n .addComponent(jButton2)\n .addGap(24, 24, 24))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane1)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jButton1)\n .addComponent(serverPortText, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addComponent(jLabel2))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton2)))\n .addGap(17, 17, 17)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 59, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n pack();\n }", "public Node listenToSong(){\n\t\tNode current = first;\n\t\tfirst = first.next;\n\t\treturn current;\n\t}", "@Override\n public Stanza createFromParcel(Parcel source) {\n return new Stanza(source);\n }", "private void addPresenceListener() {\n StanzaTypeFilter presenceFilter = new StanzaTypeFilter(Presence.class);\n\n connection.addAsyncStanzaListener(new StanzaListener() {\n @Override\n public void processPacket(Stanza packet) throws SmackException.NotConnectedException {\n Presence presence = (Presence) packet;\n String username = presence.getFrom();\n username = TextUtils.split(username, \"@\")[0];\n String status = Presence.Type.available.equals(((Presence) packet).getType())\n ? \"online\" : \"offline\";\n if (rosterListener != null) {\n rosterListener.presenceCallback(username, status);\n }\n }\n }, presenceFilter);\n }", "public interface RecipientListRouter extends Router {\n}", "public interface DataRelayClient {\n\n /**\n * Send data in a loop over UDP\n */\n public void streamData(String pathToFile) throws IOException;\n\n /**\n * Receive data in a loop via UDP\n */\n public void receiveData() throws IOException;\n\n /**\n * Initialize TCP connection\n */\n public void initializeTCP() throws IOException;\n /**\n * Initialize UDP connection\n */\n public void initializeUDP() throws IOException;\n\n /**\n * Get client ID from the server\n */\n public void setID() throws IOException;\n\n /**\n * Check if client is first to connect\n */\n public boolean isFirstToConnect() throws IOException;\n\n /**\n * Initialize the client\n */\n public void initialize() throws Exception;\n}", "public void testSenderOrderWithMultipleSiteMasters() throws Exception {\n MyReceiver<Object> rx=new MyReceiver<>().rawMsgs(true).verbose(true),\n ry=new MyReceiver<>().rawMsgs(true).verbose(true), rz=new MyReceiver<>().rawMsgs(true).verbose(true);\n final int NUM=512;\n final String sm_picker_impl=SiteMasterPickerImpl.class.getName();\n a=createNode(LON, \"A\", LON_CLUSTER, 2, sm_picker_impl, null);\n b=createNode(LON, \"B\", LON_CLUSTER, 2, sm_picker_impl, null);\n c=createNode(LON, \"C\", LON_CLUSTER, 2, sm_picker_impl, null);\n Util.waitUntilAllChannelsHaveSameView(10000, 1000, a,b,c);\n\n x=createNode(SFO, \"X\", SFO_CLUSTER, 2, sm_picker_impl, rx);\n y=createNode(SFO, \"Y\", SFO_CLUSTER, 2, sm_picker_impl, ry);\n z=createNode(SFO, \"Z\", SFO_CLUSTER, 2, sm_picker_impl, rz);\n Util.waitUntilAllChannelsHaveSameView(10000, 1000, x,y,z);\n\n waitForBridgeView(4, 10000, 1000, a,b,x,y);\n\n // C in LON sends messages to the site master of SFO (via either SM A or B); everyone in SFO (x,y,z)\n // must receive them in correct order\n SiteMaster target_sm=new SiteMaster(SFO);\n System.out.printf(\"%s: sending %d messages to %s:\\n\", c.getAddress(), NUM, target_sm);\n for(int i=1; i <= NUM; i++) {\n Message msg=new BytesMessage(target_sm, i); // the seqno is in the payload of the message\n c.send(msg);\n }\n\n boolean running=true;\n for(int i=0; running && i < 10; i++) {\n for(MyReceiver<Object> r: Arrays.asList(rx,ry,rz)) {\n if(r.size() >= NUM) {\n running=false;\n break;\n }\n }\n Util.sleep(1000);\n }\n\n System.out.printf(\"X: size=%d\\nY: size=%d\\nZ: size=%d\\n\", rx.size(), ry.size(), rz.size());\n assert rx.size() == NUM || ry.size() == NUM;\n assert rz.size() == 0;\n }", "public void onConnect(WebSocket ws) {\n\t\ttry {\n\t\t\tif (ws == null || ws.getRemoteSocketAddress() == null) {\n\t\t\t\terror(\"ws or getRemoteSocketAddress() == null\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tlog.info(ws.getRemoteSocketAddress().toString());\n\n\t\t\t// set javascript user object for this connection\n\t\t\tConnection conn = conns.addConnection(ws);\n\t\t\tMessage onConnect = createMessage(\"shoutclient\", \"onConnect\", Encoder.toJson(conn));\n\t\t\tws.send(Encoder.toJson(onConnect));\n\n\t\t\t// BROADCAST ARRIVAL\n\t\t\t// TODO - broadcast to others new connection of user - (this mean's\n\t\t\t// user\n\t\t\t// has established new connection,\n\t\t\t// this could be refreshing the page, going to a different page,\n\t\t\t// opening\n\t\t\t// a new tab or\n\t\t\t// actually arriving on the site - how to tell the difference\n\t\t\t// between\n\t\t\t// all these activities?\n\t\t\tsystemBroadcast(String.format(\"[%s]@[%s] is in the haus !\", conn.user, conn.ip));\n\n\t\t\t// FIXME onShout which takes ARRAY of shouts !!! - send the whole\n\t\t\t// thing\n\t\t\t// in one shot\n\t\t\t// UPDATE NEW CONNECTION'S DISPLAY\n\t\t\tfor (int i = 0; i < shouts.size(); ++i) {\n\t\t\t\tShout s = shouts.get(i);\n\t\t\t\tString ss = Encoder.toJson(s);\n\t\t\t\tMessage catchup = createMessage(\"shoutclient\", \"onShout\", ss);\n\t\t\t\tws.send(Encoder.toJson(catchup));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLogging.logError(e);\n\t\t}\n\t}", "public static void startChatServer() {\n\t\tbyte[] buffer = new byte[1024];\n\t\tStreamConnectionNotifier cn = null;\n\t\ttry {\n\t\t\tLocalDevice local = LocalDevice.getLocalDevice();\n\t\t\tlocal.setDiscoverable(DiscoveryAgent.GIAC);\n\t\t\tcn = (StreamConnectionNotifier) Connector.open(INSECURE_URL);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tOutputThread t = null;\n\t\t\tStreamConnection sock = null;\n\t\t\tInputStream is = null;\n\t\t\tOutputStream os = null;\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"accepting connection:\");\n\t\t\t\tsock = cn.acceptAndOpen();\n\t\t\t\tSystem.out.println(\"accept!: \" + Charset.defaultCharset());\n\t\t\t\tis = sock.openInputStream();\n\t\t\t\tos = sock.openOutputStream();\n\n\t\t\t\tt = new OutputThread(os);\n\t\t\t\tt.start();\n\n\t\t\t\twhile (t.isAlive()) {\n\t\t\t\t\t//TODO: use timeout read?\n\t\t\t\t\tint len = is.read(buffer);\n\t\t\t\t\t// printAsHex(buffer, len);\n\t\t\t\t\tif (len > 0) {\n\t\t\t\t\t\tSystem.out.println(\"received message(\" + len + \"): \" + new String(buffer, 0, len));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//TODO: check connection is live or not,\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\tt.interrupt();\n\t\t\t\tt = null;\n\t\t\t\ttry {\n\t\t\t\t\tsock.close();\n\t\t\t\t\tcn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t//\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public String getFromJID() {\n\t\treturn fromJID;\n\t}", "@Override\n\tpublic int subscribe(String host, int port) {\n\t\t\n\t\t//InetSocketAddress insock = new InetSocketAddress(host, port);\n\t\tAdress add = new Adress(host, port);\n\t\t\n\t\tdataManager.addServer(add);\n\t\tSystem.out.println(\"subscribtion de \"+host+\":\"+port);\n\t\treturn 1;\n\t}", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tString search_id=text.getText();\r\n\t\t\t\tif(!StringUtils.isBlank(search_id)){\r\n\t\t\t\t\tc.getReadThread().addMessageListener(messageListener);\r\n\t\t\t\t\tTranObject to=new TranObject(TranObjectType.CLIENT_TO_SEVER);\r\n\t\t\t\t\tto.setFromUser(user.getId());\r\n\t\t\t\t\tto.setToUser(Integer.parseInt(text.getText()));\r\n\t\t\t\t\tto.setRequest(ClientRequest.SEARCH_FRIEND);\r\n\t\t\t\t\tc.getWriteThread().setMsg(to);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "private void registerTransferBroadcastReceiver() {\n\t\tIntentFilter filter = new IntentFilter();\n\t\tfilter.addAction(TransferManager.BROADCAST_ACTION_SENT);\n\t\tfilter.addAction(TransferManager.BROADCAST_ACTION_RECEIVED);\n\t\tfilter.addAction(TransferManager.BROADCAST_ACTION_EXCEPTION);\n\t\tregisterReceiver(mTransferBroadcastReceiver, filter);\n\t}", "public void configure() {\n from(INBOUND_URI + \"?serviceClass=\" + WsTwitterService.class.getName())\n .marshal().xmljson() // convert xml to json\n .transform().jsonpath(\"$.query\") // extract arg0 contents\n .removeHeaders(\"*\")\n .setHeader(Exchange.HTTP_METHOD, new SimpleExpression(\"GET\"))\n // Note, prefer HTTP_PATH + to(<uri>) instead of toD(<uri with path>) for easier unit testing\n .setHeader(Exchange.HTTP_PATH, new SimpleExpression(\"/twitter/${body}\"))\n .to(TWITTER_URI)\n .removeHeader(Exchange.HTTP_PATH)\n .convertBodyTo(byte[].class) // load input stream to memory\n .setHeader(Exchange.HTTP_METHOD, new SimpleExpression(\"POST\"))\n .setHeader(\"recipientList\", new SimpleExpression(\"{{env:WS_RECIPIENT_LIST:http4://localhost:8882/filesystem/}}\"))\n .recipientList().header(\"recipientList\")\n .transform().constant(null);\n }", "public void receivedInAppMessageJson(JSONArray jSONArray) throws JSONException {\n }", "public void run() {\n try {\n int i = 0;\n while (running) {\n try {\n TimeUnit.MILLISECONDS.sleep(250);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n if (requests.size() > 0) {\n external_socket_out = new Socket(target_address, outside_port);\n Request r = requests.first();\n \n if (r.getStatus(secretKey).equals(\"na\")) {\n r.setStatus(\"ad\",secretKey);\n System.out.println(\"> Speaker: Found request!\");\n\n\n System.out.println(\"> TCPSpeaker: Sent request to server\");\n // Envia o pedido ao servidor de destino\n PrintWriter pw = new PrintWriter(external_socket_out.getOutputStream());\n pw.println(r.getMessage(secretKey));\n pw.println();\n pw.flush();\n\n\n System.out.println(\"> TCPSpeaker: Getting response from server\");\n // Recebe a resposta do servidor de destino\n BufferedReader br = new BufferedReader(new InputStreamReader(external_socket_out.getInputStream()));\n String t;\n while ((t = br.readLine()) != null)\n r.concatenateResponse(t,secretKey);\n r.setStatus(\"sd\",secretKey);\n\n System.out.println(\"> TCPSpeaker: Request has been served at destination!\");\n br.close();\n\n external_socket_out.close();\n\n //enviar o request via udp de volta\n String ip = InetAddress.getLocalHost().getHostAddress();\n i++;\n startRequestHandler(this.UDPsocket,r,i,ip);\n\n //remover o request da fila de espera deste nodo\n requests.remove(r);\n }\n }\n\n }\n } catch(Exception e){\n e.printStackTrace();\n }\n }", "public interface IPacketTransporter {\n\n DataInputStream getReceiveStream();\n\n DataOutputStream getSendStream();\n\n /**\n * Blocks until a packet is available. The packet identifier is returned, \n * and the packet is available for reading on the Receive stream.\n */\n int ReceivePacket();\n\n /**\n * Returns the oldest packet in the received packet queue.\n * If no packet is available this function immediately returns -1;\n * The packet identifier is returned, \n * and the packet is available for reading on the Receive stream.\n */\n int ReceiveAvailablePacket();\n\n /**\n * Sends a packet with given identifier. (non-blocking)\n * The data written to the SendStream since the last call to SendPacket is sent.\n */\n void SendPacket(int packetIdentifier);\n \n \n \n \n \n \n \n \n void onPacketReceived(int packetIdentifier, byte[] dgram, int offset, int length);\n \n \n \n}", "@Override\n\tpublic void onNetStart(String id) {\n\t\t\n\t}", "void onDiscoverPeersSuccess();", "private String processReceivers(String[] ids){\n StringBuilder res = new StringBuilder();\n UserActivityController uac = (UserActivityController) builder.getControllers()[0];\n for (String s : ids){\n res.append(uac.getDisplayedUsername(viewer, UUID.fromString(s)));\n }\n return res.toString();\n }", "@Override\n public int getClientBroadcastPort() {\n return 10082;\n }", "protected abstract AID[] getReceivers();", "@ArchTypeComponent(\n patterns = {@Pattern(name=\"testLayered\", kind = \"Layered\", role=\"Layer{1}\")}\n )\npublic interface ServerConnector { \n \n /** Send the on-the-wire string to the server side. \n * \n * @param onTheWireFormat the observation in the adopted \n * on-the-wire format. \n * @return a future that will eventually tell the status \n * of the transmission. \n */ \n public FutureResult sendToServer(String onTheWireFormat) throws IOException; \n \n /** Send a query for a set of observations to the server. \n * \n * @param query the query for observations. Use one of \n * those defined in the forwarder.query sub package as \n * these are the ONLY ones the server understands. \n * @param reponseType define the type of the \n * returned observations, either as a list of \n * StandardTeleObserations or as PHMR documents. \n * @return a future with the query result as one big \n * string that needs deserializing before it can \n * by understood. \n * @throws IOException \n * @throws Net4CareException \n * @throws UnknownCPRException \n */ \n\tpublic FutureResultWithAnswer queryToServer(Query query) throws IOException, Net4CareException; \n\t \n }", "void receive(String watcher) throws ProtocolExecutionException;", "public void listen_to_NN() throws IOException, ClassNotFoundException {\n\tois = new ObjectInputStream(sock.getInputStream());\t\n\twhile (true) { \n\t if (verbose) {\n\t\tSystem.out.println(\" [DN] > Listening for messages...\");\n\t }\n\t Msg msg = (Msg) ois.readObject();\n\t if (verbose) {\n\t\tSystem.out.println(\" [DN] > Received a message!\");\n\t }\n\t this.process(msg); \n\t}\n }", "public void startRunning(){\n\t\ttry{\n\t\t\tserver = new ServerSocket(6789, 100);\n\t\t\t//int Port Number int 100 connections max (backlog / queue link)\n\t\t\twhile(true){\n\t\t\t\ttry{\n\t\t\t\t\twaitForConnection();\n\t\t\t\t\tsetupStreams();\n\t\t\t\t\twhileChatting();\n\t\t\t\t\t//connect and have conversation\n\t\t\t\t}catch(EOFException eofe){\n\t\t\t\t\tshowMessage(\"\\n Punk Ass Bitch.\");\n\t\t\t\t}finally{\n\t\t\t\t\tcloseChat();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(IOException ioe){\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}\n\t}", "public ServerTool(JavaPlugin plugin) {\n\t\tthis.plugin = plugin;\n\t\tthis.queue = new ArrayList<String[]>();\n\t\tBukkit.getMessenger().registerOutgoingPluginChannel(this.plugin, \"BungeeCord\");\n\t\tBukkit.getMessenger().registerIncomingPluginChannel(this.plugin, \"BungeeCord\", this);\n\t}", "public void listen() {\n Thread listenThread = new Thread(new Runnable() {\n\n @Override\n public void run() {\n\n DatagramSocket socket;\n try {\n\n socket = new DatagramSocket(BROADCAST_PORT);\n }\n catch (SocketException e) {\n\n return;\n }\n byte[] buffer = new byte[BROADCAST_BUF_SIZE];\n\n while(LISTEN) {\n\n listen(socket, buffer);\n }\n socket.disconnect();\n socket.close();\n return;\n }\n\n public void listen(DatagramSocket socket, byte[] buffer) {\n\n try {\n // Esperando o bebê\n DatagramPacket packet = new DatagramPacket(buffer, BROADCAST_BUF_SIZE);\n socket.setSoTimeout(15000);\n socket.receive(packet);\n String data = new String(buffer, 0, packet.getLength());\n String action = data.substring(0, 4);\n if(action.equals(\"ONL:\")) {\n addBaby(data.substring(4, data.length()), packet.getAddress());\n }\n else if(action.equals(\"BYE:\")) {\n removeBaby(data.substring(4, data.length()));\n }\n\n }\n catch(SocketTimeoutException e) {\n\n if(LISTEN) {\n\n listen(socket, buffer);\n }\n return;\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }\n });\n listenThread.start();\n }", "public static void getWatch() {\n for ( String nodeId : getNodes() ){\n Wearable.MessageApi.sendMessage(\n mGoogleApiClient, nodeId, \"GET_WATCH\", new byte[0]).setResultCallback(\n new ResultCallback<MessageApi.SendMessageResult>() {\n @Override\n public void onResult(MessageApi.SendMessageResult sendMessageResult) {\n if (!sendMessageResult.getStatus().isSuccess()) {\n Log.i(\"MessageApi\", \"Failed to send message with status code: \"\n + sendMessageResult.getStatus().getStatusCode());\n } else if (sendMessageResult.getStatus().isSuccess()) {\n Log.i(\"MessageApi\", \"onResult successful!\");\n }\n }\n }\n );\n }\n }", "public void registerConnection(TCPReceiverThread receiverThread, String sourceID, String targetID);", "public void testInBandBytestreamWithMessageStanzas() throws Exception {\n\n XMPPConnection initiatorConnection = getConnection(0);\n XMPPConnection targetConnection = getConnection(1);\n\n // test data\n Random rand = new Random();\n final byte[] data = new byte[dataSize];\n rand.nextBytes(data);\n final SynchronousQueue<byte[]> queue = new SynchronousQueue<byte[]>();\n\n InBandBytestreamManager targetByteStreamManager = InBandBytestreamManager.getByteStreamManager(targetConnection);\n\n InBandBytestreamListener incomingByteStreamListener = new InBandBytestreamListener() {\n\n public void incomingBytestreamRequest(InBandBytestreamRequest request) {\n InputStream inputStream;\n try {\n inputStream = request.accept().getInputStream();\n byte[] receivedData = new byte[dataSize];\n int totalRead = 0;\n while (totalRead < dataSize) {\n int read = inputStream.read(receivedData, totalRead, dataSize - totalRead);\n totalRead += read;\n }\n queue.put(receivedData);\n }\n catch (Exception e) {\n fail(e.getMessage());\n }\n }\n\n };\n targetByteStreamManager.addIncomingBytestreamListener(incomingByteStreamListener);\n\n InBandBytestreamManager initiatorByteStreamManager = InBandBytestreamManager.getByteStreamManager(initiatorConnection);\n initiatorByteStreamManager.setStanza(StanzaType.MESSAGE);\n\n OutputStream outputStream = initiatorByteStreamManager.establishSession(\n targetConnection.getUser()).getOutputStream();\n\n // verify stream\n outputStream.write(data);\n outputStream.flush();\n outputStream.close();\n\n assertEquals(\"received data not equal to sent data\", data, queue.take());\n\n }", "void startListening()\n {\n if (outstanding_accept != null || open_connection != null) {\n return;\n }\n \n outstanding_accept = new AcceptThread(bt_adapter, handler);\n outstanding_accept.start();\n }", "public void run() {\n System.out.println(\"NS: in service NameServer worker!\");\n\n PrintStream out;\n BufferedReader in;\n\n try {\n out = new PrintStream(serv.getOutputStream());\n in = new BufferedReader(new InputStreamReader(serv.getInputStream()));\n\n String input = in.readLine();\n StringTokenizer parsedIn = new StringTokenizer(input, \"&\");\n\n \n //if the message sent is a host registering, take the info and put it in\n //the host info list.\n if (input.contains(\"HOST:\")) {\n parsedIn.nextToken();\n String ip = parsedIn.nextToken();\n int port = Integer.parseInt(parsedIn.nextToken());\n HostInfo newHost = new HostInfo(ip, port);\n HostInfoList.add(newHost);\n\n out.println(\"Host registered with NameServer: \" + newHost.toString());\n out.flush();\n\n } else if (input.startsWith(\"NEWAGENT:\")) {\n //register agent with its ID number... assign it a name\n //give all the names of group members\n parsedIn.nextToken();\n AgentInfo agent = newAgent(parsedIn);\n\n out.println(\"NEWAGENT:&\" + agent.getName() + \"&\" + agent.getGroupId());\n out.flush();\n\n\n } else if (input.startsWith(\"AGENTMIGRATE:\")) {\n /*\n * updates info on the agent.\n */\n parsedIn.nextToken();\n String agentId = parsedIn.nextToken();\n AgentInfo agent = null;\n List<AgentInfo> agentList = AgentInfoList.getList();\n for (AgentInfo a : agentList){\n if (a.agentId.equals(agentId))\n agent = a;\n }\n\n //agent.getCurLocation().setNumAgents(agent.getCurLocation().getNumAgents() - 1);\n agent.getCurLocation().incNumAgents();\n HostInfo newHost = HostInfoList.getRandomHost();\n agent.setCurLocation(newHost);\n //newHost.setNumAgents(newHost.getNumAgents() + 1);\n newHost.incNumAgents();\n\n out.println(\"AGENTMIGRATE:&\" + newHost.getIp() + \"&\" + newHost.getPort());\n out.flush();\n\n \n\n \n \n } else if (input.startsWith(\"REAGENT:\")){\n System.out.println(\"NS: receiving: \");\n parsedIn.nextToken();\n String agentId = parsedIn.nextToken();\n int newPort = Integer.parseInt(parsedIn.nextToken());\n List<AgentInfo> agentList = AgentInfoList.getList();\n for (AgentInfo a : agentList){\n if (a.agentId.equals(agentId))\n a.setPort(newPort);\n }\n \n }\n else {\n System.out.println(\"NS: Agent or HostServer requesting unimplemented action from service port.\");\n }\n\n\n } catch (IOException e) {\n System.out.println(\"NS: issue with connection in service NameServer worker!\");\n }\n\n\n }", "private void connectToNotary() throws RemoteException, InvalidSignatureException {\n\t\tfor (String notaryID : notaryServers.keySet()) {\n\t\t\tNotaryInterface notary = notaryServers.get(notaryID);\n\n\t\t\tString cnonce = cryptoUtils.generateCNonce();\n\t\t\tString toSign = notary.getNonce(this.id) + cnonce + this.id;\n\t\t\tX509Certificate res = notary\n\t\t\t\t.connectToNotary(this.id, cnonce, cryptoUtils.getStoredCert(),\n\t\t\t\t\tcryptoUtils.signMessage(toSign));\n\n\t\t\tcryptoUtils.addCertToList(notaryID, res);\n\t\t}\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n if(!SipInfo.devList.isEmpty()) {\n for (int position=0;position<SipInfo.devList.size();position++) {\n SipURL remote = new SipURL(SipInfo.devList.get(position).getUserid(), SipInfo.serverIp, SipInfo.SERVER_PORT_USER);\n SipInfo.toUser = new NameAddress(SipInfo.devList.get(position).getUserid(), remote);\n SipInfo.sipUser.sendMessage(SipMessageFactory.createNotifyRequest(SipInfo.sipUser, SipInfo.toUser\n , SipInfo.user_from, BodyFactory.createAlarm(userId)));\n }\n }\n }", "protected void onPart(String channel, String sender, String login, String hostname) {}", "RichPresenceTransmitter getRichPresenceTransmitter();", "public void startDtmfStream();", "public void testSendSimpleMessage() {\n\n resetCounter();\n\n try {\n FixedResolver tr0 = new FixedResolver(\"127.0.0.1\", 54222);\n FixedTransportManager ftm0 = new FixedTransportManager(tr0);\n TestMediaManager tmm0 = new TestMediaManager(ftm0);\n tmm0.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl0 = new ArrayList<JingleMediaManager>();\n trl0.add(tmm0);\n\n FixedResolver tr1 = new FixedResolver(\"127.0.0.1\", 54567);\n FixedTransportManager ftm1 = new FixedTransportManager(tr1);\n TestMediaManager tmm1 = new TestMediaManager(ftm1);\n tmm1.setPayloads(getTestPayloads1());\n List<JingleMediaManager> trl1 = new ArrayList<JingleMediaManager>();\n trl1.add(tmm1);\n\n JingleManager man0 = new JingleManager(getConnection(0), trl0);\n JingleManager man1 = new JingleManager(getConnection(1), trl1);\n\n // Session 1 waits for connections\n man1.addJingleSessionRequestListener(new JingleSessionRequestListener() {\n /**\n * Called when a new session request is detected\n */\n public void sessionRequested(final JingleSessionRequest request) {\n incCounter();\n System.out.println(\"Session request detected, from \" + request.getFrom());\n }\n });\n\n // Session 0 starts a request\n System.out.println(\"Starting session request, to \" + getFullJID(1) + \"...\");\n JingleSession session0 = man0.createOutgoingJingleSession(getFullJID(1));\n session0.startOutgoing();\n\n Thread.sleep(5000);\n\n assertTrue(valCounter() > 0);\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"An error occured with Jingle\");\n }\n }" ]
[ "0.5141665", "0.48070526", "0.48064318", "0.47575364", "0.4749584", "0.47257897", "0.46943042", "0.46938136", "0.46353483", "0.4619045", "0.45454237", "0.45370644", "0.45307937", "0.45272648", "0.45239565", "0.45021805", "0.44995937", "0.44693726", "0.44628432", "0.44548684", "0.4453903", "0.44524792", "0.44118914", "0.4403955", "0.43850595", "0.43827948", "0.43803054", "0.43748802", "0.43728268", "0.4352851", "0.43374634", "0.43337122", "0.43290275", "0.43285444", "0.43268082", "0.43256873", "0.4323228", "0.42962584", "0.42908013", "0.42868108", "0.4284496", "0.4282919", "0.42757994", "0.42746884", "0.42706588", "0.42670164", "0.4266666", "0.42583013", "0.42472383", "0.4245608", "0.4242559", "0.42310655", "0.4228317", "0.42279628", "0.42279485", "0.4225865", "0.42192847", "0.42162418", "0.4215295", "0.42145467", "0.42059168", "0.42045173", "0.42012355", "0.4194788", "0.41938868", "0.41890657", "0.41883954", "0.4185879", "0.41852054", "0.41809052", "0.4180265", "0.41755253", "0.41753927", "0.4167016", "0.41669828", "0.41522864", "0.4148953", "0.41448548", "0.41445088", "0.4142674", "0.41370666", "0.41366076", "0.4133316", "0.4132313", "0.4130542", "0.41204923", "0.41196182", "0.41194016", "0.4118437", "0.411607", "0.41157395", "0.4112456", "0.41088486", "0.41072083", "0.4103875", "0.41015145", "0.41008747", "0.40991858", "0.40931186", "0.40923828" ]
0.508619
1
writes statistics about internal and external relays to the given writer, if the relays implement ManagedThreadPool (which is the common case).
public void dumpRelayStatistics(Writer writer) throws IOException { if (internalRelay != null && internalRelay instanceof ManagedThreadPool) { final ManagedThreadPool relay = (ManagedThreadPool)internalRelay; relay.dumpThreadPoolInfo(writer); } if (externalRelay != null && externalRelay instanceof ManagedThreadPool) { final ManagedThreadPool relay = (ManagedThreadPool)externalRelay; relay.dumpThreadPoolInfo(writer); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void writeTo(final PrintWriter writer) {\n boolean first = true;\n final Set<String> names = new TreeSet<String>(myServerMetrics.keySet());\n for (final String name : names) {\n final BasicServerMetrics serverMetrics = myServerMetrics.get(name);\n if (first) {\n first = false;\n }\n else {\n writer.println();\n }\n writer.print(serverMetrics);\n }\n }", "public interface StatisticsWriter extends Addressable\n{\n\n\t/**\n\t * Updates the StatisticsWriter with new data, which may trigger data to be\n\t * flushed to the underlying Track, or may just buffer it in memory.\n\t *\n\t * @param timestamp\n\t * @param value\n\t */\n\tpublic void update( long timestamp, Number value );\n\n\t/**\n\t * Forces any buffered but not yet written data to be stored. This should\n\t * manually be called when ending a test Execution.\n\t */\n\tpublic void flush();\n\n\t/**\n\t * Returns an Entry based on raw data acquired from calls to update().\n\t *\n\t * @return\n\t */\n\tpublic Entry output();\n\n\t/**\n\t * Gets the associated StatisticVariable.\n\t *\n\t * @return\n\t */\n\tpublic StatisticVariable getStatisticVariable();\n\n\t/**\n\t * Gets the Track for the StatisticsWriter, for the current Execution.\n\t *\n\t * @return\n\t */\n\tpublic TrackDescriptor getTrackDescriptor();\n\n\t/**\n\t * Gets the type of the StatisticsWriter, which should be unique. This can be\n\t * the same as the associated StatisticsWriterFactory.getType().\n\t *\n\t * @return\n\t */\n\tpublic String getType();\n\n\t/**\n\t * Resets the state of the StatisticsWriter.\n\t */\n\tpublic void reset();\n\n\t/**\n\t * Get a description for a specific metric.\n\t */\n\t@CheckForNull\n\tpublic String getDescriptionForMetric( String metricName );\n\n\tpublic enum SampleStats\n\t{\n\t\tAVERAGE( \"The average %v.\" ),\n\t\tCOUNT,\n\t\tSUM,\n\t\tSTD_DEV( \"The standard deviation of %v.\" ),\n\t\tSTD_DEV_SUM,\n\t\tPERCENTILE_25TH( \"The 25th percentile of %v.\" ),\n\t\tPERCENTILE_75TH( \"The 75th percentile of %v.\" ),\n\t\tPERCENTILE_90TH( \"The 90th percentile of %v.\" ),\n\t\tMEDIAN( \"The median value of %v.\" ),\n\t\tMIN( \"The mininum value of %v.\" ),\n\t\tMAX( \"The maximum value of %v.\" );\n\n\t\tpublic final String description;\n\n\t\tSampleStats()\n\t\t{\n\t\t\tthis.description = this.name() + \" of %v.\";\n\t\t}\n\n\t\tSampleStats( String description )\n\t\t{\n\t\t\tthis.description = description;\n\t\t}\n\t}\n\n\tpublic enum CounterStats\n\t{\n\t\tTOTAL( \"The number of %v in total since the last time the project was started or resetted.\" ),\n\t\tPER_SECOND( \"The number of %v per second.\" );\n\n\t\tpublic final String description;\n\n\t\tCounterStats()\n\t\t{\n\t\t\tthis.description = this.name() + \" of %v.\";\n\t\t}\n\n\t\tCounterStats( String description )\n\t\t{\n\t\t\tthis.description = description;\n\t\t}\n\t}\n\n\tpublic enum VariableStats\n\t{\n\t\tVALUE( \"The number of %v.\" );\n\n\t\tpublic final String description;\n\n\t\tVariableStats()\n\t\t{\n\t\t\tthis.description = this.name() + \" of %v.\";\n\t\t}\n\n\t\tVariableStats( String description )\n\t\t{\n\t\t\tthis.description = description;\n\t\t}\n\t}\n}", "public synchronized void sendStatisticsAway() throws IOException {\n\n\t\tfor (Map.Entry<Integer, Map<Integer, Map<String, Long>>> entry : counters\n\t\t\t\t.entrySet()) {\n\t\t\t// If node is not localhost\n\t\t\tif (entry.getKey().intValue() != myId) {\n\n\t\t\t\tWriteMessage msg = null;\n\t\t\t\tIbisIdentifier receiver = null;\n\n\t\t\t\t// For every submission\n\t\t\t\tfor (Map.Entry<Integer, Map<String, Long>> entry2 : entry\n\t\t\t\t\t\t.getValue().entrySet()) {\n\n\t\t\t\t\tMap<String, Long> submissionCounters = entry2.getValue();\n\t\t\t\t\t// If there are counters\n\t\t\t\t\tif (submissionCounters.size() > 0) {\n\t\t\t\t\t\tif (msg == null) {\n\t\t\t\t\t\t\treceiver = net.getPeerLocation(entry.getKey());\n\t\t\t\t\t\t\tmsg = net.getMessageToSend(receiver,\n\t\t\t\t\t\t\t\t\tNetworkLayer.nameMgmtReceiverPort);\n\t\t\t\t\t\t\tmsg.writeByte((byte) 6);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Write the submission Id\n\t\t\t\t\t\tmsg.writeByte((byte) 1);\n\n\t\t\t\t\t\tmsg.writeInt(entry2.getKey());\n\t\t\t\t\t\tmsg.writeInt(submissionCounters.size());\n\n\t\t\t\t\t\tfor (Map.Entry<String, Long> entry3 : submissionCounters\n\t\t\t\t\t\t\t\t.entrySet()) {\n\t\t\t\t\t\t\tbyte[] key = entry3.getKey().getBytes();\n\t\t\t\t\t\t\tmsg.writeInt(key.length);\n\t\t\t\t\t\t\tmsg.writeArray(key);\n\t\t\t\t\t\t\tmsg.writeLong(entry3.getValue());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsubmissionCounters.clear();\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (msg != null) {\n\t\t\t\t\tmsg.writeByte((byte) 0);\n\t\t\t\t\tmsg.finish();\n\t\t\t\t\tmsg = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static void writeStatistics(String name) throws IOException {\n fileWriter = new BufferedWriter(new FileWriter(PATH + \"/uid/\" + name));\n fileWriter.write(\"Number of Nodes total: \" + globalVertexCount);\n fileWriter.newLine();\n fileWriter.write(\"Number of Edges total: \" + globalEdgeCount);\n fileWriter.newLine();\n fileWriter.write(\"######################################\");\n fileWriter.newLine();\n fileWriter.write(\"Nodes counted:\");\n fileWriter.newLine();\n for (Map.Entry<String, Long> entry : counterMapNodes.entrySet()) {\n fileWriter\n .write(entry.getKey().replace(\"_0.csv\", \"\") + \": \" + entry.getValue());\n fileWriter.newLine();\n }\n fileWriter.write(\"######################################\");\n fileWriter.newLine();\n fileWriter.write(\"Edges counted:\");\n fileWriter.newLine();\n for (Map.Entry<String, Long> entry : counterMapEdges.entrySet()) {\n fileWriter\n .write(entry.getKey().replace(\"_0.csv\", \"\") + \": \" + entry.getValue());\n fileWriter.newLine();\n }\n fileWriter.close();\n }", "int getWriterConcurrency();", "public void storeStats() throws Exception {\n logger.info(\"[WORKER-MONITOR] - Start store stats into file. TopologyId: \" + topologyId);\n\n logger.debug(\"------------------WORKER MONITOR SNAPSHOT START------------------\");\n logger.debug(\"Current InterNode Traffic is: \" + DataManager.getInstance().getCurrentInterNodeTraffic());\n logger.debug(\"This Topology current total load is: \" + DataManager.getInstance().getTotalLoad(topologyId));\n // 2018-07-23 add for simple logs\n /*\n if (taskMonitorList.size() != 0) {\n FileUtils.writeToFile(trafficFilename, taskMonitorList.get(0).getTaskId() + \" : \" + DataManager.getInstance().getCurrentInterNodeTraffic());\n }\n */\n FileUtils.writeToFile(Constants.TRAFFIC_DATA_FILE, taskMonitorList.get(0).getTaskId() + \" : \" + DataManager.getInstance().getCurrentInterNodeTraffic());\n\n // Output the threadToTaskMap\n logger.debug(\"Threads to Tasks association is: \");\n for (long threadId : threadToTaskMap.keySet()) {\n logger.debug(\" - \" + threadId + \": \" + threadToTaskMap.get(threadId));\n }\n\n logger.debug(\"Inter-Task Traffic Stats (tuples sent per time slot): \");\n for (TaskPair pair : trafficStats.keySet()) {\n logger.debug(\" - \" + pair.getSourceTaskId() + \" -> \" + pair.getDestinationTaskId() + \": \" + getTraffic(pair) + \" tuple/s [\" + Utils.collectionToString(trafficStats.get(pair)) + \"]\");\n // invoke DataManager function to store Traffic info. 2018-05-08\n DataManager.getInstance().storeTraffic(topologyId, pair.getSourceTaskId(), pair.getDestinationTaskId(), getTraffic(pair));\n }\n\n logger.debug(\"Load stats (CPU cycles consumed per time slot): \");\n long totalCPUCyclesPerSecond = 0;\n for (long threadId : loadStats.keySet()) {\n List<Long> threadLoadInfo = loadStats.get(threadId);\n totalCPUCyclesPerSecond += threadLoadInfo.get(threadLoadInfo.size() - 1) / timeWindowLength;\n logger.debug(\" - thread \" + threadId + \": \" + getLoad(threadId) + \" cycle/s [\" + Utils.collectionToString(threadLoadInfo) + \"]\");\n\n Executor executor = threadToTaskMap.get(threadId);\n // invoke DataMananger to store load info. 2018-05-08\n DataManager.getInstance().storeCpuLoad(topologyId, executor.getBeginTask(), executor.getEndTask(), getLoad(threadId));\n\n }\n long totalCPUCyclesAvailable = CPUInfo.getInstance().getTotalSpeed();\n double usage = ((double) totalCPUCyclesPerSecond / totalCPUCyclesAvailable) * 100; // int -> double\n logger.debug(\"Total CPU cycles consumed per second: \" + totalCPUCyclesPerSecond + \", Total available: \" + totalCPUCyclesAvailable + \", Usage: \" + usage + \"%\");\n\n // add from yitian 2018-04-29\n logger.debug(\"Output the TaskMonitorList: \");\n for (TaskMonitor monitor : taskMonitorList) {\n logger.debug(\"- ProcessId: \" + monitor.getProcessId() + \" -> threadId: \" + monitor.getThreadId() + \" -> taskId: \" + monitor.getTaskId());\n }\n\n // 2018-09-27 add load usage of each host(worker node)\n /*\n Map<String, String> hostCpuUsageList = DataManager.getInstance().getCpuUsageOfHost();\n for (String hostname : hostCpuUsageList.keySet()) {\n FileUtils.writeToFile(cpuUsageFilename, hostname + \" : \" + hostCpuUsageList.get(hostname));\n }\n */\n logger.debug(\"------------------WORKER MONITOR SNAPSHOT END------------------\");\n }", "private void writeMetrics() {\n if (metrics.size() > 0) {\n try {\n String payload = pickleMetrics(metrics);\n int length = payload.length();\n byte[] header = ByteBuffer.allocate(4).putInt(length).array();\n socket.getOutputStream().write(header);\n writer.write(payload);\n writer.flush();\n } catch (Exception e) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Error writing to Graphite\", e);\n } else {\n LOGGER.warn(\"Error writing to Graphite: {}\", e.getMessage());\n }\n }\n\n // if there was an error, we might miss some data. for now, drop those on the floor and\n // try to keep going.\n LOGGER.debug(\"Wrote {} metrics\", metrics.size());\n\n metrics.clear();\n }\n }", "private void execute(List<Pair<Integer, Stream<byte[], GenericRecord>>> streams) throws Exception {\n Runtime.getRuntime().addShutdownHook(new Thread(() -> {\n isDone.set(true);\n printAggregatedStats(cumulativeRecorder);\n }));\n\n ExecutorService executor = Executors.newFixedThreadPool(flags.numThreads);\n try {\n final long numRecordsForThisThread = flags.numEvents / flags.numThreads;\n final long numBytesForThisThread = flags.numBytes / flags.numThreads;\n final double writeRateForThisThread = flags.writeRate / flags.numThreads;\n for (int i = 0; i < flags.numThreads; i++) {\n final int idx = i;\n final List<Stream<byte[], GenericRecord>> logsThisThread = streams\n .stream()\n .filter(pair -> pair.getLeft() % flags.numThreads == idx)\n .map(pair -> pair.getRight())\n .collect(Collectors.toList());\n executor.submit(() -> {\n try {\n if (flags.prometheusEnable) {\n writeWithPrometheusMonitor(\n logsThisThread,\n writeRateForThisThread,\n numRecordsForThisThread,\n numBytesForThisThread);\n } else {\n write(\n logsThisThread,\n writeRateForThisThread,\n numRecordsForThisThread,\n numBytesForThisThread);\n }\n } catch (Exception e) {\n log.error(\"Encountered error at writing records\", e);\n isDone.set(true);\n System.exit(-1);\n }\n });\n }\n log.info(\"Started {} write threads\", flags.numThreads);\n startTime = System.currentTimeMillis();\n reportStats();\n } finally {\n executor.shutdown();\n if (!executor.awaitTermination(5, TimeUnit.SECONDS)) {\n executor.shutdownNow();\n }\n streams.forEach(streamPair -> streamPair.getRight().closeAsync());\n }\n }", "private void sendStatsToServer(List<Statistic> stats)\n {\n if(stats == null)\n {\n System.out.println(\"COORDINATOR - Nothing to send yet\");\n return;\n }\n\n ClientResponse response;\n String serverURI = coordinator.getNode().getServerURI();\n\n try\n {\n WebResource webResource = RESTclient.resource(serverURI + \"/Statistics/\");\n response = webResource.type(\"application/json\").put(ClientResponse.class, new Gson().toJson(stats, new TypeToken<List<Statistic>>(){}.getType()));\n }\n catch (ClientHandlerException ce)\n {\n System.out.println(\"COORDINATOR - Server cloud connection refused - impossible to send data\");\n backupBuffer.add(stats);\n return;\n }\n\n switch (response.getStatus())\n {\n case 200:\n System.out.println(\"COORDINATOR - Sending statistics to server successful\");\n return;\n\n default:\n backupBuffer.add(stats);\n System.out.println(\"COORDINATOR - Failed sending statistics: HTTP error code: \" + response.getStatus());\n }\n }", "public interface Writer {\n\n void write(ResultEntry resultEntry) throws IOException;\n\n}", "public synchronized void beginWrite() {\n\t\tSystem.out.println(\"WRITER BEGIN: \" + Thread.currentThread().getId());\t\n\t\tint writeTurn = currentTurn;\n\t\tcurrentTurn++;\n\n\t\twhile(writeTurn != nextTurn || numReaders > 0 || numWriters > 0 ){ \n\t\t\t/********WAIT CALL*********/\n\t\t\ttry {\n//\t\t\tSystem.out.println(\"WRITER BLOCKED: \" + Thread.currentThread().getId());\t\n\t\t\t\tthis.wait();\n//\t\t\tSystem.out.println(\"WRITER UNBLOCKED: \" + Thread.currentThread().getId());\t\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t/**************************/\n\t\t}\n\t\t\n\t\t//Only increment when the writer is not blocked\n\t\t// (it is at front of queue)\n\t\tnumWriters++;\n\n\t}", "public void setDedicatedWriter(boolean value)\n {\n dedicatedWriter = value;\n }", "public boolean getDedicatedWriter()\n {\n return dedicatedWriter;\n }", "public void returnFile(WriterPoolMember writer)\n throws IOException {\n synchronized(this) {\n if(writer.isOversize()) {\n // maybe retire writer rather than recycle\n if(lastWriterNeededTime<=lastWriterRolloverTime) {\n // no timeouts waiting for recycled writer since last writer rollover\n destroyWriter(writer);\n return;\n } else {\n // reuse writer instance, causing new file to be created\n lastWriterRolloverTime = System.currentTimeMillis();\n }\n }\n }\n if(!availableWriters.offer(writer)) {\n logger.log(Level.WARNING, \"writer unreturnable to available pool; closing early\");\n destroyWriter(writer); \n }\n }", "public interface DataWriter extends DataAdapter {\n\n /**\n * add an item to the list of pending work to be written.\n *\n * @param record DataRecord to add\n */\n void addItem(DataRecord record);\n\n /**\n * flush the list of work to be written\n */\n void flushBatch();\n\n /**\n * called by the system just prior to a normal shutdown.\n */\n void finish();\n\n\n}", "@Override\n protected void doAccounting(TrafficCounter counter) {\n long maxWrittenNonZero = this.maximumCumulativeWrittenBytes();\n if (maxWrittenNonZero == 0) {\n maxWrittenNonZero = 1;\n }\n long maxReadNonZero = this.maximumCumulativeReadBytes();\n if (maxReadNonZero == 0) {\n maxReadNonZero = 1;\n }\n if (statListener != null) {\n for (TrafficCounter tc : this.channelTrafficCounters()) {\n // log.info(\"Written {}\", tc.lastWriteThroughput() * 8 / 1024 / 1024);\n // log.info(\"Read {}\", tc.lastReadThroughput() * 8 / 1024 / 1024);\n statListener.SocketStats(tc.lastWriteThroughput(), tc.lastReadThroughput());\n }\n }\n\n for (TrafficCounter tc : this.channelTrafficCounters()) {\n // log.info(\"Written {}\", tc.lastWriteThroughput() * 8 /1024 /1024);\n // log.info(\"Read {}\", tc.lastReadThroughput() * 8 /1024 /1024);\n\n long cumulativeWritten = tc.cumulativeWrittenBytes();\n if (cumulativeWritten > maxWrittenNonZero) {\n cumulativeWritten = maxWrittenNonZero;\n }\n cumulativeWrittenBytes.add((maxWrittenNonZero - cumulativeWritten) * 100 / maxWrittenNonZero);\n throughputWrittenBytes.add(tc.getRealWriteThroughput() >> 10);\n long cumulativeRead = tc.cumulativeReadBytes();\n if (cumulativeRead > maxReadNonZero) {\n cumulativeRead = maxReadNonZero;\n }\n cumulativeReadBytes.add((maxReadNonZero - cumulativeRead) * 100 / maxReadNonZero);\n throughputReadBytes.add(tc.lastReadThroughput() >> 10);\n }\n\n cumulativeWrittenBytes.clear();\n cumulativeReadBytes.clear();\n throughputWrittenBytes.clear();\n throughputReadBytes.clear();\n super.doAccounting(counter);\n }", "public abstract void sendGlobalStats(ResponseBuilder rb, ShardRequest outgoing);", "protected void logVerbose(StringWriter writer) {\n Collections.reverse(perfromedInvocations);\n for (AtomicOperationInvocation invocation : perfromedInvocations) {\n writeInvocation(invocation, writer);\n }\n }", "@Override\n public void report() {\n\n try {\n File mFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/metrics.txt\");\n File eFile = new File(\"/usr/local/etc/flink-remote/bm_files/metrics_logs/latency_throughput.txt\");\n if (!mFile.exists()) {\n mFile.createNewFile();\n }\n if (!eFile.exists()) {\n eFile.createNewFile();\n }\n\n FileOutputStream mFileOut = new FileOutputStream(mFile, true);\n FileOutputStream eFileOut = new FileOutputStream(eFile, true);\n\n StringBuilder builder = new StringBuilder((int) (this.previousSize * 1.1D));\n StringBuilder eBuilder = new StringBuilder((int) (this.previousSize * 1.1D));\n\n// Instant now = Instant.now();\n LocalDateTime now = LocalDateTime.now();\n\n builder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n eBuilder.append(lineSeparator).append(lineSeparator).append(now).append(lineSeparator);\n\n builder.append(lineSeparator).append(\"---------- Counters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- records counter ----------\").append(lineSeparator);\n for (Map.Entry metric : counters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n if (( (String)metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Counter) metric.getKey()).getCount()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Gauges ----------\").append(lineSeparator);\n for (Map.Entry metric : gauges.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Gauge) metric.getKey()).getValue()).append(lineSeparator);\n }\n\n builder.append(lineSeparator).append(\"---------- Meters ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- throughput ----------\").append(lineSeparator);\n for (Map.Entry metric : meters.entrySet()) {\n builder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n if (((String) metric.getValue()).contains(\"numRecords\")) {\n eBuilder.append(metric.getValue()).append(\": \").append(((Meter) metric.getKey()).getRate()).append(lineSeparator);\n }\n }\n\n builder.append(lineSeparator).append(\"---------- Histograms ----------\").append(lineSeparator);\n eBuilder.append(lineSeparator).append(\"---------- lantency ----------\").append(lineSeparator);\n for (Map.Entry metric : histograms.entrySet()) {\n HistogramStatistics stats = ((Histogram) metric.getKey()).getStatistics();\n builder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n eBuilder.append(metric.getValue()).append(\": mean=\").append(stats.getMean()).append(\", min=\").append(stats.getMin()).append(\", p5=\").append(stats.getQuantile(0.05D)).append(\", p10=\").append(stats.getQuantile(0.1D)).append(\", p20=\").append(stats.getQuantile(0.2D)).append(\", p25=\").append(stats.getQuantile(0.25D)).append(\", p30=\").append(stats.getQuantile(0.3D)).append(\", p40=\").append(stats.getQuantile(0.4D)).append(\", p50=\").append(stats.getQuantile(0.5D)).append(\", p60=\").append(stats.getQuantile(0.6D)).append(\", p70=\").append(stats.getQuantile(0.7D)).append(\", p75=\").append(stats.getQuantile(0.75D)).append(\", p80=\").append(stats.getQuantile(0.8D)).append(\", p90=\").append(stats.getQuantile(0.9D)).append(\", p95=\").append(stats.getQuantile(0.95D)).append(\", p98=\").append(stats.getQuantile(0.98D)).append(\", p99=\").append(stats.getQuantile(0.99D)).append(\", p999=\").append(stats.getQuantile(0.999D)).append(\", max=\").append(stats.getMax()).append(lineSeparator);\n }\n\n mFileOut.write(builder.toString().getBytes());\n eFileOut.write(eBuilder.toString().getBytes());\n mFileOut.flush();\n eFileOut.flush();\n mFileOut.close();\n eFileOut.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void writeXml(Writer w) throws IOException {\n\t\t\tBufferedWriter bw = ((w instanceof BufferedWriter) ? ((BufferedWriter) w) : new BufferedWriter(w));\n\t\t\t\n\t\t\tbw.write(\"<\" + STATISTICS_TYPE +\n\t\t\t\t\t\" \" + DOC_COUNT_ATTRIBUTE + \"=\\\"\" + this.docCount + \"\\\"\" +\n\t\t\t\t\t\" \" + PENDING_DOC_COUNT_ATTRIBUTE + \"=\\\"\" + this.pendingDocCount + \"\\\"\" +\n\t\t\t\t\t\" \" + PROCESSING_DOC_COUNT_ATTRIBUTE + \"=\\\"\" + this.processingDocCount + \"\\\"\" +\n\t\t\t\t\t\" \" + FINISHED_COUNT_ATTRIBUTE + \"=\\\"\" + this.finishedDocCount + \"\\\"\" +\n\t\t\t\t\t\">\");\n\t\t\tbw.newLine();\n\t\t\t\n\t\t\tString[] docStates = this.getDocStates();\n\t\t\tfor (int s = 0; s < docStates.length; s++) {\n\t\t\t\tbw.write(\"<\" + STATUS_TYPE +\n\t\t\t\t\t\t\" \" + NAME_ATTRIBUTE + \"=\\\"\" + grammar.escape(docStates[s]) + \"\\\"\" +\n\t\t\t\t\t\t\" \" + DOC_COUNT_ATTRIBUTE + \"=\\\"\" + this.getStatusDocCount(docStates[s]) + \"\\\"\" +\n\t\t\t\t\t\t\"/>\");\n\t\t\t\tbw.newLine();\n\t\t\t}\n\t\t\t\n\t\t\tbw.write(\"</\" + STATISTICS_TYPE + \">\");\n\t\t\tbw.newLine();\n\t\t\t\n\t\t\tif (bw != w)\n\t\t\t\tbw.flush();\n\t\t}", "public interface Writer {\n void write(Call call);\n}", "public abstract void getReport(java.io.Writer writer);", "@Override\n public void run() {\n final long startTimeMs = System.currentTimeMillis();\n final long startTimeNanos = System.nanoTime();\n long deadline = startTimeNanos + _sleeptimeNs;\n long startIntervalMs = startTimeMs;\n long lastTotalOps = 0;\n\n boolean alldone;\n\n try {\n CSVPrinter csvPrinter = null;\n\n if (csvStatusOutputStream != null) {\n OutputStreamWriter csvWriter = new OutputStreamWriter(csvStatusOutputStream);\n csvPrinter = new CSVPrinter(csvWriter, CSVFormat.DEFAULT);\n }\n\n do {\n long nowMs = System.currentTimeMillis();\n\n lastTotalOps = computeStats(startTimeMs, startIntervalMs, nowMs, lastTotalOps, csvPrinter);\n\n alldone = waitForClientsUntil(deadline);\n\n startIntervalMs = nowMs;\n deadline += _sleeptimeNs;\n } while (!alldone);\n\n // Print the final stats.\n computeStats(startTimeMs, startIntervalMs, System.currentTimeMillis(), lastTotalOps, csvPrinter);\n\n if (csvPrinter != null)\n csvPrinter.close();\n } catch (IOException ioe) {\n throw new IllegalStateException(ioe);\n }\n }", "public void setWriter(Writer writer) {\n this.writer = writer;\n }", "@Override\n protected void runReporter(PrintWriter writer) throws Exception {\n this.reporter = this.outFormat.create(writer);\n this.reporter.openReport();\n // Loop through the genomes. We count the number of genomes processed, the number of annotated RNAs found,\n // and the number of SILVA RNAs found.\n int gCount = 0;\n int annoRna = 0;\n int blastRna = 0;\n for (Genome genome : this.genomes) {\n gCount++;\n log.info(\"Processing genome {} of {}: {}.\", gCount, this.genomes.size(), genome);\n this.reporter.openGenome(genome);\n // Get the annotated SSU rRNAs.\n annoRna += this.searchForAnnotatedRna(genome);\n // Get the BLAST SSU rRNAs.\n blastRna += this.blastForRna(genome);\n this.reporter.closeGenome(genome);\n }\n // All done. Finish the report.\n this.reporter.finish();\n log.info(\"{} genomes processed. {} RNAs found by BLAST, {} from annotations.\", gCount, blastRna, annoRna);\n }", "@Override\n public void write() {\n for(MDCWriter writer : this.writers) {\n writer.write();\n }\n }", "long getWriterQueueLength();", "public synchronized void destroyWriter(WriterPoolMember writer) throws IOException {\n currentActive--; \n writer.close();\n }", "public synchronized void finishWriting() {\n readerNumber++; // readerNumber = -1 + 1 = 0; \n// readerNumber must be 0 at this point \n this.notifyAll(); // notify possible waiting writers or waiting readers \n }", "public interface DataWriter {\n\n /*\n * Program waits until the entire game is over to ensure that the moves from the previous game\n * are not used in any of the decision making. Should only look at past, complete games as the\n * current game would not be useful anyways.\n */\n void writeGame(Game game, List<File> existingFiles) throws MoveAlreadyWrittenException, ResultAlreadyWrittenException;\n\n void deleteAllMoves(List<File> existingFiles);\n\n void deleteStats(String fileName);\n\n boolean initStatsFile();\n\n boolean writeStats(String fileName);\n}", "void notifyWrite();", "private void writeMonitors(BufferedWriter bw, ArrayList<String> usedNamesMonitors) throws IOException {\n\t\tif (!isAlreadyWrittenToCPN()) {\n\t\t\tIterator transitions = this.getTransitions().iterator();\n\t\t\twhile (transitions.hasNext()) {\n\t\t\t\tColoredTransition transition = (ColoredTransition) transitions.next();\n\t\t\t\tif (transition.getSubpage() == null) {\n\t\t\t\t\tif (this.getIdentifier().equals(\"Environment\") &&\n\t\t\t\t\t\t\ttransition.getIdentifier().equals(\"Clean-up\")) {\n\t\t\t\t\t\t// don't write a monitor for this transition\n\t\t\t\t\t} else if (transition.getIdentifier().equals(\"Init\")) {\n\t\t\t\t\t\t// write the initialisation monitor for this transition\n\t\t\t\t\t\ttransition.writeInitMonitor(bw);\n\t\t\t\t\t\tusedNamesMonitors.add(\"Init\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// write the monitor for this transition\n\t\t\t\t\t\ttransition.writeLoggingMonitor(bw, usedNamesMonitors);\n\t\t\t\t\t}\n\t\t\t\t} else { // there exists a subpage\n\t\t\t\t\ttransition.getSubpage().writeMonitors(bw, usedNamesMonitors);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.pnWrittenToCPN = true;\n\t\t}\n\t}", "private static void writeStats(String[] args, Connection conn)\n\t\t\tthrows ArgumentNumberException {\n\t\tif (args.length != 2 && args.length != 1) {\n\t\t\thandleWrongSizeException();\n\t\t}\n\t\tString statToOrderBy = getStatToOrderBy(args);\n\t\tResultSet rs = generateResultSetForAllChaos(conn, statToOrderBy);\n\t\twriteStatsToFile(rs);\n\t}", "public interface OutputEngine {\n\n\tvoid write(List<MyTwitterMessage> data);\n\t\n}", "private void writeStatistics(PrintWriter statWriter) {\n final int n = this.methods.size();\n final int nPairs = this.distanceList.size();\n // These arrays will hold the distances.\n double[] dist1 = new double[nPairs];\n double[] dist2 = new double[nPairs];\n // Create the correlation calculators.\n var pearson = new PearsonsCorrelation();\n var kendall = new KendallsCorrelation();\n var spearman = new SpearmansCorrelation();\n var variance = new CorrelationVariance();\n // Write the header line.\n statWriter.println(\"method1\\tmethod2\\tPearson\\tKendall\\tSpearman\\tvariation\\tIQR\");\n // We generate each correlation line twice, then sort them.\n var sorter = new TreeMap<String[], String>(new StringTupleSort());\n // Loop through every pair of methods.\n for (int i = 0; i < n; i++) {\n String method1 = this.methods.get(i).toString();\n // Form the first method's distance array.\n this.copyDistances(i, dist1);\n for (int j = i+1; j < n; j++) {\n String method2 = this.methods.get(j).toString();\n // Form the second method's distance array.\n this.copyDistances(j, dist2);\n // Compute the correlations.\n var p = pearson.correlation(dist1, dist2);\n var k = kendall.correlation(dist1, dist2);\n var s = spearman.correlation(dist1, dist2);\n var tm = variance.variation(dist1, dist2);\n var iqr = variance.getIQR();\n // Format a line and store it in the sorter for both directions of the comparison.\n String line = String.format(\"%s\\t%s\\t%8.4f\\t%8.4f\\t%8.4f\\t%8.4f\\t%8.4f\", method1, method2, p, k, s, tm, iqr);\n sorter.put(new String[] { method1, method2 }, line);\n line = String.format(\"%s\\t%s\\t%8.4f\\t%8.4f\\t%8.4f\\t%8.4f\\t%8.4f\", method2, method1, p, k, s, tm, iqr);\n sorter.put(new String[] { method2, method1 }, line);\n }\n }\n // Unspool the print lines from the sorter.\n sorter.values().stream().forEach(x -> statWriter.println(x));\n }", "private void sendTrafficSummary() {\n\t\ttry {\n\t\t\tregistry.getSender().sendData(\n\t\t\t\t\tnew OverlayNodeReportsTrafficSummary(myAssignedID,\n\t\t\t\t\t\t\tsendTracker, relayTracker, sendSummation,\n\t\t\t\t\t\t\treceiveTracker, receiveSummation).getBytes());\n\t\t\tthis.sendTracker = 0; // reset all counters after reporting\n\t\t\tthis.relayTracker = 0;\n\t\t\tthis.receiveTracker = 0;\n\t\t\tthis.sendSummation = 0;\n\t\t\tthis.receiveSummation = 0;\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble reporting traffic summary or closing sockets.\");\n\t\t}\n\t}", "void postRollWALWriterRequest(final ObserverContext<RegionServerCoprocessorEnvironment> ctx)\n throws IOException;", "private void writeOutput( final PrintWriter writer ) throws InterruptedException, IOException {\n double[][] numbers = new double[DATA_ROWS][DATA_COLUMNS];\r\n for(int irow = 0; irow < DATA_ROWS; irow++) {\r\n for(int icol = 0; icol < DATA_COLUMNS; icol++) {\r\n //double number = rnd.nextDouble();\r\n double number = irow + ( (double) icol ) / 10. + ( (double) icol ) / 100. + ( (double) icol ) / 1000. + ( (double) icol ) / 10000. + ( (double) icol ) / 100000.;\r\n Thread.sleep( SLEEP_BETWEEN_COLUMNS ); //simulating a program that's doing some other work like db retrieval\r\n writer.print( number );\r\n writer.print( '\\t' );\r\n numbers[irow][icol] = number;\r\n }\r\n writer.println();\r\n System.out.println( \"wrote row \" + irow );\r\n }\r\n writer.flush();\r\n writer.close();\r\n checkOutput( numbers );\r\n }", "public interface Writer extends Transformer {\n\n /**\n * Writes an entity to the outputstream\n *\n * @param response an outcoming response\n * @param request an incoming provider\n */\n void writeTo(InternalResponse<?> response, InternalRequest<?> request);\n\n /**\n * Figures out whether is writer compatible for the given route\n *\n * @param route compared route\n * @return returns {@code true} if the writer is compatible with the given route\n */\n boolean isWriterCompatible(InternalRoute route);\n\n}", "public void onEncodeSerialData(StreamWriter streamWriter) {\n }", "public interface DataWriter {\n\n\t/**\n\t * Prepare the data writer\n\t * \n\t * @param fields\n\t * the field names\n\t * @throws TransportException\n\t * if fields are invalid\n\t */\n\tvoid prepare(List<String> fields) throws TransportException;\n\n\t/**\n\t * Write the specified values\n\t * \n\t * @param values\n\t * the values to write\n\t * @throws TransportException\n\t * if writing fails\n\t */\n\tvoid write(List<Object> values) throws TransportException;\n\n\t/**\n\t * Commit the data\n\t * \n\t * @throws TransportException\n\t * if commit fails\n\t */\n\tvoid commit() throws TransportException;\n\n}", "public void output(java.io.Writer writer)\n throws FeedException, IOException {\n SyndFeedOutput feedWriter = new SyndFeedOutput();\n feedWriter.output(feed, writer);\n }", "public interface BackPressuredWriteStream<T> extends WriteStream<T> {\n\n static <T> BackPressuredWriteStream create(Handler<T> writeHandler) {\n return new BackPressuredWriteStreamImpl<T>(writeHandler);\n }\n\n static <T> BackPressuredWriteStream createThrottled(Handler<T> writeHandler, long quotaPeriod, int quota, String persistentQuotaTimeFile, Vertx vertx) {\n return new ThrottleStreamImpl(writeHandler, quotaPeriod, quota, persistentQuotaTimeFile, vertx);\n }\n\n void drop();\n\n long getQueueSize();\n}", "public interface TransportLoggerViewMBean {\n\n /**\n * Returns if the managed TransportLogger is currently active\n * (writing to a log) or not.\n * @return if the managed TransportLogger is currently active\n * (writing to a log) or not.\n */\n public boolean isLogging();\n \n /**\n * Enables or disables logging for the managed TransportLogger.\n * @param logging Boolean value to enable or disable logging for\n * the managed TransportLogger.\n * true to enable logging, false to disable logging.\n */\n public void setLogging(boolean logging);\n \n /**\n * Enables logging for the managed TransportLogger.\n */\n public void enableLogging();\n \n /**\n * Disables logging for the managed TransportLogger.\n */\n public void disableLogging();\n \n}", "private void writeMapFileOutput(RecordWriter<WritableComparable<?>, Writable> writer,\n TaskAttemptContext context) throws IOException, InterruptedException {\n describe(\"\\nWrite map output\");\n try (DurationInfo d = new DurationInfo(LOG,\n \"Writing Text output for task %s\", context.getTaskAttemptID());\n ManifestCommitterTestSupport.CloseWriter<WritableComparable<?>, Writable> cw =\n new ManifestCommitterTestSupport.CloseWriter<>(writer, context)) {\n for (int i = 0; i < 10; ++i) {\n Text val = ((i & 1) == 1) ? VAL_1 : VAL_2;\n writer.write(new LongWritable(i), val);\n }\n LOG.debug(\"Closing writer {}\", writer);\n writer.close(context);\n }\n }", "public void writeReport()\n {\n // System.out.println(getClass().getName()+\":: writeReport \");\n\n switch (protocol)\n {\n case ProtocolPush:\n synchronized (circularBuffer)\n {\n if (reset /* && pendingWriteReport */)\n return;\n circularBuffer.writeReport();\n }\n getInputConnector().getModule()\n .connectorPushed(getInputConnector());\n return;\n case ProtocolSafe:\n synchronized (circularBuffer)\n {\n if (reset)\n return;\n circularBuffer.writeReport();\n circularBuffer.notifyAll();\n return;\n }\n default:\n throw new RuntimeException();\n }\n\n }", "public void toString(java.io.PrintWriter writer) {\n writer.print(ToStringLocalization.buildMessage(\"connector\", (Object[])null) + \"=>\" + Helper.getShortClassName(getClass()));\n writer.print(\" \");\n writer.println(ToStringLocalization.buildMessage(\"datasource_name\", (Object[])null) + \"=>\" + getName());\n }", "public WebWriteCollector(final Writer writer, final String format) {\n this.writer = writer;\n this.format = format;\n }", "public void write(DataOutputStream writer) throws Exception\r\n\t{\n\r\n\t}", "@ServerHandler(type = CorfuMsgType.WRITE, opTimer = metricsPrefix + \"write\")\n public void write(CorfuPayloadMsg<WriteRequest> msg, ChannelHandlerContext ctx, IServerRouter r,\n boolean isMetricsEnabled) {\n log.debug(\"log write: global: {}, streams: {}, backpointers: {}\", msg\n .getPayload().getGlobalAddress(), msg.getPayload().getData().getBackpointerMap());\n\n try {\n dataCache.put(msg.getPayload().getGlobalAddress(), msg.getPayload().getData());\n r.sendResponse(ctx, msg, CorfuMsgType.WRITE_OK.msg());\n\n } catch (OverwriteException ex) {\n r.sendResponse(ctx, msg, CorfuMsgType.ERROR_OVERWRITE.msg());\n } catch (DataOutrankedException e) {\n r.sendResponse(ctx, msg, CorfuMsgType.ERROR_DATA_OUTRANKED.msg());\n } catch (ValueAdoptedException e) {\n r.sendResponse(ctx, msg, CorfuMsgType.ERROR_VALUE_ADOPTED.payloadMsg(e.getReadResponse()));\n }\n }", "void dump(PhoneBill phoneBill, PrintWriter writer) throws IOException {\n try {\n Collection<PhoneCall> list = phoneBill.getPhoneCalls();\n long eTime, sTime, diff;\n writer.println(\"Phone Bill for: \" + phoneBill.customer);\n writer.println(\"Call From: To: Start Time: End Time: Duration(minutes):\\n\");\n for (PhoneCall call : list) {\n writer.print(call.callerNum + \" \" + call.calleeNum + \" \");\n writer.print(new SimpleDateFormat(\"MM/dd/yy hh:mm a\").format(call.getStartTime())\n + \" \");\n writer.print(new SimpleDateFormat(\"MM/dd/yy hh:mm a\").format(call.getEndTime())\n + \" \");\n eTime = call.getEndTime().getTime();\n sTime = call.getStartTime().getTime();\n diff = eTime - sTime;\n writer.println(TimeUnit.MINUTES.convert(diff, TimeUnit.MILLISECONDS) + \"\");\n }\n writer.close();\n } catch (IllegalArgumentException e) {\n throw new IOException(\"There was an error writing the file.\");\n }\n }", "public interface Tracker extends BinaryWritable{\n\n\tlong getRid();\n\n\tvoid setRid(long rid);\n\n}", "public synchronized List getBufferForWriting() {\n// if some writer is writing or some reader is reading, wait until no one is writing or reading \n while (readerNumber != 0) {\n try {\n this.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n// when readerNumber == 0 \n readerNumber--; // now readderNumber == -1. \n return buffer;\n }", "public void setWriter(final Writer writer) {\n this.writer = writer;\n }", "@Override\n protected synchronized void addWriter(ChannelHandlerWriteSubscription subscription) {\n super.addWriter(subscription);\n }", "public WriterProxy addMatchedWriter(final PublicationData writerData) {\r\n\r\n\t\tList<Locator> locators = getLocators(writerData);\r\n\t\tWriterProxy wp = writerProxies.get(writerData.getBuiltinTopicKey());\r\n\t\tif (wp == null) {\r\n\t\t\twp = new WriterProxy(this, writerData, locators, heartbeatSuppressionDuration);\r\n\t\t\twp.preferMulticast(getConfiguration().preferMulticast());\r\n\t\t\twp.setLivelinessTask(createLivelinessTask(wp));\r\n\r\n\t\t\twriterProxies.put(writerData.getBuiltinTopicKey(), wp);\r\n\t\t}\r\n\t\telse {\r\n\t\t\twp.update(writerData);\r\n\t\t}\r\n\r\n\t\tlogger.debug(\"[{}] Added matchedWriter {}, locators {}\", getEntityId(), writerData, wp.getLocators());\r\n\r\n\t\t//sendAckNack(wp);\r\n\r\n\t\treturn wp;\r\n\t}", "private void writeCounts(MatrixWithHeaders stats, BufferedWriter bw) throws IOException {\n\t\tfor(String columnName : stats.getColumnNames()) {\n\t\t\tbw.write(\"\\t\");\n\t\t\tbw.write(columnName);\n\t\t}\n\t\tbw.newLine();\n\t\tbw.flush();\n\t\tfor(String rowName : stats.getRowNames()) {\n\t\t\tbw.write(rowName);\n\t\t\tfor(String colName : stats.getColumnNames()) {\n\t\t\t\tbw.write(\"\\t\");\n\t\t\t\tbw.write(String.valueOf((int)stats.get(rowName, colName)));\n\t\t\t}\n\t\t\tbw.newLine();\n\t\t}\n\t}", "public abstract void writeLedgerSummaryReport(ReportWriterService reportWriterService);", "static void recordProcess() {\n try {\n PrintWriter output = new PrintWriter(new FileWriter(file, true));\n output.print(huLuWaList.size() + \" \");\n lock.lock();\n for (Creature creature : huLuWaList) {\n output.print(creature.getCreatureName() + \" \" + creature.getX() + \" \" + creature.getY()+\" \");\n }\n output.print(enemyList.size() + \" \");\n for (Creature creature : enemyList) {\n output.print(creature.getCreatureName() + \" \" + creature.getX() + \" \" + creature.getY()+\" \");\n }\n output.println();\n output.close();\n lock.unlock();\n }catch (Exception ex){\n System.out.println(ex);\n }\n }", "public abstract void returnLocalStats(ResponseBuilder rb,\n SolrIndexSearcher searcher);", "CompressingMessageWriter(MessageWriter wr) {\n this.writer = wr;\n }", "@Override\n public void printStatistics(\n PrintStream out, Result result, ReachedSet reached) {\n Preconditions.checkNotNull(out);\n Preconditions.checkNotNull(result);\n // reached set can be NULL\n\n if (analysisTime.isRunning()) {\n analysisTime.stop();\n }\n if (programTime.isRunning()) {\n programTime.stop();\n }\n if (memStats != null) {\n memStatsThread.interrupt(); // stop memory statistics collection\n }\n\n // print CFA statistics\n printCfaStatistics(out);\n\n // print global time statistics\n printTimeStatistics(out);\n\n // print global memory statistics\n printMemoryStatistics(out);\n\n }", "void setStatisticsEnabled(boolean statsEnabled);", "@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\n protected void dump(Formatter formatter)\n {\n PeerConnectionStatistics s = rawStatistics;\n\n double drate = s.download.average(4);\n drate /= 1024*1024;\n double urate = s.upload.average(4);\n urate /= 1024*1024;\n\n formatter.format(\"%24s %2S%2S %1c%1c %1c%1c %5.1f %3d %6d | %5.1f %2d %6d %5d %s\\n\",\n peer.address,\n connected ? \"+\" : \"-\",\n handshaked ? \"+\" : \"-\",\n\n choke ? 'c' : '-',\n interested ? 'i' : '-',\n peerChoke ? 'c' : '-',\n peerInterested ? 'i' : '-',\n\n drate, blockRequests.size(), statistics.blocksReceived,\n urate, 0, statistics.blocksSent,\n getPeerCompletionPercent(),\n StdPeerProtocol.extractClientNameFromId(peer.peerId));\n }", "public void flush() throws SolrServerException, IOException {\n if (adds > 0) {\n Map<Integer, Map<String, SolrInputDocument>> maps = writeBuffers.asMap();\n for (Map.Entry<Integer, Map<String, SolrInputDocument>> entry : maps.entrySet()) {\n if (entry.getValue().size() > 0) {\n delegateWriter.add(entry.getKey(), ImmutableMap.copyOf(entry.getValue()));\n }\n }\n docOutputCounter.increment(adds);\n docBatchCounter.increment(1L);\n adds = 0;\n writeBuffers.invalidateAll();\n }\n }", "protected void computeDirectly() throws IOException {\n\n\n for(int i = mStart; i < mStart + mLength; i++) {\n mSource[i].forEachRemaining(n -> {\n try {\n Writer.writeBlockForNode(n, db, bufferedWriter, reportBlockSize, relationshipType);\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n }\n\n\n\n }", "public PgStatGetWalSenders(Name alias) {\n this(alias, PG_STAT_GET_WAL_SENDERS);\n }", "private void writeBufferManager(XMLExtendedStreamWriter writer, ModelNode node) throws XMLStreamException {\n USE_DISK_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n INLINE_LOBS.marshallAsAttribute(node, false, writer);\n PROCESSOR_BATCH_SIZE_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n MAX_PROCESSING_KB_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n MAX_FILE_SIZE_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n MAX_BUFFER_SPACE_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n MAX_OPEN_FILES_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n MEMORY_BUFFER_SPACE_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n MEMORY_BUFFER_OFFHEAP_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n ENCRYPT_FILES_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n //values need adjusted\n writeAdjustedValue(writer, node, MAX_RESERVED_KB_ATTRIBUTE);\n writeAdjustedValue(writer, node, MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE);\n\n BUFFER_MANAGER_USE_DISK_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n BUFFER_MANAGER_INLINE_LOBS.marshallAsAttribute(node, false, writer);\n BUFFER_MANAGER_PROCESSOR_BATCH_SIZE_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n BUFFER_MANAGER_MAX_PROCESSING_KB_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n BUFFER_MANAGER_MAX_RESERVED_MB_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n BUFFER_MANAGER_MAX_FILE_SIZE_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n BUFFER_MANAGER_MAX_BUFFER_SPACE_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n BUFFER_MANAGER_MAX_OPEN_FILES_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n BUFFER_MANAGER_MEMORY_BUFFER_SPACE_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n BUFFER_MANAGER_MEMORY_BUFFER_OFFHEAP_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n BUFFER_MANAGER_MAX_STORAGE_OBJECT_SIZE_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n BUFFER_MANAGER_ENCRYPT_FILES_ATTRIBUTE.marshallAsAttribute(node, false, writer);\n }", "int getWriterMaxQueueSize();", "protected void setQWForFiles(Writer writer)\r\n\t{\r\n\t\tqw = new CountingQuietWriter(writer, errorHandler);\r\n\t}", "public interface JournalWriter {\n\n /**\n * Marks all logs as completed.\n */\n void completeLogs() throws IOException;\n\n /**\n * Returns an output stream for the journal checkpoint. The returned output stream is a singleton\n * for this writer.\n *\n * @param latestSequenceNumber the sequence number of the latest journal entry. This sequence\n * number will be used to determine the next sequence numbers for the subsequent journal\n * entries.\n * @return the output stream for the journal checkpoint\n */\n JournalOutputStream getCheckpointOutputStream(long latestSequenceNumber) throws IOException;\n\n /**\n * Writes an entry to the current log stream. {@link #flush} should be called\n * afterward to ensure the entry is persisted.\n *\n * @param entry the journal entry to write\n */\n void write(JournalEntry entry) throws IOException;\n\n /**\n * Flushes the current log stream. Otherwise this operation is a no-op.\n */\n void flush() throws IOException;\n\n /**\n * @return the next sequence number\n */\n long getNextSequenceNumber();\n\n /**\n * Closes the journal.\n */\n void close() throws IOException;\n\n /**\n * Recovers the checkpoint in case the master crashed while updating it previously.\n */\n void recover();\n\n /**\n * Deletes all of the completed logs.\n */\n void deleteCompletedLogs() throws IOException;\n\n /**\n * Marks the current log as completed. If successful, the current log will no longer exist. The\n * current log must be closed before this call.\n */\n void completeCurrentLog() throws IOException;\n}", "public void flush() {\n // all getAndSet will not be synchronous but it's ok since metrics will\n // be spread out among processor worker and we flush every 5s by\n // default\n\n processor.send(new TelemetryMessage(this.metricsSentMetric, this.metricsSent.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.eventsSentMetric, this.eventsSent.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.serviceChecksSentMetric, this.serviceChecksSent.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.bytesSentMetric, this.bytesSent.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.bytesDroppedMetric, this.bytesDropped.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.packetsSentMetric, this.packetsSent.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.packetsDroppedMetric, this.packetsDropped.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.packetsDroppedQueueMetric, this.packetsDroppedQueue.getAndSet(0), tags));\n processor.send(new TelemetryMessage(this.aggregatedContextsMetric, this.aggregatedContexts.getAndSet(0), tags));\n }", "public BufferedMCLWriter getWriter() {\n\t\treturn writer;\n\t}", "public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {\n synchronized (mLock) {\n pw.println(\"RTT Metrics:\");\n pw.println(\"mNumStartRangingCalls:\" + mNumStartRangingCalls);\n pw.println(\"mOverallStatusHistogram:\" + mOverallStatusHistogram);\n pw.println(\"AP:\" + mPerPeerTypeInfo[PEER_AP]);\n pw.println(\"AWARE:\" + mPerPeerTypeInfo[PEER_AWARE]);\n }\n }", "public void enableWriter(boolean enabled) {\n this.useWriter = enabled;\n }", "public void toAddWrite(ArrayList<Client> clients, String nameFileWriter) throws Exception{\n \n FileWriter fout = null;\n PrintWriter pw = null;\n \n try{\n fout = new FileWriter(nameFileWriter, true);\n pw = new PrintWriter(fout);\n \n String line = \"Client Name,Save Set Name,Group Start Time,Save Type,Level,Status\";\n pw.println(line);\n \n int size = clients.size();\n \n for(int i=0;i<size;++i){\n for(int j=0;j<clients.get(i).getSizeErrors();++j){\n pw.println(clients.get(i).getName() + \",\" + clients.get(i).getReport(j).toString()); \n }\n } \n }catch(Exception e){\n throw new Exception(\"Error de escritura\");\n }finally{\n if(null != fout){\n fout.close();\n }\n }\n \n }", "@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}", "private void writeHistograms(PrintWriter writer) {\n Set set = tokenSizes.entrySet();\n String delimiter = \"\\t\";\n double amount = 0;\n\t\tdouble histogramAmount = 0;\n\n // Use of Iterator for the while loop that is no longer being used.\n // Iterator iterator = set.iterator();\n\n // Implement the calculateMaximumAmount method for PROJECT 3 CORRECTION\n for(Map.Entry<Integer, Integer> entry : tokenSizes.entrySet()) {\n amount = calculateMaximumAmount();\n\t\t\thistogramAmount = (double) entry.getValue() * amount;\n writer.println(entry.getKey() + delimiter + printHistogram(histogramAmount));\n } \n\n /**\n * This is a while loop I used in project 1 but Paula told me to use an \n * enhanced for loop instead. \n *\n * while (iterator.hasNext()) {\n * Map.Entry me = (Map.Entry) iterator.next();\n * int tokenValue = (int) me.getValue();\n * writer.println(me.getKey() + \"\\t\" + printHistogram(tokenValue));\n * }\n */\n }", "@Override\n public void retrieveStats() throws Exception {\n if (!this.useStats) {\n throw new IllegalStateException(\"Accessor is not using statistics in current context.\");\n }\n /*\n * We are using file-level stats therefore if file has multiple splits,\n * it's enough to return count for a first split in file.\n * In case file has multiple splits - we don't want to duplicate counts.\n */\n if (context.getFragmentIndex() == 0) {\n this.count = this.orcReader.getNumberOfRows();\n rowToEmitCount = readNextObject();\n }\n statsInitialized = true;\n }", "synchronized public void wrlock() {\n long tid = Thread.currentThread().getId();\n\n // Place myself on queue\n writersQueue.enq(tid);\n\n // While its not my turn, wait\n while (writersQueue.getFirstItem() != tid\n \t\t|| activeWriter == true\n \t\t|| activeReaders > 0\n \t\t|| (bias == 'R' && readersQueue.isEmpty() == false)) {\n \ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n }\n\n // Its my turn, remove myself from queue\n writersQueue.deq();\n\n // DEBUG\n if (activeWriter == true\n \t\t|| activeReaders > 0\n \t\t|| (bias == 'R' && readersQueue.isEmpty() == false)) {\n \tSystem.out.println(\"BUG IN WRITER\");\n }\n\n // I am now an active writer!\n activeWriter = true;\n\t}", "public interface NetObjectWriter {\n\n boolean put(Object o);\n\n void put(final Object data, final long delay);\n\n}", "public void record() {\n stats.record();\n }", "int getDelegatedOutputsCount();", "interface WriteExecutor<R> {\n /**\n * Execute previously defined operation\n */\n R execute();\n }", "public interface OSMEntitySink {\n\n public void writeBegin() throws IOException;\n\n public void writeNode(long id, Node node) throws IOException; // TODO rename id parameters to nodeId, wayId, relationId throughout\n\n public void writeWay(long id, Way way) throws IOException;\n\n public void writeRelation(long id, Relation relation) throws IOException;\n\n public void writeEnd() throws IOException;\n\n}", "@Override\n public void onWrite() {\n onChannelPreWrite();\n }", "@Postprocess\n public void getReport() {\n try {\n BufferedWriter bufferWriter = new BufferedWriter(new FileWriter(logfile, false));\n if (!results.isEmpty()) {\n bufferWriter.write(\"===========================================================\\n\");\n bufferWriter.write(\"sys_milli,\\t\\tdb_micro,\\t\\ttime_diff\\n\");\n Collections.sort(results);\n for (MysqlheartbeatBean mhb : results) {\n bufferWriter.write(String.valueOf(mhb.getSysMilli()) + \",\\t\\t\"\n + String.valueOf(mhb.getDbMicro()) + \",\\t\\t\"\n + String.valueOf(mhb.getDbMicro() - mhb.getSysMilli()) + \"\\n\");\n }\n bufferWriter.flush();\n }\n bufferWriter.close();\n } catch (IOException ex) {\n logger.log(Level.SEVERE, \"{0}: {1}\", new Object[]{toolName, ex.getMessage()});\n }\n }", "@Override\r\n\t\t\tpublic void progressMade() {\n\t\t\t\twriteReadSemaphore.refreshWriteLock(lockKey, finalWriteToken, lockTimeoutSec);\r\n\t\t\t}", "public void purgeQueueAndPersist() {\n // Return if the writer is not enabled.\n if (PerformanceAnalyzerConfigAction.getInstance() == null) {\n return;\n } else if (!controller.isPerformanceAnalyzerEnabled()) {\n // If PA is disabled, then we return as we don't want to generate\n // new files. But we also want to drain the queue so that when it is\n // enabled next, we don't have the current elements as they would be\n // old.\n if (PerformanceAnalyzerMetrics.metricQueue.size() > 0) {\n List<Event> metrics = new ArrayList<>();\n PerformanceAnalyzerMetrics.metricQueue.drainTo(metrics);\n LOG.info(\n \"Performance Analyzer no longer enabled. Drained the\"\n + \"queue to remove stale data.\");\n }\n return;\n }\n\n LOG.debug(\"Starting to purge the queue.\");\n List<Event> metrics = new ArrayList<>();\n PerformanceAnalyzerMetrics.metricQueue.drainTo(metrics);\n LOG.debug(\"Queue draining successful.\");\n\n long currentTimeMillis = System.currentTimeMillis();\n\n // Calculate the timestamp on the file. For example, lets say the\n // purging started at time 12.5 then all the events between 5-10\n // are written to a file with name 5.\n long timeBucket =\n PerformanceAnalyzerMetrics.getTimeInterval(\n currentTimeMillis, MetricsConfiguration.SAMPLING_INTERVAL)\n - MetricsConfiguration.SAMPLING_INTERVAL;\n\n // When we are trying to collect the metrics for the 5th-10th second,\n // but doing that in the 12.5th second, there is a chance that a\n // collector ran in the 11th second and pushed the metrics in the\n // queue. This thread, should be able to filter them and write them\n // to their appropriate file, which should be 10 and not 5.\n long nextTimeBucket = timeBucket + MetricsConfiguration.SAMPLING_INTERVAL;\n\n List<Event> currMetrics = new ArrayList<>();\n List<Event> nextMetrics = new ArrayList<>();\n\n for (Event entry : metrics) {\n if (entry.epoch == timeBucket) {\n currMetrics.add(entry);\n } else if (entry.epoch == nextTimeBucket) {\n nextMetrics.add(entry);\n } else {\n // increment stale_metrics count when metrics to be collected is falling behind the\n // current bucket\n PerformanceAnalyzerApp.WRITER_METRICS_AGGREGATOR.updateStat(\n WriterMetrics.STALE_METRICS, \"\", 1);\n }\n }\n\n LOG.debug(\"Start serializing and writing to file.\");\n writeAndRotate(currMetrics, timeBucket, currentTimeMillis);\n if (!nextMetrics.isEmpty()) {\n // The next bucket metrics don't need to be considered for\n // rotation just yet. So, we just write them to the\n // <nextTimeBucket>.tmp\n eventLogFileHandler.writeTmpFile(nextMetrics, nextTimeBucket);\n }\n LOG.debug(\"Writing to disk complete.\");\n }", "public abstract boolean exportStatistics(String statsFileName) throws SQLException;", "public void refreshAppend() throws IOException, InterruptedException {\n appendAndRefreshAppendLock.lock();\n if (shutdown.get()) {\n LOG.warning(\"Cannot refresh on a already shutdown writer.\");\n appendAndRefreshAppendLock.unlock();\n return;\n }\n // There could be a moment, stub is not yet initialized.\n if (clientStream != null) {\n LOG.info(\"Closing the stream \" + streamName);\n clientStream.closeSend();\n }\n messagesBatch.resetAttachSchema();\n bidiStreamingCallable = stub.appendRowsCallable();\n clientStream = bidiStreamingCallable.splitCall(responseObserver);\n try {\n while (!clientStream.isSendReady()) {\n Thread.sleep(10);\n }\n } catch (InterruptedException expected) {\n }\n Thread.sleep(this.retrySettings.getInitialRetryDelay().toMillis());\n // Can only unlock here since need to sleep the full 7 seconds before stream can allow appends.\n appendAndRefreshAppendLock.unlock();\n LOG.info(\"Write Stream \" + streamName + \" connection established\");\n }", "private BufferedWriter getWriter(int secretPos) throws IOException {\n\t\tFile file = new File(\"reportingTool_tmp\" + sep + this.uniqueName + \"-\" + \"histogram_\" + this.dataset.getSecrets().get(secretPos).getFileName() + \".txt\");\n\t\tFileWriter writer = new FileWriter(file);\n\t\tBufferedWriter bw = new BufferedWriter(writer);\n\t\treturn bw;\n\t}", "@Test\n public void testWriteThenRead() {\n PipelineResult writeResult = runWrite();\n writeResult.waitUntilFinish();\n PipelineResult readResult = runRead();\n readResult.waitUntilFinish();\n gatherAndPublishMetrics(writeResult, readResult);\n }", "public interface IWriter {\n void write(int b) throws WriterException;\n}", "@Override\n public WriterResult write(int clientId) throws RemoteException {\n log.info(\"writing news client id {}\", clientId);\n try {\n WriterResult result = new WriterResult();\n serverState.getNumOfWriters().incrementAndGet();\n result.setrSeq(numOfClients.incrementAndGet());\n Thread.sleep(new Random().nextInt(10_000));\n serverState.getSharedNews().lockWrite();\n serverState.getSharedNews().setNewsValue(clientId);\n int writeSSeq = serverState.getSequenceNumber().incrementAndGet();\n result.setsSeq(writeSSeq); //sSeq\n writerLog(clientId, writeSSeq);\n serverState.getSharedNews().unlockWrite();\n serverState.getNumOfWriters().decrementAndGet();\n return result;\n } catch (final Exception e) {\n throw new RemoteException(\"Error happend\");\n }\n }", "private void initWriter(int queueSize) {\n\t\tthis.writer = new RoutingWriter(this.myName, this.remoteName, new Writer(\n\t\t\t\tthis.dos, queueSize, true));\n\t\tthis.writer.start();\n\t}", "boolean isUsedForWriting();", "private void writeSecondLevelMonitors() {}", "public PgStatGetWalSenders() {\n this(DSL.name(\"pg_stat_get_wal_senders\"), null);\n }" ]
[ "0.57780814", "0.5511949", "0.5371515", "0.52945036", "0.52481633", "0.5212476", "0.50770134", "0.5041523", "0.4888247", "0.48737228", "0.48688927", "0.48291168", "0.4814706", "0.48077524", "0.47924668", "0.4788732", "0.47458655", "0.47232583", "0.47076824", "0.47025818", "0.46912798", "0.46822387", "0.46737015", "0.46666065", "0.46342972", "0.46032146", "0.4594437", "0.45888862", "0.45785794", "0.45682475", "0.45617512", "0.45594326", "0.45402935", "0.4534557", "0.45305634", "0.45276973", "0.4520037", "0.4513179", "0.45003578", "0.4485499", "0.44764623", "0.44706932", "0.44575378", "0.44487476", "0.44486383", "0.44469178", "0.4441359", "0.44313794", "0.4426898", "0.44198453", "0.44151592", "0.44051898", "0.4402453", "0.44001946", "0.43950504", "0.4395028", "0.439461", "0.43917227", "0.438549", "0.43641293", "0.4360137", "0.43583217", "0.4358022", "0.43559265", "0.43487608", "0.43459398", "0.43394142", "0.43383983", "0.43334377", "0.4329356", "0.43268", "0.43219173", "0.4321365", "0.43211195", "0.4313975", "0.43041041", "0.43004602", "0.42961818", "0.42940855", "0.42856076", "0.42844227", "0.4282592", "0.42789128", "0.42654863", "0.42646465", "0.4254951", "0.42527264", "0.42485923", "0.42444903", "0.4242959", "0.42364004", "0.42363682", "0.4236231", "0.42258576", "0.4224535", "0.42215848", "0.4218714", "0.42082328", "0.42061928", "0.4201787" ]
0.79104304
0
Print table using IO2GEachRowListener
public void printTable() { if (table.size() == 0) Logger.error("Table " + table.getType() + " is empty!"); else { table.forEachRow(new EachRowListenerPrint()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void print() {\r\n this.table.printTable();\r\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\r\n\t\t\t\t\ttable.print();\r\n\t\t\t\t} catch (java.awt.print.PrinterException e) {\r\n\t\t\t\t\tSystem.err.format(\"No printer found\", e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}", "public void print(Table t) {\n\t\t\tCursor current = t.rows();\n\t\t\twhile (current.advance()) {\n\t\t\t\tfor (Iterator columns = current.columns(); columns.hasNext();)\n\t\t\t\t\tSystem.out.print((String) columns.next() + \" \");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t}", "public void printTable() {\n System.out.print(\"\\033[H\\033[2J\"); // Clear the text in console\n System.out.println(getCell(0, 0) + \"|\" + getCell(0, 1) + \"|\" + getCell(0, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(1, 0) + \"|\" + getCell(1, 1) + \"|\" + getCell(1, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(2, 0) + \"|\" + getCell(2, 1) + \"|\" + getCell(2, 2));\n }", "public void print(){\n\t\tfor (int i = 0; i < numRows; i++) {\n\t\t\tfor (int j = 0; j < numCols; j++) {\n\t\t\t\tSystem.out.print(table[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void printTable() {\r\n System.out.println(frame+\") \");\r\n for (int y = 0; y < table.length; y++) {\r\n System.out.println(Arrays.toString(table[y]));\r\n }\r\n frame++;\r\n }", "public void printTable(){\n \tfor (int i = 0; i < Table.size(); i++) {\n \t\tList<T> data = Table.get(i);\n \t\ttry {\n \t\t\tSystem.out.println(\"Bucket: \" + i);\n \t\t\tSystem.out.println(data.getFirst());\n \t\t\tSystem.out.println(\"+ \" + (data.getLength() - 1) + \" more at this bucket\\n\\n\");\n \t\t} catch (NoSuchElementException e) {\n \t\t\tSystem.out.println(\"This bucket is empty.\\n\\n\");\n \t\t}\n \t}\n }", "public void print() {\n \tfor (int i=0; i < this.table.height; i++) {\n \t\tfor (int j=0; j < this.table.width; j++) {\n \t\t\tString tmp = \"e\";\n \t\t\tif(this.table.field[i][j].head != null) {\n \t\t\t\ttmp = \"\";\n \t\t\t\tswitch (this.table.field[i][j].head.direction) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\ttmp+=\"^\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\ttmp+=\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\ttmp+=\"V\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\ttmp+=\"<\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n \t\t\t}\n \t\t\telse if(this.table.field[i][j].obj != null) {\n \t\t\t\ttmp = this.table.field[i][j].obj.name;\n \t\t\t}\n \t\t\tSystem.out.print(\" \" + tmp);\n \t\t}\n \t\t\tSystem.out.println(\"\");\n \t}\n }", "private void printTable() {\n System.out.println(\"COMPLETED SLR PARSE TABLE\");\n System.out.println(\"_________________________\");\n System.out.print(\"\\t|\");\n // print header\n for(int i = 0; i < pHeader.size(); i++) {\n pHeader.get(i);\n System.out.print(\"\\t\" + i + \"\\t|\");\n }\n System.out.println();\n // print body\n for(int i = 0; i < parseTable.size(); i++) {\n System.out.print(i + \"\\t|\");\n for(int j = 0; j < parseTable.get(i).size(); j++) {\n System.out.print(\"\\t\" + parseTable.get(i).get(j) + \"\\t|\");\n }\n System.out.println();\n }\n System.out.println();\n System.out.println(\"END OF SLR PARSE TABLE\");\n System.out.println();\n }", "@Override\r\n\t public void onEachRow(String rowID, O2GRow rowData) {\n\t O2GTableColumnCollection collection = rowData.getColumns();\r\n\t for (int i = 0; i < collection.size(); i++) {\r\n\t O2GTableColumn column = collection.get(i);\r\n\t System.out.println(column.getId() + \"=\" + rowData.getCell(i) + \";\");\r\n\t }\r\n\t\t}", "private void menuPrintActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuPrintActionPerformed\n MessageFormat header = new MessageFormat(\" Reminder List Data \");\n MessageFormat footer = new MessageFormat(\" MoneyMinder Inc. '2019' \");\n try {\n remindersTable.print(JTable.PrintMode.FIT_WIDTH, header, footer);\n } catch (PrinterException ex) {\n Logger.getLogger(MoneyMinderDesktopMainGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void printAll() {\n \tfor (int i = 0; i < Table.size(); i++) {\n \t\tList<T> data = Table.get(i);\n \t\tdata.placeIterator();\n \t\twhile (!data.offEnd()) {\n \t\t\tSystem.out.print(data.getIterator() + \"\\n\");\n \t\t\tdata.advanceIterator();\n \t\t}\n \t\t\n \t}\n }", "@Override\n\tpublic void print(String text) {\n\t\tString[] headLine = SQLPull.getHeadline().split(\"\\t\");\n\t\t\n\t\t//split the data\n\t\tString[] rows = text.split(\"\\n\");\n\t\tString[][] data = new String[rows.length][headLine.length];\n\t\tfor (int i=0; i<rows.length; i++)\n\t\t\tdata[i] = rows[i].split(\"\\t\");\n\t\t\n\t\t//insert to table\t\t\n\t\ttable = new JTable(data, headLine);\n\t\tjsp = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\tadd(jsp, BorderLayout.CENTER);\n\t\t\n\t\t//setSize\n\t\tsetSize(800, 83+17*data.length);\n\t\t\n\t\tsetVisible(true);\n\t}", "private static void printTable(Game game) {\r\n\t\tint[][] table = game.getTable();\r\n\t\tint length = table.length;\r\n\t\tSystem.out.println(\"Current table:\");\r\n\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\tfor (int j = 0; j < length - 1; j++)\r\n\t\t\t\tSystem.out.print(table[i][j] + \" \\t\");\r\n\t\t\tSystem.out.println(table[i][length - 1]);\r\n\t\t}\r\n\t}", "public static void main_printList(){\n\n table.printApplicantTable();\n\n }", "@Override\n public void tableRows_()\n {\n }", "public void print() {\n\t\tfor (int i = 0; i < TABLE_SIZE; i++) {\n\t\t\tSystem.out.print(\"|\");\n\t\t\tif (array[i] != null) {\n\t\t\t\tSystem.out.print(array[i].value);\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.print(\"|\\n\");\n\t}", "public void printTable() {\n\t\tString s = String.format(\"Routing table (%.3f)\\n\"\n\t\t\t\t+ \"%10s %10s %8s %5s %10s \\t path\\n\", now, \"prefix\", \n\t\t\t\t\"timestamp\", \"cost\",\"link\", \"VLD/INVLD\");\n\t\tfor (Route rte : rteTbl) {\n\t\t\ts += String.format(\"%10s %10.3f %8.3f\",\n\t\t\t\t\trte.pfx.toString(), rte.timestamp, rte.cost);\n\n\t\t\ts += String.format(\" %5d\", rte.outLink);\n\n\t\t\tif (rte.valid == true)\n\t\t\t\ts+= String.format(\" %10s\", \"valid\");\n\t\t\telse\n\t\t\t\ts+= String.format(\" %10s \\t\", \"invalid\");\n\n\t\t\tfor (int r :rte.path)\n\t\t\t\ts += String.format (\" %s\",Util.ip2string(r));\n\n\t\t\tif (lnkVec.get(rte.outLink).helloState == 0)\n\t\t\t\ts += String.format(\"\\t ** disabled link\");\n\t\t\ts += \"\\n\";\n\t\t}\n\t\tSystem.out.println(s);\n\t}", "public void print() {\n for (int i = 0; i < table.length; i++) {\n System.out.printf(\"%d: \", i);\n \n HashMapEntry<K, V> temp = table[i];\n while (temp != null) {\n System.out.print(\"(\" + temp.key + \", \" + temp.value + \")\");\n \n if (temp.next != null) {\n System.out.print(\" --> \");\n }\n temp = temp.next;\n }\n \n System.out.println();\n }\n }", "public void displayTable() {\n System.out.print(\"\\nSpreadsheet Table Details :\\nRows : \" + rowHeaders + \"\\nColumns:\" + colHeaders);\n new SheetParser(tableData).displaySheet();\n }", "public void printData()\n {\n reader.printData();\n }", "private void printAll() {\n int numberToPrint = searchResultsTable.getItems().size();\n\n FXMLCustomerController printController = new FXMLCustomerController();\n printController = (FXMLCustomerController) printController.load();\n printController.setUpPrint(numberToPrint);\n\n if (printController.okToPrint()) {\n System.out.println(\"Printing\");\n printController.getStage().show();\n for (SearchRowItem eachItem : searchResultsTable.getItems()) {\n printController.setCustomerDetails(eachItem);\n printController.print();\n System.out.println(\"Printed : \" + eachItem.toString());\n }\n printController.endPrint();\n //printController.getStage().hide();\n }\n }", "public void print(int tabOrder);", "public void print() {\n for (int i = 0; i < headers.length; i++) {\n System.out.printf(headers[i] + \", \"); // Print column headers.\n }\n System.out.printf(\"\\n\");\n for (int i = 0; i < (data.length - 1); i++) {\n for (int j = 0; j < data[i].length; j++) {\n System.out.printf(data[i][j] + \" \"); // Print value at i,j.\n }\n System.out.printf(\"\\n\");\n }\n }", "protected void _printTableRow(int index, Vector v) {\n System.out.print(index + \") \");\n for (int i = 0; i < v.size(); ++i) {\n System.out.print(\"\\t\\\"\" + v.elementAt(i) + \"\\\"\");\n }\n System.out.println();\n }", "@Override\n\t\t\tpublic void rowProcessed(Object[] row, ParsingContext context) {\n\t\t\t\tbar.update((int) context.currentRecord(),nrRows);\n\t\t\t\tif (context.currentRecord()==1) {\n\t\t\t\t\twriter.writeRow(context.headers());\n\t\t\t\t}\n\t\t\t\tif (!row.toString().isEmpty()) {\t\t\t\t\t\n\t\t\t\t\twriter.writeRow(row);\n\t\t\t\t}\n\t\t\t}", "private static void printRow(int[] row) {\r\n for (int i : row) {\r\n System.out.print(i);\r\n System.out.print(\"\\t\");\r\n }\r\n System.out.println();\r\n }", "public void view() {\r\n\t\tfor (int i = 0; i < this.getTableNumber(); i++) {\r\n\t\t\tthis.getTables(i).view();\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public static void printTable() {\n System.out.println(\"\\nMenu:\");\n System.out.println(\"(LR) - List All Recipients\");\n System.out.println(\"(LO) - List All Donors\");\n System.out.println(\"(AO) - Add New Donor\");\n System.out.println(\"(AR) - Add New Recipient\");\n System.out.println(\"(RO) - Remove Donor\");\n System.out.println(\"(RR) - Remove Recipient\");\n System.out.println(\"(SR) - Sort Recipients\");\n System.out.println(\"(SO) - Sort Donors\");\n System.out.println(\"(Q) - Quit\");\n }", "public void doPrint()\n {\n PrinterJob printJob = PrinterJob.getPrinterJob();\n \n printJob.setPrintable((Printable) mapComponent);\n if (printJob.printDialog()) {\n try {\n printJob.print();\n } catch (Exception e) {\n ErrorHandler.displayError(\"An error occured during printing:\\n\" + e, ErrorHandler.ERR_PRINT_FAIL);\n }\n }\n }", "private void printTable(String[][] table) {\n // Find out what the maximum number of columns is in any row\n int maxColumns = 0;\n for (String[] element : table) {\n maxColumns = Math.max(element.length, maxColumns);\n }\n\n // Find the maximum length of a string in each column\n int[] lengths = new int[maxColumns];\n for (String[] element : table) {\n for (int j = 0; j < element.length; j++) {\n lengths[j] = Math.max(element[j].length(), lengths[j]);\n }\n }\n\n // Generate a format string for each column\n String[] formats = new String[lengths.length];\n for (int i = 0; i < lengths.length; i++) {\n formats[i] = \"%1$\" + lengths[i] + \"s\"\n + ((i + 1) == lengths.length ? \"\\n\" : \" \");\n }\n\n // Print 'em out\n StringBuilder sb = new StringBuilder();\n for (String[] element : table) {\n for (int j = 0; j < element.length; j++) {\n sb.append(String.format(formats[j], element[j]));\n }\n }\n this.guiCore.getConsoleController().appendToDisplay(sb.toString());\n }", "public void printTable(String hint) {\r\n // creating iterator for HashMap \r\n synchronized (this) {\r\n LocalTime myDate = this.myObjDate;\r\n String string;\r\n System.out.println(\"in print table \");\r\n\r\n Iterator< HashMap.Entry< RoutingTableKey, RoutingTableInfo>> routingEntriesIterator = routingEntries.entrySet().iterator();\r\n\r\n String destAddress, nextipHost;\r\n // VirtualRouter.buffer.appendText(System.getProperty(\"line.separator\"));\r\n string = \"\\n|-------------------------------------------------------------------------------------------------------------------------|\\n\"\r\n + \" \" + hint + \" -- Last updated \" + myDate + \"\\n\"\r\n + \"|-------------------------------------------------------------------------------------------------------------------------|\\n\"\r\n + \"Dest Network\\t\\tnext ip-Host\\t\\tCost\\t\\tnextport\\t\\tmyPort\\t\\tActivated\\t\\tEstablished\\n\"\r\n + \"|-------------------------------------------------------------------------------------------------------------------------|\\n\";\r\n\r\n Platform.runLater(() -> {\r\n VirtualRouter.buffer.appendText(string);\r\n\r\n });\r\n\r\n while (routingEntriesIterator.hasNext()) {\r\n String string2;\r\n HashMap.Entry<RoutingTableKey, RoutingTableInfo> pair = (HashMap.Entry<RoutingTableKey, RoutingTableInfo>) routingEntriesIterator.next();\r\n\r\n destAddress = pair.getKey().getIp().getHostAddress() + \"-\" + pair.getKey().getHostname();\r\n nextipHost = pair.getValue().getNextipHost().getIp().getHostAddress() + \"-\" + pair.getValue().getNextipHost().getHostname();\r\n\r\n RoutingTableInfo destForwardingInfo = (RoutingTableInfo) pair.getValue();\r\n//bs ntb3 linet address btbi3to 3m berj3 forword slash bas destAddress.getHostName() 3m trj3 aw2et msln one.one.one.\r\n\r\n string2 = \"\" + destAddress + \"\\t\"\r\n + \"\" + nextipHost + \"\\t\\t\"\r\n + destForwardingInfo.cost + \"\\t\\t\"\r\n + \" \" + destForwardingInfo.nextHop + \"\\t\\t\"\r\n + \" \" + destForwardingInfo.port + \"\\t\\t\\t\"\r\n + \" \" + destForwardingInfo.activated + \"\\t\\t\"\r\n + \" \" + destForwardingInfo.established + \"\\t\\n\";\r\n // routerInterface.append(System.getProperty(\"line.separator\"));\r\n Platform.runLater(() -> {\r\n VirtualRouter.buffer.appendText(string2);\r\n\r\n });\r\n }\r\n Platform.runLater(() -> {\r\n VirtualRouter.buffer.appendText(\"|-------------------------------------------------------------------------------------------------------------------------|\\n\\n\");\r\n });\r\n }\r\n }", "public void print() {\n int rows = this.getNumRows();\n int cols = this.getNumColumns();\n\n for (int r = 0; r < rows; r++) {\n\n for (int c = 0; c < cols; c++) {\n System.out.print(this.getString(r, c) + \", \");\n }\n\n System.out.println(\" \");\n }\n }", "public void addPrintJobListener(PrintJobListener listener);", "public void populateTable(){\n displayTable.addMouseListener(new MouseAdapter(){\n //listen for when a row is doubleclicked \n @Override\n public void mouseClicked(MouseEvent e) {\n if (e.getClickCount() == 2) { \n openScheduleTable(); \n }\n }\n });\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "public void mostrarTablero(){\n for(int fila = 0; fila < FILAS; fila++){\n for(int columna : tablero[fila]){\n System.out.printf(\"%2d \", columna);\n }\n System.out.println();\n }\n }", "public void printTable(){ \r\n System.out.println( \"Auction ID | Bid | Seller | Buyer \"\r\n + \" | Time | Item Info\");\r\n System.out.println(\"===========================================\"\r\n + \"========================================================================\"\r\n + \"========================\");\r\n for(Auction auctions : values()){\r\n System.out.println(auctions.toString());\r\n } \r\n }", "private void actionPrint() {\n // get PrinterJob\n PrinterJob job = PrinterJob.getPrinterJob();\n MyPrintable printable = new MyPrintable(job.defaultPage(), layoutPanel);\n\n // setup Printable, Pageable\n job.setPrintable(printable);\n job.setPageable(printable);\n\n // display print dialog and print\n if (job.printDialog()) {\n try {\n job.print();\n } catch (PrinterException e) {\n e.printStackTrace();\n }\n }\n }", "private void printTable(String type){\n\t\tSystem.out.println(\"\\n\\t\\t\\t\\t \" + type + \" Probing Analysis (Table size = \" + tableSize + \")\");\n\t\tSystem.out.println(\"\\t\\t ----- Inserts ------ ----------- Probes ---------- --------- Clusters ---------\");\n\t\tSystem.out.printf(\"%5s %10s %10s %10s %10s %10s %10s %10s %10s %10s\\n\", \n\t\t\t\t\"N\", \"lambda\", \"success\", \"failed\", \"total\", \"avg\", \"max\", \"number\", \"avg\", \"max\");\n\t}", "public void printDataTransferCompleted(PrintJobEvent pje) ;", "private void printMyRoutingTable()\n {\n\tString str;\n\tmyGUI.println(\"My Distance table and routes\");\n str = F.format(\"dst |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += (F.format(i, 15));\n }\n myGUI.println(str);\n for (int i = 0; i < str.length(); i++) {\n myGUI.print(\"-\");\n }\n str = F.format(\"cost |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += F.format(myDistTable[i], 15);\n }\n myGUI.println();\n myGUI.println(str);\n str = F.format(\"route |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += F.format(route[i], 15);\n }\n myGUI.println(str);\n myGUI.println();\n myGUI.println(\"--------------------------------------------\");\n myGUI.println();\n\n }", "public void printTable(String _tName) throws SQLException {\n //System.out.println(\"Executing SELECT * FROM \" + tName);\n\n ResultSet rs = statement.executeQuery(\"SELECT * FROM \" + _tName);\n ResultSetMetaData rsmd = this.getMetaData(rs);\n\n System.out.println(\"Table Name: \" + _tName + \"\\n\");\n\n System.out.println(\"Columns: \");\n for (int i = 1; i <= rsmd.getColumnCount(); i++) {\n System.out.print(rsmd.getColumnTypeName(i) + \": \" + rsmd.getColumnName(i) + \", \");\n }\n System.out.println(\"\\n\");\n\n System.out.println(\"Values: \");\n while (rs.next()) {\n for (int i = 1; i <= rsmd.getColumnCount(); i++) {\n System.out.print(rs.getString(i) + \", \");\n }\n System.out.println(\"\");\n }\n }", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "public void print() {\n\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < this.cols; j++) {\n System.out.format(\"%.4f\", data[i][j]);\n if (j != this.cols - 1)\n System.out.print(\" \");\n }\n System.out.println(\"\");\n }\n }", "public static void searchPrinter(){\r\n try { \r\n singleton.dtm = new DefaultTableModel();\r\n singleton.dtm.setColumnIdentifiers(printers);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n \r\n Statement stmt = singleton.conn.createStatement();\r\n ResultSet rs = stmt.executeQuery(\"SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart\");\r\n \r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n \r\n int color = rs.getInt(\"color\");\r\n String color2;\r\n if(color!=0){\r\n color2 = \"Si\";\r\n }else{\r\n color2 = \"No\";\r\n }\r\n \r\n singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),color2,rs.getInt(\"ppm\")));\r\n\r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "@Override\r\n\tpublic void print() {\n\t}", "@Override\n\tpublic void print() {\n\t\t\n\t}", "public void actionPerformed(ActionEvent e) {\n \t\tPrinterJob job = PrinterJob.getPrinterJob();\n \t\tjob.setPrintable(this);\n \t\tboolean ok = job.printDialog();\n \t\tif (ok) {\n \t\t\ttry {\n \t\t\t\tjob.print();\n \t\t\t} catch (PrinterException ex) {\n \t\t\t\t/* The job did not successfully complete */\n \t\t\t}\n \t\t}\n \n \t}", "public void print(String tableName, String name) {\n if (name.equals(\"reviewer\")) {\n System.out.println(\"Reviewers:\");\n reviewerTable.printTable();\n }\n else { // then it is the movie\n System.out.println(\"Movies:\");\n movieTable.printTable();\n }\n }", "public static void printAll() {\n // Print all the data in the hashtable\n RocksIterator iter = db.newIterator();\n\n for (iter.seekToFirst(); iter.isValid(); iter.next()) {\n System.out.println(new String(iter.key()) + \"\\t=\\t\" + ByteIntUtilities.convertByteArrayToDouble(iter.value()));\n }\n\n iter.close();\n }", "@Override\n public void writeRow(final Object... columnData) {\n TextOutputFormat outputFormat = this.outputFormat;\n if (outputFormat == TextOutputFormat.text) {\n outputFormat = TextOutputFormat.tsv;\n }\n final Tag row = tableRow().make();\n for (final Object element : columnData) {\n final TagBuilder tableCell = tableCell().withEscapedText(toString(element));\n if (element == null) {\n tableCell.withStyleClass(\"data_null\");\n } else if (element instanceof BinaryData) {\n tableCell.withStyleClass(\"data_binary\");\n } else if (element instanceof Number) {\n tableCell.withStyleClass(\"data_number\");\n }\n row.addInnerTag(tableCell.make());\n }\n\n out.println(row.render(TagOutputFormat.valueOf(outputFormat.name())));\n }", "@Override\n\tpublic void print() {\n\n\t}", "public void actionPerformed(ActionEvent e){\n if (e.getSource() instanceof JButton) {\r\n PrinterJob printJob = PrinterJob.getPrinterJob();\r\n PageFormat pf = new PageFormat();\r\n pf.setOrientation(PageFormat.LANDSCAPE);\r\n printJob.setPrintable(_instance, pf);\r\n //if (printJob.printDialog()) {\r\n try {\r\n printJob.print();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n //}\r\n }\r\n }", "@Override\r\n\tpublic void print()\r\n\t{\t//TODO méthode à compléter (TP1-ex11)\r\n\t\tfor (IndexEntry indexEntry : data) {\r\n\t\t\tif(indexEntry ==null){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(indexEntry.toString());\r\n\t\t}\r\n\t}", "void print() {\t\r\n\t\tIterator<Elemento> e = t.iterator();\r\n\t\twhile(e.hasNext())\r\n\t\t\te.next().print();\r\n\t}", "public void printItems();", "@Override\n\t\tpublic void print() {\n\n\t\t}", "private void onShowTableDetail(ViewNodeJSO viewNode) { \n TableTools.createDataProvider(viewNode).addDataDisplay(cellTable);\n }", "public void print() {\r\n\r\n\t\tfor (int row=0; row<10; row++) \r\n\t\t{\r\n\t\t\tfor (int col=0; col<10; col++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"\\t\"+nums[row][col]); //separated by tabs\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "protected void viewRow(E rowObject) {\n }", "public void show() {\n if(heading.isEmpty()) {\r\n System.out.println(\"Error:Table:show:no data in heading, nothing to show\");\r\n return;\r\n }\r\n if(rows.isEmpty()) {\r\n System.out.println(\"Error:Table:show:no data in rows, nothing to show\");\r\n return;\r\n }\r\n for(String h : heading) {\r\n System.out.print(h + \" | \");\r\n }\r\n System.out.println(\"\");\r\n Set<String> keys = rows.keySet();\r\n for(String k : keys) {\r\n rows.get(k).show();\r\n System.out.println(\"\");\r\n }\r\n System.out.println(\"\");\r\n }", "@Override\r\n public void valueChanged(final ListSelectionEvent theEvent) {\n final StringBuilder string = new StringBuilder();\r\n for (int i = 0; i < table.getColumnCount(); i++) {\r\n string.append(table.getValueAt(table.getSelectedRow(), i).\r\n toString().\r\n replaceAll(\"\\\\s+\", \"\"));\r\n }\r\n System.out.println(string.toString());\r\n }", "@Override\n\tpublic void print() {\n\t\tdecoratedPrinter.print();\n\t}", "public void show() {\n for (int i = 0; i < rowCount; i++) {\n for (int j = 0; j < columnCount; j++)\n System.out.printf(\"%9.4f \", data[i][j]);\n System.out.println();\n }\n }", "public void displayHashTable(HashTable2 hTable){\n\t\t\n\t\tSystem.out.println(\"Index \" + \"Value\");\n\t\tfor(int i=0; i < hTable.theArray.length; i++){\n\t\t\t\n\t\t\tSystem.out.println(\" \" + i + \" ==> \" + hTable.theArray[i] );\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void readCompleteTable()\n\t{\n\t\topen();\n\t\tList<Map<Object, String>> tbl = HtmlTable.rowsFrom(table);\n\t\t//System.out.println(tbl);\n\n\t}", "@Override\n public void printTable() {\n Platform.runLater(() -> {\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n if (table.getTableCell(i, j).isComplete()) {\n BackgroundImage myBI = new BackgroundImage(new Image(String.valueOf(getClass().getClassLoader().getResource(\"images/Levels/L\" + table.getTableCell(i, j).getLevel() + \"+Dome.png\")), 75, 75, true, false),\n BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.CENTER,\n BackgroundSize.DEFAULT);\n bt[i][j].setBackground(new Background(myBI));\n } else if (table.getTableCell(i, j).getPawn() != null) {\n BackgroundImage myBI = new BackgroundImage(new Image(String.valueOf(getClass().getClassLoader().getResource(\"images/LevelAndPawns/L\" + table.getTableCell(i, j).getLevel() + \"+\" + table.getTableCell(i, j).getPawn().getIdGamer() + \"+\" + table.getTableCell(i, j).getPawn().getIdPawn() + \".png\")), 75, 75, true, false),\n BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.CENTER,\n BackgroundSize.DEFAULT);\n bt[i][j].setBackground(new Background(myBI));\n } else if (table.getTableCell(i, j).getLevel() != 0) {\n BackgroundImage myBI = new BackgroundImage(new Image(String.valueOf(getClass().getClassLoader().getResource(\"images/Levels/L\" + table.getTableCell(i, j).getLevel() + \".png\")), 75, 75, true, false),\n BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.CENTER,\n BackgroundSize.DEFAULT);\n bt[i][j].setBackground(new Background(myBI));\n } else {\n bt[i][j].setBackground(Background.EMPTY);\n }\n }\n }\n });\n }", "private void printLines() {\n for (String L: testLines) {\n print.write(L);\n }\n }", "public void dumpTable() {\n Enumeration elements = table.elements();\n while (elements.hasMoreElements()){\n SymbolTableEntry printEntry = (SymbolTableEntry) elements.nextElement();\n printName(printEntry);\n }\n }", "public static void viewtable() {\r\n\t\tt.dibuixa(table);\r\n\t}", "private static void print_table(double userInput)\n {\n double i;\n double output;\n\n System.out.printf(\"%5c %8c\\n\", 'x', 'y');\n for (i = 0; i < userInput; i += 0.5)\n {\n hw9 cobj = new hw9();\n output = (double) cobj.func(i);\n System.out.printf(\"%8.2f %8.2f\\n\", i, output);\n }\n }", "public static void printSubTableRecipients() {\n System.out.println(\"\\n\\t(I) - Sort by ID\");\n System.out.println(\"\\t(N) - Sort by Number of Donors\");\n System.out.println(\"\\t(B) - Sort by Blood Type\");\n System.out.println(\"\\t(O) - Sort by Organ Needed\");\n System.out.println(\"\\t(Q) - Back to Main Menu\");\n }", "private void print() {\n printInputMessage();\n printFrequencyTable();\n printCodeTable();\n printEncodedMessage();\n }", "public void endTable() throws IOException;", "public abstract void emitRawRow();", "void printNodes(){\n\t\tfor(int i=0;i<Table.length;i++){\r\n\t\t\tfor(StockNode t=Table[i];t!=null;t=t.next){\r\n\t\t\t\tSystem.out.println(t.stockName+\":\"+t.stockValue+\" \"+t.transactions);\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void printJobCompleted(PrintJobEvent pje) ;", "public static void printerFilter(){\r\n try {\r\n String choice = home_RegisterUser.comboFilter.getSelectedItem().toString();\r\n ResultSet rs = null;\r\n singleton.dtm = new DefaultTableModel();\r\n\r\n singleton.dtm.setColumnIdentifiers(printers);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n Statement stmt = singleton.conn.createStatement();\r\n\r\n switch (choice) {\r\n case \"Nombre\":\r\n //BUSCA POR NOMBRE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND nombre LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n int color = rs.getInt(\"color\");\r\n String color2;\r\n if(color!=0){\r\n color2 = \"Si\";\r\n }else{\r\n color2 = \"No\";\r\n }\r\n \r\n singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),color2,rs.getInt(\"ppm\")));\r\n }\r\n }else{\r\n searchPrinter();\r\n }\r\n break;\r\n case \"Precio mayor que\":\r\n //BUSCA POR PRECIO MAYOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND precio > '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n int color = rs.getInt(\"color\");\r\n String color2;\r\n if(color!=0){\r\n color2 = \"Si\";\r\n }else{\r\n color2 = \"No\";\r\n }\r\n \r\n singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),color2,rs.getInt(\"ppm\")));\r\n }\r\n }else{\r\n searchPrinter();\r\n }\r\n break;\r\n case \"Precio menor que\":\r\n //BUSCA POR PRECIO MENOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND precio < '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n int color = rs.getInt(\"color\");\r\n String color2;\r\n if(color!=0){\r\n color2 = \"Si\";\r\n }else{\r\n color2 = \"No\";\r\n }\r\n \r\n singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),color2,rs.getInt(\"ppm\")));\r\n }\r\n }else{\r\n searchPrinter();\r\n }\r\n break; \r\n case \"Fabricante\":\r\n //BUSCA POR FABRICANTE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND fabricante LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n int color = rs.getInt(\"color\");\r\n String color2;\r\n if(color!=0){\r\n color2 = \"Si\";\r\n }else{\r\n color2 = \"No\";\r\n }\r\n \r\n singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),color2,rs.getInt(\"ppm\")));\r\n }\r\n }else{\r\n searchPrinter();\r\n }\r\n break;\r\n case \"Tipo\":\r\n \r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND tipo LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n int color = rs.getInt(\"color\");\r\n String color2;\r\n if(color!=0){\r\n color2 = \"Si\";\r\n }else{\r\n color2 = \"No\";\r\n }\r\n \r\n singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),color2,rs.getInt(\"ppm\")));\r\n }\r\n }else{\r\n searchPrinter();\r\n }\r\n break;\r\n case \"Color\":\r\n String filterString = home_RegisterUser.filterField.getText();\r\n filterString = filterString.toLowerCase();\r\n \r\n if(!filterString.equals(\"\") || filterString.equals(\"si\") || filterString.equals(\"no\")){\r\n int ifcolor=-1;\r\n if(filterString.equals(\"si\")){\r\n ifcolor=1;\r\n }else if(filterString.equals(\"no\")){\r\n ifcolor=0;\r\n }\r\n \r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND color = '\"+ifcolor+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n int color = rs.getInt(\"color\");\r\n String color2;\r\n if(color!=0){\r\n color2 = \"Si\";\r\n }else{\r\n color2 = \"No\";\r\n }\r\n \r\n singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),color2,rs.getInt(\"ppm\")));\r\n }\r\n }else{\r\n searchPrinter();\r\n }\r\n break;\r\n case \"PPM\":\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,impresora r WHERE a.codigo = r.codart AND ppm = '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n int color = rs.getInt(\"color\");\r\n String color2;\r\n if(color!=0){\r\n color2 = \"Si\";\r\n }else{\r\n color2 = \"No\";\r\n }\r\n \r\n singleton.dtm.addRow(getArrayDeObjectosPrinter(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),color2,rs.getInt(\"ppm\")));\r\n }\r\n }else{\r\n searchPrinter();\r\n }\r\n break;\r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n } \r\n }", "public interface PrintFinishListener {\n void onFinish();\n}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n allRecords = new javax.swing.JTextArea();\n back = new javax.swing.JButton();\n PrintRcordsBtn = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n allRecords.setColumns(20);\n allRecords.setRows(5);\n jScrollPane1.setViewportView(allRecords);\n\n back.setText(\"Back\");\n back.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backActionPerformed(evt);\n }\n });\n\n PrintRcordsBtn.setText(\"Print Records\");\n PrintRcordsBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n PrintRcordsBtnActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addComponent(back)\n .addGap(60, 60, 60)\n .addComponent(PrintRcordsBtn)\n .addContainerGap(38, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(back)\n .addComponent(PrintRcordsBtn))\n .addGap(0, 11, Short.MAX_VALUE))\n );\n\n pack();\n }", "@Override\n public void print() {\n }", "@Override\n\tpublic void printToFile() {\n\t\t\n\t}", "public void print() {\n\t\t\n\t\tfor (int j = 0; j < height(); j++) {\n\t\t\tfor (int i = 0; i < width(); i++) {\n\t\t\t\tSystem.out.printf(\"%3d \", valueAt(i, j));\n\t\t\t}\n\t\t\tSystem.out.printf(\"\\n\");\n\t\t}\n\t\tSystem.out.printf(\"\\n\");\t\n\t}", "public void fireTableRowsUpdated(int firstRow, int lastRow);", "private String printRow(Result res){\n Iterator<Pair<String ,byte[]>> iter =outList.iterator();\n String row = \"\";\n while(iter.hasNext()){\n Pair<String ,byte[]> col = iter.next();\n String val = appendFromCol(col.getFirst(), res);\n row += val + delim;\n }\n // strip out last delim\n return row.substring(0, row.length()-1);\n }", "@Override\n public void endRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"</rows>\");\n }", "public void onTableClicked(){\n\t\tint row = table.getSelectedRow();\n//\t\tthis.messageBox(row+\"\");\n\t\tTParm parm = table.getParmValue();\n\t\tadmDate = parm.getValue(\"ADM_DATE\", row);\n\t\tdeptCode = parm.getValue(\"DEPT_CODE\", row);\n\t\tdeCode = parm.getValue(\"DR_CODE\", row);\n\t\tclinictypeCode = parm.getValue(\"CLINICTYPE_CODE\", row);\n\t\ttime = parm.getValue(\"START_TIME\", row);\n\t\tcrmId = parm.getValue(\"CRM_ID\", row);\n//\t\tSystem.out.println(\"time==\"+time);\n\t\t\n\t}", "@Override\n public void startRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"<rows>\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n tblCTMT = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n txtMaMT = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n txtMaTL = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n btnSearch = new javax.swing.JButton();\n btnShowAll = new javax.swing.JButton();\n btnConfirm = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n jToolBar1 = new javax.swing.JToolBar();\n btnPrint = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n tblCTMT.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n\n }\n ));\n tblCTMT.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tblCTMTMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tblCTMT);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Trả Tài Liệu\");\n\n jLabel2.setText(\"Mã Mượn Trả\");\n\n jLabel3.setText(\"Mã Tài Liệu\");\n\n btnSearch.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n btnSearch.setText(\">\");\n\n btnShowAll.setText(\"Show All\");\n\n btnConfirm.setText(\"Xác Nhận\");\n\n btnCancel.setText(\"Cancel\");\n\n jToolBar1.setFloatable(false);\n jToolBar1.setRollover(true);\n\n btnPrint.setText(\"Print\");\n btnPrint.setFocusable(false);\n btnPrint.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnPrint.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jToolBar1.add(btnPrint);\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(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 996, Short.MAX_VALUE)\n .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 318, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtMaTL, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtMaMT, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(btnSearch))\n .addGroup(layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(btnShowAll)\n .addGap(18, 18, 18)\n .addComponent(btnConfirm)\n .addGap(18, 18, 18)\n .addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 27, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(335, 335, 335))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addComponent(jLabel1)\n .addGap(79, 79, 79)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(46, 46, 46)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtMaTL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtMaMT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 51, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnShowAll)\n .addComponent(btnConfirm)\n .addComponent(btnCancel))\n .addGap(70, 70, 70)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n pack();\n }", "public void print() {\r\n \tfor (int i = 0; i < arbres.size(); i++) {\r\n \t\tSystem.out.println(\"Ordre de \" + arbres.get(i).ordre + \":\");\r\n \t\tarbres.get(i).print(\"\");\r\n \t\tSystem.out.println();\r\n \t}\r\n }", "private void tabPrinter() {\n IntStream.range(0, tabs).forEach(i -> writer.print(\" \"));\n }", "private void printContents(StringTableModel model) {\n\t\tStringBuilder buffy = new StringBuilder();\n\t\tint rows = model.getRowCount();\n\t\tint cols = model.getColumnCount();\n\t\tfor (int row = 0; row < rows; row++) {\n\t\t\tbuffy.append(\"row \" + row + \": \");\n\t\t\tfor (int col = 0; col < cols; col++) {\n\t\t\t\tObject columnValue = getModelValue(model, row, col);\n\t\t\t\tbuffy.append(columnValue).append(\", \");\n\t\t\t}\n\t\t\tbuffy.append('\\n');\n\t\t}\n\t\tSystem.out.println(\"model contents = \");\n\t\tSystem.out.println(buffy.toString());\n\t}", "public void extractAllRows()\n\n\t{\n\t\topen();\n\n\t\tList<WebElement> rows= inTable(table).getRowElements();\n\t\tfor(WebElement e :rows)\n\t\t{\n\t\t\tSystem.out.println(e.getText());\n\t\t}\n\t}", "public void printTest(){\n\r\n p.resetAll();\r\n p.initialize();\r\n p.feedBack((byte)2);\r\n// p.color(1);\r\n p.alignCenter();\r\n p.setText(\"The Dum Dum Name\");\r\n p.newLine();\r\n p.setText(\"Restaurant Dining\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.setText(\"Bling Bling\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n\r\n p.alignLeft();\r\n p.setText(\"POD No \\t\\t: 2001 \\t\\t Table \\t: E511\");\r\n p.newLine(); \r\n\r\n p.setText(\"Res Date \\t: \" + \"01/01/1801 22:59\");\r\n\r\n p.newLine();\r\n p.setText(\"Session \\t: Evening Session\");\r\n p.newLine();\r\n p.setText(\"Staff \\t\\t: Bum Dale\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.alignCenter();\r\n p.setText(\" - Some Items - \");\r\n p.newLine();\r\n p.alignLeft();\r\n p.addLineSeperator();\r\n\r\n p.newLine();\r\n\r\n p.setText(\"No \\tItem\\t\\tUnit\\tQty\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n \r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n \r\n p.addLineSeperator();\r\n p.feed((byte)3);\r\n p.finit();\r\n\r\n p.feedPrinter(p.finalCommandSet().getBytes());\r\n \r\n }", "private void realPrint(PrintJob job) {\n\t}", "private void realPrint(PrintJob job) {\n\t}", "String printTableToString(Table inputTable) {\n String horDiv = generateHorizontalDivider(inputTable);\n StringBuilder tableStringBuilder = new StringBuilder();\n tableStringBuilder.append(horDiv);\n // i = -1 for column headers; i = 0..recsz for records\n for (int i = -1; i < inputTable.getRecordSize(); i++) {\n tableStringBuilder.append(generateDataString(inputTable, i));\n if (i == -1) {\n tableStringBuilder.append(horDiv);\n }\n }\n tableStringBuilder.append(horDiv);\n return tableStringBuilder.toString();\n }", "public void print() {\n for (int i=0; i<lines.size(); i++)\n {\n System.out.println(lines.get(i));\n }\n }", "private void print(PrinterJob job, Node node) \n {\n jobStatus.textProperty().bind(job.jobStatusProperty().asString());\n \n // Print the node\n boolean printed = job.printPage(node);\n \n if (printed) \n {\n job.endJob();\n }\n }" ]
[ "0.703143", "0.657346", "0.6522322", "0.6519159", "0.651481", "0.65085566", "0.64636785", "0.638202", "0.6366767", "0.62380016", "0.6228372", "0.6208748", "0.61281127", "0.606741", "0.60629874", "0.6028754", "0.5980946", "0.5970645", "0.5933932", "0.59313697", "0.590781", "0.5900471", "0.58346945", "0.58154255", "0.5803905", "0.5784676", "0.57828623", "0.57766634", "0.5739455", "0.57325786", "0.5709488", "0.57001626", "0.5686951", "0.56858426", "0.56815577", "0.56655395", "0.5649586", "0.5644445", "0.5626697", "0.56253296", "0.56177014", "0.5612196", "0.5593786", "0.5576125", "0.55409795", "0.5539293", "0.55350715", "0.5522199", "0.55169547", "0.55097675", "0.550179", "0.54882824", "0.54882586", "0.54618746", "0.54575217", "0.54524404", "0.5433785", "0.5425193", "0.54193926", "0.54141617", "0.54120624", "0.540721", "0.5390285", "0.5371049", "0.5370448", "0.5369661", "0.53632385", "0.5352943", "0.5324898", "0.53232217", "0.53212404", "0.53209174", "0.5318616", "0.5312461", "0.5312334", "0.5310584", "0.53104806", "0.5306722", "0.53032184", "0.52933085", "0.52916646", "0.5274781", "0.5266919", "0.52654374", "0.52585036", "0.5257369", "0.52571315", "0.5255451", "0.5253565", "0.52528244", "0.5250826", "0.5238883", "0.52167326", "0.52154577", "0.5203691", "0.5203595", "0.5203595", "0.51997405", "0.51985794", "0.5189283" ]
0.7329758
0
System.out.println("\nPrinting a row from the " + rowData.getTableType() + " table.\n");
@Override public void onEachRow(String rowID, O2GRow rowData) { O2GTableColumnCollection collection = rowData.getColumns(); for (int i = 0; i < collection.size(); i++) { O2GTableColumn column = collection.get(i); System.out.println(column.getId() + "=" + rowData.getCell(i) + ";"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printTable(String _tName) throws SQLException {\n //System.out.println(\"Executing SELECT * FROM \" + tName);\n\n ResultSet rs = statement.executeQuery(\"SELECT * FROM \" + _tName);\n ResultSetMetaData rsmd = this.getMetaData(rs);\n\n System.out.println(\"Table Name: \" + _tName + \"\\n\");\n\n System.out.println(\"Columns: \");\n for (int i = 1; i <= rsmd.getColumnCount(); i++) {\n System.out.print(rsmd.getColumnTypeName(i) + \": \" + rsmd.getColumnName(i) + \", \");\n }\n System.out.println(\"\\n\");\n\n System.out.println(\"Values: \");\n while (rs.next()) {\n for (int i = 1; i <= rsmd.getColumnCount(); i++) {\n System.out.print(rs.getString(i) + \", \");\n }\n System.out.println(\"\");\n }\n }", "public void print() {\r\n this.table.printTable();\r\n }", "private void printTable(String type){\n\t\tSystem.out.println(\"\\n\\t\\t\\t\\t \" + type + \" Probing Analysis (Table size = \" + tableSize + \")\");\n\t\tSystem.out.println(\"\\t\\t ----- Inserts ------ ----------- Probes ---------- --------- Clusters ---------\");\n\t\tSystem.out.printf(\"%5s %10s %10s %10s %10s %10s %10s %10s %10s %10s\\n\", \n\t\t\t\t\"N\", \"lambda\", \"success\", \"failed\", \"total\", \"avg\", \"max\", \"number\", \"avg\", \"max\");\n\t}", "private void printTable() {\n System.out.println(\"COMPLETED SLR PARSE TABLE\");\n System.out.println(\"_________________________\");\n System.out.print(\"\\t|\");\n // print header\n for(int i = 0; i < pHeader.size(); i++) {\n pHeader.get(i);\n System.out.print(\"\\t\" + i + \"\\t|\");\n }\n System.out.println();\n // print body\n for(int i = 0; i < parseTable.size(); i++) {\n System.out.print(i + \"\\t|\");\n for(int j = 0; j < parseTable.get(i).size(); j++) {\n System.out.print(\"\\t\" + parseTable.get(i).get(j) + \"\\t|\");\n }\n System.out.println();\n }\n System.out.println();\n System.out.println(\"END OF SLR PARSE TABLE\");\n System.out.println();\n }", "public void printTable() {\r\n \tif (table.size() == 0)\r\n Logger.error(\"Table \" + table.getType() + \" is empty!\");\r\n else {\r\n table.forEachRow(new EachRowListenerPrint());\r\n }\r\n }", "public void printTable() {\n System.out.print(\"\\033[H\\033[2J\"); // Clear the text in console\n System.out.println(getCell(0, 0) + \"|\" + getCell(0, 1) + \"|\" + getCell(0, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(1, 0) + \"|\" + getCell(1, 1) + \"|\" + getCell(1, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(2, 0) + \"|\" + getCell(2, 1) + \"|\" + getCell(2, 2));\n }", "public void print(Table t) {\n\t\t\tCursor current = t.rows();\n\t\t\twhile (current.advance()) {\n\t\t\t\tfor (Iterator columns = current.columns(); columns.hasNext();)\n\t\t\t\t\tSystem.out.print((String) columns.next() + \" \");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t}", "public void print() {\n \tfor (int i=0; i < this.table.height; i++) {\n \t\tfor (int j=0; j < this.table.width; j++) {\n \t\t\tString tmp = \"e\";\n \t\t\tif(this.table.field[i][j].head != null) {\n \t\t\t\ttmp = \"\";\n \t\t\t\tswitch (this.table.field[i][j].head.direction) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\ttmp+=\"^\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\ttmp+=\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\ttmp+=\"V\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\ttmp+=\"<\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n \t\t\t}\n \t\t\telse if(this.table.field[i][j].obj != null) {\n \t\t\t\ttmp = this.table.field[i][j].obj.name;\n \t\t\t}\n \t\t\tSystem.out.print(\" \" + tmp);\n \t\t}\n \t\t\tSystem.out.println(\"\");\n \t}\n }", "public static void printMemberTable() throws MemberException {\n\n Connection conn = null;\n PreparedStatement stmt = null;\n ResultSet rs = null;\n try {\n conn = DBConfiguration.getConnection();\n stmt = conn.prepareStatement(\n Configuration.SQL_01,\n ResultSet.TYPE_FORWARD_ONLY,\n ResultSet.CONCUR_READ_ONLY);\n rs = stmt.executeQuery();\n while ( rs.next() ) {\n printRow(System.out,rs);\n }\n }\n catch(SQLException x) {\n String msg = \"SQLException: \" + x.getMessage();\n throw new MemberException( msg );\n }\n finally {\n DBConfiguration.closeSQLResultSet( rs );\n DBConfiguration.closeSQLStatement( stmt );\n DBConfiguration.closeSQLConnection( conn );\n }\n conn = null;\n stmt = null;\n rs = null;\n\n return;\n }", "public void print(){\n\t\tfor (int i = 0; i < numRows; i++) {\n\t\t\tfor (int j = 0; j < numCols; j++) {\n\t\t\t\tSystem.out.print(table[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void displayTable() {\n System.out.print(\"\\nSpreadsheet Table Details :\\nRows : \" + rowHeaders + \"\\nColumns:\" + colHeaders);\n new SheetParser(tableData).displaySheet();\n }", "public static void printMemberTable() throws MemberException {\n\n Connection conn = null;\n PreparedStatement stmt = null;\n ResultSet rs = null;\n try {\n conn = DBConfiguration.getConnection();\n stmt = conn.prepareStatement(\n Configuration.SQL_06,\n ResultSet.TYPE_FORWARD_ONLY,\n ResultSet.CONCUR_READ_ONLY);\n rs = stmt.executeQuery();\n String current_account = null;\n while ( rs.next() ) {\n current_account = printRow(current_account,System.out,rs);\n }\n System.out.println();\n }\n catch(SQLException x) {\n String msg = \"SQLException: \" + x.getMessage();\n throw new MemberException( msg );\n }\n finally {\n DBConfiguration.closeSQLResultSet( rs );\n DBConfiguration.closeSQLStatement( stmt );\n DBConfiguration.closeSQLConnection( conn );\n }\n conn = null;\n stmt = null;\n rs = null;\n\n return;\n }", "public void printTable() {\r\n System.out.println(frame+\") \");\r\n for (int y = 0; y < table.length; y++) {\r\n System.out.println(Arrays.toString(table[y]));\r\n }\r\n frame++;\r\n }", "private static void printTable(Game game) {\r\n\t\tint[][] table = game.getTable();\r\n\t\tint length = table.length;\r\n\t\tSystem.out.println(\"Current table:\");\r\n\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\tfor (int j = 0; j < length - 1; j++)\r\n\t\t\t\tSystem.out.print(table[i][j] + \" \\t\");\r\n\t\t\tSystem.out.println(table[i][length - 1]);\r\n\t\t}\r\n\t}", "public void printData()\n {\n reader.printData();\n }", "public void show() {\n if(heading.isEmpty()) {\r\n System.out.println(\"Error:Table:show:no data in heading, nothing to show\");\r\n return;\r\n }\r\n if(rows.isEmpty()) {\r\n System.out.println(\"Error:Table:show:no data in rows, nothing to show\");\r\n return;\r\n }\r\n for(String h : heading) {\r\n System.out.print(h + \" | \");\r\n }\r\n System.out.println(\"\");\r\n Set<String> keys = rows.keySet();\r\n for(String k : keys) {\r\n rows.get(k).show();\r\n System.out.println(\"\");\r\n }\r\n System.out.println(\"\");\r\n }", "public void printTable(){\n \tfor (int i = 0; i < Table.size(); i++) {\n \t\tList<T> data = Table.get(i);\n \t\ttry {\n \t\t\tSystem.out.println(\"Bucket: \" + i);\n \t\t\tSystem.out.println(data.getFirst());\n \t\t\tSystem.out.println(\"+ \" + (data.getLength() - 1) + \" more at this bucket\\n\\n\");\n \t\t} catch (NoSuchElementException e) {\n \t\t\tSystem.out.println(\"This bucket is empty.\\n\\n\");\n \t\t}\n \t}\n }", "public static void main_printList(){\n\n table.printApplicantTable();\n\n }", "private void printCodeTable() {\n System.out.println(\"\\nPrinting the code table:\");\n for(int i = 0; i < codeTable.length; i++) {\n if(codeTable[i] != null) {\n if(i == 10) {\n System.out.println(\"\\\\n \" + codeTable[i]);\n } else {\n System.out.println(((char) i) + \" \" + codeTable[i]);\n }\n }\n }\n }", "public void print() {\n\t\tfor (int i = 0; i < TABLE_SIZE; i++) {\n\t\t\tSystem.out.print(\"|\");\n\t\t\tif (array[i] != null) {\n\t\t\t\tSystem.out.print(array[i].value);\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.print(\"|\\n\");\n\t}", "public void printTable(){ \r\n System.out.println( \"Auction ID | Bid | Seller | Buyer \"\r\n + \" | Time | Item Info\");\r\n System.out.println(\"===========================================\"\r\n + \"========================================================================\"\r\n + \"========================\");\r\n for(Auction auctions : values()){\r\n System.out.println(auctions.toString());\r\n } \r\n }", "public void print() {\n for (int i = 0; i < headers.length; i++) {\n System.out.printf(headers[i] + \", \"); // Print column headers.\n }\n System.out.printf(\"\\n\");\n for (int i = 0; i < (data.length - 1); i++) {\n for (int j = 0; j < data[i].length; j++) {\n System.out.printf(data[i][j] + \" \"); // Print value at i,j.\n }\n System.out.printf(\"\\n\");\n }\n }", "private static void printRow(int[] row) {\r\n for (int i : row) {\r\n System.out.print(i);\r\n System.out.print(\"\\t\");\r\n }\r\n System.out.println();\r\n }", "public void printStatement() {\n\t\t\n\t}", "public static void display(){\n\n try {\n Connection myConnection = ConnectionFactory.getConnection();\n Statement stat = myConnection.createStatement();\n ResultSet rs = stat.executeQuery(\"SELECT * from product\");\n\n System.out.println(\"PRODUCT\");\n while(rs.next()){\n\n System.out.println(rs.getInt(\"id\") + \", \" + rs.getString(\"quantity\") + \", \" + rs.getString(\"productName\") + \", \" + rs.getDouble(\"price\")+ \", \" + rs.getString(\"deleted\"));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n System.out.println();\n\n }", "public static void displayTableTitle()\r\n {\n }", "public static void printTable() {\n System.out.println(\"\\nMenu:\");\n System.out.println(\"(LR) - List All Recipients\");\n System.out.println(\"(LO) - List All Donors\");\n System.out.println(\"(AO) - Add New Donor\");\n System.out.println(\"(AR) - Add New Recipient\");\n System.out.println(\"(RO) - Remove Donor\");\n System.out.println(\"(RR) - Remove Recipient\");\n System.out.println(\"(SR) - Sort Recipients\");\n System.out.println(\"(SO) - Sort Donors\");\n System.out.println(\"(Q) - Quit\");\n }", "@Override\n public String toString(){\n\n ArrayList<String> headers = new ArrayList<>();\n ArrayList<String[]> records = new ArrayList<>();\n\n for(Col col : columns){\n headers.add(col.getName());\n }\n\n if(getRecordSize() < 1){\n return headers.toString();\n }\n\n for(int i = 0; i < getRecordSize(); i++){\n\n ArrayList<Rec> recs = getRecordsByRowIndex(i);\n String[] r = new String[recs.size()];\n\n for(int j = 0; j < recs.size(); j++){\n r[j] = recs.get(j).getLastEntry().getData();\n }\n\n records.add(r);\n\n }\n\n return displayTable(headers, records);\n\n }", "public void show() {\r\n\t\ttry {\r\n\t\t\tdisplayTable();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Show Table SQL Exception: \" + e.getMessage());\r\n\t\t}\r\n\t}", "public void printAll() {\n \tfor (int i = 0; i < Table.size(); i++) {\n \t\tList<T> data = Table.get(i);\n \t\tdata.placeIterator();\n \t\twhile (!data.offEnd()) {\n \t\t\tSystem.out.print(data.getIterator() + \"\\n\");\n \t\t\tdata.advanceIterator();\n \t\t}\n \t\t\n \t}\n }", "public String toString()\n {\n return row0 + \"\\n\" + row1 + \"\\n\" + row2 + \"\\n\" + row3;\n }", "String printTable(String name) {\n\n try {\n return tables.get(name).getTable();\n } catch (IndexOutOfBoundsException e) {\n return \"ERROR: Cant print table\";\n } catch (NullPointerException e) {\n return \"ERROR: Cant print table\";\n }\n }", "public void PrintResult() {\n try {\n res.beforeFirst();\n int columnsNumber = res.getMetaData().getColumnCount();\n while (res.next()) {\n for (int i = 1; i <= columnsNumber; i++) {\n if (i > 1) System.out.print(\", \");\n Object columnValue = res.getObject(i);\n System.out.print(res.getMetaData().getColumnName(i) + \" \" + columnValue);\n }\n System.out.println();\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public static void Display (int Table_num) throws SQLException\n\t {\n\t\t try{\t\t\n\t\t\t//Declarations\n\t\t\tint flag =0; //to check if data is found or not\n\t\t\tString query = new String();\n\t\t\t\n \n\t\t\tif (Table_num ==1) \n\t \t\tquery = \"begin StudRegSys.show_students(:1); end;\" ;\n\t \telse if (Table_num == 2)\n\t \t\tquery = \"begin StudRegSys.show_classes(:1); end;\" ;\n\t \telse if (Table_num == 3)\n\t \t\tquery = \"begin StudRegSys.show_prerequisites(:1); end;\" ;\n\t\t\telse if (Table_num == 4)\n query = \"begin StudRegSys.show_enrollments(:1); end;\" ;\n else if (Table_num == 5)\n query = \"begin StudRegSys.show_courses(:1); end;\" ;\n\t \telse if (Table_num == 6)\n\t \t\tquery = \"begin StudRegSys.show_logs(:1); end;\" ;\n\t\t\telse if\t(Table_num == 7)\n\t\t\t\t{\n\t\t\t\t\tsearch_prerequisites();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\telse if\t(Table_num == 8)\n\t\t\t\t{\n\t\t\t\t \tstudents_info();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t/*else if (Table_num == 8)\n\t\t\t\tquery = \"begin StudRegSys.student_info(:1,:2,:3);end;\" ;*/\n\n//Connection to Oracle server\n OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource();\n ds.setURL(\"jdbc:oracle:thin:@grouchoIII.cc.binghamton.edu:1521:ACAD111\");\n Connection conn = ds.getConnection(\"vbobhat1\", \"BingData\");\nCallableStatement cs = conn.prepareCall (query);\n\t \n\t \tcs.registerOutParameter(1,OracleTypes.CURSOR);\n\t \n\t \t//execute and retrieve the result set\n\t \tcs.execute();\n\t \tResultSet rs;\n\t\t\n\t \trs = (ResultSet)cs.getObject(1);\n\t \n\t \t// print the results for Show_students\n\t \tif(Table_num == 1){ \n\t\t\t\tSystem.out.println(\"SID\" + \"\\t\" + \"FIRSTNAME\" + \"\\t\" + \"LASTNAME\" + \"\\t\" + \"STATUS\" + \"\\t\" + \"\\t\" + \"GPA\" + \"\\t\" + \"\\t\" + \"EMAIL\");\n\t \t\tSystem.out.println(\"---\" + \"\\t\" + \"---------\" + \"\\t\" + \"--------\" + \"\\t\" + \"------\" + \"\\t\" + \"\\t\" + \"---\" + \"\\t\" + \"\\t\" + \"-----\");\n\t \t\twhile (rs.next()){\n\t \t\tflag=1; //indicates data found\n\t\t\t\tSystem.out.println(rs.getString(1) + \"\\t\" + rs.getString(2) + \"\\t\" + \"\\t\" + rs.getString(3) + \"\\t\" + \"\\t\" + rs.getString(4) + \"\\t\" + \"\\t\" \n+ rs.getFloat(5) + \"\\t\" + \"\\t\" + rs.getString(6));\n\t \t\t}\n\t \t}\n// print the results for Show_classes \n\t \telse if(Table_num == 2){ \n\t\t\t\tSystem.out.println(\"CLASSID\" + \"\\t\" + \"DEPT_CODE\" + \"\\t\" + \"COURSE#\" + \"\\t\" + \"SECT#\" + \"\\t\" + \"YEAR\" + \"\\t\" +\n\t \t\t\"SEMESTER\" + \"\\t\" + \"LIMIT\" + \"\\t\" + \"CLASS_SIZE\" );\n\t \t\tSystem.out.println(\"---\" + \"\\t\" + \"---------\" + \"\\t\" + \"-------\" + \"\\t\" + \"-----\" + \"\\t\" + \"----\" + \"\\t\" + \n\t\t\t\t\"--------\" + \"\\t\" + \"-----\" + \"\\t\" + \"----------\" );\n\t \t\t\t\n\t \t\twhile (rs.next())\n\t \t\t{\n\t \t\t\tflag=1; //indicates data found\n\t \t\t\tSystem.out.println(rs.getString(1) + \"\\t\" + rs.getString(2) + \"\\t\" + \"\\t\" + rs.getInt(3) + \"\\t\" + rs.getInt(4) + \"\\t\"+ rs.getInt(5) + \"\\t\" + rs.getString(6) + \"\\t\" +\"\\t\" + rs.getInt(7) + \"\\t\" + \"\\t\" + rs.getInt(8) ); \n\t \t\t}\n\t \t}\n\t\t\t// print the results for Show_Prerequities\n else if(Table_num == 3){\n System.out.println(\"DEPT_CODE\" + \"\\t\" + \"COURSE#\" + \"\\t\" + \"PRE_DEPT_CODE\" + \"\\t\" + \"PRE_COURSE#\");\n System.out.println(\"---------\" + \"\\t\" + \"-------\" + \"\\t\" + \"-------------\" + \"\\t\" + \"-----------\");\n while (rs.next())\n {\n flag=1; //indicates data found\n System.out.println(rs.getString(1) + \"\\t\" + \"\\t\" + rs.getInt(2) + \"\\t\" + rs.getString(3) + \"\\t\" + \"\\t\" + rs.getInt(4));\n }\n }\n\t \t// print the results for Show_enrollment\n\t \telse if(Table_num == 4){ \n\t\t\t\tSystem.out.println(\"SID\" + \"\\t\" + \"CLASSID\" + \"\\t\" + \"LGRADE\");\n\t \t\tSystem.out.println(\"---\" + \"\\t\" + \"-------\" + \"\\t\" + \"------\");\n\t \t\twhile (rs.next())\n\t \t\t{\n\t \t\t\tflag=1; //indicates data found\n\t \t\t\tSystem.out.println(rs.getString(1) + \"\\t\" + rs.getString(2)+ \"\\t\" + rs.getString(3));\n\t \t\t}\n\t \t}\n\t\t\t// print the results for Show_courses\n else if(Table_num == 5){\n System.out.println(\"DEPT_CODE\" + \"\\t\" + \"COURSE#\" + \"\\t\" + \"\\t\" + \"TITLE\" );\n System.out.println(\"---------\" + \"\\t\" + \"-------\" + \"\\t\" + \"\\t\" + \"-----\" );\n while (rs.next())\n {\n flag=1; //indicates data found\n System.out.println(rs.getString(1) + \"\\t\" + \"\\t\" + rs.getInt(2)+ \"\\t\" + \"\\t\" + rs.getString(3));\n }\n }\n\t \t// print the results for Show_logs\n\t \telse if(Table_num == 6){ \t\n\t\t\t\tSystem.out.println(\"LOGID\" + \"\\t\" + \"WHO\" + \"\\t\" + \"\\t\" + \"TIME\" + \"\\t\" + \"\\t\" + \"TABLE_NAME\" +\"\\t\" + \"OPERATION\" + \"\\t\" + \"KEY_VALUE\" );\n\t \t\tSystem.out.println(\"-----\" + \"\\t\" + \"---\" + \"\\t\" + \"\\t\" + \"----\" + \"\\t\" + \"\\t\" + \"----------\" + \"\\t\" + \"---------\" + \"\\t\" + \"---------\");\n\t \t\twhile (rs.next()){\n\t \t\t\tflag=1; //indicates data found\n System.out.println(rs.getInt(1) + \"\\t\" + rs.getString(2) +\"\\t\" + rs.getTime(3)+ \"\\t\" + rs.getString(4) + \"\\t\"+ rs.getString(5)+ \"\\t\" + \"\\t\" + rs.getString(6));\n\t \n\t \t\t}\n\t\t\t} \n\t\t\n\n\t \n\t\t\t//Indicates that no data was found\n\t\t\tif (flag== 0) \n\t\t\t\tSystem.out.println (\"No data found\");\n\t\t\n\t \t//close the result set, statement, and the connection\n\t \trs.close();\n\t \tcs.close();\n\t \tconn.close();\n\t \n\t \t System.out.println(\"\\n\\n\");\n\n\t }\ncatch (SQLException ex) { System.out.println (\"\\n*** SQLException caught ***\\n\" + ex.getMessage());}\n catch (Exception e) {System.out.println (\"\\n*** other Exception caught ***\\n\");}\n }", "public static void printResultSet( ResultSet rs ) throws SQLException {\n ResultSetMetaData rsmd = rs.getMetaData();\n int columnCount;\n int labelLength;\n int k;\n int i;\n String line = \"\";\n String label = null;\n \n columnCount = rsmd.getColumnCount();\n for (k=1; k<=columnCount; k++) {\n label = rsmd.getColumnLabel( k );\n System.out.print( label + '\\t' );\n \n // construct line with exact same length as the label\n labelLength = label.length();\n label = \"\";\n for (i=0; i<labelLength; i++)\n label += '=';\n line += label + '\\t';\n }\n \n System.out.println();\n System.out.println(line);\n \n while ( rs.next() ) {\n for (k=1; k<=columnCount; k++) {\n System.out.print( rs.getString( k ) + '\\t' );\n }\n \n System.out.println();\n }\n \n System.out.println();\n }", "@Override\n public void tableRows_()\n {\n }", "private void printTable(String table, String cols, String where,\n int expected) throws SQLException {\n\n int rows = 0;\n ResultSet rs = stmt.executeQuery(\"SELECT \" + cols + \" FROM \" + table + \" \" + where);\n ResultSetMetaData rsmd = rs.getMetaData();\n String result = \"Table \" + table + \", expecting \" + expected\n + \" rows total:\\n\";\n\n while (rs.next()) {\n for (int i = 0; i < rsmd.getColumnCount(); i++) {\n result += rsmd.getColumnLabel(i + 1) + \":\"\n + rs.getString(i + 1) + \":\";\n }\n\n result += \"\\n\";\n\n rows++;\n }\n\n rs.close();\n System.out.println(result);\n assertEquals(expected, rows);\n }", "protected void _printTableRow(int index, Vector v) {\n System.out.print(index + \") \");\n for (int i = 0; i < v.size(); ++i) {\n System.out.print(\"\\t\\\"\" + v.elementAt(i) + \"\\\"\");\n }\n System.out.println();\n }", "private void printSchema() {\n ArrayList<String> schema = sqlMngr.getSchema();\n\n System.out.println(\"\");\n System.out.println(\"------------\");\n System.out.println(\"Total number of tables: \" + schema.size());\n for (int i = 0; i < schema.size(); i++) {\n System.out.println(\"Table: \" + schema.get(i));\n }\n System.out.println(\"------------\");\n System.out.println(\"\");\n }", "public void show() {\n for (int i = 0; i < rowCount; i++) {\n for (int j = 0; j < columnCount; j++)\n System.out.printf(\"%9.4f \", data[i][j]);\n System.out.println();\n }\n }", "public String toString()\n {\n final String NEWLINE = System.getProperty(\"line.separator\");\n StringBuffer result = new StringBuffer(table).append(NEWLINE);\n for (Iterator iterator = data.keySet().iterator();\n iterator.hasNext(); )\n {\n String column = (String) iterator.next();\n result\n .append(\"\\t\")\n .append(column)\n .append(\" = \")\n .append(isColumnNull(column) ? \"NULL\" : data.get(column))\n .append(NEWLINE)\n ;\n }\n \n return result.toString();\n }", "private String printRow(Result res){\n Iterator<Pair<String ,byte[]>> iter =outList.iterator();\n String row = \"\";\n while(iter.hasNext()){\n Pair<String ,byte[]> col = iter.next();\n String val = appendFromCol(col.getFirst(), res);\n row += val + delim;\n }\n // strip out last delim\n return row.substring(0, row.length()-1);\n }", "private void showContentAccountTable() throws SQLException {\r\n\t\tConnection connection = dbAdministration.getConnection();\r\n\t\tStatement statement = connection.createStatement();\r\n\t\tString sql = \"SELECT * FROM account\";\r\n\t\tResultSet resultSet = statement.executeQuery(sql);\r\n\t\tlogger.info(\"SQL-Statement ausgeführt: \" + sql);\r\n\t\tSystem.out.println(\"Table account:\");\r\n\t\twhile (resultSet.next()) {\r\n\t\t\tint id = resultSet.getInt(1);\r\n\t\t\tString owner = resultSet.getString(2);\r\n\t\t\tString number = resultSet.getString(3);\r\n\r\n\t\t\tSystem.out.println(id + \" | \" + owner + \" | \" + number);\r\n\t\t}\r\n\t\tresultSet.close();\r\n\t\tstatement.close();\r\n\t\tconnection.close();\r\n\t}", "@Override\n\tpublic void displayTheDatabase() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic String toString()\r\n\t{\r\n\t\tString result =\"Table:\\n\";\r\n\t\tfor (int i =0; i< this.tableSize; i++)\r\n\t\t{ \r\n\t\t\tLinkedArrays<T> L = (LinkedArrays<T>) table[i]; \r\n\t\t\tresult+= i+\": \";\r\n\t\t\tresult+= L.toString() ;\r\n\t\t\tif(i<this.tableSize-1)\r\n\t\t\t{ result +=\"\\n\"; }\r\n\t\t\t\r\n\t\t}\r\n\t\r\n\t\treturn result;\r\n\t}", "public void print(String tableName, String name) {\n if (name.equals(\"reviewer\")) {\n System.out.println(\"Reviewers:\");\n reviewerTable.printTable();\n }\n else { // then it is the movie\n System.out.println(\"Movies:\");\n movieTable.printTable();\n }\n }", "public static void printTableStatusHeader() {\n\t\tSystem.out.println(\"Table availability status:\");\n\t\tSystem.out.println(\"---------------------------------------\");\n\t}", "public static String printSelectRow1() {\n return \"Choose card 1 and write the corresponding row (Only choose Ints between 1 - 4 or 0 to quit) : \";\n }", "public static void printCategoryTable() throws SQLException {\n\t\tPreparedStatement stmtGetLengthOfColumns = dbconn\n\t\t\t\t.prepareStatement(\"SELECT max(character_length((cast(categoryid as text)))) as lenid, max(character_length(trim(both ' ' from categoryname))) as lenname,max(character_length(trim(both ' ' from description))) as lendes FROM nw_category\");\n\t\tResultSet rsGetLengthOfColumns = stmtGetLengthOfColumns.executeQuery();\n\n\t\tint[] columnLengths = new int[3];\n\n\t\trsGetLengthOfColumns.next();\n\n\t\tfor (int i = 0; 3 > i; i++) {\n\t\t\tcolumnLengths[i] = rsGetLengthOfColumns.getInt(i + 1) + 10;\n\t\t}\n\n\t\t/*\n\t\t * Executing the query to get the categories and resturnning data and\n\t\t * metadata to resultsets.\n\t\t */\n\t\tPreparedStatement pstmt = dbconn\n\t\t\t\t.prepareStatement(\"SELECT categoryid,categoryname,description from nw_category\");\n\t\tResultSet rs = pstmt.executeQuery();\n\t\tResultSetMetaData rsmd = rs.getMetaData();\n\n\t\t/*\n\t\t * Printf ColumnLabels\n\t\t */\n\t\tfor (int i = 0; rsmd.getColumnCount() > i; i++) {\n\t\t\tSystem.out.printf(\"|%-\" + columnLengths[i] + \"S\",\n\t\t\t\t\trsmd.getColumnLabel(i + 1));\n\t\t}\n\t\tSystem.out.print(\"|\\n\");\n\n\t\t/*\n\t\t * Printf seperator for data and metadata\n\t\t */\n\t\tfor (int i = 0; (rsmd.getColumnCount()) > i; i++) {\n\n\t\t\tString sep = \"\";\n\n\t\t\tfor (int j = 0; j < columnLengths[i]; j++) {\n\t\t\t\tsep = sep + \"-\";\n\t\t\t}\n\t\t\tSystem.out.print(\"+\" + sep);\n\t\t}\n\t\tSystem.out.print(\"+\\n\");\n\n\t\t/*\n\t\t * Printf data;\n\t\t */\n\n\t\twhile (rs.next()) {\n\n\t\t\tfor (int i = 0; rsmd.getColumnCount() > i; i++) {\n\t\t\t\tSystem.out.printf(\"|%-\" + columnLengths[i] + \"s\",\n\t\t\t\t\t\trs.getString(i + 1));\n\t\t\t}\n\t\t\tSystem.out.print(\"|\\n\");\n\t\t}\n\t}", "private static String print(final ResultSet res) throws Exception {\n final StringBuilder sb = new StringBuilder();\n final ResultSetMetaData md = res.getMetaData();\n for(int i = 0; i < md.getColumnCount(); ++i) {\n sb.append(' ');\n sb.append(md.getColumnName(i + 1));\n sb.append(\" |\");\n }\n sb.append('\\n');\n while(res.next()) {\n for(int i = 0; i < md.getColumnCount(); ++i) {\n sb.append(' ');\n sb.append(res.getString(i + 1));\n sb.append(\" |\");\n }\n sb.append('\\n');\n }\n return sb.toString();\n }", "String printTableToString(Table inputTable) {\n String horDiv = generateHorizontalDivider(inputTable);\n StringBuilder tableStringBuilder = new StringBuilder();\n tableStringBuilder.append(horDiv);\n // i = -1 for column headers; i = 0..recsz for records\n for (int i = -1; i < inputTable.getRecordSize(); i++) {\n tableStringBuilder.append(generateDataString(inputTable, i));\n if (i == -1) {\n tableStringBuilder.append(horDiv);\n }\n }\n tableStringBuilder.append(horDiv);\n return tableStringBuilder.toString();\n }", "private void printResultSet(ResultSet rs) {\n\t\twhile(rs.hasNext()) {\t\n\t\t\tQuerySolution qs = rs.next();\n\t\t\tSystem.out.println(qs.toString());\n\t\t}\n\t\tSystem.out.println(\"------\");\n\t}", "private void printColSchema() {\n System.out.print(\"Table Name: \");\n String tableName = sc.nextLine();\n ArrayList<String> result = sqlMngr.colSchema(tableName);\n System.out.println(\"\");\n System.out.println(\"------------\");\n System.out.println(\"Total number of fields: \" + result.size() / 2);\n for (int i = 0; i < result.size(); i += 2) {\n System.out.println(\"-\");\n System.out.println(\"Field Name: \" + result.get(i));\n System.out.println(\"Field Type: \" + result.get(i + 1));\n }\n System.out.println(\"------------\");\n System.out.println(\"\");\n }", "public void print() {\n for (int i = 0; i < table.length; i++) {\n System.out.printf(\"%d: \", i);\n \n HashMapEntry<K, V> temp = table[i];\n while (temp != null) {\n System.out.print(\"(\" + temp.key + \", \" + temp.value + \")\");\n \n if (temp.next != null) {\n System.out.print(\" --> \");\n }\n temp = temp.next;\n }\n \n System.out.println();\n }\n }", "public String toString()\n\t{\n\t\treturn _RowData.toString();\n\t}", "public String toString(){\r\n return \"{\"+ this.getRowIndex()+\",\"+ this.getColumnIndex()+\"}\";\r\n }", "private void printHeader () {\n System.out.println(\"COMPLETED HEADER PARSING\");\n System.out.println(\"________________________\");\n for(String header : parseTableHeader.keySet()) {\n System.out.print(header);\n System.out.println(parseTableHeader.get(header));\n }\n }", "public String getTableFormat(){\n String tableToPrint = \"\";\n Enumeration keys = this.clientData.keys();\n while(keys.hasMoreElements()){\n String clientName = (String) keys.nextElement();\n tableToPrint += \"\\t\" + clientName + this.clientData.get(clientName) + '\\n';\n }\n return tableToPrint.substring(0,tableToPrint.length() - 1);\n }", "public String toString() {\n\t\t\tStringBuffer bf = new StringBuffer(); \t\t\t\n\t\t\tbf.append(\"Table:\\t\"+ name +\"\\n\");\n\t\t\tbf.append(\"Record Count: \"+ count +\"\\n\");\n\t\t\tbf.append(\"Fields: \\n\");\n\t\t\tfor (String key : fields.keySet()) {\n\t\t\t\tbf.append(\"\\t\"+ key +\": \"+fields.get(key) +\"\\n\");\n\t\t\t}\n\t\t\tbf.append(\"\\n\\n\");\n\t\t\treturn bf.toString();\n\t\t}", "public abstract String getHeaderRow();", "public int getRowNum(){ return this.rowNum; }", "public void display() {\n\tSystem.out.println(\"student id is \"+studentid+\"\\t\"+\"student name is \"+studentName+\"\\t\"+\"marks is \"+marks);\r\n}", "public void displayData(){\n\n //Function to display the entries\n int i , j;\n for(i=0;i<number_of_rows;++i){\n\n for(j=0;j<number_of_cols;++j){\n\n System.out.print(dataEntries[i][j]);\n }\n System.out.println(\" \");\n }\n }", "public static void displayTable(Connection con, String tableName) throws SQLException \r\n\t{\r\n\t\tStatement st = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\tst = con.createStatement(); \r\n\r\n\t\trs = st.executeQuery(\"SELECT userID, firstName, lastName, countryCode FROM \" + tableName);\r\n\r\n\t\twhile(rs.next()) {\r\n\t\t\t// can retrieve by position\r\n\t\t\tint userId = rs.getInt(1);\r\n\t\t\t// or by column name \r\n\t\t\tString firstName = rs.getString(\"firstname\");\r\n\t\t\tString lastName = rs.getString(3);\r\n\t\t\tString countryCode = rs.getString(\"countryCode\");\r\n\r\n\t\t\tSystem.out.println(userId + \". \" + lastName + \", \" +\r\n\t\t\t\t\tfirstName + \" (\" + countryCode + \")\");\r\n\t\t}\r\n\r\n\t}", "private static void showCellContents(Cell cell) {\n\n\t\tswitch (cell.getCellType()) {\n\n\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\tSystem.out.print(cell.getNumericCellValue() + \"\\t\");\n\t\t\tbreak;\n\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\tSystem.out.print(cell.getStringCellValue() + \"\\t\");\n\t\t\tbreak;\n\t\t}\n\t}", "public void view() {\r\n\t\tfor (int i = 0; i < this.getTableNumber(); i++) {\r\n\t\t\tthis.getTables(i).view();\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "public void displayHuffCodesTable() {\n\t\tStringBuffer toPrint = new StringBuffer();\n\t\t\n\t\tfor (int i = 0; i < this.huffCodeVals.length; i++) {\n\t\t\t\n\t\t\tif (this.huffCodeVals[i] != null) {\n\t\t\t\tif (i == 9) {\n\t\t\t\t\ttoPrint.append(\"\\\\t\");\n\t\t\t\t\t\n\t\t\t\t} else if (i == 10) {\n\t\t\t\t\ttoPrint.append(\"\\\\n\");\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\ttoPrint.append((char) i);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttoPrint.append(\":\" + this.huffCodeVals[i] + \"\\n\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(toPrint.toString());\n\t}", "@Override\n\tpublic void print(String text) {\n\t\tString[] headLine = SQLPull.getHeadline().split(\"\\t\");\n\t\t\n\t\t//split the data\n\t\tString[] rows = text.split(\"\\n\");\n\t\tString[][] data = new String[rows.length][headLine.length];\n\t\tfor (int i=0; i<rows.length; i++)\n\t\t\tdata[i] = rows[i].split(\"\\t\");\n\t\t\n\t\t//insert to table\t\t\n\t\ttable = new JTable(data, headLine);\n\t\tjsp = new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\tadd(jsp, BorderLayout.CENTER);\n\t\t\n\t\t//setSize\n\t\tsetSize(800, 83+17*data.length);\n\t\t\n\t\tsetVisible(true);\n\t}", "public void onTableClicked(){\n\t\tint row = table.getSelectedRow();\n//\t\tthis.messageBox(row+\"\");\n\t\tTParm parm = table.getParmValue();\n\t\tadmDate = parm.getValue(\"ADM_DATE\", row);\n\t\tdeptCode = parm.getValue(\"DEPT_CODE\", row);\n\t\tdeCode = parm.getValue(\"DR_CODE\", row);\n\t\tclinictypeCode = parm.getValue(\"CLINICTYPE_CODE\", row);\n\t\ttime = parm.getValue(\"START_TIME\", row);\n\t\tcrmId = parm.getValue(\"CRM_ID\", row);\n//\t\tSystem.out.println(\"time==\"+time);\n\t\t\n\t}", "public void print() {\n int rows = this.getNumRows();\n int cols = this.getNumColumns();\n\n for (int r = 0; r < rows; r++) {\n\n for (int c = 0; c < cols; c++) {\n System.out.print(this.getString(r, c) + \", \");\n }\n\n System.out.println(\" \");\n }\n }", "public static void main(String[] args) {\n System.out.println(\"Wazaaaaa\");\n System.out.println(\"hello\"+\"\\n\"+\"world\");\n printTable(8, 9);\n }", "public void printResults(ResultSet resultSet) throws SQLException {\n\t\tResultSetMetaData rsmd = resultSet.getMetaData();\n\t\tint columnsNumber = rsmd.getColumnCount();\n\t\tint count = 1;\n\t\twhile (resultSet.next()) {\n\t\t\tSystem.out.println(\"Record: \" + count);\n\t\t for (int i = 1; i <= columnsNumber; i++) {\n\t\t String columnValue = resultSet.getString(i);\n\t\t System.out.print(rsmd.getColumnName(i) + \": \" + columnValue + \", \");\n\t\t }\n\t\t System.out.println(\"\");\n\t\t count++;\n\t\t}\n\t}", "private ConfigurationHTMLPrinter doHeaderRow() {\n println(\"<tr>\").incrementIndent();\n doHeaderCell(\"Name\");\n doHeaderCell(\"Default value\");\n doHeaderCell(\"Aliases\");\n doHeaderCell(\"Value type\");\n doHeaderCell(\"Description\");\n return decrementIndent().println(\"</tr>\");\n }", "public abstract String getCurrentRow();", "private void doSomething(){\n System.out.println(\"Robodromo \" + theRobodrome.getName() +\n \"\\nrighe e colonne, \" + this.theRobodrome.getRowCount() +\n \", \" + this.theRobodrome.getColumnCount());\n System.out.println(theTraining.getDeck());\n }", "public static void printField(){\n System.out.println(\"---------\");\r\n for (char[] cell : output) {\r\n System.out.print(\"| \");\r\n for (char value : cell) {\r\n System.out.print(value + \" \");\r\n }\r\n System.out.print(\"|\\n\");\r\n }\r\n System.out.println(\"---------\");\r\n }", "public static void outputRecord() {\r\n System.out.println(\"First Name: Len\");\r\n System.out.println(\"Last Name: Payne\");\r\n System.out.println(\"College: Lambton College\");\r\n }", "public static void printAll() {\n // Print all the data in the hashtable\n RocksIterator iter = db.newIterator();\n\n for (iter.seekToFirst(); iter.isValid(); iter.next()) {\n System.out.println(new String(iter.key()) + \"\\t=\\t\" + ByteIntUtilities.convertByteArrayToDouble(iter.value()));\n }\n\n iter.close();\n }", "public void printTable() {\n\t\tString s = String.format(\"Routing table (%.3f)\\n\"\n\t\t\t\t+ \"%10s %10s %8s %5s %10s \\t path\\n\", now, \"prefix\", \n\t\t\t\t\"timestamp\", \"cost\",\"link\", \"VLD/INVLD\");\n\t\tfor (Route rte : rteTbl) {\n\t\t\ts += String.format(\"%10s %10.3f %8.3f\",\n\t\t\t\t\trte.pfx.toString(), rte.timestamp, rte.cost);\n\n\t\t\ts += String.format(\" %5d\", rte.outLink);\n\n\t\t\tif (rte.valid == true)\n\t\t\t\ts+= String.format(\" %10s\", \"valid\");\n\t\t\telse\n\t\t\t\ts+= String.format(\" %10s \\t\", \"invalid\");\n\n\t\t\tfor (int r :rte.path)\n\t\t\t\ts += String.format (\" %s\",Util.ip2string(r));\n\n\t\t\tif (lnkVec.get(rte.outLink).helloState == 0)\n\t\t\t\ts += String.format(\"\\t ** disabled link\");\n\t\t\ts += \"\\n\";\n\t\t}\n\t\tSystem.out.println(s);\n\t}", "public static boolean showTable(String tableName){\n try{\n File table = new File(tableName+\"Data.csv\");\n Scanner tableReader = new Scanner(table);\n while (tableReader.hasNextLine()){\n System.out.println(tableReader.nextLine());\n }\n tableReader.close();\n return true;\n }catch(IOException e){\n e.printStackTrace();\n return false;\n }\n }", "@Override\n public String toString() {\n\treturn \"\"+rowIndex+colIndex; \n }", "public void displayTimesTable() {\n if (table >= TABLE_MIN && table <= TABLE_MAX) {\n System.out.println(table + \" times table:\");\n for (int i=1; i <= TABLE_MAX; ++i) {\n System.out.printf(\"%2d X %2d = %3d\\n\",\n i, table, timesTables[table][i]);\n } // close for\n }\n else\n System.out.println(table + \" is not between \" +\n TABLE_MIN + \" and \" + TABLE_MAX);\n }", "private void LogProductsTable() {\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_PRODUCTS, null);\n Log.d(DatabaseHelper.class.getName(), \"Contents of Products Table:\");\n\n c.moveToFirst();\n while (!c.isAfterLast()) {\n Log.d(DatabaseHelper.class.getName(), \"\\t _id:\" + String.valueOf(c.getInt(c.getColumnIndex(DBHelper.PRODUCTS_ID))) + \", pname:\" + String.valueOf(c.getString(c.getColumnIndex(DBHelper.PRODUCTS_PNAME))));\n c.moveToNext();\n }\n db.close();\n }", "public void showData()\n\t\t{\n\t\t\ttry {\n\t\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\t\tString sql=\"select *from ComplaintsData\";\n\t\t\t\tps=con.prepareStatement(sql);\n\t\t\t\trs=ps.executeQuery();\n\t\t\t\ttable.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public void dumpTable() {\n Enumeration elements = table.elements();\n while (elements.hasMoreElements()){\n SymbolTableEntry printEntry = (SymbolTableEntry) elements.nextElement();\n printName(printEntry);\n }\n }", "public static String getShowTableStatement() {\n return SHOW_TABLE_STATEMENT;\n }", "public String getTable()\n {\n return table;\n }", "public void print() {\n\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < this.cols; j++) {\n System.out.format(\"%.4f\", data[i][j]);\n if (j != this.cols - 1)\n System.out.print(\" \");\n }\n System.out.println(\"\");\n }\n }", "public void printData () {\n System.out.println (products.toString ());\n }", "public static void printPrimaryKeyDetails(ResultSet pk) throws SQLException {\n/*\n ResultSetMetaData rs_meta = pk.getMetaData();\n\n for (int x = 1; x <= rs_meta.getColumnCount(); x++) {\n writeMessage(\"pk column attr: \" + rs_meta.getColumnName(x));\n }\n*/\n writeMessage(\"getPrimaryKeys(): TABLE_CAT=\" + pk.getString(\"TABLE_CAT\"));\n writeMessage(\"getPrimaryKeys(): TABLE_SCHEM=\" + pk.getString(\"TABLE_SCHEM\"));\n writeMessage(\"getPrimaryKeys(): TABLE_NAME=\" + pk.getString(\"TABLE_NAME\"));\n writeMessage(\"getPrimaryKeys(): COLUMN_NAME=\" + pk.getString(\"COLUMN_NAME\"));\n writeMessage(\"getPrimaryKeys(): KEY_SEQ=\" + pk.getString(\"KEY_SEQ\"));\n writeMessage(\"getPrimaryKeys(): PK_NAME=\" + pk.getString(\"PK_NAME\"));\n }", "public void display() {\n\t\tdisplayColumnHeaders();\n\t\taddHyphens();\n\t\tfor (int row = 0; row < 3; row++) {\n\t\t\taddSpaces();\n\t\t\tSystem.out.print(\" row \" + row + ' ');\n\t\t\tfor (int col = 0; col < 3; col++)\n\t\t\t\tSystem.out.print(\"| \" + getMark(row, col) + \" \");\n\t\t\tSystem.out.println(\"|\");\n\t\t\taddSpaces();\n\t\t\taddHyphens();\n\t\t}\n\t}", "private void printTable(String[][] table) {\n // Find out what the maximum number of columns is in any row\n int maxColumns = 0;\n for (String[] element : table) {\n maxColumns = Math.max(element.length, maxColumns);\n }\n\n // Find the maximum length of a string in each column\n int[] lengths = new int[maxColumns];\n for (String[] element : table) {\n for (int j = 0; j < element.length; j++) {\n lengths[j] = Math.max(element[j].length(), lengths[j]);\n }\n }\n\n // Generate a format string for each column\n String[] formats = new String[lengths.length];\n for (int i = 0; i < lengths.length; i++) {\n formats[i] = \"%1$\" + lengths[i] + \"s\"\n + ((i + 1) == lengths.length ? \"\\n\" : \" \");\n }\n\n // Print 'em out\n StringBuilder sb = new StringBuilder();\n for (String[] element : table) {\n for (int j = 0; j < element.length; j++) {\n sb.append(String.format(formats[j], element[j]));\n }\n }\n this.guiCore.getConsoleController().appendToDisplay(sb.toString());\n }", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "public void selectFromTable(String tableName){\n //SQL query\n String query = \"SELECT * FROM \" + tableName;\n\n try {\n //connection\n stmt = con.createStatement();\n //execute query\n rs = stmt.executeQuery(query);\n System.out.println(\"\\nid\\t\\tmyName\\t\\taddress\\n____________________________________\");\n\n //get data\n while (rs.next()){\n int id = rs.getInt(1); //returns the id / first column\n String myName = rs.getString(\"myName\"); //returns my name\n String address = rs.getString(\"address\"); //returns my name\n System.out.println(id + \"\\t\\t\" + myName + \"\\t\\t\" + address);\n }\n }\n catch (SQLException ex){\n System.out.println(\"\\n--Query did not execute--\");\n ex.printStackTrace();\n }\n }", "public void newRow();", "protected void viewRow(E rowObject) {\n }", "private void logBeginningOfTheTable() {\n\t\tLOG.log(Level.FINER, () -> \"Stupac tablice:\");\n\t\tLOG.log(Level.FINER, () -> \"=================================\");\n\t}", "public int getRow()\n {\n return row;\n }", "public void outDisTable()\n\t{\n\t\tfor(int i = 0; i < sqNum; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < sqNum; j++)\n\t\t\t{\n\t\t\t\tSystem.out.printf(\"%-18s\", \"[\" + i + \",\" + j + \"]:\" + String.format(\" %.8f\", dm[i][j]));\n\t\t\t}\n\t\t\tSystem.out.print(\"\\r\\n\");\n\t\t}\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(tableName).append(System.lineSeparator());\n\n if (columnsDefinedOrder.size() <= 0) {\n columnsDefinedOrder = rows.stream()\n .findFirst()\n .map(x -> new ArrayList<>(x.keySet()))\n .orElse(columnsDefinedOrder);\n }\n\n Map<String, Integer> widthEachColumn = new HashMap<>();\n for (String columnName : columnsDefinedOrder) {\n widthEachColumn.put(columnName, 0);\n }\n\n for (Map<String, String> row : rows) {\n for (String columnName : columnsDefinedOrder) {\n int length = row.get(columnName).length();\n if (length > widthEachColumn.get(columnName)) {\n widthEachColumn.put(columnName, length);\n }\n }\n }\n\n int tableWidth = 0;\n for (String columnName : columnsDefinedOrder) {\n int width = widthEachColumn.get(columnName) + 5;\n widthEachColumn.put(columnName, width);\n tableWidth += width;\n }\n\n for (String columnName : columnsDefinedOrder) {\n sb.append(String.format(\"%-\" + widthEachColumn.get(columnName) + \"s\", columnName));\n }\n sb.append(System.lineSeparator());\n\n for (int i = 0; i < tableWidth; i++) {\n sb.append(\"-\");\n }\n sb.append(System.lineSeparator());\n\n for (Map<String, String> row : rows) {\n for (String columnName : columnsDefinedOrder) {\n sb.append(String.format(\"%-\" + widthEachColumn.get(columnName) + \"s\", row.get(columnName)));\n }\n sb.append(System.lineSeparator());\n }\n\n return sb.toString();\n }" ]
[ "0.6905923", "0.682036", "0.6811779", "0.673605", "0.67342865", "0.6647083", "0.6620283", "0.6582496", "0.6566782", "0.65567285", "0.6545272", "0.65410244", "0.65345013", "0.6511028", "0.64966226", "0.6464505", "0.6457732", "0.6438808", "0.6427908", "0.635878", "0.63462305", "0.6339406", "0.6272247", "0.62501025", "0.62135106", "0.62094694", "0.6185234", "0.61609524", "0.6145737", "0.6137617", "0.6116085", "0.6110777", "0.6092817", "0.60869247", "0.60694057", "0.6069103", "0.60679615", "0.60635424", "0.60625744", "0.6056991", "0.60451555", "0.60450923", "0.6028672", "0.59921354", "0.5969847", "0.59493405", "0.5939845", "0.5938969", "0.59144837", "0.59007853", "0.58975327", "0.58941776", "0.5878272", "0.58782", "0.5870864", "0.5868519", "0.58675", "0.58511657", "0.5845222", "0.583974", "0.58186746", "0.58037823", "0.57916677", "0.578665", "0.5776107", "0.57757187", "0.5773022", "0.57575727", "0.5753596", "0.5752665", "0.57502216", "0.57451653", "0.5744707", "0.5740804", "0.5739813", "0.57351005", "0.5730757", "0.5727045", "0.57262015", "0.5720486", "0.5712056", "0.5709255", "0.5697048", "0.5691901", "0.56915575", "0.5681538", "0.5680175", "0.5677254", "0.5674891", "0.5673409", "0.5671872", "0.5670707", "0.5669675", "0.5664034", "0.5659396", "0.5655418", "0.563732", "0.56331664", "0.5630935", "0.5629377" ]
0.60651773
37
Will call the VSAC API and make a local reference of the ValueSets
public void createCYP1A1Cache() throws IOException { String response = vsacService.callVSAC(cyp1A2Config.getVsacTizanidine()); vsacService.buildCodeList(response, tizanidineCodes); response = vsacService.callVSAC(cyp1A2Config.getVsacCYP1A2()); vsacService.buildCodeList(response, cyp1a2Codes); for (String code : cyp1a2Codes) { addToCache(code); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setValueSet(List<String> valueSet){\n mValueSet = valueSet;\n }", "Map<String, OperationalSets> getSets();", "@Test\n public void testGetSets() {\n ref.setKey(\"test23\");\n assertEquals(\"test23\", ref.getKey());\n ref.setAuthor(\"test23\");\n assertEquals(\"test23\", ref.getAuthor());\n ref.setEditor(\"test23\");\n assertEquals(\"test23\", ref.getEditor());\n ref.setTitle(\"test23\");\n assertEquals(\"test23\", ref.getTitle());\n ref.setBooktitle(\"test23\");\n assertEquals(\"test23\", ref.getBooktitle());\n ref.setYear(\"1839\");\n assertEquals(\"1839\", ref.getYear());\n ref.setPublisher(\"Otava\");\n assertEquals(\"Otava\", ref.getPublisher());\n ref.setJournal(\"test23\");\n assertEquals(\"test23\", ref.getJournal());\n ref.setVolume(\"3\");\n assertEquals(\"3\", ref.getVolume());\n ref.setNumber(\"123\");\n assertEquals(\"123\", ref.getNumber());\n ref.setSeries(\"test23\");\n assertEquals(\"test23\", ref.getSeries());\n ref.setEdition(\"3rd\");\n assertEquals(\"3rd\", ref.getEdition());\n ref.setPages(\"12-35\");\n assertEquals(\"12-35\", ref.getPages());\n ref.setMonth(\"May\");\n assertEquals(\"May\", ref.getMonth());\n ref.setNote(\"test23\");\n assertEquals(\"test23\", ref.getNote());\n }", "public void setValues(){\r\n int k=0;\r\n String[] var;\r\n String evar;\r\n \r\n //Set Values \r\n for (int i=0; i<linkVector.size(); i++){\r\n var= (String[]) linkVector.elementAt(i);\r\n evar=var[1];\r\n try { \r\n varContextField= varContextFields[linkIndex[k]]; \r\n switch (linkType[k++]){\r\n case DOUBLE: setValue(evar,varContextField.getDouble(varContextObject)); break;\r\n case ARRAYDOUBLE: setValue(evar,(double[])varContextField.get(varContextObject)); break;\r\n case ARRAYDOUBLE2D: setValue(evar,(double[][])varContextField.get(varContextObject)); break;\r\n case STRING: setValue(evar,(String)varContextField.get(varContextObject)); break; \r\n }\r\n \r\n } catch (java.lang.IllegalAccessException e) {\r\n System.out.println(\"Error Step: setting a value \" + e);\r\n } \r\n } \r\n }", "public ListVS<V> getValues() {\n ListVS<V> result = new ListVS<V>(getUniverse());\n for (V value : this.entries.values()) {\n result = result.add(value);\n }\n return result;\n }", "public JSONArray build_src_vs_tree() {\r\n\t\treturn getRootValueSets(true, true);\r\n\t}", "public void testGetValue() {\n TaskSeriesCollection c = createCollection1();\n }", "public void analyzeSetReference(AnalyzeInfo info)\n {\n ExprGenerator objGen = ((ExprPro) _objExpr).getGenerator();\n\n // php/3a6f\n objGen.analyzeSetReference(info);\n }", "public SetSet(Vector<IntSet> initials){\n\t\tfor(int i=0;i<initials.size();i++){\n\t\t\tcontents.addElement(initials.get(i));\n\t\t}\n\t}", "public ArrayList<V> valueSet() {\n\t\t\treturn valores;\n\t\t}", "public Builder setValueSet(List<String> valueSet){\n mValueSet = valueSet;\n return this;\n }", "protected abstract Set method_1559();", "public void setResultSets(ResultSet[] values) {\n\n resultSets = values != null ? values.clone() : null;\n }", "@Override\n\tpublic Set<T> valeurs() {\n\t\treturn Set.of(val);\n\t}", "public void dependencyUpdateVal(Set updatingObjects);", "@Override\n\tprotected void doSetValue(Set<LocalDate> value) {\n\t\tthis.value.clear();\n\t\tthis.value.addAll(value);\t\n\t}", "<V extends Object> Set<V> getSet(String setName);", "public void setDataSets(List<DataSet> dataSets)\n {\n this.dataSets = dataSets;\n }", "public RelevanceSet() {\r\n \tinitComponents();\r\n //updateData();\r\n }", "public ArrayList<Sets> getSets() {\n return this.sets;\n }", "public void testCreateNewSet() {\n // browser.maximizeWindow();\n\n ListSetsPage listSetsPage = new ListSetsPage(browser);\n EditSetPage editSetPage = new EditSetPage(browser);\n String name = \"My First Set\";\n String description = \"This is the first set that I have built!\";\n List<Long> routineList = new ArrayList<Long>();\n // TO-DO: This needs to be refactored to populate its own routines (1 and 3 below)\n //routineList.add(1L);\n //routineList.add(3L);\n //editSetPage.createSet(name, description, routineList);\n browser.goTo(listSetsPage);\n listSetsPage.isAt();\n listSetsPage.hasSet(name);\n // TO-DO: Add tests to ensure the routines that should be in here are in here\n }", "public SetsList listSets() throws OAIException {\n try {\n \tString query = builder.buildListSetsQuery();\n \tDocument document = reader.read(query);\n return new SetsList(document);\n } catch (ErrorResponseException e) {\n \tthrow e;\n } catch (Exception e) {\n throw new OAIException(e);\n } \n }", "@Override\n\tpublic ArregloDinamico<V> valueSet() {\n\t\tArregloDinamico<V> respuesta = new ArregloDinamico<V>(N);\n\t\tfor(int i = 0; i<M ; i++)\n\t\t{\n\t\t\tArregloDinamico<NodoTabla<K,V>> temporal = map.darElemento(i).getAll();\n\t\t\tfor(int j=0 ; j < temporal.size() ; j++)\n\t\t\t{\n\t\t\t\tNodoTabla<K,V> elemento = temporal.darElemento(j);\n\t\t\t\tif(elemento != null && elemento.darLlave() != null)\n\t\t\t\t\trespuesta.addLast(elemento.darValor());\t\n\t\t\t}\n\t\t}\n\t\treturn respuesta;\n\t}", "public SetsList listSets(ResumptionToken resumptionToken) throws OAIException {\n try {\n \tString query = builder.buildListSetsQuery(resumptionToken);\n \tDocument document = reader.read(query);\n return new SetsList(document);\n } catch (ErrorResponseException e) {\n \tthrow e;\n } catch (Exception e) {\n throw new OAIException(e);\n } \n }", "private void initValues() {\n \n }", "public interface ValueSet {\n boolean isEmpty();\n int size();\n boolean contains(Object v);\n void add(Object v);\n void add(ValueSet s);\n Iterator<Object> iterator();\n}", "@Override\n\tpublic Collection<V> values() {\n\t\tArrayList<V> valores = new ArrayList<V>();\n\t\tIterator it = tabla.iterator();\n\t\tint i = 0;\n\t\twhile (it.hasNext()) {\n\t\t\tIterator it2 = tabla.get(i).valueSet().iterator();\n\t\t\tit.next();\n\t\t\tint j = 0;\n\t\t\twhile (it2.hasNext()) {\n\t\t\t\tit2.next();\n\t\t\t\tvalores.add(tabla.get(i).valueSet().get(j));\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn new HashSet<V>(valores);\n\t}", "public void getValues(){\r\n //Get Values \r\n int k=0;\r\n String[] var;\r\n String evar;\r\n \r\n for (int i=0; i<linkVector.size(); i++){\r\n var= (String[]) linkVector.elementAt(i);\r\n evar=var[1];\r\n try { \r\n varContextField= varContextFields[linkIndex[k]]; \r\n switch (linkType[k++]){\r\n case DOUBLE: varContextField.setDouble(varContextObject,getDouble(evar)); break;\r\n case ARRAYDOUBLE: varContextField.set(varContextObject,getDoubleArray(evar)); break;\r\n case ARRAYDOUBLE2D: varContextField.set(varContextObject,getDoubleArray2D(evar)); break;\r\n case STRING: varContextField.set(varContextObject,getString(evar)); break; \r\n }\r\n \r\n } catch (java.lang.IllegalAccessException e) {\r\n System.out.println(\"Error Step: getting a value \" + e);\r\n } \r\n } \r\n }", "ManageValueSetSearchModel searchValueSetsForDraft(int startIndex, int pageSize);", "private void loadValues()\n {\n OperationSetBasicAutoAnswer opset = providerService\n .getOperationSet(OperationSetBasicAutoAnswer.class);\n OperationSetAdvancedAutoAnswer opSetAdvanced = providerService\n .getOperationSet(OperationSetAdvancedAutoAnswer.class);\n\n if(opset == null)\n return;\n\n noneRadio.setSelected(true);\n alwaysAnswerRadio.setSelected(\n opset.isAutoAnswerUnconditionalSet());\n\n if(opSetAdvanced != null)\n {\n if(opSetAdvanced.isAutoAnswerConditionSet())\n {\n String fName = opSetAdvanced.getAutoAnswerHeaderName();\n String fValue = opSetAdvanced.getAutoAnswerHeaderValue();\n if(AUTO_ALERT_INFO_NAME.equals(fName)\n && AUTO_ALERT_INFO_VALUE.equals(fValue))\n {\n alertInfoValue.setSelected(true);\n }\n else\n {\n customValueRadio.setSelected(true);\n headerNameField.setText(fName);\n\n if(StringUtils.isNotEmpty(fValue))\n headerValueField.setText(fValue);\n }\n\n }\n\n if(StringUtils.isNotEmpty(opSetAdvanced.getCallForward()))\n {\n callFwd.setSelected(true);\n callFwdNumberField.setText(opSetAdvanced.getCallForward());\n }\n }\n\n answerWithVideoCheckBox.setSelected(\n opset.isAutoAnswerWithVideoSet());\n }", "@Test\n public void testSet() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n Integer expResult = 7;\n Integer result = instance.set(2, 9);\n assertEquals(expResult, result);\n\n }", "void loadMyset() throws XVException {\n\t\tCubeTree.init(null);\n\t\tCubeTree.create(ecs, synsets);\n\t}", "public RvtAoiLocalSet(Map<RvtAoiMetadataKey, IRvtPoiAoiMetadataValue> values) {\n map.putAll(values);\n }", "private static void getSCset(){\n\t\ttry{\n\t\t\tSystem.out.print(\"SC set being processed\\n\");\n\t\t\tPreparedStatement pstm1 = CAMPS_CONNECTION.prepareStatement(\"select cluster_id, cluster_threshold from cp_clusters2 where type=?\");\n\t\t\tPreparedStatement pstm2 = CAMPS_CONNECTION.prepareStatement(\"select sequenceid from clusters_mcl2 where cluster_id=? and cluster_threshold=? \");\n\t\t\tpstm1.setString(1, \"sc_cluster\");\n\t\t\tResultSet rs1 = pstm1.executeQuery();\n\t\t\twhile(rs1.next()){\n\t\t\t\tint clusid = rs1.getInt(1);\n\t\t\t\tfloat thresh = rs1.getFloat(2);\n\t\t\t\tpstm2.setInt(1, clusid);\n\t\t\t\tpstm2.setFloat(2, thresh);\n\t\t\t\tint seqid;\n\t\t\t\tResultSet rs2 = pstm2.executeQuery();\n\t\t\t\twhile(rs2.next()){\n\t\t\t\t\tseqid = rs2.getInt(1);\n\t\t\t\t\tint tmNo = Initial_sequences.get(seqid);\n\t\t\t\t\tSC_sequences.put(seqid, tmNo);\n\t\t\t\t}\n\t\t\t\trs2.close();\n\t\t\t\tpstm2.clearBatch();\n\n\t\t\t}\n\t\t\trs1.close();\n\t\t\tpstm1.close();\n\t\t\tpstm2.close();\n\n\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setLabResults(Set<Cdss4NsarLabor> patLabor);", "public ObjectSet<Map.Entry<K, V>> entrySet() {\n/* 315 */ return (ObjectSet)reference2ObjectEntrySet();\n/* */ }", "public List<SetMappingValue> getSets() {\r\n\t\treturn sets;\r\n\t}", "private void traverseSets() {\n\t\tArrayList<PayloadBuilderSet> sets = new ArrayList<PayloadBuilderSet>();\n\t\tArrayList<PayloadBuilder> builders = new ArrayList<PayloadBuilder>();\n\n\t\tfor (PayloadSetConfiguration payloadSetConfiguration : workloadConfiguration.getPayloadSetConfigurations()) {\n\t\t\tConcurrentLinkedQueue<PayloadSetConfiguration> queue = new ConcurrentLinkedQueue<PayloadSetConfiguration>();\n\t\t\tqueue.offer(payloadSetConfiguration);\n\n\t\t\twhile (!queue.isEmpty()) {\n\t\t\t\tPayloadSetConfiguration setConfiguration = queue.poll();\n\n\t\t\t\t// If the configuration has payloads, create a new set and add it.\n\t\t\t\tif (setConfiguration.getNumPayloads() > 0) {\n\t\t\t\t\tPayloadBuilderSet set = new PayloadBuilderSet(setConfiguration, this);\n\n\t\t\t\t\tsets.add(set);\n\n\t\t\t\t\tfor (PayloadBuilder builder : set.getBuilders())\n\t\t\t\t\t\tbuilders.add(builder);\n\t\t\t\t}\n\n\t\t\t\t// Enqueue child sets for traversal\n\t\t\t\tfor (PayloadSetConfiguration childSetConfiguration : setConfiguration\n\t\t\t\t\t\t.getChildPayloadSetConfigurations()) {\n\t\t\t\t\tqueue.offer(childSetConfiguration);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.sets = sets.toArray(new PayloadBuilderSet[0]);\n\t\tthis.builders = builders.toArray(new PayloadBuilder[0]);\n\n\t}", "private void setup()\n\t{\n\t\tif(values == null)\n\t\t\tvalues = new HashMap<>();\n\t\telse\n\t\t\tvalues.clear();\n\t}", "public static String getValuesV()\n {\n Container v = new Container();\n\n //mal uso del try/catch con streams\n try\n {\n Stream<String> stream = Files.lines( Paths.get(PATHROOT, \"values2.txt\" ) );\n stream.forEach( x -> v.va = x );\n }\n catch ( Exception e )\n {\n }\n return v.va;\n }", "void collect(){\r\n\t\tif (getValues() != null){\r\n\t\t\tfor (Variable var : getValues().getVariables()){\r\n\t\t\t\tdefSelect(var);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void testSetCitiesList() {\n System.out.println(\"setCitiesList\");\n Set<City> citiesList = new HashSet<>();\n\n sn10.setCitiesList(citiesList);\n assertEquals(citiesList, sn10.getCitiesList());\n }", "Set createSet();", "public Set<IS> getFreItemSet();", "@TestApi\n @NonNull\n public RuleSet getCurrentRuleSet() {\n try {\n ParceledListSlice<Rule> rules = mManager.getCurrentRules();\n String version = mManager.getCurrentRuleSetVersion();\n return new RuleSet.Builder().setVersion(version).addRules(rules.getList()).build();\n } catch (RemoteException e) {\n throw e.rethrowAsRuntimeException();\n }\n }", "public ObjectSet<Map.Entry<K, V>> entrySet() {\n/* 217 */ return (ObjectSet)reference2ObjectEntrySet();\n/* */ }", "@Test\n public void testConvertGeneSet() {\n searchService.loadValueObject( SearchResult.from( GeneSet.class, gs, 1.0, \"test object\" ) );\n verify( geneSetService ).loadValueObject( gs );\n }", "protected SafeHashMap.ValuesCollection instantiateValuesCollection()\n {\n return new ValuesCollection();\n }", "public ObjectSet<Map.Entry<K, V>> entrySet() {\n/* 481 */ return (ObjectSet)reference2ObjectEntrySet();\n/* */ }", "public static <V> LinkedHashSet<V> asSet(V... values) {\n LinkedHashSet<V> ans = new LinkedHashSet<V>();\n for (int i = 0; i < values.length; i++)\n ans.add(values[i]);\n return ans;\n }", "private void genLoadSetCode(String name, String keyClassSimpleName) {\n\n int tabLevel = 1;\n String tabs = tabs(tabLevel);\n\n String keyCppType = cppType(keyClassSimpleName);\n\n String setType = \"std::set< \" + keyCppType + \" >\";\n\n load.println(\"\\t// \" + setType + \" this->\" + name);\n genDebug(load, \"\\tstd::cout << \\\"load \" + setType + \" \" + name + \"\\\" << std::endl;\");\n\n String vVarName = \"v\" + \"_\" + name;\n String lenVarName = vVarName + \"_length\";\n\n // read the length of the set\n load.println(tabs + \"int \" + lenVarName + \";\");\n\n load.println();\n load.println(tabs + INSTREAM_VAR_NAME + \".readInt(\" + lenVarName + \");\");\n\n genDebugDumpValue(load, lenVarName, tabs);\n\n load.println(tabs + setType + \"& \" + vVarName + \" = this->\" + name + \";\");\n\n // initialize & pre-allocate the set\n // load.println( tabs + vVarName + \".reserve( \" + lenVarName + \" );\");\n\n load.println();\n load.println(tabs + \"for( int i = 0; i < \" + lenVarName + \"; i++ ){\");\n\n tabs = tabs(++tabLevel);\n\n // load key\n String keyVarName = vVarName + \"_key\";\n load.println(tabs + keyCppType + \" \" + keyVarName + \";\");\n load.println(tabs + genReadCode(keyVarName, keyCppType));\n\n // add the new element to the set\n load.println(tabs + vVarName + \".insert( \" + keyVarName + \" );\");\n\n tabs = tabs(--tabLevel);\n load.println(tabs + \"}\");\n }", "private void createNullSet()\n\t{\n\t\tm_values = null;\n\t}", "public void recordSetRefReprs()\n {\n //##60 BEGIN\n if (fDbgLevel > 0)\n ioRoot.dbgFlow.print(2, \"\\nrecordSetRefReprs\",\n getSubpSym().getName());\n if (isComputedOrUnderComputation(DF_SETREFREPR)) {\n if (fDbgLevel > 0)\n ioRoot.dbgFlow.print(2, \"already computed\");\n return;\n }\n //##60 END\n //##65 BEGIN\n if (! isComputed(DF_EXPID)) {\n allocateExpIdForSubp();\n }\n //##65 END\n setUnderComputation(DF_SETREFREPR); //##62\n //##65 BEGIN\n if (fArrayOfSetRefReprList == null) {\n fArrayOfSetRefReprList = new SetRefReprList[fBBlockCount + 1];\n if (fDbgLevel > 3)\n ioRoot.dbgFlow.print(4, \"allocate fArrayOfSetRefReprList \"\n + fBBlockCount + 1);\n }\n //##65 END\n BBlock lBBlock;\n for (Iterator lCFGIterator = getBBlockList().iterator();\n lCFGIterator.hasNext(); ) {\n lBBlock = (BBlock)lCFGIterator.next();\n if (flowRoot.isHirAnalysis())\n recordSetRefReprs((BBlockHirImpl)lBBlock);\n }\n //##60 fDefCount=setRefRepr.getDefSetRefReprCount();\n fDefCount = getDefCount(); //##60\n //##60 DefVectorImpl.setVectorLength(flowRoot, fDefCount);\n setComputedFlag(DF_SETREFREPR); //##60\n }", "@IID(\"{5BBB5891-F832-497C-BE92-76A242809E67}\")\npublic interface ITestSet extends com.gc.IBaseFieldEx {\n\t// Methods:\n\t/**\n\t * <p>\n\t * The test set name.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"Name\"\n\t * </p>\n\t * \n\t * @return Returns a value of type java.lang.String\n\t */\n\n\t@DISPID(14)\n\t// = 0xe. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tjava.lang.String name();\n\n\t/**\n\t * <p>\n\t * The test set name.\n\t * </p>\n\t * <p>\n\t * Setter method for the COM property \"Name\"\n\t * </p>\n\t * \n\t * @param pVal\n\t * Mandatory java.lang.String parameter.\n\t */\n\n\t@DISPID(14)\n\t// = 0xe. The runtime will prefer the VTID if present\n\t@VTID(24)\n\tvoid name(java.lang.String pVal);\n\n\t/**\n\t * <p>\n\t * The test set status.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"Status\"\n\t * </p>\n\t * \n\t * @return Returns a value of type java.lang.String\n\t */\n\n\t@DISPID(15)\n\t// = 0xf. The runtime will prefer the VTID if present\n\t@VTID(25)\n\tjava.lang.String status();\n\n\t/**\n\t * <p>\n\t * The test set status.\n\t * </p>\n\t * <p>\n\t * Setter method for the COM property \"Status\"\n\t * </p>\n\t * \n\t * @param pVal\n\t * Mandatory java.lang.String parameter.\n\t */\n\n\t@DISPID(15)\n\t// = 0xf. The runtime will prefer the VTID if present\n\t@VTID(26)\n\tvoid status(java.lang.String pVal);\n\n\t/**\n\t * <p>\n\t * The factory object for the current test set.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"TSTestFactory\"\n\t * </p>\n\t * \n\t * @return Returns a value of type com4j.Com4jObject\n\t */\n\n\t@DISPID(16)\n\t// = 0x10. The runtime will prefer the VTID if present\n\t@VTID(27)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject tsTestFactory();\n\n\t/**\n\t * <p>\n\t * The condition factory object for the current test set.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"ConditionFactory\"\n\t * </p>\n\t * \n\t * @return Returns a value of type com4j.Com4jObject\n\t */\n\n\t@DISPID(17)\n\t// = 0x11. The runtime will prefer the VTID if present\n\t@VTID(28)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject conditionFactory();\n\n\t/**\n\t * <p>\n\t * Builds test set summary graph.\n\t * </p>\n\t * \n\t * @param xAxisField\n\t * Optional parameter. Default value is \"\"\n\t * @param groupByField\n\t * Optional parameter. Default value is \"\"\n\t * @param sumOfField\n\t * Optional parameter. Default value is \"\"\n\t * @param maxCols\n\t * Optional parameter. Default value is 0\n\t * @param filter\n\t * Optional parameter. Default value is\n\t * com4j.Variant.getMissing()\n\t * @param forceRefresh\n\t * Optional parameter. Default value is false\n\t * @param showFullPath\n\t * Optional parameter. Default value is false\n\t * @return Returns a value of type com4j.Com4jObject\n\t */\n\n\t@DISPID(18)\n\t// = 0x12. The runtime will prefer the VTID if present\n\t@VTID(29)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject buildSummaryGraph(\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String xAxisField,\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String groupByField,\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String sumOfField,\n\t\t\t@Optional @DefaultValue(\"0\") int maxCols,\n\t\t\t@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object filter,\n\t\t\t@Optional @DefaultValue(\"0\") boolean forceRefresh,\n\t\t\t@Optional @DefaultValue(\"0\") boolean showFullPath);\n\n\t/**\n\t * <p>\n\t * Builds test set progress graph.\n\t * </p>\n\t * \n\t * @param groupByField\n\t * Optional parameter. Default value is \"\"\n\t * @param sumOfField\n\t * Optional parameter. Default value is \"\"\n\t * @param majorSkip\n\t * Optional parameter. Default value is 0\n\t * @param minorSkip\n\t * Optional parameter. Default value is 1\n\t * @param maxCols\n\t * Optional parameter. Default value is 0\n\t * @param filter\n\t * Optional parameter. Default value is\n\t * com4j.Variant.getMissing()\n\t * @param frDate\n\t * Optional parameter. Default value is\n\t * com4j.Variant.getMissing()\n\t * @param forceRefresh\n\t * Optional parameter. Default value is false\n\t * @param showFullPath\n\t * Optional parameter. Default value is false\n\t * @return Returns a value of type com4j.Com4jObject\n\t */\n\n\t@DISPID(19)\n\t// = 0x13. The runtime will prefer the VTID if present\n\t@VTID(30)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject buildProgressGraph(\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String groupByField,\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String sumOfField,\n\t\t\t@Optional @DefaultValue(\"0\") int majorSkip,\n\t\t\t@Optional @DefaultValue(\"1\") int minorSkip,\n\t\t\t@Optional @DefaultValue(\"0\") int maxCols,\n\t\t\t@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object filter,\n\t\t\t@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object frDate,\n\t\t\t@Optional @DefaultValue(\"0\") boolean forceRefresh,\n\t\t\t@Optional @DefaultValue(\"0\") boolean showFullPath);\n\n\t/**\n\t * <p>\n\t * Starts the execution controller.\n\t * </p>\n\t * \n\t * @param serverName\n\t * Mandatory java.lang.String parameter.\n\t * @return Returns a value of type com4j.Com4jObject\n\t */\n\n\t@DISPID(20)\n\t// = 0x14. The runtime will prefer the VTID if present\n\t@VTID(31)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject startExecution(java.lang.String serverName);\n\n\t/**\n\t * <p>\n\t * Purges all the running executions within the test set.\n\t * </p>\n\t */\n\n\t@DISPID(21)\n\t// = 0x15. The runtime will prefer the VTID if present\n\t@VTID(32)\n\tvoid purgeExecutions();\n\n\t/**\n\t * <p>\n\t * Obsolete. Do not invoke.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"ExecEventNotifyByMailSettings\"\n\t * </p>\n\t * \n\t * @return Returns a value of type com4j.Com4jObject\n\t */\n\n\t@DISPID(22)\n\t// = 0x16. The runtime will prefer the VTID if present\n\t@VTID(33)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject execEventNotifyByMailSettings();\n\n\t/**\n\t * <p>\n\t * Gets the execution settings for the test set.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"ExecutionSettings\"\n\t * </p>\n\t * \n\t * @return Returns a value of type com4j.Com4jObject\n\t */\n\n\t@DISPID(23)\n\t// = 0x17. The runtime will prefer the VTID if present\n\t@VTID(34)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject executionSettings();\n\n\t/**\n\t * <p>\n\t * Gets default execution settings for tests.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"TestDefaultExecutionSettings\"\n\t * </p>\n\t * \n\t * @return Returns a value of type com4j.Com4jObject\n\t */\n\n\t@DISPID(24)\n\t// = 0x18. The runtime will prefer the VTID if present\n\t@VTID(35)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject testDefaultExecutionSettings();\n\n\t/**\n\t * <p>\n\t * Creates graph that shows the test set changes over time.\n\t * </p>\n\t * \n\t * @param groupByField\n\t * Optional parameter. Default value is \"\"\n\t * @param sumOfField\n\t * Optional parameter. Default value is \"\"\n\t * @param maxCols\n\t * Optional parameter. Default value is 0\n\t * @param filter\n\t * Optional parameter. Default value is\n\t * com4j.Variant.getMissing()\n\t * @param frDate\n\t * Optional parameter. Default value is\n\t * com4j.Variant.getMissing()\n\t * @param forceRefresh\n\t * Optional parameter. Default value is false\n\t * @param showFullPath\n\t * Optional parameter. Default value is false\n\t * @return Returns a value of type com4j.Com4jObject\n\t */\n\n\t@DISPID(25)\n\t// = 0x19. The runtime will prefer the VTID if present\n\t@VTID(36)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject buildTrendGraph(\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String groupByField,\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String sumOfField,\n\t\t\t@Optional @DefaultValue(\"0\") int maxCols,\n\t\t\t@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object filter,\n\t\t\t@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object frDate,\n\t\t\t@Optional @DefaultValue(\"0\") boolean forceRefresh,\n\t\t\t@Optional @DefaultValue(\"0\") boolean showFullPath);\n\n\t/**\n\t * <p>\n\t * Creates Performance Graph.\n\t * </p>\n\t * \n\t * @param groupByField\n\t * Optional parameter. Default value is \"\"\n\t * @param sumOfField\n\t * Optional parameter. Default value is \"\"\n\t * @param maxCols\n\t * Optional parameter. Default value is 0\n\t * @param filter\n\t * Optional parameter. Default value is\n\t * com4j.Variant.getMissing()\n\t * @param frDate\n\t * Optional parameter. Default value is\n\t * com4j.Variant.getMissing()\n\t * @param forceRefresh\n\t * Optional parameter. Default value is false\n\t * @param showFullPath\n\t * Optional parameter. Default value is false\n\t * @return Returns a value of type com4j.Com4jObject\n\t */\n\n\t@DISPID(26)\n\t// = 0x1a. The runtime will prefer the VTID if present\n\t@VTID(37)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject buildPerfGraph(\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String groupByField,\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String sumOfField,\n\t\t\t@Optional @DefaultValue(\"0\") int maxCols,\n\t\t\t@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object filter,\n\t\t\t@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object frDate,\n\t\t\t@Optional @DefaultValue(\"0\") boolean forceRefresh,\n\t\t\t@Optional @DefaultValue(\"0\") boolean showFullPath);\n\n\t/**\n\t * <p>\n\t * Sets the status of each test in the test set to 'No Run'.\n\t * </p>\n\t * \n\t * @param deleteRuns\n\t * Mandatory boolean parameter.\n\t */\n\n\t@DISPID(27)\n\t// = 0x1b. The runtime will prefer the VTID if present\n\t@VTID(38)\n\tvoid resetTestSet(boolean deleteRuns);\n\n\t/**\n\t * <p>\n\t * Gets information about the instances of the specified test in this test\n\t * set.\n\t * </p>\n\t * \n\t * @param testIDs\n\t * Mandatory java.lang.String parameter.\n\t * @return Returns a value of type java.lang.String\n\t */\n\n\t@DISPID(28)\n\t// = 0x1c. The runtime will prefer the VTID if present\n\t@VTID(39)\n\tjava.lang.String checkTestInstances(java.lang.String testIDs);\n\n\t/**\n\t * <p>\n\t * Builds test set progress graph.\n\t * </p>\n\t * \n\t * @param groupByField\n\t * Optional parameter. Default value is \"\"\n\t * @param sumOfField\n\t * Optional parameter. Default value is \"\"\n\t * @param byHistory\n\t * Optional parameter. Default value is false\n\t * @param majorSkip\n\t * Optional parameter. Default value is 0\n\t * @param minorSkip\n\t * Optional parameter. Default value is 1\n\t * @param maxCols\n\t * Optional parameter. Default value is 0\n\t * @param filter\n\t * Optional parameter. Default value is\n\t * com4j.Variant.getMissing()\n\t * @param frDate\n\t * Optional parameter. Default value is\n\t * com4j.Variant.getMissing()\n\t * @param forceRefresh\n\t * Optional parameter. Default value is false\n\t * @param showFullPath\n\t * Optional parameter. Default value is false\n\t * @return Returns a value of type com4j.Com4jObject\n\t */\n\n\t@DISPID(29)\n\t// = 0x1d. The runtime will prefer the VTID if present\n\t@VTID(40)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject buildProgressGraphEx(\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String groupByField,\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String sumOfField,\n\t\t\t@Optional @DefaultValue(\"-1\") boolean byHistory,\n\t\t\t@Optional @DefaultValue(\"0\") int majorSkip,\n\t\t\t@Optional @DefaultValue(\"1\") int minorSkip,\n\t\t\t@Optional @DefaultValue(\"0\") int maxCols,\n\t\t\t@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object filter,\n\t\t\t@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object frDate,\n\t\t\t@Optional @DefaultValue(\"0\") boolean forceRefresh,\n\t\t\t@Optional @DefaultValue(\"0\") boolean showFullPath);\n\n\t/**\n\t * <p>\n\t * The test set's parent node.\n\t * </p>\n\t * <p>\n\t * Getter method for the COM property \"TestSetFolder\"\n\t * </p>\n\t * \n\t * @return Returns a value of type com4j.Com4jObject\n\t */\n\n\t@DISPID(30)\n\t// = 0x1e. The runtime will prefer the VTID if present\n\t@VTID(41)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject testSetFolder();\n\n\t/**\n\t * <p>\n\t * The test set's parent node.\n\t * </p>\n\t * <p>\n\t * Setter method for the COM property \"TestSetFolder\"\n\t * </p>\n\t * \n\t * @param pNode\n\t * Mandatory java.lang.Object parameter.\n\t */\n\n\t@DISPID(30)\n\t// = 0x1e. The runtime will prefer the VTID if present\n\t@VTID(42)\n\tvoid testSetFolder(@MarshalAs(NativeType.VARIANT) java.lang.Object pNode);\n\n\t// Properties:\n}", "public objData getTestSet(String id){\n objData objdata = new objData();\n try{\n MainClient mc = new MainClient(DBConn.getHost());\n\n String query = \"SELECT TSDB_REFID, TSDB_SET_NAME, TST_REFID FROM TEST_SET_DB WHERE TSDB_REFID = '\" + id + \"'\";\n String data[] = {};\n\n objdata.setTableData(mc.getQuery(query,data));\n }\n catch(Exception e){\n objdata.setErrorMessage(e.toString());\n objdata.setFlag(1);\n }\n return objdata;\n }", "public List<Set> getSets() {\n\t\treturn this.sets;\n\t}", "public void setValues(List<Object> values);", "private static Set<String> getCurrencySet() {\n Set<String> currencySet = new HashSet<>();\n for (int i= 0; i<getDataBase().length;i++){\n currencySet.add(getDataBase()[i][0]);\n }\n return Collections.synchronizedSet(currencySet);\n }", "CodeSetsType createCodeSetsType();", "public ResultSet[] getResultSets() {\n\n migratePathTestResults();\n return resultSets != null ? resultSets.clone() : null;\n }", "protected void InitValuables() {\n\t\tsuper.InitValuables();\n\t\t\n\t}", "protected Set<E> ensureSet()\n {\n Set<E> set = m_set;\n if (set == null)\n {\n set = m_set = new LiteSet<>();\n }\n return set;\n }", "public PTreeCredalSet getInstance(Vector vars){\n return new PTreeCredalSet(vars);\n }", "synchronized public DREM_DataSet buildset(String szorganismsourceval,\n\t\t\tString szxrefsourceval, String szxrefval, String szexp1val,\n\t\t\tString szgoval, String szgocategoryval, int nmaxmissing,\n\t\t\tdouble dexpressedval, double dmincorrelation, int nsamplespval,\n\t\t\tint nmingo, int nmingolevel, String szextraval, boolean balltime,\n\t\t\tVector repeatnames, boolean btakelog, boolean bspotincluded,\n\t\t\tboolean badd0, String szcategoryIDval, String szevidenceval,\n\t\t\tString sztaxonval, boolean bpontoval, boolean bcontoval,\n\t\t\tboolean bfontoval, boolean brandomgoval, boolean bmaxminval)\n\t\t\tthrows Exception {\n\t\tDREM_DataSet theDataSetsMerged = null;\n\t\tif (balltime) {\n\t\t\tDREM_DataSet theDataSet1 = new DREM_DataSet(szexp1val, nmaxmissing,\n\t\t\t\t\tdexpressedval, dmincorrelation, btakelog, bspotincluded,\n\t\t\t\t\tfalse, badd0, bmaxminval, balltime);\n\n\t\t\tif (theDataSet1.numcols <= 1) {\n\t\t\t\ttheDataSet1 = new DREM_DataSet(theDataSet1.filterDuplicates(),\n\t\t\t\t\t\tnew DREM_GoAnnotations(szorganismsourceval,\n\t\t\t\t\t\t\t\tszxrefsourceval, szxrefval, szgoval,\n\t\t\t\t\t\t\t\tszgocategoryval, theDataSet1.genenames,\n\t\t\t\t\t\t\t\ttheDataSet1.probenames, nsamplespval, nmingo,\n\t\t\t\t\t\t\t\tnmingolevel, szextraval, szcategoryIDval,\n\t\t\t\t\t\t\t\tbspotincluded, szevidenceval, sztaxonval,\n\t\t\t\t\t\t\t\tbpontoval, bcontoval, bfontoval, brandomgoval));\n\n\t\t\t\tDREM_DataSet theDataSet1fm;\n\t\t\t\tif (theDataSet1.numcols == 1) {\n\t\t\t\t\ttheDataSet1fm = new DREM_DataSet(\n\t\t\t\t\t\t\ttheDataSet1.filterMissing1point(), theDataSet1.tga);\n\t\t\t\t\ttheDataSet1fm = new DREM_DataSet(\n\t\t\t\t\t\t\ttheDataSet1fm.filtergenesthreshold1point(),\n\t\t\t\t\t\t\ttheDataSet1fm.tga);\n\t\t\t\t} else {\n\t\t\t\t\ttheDataSet1fm = theDataSet1;\n\t\t\t\t}\n\t\t\t\treturn theDataSet1fm;\n\t\t\t} else {\n\t\t\t\tString[] origgenes = theDataSet1.genenames;\n\t\t\t\ttheDataSet1 = new DREM_DataSet(theDataSet1.logratio2(),\n\t\t\t\t\t\ttheDataSet1.tga);\n\t\t\t\ttheDataSet1 = new DREM_DataSet(\n\t\t\t\t\t\ttheDataSet1.averageAndFilterDuplicates(),\n\t\t\t\t\t\ttheDataSet1.tga);\n\n\t\t\t\t// genevalues in log ratio before averaging stored\n\t\t\t\t// need for each gene duplicated\n\t\t\t\t// a mutlidimensional array of time series for each occurence\n\n\t\t\t\tint numrepeats = repeatnames.size();\n\n\t\t\t\tif (numrepeats > 0) {\n\t\t\t\t\tDREM_DataSet[] repeatSets = new DREM_DataSet[numrepeats];\n\t\t\t\t\tfor (int nset = 0; nset < numrepeats; nset++) {\n\t\t\t\t\t\tString szfile = (String) repeatnames.get(nset);\n\n\t\t\t\t\t\tDREM_DataSet theOtherSet = new DREM_DataSet(szfile,\n\t\t\t\t\t\t\t\tnmaxmissing, dexpressedval, dmincorrelation,\n\t\t\t\t\t\t\t\tbtakelog, bspotincluded, true, badd0,\n\t\t\t\t\t\t\t\tbmaxminval, balltime);\n\t\t\t\t\t\terrorcheck(origgenes, theOtherSet.genenames,\n\t\t\t\t\t\t\t\ttheDataSet1.numcols, theOtherSet.numcols);\n\t\t\t\t\t\t// compute log ratio of each time series first then\n\t\t\t\t\t\t// merge\n\t\t\t\t\t\t// normalize the data\n\t\t\t\t\t\ttheOtherSet = new DREM_DataSet(theOtherSet.logratio2(),\n\t\t\t\t\t\t\t\ttheOtherSet.tga);\n\t\t\t\t\t\ttheOtherSet = new DREM_DataSet(\n\t\t\t\t\t\t\t\ttheOtherSet.averageAndFilterDuplicates(),\n\t\t\t\t\t\t\t\ttheOtherSet.tga);\n\t\t\t\t\t\t// gene values in log ratio before averaging stored\n\n\t\t\t\t\t\trepeatSets[nset] = theOtherSet;\n\t\t\t\t\t}\n\t\t\t\t\ttheDataSetsMerged = new DREM_DataSet(\n\t\t\t\t\t\t\ttheDataSet1.mergeDataSets(repeatSets),\n\t\t\t\t\t\t\ttheDataSet1.tga);\n\t\t\t\t\ttheDataSetsMerged = new DREM_DataSet(\n\t\t\t\t\t\t\ttheDataSetsMerged.filterdistprofiles(theDataSet1,\n\t\t\t\t\t\t\t\t\trepeatSets), theDataSetsMerged.tga);\n\t\t\t\t} else {\n\t\t\t\t\ttheDataSetsMerged = theDataSet1;\n\t\t\t\t}\n\n\t\t\t\ttheDataSetsMerged = new DREM_DataSet(\n\t\t\t\t\t\ttheDataSetsMerged.filterMissing(),\n\t\t\t\t\t\ttheDataSetsMerged.tga);\n\t\t\t\ttheDataSetsMerged = new DREM_DataSet(\n\t\t\t\t\t\ttheDataSetsMerged.filtergenesthreshold2(),\n\t\t\t\t\t\ttheDataSetsMerged.tga);\n\n\t\t\t\ttheDataSetsMerged.tga = new DREM_GoAnnotations(\n\t\t\t\t\t\tszorganismsourceval, szxrefsourceval, szxrefval,\n\t\t\t\t\t\tszgoval, szgocategoryval, theDataSet1.genenames,\n\t\t\t\t\t\ttheDataSet1.probenames, nsamplespval, nmingo,\n\t\t\t\t\t\tnmingolevel, szextraval, szcategoryIDval,\n\t\t\t\t\t\tbspotincluded, szevidenceval, sztaxonval, bpontoval,\n\t\t\t\t\t\tbcontoval, bfontoval, brandomgoval);\n\n\t\t\t\ttheDataSetsMerged.addExtraToFilter(theDataSetsMerged.tga);\n\t\t\t\treturn theDataSetsMerged;\n\t\t\t}\n\t\t} else {\n\t\t\tDREM_DataSet theDataSet1 = new DREM_DataSet(szexp1val, nmaxmissing,\n\t\t\t\t\tdexpressedval, dmincorrelation, btakelog, bspotincluded,\n\t\t\t\t\tfalse, badd0, bmaxminval, balltime);\n\t\t\tif (theDataSet1.numcols <= 1) {\n\t\t\t\ttheDataSet1 = new DREM_DataSet(theDataSet1.filterDuplicates(),\n\t\t\t\t\t\tnew DREM_GoAnnotations(szorganismsourceval,\n\t\t\t\t\t\t\t\tszxrefsourceval, szxrefval, szgoval,\n\t\t\t\t\t\t\t\tszgocategoryval, theDataSet1.genenames,\n\t\t\t\t\t\t\t\ttheDataSet1.probenames, nsamplespval, nmingo,\n\t\t\t\t\t\t\t\tnmingolevel, szextraval, szcategoryIDval,\n\t\t\t\t\t\t\t\tbspotincluded, szevidenceval, sztaxonval,\n\t\t\t\t\t\t\t\tbpontoval, bcontoval, bfontoval, brandomgoval));\n\t\t\t\tDREM_DataSet theDataSet1fm;\n\t\t\t\tif (theDataSet1.numcols == 1) {\n\t\t\t\t\ttheDataSet1fm = new DREM_DataSet(\n\t\t\t\t\t\t\ttheDataSet1.filterMissing1point(), theDataSet1.tga);\n\t\t\t\t\ttheDataSet1fm = new DREM_DataSet(\n\t\t\t\t\t\t\ttheDataSet1fm.filtergenesthreshold1point(),\n\t\t\t\t\t\t\ttheDataSet1fm.tga);\n\t\t\t\t} else {\n\t\t\t\t\ttheDataSet1fm = theDataSet1;\n\t\t\t\t}\n\t\t\t\treturn theDataSet1fm;\n\t\t\t} else {\n\t\t\t\tint numrepeats = repeatnames.size();\n\n\t\t\t\tif (numrepeats > 0) {\n\t\t\t\t\tDREM_DataSet[] repeatSets = new DREM_DataSet[numrepeats];\n\t\t\t\t\tfor (int nset = 0; nset < numrepeats; nset++) {\n\t\t\t\t\t\tString szfile = (String) repeatnames.get(nset);\n\n\t\t\t\t\t\tDREM_DataSet theOtherSet = new DREM_DataSet(szfile,\n\t\t\t\t\t\t\t\tnmaxmissing, dexpressedval, dmincorrelation,\n\t\t\t\t\t\t\t\tbtakelog, bspotincluded, true, badd0,\n\t\t\t\t\t\t\t\tbmaxminval, balltime);\n\n\t\t\t\t\t\terrorcheck(theDataSet1, theOtherSet);\n\n\t\t\t\t\t\trepeatSets[nset] = theOtherSet;\n\t\t\t\t\t}\n\t\t\t\t\ttheDataSetsMerged = new DREM_DataSet(\n\t\t\t\t\t\t\ttheDataSet1.mergeDataSets(repeatSets),\n\t\t\t\t\t\t\ttheDataSet1.tga);\n\t\t\t\t} else {\n\t\t\t\t\ttheDataSetsMerged = theDataSet1;\n\t\t\t\t}\n\n\t\t\t\ttheDataSetsMerged = new DREM_DataSet(\n\t\t\t\t\t\ttheDataSetsMerged.logratio2(), theDataSetsMerged.tga);\n\t\t\t\ttheDataSetsMerged = new DREM_DataSet(\n\t\t\t\t\t\ttheDataSetsMerged.averageAndFilterDuplicates(),\n\t\t\t\t\t\ttheDataSetsMerged.tga);\n\t\t\t\t// gene values before averaging stored\n\t\t\t\ttheDataSetsMerged = new DREM_DataSet(\n\t\t\t\t\t\ttheDataSetsMerged.filterMissing(),\n\t\t\t\t\t\ttheDataSetsMerged.tga);\n\t\t\t\ttheDataSetsMerged = new DREM_DataSet(\n\t\t\t\t\t\ttheDataSetsMerged.filtergenesthreshold2(),\n\t\t\t\t\t\ttheDataSetsMerged.tga);\n\n\t\t\t\ttheDataSetsMerged.tga = new DREM_GoAnnotations(\n\t\t\t\t\t\tszorganismsourceval, szxrefsourceval, szxrefval,\n\t\t\t\t\t\tszgoval, szgocategoryval, theDataSet1.genenames,\n\t\t\t\t\t\ttheDataSet1.probenames, nsamplespval, nmingo,\n\t\t\t\t\t\tnmingolevel, szextraval, szcategoryIDval,\n\t\t\t\t\t\tbspotincluded, szevidenceval, sztaxonval, bpontoval,\n\t\t\t\t\t\tbcontoval, bfontoval, brandomgoval);\n\t\t\t}\n\t\t\ttheDataSetsMerged.addExtraToFilter(theDataSetsMerged.tga);\n\n\t\t\treturn theDataSetsMerged;\n\t\t}\n\t}", "private Set func_177575_g() {\n/* 450 */ HashSet var1 = Sets.newHashSet();\n/* 451 */ ArrayList<?> var2 = Lists.newArrayList(this.variants.keySet());\n/* 452 */ Collections.sort(var2, new Comparator()\n/* */ {\n/* */ private static final String __OBFID = \"CL_00002390\";\n/* */ \n/* */ public int func_177505_a(ModelResourceLocation p_177505_1_, ModelResourceLocation p_177505_2_) {\n/* 457 */ return p_177505_1_.toString().compareTo(p_177505_2_.toString());\n/* */ }\n/* */ \n/* */ public int compare(Object p_compare_1_, Object p_compare_2_) {\n/* 461 */ return func_177505_a((ModelResourceLocation)p_compare_1_, (ModelResourceLocation)p_compare_2_);\n/* */ }\n/* */ });\n/* 464 */ Iterator<?> var3 = var2.iterator();\n/* */ \n/* 466 */ while (var3.hasNext()) {\n/* */ \n/* 468 */ ModelResourceLocation var4 = (ModelResourceLocation)var3.next();\n/* 469 */ ModelBlockDefinition.Variants var5 = (ModelBlockDefinition.Variants)this.variants.get(var4);\n/* 470 */ Iterator<ModelBlockDefinition.Variant> var6 = var5.getVariants().iterator();\n/* */ \n/* 472 */ while (var6.hasNext()) {\n/* */ \n/* 474 */ ModelBlockDefinition.Variant var7 = var6.next();\n/* 475 */ ModelBlock var8 = (ModelBlock)this.models.get(var7.getModelLocation());\n/* */ \n/* 477 */ if (var8 == null) {\n/* */ \n/* 479 */ LOGGER.warn(\"Missing model for: \" + var4);\n/* */ \n/* */ continue;\n/* */ } \n/* 483 */ var1.addAll(func_177585_a(var8));\n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 488 */ var1.addAll(field_177602_b);\n/* 489 */ return var1;\n/* */ }", "Values values();", "@DISPID(1610940430) //= 0x6005000e. The runtime will prefer the VTID if present\n @VTID(36)\n Collection annotationSets();", "public JSONArray getSubValueSets(String scheme, String version, String code, boolean fromCache) {\r\n if (scheme == null)\r\n scheme = Constants.CODING_SCHEME_NAME;\r\n\r\n String retval = DataUtils.getCodingSchemeName(scheme);\r\n if (retval != null) {\r\n scheme = retval;\r\n }\r\n\r\n HashMap map = null;\r\n String key = scheme + \"$\" + version + \"subvsd$\" + code;\r\n JSONArray nodeArray = null;\r\n if (fromCache) {\r\n Element element = _cache.get(key);\r\n if (element != null) {\r\n nodeArray = (JSONArray) element.getValue();\r\n }\r\n }\r\n if (nodeArray == null) {\r\n _logger.debug(\"Not in cache -- calling getSubValueSets \");\r\n\r\n map = ValueSetHierarchy.getSubValueSets(scheme, code);\r\n nodeArray = hashMap2JSONArray(map);\r\n\r\n if (nodeArray != null && fromCache) {\r\n try {\r\n Element element = new Element(key, nodeArray);\r\n _cache.put(element);\r\n } catch (Exception ex) {\r\n\r\n }\r\n }\r\n } else {\r\n _logger.debug(\"Retrieved from cache.\");\r\n }\r\n return nodeArray;\r\n }", "public native void selectAllFacetValues() /*-{\r\n var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();\r\n self.selectAllFacetValues();\r\n }-*/;", "public JSONArray getRootValueSets(String scheme, String version) {\r\n return getRootValueSets(scheme, version, true);\r\n }", "private void createTwoValueSet()\n\t{\n\t\tm_mockery.checking(new Expectations()\n\t\t{\n\t\t\t{\n\t\t\t\tallowing(m_values).getItemCount();\n\t\t\t\twill(returnValue(2));\n\t\t\t\t\n\t\t\t\t// Keys.\n\t\t\t\tallowing(m_values).getKey(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getKey(1);\n\t\t\t\twill(returnValue(1));\n\t\t\t\t\n\t\t\t\tallowing(m_values).getIndex(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getIndex(1);\n\t\t\t\twill(returnValue(1));\n\t\t\t\t\n\t\t\t\tallowing(m_values).getKeys();\n\t\t\t\twill(returnValue(new ArrayList<Integer>() {{ add(0); add(1); }}));\n\t\t\t\t\n\t\t\t\t// Values.\n\t\t\t\tallowing(m_values).getValue(0);\n\t\t\t\twill(returnValue(0));\n\t\t\t\tallowing(m_values).getValue(1);\n\t\t\t\twill(returnValue(3));\n\t\t\t}\n\t\t});\n\t}", "private void collectValuesForSettings() {\n portColumnsValue = (portColumns.getProgress());\n portRowsValue = (portRows.getProgress());\n landColumnsValue = (landColumns.getProgress());\n landRowsValue = (landRows.getProgress());\n }", "private void manageSetsResult(String result) {\n try {\n JSONObject object_result = new JSONObject(result);\n JSONArray objects = object_result.getJSONArray(\"objects\");\n\n for(int i=0; i<objects.length(); i++){\n JSONObject object = objects.getJSONObject(i);\n Sets set = new Sets();\n\n if(object.has(\"title\")){\n set.setTitle(object.getString(\"title\"));\n }\n if(object.has(\"body\")){\n set.setBody(object.getString(\"body\"));\n }\n if(object.has(\"film_count\")){\n set.setFilmCount(object.getInt(\"film_count\"));\n }\n if(object.has(\"items\")){\n set.setItems(object.getJSONArray(\"items\"));\n }\n if(object.has(\"image_urls\")\n && object.getJSONArray(\"image_urls\").length() > 0\n && object.getJSONArray(\"image_urls\").get(0) != null){\n set.setPhotoArray(object.getJSONArray(\"image_urls\"));\n }\n\n this.sets.add(set);\n }\n\n listener.onSetsLoaded();\n\n }catch (JSONException e){\n e.printStackTrace();\n listener.onSetError();\n }\n }", "private void getDatasetsList(final String newName) {\r\n DivaClientService.getAvailableDatasets( new AsyncCallback<TreeMap<Integer, String>>() {\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Window.alert(\"DiVAFiles folder is not available please contact the system administrator\");\r\n SelectionManager.Busy_Task(false, true);\r\n }\r\n\r\n @Override\r\n public void onSuccess(TreeMap results) {\r\n for (Object o : results.keySet()) {\r\n int key = (Integer) o;\r\n String str = formatTitle((String) results.get(key));\r\n selectDatasetList.addItem(str);\r\n datasetsNames.put(str, key);\r\n selectDatasetList.setItemSelected(0, true);\r\n tempSelectDatasetList.addItem(str);\r\n tempSelectDatasetList.setItemSelected(0, true);\r\n SelectionManager.Busy_Task(false, true);\r\n }\r\n updateSubDsSelectionList(newName);\r\n }\r\n\r\n });\r\n\r\n }", "public Collection<SubsValue> getSubsValues() {\n\t\tCollection<SubsValue> result = new HashSet<SubsValue>();\n\n\t\tif (TemplatesStore.getInstance().getData().values() != null) {\n\t\t\tfor (TemplatesStoreData data : TemplatesStore.getInstance().getData().values()) {\n\t\t\t\tif (this.isSelectedCartridge(data)) {\n\t\t\t\t\tCollection<SubsValue> subsvals = data.getSubstitutes();\n\t\t\t\t\tif (subsvals != null) {\n\t\t\t\t\t\tDataStore.getInstance().mergeSubsValues(subsvals, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\r\n public void getAssetReferences( List<String> assetPaths, List<Integer> assetTypes ) {\n for( GlobalStateDataControl globalStateDataControl : globalStatesDataControlList )\r\n globalStateDataControl.getAssetReferences( assetPaths, assetTypes );\r\n }", "void setChangeSet(ChangeSet changeSet);", "@Test\n\tpublic void testListsAndSets() throws Exception {\n\t\ttestWith(TestClassListAndSet.getInstance());\n\t}", "public void testSetNav() {\n // browser.maximizeWindow();\n\n // Clear database, create a test user and login as that user. Start at the home page...\n GlobalTest.resetDatabaseForTest(\"PlayWithMagic\");\n GlobalTest.addUserForTest();\n IndexPage indexPage = new IndexPage(browser).loginToTestAccount();\n\n // Click the Browse Sets button\n ListSetsPage listSetsPage = indexPage.clickBrowseSetsButton();\n\n // Click the Create Sets button\n EditSetPage editSetPage = listSetsPage.clickCreateSetButton();\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 void set_values(ArrayList<Integer> values)\r\n\t{\r\n\t\tthis.poss_values = values;\r\n\t}", "GeneralizationSet createGeneralizationSet();", "Values initializeValues(Thread current) {\n return current.localValues = new Values();\n }", "Set<Entry<String, Object>> propertySet(Object context);", "public void setAll()\r\n\t{\r\n\t\tthis.coderVersion = CaTIESProperties.getValue(\"caties.coder.version\");\r\n\t\tthis.gateHome = CaTIESProperties.getValue(\"caties.gate.home\");\r\n\t\tthis.creoleUrlName = CaTIESProperties.getValue(\"caties.creole.url.name\");\r\n\t\tthis.caseInsensitiveGazetteerUrlName = CaTIESProperties\r\n\t\t\t\t.getValue(\"caties.case.insensitive.gazetteer.url.name\");\r\n\t\tthis.caseSensitiveGazetteerUrlName = CaTIESProperties\r\n\t\t\t\t.getValue(\"caties.case.sensitive.gazetteer.url.name\");\r\n\t\tthis.sectionChunkerUrlName = CaTIESProperties.getValue(\"caties.section.chunker.url.name\");\r\n\t\tthis.conceptFilterUrlName = CaTIESProperties.getValue(\"caties.concept.filter.url.name\");\r\n\t\tthis.negExUrlName = CaTIESProperties.getValue(\"caties.neg.ex.url.name\");\r\n\t\tthis.conceptCategorizerUrlName = CaTIESProperties\r\n\t\t\t\t.getValue(\"caties.concept.categorizer.url.name\");\r\n\t}", "public Set<Scope> zzasv() {\n if (this.f613zP == null) {\n return Collections.emptySet();\n }\n HashSet hashSet = new HashSet(this.f613zP.zzavp());\n Map zzavr = this.f613zP.zzavr();\n for (Api api : zzavr.keySet()) {\n if (!this.f600zA.f679Ay.containsKey(api.zzaqv())) {\n hashSet.addAll(((com.google.android.gms.common.internal.zzf.zza) zzavr.get(api)).f319jw);\n }\n }\n return hashSet;\n }", "public Collection<SingleValue> values() {\n return Collections.unmodifiableCollection(container.values());\n }", "public void setSets(List<SetMappingValue> sets) {\r\n\t\tthis.sets = sets;\r\n\t}", "public IntSet getBackingSet() {\r\n return S;\r\n }", "public void setValues(Object valor) throws java.sql.SQLException, WSException {\r\n\t\tif (valor instanceof java.sql.ResultSet) {\r\n\t\t\tjava.sql.ResultSet jdbcResultSet = (java.sql.ResultSet) valor;\r\n\t\t\tthis.elemVS = new java.util.Properties();\r\n\t\t\tthis.nextElem = 0;\r\n\t\t\t// Se obtiene la MetaData del RS original.\r\n\t\t\tjava.sql.ResultSetMetaData metaData = jdbcResultSet.getMetaData();\r\n\t\t\tthis.cantidadColumnas = metaData.getColumnCount();\r\n\t\t\tthis.nombreColumnas = new String[this.cantidadColumnas + 1];\r\n\t\t\tthis.tiposDatos = new String[this.cantidadColumnas];\r\n\t\t\t// Se copian los nombres de las columnas originales.\r\n\t\t\tfor (int i = 0; i < this.cantidadColumnas; i++){\r\n\t\t\t\tthis.nombreColumnas[i + 1] = metaData.getColumnName(i + 1);\r\n\t\t\t\tthis.tiposDatos[i] = metaData.getColumnClassName(i+1);\r\n\t\t\t}\r\n\t\t\t// Se copian los datos.\r\n\t\t\tObject fila[];\r\n\t\t\twhile (jdbcResultSet.next()) {\r\n\t\t\t\tfila = new Object[this.cantidadColumnas + 1];\r\n\t\t\t\tfor (int j = 0; j < this.cantidadColumnas; j++)\r\n\t\t\t\t\tfila[j + 1] = jdbcResultSet.getObject(j + 1);\r\n\t\t\t\tthis.addElem(fila);\r\n\t\t\t}\r\n\t\t\t//\tjdbcResultSet.close();\r\n\t\t\tthis.beforeFirst();\r\n\t\t}\r\n\t\tif(valor instanceof Vector){\r\n\t\t\tCallableStatement value = (CallableStatement)((Vector)valor).get(0);\r\n\t\t\tDBParserParams meta = (DBParserParams)((Vector)valor).get(1);\r\n\t\t\tthis.setValues(value,meta);\r\n\t\t}\r\n\t\tif(valor instanceof Properties){\r\n\t\t\tthis.cantidadColumnas = ((String[])((Properties)valor).get(\"nombre\")).length - 1;\r\n\t\t\tthis.nombreColumnas = (String[])((Properties)valor).get(\"nombre\");\r\n\t\t\tthis.tiposDatos = (String[])((Properties)valor).get(\"tipo\");\r\n\t\t\t((Properties)valor).remove(\"tipo\");\r\n\t\t\t((Properties)valor).remove(\"nombre\");\r\n\t\t\tthis.elemVS = (Properties)valor;\r\n\t\t\tthis.nextElem = 0;\r\n\t\t}\r\n\t}", "public void setStages(ArrayList value);", "@Override\n\tpublic void initializeValues() {\n\n\t}", "public void assignCalSuites(Collection<BwCalSuite> val) {\n calSuites = val;\n }", "public void setAllValues() {\n//\t\tNewRestaurantDetailsByStoreId newRestaurantDetailsByStoreId = null;\n\t\t\n\t\tif (Constants.allthemes!=null){\n\t\t int length = Constants.allthemes.size();\n\t\t for(int i=0;i<length;i++){\n\t\t \tThemes currentTheme = Constants.allthemes.get(i);\n\t\t \tAddObjectToList(currentTheme.photo_url,\n\t\t \t\t\tcurrentTheme.title, \n\t\t\t\t\t\t\"~\"+currentTheme.content,\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t\tcurrentTheme.themeIndex);\n\t\t }\n\t\t \n\t\t \n\t\t runOnUiThread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tprepareArrayLits();//CREATE LIST VIEW OF THE NEW RESTAURANTS\n\t\t\t\t}\n\t\t\t});\n\t\t}else{\n\t\t\tToast.makeText(SlyThemesActivity.this, \"無資料,請重開App.\",Toast.LENGTH_SHORT).show();\n\t\t}\n\t}", "@Override\n\tpublic Collection<V> values() {\n\t\t// TODO\n\t\treturn new ValueView();\n\t}", "protected void storeCurrentValues() {\n }", "private void setResultSet(final ResultSet value) {\n\n resultSet = value;\n }", "public SectionSets (Collection<Collection<Section>> sets)\r\n {\r\n this.sets = sets;\r\n }", "protected void InitValuables() {\n\t\tsuper.InitValuables();\n\t\t\n\t\tCursurIndex = 1;\n\t\t\n\t}", "public V setValue(V value);", "private Widget buildElementWithVSACValueSetWidget() {\r\n mainPanel = new VerticalPanel();\r\n mainPanel.getElement().setId(\"mainPanel_VerticalPanel\");\r\n mainPanel.setWidth(\"95%\");\r\n mainPanel.add(new SpacerWidget());\r\n mainPanel.add(new SpacerWidget());\r\n return mainPanel;\r\n }" ]
[ "0.5367648", "0.5354203", "0.53217524", "0.5195479", "0.5189436", "0.5157393", "0.51488715", "0.5148846", "0.5137408", "0.5121712", "0.50832874", "0.5057882", "0.5039405", "0.5024944", "0.5008803", "0.4989971", "0.49884006", "0.49882835", "0.49836254", "0.49619254", "0.4930912", "0.49206433", "0.4919308", "0.49101913", "0.49086672", "0.49033546", "0.48859376", "0.48789364", "0.48726854", "0.48543647", "0.48466092", "0.4841864", "0.48336485", "0.4832855", "0.48128116", "0.48075575", "0.4807415", "0.48062062", "0.48047435", "0.47916645", "0.47745648", "0.47709578", "0.4770886", "0.4769281", "0.4758891", "0.47583613", "0.4754191", "0.47460738", "0.47448137", "0.4744314", "0.47439498", "0.47357753", "0.47289553", "0.4718646", "0.47170427", "0.4704973", "0.46989164", "0.4697543", "0.46588817", "0.46545818", "0.4650983", "0.46463504", "0.46430233", "0.46421206", "0.46309924", "0.46185094", "0.46127295", "0.45997965", "0.45978552", "0.45945033", "0.45897222", "0.45885712", "0.45748752", "0.45597386", "0.45572382", "0.45552474", "0.45534638", "0.45402962", "0.45390642", "0.4535456", "0.45297515", "0.45283285", "0.45261484", "0.45165485", "0.4513062", "0.4512625", "0.45125526", "0.45049864", "0.44992116", "0.4495235", "0.44902363", "0.44878948", "0.44860315", "0.44718003", "0.44626796", "0.4458629", "0.4453454", "0.4451393", "0.44471237", "0.44467002", "0.44298723" ]
0.0
-1
handles rename of refs
@Nullable protected PsiElement processRef(PsiReference ref, String newName) { return ref.handleElementRename(newName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void objectRenamed(NamingEvent evt) throws RemoteException;", "void setRef(java.lang.String ref);", "public abstract void rename(String newName);", "public void rename(String n){\n name = n;\r\n }", "protected void renameAliasReference(String from, String to)\n {\n if(castor.getCastorRelationChoice().getOneToMany().getFromAlias().equals(from))\n castor.getCastorRelationChoice().getOneToMany().setFromAlias(to);\n \n if(castor.getCastorRelationChoice().getOneToMany().getToAlias().equals(from))\n castor.getCastorRelationChoice().getOneToMany().setToAlias(to);\n }", "protected abstract String getRefName();", "@Override\n\tpublic void rename(String name) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Override\n\tpublic void rename(String oldName, String newName) {\n\n\t}", "public void rename (String newName) throws Exception;", "public void setReferenceTypeName(String newname) throws ValidityException {\n if (this.type != FieldType.OBJECT) {\n throw new ValidityException(\"can't fix up a non-reference field!\");\n }\n String nname = \"L\" + newname.replace('.', '/') + \";\";\n this.classname.value = nname;\n }", "@Override\r\n\tpublic void updateName(int eno, String newName) {\n\r\n\t}", "public void rename()\n\t{\n\t\t// get the object within the node\n\t\tObject string = this.getUserObject();\n\n\t\t// should always be a string, given the constructor\n\t\tif (string instanceof String)\n\t\t{\n\t\t\tstring = JOptionPane.showInputDialog(\"Enter a New Name\");\n\n\t\t\tif (string != null && string instanceof String)\n\t\t\t{\n\t\t\t\tthis.setUserObject(string);\n\t\t\t\tthis.name = (String) string;\n\t\t\t}\n\t\t}\n\t}", "public void rename(GeoElement geo) {\n \t\tremove(geo);\n \t\tadd(geo);\n \t}", "@Override\n public void rename(Name oldName, Name newName) throws NamingException {\n validSupportName(oldName);\n validSupportName(newName);\n\n if (oldName == newName || oldName.equals(newName))\n return;\n String nn = newName.get(newName.size());\n\n\n }", "private RestNodeModel renameNode(ContentModel node)\n {\n String newName = node.getName() + \"_updated\";\n JsonObject renameJson = Json.createObjectBuilder().add(\"properties\",\n Json.createObjectBuilder().add(\"cm:name\", newName)).build();\n return restClient.authenticateUser(testUser).withCoreAPI().usingNode(node).updateNode(renameJson.toString());\n }", "@Override\n public void rename(String name) throws SQLException, ElementExistException {\n \n }", "public void rename(String newName)\n\t{\n\t\t// get the object within the node\n\t\tObject object = this.getUserObject();\n\n\t\tif (newName == null)\n\t\t\tnewName = StyleEditorUtility.DEFAULT_STYLE_NODE_NAME;\n\n\t\t// should always be a string, given the constructor\n\t\tif (object instanceof String)\n\t\t{\n\t\t\tobject = newName;\n\n\t\t\tif (object != null && object instanceof String)\n\t\t\t{\n\t\t\t\tthis.setUserObject(object);\n\t\t\t\tthis.name = (String) object;\n\t\t\t}\n\t\t}\n\t}", "void checkRename(Object oldId, Object newId) throws UPAException;", "public void rebind(Name name, Object obj) throws NamingException {\n }", "public final void setName(final ReferenceIdentifier name) {\n this.name = name;\n }", "protected void rename(String oldname, String newname) throws IOException { //TODO map this to the FileSystem\n\t\tthrow new IOException( \"not implemented\" ); //TODO map this to the FileSystem\n\t}", "String getObjectRefName();", "public void rename(String name){\n this.name = name;\n }", "public void rebind(String name, Remote ref) throws RemoteException;", "public void entityReference(String name);", "protected void renameNode( String workspaceName,\n NodeKey key,\n Path newPath,\n Segment oldSegment,\n Name primaryType,\n Set<Name> mixinTypes ) {\n\n }", "public void rebind(String name, Object obj) throws NamingException {\n }", "void setRef(int index, Ref value) throws SQLException;", "@Test\n public void testRcName() {\n int changeCnt[] = {0};\n String name[] = {null};\n mRC.getName(rcName -> {\n changeCnt[0]++;\n name[0] = rcName;\n });\n\n // check original name\n assertThat(changeCnt[0], is(1));\n assertThat(name[0], is(\"RC1\"));\n\n // check name change\n mRcCore.updateName(\"newName\");\n assertThat(changeCnt[0], is(2));\n assertThat(name[0], is(\"newName\"));\n\n // check name ref does not change when rc is removed\n mRcCore.destroy();\n assertThat(changeCnt[0], is(2));\n }", "public void hiliteByReference(String ref) {\n\t}", "public void renameField(String typeName, String oldFieldName, String newFieldName) {\n\t\tFieldNameRenamer renamer = buildFieldNameRenamer(typeName, oldFieldName, newFieldName);\n\t\tgetStateObject().accept(renamer);\n\t}", "public void onNameChange(String newName) {\n\t\t\n\t}", "public void renameTree(String oldName, String newName) throws DuplicateNameException;", "public void ref() {\n\n\t}", "public void setName(java.lang.String newName)\r\n{\r\n\tname = newName;\r\n}", "public GitRef getRef(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); }\n catch(Exception e) { throw new RuntimeException(e); }\n return ref!=null ? new GitRef(ref) : null;\n}", "public void renameField(String className, String name, String newName) \n\t{\n\t\tstoreViewState();\n\t\tproject.renameField(className, name, newName);\n\t\tcheckStatus();\n\t}", "private void rename(File file, String name) {\n\t\t\r\n\t}", "public void setName (String newName)\n {\n this.name = newName; \n }", "void removeHadithReferenceNo(Object oldHadithReferenceNo);", "void addHadithReferenceNo(Object newHadithReferenceNo);", "public void setName(String newName) {\n this.name = newName;\n }", "void rename(String name, boolean replace, IProgressMonitor monitor)\n\t\t\tthrows RodinDBException;", "private void setFileNameToReferenceNode(FMEditor fmEditor) {\n fmEditor.getDrawRectMap().values().stream().filter(drawNode -> drawNode.getFmNode().getRefuuid() != null)\n .forEach(drawNode -> editResourceService.getVMFile(drawNode.getFmNode().getRefuuid(), projectId, new AsyncCallback<VMFile>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(VMFile result) {\n if (result != null) {\n drawNode.getFmNode().setRefInfo(result.getName() + \".\" + result.getExtensionStr());\n\n editResourceService.getFileContent(drawNode.getFmNode().getRefuuid(), projectId, new AsyncCallback<byte[]>() {\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n BinaryResourceImpl r = new BinaryResourceImpl();\n ByteArrayInputStream bi = new ByteArrayInputStream(result);\n\n EPackage.Registry.INSTANCE.put(FMPackage.eNS_URI, FMPackage.eINSTANCE);\n FMRoot root = null;\n try {\n r.load(bi, EditOptions.getDefaultLoadOptions());\n root = (FMRoot) r.getContents().get(0);\n } catch (IOException e) {\n SC.warn(e.getMessage());\n }\n if (root.getNode() != null) {\n drawNode.getFmNode().setRefName(root.getNode().getName());\n } else {\n drawNode.getFmNode().setRefName(\"\");\n }\n drawNode.getDrawRect()\n .setTitle(drawNode.getFmNode().getName() + \":\" + drawNode.getFmNode().getRefName() + \"\\n(\" + drawNode.getFmNode().getRefInfo() + \")\");\n }\n });\n } else {\n drawNode.getFmNode().setRef(0);\n drawNode.getFmNode().setRefInfo(null);\n drawNode.getFmNode().setRefName(null);\n drawNode.getFmNode().setRefuuid(null);\n drawNode.getDrawRect().setTitle(drawNode.getFmNode().getName());\n }\n }\n }));\n }", "public void setName(String newName){\n name=newName;\n }", "public void rename( String newName ) {\n this.name = newName;\n }", "void setReference(String reference);", "@Override\n public boolean isRename() {\n return false;\n }", "FileNameReference createFileNameReference();", "public void setReference(Reference ref)\n {\n this.ref = ref;\n }", "public void setName(String newname) {\n name=newname;\n }", "public void rename(String title) {\n setTitle(title);\n xlList.setChanged();\n }", "@Override\n\tpublic void setRef(int parameterIndex, Ref x) throws SQLException {\n\t\t\n\t}", "private void setReference(String ref) {\n Set<String> allRefs = getAllReferenceNames();\n if (!allRefs.contains(ref) && allRefs.contains(\"chr\" + ref)) {\n ref = \"chr\" + ref;\n }\n currentReference = ref;\n Genome loadedGenome = GenomeController.getInstance().getGenome();\n setMaxRange(new Range(1, loadedGenome.getLength()));\n setRange(1, Math.min(1000, loadedGenome.getLength()));\n }", "@Override\n\tpublic void rename(String newName) {\n\t\tint lastDot = newName.lastIndexOf('.');\n\t\tif (lastDot == -1) {\n\t\t\tclsInfo.changeShortName(newName);\n\t\t\treturn;\n\t\t}\n\t\tif (isInner()) {\n\t\t\taddWarn(\"Can't change package for inner class: \" + this + \" to \" + newName);\n\t\t\treturn;\n\t\t}\n\t\t// change class package\n\t\tString newPkg = newName.substring(0, lastDot);\n\t\tString newShortName = newName.substring(lastDot + 1);\n\t\tif (changeClassNodePackage(newPkg)) {\n\t\t\tclsInfo.changePkgAndName(newPkg, newShortName);\n\t\t} else {\n\t\t\tclsInfo.changeShortName(newShortName);\n\t\t}\n\t}", "java.lang.String getRef();", "public void setName(String newName){\n name = newName;\n }", "public void renameVariable(String oldVariableName, String newVariableName) {\n\t\tVariableNameRenamer renamer = buildVariableNameRenamer(oldVariableName, newVariableName);\n\t\tgetStateObject().accept(renamer);\n\t}", "public void setReference(String reference);", "public void changePathNames(String oldPathName, String newPathName) {\n\t\t// Iterate though imgToTag map to update tagToImg map\n\t\tif(imgToTag.containsKey(oldPathName) && !imgToTag.containsKey(newPathName) && oldPathName != newPathName){\n\t\t\tfor (String tag : imgToTag.get(oldPathName)) {\n\t\t\t\ttagToImg.get(tag).remove(oldPathName);\n\t\t\t\ttagToImg.get(tag).add(newPathName);\n\t\t\t}\n\t\t\timgToTag.put(newPathName, imgToTag.get(oldPathName));\n\t\t\timgToTag.remove(oldPathName);\n\t\t}\n\t}", "private void renameMapNames () {\n if (mappingNum == 0) {\n mapNames = null;\n return;\n }\n this.mapNames = new String[mappingNum];\n for (int i = 0; i < mappingNum; i++) {\n mapNames[i] = GBSHDF5Constants.MAPBASE + this.getThreeFigureString(i);\n }\n }", "private void setName(){\r\n\t\tString tagString = new String();\r\n\t\tfor (String k : tags.keySet()){\r\n\t\t\ttagString += \"@\" + k;\r\n\t\t}\r\n\t\tString newName = originalName + tagString +\".\"+ extension;\r\n\t\tif (!newName.equals(name)){\r\n\t\t\tremovePrevNames(newName); //if the new name is a previous name\r\n\t\t\taddPrevNames(name);\r\n\t\t\tupdateLog(newName);\r\n\t\t\tname = newName;\r\n\t\t\t//notify the tag observer\r\n\t\t\tsetChanged();\r\n\t\t\tnotifyObservers();\r\n\t\t\tclearChanged();\r\n\t\t}\r\n\t}", "public void changeName(String newName){\n\t\tname = newName;\n\t}", "private void storeObject(String name, Object obj)\r\n {\r\n objectNames.put(obj, name);\r\n\r\n if (!nameObjects.containsKey(name))\r\n nameObjects.put(name, new WeakReference(obj));\r\n }", "Object visitReference(ReferenceNode node, Object state);", "public String getPlainName() { return getName().replace(\"refs/heads/\", \"\").replace(\"refs/remotes/\", \"\"); }", "public void changeName(String name) {\n this.treeName = name;\n }", "public void scanCtReference(CtReference reference) {\n ((CtReference) (other)).setSimpleName(reference.getSimpleName());\n super.scanCtReference(reference);\n }", "public TestRenameFieldRefactoring(String name) {\r\n super(name);\r\n }", "@Override\n\tpublic void setName(String name) {\n\t\theldObj.setName(name);\n\t}", "public void setOriginalRef(Reference originalRef) {\n this.originalRef = originalRef;\n }", "public void rename(Name oldName, Name newName) throws NamingException {\n }", "public void renameClassName(String oldClassName, String newClassName) {\n\t\tClassNameRenamer renamer = buildClassNameRenamer(oldClassName, newClassName);\n\t\tgetStateObject().accept(renamer);\n\t}", "public void setRefnum(java.lang.String refnum) {\n this.refnum = refnum;\n }", "public void _patchReferencesInternal(SL_Obj fromObjArg) {\n SATableReadCapabilityAttributesExtension fromObj = (SATableReadCapabilityAttributesExtension)fromObjArg;\n\n // Get the map of old->new references\n Map<SL_Obj, SL_Obj> map = rootObj.get_patchRefsMap();\n\n SL_Obj wkObj;\n super._patchReferencesInternal(fromObj);\n\n\n }", "public void doChangeAlbumName()\n/* */ {\n/* 73 */ AlbumDTO changed = this.galleryManager.saveAlbum(this.selectedAlbum);\n/* 74 */ for (AlbumDTO dto : this.albumList)\n/* */ {\n/* 76 */ if (dto.getId().equals(changed.getId()))\n/* */ {\n/* 78 */ dto.setName(changed.getName());\n/* 79 */ break;\n/* */ }\n/* */ }\n/* */ }", "public void rename(String newName) {\n\t\tname = newName;\n\t}", "private void removeFileReferences(String file_name) {\n\n\t\t//\n\t\t// first get file id\n\t\t//\n\t\tlong fid = getFileId(file_name);\n\n\t\t//\n\t\t// convert to string\n\t\t//\n\t\tString file_id = Long.toString(fid);\n\n\t\t//\n\t\t// first get all associated tags\n\t\t//\n\t\tCursor cursor = m_db.query(MAP_TABLE_NAME,\n\t\t\t\tnew String[] { MAP_FIELD_TAG }, MAP_FIELD_FILE + \"=?\",\n\t\t\t\tnew String[] { file_id }, null, null, null);\n\n\t\tif (cursor.moveToFirst() == false) {\n\t\t\t//\n\t\t\t// no entries\n\t\t\t//\n\t\t\tLogger.d(\"DBManager::removeFileReferences> file \" + file_name\n\t\t\t\t\t+ \" has no references\");\n\t\t\tcursor.close();\n\t\t\treturn;\n\t\t}\n\n\t\tdo {\n\t\t\t//\n\t\t\t// get current tag\n\t\t\t//\n\t\t\tString current_tag = cursor.getString(0);\n\n\t\t\t//\n\t\t\t// get current tag id and reference count\n\t\t\t//\n\t\t\tCursor tag_cursor = m_db.query(TAG_TABLE_NAME, new String[] {\n\t\t\t\t\tTAG_FIELD_NAME, TAG_FIELD_USAGE }, TAG_FIELD_ID + \"=?\",\n\t\t\t\t\tnew String[] { current_tag }, null, null, null);\n\t\t\tif (tag_cursor.moveToFirst() == false) {\n\t\t\t\t//\n\t\t\t\t// no entries\n\t\t\t\t//\n\t\t\t\tLogger.e(\"DBManager::removeFileReferences file \"\n\t\t\t\t\t\t+ \" references non existant \" + current_tag);\n\t\t\t\ttag_cursor.close();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\t\t\t\t//\n\t\t\t\t// there should be actually only one result, but don't expect a\n\t\t\t\t// database to be in good state\n\t\t\t\t//\n\t\t\t\tint reference_count = tag_cursor.getInt(1) - 1;\n\t\t\t\tString tag_name = tag_cursor.getString(0);\n\n\t\t\t\tif (reference_count > 0) {\n\t\t\t\t\t//\n\t\t\t\t\t// update tag reference\n\t\t\t\t\t//\n\t\t\t\t\tsetTagReference(tag_name, reference_count);\n\t\t\t\t} else {\n\t\t\t\t\t//\n\t\t\t\t\t// delete tag\n\t\t\t\t\t//\n\t\t\t\t\tlong affected = m_db.delete(TAG_TABLE_NAME, TAG_FIELD_ID\n\t\t\t\t\t\t\t+ \"=?\", new String[] { current_tag });\n\t\t\t\t\tLogger.d(\"Deleted tag \" + tag_name + \" deleted: \"\n\t\t\t\t\t\t\t+ affected);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (tag_cursor.moveToNext());\n\n\t\t\t//\n\t\t\t// close tag cursor\n\t\t\t//\n\t\t\ttag_cursor.close();\n\n\t\t} while (cursor.moveToNext());\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\t//\n\t\t// now remove all entries from the mapping table\n\t\t//\n\t\tm_db.delete(MAP_TABLE_NAME, MAP_FIELD_FILE + \"=?\",\n\t\t\t\tnew String[] { Long.toString(fid) });\n\t}", "public void setName(String name)\n/* */ {\n/* 84 */ this._name = name;\n/* */ }", "public void objectChanged(NamingEvent evt) throws RemoteException;", "private Ref handleRef() throws XMLStreamException{\n String name = reader.getAttributeValue(0);\n nextTag();\n nextTag();\n return new Ref(definedGrammar, name);\n }", "@Override\n public void focusLost( FocusEvent arg0 ) {\n String newname = text.getText();\n if ( renameTransformation( fname, newname, frepdir ) ) {\n ti.setText( newname );\n }\n text.dispose();\n }", "public void rename(String Path, String name, String newName);", "public void setRename( String rename ) {\n rename_ = rename;\n }", "@Override\n public void focusLost( FocusEvent arg0 ) {\n String newname = text.getText();\n if ( renameDatabase( name, newname ) ) {\n ti.setText( newname );\n }\n text.dispose();\n }", "public void rename(String oldName, String newName) throws NamingException {\n }", "public void setName(String newName){\n\n //assigns the value newName to the name field\n this.name = newName;\n }", "protected static ImageFile revertToOldName(String name, ImageFile img)throws IOException\n {\n String tagString = \"\";\n if(name.contains(\"@\"))\n {\n tagString = \" \" + name.substring(name.indexOf('@'), name.indexOf(\".\"));\n }\n else\n {\n tagString = \" \" + name.substring(0, name.indexOf(\".\"));\n }\n StringTokenizer st = new StringTokenizer(tagString,\" @\");\n ArrayList<Tag> tags = new ArrayList<Tag>();\n ArrayList<Tag> actualTags = new ArrayList<Tag>();\n\n while (st.hasMoreElements())\n {\n tags.add(new Tag(st.nextToken()));\n }\n\n for (Tag tag : tags)\n {\n for (Tag currTag : Log.allTags)\n {\n if (tag.getName().equals(currTag.getName()))\n {\n actualTags.add(currTag);\n }\n }\n }\n\n return rename(img, actualTags);\n }", "public void setName(java.lang.String newName) {\n\tname = newName;\n}", "public void setName(java.lang.String newName) {\n\tname = newName;\n}", "public void setName(java.lang.String newName) {\n\tname = newName;\n}", "public void setName(String newName) { throw new NotImplementedException(\"Variable names are final!\"); }", "@Override\n public void focusLost( FocusEvent arg0 ) {\n String newname = text.getText();\n if ( renameJob( name, repdir, newname ) ) {\n ti.setText( newname );\n }\n text.dispose();\n }", "public void setName(String newname)\n {\n name = newname;\n \n }", "public static native void rename(String oldpath, String newpath)\n throws IOException;", "@Override\n public void caseARenamingExp(ARenamingExp node)\n {\n inARenamingExp(node);\n if(node.getRenameComp() != null)\n {\n node.getRenameComp().apply(this);\n }\n outARenamingExp(node);\n }", "@Override\r\n public void replaceIdentifierReferences( String oldId, String newId ) {\n for( GlobalStateDataControl globalStateDataControl : globalStatesDataControlList )\r\n globalStateDataControl.replaceIdentifierReferences( oldId, newId );\r\n }", "public Object resolveReference( Object name ) {\n throw new UnsupportedOperationException( Messages.getErrorString( \"PMSFormulaContext.ERROR_0001_INVALID_USE\" ) ); //$NON-NLS-1$\n }", "private void renameProduct(int id, String newName)\n {\n manager.renameProduct(id, newName);\n }", "public void updateName(String newName)\r\n {\r\n name = newName;\r\n }" ]
[ "0.63674927", "0.61798555", "0.6177686", "0.6148375", "0.61216694", "0.6104507", "0.6101621", "0.6086666", "0.60538054", "0.6016408", "0.5990092", "0.5956701", "0.59539545", "0.5832281", "0.5803434", "0.5764093", "0.5734359", "0.5705184", "0.56750846", "0.5668941", "0.5658048", "0.56578076", "0.56448096", "0.56432796", "0.56086624", "0.5601242", "0.56000096", "0.55955786", "0.559293", "0.5587335", "0.5584059", "0.55748993", "0.5563499", "0.55565864", "0.5545677", "0.551728", "0.5513016", "0.55103433", "0.5508982", "0.5507316", "0.5487335", "0.546978", "0.5459434", "0.54519755", "0.544839", "0.5442775", "0.5426759", "0.54084647", "0.5399945", "0.53911686", "0.5388219", "0.5385286", "0.53804773", "0.53660935", "0.5364862", "0.53645456", "0.5342291", "0.5339842", "0.53391707", "0.5332958", "0.53293985", "0.53217626", "0.5319849", "0.5315736", "0.531452", "0.53135586", "0.5308598", "0.5307985", "0.5299082", "0.5295213", "0.52946776", "0.5293327", "0.5288452", "0.52822924", "0.5278195", "0.52638185", "0.52573586", "0.5254863", "0.523838", "0.52262264", "0.52240956", "0.52237153", "0.5220179", "0.5215945", "0.5215008", "0.5212851", "0.5212427", "0.52072173", "0.5201656", "0.5201656", "0.5201656", "0.51982", "0.51963973", "0.51944906", "0.51864064", "0.5186305", "0.51668036", "0.5166722", "0.51665884", "0.5160834" ]
0.7029953
0
Construct with diameter and growth increment, in micrometers.
public Cell(int diameterInMicrometers, int growthIncrementInMicrometers) { if (diameterInMicrometers < 1 || diameterInMicrometers > 41 || growthIncrementInMicrometers < 1 || growthIncrementInMicrometers > 6 ) { throw new IllegalArgumentException("Bacterium size must start between 0 and 40 " + "and growth increment between 0 and 5"); } this.diameterInMicrometers = diameterInMicrometers; //growth increment can never be changed after construction this.growthIncrementInMicrometers = growthIncrementInMicrometers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "LengthUnit(double metres) {\n/* 24 */ this.metres = metres;\n/* 25 */ this.dx = new Dx(1.0D, this);\n/* */ }", "Meter createMeter();", "public void grow() {\n this.diameterInMicrometers += growthIncrementInMicrometers;\n if (this.diameterInMicrometers > 1000) throw new Error(\"TestTube will explode in 5 seconds\");\n }", "public int getDiameterInMicrometers() {\n return diameterInMicrometers;\n }", "Millimeter createMillimeter();", "public Thermometer(Person person){\r\n super(person);\r\n temperature = new MeasureUnit(\"Celsius\",\"º C\", 1);\r\n }", "@Override\n protected AngularSpeed createMeasurement(double value, AngularSpeedUnit unit) {\n return new AngularSpeed(value, unit);\n }", "private void grow() {\n\t\tif (_growthRatio > 1 && (_age & 0x07) == 0x07 && alive && _energy >= _mass/10) {\n\t\t\t_growthRatio--;\n\t\t\tdouble m = _mass;\n\t\t\tdouble I = _I;\n\t\t\tsymmetric();\n\t\t\t// Cynetic energy is constant. If mass changes, speed must also change.\n\t\t\tm = FastMath.sqrt(m/_mass);\n\t\t\tdx *= m;\n\t\t\tdy *= m;\n\t\t\tdtheta *= FastMath.sqrt(I/_I);\n\t\t\thasGrown = 1;\n\t\t} else {\n\t\t\tif (_growthRatio < 15 && _energy < _mass/12) {\n\t\t\t\t_growthRatio++;\n\t\t\t\tdouble m = _mass;\n\t\t\t\tdouble I = _I;\n\t\t\t\tsymmetric();\n\t\t\t\t// Cynetic energy is constant. If mass changes, speed must also change.\n\t\t\t\tm = FastMath.sqrt(m/_mass);\n\t\t\t\tdx *= m;\n\t\t\t\tdy *= m;\n\t\t\t\tdtheta *= FastMath.sqrt(I/_I);\n\t\t\t\thasGrown = -1;\n\t\t\t} else\n\t\t\t\thasGrown = 0;\n\t\t}\n\t}", "@Test\n public void youCanCreateATimeSeriesFromPlatesFromACount() {\n\n VertexLabel xLabel = new VertexLabel(\"x\");\n VertexLabel xPreviousLabel = PlateBuilder.proxyFor(xLabel);\n VertexLabel yLabel = new VertexLabel(\"y\");\n\n Vertex<DoubleTensor> initialX = ConstantVertex.of(1.);\n List<Integer> ys = ImmutableList.of(0, 1, 2, 1, 3, 2);\n\n Plates plates = new PlateBuilder<Integer>()\n .withInitialState(xLabel, initialX)\n .count(10)\n .withFactory((plate) -> {\n DoubleVertex xPrevious = new DoubleProxyVertex(xPreviousLabel);\n DoubleVertex x = new ExponentialVertex(xPrevious);\n IntegerVertex y = new PoissonVertex(x);\n plate.add(xPrevious);\n plate.add(xLabel, x);\n plate.add(yLabel, y);\n })\n .build();\n\n\n Vertex<DoubleTensor> previousX = initialX;\n\n for (Plate plate : plates) {\n Vertex<DoubleTensor> xPreviousProxy = plate.get(xPreviousLabel);\n Vertex<DoubleTensor> x = plate.get(xLabel);\n Vertex<DoubleTensor> y = plate.get(yLabel);\n assertThat(xPreviousProxy.getParents(), contains(previousX));\n assertThat(x.getParents(), contains(xPreviousProxy));\n assertThat(y.getParents(), contains(x));\n previousX = x;\n }\n }", "AbstractBaseWheel(BigDecimal size){\n this.diameter = size;\n }", "public static double computeDiameter(int wireGauge)\r\n{ \r\n return 0.127 * Math.pow(92.0, (36.0 - wireGauge) / 39.0); \r\n}", "public Unit<Length> kilometre() {return kilometre;}", "MeterProvider create();", "public static Velocity newMicrometersPerSecondValue()\n\t{\n\t\treturn new Velocity(0.0, VelocityUnit.MICROMETERS_PER_SECOND);\n\t}", "public abstract Quantity<Q> create(Number value, Unit<Q> unit);", "public void configureDigitalMeter()\n {\n\t\tsetFrameType(RectangularFrameType.RoundedSideThinRim);\n\t\tsetBackground(Color.black);\n\t\tsetCharacterType(DigitalCharacterType.Segment7Trapezoid);\n setCharacterCount(10);\n\t\tsetForeground(Color.WHITE);\n\t\tsetDimmedBrush(Color.black);\n\t\tsetCharacterOverflowAlignment(DigitalCharacterOverflowAlignment.Right);\n setCharacterPadding(1);\n setCharacterSpacing(1);\n\t\tsetItalic(false);\n }", "public Cylinder() {\n\t\tthis(1.0);\n\t}", "@Override\n public void construct() {\n Metric metric =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom earthSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n @Override\n public String name() {\n return EARTH_KEY;\n }\n };\n Symptom moonSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return MOON_KEY;\n }\n };\n\n Metric skyLabCpu =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom skyLabsSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return SKY_LABS_KEY;\n }\n };\n\n addLeaf(metric);\n addLeaf(skyLabCpu);\n earthSymptom.addAllUpstreams(Collections.singletonList(metric));\n moonSymptom.addAllUpstreams(Collections.singletonList(earthSymptom));\n skyLabsSymptom.addAllUpstreams(\n new ArrayList<Node<?>>() {\n {\n add(earthSymptom);\n add(moonSymptom);\n add(skyLabCpu);\n }\n });\n\n metric.addTag(LOCUS_KEY, EARTH_KEY);\n earthSymptom.addTag(LOCUS_KEY, EARTH_KEY);\n moonSymptom.addTag(LOCUS_KEY, MOON_KEY);\n skyLabCpu.addTag(LOCUS_KEY, SKY_LABS_KEY);\n skyLabsSymptom.addTag(LOCUS_KEY, SKY_LABS_KEY);\n }", "public Unit<Length> metre() {return metre;}", "public Circle(double r)\n {\n setRad(r);\n\n }", "public static double computeCopperWireResistance(double length, double diameter)\r\n{ \r\n //Copper resistivity in Ohms mm\r\n final double COPPER_RESISTIVITY = 1.678E-5;\r\n final double INCHES_TO_MM_CONVERTER = 25.4;\r\n \r\n //Convert length in inches to mm\r\n length = length * INCHES_TO_MM_CONVERTER; \r\n \r\n return (4.0 * COPPER_RESISTIVITY * length) / (Math.PI * Math.pow(diameter, 2.0));\r\n \r\n}", "public DimensionType build() {\n return new DimensionType(fixedTime, hasSkylight, hasCeiling, ultraWarm, natural, coordinateScale, bedWorks,\n respawnAnchorWorks, minY, height, logicalHeight, infiniburn, effectsLocation, ambientLight,\n new DimensionType.MonsterSettings(piglinSafe, hasRaids, UniformInt.of(0, 7), 0));\n }", "Builder height(VariableAmount height);", "public static double millimetersOfMercuryToAtmosphere(double num) { return (num/760); }", "public Fraction(){\n\t\tthis.numer = 1;\n\t\tthis.denom = 1;\n\t}", "public AdaDelta() {\n this(0.95,1e-6);\n }", "public DiscMesh() {\n this(1f, 25);\n }", "private OFMeterMod meterBuild(OFMeterModCommand command, int meterId, long rate, long burst, boolean useKBPS,\n\t\t\t\tboolean useStats) {\n\t\t\tMeter meter = new Meter();\n\t\t\tmeter.setId(meterId);\n\t\t\tmeter.getBands().add(new Band(rate, burst));\n\t\t\tmeter.getFlags().add((useKBPS ? OFMeterFlags.KBPS : OFMeterFlags.PKTPS));\n\t\t\tif (useStats)\n\t\t\t\tmeter.getFlags().add(OFMeterFlags.STATS);\n\t\t\tif (burst != 0)\n\t\t\t\tmeter.getFlags().add(OFMeterFlags.BURST);\n\n\t\t\treturn meterBuild(command, meter);\n\t\t}", "public Rational() {\n\tnumerator = 0;\n\tdenominator = 1;\n }", "Quantity createQuantity();", "Circles(LX lx) {\n super(lx);\n addModulator(wave360).start();\n addModulator(wave100).start();\n addParameter(waveSlope);\n addParameter(speedParam);\n\n for (BaseCube cube : model.baseCubes) {\n if (cube.z < minz) {minz = cube.z;}\n if (cube.z > maxz) {maxz = cube.z;}\n }\n }", "public Bicycle(double miles, double emissions)\n {\n this.distance = miles; \n this.emissionFactor = emissions; \n }", "public void create_crystal() {\n\t\tcrystalQuantity[1] += (1+create_modifier);\n\t\tautomerge();\n\t\tcollection();\n\t}", "public Kilometers(BigDecimal numUnits) { super(numUnits); }", "public Clorus (double e) {\n super(\"clorus\");\n if (e < 0) {\n energy = 0;\n }else { energy = e;}\n r = 0;\n g = 0;\n b = 0;\n }", "public Units(final SystemOfUnits system) {\n metre = system.getUnit(Length.class);\n radian = system.getUnit(Angle.class);\n second = system.getUnit(Time.class);\n pascal = system.getUnit(Pressure.class);\n one = getDimensionless(system);\n kilometre = metre .multiply(1000);\n foot = metre .multiply(0.3048);\n footSurveyUS = metre .multiply(12 / 39.37);\n degree = radian.multiply(Math.PI / 180);\n grad = radian.multiply(Math.PI / 200);\n arcSecond = radian.multiply(Math.PI / (180*60*60));\n microradian = radian.divide(1E6);\n day = second.multiply(24*60*60);\n hectopascal = pascal.multiply(100);\n ppm = one .divide(1000000);\n }", "public void setDiameter(int diameter) {\n circleDiameter = diameter;\n\n }", "Inch createInch();", "Multiply createMultiply();", "public ScaleInformation() {\n\t\tthis(0.0, 0.0, 800.0, 540.0, 800, 540);\n\t}", "public Circle() {\n this( 1.0 ); \n }", "public HiloM() { }", "public Clorus replicate() {\n Clorus p2 = new Clorus(energy/2.0);\n energy /= 2;\n return p2;\n }", "private void newCircle()\n {\n setMinimumSize(null);\n\n //Generate a new circle\n panel.generateNewCircle();\n\n //Calculate the circle properties and setup the text area with their values\n generateTextArea();\n\n //Repack the frame to fit everything perfectly\n pack();\n\n setMinimumSize(getSize());\n }", "public Submarine() {\n\t\tsuper(size);\n\t}", "@Override\n\tpublic int newtomMeterTorque() {\n\t\treturn 0;\n\t}", "public Fraction(){\n numerator = 0;\n denominator = 1;\n }", "public float sizeMultiplier();", "public void update() { \r\n // create container\r\n Element container = createContainer(root.actual(), name, \r\n wiz.getTotalWidth(), wiz.getTotalHeight());\r\n \r\n if (root.isType(OBJECTS)) {\r\n setAttributeIfMissing(container, POS_X, \"0\");\r\n setAttributeIfMissing(container, POS_Y, \"0\"); \r\n }\r\n \r\n // create background circle\r\n int startAng = wiz.getStartAngle();\r\n int endAng = wiz.getEndAngle();\r\n Element ellipse; \r\n ellipse = createEllipse(container, \"background\", wiz.getBackgroundWidth(), wiz.getBackgroundWidth(),\r\n startAng, endAng,\r\n wiz.getFillAttribute(), wiz.getLineAttribute(), !wiz.isCuttedCircle()); \r\n setIncludeAttributes(ellipse, (wiz.getTotalWidth() - wiz.getBackgroundWidth()) / 2, \r\n (wiz.getTotalHeight() - wiz.getBackgroundWidth()) / 2);\r\n \r\n //create meter \r\n int minVal = (int) (wiz.getMinValue() / wiz.getScale()) - wiz.getOffset();\r\n int maxVal = (int) (wiz.getMaxValue() / wiz.getScale()) - wiz.getOffset();\r\n Element meter = createMeter(container, \"metercomp\", wiz.getMeterWidth(), \r\n startAng, endAng, minVal, maxVal,\r\n wiz.getValue(), wiz.getTicks(), wiz.isClockwise(),\r\n wiz.getNeedleColor(), wiz.getArcAndTickColor(), wiz.getNumberReference());\r\n setIncludeAttributes(meter, (wiz.getTotalWidth() - wiz.getMeterWidth()) / 2,\r\n (wiz.getTotalHeight() - wiz.getMeterWidth()) / 2);\r\n \r\n // create numbers\r\n if (startAng > endAng) startAng -= 360;\r\n if (wiz.isClockwise()) {\r\n int temp = startAng;\r\n startAng = endAng;\r\n endAng = temp;\r\n }\r\n Element fontElement = root.getModel().getElementByName(wiz.getFontAttribute());\r\n int fontWidth = (int) BitmapFont.nameToDimension(fontElement.getAttribute(FONT_SIZE)).getWidth();\r\n int fontHeight = (int) BitmapFont.nameToDimension(fontElement.getAttribute(FONT_SIZE)).getHeight();\r\n int i;\r\n for (i = 0; i < wiz.getNumbers() && wiz.getNumbers() > 1; i++) {\r\n int value = wiz.getMinValue() + i*(wiz.getMaxValue()-wiz.getMinValue()) / (wiz.getNumbers()-1); \r\n String valueString = Integer.toString(value);\r\n int stringWidth = (fontWidth * valueString.length());\r\n \r\n Element number = createString(container, \"label\" + i, fontWidth * valueString.length(), \r\n fontHeight, valueString, wiz.getFontAttribute());\r\n \r\n double ang = Math.toRadians(startAng + i * (endAng - startAng) / (wiz.getNumbers() - 1));\r\n double rad = wiz.getMeterWidth() / 2 + wiz.getNumberDistance();\r\n int x = wiz.getTotalWidth() / 2 + (int) (Math.cos(-ang) * rad) - stringWidth / 2;\r\n int y = wiz.getTotalHeight() / 2 + (int) (Math.sin(-ang) * rad) - fontHeight / 2;\r\n setIncludeAttributes(number, x, y);\r\n }\r\n \r\n // labelX, X >= i -> poistetaan\r\n removeExtraElements(container, \"label\", i);\r\n \r\n // create a numberfield\r\n int extraSpace = wiz.getOffset() < 0 ? 1 : 0;\r\n int nroWidth = fontWidth * (Integer.toString(wiz.getMaxValue()).length() + extraSpace);\r\n Element numberfield = createNumber(container, \"number\", nroWidth, fontHeight, wiz.getValue(), \r\n wiz.getNumberReference(), wiz.getFontAttribute(), wiz.getOffset(), wiz.getScale());\r\n setIncludeAttributes(numberfield, (wiz.getTotalWidth() - nroWidth/*meterWizard.getMeterWidth()*/) / 2, \r\n wiz.getTotalHeight() / 2 + wiz.getMeterWidth() / 4);\r\n \r\n // create heading\r\n String text = wiz.getHeading();\r\n Element heading = createString(container, \"title\", fontWidth*text.length(), fontHeight, text, wiz.getFontAttribute());\r\n setIncludeAttributes(heading, (wiz.getTotalWidth() - fontWidth * text.length()) / 2, \r\n wiz.getTotalHeight() / 2 - wiz.getMeterWidth() / 4);\r\n \r\n // moves the attribute-objects to include objects with roles\r\n // System.out.println(\"finalizing...\");\r\n // Tools.createRoles(container);\r\n }", "@Override\n public long generateNewContractDuration(long size) {\n return new Random().nextInt(5) + 1 + (size / 1000000);\n }", "public Fraction(long numerator){\n this.numerator = (int)numerator;\n this.denominator = 1;\n }", "public Duration() {\n this(0, 0, 0, 0, 0, 0.0);\n }", "public void setUnit(Length units) {\n unit = units;\n }", "public static Velocity newMetersPerSecondValue()\n\t{\n\t\treturn new Velocity(0.0, VelocityUnit.METERS_PER_SECOND);\n\t}", "public double getResult(){\n double x;\n x= (3+Math.sqrt(9-4*3*(1-numberOfStrands)))/(2*3);\n if(x<0){\n x= (3-Math.sqrt(9-(4*3*(1-numberOfStrands))))/6;\n\n }\n numberOfLayers=(float) x;\n diameter=((2*numberOfLayers)-1)*strandDiameter;\n phaseSpacing=(float)(Math.cbrt(ab*bc*ca));\n\n netRadius=diameter/2;\n\n\n\n //SGMD calculation\n float prod=1;\n for(int rand=0;rand<spacingSub.size();rand++){\n prod*=spacingSub.get(rand);\n }\n\n //SGMD calculation\n sgmd=Math.pow((Math.pow(netRadius,subconductors)*prod*prod),1/(subconductors*subconductors));\n capacitance=((8.854e-12*2*3.14)/Math.log(phaseSpacing/sgmd));\n Log.d(\"How\",\"phase spacing:\"+phaseSpacing+\" sgmd=\"+sgmd);\n return capacitance*1000;\n\n\n }", "public static Velocity newMicrometersPerSecondValue(Double new_val)\n\t{\n\t\treturn new Velocity(new_val, VelocityUnit.MICROMETERS_PER_SECOND);\n\t}", "public Size(double width, double height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n }", "public Fraction(int numerator){\n this.numerator = numerator;\n this.denominator = 1;\n }", "public Circle(double jejari){\r\n\t\t// this();//panggil default constructor\r\n\t\t this.jejari = jejari;\r\n\t\t x = 5;\r\n\t\t// this(jejari, 59); //panggil constructor 2 parameter\r\n\t\tbilObjekWujud++;\r\n\t}", "public LEDMeter() {\r\n\t\t\r\n\t\tthis(13, 100, \"LED Meter\", 50);\r\n\t}", "private void addMeter(MetricsRecordBuilder builder, String name, String desc, long count,\n double meanRate, double oneMinuteRate, double fiveMinuteRate, double fifteenMinuteRate) {\n builder.addGauge(Interns.info(name + \"_count\", EMPTY_STRING), count);\n builder.addGauge(Interns.info(name + \"_mean_rate\", EMPTY_STRING), convertRate(meanRate));\n builder.addGauge(Interns.info(name + \"_1min_rate\", EMPTY_STRING), convertRate(oneMinuteRate));\n builder.addGauge(Interns.info(name + \"_5min_rate\", EMPTY_STRING), convertRate(fiveMinuteRate));\n builder.addGauge(Interns.info(name + \"_15min_rate\", EMPTY_STRING),\n convertRate(fifteenMinuteRate));\n }", "public static AngularVelocity newDegreePerSecondValue()\n\t{\n\t\treturn new AngularVelocity(0.0, AngularVelocityUnit.DEGREES_PER_SEC);\n\t}", "public Model() {\n operation = new DecimalOperation();\n base = 10;\n newnum = true;\n memory = new Stack<>();\n }", "public void setGrowIncrement(int inc) { growInc = inc; }", "LengthScalarMultiply createLengthScalarMultiply();", "public abstract float getMass();", "public NoiseCalculator(double wavelength, double offset) {\n this(wavelength, offset, 1.0);\n }", "public Momentum() {\r\n m1 = m2 = v1 = v2 = p1 = p2 = comx = cv = 0.0;\r\n xp1 = 0.0;\r\n xp2 = 900.0;\r\n m1 = 2.0;\r\n m2 = 1.0;\r\n v1 = 1.0;\r\n v2 = -1.0;\r\n\r\n //m1 = m2 = 1.0;\r\n //v1 = 2.0;\r\n //v2 = -4.0;\r\n d = dc = 8.0;\r\n }", "private double genMultiplier() {\n return (random.nextInt(81) + 60)/100.0;\n }", "public Rational() {\n\t\tthis(1,1);\n\t}", "private void doCircle()\n\t{\n\t\tubisenseData = new UbisenseMockupData();\n\t\tDecimalFormat df = new DecimalFormat(\"#0,00\");\n\n\t\telapsedTime = 0;\n\t\t\n\t\tubisenseData.setTagID(Helper.DEFAULT_TAG_ID);\n\t\tubisenseData.setUnit(Helper.UBISENSE_UNIT);\n\t\tubisenseData.setOntology(Helper.LP_ONTOLOGY_URL);\n\t\tubisenseData.setVersion(Helper.UBISENSE_VERSION);\n\t\tubisenseData.setId(\"\");\n\t\tubisenseData.setSendTime(sendTime);\n\n\t\tlong millis = startDate.getMillis();\n\t\tmillis += offset.toStandardDuration().getMillis();\n//\t\tmillis += parentOffset.toStandardDuration().getMillis();\n\t\t\n\t\t//Radianten des Winkels berechnen\n\t\tdouble radiant = Math.toRadians(arc);\n\t\t\n\t\t// Distanz d berechnen, die auf dem Kreis zurückgelegt werden soll\n\t\tdouble d = Math.PI * radius * (arc / 180);\n\t\t\n\t\t// Zeit t [s] berechnen, die für die Distanz d unter gegebener Geschwindigkeit benötigt wird.\n\t\tdouble t = d / toolSpeed;\n\t\tdouble steps = Math.ceil(t) +1;\n\n\t\t//Startkoordinaten berechnen\n\t\tint startX, startY;\n\t\tstartX = x1;\n\t\tstartY = y1 + radius;\n\t\t\n\t\twhile(steps > 0 && !terminate)\n\t\t{\n\t\t\tdouble x,y, currentTime=0, currentArc = 0;\n\t\t\tif (t != 0)\n\t\t\tcurrentTime = elapsedTime / t;\n\n\t\t\tcurrentArc = radiant * currentTime;\n\t\t\t\n\t\t\tx = (startX - x1) * Math.cos(currentArc) - (startY - y1) * Math.sin(currentArc) + x1;\n\t\t\ty = (startX - x1) * Math.sin(currentArc) + (startY - y1) * Math.cos(currentArc) + y1;\n\n\t\t\tubisenseData.setPosition(new Point3D(\tDouble.parseDouble(df.format(x)),\n\t\t\t \tDouble.parseDouble(df.format(y)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t1.6));\n\t\t\tubisenseData.setId(String.valueOf(Helper.getRandomInt()));\n\t\t\tubisenseData.setTime(millis + (long) (elapsedTime*SLEEP_INTERVAL));\n\t\t\t\n\t\t\tEntryEvent event = new EntryEvent(this);\n\t\t\tnotifyListeners(event);\n\t\t\telapsedTime++;\n\t\t\tif (elapsedTime > t)\n\t\t\t\telapsedTime = t;\n\t\t\t\n\t\t\tsteps--;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (speed > 0)\n\t\t\t\t\tThread.sleep(SLEEP_INTERVAL/speed);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "NumarAndDenom Spigot_Level_2(int startVal, int increment, int numTimes)\n\t{\n\t\t\t\t\n\t\tBigDecimal totalNumar = new BigDecimal(0.0);\n\t\tBigDecimal totalDenom = new BigDecimal(1.0);\n\n\t\tBigDecimal sixTeen = new BigDecimal(16);\n\t\tBigDecimal sixTeenPow = new BigDecimal(1.0);\n\t\t\n\t\tBigDecimal sixTeenPowIncrement = new BigDecimal(16).pow(increment);\n\t\t\n\t\tint endVal = startVal + increment * numTimes;\n\t\t\n\t\tfor(int k=endVal ; k>startVal; k -= increment)\n\t\t{\n\t\t\tNumarAndDenom nd = Spigot_Level_1(k-increment, k);\n\t\t\t\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t\n\t\t\ttotalNumar = totalNumar.multiply( nd.denom ).add( totalDenom.multiply( nd.numar ) );\n\t\t\ttotalDenom = totalDenom.multiply( nd.denom );\n\t\t\t\n\t\t\tif(k-increment != startVal)\n\t\t\t\ttotalDenom = totalDenom.multiply( sixTeenPowIncrement );\n\t\t\t\n\t\t\ttotTimeToMultiply += System.currentTimeMillis() - startTime;\n\t\t}\n\t\t\n\t\t//System.out.println(\"totalNumar precision : \"+totalNumar.precision());\n\t\t//System.out.println(\"totalDenom precision : \"+totalDenom.precision());\n\t\t\n\t\tNumarAndDenom numerAndDenom = new NumarAndDenom();\n\t\t\n\t\tnumerAndDenom.numar = totalNumar;\n\t\tnumerAndDenom.denom = totalDenom;\t\t\n\t\t\n\t\treturn numerAndDenom;\t\t\n\t}", "public static long mass () { return mass;}", "Builder extremeSpikeIncrease(VariableAmount increase);", "public double getMakespan(){return makespan;}", "@Override\n\t\tpublic FTECost build() {\n\t\t\tMoney totalCost = Money.zero(Monetary.getCurrency(CurrencyCode.INR.name())).add(cost.annualSalary).add(cost.commission).add(cost.bonus).add(cost.otherCost);\n\t\t\tMoney hourlyRate = totalCost.divide(Costing.NUMBER_OF_WEEKS_IN_A_YEAR).divide(Costing.STANDARD_WORKING_HOURS_PER_WEEK);\n\t\t\tthis.cost.payment(Payment.of(PayRateUnit.HOURLY, hourlyRate));\n\t\t\treturn this.cost;\n\t\t}", "public int getComplexity() { return 4 + getSettingValue(\"radius\") * 2 + getSettingValue(\"duration\") / 5; }", "BlueSphere() {\n Random random = new Random();\n value[0] = random.nextInt(16) + 1;\n }", "public Prism(){//consturctor for Cube class with h initialzed to 10.0.\r\n super();//constructor of superclass called.\r\n h = 10.0;\r\n }", "Fraction () {\n this (0, 1);\n }", "Box(double len){\r\n Height = Width = Depth = len;\r\n\r\n }", "public NeighborhoodDistribution(int divisions) {this.divisions=divisions;}", "MagLegendre( int nt ) \n {\n nTerms = nt;\n Pcup = new double[ nTerms + 1 ];\n dPcup = new double[ nTerms + 1 ];\n }", "private void createCentipede() {\n\t\tcentipede = new ArrayList<>();\n\t\tfor(int i = 0; i < centipedeSize; i ++) {\n\t\t\tcentipede.add(new Segment(304 + 16 * i, 0));\n\t\t}\n\t}", "public double getMass();", "public ResolutionUnitTag()\r\n\t{\r\n\t\tthis(INCH);\r\n\t}", "int getRadiusUnitsValue();", "public Fraction(int numerator) {\n this.numerator = numerator;\n this.denominator = 1;\n }", "@Test\n public void youCanCreateALoopFromPlatesFromACount() {\n // inputs\n VertexLabel runningTotalLabel = new VertexLabel(\"runningTotal\");\n VertexLabel stillLoopingLabel = new VertexLabel(\"stillLooping\");\n VertexLabel valueInLabel = new VertexLabel(\"valueIn\");\n\n // intermediate\n VertexLabel oneLabel = new VertexLabel(\"one\");\n VertexLabel conditionLabel = new VertexLabel(\"condition\");\n\n // outputs\n VertexLabel plusLabel = new VertexLabel(\"plus\");\n VertexLabel loopLabel = new VertexLabel(\"loop\");\n VertexLabel valueOutLabel = new VertexLabel(\"valueOut\");\n\n // base case\n DoubleVertex initialSum = ConstantVertex.of(0.);\n BooleanVertex tru = ConstantVertex.of(true);\n DoubleVertex initialValue = ConstantVertex.of(0.);\n\n int maximumLoopLength = 100;\n\n Plates plates = new PlateBuilder<Integer>()\n .withInitialState(SimpleVertexDictionary.backedBy(ImmutableMap.of(\n plusLabel, initialSum,\n loopLabel, tru,\n valueOutLabel, initialValue)))\n .withTransitionMapping(ImmutableMap.of(\n runningTotalLabel, plusLabel,\n stillLoopingLabel, loopLabel,\n valueInLabel, valueOutLabel\n ))\n .count(maximumLoopLength)\n .withFactory((plate) -> {\n // inputs\n DoubleVertex runningTotal = new DoubleProxyVertex(runningTotalLabel);\n BooleanVertex stillLooping = new BooleanProxyVertex(stillLoopingLabel);\n DoubleVertex valueIn = new DoubleProxyVertex(valueInLabel);\n plate.addAll(ImmutableSet.of(runningTotal, stillLooping, valueIn));\n\n // intermediate\n DoubleVertex one = ConstantVertex.of(1.);\n BooleanVertex condition = new BernoulliVertex(0.5);\n plate.add(oneLabel, one);\n plate.add(conditionLabel, condition);\n\n // outputs\n DoubleVertex plus = runningTotal.plus(one);\n BooleanVertex loopAgain = stillLooping.and(condition);\n DoubleVertex result = If.isTrue(loopAgain).then(plus).orElse(valueIn);\n plate.add(plusLabel, plus);\n plate.add(loopLabel, loopAgain);\n plate.add(valueOutLabel, result);\n })\n .build();\n\n\n DoubleVertex previousPlus = initialSum;\n BooleanVertex previousLoop = tru;\n DoubleVertex previousValueOut = initialValue;\n\n for (Plate plate : plates) {\n DoubleVertex runningTotal = plate.get(runningTotalLabel);\n BooleanVertex stillLooping = plate.get(stillLoopingLabel);\n DoubleVertex valueIn = plate.get(valueInLabel);\n\n DoubleVertex one = plate.get(oneLabel);\n BooleanVertex condition = plate.get(conditionLabel);\n\n DoubleVertex plus = plate.get(plusLabel);\n BooleanVertex loop = plate.get(loopLabel);\n DoubleVertex valueOut = plate.get(valueOutLabel);\n\n assertThat(runningTotal.getParents(), contains(previousPlus));\n assertThat(stillLooping.getParents(), contains(previousLoop));\n assertThat(valueIn.getParents(), contains(previousValueOut));\n\n assertThat(one.getParents(), is(empty()));\n assertThat(condition, hasParents(contains(allOf(\n hasNoLabel(),\n instanceOf(ConstantDoubleVertex.class)\n ))));\n\n assertThat(plus.getParents(), containsInAnyOrder(runningTotal, one));\n assertThat(loop.getParents(), containsInAnyOrder(condition, stillLooping));\n assertThat(valueOut.getParents(), containsInAnyOrder(loop, valueIn, plus));\n\n previousPlus = plus;\n previousLoop = loop;\n previousValueOut = valueOut;\n }\n\n\n DoubleVertex output = plates.asList().get(maximumLoopLength - 1).get(valueOutLabel);\n\n for (int firstFailure : new int[]{0, 1, 2, 10, 99}) {\n for (Plate plate : plates) {\n BooleanVertex condition = plate.get(conditionLabel);\n condition.setAndCascade(true);\n }\n BooleanVertex condition = plates.asList().get(firstFailure).get(conditionLabel);\n condition.setAndCascade(false);\n Double expectedOutput = new Double(firstFailure);\n assertThat(output, VertexMatchers.hasValue(expectedOutput));\n }\n }", "public int getDiameter()\n {\n return diameter;\n }", "Box(double w, double h, double d) {\n\n widgh =w;\n height =h;\n depth =d;\n\n}", "public PXRadialGradient() {\n center = new PointF();\n }", "public void setDiameter(int diameter){\n\t\tthis.diameter = diameter;\n\t}", "public Fraction() {\n this.numerator = 0;\n this.denominator = 1;\n }", "public Fraction()\r\n {\r\n this.numerator = 0;\r\n this.denominator = 1;\r\n }", "public DCU() {\r\n meters = new ArrayList<Meter>();\r\n id = \"unknown\";\r\n }", "@Override\r\n\tpublic int unitsToWagger() {\n\t\treturn 0;\r\n\t}", "public MeterSkin(MeterView control) {\n\t\tsuper(control);\n\t\tPane pane = new Pane();\n\t\tArc arc = new Arc(0, 0, 2, 2, 90 - control.getAngle()/2, control.getAngle());\n\t\tarc.lengthProperty().bind(control.angleProperty());\n\t\tarc.startAngleProperty().bind(Bindings.subtract(90, control.angleProperty().divide(2)));\n\t\tarc.radiusXProperty().bind(arc.radiusYProperty());\n\t\tarc.radiusYProperty().bind(Bindings.min(pane.widthProperty(), pane.heightProperty()).multiply(0.35));\n\t\tarc.centerXProperty().bind(pane.widthProperty().divide(2));\n\t\tarc.centerYProperty().bind(pane.heightProperty().divide(2));\n\t\tarc.typeProperty().bind(control.arcTypeProperty());\n\t\tarc.setStrokeLineCap(StrokeLineCap.ROUND);\n\t\tarc.strokeProperty().bind(control.arcStrokeProperty());\n\t\tarc.strokeWidthProperty().bind(arc.radiusYProperty().divide(10));\n\t\tarc.fillProperty().bind(control.arcFillProperty());\n\n\t\tLabel label = new Label(\"\");\n\t\tlabel.textProperty().bind(control.nameProperty());\n\t\tlabel.setMaxWidth(60);\n\t\tlabel.setWrapText(true);\n\t\tlabel.setTextAlignment(TextAlignment.CENTER);\n\t\tlabel.layoutXProperty().bind(pane.widthProperty().divide(2).subtract(label.widthProperty().divide(2)));\n\t\tlabel.layoutYProperty().bind(pane.heightProperty().divide(2).subtract(arc.radiusYProperty().divide(2))\n\t\t\t\t.subtract(label.heightProperty().divide(2)));\n\t\tlabel.scaleXProperty().bind(label.scaleYProperty());\n\t\tlabel.scaleYProperty().bind(arc.radiusYProperty().multiply(0.025));\n\n\t\tLabel valueText = new Label();\n\t\tChangeListener<String> formatListener = (v1, v2, v3) -> {\n\t\t\tif (v3 == null) {\n\t\t\t\tvalueText.setVisible(false);\n\t\t\t} else {\n\t\t\t\tvalueText.textProperty().bind(Bindings.format(v3, control.valueProperty()));\n\t\t\t\tvalueText.setVisible(true);\n\t\t\t}\n\t\t};\n\t\tformatListener.changed(null, null, control.getTextFormat());\n\t\tcontrol.textFormatProperty().addListener(formatListener);\n\t\tvalueText.layoutXProperty().bind(pane.widthProperty().divide(2).subtract(valueText.widthProperty().divide(2)));\n\t\tvalueText.layoutYProperty().bind(pane.heightProperty().subtract(valueText.heightProperty())\n\t\t\t\t.subtract(valueText.heightProperty().multiply(valueText.scaleYProperty())\n\t\t\t\t\t\t.subtract(valueText.heightProperty()).divide(2)));\n\t\tvalueText.scaleXProperty().bind(valueText.scaleYProperty());\n\t\tvalueText.scaleYProperty().bind(arc.radiusYProperty().multiply(0.035));\n\n\t\tPath arrow = new Path(\n\t\t\t\tnew MoveTo(110, 0),\n\t\t\t\tnew LineTo(0, 10),\n\t\t\t\tnew ArcTo(10, 10, 180, 0, -10, true, true),\n\t\t\t\tnew LineTo(110, 0));\n\t\tarrow.layoutXProperty().bind(pane.widthProperty().divide(2));\n\t\tarrow.layoutYProperty().bind(pane.heightProperty().divide(2));\n\t\tarrow.strokeProperty().bind(control.arrowStrokeProperty());\n\t\tarrow.fillProperty().bind(control.arrowFillProperty());\n\n\t\tScale sc = new Scale(1, 1, 0, 0);\n\t\tsc.xProperty().bind(sc.yProperty());\n\t\tsc.yProperty().bind(arc.radiusYProperty().divide(100));\n\t\tRotate rt = new Rotate(0, 0, 0);\n\t\tChangeListener<Number> valueListener = (v1, v2, v3) -> {\n\t\t\t\tnew Timeline(\n\t\t\t\t\t\tnew KeyFrame(Duration.ZERO,\n\t\t\t\t\t\t\t\tnew KeyValue(rt.angleProperty(), rt.getAngle())),\n\t\t\t\t\t\tnew KeyFrame(Duration.millis(400),\n\t\t\t\t\t\t\t\tnew KeyValue(rt.angleProperty(), -arc.getStartAngle() - (arc.getLength() -\n\t\t\t\t\t\t\t\t\t\t(v3.doubleValue() / (control.getMax() - control.getMin()) * arc.getLength())),\n\t\t\t\t\t\t\t\t\t\tnew SmoothInterpolator(SmoothInterpolator.AnimType.ACCELDECEL)))\n\t\t\t\t).playFromStart();\n\t\t};\n\t\tvalueListener.changed(null, null, Double.isNaN(control.getValue()) ? 0 : control.getValue());\n\t\tcontrol.valueProperty().addListener(valueListener);\n\t\tarrow.getTransforms().addAll(rt, sc);\n\n\t\tpane.getChildren().addAll(label, valueText, arc, arrow);\n\t\tpane.setMinSize(75, 75);\n\t\tpane.setPrefSize(200, 200);\n\t\tgetChildren().add(pane);\n\t}", "public ElectricShower() {\r\n\t\tthis(12, 0, 4);\r\n\t}", "public MmeDiameterPeer() {\n super(Epc.NAMESPACE, \"mme-diameter-peer\");\n }" ]
[ "0.6431484", "0.58967364", "0.5655847", "0.55966884", "0.55887073", "0.5575077", "0.5571534", "0.548963", "0.53951836", "0.53913003", "0.53639823", "0.5347169", "0.5341215", "0.5337148", "0.5294734", "0.5293813", "0.529037", "0.52317613", "0.52205926", "0.52159756", "0.51981604", "0.51669496", "0.5154358", "0.5138109", "0.51331043", "0.5132868", "0.509169", "0.50882745", "0.5073147", "0.5072587", "0.5063874", "0.5056703", "0.504705", "0.5036835", "0.5030768", "0.5029582", "0.50009495", "0.49986783", "0.4998619", "0.49956176", "0.49921846", "0.49838972", "0.49696153", "0.4968972", "0.49588275", "0.4956353", "0.495603", "0.49469894", "0.49396557", "0.49386227", "0.49377516", "0.49140605", "0.4911021", "0.49105942", "0.4899543", "0.4898244", "0.48916128", "0.488999", "0.488476", "0.48596156", "0.48533326", "0.4817542", "0.48107174", "0.48065957", "0.48033744", "0.4799683", "0.4796745", "0.47916946", "0.47890174", "0.47855517", "0.47855166", "0.4784877", "0.4781796", "0.47806275", "0.47776946", "0.47739488", "0.4772505", "0.47704193", "0.47692356", "0.47673473", "0.4752095", "0.47505435", "0.47478843", "0.47460008", "0.4744392", "0.47291675", "0.47282863", "0.47211158", "0.47175187", "0.47130546", "0.47107273", "0.47089472", "0.4703249", "0.46984932", "0.4693227", "0.46929798", "0.46917275", "0.46871302", "0.4686954", "0.46868005" ]
0.62220633
1
Serves the readonly property diameter.
public int getDiameterInMicrometers() { return diameterInMicrometers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getDiameter() {\n return diameter;\n }", "public int getDiameter() {\n\t\treturn diameter;\n\t}", "public void setDiameter(int diameter){\n\t\tthis.diameter = diameter;\n\t}", "public int getDiameter()\n {\n return diameter;\n }", "public void setDiameter(int diameter) {\n circleDiameter = diameter;\n\n }", "@Override\r\n\tpublic double getDiameter()\r\n\t{\r\n\t\tif (diameter < 0) { // has not been initialized\r\n\t\t\tlogger.debug(\"Calling setGraphParameters\");\r\n\t\t\tsetGraphParameters();\r\n\t\t}\r\n\t\treturn diameter;\r\n\t}", "public int getDiameter()\n\t{\n\t\treturn radius * 2;\n\t}", "public Angle getSmallDiameter() {\n\n return smallDiameter;\n\n }", "public Angle getLargeDiameter() {\n\n return largeDiameter;\n\n }", "public DoubleProperty radiusProperty() { return radius; }", "Double getNominalDiameter();", "@SimpleProperty(description = \"The diameter of the wheels used for driving.\",\n category = PropertyCategory.BEHAVIOR, userVisible = false)\n public float WheelDiameter() {\n return (float) wheelDiameter;\n }", "public void setDiameter(int newDiameter)\n {\n diameter = (newDiameter >= 0 ? newDiameter : 10);\n repaint(); // repaint panel\n }", "public int getLength(){ // getter method\n return length; // return the value of the class attribute radius\n }", "public void setSmallDiameter(Angle smallDiameter) {\n\n if (smallDiameter != null) {\n if (smallDiameter.getValue() < 0.0) {\n return;\n }\n }\n\n this.smallDiameter = smallDiameter;\n\n }", "ReadOnlyDoubleProperty minimumProperty();", "public int getRadius() { return radius; }", "public double getRadius(){return radius;}", "public double getRadius() { return radius; }", "ReadOnlyDoubleProperty maximumProperty();", "public void setDiamondValue(int value);", "public int getSize() {\r\n return this.radius;\r\n }", "AbstractBaseWheel(BigDecimal size){\n this.diameter = size;\n }", "public double getRadius(){\r\n return radius;\r\n }", "public int getSize() {\n return this.radius;\n }", "public double getRadius() { return radius.get(); }", "@Override\r\n\tpublic double getRadius() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void setReadOnly(boolean readonly) {\n\t\t\n\t}", "public double getRadius() {\n return radius;\n }", "@Override\n public double perimeter()\n {\n\treturn (double) (2 * length + 2 * width);\n }", "@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_FLOAT,\n defaultValue = \"4.32\")\n @SimpleProperty\n public void WheelDiameter(float wheelDiameter) {\n this.wheelDiameter = wheelDiameter;\n }", "public double getRadius() {\n return radius; \n }", "double getPerimeter() {\n return width + width + height + height;\n }", "public int getRadius()\n {\n return this.radius;\n }", "@XmlAttribute\n public Boolean isReadOnly() {\n return readOnly;\n }", "public void setLargeDiameter(Angle largeDiameter) {\n\n if (largeDiameter != null) {\n if (largeDiameter.getValue() < 0.0) {\n return;\n }\n }\n\n this.largeDiameter = largeDiameter;\n\n }", "public Double getLength()\n {\n return length;\n }", "public double getRadius(){\n\t\treturn radius;\n\t}", "public int getRadius() {\n return radius;\n }", "public double getRadius()\r\n {\r\n return radius;\r\n }", "public double getRadius()\n {\n return m_Radius;\n }", "public double getRadius() {\n return radius;\n }", "public double getRadius() {\n return radius;\n }", "public double getRadius() {\n return radius;\n }", "public double getRadius() {\n return radius;\n }", "public double getRadius() {\n return radius;\n }", "public double getRadius() {\n return radius;\n }", "public double getRadius() {\n return radius;\n }", "public double getRadius() {\n return radius;\n }", "public double getRadius() {\n return radius;\n }", "public double getRadius() {\n return radius;\n }", "public double getRadius(){\n return radius;\n }", "public Double getRadius() {\n return this.radius;\n }", "public double getRadius() {\r\n\t\treturn _radius;\r\n\t}", "@Override\n\tpublic double getPerimeter() {\n\t\treturn 8 * side;\n\t}", "public double getRadius()\r\n\t{\r\n\t\treturn radius;\r\n\t}", "public int getRadius_() {\r\n\t\treturn radius_;\r\n\t}", "public int getRadius() {\r\n\t\treturn this.radius;\r\n\t}", "public double discSize() {\n return discSize;\n }", "@Override\n public double perimeter() {\n return 2 * (width + length);\n }", "public double getRadius() {\r\n\t\treturn radius;\r\n\t}", "public int getNbDiamond()\n {\n return this.nbDiamond;\n }", "@Override\n\tpublic IProperty getClone() {\n\t\treturn new Strength(myStrength);\n\t}", "public double getSideLength() {\n\t\treturn this.sideLength;\n\t}", "@Nullable\n public DpProp getRadius() {\n if (mImpl.hasRadius()) {\n return DpProp.fromProto(mImpl.getRadius());\n } else {\n return null;\n }\n }", "public int getRadius()\n\t{\n\t\treturn radius;\n\t}", "public int getLength() {\n return this.sideLength;\n }", "public MmeDiameterPeer() {\n super(Epc.NAMESPACE, \"mme-diameter-peer\");\n }", "public void setLength(int n){ // Setter method\n \n length = n; // set the class attribute (variable) radius equal to num\n }", "public int getRadius() {\n return radius_;\n }", "@Override\r\n public double perimeter() {\n return (height+width)*2;\r\n }", "public double getRadius() {\n\t\treturn radius;\n\t}", "public double getRadius() {\n\t\treturn radius;\n\t}", "public double getLength(){\n return length;\n }", "public double getPerimeter(){\n return 0;\n }", "@Override\n\tpublic double getPerimeter() {\n\t\treturn width + width + length + length;\n\t}", "public int getRadius() {\n\t\treturn radius;\n\t}", "@Override\n\tpublic double perimeter() {\n\t\t\n\t\treturn circumference();\n\t\t\n\t}", "public float getRadius()\n {\n return _radius;\n }", "public double Perimeter() {\r\n \treturn((getLength() * 2) + (getWidth() * 2));\r\n }", "public double getLength(){\r\n\t\treturn length;\r\n\t}", "@Override\n\tpublic double getPerimeter() {\n\t\treturn this.N * getSide();\n\t}", "@Override\n\tpublic void setReadOnly(boolean readOnly) {\n\t}", "public double getRadius(){\n return r;\n }", "public void setReadonly(String readonly) {\n this.readonly = readonly;\n }", "@JsonProperty(\"readOnly\")\n public Boolean getReadOnly() {\n return readOnly;\n }", "public String getSize() {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}", "public boolean isReadonly() {\n\t\treturn readonly;\n\t}", "@JSProperty(\"size\")\n void setSize(double value);", "@JSProperty\n boolean isReadOnly();", "public float getRadius() {\n return radius;\n }", "public void setPerimeter() {\n\t\tthis.perimeter= 2*(height+width);\n\t}", "@Override\n public void setReadOnly(boolean readonly) {\n // do nothing\n }", "@JSProperty(\"size\")\n double getSize();", "@Basic\n\t@Raw\n\tpublic double getRadius() {\n\t\treturn this.radius;\n\t}", "public int getRadius() {\n return radius_;\n }", "@Override\r\n\tpublic double getPerimeter() {\r\n\t\treturn 2 * (width + height);\r\n\t}", "@Override\r\n\tpublic double getPerimeter() {\r\n\t\treturn 2 * (width + height);\r\n\t}", "@Basic @Raw @Immutable\n public double getRadius(){\n return this.startRadius;\n }", "public double getPerimeter() {\n\t\treturn sideLength * 8;\n\t}" ]
[ "0.72519815", "0.7205918", "0.7184883", "0.71506494", "0.6886772", "0.6489306", "0.6335048", "0.62936825", "0.6266425", "0.61846185", "0.597866", "0.5975849", "0.5940297", "0.57382023", "0.5734159", "0.5732599", "0.56109875", "0.55983365", "0.5575796", "0.5541162", "0.5523712", "0.5512661", "0.55066335", "0.54797834", "0.5479584", "0.54644483", "0.5460898", "0.5447671", "0.543431", "0.5431965", "0.54249424", "0.5417494", "0.5406088", "0.5398913", "0.53897053", "0.5383379", "0.5366648", "0.5363919", "0.53615624", "0.5359489", "0.5355976", "0.53442687", "0.53442687", "0.53442687", "0.53442687", "0.53442687", "0.53442687", "0.53442687", "0.53442687", "0.53442687", "0.53442687", "0.5337065", "0.5335902", "0.53352475", "0.5332322", "0.5331092", "0.532945", "0.53221166", "0.53190887", "0.53140146", "0.5306524", "0.5301327", "0.53010607", "0.5298424", "0.5280982", "0.5278184", "0.5277635", "0.5273679", "0.5271609", "0.52669024", "0.526477", "0.52645755", "0.52645755", "0.52622175", "0.5261396", "0.52606285", "0.5253775", "0.5252483", "0.5244571", "0.5239627", "0.52326316", "0.5226149", "0.522556", "0.5222287", "0.52211785", "0.5219686", "0.52167314", "0.52152854", "0.521492", "0.521274", "0.5208776", "0.52062416", "0.5204215", "0.5166047", "0.51629114", "0.5161157", "0.51610845", "0.51610845", "0.5160427", "0.5152976" ]
0.6113742
10
Grows this cell in a single increment, increasing its size with one time the growth increment.
public void grow() { this.diameterInMicrometers += growthIncrementInMicrometers; if (this.diameterInMicrometers > 1000) throw new Error("TestTube will explode in 5 seconds"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setGrowIncrement(int inc) { growInc = inc; }", "void growCells() {\n for (Cell cell : cells) {\n cell.grow();\n }\n }", "private void grow() {\n\t\tif (_growthRatio > 1 && (_age & 0x07) == 0x07 && alive && _energy >= _mass/10) {\n\t\t\t_growthRatio--;\n\t\t\tdouble m = _mass;\n\t\t\tdouble I = _I;\n\t\t\tsymmetric();\n\t\t\t// Cynetic energy is constant. If mass changes, speed must also change.\n\t\t\tm = FastMath.sqrt(m/_mass);\n\t\t\tdx *= m;\n\t\t\tdy *= m;\n\t\t\tdtheta *= FastMath.sqrt(I/_I);\n\t\t\thasGrown = 1;\n\t\t} else {\n\t\t\tif (_growthRatio < 15 && _energy < _mass/12) {\n\t\t\t\t_growthRatio++;\n\t\t\t\tdouble m = _mass;\n\t\t\t\tdouble I = _I;\n\t\t\t\tsymmetric();\n\t\t\t\t// Cynetic energy is constant. If mass changes, speed must also change.\n\t\t\t\tm = FastMath.sqrt(m/_mass);\n\t\t\t\tdx *= m;\n\t\t\t\tdy *= m;\n\t\t\t\tdtheta *= FastMath.sqrt(I/_I);\n\t\t\t\thasGrown = -1;\n\t\t\t} else\n\t\t\t\thasGrown = 0;\n\t\t}\n\t}", "public void grow(int cap) {}", "public void grow(int n) {\r\n\t\t// implementation not shown\r\n\t}", "public void sizeIncrease1() {\n\t\t _size++;\n\t}", "public void grow() {\n\t\thtmlFontSize += 40;\n\t}", "public abstract void grow();", "protected void grow() {\n }", "private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }", "public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}", "private void grow(){\n\t\tberries.replaceAll((p, v) -> v + 1);\n\t\tapples.replaceAll((p, v) -> v + 1);\n\t}", "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 }", "public void growCellAt(int row, int col) {\n\t\t// Complete this method\n\t\tgameGrid[row][col] = 1;\n\t}", "public int growthFactor() {\n\t\treturn growthFactor;\n\t}", "private void grow() {\n int oldCapacity = heap.length;\n // Double size if small; else grow by 50%\n int newCapacity = oldCapacity + ((oldCapacity < 64) ?\n (oldCapacity + 2) :\n (oldCapacity >> 1));\n Object[] newQueue = new Object[newCapacity];\n for (int i = 0; i < heap.length; i++) {\n newQueue[i] = heap[i];\n }\n heap = newQueue;\n }", "public void growSnake() {\n grow = true;\n }", "public void grow() {\n if (!getIsWilted()) {\n age++;\n }\n }", "public final void grow( final int increase )\n {\n if( null == m_pool )\n {\n m_pool = new Poolable[ increase ];\n return;\n }\n\n final Poolable[] poolables = new Poolable[ increase + m_pool.length ];\n System.arraycopy( m_pool, 0, poolables, 0, m_pool.length );\n m_pool = poolables;\n }", "public void growSugar() {\n if (++sugarGrowBackCounter == SUGAR_GROW_RATE_INTERVAL) {\n currentSugar = Math.min(currentSugar + SUGAR_GROW_BACK_RATE, MAX_SUGAR);\n sugarGrowBackCounter = 0;\n }\n }", "public abstract GF2nElement increase();", "public void growSnake() {\n\t\tSnakeObj.length++;\n\t\txHead++;\n\t\tyHead++; \n\t\tSnakeArray[xHead][yHead] = 1; \n\t\tthis.repaint(); \n\t}", "private void grow(int bucketIndex) {\n StopWatch.start(false);\n //String procRID = ProvenanceRecorder.documentProcedure(ProvUtils.getStoreOfCurrentThread(), this, \"grow\", \"label\", true, new String[]{\"bucketIndex\"}, new Object[]{bucketIndex}, true);\n // double the bucket size\n int[] newBucket = new int[table[bucketIndex].length * 2];\n\n int index = 0;\n for (; index < table[bucketIndex].length; index++) {\n newBucket[index] = table[bucketIndex][index];\n }\n for (; index < newBucket.length; index++) {\n newBucket[index] = NULL_ELEMENT;\n }\n table[bucketIndex] = newBucket;\n //ProvenanceRecorder.endProcedureDocumentation(ProvUtils.getStoreOfCurrentThread(), this, \"grow\", procRID, null, null, null, null, true, false, false, true);\n StopWatch.stop(false);\n }", "public GridBagPanel incrementGridx()\n {\n myGBC.gridx++;\n return this;\n }", "private void grow() {\n int oldCapacity = this.values.length;\n int newCapacity = oldCapacity + (oldCapacity >> 1);\n Object[] newValues = new Object[newCapacity];\n System.arraycopy(this.values, 0, newValues, 0, oldCapacity);\n this.values = newValues;\n }", "public void setGrow(boolean grow) {\n this.grow = grow;\n }", "public void incrementRow() {\n setRowAndColumn(row + 1, column);\n }", "public void change(double increment)\n\t{\n\t\tthis.accumulation += increment;\n\t}", "private void increaseSize() {\r\n\t\tE[] biggerE = (E[]) new Object[this.capacity * 2];\r\n\t\tdouble[] biggerC = new double[this.capacity * 2];\r\n\t\tfor (int i = 0; i < this.size; i++) {\r\n\t\t\tbiggerE[i] = this.objectHeap[i];\r\n\t\t\tbiggerC[i] = this.costHeap[i];\r\n\t\t}\r\n\t\tthis.costHeap = biggerC;\r\n\t\tthis.objectHeap = biggerE;\r\n\t\tthis.capacity = this.capacity * 2;\r\n\t}", "public void Increase()\n {\n Increase(1);\n }", "public int increase()\n {\n return this.increase(1);\n }", "protected void grow()\r\n\t{\t\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Starting grow\");\r\n\t\t}\r\n\t\t\r\n\t\tint[] temp = new int[count*2];\r\n\t\t\r\n\t\tfor(int index = 0; index < count; index++)\r\n\t\t{\r\n\t\t\ttemp[index] = numArray[index];\r\n\t\t\t\r\n\t\t\tif(debug)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Debug - temp[index] = \" + temp[index]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tnumArray = temp;\r\n\t\t\r\n\t\tif(debug)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Debug - Ending grow\");\r\n\t\t}\r\n\t}", "private void grow() {\n capacity *= 2;\n Object[] temp = new Object[capacity];\n for (int i = 0; i < values.length; i++) temp[i] = values[i];\n values = temp;\n }", "public void enlargeSquare()\n {\n squareSize++;\n }", "public void setGrowthRate(int growthRate) {\n growthRate /= 100;\n this.growthRate = growthRate;\n }", "public void increment() {\n increment(1);\n }", "@Override\n public void grow() {\n System.out.println(\"Tree growing\");\n }", "private void grow() {\n final int new_size = Math.min(size * 2, Const.MAX_TIMESPAN);\n if (new_size == size) {\n throw new AssertionError(\"Can't grow \" + this + \" larger than \" + size);\n }\n values = Arrays.copyOf(values, new_size);\n qualifiers = Arrays.copyOf(qualifiers, new_size);\n }", "public GridBagPanel incrementGridy()\n {\n myGBC.gridy++;\n return this;\n }", "public void increase()\n {\n setCount(getCount() + 1);\n }", "public int increase() {\r\n return ++value;\r\n }", "public void increaseSize(int delta){\n\t\tif(scale < scaleMax)\n\t\t\tscale += enlarge * delta;\n\t}", "void increase();", "void increase();", "public void increment() {\r\n\t\tcurrentSheeps++;\r\n\t}", "private void growSnake() { \r\n length++;\r\n snake[length-1].row = snake[length-2].row;\r\n snake[length-1].column = snake[length-2].column;\r\n if (snake[length-2].direction == UP) snake[length-1].row++;\r\n else if (snake[length-2].direction == DOWN) snake[length-1].row--;\r\n else if (snake[length-2].direction == LEFT) snake[length-1].column++;\r\n else if (snake[length-2].direction == RIGHT) snake[length-1].column--; \r\n }", "public void growthCycle() {\n\t\tboolean doMore = true;\n\t\tdo {\n\t\t\tdoMore = false;\n\t\t\tgrower = planter;\n\t\t\tCollections.shuffle(grower, random);\n\t\t\tplanter = new ArrayList<Room>();\n\t\t\tfor(Room room : grower) {\n\t\t\t\tif(rooms.size() >= size.maxRooms) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(room.plantChildren(this)) {\n\t\t\t\t\t//System.out.println(\"Added side room.\");\n\t\t\t\t\tdoMore = true;\n\t\t\t\t}\n\t\t\t} \n\t\t} while(doMore);\t\t\n\t\t//DoomlikeDungeons.profiler.endTask(\"Adding Rooms (growthCycle)\");\n\t}", "public void increaseSize() {\n Estimate[] newQueue = new Estimate[queue.length * 2];\n\n for (int i = 0; i < queue.length; i++) {\n newQueue[i] = queue[i];\n }\n\n queue = newQueue;\n }", "protected abstract void doGrowth(World world, BlockPos pos, int meta);", "public abstract void increaseThis();", "public void growStats() {\r\n\t\tLIFE += increment;\r\n\t\tSTRENGTH += increment;\r\n\t}", "public void increase() {\n balance.multiply(1.001);\n }", "private void incrementBucketSize(int bucket) {\n bucketsSize.incrementAndGet(bucket);\n }", "public void sizeDecrease1() {\n\t\t _size--;\n\t}", "public void increment() {\n mNewNotificationCount.setValue(mNewNotificationCount.getValue() + 1);\n }", "private Animation animateBranchGrowing(List<Branch> branchGeneration, int depth, Duration duration) {\n final ParallelTransition sameDepthBranchAnimation = new ParallelTransition();\n\n for (final Branch branch : branchGeneration) {\n final KeyValue keyValue = new KeyValue(branch.base.endYProperty(), branch.length);\n final KeyFrame keyFrame = new KeyFrame(duration, keyValue);\n final Timeline branchGrowingAnimation = new Timeline(keyFrame);//line is growing by changinh endY from 0 to brunch.lengt\n\n final PauseTransition pauseTransition = new PauseTransition();\n pauseTransition.setDuration(Duration.ONE);\n pauseTransition.setOnFinished(event -> branch.base.setStrokeWidth(branch.length / 25));\n\n sameDepthBranchAnimation.getChildren().add(\n new SequentialTransition(\n //To set width from 0 to some value we use pause transition with duration.one millisecond\n //trick to show lines\n pauseTransition,\n branchGrowingAnimation\n )\n );\n }\n\n return sameDepthBranchAnimation;\n\n }", "public void upgradeCapacity()\r\n\t{\r\n\t\tcapacity++;\r\n\t}", "static int growing()\n\t\t{\n\t\t\t\n\t\t\n\t\t\tfor(int i=1;i<=3;i++){\n\t\t\theight=height+i;\n\t\t\t\n\t\t\tSystem.out.println(height);}\n\t\t\treturn 0;\n\t\t}", "public void renumberCells() {\r\n int num = 1;\r\n for (Cell cell : cells) {\r\n cell.updateCellNum(num);\r\n num++;\r\n }\r\n }", "public void growPop(){\n pop += (int) Math.floor(1 + Math.random()*(0.01*pop));\n if(pop < 0){\n pop = 0;\n }\n }", "public static void increase(){\n c++;\n }", "private void grow() {\n Book[] temp = new Book[books.length + GROWTH_SIZE];\n for (int i = 0; i < books.length; i ++){\n temp[i] = books[i];\n }\n books = temp;\n }", "public void growthFactor(int growthFactor) {\n\t\tif (growthFactor <= 0)\n\t\t\tthrow new IllegalArgumentException(\"Illegal growth factor \" + growthFactor);\n\t\tthis.growthFactor = growthFactor;\n\t}", "public abstract void increment(int delta);", "void incrementColumnIndex(int size);", "void incrementColumnIndex(int size);", "public void increaseQuantity() {\n this.quantity++;\n this.updateTotalPrice();\n }", "private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }", "public DocumentMutation increment(FieldPath path, byte inc);", "public void increment(){\n value+=1;\n }", "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}", "static void increment(BillGatesBillions billGatesMoneyRef) {\n // Java will send a copy of the reference instead of a copy of the object\n int money = billGatesMoneyRef.getNetWorth();\n billGatesMoneyRef.setNetWorth(money + 1);\n }", "int incCapacity()\r\n\t{\r\n\t\tint i,j;\r\n\t\tfor (i=0; i<=state; ++i)\r\n\t\t\tfor (j=0; j<=symbol; ++j)\r\n\t\t\t\tg[i][j][state]=g[state][j][i]=false;\r\n\t\treturn (state++);\r\n\t}", "private void rehash(double growthFactor) {\n \tsize=0;\n \tint newBuckets = (int) Math.round(Math.max(buckets.length*growthFactor, MIN_BUCKETS));\n \t\n \tLinkedList<Entry> tempEntries = new LinkedList<Entry>();\n \t\n \tfor(int i=0;i<buckets.length;i++) {\n \t\tLinkedList<Entry> tempBucket = buckets[i];\n \t\t\n \t\twhile(!tempBucket.isEmpty()) {\n \t\t\tEntry tempEntry = tempBucket.get(0);\n \t\t\t\n \t\t\ttempEntries.add(tempEntry);\n \t\t\ttempBucket.remove(0);\n \t\t\t\n \t\t}\n \t\t\n \t}\n \t\n \tinitBuckets(newBuckets);\n \t\n \tfor(int i=0;i<tempEntries.size();i++) {\n \t\tput(tempEntries.get(i).getKey(), tempEntries.get(i).getValue());\n \t}\n }", "public void incrMine() {\r\n\t\tthis.mineCount++;\r\n\t}", "public void buildInCell() {\n this.level++;\n if (this.level == 4) {\n this.setFreeSpace(false);\n }\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 }", "@Override\r\n\tpublic int increase() throws Exception {\n\t\treturn 0;\r\n\t}", "private int plusOne(int i) {\n return (i + 1) % capacity;\n }", "public void setIncrement(double increment) {\n this.increment = increment;\n }", "public void increment() {\n sync.increment();\n }", "protected void grow(int size) {\n if (size < 128) {\n size = 128;\n }\n if (size < table.length) {\n return;\n }\n char [] newTable = new char[size];\n System.arraycopy(table, 0, newTable, 0, table.length);\n for(int i = table.length; i < size; i++) {\n newTable[i] = (char)i;\n }\n table = newTable;\n }", "private void incrementGcCounter() {\n if (null == PSAgentContext.get().getMetrics()) {\n return; // nothing to do.\n }\n long elapsedGc = getElapsedGc();\n long totalGc = 0;\n String gc_time = PSAgentContext.get().getMetrics().get(AngelCounter.GC_TIME_MILLIS);\n if (gc_time != null) {\n totalGc = elapsedGc + Long.parseLong(gc_time);\n } else {\n totalGc = elapsedGc;\n }\n PSAgentContext.get().getMetrics().put(AngelCounter.GC_TIME_MILLIS, Long.toString(totalGc));\n }", "public Cell(int diameterInMicrometers, int growthIncrementInMicrometers) {\n if (diameterInMicrometers < 1\n || diameterInMicrometers > 41\n || growthIncrementInMicrometers < 1\n || growthIncrementInMicrometers > 6\n ) {\n throw new IllegalArgumentException(\"Bacterium size must start between 0 and 40 \" +\n \"and growth increment between 0 and 5\");\n }\n this.diameterInMicrometers = diameterInMicrometers;\n //growth increment can never be changed after construction\n this.growthIncrementInMicrometers = growthIncrementInMicrometers;\n }", "public void grow(double dw, double dh) {\n width += 2 * dw;\n height += 2 * dh;\n x -= dw;\n y -= dh;\n Canvas.getInstance().repaint();\n }", "public void increment() {\n this.data++;\n }", "public void incremetColumn() {\n setRowAndColumn(row, column + 1);\n }", "public int getGrowthTime(){\n return this.growthTime;\n }", "@SuppressWarnings(\"unchecked\")\n void expand()\n {\n // Remember the old table.\n Object[] old = this.buckets;\n\n // Figure out the capacity of the new table, making it somewhat\n // unpredictable.\n int newCapacity = 2 * this.buckets.length + rand.nextInt(10);\n\n // Create a new table of that capacity.\n this.buckets = new Object[newCapacity];\n\n // Reset the size since we'll be adding elements in a moment.\n this.size = 0;\n\n // Move all the values from the old table to their appropriate\n // location in the new table.\n for (int i = 0; i < old.length; i++)\n {\n AssociationList<K, V> bucket = (AssociationList<K, V>) old[i];\n if (bucket != null)\n {\n AssociationList<K, V>.Node current = bucket.front.next;\n while (current != null)\n {\n this.set(current.key, current.value);\n current = current.next;\n } // while\n } // if (bucket != null)\n } // for\n }", "public void inc(){\n this.current += 1;\n }", "public void increaseQuantity(int amount) {\n this.currentQuantity += amount;\n }", "public void resizeByLinearize(int newCapacity) {\r\n Object[] temp = new Object[newCapacity];\r\n int k = start;\r\n for (int i = 0; i < size; i++) {\r\n temp[i] = cir[k];\r\n k = (k + 1) % cir.length;\r\n }\r\n cir = temp;\r\n start = 0;\r\n }", "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}", "private void increaseSize(int num) {\n int increasedSize = _edges.size() + num;\n for (int i = 0; i < _edges.size(); i++) {\n for (int j = 0; j < num; j++) {\n _edges.get(i).add(new Edge(_idIncr));\n _idIncr += 1;\n }\n }\n for (int k = 0; k < num; k += 1) {\n _edges.add(new ArrayList<Edge>());\n for (int z = 0; z < increasedSize; z++) {\n _edges.get(increasedSize - num + k).add(new Edge(_idIncr));\n _idIncr += 1;\n }\n }\n }", "private void grow(int par1)\n {\n IntHashMapEntry[] ainthashmapentry = this.slots;\n int j = ainthashmapentry.length;\n\n if (j == 1073741824)\n {\n this.threshold = Integer.MAX_VALUE;\n }\n else\n {\n IntHashMapEntry[] ainthashmapentry1 = new IntHashMapEntry[par1];\n this.copyTo(ainthashmapentry1);\n this.slots = ainthashmapentry1;\n this.threshold = (int)((float)par1 * this.growFactor);\n }\n }", "public void increment(double n) {\r\n\t\tthis.value += n;\r\n\t}", "private void growTable() {\n // Instantiate new array double the size\n LinkedList<Entry<K, V>>[] tmp = (LinkedList<Entry<K, V>>[]) new LinkedList<?>[this.array.length * 2];\n for (int i = 0; i < this.array.length; i++) {\n // Visit every chain of our current array\n if (this.array[i] != null) {\n // If there's a linked list there, instantiate a new linked list\n // with all the same key, values into the new, expanded array\n tmp[i] = new LinkedList<Entry<K, V>>(this.array[i]);\n }\n }\n // Set the current array to be the updated expanded array\n this.array = tmp;\n }", "public void incrementCell(Label prediction, Label real){\n\t\tint rowIx = resolveIndex(prediction);\n\t\tint colIx = resolveIndex(real);\n\n\t\tInteger cell = matrix.get(rowIx).get(colIx);\n\t\tInteger newValue = cell+1;\n\t\tmatrix.get(rowIx).set(colIx, newValue);\n\n\t}", "@Override\n public void agg(double newVal)\n {\n aggVal += newVal;\n firstTime = false;\n }", "@Override\n protected Z advanceG(final long k) {\n return Z.valueOf(5 * k - 2); // mSeqG.next();\n }" ]
[ "0.7274344", "0.67027885", "0.6645086", "0.6482846", "0.6292401", "0.62408674", "0.6188617", "0.6162249", "0.61550486", "0.61300033", "0.60687995", "0.6059943", "0.60367143", "0.59309524", "0.5828475", "0.5744336", "0.5740117", "0.5728321", "0.56928575", "0.565936", "0.5623788", "0.5618834", "0.5612708", "0.5604086", "0.5601679", "0.56005424", "0.55998397", "0.5572277", "0.55708253", "0.55669856", "0.555002", "0.55495393", "0.5547151", "0.5512052", "0.55098027", "0.55068624", "0.549322", "0.54884845", "0.5476183", "0.5461229", "0.5458632", "0.5446381", "0.5428109", "0.5428109", "0.5402807", "0.5379868", "0.53709733", "0.5337999", "0.5337003", "0.53158057", "0.52901417", "0.52794915", "0.5273161", "0.5260435", "0.5257842", "0.5256035", "0.52337056", "0.521988", "0.5217025", "0.5201673", "0.5180068", "0.5160101", "0.51595515", "0.51593626", "0.51590466", "0.51590466", "0.5154692", "0.5130644", "0.51121384", "0.5105649", "0.5090904", "0.5076124", "0.506609", "0.50651985", "0.506388", "0.506274", "0.50612724", "0.5054442", "0.50497675", "0.5048495", "0.50434726", "0.5042494", "0.50402665", "0.50361156", "0.502717", "0.5021168", "0.50135404", "0.50095254", "0.49987713", "0.4980433", "0.4976977", "0.49713138", "0.49628562", "0.49618277", "0.49613822", "0.49600387", "0.4954158", "0.4944494", "0.4940238", "0.49301636" ]
0.63542575
4
creates a new jpg picture base in the bytes pass
private boolean createNewTest() { FileOutputStream fout; try { fout = new FileOutputStream(this.sampleName); for (int k = 0; k < this.sizeOfFile; k++) { fout.write(this.testBytes[k]); } fout.close(); } // Catches any error conditions catch (IOException e) { System.err.println("Unable to write image"); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createTestImage()\n {\n initialImage = new byte[3 * size / 2];\n for (int i = 0; i < size; i++)\n {\n initialImage[i] = (byte) (40 + i % 199);\n }\n\n for (int i = size; i < 3 * size / 2; i += 2)\n {\n initialImage[i] = (byte) (40 + i % 200);\n initialImage[i + 1] = (byte) (40 + (i + 99) % 200);\n }\n }", "private Image bitmap2JPEG(Bitmap bit) {\n\n Image baseImage = new Image();\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bit.compress(Bitmap.CompressFormat.JPEG, 90, stream);\n byte[] imageBytes = stream.toByteArray();\n baseImage.encodeContent(imageBytes);\n\n return baseImage;\n }", "public abstract Image gen();", "public static BufferedImage makePPM(byte[] aux) {\n int w = 0, h = 0;\n boolean fin = true;\n\n char[] iaux = new char[aux.length];\n for (int j = 0; j < aux.length; j++) {\n iaux[j] = (char) (aux[j] & 0xFF);\n }\n\n for (int i = 3; iaux[i] != '\\n'; ++i) {\n if (iaux[i] == ' ') fin = false;\n else {\n if (fin) {\n int a = Character.getNumericValue(iaux[i]);\n w *= 10;\n w += a;\n } else {\n int a = Character.getNumericValue(iaux[i]);\n h *= 10;\n h += a;\n }\n }\n }\n\n BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);\n int r, g, b, k = 0, pixel;\n for (int y = 0; y < h; y++) {\n for (int x = 0; (x < w) && ((k + 3) < aux.length); x++) {\n r = aux[k++] & 0xFF;\n g = aux[k++] & 0xFF;\n b = aux[k++] & 0xFF;\n pixel = 0xFF000000 + (r << 16) + (g << 8) + b;\n image.setRGB(x, y, pixel);\n }\n }\n\n return image;\n }", "ImageImpl (byte [] bytes) {\n\tint cnt = bytes.length / 2;\n\tint size = (bytes.length + 1) / 2;\n\tdata = new short [size];\n\tint bi = 0;\n\t\n\tfor (int i = 0; i < cnt; i++) {\n\t data [i] = (short) (((((int) bytes [bi]) & 0x0ff) << 8)\n\t\t\t\t | (((int) bytes [bi+1]) & 0x0ff));\n\t bi += 2;\n\t}\n\t\n\tif (size > cnt)\n\t data [cnt] = (short) ((((int) bytes [bi]) & 0x0ff) << 8);\n\n\tbitmap = new Bitmap (data);\n }", "Image createImage();", "public Texture createTexture(int width, int height) throws IOException {\n/* 360 */ return createTexture(width, height, 9728);\n/* */ }", "private void putProfPic(Blob gbPhoto) throws SQLException, FileNotFoundException, IOException {\n if(gbPhoto == null){\n ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();\n File file = new File(externalContext.getRealPath(\"\")+\"\\\\resources\\\\images\\\\user_default.png\");\n imagePic = new OracleSerialBlob(FileUtils.getBytes(file));\n Long size = imagePic.length();\n photo_profile = new ByteArrayContent(imagePic.getBytes(1, size.intValue()));\n }else{\n imagePic = gbPhoto;\n Long size = gbPhoto.length();\n photo_profile = new ByteArrayContent(gbPhoto.getBytes(1, size.intValue()));\n }\n }", "Picture binaryComponentImage() throws Exception;", "IMG createIMG();", "private void createImage()\n {\n GreenfootImage image = new GreenfootImage(width, height);\n setImage(\"Player.png\");\n }", "public int addPicture(byte[] arg0, int arg1) {\n\t\treturn 0;\n\t}", "public Pixmap newPixmap(String fileName, PixmapFormat format);", "private byte[] JPEGFile(Map<Integer, Integer> freqY, Map<Integer, Integer> freqCb, Map<Integer, Integer> freqCr, String Yen, String Cben, String Cren) {\n String sizeY = Integer.toBinaryString(freqY.size());\n String sizeCB = Integer.toBinaryString(freqCb.size());\n String sizeCR = Integer.toBinaryString(freqCr.size());\n String calidadE = Integer.toBinaryString(quality);\n String widthE = Integer.toBinaryString(width);\n String heightE = Integer.toBinaryString(height);\n String sizeYc = Integer.toBinaryString(Yen.length());\n String sizeCBc = Integer.toBinaryString(Cben.length());\n String sizeCRc = Integer.toBinaryString(Cren.length());\n while (calidadE.length() < 8) calidadE = \"0\" + calidadE;\n while (widthE.length() < 16) widthE = \"0\" + widthE;\n while (heightE.length() < 16) heightE = \"0\" + heightE;\n while (sizeY.length() < 32) sizeY = \"0\" + sizeY;\n while (sizeCB.length() < 32) sizeCB = \"0\" + sizeCB;\n while (sizeCR.length() < 32) sizeCR = \"0\" + sizeCR;\n while (sizeYc.length() < 32) sizeYc = \"0\" + sizeYc;\n while (sizeCBc.length() < 32) sizeCBc = \"0\" + sizeCBc;\n while (sizeCRc.length() < 32) sizeCRc = \"0\" + sizeCRc;\n String result = calidadE + widthE + heightE + sizeY + sizeCB + sizeCR + sizeYc + sizeCBc + sizeCRc;\n String result2 = FY.toString() + FCB.toString() + FCR.toString();\n String result3 = Yen.toString() + Cben.toString() + Cren.toString();\n byte[] a = Utils.toByteArray2(result);\n byte[] b = result2.getBytes();\n byte[] c = Utils.toByteArray2(result3);\n byte[] code1 = new byte[a.length + b.length];\n System.arraycopy(a, 0, code1, 0, a.length);\n System.arraycopy(b, 0, code1, a.length, b.length);\n byte[] finalcode = new byte[code1.length + c.length];\n System.arraycopy(code1, 0, finalcode, 0, code1.length);\n System.arraycopy(c, 0, finalcode, code1.length, c.length);\n return finalcode;\n }", "public static BufferedImage createByteABGRCopy(Image img) {\n\t\tBufferedImage bi = new BufferedImage(img.getWidth(null),img.getHeight(null),BufferedImage.TYPE_4BYTE_ABGR);\n\t\tGraphics g = bi.createGraphics();\n\t\tg.drawImage(img,0,0,null);\n\t\tg.dispose();\n\t\treturn bi;\n\t}", "BIG createBIG();", "private void createImage(BufferedImage image) {\n texId.setId(glGenTextures());\n loaded = true;\n\n try {\n int[] pixels = new int[image.getHeight() * image.getWidth()];\n\n image.getRGB(0, 0, image.getWidth(), image.getHeight(), pixels, 0, image.getWidth());\n\n Window.console.println(\"Texture num : \" + texId.getId() + \" , loaded with path : \" + texId.getPath());\n\n ByteBuffer buffer = BufferUtils.createByteBuffer(image.getHeight() * image.getWidth() * 4);\n\n for (int i = 0; i < image.getHeight(); i++) {\n for (int j = 0; j < image.getWidth(); j++) {\n int pixel = pixels[i * image.getWidth() + j];\n buffer.put((byte) ((pixel >> 16) & 0xFF)); // RED\n buffer.put((byte) ((pixel >> 8) & 0xFF)); // GREEN\n buffer.put((byte) (pixel & 0xFF)); // BLUE\n buffer.put((byte) ((pixel >> 24) & 0xFF)); // ALPHA\n }\n }\n\n buffer.flip();\n\n this.width = image.getWidth();\n this.height = image.getHeight();\n\n setParam(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);\n setParam(GL_TEXTURE_MIN_FILTER, GL_LINEAR);\n setParam(GL_TEXTURE_MAG_FILTER, GL_LINEAR);\n\n upload(buffer);\n GameManager.texManager.add(texId);\n } catch (Exception e) {\n e.printStackTrace();\n unload();\n }\n }", "public Image createImage(String part, Image image) throws IOException {\n\t\t\t craeteFolder(part);\n\t\t\t File outputFile = new File(part+image.getId()+\".\"+image.getType());\n\t\t\t FileOutputStream outputStream = new FileOutputStream(outputFile);\n\t\t byte[] base64Decoded = DatatypeConverter.parseBase64Binary(image.getByteOrpart());\t\t\t\t\t \t\t\t\t\n\t\t outputStream.write(base64Decoded);\n\t\t image.setByteOrpart(part+image.getId()+\".\"+image.getType());\n\t\t \t\n\t\treturn image;\n\t}", "public void makeImage(String path, int width, int height, int pt, int pb, int pl, int pr) {\n //BufferedImage \n img2 = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n Graphics2D g2 = img2.createGraphics();\n //int newWidth = bufImg(path).getWidth() - (pl - pr);\n //int newHeight = bufImg(path).getHeight() - (pt - pb);\n // bufImg(path).getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH);\n //(img,0,0,width,height,sx1,sy1,sx2,sy2,null);\n //g2.drawImage(bufImg(path), pl, pt, pr, pb, 0, 0, newWidth,newHeight, null);\n saveImage(img2, path);\n }", "com.google.protobuf.ByteString getNewHeadpic();", "public static byte[] createThumbnail(byte[] originalImage, int width, int height) throws Exception{\n Image image = Toolkit.getDefaultToolkit().createImage(originalImage);\r\n MediaTracker mediaTracker = new MediaTracker(new Container());\r\n mediaTracker.addImage(image, 0);\r\n mediaTracker.waitForID(0);\r\n // determine thumbnail size from WIDTH and HEIGHT\r\n //ancho y largo esto se puede sacar de algun fichero de configuracion\r\n int thumbWidth =width;\r\n int thumbHeight = height;\r\n double thumbRatio = (double)thumbWidth / (double)thumbHeight;\r\n int imageWidth = image.getWidth(null);\r\n int imageHeight = image.getHeight(null);\r\n double imageRatio = (double)imageWidth / (double)imageHeight;\r\n if (thumbRatio < imageRatio) {\r\n thumbHeight = (int)(thumbWidth / imageRatio);\r\n } else {\r\n thumbWidth = (int)(thumbHeight * imageRatio);\r\n }\r\n // draw original image to thumbnail image object and\r\n // scale it to the new size on-the-fly\r\n BufferedImage thumbImage = new BufferedImage(thumbWidth, thumbHeight, BufferedImage.TYPE_INT_RGB);\r\n Graphics2D graphics2D = thumbImage.createGraphics();\r\n graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\r\n graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null);\r\n\r\n ByteArrayOutputStream baos= new ByteArrayOutputStream();\r\n ImageIO.write(thumbImage, \"jpeg\" /* \"png\" \"jpeg\" format desired, no \"gif\" yet. */, baos );\r\n baos.flush();\r\n byte[] thumbImageAsRawBytes= baos.toByteArray();\r\n baos.close();\r\n return thumbImageAsRawBytes;\r\n\r\n}", "private byte[] generateTexture(float[] friction){\n\t\tByteBuffer tempBuff = ByteBuffer.allocate(friction.length+1);\n\t\t\n\t\ttempBuff.clear();\n\t\ttempBuff.put(TEXTURECOMMAND);\n\t\t\n\t\tfor(int i = 0; i<friction.length; i++){\n\t\t\t\n\t\t\ttempBuff.put((byte) (friction[i]*MAX_FRICTION_BYTE));\n\t\t\t\n\t\t}\n\t\t\n\t\treturn tempBuff.array();\n\t\t\n\t\t\n\t}", "@Override\n\tpublic boolean baseToImg() {\n\t\tList<Image> imgList = imageRepository.findAll();\n\t\tfor (Image img : imgList) {\n\t\t\tString base = img.getSource();\n\t\t\tFiles file = new Files(img.getSaegimId(), \"jpg\");\n\t\t\tfile = fileRepository.save(file);\n\t\t\tLong fileId = file.getId();\n\t\t\t\n\t\t\tBase64ToImgDecoder.decoder(base, dir + fileId + '.' + \"jpg\");\n\t\t}\n\t\treturn true;\n\t}", "public HuffmanImage(String src) throws IOException {\n img = Files.readAllBytes(Paths.get(src));\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}", "public BufferedImage toImage(){\n // turn it into a png\n int scale = 8;\n int w = 16;\n int h = 16;\n BufferedImage image = new BufferedImage(w * scale, h * scale, BufferedImage.TYPE_INT_ARGB);\n Color background = new Color(240, 240, 240);\n java.awt.Graphics gr = image.getGraphics();\n gr.setColor(background);\n gr.fillRect(0, 0, w * scale, h * scale);\n\n // so each 3 bytes describes 1 color?\n for(int i = 0; i < 256; ++i){\n\n // int r = palette.get(i * 3);\n // int g = palette.get(i * 3 + 1);\n // int b = palette.get(i * 3 + 2);\n\n // the Color() constructor that takes ints does values 0..255\n // but it has a float constructor, so why not divide\n //Color awtColor = new Color(r/64.0f, g/64.0f, b/64.0f);\n Color awtColor = getAwtColor(i);\n\n int row = i / 16;\n int col = i % 16;\n int y = row * scale;\n int x = col * scale;\n gr.setColor(awtColor);\n gr.fillRect(x, y, x + scale, y + scale);\n }\n\n return image;\n }", "private static void readJPG(DataInputStream dis, int length){ \n\t\ttry{\n\t\t\tbyte[] arrBytes= new byte[length];\n\t\t\tfor(int i= 0; i<length;i++){\n\t\t\t\tarrBytes[i] = dis.readByte();\n\t\t\t}\n\t\t\tBufferedImage img = ImageIO.read(new ByteArrayInputStream(arrBytes));\n\t\t\tobjWriter.addFrame(1.0f/4.0f, img, 1.0f);\n\t\t\timageCount++;\n\t\t\t// Printing Image count for fun so that you don't get bored. :-P\n\t\t\tSystem.out.print(imageCount +\"\\t\");\n\t\t\tif(imageCount % 10 == 0){\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}", "public a(a imgSrc, J2KImageWriteParamJava wp) {\n/* 123 */ super((f)imgSrc);\n/* 124 */ this.f = wp.getComponentTransformation();\n/* 125 */ this.g = wp.getFilters();\n/* 126 */ this.e = imgSrc;\n/* */ }", "public static BufferedImage[] createByteABGRFrames(Image img,int num) {\n\t\tBufferedImage[] bi = new BufferedImage[num];\n\t\tfor(int i=0; i<num; i++){\n\t\t\tbi[i] = new BufferedImage(img.getWidth(null)/num,img.getHeight(null),BufferedImage.TYPE_4BYTE_ABGR);\n\t\t\tGraphics g = bi[i].createGraphics();\n\t\t\tg.drawImage(img,-i*img.getWidth(null)/num,0,null);\n\t\t\tg.dispose();\n\t\t\t}\n\t\treturn bi;\n\t}", "int wkhtmltoimage_init(int use_graphics);", "private WritableImage convertBytesToImage(ByteBuffer pixels, int width, int height) {\n WritableImage img = new WritableImage(width, height);\n PixelWriter pw = img.getPixelWriter();\n pw.setPixels(0, 0, width, height, PixelFormat.getByteBgraInstance(), pixels, width * 4);\n return img;\n }", "public IImage createImage(String name) throws IOException {\n return null;\r\n }", "byte[] getProfileImage();", "public static BufferedImage convertToJpg(BufferedImage image) {\r\n\t\tint w = image.getWidth();\r\n\t\tint h = image.getHeight();\r\n\t\tBufferedImage image2 = new BufferedImage(w, h,\r\n\t\t\t\tBufferedImage.TYPE_INT_RGB);\r\n\t\tGraphics2D g = image2.createGraphics();\r\n\t\tg.setColor(Color.WHITE);\r\n\t\tg.fillRect(0, 0, w, h);\r\n\t\tg.drawRenderedImage(image, null);\r\n\t\tg.dispose();\r\n\t\treturn image2;\r\n\t}", "public byte[] takePhoto()\n {\n byte[] arr = new byte[4];\n for (int i = 0; i < arr.length; i++)\n {\n arr[i] = (byte) i;\n }\n return arr;\n }", "private native void nativeRegisterTexture(long j, long j2, Object obj);", "public void createNewImageFile(){\n fillNewImage();\n\n try {\n ImageIO.write(newImage, imageFileType, new File(k + \"_Colored_\" + fileName.substring(0,fileName.length() - 4) + \".\" + imageFileType));\n } catch (IOException e){\n e.printStackTrace();\n }\n \n }", "public BufferedImgBase(byte[] byteimg) throws IOException{\n // convert byte[] back to a BufferedImage\n InputStream is = new ByteArrayInputStream(byteimg);\n BufferedImage newBi = ImageIO.read(is);\n //this.img --> BufferedImage\n this.img = newBi;\n }", "private File createImageFile() throws IOException{\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\"+timeStamp;\n File image = File.createTempFile(imageFileName, \".jpg\", this.savePath);\n \n return image;\n }", "public JavaImageConverter (SProperties props) {\n Runtime rt = Runtime.getRuntime ();\n long max = rt.maxMemory ();\n\tmaxImageSize = max / 4;\n\tString sq = props.getProperty (\"quality\", STD_QUALITY);\n\tquality = Float.parseFloat (sq);\n }", "private static native boolean imencode_0(String ext, long img_nativeObj, long buf_mat_nativeObj, long params_mat_nativeObj);", "private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);\n return imageF;\n }", "@Override\n public byte[] compress(byte[] imagen) {\n ResetVarC();\n /*\n Declaraciones de variables\n */\n char[] imagenaux = new char[imagen.length];\n for (int j = 0; j < imagen.length; j++) {\n imagenaux[j] = (char) (imagen[j] & 0xFF);\n }\n\n getWidthandHeight(imagenaux);\n\n imagenYCbCr = new int[height][width][3];\n for (int i = 0; i < height; ++i) {\n for (int j = 0; j < width; ++j) {\n int[] RGB = {(int) imagenaux[iterator], (int) imagenaux[iterator + 1], (int) imagenaux[iterator + 2]};\n imagenYCbCr[i][j] = RGBtoYCbCr(RGB);\n iterator += 3;\n }\n }\n\n CreateCompression();\n\n\n Huffman comprimirY = new Huffman();\n Huffman comprimirCB = new Huffman();\n Huffman comprimirCR = new Huffman();\n\n String Yen = comprimirY.compressHuffman(Yencoding);\n String Cben = comprimirCB.compressHuffman(Cbencoding);\n String Cren = comprimirCR.compressHuffman(Crencoding);\n\n\n Map<Integer, Integer> freqY = comprimirY.getFrequencies();\n Map<Integer, Integer> freqCb = comprimirCB.getFrequencies();\n Map<Integer, Integer> freqCr = comprimirCR.getFrequencies();\n\n\n CreateFreq(freqY, freqCb, freqCr);\n\n return JPEGFile(freqY, freqCb, freqCr, Yen, Cben, Cren);\n }", "public Photo() {\n\t\tthis(UUID.randomUUID().toString() + \".jpg\");\n\t}", "private Image createImage(String image_file) {\n\t\tImage img = new Image(image_file);\n\t\treturn img;\n\t}", "public Image createImages(String part, Image image) throws IOException {\n\t\t\n\t\t\t File outputFile = new File(part+image.getId()+\".\"+image.getType());\n\t\t\t FileOutputStream outputStream = new FileOutputStream(outputFile);\n\t\t byte[] base64Decoded = DatatypeConverter.parseBase64Binary(\"\");\t\t\t\t\t \t\t\t\t\n\t\t outputStream.write(base64Decoded);\n\t\t image.setByteOrpart(part+image.getId()+\".\"+image.getType());\n\t\t \t\n\t\treturn image;\n\t}", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\")\n .format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX,\n albumF);\n return imageF;\n }", "private static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);\n return imageF;\n }", "private static File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = JPEG_FILE_PREFIX + timeStamp + \"_\";\n File albumF = getAlbumDir();\n File imageF = File.createTempFile(imageFileName, JPEG_FILE_SUFFIX, albumF);\n return imageF;\n }", "public Image creerImage() {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n\t\ttry {\r\n\t\t\t// Transfert de l image dans le buffer de bytes\r\n\t\t\tImageIO.write(monImage.getImage(), \"png\", baos);\r\n\t\t\t\r\n\t\t\t// Creation d une instance d Image iText\r\n\t\t\tImage image = Image.getInstance(baos.toByteArray());\r\n\t\t\treturn image;\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (BadElementException 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 null;\r\n\t}", "PointerByReference wkhtmltoimage_create_converter(PointerByReference settings, String data);", "Recipe createRecipe(String title, String description, String ingredients, String instructions, byte[] photo, byte[] photoSmall);", "public Picture(String url) {\n\t\t//file naming convention: noOfTypos_image_imageNo\n\t\t//3_image_1\n\t\tnoTypos = Integer.parseInt(Character.toString(url.charAt(0)));\n\t\t//TODO: Finish generating imageFile\n\t}", "PointerByReference wkhtmltoimage_create_converter(PointerByReference settings, Pointer data);", "@Override\r\n\t\tpublic MyImage createMyImage(MyImage myimage) {\r\n\t\t\t\r\n\t\t\treturn myimg.createMyImage(myimage);\r\n\t\t}", "@Test\n\tpublic void testCreateNewRoi() {\n\n\t\tproc = new ByteProcessor(1,3,new byte[] {7,5,3},null);\n\t\tip = new ImagePlus(\"America's Hardware Store\",proc);\n\n\t\t// this is the best that can be done ...\n\t\tip.createNewRoi(5,10);\n\t\tassertNotNull(ip.getRoi());\n\t}", "public static byte[] getImageBinary(File f) {\n BufferedImage bi;\n try {\n bi = ImageIO.read(f);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n ImageIO.write(bi, \"jpg\", baos);\n byte[] bytes = baos.toByteArray();\n return bytes;\n //return encoder.encodeBuffer(bytes).trim();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "com.google.protobuf.ByteString getPicture();", "private String saveNewPhoto(byte[] photo,String sufix){\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\" + sufix + \".jpg\";\n \n \n File potlachBase = new File(\"src/main/webapp/photos\"); //Shit made\n potlachBase.mkdirs();\n\n File potlachImage = new File(potlachBase,imageFileName);\n\n\n OutputStream out = null;\n try {\n potlachImage.createNewFile();\n InputStream in = new ByteArrayInputStream(photo);\n out = new FileOutputStream(potlachImage);\n\n // Transfer bytes from in to out\n byte[] buf = new byte[1024];\n int len;\n while ((len = in.read(buf)) > 0) {\n out.write(buf, 0, len);\n }\n in.close();\n out.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return \"/photos/\"+imageFileName;\n\n\n\n\n }", "public BufferedImage createImage(int taskId, Connection con, String imageName) throws SQLException, ServletException {\n return null;\n }", "public void makeImage() {\n image = new GreenfootImage(\"highscoreb.png\");\n \n image.setFont(new Font(\"Arial\", false, false, 50));\n image.setColor(Color.WHITE);\n image.setFont(new Font(\"Arial\", false, false, 25));\n renderer.drawShadowString(image, name, 25, getHeight() - 50);\n setBackground(image);\n }", "@Override\r\n public Object createImage(Object data) {\r\n\t // N/A in JS\r\n\t return null;\r\n\t}", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n String mFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File mFile = File.createTempFile(mFileName, \".jpg\", storageDir);\n return mFile;\n }", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\n String mFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File mFile = File.createTempFile(mFileName, \".jpg\", storageDir);\n pictureFilePath = mFile.getAbsolutePath();\n return mFile;\n }", "@Nonnull\n private BufferedImage createImage() {\n return new BufferedImage(getWidth(), getHeight(), getImageType().getType());\n }", "public byte[] bitmap();", "protected abstract Image generateImage(Graphics g, String text, Dimension d);", "void createThumbNail(File inputFile, OutputStream outputStream,\n String format, int width, int height,\n ConversionCommand.CompressionQuality quality,\n ConversionCommand.SpeedHint speedHint) throws Exception;", "public long getImageBase()\n throws IOException, EndOfStreamException\n {\n if (imageState_ == ImageStateType.PE64)\n {\n return peFile_.readInt64(relpos(Offsets.IMAGE_BASE_64.position));\n }\n\n return peFile_.readInt32(relpos(Offsets.IMAGE_BASE_32.position));\n }", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"pic\", new DataPart(imagename + \".jpg\", getFileDataFromDrawable(bitmap)));\n return params;\n }", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n return File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n }", "protected BufferedImage createImage(int width, int height) {\n\t\treturn (new java.awt.image.BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB));\n\t}", "private File createImageFile() throws IOException {\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"MAZE_\" + timeStamp + \"_\";\n File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n return image;\n }", "public IImage createImage(IImage source) {\n return null;\r\n }", "private static final byte[] xfj_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -29, 0, 0, -1, 0,\n\t\t\t\t0, 0, 0, 102, 0, 0, 65, -52, -52, -1, -1, -1, -1, -1, -1, -52,\n\t\t\t\t-35, 0, 0, 102, 102, -52, -1, -1, -1, -1, -1, -1, -1, -1, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33,\n\t\t\t\t-2, 14, 77, 97, 100, 101, 32, 119, 105, 116, 104, 32, 71, 73,\n\t\t\t\t77, 80, 0, 33, -7, 4, 1, 10, 0, 8, 0, 44, 0, 0, 0, 0, 16, 0,\n\t\t\t\t16, 0, 0, 4, 92, 16, 73, 9, -24, -84, 51, 99, 84, 119, -106, 1,\n\t\t\t\t16, -124, -31, 7, 6, 2, -112, 10, -23, 24, 76, -63, 48, -90,\n\t\t\t\t-86, -8, 34, 119, 64, 12, -78, 27, -53, 56, 24, 97, -57, -29,\n\t\t\t\t13, 95, 55, 28, -95, 48, 100, 46, -111, -97, 0, 115, 122, 76,\n\t\t\t\t26, -82, -40, -31, 18, -104, -63, 94, -117, 50, -62, -31, 32,\n\t\t\t\t25, 123, 125, -53, 37, 25, -31, 53, 104, -99, 99, -55, 21, 113,\n\t\t\t\t-8, -14, -58, 107, -74, -95, -21, -5, -52, 77, -128, 17, 0, 59 };\n\t\treturn data;\n\t}", "private static final byte[] xfsg_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -77, 15, 0, 16,\n\t\t\t\t67, 118, -39, 99, 98, 59, 89, -124, -8, -47, 35, 122, -116,\n\t\t\t\t-109, -17, -114, 100, -16, -35, -75, -28, 81, 59, -27, -97,\n\t\t\t\t-106, -1, -32, 102, -1, -42, 36, -1, -42, 35, -1, -17, -65, -1,\n\t\t\t\t-43, 32, -31, 58, 62, -1, -1, -1, 33, -7, 4, 1, 0, 0, 15, 0,\n\t\t\t\t44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 4, 105, -16, -55, -87, -106,\n\t\t\t\t-86, 107, 106, -39, 84, 98, 76, 114, 109, -46, -14, -127, -88,\n\t\t\t\t-46, 108, 77, -29, 20, 6, 104, 16, 64, 75, -75, 78, 94, -48,\n\t\t\t\t64, -35, -107, 56, 71, -64, 1, 16, 20, 91, -103, -57, -94, 85,\n\t\t\t\t56, 4, 16, 4, -29, 0, 9, 108, -48, 4, 4, 68, -32, -48, 106, 36,\n\t\t\t\t-105, -115, -98, 81, -24, -32, 122, 31, -71, 52, -111, 80, -56,\n\t\t\t\t-103, 21, 18, -75, 3, 5, 42, -4, 38, 106, 58, 67, -91, -111,\n\t\t\t\t-97, 68, 112, 120, 14, 113, 14, 22, 24, 125, -125, 120, 36,\n\t\t\t\t-126, -117, -117, 17, 0, 59 };\n\t\treturn data;\n\t}", "public BufferedImage open(String id, int no)\n throws FormatException, IOException\n {\n if (!id.equals(currentId)) initFile(id);\n \n if (no < 0 || no >= getImageCount(id)) {\n throw new FormatException(\"Invalid image number: \" + no);\n }\n \n // First initialize:\n in.seek(offsets[no] + 12);\n byte[] toRead = new byte[4];\n in.read(toRead);\n int blockSize = batoi(toRead);\n toRead = new byte[1];\n in.read(toRead);\n // right now I'm gonna skip all the header info\n // check to see whether or not this is v2 data\n if (toRead[0] == 1) {\n in.skipBytes(128);\n }\n in.skipBytes(169);\n // read in the block of data\n toRead = new byte[blockSize];\n int read = 0;\n int left = blockSize;\n while (left > 0) {\n int i = in.read(toRead, read, left);\n read += i;\n left -= i;\n }\n byte[] pixelData = new byte[blockSize];\n int pixPos = 0;\n \n Dimension dim;\n try { dim = pictReader.getDimensions(toRead); }\n catch (Exception e) { dim = new Dimension(0, 0); }\n \n int length = toRead.length;\n int num, size, blockEnd;\n int totalBlocks = -1; // set to allow loop to start.\n int expectedBlock = 0;\n int pos = 0;\n int imagePos = 0;\n int imageSize = dim.width * dim.height;\n short[] flatSamples = new short[imageSize];\n byte[] temp;\n boolean skipflag;\n \n // read in deep grey pixel data into an array, and create a\n // BufferedImage out of it\n //\n // First, checks the existence of a deep gray block. If it doesn't exist,\n // assume it is PICT data, and attempt to read it.\n \n // check whether or not there is deep gray data\n while (expectedBlock != totalBlocks) {\n skipflag = false;\n while (pos + 7 < length &&\n (toRead[pos] != 73 || toRead[pos + 1] != 86 ||\n toRead[pos + 2] != 69 || toRead[pos + 3] != 65 ||\n toRead[pos + 4] != 100 || toRead[pos + 5] != 98 ||\n toRead[pos + 6] != 112 || toRead[pos + 7] != 113))\n {\n pos++;\n }\n if (pos + 32 > length) { // The header is 32 bytes long.\n if (expectedBlock == 0 && imageType[no] < 9) {\n // there has been no deep gray data, and it is supposed\n // to be a pict... *crosses fingers*\n try { return pictReader.openBytes(toRead); }\n catch (Exception e) {\n e.printStackTrace();\n throw new FormatException(\"No iPic comment block found\", e);\n }\n }\n else {\n throw new FormatException(\"Expected iPic comment block not found\");\n }\n }\n \n pos += 8; // skip the block type we just found\n \n // Read info from the iPic comment. This serves as a\n // starting point to read the rest.\n temp = new byte[] {\n toRead[pos], toRead[pos+1], toRead[pos+2], toRead[pos+3]\n };\n num = batoi(temp);\n if (num != expectedBlock) {\n throw new FormatException(\"Expected iPic block not found\");\n }\n expectedBlock++;\n temp = new byte[] {\n toRead[pos+4], toRead[pos+5], toRead[pos+6], toRead[pos+7]\n };\n if (totalBlocks == -1) {\n totalBlocks = batoi(temp);\n }\n else {\n if (batoi(temp) != totalBlocks) {\n throw new FormatException(\"Unexpected totalBlocks numbein.read\");\n }\n }\n \n // skip to size\n pos += 16;\n temp = new byte[] {\n toRead[pos], toRead[pos+1], toRead[pos+2], toRead[pos+3]\n };\n size = batoi(temp);\n pos += 8;\n blockEnd = pos + size;\n \n // copy into our data array.\n System.arraycopy(toRead, pos, pixelData, pixPos, size);\n pixPos += size;\n }\n int pixelValue = 0;\n pos = 0;\n \n // Now read the data and wrap it in a BufferedImage\n \n while (true) {\n if (pos + 1 < pixelData.length) {\n pixelValue = pixelData[pos] < 0 ? 256 + pixelData[pos] :\n (int) pixelData[pos] << 8;\n pixelValue += pixelData[pos + 1] < 0 ? 256 + pixelData[pos + 1] :\n (int) pixelData[pos + 1];\n }\n else throw new FormatException(\"Malformed LIFF data\");\n flatSamples[imagePos] = (short) pixelValue;\n imagePos++;\n if (imagePos == imageSize) { // done, return it\n return ImageTools.makeImage(flatSamples,\n dim.width, dim.height, 1, false);\n }\n }\n }", "public byte[] encode(RenderedImage image) throws java.io.IOException;", "public PixImage toPixImage() {\n // Replace the following line with your solution.\n\t PixImage image=new PixImage(getWidth(),getHeight());\n\t \n\t DList<int[]> runs_new=new DList<int[]>();\n\t\t\t for(RunIterator i=this.iterator();i.hasNext();) {\n\t\t\t int[] run = i.next();\n\t\t\t for (int t= 0; t < run[0]; t++) {\n\t\t\t \t runs_new.addLast(run);\n\t\t\t System.out.print(\"(\" + run[1]+\" \"+ run[2]+\" \"+run[3]+\")\");\n\t\t } \n\t }\t\n int position=1;\n for(int j=0;j<height;j++) {\n\t for(int i=0;i<width;i++) {\n\t\t\n\t\t DListNode<int[]> run_new=runs_new.nth(position);\n\t\t position++;\n\t\t \n\t\t image.setPixel(i, j, (short) run_new.item[1], (short) run_new.item[2], (short) run_new.item[3]);\n\t }\n }\n\t\t \n\t\t \n\t return image;\n }", "public Texture createTexture(int width, int height, int filter) throws IOException {\n/* 372 */ ImageData ds = new EmptyImageData(width, height);\n/* */ \n/* 374 */ return getTexture(ds, filter);\n/* */ }", "public byte[] getImageBytes()\n {\n byte[] buff = null;\n \n try\n {\n ByteArrayOutputStream bos = new ByteArrayOutputStream() ;\n ImageIO.write(img, \"jpg\", bos);\n buff = bos.toByteArray();\n bos.flush();\n bos.close();\n }\n catch(Exception ex)\n {\n System.out.println(\"Problem Serializeing PicNode\");\n ex.printStackTrace();\n }\n return buff;\n }", "@Override\n\tpublic int createGoods(Goods goods, InputStream fileStream) {\n\t\tString path =\"D:\\\\localFiles\\\\\";\n\t\tint i =-1;\n\t\tbyte[]bs = new byte[1024];\n\t\t//读取数据长度\n\t\tint len;\n\t\t\t//输出的文件流保存到本地文件\n\t\ttry {\n\t\t\tFile tempFile = new File(path);\n\t\t\tif(!tempFile.exists()) {\n\t\t\t\ttempFile.mkdir();\n\t\t\t}\n\t\t\tgoods.getGdImage();\n\t\t\tDate today= new Date();\n\t\t\tString fileName = today.getTime()+goods.getGdImage();\n\t\t\tgoods.setGdImage(\"/Images/\"+fileName);\n\t\t\tOutputStream gd = new FileOutputStream(tempFile.getPath()+ File.separator +fileName);\n\t\t\t//开始读取\n\t\t\twhile((len = fileStream.read(bs))!= -1) {\n\t\t\t\tgd.write(bs,0,len);\n\t\t\t}\n\t\t\t}catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\ti= -2;\n\t\t\t}\n\t\tif(goods.getGdImage().equals(\"\")) {\n\t\t\ti=-3;\n\t\t}else {\n\t\t\t//调用mapper 将goods存入数据库\n\t\t\tgoodsMapper.insertGoods(goods);\n\t\t}\n\t\t\t\n\t\treturn 0;\n\t\t\n\t}", "public File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.US).format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = new File(getPhotoLocation());\n File image = File.createTempFile(\n imageFileName,\n \".jpg\",\n storageDir\n );\n\n setCurrentPhotoFile(image.getAbsolutePath());\n return image;\n }", "private Image ConvertirImagen(byte[] bytes) throws IOException {\n ByteArrayInputStream bis = new ByteArrayInputStream(bytes);\n Iterator readers = ImageIO.getImageReadersByFormatName(\"jpeg\");\n ImageReader reader = (ImageReader) readers.next();\n Object source = bis;\n ImageInputStream iis = ImageIO.createImageInputStream(source);\n reader.setInput(iis, true);\n ImageReadParam param = reader.getDefaultReadParam();\n return reader.read(0, param);\n }", "private byte[] composeJPG(BufferedImage[] rgbBufferedImages) {\r\n\t\t// blue (index 2) is always available\r\n\t\tint width = rgbBufferedImages[BLUE_INDEX].getWidth();\r\n\t\tint height = rgbBufferedImages[BLUE_INDEX].getHeight();\r\n\t\tBufferedImage rgbImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\r\n\t\tint alpha = 0xFF;\r\n\t\tfor (int x = 0; x < width; x++) {\r\n\t\t\tfor(int y = 0; y < height; y++) {\r\n\t\t\t\tint red = rgbBufferedImages[RED_INDEX] != null ? rgbBufferedImages[RED_INDEX].getRGB(x, y) & 0xFF : 0;\r\n\t\t\t\tint green = rgbBufferedImages[GREEN_INDEX] != null ? rgbBufferedImages[GREEN_INDEX].getRGB(x, y) & 0xFF : 0;\r\n\t\t\t\tint blue = rgbBufferedImages[BLUE_INDEX].getRGB(x, y) & 0xFF;\r\n\t\t\t\trgbImage.setRGB(x, y, (alpha << 24) | (red << 16) | (green << 8) | blue);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbyte[] imageByteArray;\r\n\t\ttry(ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {\r\n\t\t\tImageIO.write( rgbImage, \"jpg\", byteArrayOutputStream );\r\n\t\t\tbyteArrayOutputStream.flush();\r\n\t\t\timageByteArray = byteArrayOutputStream.toByteArray();\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new ImageNotFoundException(\"Output image could not be created.\");\r\n\t\t}\r\n\t\treturn imageByteArray;\r\n\t}", "public Image generate() {\n generateStripes(rainbow, 7, vertical);\n return new ImageRGB(data);\n }", "public BufferedImage buildBufferedImage(Dimension size) {\n/* 101 */ return new BufferedImage(size.width, size.height, 1);\n/* */ }", "private static byte[] createByteArray(byte[] y_1, byte[] x_1, byte[] y_0,\n\t\t\tbyte[] x_0, byte[] ybyte, byte[] psi) {\n\t\tint length = y_1.length + x_1.length + y_0.length + x_0.length\n\t\t\t\t+ ybyte.length + psi.length;\n\t\tbyte[] array = new byte[length];\n\t\tSystem.arraycopy(y_1, 0, array, 0, y_1.length);\n\t\tint temp = 0 + y_1.length;\n\t\tSystem.arraycopy(x_1, 0, array, (temp), x_1.length);\n\t\ttemp = temp + x_1.length;\n\t\tSystem.arraycopy(y_0, 0, array, (temp), y_0.length);\n\t\ttemp = temp + y_0.length;\n\t\tSystem.arraycopy(x_0, 0, array, (temp), x_0.length);\n\t\ttemp = temp + x_0.length;\n\t\tSystem.arraycopy(ybyte, 0, array, (temp), ybyte.length);\n\t\ttemp = temp + ybyte.length;\n\t\tSystem.arraycopy(psi, 0, array, (temp), psi.length);\n\n\t\treturn array;\n\t}", "@Override\n public byte[] getBytes(EscPosImage image) {\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n //\n bytes.write(ESC);\n bytes.write('a');\n bytes.write(justification.value);\n //\n int paramSize = image.getRasterSizeInBytes() + 10;\n int pL = paramSize & 0xFF;\n int pH = (paramSize & 0xFF00) >> 8 ;\n\n bytes.write(GS);\n bytes.write('(');\n bytes.write('L');\n bytes.write(pL); // pl\n bytes.write(pH); // ph\n bytes.write(48); // m\n bytes.write(112); //fn\n bytes.write(48); // a\n bytes.write(graphicsImageBxBy.bx); // bx\n bytes.write(graphicsImageBxBy.by); // by\n bytes.write(49); // c\n\n // bits in horizontal direction for the bit image\n int horizontalBits = image.getWidthOfImageInBits();\n int xL = horizontalBits & 0xFF;\n int xH = (horizontalBits & 0xFF00) >> 8 ;\n // \n // bits in vertical direction for the bit image\n int verticalBits = image.getHeightOfImageInBits();\n // getting first and second bytes separatted\n int yL = verticalBits & 0xFF;\n int yH = (verticalBits & 0xFF00) >> 8 ;\n \n bytes.write(xL);\n bytes.write(xH);\n bytes.write(yL);\n bytes.write(yH);\n // write bytes\n byte [] rasterBytes = image.getRasterBytes().toByteArray();\n bytes.write(rasterBytes,0,rasterBytes.length);\n \n // function 050\n bytes.write(GS);\n bytes.write('(');\n bytes.write('L');\n bytes.write(2); // pl\n bytes.write(0); // ph\n bytes.write(48); //m\n bytes.write(50); //fn\n \n \n \n\n //\n return bytes.toByteArray();\n \n }", "private static BufferedImage jpegToGif(BufferedImage image) {\n\t\t\r\n\t\tBufferedImage gifImage = image;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tImageIO.write(image, \"gif\", new File(\"temp.gif\"));\r\n\t\t\tgifImage = ImageIO.read(new File(\"temp.gif\"));\r\n\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t\r\n\t\treturn gifImage;\r\n\t}", "public interface Graphics {\n public static enum ImageFormat {\n ARGB8888, ARGB4444, RGB565\n }\n\n public Bitmap newImage(String fileName, ImageFormat format);\n\n}", "private BufferedImage createCharImage(char character) {\n\t\tBufferedImage image = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);\r\n\t\tGraphics2D graphics = image.createGraphics();\r\n\t\t\r\n\t\tif (antiAliasing) {\r\n\t\t\tgraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n\t\t}\r\n\t\t\r\n\t\tgraphics.setFont(font);\r\n\t\tFontMetrics metrics = graphics.getFontMetrics();\r\n\t\tgraphics.dispose();\r\n\t\t\r\n\t\tint charWidth = metrics.charWidth(character);\r\n\t\tint charHeight = metrics.getHeight();\r\n\t\t\r\n\t\t// Character not represented in provided font\r\n\t\tif (charWidth == 0) return null;\r\n\t\t\r\n\t\t// Generate character image\r\n\t\timage = new BufferedImage(charWidth, charHeight, BufferedImage.TYPE_INT_ARGB);\r\n\t\tgraphics = image.createGraphics();\r\n\t\t\r\n\t\tif (antiAliasing) {\r\n\t\t\tgraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n\t\t}\r\n\t\t\r\n\t\tgraphics.setFont(font);\r\n\t\tgraphics.setPaint(Color.WHITE);\r\n\t\tgraphics.drawString(String.valueOf(character), 0, metrics.getAscent());\r\n\t\tgraphics.dispose();\r\n\t\t\r\n\t\treturn image;\r\n\t}", "public interface StoryFactory {\n Story createStory(Long id,String name, String tag, String text,long userId,byte[] image);\n\n}", "public abstract void setImageFormat(String format);", "private File createImageFile() throws IOException {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n File storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n\n return image;\n }", "private void loadJava(byte[] encodedData, int offset, int len, String file){\n try{\n PngReader reader = new PngReader();\n pixels = reader.read(new ByteArrayInputStream(encodedData, offset, len));\n width = reader.width;\n height = reader.height;\n handle = -1;\n pixels.position(0).limit(pixels.capacity());\n }catch(Exception e){\n throw new ArcRuntimeException(\"Failed to load PNG data\" + (file == null ? \"\" : \" (\" + file + \")\"), e);\n }\n }", "private static final byte[] xfsim_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -128,\n\t\t\t\t-128, -128, -64, -64, -64, 0, 0, 0, -1, -1, -1, 0, 0, -1, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 5, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 72, 88, -70,\n\t\t\t\t-36, 14, 48, -58, 23, -86, -83, 64, 48, 48, -70, -17, -112,\n\t\t\t\t-74, 112, 66, 105, 14, -31, 54, 8, 68, -37, -94, -103, -54,\n\t\t\t\t-70, 4, 44, 42, 36, 93, -89, -29, -9, 101, -112, -111, 105, 88,\n\t\t\t\t2, 4, 68, 28, -97, -57, 24, 43, -124, -128, 2, 104, -54, 40,\n\t\t\t\t56, 90, -85, 88, 77, 82, -23, 57, 42, -120, -32, -110, 99, -20,\n\t\t\t\t72, 0, 0, 59 };\n\t\treturn data;\n\t}", "public int getImage();", "private byte[] getImage(){\n byte image[] = null;\n try {\n if(isImageGiven()) {\n image = getImageBytes();\n }\n }catch (IOException e){\n Toast.makeText(this,\"Error in Creating the image \"+e, Toast.LENGTH_SHORT).show();\n }\n return image;\n }", "private byte[] PPMfile() {\n StringBuilder Finald = new StringBuilder();\n Finald.append(\"P6\");\n Finald.append(\"\\n\");\n Finald.append(width);\n Finald.append(\" \");\n Finald.append(height);\n Finald.append(\"\\n\");\n Finald.append(255);\n Finald.append(\"\\n\");\n for (int x = 0; x < height; ++x) {\n for (int y = 0; y < width; ++y) {\n char auxe = (char) FinalR[x][y];\n Finald.append(auxe);\n auxe = (char) FinalG[x][y];\n Finald.append(auxe);\n auxe = (char) FinalB[x][y];\n Finald.append(auxe);\n }\n }\n String Finaldes = Finald.toString();\n return Finaldes.getBytes();\n }" ]
[ "0.6211517", "0.6100619", "0.603991", "0.5932138", "0.5872687", "0.57740194", "0.5770877", "0.5701959", "0.56324387", "0.56017375", "0.55631274", "0.5497082", "0.5485659", "0.54466414", "0.5429241", "0.53984463", "0.53928065", "0.5361855", "0.5289947", "0.5262606", "0.5251711", "0.5249909", "0.52437675", "0.5221195", "0.52206546", "0.5175276", "0.51598895", "0.5153755", "0.5129607", "0.51147205", "0.5103798", "0.5094393", "0.5086475", "0.50806946", "0.50743955", "0.50667834", "0.5066723", "0.5050313", "0.5049161", "0.50481355", "0.5033132", "0.5033103", "0.50187355", "0.50028753", "0.5002802", "0.50004387", "0.4994639", "0.49905518", "0.49897596", "0.49897596", "0.49846575", "0.49834844", "0.4957022", "0.4950182", "0.49430972", "0.49425462", "0.49373218", "0.49363676", "0.49359924", "0.4933678", "0.49293783", "0.4927111", "0.49249357", "0.49246052", "0.49160495", "0.4913735", "0.49015805", "0.49005312", "0.48843136", "0.4883741", "0.48709875", "0.48633337", "0.48591858", "0.48545817", "0.4852172", "0.48432764", "0.48268947", "0.4824938", "0.48245612", "0.48173428", "0.48121947", "0.48081005", "0.48046893", "0.47946352", "0.4778904", "0.47776562", "0.47770074", "0.47768018", "0.4775906", "0.47733217", "0.47693917", "0.47639632", "0.47623143", "0.47604346", "0.47572276", "0.47568005", "0.47563836", "0.474759", "0.47469896", "0.47446376", "0.47398043" ]
0.0
-1
Executed jpegconv and return the bug number triggered if any
private int executeProgram() { int bugNumber = 0; // running a command in java String command = "./jpegconv -ppm -outfile " + this.ppmName + " " + this.sampleName; Process child = null; try { child = Runtime.getRuntime().exec(command); child.waitFor(); } catch (IOException e) { System.err.println("Unable to execute the command: " + command); return -2; } catch (InterruptedException e) { System.err.println("Unable to wait for the command: " + command); return -2; } // Extract the output of the program InputStream inputstream = child.getErrorStream(); InputStreamReader inputstreamreader = new InputStreamReader(inputstream); BufferedReader bufferedreader = new BufferedReader(inputstreamreader); // Read the output of the program String line; boolean error = false; try { while ((line = bufferedreader.readLine()) != null) { error = true; // Reg expression to check if any bug was triggered if (line.matches("BUG \\d+ TRIGGERED")) { bugNumber = Integer.parseInt(line.replaceAll("[^\\d]", "")); break; } } inputstream.close(); inputstreamreader.close(); bufferedreader.close(); } catch (IOException e1) { e1.printStackTrace(); } // Return -1 if another bug was triggered if (error && bugNumber == 0) bugNumber = -1; child.destroy(); return bugNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int wkhtmltoimage_http_error_code(PointerByReference converter);", "private byte[] JPEGFile(Map<Integer, Integer> freqY, Map<Integer, Integer> freqCb, Map<Integer, Integer> freqCr, String Yen, String Cben, String Cren) {\n String sizeY = Integer.toBinaryString(freqY.size());\n String sizeCB = Integer.toBinaryString(freqCb.size());\n String sizeCR = Integer.toBinaryString(freqCr.size());\n String calidadE = Integer.toBinaryString(quality);\n String widthE = Integer.toBinaryString(width);\n String heightE = Integer.toBinaryString(height);\n String sizeYc = Integer.toBinaryString(Yen.length());\n String sizeCBc = Integer.toBinaryString(Cben.length());\n String sizeCRc = Integer.toBinaryString(Cren.length());\n while (calidadE.length() < 8) calidadE = \"0\" + calidadE;\n while (widthE.length() < 16) widthE = \"0\" + widthE;\n while (heightE.length() < 16) heightE = \"0\" + heightE;\n while (sizeY.length() < 32) sizeY = \"0\" + sizeY;\n while (sizeCB.length() < 32) sizeCB = \"0\" + sizeCB;\n while (sizeCR.length() < 32) sizeCR = \"0\" + sizeCR;\n while (sizeYc.length() < 32) sizeYc = \"0\" + sizeYc;\n while (sizeCBc.length() < 32) sizeCBc = \"0\" + sizeCBc;\n while (sizeCRc.length() < 32) sizeCRc = \"0\" + sizeCRc;\n String result = calidadE + widthE + heightE + sizeY + sizeCB + sizeCR + sizeYc + sizeCBc + sizeCRc;\n String result2 = FY.toString() + FCB.toString() + FCR.toString();\n String result3 = Yen.toString() + Cben.toString() + Cren.toString();\n byte[] a = Utils.toByteArray2(result);\n byte[] b = result2.getBytes();\n byte[] c = Utils.toByteArray2(result3);\n byte[] code1 = new byte[a.length + b.length];\n System.arraycopy(a, 0, code1, 0, a.length);\n System.arraycopy(b, 0, code1, a.length, b.length);\n byte[] finalcode = new byte[code1.length + c.length];\n System.arraycopy(code1, 0, finalcode, 0, code1.length);\n System.arraycopy(c, 0, finalcode, code1.length, c.length);\n return finalcode;\n }", "public native int getFilter() throws MagickException;", "int wkhtmltoimage_phase_count(PointerByReference converter);", "int wkhtmltoimage_current_phase(PointerByReference converter);", "public native int getRenderingIntent() throws MagickException;", "NativeLong wkhtmltoimage_get_output(PointerByReference converter, PointerByReference charPtrPtr1);", "public native int getCompression() throws MagickException;", "public native int getNumFrames() throws MagickException;", "public void execute()\r\n/* 31: */ throws GlobalException\r\n/* 32: */ {\r\n/* 33: 37 */ if (this.input.getCDim() != 1) {\r\n/* 34: 37 */ throw new GlobalException(\"Sorry, only mono-channel images for now...\");\r\n/* 35: */ }\r\n/* 36: 39 */ this.xdim = this.input.getXDim();\r\n/* 37: 40 */ this.ydim = this.input.getYDim();\r\n/* 38: */ \r\n/* 39: 42 */ this.output = new ArrayList();\r\n/* 40: */ \r\n/* 41: 44 */ this.temp = new BooleanImage(this.input, false);\r\n/* 42: 45 */ this.temp.fill(false);\r\n/* 43: */ \r\n/* 44: 47 */ this.temp2 = new BooleanImage(this.input, false);\r\n/* 45: 48 */ this.temp2.fill(false);\r\n/* 46: */ \r\n/* 47: 50 */ this.s = new Stack();\r\n/* 48: */ \r\n/* 49: 52 */ this.list2 = new ArrayList();\r\n/* 50: */ \r\n/* 51: 54 */ this.output = extractCC(this.seed, this.input);\r\n/* 52: */ }", "@Test\n public void testCCOIllegalArgument() throws IOException {\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/cco-illegalargument-rgb-coated-fogra27.jpg\")));\n\n assertEquals(281, reader.getWidth(0));\n assertEquals(449, reader.getHeight(0));\n\n BufferedImage image = reader.read(0);\n\n assertNotNull(image);\n assertEquals(281, image.getWidth());\n assertEquals(449, image.getHeight());\n\n // TODO: Need to test colors!\n reader.dispose();\n }", "public void foreachJPEGcompareWithJPEG(ParameterHelper _aParam)\n {\n // TODO: auslagern in eine function, die ein Interface annimmt.\n String sInputPath = _aParam.getInputPath();\n File aInputPath = new File(sInputPath);\n// if (!aInputPath.exists())\n// {\n// GlobalLogWriter.println(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\");\n// assure(\"Error, InputPath or File in InputPath doesn't exists. Please check: '\" + sInputPath + \"'\", false);\n// }\n if (aInputPath.isDirectory())\n {\n // check a whole directory\n // a whole directory\n FileFilter aFileFilter = FileHelper.getFileFilterJPEG();\n traverseDirectory(aFileFilter, _aParam);\n }\n else\n {\n // the inputpath contains a file\n if (sInputPath.toLowerCase().endsWith(\".ini\"))\n {\n IniFile aIniFile = new IniFile(_aParam.getInputPath());\n while (aIniFile.hasMoreElements())\n {\n String sSection = (String)aIniFile.nextElement();\n// TODO: not supported yet.\n // callEveryPictureInIniFile(aIniFile, sSection, _aParam);\n }\n }\n else\n {\n // call for a single jpeg file\n try\n {\n String sOutputFilename = _aParam.getOutputPath();\n if (sInputPath.toLowerCase().endsWith(\".jpg\") ||\n sInputPath.toLowerCase().endsWith(\".jpeg\") )\n {\n checkOneFile(sInputPath, sOutputFilename, _aParam);\n }\n else\n {\n // check if there exists a ini file\n String sPath = FileHelper.getPath(sInputPath); \n String sBasename = FileHelper.getBasename(sInputPath);\n\n runThroughEveryReportInIndex(sPath, sBasename, _aParam);\n \n String sStatusRunThrough = (String)_aParam.getTestParameters().get(\"last_state\");\n String sStatusInfo = (String)_aParam.getTestParameters().get(\"last_info\");\n\n if (sStatusRunThrough != null &&\n sStatusInfo != null )\n {\n // store the bad status in the <Name>.odb.ps.ini file \n String sOutputPath = _aParam.getOutputPath();\n String sBasenameIni = FileHelper.appendPath(sOutputPath, sBasename + \".ps.ini\");\n IniFile aBasenameIni = new IniFile(sBasenameIni);\n aBasenameIni.insertValue(\"global\", \"state\", sStatusRunThrough);\n aBasenameIni.insertValue(\"global\", \"info\", sStatusInfo); \n aBasenameIni.close();\n }\n \n }\n }\n catch (OfficeException e)\n {\n // TODO: unhandled yet.\n GlobalLogWriter.println(\"Warning: caught OfficeException \" + e.getMessage());\n }\n // callEntry(sInputPath, _aParam);\n }\n }\n }", "void wkhtmltoimage_set_error_callback(PointerByReference converter, wkhtmltoimage_str_callback cb);", "void wkhtmltoimage_set_phase_changed_callback(PointerByReference converter, wkhtmltoimage_void_callback cb);", "@Test\n public void testICCDuplicateSequence() throws IOException {\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/invalid-icc-duplicate-sequence-numbers-rgb-internal-kodak-srgb-jfif.jpg\")));\n\n assertEquals(345, reader.getWidth(0));\n assertEquals(540, reader.getHeight(0));\n\n BufferedImage image = reader.read(0);\n\n assertNotNull(image);\n assertEquals(345, image.getWidth());\n assertEquals(540, image.getHeight());\n\n reader.dispose();\n }", "void wkhtmltoimage_set_progress_changed_callback(PointerByReference converter, wkhtmltoimage_int_callback cb);", "public static void main(String args[]) {\n\t\tString destination = \"C:\\\\Users\\\\VIIPL02\\\\Desktop\\\\hii\\\\kk_(1).jpg\";\n\t\t//System.out.println(destination);\n\t\t int index1= destination.lastIndexOf(\"_(\");\n \t int index2= destination.lastIndexOf(\")\");\n \t String rig_val=\"\";\n\t\t for(int k=2;k<(index2-index1);k++)\n \t\t rig_val=rig_val+destination.charAt(index1+k)+\"\";\n\t\t \n\t\t \n\t\t //System.out.println(rig_val);\n\t\tfor(int i=0;i<10000000;i++) {\n//\t\tdestination= destination.replace(\"_(\"+(destination.charAt((destination.lastIndexOf(\"(\")+1)))+\")\",\"_(\"+((Integer.parseInt((destination.charAt((destination.lastIndexOf(\"(\")+1)))+\"\" ))+1)+\")\").replace(\"_(\"+(destination.charAt((destination.lastIndexOf(\"(\")+1)))+\")\",\"_(\"+((Integer.parseInt((destination.charAt((destination.lastIndexOf(\"(\")+1)))+\"\" ))+1)+\")\");\n\t\t\t\n\t\t\n\t\t\tdestination=destination.replace(\"_(\"+rig_val+\")\",\"_(\"+(Integer.parseInt(rig_val)+1)+\")\");\n\t\t\trig_val=\"\"+(Integer.parseInt(rig_val)+1);\n\t\t\t//System.out.println(destination);\n\t\t}\n//\t\t //System.out.println( destination.replace(\"_(\"+(destination.charAt((destination.lastIndexOf(\"(\")+1)))+\")\",\"_(\"+((Integer.parseInt((destination.charAt((destination.lastIndexOf(\"(\")+1)))+\"\" ))+1)+\")\"));\n\n\t\t//System.out.println(\"completed\");\n\t}", "public static void lukisImej(BufferedImage image_dest) {\n int w = image_dest.getWidth();\n int h = image_dest.getHeight();\n\n//\t\tfor(int y=0; y<h;y++)\n//\t\t{\n//\t\t\tfor(int x =0 ; x<w; x++)\n//\t\t\t{\n//\t\t\t\tif(image_dest.getRGB(x, y)==-1)\n//\t\t\t\t\tSystem.out.print(\"1\");\n//\t\t\t\telse\n//\t\t\t\t{\n//\t\t\t\t\t//System.err.print(\"X\"+x+\" Y : \"+y);\n//\t\t\t\t\t//return;\n//\t\t\t\t\tSystem.out.print(\"0\");\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tSystem.out.println(\"\");\n//\t\t}\n\n }", "private void c()\r\n/* 81: */ {\r\n/* 82: */ BufferedImage localBufferedImage;\r\n/* 83: */ try\r\n/* 84: */ {\r\n/* 85:102 */ localBufferedImage = cuj.a(bsu.z().O().a(this.g).b());\r\n/* 86: */ }\r\n/* 87: */ catch (IOException localIOException)\r\n/* 88: */ {\r\n/* 89:104 */ throw new RuntimeException(localIOException);\r\n/* 90: */ }\r\n/* 91:107 */ int i1 = localBufferedImage.getWidth();\r\n/* 92:108 */ int i2 = localBufferedImage.getHeight();\r\n/* 93:109 */ int[] arrayOfInt = new int[i1 * i2];\r\n/* 94:110 */ localBufferedImage.getRGB(0, 0, i1, i2, arrayOfInt, 0, i1);\r\n/* 95: */ \r\n/* 96:112 */ int i3 = i2 / 16;\r\n/* 97:113 */ int i4 = i1 / 16;\r\n/* 98: */ \r\n/* 99:115 */ int i5 = 1;\r\n/* 100: */ \r\n/* 101:117 */ float f1 = 8.0F / i4;\r\n/* 102:119 */ for (int i6 = 0; i6 < 256; i6++)\r\n/* 103: */ {\r\n/* 104:120 */ int i7 = i6 % 16;\r\n/* 105:121 */ int i8 = i6 / 16;\r\n/* 106:123 */ if (i6 == 32) {\r\n/* 107:124 */ this.d[i6] = (3 + i5);\r\n/* 108: */ }\r\n\t\t\t\t\tint i9;\r\n/* 109:127 */ for (i9 = i4 - 1; i9 >= 0; i9--)\r\n/* 110: */ {\r\n/* 111:129 */ int i10 = i7 * i4 + i9;\r\n/* 112:130 */ int i11 = 1;\r\n/* 113:131 */ for (int i12 = 0; (i12 < i3) && (i11 != 0); i12++)\r\n/* 114: */ {\r\n/* 115:132 */ int i13 = (i8 * i4 + i12) * i1;\r\n/* 116:134 */ if ((arrayOfInt[(i10 + i13)] >> 24 & 0xFF) != 0) {\r\n/* 117:135 */ i11 = 0;\r\n/* 118: */ }\r\n/* 119: */ }\r\n/* 120:138 */ if (i11 == 0) {\r\n/* 121: */ break;\r\n/* 122: */ }\r\n/* 123: */ }\r\n/* 124:142 */ i9++;\r\n/* 125: */ \r\n/* 126: */ \r\n/* 127:145 */ this.d[i6] = ((int)(0.5D + i9 * f1) + i5);\r\n/* 128: */ }\r\n/* 129: */ }", "public native double testyolo(String imgfile);", "private static native String detectAndDecode_0(long nativeObj, long img_nativeObj, long points_nativeObj, long straight_code_nativeObj);", "public native String getMagick() throws MagickException;", "public static String convertImageInStdout(String mscgen_path, String codePath){\n\t\t\n\t\tProcessBuilder pb = new ProcessBuilder(); \n\t\tif (mscgen_path == \"MSCGEN PATH EMPTY\") {\n\t\t\treturn \"0\"+\",ERROR:\" +\"MSCGen compiler path not set.\";\n\t\t}\n\t\t\n\t\telse if (mscgen_path == \"MSCGEN EXE NOT FOUND\") {\n\t\t\t \n\t\t\treturn \"0\"+\",ERROR:\" +\"MSCGen compiler not found.\";\n\t\t}\n String OS = System.getProperty(\"os.name\");\n if(OS.startsWith(\"Windows\")){\n codePath = codePath.replace(\"\\\\\",\"\\\\\\\\\");\n /* \n * Ref: PLUG-5262\n * In case of windows environment if we have space in-between the compiler path \n * then we need to set parent directory as the directory of ProcessBuilder. \n */\n File f = new File(mscgen_path);\n pb.directory(f.getParentFile());\n pb.command(\"cmd.exe\", \"/c\",f.getName(),\"-T\",\"png\",\"-i\",codePath);\n }else{\n pb.command(mscgen_path,\"-T\",\"png\",\"-i\",codePath); \n }\n Process p = null;\n\t\ttry {\n\t\t\tp = pb.start();\n\t\t\tp.waitFor();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\tString error=checkError(p);\n\t\tif(error!=\"\"){\n\t\t\treturn getErrorLine(error)+\",ERROR:\"+error;\n\t\t}\n\t\tBufferedImage image=null;\t\n\t\ttry {\n File f = new File(codePath+\".png\");\n\t\t\timage=ImageIO.read(f);\n \n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO exception in read\");\n\t\t} \n String imageString = null;\n ByteArrayOutputStream imageInBytes = new ByteArrayOutputStream();\n\t try {\n\t\t\tImageIO.write(image, \"png\", imageInBytes);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO exception in write\");\n\t\t}\n\t byte[] imageBytes = imageInBytes.toByteArray();\n\t imageString = DatatypeConverter.printBase64Binary(imageBytes);\n\t try {\n\t\t\timageInBytes.close();\n\t\t\tp.getInputStream().close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO exception in close\");\n }\n\t\treturn imageString;\n\t}", "public native boolean gammaImage(String gamma) throws MagickException;", "Picture identifyComponentImage() throws Exception;", "@Override\n\tpublic boolean run(JEXEntry entry, HashMap<String,JEXData> inputs)\n\t{\n\t\t// Collect the inputs\n\t\tJEXData imageData = inputs.get(\"Image\");\n\t\timageData.getDataMap();\n\t\tif(imageData == null || !imageData.getTypeName().getType().matches(JEXData.IMAGE))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Gather parameters\n\t\tdouble oldMin = Double.parseDouble(this.parameters.getValueOfParameter(\"Old Min\"));\n\t\tdouble oldMax = Double.parseDouble(this.parameters.getValueOfParameter(\"Old Max\"));\n\t\tdouble newMin = Double.parseDouble(this.parameters.getValueOfParameter(\"New Min\"));\n\t\tdouble newMax = Double.parseDouble(this.parameters.getValueOfParameter(\"New Max\"));\n\t\tdouble gamma = Double.parseDouble(this.parameters.getValueOfParameter(\"Gamma\"));\n\t\tint bitDepth = Integer.parseInt(this.parameters.getValueOfParameter(\"Output Bit Depth\"));\n\t\t\n\t\t// Run the function\n\t\tTreeMap<DimensionMap,String> imageMap = ImageReader.readObjectToImagePathTable(imageData);\n\t\tTreeMap<DimensionMap,String> outputImageMap = new TreeMap<DimensionMap,String>();\n\t\tint count = 0, percentage = 0;\n\t\tString tempPath;\n\t\tfor (DimensionMap map : imageMap.keySet())\n\t\t{\n\t\t\tif(this.isCanceled())\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttempPath = saveAdjustedImage(imageMap.get(map), oldMin, oldMax, newMin, newMax, gamma, bitDepth);\n\t\t\tif(tempPath != null)\n\t\t\t{\n\t\t\t\toutputImageMap.put(map, tempPath);\n\t\t\t}\n\t\t\tcount = count + 1;\n\t\t\tpercentage = (int) (100 * ((double) (count) / ((double) imageMap.size())));\n\t\t\tJEXStatics.statusBar.setProgressPercentage(percentage);\n\t\t}\n\t\tif(outputImageMap.size() == 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tJEXData output1 = ImageWriter.makeImageStackFromPaths(this.outputNames[0].getName(), outputImageMap);\n\t\t\n\t\t// Set the outputs\n\t\tthis.realOutputs.add(output1);\n\t\t\n\t\t// Return status\n\t\treturn true;\n\t}", "public native MagickImage flopImage() throws MagickException;", "String wkhtmltoimage_phase_description(PointerByReference converter, int phase);", "static void processPicture(byte[][] img) {\n\t\tcontrastImage(img);\n\t\t//generateDebugImage(img);\n\t\t\n\t\t\n\t\tPoint[] ergs = raster(img);\n\t\tprintPoints(ergs);\n\t\tergs = Cluster.cluster(ergs);\n\t\tprintPoints(ergs);\n\t\tBlume[] blumen = Radiuserkennung.erkennen(img, ergs);\n\t\t\n\t\t//Blumen veröffentlichen!\n\t\tDaten.setNewBlumen(blumen);\n\t\t\n\t\tprintBlumen(blumen);\n\t}", "public String GetCameraModel(String img){\n String console = null;\n String c_arg = null;\n String command = null;\n\n if( this.OS.contains(\"Windows\") ){\n console = \"cmd\";\n c_arg = \"/c\";\n command = PATH_TO_EXIFTOOL + \" \" + \"\\\"\"+img+\"\\\"\";\n }else{\n console = \"sh\";\n c_arg = \"-c\";\n command = PATH_TO_EXIFTOOL + \" \" + \"\\'\"+img+\"\\'\";\n }\n\n\n String line = null;\n try{\n IJ.log(PATH_TO_EXIFTOOL);\n IJ.log(command);\n IJ.log(this.OS);\n ProcessBuilder bob = new ProcessBuilder(console, c_arg, command);\n bob.redirectErrorStream(true);\n final Process proc = bob.start();\n\n BufferedReader proc_out = new BufferedReader( new InputStreamReader(proc.getInputStream()));\n\n do{\n line = proc_out.readLine();\n //IJ.log(line);\n\n\n if( line != null ){\n if( line.matches( \".*Survey2_(BLUE|RED|GREEN|RGB|IR|NDVI)\" )){\n break;\n }\n }\n\n //IJ.log(line);\n }while( line != null );\n\n }catch( IOException e){\n e.printStackTrace();\n }\n\n\n if( line.matches(\".*Survey2_BLUE\") ){\n return \"Survey2_BLUE\";\n }else if( line.matches(\".*Survey2_RED\") ){\n return \"Survey2_RED\";\n }else if( line.matches(\".*Survey2_GREEN\") ){\n return \"Survey2_GREEN\";\n }else if( line.matches(\".*Survey2_RGB\") ){\n return \"Survey2_RGB\";\n }else if( line.matches(\".*Survey2_IR\") ){\n return \"Survery2_IR\";\n }else if( line.matches(\".*Survery2_NDVI\") ){\n return \"Survey2_NDVI\";\n }else{\n return \"CAMERA_NOT_SUPPORTED\";\n }\n }", "public native int getImageType() throws MagickException;", "public native int getIterations() throws MagickException;", "public int getImage();", "int seachImage(Image img) {\r\n\t\treturn 1;\r\n\t}", "public native MagickImage minifyImage() throws MagickException;", "public native MagickImage enhanceImage() throws MagickException;", "private static native boolean imencode_0(String ext, long img_nativeObj, long buf_mat_nativeObj, long params_mat_nativeObj);", "void wkhtmltoimage_set_warning_callback(PointerByReference converter, wkhtmltoimage_str_callback cb);", "public RunLengthEncoding(PixImage image) {\n // Your solution here, but you should probably leave the following line\n // at the end.\n\t this.width=image.getWidth();\n\t this.height=image.getHeight();\n\t runs = new DList<int[]>(); \n\t \n\t int length_count=0;\n\t int cur_Color=-1;\n\t int prev_Color=-1;\n\t \n\t for(int j=0;j<image.getHeight();j++) {\t \n\t\t\t for(int i=0;i<image.getWidth();i++) {\n\t\t\t\tcur_Color=image.getRed(i, j); \n\t\t\t\tif (cur_Color!=prev_Color) {\n\t\t\t\t\tlength_count++;\n\t\t\t\t\tprev_Color=cur_Color;\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t }\n\t\t\t \n\t }\n\t int count=1;\n\t int[] red = new int[length_count];\n\t int[] green = new int[length_count];\n\t int[] blue = new int[length_count];\n\t int[] runLengths =new int[length_count];\n\t int t=0;\n\t red[0]=image.getRed(0, 0);\n\t green[0]=image.getGreen(0, 0);\n\t blue[0]=image.getBlue(0, 0);\n\t \n\t int passed_counter = 0;\n\t for(int j=0;j<image.getHeight();j++) {\n\t\t\t for(int i=0;i<image.getWidth();i++) {\n\t\t\t\t passed_counter++;\n\t\t\t\t if(i>0 || j>0) { // do not do anything for the first element\n\t\t\t\t\t if(image.getRed(i, j)!=red[t]) {\n\t\t\t\t\t\t runLengths[t]=count;\n\t\t\t\t\t\t count = 1;\n\t\t\t\t\t\t t++;\n\t\t\t\t\t\t runLengths[t]=image.getWidth()*image.getHeight() -passed_counter+1;\n\t\t\t\t\t\t red[t]=image.getRed(i, j);\n\t\t\t\t\t\t green[t]=image.getGreen(i, j);\n\t\t\t\t\t\tblue[t]=image.getBlue(i, j);\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 else {\n\t\t\t\t\t\t count++;\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t red[t]=image.getRed(i, j);\n\t\t\t\t\t green[t]=image.getGreen(i, j);\n\t\t\t\t\tblue[t]=image.getBlue(i, j);\n\t\t\t\t\t \n\t\t\t\t\n\t\t\t }\n\t }\t\n\t for(int i=0;i<red.length;i++) {\n\t\t\tint[] run= {runLengths[i],red[i],green[i],blue[i]};\n\t\t\t\n\t\t\tif(runs.isEmpty())\n\t\t\t{\n\t\t\t\t\n\t\t\t\truns.addFirst(run);\n\t\t\t}else {\n\t\t\t\tDListNode<int[]> v=runs.getLast();\n\t\t\t\truns.addAfter(v, run);\n\t\t\t} \n\t \n \n }\n\t check();\n }", "public interface wkhtmltoimage_int_callback extends Callback {\n\t\tvoid apply(Pointer converter, int val);\n\t}", "@Test\n public void test72() throws Throwable {\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\"+ pLI||2%b/S\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) subCategoryAxis0);\n CategoryAnchor categoryAnchor0 = combinedDomainCategoryPlot0.getDomainGridlinePosition();\n LegendItemCollection legendItemCollection0 = combinedDomainCategoryPlot0.getLegendItems();\n CategoryMarker categoryMarker0 = new CategoryMarker((Comparable) \"+ pLI||2%b/S\");\n combinedDomainCategoryPlot0.addDomainMarker(categoryMarker0);\n ValueAxis[] valueAxisArray0 = new ValueAxis[1];\n NumberAxis numberAxis0 = new NumberAxis();\n subCategoryAxis0.setTickMarksVisible(true);\n JFreeChart jFreeChart0 = new JFreeChart((Plot) combinedDomainCategoryPlot0);\n RenderingHints renderingHints0 = jFreeChart0.getRenderingHints();\n ColorConvertOp colorConvertOp0 = new ColorConvertOp(renderingHints0);\n // Undeclared exception!\n try { \n colorConvertOp0.filter((BufferedImage) null, (BufferedImage) null);\n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"java.awt.image.ColorConvertOp\", e);\n }\n }", "void wkhtmltoimage_set_finished_callback(PointerByReference converter, wkhtmltoimage_int_callback cb);", "@Test\n public void testICCDuplicateSequenceZeroBased() throws IOException {\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/invalid-icc-duplicate-sequence-numbers-rgb-xerox-dc250-heavyweight-1-progressive-jfif.jpg\")));\n\n assertEquals(3874, reader.getWidth(0));\n assertEquals(5480, reader.getHeight(0));\n\n ImageReadParam param = reader.getDefaultReadParam();\n param.setSourceRegion(new Rectangle(0, 0, 3874, 16)); // Save some memory\n BufferedImage image = reader.read(0, param);\n\n assertNotNull(image);\n assertEquals(3874, image.getWidth());\n assertEquals(16, image.getHeight());\n\n reader.dispose();\n }", "@Test\n public void testReadNoJFIFYCbCr() throws IOException {\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/no-jfif-ycbcr.jpg\")));\n\n assertEquals(310, reader.getWidth(0));\n assertEquals(206, reader.getHeight(0));\n\n ImageReadParam param = reader.getDefaultReadParam();\n param.setSourceRegion(new Rectangle(0, 0, 310, 8));\n BufferedImage image = reader.read(0, param);\n assertNotNull(image);\n assertEquals(310, image.getWidth());\n assertEquals(8, image.getHeight());\n\n int[] expectedRGB = new int[] {\n 0xff3c1b14, 0xff35140b, 0xff4b2920, 0xff3b160e, 0xff49231a, 0xff874e3d, 0xff563d27, 0xff926c61,\n 0xff350005, 0xff84432d, 0xff754f46, 0xff2c2223, 0xff422016, 0xff220f0b, 0xff251812, 0xff1c1209,\n 0xff483429, 0xff1b140c, 0xff231c16, 0xff2f261f, 0xff2e2923, 0xff170c08, 0xff383025, 0xff443b34,\n 0xff574a39, 0xff3b322b, 0xffeee1d0, 0xffebdecd, 0xffe9dccb, 0xffe8dbca, 0xffe7dcca,\n };\n\n // Validate strip colors\n for (int i = 0; i < image.getWidth() / 10; i++) {\n int actualRGB = image.getRGB(i * 10, 7);\n assertEquals((actualRGB >> 16) & 0xff, (expectedRGB[i] >> 16) & 0xff, 5);\n assertEquals((actualRGB >> 8) & 0xff, (expectedRGB[i] >> 8) & 0xff, 5);\n assertEquals((actualRGB) & 0xff, (expectedRGB[i]) & 0xff, 5);\n }\n }", "public byte[] doInBackground(byte[]... data) {\n byte[] originalJpegData;\n byte[] originalJpegData2 = data[0];\n if (PhotoModule.this.mActivity.getCameraAppUI().getBeautySeek() > 0.0f && PhotoModule.this.isSupportBeauty() && (PhotoModule.this.mCameraId == 0 || PhotoModule.this.mCameraId == 1)) {\n Size size = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n float seek = PhotoModule.this.mActivity.getCameraAppUI().getBeautySeek() / 20.0f;\n int angle = PhotoModule.this.mCameraId == 1 ? MediaProviderUtils.ROTATION_270 : 90;\n if (originalJpegData2 != null) {\n originalJpegData2 = BeautifyHandler.processImageNV21(PhotoModule.this.mActivity, originalJpegData2, size.width(), size.height(), seek, angle);\n }\n }\n PhotoModule.this.mActivity.getButtonManager().mBeautyEnable = true;\n Size size2 = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n PhotoModule.this.mIsAddWaterMark = PhotoModule.this.mCameraSettings.isAddWaterMarkEnabled();\n if (PhotoModule.this.mFinalDrCheckResult.size() <= 1) {\n Log.d(PhotoModule.TAG, \"start to jpeg\");\n originalJpegData = PhotoModule.this.convertN21ToJpeg(originalJpegData2, size2.width(), size2.height());\n Log.d(PhotoModule.TAG, \"end to jpeg\");\n } else {\n int result = PhotoModule.this.mImageRefiner.processImage();\n Tag access$500 = PhotoModule.TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"processImage result = \");\n stringBuilder.append(result);\n Log.d(access$500, stringBuilder.toString());\n byte[] output = new byte[originalJpegData2.length];\n if (result < 0) {\n output = (byte[]) PhotoModule.this.mAddedImages.get(0);\n } else {\n int getOutputResult = PhotoModule.this.mImageRefiner.getOutputImageRaw(output);\n Tag access$5002 = PhotoModule.TAG;\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"getOutputResult = \");\n stringBuilder2.append(getOutputResult);\n Log.d(access$5002, stringBuilder2.toString());\n }\n PhotoModule.this.mImageRefiner.finish();\n PhotoModule.this.mImageRefiner = null;\n Log.d(PhotoModule.TAG, \"mImageRefiner = null\");\n Log.d(PhotoModule.TAG, \"compressToJpeg\");\n originalJpegData = PhotoModule.this.convertN21ToJpeg(output, size2.width(), size2.height());\n }\n if (cameraProxy.getCharacteristics().isFacingFront() && PhotoModule.this.isNeedMirrorSelfie()) {\n originalJpegData = PhotoModule.this.aftMirrorJpeg(originalJpegData);\n }\n if (!Keys.isAlgorithmsOn(PhotoModule.this.mActivity.getSettingsManager()) || PhotoModule.this.isDepthEnabled() || PhotoModule.this.mBurstResultQueue.isEmpty()) {\n return originalJpegData;\n }\n TotalCaptureResult totalCaptureResult = (TotalCaptureResult) PhotoModule.this.mBurstResultQueue.removeFirst();\n if (PhotoModule.this.mInHdrProcess) {\n PhotoModule.this.mBurstResultQueue.clear();\n }\n return PhotoModule.this.addExifTags(originalJpegData, totalCaptureResult, cameraProxy.getCharacteristics().isFacingFront(), PhotoModule.this.mJpegRotation);\n }", "int imageCount();", "public static void main(String[] args) throws Exception {\n String fileName = args[0];\n\n // transform the image file to an Image\n Image image = null;\n\n Frame observer = new Frame();\n\n try {\n MediaTracker tracker = new MediaTracker(observer);\n image = Toolkit.getDefaultToolkit().getImage(fileName);\n tracker.addImage(image, 1);\n try {\n tracker.waitForID(1);\n } catch (InterruptedException e) {\n }\n } catch (Exception e) {\n System.out.println(\"some problem getting the image\");\n System.exit(0);\n }\n\n // get the actual size of the image:\n int actualWidth, actualHeight;\n actualWidth = image.getWidth(observer);\n actualHeight = image.getHeight(observer);\n\n System.out.println(\"found actual size of \"\n + actualHeight + \" by \" + actualWidth);\n\n // obtain the image data \n int[] pixels = new int[actualWidth * actualHeight];\n try {\n PixelGrabber pg = new PixelGrabber(image, 0, 0, actualWidth,\n actualHeight, pixels, 0, actualWidth);\n pg.grabPixels();\n if ((pg.status() & ImageObserver.ABORT) != 0) {\n System.out.println(\"error while grabbing pixels\");\n System.exit(0);\n }\n } catch (InterruptedException e) {\n System.out.println(\"pixel grabbing was interrupted\");\n System.exit(0);\n }\n\n // pull each int apart to obtain the individual pieces\n // and write them to the output file\n // prepare the output file\n String outFileName\n = fileName.substring(0, fileName.indexOf('.')) + \".raw\";;\n\n System.out.println(\n \"about to work on output file named: [\" + outFileName + \"]\");\n\n PrintWriter outFile = new PrintWriter(new File(outFileName));\n\n int alpha, red, green, blue, pixel;\n int k;\n\n outFile.println(actualWidth + \" \" + actualHeight);\n\n for (k = 0; k < actualWidth * actualHeight; k++) {\n pixel = pixels[k];\n alpha = (pixel >> 24) & 0xff;\n red = (pixel >> 16) & 0xff;\n green = (pixel >> 8) & 0xff;\n blue = (pixel) & 0xff;\n\n outFile.println(red + \" \" + green + \" \" + blue + \" \" + alpha);\n\n }\n\n outFile.close();\n\n }", "public native int getNumberColors() throws MagickException;", "Pointer wkhtmltoimage_progress_string(PointerByReference converter);", "public int findLonelyPixel(char[][] picture) {\n return 0;\n }", "private native int grayToRgb(byte src[],int dst[]);", "public static void main(String[] args) {\n // Be forwarned that when you write arrays directly in Java as below,\n // each \"row\" of text is a column of your image--the numbers get\n // transposed.\n PixImage image1 = array2PixImage(new int[][] { { 0, 3, 6 },\n { 1, 4, 7 },\n { 2, 5, 8 } });\n\n System.out.println(\"Testing one-parameter RunLengthEncoding constuctor \" +\n \"on a 3x3 image. Input image:\");\n System.out.print(image1);\n /////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n /*\n int [] red = {2,4,1,6,7};\n int [] leth = {2,3,1,1,2};\n\n RunLengthEncoding rle0 = new RunLengthEncoding(3, 3,red, red,red, leth);\n // RunLengthEncoding rle0 = new RunLengthEncoding(3, 3);\n \n for(RunIterator i=rle0.iterator();i.hasNext();) {\n\t System.out.println(i.next()[3]);\n }\n \n rle0.toPixImage();\n \n System.out.println(rle0.toPixImage().toString());\n System.out.println(\"XXXXXXXXXX\");\n\n */\n \n \n RunLengthEncoding rle1 = new RunLengthEncoding(image1);\n rle1.check();\n System.out.println(\"Testing getWidth/getHeight on a 3x3 encoding.\");\n doTest(rle1.getWidth() == 3 && rle1.getHeight() == 3,\n \"RLE1 has wrong dimensions\");\n \n rle1.toPixImage();\n \n System.out.println(\"Testing toPixImage() on a 3x3 encoding.\");\n System.out.println(rle1.toPixImage().toString());\n System.out.println(image1.toString());\n doTest(image1.equals(rle1.toPixImage()),\n \"image1 -> RLE1 -> image does not reconstruct the original image\");\n\n System.out.println(\"Testing setPixel() on a 3x3 encoding.\");\n setAndCheckRLE(rle1, 0, 0, 42);\n image1.setPixel(0, 0, (short) 42, (short) 42, (short) 42);\n doTest(rle1.toPixImage().equals(image1),\n /*\n array2PixImage(new int[][] { { 42, 3, 6 },\n { 1, 4, 7 },\n { 2, 5, 8 } })),\n */\n \"Setting RLE1[0][0] = 42 fails.\");\n\n System.out.println(\"Testing setPixel() on a 3x3 encoding.\");\n setAndCheckRLE(rle1, 1, 0, 42);\n image1.setPixel(1, 0, (short) 42, (short) 42, (short) 42);\n doTest(rle1.toPixImage().equals(image1),\n \"Setting RLE1[1][0] = 42 fails.\");\n\n \n System.out.println(\"Testing setPixel() on a 3x3 encoding.\");\n setAndCheckRLE(rle1, 0, 1, 2);\n image1.setPixel(0, 1, (short) 2, (short) 2, (short) 2);\n doTest(rle1.toPixImage().equals(image1),\n \"Setting RLE1[0][1] = 2 fails.\");\n\n System.out.println(\"Testing setPixel() on a 3x3 encoding.\");\n setAndCheckRLE(rle1, 0, 0, 0);\n image1.setPixel(0, 0, (short) 0, (short) 0, (short) 0);\n doTest(rle1.toPixImage().equals(image1),\n \"Setting RLE1[0][0] = 0 fails.\");\n\n System.out.println(\"Testing setPixel() on a 3x3 encoding.\");\n setAndCheckRLE(rle1, 2, 2, 7);\n image1.setPixel(2, 2, (short) 7, (short) 7, (short) 7);\n doTest(rle1.toPixImage().equals(image1),\n \"Setting RLE1[2][2] = 7 fails.\");\n\n System.out.println(\"Testing setPixel() on a 3x3 encoding.\");\n setAndCheckRLE(rle1, 2, 2, 42);\n image1.setPixel(2, 2, (short) 42, (short) 42, (short) 42);\n doTest(rle1.toPixImage().equals(image1),\n \"Setting RLE1[2][2] = 42 fails.\");\n \n System.out.println(\"Testing setPixel() on a 3x3 encoding.\");\n setAndCheckRLE(rle1, 1, 2, 42);\n image1.setPixel(1, 2, (short) 42, (short) 42, (short) 42);\n doTest(rle1.toPixImage().equals(image1),\n \"Setting RLE1[1][2] = 42 fails.\");\n\n \n PixImage image2 = array2PixImage(new int[][] { { 2, 3, 5 },\n { 2, 4, 5 },\n { 3, 4, 6 } });\n\n System.out.println(\"Testing one-parameter RunLengthEncoding constuctor \" +\n \"on another 3x3 image. Input image:\");\n System.out.print(image2);\n\n \n \n RunLengthEncoding rle2 = new RunLengthEncoding(image2);\n rle2.check();\n System.out.println(\"Testing getWidth/getHeight on a 3x3 encoding.\");\n doTest(rle2.getWidth() == 3 && rle2.getHeight() == 3,\n \"RLE2 has wrong dimensions\");\n\n System.out.println(\"Testing toPixImage() on a 3x3 encoding.\");\n doTest(rle2.toPixImage().equals(image2),\n \"image2 -> RLE2 -> image does not reconstruct the original image\");\n\n System.out.println(\"Testing setPixel() on a 3x3 encoding.\");\n setAndCheckRLE(rle2, 0, 1, 2);\n \n image2.setPixel(0, 1, (short) 2, (short) 2, (short) 2);\n doTest(rle2.toPixImage().equals(image2),\n \"Setting RLE2[0][1] = 2 fails.\");\n\n System.out.println(\"Testing setPixel() on a 3x3 encoding.\");\n setAndCheckRLE(rle2, 2, 0, 2);\n image2.setPixel(2, 0, (short) 2, (short) 2, (short) 2);\n doTest(rle2.toPixImage().equals(image2),\n \"Setting RLE2[2][0] = 2 fails.\");\n\n\n PixImage image3 = array2PixImage(new int[][] { { 0, 5 },\n { 1, 6 },\n { 2, 7 },\n { 3, 8 },\n { 4, 9 } });\n\n System.out.println(\"Testing one-parameter RunLengthEncoding constuctor \" +\n \"on a 5x2 image. Input image:\");\n System.out.print(image3);\n RunLengthEncoding rle3 = new RunLengthEncoding(image3);\n rle3.check();\n System.out.println(\"Testing getWidth/getHeight on a 5x2 encoding.\");\n doTest(rle3.getWidth() == 5 && rle3.getHeight() == 2,\n \"RLE3 has wrong dimensions\");\n\n System.out.println(\"Testing toPixImage() on a 5x2 encoding.\");\n doTest(rle3.toPixImage().equals(image3),\n \"image3 -> RLE3 -> image does not reconstruct the original image\");\n\n System.out.println(\"Testing setPixel() on a 5x2 encoding.\");\n setAndCheckRLE(rle3, 4, 0, 6);\n image3.setPixel(4, 0, (short) 6, (short) 6, (short) 6);\n doTest(rle3.toPixImage().equals(image3),\n \"Setting RLE3[4][0] = 6 fails.\");\n\n System.out.println(\"Testing setPixel() on a 5x2 encoding.\");\n setAndCheckRLE(rle3, 0, 1, 6);\n image3.setPixel(0, 1, (short) 6, (short) 6, (short) 6);\n doTest(rle3.toPixImage().equals(image3),\n \"Setting RLE3[0][1] = 6 fails.\");\n\n System.out.println(\"Testing setPixel() on a 5x2 encoding.\");\n setAndCheckRLE(rle3, 0, 0, 1);\n image3.setPixel(0, 0, (short) 1, (short) 1, (short) 1);\n doTest(rle3.toPixImage().equals(image3),\n \"Setting RLE3[0][0] = 1 fails.\");\n\n\n PixImage image4 = array2PixImage(new int[][] { { 0, 3 },\n { 1, 4 },\n { 2, 5 } });\n\n System.out.println(\"Testing one-parameter RunLengthEncoding constuctor \" +\n \"on a 3x2 image. Input image:\");\n System.out.print(image4);\n RunLengthEncoding rle4 = new RunLengthEncoding(image4);\n rle4.check();\n System.out.println(\"Testing getWidth/getHeight on a 3x2 encoding.\");\n doTest(rle4.getWidth() == 3 && rle4.getHeight() == 2,\n \"RLE4 has wrong dimensions\");\n\n System.out.println(\"Testing toPixImage() on a 3x2 encoding.\");\n doTest(rle4.toPixImage().equals(image4),\n \"image4 -> RLE4 -> image does not reconstruct the original image\");\n\n System.out.println(\"Testing setPixel() on a 3x2 encoding.\");\n setAndCheckRLE(rle4, 2, 0, 0);\n image4.setPixel(2, 0, (short) 0, (short) 0, (short) 0);\n doTest(rle4.toPixImage().equals(image4),\n \"Setting RLE4[2][0] = 0 fails.\");\n\n System.out.println(\"Testing setPixel() on a 3x2 encoding.\");\n setAndCheckRLE(rle4, 1, 0, 0);\n image4.setPixel(1, 0, (short) 0, (short) 0, (short) 0);\n doTest(rle4.toPixImage().equals(image4),\n \"Setting RLE4[1][0] = 0 fails.\");\n\n System.out.println(\"Testing setPixel() on a 3x2 encoding.\");\n setAndCheckRLE(rle4, 1, 0, 1);\n image4.setPixel(1, 0, (short) 1, (short) 1, (short) 1);\n doTest(rle4.toPixImage().equals(image4),\n \"Setting RLE4[1][0] = 1 fails.\");\n \n \n }", "public static void decodeAllImages(Args args){\n \t//Now those arrays will contain 'decoded' images\n \timageNames.clear();\n imagesToZip.clear();\n imageDict.clear();\n ArrayList<CodedData> recoveredData = null;\n\n //Read the coded images\n try {\n System.out.println(\"Reading zip file...\");\n readZip(args.codedInput, false);\n } catch (IOException ex) {\n Logger.getLogger(ProjectePractiques.class.getName()).log(Level.SEVERE, null, ex);\n }\n BufferedImage tempFrame=null, tempFrameI=null;\n WritableRaster tempBitmap=null;\n WritableRaster tempDecoded=null;\n CodedData tempData=null;\n int gop = dataList.get(0).gop;\n //System.out.println(gop);\n BufferedImage tempBufferedImage = null;\n int z = 0;\n //recoveredData[0] contains the info of the image 0, and so on\n int recoveredDataCounter = 0;\n //For every image,\n for(int i= 0; i < imageNames.size(); i++){\n \t//z is a counter of the gop so we can decide if its a frameI or P\n if(z >= (gop)){\n z=0;\n }\n if(z == 0){//Frame I\n \t//Store it\n tempFrameI = imageDict.get(imageNames.get(i));\n imageDict.put(imageNames.get(i), tempFrameI);\n }else{\n //Frame P, decode it\n tempFrame = imageDict.get(imageNames.get(i)); \n tempBitmap = (WritableRaster) tempFrame.getData();\n tempDecoded = tempBitmap.createWritableChild(tempFrame.getMinX(), tempFrame.getMinY(), tempFrame.getWidth(), tempFrame.getHeight(), 0,0, null);\n \t//Get his info\n tempData = dataList.get(recoveredDataCounter);\n recoveredDataCounter++;\n int[] tempColor;\n //Iterate through the tile and replace its pixels\n for(int k = 0; k < tempData.bestTilesX.size(); k++){\n for (int baseX = 0; baseX < tempData.tileWidth ; baseX++) {\n for (int baseY = 0; baseY < tempData.tileHeight; baseY++) {\n tempColor = getPixelColor(tempFrameI, tempData.bestOriginX.get(k)+baseX, tempData.bestOriginY.get(k)+baseY);\n tempDecoded.setPixel(tempData.bestTilesX.get(k)+baseX, tempData.bestTilesY.get(k)+baseY, tempColor);\n }\n }\n }\n //Store the new decoded image\n tempBufferedImage = new BufferedImage(tempFrame.getColorModel(),tempDecoded,tempFrame.isAlphaPremultiplied(),null);\n imageDict.put(imageNames.get(i), tempBufferedImage);\n tempFrameI = tempBufferedImage;\n }\n z++;\n }\n }", "public VCImage getVCImage() throws ImageException {\r\n\tif (originalRGB==null && originalDouble==null){\r\n\t\tthrow new ImageException(\"data is not loaded\");\r\n\t}\r\n\t\r\n\tbyte bytepix[] = null;\r\n\t\r\n\t\r\n\tif (originalRGB!=null){\r\n\t\tint[] uniquePixelValues = getUniquePixelValues();\r\n\t\tif(uniquePixelValues.length >256){\r\n\t\t\tthrow new ImageException(\"VCImage can't have more than 256 pixel values\");\r\n\t\t}\r\n\t\tbytepix = new byte[originalRGB.length];\r\n\t\tfor (int i=0;i<originalRGB.length;i++){\r\n\t\t\tint oRGBIndex = -1;\r\n\t\t\tfor(int j=0;j<uniquePixelValues.length;j+= 1){\r\n\t\t\t\tif(uniquePixelValues[j] == originalRGB[i]){\r\n\t\t\t\t\toRGBIndex = j;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(oRGBIndex >= 0){\r\n\t\t\t\tbytepix[i] = ((byte)oRGBIndex);\r\n\t\t\t}else{\r\n\t\t\t\tthrow new ImageException(\"Unique Pixel value missing in originalRGB array\");\r\n\t\t\t}\r\n\t\t\t//int intPix = 0xffffff&originalRGB[i];\r\n\t\t\t//int red = intPix&0xff;\r\n\t\t\t//int green = (intPix>>8)&0xff;\r\n\t\t\t//int blue = (intPix>>16)&0xff;\r\n\t\t\t//byte pix = (byte)Math.max(red,Math.max(green,blue));\r\n\t\t\t//bytepix[i] = pix;\r\n\t\t}\r\n\t}else{\r\n\t\tbytepix = new byte[originalDouble.length];\r\n\t\tfor (int i=0;i<originalDouble.length;i++){\r\n\t\t\tbytepix[i] = (byte)(0xff&(int)originalDouble[i]);\r\n\t\t}\r\n\t}\r\n\tVCImageUncompressed vci = new VCImageUncompressed(null,bytepix,new Extent(getSizeX(),getSizeY(),getSizeZ()),getSizeX(),getSizeY(),getSizeZ());\r\n\treturn vci;\r\n}", "@Test\n\tpublic void testGetPixel() {\n\t\tip = new ImagePlus();\n\t\tassertArrayEquals(new int[] {0,0,0,0}, ip.getPixel(0,0));\n\n\t\t// COLOR_256\n\t\tIndexColorModel cm = new IndexColorModel(8,1,new byte[]{1},new byte[]{2},new byte[]{3});\n\t\tproc = new ByteProcessor(1,1,new byte[] {0},cm);\n\t\tip = new ImagePlus(\"SoupySales\",proc);\n\t\tip.setImage(new BufferedImage(1,1,BufferedImage.TYPE_BYTE_INDEXED, cm));\n\t\tassertEquals(ImagePlus.COLOR_256,ip.getType());\n\t\tassertArrayEquals(new int[] {1,2,3,0}, ip.getPixel(0,0));\n\n\t\t// GRAY8\n\t\tproc = new ByteProcessor(1,1,new byte[] {53}, null);\n\t\tip = new ImagePlus(\"SoupySales\",proc);\n\t\tip.getImage(); // make sure img instance var gets set or getPixel() always returns [0,0,0,0]\n\t\tassertEquals(ImagePlus.GRAY8,ip.getType());\n\t\tassertArrayEquals(new int[] {53,0,0,0}, ip.getPixel(0,0));\n\t\tassertArrayEquals(new int[] {0,0,0,0},ip.getPixel(-1,-1));\n\n\t\t// GRAY16\n\t\tproc = new ShortProcessor(1,1,new short[] {30000},null);\n\t\tip = new ImagePlus(\"SoupySales\",proc);\n\t\tip.getImage(); // make sure img instance var gets set or getPixel() always returns [0,0,0,0]\n\t\tassertEquals(ImagePlus.GRAY16,ip.getType());\n\t\tassertArrayEquals(new int[] {30000,0,0,0}, ip.getPixel(0,0));\n\t\tassertArrayEquals(new int[] {0,0,0,0},ip.getPixel(-1,-1));\n\n\t\t// COLOR_RGB\n\t\tproc = new ColorProcessor(1,1,new int[] {0xffeedd});\n\t\tip = new ImagePlus(\"SoupySales\",proc);\n\t\tip.getImage(); // make sure img instance var gets set or getPixel() always returns [0,0,0,0]\n\t\tassertEquals(ImagePlus.COLOR_RGB,ip.getType());\n\t\tassertArrayEquals(new int[] {0xff,0xee,0xdd,0}, ip.getPixel(0,0));\n\t\tassertArrayEquals(new int[] {0,0,0,0},ip.getPixel(-1,-1));\n\n\t\t// GRAY32\n\t\tint[] ints = new int[3];\n\t\tproc = new FloatProcessor(1,3,ints);\n\t\tproc.set(0, 0, Float.floatToIntBits(25.0f));\n\t\tip = new ImagePlus(\"SoupySales\",proc);\n\t\tip.getImage(); // make sure img instance var gets set or getPixel() always returns [0,0,0,0]\n\t\tassertEquals(ImagePlus.GRAY32,ip.getType());\n\t\tassertArrayEquals(new int[] {Float.floatToIntBits(25.0f),0,0,0}, ip.getPixel(0,0));\n\t\tassertArrayEquals(new int[] {0,0,0,0},ip.getPixel(-1,-1));\n\t}", "public native void solarizeImage(double threshold) throws MagickException;", "public void ocultarMensaje(String msje, String fo, String nueFo){\n String mensaje, binario;\n Color color;\n int r,g,b;\n try{\n mensaje = lecturaArchivo(msje);\n binario = preparaMensaje(mensaje);\n BufferedImage image = sacaFoto(fo);\n int k = 0;\n for(int i = 0; i < image.getHeight(); i++)\n for(int j = 0; j < image.getWidth(); j++){\n color = new Color(image.getRGB(j, i));\n if(k <= binario.length()){\n String red = toBinary((byte) color.getRed());\n String green = toBinary((byte) color.getGreen());\n String blue = toBinary((byte) color.getBlue());\n red = reemplazarLSB(red, binario);\n green = reemplazarLSB(green, binario);\n blue = reemplazarLSB(blue, binario);\n r = Integer.parseInt(red ,2);\n g = Integer.parseInt(green ,2);\n b = Integer.parseInt(blue ,2);\n }else{\n r = color.getRed();\n g = color.getGreen();\n b = color.getBlue();\n }\n image.setRGB(j, i, new Color(r,g,b).getRGB());\n k+=3;\n }\n File output = new File(nueFo);\n ImageIO.write(image, \"png\", output);\n }catch(IOException ioe){\n System.out.println(\"Hubo un error en la escritura de la imagen\");\n System.exit(1);\n }\n }", "private int calculateImagesNotFound() {\n int imagesNotFound = 0;\n for (int count : countImagesNotFound) {\n imagesNotFound += count;\n }\n\n return imagesNotFound;\n }", "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 }", "public static int m1353a(iwz iwz, ByteBuffer byteBuffer, int i, Rect rect) {\n boolean z;\n Object str;\n jri.m13154b(byteBuffer.isDirect(), (Object) \"Output buffer must be direct\");\n if (rect.left < rect.right) {\n z = true;\n } else {\n z = false;\n }\n String valueOf = String.valueOf(rect.toString());\n String str2 = \"Invalid crop rectangle: \";\n if (valueOf.length() == 0) {\n str = new String(str2);\n } else {\n str = str2.concat(valueOf);\n }\n jri.m13154b(z, str);\n if (rect.top < rect.bottom) {\n z = true;\n } else {\n z = false;\n }\n valueOf = String.valueOf(rect.toString());\n str2 = \"Invalid crop rectangle: \";\n if (valueOf.length() == 0) {\n str = new String(str2);\n } else {\n str = str2.concat(valueOf);\n }\n jri.m13154b(z, str);\n int min = Math.min(Math.max(rect.left, 0), iwz.mo2720g() - 1);\n int min2 = Math.min(Math.max(rect.right, 0), iwz.mo2720g());\n int min3 = Math.min(Math.max(rect.top, 0), iwz.mo2717d() - 1);\n int min4 = Math.min(Math.max(rect.bottom, 0), iwz.mo2717d());\n if (iwz.mo2716c() == 35) {\n z = true;\n } else {\n z = false;\n }\n int c = iwz.mo2716c();\n StringBuilder stringBuilder = new StringBuilder(60);\n stringBuilder.append(\"Only ImageFormat.YUV_420_888 is supported, found \");\n stringBuilder.append(c);\n jri.m13154b(z, stringBuilder.toString());\n List e = iwz.mo2718e();\n ixa ixa = (ixa) e.get(0);\n ixa ixa2 = (ixa) e.get(1);\n ixa ixa3 = (ixa) e.get(2);\n jri.m13153b(ixa.mo637a().isDirect());\n jri.m13153b(ixa.mo637a().isDirect());\n jri.m13153b(ixa.mo637a().isDirect());\n byteBuffer.clear();\n int compressJpegFromYUV420pNative = compressJpegFromYUV420pNative(iwz.mo2720g(), iwz.mo2717d(), ixa.mo637a(), ixa.mo638b(), ixa.mo639c(), ixa2.mo637a(), ixa2.mo638b(), ixa2.mo639c(), ixa3.mo637a(), ixa3.mo638b(), ixa3.mo639c(), byteBuffer, byteBuffer.capacity(), i, min, min3, min2, min4);\n byteBuffer.limit(compressJpegFromYUV420pNative);\n return compressJpegFromYUV420pNative;\n }", "@Override\n public byte[] compress(byte[] imagen) {\n ResetVarC();\n /*\n Declaraciones de variables\n */\n char[] imagenaux = new char[imagen.length];\n for (int j = 0; j < imagen.length; j++) {\n imagenaux[j] = (char) (imagen[j] & 0xFF);\n }\n\n getWidthandHeight(imagenaux);\n\n imagenYCbCr = new int[height][width][3];\n for (int i = 0; i < height; ++i) {\n for (int j = 0; j < width; ++j) {\n int[] RGB = {(int) imagenaux[iterator], (int) imagenaux[iterator + 1], (int) imagenaux[iterator + 2]};\n imagenYCbCr[i][j] = RGBtoYCbCr(RGB);\n iterator += 3;\n }\n }\n\n CreateCompression();\n\n\n Huffman comprimirY = new Huffman();\n Huffman comprimirCB = new Huffman();\n Huffman comprimirCR = new Huffman();\n\n String Yen = comprimirY.compressHuffman(Yencoding);\n String Cben = comprimirCB.compressHuffman(Cbencoding);\n String Cren = comprimirCR.compressHuffman(Crencoding);\n\n\n Map<Integer, Integer> freqY = comprimirY.getFrequencies();\n Map<Integer, Integer> freqCb = comprimirCB.getFrequencies();\n Map<Integer, Integer> freqCr = comprimirCR.getFrequencies();\n\n\n CreateFreq(freqY, freqCb, freqCr);\n\n return JPEGFile(freqY, freqCb, freqCr, Yen, Cben, Cren);\n }", "public native int sizeBlob() throws MagickException;", "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}", "private static int getPrevCC(PrevArgs paramPrevArgs)\n/* */ {\n/* 574 */ return (int)(0xFF & getPrevNorm32(paramPrevArgs, 768, 65280) >> 8);\n/* */ }", "public static native String JniProcess1(long mRgbAddr);", "@Test\n public void testInvalidICCSingleChunkBadSequence() throws IOException {\n\n JPEGImageReader reader = createReader();\n reader.setInput(ImageIO.createImageInputStream(getClassLoaderResource(\"/jpeg/invalid-icc-single-chunk-bad-sequence-number.jpg\")));\n\n assertEquals(1772, reader.getWidth(0));\n assertEquals(2126, reader.getHeight(0));\n\n ImageReadParam param = reader.getDefaultReadParam();\n param.setSourceRegion(new Rectangle(reader.getWidth(0), 8));\n\n IIOReadWarningListener warningListener = mock(IIOReadWarningListener.class);\n reader.addIIOReadWarningListener(warningListener);\n\n BufferedImage image = reader.read(0, param);\n\n assertNotNull(image);\n assertEquals(1772, image.getWidth());\n assertEquals(8, image.getHeight());\n\n verify(warningListener).warningOccurred(eq(reader), anyString());\n }", "private native int applyFaceDetection2(byte[] data,int len,int width,int height);", "public boolean testPixel(EIfcpixeltexture type) throws SdaiException;", "@Test(timeout = 4000)\n public void test127() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 100, 100, 100);\n javaCharStream0.Done();\n // Undeclared exception!\n try { \n javaCharStream0.GetImage();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n\tpublic void testImageFromWindowsPhotoEditor2() throws IOException, ImageProcessingException, MetadataException {\n\t\tURL url = new URL(\"https://dbis-thure.uibk.ac.at/f/Get?id=BTCMSAGPZYLKPPLZWWQLSMKY\");\n\t\tRotatedBufferedImage bi = (RotatedBufferedImage) TrpImageIO.read(url);\n\t\tlogger.info(\"TrpImageIO result = \" + bi.getImageTransformation().toString());\n\t\t\n\t\tImageTransformation t = TrpImgMdParser.readImageDimension(url);\n\t\tlogger.info(\"TrpImgMdParser result = \" + t.toString());\n\t}", "public native int getWidth() throws MagickException;", "public void run(String[] args) {\n if (args.length == 0){\n System.out.println(\"Not enough parameters!\");\n System.out.println(\"Program Arguments: [image_path]\");\n System.exit(-1);\n }\n\n // Load the image\n Mat src = Imgcodecs.imread(args[0]);\n\n // Check if image is loaded fine\n if( src.empty() ) {\n System.out.println(\"Error opening image: \" + args[0]);\n System.exit(-1);\n }\n\n // Show source image\n HighGui.imshow(\"src\", src);\n //! [load_image]\n\n //! [gray]\n // Transform source image to gray if it is not already\n Mat gray = new Mat();\n\n if (src.channels() == 3)\n {\n Imgproc.cvtColor(src, gray, Imgproc.COLOR_BGR2GRAY);\n }\n else\n {\n gray = src;\n }\n\n // Show gray image\n showWaitDestroy(\"gray\" , gray);\n //! [gray]\n\n //! [bin]\n // Apply adaptiveThreshold at the bitwise_not of gray\n Mat bw = new Mat();\n Core.bitwise_not(gray, gray);\n Imgproc.adaptiveThreshold(gray, bw, 255, Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY, 15, -2);\n\n // Show binary image\n showWaitDestroy(\"binary\" , bw);\n //! [bin]\n\n //! [init]\n // Create the images that will use to extract the horizontal and vertical lines\n Mat horizontal = bw.clone();\n Mat vertical = bw.clone();\n //! [init]\n\n //! [horiz]\n // Specify size on horizontal axis\n int horizontal_size = horizontal.cols() / 30;\n\n // Create structure element for extracting horizontal lines through morphology operations\n Mat horizontalStructure = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(horizontal_size,1));\n\n // Apply morphology operations\n Imgproc.erode(horizontal, horizontal, horizontalStructure);\n Imgproc.dilate(horizontal, horizontal, horizontalStructure);\n\n // Show extracted horizontal lines\n showWaitDestroy(\"horizontal\" , horizontal);\n //! [horiz]\n\n //! [vert]\n // Specify size on vertical axis\n int vertical_size = vertical.rows() / 30;\n\n // Create structure element for extracting vertical lines through morphology operations\n Mat verticalStructure = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size( 1,vertical_size));\n\n // Apply morphology operations\n Imgproc.erode(vertical, vertical, verticalStructure);\n Imgproc.dilate(vertical, vertical, verticalStructure);\n\n // Show extracted vertical lines\n showWaitDestroy(\"vertical\", vertical);\n //! [vert]\n\n //! [smooth]\n // Inverse vertical image\n Core.bitwise_not(vertical, vertical);\n showWaitDestroy(\"vertical_bit\" , vertical);\n\n // Extract edges and smooth image according to the logic\n // 1. extract edges\n // 2. dilate(edges)\n // 3. src.copyTo(smooth)\n // 4. blur smooth img\n // 5. smooth.copyTo(src, edges)\n\n // Step 1\n Mat edges = new Mat();\n Imgproc.adaptiveThreshold(vertical, edges, 255, Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY, 3, -2);\n showWaitDestroy(\"edges\", edges);\n\n // Step 2\n Mat kernel = Mat.ones(2, 2, CvType.CV_8UC1);\n Imgproc.dilate(edges, edges, kernel);\n showWaitDestroy(\"dilate\", edges);\n\n // Step 3\n Mat smooth = new Mat();\n vertical.copyTo(smooth);\n\n // Step 4\n Imgproc.blur(smooth, smooth, new Size(2, 2));\n\n // Step 5\n smooth.copyTo(vertical, edges);\n\n // Show final result\n showWaitDestroy(\"smooth - final\", vertical);\n //! [smooth]\n\n System.exit(0);\n }", "public native int getDepth() throws MagickException;", "@Test(timeout = 4000)\n public void test30() throws Throwable {\n boolean boolean0 = false;\n JDayChooser jDayChooser0 = new JDayChooser(false);\n jDayChooser0.setYear(777);\n float[] floatArray0 = new float[3];\n floatArray0[0] = 467.08F;\n floatArray0[1] = (-738.4315F);\n floatArray0[2] = (float) 777;\n SVGGeneratorContext.GraphicContextDefaults sVGGeneratorContext_GraphicContextDefaults0 = new SVGGeneratorContext.GraphicContextDefaults();\n sVGGeneratorContext_GraphicContextDefaults0.getRenderingHints();\n ImageHandlerJPEGEncoder imageHandlerJPEGEncoder0 = null;\n try {\n imageHandlerJPEGEncoder0 = new ImageHandlerJPEGEncoder(\"6\", \"lightgrey\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // imageDir does not exist\n //\n verifyException(\"org.apache.batik.svggen.AbstractImageHandlerEncoder\", e);\n }\n }", "public static void main(String[] args) {\n Process p;\n try {\n String filename=\"/home/pramit/Desktop/Developers/Try/Test/orig_IMG_2.jpg\",isdl=\"1\";\n String[] cmd = { \"/bin/sh\",\"-c\",\"/home/pramit/IdeaProjects/DigitalKYCServer/src/com/company/crop_n_rotate.py \"\n +filename+\" \"+isdl};\n\n p = Runtime.getRuntime().exec(cmd);\n BufferedReader reader=new BufferedReader(new InputStreamReader(\n p.getInputStream()));\n p.waitFor();\n String z=String.valueOf(p.exitValue());\n System.out.println(\"z= \"+z);\n String line;\n while((line = reader.readLine()) != null) {\n System.out.println(line);\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "static int size_of_jp(String passed){\n\t\treturn 3;\n\t}", "private void enhanceImage(){\n }", "@Test\n\tpublic void testImageFromWindowsPhotoEditor() throws IOException, ImageProcessingException, MetadataException {\n\t\tURL url = new URL(\"https://files-test.transkribus.eu/Get?id=JMWVACVZDPHVPOVGFWQVBHXP\");\n\t\tRotatedBufferedImage bi = (RotatedBufferedImage) TrpImageIO.read(url);\n\t\tlogger.info(\"TrpImageIO result = \" + bi.getImageTransformation().toString());\n\t\t\n\t\tImageTransformation t = TrpImgMdParser.readImageDimension(url);\n\t\tlogger.info(\"TrpImgMdParser result = \" + t.toString());\n\t}", "public int computeGoodCoverage(CameraPlacementResult result, CameraPlacementResult testResult, CameraPlacementProblem problem)\n {\n \tint i, j, goodCoverage = 0;\n\n \tint[][] totalCoverage = result.cover;\n \tint[][] testCoverage = testResult.cover;\n\n \tfor (i = 0; i < problem.getMaxY(); i++)\n \t{\n \t\tfor (j = 0; j < problem.getMaxX(); j++)\n \t\t{\n\n \t\t\t//If totalCoverage[j][i] uncovered but testCoverage covered, + 1\n \t\t\tif ( totalCoverage[j][i] == 0 && testCoverage[j][i] == 1)\n \t\t\t\tgoodCoverage++;\n \t\t}\n \t}\n\n \treturn goodCoverage;\n\n }", "int wkhtmltoimage_convert(PointerByReference converter);", "public int getVideoJittcomp();", "public char image_status_GET()\n { return (char)((char) get_bytes(data, 8, 1)); }", "private static native long imread_0(String filename, int flags);", "public void process(TiffFileInfo info)\n {\n }", "private void createFromVCImage(VCImage vcImage) throws ImageException {\r\n\tsizeX = vcImage.getNumX();\r\n\tsizeY = vcImage.getNumY();\r\n\tsizeZ = vcImage.getNumZ();\r\n\tif (sizeX*sizeY*sizeZ!=vcImage.getPixels().length){\r\n\t\tthrow new ImageException(\"pixelData not properly formed\");\r\n\t}\r\n\toriginalRGB = new int[sizeX*sizeY*sizeZ];\r\n\tfor (int i=0;i<vcImage.getPixels().length;i++){\r\n\t\tint pixel = ((int)vcImage.getPixels()[i])&0xff;\r\n\t\toriginalRGB[i] = new java.awt.Color(pixel,pixel,pixel).getRGB();\r\n\t}\r\n\tbValid = true;\r\n\timageName = (vcImage.getVersion()!=null)?vcImage.getVersion().getName():\"unnamedImage\";\t\r\n}", "public native int getTotalColors() throws MagickException;", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.tokenBegin = 60;\n javaCharStream0.GetImage();\n assertEquals((-1), javaCharStream0.bufpos);\n }", "private double processImg() {\n\n\t\ttry {\n\t\t\timgPreview.setVisibility(View.VISIBLE);\n\n\t\t\t// bitmap factory\n\t\t\tBitmapFactory.Options options = new BitmapFactory.Options();\n\n\t\t\t// downsizing image as it throws OutOfMemory Exception for larger\n\t\t\t// images\n\t\t\toptions.inSampleSize = 8;\n\n\t\t\tbitmap_ref = BitmapFactory.decodeFile(fileUriSafe.getPath(),\n\t\t\t\t\toptions);\n\n\t\t\tbitmap_sample = BitmapFactory.decodeFile(fileUriMole.getPath(),\n\t\t\t\t\toptions);\n\n\t\t\t//convert from bitmap to Mat\n\t\t\tMat ref = new Mat(bitmap_ref.getHeight(), bitmap_ref.getWidth(), CvType.CV_8UC4);\n\t\t\tMat sample = new Mat(bitmap_sample.getHeight(), bitmap_sample.getWidth(), CvType.CV_8UC4);\n\t\t\tMat mask = new Mat(bitmap_sample.getHeight(),bitmap_sample.getWidth(),CvType.CV_8UC4);\n\t\t\tMat sample2calcgrad = new Mat(bitmap_sample.getHeight(), bitmap_sample.getWidth(), CvType.CV_8UC4);\n\n\t\t\tUtils.bitmapToMat(bitmap_ref, ref);\n\t\t\tUtils.bitmapToMat(bitmap_sample, sample);\n\t\t\tUtils.bitmapToMat(bitmap_sample,sample2calcgrad);\n\n\t\t\t//normalize image based on reference\t\t\t\n\t\t\t//sample = normalizeImg(sample, ref);\n\n\t\t\t//Using Sobel filter to calculate gradient\n\t\t\tMat grad_x = new Mat();\n\t\t\tMat grad_y = new Mat();\n\t\t\tMat abs_grad_x = new Mat();\n\t\t\tMat abs_grad_y = new Mat();\n\t\t\tMat gradVals = new Mat();\n\t\t\tMat sample_gray = new Mat(bitmap_sample.getHeight(),bitmap_sample.getWidth(),CvType.CV_8UC1);\n\t\t\tImgproc.cvtColor(sample2calcgrad, sample_gray, Imgproc.COLOR_BGRA2GRAY);\n\t\t\tImgproc.GaussianBlur(sample_gray, sample_gray, new Size(5,5), 0);\n\n\t\t\t//Gradient X\n\t\t\tImgproc.Sobel(sample_gray, grad_x, CvType.CV_8UC1, 1, 0);\n\t\t\tCore.convertScaleAbs(grad_x, abs_grad_x,10,0);\n\n\t\t\t//Gradient Y\n\t\t\tImgproc.Sobel(sample_gray, grad_y, CvType.CV_8UC1, 0, 1);\n\t\t\tCore.convertScaleAbs(grad_y,abs_grad_y, 10, 0);\n\n\t\t\t//combine with grad = sqrt(gx^2 + gy^2)\n\t\t\tCore.addWeighted(abs_grad_x, .5, abs_grad_y, .5, 0, gradVals);\n\n\n\t\t\t//Using CANNY to further smooth Gaussian blurred image; extract contours\n\t\t\tImgproc.Canny(sample_gray, mIntermediateMat, 80, 90);\n\n\t\t\t//find contours of filtered image\n\t\t\tList <MatOfPoint> contours = new ArrayList<MatOfPoint>();\n\t\t\tImgproc.findContours(mIntermediateMat, contours, mHierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE);\n\n\t\t\t// Find max contour area\n\t\t\tdouble maxArea = 0;\n\t\t\tIterator<MatOfPoint> each = contours.iterator();\n\t\t\twhile (each.hasNext()) {\n\t\t\t\tMatOfPoint wrapper = each.next();\n\t\t\t\tdouble area = Imgproc.contourArea(wrapper);\n\t\t\t\tif (area > maxArea)\n\t\t\t\t\tmaxArea = area;\n\t\t\t}\n\n\t\t\t// Filter contours by area and only keep those above thresh value\n\t\t\tmContours.clear();\n\t\t\teach = contours.iterator();\n\t\t\twhile (each.hasNext()) {\n\t\t\t\tMatOfPoint contour = each.next();\n\t\t\t\tif (Imgproc.contourArea(contour) > mMinContourArea*maxArea) {\n\t\t\t\t\tmContours.add(contour);\n\t\t\t\t\tborder.addAll(contour.toList());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//segment border into 8 parts \n\t\t\t//calc gradient along contour segment & normalize based on number of points in border\n\t\t\t//upto 7 points at end of border list ignored\n\t\t\tdouble [] seg_val = new double [8];\n\t\t\tint seg_len = border.size()/8;\n\t\t\tfor(int i = 0; i<8; i++){\n\t\t\t\tdouble contourGradientSum = 0;\n\t\t\t\tfor(int j=i*seg_len; j<(i+1)*seg_len;j++){\n\t\t\t\t\tPoint pt = border.get(j);\n\t\t\t\t\tint x = (int) pt.x;\n\t\t\t\t\tint y = (int) pt.y;\t\t\t\n\t\t\t\t\tcontourGradientSum += Core.mean(gradVals.submat(y-1, y+1, x-1, x+1)).val[0];\n\t\t\t\t}\n\t\t\t\tseg_val[i]=contourGradientSum/seg_len;\n\t\t\t}\n\n\n\t\t\tLog.v(TAG, \"grad vals: [\" + seg_val[0] + \",\" + seg_val[1] + \",\" \n\t\t\t\t\t+ seg_val[2] + \",\"+ seg_val[3] + \",\"\n\t\t\t\t\t+ seg_val[4] + \",\"+ seg_val[5] + \",\"\n\t\t\t\t\t+ seg_val[6] + \",\"+ seg_val[7] + \"]\");\n\t\t\t\n\t\t\tdouble thresh = 140;\n\t\t\tdouble score = 0;\n\n\t\t\tfor(double val:seg_val){\n\t\t\t\tif (val<=thresh){\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(score<8){\n\t\t\t\tscore += mContours.size()/7;\n\t\t\t\tscore = Math.min(8,score);\n\t\t\t}\n\n\n\n\t\t\tLog.v(TAG, \"score: \" +score);\n\t\t\tLog.v(TAG, \"Contours count: \" + mContours.size());\n\t\t\tLog.v(TAG, \"Border size: \" + border.size());\n\t\t\tImgproc.drawContours(sample, mContours, -1, CONTOUR_COLOR);\n\t\t\tImgproc.drawContours(mask, mContours, -1, COLOR_WHITE, -1);\n\t\t\tborders = mask;\n\n\t\t\t//display image with contours\n\t\t\tUtils.matToBitmap(sample, bitmap_sample);\n\t\t\timgPreview.setImageBitmap(bitmap_sample);\n\t\t\timgPreview.setFocusable(true);\n\n\t\t\treturn score;\n\n\t\t\t//\t\t\t\n\t\t} catch (NullPointerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn -1;\n\t}", "public void runAlgorithm() {\r\n if (srcImage == null) {\r\n MipavUtil.displayError(\"AlgorithmRegularizedIsotropicDiffusion.run() Source Image is null\");\r\n return;\r\n }\r\n\r\n if (srcImage.getNDims() == 2 || do25D) {\r\n timeStep = 0.2f;\r\n }\r\n else {\r\n timeStep = 0.15f;\r\n }\r\n\r\n if (srcImage.isColorImage()) {\r\n if (srcImage.getNDims() == 2) {run2DC(1); }\r\n else if (srcImage.getNDims() == 3 && do25D == true) { run2DC(srcImage.getExtents()[2]); }\r\n else run3DC();\r\n }\r\n else {\r\n if (srcImage.getNDims() == 2) { run2D(1); }\r\n else if (srcImage.getNDims() == 3 && do25D == true) { run2D(srcImage.getExtents()[2]); }\r\n else run3D();\r\n }\r\n }", "int getImagesByTransformCount();", "public boolean testConvert(IFormatWriter writer, String[] args)\n throws FormatException, IOException\n {\n DebugTools.enableLogging(\"INFO\");\n if (args != null) {\n for (int i=0; i<args.length; i++) {\n if (args[i].startsWith(\"-\") && args.length > 1) {\n if (args[i].equals(\"-debug\")) {\n DebugTools.enableLogging(\"DEBUG\");\n }\n else if (args[i].equals(\"-stitch\")) stitch = true;\n else if (args[i].equals(\"-separate\")) separate = true;\n else if (args[i].equals(\"-merge\")) merge = true;\n else if (args[i].equals(\"-expand\")) fill = true;\n else if (args[i].equals(\"-bigtiff\")) bigtiff = true;\n else if (args[i].equals(\"-map\")) map = args[++i];\n else if (args[i].equals(\"-compression\")) compression = args[++i];\n else if (args[i].equals(\"-nogroup\")) group = false;\n else if (args[i].equals(\"-autoscale\")) autoscale = true;\n else if (args[i].equals(\"-overwrite\")) {\n overwrite = true;\n }\n else if (args[i].equals(\"-nooverwrite\")) {\n overwrite = false;\n }\n else if (args[i].equals(\"-channel\")) {\n channel = Integer.parseInt(args[++i]);\n }\n else if (args[i].equals(\"-z\")) {\n zSection = Integer.parseInt(args[++i]);\n }\n else if (args[i].equals(\"-timepoint\")) {\n timepoint = Integer.parseInt(args[++i]);\n }\n else if (args[i].equals(\"-series\")) {\n try {\n series = Integer.parseInt(args[++i]);\n }\n catch (NumberFormatException exc) { }\n }\n else if (args[i].equals(\"-range\")) {\n try {\n firstPlane = Integer.parseInt(args[++i]);\n lastPlane = Integer.parseInt(args[++i]) + 1;\n }\n catch (NumberFormatException exc) { }\n }\n else if (args[i].equals(\"-crop\")) {\n String[] tokens = args[++i].split(\",\");\n xCoordinate = Integer.parseInt(tokens[0]);\n yCoordinate = Integer.parseInt(tokens[1]);\n width = Integer.parseInt(tokens[2]);\n height = Integer.parseInt(tokens[3]);\n }\n else {\n LOGGER.error(\"Found unknown command flag: {}; exiting.\", args[i]);\n return false;\n }\n }\n else {\n if (args[i].equals(\"-version\")) printVersion = true;\n else if (in == null) in = args[i];\n else if (out == null) out = args[i];\n else {\n LOGGER.error(\"Found unknown argument: {}; exiting.\", args[i]);\n LOGGER.error(\"You should specify exactly one input file and \" +\n \"exactly one output file.\");\n return false;\n }\n }\n }\n }\n\n if (printVersion) {\n LOGGER.info(\"Version: {}\", FormatTools.VERSION);\n LOGGER.info(\"VCS revision: {}\", FormatTools.VCS_REVISION);\n LOGGER.info(\"Build date: {}\", FormatTools.DATE);\n return true;\n }\n\n if (in == null || out == null) {\n String[] s = {\n \"To convert a file between formats, run:\",\n \" bfconvert [-debug] [-stitch] [-separate] [-merge] [-expand]\",\n \" [-bigtiff] [-compression codec] [-series series] [-map id]\",\n \" [-range start end] [-crop x,y,w,h] [-channel channel] [-z Z]\",\n \" [-timepoint timepoint] [-nogroup] [-autoscale] [-version]\",\n \" in_file out_file\",\n \"\",\n \" -version: print the library version and exit\",\n \" -debug: turn on debugging output\",\n \" -stitch: stitch input files with similar names\",\n \" -separate: split RGB images into separate channels\",\n \" -merge: combine separate channels into RGB image\",\n \" -expand: expand indexed color to RGB\",\n \" -bigtiff: force BigTIFF files to be written\",\n \"-compression: specify the codec to use when saving images\",\n \" -series: specify which image series to convert\",\n \" -map: specify file on disk to which name should be mapped\",\n \" -range: specify range of planes to convert (inclusive)\",\n \" -nogroup: force multi-file datasets to be read as individual\" +\n \" files\",\n \" -autoscale: automatically adjust brightness and contrast before\",\n \" converting; this may mean that the original pixel\",\n \" values are not preserved\",\n \" -overwrite: always overwrite the output file, if it already exists\",\n \"-nooverwrite: never overwrite the output file, if it already exists\",\n \" -crop: crop images before converting; argument is 'x,y,w,h'\",\n \" -channel: only convert the specified channel (indexed from 0)\",\n \" -z: only convert the specified Z section (indexed from 0)\",\n \" -timepoint: only convert the specified timepoint (indexed from 0)\",\n \"\",\n \"If any of the following patterns are present in out_file, they will\",\n \"be replaced with the indicated metadata value from the input file.\",\n \"\",\n \" Pattern:\\tMetadata value:\",\n \" ---------------------------\",\n \" \" + FormatTools.SERIES_NUM + \"\\t\\tseries index\",\n \" \" + FormatTools.SERIES_NAME + \"\\t\\tseries name\",\n \" \" + FormatTools.CHANNEL_NUM + \"\\t\\tchannel index\",\n \" \" + FormatTools.CHANNEL_NAME +\"\\t\\tchannel name\",\n \" \" + FormatTools.Z_NUM + \"\\t\\tZ index\",\n \" \" + FormatTools.T_NUM + \"\\t\\tT index\",\n \" \" + FormatTools.TIMESTAMP + \"\\t\\tacquisition timestamp\",\n \"\",\n \"If any of these patterns are present, then the images to be saved\",\n \"will be split into multiple files. For example, if the input file\",\n \"contains 5 Z sections and 3 timepoints, and out_file is\",\n \"\",\n \" converted_Z\" + FormatTools.Z_NUM + \"_T\" +\n FormatTools.T_NUM + \".tiff\",\n \"\",\n \"then 15 files will be created, with the names\",\n \"\",\n \" converted_Z0_T0.tiff\",\n \" converted_Z0_T1.tiff\",\n \" converted_Z0_T2.tiff\",\n \" converted_Z1_T0.tiff\",\n \" ...\",\n \" converted_Z4_T2.tiff\",\n \"\",\n \"Each file would have a single image plane.\"\n };\n for (int i=0; i<s.length; i++) LOGGER.info(s[i]);\n return false;\n }\n\n if (new Location(out).exists()) {\n if (overwrite == null) {\n LOGGER.warn(\"Output file {} exists.\", out);\n LOGGER.warn(\"Do you want to overwrite it? ([y]/n)\");\n BufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n String choice = r.readLine().trim().toLowerCase();\n overwrite = !choice.startsWith(\"n\");\n }\n if (!overwrite) {\n LOGGER.warn(\"Exiting; next time, please specify an output file that \" +\n \"does not exist.\");\n return false;\n }\n else {\n new Location(out).delete();\n }\n }\n\n if (map != null) Location.mapId(in, map);\n\n long start = System.currentTimeMillis();\n LOGGER.info(in);\n reader = new ImageReader();\n if (stitch) {\n reader = new FileStitcher(reader);\n Location f = new Location(in);\n String pat = null;\n if (!f.exists()) {\n pat = in;\n }\n else {\n pat = FilePattern.findPattern(f);\n }\n if (pat != null) in = pat;\n }\n if (separate) reader = new ChannelSeparator(reader);\n if (merge) reader = new ChannelMerger(reader);\n if (fill) reader = new ChannelFiller(reader);\n minMax = null;\n if (autoscale) {\n reader = new MinMaxCalculator(reader);\n minMax = (MinMaxCalculator) reader;\n }\n\n reader.setGroupFiles(group);\n reader.setMetadataFiltered(true);\n reader.setOriginalMetadataPopulated(true);\n OMEXMLService service = null;\n try {\n ServiceFactory factory = new ServiceFactory();\n service = factory.getInstance(OMEXMLService.class);\n reader.setMetadataStore(service.createOMEXMLMetadata());\n }\n catch (DependencyException de) {\n throw new MissingLibraryException(OMEXMLServiceImpl.NO_OME_XML_MSG, de);\n }\n catch (ServiceException se) {\n throw new FormatException(se);\n }\n\n reader.setId(in);\n\n MetadataStore store = reader.getMetadataStore();\n\n MetadataTools.populatePixels(store, reader, false, false);\n\n boolean dimensionsSet = true;\n if (width == 0 || height == 0) {\n width = reader.getSizeX();\n height = reader.getSizeY();\n dimensionsSet = false;\n }\n\n if (store instanceof MetadataRetrieve) {\n if (series >= 0) {\n try {\n String xml = service.getOMEXML(service.asRetrieve(store));\n OME root = (OME) store.getRoot();\n Image exportImage = root.getImage(series);\n\n IMetadata meta = service.createOMEXMLMetadata(xml);\n OME newRoot = (OME) meta.getRoot();\n while (newRoot.sizeOfImageList() > 0) {\n newRoot.removeImage(newRoot.getImage(0));\n }\n\n newRoot.addImage(exportImage);\n meta.setRoot(newRoot);\n\n meta.setPixelsSizeX(new PositiveInteger(width), 0);\n meta.setPixelsSizeY(new PositiveInteger(height), 0);\n\n if (autoscale) {\n store.setPixelsType(PixelType.UINT8, 0);\n }\n\n writer.setMetadataRetrieve((MetadataRetrieve) meta);\n }\n catch (ServiceException e) {\n throw new FormatException(e);\n }\n }\n else {\n for (int i=0; i<reader.getSeriesCount(); i++) {\n if (width != reader.getSizeX() || height != reader.getSizeY()) {\n store.setPixelsSizeX(new PositiveInteger(width), 0);\n store.setPixelsSizeY(new PositiveInteger(height), 0);\n }\n\n if (autoscale) {\n store.setPixelsType(PixelType.UINT8, i);\n }\n }\n\n writer.setMetadataRetrieve((MetadataRetrieve) store);\n }\n }\n writer.setWriteSequentially(true);\n\n if (writer instanceof TiffWriter) {\n ((TiffWriter) writer).setBigTiff(bigtiff);\n }\n else if (writer instanceof ImageWriter) {\n IFormatWriter w = ((ImageWriter) writer).getWriter(out);\n if (w instanceof TiffWriter) {\n ((TiffWriter) w).setBigTiff(bigtiff);\n }\n }\n\n String format = writer.getFormat();\n LOGGER.info(\"[{}] -> {} [{}]\",\n new Object[] {reader.getFormat(), out, format});\n long mid = System.currentTimeMillis();\n\n int total = 0;\n int num = writer.canDoStacks() ? reader.getSeriesCount() : 1;\n long read = 0, write = 0;\n int first = series == -1 ? 0 : series;\n int last = series == -1 ? num : series + 1;\n long timeLastLogged = System.currentTimeMillis();\n for (int q=first; q<last; q++) {\n reader.setSeries(q);\n\n if (!dimensionsSet) {\n width = reader.getSizeX();\n height = reader.getSizeY();\n }\n\n int writerSeries = series == -1 ? q : 0;\n writer.setSeries(writerSeries);\n writer.setInterleaved(reader.isInterleaved() && !autoscale);\n writer.setValidBitsPerPixel(reader.getBitsPerPixel());\n int numImages = writer.canDoStacks() ? reader.getImageCount() : 1;\n\n int startPlane = (int) Math.max(0, firstPlane);\n int endPlane = (int) Math.min(numImages, lastPlane);\n numImages = endPlane - startPlane;\n\n if (channel >= 0) {\n numImages /= reader.getEffectiveSizeC();\n }\n if (zSection >= 0) {\n numImages /= reader.getSizeZ();\n }\n if (timepoint >= 0) {\n numImages /= reader.getSizeT();\n }\n\n total += numImages;\n\n int count = 0;\n for (int i=startPlane; i<endPlane; i++) {\n int[] coords = reader.getZCTCoords(i);\n\n if ((zSection >= 0 && coords[0] != zSection) || (channel >= 0 &&\n coords[1] != channel) || (timepoint >= 0 && coords[2] != timepoint))\n {\n continue;\n }\n\n writer.setId(FormatTools.getFilename(q, i, reader, out));\n if (compression != null) writer.setCompression(compression);\n\n long s = System.currentTimeMillis();\n long m = convertPlane(writer, i, startPlane);\n long e = System.currentTimeMillis();\n read += m - s;\n write += e - m;\n\n // log number of planes processed every second or so\n if (count == numImages - 1 || (e - timeLastLogged) / 1000 > 0) {\n int current = (count - startPlane) + 1;\n int percent = 100 * current / numImages;\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\t\");\n int numSeries = last - first;\n if (numSeries > 1) {\n sb.append(\"Series \");\n sb.append(q);\n sb.append(\": converted \");\n }\n else sb.append(\"Converted \");\n LOGGER.info(sb.toString() + \"{}/{} planes ({}%)\",\n new Object[] {current, numImages, percent});\n timeLastLogged = e;\n }\n count++;\n }\n }\n writer.close();\n long end = System.currentTimeMillis();\n LOGGER.info(\"[done]\");\n\n // output timing results\n float sec = (end - start) / 1000f;\n long initial = mid - start;\n float readAvg = (float) read / total;\n float writeAvg = (float) write / total;\n LOGGER.info(\"{}s elapsed ({}+{}ms per plane, {}ms overhead)\",\n new Object[] {sec, readAvg, writeAvg, initial});\n\n return true;\n }", "public void execute() throws IOException, ParseException, GitAPIException {\n \t\tfinal int[][] pix = readPixels();\n \t\treadContributions();\n \t\tcomputeTargetContrib(pix);\n \n \t\tif (debug) {\n \t\t\tdebug(asciiImage(true));\n \t\t\tprintContrib();\n \t\t}\n \n \t\tinitGitRepository();\n \n \t\tif (showGUI) showProgressWindow();\n \n \t\tint i = 0;\n \t\tfor (int x = 0; x < CAL_WIDTH; x++) {\n \t\t\tfor (int y = 0; y < CAL_HEIGHT; y++) {\n \t\t\t\tif (contrib[y][x] == null) continue;\n \t\t\t\twhile (contrib[y][x].current < contrib[y][x].target) {\n \t\t\t\t\tcontrib[y][x].current++;\n \t\t\t\t\tif (git != null) doCommit(y, x);\n \t\t\t\t\ti++;\n \t\t\t\t\tif (showGUI) updateProgress(i);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\tprogressFrame.dispose();\n \n \t\tif (debug) System.out.println(\"Complete!\");\n \t}", "public void detect_lines(float[] image,long width, long height, Lines contours, MutableLong num_result, double sigma, double low, double high, long mode, boolean compute_width, boolean correct_pos,boolean extend_lines, Junctions junctions)\r\n\t{\r\n\t byte[] ismax;\r\n\t float[] ev, n1, n2, p1, p2;\r\n\t float[][] k = new float[5][(int) (width*height)];\r\n\t \r\n\t// for (i=0;i<5;i++)\r\n\t// k[i] = xcalloc(width*height,sizeof(float));\r\n\t Convol convol = new Convol();\r\n\t convol.convolve_gauss(image,k[0],width,height,sigma,LinesUtil.DERIV_R);\r\n\t convol.convolve_gauss(image,k[1],width,height,sigma,LinesUtil.DERIV_C);\r\n\t convol.convolve_gauss(image,k[2],width,height,sigma,LinesUtil.DERIV_RR);\r\n\t convol.convolve_gauss(image,k[3],width,height,sigma,LinesUtil.DERIV_RC);\r\n\t \r\n\t convol.convolve_gauss(image,k[4],width,height,sigma,LinesUtil.DERIV_CC);\r\n\t\r\n\t ismax = new byte[(int) (width*height)];\r\n\t ev = new float[(int) (width*height)];\r\n\t n1 = new float[(int) (width*height)];\r\n\t n2 = new float[(int) (width*height)];\r\n\t p1 = new float[(int) (width*height)];\r\n\t p2 = new float[(int) (width*height)];\r\n\t /*\r\n\t * The C library function void *memset(void *str, int c, size_t n) \r\n\t * copies the character c (an unsigned char) to the first n characters \r\n\t * of the string pointed to by the argument str.\r\n\t */\r\n\t // memset(ismax,0,width*height*sizeof(*ismax));\r\n\t // memset(ev,0,width*height*sizeof(*ev));\r\n\t for(int j = 0; j < ismax.length; j++){\r\n\t\t ev[j] = 0;\r\n\t\t ismax[j] = 0;\r\n\t }\r\n\r\n\t compute_line_points(k,ismax,ev,n1,n2,p1,p2,width,height,low,high,mode);\r\n\t \r\n\t Link l = new Link();\r\n\t l.compute_contours(ismax,ev,n1,n2,p1,p2,k[0],k[1],contours,num_result,sigma,\r\n\t extend_lines,(int)mode,low,high,width,height,junctions);\r\n\t Width w = new Width();\r\n\t if (compute_width)\r\n\t w.compute_line_width(k[0],k[1],width,height,sigma,mode,correct_pos,contours,\r\n\t num_result);\r\n\r\n\t}", "public int errorChecker()\n\t{\n\t\tboolean error = false;\n\t\tint checker=0; //variable to determine how many 1's in the number\n\t\tint row;\n\t\t\n\t\t//loops through the array identifying parity coverage\n\t\tfor (row=0;row<PARITYCOVERAGE.length; row++)\n\t\t{\n\t\t\t\n\t\t\t//calls the method to count the number of parity bits\n\t\t\tchecker = counter(row, true); \n\t\n\t\t\tint compare = 0; //the default value (odd parity)\n\t\t\t\n\t\t\t//checks whether it is even or odd parity\n\t\t\tif (parityType.contentEquals(\"e\"))\n\t\t\t{\n\t\t\t\t//value for even parity\n\t\t\t\tcompare=1;\n\t\t\t}\n\n\t\t\t//checks to see if the result is even or odd\n\t\t\tif (checker%2 ==compare) \n\t\t\t{\n\t\t\t\terror=true;\n\t\t\t\t\n\t\t\t\t//sets parity bit to 1, if parity is even/odd\n\t\t\t\terrorCode[row]=true;\n\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t//otherwise the bit is 0\n\t\t\t\terrorCode[row]=false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//if an error has been detected\n\t\tif (error)\n\t\t{\n\t\t\t\n\t\t\t//passes the binary code to the covertor\n\t\t\t//and returns the location of the error\n\t\t\treturn (binaryNumber.decimalConverter(errorCode)-1);\n\t\t\t\t\n\t\t}\n\t\t\n\t\t//if there is no error, returns a negative value\n\t\treturn -1;\n\t\t\t\t\t\n\t}", "private int computeQuantizationError(int oldPixel, int newPixel) {\n int oldRed, oldGreen, oldBlue, oldAlpha,\n newRed, newGreen, newBlue, newAlpha;\n\n oldRed = Color.red(oldPixel);\n oldGreen = Color.green(oldPixel);\n oldBlue = Color.blue(oldPixel);\n oldAlpha = Color.alpha(oldPixel);\n\n newRed = Color.red(newPixel);\n newGreen = Color.green(newPixel);\n newBlue = Color.blue(newPixel);\n newAlpha = Color.alpha(newPixel);\n\n return Color.argb(newAlpha, oldRed - newRed, oldGreen - newGreen, oldBlue - newBlue);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Arguments : \");\n\t\tfor(String arg : args){\n\t\t\tSystem.out.println(\"\\t\" +arg);\n\t\t}\n\t\tSystem.out.println(\"------------------\");\n\t\tString outputFilePath = null;\n\t\tint imageLength, webCamCode;\n\t\tif(args.length != 3){\n\t\t\tprintUsage();\n\t\t\treturn;\n\t\t}else{\n\t\t\ttry{\n\t\t\t\twebCamCode = Integer.parseInt(args[0]);\n\t\t\t\tif(webCamCode != 1 && webCamCode != 2){\n\t\t\t\t\tthrow new IllegalArgumentException(\"Web cam code must be either 1 or 2\");\n\t\t\t\t}else{\n\t\t\t\t\t//Good as of now. Go Ahead\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutputFilePath = args[1];\n\t\t\t\tif(!outputFilePath.endsWith(\".mov\")){\n\t\t\t\t\tthrow new IllegalArgumentException(\"Output file must end with .mov\");\n\t\t\t\t}\n\t\t\t\timageLength = Integer.parseInt(args[2]);\n\t\t\t\t\n\t\t\t\tif(imageLength <= 0){\n\t\t\t\t\tthrow new IllegalArgumentException(\"Image length must be non zero & positive\");\n\t\t\t\t}else{\n\t\t\t\t\t//Good as of now. Go Ahead\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.err.println(\"Invalid Arguments Passed. Error : \" +e.getMessage());\n\t\t\t\tprintUsage();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tFile outputFile = new File(outputFilePath);\n\t\t\tobjWriter = new JPEGMovWriter(outputFile);\n\t\t\tSystem.out.println(\"Writing File to : \" +outputFile.getAbsolutePath());\n\t\t} catch (IOException e) { \n\t\t\tSystem.err.println(\"Error Creating file : \" +e.getMessage());\n\t\t\treturn;\n\t\t}\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\tif(imageCount >= imageLength){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tURL webCamURL = null;\n\t\t\t\tswitch(webCamCode){\n\t\t\t\tcase 1:\n\t\t\t\t\twebCamURL = new URL(urlWestLawns);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\twebCamURL = new URL(urlMU);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t//Code should never enter here\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t * Format seems to be : \n\t\t\t\t\t\t--myboundary\n\t\t\t\t\t\tContent-Type: image/jpeg\n\t\t\t\t\t\tContent-Length: 36232\n\t\t\t\t\t\t<newline>\n\t\t\t\t\t\t<binary Data starts>\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t\tHttpURLConnection webCamURLConn = (HttpURLConnection)webCamURL.openConnection();\n\t\t\t\t//BufferedReader in = new BufferedReader(new InputStreamReader(webCamURLConn.getInputStream()));\n\t\t\t\tBufferedInputStream in = new BufferedInputStream(webCamURLConn.getInputStream());\n\t\t\t\tDataInputStream dis = new DataInputStream(in);\n\t\t\t\tint length = skipLines(4,dis);\n\t\t\t\treadJPG(dis, length);\n\t\t\t\twebCamURLConn.disconnect();\n\t\t\t\t\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tVector<String> inputFiles = new Vector<String>();\n\n\t\ttry {\n\n\t\t\tfor(String str : inputFiles){\n\t\t\t\tobjWriter.addFrame(1.0f/30.0f, new File(str));\n\t\t\t}\n\t\t\tobjWriter.close(true);\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}", "public static int run(Bitmap temp) {\n Mat src = new Mat();\n Bitmap bmp32 = temp.copy(Bitmap.Config.ARGB_8888, true);\n Utils.bitmapToMat(bmp32, src);\n\n List<Mat> bgrPlanes = new ArrayList<>();\n Core.split(src, bgrPlanes);\n\n int histSize = 256;\n\n float[] range = {0, 256}; //the upper boundary is exclusive\n MatOfFloat histRange = new MatOfFloat(range);\n\n boolean accumulate = false;\n\n Mat bHist = new Mat(), gHist = new Mat(), rHist = new Mat();\n Imgproc.calcHist(bgrPlanes, new MatOfInt(0), new Mat(), bHist, new MatOfInt(histSize), histRange, accumulate);\n Imgproc.calcHist(bgrPlanes, new MatOfInt(1), new Mat(), gHist, new MatOfInt(histSize), histRange, accumulate);\n Imgproc.calcHist(bgrPlanes, new MatOfInt(2), new Mat(), rHist, new MatOfInt(histSize), histRange, accumulate);\n\n float[] bHistData = new float[(int) (bHist.total() * bHist.channels())];\n bHist.get(0, 0, bHistData);\n float[] gHistData = new float[(int) (gHist.total() * gHist.channels())];\n gHist.get(0, 0, gHistData);\n float[] rHistData = new float[(int) (rHist.total() * rHist.channels())];\n rHist.get(0, 0, rHistData);\n\n // Get num vals at each intensity and sum total vals\n float totalVals = 0;\n float[] histData = new float[256];\n for(int i = 0; i < histSize; i++) {\n histData[i] = bHistData[i] + gHistData[i] + rHistData[i];\n totalVals = totalVals + histData[i];\n }\n\n // Get sum of all values * intensities\n float sum = 0;\n for(int i = 0; i < histSize; i++) {\n sum = sum + (histData[i] * i);\n }\n\n // Divide by total value to find average intensity\n float avg = sum / totalVals;\n\n // Check what range avg is in\n if(avg < 51) {\n return 1;\n } else if (avg < 102) {\n return 3;\n } else if (avg < 153) {\n return 5;\n } else if (avg < 205) {\n return 4;\n } else if (avg < 256) {\n return 2;\n } else {\n return 0;\n }\n }", "public int getSizeZ() throws ImageException {\r\n\tif (!bValid){\r\n\t\tthrow new ImageException(\"image not valid\");\r\n\t}\t\r\n\treturn sizeZ;\r\n}", "private static native boolean detect_0(long nativeObj, long img_nativeObj, long points_nativeObj);", "int getPicSize(int pos) throws IOException\r\n {\n\r\n int out = pos;\r\n int jump = 0;\r\n byte ptrPar; // pointer parameter\r\n\r\n byte b = readByteFromRom(ch, out);\r\n\r\n while (b != (byte) 0xFF)\r\n {\r\n switch (b & 0b111_00000)\r\n {\r\n case (0b000_00000): // command with n parameters\r\n byte bMask = (byte) 0b0001_1111;\r\n jump = (byteToValue((byte) (b & bMask)) + 1) + 1;\r\n break;\r\n case (0b001_00000): // command with one parameter\r\n jump = 1 + 1;\r\n break;\r\n case (0b010_00000): // command with two parameters\r\n jump = 2 + 1;\r\n break;\r\n case (0b011_00000): // command with no parameters\r\n jump = 0 + 1;\r\n break;\r\n case (0b100_00000): // commands with pointer parameters\r\n case (0b101_00000):\r\n case (0b110_00000):\r\n ptrPar = readByteFromRom(ch, out + 1);\r\n if ((ptrPar & 0b1000_0000) == 0b1000_0000) // 7-bit negative offset\r\n {\r\n jump = 1 + 1;\r\n }\r\n else // 15-bit positive offset\r\n {\r\n jump = 2 + 1;\r\n }\r\n break;\r\n case (0b111_00000): // lz long\r\n byte[] c = readFromRom(ch, out, 2);\r\n switch (c[0] & 0b000_111_00)\r\n {\r\n case (0b000_000_00): // command with n parameters\r\n byte[] b2Mask = new byte[2];\r\n b2Mask[0] = (byte) 0b0000_0011;\r\n b2Mask[1] = (byte) 0b1111_1111;\r\n jump = (byteToValue((byte) (c[0] & b2Mask[0])) * 0x100 + byteToValue((byte) (c[1] & b2Mask[1])) + 1) + 2;\r\n break;\r\n case (0b000_001_00): // command with one parameter\r\n jump = 1 + 2;\r\n break;\r\n case (0b000_010_00): // command with two parameters\r\n jump = 2 + 2;\r\n break;\r\n case (0b000_011_00): // command with no parameters\r\n jump = 0 + 2;\r\n break;\r\n case (0b000_100_00): // commands with pointer parameters\r\n case (0b000_101_00):\r\n case (0b000_110_00):\r\n ptrPar = readByteFromRom(ch, out + 2);\r\n if ((ptrPar & 0b1000_0000) == 0b1000_0000) // 7-bit negative offset\r\n {\r\n jump = 1 + 2;\r\n }\r\n else // 15-bit positive offset\r\n {\r\n jump = 2 + 2;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n out += jump;\r\n b = readByteFromRom(ch, out);\r\n }\r\n return (out - pos + 1);\r\n }" ]
[ "0.57862395", "0.5677872", "0.56738967", "0.56112176", "0.544939", "0.54296577", "0.5397633", "0.530121", "0.52911055", "0.5288341", "0.5260878", "0.52348214", "0.5226331", "0.51838833", "0.5144371", "0.5138296", "0.5138067", "0.5131847", "0.5129496", "0.5115165", "0.50662655", "0.50554806", "0.50528187", "0.5052439", "0.5051905", "0.50180084", "0.5015341", "0.5011343", "0.49904993", "0.49886343", "0.4979223", "0.49488083", "0.4942341", "0.49323583", "0.49308136", "0.49271032", "0.4914076", "0.49080795", "0.48964375", "0.48937923", "0.4888736", "0.4888664", "0.4885415", "0.4881733", "0.4867284", "0.4853914", "0.48354533", "0.48294175", "0.48001924", "0.48001158", "0.4798621", "0.47978285", "0.47950673", "0.47520185", "0.47458968", "0.47415224", "0.47356293", "0.4731111", "0.47278127", "0.4726682", "0.47247273", "0.47204232", "0.47160375", "0.47134057", "0.4710961", "0.47050017", "0.47047487", "0.47032332", "0.46848992", "0.4678468", "0.4677605", "0.4676054", "0.4672062", "0.4665481", "0.4657413", "0.4657121", "0.46505114", "0.4647815", "0.46462974", "0.46449864", "0.46444154", "0.4640546", "0.46392295", "0.46319795", "0.4629558", "0.46271628", "0.46222442", "0.46213946", "0.46162072", "0.46148252", "0.46138805", "0.46106574", "0.46074754", "0.45936844", "0.4582643", "0.4578228", "0.45737395", "0.4572376", "0.45710522", "0.4568422" ]
0.67932445
0
Copy an array to another array
private void copyArray(int[] src, int[] tar) { for (int i = 0; i < src.length; i++) tar[i] = src[i]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void copyArray(Object [] targetArray, Object [] sourceArray) {\n if (targetArray.length < sourceArray.length) {\n for (int i = 0; i < targetArray.length; i++) {\n targetArray[i] = sourceArray[i];\n }\n }\n else {\n for (int i = 0; i < sourceArray.length; i++) {\n targetArray[i] = sourceArray[i];\n }\n }\n }", "public void copyInto(Object[] anArray);", "private Object[] copyArray(Object[] source, int size) {\n\t\tObject[] destination = new Object[size];\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tdestination[i] = source[i];\n\t\t}\n\n\t\treturn destination;\n\t}", "public void copy(double a[], double b[]) {\n System.arraycopy(b, 0, a, 0, dimension);\n }", "private static int[] copyArray(int[] array) {\n\t\tint[] copy = new int[array.length]; \n\t\tfor(int i = 0; i < array.length; i ++) {\n\t\t\tcopy[i] = array[i];\n\t\t}\n\t\treturn copy;\n\t}", "public static int[] ArrayCopy(int[] inputArray){\n int[] copy=new int[inputArray.length];\n for (int i=0;i<inputArray.length;i++){\n copy[i]=inputArray[i];\n }\n return copy;\n }", "private void copy(int[][] origin, int[][] dest) {\n\t\tfor (int i = 0; i < origin.length; i++) {\n\t\t\tfor (int j = 0; j < origin[i].length; j++) {\n\t\t\t\tdest[i][j] = origin[i][j];\n\t\t\t}\n\t\t}\n\t}", "public static<T> T[] copyArray(T[] src, T[] dest){\n \t int i=0;\n \t while(i<=dest.length-1){\n \t\t if(dest[i]==null)\n \t\t\t break;\n \t\ti++; \n \t }\n \t \t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\tT[] res = (T[])(Array.newInstance(src[0].getClass(), src.length+i));\n \t \t\t\n \t System.arraycopy(dest, 0, res, 0, i);\n \t \t\n \t System.arraycopy(src, 0, res, i, src.length);\n \t return res;\n }", "@Test\n\tpublic void copy_test2() {\n\t\tSystem.out.println(\"copy前:\" + Arrays.toString(intArr));\t\n\t\tintArr = Arrays.copyOf(intArr, 20);\n//\t\tSystem.arraycopy(intArr, 0, intArr, 0, 20);\n\t\tSystem.out.println(\"copy后(前移):\" + Arrays.toString(intArr));\t\n\t}", "public static void arraycopy(Object arg0, int arg1, Object arg2, int arg3, int arg4) {\n\t\tif (arg0 instanceof byte[]) {\n\t\t\tnew Exception().printStackTrace();\n\t\t\tSystem.out.println(\";ARRAY COPY: \" + arg4 +\n\t\t\t\t\" bytes (offset \" + arg1 + \" -> \" + arg3 + \")\");\n\t\t\tprinthex(\" SRC:\", (byte[])arg0, arg1, arg4);\n\t\t\tSystem.out.println(\"\");\n\t\t\tprinthex(\" DST:\", (byte[])arg2, arg3, arg4);\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tSystem.arraycopy(arg0, arg1, arg2, arg3, arg4);\n\t}", "public static <T> Array<T> copyOf(T[] array, int from, int to)\n {\n Array<T> out = Array.ofSize(to - from);\n out.copyFrom(array, from, to, to - from);\n return out;\n }", "public static <T> T[] copy(T[] array) {\n return copy(array, 0, array.length);\n }", "static protected void copyMemory(int source[],int soffset,int dest[],int doffset,int size)\n\t{\n\t\tSystem.arraycopy(source,soffset,dest,doffset,size);\n\t}", "protected static String[] copy (String[] array)\n {\n String[] copy = new String[array.length];\n System.arraycopy(array, 0, copy, 0, array.length);\n return copy;\n }", "private void copy()\n\t{\n\t\t//for loop for row\n\t\tfor (int row =0; row<nextVersion.length; row++)\n\t\t{\t//for loop for column\n\t\t\tfor (int column =0; column<nextVersion[row].length; column++)\n\t\t\t{\n\t\t\t\t//assigning values for currentVersion to nextVersion array\n\t\t\t\tnextVersion[row][column] = currentVersion[row][column];\n\t\t\t}\n\t\t}\n\t\n\t}", "@Override\n public INDArray copy(INDArray x, INDArray y) {\n //NativeBlas.dcopy(x.length(), x.data(), 0, 1, y.data(), 0, 1);\n JavaBlas.rcopy(x.length(), x.data(), x.offset(), 1, y.data(), y.offset(), 1);\n return y;\n }", "private void indirectArrayCopy(int[] src, int[] ptr, int[] dst) {\n\t\tfor (int i = 0, len = ptr.length; i < len; i++) {\n\t\t\tdst[i] = src[ptr[i]];\n\t\t}\n\t}", "public static void copyInto(CountedObject[] src, Object[] dst, boolean reverse) {\n int j = (reverse ? src.length - 1 : 0);\n for (int i = 0; i != src.length; i++) {\n dst[j] = src[i].object;\n if (reverse) {\n --j;\n }\n else {\n ++j;\n }\n }\n }", "private static void copyP(final float[][] x, final float[][] y) {\n final int n1 = x[0].length;\n final int n2 = x.length;\n Parallel.loop(n2,new Parallel.LoopInt() {\n public void compute(int i2) {\n for (int i1 = 0; i1<n1; ++i1) \n y[i2][i1] = x[i2][i1];\n }\n });\n }", "public void copyInto(Object o[]) {\n compress();\n System.arraycopy(O, 0, o, 0, ON);\n }", "public void extendArray() {\n int index = size();\n Object[] temp = new Object[index + 1];\n for (int i=0; i < index; i++) {\n temp[i] = AL[i];\n }\n AL = temp;\n }", "private int[][] copy(int[][] original) {\n int [][] newChild = new int[original.length][];\n for(int i = 0; i < original.length; i++)\n newChild[i] = Arrays.copyOf(original[i],original.length);\n return newChild;\n }", "public final Piece[] copyOf(Piece[] b) {\n Piece[] c = new Piece[16];\n// for (int i = 0; i < c.length; i++) {\n// System.arraycopy(b[i], 0, c[i], 0, b[i].length);\n// }\n System.arraycopy(b, 0, c, 0, b.length);\n return c;\n }", "private void doubleArray()\n\t{\n\t\tT[] oldList = list;\n\t\tint oldSize = oldList.length;\n\t\t\n\t\tlist = (T[]) new Object[2 * oldSize];\n\t\t\n\t\t// copy entries from old array to new, bigger array\n\t\tfor (int index = 0; index < oldSize; index++)\n\t\t\tlist[index] = oldList[index];\n\t}", "void copy(int offset, int size);", "public static int[] copyVector(int[] v) { return Arrays.copyOf(v, 2); }", "public static void main(String[] args) {\n\t\t\tint[] a= {30,20,10};\n\t\t\t\n\t\t\tSystem.out.println(a);\n\t\t\t\n\t\t\t\n\t\t\tString arrayContents=Arrays.toString(a);\n\t\t\t\n\t\t\tSystem.out.println(arrayContents);\n\t\t\t\n\t\t\t\n\t\t\tint[][] a2= {{10,20},{30,40}};\n\n\t\t\tSystem.out.println(Arrays.deepToString(a2));\n\t\t\t\n\t\t\tArrayList al = new ArrayList();\n\t\t\t\n\t\t\tal.add(1);\n\t\t\tal.add(2);\n\t\t\t\n\t\t\tList l = Arrays.asList(1,2,3,\"dd\");\n\t\t\t\n\t\t\tSystem.out.println(l);\n\t\t\t\n\t\t\t\n\t\t\tObject[] o = {10,20,3.5f,\"dd\"};\n\t\t\t\n\t\t\t/* copying Array Elements */\n\t\t\t\n\t\t\t//int[] copy=Arrays.copyOf(a, a.length);\n\t\t\t\n\t\t\t//int[] a= {30,20,10};\n\t\t\t\n\t\t\tint[] copy=Arrays.copyOf(a, 5);\n\t\t\tint[] c=Arrays.copyOf(a, 6);\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Length of Original Array is \" + a.length);\n\t\t\tSystem.out.println(\"Length of new Array is \" + copy.length);\n\t\t\t\n\t\t\tfor(int i=0;i<copy.length;i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(copy[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tint[] newcopy=Arrays.copyOf(a, 2);\n\t\t\t\n\t\t\tSystem.out.println(\"Length of Original Array is \" + a.length);\n\t\t\tSystem.out.println(\"Length of new Array is \" + newcopy.length);\n\t\t\t\n\t\t\tfor(int i=0;i<newcopy.length;i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(newcopy[i]);\n\t\t\t}\n\t\t\t\n\t\t\n\t\t}", "public static int[][] copyArray(int[][] a) {\n\t\tint[][] returnArray = new int[a.length][a[0].length];\n\t\tfor (int row = 0; row < a.length; row++) {\n\t\t\tfor (int column = 0; column < a[row].length; column++) {\n\t\t\t\treturnArray[row][column] = a[row][column];\n\t\t\t}\n\t\t}\n\t\treturn returnArray;\n\t}", "public static void main(String[] args) {\n double[] a = {1, 2, 5, 9, 0, 7}; //declare and initialize array\n int N = a.length; \n double[] b = new double[N];\n\n for(int i = 0; i < N; i++) {\n b[i] = a[i];\n }\n for(int i = 0; i < b.length; i++) {\n System.out.println(\"Array b is: \" +b[i]);\n }\n for(int i = 0; i < a.length; i++) {\n System.out.println(\"Array a is: \" +a[i]);\n }\n }", "public static void main(String[] args) {\n\t\tint [] Num = {1,2,3,4,5};\n\t\tint [] newNum = new int[10];\n//\t\tfor(int i=0;i<Num.length;i++) {\n//\t\t\tnewNum[i] = Num[i];\n//\t\t}\n//\t\tnewNum = Num;\n\t\tSystem.arraycopy(Num,0, newNum,0,Num.length);\n\t\tSystem.out.println(newNum);\n\t}", "public DynamicArray<E> copy(DynamicArray<E> array) {\n synchronized (this) {\n return this.array;\n }\n }", "private void copy(int numBytes) {\n for (int i = 0; i < numBytes; i++) {\n dest[destPos + i] = src[srcPos + i];\n }\n srcPos += numBytes;\n destPos += numBytes;\n }", "public static int[][] copy(int[][] source) {\n if (source == null)\n return null;\n if (source.length < 1)\n return new int[0][0];\n int[][] target = new int[source.length][];\n for (int i = 0; i < source.length; i++) {\n target[i] = new int[source[i].length];\n System.arraycopy(source[i], 0, target[i], 0, source[i].length);\n }\n return target;\n }", "public static <T> T[] copy(T[] array, int start, int finish) {\n return Arrays.copyOfRange(array, start, finish) ;\n }", "private static void copyP(final float[][][] x, final float[][][] y) {\n final int n1 = x[0][0].length;\n final int n2 = x[0].length;\n final int n3 = x.length;\n Parallel.loop(n3,new Parallel.LoopInt() {\n public void compute(int i3) {\n copyS(x[i3],y[i3]);\n }\n });\n }", "private int[] cloneArr(final int[] origArr) {\n return Arrays.copyOf(origArr, origArr.length);\n }", "public void doubleArray() {\r\n\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tT[] temp=(T[]) new Object[item_count*2];\r\n\t\t\r\n\t\t// Copies elements from the initial array to a larger array\r\n\t\tfor(int i=0;i<item_count;i++) \r\n\t\t\ttemp[i]=arr[i];\r\n\t\tarr=temp;\r\n\t}", "private void copiarMatrices(int origen[], int destino[]) {\n for (int i = 0; i < n; i++) {\n destino[i] = origen[i];\n }\n }", "public static int[] copy(int[] theArray) {\n\n return theArray.clone();\n }", "public static double[][] copy(double[][] source) {\n if (source == null)\n return null;\n if (source.length < 1)\n return new double[0][0];\n double[][] target = new double[source.length][];\n for (int i = 0; i < source.length; i++) {\n target[i] = new double[source[i].length];\n System.arraycopy(source[i], 0, target[i], 0, source[i].length);\n }\n return target;\n }", "public DeepCopyEx(int[] values) {\n data = new int[values.length];\n for (int i = 0; i < data.length; i++) {\n data[i] = values[i];\n }\n }", "private IntPlus[] cloneArr(final IntPlus[] origArr) {\n return Arrays.copyOf(origArr, origArr.length);\n }", "public static void copy2DArray(int[][] copyFrom, int[][] copyTo) {\n for (int i = 0; i < copyFrom.length; i++) {\n for (int j = 0; j < copyFrom[0].length; j++) {\n copyTo[i][j] = copyFrom[i][j];\n }\n }\n }", "Prototype makeCopy();", "public Array<T> compactClone()\n {\n Array<T> out = Array.fromUnsafe(new Object[next], next);\n System.arraycopy(array, 0, out.array, 0, next);\n return out;\n }", "public static void copyPath(int[] target, int[] destination) {\n\t\tfor (int i = 0; i < target.length; i++) {\n\t\t\tdestination[i] = target[i];\n\t\t}\n\t}", "@Test\n\tpublic void test2() {\n\t\tSystem.out.println(\"--------------\");\n\t\t//Arrays.copyOf(T[] original, int newLength) 的底层实现与ArrayUtil.copyArr(T[] original, int newLength)实现是一样的\n\t\tInteger[] newIntArr2 = Arrays.copyOf(intArr, 3);\n\t\tInteger[] newIntArr3 = Arrays.copyOf(intArr, 8);\n\t\tSystem.out.println(Arrays.toString(intArr));\n\t\tSystem.out.println(Arrays.toString(newIntArr2));\n\t\tSystem.out.println(Arrays.toString(newIntArr3));\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static <T> void migrateArray(T[] src, T[] target, boolean deep, boolean throwExceptionOnUnCloneable) {\n\t\tif (target.length!=src.length)\n\t\t\tthrow new RuntimeException(\"Arrays must have identical size!\");\n\t\tfor (int i=0; i<src.length; i++) {\n\t\t\tT t = src[i];\n\t\t\tT clone = t;\n\t\t\tif (deep) {\n\t\t\t\ttry {\n\t\t\t\t\tMethod cloneMethod = t.getClass().getMethod(\"clone\");\n\t\t\t\t\tclone = (T) cloneMethod.invoke(t);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tif (throwExceptionOnUnCloneable)\n\t\t\t\t\t\tthrow new RuntimeException(\"Could not clone item of a monitored list!\",e);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttarget[i] = clone;\n\t\t}\n\t}", "public static int[] copyOf(int[] original, int newLength)\r\n\t{\r\n\t\tif (newLength < 0)\r\n\t\t\tthrow new NegativeArraySizeException(\"The array size is negative.\");\r\n\t\treturn copyOfRange(original, 0, newLength);\r\n\t}", "Integer[] concatArrays(Integer[] array1, Integer[] array2);", "@SuppressWarnings(\"unchecked\")\n public final T[] obtainArrayCopy() {\n final T[] localArray = array;\n if (localArray == null) return (T[]) Array.newInstance(clazz, 0);\n\n return Arrays.copyOf(localArray, localArray.length);\n }", "public int[] clone()\n\t{\t\n\t\tint[] newArray = new int[array.length];\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tnewArray[index] = array[index];\n\t\t}\n\t\treturn newArray;\n\t}", "public static char[][] cloneArray(char[][] src)\n\t{\n\t\tint length = src.length;\n\t\tchar[][] target = new char[length][src[0].length];\n\t\tfor (int i = 0; i < length; i++)\n\t\t{\n\t\t\tSystem.arraycopy(src[i], 0, target[i], 0, src[i].length);\n\t\t}\n\t\treturn target;\n\t}", "private static void merge(int[] array, int[] left, int[] right) {\n\n int i;\n\n for(i = 0; i < left.length; i++) {\n\n array[i] = left[i];\n }\n\n for (int j = 0; j < right.length; j++, i++) {\n\n array[i] = right[j];\n }\n }", "public static int[] copyAndSort(int[] a) {\n int[] result = new int[a.length];\n\n for (int i = 0; i < a.length; ++i) result[i] = a[i];\n\n QuickSort.quick1(result);\n\n return result;\n }", "public static double[][] copyArray(double[][] dataArray){\n\t\t\n\t\tint rows = dataArray.length;\n\t\tint cols = dataArray[0].length;\n\t\t\n\t\tdouble[][] returnData = new double[rows][cols];\n\t\t\n\t\t//loop over array and copy contents\n\t\tfor( int i=0; i<rows; i++) {\n\t\t\tfor (int j=0; j<cols; j++) {\n\t\t\t\treturnData[i][j] = dataArray[i][j];\t\n\t\t\t}\n\t\t}\n\t\treturn returnData;\n\t}", "@Test\n\tpublic void copy_test() {\n\t\tSystem.out.println(\"copy前:\" + Arrays.toString(intArr));\t\n\t\tint index = 1;\n\t\tint length = (intArr.length - 1) - index;\n//\t\tSystem.arraycopy(intArr, index, intArr, index+1, length);\n//\t\t//[2, 4, 4, 8, 3, 6, 0, 0]\n//\t\tSystem.out.println(\"copy后(后移):\" + Arrays.toString(intArr));\n\t\tSystem.arraycopy(intArr, index+1, intArr, index, length);\n\t\t//[2, 8, 3, 6, 0, 0, 0, 0]\n\t\tSystem.out.println(\"copy后(前移):\" + Arrays.toString(intArr));\t\n\t}", "@Override\n public BankAccount[] toArray() {\n BankAccount[] copy1 = bankArrays.clone();\n\n BankAccount[] copy2 = new BankAccount[copy1.length];\n System.arraycopy(this.bankArrays,0,copy2,0,this.numBanks);\n\n return copy1;\n }", "public int[] deepCopyRange(int[] arr, int i, int j){\n int[] result = new int[j - i + 1];\n \n for (int k = i; k <= j; k++){\n result[k - i] = arr[k];\n }\n return result;\n }", "public static double[] copyOfRange(double[] original, int from, int to)\r\n\t{\r\n\t\tif (from > to)\r\n\t\t\tthrow new IllegalArgumentException(\"The initial index is after \" +\r\n\t\t\t\t\t\"the final index.\");\r\n\t\tdouble[] newArray = new double[to - from];\r\n\t\tif (to > original.length)\r\n\t\t{\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0,\r\n\t\t\t\t\toriginal.length - from);\r\n\t\t\tArrays.fill(newArray, original.length, newArray.length, 0d);\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0, to - from);\r\n\t\treturn newArray;\r\n\t}", "public static float[] copyOf(float[] original, int newLength)\r\n\t{\r\n\t\tif (newLength < 0)\r\n\t\t\tthrow new NegativeArraySizeException(\"The array size is negative.\");\r\n\t\treturn copyOfRange(original, 0, newLength);\r\n\t}", "private Object[] deepCopy()\n {\n Object[] newList = new Object[size];\n\n int newListPosition = 0;\n for (int i =0; i < size; i++)\n {\n if (list[i] != null)\n {\n newList[newListPosition++] = list[i];\n }\n }\n\n return newList;\n }", "public static Double[][] deepCopy(Double[][] allVal2) {\r\n\t if (allVal2 == null) {\r\n\t return null;\r\n\t }\r\n\r\n\t final Double[][] result = new Double[allVal2.length][];\r\n\t for (int i = 0; i < allVal2.length; i++) {\r\n\t result[i] = Arrays.copyOf(allVal2[i], allVal2[i].length);\r\n\t // For Java versions prior to Java 6 use the next:\r\n\t // System.arraycopy(original[i], 0, result[i], 0, original[i].length);\r\n\t }\r\n\t return result;\r\n\t}", "public T[] getClonedTrimmed(T[] ar) {\r\n for (int i = offset; i < offset + count; i++) {\r\n @SuppressWarnings(\"unchecked\")\r\n T v = (T)objects[i];\r\n ar[i] = v;\r\n }\r\n return ar;\r\n }", "public static Shape[] addArray(Shape[] sourceArray) {\n Shape[] targetArray = new Shape[sourceArray.length + 1];\n System.arraycopy(sourceArray, 0, targetArray, 0, sourceArray.length);\n sourceArray = targetArray;\n return sourceArray;\n }", "public static double[] copyOf(double[] original, int newLength)\r\n\t{\r\n\t\tif (newLength < 0)\r\n\t\t\tthrow new NegativeArraySizeException(\"The array size is negative.\");\r\n\t\treturn copyOfRange(original, 0, newLength);\r\n\t}", "public static void main(String[] args) {\n\t\t\t\tint [] array1 = new int [] {5,6,8,9,14,20};\r\n\r\n\t\t\t\t//create another array same as size of array1\r\n\t\t\t\tint array2[] = new int[array1.length];\r\n\r\n\t\t\t\t//copying all elements of one array into another\r\n\t\t\t\tfor(int i=0;i<array1.length;i++) {\r\n\t\t\t\t\tarray2[i]=array1[i];\r\n\t\t\t\t}\r\n\t\t\t\t//Displaying elements of array 1\r\n\t\t\t\tSystem.out.print(\"Elements of original array : \");\r\n\t\t\t\tfor(int i = 0;i<array1.length;i++) {\r\n\t\t\t\t\tSystem.out.print(array1[i] + \" \");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\t\r\n\t\t\t\t//Displaying elements of array 2\r\n\t\t\t\tSystem.out.print(\"Elements of new array : \");\r\n\t\t\t\tfor(int i=0;i<array2.length;i++) {\r\n\t\t\t\t\tSystem.out.print(array2[i] + \" \");\r\n\t\t\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tint[] arr= {1,2,3,4,5,6,7};\n\t\t\n\t\t//defining array and along with that copy elements of arr[] into new array using copyOf()\n\t\tint[] copyArray=Arrays.copyOf(arr, arr.length);\n\t\t\n\t\tSystem.out.println(Arrays.toString(copyArray));\n\n\t}", "public static float[] copyOfRange(float[] original, int from, int to)\r\n\t{\r\n\t\tif (from > to)\r\n\t\t\tthrow new IllegalArgumentException(\"The initial index is after \" +\r\n\t\t\t\t\t\"the final index.\");\r\n\t\tfloat[] newArray = new float[to - from];\r\n\t\tif (to > original.length)\r\n\t\t{\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0,\r\n\t\t\t\t\toriginal.length - from);\r\n\t\t\tArrays.fill(newArray, original.length, newArray.length, 0f);\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0, to - from);\r\n\t\treturn newArray;\r\n\t}", "public void duplicateOriginalArray() {\n for (int r=0; r<pixels.length; r++) {\n for (int c=0; c<pixels.length; c++) {\n if (pixels[r][c] == true)\n visited[r][c] = true;\n else\n visited[r][c]= false;\n }\n }\n }", "public final byte[] serializeArray_copy() {\n final ByteBuffer b = this.serialize();\n return ByteBuffer.allocate(b.limit()).put(b).array();\n }", "public static double[][] copy(double[][] A) {\n double[][] B = new double[A.length][];\n for (int i = 0; i < B.length; i++)\n B[i] = A[i].clone();\n return B;\n }", "public void copiar() {\n for (int i = 0; i < F; i++) {\n for (int j = 0; j < C; j++) {\n old[i][j]=nou[i][j];\n }\n }\n }", "int[][] copyBoard(){\n\t\tint[][] copyB = new int[boardSize][boardSize];\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tcopyB[i] = board[i].clone();\n\t\t}\n\t\treturn copyB;\n\t}", "public static void copy(byte[] src, int srcOffset, ByteBuffer dest, int destOffset, int length) {\n long destAddress = destOffset;\n Object destBase = null;\n if (dest.isDirect()) {\n destAddress = destAddress + ((DirectBuffer) dest).address();\n } else {\n destAddress = destAddress + BYTE_ARRAY_BASE_OFFSET + dest.arrayOffset();\n destBase = dest.array();\n }\n long srcAddress = (long) srcOffset + BYTE_ARRAY_BASE_OFFSET;\n unsafeCopy(src, srcAddress, destBase, destAddress, length);\n }", "private int[][] copyState(int[][] stateToBeCopied) {\n\t\tint[][] tempState = new int[9][9];\n\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\ttempState[i][j] = stateToBeCopied[i][j];\n\t\t\t}\n\t\t}\n\n\t\treturn tempState;\n\t}", "public double[][] getArrayCopy(){\r\n \tdouble[][] c = new double[this.nrow][this.ncol];\r\n\t\tfor(int i=0; i<nrow; i++){\r\n\t\t \tfor(int j=0; j<ncol; j++){\r\n\t\t \tc[i][j]=this.matrix[i][j];\r\n\t\t \t}\r\n\t\t }\r\n \treturn c;\r\n \t}", "public double[][] getArrayCopy() {\n double[][] C = new double[m][n];\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n C[i][j] = data[i][j];\n }\n }\n return C;\n }", "public static long[] copyOf(long[] original, int newLength)\r\n\t{\r\n\t\tif (newLength < 0)\r\n\t\t\tthrow new NegativeArraySizeException(\"The array size is negative.\");\r\n\t\treturn copyOfRange(original, 0, newLength);\r\n\t}", "public static boolean[][] deepCopy(boolean[][] in){\r\n\t\treturn Arrays.stream(in).map(i -> i.clone()).toArray(i -> in.clone());\r\n\t}", "public final T[] getArrayCopy() {\n final T[] localArray = array;\n if (localArray == null) {\n return null;\n }\n\n return Arrays.copyOf(localArray, localArray.length);\n }", "public static void main(String[] args) {\n\n int[] months = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};\n System.out.println(months.length);\n\n for (int i = 0; i < months.length; i++) {\n System.out.println(months[i]);\n }\n\n for (int month : months) {\n System.out.println(month);\n }\n\n System.out.println(printArray(months));\n\n String[] names = new String[3];\n names[0] = \"John\";\n names[1] = \"Lucy\";\n names[2] = \"Scott\";\n System.out.println(printArray(names));\n\n int[] myNumbers = {1, 2, 3};\n // don't do this! \n // int[] myNumbers2 = myNumbers;\n int [] myNumbers2 = copyArray(myNumbers);\n \n System.out.println(printArray(myNumbers));\n System.out.println(printArray(myNumbers2));\n \n myNumbers2[0] = 99;\n \n System.out.println(printArray(myNumbers));\n \n System.out.println(printArray(myNumbers2));\n\n }", "private static void exchange( Comparable[] datos, int i, int j)\n\t{\n\t\t// TODO implementar\n\t\tComparable copia=datos[j];\n\t\tdatos[j]=datos[i];\n\t\tdatos[i]=copia; \n\t}", "public void newArray() {\n\t\t\n\t\tE[] newArray= (E[]) new Object[list.length * 2]; //Holds the old elements from the list array while new list array is being made\n\t\t\n\t\tfor(int i = 0; i < list.length; i++) {\n\t\t\t\n\t\t\tnewArray[i] = list[i]; //Copy the old list array into the newArray\n\t\t}\n\t\t\n\t\tlist = newArray; //Point the old array at the newArray starting memory location\n\t\t\n\t}", "private static int[][] copyFunction(int[][] numbers, int[][] copyNum) {\n\t\t\n\t\tSystem.arraycopy(numbers, 0, copyNum, 0, 4);\n\t\treturn copyNum;\n\t}", "Object[] elements(Object[] destination) {\n return elements.toArray(destination);\n }", "private Position[] concatArrays(Position[] first, Position[] second)\r\n {\r\n int size = first.length + second.length;\r\n Position[] a = new Position[size];\r\n int pt = 0;\r\n\r\n for (Position tmpPos : first)\r\n {\r\n a[pt] = tmpPos;\r\n pt++;\r\n }\r\n\r\n for (Position tmpPos : second)\r\n {\r\n a[pt] = tmpPos;\r\n pt++;\r\n }\r\n\r\n return a;\r\n }", "JAVATYPE [] convertArray(JAVATYPE [] oldArray, final METATYPE meta);", "@Test\n\tpublic void forwardCopy_test2() {\n\t\tSystem.out.println(\"copy前:\" + Arrays.toString(intArr));\t\n\t\tint index = 1;\n//\t\tArrayUtil.forwardCopy(intArr, index, 2);\n//\t\t//[2, 8, 3, 6, 0, 0, 0, 0]\n//\t\tSystem.out.println(\"copy后(前移):\" + Arrays.toString(intArr));\n//\t\tint len = intArr.length;\n//\t\tfor(int i = index; i< intArr.length - 1; i++){\n//\t\t\tintArr[i] = intArr[i+1];\n//\t\t}\n//\t\t//[2, 4, 3, 6, 0, 0, 0, 0]\n\t\tSystem.out.println(\"copy后(前移):\" + Arrays.toString(intArr));\t\n\t}", "T[] toArray(T[] a);", "public <T> T[] a(T[] tArr, T[] tArr2) {\n int length = tArr.length;\n int length2 = tArr2.length;\n T[] tArr3 = (Object[]) Array.newInstance(tArr.getClass().getComponentType(), length + length2);\n System.arraycopy(tArr, 0, tArr3, 0, length);\n System.arraycopy(tArr2, 0, tArr3, length, length2);\n return tArr3;\n }", "public static byte[] copy(final byte[] bytes) {\n\t\treturn copy(bytes, 0, bytes.length);\n\t}", "public static void intercambiar(int []Grado1, int ii, int jj){\nint aux=Grado1[ii];\nGrado1[ii]= Grado1[jj];\nGrado1[jj]=aux;\n}", "public ShallowCopyEx(int[] values) {\n data = values;\n }", "public static <T> Array<T> copyOf(T[] array, int n)\n {\n assert n <= array.length;\n\n Array<T> out = Array.ofSize(n);\n out.copyFrom(array, 0, 0, n);\n return out;\n }", "public static Object[] arrayConcatenate(Object[] input, Object[] a1, Object[] a2) {\r\n\t\tint i = 0;\r\n\t\tfor(int j = 0; j < a1.length; j++) {\r\n\t\t\tinput[i] = a1[j];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tfor(int j = 0; j < a2.length; j++) {\r\n\t\t\tinput[i] = a2[j];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn input;\r\n\t}", "public int[] cloneMemory(){\n return memory.clone();\n }", "public static int[] RevCopyArray(int[] inputArray) {\n int[] RevCopyArray = new int[inputArray.length];\n for (int i=0; i<RevCopyArray.length;i++) {\n RevCopyArray[i] = inputArray[inputArray.length-1-i];\n \n }\n return RevCopyArray;\n \n }", "public static <T> T[] concat(T[] first, T[] second) {\r\n\t\tT[] result = Arrays.copyOf(first, first.length + second.length);\r\n\t\tSystem.arraycopy(second, 0, result, first.length, second.length);\r\n\t\treturn result;\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tint [] arr= {6,2,62,5,20,6,9,4,5,10};\r\n\t\tint [] arr2=new int[10];\r\n\t\t\r\n\t\t\r\n\t\trcopy(arr2,arr);\r\n\t\t\r\n\t\tfor(int e: arr2) {\r\n\t\t\tSystem.out.print(e+\"|\");\r\n\t\t}\r\n\t\t\r\n\t\r\n\t}" ]
[ "0.7796641", "0.76610696", "0.737448", "0.7354723", "0.7103274", "0.6821259", "0.6785505", "0.67646766", "0.67488223", "0.6697095", "0.66032475", "0.65688604", "0.6474329", "0.6473492", "0.6434462", "0.6426884", "0.641912", "0.63994503", "0.6391904", "0.63449264", "0.6310996", "0.62719125", "0.62709206", "0.62561816", "0.62443215", "0.62419593", "0.6173291", "0.6152337", "0.61444443", "0.614403", "0.6140316", "0.61311954", "0.6131032", "0.6118423", "0.6118011", "0.6117968", "0.6094881", "0.60811996", "0.60610574", "0.60465556", "0.6040894", "0.6036386", "0.60310745", "0.60118216", "0.6004948", "0.59758335", "0.5957587", "0.5927332", "0.5912388", "0.59031653", "0.5888835", "0.5867964", "0.5860056", "0.5858591", "0.5831055", "0.5831029", "0.5826237", "0.5825115", "0.58102524", "0.58087957", "0.58011764", "0.57903284", "0.57855994", "0.57828754", "0.57717323", "0.57703775", "0.57653207", "0.5752113", "0.57455647", "0.5739037", "0.5729526", "0.572366", "0.57156795", "0.57107604", "0.5710119", "0.57099676", "0.5704908", "0.56972045", "0.56909204", "0.56904584", "0.5688412", "0.5685413", "0.5682968", "0.5674854", "0.5669718", "0.56684244", "0.5668112", "0.5661211", "0.56604797", "0.56575865", "0.56541646", "0.5647633", "0.56470305", "0.5646338", "0.5643375", "0.56404924", "0.5633525", "0.56311285", "0.56153035", "0.56124055" ]
0.7351585
4
TODO: premysliet kam premiestnit mapovanie entit do view
public PersonView(InMemoryCollections collections, Person person) { this.id = person.getId(); this.councilId = person.getCouncilId(); this.name = person.getName(); this.firstname = person.getFirstname(); this.surname = person.getSurname(); this.prefix = person.getPrefix(); this.elections = person.getElections(); this.offices = person.getOffices(); this.departments = person.getDepartments(); this.deputies = person.getDeputies(); this.commissions = person.getCommissions(); this.club = person.getClub(); this.fb = person.getFb(); this.role = person.getRole(); if (offices != null) { officesView = offices.stream().map(x -> new OfficeRefView(collections, x, person)).collect(Collectors.toList()); } if (departments != null) { departmentsView = departments.stream().map(x -> new DepartmentRefView(collections, x)).collect(Collectors.toList()); } if (deputies != null) { deputiesView = deputies.stream().map(x -> new DeputyRefView(collections, x, person)).collect(Collectors.toList()); } if (commissions != null) { commissionsView = commissions.stream().map(x -> new CommissionRefView(collections, x)).collect(Collectors.toList()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setupRender() {\n List<Predmet> predmets = adminService.findAllPredmetsForPredavac(predavac);\n // create a SelectModel from my izlistaj of colors\n predmetSelectModel = selectModelFactory.create(predmets, \"name\");\n years = adminService.getYears();\n// List<Aktivnost> activities = adminService.getActivities(1, 2015);\n }", "@RequestMapping(\"/clienteLista\")\r\n\tpublic String indice(Model model){\t\t\r\n\t\t\r\n\t\tmodel.addAttribute(\"cliente\", new Cliente()); //Al iniciar página siempre pasamos instancia vacía\r\n\t\t\r\n\t\treturn \"clienteLista\";\r\n\t}", "@RequestMapping(value = \"l_entrega\")\r\n public String listarEntregas(BusquedaFiltro nuevoFiltro, HttpSession session, Model model) {\n System.out.println(nuevoFiltro.getCiclo() + \" naaaaaada\" + nuevoFiltro.getIdCurso());\r\n PersonaDTO personaDTO = (PersonaDTO) session.getAttribute(\"personaDTO\");\r\n AlumnoDTO p = alumnoDAO.get(personaDTO.getCodigo());\r\n model.addAttribute(\"personaDTO\", p);\r\n HistorialDTO historialDTO = alumnoDAO.getHistorial(nuevoFiltro.getCiclo(), nuevoFiltro.getIdCurso(), p.getId());\r\n session.setAttribute(\"historialDTO\", historialDTO);\r\n List<AvanceDTO> avanceList = alumnoDAO.listarAvances(historialDTO.getIdHistorial());\r\n model.addAttribute(\"ListaAvances\", avanceList);\r\n\r\n return \"alumno/alumnocronograma\";\r\n }", "private void listar() throws Exception{\n int resId=1;\n List<PlatoDia> lista = this.servicioRestaurante.listarMenuDia(resId);\n this.modelListEspecial.clear();\n lista.forEach(lse -> {\n this.modelListEspecial.addElement(\"ID: \" + lse.getId() \n + \" NOMBRE: \" + lse.getNombre()\n + \" DESCRIPCION: \" + lse.getDescripcion()\n + \" PRECIO: \" + lse.getPrecio()\n + \" ENTRADA: \"+lse.getEntrada() \n + \" PRINCIPIO: \"+lse.getPrincipio()\n + \" CARNE: \"+lse.getCarne()\n + \" BEBIDA: \"+lse.getBebida()\n + \" DIA: \"+lse.getDiaSemana());\n });\n }", "@RequestMapping(value = \"/daftar-ranap\")\n\t\tprivate String viewAllPasienRanap(Model model) throws IOException {\n\t\t\tList<KamarModel> kamarList = kamarService.getAllKamarByStatus(1);\n\t\t\t\n\t\t\tMap<KamarModel, PasienModel> map = new HashMap<>();\n\t\t\t\n\t\t\tfor(KamarModel kamar : kamarList) {\n\t\t\t\tSystem.out.println(kamar.getStatus());\n\t\t\t\tString idPasien = String.valueOf(kamar.getIdPasien());\n\t\t\t\t\n\t\t\t\tmap.put(kamar, pasienService.getPasien(idPasien));\n\t\t\t}\n\t\t\t\n\t\t\tmodel.addAttribute(\"map\", map);\n\t\t\tmodel.addAttribute(\"kamarList\", kamarList);\n\t\t\treturn \"daftar-ranap\";\n\t\t}", "@RequestMapping\n\tprotected String defaultView(RenderRequest renderRequest) {\n\t\tString tipoReplicador;\n\t\ttipoReplicador = renderRequest.getPreferences().getValue(\"tipoReplicador\", \"\");\n\n\t\trenderRequest.setAttribute(\"tipoReplicador\", tipoReplicador);\n\t\t// JSonUtil.LogAuditoria(renderRequest, indicadorPortlet, indicadorController);\n\n\t\treturn \"edit\";\n\t}", "public abstract String dohvatiKontakt();", "public ViewKorisnik() {\n initComponents();\n obrada = new ObradaKorisnik();\n }", "public void rechercheEtudiantInscripEcheanceParMatricule(){\r\n try { \r\n setViewEtudiantInscripEcheance(viewEtudiantInscripEcheanceFacadeL.findByMatricule(getViewEtudiantInscripEcheance().getMatricule())); \r\n \r\n //initialisation des echeances\r\n// viewEtudiantInscripEcheance.setVers1(0); \r\n// viewEtudiantInscripEcheance.setVers2(0); \r\n// viewEtudiantInscripEcheance.setVers3(0); \r\n// viewEtudiantInscripEcheance.setVers4(0); \r\n// viewEtudiantInscripEcheance.setVers5(0); \r\n// viewEtudiantInscripEcheance.setVers6(0); \r\n } catch (Exception e) {\r\n FacesMessage message = new FacesMessage(\"Accun étudiant n'a été trouvé! \");\r\n message.setSeverity(FacesMessage.SEVERITY_WARN);\r\n FacesContext.getCurrentInstance().addMessage(null, message); \r\n \r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n } \r\n }", "@RequestMapping(value = \"/viewComittee.do\")\n\t\tpublic String viewComittee(HttpServletRequest request, HttpServletResponse response,Model model) throws IOException {\n\t\t\tSystem.out.println(\"get\");\n\t\t\tString sSeq = request.getParameter(\"sSeq\");\n\t\t\tSystem.out.println(sSeq);\n\t\t\t\n\t\t\tMap <String,String> hm3 = new HashMap();\n\t\t\thm3.put (\"sSeq\",sSeq);\n\t\t\t\n\t\t\tMap<String,String> map = comitteeListService.viewComittee(hm3);\n\t\t\t\n\t\t model.addAllAttributes(map);\n\t\t \n\t\t // Keypoint ! setViewName占쏙옙 占쏙옙載� String 占식띰옙占쏙옙姑占� JsonView bean 占쏙옙占쏙옙占쏙옙占쏙옙占� id占쏙옙 占쏙옙占싣억옙 占싼댐옙.\t \n\t\t return \"jsonView\";\n\t}", "@PostConstruct\n\tpublic void view() {\n\t\tif (log.isDebugEnabled()) {\n log.debug(\"Entering 'ConsultaHIPCuentaCorrientesAction - view' method\");\n }\n\t\tMap<String, String> parametros = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();;\n\t\tthis.parametrosPantalla = new HashMap<String, String>();\n\t\tthis.parametrosPantalla.putAll(parametros);\n\t\ttry {\n\t\t\tthis.formBusqueda = this.devuelveFormBusqueda();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t\n\t\t}\n\t}", "public String listViaje() {\n\t\t\t//resetForm();\n\t\t\treturn \"/boleta/list.xhtml\";\t\n\t\t}", "public void index() {\n\t\t\n\t\tList<Filme> preferencias = new ArrayList<Filme>();\n\t\tfor( Map.Entry<Key, Integer> entry : session.getUsuario().getPreferencias().entrySet()){\n\t\t\tFilme tmp = filmeDao.getById(entry.getKey());\n\t\t\ttmp.setVotos(entry.getValue());\n\t\t\tpreferencias.add(tmp);\n\t\t}\n\t\t\n\t\t// passando todos os filmes, o usuário e as preferencias dele\n\t\tresult.include(\"filmes\", filmeDao.getAllInOrder() );\n\t\tresult.include(\"usuario\", session.getUsuario() );\n\t\tresult.include(\"preferencias\", preferencias);\n\t}", "public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }", "public String update()\n {\n this.conversation.end();\n\n try\n {\n if (this.id == null)\n {\n this.entityManager.persist(this.paramIntervento);\n return \"search?faces-redirect=true\";\n }\n else\n {\n this.entityManager.merge(this.paramIntervento);\n return \"view?faces-redirect=true&id=\" + this.paramIntervento.getNome();\n }\n }\n catch (Exception e)\n {\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(e.getMessage()));\n return null;\n }\n }", "private void popuniTabelu() {\n try {\n List<PutnikEntity> putnici=Controller.vratiSvePutnike();\n TableModel tm=new PutnikTableModel(putnici);\n jtblPutnici.setModel(tm);\n } catch (Exception ex) {\n Logger.getLogger(FIzaberiLet.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private String getOeuvres(HttpServletRequest request) throws Exception {\n List<Oeuvre> lstOeuvresE;\n try {\n lstOeuvresE = oeuvreF.getOeuvres();\n request.setAttribute(\"lstOeuvresR\", lstOeuvresE);\n return (\"/catalogue.jsp\");\n } catch (Exception e) {\n throw e;\n }\n }", "void setupRender() {\n List<Predmet> predmets = adminService.findAllPredmetsForPredavac(predavac);\n\n // create a SelectModel from my izlistaj of colors\n predmetSelectModel = selectModelFactory.create(predmets, \"name\");\n }", "public static void showAllVillaNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.VILLA);\n }", "@RequestMapping(\"/viewRoute\") \n\t\t public String viewShip(Model m){ \n\t\t List<Route> list=dao.getRoute(); \n\t\t m.addAttribute(\"list\",list); \n\t\t return \"viewRoute\"; \n\t\t }", "@RequestMapping(value = \"/panier.htm\", method = RequestMethod.GET)\n\tpublic String panier(ModelMap model) {\n\t\tupdatePanier(model);\n\t\treturn \"panier\";\n\t}", "public String navigateAlunoTurmaList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"AlunoTurma_items\", this.getSelected().getAlunoTurmaList());\n }\n return \"/pages/prime/alunoTurma/index\";\n }", "public String navigateDetalleHorarioList() {\r\n if (this.getSelected() != null) {\r\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"DetalleHorario_items\", this.getSelected().getDetalleHorarioList());\r\n }\r\n return \"/detalleHorario/index\";\r\n }", "public void prenderVehiculo();", "Object getViewDetails();", "public Index() {\n EntityManager emgr = new BeanBase().getEntityManager();\n this.listaUltimasEntradas = new BeanBaseJWiki().getUltimosCincoArticulosSmall();\n this.listaExistenciasFallidas = emgr.createQuery(\"SELECT e FROM Existencia e WHERE e.idestado.idestado=2\").getResultList();\n this.listaExistenciasMantenimiento = emgr.createQuery(\"SELECT e FROM Existencia e WHERE e.idestado.idestado=3\").getResultList();\n this.listaEquiposFallidos = emgr.createQuery(\"SELECT e FROM Equiposimple e WHERE e.idestado.idestado=2\").getResultList();\n this.listaEquiposMantenimiento = emgr.createQuery(\"SELECT e FROM Equiposimple e WHERE e.idestado.idestado=3\").getResultList();\n\n Calendar cal = Calendar.getInstance(); \n this.listaReservasHoy = new BeanBaseJCanon().getReservasMismoDia(cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.YEAR));\n\n }", "public ViewDetallesPagos () {\r\n\r\n }", "public void leseViewAusModel() {\r\n Model model = Model.getInstanz();\r\n\r\n ATab aktuellerTab = model.getRoot();\r\n\r\n while (aktuellerTab.getNext() != null) {\r\n ArrayList<ATab> next = aktuellerTab.getNext();\r\n\r\n for (int j = 0; j < next.size(); j++) {\r\n if (next.get(j) instanceof Inhalt) {\r\n\r\n Inhalt tmpNext = (Inhalt) next.get(j);\r\n\r\n setInhalt(tmpNext.getName(), tmpNext.getInhalt());\r\n }\r\n }\r\n\r\n for (int j = 0; j < next.size(); j++) {\r\n\r\n if (next.get(j) instanceof Tab || next.get(j) instanceof Inhalt) {\r\n aktuellerTab = next.get(j);\r\n }\r\n }\r\n }\r\n }", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "@Override\r\n\tpublic String detail() {\n\t\tSystem.out.println(\"detailView.\");\r\n\t\t//javax.servlet.http.HttpSession session=request.getSession();\r\n\t\t//javax.servlet.ServletContext application=request.getServletContext();\r\n\t\t\r\n\t\t//String vId=request.getParameter(\"id\");\r\n\t\tif(!SysFun.isNullOrEmpty(id)) {\r\n\t\t\tLong iId=SysFun.parseLong(id);\r\n\t\t\tHeadLine bean=headLineService.load(iId);\r\n\t\t\tif(bean!=null) {\r\n\t\t\t\trequest.put(\"bean\", bean);\r\n\t\t\t\treturn \"detail\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"detail\";\r\n\t}", "@RequestMapping(\"/tyhjenna\")\n public String poistaKaikkiTuotteet() {\n ostoskoriService.tyhjennaOstoskori();\n return \"redirect:/ostoskori\";\n }", "@Override\r\n\t@RequestMapping(\"\")\r\n\tpublic String index(HttpServletRequest request, ModelMap map) {\r\n\t\treturn getViewName(\"ftls/imagesColumn/index\");\r\n\t}", "@Override\n\tpublic void setView(Resultado resultado, HttpServletRequest request, HttpServletResponse response) {\n\n\t}", "@RequestMapping(\"/viewAllLocs\")\n\tpublic String getAllLocs(ModelMap map){\n\t\tList<Location> locList=service.getAllLocations();\n\t\tmap.addAttribute(\"locListObj\", locList);\n\t\treturn \"LocationData\";\n\t}", "public static void viewtable() {\r\n\t\tt.dibuixa(table);\r\n\t}", "@Override\n\tpublic ArrayList<Lista> listaListeElettorali() {\n\t\t\t\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\t\t\tArrayList<Lista> liste = new ArrayList<Lista>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\t\tfor (int key : keys) {\n\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\n\t\t\treturn liste;\n\t\t\t\n\t\t}", "public void displayPhieuXuatKho() {\n\t\tlog.info(\"-----displayPhieuXuatKho()-----\");\n\t\tif (!maPhieu.equals(\"\")) {\n\t\t\ttry {\n\t\t\t\tDieuTriUtilDelegate dieuTriUtilDelegate = DieuTriUtilDelegate.getInstance();\n\t\t\t\tPhieuTraKhoDelegate pxkWS = PhieuTraKhoDelegate.getInstance();\n\t\t\t\tCtTraKhoDelegate ctxWS = CtTraKhoDelegate.getInstance();\n\t\t\t\tDmKhoa dmKhoaNhan = new DmKhoa();\n\t\t\t\tdmKhoaNhan = (DmKhoa)dieuTriUtilDelegate.findByMa(IConstantsRes.KHOA_KC_MA, \"DmKhoa\", \"dmkhoaMa\");\n\t\t\t\tphieuTra = pxkWS.findByPhieutrakhoByKhoNhan(maPhieu, dmKhoaNhan.getDmkhoaMaso());\n\t\t\t\tif (phieuTra != null) {\n\t\t\t\t\tmaPhieu = phieuTra.getPhieutrakhoMa();\n\t\t\t\t\tresetInfo();\n\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\t\tngayXuat = df.format(phieuTra.getPhieutrakhoNgay());\n\t\t\t\t\tfor (CtTraKho ct : ctxWS.findByphieutrakhoMa(phieuTra.getPhieutrakhoMa())) {\n\t\t\t\t\t\tCtTraKhoExt ctxEx = new CtTraKhoExt();\n\t\t\t\t\t\tctxEx.setCtTraKho(ct);\n\t\t\t\t\t\tlistCtKhoLeTraEx.add(ctxEx);\n\t\t\t\t\t}\n\t\t\t\t\tcount = listCtKhoLeTraEx.size();\n\t\t\t\t\tisFound=\"true\";\n\t\t\t\t\t// = null la chua luu ton kho -> cho ghi nhan\n\t\t\t\t\t// = 1 da luu to kho -> khong cho ghi nhan\n\t\t\t\t\tif(phieuTra.getPhieutrakhoNgaygiophat()==null)\n\t\t\t\t\tisUpdate = \"1\";\n\t\t\t\t\telse\n\t\t\t\t\t\tisUpdate = \"0\";\n\t\t\t\t} else {\n\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\t\treset();\n\t\t\t\t}\n\t\t\t\ttinhTien();\n\t\t\t} catch (Exception e) {\n\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\treset();\n\t\t\t\tlog.error(String.format(\"-----Error: %s\", e));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void srediTabelu() {\n\n mtu = (ModelTabeleUlica) jtblUlica.getModel();\n ArrayList<Ulica> ulice = kontrolor.Kontroler.getInstanca().vratiUlice();\n mtu.setLista(ulice);\n\n }", "@RequestMapping(\"/lista-de-eventos\")\n\tpublic ModelAndView listarEventos() {\n\t\tModelAndView mv = new ModelAndView(\"eventos/lista-de-eventos\");\n\t\t\n\t\t// lista de eventos\n\t\tIterable<Evento> eventos = er.findAll();\n\t\t\n\t\t// passando pra view. O primeiro parametro\n\t\t// eh aquele definido na view, ${}\t\t\n\t\tmv.addObject(\"eventos\", eventos);\n\t\t\n\t\treturn mv;\t\n\t}", "@RequestMapping(value = { \"/\", \"/list\" }, method = RequestMethod.GET)\n\tpublic String listEntities(ModelMap model) {\n\n\t\tList<ENTITY> entities = abm.listar();\n\n\t\tlogger.info(\"Tengo {} usuarios registrados\", entities.size());\n\n\t\tmodel.addAttribute(\"entities\", entities);\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/list\";\n\t}", "public void listarEquipamentos() {\n \n \n List<Equipamento> formandos =new EquipamentoJpaController().findEquipamentoEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeEquipamento.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Equipamento f : formandos) {\n tbm.addRow(new String[1]);\n \n listadeEquipamento.setValueAt(f.getIdequipamento(), i, 0);\n listadeEquipamento.setValueAt(f.getEquipamento(), i, 1);\n \n i++;\n }\n \n \n \n }", "public SrvINFONEGOCIO(AgregarInfoNegocio view) {//C.P.M Tendremos un constructor con la vista de agregar informacion de negocio\r\n this.vista = view;//C.P.M Se la agregamos a la variable para tener acceso a la vista \r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n request.setCharacterEncoding(\"UTF-8\");\n TipoCursoModel tipoCursoModel =new TipoCursoModel();\n CursoModel cursoModel = new CursoModel();\n \n ArrayList<TipoCurso> tipos_curso = tipoCursoModel.todos();\n ArrayList<Curso> cursos =cursoModel.todos();\n request.setAttribute(\"tipos_curso\", tipos_curso);\n request.setAttribute(\"cursos\", cursos);\n request.getRequestDispatcher(\"/index.jsp\").forward(request, response);\n }", "@RequestMapping(\"/all\")\r\n\r\n\tpublic String getAll(ModelMap map) {\n\t\tList<UomType> uoms=service.getAllUomTypes();\r\n\t\t//send data to ui\r\n\t\tmap.addAttribute(\"list\", uoms);\r\n\t\t// go to ui\r\n\t\treturn \"UomData\";\r\n\r\n\t}", "public String navigateRutaCollection() {\n Municipio selected = this.getSelected();\n if (selected != null) {\n MunicipioFacade ejbFacade = (MunicipioFacade) this.getFacade();\n Collection<Ruta> selectedRutaCollection = ejbFacade.findRutaCollection(selected);\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Ruta_items\", selectedRutaCollection);\n }\n return \"/app/ruta/index\";\n }", "@RequestMapping(value = \"/{id}\",method = RequestMethod.GET)\n public String showEntry(@PathVariable(\"id\") Integer id, Model model){\n //entry bos mu vs.\n Optional<Entry> entryOptional=entryRepoitory.findById(id);\n if(!entryOptional.isPresent()){\n log.warn(\"Entry with{} id is not present\",id);\n return \"index\";\n }\n else{\n model.addAttribute(\"entry\",entryOptional.get());\n return \"entries/showEntry\";\n }\n\n\n }", "public void listarutilizador() {\n \n \n List<Utilizador> cs =new UtilizadorJpaController().findUtilizadorEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeutilizador.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Utilizador c : cs) {\n tbm.addRow(new String[1]);\n listadeutilizador.setValueAt(c.getIdutilizador(), i, 0);\n listadeutilizador.setValueAt(c.getNome(), i, 1);\n listadeutilizador.setValueAt(c.getUtilizador(), i, 2);\n listadeutilizador.setValueAt(c.getIdprevilegio().getPrevilegio(), i, 3);\n// listaderelatorio.setValueAt(f.getTotal(), i, 4);\n// Distrito di = new DistritoJpaController().getDistritoByLoc(f.getIdlocalidade());\n// Localidade lo = new LocalidadeJpaController().findLocalidade(f.getIdlocalidade());\n// listaderelatorio.setValueAt(di.getDistrito(), i, 0);//lo.getIdposto().getIddistrito().getDistrito(), i, 0);\n// listaderelatorio.setValueAt(lo.getLocalidade(), i, 1);\n \n//// listadeformando.setValueAt(f.getSexo(), i, 2);\n// listaderelatorio.setValueAt(f.getQhomem(), i, 2);\n// listaderelatorio.setValueAt(f.getQmulher(), i, 3);\n// listaderelatorio.setValueAt(f.getTotal(), i, 4);\n// \n// \n i++;\n }\n \n \n \n }", "@Override\n public void beforeShowNewEntity()\n {\n entity = new Aluno();\n entity.setDataNascimento(new GregorianCalendar());\n String senha = CriptografiaLogic.encriptar(\"123\");\n entity.setSenha(senha);\n }", "@RequestMapping(\"/pegawai\")\n\tprivate String viewPegawaiByNip(@RequestParam(value = \"nip\") String nip, Model model) {\n\t\tPegawaiModel archive = pegawaiService.getPegawaiDetailByNip(nip);\n\t\t\n\t\tmodel.addAttribute(\"pegawai\", archive);\n\t\tmodel.addAttribute(\"gaji\", archive.getGaji());\n\t\treturn \"view-pegawai\";\n\t}", "@GetMapping(\"/dojos/{id}\")\n\tpublic String displayNinjas(@PathVariable(\"id\") Long id, Model model) {\n\t\tmodel.addAttribute(\"dojo.ni\", dojoService.findOneDojo(id));\n\t\treturn \"dojopage.jsp\";\n\t}", "public AbstrJoueurModel retourneAbstrJoueurModel(){ return ajm;}", "@RequestMapping(value = \"/viewpublicrepository\", method = RequestMethod.GET)\r\n public String loginvpr(Locale locale, Model model) {\t\t\r\n return \"viewpublicrepository\";\r\n }", "@GetMapping(\"/komponenGaji\")\n private String komponenGaji(Model model){\n KomponenPengaliModel komponenGaji = payrollService.getKomponenGajiById(Long.parseLong(\"1\"));\n model.addAttribute(\"komponenGaji\", komponenGaji);\n return\"komponen-pengali-gaji\";\n }", "private String html2(final TableFacade tableFacade,\n\t\t\tfinal HttpServletRequest request) {\n\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascId\",\n\t\t\t\t\"ascIngresoCoope\", \"ascAsociadoPadre\");\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo\");\n\n\t\tnombreColumna = row.getColumn(\"ascId\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.asociado\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString nombreAsociado = \"\";\n\t\t\t\tSecPerPersonaDAO personaDAO = new SecPerPersonaDAO(getSessionHibernate(request));\n\t\t\t\tSecPerPersona persona = personaDAO.findById(asociado\n\t\t\t\t\t\t.getSecPerPersona().getPerId());\n\t\t\t\tnombreAsociado = persona.getPerPrimerApellido() + \", \"\n\t\t\t\t\t\t+ persona.getPerPrimerNombre();\n\t\t\t\treturn nombreAsociado;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascIngresoCoope\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.empresa\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString empresa = \"\";\n\t\t\t\tif (asociado.getAscDirTrabajo() == null\n\t\t\t\t\t\t|| asociado.getAscDirTrabajo().equals(\"\")) {\n\t\t\t\t\tCtaDptDepartamentoTrabajo departamentoTrabajo = asociado\n\t\t\t\t\t\t\t.getCtaDptDepartamentoTrabajo();\n\t\t\t\t\tCtaEtrEmpresaTrabajoDAO empresaTrabajoDAO = new CtaEtrEmpresaTrabajoDAO(getSessionHibernate(request));\n\t\t\t\t\tCtaEtrEmpresaTrabajo empresaTrabajo = empresaTrabajoDAO\n\t\t\t\t\t\t\t.findById(departamentoTrabajo\n\t\t\t\t\t\t\t\t\t.getCtaEtrEmpresaTrabajo().getEtrId());\n\t\t\t\t\tempresa = empresaTrabajo.getEtrNombre();\n\t\t\t\t} else {\n\t\t\t\t\tempresa = asociado.getAscDirTrabajo();\n\t\t\t\t}\n\t\t\t\treturn empresa;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascAsociadoPadre\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.total\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\n\t\t\t\tCtaCasCuentaAsociadoDAO casDAO = new CtaCasCuentaAsociadoDAO(getSessionHibernate(request));\n\t\t\t\tdouble afiliacion = casDAO.getCuotaAfiliacion(asociado\n\t\t\t\t\t\t.getAscId());\n\n\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\", descSeguros,request);\n\n\t\t\t\treturn Format\n\t\t\t\t\t\t.formatDinero(afiliacion\n\t\t\t\t\t\t\t\t+ (descAportaciones + descAhorros\n\t\t\t\t\t\t\t\t\t\t+ descPrestamos + descSeguros)\n\t\t\t\t\t\t\t\t/ DIVISOR);\n\t\t\t}\n\t\t});\n\n\t\treturn tableFacade.render();\n\t}", "@Override\n\tpublic String dohvatiKontakt() {\n\t\treturn \"Naziv tvrtke: \" + naziv + \", mail: \" + getEmail() + \", tel: \" + getTelefon() + \", web: \" + web;\n\t}", "@Override\n public JSONObject viewApprisalFormByDirector() {\n\n return in_apprisialformdao.viewApprisalFormByDirector();\n }", "private String html(final TableFacade tableFacade, final HttpServletRequest request) {\r\n\t\ttableFacade.setColumnProperties(\"id.invPexProductosExistencia.invArtArticulo.artCodigo\",\r\n\t\t\t\t\"id.invPexProductosExistencia.invArtArticulo.artNombre\",\r\n\t\t\t\t\"eboCantidadProducto\",\"eboSaldo\",\"audFechaCreacion\");\r\n\t\tTable table = tableFacade.getTable();\r\n\t\t\r\n\t\t//---- Titulo de la tabla\r\n\t\ttable.setCaptionKey(\"tbl.abo.caption\");\r\n\t\t\r\n\t\tRow row = table.getRow();\r\n\t\tColumn nombreColumna = row.getColumn(\"id.invPexProductosExistencia.invArtArticulo.artCodigo\");\r\n\t\tnombreColumna.setTitleKey(\"tbl.abo.id.invArtArticulo.artCodigo\");\r\n\r\n\t\tnombreColumna = row.getColumn(\"id.invPexProductosExistencia.invArtArticulo.artNombre\");\r\n\t\tnombreColumna.setTitleKey(\"tbl.abo.id.invArtArticulo.artNombre\");\r\n\t\t\r\n\t\tnombreColumna = row.getColumn(\"eboCantidadProducto\");\r\n\t\tnombreColumna.setTitleKey(\"tbl.abo.eboCantidadProducto\");\r\n\t\t\r\n\t\tnombreColumna = row.getColumn(\"eboSaldo\");\r\n\t\tnombreColumna.setTitleKey(\"tbl.abo.eboSaldo\");\r\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\r\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\r\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\r\n\t\t\t\t\t\trowcount);\r\n\t\t\t\tInvEboExistenciaBodega existenciaBodega = (InvEboExistenciaBodega) item;\r\n\t\t\t\t\r\n\t\t\t\tvalue = \"<div align=\\\"right\\\">\"+Format.formatDinero(existenciaBodega.getEboSaldo())+\"</div>\";\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tnombreColumna = row.getColumn(\"audFechaCreacion\");\r\n\t\tnombreColumna.setTitleKey(\"tbl.abo.acciones\");\r\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor(){\r\n\r\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\r\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property, rowcount);\r\n\t\t\t\tInvEboExistenciaBodega bodega = (InvEboExistenciaBodega)item;\r\n\t\t\t\t\r\n\t\t\t\tHtmlBuilder html = new HtmlBuilder();\r\n\t\t\t\tvalue = \"Movimientos\";\r\n\t\t\t\tString link = tableFacade.getWebContext().getContextPath();\r\n\t\t\t\tlink += \"/inventario/movimiento.do?accion=lista&bodega=\" + bodega.getId().getInvBodBodegas().getBodId() + \"&artCod=\" + bodega.getId().getInvPexProductosExistencia().getArtCodigo();\r\n\t\t\t\thtml.a().href().quote().append(link).quote().append(\"class=\\\"linkMovimientoBod\\\"\").title(value.toString()).close();\r\n\t\t\t\t//html.a().href(link).close();\r\n\t\t\t\t//html.append(value);\r\n\t\t\t\thtml.aEnd();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\treturn html.toString();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\treturn tableFacade.render();\r\n\t}", "public List<ViewEtudiantInscriptionEcheance> rechercheEtudiantInscripEcheanceParNomEtPrenom(){ \r\n try{ \r\n setListRechercheEtudiantInscripEcheance(viewEtudiantInscripEcheanceFacadeL.findEtudInscripByNonEtPrenomWithJocker(getViewEtudiantInscripEcheance().getNomEtPrenom())); \r\n }catch (Exception ex) {\r\n System.err.println(\"Erreur capturée : \"+ex);\r\n }\r\n return listRechercheEtudiantInscripEcheance;\r\n }", "public interface SGTView extends IView {\n\n void getSGTHomeData(ApiResponse<List<SGTHomeListEntity>> listApiResponse, String msg, Throwable mThrowable);//赛格通主页列表数据\n\n void getSGTSearchData(ApiResponse<List<FootSSEntity>> listApiResponse, String msg, Throwable mThrowable);//赛格通主页列表数据\n\n void getSearchFootInfoData(ApiResponse<SearchFootEntity> listApiResponse, String msg, Throwable mThrowable);//搜索足环号码\n\n// void getSGTSearchData(List<FootSSEntity> data, String msg);//赛格通足环搜索页\n\n void getFootImg(List<SGTImgEntity> imgDatas, String str);//获取足环照片\n\n void getFootInfo(SGTFootInfoEntity infoData, String str);//获取足环详情\n\n void getGZImgEntity(List<GZImgEntity> gzImgData, String str);//获取鸽主图片\n\n void uploadResults(ApiResponse<Object> dateApiResponse, String msg);//上传图片结果\n\n void getTagData(List<TagEntitiy> tagDatas);//获取标签数据\n\n void getGeZhuFootData(ApiResponse<GeZhuFootEntity> listApiResponse, String msg);//获取鸽主下的足环列表\n\n void getUserInfo_SGT(ApiResponse<SGTUserInfo> dataApiResponse, String msg);//获取赛鸽通用户信息\n\n void getSetRpTimeResults(ApiResponse<Object> dataApiResponse, String msg);//设置本届比赛入棚时间(修改足环号码)\n\n void getSetGPKrysResults(ApiResponse<Object> dataApiResponse, String msg);//设置公棚可容羽数\n}", "public String toString() {\r\n StringBuffer out = new StringBuffer(this.getDaogenVersion());\r\n out.append(\"\\nclass ViewDetallesPagos, mapping to table ViewDetallesPagos\\n\");\r\n out.append(\"Persistent attributes: \\n\"); \r\n out.append(\"IDCUENTACONTABLE = \" + this.IDCUENTACONTABLE + \"\\n\"); \r\n out.append(\"DECOMPARENDO = \" + this.DECOMPARENDO + \"\\n\"); \r\n out.append(\"CODIGOCUENTA = \" + this.CODIGOCUENTA + \"\\n\"); \r\n out.append(\"NOMBRECUENTA = \" + this.NOMBRECUENTA + \"\\n\"); \r\n out.append(\"VIGENCIAINICIAL = \" + this.VIGENCIAINICIAL + \"\\n\"); \r\n out.append(\"VIGENCIAFINAL = \" + this.VIGENCIAFINAL + \"\\n\"); \r\n out.append(\"FILTROPORFECHAS = \" + this.FILTROPORFECHAS + \"\\n\"); \r\n out.append(\"IDTARIFA = \" + this.IDTARIFA + \"\\n\"); \r\n out.append(\"IDCONCEPTO = \" + this.IDCONCEPTO + \"\\n\"); \r\n out.append(\"NOMBRECONCEPTO = \" + this.NOMBRECONCEPTO + \"\\n\"); \r\n out.append(\"IDITEM = \" + this.IDITEM + \"\\n\"); \r\n out.append(\"VALORPAGO = \" + this.VALORPAGO + \"\\n\"); \r\n out.append(\"FECHAPAGO = \" + this.FECHAPAGO + \"\\n\"); \r\n out.append(\"VIGENCIA = \" + this.VIGENCIA + \"\\n\"); \r\n return out.toString();\r\n }", "@RequestMapping(\"/showEdit\")\n\tpublic String viewEditPage(@RequestParam(\"locId\")int locId,ModelMap map){\n\t\tLocation loc=service.getLocationById(locId);\n\t\tmap.addAttribute(\"locObj\",loc);\n\t\treturn \"LocationDataEdit\";\n\t}", "public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}", "private String html(final TableFacade tableFacade,\n\t\t\tfinal HttpServletRequest request) {\n\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascId\",\n\t\t\t\t\"ascCodigoAsociado\", \"ascIngresoCoope\", \"ascRetiroCoope\",\n\t\t\t\t\"ascProfesion\", \"ascSalario\", \"ascAsociadoPadre\");\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo\");\n\n\t\tnombreColumna = row.getColumn(\"ascId\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.asociado\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString nombreAsociado = \"\";\n\t\t\t\tSecPerPersonaDAO personaDAO = new SecPerPersonaDAO(getSessionHibernate(request));\n\t\t\t\tSecPerPersona persona = personaDAO.findById(asociado\n\t\t\t\t\t\t.getSecPerPersona().getPerId());\n\t\t\t\tnombreAsociado = persona.getPerPrimerApellido() + \", \"\n\t\t\t\t\t\t+ persona.getPerPrimerNombre();\n\t\t\t\treturn nombreAsociado;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascCodigoAsociado\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.cuotaIngreso\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tCtaCasCuentaAsociadoDAO casDao = new CtaCasCuentaAsociadoDAO(getSessionHibernate(request));\n\t\t\t\treturn Format.formatDinero(casDao.getCuotaAfiliacion(asociado\n\t\t\t\t\t\t.getAscId()));\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascIngresoCoope\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.aportaciones\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\tdescAportaciones,request);\n\t\t\t\treturn Format.formatDinero(descAportaciones / DIVISOR);\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascRetiroCoope\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahorros\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\tdescAhorros,request);\n\t\t\t\treturn Format.formatDinero(descAhorros / DIVISOR);\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascProfesion\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.prestamos\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\tdescPrestamos,request);\n\t\t\t\treturn Format.formatDinero(descPrestamos / DIVISOR);\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascSalario\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.seguros\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\", descSeguros,request);\n\t\t\t\treturn Format.formatDinero(descSeguros / DIVISOR);\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascAsociadoPadre\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.total\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\n\t\t\t\tCtaCasCuentaAsociadoDAO casDao = new CtaCasCuentaAsociadoDAO(getSessionHibernate(request));\n\t\t\t\tdouble cuotaAfiliacion = casDao.getCuotaAfiliacion(asociado\n\t\t\t\t\t\t.getAscId());\n\n\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\", descSeguros,request);\n\n\t\t\t\treturn Format\n\t\t\t\t\t\t.formatDinero(cuotaAfiliacion\n\t\t\t\t\t\t\t\t+ (descAportaciones + descAhorros\n\t\t\t\t\t\t\t\t\t\t+ descPrestamos + descSeguros)\n\t\t\t\t\t\t\t\t/ DIVISOR);\n\t\t\t}\n\t\t});\n\t\treturn tableFacade.render();\n\t}", "@RequestMapping(method = RequestMethod.GET)\r\n\tpublic String logined(Model model) {\n\t\tList<ThongBao> tkbs = tbService.findAll();\r\n\t\tmodel.addAttribute(\"tblist\", tkbs);\r\n\t\treturn \"indexsv\";\r\n\t}", "public void GetVehiculos() {\n String A = \"&LOCATION=POR_ENTREGAR\";\n String Pahtxml = \"\";\n \n try {\n \n DefaultListModel L1 = new DefaultListModel();\n Pahtxml = Aso.SendGetPlacas(A);\n Lsvehiculo = Aso.Leerxmlpapa(Pahtxml);\n Lsvehiculo.forEach((veh) -> {\n System.out.println(\"Placa : \" + veh.Placa);\n L1.addElement(veh.Placa);\n });\n \n Lista.setModel(L1);\n \n } catch (Exception ex) {\n Logger.getLogger(Entrega.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "@GetMapping(\"/home/profili/{id}/articoli\")\n public ModelAndView profiloArticoli(HttpServletRequest request, HttpServletResponse response, @PathVariable(\"id\") int id) {\n\t ModelAndView mav = new ModelAndView(\"articoliProfilo\");\n\t mav.addObject(\"articoli\", this.utenteService.getOne(id).getArticoli());\n\t mav.addObject(\"utente\", UtenteController.getUtenteLoggato().getId_utente());\n\t return mav;\n\t}", "public void showNoteView(MyNoteDto noteDto);", "public String doDetail(){\n if(idsecteur==null){\n this.addActionError(getText(\"error.topo.missing.id.\"));\n }else secteur = managerFactory.getSecteurManager().getbynid(idsecteur);\n {\n // this.addActionError(\"il n'y a pas de projet pour ce numéro \"+idtopo );\n\n\n }\nreturn (this.hasErrors())? ActionSupport.ERROR : ActionSupport.SUCCESS;\n\n }", "public String bewerken() {\n FacesContext context = FacesContext.getCurrentInstance();\n Map<String, Object> sessionMap = context.getExternalContext().getSessionMap();\n sessionMap.put(\"exemplaar\", this.geselecteerdExemplaar);\n sessionMap.put(\"boek\", this.boek);\n sessionMap.put(\"vanwaar\", \"vanuitlenen\");\n return \"boekedit\";\n }", "@GetMapping(\"/{id}\")\n\tpublic String show(@PathVariable Long id,Model model) {\n\t\tif(diagramaService.exists(id)) {\n\t\t\t//Declaracion de la lista de elementos del diagrama bpmn\t\t\t \n\t\t\tDiagrama diagrama = diagramaService.find(id).get();\n\t\t\tArrayList<diagramaDao> elementosa=new ArrayList<>();\n\t\t\tif(diagrama.getConfirmado()==null || diagrama.getConfirmado()==false) {\t\t\t\t\n\t\t\t\t//Declaración de string para nombres de lineas;\n\t\t\t\tString carrilPadrE=\"\";\n\t\t\t\t//Leer informacion del archivo xml y traerla (pool y tasks)\n\t\t\t\tDocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();\n\t\t\t\ttry {\n\t\t\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\t\t\t\t\n\t\t\t\t\tDocument doc= builder.parse(diagrama.getPathArchivo());\n\t\t\t\t\tNodeList elementos = doc.getElementsByTagName(\"elements\");\n\t\t\t\t\tfor (int i = 0; i < elementos.getLength(); i++) {\n\t\t\t\t\t\tNode nodo = elementos.item(i);\n\t\t\t\t\t\tif(nodo.getNodeType()==Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\tElement element= (Element) nodo;\n\t\t\t\t\t\t\tString type =element.getAttribute(\"xmi:type\");\n\t\t\t\t\t\t\tif(type.endsWith(\"Lane\") || type.endsWith(\"Task\")) {\n\t\t\t\t\t\t\t\tdiagramaDao elementoDia= new diagramaDao();\n\t\t\t\t\t\t\t\telementoDia.setNombre(element.getAttribute(\"name\"));\n\t\t\t\t\t\t\t\tif(type.endsWith(\"Task\")) {\n\t\t\t\t\t\t\t\t\telementoDia.setLineaPadre(carrilPadrE);\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\tcarrilPadrE= elementoDia.getNombre();\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\telementosa.add(elementoDia);\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (ParserConfigurationException 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 (SAXException 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 (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}\t\n\t\t\t}else {\n\t\t\t\tSet<Pool> carriles = diagrama.getPools();\t\t\t\t\n\t\t\t\tfor (Pool pool : carriles) {\n\t\t\t\t\tdiagramaDao elementoDia= new diagramaDao();\n\t\t\t\t\telementoDia.setNombre(pool.getNombre());\n\t\t\t\t\telementosa.add(elementoDia);\n\t\t\t\t\tSet<Tarea> tareas= pool.getTareas();\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Carril: \"+ pool.getId()+ \" \" + pool.getNombre());\n\t\t\t\t\tfor (Tarea tarea : tareas) {\n\t\t\t\t\t\t//System.out.println(\"tarea: \"+tarea.getId()+ \" \" +tarea.getNombre());\n\t\t\t\t\t\tdiagramaDao elementoDia2= new diagramaDao();\n\t\t\t\t\t\telementoDia2.setLineaPadre(elementoDia.getNombre());\n\t\t\t\t\t\telementoDia2.setNombre(tarea.getNombre());\n\t\t\t\t\t\telementoDia2.setId(tarea.getId());\n\t\t\t\t\t\telementoDia2.setDescripcion(tarea.getDescripcion());\t\t\t\t\t\t\n\t\t\t\t\t\telementosa.add(elementoDia2);\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t/*\n\t\t\tfor (diagramaDao diagramaDao : elementosa) {\n\t\t\t\tSystem.out.println(diagramaDao.getNombre());\n\t\t\t\tSystem.out.println(diagramaDao.getLineaPadre());\n\t\t\t}*/\t\t\n\t\t\tmodel.addAttribute(\"elementos\",elementosa);\n\t\t\tmodel.addAttribute(\"diagrama\", diagrama);\n\t\t\t\n\t\t\treturn \"/diagrama/show\";\n\t\t}else {\n\t\t\treturn \"redirect:/diagramas\";\n\t\t}\t\t\n\t}", "public String navigatePartidoCollection() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Partido_items\", this.getSelected().getPartidoCollection());\n }\n return \"/partido/index\";\n }", "@RequestMapping(value=\"/listar\", method=RequestMethod.GET)\r\n\tpublic String listar(Model model) {\t\t\r\n\t\tmodel.addAttribute(\"titulo\", \"Listado de Pacientes\");\r\n\t\tmodel.addAttribute(\"pacientes\", pacienteService.findAll());\r\n\t\treturn \"listar\";\r\n\t}", "@GetMapping(value = \"/agendarCita\")\r\n public String agendarCita (Model model){\n popularDoctores();\r\n\r\n //Añado los doctores al model\r\n model.addAttribute(\"doctores\", doctores);\r\n return \"agendarCita\";\r\n }", "@Override\r\n\tprotected void initVentajas() {\n\r\n\t}", "public List<Listas_de_las_Solicitudes> Mostrar_las_peticiones_que_han_llegado_al_Usuario_Administrador(int cedula) {\n\t\t//paso3: Obtener el listado de peticiones realizadas por el usuario\n\t\tEntityManagerFactory entitymanagerfactory = Persistence.createEntityManagerFactory(\"LeyTransparencia\");\n\t\tEntityManager entitymanager = entitymanagerfactory.createEntityManager();\n\t\tentitymanager.getEntityManagerFactory().getCache().evictAll();\n\t\tQuery consulta4=entitymanager.createQuery(\"SELECT g FROM Gestionador g WHERE g.cedulaGestionador =\"+cedula);\n\t\tGestionador Gestionador=(Gestionador) consulta4.getSingleResult();\n\t\t//paso4: Obtener por peticion la id, fecha y el estado\n\t\tList<Peticion> peticion=Gestionador.getEmpresa().getPeticions();\n\t\tList<Listas_de_las_Solicitudes> peticion2 = new ArrayList();\n\t\t//paso5: buscar el area de cada peticion\n\t\tfor(int i=0;i<peticion.size();i++){\n\t\t\tString almcena=\"\";\n\t\t\tString sarea=\"no posee\";\n\t\t\tBufferedReader in;\n\t\t\ttry{\n\t\t\t\tin = new BufferedReader(new InputStreamReader(new FileInputStream(\"C:/area/area\"+String.valueOf(peticion.get(i).getIdPeticion())+\".txt\"), \"utf-8\"));\n\t\t\t\ttry {\n\t\t\t\t\twhile((sarea=in.readLine())!=null){\n\t\t\t\t\t\tint s=0;\n\t\t\t\t\t\talmcena=sarea;\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\t\t\t\t\tSystem.out.println(almcena);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t//paso6: Mostrar un listado de peticiones observando el id, la fecha de realizacion de la peticion, hora de realizacion de la peticion, y el estado actual de la peticion\n\t\t\tListas_de_las_Solicitudes agregar=new Listas_de_las_Solicitudes();\n\t\t\tagregar.setId(String.valueOf(peticion.get(i).getIdPeticion()));\n\t\t\tagregar.setFechaPeticion(peticion.get(i).getFechaPeticion());\n\t\t\tagregar.setNombreestado(peticion.get(i).getEstado().getTipoEstado());\n\t\t\tagregar.setArea(almcena);\n\t\t\tpeticion2.add(agregar);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"el usuario existe\");\n\t\treturn peticion2;\n\t\t//aun no se\n\t}", "@GetMapping(\"/detailGaji\")\n private String detailGaji(\n @RequestParam(value=\"idGaji\") Long idGaji,\n Model model){\n GajiModel gaji = gajiDb.findById(idGaji).get();\n KaryawanModel karyawanParam = gaji.getId_karyawan();\n KaryawanModel karyawanUser = payrollService.findUser().getKaryawanModel();\n String date = payrollService.displayYearMonth(gaji.getDokumen().getTanggalIsu());\n String status = payrollService.displayStatus(karyawanParam.getStatusKaryawan());\n String role = payrollService.findUser().getId_role().getRole();\n String statusDokumen = gaji.getDokumen().getId_status().getStatus();\n if((role.equals(\"Karyawan\")) && (!statusDokumen.equals(\"Disetujui\"))){\n String message=\"Mohon maaf, slip gaji untuk \" + date + \" belum dapat diakses. Silahkan hubungi Manajer SDI\" +\n \" untuk keterangan lebih lanjut.\";\n model.addAttribute(\"message\", message);\n return \"payroll-access\";\n }else if(role.equals(\"Karyawan\")){\n if(!karyawanParam.getKaryawan().equals(karyawanUser.getKaryawan())){\n String message=\"Mohon maaf, Anda tidak memiliki akses ke halaman ini\";\n model.addAttribute(\"message\", message);\n return \"payroll-access\";\n }\n } else{\n }\n model.addAttribute(\"statusDokumen\", statusDokumen);\n model.addAttribute(\"tahunAngkat\", payrollService.displayYearMonth(karyawanParam.getTanggalMasuk()));\n model.addAttribute(\"role\", role);\n model.addAttribute(\"date\", date);\n model.addAttribute(\"status\", status);\n model.addAttribute(\"karyawan\", karyawanParam);\n model.addAttribute(\"gaji\", gaji);\n return \"detail-gaji\";\n }", "@RequestMapping(\"/displayEducation\")\r\n\t\tpublic String displayEducation(ModelMap modelMap) {\r\n\t\t\tList<EducationQualification> education = educationRepo.findAll();\r\n\t\t\tmodelMap.addAttribute(\"education\", education);\r\n\t\t\treturn \"displayAllEducation\";\r\n\t}", "@RequestMapping(value = \"/kqdanhgia/{id}\",method = RequestMethod.GET)\r\n\tpublic String showkqdanhgia(@PathVariable(\"id\") String userb, Model model , HttpServletRequest request) {\n\t\tBangDanhGia bdg = choose.getBgd();\r\n\r\n\t\tif (bdg == null) {\r\n\t\t\tmodel.addAttribute(\"message\", \"Chưa ch�?n bảng đánh giá\");\r\n\t\t\treturn \"showkqdanhgia\";\r\n\t\t}\r\n\t\tmodel.addAttribute(\"bangdanhgia\", bdg);\r\n\t\tList<LoaiCauHoi> lchs = new ArrayList<LoaiCauHoi>(bdg.getLchs());\r\n\t\tCollections.sort(lchs);\r\n\t\tmodel.addAttribute(\"lchs\", lchs);\r\n\t\tmodel.addAttribute(\"nguoidang\", userb);\r\n\t\tList<BangDanhGiaKq> dgkqs = bdgkqService.findByUserb(userb);\r\n\t\tList<DisplayResult> kqs = new ArrayList<DisplayResult>();\r\n\t\tfor (CauHoi cauHoi : bdg.getCauhois()) {\r\n\t\t\tDisplayResult kq = new DisplayResult();\r\n\t\t\tkq.setCh(cauHoi);\r\n\t\t\tkq.setMch(cauHoi.getId());\r\n\t\t\tint a = 0, b = 0, c = 0, d = 0;\r\n\t\t\tfor (BangDanhGiaKq bangDanhGiaKq : dgkqs) {\r\n\t\t\t\tif (bangDanhGiaKq.getLoaiBang().getId() == bdg.getId()) {\r\n\t\t\t\t\tfor (CauHoiKq chkq : bangDanhGiaKq.getCauhoikqs()) {\r\n\t\t\t\t\t\tif (chkq.getCauhoi().getId().equals(cauHoi.getId())) {\r\n\t\t\t\t\t\t\tswitch (chkq.getKetqua()) {\r\n\t\t\t\t\t\t\tcase 'A':\r\n\t\t\t\t\t\t\t\ta++;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'B':\r\n\t\t\t\t\t\t\t\tb++;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'C':\r\n\t\t\t\t\t\t\t\tc++;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'D':\r\n\t\t\t\t\t\t\t\td++;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tkq.setNumA(((double) a / dgkqs.size()) * 100);\r\n\t\t\tkq.setNoidungA(\"Rất Tốt : \" + kq.getNumA() + \"%\");\r\n\t\t\tkq.setNumB(((double) b / dgkqs.size()) * 100);\r\n\t\t\tkq.setNoidungB(\"Tốt : \" + kq.getNumB() + \"%\");\r\n\t\t\tkq.setNumC(((double) c / dgkqs.size()) * 100);\r\n\t\t\tkq.setNoidungC(\"Bình Thường : \" + kq.getNumC() + \"%\");\r\n\t\t\tkq.setNumD(((double) d / dgkqs.size()) * 100);\r\n\t\t\tkq.setNoidungD(\"Chưa Tốt : \" + kq.getNumD() + \"%\");\r\n\t\t\tkqs.add(kq);\r\n\t\t}\r\n\t\tlog.error(\"BangDanhGiakq : \" + dgkqs.toString());\r\n\t\tlog.info(\"bang ket qua : \" + kqs.toString());\r\n\t\tmodel.addAttribute(\"kqs\", kqs);\r\n\t\treturn \"showkqdanhgia\";\r\n\t}", "private void ucitajPodatke() {\n \n DefaultListModel<Voznja> m = new DefaultListModel<>();\n obrada.getPodaci().forEach(s->m.addElement(s));\n lstPodaci.setModel(m);\n\n }", "@RenderMapping\r\n\tpublic String handleRenderRequest(RenderRequest request,RenderResponse response,Model model){\r\n\t\t\r\n\t\tfinal ThemeDisplay themeDisplay = GestionFavoritosUtil.getThemeDisplay(request); \r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tfinal String structure = request.getPreferences().getValue(\r\n\t\t\t\t\tGestionFavoritosKeys.STRUCTURE_ID, StringUtils.EMPTY);\r\n\t\t\t\r\n\t\t\tfinal List<JournalStructure> listStructures = JournalStructureLocalServiceUtil\r\n\t\t\t\t\t.getStructures(themeDisplay.getScopeGroupId());\r\n\t\t\t\r\n\t\t\tfinal List<JournalTemplate> listTemplates = GestionFavoritosUtil\r\n\t\t\t\t\t.getTemplatesByGroupId(themeDisplay.getScopeGroupId(),\r\n\t\t\t\t\t\t\tstructure);\r\n\t\t\t\r\n\t\t\t// Si hay preferencias\r\n\t\t\tif (request.getPreferences() != null) {\r\n\t\t\t\t\r\n\t\t\t\tPortletPreferences preferences = request.getPreferences();\r\n\t\t\t\t\r\n\t\t\t\trequest.setAttribute(GestionFavoritosKeys.STRUCTURE_ID, structure);\r\n\t\t\t\t\r\n\t\t\t\tfinal String template = preferences.getValue(\r\n\t\t\t\t\t\tGestionFavoritosKeys.TEMPLATE_ID, StringUtils.EMPTY);\r\n\t\t\t\trequest.setAttribute(GestionFavoritosKeys.TEMPLATE_ID, template);\r\n\t\t\t\t\r\n\t\t\t\tfinal String categories = preferences.getValue(\r\n\t\t\t\t\t\tGestionFavoritosKeys.CATEGORIES, StringUtils.EMPTY);\r\n\t\t\t\trequest.setAttribute(GestionFavoritosKeys.CATEGORIES, categories);\r\n\t\t\t\t\r\n\t\t\t\tfinal String view = preferences.getValue(\r\n\t\t\t\t\t\tGestionFavoritosKeys.SELECTED_VIEW, StringUtils.EMPTY);\r\n\t\t\t\trequest.setAttribute(GestionFavoritosKeys.SELECTED_VIEW, view);\r\n\t\t\t}\t\r\n\r\n\t\t\trequest.setAttribute(GestionFavoritosKeys.LIST_STRUCTURES,\r\n\t\t\t\t\tlistStructures);\r\n\t\t\t\r\n\t\t\trequest.setAttribute(GestionFavoritosKeys.LIST_TEMPLATES,\r\n\t\t\t\t\tlistTemplates);\r\n\r\n\t\t\t\r\n\t\t} catch (SystemException e) {\r\n\t\t\tlog.error(e);\r\n\t\t\tSessionErrors.add(request, GestionFavoritosErrorKeys.VIEW_DATA);\r\n\t\t\tSessionMessages.clear(request);\r\n\t\t} \r\n\t\t\r\n\t\t\r\n\t\treturn \"edit\";\r\n\t}", "@Override\n\tpublic void view() {\n\t\t\n\t}", "public String navigatePartidoCollection3() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Partido_items\", this.getSelected().getPartidoCollection3());\n }\n return \"/partido/index\";\n }", "public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != null) {\n Element sled = tek.veza;\n \n tek.veza = preth;\n preth = tek;\n tek = sled;\n }\n prvi = preth;\n }\n }", "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 String navigatePartidoCollection1() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Partido_items\", this.getSelected().getPartidoCollection1());\n }\n return \"/partido/index\";\n }", "public String modificar() {\n\n\t\tLOG.info(\"accion crear alumno\");\n\t\tString view = VIEW_LISTADO;\n\t\tview = VIEW_FORM_ALTA;\n\t\tthis.alumnos.add(this.alumno);\n\t\treturn view;\n\t}", "@RequestMapping(\"/reply_view\")\n\tpublic String reply_view(HttpServletRequest request, Model model) {\n\t\tBDto dto = dao.reply_view(request.getParameter(\"bId\"));\n\t\tmodel.addAttribute(\"reply_view\", dto);\n\t\treturn \"reply_view\";\n\t}", "@RequestMapping(value=\"/tagissuelist.htm\",method=RequestMethod.GET)\r\n\tpublic ModelAndView listtagissue(){\r\n\t\tMap<String,Object> model=new HashMap<String,Object>();\r\n\t\tmodel.put(\"transferList\", transferDao.listTransfer());\r\n\t\treturn new ModelAndView(\"tagissue\",model);\r\n\t}", "@Override\n public JSONObject viewOrderByDirector() {\n return in_orderformdao.viewOrderFormByDirector();\n }", "@Test\n public void testEntregarPrestamo() {\n System.out.println(\"entregarPrestamo\");\n Usuario usuario = new UsuariosList().getUsuarios().get(0);\n Ejemplar ejemplar = new EjemplaresList().getEjemplares().get(0);\n BibliotecarioController instance = new BibliotecarioController();\n Map<Usuario, Ejemplar> expResult = new HashMap<>();\n expResult.put(usuario, ejemplar);\n Map<Usuario, Ejemplar> result = instance.entregarPrestamo(usuario, ejemplar);\n assertEquals(expResult, result);\n }", "public interface ListFrgView extends BaseView {\n void getDpSuccess(List<Map<String, Object>> testModel);\n}", "@RequestMapping(value=\"/module/diagnosiscapturerwanda/vitals\", method=RequestMethod.GET)\n public void processVitalsPageGet(ModelMap map) {\n map.addAttribute(\"questions\", getQuestions());\n }", "public void viewHandler(View v) {\n LinearLayout vwParentRow = (LinearLayout)v.getParent();\n TextView id =(TextView) vwParentRow.findViewById(R.id._id);\n Intent intent = new Intent(Hates.this, Formulario.class);\n\n intent.putExtra(C_MODO, C_VISUALIZAR);\n intent.putExtra(mDbHelper.ID, Long.valueOf((String)id.getText()));\n\n\n this.startActivityForResult(intent, C_VISUALIZAR);\n }", "public String navigateFichaGeneralEmpleadoList() {\r\n if (this.getSelected() != null) {\r\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"FichaGeneralEmpleado_items\", this.getSelected().getFichaGeneralEmpleadoList());\r\n }\r\n return \"/fichaGeneralEmpleado/index\";\r\n }", "public ActionForward A_GenerarPlanillaProrroga(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n\n //Salidas\n final String[] SALIDAS = {\"V_GestionarProrroga\", \"A_Pre_GestionarProrroga\", };\n final int SALIDA_0 = 0;\n final int SALIDA_1 = 1;\n\n int salida = SALIDA_0;\n Session s = HibernateUtil.getCurrentSession();\n Transaction tr = s.beginTransaction();\n try {\n /*aqui empieza*/\n EstRealizaProy student = (EstRealizaProy)s.createQuery(\"from EstRealizaProy where tipoproy='1' and carnetestudiante= :login\").setString(\"login\", (String)request.getSession().getAttribute(\"login\")).uniqueResult();\n Estudiante estudiante =(Estudiante)s.createQuery(\"from Estudiante where carnete = :login\").setString(\"login\", (String)request.getSession().getAttribute(\"login\")).uniqueResult();\n PreInsPasantias consulta = (PreInsPasantias)s.createQuery(\"from PreInsPasantias where estudiante = :login\").setString(\"login\", (String)request.getSession().getAttribute(\"login\")).uniqueResult();\n\n if (estudiante != null) {\n\n String carnet = (String)request.getSession().getAttribute(\"login\");\n Prorroga fF_Prorroga = (Prorroga) s.createQuery(\"from Prorroga where idc= :carnet\").setString(\"carnet\", carnet).uniqueResult();;\n String coordinacion = fF_Prorroga.getCoordinacion();\n String nombre = fF_Prorroga.getNombre();\n String codigoTutorAcademico = fF_Prorroga.getCodigoTutorAcademico();\n String tituloPasantia = fF_Prorroga.getTituloPasantia();\n String areaProyecto = fF_Prorroga.getAreaProyecto();\n String fecha = fF_Prorroga.getFecha();\n String justificacion = fF_Prorroga.getJustificacion();\n \n String path = getServlet().getServletContext().getRealPath(\"/\")+ \"../../img/\";\n\n /**************************************/\n /* PDF */\n /**************************************/\n try {\n Document pdf = new Document(PageSize.LETTER);\n\n response.setContentType(\"application/pdf4\");\n response.setHeader(\"Content-Disposition\", \" inline; filename=PlanillaProrroga.pdf\");\n\n PdfWriter.getInstance(pdf, response.getOutputStream());\n\n pdf.open();\n\n // Logo\n Image logo = Image.getInstance(path +\"logo.png\");\n logo.scaleToFit(197, 81);\n logo.setAlignment(Image.ALIGN_LEFT);\n pdf.add(logo);\n\n // Pie\n Image pie = Image.getInstance(path +\"pie.png\");\n pie.scaleToFit(500, 216);\n pie.setAbsolutePosition(40, 20);\n pdf.add(pie);\n\n Font font = FontFactory.getFont(\"Arial\", BaseFont.IDENTITY_H, 12);\n font.setStyle(Font.BOLD);\n\n Font font2 = FontFactory.getFont(\"Arial\", BaseFont.IDENTITY_H, 13);\n font2.setStyle(Font.UNDERLINE);\n font2.setStyle(Font.BOLD);\n\n Paragraph titulo = new Paragraph(\"PERMISO PARA PASANTIA (Prorroga)\", font2);\n titulo.setAlignment(Paragraph.ALIGN_CENTER);\n pdf.add(titulo);\n\n Paragraph blank = new Paragraph(\"\\n\");\n\n pdf.add(blank);\n pdf.add(blank);\n\n Phrase est = new Phrase(\"Coordinación de: \"+ coordinacion , font);\n pdf.add(est);\n pdf.add(blank);\n\n est = new Phrase(\"Nombre: \" + nombre +\" Carnet: \"+ carnet, font);\n pdf.add(est);\n pdf.add(blank);\n\n Paragraph pfecha= new Paragraph(\"*Fecha Propuesta: \"+fecha);\n pfecha.setAlignment(Paragraph.ALIGN_CENTER);\n pdf.add(pfecha);\n\n pfecha= new Paragraph(\"_______________________________________________________________________\", font);\n pfecha.setAlignment(Paragraph.ALIGN_CENTER);\n pdf.add(pfecha);\n pdf.add(blank);\n\n pfecha= new Paragraph(\"Pasantía\", font2);\n pfecha.setAlignment(Paragraph.ALIGN_CENTER);\n pdf.add(pfecha);\n pdf.add(blank);\n\n if (tituloPasantia.equals(\"3420\")){\n pfecha= new Paragraph(\"Pasantía Larga (3420) \"+ \"Periodo: \" + areaProyecto, font);\n }\n if (tituloPasantia.equals(\"2420\")){\n pfecha= new Paragraph(\"Pasantía Media (2420) \"+ \"Periodo: \" + areaProyecto, font);\n }\n if (tituloPasantia.equals(\"1420\")){\n pfecha= new Paragraph(\"Pasantía Corta (1420) \"+ \"Periodo: \" + areaProyecto, font);\n }\n\n pfecha.setAlignment(Paragraph.ALIGN_CENTER);\n pdf.add(pfecha);\n pdf.add(blank);\n\n pdf.add(blank);\n\n est = new Phrase(\"*Tutor Academico: \"+codigoTutorAcademico , font);\n pdf.add(est);\n\n est = new Phrase(\" Firma:_____________________\" , font);\n pdf.add(est);\n pdf.add(blank);\n\n pfecha= new Paragraph(\"Justificacion: \",font);\n pdf.add(pfecha);\n pdf.add(blank);\n pfecha= new Paragraph( justificacion);\n pdf.add(pfecha);\n pdf.add(blank);\n pdf.add(blank);\n\n est = new Phrase(\"Observaciones:______________________________________________________\");\n pdf.add(est);\n pdf.add(blank);\n\n est = new Phrase(\"Firma y Sello Coordinación:______________________________\" , font);\n pdf.add(est);\n pdf.add(blank);\n\n est = new Phrase(\"Firma CCTDS:_____________________________________________\" , font);\n pdf.add(est);\n pdf.add(blank);\n\n pdf.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n /**************************************/\n /* PDF */\n /**************************************/\n\n }else{\n salida = SALIDA_1;\n }\n\n /*aqui termina*/\n tr.commit();\n\n } catch (Exception ex) {\n tr.rollback();\n throw ex;\n } finally {\n try { s.close(); } catch (Exception ex2) {}\n }\n if (salida==0) {\n request.setAttribute(\"msg\",\n getResources(request).getMessage(\"A_Pre_ConsultarPlanillaProrroga.msg0\"));\n }\n if (salida==1) {\n request.setAttribute(\"msg\",\n getResources(request).getMessage(\"A_Pre_ConsultarPlanillaProrroga.msg1\"));\n }\n\n return mapping.findForward(SALIDAS[salida]);\n }", "@RequestMapping(value=\"/spittles\",method=RequestMethod.GET) \r\n\tpublic String spittles(Model model) {\r\n\t// pierwszy parameter - spittleList to nazwa zmiennej wykorzystywanej w wywolywanym pliku jsp\r\n model.addAttribute(\"spittleList\",spittleRepository.findSpittles(Long.MAX_VALUE, 20));\r\n return \"spittles\";\r\n }", "@Override\r\n\tpublic String update() {\n\t\tSystem.out.println(\"updateView.\");\r\n\t\t\r\n\t\t//javax.servlet.http.HttpSession session=request.getSession();\r\n\t\t//javax.servlet.ServletContext application=request.getServletContext();\r\n\t\t\r\n\t\t//String vId=request.getParameter(\"id\");\r\n\t\tif(!SysFun.isNullOrEmpty(id)) {\r\n\t\t\tLong iId=SysFun.parseLong(id);\r\n\t\t\tHeadLine bean=headLineService.load(iId);\r\n\t\t\t\r\n\t\t\tif(bean!=null) {\r\n\t\t\t\t\r\n\t\t\t\trequest.put(\"Id\", bean.getId());\r\n\t\t\t\trequest.put(\"lineName\", bean.getLineName());\r\n\t\t\t\trequest.put(\"lineLink\", bean.getLineLink());\r\n\t\t\t\t//request.put(\"lineImg\", bean.getLineImg());\r\n\t\t\t\treturn \"update\";\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn \"go_preload\";\r\n\t}", "@RequestMapping(value = \"index\")\n public String index(ModelMap map){\n map.addAttribute(\"resource\",freemarkerResource);\n return \"freemarker/index\";\n }", "protected RespostaFormularioPreenchido() {\n // for ORM\n }", "@Override\n public ModeloCuestionario visualizarModelo(Integer id) {\n ModeloCuestionario visualiza = modeloCuestionarioRepository.findOne(id);\n List<AreasCuestionario> listaAreas = areaCuestionarioService\n .findDistinctByIdCuestionarioAndFechaBajaIsNullOrderByOrdenAsc(id);\n for (AreasCuestionario area : listaAreas) {\n List<PreguntasCuestionario> listaPreguntas = preguntasRepository\n .findByAreaAndFechaBajaIsNullOrderByOrdenAsc(area);\n area.setPreguntas(listaPreguntas);\n }\n visualiza.setAreas(listaAreas);\n return visualiza;\n }", "@RequestMapping(value=\"/indexManager.go\", method={RequestMethod.GET})\r\n public String indexShow(HttpServletRequest req) {\r\n \r\n int n = service.guestcount();\r\n req.setAttribute(\"n\", n);\r\n \r\n int t = service.hostcount();\r\n req.setAttribute(\"t\", t);\r\n \r\n RowBounds rowBounds = new RowBounds(0, 3); \r\n \r\n List<HashMap<String, Object>> indexguestqnaList = service.Showindexguestqna(rowBounds); \r\n List<HashMap<String, Object>> indexhostqnaList = service.Showindexhostqna(rowBounds);\r\n List<HashMap<String, Object>> indexnoticeList = service.Showindexnotice(rowBounds);\r\n \r\n // 인덱스 페이지에 나타내기 위해서 년도를 받아오자\r\n GregorianCalendar today = new GregorianCalendar(); \r\n int year = today.get(today.YEAR);\r\n \r\n // 인덱스 페이지에 그래프 뽑아오기\r\n String Graphyear = req.getParameter(\"year\");\r\n // System.out.println(\"year : \" + Graphyear);\r\n \r\n // 인덱스 해당 년의 총 수입 뽑아오기\r\n HashMap<String, String> map = new HashMap<String, String>();\r\n map.put(\"Graphyear\", Graphyear);\r\n \r\n int totalincome = service.totalincome(map);\r\n \r\n // 오늘 접속자 수 구하기\r\n int jintianCount = service.jintianCount();\r\n \r\n // 지구본에 들어갈 Q&A 가져오기\r\n List<HashMap<String, Object>> LingqnaList = service.ShowqnaList(); \r\n \r\n // 알람 누르지 않은 갯수 구하기\r\n int LingCount = service.LingCount();\r\n \r\n req.setAttribute(\"indexguestqnaList\", indexguestqnaList); \r\n req.setAttribute(\"indexhostqnaList\", indexhostqnaList);\r\n req.setAttribute(\"indexnoticeList\", indexnoticeList);\r\n req.setAttribute(\"year\", year);\r\n req.setAttribute(\"Graphyear\", Graphyear);\r\n req.setAttribute(\"totalincome\", totalincome);\r\n req.setAttribute(\"jintianCount\", jintianCount);\r\n req.setAttribute(\"LingqnaList\", LingqnaList);\r\n req.setAttribute(\"LingCount\", LingCount);\r\n \r\n return \"Manager/index.tilesM\";\r\n }" ]
[ "0.59496665", "0.5791344", "0.5766767", "0.56925464", "0.56383693", "0.56289166", "0.55963516", "0.5571929", "0.5555738", "0.55506074", "0.5527314", "0.55229133", "0.55195177", "0.5507901", "0.55025333", "0.54973006", "0.549321", "0.548768", "0.5482835", "0.5482538", "0.54753226", "0.54505736", "0.54501146", "0.5448774", "0.54478383", "0.54407567", "0.5436754", "0.5434422", "0.5430286", "0.5425968", "0.54243314", "0.5423504", "0.54173493", "0.5412097", "0.54082656", "0.53990746", "0.5389082", "0.53873175", "0.53863966", "0.5384825", "0.5384548", "0.5367575", "0.5364085", "0.536061", "0.53521115", "0.5345782", "0.5338448", "0.53369176", "0.5336719", "0.53294945", "0.5327038", "0.53223264", "0.5319703", "0.53182805", "0.53171694", "0.531188", "0.53115165", "0.53013", "0.5301105", "0.5299201", "0.529424", "0.52899724", "0.52889496", "0.52883273", "0.52859265", "0.52841085", "0.5278126", "0.527686", "0.52732265", "0.52723473", "0.5271093", "0.5264961", "0.5264957", "0.525644", "0.5253966", "0.5246198", "0.5240665", "0.52394354", "0.5238529", "0.5237669", "0.5237139", "0.52357405", "0.52338934", "0.5222294", "0.5221527", "0.52187", "0.52171713", "0.52122307", "0.52076435", "0.52061135", "0.5205944", "0.52055615", "0.5201469", "0.5197709", "0.51971835", "0.5196197", "0.5194111", "0.51938164", "0.51921177", "0.51905596", "0.5189539" ]
0.0
-1
Static function creating actor
public static Props createActor(ActorRef b, ActorRef actorRef) { return Props.create(FirstActor.class, () -> { return new FirstActor(b, actorRef); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Actor createActor();", "ActorType createActorType();", "public interface ActorFactory {\n\n public static final String REF_SUFFIX = \"Ref\";\n\n /**\n * Creates an ActorRef bean from {@link ImportActor} and sets {@link Service} as the business logic class.\n * ActorRef bean name is created by appending actor name wit REF_SUFFIX\n * This will create an Actor with {@link akka.routing.SmallestMailboxPool} and default dispatcher and mailbox\n * For this no router configuration is required in application.conf, if you want to override this then use {@link #create(String, Service, String)}\n *\n * @param actorName\n * @param service\n * @param processingStep\n * @param noOfInstances\n * @return bean name of the actor\n */\n ActorRef create(String actorName, Service service, String processingStep, int noOfInstances);\n\n /**\n * Creates an ActorRef bean from {@link ImportActor} and sets {@link Service} as the business logic class.\n * ActorRef bean name is created by appending actor name wit REF_SUFFIX\n * This will create an Actor with {@link akka.routing.SmallestMailboxPool}\n * For this no router configuration is required in application.conf, if you want to override this then use {@link #create(String, Service, String, String, String)}\n * If dispatcher is null, default dispatcher is used. Otherwise, the provided dispatcher name should be configured in application.conf\n * If mailbox is null, the associated dispatcher's default mailbox will be used. Otherwise, the provided mailbox name should be configured in application.conf\n *\n *\n * @param actorName\n * @param service\n * @param processingStep\n * @param noOfInstances\n * @param mailbox\n * @param dispatcher\n * @return bean name of the actor\n */\n ActorRef create(String actorName, Service service, String processingStep, int noOfInstances, String mailbox,\n String dispatcher);\n\n /**-\n * Creates an ActorRef bean from {@link ImportActor} and sets {@link Service} as the business logic class.\n * ActorRef bean name is created by appending actor name wit REF_SUFFIX\n * You can configure the actor's router configurations in application.conf\n * While configuring use ActorRef name, for example if you named your actor \"firstActor\", then the configuration in application.conf should look like\n * /firstActorRef {\n * router = smallest-mailbox-pool\n * nr-of-instances = 2\n * }\n * Default dispatcher and mailbox will be used\n *\n * @param actorName\n * @param service\n * @param processingStep\n * @return bean name of the actor\n */\n ActorRef create(String actorName, Service service, String processingStep);\n\n /**-\n * Creates an ActorRef bean from {@link ImportActor} and sets {@link Service} as the business logic class.\n * ActorRef bean name is created by appending actor name wit REF_SUFFIX\n * You can configure the actor's router configurations in application.conf\n * While configuring use ActorRef name, for example if you named your actor \"firstActor\", then the configuration in application.conf should look like\n * /firstActorRef {\n * router = smallest-mailbox-pool\n * nr-of-instances = 2\n * }\n * If dispatcher is null, default dispatcher is used. Otherwise, the provided dispatcher name should be configured in application.conf\n * If mailbox is null, the associated dispatcher's default mailbox will be used. Otherwise, the provided mailbox name should be configured in application.conf\n *\n * @param actorName\n * @param service\n * @param processingStep\n * @param mailbox\n * @param dispatcher\n * @return bean name of the actor\n */\n ActorRef create(String actorName, Service service, String processingStep, String mailbox, String dispatcher);\n}", "public static Props createActor() {\n\t\treturn Props.create(Merger.class, () -> {\n\t\t\treturn new Merger();\n\t\t});\n\t}", "protected abstract RemoteFactory.Agent<Msg, Ref> make_Agent();", "public ActorNPC() {\r\n }", "public Actor(String actorDescription) {\n actorParams = actorDescription.split(\":\");\n id = actorParams[0];\n x = Double.parseDouble(actorParams[1]);\n y = Double.parseDouble(actorParams[2]);\n SimStatus.registerNewActor(id, x, y, label);\n randomGenerator = new Random();\n /** sets the actor lifetime to 10 minutes */\n lifetime_min = 10; \n lifetime = (long) TimeUnit.MINUTES.toMillis(lifetime_min); // converter minutos em milisegundos\n \n /** Initializes the Communication Stack */\n csParams = new String[]{actorParams[3], actorParams[4],actorParams[5], \n actorParams[6], actorParams[7], actorParams[8],actorParams[9],actorParams[10]};\n \n \n }", "ActorsType createActorsType();", "ActorRef self() {\n return getTestActor();\n }", "public static vtkActor createDummyActor()\n\t{\n\t\t// create sphere geometry\n\t\tvtkConeSource cone = new vtkConeSource();\n\t\tcone.SetHeight(3.0);\n\t\tcone.SetRadius(1.0);\n\t\tcone.SetResolution(10);\n\n\t\t// map to graphics objects\n\t\tvtkPolyDataMapper map = new vtkPolyDataMapper();\n\t\tmap.SetInputConnection(cone.GetOutputPort());\n\n\t\t// actor coordinates geometry, properties, transformation\n\t\tvtkActor aSphere = new vtkActor();\n\t\taSphere.SetMapper(map);\n\t\taSphere.GetProperty().SetColor(0, 0, 1); // color blue\n\t\treturn aSphere;\n\t}", "public static GraphNode createGraphNodeForActor() {\n GraphNode graphNode = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(0, 12 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNode.addContained(childNode);\n }\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create an actor\n Actor actor = new ActorImpl();\n\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n actor.addStereotype(stereotype);\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n actor.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(actor);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "SpawnController createSpawnController();", "void add(Actor actor);", "public static GraphNode createGraphNodeForActorConnector() {\n GraphNode graphNode = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(0, 12 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNode.addContained(childNode);\n }\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(0, 0));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create an actor\n Actor actor = new ActorImpl();\n\n\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n actor.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(actor);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "private void createAndRegisterActor(\n ActorProfile profile,\n ChatNetworkServicePluginRoot networkServicePluginRoot,\n int actorCounter){\n try{\n long threadId = Thread.currentThread().getId();\n profile.setIdentityPublicKey(UUID.randomUUID().toString());\n System.out.println(\"I will try to register an actor with pk \" + profile.getIdentityPublicKey());\n profile.setActorType(Actors.CHAT.getCode());\n profile.setName(\"Chat Actor \" + threadId +\"- \"+actorCounter);\n profile.setAlias(\"Bot \" + threadId + \"-\" + actorCounter);\n //This represents a valid image\n profile.setPhoto(IoPBytesArray.getIoPBytesArray());\n //profile.setNsIdentityPublicKey(networkServicePluginRoot.getPublicKey());\n profile.setExtraData(\"Test extra data\");\n //This is a test coordinate\n profile.setLocation(43.99309,110.92348);\n networkServicePluginRoot.registerActor(profile, 0, 0);\n List<ActorProfile> actorList = nsMap.get(networkServicePluginRoot);\n if(actorList ==null){\n actorList = new ArrayList<>();\n }\n actorList.add(profile);\n nsMap.put(networkServicePluginRoot, actorList);\n actorNesMap.put(profile.getIdentityPublicKey(), networkServicePluginRoot.getNetWorkServicePublicKey());\n } catch(Exception e){\n report(ReportType.EXCEPTION_DETECTED);\n System.out.println(\"Error when trying to create an actor \"+e);\n e.printStackTrace();\n }\n }", "public static Actor createActor(\n ExtensionAnnotationAssociationManager whole,\n String firstName,\n String lastName\n ) throws Exception {\n if( !wholeIsValid(Actor.class, whole) ){\n throw new Exception(String.format(\n \"There is no valid composition association between whole %s and part %s\",\n whole.getClass().getSimpleName(),\n Actor.class.getSimpleName()\n\n ));\n }\n\n // create an actor - its safe now\n Actor actor = new Actor(firstName, lastName);\n\n // add actor to the parts -> throw exception if part already exists\n if(addPart(whole, actor)){\n System.out.println();\n };\n\n // return actor\n return actor;\n }", "public void setActor(Actor actor);", "public static Action spawn(final Class<?> e) {\n return new Action() {\n @Override\n protected void perform(ActiveActor a) {\n if(a.isFacingValidLocation() && a.getFacing() == null) {\n if(a.energy >= getCost()) {\n try {\n Actor b = (Actor) e.newInstance();\n b.putSelfInGrid(a.getGrid(), a.getLocation().getAdjacentLocation(a.getDirection()));\n } catch(InstantiationException r) {\n r.printStackTrace();\n } catch(IllegalAccessException r) {\n r.printStackTrace();\n }\n a.energy = a.energy - 400;\n }\n }\n }\n\n @Override\n public int getCost() {\n return 400;\n }\n\n @Override\n public boolean isExclusive() {\n return true;\n }\n\n @Override\n public Object getData() {\n return e;\n }\n\n @Override\n public String toString() {\n return \"Spawn(\" + (e != null ? e.toString() : \"null\") + \")\";\n }\n };\n }", "public static Props createActor(int ID, int nb) {\n return Props.create(Process.class, () -> {\n return new Process(ID, nb);\n });\n }", "public static Props createActor(ActorRef loadBalancer) {\n\t\treturn Props.create(Client.class, () -> {\n\t\t\treturn new Client(loadBalancer);\n\t\t});\n\t}", "@Override\n public Receive createReceive() {\n return receiveBuilder()\n .match(PrinterActorProtocol.OnCommand.class, greeting -> {\n System.out.println(\"**--become(createNormalReceive())\");\n getContext().become(createNormalReceive());\n })\n .match(PrinterActorProtocol.StartSelfTestCommand.class, greeting -> {\n System.out.println(\"**--become(createSelfTestModeReceive()\");\n getContext().become(createSelfTestModeReceive());\n })\n\n\n .matchAny( obj -> System.out.println(\"PritnerActor Unknown message \" + obj.getClass()) )\n .build();\n }", "protected RemoteFactory.Agent.Component<Msg, Ref> newAgent() {\n RemoteFactory.Agent<Msg, Ref> _implem = _createImplementationOfAgent();\n return _implem._newComponent(new RemoteFactory.Agent.Requires<Msg, Ref>() {},true);\n }", "@Override\n public PASerializable newActor(Mailbox mailbox, Ancestor parent)\n throws Exception {\n PASerializable a = instantiateActor();\n ((IncDesImpl) a.getDurable()).initialize(mailbox, parent, this);\n return a;\n }", "public void create(){}", "public interface ConstructorActor extends Actor {\n String apply(Constructor constructor);\n\n default public String apply(Class knownClass, Field field, Method method, Constructor constructor) {\n if (constructor != null) {\n return apply(constructor);\n } else {\n return null;\n }\n }\n}", "public Actor(ActorType type, double x, double y) {\n this.location = new Location(x, y);\n this.type = type;\n setImage(type);\n }", "Action createAction();", "Action createAction();", "Action createAction();", "public GridCell(int xPosition, int yPosition, char actor) // Based on the actor we are creating respective object.\n {\n\t xPos = xPosition;\n\t yPos = yPosition;\n\t if(actor == Constants.PATH)\n\t {\n\t\t a = new Actor();\n\t }\n\t if( actor == Constants.ROBOT)\n\t {\n\t\t a = new PlayerRobotManual();// creating PlayerRobotManual object.\n\t }\n\t if(actor == 'x' || actor == Constants.WALL)\n\t {\n\t\t a = new Wall();// wall object.\n\t }\n\t if(actor == 'b' || actor == Constants.BOMB)\n\t {\n\t\t a = new Bomb(); // Bomb objection.\n\t }\n\t if(actor == Constants.SMALL_CANDY ) \n\t {\n\t\t a = new Candy(Constants.SMALL_CANDY); // candy object of type small.\n\t }\n\t if(actor == Constants.SMALL_CANDY ) \n\t {\n\t\t a = new Candy(Constants.SMALL_CANDY);\n\t }\n\t if(actor == Constants.BIG_CANDY)\n\t {\n\t\t a = new Candy(Constants.BIG_CANDY);// candy object of type Big.\n\t }\n\t if(actor == Constants.DUMB_ENEMY)\n\t {\n\t\t a = new DumbEnemy(); // object of dumb enemy which moves in random direction.\n\t }\n\t if(actor == Constants.SENTINEL_ENEMY)\n\t {\n\t\t a = new SentinelEnemy();// THis will be at one fixed postion and will kill the robot if its in neighbour cell.\n\t }\n\t if(actor == Constants.WALKING_SENTINEL)\n\t {\n\t\t a = new WalkingSentinelEnemy();// object for walking sentinel enemy.\n\t }\n\t if(actor == Constants.PLAYER_CHASER)\n\t {\n\t\t a = new SmartEnemy();// object for player chaser enemy.\n\t }\n\t if(actor == Constants.CANDY_CHASER)\n\t {\n\t\t a = new WatcherEnemy();// object for candy chaser enemy.\n\t }\n\t if(actor == Constants.ROBOT_HOLDING_BOMB)\n\t {\n\t\t a = new PlayerRobotHoldingBomb();// object used to repersent the player holding bomb.\n\t }\n\t if(actor == Constants.FLYING_BOMB)\n\t {\n\t\t a = new FlyingBomb(); // Object used to represent the flying bomb.\n\t }\n\t if((int)actor >= 49 && (int)actor <=57)\n\t {\n\t\t a = new WarpZone(actor);\n\t }\n\t if(actor == 'i')\n\t {\n\t\t a = new InvisibleCloak();\n\t\t\t\t \n\t }\n\t}", "Actuator createActuator();", "public void createAction() {\n }", "protected Figure newFigure( Point2D p, Figure f ) {\n\t\tSistema.logger.info( \"Creating actor at \" + p.getX() + \",\" + p.getY() );\n\t\tActorFigure figure = new ActorFigure( \"teste\" );\n\t\tfigure.setLocation( p );\n\t\treturn figure;\n\t}", "protected abstract void perform(ActiveActor a);", "public Actor getActor() {\n DBActor a = new DBActor();\n a.setId(this.actorID);\n H2ActorDAO.getInstance().populateActor(a);\n return a;\n }", "private Actor getActorFromData(String[] line){\n Actor actor = new Actor(line[AppVariables.actorID].trim(), \n line[AppVariables.actorName].trim());\n return actor;\n }", "protected abstract void createTriggerOrAction();", "@Override\n public Receive createReceive() {\n return receiveBuilder()\n\n .match(WhoToGreet.class, wtg -> {\n // -> uses the internal state of wtg and modify this internal state (this.greeting)\n this.greeting = \"Who to greet? -> \" + wtg.who;\n\n }).match(Greet.class, x -> {\n // -> send a message to another actor (thread)\n printerActor.tell(new Printer.Greeting(greeting), getSelf());\n\n }).build();\n }", "void create(Member member);", "private void createAgent(Class<?> clazz, String name) {\r\n try {\r\n // Fill description of an agent to be created\r\n CreateAgent ca = new CreateAgent();\r\n ca.setAgentName(name);\r\n ca.setClassName(clazz.getCanonicalName());\r\n ca.setContainer(container);\r\n\r\n Action act = new Action(getAMS(), ca);\r\n ACLMessage req = new ACLMessage(ACLMessage.REQUEST);\r\n req.addReceiver(getAMS());\r\n req.setOntology(ontology.getName());\r\n req.setLanguage(FIPANames.ContentLanguage.FIPA_SL);\r\n req.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n getContentManager().fillContent(req, act);\r\n \r\n // AMS sends a response, \r\n addBehaviour(new AchieveREInitiator(this, req) {\r\n @Override\r\n protected void handleInform(ACLMessage inform) {\r\n logger.severe(\"Success\");\r\n }\r\n\r\n @Override\r\n protected void handleFailure(ACLMessage inform) {\r\n logger.severe(\"Failure\");\r\n }\r\n });\r\n } catch (CodecException | OntologyException e) {\r\n ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n PrintStream printer = new PrintStream(out);\r\n e.printStackTrace(printer);\r\n logger.severe(out.toString());\r\n }\r\n }", "public void createAndRegisterActors(){\n //stressAppNetworkService.getAbstractNetworkServiceList().forEach((type,ns)->{\n stressAppNetworkService.getChatNetworkServicePluginRootList().forEach(ns->{\n //System.out.println(\"Network Service type: \"+type);\n nsPublicKeyMap.put(ns.getPublicKey(), (ChatNetworkServicePluginRoot) ns);\n ((ChatNetworkServicePluginRoot) ns).setMessageReceiver(this);\n int actorCounter = 0;\n for(ActorProfile actor : actorProfileList){\n createAndRegisterActor(actor,(ChatNetworkServicePluginRoot) ns, actorCounter);\n actorCounter++;\n actorsCreated++;\n report(ReportType.ACTOR_CREATED);\n }\n nsStarted++;\n report(ReportType.NS_STARED);\n });\n }", "@Override\r\n\tpublic <T extends Actor> void performAs(T actor) {\n\t\tRandom random = new Random();\r\n\r\n\t\t\r\n\t}", "public long newActor(Actor actor) {\n\t\tSystem.out.println(actor);\n\t\tif (actor.getId() != 0) {\n\t\t\treturn -1;\n\t\t} else if (actor.getFirstName() == null || actor.getLastName() == null) {\n\t\t\treturn -2;\n\t\t} else {\n\t\t\t//System.out.println(actor);\n\t\t\tList<Actor> actors = new ArrayList<>();\n\t\t\tactors = (List<Actor>) this.actorRepository.findAll();\n\t\t\tSystem.out.println(\"Size=\" + actors.size());\n\t\t\tfor (int i=0 ; i<actors.size() ; i++) {\n\t\t\t\t//System.out.println(actor + \" \" + i);\n\n\t\t\t\tif (actors.get(i).getFirstName().equals(actor.getFirstName()) & actors.get(i).getLastName().equals(actor.getLastName()) ) {\n\t\t\t\t\treturn -3;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(actor);\n\n\t\tActor result = this.actorRepository.save(actor);\n\t\treturn result.getId();\n\t}", "@Override\r\n\tpublic <T extends Actor> void performAs(T actor) {\n\t\tactor.attemptsTo(Click.on(NewToursComponents.REGISTER),//Accion de dar click al componente especifico mapeado\r\n\t\t\t\tClick.on(newtoursregister));\r\n\t\t\r\n\t}", "public RemoteFactory.Agent<Msg, Ref> _createImplementationOfAgent() {\n RemoteFactory.Agent<Msg, Ref> implem = make_Agent();\n if (implem == null) {\n \tthrow new RuntimeException(\"make_Agent() in fr.irit.smac.may.lib.classic.remote.RemoteFactory should not return null.\");\n }\n assert implem.ecosystemComponent == null: \"This is a bug.\";\n assert this.selfComponent != null: \"This is a bug.\";\n implem.ecosystemComponent = this.selfComponent;\n return implem;\n }", "public Actor getActor() {\r\n \t\treturn actor;\r\n \t}", "private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n aiManager.start();\n }", "SendAction createSendAction();", "public CreateRemoteClassic<Msg, Ref> create();", "protected abstract CreateRemoteClassic<Msg, Ref> make_create();", "private ActorSystemBootstrapTools() {}", "public void create() {\n\t\t\n\t}", "Hero createHero();", "Component createComponent();", "Component createComponent();", "Actor(int x, int y, Texture image) {\n this.setX(x);\n this.setY(y);\n setImage(image);\n }", "public abstract void create();", "private SimpleBehaviour(ActorContext<String> context) {\n\t\tsuper(context);\n\t}", "public MyAgent(World world)\n {\n w = world; \n }", "public Agent generateAgent(){\r\n\r\n\t\t\tlogger.info(\"generateAgent method\");\r\n\r\n\t\t\tPatch currentPatch = randPatch();\r\n\r\n\t\t\tlogger.info(\"random patch: x = \" + currentPatch.getX()\r\n\t\t\t\t\t\t+ \" y = \" + currentPatch.getY());\r\n\r\n\r\n\t\t\tAgent agent= new Agent(currentPatch, false);\r\n\r\n\t\t\tcurrentPatch.setPerson(agent);\r\n\r\n\t\t\treturn agent;\r\n\t\t}", "ExternalActuator createExternalActuator();", "private static void spawn(Actor actor, ActorWorld world)\n {\n Random generator = new Random();\n int row = generator.nextInt(10);\n int col = generator.nextInt(10);\n Location loc = new Location(row, col);\n while(world.getGrid().get(loc) != null)\n {\n row = generator.nextInt(10);\n col = generator.nextInt(10);\n loc = new Location(row, col);\n }\n world.add(loc, actor);\n }", "Player createPlayer();", "public void createThread() {\n }", "public void spawnCreature(){\n\t\tif(spawnType.equalsIgnoreCase(\"worm\")){\n\t\t\tRuntimeObjectFactory.getObjectFromPool(\"worm\"+spawnId);\n\t\t}else if(spawnType.equalsIgnoreCase(\"antorc\")){\n\t\t\tGdx.app.debug(TamerGame.LOG, this.getClass()\n\t\t\t\t\t.getSimpleName() + \" :: Ant entered\");\t\t\t\n\t\t\t//CHANGE SPAWNING IMPLEMENTATION\n\t\t\tAntOrc orc = new AntOrc();\n\t\t\torc.setPosition(getPosition());\n\t\t\torc.setWaypoint(waypoint);\n\t\t\tenvironment.addNewObject(orc);\n\t\t\tEventPool.addEvent(new tEvent(this,\"spawnCreature\",sleepTime,1));\n\t\t}\n\t\t\t\n\t}", "Instance createInstance();", "@Test\n public void testActorByMockingInsideActorMultiThreaded(@Capturing final Logger LOGGER) throws InterruptedException {\n final TestKit childActor1 = new TestKit(system);\n final TestKit scheduledChildActor = new TestKit(system);\n final TestKit genericActor = new TestKit(system);\n new Expectations() {{\n new MockUp<Router>() {\n @Mock\n private ActorRef createChildIfNull() {\n return childActor1.testActor();\n }\n\n @Mock\n private ActorRef createScheduledChildIfNull() {\n return scheduledChildActor.testActor();\n }\n };\n }};\n new TestKit(system) {{\n RouterState routerInitialState = new RouterState(0);\n ActorRefCreatorFactory factory = new ActorRefCreatorFactory();\n ActorRef router = system.actorOf(Router.props(routerInitialState, factory), \"router\");\n router.tell(new CommunicateWithActorMessage(4), router);\n childActor1.expectMsg(new ChildActor1Message(11111));\n scheduledChildActor.expectMsg(new StartSchedulerMessage(0));\n }};\n }", "public void initActor(){\n this.root = new Node(\"root\");\n this.body = new Node(\"body\");\n this.rLeg = new Node(\"rLeg\");\n this.lLeg = new Node(\"lLeg\");\n this.rArm = new Node(\"rArm\");\n this.lArm = new Node(\"lArm\");\n this.head = new Node(\"head\");\n this.handle = new Node(\"handle\");\n \n //r2 -- Add a weapons node and create empty target node\n this.weapon = new Node(\"weapon\");\n this.target_pivot = new Node(\"target\");\n \n //Create the relationships between the joint nodes\n this.root.attachChild(this.body);\n this.handle.attachChild(this.root);\n this.body.attachChild(this.lLeg);\n this.body.attachChild(this.rLeg);\n this.body.attachChild(this.lArm);\n this.body.attachChild(this.rArm);\n this.body.attachChild(this.head);\n this.rArm.attachChild(this.weapon);\n \n //Move joints to local positions\n this.body.move(0,3f,0);\n this.lLeg.move(0.5f,0,0);\n this.rLeg.move(-0.5f,0,0);\n this.lArm.move(1.5f,3f,0);\n this.rArm.move(-1.5f,3f,0);\n this.head.move(0,3f,0);\n this.weapon.move(0,-3f,0.75f);\n \n \n //Create the physical dimensions of the actor 'minecraft-style'\n this.legBox = new Box(0.5f, 1.5f, 0.5f);\n this.bodyBox = new Box(1, 1.5f, 0.5f);\n this.armBox = new Box(0.5f, 1.5f, 0.5f);\n this.headBox = new Box(1, 1, 1);\n this.weaponBox = new Box(0.25f,0.75f,0.25f);\n \n //Create the visual elements and add materials\n this.lLegGeom = new Geometry(\"lLeg\", this.legBox);\n this.rLegGeom = new Geometry(\"rLeg\", this.legBox);\n this.bodyGeom = new Geometry(\"Body\", this.bodyBox);\n this.lArmGeom = new Geometry(\"lArm\", this.armBox);\n this.rArmGeom = new Geometry(\"rArm\", this.armBox);\n this.headGeom = new Geometry(\"Head\", this.headBox);\n this.weaponGeom = new Geometry(\"Weapon\", this.weaponBox);\n \n //Set materials\n this.lLegGeom.setMaterial(this.legMat);\n this.rLegGeom.setMaterial(this.legMat);\n this.bodyGeom.setMaterial(this.bodyMat);\n this.lArmGeom.setMaterial(this.armMat);\n this.rArmGeom.setMaterial(this.armMat);\n this.headGeom.setMaterial(this.headMat);\n \n //TODO: Give weapons their own material\n this.weaponGeom.setMaterial(this.legMat);\n \n //Set the local transforms of geometry to align with joints properly\n this.lLegGeom.move(0,-1.5f,0);\n this.rLegGeom.move(0,-1.5f,0);\n this.bodyGeom.move(0,1.5f,0);\n this.lArmGeom.move(0,-1.5f,0);\n this.rArmGeom.move(0,-1.5f,0);\n this.headGeom.move(0,1f,0);\n this.weaponGeom.move(0,0,0);\n \n //Attach geometries to nodes\n this.body.attachChild(this.bodyGeom);\n this.lLeg.attachChild(this.lLegGeom);\n this.rLeg.attachChild(this.rLegGeom);\n this.lArm.attachChild(this.lArmGeom);\n this.rArm.attachChild(this.rArmGeom);\n this.head.attachChild(this.headGeom);\n this.weapon.attachChild(this.weaponGeom);\n \n Quaternion xRot = new Quaternion().fromAngleAxis(FastMath.DEG_TO_RAD * 0,Vector3f.UNIT_X.clone());\n Quaternion yRot = new Quaternion().fromAngleAxis(FastMath.DEG_TO_RAD * 0,Vector3f.UNIT_Z.clone());\n \n //Refactor ActorControl with Character Control\n CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(2.5f,3f,1);\n this.mobControl = new CharacterControl(capsuleShape, 3f);//Step size is set in last argument\n this.mobControl.setJumpSpeed(20);\n this.mobControl.setFallSpeed(45);\n this.mobControl.setGravity(50);\n \n \n this.root.setLocalRotation(xRot.mult(yRot));\n //this.handle.getLocalRotation().lookAt(Vector3f.UNIT_Z, Vector3f.UNIT_Y);\n \n this.root.scale(0.75f, 0.75f, 0.75f);\n \n //this.handle.setLocalTranslation(10f, 5f, 15f);\n \n rootNode.attachChild(this.handle);\n }", "public interface BaseActor {\n\n /**\n * @return The id of this actor.\n */\n ActorId getId();\n\n /**\n * Kill the actor immediately. This will cause any outstanding tasks submitted to the actor to\n * fail and the actor to exit in the same way as if it crashed.\n *\n * @param noReconstruction If set to true, the killed actor will not be reconstructed anymore.\n */\n default void kill(boolean noReconstruction) {\n Ray.internal().killActor(this, noReconstruction);\n }\n}", "public void addActor(){\n actorProfileList.add(new ActorProfile());\n }", "ActorId getActorId();", "@Override\n\tpublic void create() {\n\t\t\n\t}", "private static JsonActor toBasicJson(Actor actor) {\r\n JsonActor jsonActor = new JsonActor();\r\n applyBasicJsonValues(jsonActor, actor);\r\n return jsonActor;\r\n }", "private void setActor(String actor)\r\n/* 41: */ {\r\n/* 42: 44 */ this.actor = actor;\r\n/* 43: */ }", "Make createMake();", "private static ActorSystem startActorSystem(\n Config config, String actorSystemName, Logger logger) {\n logger.debug(\"Using pekko configuration\\n {}\", config);\n ActorSystem actorSystem = PekkoUtils.createActorSystem(actorSystemName, config);\n\n logger.info(\"Actor system started at {}\", PekkoUtils.getAddress(actorSystem));\n return actorSystem;\n }", "public Object getActorRef() {\n return actorRef;\n }", "public String toString() {\r\n\t\treturn \"Actor\";\r\n\t}", "public abstract void applyTo(Actor a);", "public abstract T create(T obj);", "public void moveActor();", "void createPlayer(Player player);", "@Override\n public String actor() {\n return NAME;\n }", "@Override\n public String actor() {\n return NAME;\n }", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\n public ActorType getType()\n {\n return ActorType.BOX;\n }", "public Actor(GameEngine e) {\r\n\t\tvelocity = new Point2D.Float(0, 0); // speed in pixels/s\r\n\t\tcenter = new Point2D.Float(0, 0);\r\n\t\tsize = new Point2D.Float(0, 0);\r\n\t\tacceleration = new Point2D.Float(0, 0);\r\n\t\tmaxVelocity = new Point2D.Float(Integer.MAX_VALUE, Integer.MAX_VALUE);\r\n\t\tdeath = false;\r\n\t\tengine = e;\r\n\t\tbasePoly = new Polygon();\r\n\t\thealth = 0;\r\n\t\tdir = 0;\r\n\t\tmaxHealth = 0;\r\n\t\t_checkInvariant();\r\n\t}", "protected abstract Actor getAccessor();", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public Actor(String Name, String Activity) {\n this.mName = Name;\n this.mCurrentActivity = Activity;\n }", "public ProxyActor(String actorPath) {\n\t\tthis(ActorRef.noSender(), actorPath, null);\n\t}", "@Override\n protected void _putObjectToActorInstance(String name, Object object) throws ScriptException {\n \n // see if the actor class has this field\n Field field = null;\n try {\n field = _actorObject.getClass().getField(name);\n } catch(Exception e) {\n // do nothing\n }\n \n if(field == null) {\n // actor class does not have the field so put as global \n String globalName = \"_yyy_\" + name;\n _engine.put(globalName, object);\n _engine.eval(object.getClass().getName() + \" \" + name + \" = \" + globalName);\n } else {\n try {\n // set the field in the actor instance.\n field.set(_actorObject, object);\n } catch (Exception e) {\n throw new ScriptException(\"Error setting port/parameter \" + name + \": \" + e.getMessage());\n }\n }\n }", "public Actor(PhysicsComponent physics, VisualComponent visuals, HpComponent health) {\n this.addComponent(physics); //add physics\n this.addComponent(visuals); //add texture\n this.addComponent(health); //add hp\n }", "void create(Team team);", "public static NPC createNPC(){\n\t\treturn new NPC();\n\t}", "public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}", "public Material create();", "public void createActivity(Activity activity) {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n void spawn(Entity entity);", "Strobo createStrobo();" ]
[ "0.87654483", "0.72913235", "0.65584165", "0.6538842", "0.65097547", "0.64906067", "0.6459368", "0.64394045", "0.63701206", "0.63582385", "0.6346181", "0.6323992", "0.62490124", "0.62403226", "0.62251055", "0.62142223", "0.6171243", "0.6159297", "0.60862863", "0.606949", "0.6059829", "0.60384035", "0.6037101", "0.5983877", "0.5917246", "0.5877945", "0.58718634", "0.58718634", "0.58718634", "0.5864431", "0.585788", "0.5851068", "0.5822119", "0.5817408", "0.5817243", "0.5816286", "0.5813542", "0.58007765", "0.5792178", "0.57730776", "0.5768737", "0.57680106", "0.57679176", "0.57653546", "0.5763055", "0.5756592", "0.57407665", "0.5739736", "0.5726644", "0.5716305", "0.5705174", "0.5701772", "0.56900924", "0.5674877", "0.5674877", "0.56732476", "0.56535345", "0.5598116", "0.5579878", "0.5572909", "0.5563058", "0.55601823", "0.55583143", "0.55553037", "0.55379254", "0.5536171", "0.5533545", "0.55228996", "0.55208486", "0.5508118", "0.5499831", "0.54974294", "0.5489645", "0.548722", "0.5478989", "0.54723907", "0.5465917", "0.54632753", "0.5462218", "0.5460271", "0.5459643", "0.54523265", "0.5448527", "0.5448527", "0.54437363", "0.5442291", "0.5441675", "0.5429082", "0.54290426", "0.5425908", "0.5423735", "0.54220325", "0.54183847", "0.54165304", "0.5415349", "0.54098886", "0.5406302", "0.5403716", "0.5402457", "0.53977287" ]
0.6710427
2
1. Make a variable to hold the score
public static void main(String[] args) { int b = 1; // 3. Ask the user a riddle. Here are some ideas: bit.ly/some-riddles String a = JOptionPane.showInputDialog("Name three keys that don't unlock a door?"); // 4. If they got the answer right, pop up "correct!" and increase the score by one if (a.equalsIgnoreCase("monkey, turkey and donkey")) { JOptionPane.showMessageDialog(null, "correct!!!"); System.out.println(b++); } else { JOptionPane.showMessageDialog(null, "sorry your uncorrect, the answer is monkey, turkey and donkey"); } // 5. Otherwise, say "wrong" and tell them the answer // 6. Add some more riddles // 2. Make a pop up to show the score. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int score();", "int score();", "float getScore();", "float getScore();", "public int getScore() { return score; }", "public int getScore() {return score;}", "int getScore();", "public static int getScore(){\n return score;\n }", "long getScore();", "long getScore();", "long getScore();", "long getScore();", "public int getScore ()\r\n {\r\n\treturn score;\r\n }", "int getScoreValue();", "public static int getScore()\n {\n return score;\n }", "Float getScore();", "public void setScore(int score) { this.score = score; }", "public int getScore(){return score;}", "public int getScore(){return score;}", "public int getScore()\n {\n return score; \n }", "public static int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}", "public static int getScore()\n\t{\n\t\treturn score;\n\t}", "public static void incrementScore() {\n\t\tscore++;\n\t}", "public int getScore(){\r\n\t\treturn score;\r\n\t}", "public int getScore(){\r\n\t\treturn score;\r\n\t}", "public int score() {\n return score;\n }", "public void addScore()\n {\n score += 1;\n }", "public float getScore(){return score;}", "public int getScore()\n {\n // put your code here\n return score;\n }", "public void setScore(int score) {this.score = score;}", "public int getScore()\n {\n return score;\n }", "public int getScore(){ return this.score; }", "public int getScore()\n {\n return currentScore;\n }", "public int getScore(){\n\t\treturn score;\n\t}", "public int getScore(){\n\t\treturn score;\n\t}", "public int getScore() {\r\n return score;\r\n }", "public int getScore() {\r\n return score;\r\n }", "public int getScore() {\r\n return score;\r\n }", "public int getScore(){\n \treturn 100;\n }", "public abstract float getScore();", "public int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}", "public int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}", "int getScore() {\n return score;\n }", "public static void createScore(){\n\t}", "public int getScore() {\n return score;\n }", "public int getScore() {\n return score;\n }", "public int getScore() {\n return currentScore;\n }", "public int getScore() {\r\n \treturn score;\r\n }", "public int getScore() {\n return score;\n }", "public int getScore(){\n return this.score;\n }", "public double getScore() {\r\n return score;\r\n }", "public void addOneToScore() {\r\n score++;\r\n }", "public void calcScore(int score) {\r\n\t\tif (initFinish)\r\n\t\t\tthis.score += score * this.multy;\r\n\t\t// TODO delete\r\n//\t\tSystem.out.println(\"score: \" + this.score + \"multy: \" + this.multy);\r\n\t}", "public int getScore(){\n\t\treturn this.score;\n\t}", "public int getScore(){\n\t\treturn this.score;\n\t}", "public void addScore(){\n\n // ong nuoc 1\n if(birdS.getX() == waterPipeS.getX1() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX1() + 50){\n score++;\n bl = false;\n }\n\n //ong nuoc 2\n if(birdS.getX() == waterPipeS.getX2() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX2() + 50){\n score++;\n bl = false;\n }\n\n // ong nuoc 3\n if(birdS.getX() == waterPipeS.getX3() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX3() + 50){\n score++;\n bl = false;\n }\n\n }", "@Override\n public int getScore() {\n return score;\n }", "public int getScore () {\n return mScore;\n }", "public void addScore(int score);", "public int getTotalScore(){\r\n return totalScore;\r\n }", "public float getScore() {\n return score;\n }", "public int getScore() {\n return this.score;\n }", "public int returnPoints()\n {\n return score ;\n }", "public int score(){\r\n\t\t//to be implemented: should return game score \r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tscore= frames.get(i).score();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn score + bonusGame;\r\n\t}", "public int getScore() {\n\t\treturn (score);\n\t}", "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "Float getAutoScore();", "@Override\r\n\tpublic double getScore() {\n\t\treturn score;\r\n\t}", "public int getScore() {\r\n\t\treturn score;\r\n\t}", "public int getScore() {\r\n\t\treturn score;\r\n\t}", "public int getPlayerScore();", "void addScore(double score){\n\t\tsumScore+=score;\n\t\tnumScores++;\n\t\taverage = sumScore/numScores;\n\t}", "public void setScore(double score) {\r\n this.score = score;\r\n }", "public int getTotalScore(){\n return totalScore;\n }", "public Integer getScore() {\r\n return score;\r\n }", "public void setScore(int score)\n {\n this.score = score;\n }", "public int getScore() {\n return getStat(score);\n }", "@Override\n\tpublic void checkScore() {\n\t\t\n\t}", "public double getScore() {\r\n return mScore;\r\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public Score(){\n\t\tscore = 0;\n\t\tincrement = 0; //how many points for eating a kibble. Changed to zero here because adjustScoreIncrement's extra points begin at 1 anyway\n\t}", "public final int getScore() {\n\t\treturn score;\n\t}", "public Integer getScore() {\n return score;\n }", "public Float getScore() {\n return score;\n }", "public long getScore() {\n return score_;\n }", "public long getScore() {\n return score_;\n }", "public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "public int getScore()\n {\n int score;\n if (this.isFinal())\n score = 1;\n else\n score = 0;\n return score;\n }", "public void score(){\r\n\t\tint playerLocation = player.getLocationX();\r\n\t\tint obstacleX = obstacle.getLocationX();\r\n\t\tint obstacleY = obstacle.getLocationY();\r\n\r\n\r\n\t\tstr =\"\" + countCoins;\r\n\r\n\t\t//if you hit a coin, the number of points goes up by one.\r\n\t\tif(obstacleY == 280 && obstacleX==300 && playerLocation == 250){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\t\tif(obstacleY== 450 && obstacleX==300 && playerLocation ==450){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\r\n\t\t//if you hit the green monster, you lose one point.\r\n\t\tif((obstacleX-50) == 250 && (obstacleY-240) == 250 && playerLocation ==250){\r\n\t\t\tcountCoins--;\r\n\t\t}\r\n\r\n\t\t//if you hit the blue monster, you lose 3 points.\r\n\t\tif((obstacleX+180) == 480 && (obstacleY+180) == 250 && playerLocation ==450){\r\n\t\t\tcountCoins-=3;\r\n\t\t}\r\n\t}", "public int getHomeScore();", "public Double getScore() {\n return this.score;\n }", "public Double getScore() {\n return this.score;\n }", "public int getScore()\n\t{\n\t\treturn this.score;\n\t}", "public int getScore() {\n\t\treturn score;\n\t}", "public int getScore() {\n\t\treturn score;\n\t}", "public int getScore() {\n\t\treturn score;\n\t}", "public int getScore() {\n\t\treturn score;\n\t}", "public int getScore() {\n\t\treturn score;\n\t}", "public int getScore() {\n\t\treturn score;\n\t}" ]
[ "0.7897628", "0.7897628", "0.7871008", "0.7871008", "0.7845415", "0.7825097", "0.7810532", "0.77783424", "0.7751969", "0.7751969", "0.7751969", "0.7751969", "0.7741067", "0.7665048", "0.7651517", "0.76358247", "0.76272416", "0.7601615", "0.7601615", "0.7598628", "0.75910145", "0.7582021", "0.7580347", "0.7569998", "0.7569998", "0.75694096", "0.75668657", "0.75275975", "0.7522828", "0.7522394", "0.75214154", "0.7513393", "0.7501451", "0.74928766", "0.74928766", "0.74861944", "0.74861944", "0.74861944", "0.74828684", "0.7465506", "0.7452149", "0.7452149", "0.74334043", "0.7427674", "0.74260175", "0.74260175", "0.7424315", "0.7418864", "0.7409205", "0.7373898", "0.73728806", "0.7309352", "0.7307048", "0.7305732", "0.7305732", "0.7296845", "0.72815204", "0.727738", "0.7266375", "0.7222645", "0.7203455", "0.7198521", "0.7190509", "0.71774864", "0.7175071", "0.71706575", "0.7168161", "0.71647716", "0.7152545", "0.7152545", "0.71523035", "0.7148287", "0.7148167", "0.7147948", "0.7134618", "0.7123471", "0.71171206", "0.7114181", "0.7113825", "0.7106721", "0.7101055", "0.7101055", "0.7097143", "0.70869124", "0.70834094", "0.7082864", "0.7082682", "0.7082682", "0.7081489", "0.70676196", "0.7065507", "0.70597607", "0.70585304", "0.70585304", "0.7057225", "0.70565575", "0.70565575", "0.70565575", "0.70565575", "0.70565575", "0.70565575" ]
0.0
-1
Main menu item clicked
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case MENU_ID_DELETE_REPORT: runDeleteReport(); return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void menuClicked(MenuItem menuItemSelected);", "void onMenuItemClicked();", "void clickAmFromMenu();", "public void menuItemClicked( Menu2DEvent e );", "void clickFmFromMenu();", "public void pressMainMenu() {\n }", "@FXML protected void MainMenuButtonClicked(ActionEvent event) {\n this.mainMenuCB.launchMainMenu();\r\n }", "@Override\r\n\tpublic void clicked(ItemMenuIcon icon, Player p) {\n\t\t\r\n\t}", "@Override\n public void menuSelected(MenuEvent e) {\n \n }", "public void onMainClick(){\r\n\t\tmyView.advanceToMain();\r\n\t}", "abstract public boolean cabOnMenuItemClicked(ActionMode mode, MenuItem item);", "@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}", "@Override\n\t\t\tpublic void menuSelected(MenuItem selectedItem)\n\t\t\t{\n\n\t\t\t}", "@Override\n\tpublic void menuSelected(MenuEvent e) {\n\n\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}", "@Override\n public boolean onMenuItemClick(MenuItem item) {\n return true;\n }", "@Override\r\n\tpublic void onMenuItemSelected(MenuItem item) {\n\r\n\t}", "default public void clickMenu() {\n\t\tremoteControlAction(RemoteControlKeyword.MENU);\n\t}", "@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 int id = item.getItemId();\n\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n if (menuItems.get(i).getMenuIndex() == 1){\n addBaby();\n }\n else {\n onBackPressed();\n }\n }", "IMenu getMainMenu();", "@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}", "@Override\n public void itemClick(int pos) {\n }", "@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n\n\n return true;\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) \n\t{\n\t\tswitch(position)\n\t\t{\n\t\tcase 0:ActivityStarter(\"rahulapps.apihelp.Bluetooth.BluetoothMenu\");break;\n\t\tcase 1:ActivityStarter(\"rahulapps.apihelp.Wifi.WifiMenu\");break;\n\t\tcase 2:ActivityStarter(\"rahulapps.apihelp.Sensor.SensorMenu\");break;\n\t\tcase 3:ActivityStarter(\"rahulapps.apihelp.SplashActivity.SplashMenu\");break;\n\t\tcase 4:ActivityStarter(\"rahulapps.apihelp.Menus.MenuActivityMenu\");break;\n\t\tcase 5:ActivityStarter(\"rahulapps.apihelp.Speech.SpeechRecognitionMenu\");break;\n\t\tcase 6:ActivityStarter(\"rahulapps.apihelp.Graphs.GraphMenu\");break;\n\t\tcase 7:ActivityStarter(\"rahulapps.apihelp.Notifications.NotificationMenu\");break;\n\t\tcase 8:ActivityStarter(\"rahulapps.apihelp.FileIO.FileIOMenu\");break;\n\t\tcase 9:ActivityStarter(\"rahulapps.apihelp.Email.EmailMenu\");break;\n\t\tcase 10:ActivityStarter(\"rahulapps.apihelp.Camera.CameraMenu\");break;\n\t\t}\n\t}", "public void act() \n {\n if(Greenfoot.mouseClicked(this)){\n storeMenu.getLastPressed(this,item,cost);\n changeImage();\n } \n }", "@Override\n public void onMenuClick() {\n Toast.makeText(activity.getApplicationContext(), \"Menu click\",\n Toast.LENGTH_LONG).show();\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 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 }", "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\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onMenuItemSelected(int featureId, MenuItem item) {\n int lSelectedItemID = item.getItemId(); // 액션 메뉴 아이디 확인함.\n if(lSelectedItemID == R.id.action_example){\n // To-do something\n }\n return super.onMenuItemSelected(featureId, item);\n }", "@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }", "@Override\n\t\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\t\t\t\t\tint id = item.getItemId();\n\t\t\t\t\tIntent i;\n\t\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\t\tcase R.id.menu_add_new_list:\n\t\t\t\t\t\tif (task.getString(\"user_id\", null) != null) {\n\t\t\t\t\t\t\ti = new Intent(getBaseContext(), MyMap.class);\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(MyMap.this, \"Please Login first\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase R.id.menu_dashboard:\n\t\t\t\t\t\tif (task.getString(\"user_id\", null) != null) {\n\t\t\t\t\t\t\ti = new Intent(MyMap.this, dashboard_main.class);\n\t\t\t\t\t\t\ti.putExtra(\"edit\", \"12344\");\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(MyMap.this, \"Please Login first\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase R.id.menu_login:\n\t\t\t\t\t\tif (bedMenuItem.getTitle().equals(\"Logout\")) {\n\t\t\t\t\t\t\tSharedPreferences.Editor editor = getSharedPreferences(\"user\", MODE_PRIVATE).edit();\n\t\t\t\t\t\t\teditor.clear();\n\t\t\t\t\t\t\teditor.commit();\n\t\t\t\t\t\t\tbedMenuItem.setTitle(\"Login/Register\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tIntent i_user = new Intent(getBaseContext(), user_login.class);\n\t\t\t\t\t\t\tstartActivity(i_user);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n Class c = Methods.onOptionsItemSelected(id);\n if (c != null) {\n Intent intent = new Intent(getBaseContext(), c);\n startActivity(intent);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Command\t\n\tpublic void menuClicked(@BindingParam(\"pagename\") String pagename)\n\t{\n\t\t\n\t\tVlayout vl=(Vlayout)Path.getComponent(\"/mainlayout\");\n\t\t//Scrollview s=(Scrollview)vl.getFellow(\"scvCenter\");\n\t\t//Executions.createComponents(pagename, s, null);\n\t\t\t\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\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 onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch(id){\n case R.id.dates:\n getdatemenu();\n break;\n case R.id.keys:\n getkeymenu();\n break;\n case R.id.list:\n getlistmenu();\n case android.R.id.home:\n Intent goHome = new Intent(this,MainActivity.class);\n boolean foundHome = navigateUpTo(goHome);\n\n\n }\n\n\n\n return true;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent intent = new Intent(MainActivity.this, MenuActivity.class);\n String name = (String) parent.getItemAtPosition(position);\n intent.putExtra(\"name\", name);\n startActivity(intent);\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 }", "public void mouseClicked(MouseEvent e) { // Methode um MausEvent zu untersuchen\r\n\t\t\t\tclickCounter++;\r\n\t\t\t\tif (clickCounter % 2 == 0) { \r\n\t\t\t\t\tmenu.setVisible(false); // bei 2 klicks geht das menü wieder zu\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpopMenu(); // das popMenu wird aufgerufen\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n switch (adapterView.getItemAtPosition(i).toString()) {\r\n case \"Exercise 1\":\r\n Toast.makeText(MainActivity.this, getResources().getString(R.string.main_menu_clicked_msg) + getResources().getString(R.string.ex1), Toast.LENGTH_SHORT).show();\r\n startActivity(new Intent(view.getContext(), LoginActivity.class));\r\n break;\r\n }\r\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 switch (item.getItemId()) {\n case R.id.mnuMain:\n startActivity(new Intent(getApplicationContext(), MainMenuActivity.class));\n return true;\n case R.id.mnuExit:\n finish();\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "@Override\n\t\t\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\t\t\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\t\t\tcase R.id.popup_reInfo:\n\t\t\t\t\t\t\tmainAct.ResetInfo(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase R.id.popup_upload:\n\t\t\t\t\t\t\tmainAct.addImage(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase R.id.popup_del:\n\t\t\t\t\t\t\tmainAct.delete(position);\n\t\t\t\t\t\t\tmainAct.UpdateList();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}", "public void openMenu() {\r\n\t\tmenu.click();\r\n\t}", "@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}", "@Override\r\n\tpublic boolean onMenuItemSelected(int featureId, MenuItem item) {\n\t\t\r\n\t\tint id = item.getItemId();\r\n\t\t\r\n\t\tif(id==R.id.close){\r\n\t\t//\tIntent intent = new Intent(ArticleLatestMoreDetailActivity.this, ArticleMainActivity.class);\r\n\t\t//\tstartActivity(intent);\r\n\t\t\tArticleLatestMoreDetailActivity.this.finish();\r\n\t\t}\r\n\t\t\r\n\t\treturn super.onMenuItemSelected(featureId, item);\r\n\t}", "void onChamaItemClicked(int position);", "@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 }", "public void menu() {\n\t\tstate.menu();\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //what to do when the menu item is selected:\n case R.id.itemGeo:\n startActivity(new Intent(this, MainActivity.class));\n finish();\n break;\n case R.id.itemSoccer:\n startActivity(new Intent(this, MainActivity.class));\n finish();\n break;\n case R.id.itemLyrics:\n startActivity(new Intent(this, MainActivity.class));\n finish();\n break;\n case R.id.itemAboutTheProject:\n Toast.makeText(this, \"This is the Deezer activity, written by Yashika\", Toast.LENGTH_SHORT).show();\n break;\n }\n return true;\n }", "public void mousePressed(MouseEvent e) {\n JMenu menu = (JMenu)menuItem;\n if (!menu.isEnabled())\n return;\n MenuSelectionManager manager = \n MenuSelectionManager.defaultManager();\n if(menu.isTopLevelMenu()) {\n if(menu.isSelected()) {\n manager.clearSelectedPath();\n } else {\n Container cnt = menu.getParent();\n if(cnt != null && cnt instanceof JMenuBar) {\n MenuElement me[] = new MenuElement[2];\n me[0]=(MenuElement)cnt;\n me[1]=menu;\n manager.setSelectedPath(me); } } }\n MenuElement selectedPath[] = manager.getSelectedPath();\n if (selectedPath.length > 0 && \n selectedPath[selectedPath.length-1] != menu.getPopupMenu()) {\n if(menu.isTopLevelMenu() || \n menu.getDelay() == 0) {\n appendPath(selectedPath, menu.getPopupMenu());\n } else {\n setupPostTimer(menu); } } }", "@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 super.onOptionsItemSelected(item);\n\n int id = item.getItemId();\n Log.d(\"menu check\",\"clicked: \"+id);\n Log.d(\"menu check\",\"doc id: \"+R.id.doc);\n Log.d(\"menu check\",\"stat id:\"+R.id.stat);\n //noinspection SimplifiableIfStatement\n switch(id){\n case R.id.doc: {\n startActivity(new Intent(BasicInfo.this, Doctor.class));\n finish();\n break;\n }\n case R.id.stat: {\n startActivity(new Intent(BasicInfo.this, LastStatus.class));\n break;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\r\n // TODO Auto-generated method stub\r\n return false;\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonMenu();\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n \n return super.onOptionsItemSelected(item);\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.dices) {\n\n Answers.getInstance().logContentView(new ContentViewEvent()\n .putContentName(\"Dados\")\n .putContentType(\"Package access from menu\"));\n\n Intent intent_dices=new Intent(this, MainDicesActivity.class);\n this.startActivity(intent_dices);\n\n } else if (id == R.id.voting) {\n\n Answers.getInstance().logContentView(new ContentViewEvent()\n .putContentName(\"Votaciones\")\n .putContentType(\"Package access from menu\"));\n\n Intent intent_voting=new Intent(this, ConfigVotingActivity.class);\n this.startActivity(intent_voting);\n\n } else if (id == R.id.acts) {\n\n Answers.getInstance().logContentView(new ContentViewEvent()\n .putContentName(\"Actas\")\n .putContentType(\"Package access from menu\"));\n\n Intent intent_acts=new Intent(this, MainActsActivity.class);\n this.startActivity(intent_acts);\n\n } else if (id == R.id.expenses) {\n\n Answers.getInstance().logContentView(new ContentViewEvent()\n .putContentName(\"Gastos\")\n .putContentType(\"Package access from menu\"));\n\n Intent intent_expenses=new Intent(this, MainExpensesActivity.class);\n this.startActivity(intent_expenses);\n }\n\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n\n }", "@Override\n public void onMenuClick() {\n Toast.makeText(SearchActivity_.this, \"Menu click\", Toast.LENGTH_LONG).show();\n }", "private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }", "public void theGameMenuClicked() {\n System.out.println(\"THE GAME (you just lost it)\");\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tswitch(id){\n\t\t\tcase R.id.calendar:\n\t\t\t\tIntent intent = new Intent(MainActivity.this,CalendarActivity.class);\n\t\t\t\t//intent.putExtra(\"account\", account); \n\t\t\t\tstartActivity(intent);\n\t\t\t\tbreak;\n\t\t\tcase R.id.weather:\n\t\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n //Handles item selection\n switch (item.getItemId()){\n case R.id.Quit:\n finish();\n return true;\n case R.id.About:\n DialogFragment aboutDlg = new aboutDialogue();\n aboutDlg.show(fmAboutDialogue, \"about_Dlg\");\n return true;\n case R.id.Map:\n Intent Map = new Intent(this, mapActivity.class);\n this.startActivity(Map);\n return true;\n case R.id.canvasDraw:\n Intent drawToCanvas = new Intent(this, drawToCanvas.class);\n this.startActivity(drawToCanvas);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.okay:\n if(mFragment.index < 2){\n mFragment.getNewSentence();\n }else{\n if(current_state < 2){\n Intent intent = new Intent();\n intent.setClass(this, TestConditionOrder.TESTCASE.get(testcase % 6).get(current_state+1));\n intent.putExtra(\"testcase\", testcase);\n intent.putExtra(\"current_state\", current_state + 1);\n startActivity(intent);\n }else{\n Intent intent = new Intent();\n intent.setClass(this, EndActivity.class);\n startActivity(intent);\n }\n }\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t\treturn onMenuItemSelected(item.getItemId());\r\n\t}", "@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 }", "@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\tpublic boolean onOptionsItemSelected(MenuItem item)\n\t{\n\t\tsuper.onOptionsItemSelected(item);\n\t\treturn visitor.handleMenuItemSelection(item);\n\t}", "private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }", "void clickItem(int uid);", "public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n return true;\n }else if (id == R.id.basic){\n Intent intent = new Intent(Extra.this, MainActivity.class);\n intent.putExtra(\"expr\", exprStr);\n startActivity(intent);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n\r\n //Icon +\r\n// if (id == R.id.menuAddWork) {\r\n// Intent i = new Intent(InterestedList.this, AddWork.class);\r\n// startActivity(i);\r\n// return true;\r\n// }\r\n\r\n // back page\r\n if (id == R.id.home) {\r\n System.out.print(\"Home id:\"+id);\r\n Intent myIntent = new Intent(getApplicationContext(), Home.class);\r\n startActivity(myIntent);\r\n return true;\r\n }\r\n\r\n //ไปผูกกับหน้า Navigation\r\n// if (id == R.id.iconHamburger) {\r\n// Intent i = new Intent(YourWorks.this, AddWork.class);\r\n// startActivity(i);\r\n// return true;\r\n// }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String name = navDrawerItems.get(position).getListItemName();\n // call a helper method to perform a corresponding action\n performActionOnNavDrawerItem(name);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t case R.id.createtest:\n\t createTest();\n\t return true;\n\t case R.id.details:\n\t \t GoToTestDetails();\n\t return true;\n\t case R.id.gomain:\n\t GoToMain();\n\t return true;\n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t }", "@Override\n public void OnItemClick(int position) {\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\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\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"vai ficar clikando ai a toa? PATETA\");\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View v){\n Intent intent = new Intent(MainMenu.this, basketballMenu.class);\n startActivity(intent);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.menu_star) {\n Toast.makeText(this,\"click star!\",Toast.LENGTH_SHORT).show();\n return true;\n } if (id == R.id.menu_search) {\n Toast.makeText(this,\"click search!\",Toast.LENGTH_SHORT).show();\n return true;\n } else if(id == android.R.id.home){\n mDrawerLayout.openDrawer(GravityCompat.START);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmenu.toggle();\r\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String Selecteditem = itemname[+position];\n if(Selecteditem.equals(\"Usage Monitor\")){\n Intent appInfo = new Intent(AP_Menu.this, ActivityMain.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"Data Sniffer\")){\n Intent appInfo = new Intent(AP_Menu.this, ApplicationListDataSniff.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"Log Manager\")){\n Intent appInfo = new Intent(AP_Menu.this, CallLogger.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"Task Manager\")){\n Intent appInfo = new Intent(AP_Menu.this, AndroidTaskManager.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"Version Updates\")){\n Intent appInfo = new Intent(AP_Menu.this, ApkListActivity.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"Frames Calculation\")){\n Intent appInfo = new Intent(AP_Menu.this, MaxFPSActivity.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"Battery Radar\")){\n Intent appInfo = new Intent(AP_Menu.this, BatteryTop.class);\n startActivity(appInfo);\n }\n else if(Selecteditem.equals(\"App Advisor\")){\n Intent appInfo = new Intent(AP_Menu.this, PowerManagerActivity.class);\n startActivity(appInfo);\n }\n\n }" ]
[ "0.8007629", "0.7905741", "0.7901007", "0.77183115", "0.7563516", "0.73591375", "0.7223294", "0.7125908", "0.709943", "0.7026945", "0.7025828", "0.70068663", "0.70068663", "0.69256186", "0.6909825", "0.6896212", "0.6873794", "0.68727213", "0.68041337", "0.67769766", "0.6754214", "0.6745543", "0.67339355", "0.67195123", "0.6719196", "0.67146635", "0.67112094", "0.67075366", "0.66869104", "0.66596735", "0.66596735", "0.66596735", "0.66596735", "0.66596735", "0.66596735", "0.66538775", "0.66489756", "0.6639881", "0.6627099", "0.66270757", "0.66221964", "0.66143745", "0.65800315", "0.6579687", "0.6576166", "0.65724385", "0.6570711", "0.6565271", "0.6564827", "0.6564605", "0.65537447", "0.6551279", "0.6540944", "0.6528712", "0.6518537", "0.65123665", "0.6511842", "0.65038115", "0.65021634", "0.65021634", "0.65021056", "0.6497376", "0.6491408", "0.6482388", "0.64716107", "0.6471257", "0.6461537", "0.64615256", "0.6452646", "0.64340633", "0.64250666", "0.64221585", "0.64160866", "0.64093274", "0.64069766", "0.6404033", "0.6399678", "0.6399678", "0.6399678", "0.6399678", "0.6399678", "0.6399678", "0.6399678", "0.6399678", "0.6399678", "0.63984066", "0.63973945", "0.6397373", "0.63971037", "0.63943666", "0.63884985", "0.6381588", "0.6379311", "0.63705254", "0.63704634", "0.6369067", "0.6363745", "0.63632196", "0.6363055", "0.63629943", "0.63625544" ]
0.0
-1
Called when activity state should be temporarily saved, for example when activity is about to be killed in order to retrieve system resources
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putSerializable(ReportPeer.KEY_ID, mRowId); outState.putSerializable(ReportPeer.KEY_TASK_ID, mTaskId); outState.putSerializable(ReportPeer.KEY_DATE, mCalendar); // We don't need to save form values because this is handled // automatically for every View object }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveAppState(Context context) {\n LogHelper.v(LOG_TAG, \"Saving state.\");\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n Bundle saveState = createSaveState();\n\n onSaveControllerState(saveState);\n\n // crash recovery manages all save & restore state\n mCrashRecoveryHandler.writeState(saveState);\n mSettings.setLastRunPaused(true);\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n currentStateSaveToSharedPref();\n }", "@Override\n\tprotected void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t\tLog.e(\"mainactivity\", \"onsaveinsstancestate\");\n\n\t}", "void save() {\r\n if (actionCompleted) {\r\n forget();\r\n } else {\r\n AccountSettings.stateStored = new Bundle();\r\n save(AccountSettings.stateStored);\r\n }\r\n }", "public void onActivitySaveState(Bundle bundle) {\n if (currentScreen != null) {\n currentScreen.onActivitySaveState(bundle);\n }\n }", "@Override\n\tprotected void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t\tLog.v(\"save\", \"here I come :) \");\n\t}", "@Override()\n protected void onSaveInstanceState(final Bundle state)\n {\n logEnter(LOG_TAG, \"onSaveInstanceState\", state);\n\n saveState(state);\n }", "@Override\n\tpublic void onMySaveInstanceState(Bundle outState) {\n\t\t\n\t}", "@Override\n\tpublic void onMySaveInstanceState(Bundle outState) {\n\t\t\n\t}", "@Override\r\n\tprotected void onSaveInstanceState(Bundle outState) {\n\t}", "public void saveState() { }", "@Override\n protected void onCreate(Bundle pSavedInstanceState) {\n\n if (activitiesLaunched.incrementAndGet() > 1) { finish(); }\n\n super.onCreate(pSavedInstanceState);\n\n serviceIntent = new Intent(this, TallyDeviceService.class);\n\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n }", "@Override\n\tprotected void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t\tLog.v(TAG, \"onSaveInstanceState()\");\n\t}", "protected void onBSSaveInstanceState(Bundle outState) {\n\n }", "public void testCantSaveStateLaunchAndBackground() throws Exception {\n if (!supportsCantSaveState()) {\n return;\n }\n\n final Intent activityIntent = new Intent();\n activityIntent.setPackage(CANT_SAVE_STATE_1_PACKAGE_NAME);\n activityIntent.setAction(Intent.ACTION_MAIN);\n activityIntent.addCategory(Intent.CATEGORY_LAUNCHER);\n activityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n final Intent homeIntent = new Intent();\n homeIntent.setAction(Intent.ACTION_MAIN);\n homeIntent.addCategory(Intent.CATEGORY_HOME);\n homeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n ActivityManager am = mContext.getSystemService(ActivityManager.class);\n\n InstrumentationRegistry.getInstrumentation().getUiAutomation().grantRuntimePermission(\n STUB_PACKAGE_NAME, android.Manifest.permission.PACKAGE_USAGE_STATS);\n\n // We don't want to wait for the uid to actually go idle, we can force it now.\n String cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_1_PACKAGE_NAME;\n String result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n ApplicationInfo appInfo = mContext.getPackageManager().getApplicationInfo(\n CANT_SAVE_STATE_1_PACKAGE_NAME, 0);\n\n // This test is also using UidImportanceListener to make sure the correct\n // heavy-weight state is reported there.\n UidImportanceListener uidForegroundListener = new UidImportanceListener(mContext,\n appInfo.uid, ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND,\n WAIT_TIME);\n uidForegroundListener.register();\n UidImportanceListener uidBackgroundListener = new UidImportanceListener(mContext,\n appInfo.uid, ActivityManager.RunningAppProcessInfo.IMPORTANCE_CANT_SAVE_STATE-1,\n WAIT_TIME);\n uidBackgroundListener.register();\n\n WatchUidRunner uidWatcher = new WatchUidRunner(getInstrumentation(), appInfo.uid,\n WAIT_TIME);\n\n try {\n // Start the heavy-weight app, should launch like a normal app.\n mContext.startActivity(activityIntent);\n\n // Wait for process state to reflect running activity.\n uidForegroundListener.waitForValue(\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND,\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND);\n assertEquals(ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND,\n am.getPackageImportance(CANT_SAVE_STATE_1_PACKAGE_NAME));\n\n // Also make sure the uid state reports are as expected.\n uidWatcher.waitFor(WatchUidRunner.CMD_ACTIVE, null);\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_TOP);\n\n // Now go to home, leaving the app. It should be put in the heavy weight state.\n mContext.startActivity(homeIntent);\n\n // Wait for process to go down to background heavy-weight.\n uidBackgroundListener.waitForValue(\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_CANT_SAVE_STATE,\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_CANT_SAVE_STATE);\n assertEquals(ActivityManager.RunningAppProcessInfo.IMPORTANCE_CANT_SAVE_STATE,\n am.getPackageImportance(CANT_SAVE_STATE_1_PACKAGE_NAME));\n\n uidWatcher.expect(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_HEAVY_WEIGHT);\n\n // While in background, should go in to normal idle state.\n // Force app to go idle now\n cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_1_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n uidWatcher.expect(WatchUidRunner.CMD_IDLE, null);\n\n // Switch back to heavy-weight app to see if it correctly returns to foreground.\n mContext.startActivity(activityIntent);\n\n // Wait for process state to reflect running activity.\n uidForegroundListener.waitForValue(\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND,\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND);\n assertEquals(ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND,\n am.getPackageImportance(CANT_SAVE_STATE_1_PACKAGE_NAME));\n\n // Also make sure the uid state reports are as expected.\n uidWatcher.waitFor(WatchUidRunner.CMD_ACTIVE, null);\n uidWatcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_TOP);\n\n waitForAppFocus(CANT_SAVE_STATE_1_PACKAGE_NAME, WAIT_TIME);\n\n // Exit activity, check to see if we are now cached.\n getInstrumentation().getUiAutomation().performGlobalAction(\n AccessibilityService.GLOBAL_ACTION_BACK);\n\n // Wait for process to become cached\n uidBackgroundListener.waitForValue(\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_CACHED,\n ActivityManager.RunningAppProcessInfo.IMPORTANCE_CACHED);\n assertEquals(ActivityManager.RunningAppProcessInfo.IMPORTANCE_CACHED,\n am.getPackageImportance(CANT_SAVE_STATE_1_PACKAGE_NAME));\n\n uidWatcher.expect(WatchUidRunner.CMD_CACHED, null);\n uidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_RECENT);\n\n // While in background, should go in to normal idle state.\n // Force app to go idle now\n cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_1_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n uidWatcher.expect(WatchUidRunner.CMD_IDLE, null);\n\n } finally {\n uidWatcher.finish();\n uidForegroundListener.unregister();\n uidBackgroundListener.unregister();\n }\n }", "private void saveState() {\n SharedPreferences prefs = getPreferences(MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n\n // Store our count..\n editor.putInt(\"count\", this._tally);\n\n // Save changes\n editor.commit();\n }", "@Override\n\tpublic void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t\tLog.i(TAG, \"onSaveInstanceState\");\n\t}", "@Override\n\tpublic void onSaveInstanceState(Bundle outState) {\n\t}", "@Override\n\tpublic void onSaveInstanceState(Bundle savedInstanceState) {\n\n\t\tsuper.onSaveInstanceState(savedInstanceState);\n\n\t\t/* save variables */\n\t\tsavedInstanceState.putLong(\"NumberOfSignalStrengthUpdates\",\n\t\t\t\tNumberOfSignalStrengthUpdates);\n\n\t\tsavedInstanceState.putLong(\"LastCellId\", LastCellId);\n\t\tsavedInstanceState.putLong(\"NumberOfCellChanges\", NumberOfCellChanges);\n\n\t\tsavedInstanceState.putLong(\"LastLacId\", LastLacId);\n\t\tsavedInstanceState.putLong(\"NumberOfLacChanges\", NumberOfLacChanges);\n\n\t\tsavedInstanceState.putLongArray(\"PreviousCells\", PreviousCells);\n\t\tsavedInstanceState.putInt(\"PreviousCellsIndex\", PreviousCellsIndex);\n\t\tsavedInstanceState.putLong(\"NumberOfUniqueCellChanges\",\n\t\t\t\tNumberOfUniqueCellChanges);\n\n\t\tsavedInstanceState.putBoolean(\"outputDebugInfo\", outputDebugInfo);\n\n\t\t/* save the trace data still in the write buffer into a file */\n\t\tsaveDataToFile(FileWriteBufferStr, \"---in save instance, \"\n\t\t\t\t+ DateFormat.getTimeInstance().format(new Date()) + \"\\r\\n\",\n\t\t\t\tcellLogFilename);\n\t\tFileWriteBufferStr = \"\";\n\n\t}", "@Override\n public void onSaveInstanceState(Bundle savedInstanceState)\n {\n savedInstanceState.putIntArray(\"board\", tttGame.getBoard());\n savedInstanceState.putBoolean(\"turn\", tttGame.getTurn());\n savedInstanceState.putBoolean(\"mode\", tttGame.getAIMode());\n\n savedInstanceState.putInt(\"p1Count\", pOneCounter);\n savedInstanceState.putInt(\"p2Count\", pTwoCounter);\n savedInstanceState.putInt(\"pAICount\",pAICounter);\n savedInstanceState.putInt(\"tieCount\", tieCounter);\n\n boolean[] enabled = getState();\n savedInstanceState.putBooleanArray(\"state\", enabled);\n }", "@Override\r\n public void onSaveInstanceState(Bundle outState) {\r\n super.onSaveInstanceState(outState);\r\n // Save Instance State here\r\n }", "@Override\r\n public void onSaveInstanceState(Bundle outState) {\r\n super.onSaveInstanceState(outState);\r\n // Save Instance State here\r\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n Log.i(TAG, \"onSaveInstanceState()\");\n super.onSaveInstanceState(outState);\n }", "public void onRestorePendingState() {\n }", "@Override\n protected void onPause() {\n super.onPause();\n\n // write to the database\n DatabaseManager db = new DatabaseManager();\n db.writeStateToDatabase();\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n Session currentSession = sessionTracker.getSession();\n Session.saveSession(currentSession, outState);\n outState.putBoolean(SESSION_IS_ACTIVE_KEY, sessionTracker.isTrackingActiveSession());\n }", "public void saveState() {\n\t\tsuper.saveState();\n\t}", "@Override\r\n\tpublic void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\r\n\t}", "@Override\r\n\tprotected void onSaveInstanceState(Bundle savedInstanceState) {\n\t\tsuper.onSaveInstanceState(savedInstanceState);\r\n\t}", "@Override\n public void onActivitySaveInstanceState(@NonNull final Activity activity, final Bundle outState) {\n if (!isAccessToLocationAllowed()) return;\n\n final LocationClient locationClient = getLocationClient();\n if (locationClient != null) locationClient.onSaveInstanceState(activity, outState);\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n outState.putBoolean(\"AppRunning\",running);\n outState.putBoolean(\"Latest\",latestOp);\n outState.putBoolean(\"Started\",started);\n outState.putInt(\"Seconds\",sec);\n outState.putInt(\"Score\",score);\n outState.putInt(\"Total\",total);\n }", "@Override\n\tprotected void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t}", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n // Save Instance State here\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n // Save Instance State here\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n // Save Instance State here\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n // Save Instance State here\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n // Save Instance State here\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n // Save Instance State here\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n // Save Instance State here\n }", "@Override\n\tprotected void onPause() {\n\t super.onPause();\n\t this.saveInFile();\n\t}", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n uiHelper.onSaveInstanceState(outState);\n }", "@Override\n public void onResume() {\n \tsuper.onResume();\n \tLog.i(\"ONRESUME\", \"ONRESUME\");\n \treloadSavedState();\n }", "@Override\n\tpublic void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t}", "@Override\r\n\tpublic void onSaveInstanceState(Bundle arg0) {\n\t}", "@Override\n\t\tpublic Parcelable saveState() {\n\t\t\treturn null;\n\t\t}", "protected void onSaveInstanceState(Bundle outState) {\n outState.putString(\"tab\", mTabHost.getCurrentTabTag());\n super.onSaveInstanceState(outState);\n }", "private void saveStateToArguments() {\n if (getView() != null)\n savedState = saveState();\n if (savedState != null) {\n Bundle b = getArguments();\n if (b != null)\n b.putBundle(\"internalSavedViewState8954201239547\", savedState);\n }\n }", "@Override\n\tpublic void onSaveInstanceState(Bundle savedInstanceState) {\n\t savedInstanceState.putBoolean(HAS_RUN, true);\t \n\t //savedInstanceState.putParcelable(MODEL_DATA, dS);\n\t Log.i(\"MAIN\",\"Saved instances\");\n\t // Always call the superclass so it can save the view hierarchy state\n\t super.onSaveInstanceState(savedInstanceState);\n\t}", "@Override\n public void onPause() {\n \t\t//Save settings Enabled, Alarm Hour, Alarm Minute\n SharedPreferences settings = getSharedPreferences(MainActivity.PREFS_NAME, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(MainActivity.ALARM_ENABLED, AlarmEnabled);\n editor.putInt(MainActivity.SNOOZE_MINUTE, SnoozeMin);\n \n //Commit the edits\n editor.commit();\n \n super.onPause();\n }", "public void saveState() \n\t{\n\t\tsuper.saveState();\n\t}", "@Override\n\tprotected void onPause() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onPause();\n\n\t\tsavePreferences();\n\t}", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n }", "@Override\r\n protected void onSaveInstanceState(Bundle outState) {\r\n super.onSaveInstanceState(outState);\r\n\r\n String stateSaveHome = home.getText().toString();\r\n outState.putString(\"save_state_home\", stateSaveHome);\r\n\r\n String stateSaveVisitor = visitor.getText().toString();\r\n outState.putString(\"save_state_visitor\", stateSaveVisitor);\r\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n }", "public void onSaveInstanceState(Bundle bundle) {\n PackageManagerActivity.super.onSaveInstanceState(bundle);\n bundle.putStringArrayList(\"packages\", this.g);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (savedInstanceState != null) {\n // Restore Instance State here\n }\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (savedInstanceState != null) {\n // Restore Instance State here\n }\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (savedInstanceState != null) {\n // Restore Instance State here\n }\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n if (savedInstanceState != null) {\n // Restore Instance State here\n }\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n if (mActivatedPosition != ListView.INVALID_POSITION) {\n // Serialize and persist the activated item position.\n outState.putInt(STATE_ACTIVATED_POSITION, mActivatedPosition);\n }\n }", "@Override\n public void onSaveInstanceState(Bundle savedInstanceState) {\n super.onSaveInstanceState(savedInstanceState);\n\n savedInstanceState.putBoolean(\"renewBoolean\", false);\n savedInstanceState.putDouble(\"myDouble\", 1.9);\n savedInstanceState.putInt(\"MyInt\", 1);\n savedInstanceState.putString(\"MyString\", \"Welcome back to Android\");\n // etc.\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n // just have the View's thread save its state into our Bundle\n super.onSaveInstanceState(outState);\n if(mSensorRunning == true){\n \tmSensorManager.unregisterListener(mySensorEventListener);\n \tmSensorRunning = false;\n }\n // mRtypeThread.saveState(outState);\n //Log.d(this.getClass().getName(), \"SIS called\");\n }", "@Override\r\n\tprotected void onSaveInstanceState(Bundle outState) {\n\t\tif (outState != null) {\r\n\t\t\toutState.putString(\"sCameraFilename\", sCameraFilename);\r\n\t\t\toutState.putSerializable(\"fCurrentFile\", fCurrentFile);\r\n\t\t\tPalmchatLogUtils.println(\"--cfd onSaveInstanceState sCameraFilename =\" + sCameraFilename);\r\n\t\t}\r\n\t\t\r\n\t\tsuper.onSaveInstanceState(outState);\r\n\t}", "@Override\n\tpublic void onSaveInstanceState(Bundle savedInstanceState) {\n super.onSaveInstanceState(savedInstanceState);\n\t}", "@Override\n public void onRebind(Intent intent) {\n System.out.print(\"ON REBIND\");\n //Restores Data after app kill\n mPrefs = getApplicationContext().getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n Gson gson = new Gson();\n\n String insidePlaceJson = mPrefs.getString(\"insidePlace\", null);\n String placeMovementJson = mPrefs.getString(\"placeMovement\", null);\n String insideOrganizationJson = mPrefs.getString(\"insideOrganization\", null);\n String organizationMovementJson = mPrefs.getString(\"organizationMovement\", null);\n\n if(insidePlace == null)\n insidePlace = gson.fromJson(insidePlaceJson,LatLngPlace.class);\n if(placeMovement == null)\n placeMovement = gson.fromJson(placeMovementJson, PlaceMovement.class);\n if(insideOrganization == null)\n insideOrganization = gson.fromJson(insideOrganizationJson, LatLngOrganization.class);\n if(organizationMovement == null)\n organizationMovement = gson.fromJson(organizationMovementJson, OrganizationMovement.class);\n\n Log.i(TAG, \"in onRebind()\");\n stopForeground(true);\n mChangingConfiguration = false;\n super.onRebind(intent);\n }", "@Override\n public void onSaveInstanceState( @NonNull Bundle outState ) {\n super.onSaveInstanceState( outState );\n mMap.onSaveInstanceState( outState );\n }", "@Override\n\tprotected void onDestroy() {\n\t\t\n\t\tsuper.onDestroy();\n\t\t\n\t\t// Log\n\t\tLog.d(\"TNActv.java\" + \"[\"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t+ \"]\", \"onDestroy()\");\n\t\t\n\t\t/*----------------------------\n\t\t * 2. move_mode => falsify\n\t\t\t----------------------------*/\n\t\tif (move_mode == true) {\n\t\t\t\n\t\t\tmove_mode = false;\n\t\t\t\n\t\t\t// Log\n\t\t\tLog.d(\"TNActv.java\" + \"[\"\n\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t\t+ \"]\", \"move_mode => Now false\");\n\t\t\t\n\t\t}//if (move_mode == true)\n\n\t\tSharedPreferences prefs = \n\t\t\t\tthis.getSharedPreferences(MainActv.prefName_tnActv, MODE_PRIVATE);\n\t\t\n\t\tSharedPreferences.Editor editor = prefs.edit();\n\n\t\teditor.clear();\n\t\teditor.commit();\n\t\t\n\t\t// Log\n\t\tLog.d(\"MainActv.java\" + \"[\"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t+ \"]\", \"Prefs cleared: \" + MainActv.prefName_tnActv);\n\n\t\t/*********************************\n\t\t * 3. History mode => Off\n\t\t *********************************/\n\t\tint current_move_mode = Methods.get_pref(\n\t\t\t\t\t\t\tthis, \n\t\t\t\t\t\t\tMainActv.prefName_mainActv, \n\t\t\t\t\t\t\tMainActv.prefName_mainActv_history_mode,\n\t\t\t\t\t\t\t-1);\n\t\t\n\t\tif (current_move_mode == MainActv.HISTORY_MODE_ON) {\n\t\t\t\n\t\t\tboolean result = Methods.set_pref(\n\t\t\t\t\tthis, \n\t\t\t\t\tMainActv.prefName_mainActv, \n\t\t\t\t\tMainActv.prefName_mainActv_history_mode,\n\t\t\t\t\tMainActv.HISTORY_MODE_OFF);\n\n\t\t\tif (result == true) {\n\t\t\t\t// Log\n\t\t\t\tLog.d(\"TNActv.java\"\n\t\t\t\t\t\t+ \"[\"\n\t\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t\t\t.getLineNumber() + \"]\", \"Pref set: \" + MainActv.HISTORY_MODE_OFF);\n\t\t\t} else {//if (result == true)\n\t\t\t\t// Log\n\t\t\t\tLog.d(\"TNActv.java\"\n\t\t\t\t\t\t+ \"[\"\n\t\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t\t\t.getLineNumber() + \"]\", \"Set pref => Failed\");\n\t\t\t\t\n\t\t\t}//if (result == true)\n\t\t\t\n\t\t}//if (current_move_mode == 1)\n\t\t\n\t}", "@Override\n protected void onPause() {\n super.onPause();\n saveToFile(StartingActivity.TEMP_SAVE_FILENAME);\n boardManager.setLastTime(stopTimer());\n System.out.println(\"pause: \" + boardManager.getLastTime());\n }", "public void testCantSaveStateLaunchAndSwitch() throws Exception {\n if (!supportsCantSaveState()) {\n return;\n }\n\n final Intent activity1Intent = new Intent();\n activity1Intent.setPackage(CANT_SAVE_STATE_1_PACKAGE_NAME);\n activity1Intent.setAction(Intent.ACTION_MAIN);\n activity1Intent.addCategory(Intent.CATEGORY_LAUNCHER);\n activity1Intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n final Intent activity2Intent = new Intent();\n activity2Intent.setPackage(CANT_SAVE_STATE_2_PACKAGE_NAME);\n activity2Intent.setAction(Intent.ACTION_MAIN);\n activity2Intent.addCategory(Intent.CATEGORY_LAUNCHER);\n activity2Intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n final Intent homeIntent = new Intent();\n homeIntent.setAction(Intent.ACTION_MAIN);\n homeIntent.addCategory(Intent.CATEGORY_HOME);\n homeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n ActivityManager am = mContext.getSystemService(ActivityManager.class);\n UiDevice device = UiDevice.getInstance(getInstrumentation());\n\n InstrumentationRegistry.getInstrumentation().getUiAutomation().grantRuntimePermission(\n STUB_PACKAGE_NAME, android.Manifest.permission.PACKAGE_USAGE_STATS);\n\n // We don't want to wait for the uid to actually go idle, we can force it now.\n String cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_1_PACKAGE_NAME;\n String result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_2_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n ApplicationInfo app1Info = mContext.getPackageManager().getApplicationInfo(\n CANT_SAVE_STATE_1_PACKAGE_NAME, 0);\n WatchUidRunner uid1Watcher = new WatchUidRunner(getInstrumentation(), app1Info.uid,\n WAIT_TIME);\n\n ApplicationInfo app2Info = mContext.getPackageManager().getApplicationInfo(\n CANT_SAVE_STATE_2_PACKAGE_NAME, 0);\n WatchUidRunner uid2Watcher = new WatchUidRunner(getInstrumentation(), app2Info.uid,\n WAIT_TIME);\n\n try {\n // Start the first heavy-weight app, should launch like a normal app.\n mContext.startActivity(activity1Intent);\n\n // Make sure the uid state reports are as expected.\n uid1Watcher.waitFor(WatchUidRunner.CMD_ACTIVE, null);\n uid1Watcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_TOP);\n\n // Now go to home, leaving the app. It should be put in the heavy weight state.\n mContext.startActivity(homeIntent);\n\n // Wait for process to go down to background heavy-weight.\n uid1Watcher.expect(WatchUidRunner.CMD_CACHED, null);\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_HEAVY_WEIGHT);\n\n // Start the second heavy-weight app, should ask us what to do with the two apps\n startActivityAndWaitForShow(activity2Intent);\n\n // First, let's try returning to the original app.\n maybeClick(device, new UiSelector().resourceId(\"android:id/switch_old\"));\n device.waitForIdle();\n\n // App should now be back in foreground.\n uid1Watcher.expect(WatchUidRunner.CMD_UNCACHED, null);\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_TOP);\n\n // Return to home.\n mContext.startActivity(homeIntent);\n uid1Watcher.expect(WatchUidRunner.CMD_CACHED, null);\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_HEAVY_WEIGHT);\n\n // Again try starting second heavy-weight app to get prompt.\n startActivityAndWaitForShow(activity2Intent);\n\n // Now we'll switch to the new app.\n maybeClick(device, new UiSelector().resourceId(\"android:id/switch_new\"));\n device.waitForIdle();\n\n // The original app should now become cached.\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_RECENT);\n\n // And the new app should start.\n uid2Watcher.waitFor(WatchUidRunner.CMD_ACTIVE, null);\n uid2Watcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uid2Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_TOP);\n\n // Make sure the original app is idle for cleanliness\n cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_1_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n uid1Watcher.expect(WatchUidRunner.CMD_IDLE, null);\n\n // Return to home.\n mContext.startActivity(homeIntent);\n uid2Watcher.waitFor(WatchUidRunner.CMD_CACHED, null);\n uid2Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_HEAVY_WEIGHT);\n\n // Try starting the first heavy weight app, but return to the existing second.\n startActivityAndWaitForShow(activity1Intent);\n maybeClick(device, new UiSelector().resourceId(\"android:id/switch_old\"));\n device.waitForIdle();\n uid2Watcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uid2Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_TOP);\n\n // Return to home.\n mContext.startActivity(homeIntent);\n uid2Watcher.waitFor(WatchUidRunner.CMD_CACHED, null);\n uid2Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_HEAVY_WEIGHT);\n\n // Again start the first heavy weight app, this time actually switching to it\n startActivityAndWaitForShow(activity1Intent);\n maybeClick(device, new UiSelector().resourceId(\"android:id/switch_new\"));\n device.waitForIdle();\n\n // The second app should now become cached.\n uid2Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_RECENT);\n\n // And the first app should start.\n uid1Watcher.waitFor(WatchUidRunner.CMD_ACTIVE, null);\n uid1Watcher.waitFor(WatchUidRunner.CMD_UNCACHED, null);\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_TOP);\n\n // Exit activity, check to see if we are now cached.\n waitForAppFocus(CANT_SAVE_STATE_1_PACKAGE_NAME, WAIT_TIME);\n getInstrumentation().getUiAutomation().performGlobalAction(\n AccessibilityService.GLOBAL_ACTION_BACK);\n uid1Watcher.expect(WatchUidRunner.CMD_CACHED, null);\n uid1Watcher.expect(WatchUidRunner.CMD_PROCSTATE, WatchUidRunner.STATE_CACHED_RECENT);\n\n // Make both apps idle for cleanliness.\n cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_1_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n cmd = \"am make-uid-idle \" + CANT_SAVE_STATE_2_PACKAGE_NAME;\n result = SystemUtil.runShellCommand(getInstrumentation(), cmd);\n\n } finally {\n uid2Watcher.finish();\n uid1Watcher.finish();\n }\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n outState.putBoolean(REQUEST_SERVICE_ON_NETWORK_RECONNECTED, requestLocationOnNetworkReconnected);\n outState.putString(LAST_ADDRESS_SAVE_KEY, mLastAddress);\n outState.putParcelable(LAST_LOCATION_SAVE_KEY, mLastLocation);\n super.onSaveInstanceState(outState);\n }", "@Override()\n protected void onCreate(final Bundle state)\n {\n logEnter(LOG_TAG, \"onCreate\", state);\n\n super.onCreate(state);\n\n final Intent i = getIntent();\n final Bundle extras = i.getExtras();\n restoreState(extras);\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n Log.d(TAG, \"onSaveInstanceState:method fYred\");\n outState.putInt(\"qestion We are on\", currentq);\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onPause() {\n SharedPreferences sharedPreferences = getSharedPreferences(MainActivity.sharedPreferencesKey,MODE_PRIVATE);\n SharedPreferences.Editor edit = sharedPreferences.edit();\n GlobalVariables globalVariables = GlobalVariables.getInstance();\n boolean gameStarted = globalVariables.getGameStarted();\n if (gameStarted) {\n try {\n String serializedGame = globalVariables.toString(\"\");\n edit.putString(\"game\", serializedGame);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n edit.commit();\n super.onPause();\n }", "protected void onSaveInstanceState(Bundle outState)\n {\n /* Use the bad budget application wide data object to get a hold of all the user's losses */\n BadBudgetData bbd = ((BadBudgetApplication) this.getApplication()).getBadBudgetUserData();\n List<MoneyLoss> losses = bbd.getLosses();\n\n for (MoneyLoss currLoss : losses)\n {\n String currFreqShortHand = frequencyViews.get(currLoss.expenseDescription()).getText().toString();\n Frequency currFrequency = BadBudgetApplication.freqFromShortHand(currFreqShortHand);\n outState.putSerializable(BadBudgetApplication.TOGGLED_FREQUENCY_PREFIX_KEY + currLoss.expenseDescription(), currFrequency);\n }\n\n //Keep track of what the total freq's was toggled to and also the budget's freq\n Frequency totalFreq = BadBudgetApplication.freqFromShortHand(this.totalFreqView.getText().toString());\n outState.putSerializable(BadBudgetApplication.TOTAL_FREQ_KEY, totalFreq);\n Frequency budgetFreq = BadBudgetApplication.freqFromShortHand(this.budgetFreqView.getText().toString());\n outState.putSerializable(BadBudgetApplication.BUDGET_TOTAL_FREQ_KEY, budgetFreq);\n }", "@Override\n public void onSaveInstanceState(Bundle savedInstanceState) {\n super.onSaveInstanceState(savedInstanceState);\n }", "public void onSaveInstanceState(Bundle bundle) {\n bundle.putSerializable(\"MARKLIST\", this.f5382B);\n bundle.putInt(\"save_state\", this.f5435p);\n }", "@Override\n\tprotected void onDestroy() {\n\t\t\n\t\tif(!isSave){\n\t\t\tMyDialog.saveTemp(this, Common.PATH);\n\t\t\tsuper.onDestroy();\n\t\t}else{\n\t\t\tsuper.onDestroy();\n\t\t}\n\t\t\n\t}", "@Override\n public void onSaveInstanceState (Bundle savedInstanceState){\n super.onSaveInstanceState(savedInstanceState);\n\n savedInstanceState.putBoolean(\"useGpu\", mUtilizzoGPU.isChecked());\n }", "public void onSaveInstanceState(Bundle bundle) {\n super.onSaveInstanceState(bundle);\n }", "public void onSaveInstanceState(Bundle bundle) {\n super.onSaveInstanceState(bundle);\n }", "public void onSaveInstanceState(Bundle bundle) {\n super.onSaveInstanceState(bundle);\n }", "@Override\n public void onSaveInstanceState(Bundle outState){\n // Save current booking times to outstate\n outState.putInt(BOOKING_HOUR_KEY, bookingHour);\n outState.putInt(BOOKING_MINUTE_KEY, bookingMinute);\n\n super.onSaveInstanceState(outState);\n }", "public void onSaveInstanceState(Bundle savedInstanceState) {\n savedInstanceState.putBoolean(REQUESTING_LOCATION_UPDATES_KEY, mRequestingLocationUpdates);\n savedInstanceState.putParcelable(LOCATION_KEY, mCurrentLocation);\n savedInstanceState.putString(LAST_UPDATED_TIME_STRING_KEY, mLastUpdateTime);\n super.onSaveInstanceState(savedInstanceState);\n }", "public void onSaveInstanceState(Bundle savedInstanceState) {\n savedInstanceState.putBoolean(REQUESTING_LOCATION_UPDATES_KEY, mRequestingLocationUpdates);\n savedInstanceState.putParcelable(LOCATION_KEY, mCurrentLocation);\n savedInstanceState.putString(LAST_UPDATED_TIME_STRING_KEY, mLastUpdateTime);\n super.onSaveInstanceState(savedInstanceState);\n }", "public void onSaveInstanceState(Bundle savedInstanceState) {\n savedInstanceState.putBoolean(REQUESTING_LOCATION_UPDATES_KEY, mRequestingLocationUpdates);\n savedInstanceState.putParcelable(LOCATION_KEY, mCurrentLocation);\n savedInstanceState.putString(LAST_UPDATED_TIME_STRING_KEY, mLastUpdateTime);\n super.onSaveInstanceState(savedInstanceState);\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n\n // store the page number that has been used in the last query\n outState.putInt(PAGE_NUMBER_KEY, pageNumberBeingQueried);\n outState.putParcelableArrayList(CACHED_MOVIE_LIST_KEY, cachedMovieData);\n // store the state (e.g. scroll position) of the layout\n outState.putParcelable(LINEAR_LAYOUT_MANAGER_KEY, recyclerView.getLayoutManager().onSaveInstanceState());\n outState.putBoolean(ACTIVITY_MODE_KEY, searchModeIsOn);\n // store the SearchView state (query submitted vs not)\n // before saving, check whether the query was not modified by the used after its submission\n if(!searchQueryToRestore.equals(searchQueryToListen)){\n searchQueryIsSubmitted = false;\n }\n outState.putBoolean(SEARCH_VIEW_MODE_KEY, searchQueryIsSubmitted);\n // store the search query (the one that was entered to a SearchView, but might not be submitted)\n outState.putString(SearchManager.QUERY, searchQueryToListen);\n // store the search query (the one that was submitted)\n outState.putString(SUBMITTED_SEARCH_QUERY_KEY, searchQuerySubmitted);\n }", "@Override\n public void saveState(Bundle outBundle) {\n }", "@SuppressWarnings(\"UnusedParameters\")\r\n private void onRestoreInstanceState(Bundle savedInstanceState) {\r\n // Restore Instance State here\r\n }", "@SuppressWarnings(\"UnusedParameters\")\r\n private void onRestoreInstanceState(Bundle savedInstanceState) {\r\n // Restore Instance State here\r\n }", "@Override\n protected void onPause() {\n super.onPause();\n Log.i(\"ActivityLifecycle\", getLocalClassName() + \"-onPause\");\n }", "private void persistData() {\n mSharedPref.storeLastScreen(SCREEN_NAME);\n }", "@Override\n\tpublic void onSaveInstanceState(Bundle savedInstanceState)\n\t{\n\t\tsuper.onSaveInstanceState(savedInstanceState);\n\n\t\tsavedInstanceState.putString(\"CurSearch\", mCurSearch);\n\t\tsavedInstanceState.putString(\"CurSearchNavi\", mCurSearchNavi);\n\t\tsavedInstanceState.putBoolean(\"ToNavi\", mToNavi);\n\t\tsavedInstanceState.putInt(\"ViewingItem\", mViewingItem);\n\t}", "@Override\n public void onBackPressed() {\n timesBackPressed++;\n if (timesBackPressed > 1) {\n currentStateSaveToSharedPref();\n finish();\n } else\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.leave_warning), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onRestoreInstanceState(Bundle outState) {\n super.onRestoreInstanceState(outState);\n currentStateRestoreFromSharedPref();\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n //outState.putInt(\"someVarA\", someVarA);\n //outState.putString(\"someVarB\", someVarB);\n }", "public void onDestroy() {\n super.onDestroy();\n PrefUtil.save((Context) ContextUtil.app, UserAction.Bluetooth_Check_Firmware_Update_Time, new DateUtil().getUnixTimestamp() + 600);\n }", "@Override\n\t protected void onSaveInstanceState(Bundle outState) {\n\t super.onSaveInstanceState(outState);\n\t // save the current data, for instance when changing screen orientation\n\t outState.putSerializable(\"dataset\", mDataset);\n\t outState.putSerializable(\"renderer\", mRenderer);\n\t outState.putSerializable(\"current_series\", mCurrentSeries);\n\t outState.putSerializable(\"current_renderer\", mCurrentRenderer);\n\t }", "@Override\n\tpublic void onSaveInstanceState(Bundle savedInstanceState) {\n\t\tsuper.onSaveInstanceState(savedInstanceState);\n\t\t\n\t\tsavedInstanceState.putInt(\"buttonCount\", buttonCount);\n\t\tsavedInstanceState.putIntegerArrayList(\"catCounters\", catCounters);\n\t\tsavedInstanceState.putStringArrayList(\"textArray\", textArray);\n\t\tsavedInstanceState.putString(\"layout_name\", layout_name);\n\t}" ]
[ "0.67530406", "0.6662421", "0.66080254", "0.6584345", "0.6580997", "0.65352005", "0.6497613", "0.6487939", "0.64595", "0.64595", "0.6410036", "0.6409229", "0.6394346", "0.6386798", "0.63754565", "0.6375364", "0.63706225", "0.6354891", "0.6351062", "0.634991", "0.6323928", "0.6305892", "0.6303282", "0.6303282", "0.62814873", "0.6280093", "0.6270274", "0.6267635", "0.62675005", "0.62497395", "0.62482184", "0.6243242", "0.6233706", "0.62285244", "0.62267417", "0.62267417", "0.62267417", "0.62267417", "0.62267417", "0.62267417", "0.62267417", "0.6214834", "0.6201354", "0.6193091", "0.6188625", "0.61837685", "0.618224", "0.6178044", "0.61601675", "0.6159956", "0.6147201", "0.61392367", "0.61296695", "0.6126847", "0.6126847", "0.60966796", "0.6096265", "0.60895866", "0.6088942", "0.6088942", "0.6088942", "0.6088942", "0.6077832", "0.60692096", "0.60559094", "0.60454714", "0.60450757", "0.60352725", "0.6033327", "0.60214967", "0.60154766", "0.60059947", "0.5993388", "0.5985895", "0.5985378", "0.59668374", "0.59611636", "0.5955842", "0.5950218", "0.59500957", "0.5948312", "0.5944755", "0.5944755", "0.5944755", "0.5941598", "0.59410655", "0.59410655", "0.59410655", "0.59352314", "0.5929464", "0.5925794", "0.5925794", "0.5924389", "0.59226215", "0.5916604", "0.59052235", "0.59038603", "0.59030837", "0.589721", "0.589402", "0.58885276" ]
0.0
-1
Fill form with data from the database
private void populateFields() { if (mReportCursor == null) { return; } Cursor c = mReportCursor; mValueText.setText(c.getString(c.getColumnIndexOrThrow(ReportPeer.KEY_VALUE))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void populateForm() {\n Part selectedPart = (Part) PassableData.getPartData();\n partPrice.setText(String.valueOf(selectedPart.getPrice()));\n partName.setText(selectedPart.getName());\n inventoryCount.setText(String.valueOf(selectedPart.getStock()));\n partId.setText(String.valueOf(selectedPart.getId()));\n maximumInventory.setText(String.valueOf(selectedPart.getMax()));\n minimumInventory.setText(String.valueOf(selectedPart.getMin()));\n\n if (PassableData.isOutsourced()) {\n Outsourced part = (Outsourced) selectedPart;\n variableTextField.setText(part.getCompanyName());\n outsourced.setSelected(true);\n\n } else if (!PassableData.isOutsourced()) {\n InHouse part = (InHouse) selectedPart;\n variableTextField.setText(String.valueOf(part.getMachineId()));\n inHouse.setSelected(true);\n }\n\n\n }", "public void fillForm() {\n\t\t// fills the name field with nameOfProject\n\t\tprojName.sendKeys(nameOfProject);\n\t\t// selects the first option from the 'Client partner' dropdown list\n\t\tSelect sel = new Select(clientList);\n\t\tsel.selectByIndex(1);\n\t\t// enters valid date data\n\t\tstartDate.sendKeys(\"06042018\");\n\t\tendDate.sendKeys(\"06052018\");\n\t}", "private void fetchData() {\n mFirstNameLabel = \"First name:\";\n mFirstNameValue = \"Taylor\";\n mSurnameLabel = \"Surname:\";\n mSurnameValue = \"Swift\";\n\n initFields();\n }", "public FormProduct() {\n initComponents();\n getData();\n }", "private void loadForm() {\n CodingProxy icd9 = problem.getIcd9Code();\n \n if (icd9 != null) {\n txtICD.setText(icd9.getProxiedObject().getCode());\n }\n \n String narr = problem.getProviderNarrative();\n \n if (narr == null) {\n narr = icd9 == null ? \"\" : icd9.getProxiedObject().getDisplay();\n }\n \n String probId = problem.getNumberCode();\n \n if (probId == null || probId.isEmpty()) {\n probId = getBroker().callRPC(\"BGOPROB NEXTID\", PatientContext.getActivePatient().getIdElement().getIdPart());\n }\n \n String pcs[] = probId.split(\"\\\\-\", 2);\n lblPrefix.setValue(pcs[0] + \" - \");\n txtID.setValue(pcs.length < 2 ? \"\" : pcs[1]);\n txtNarrative.setText(narr);\n datOnset.setValue(problem.getOnsetDate());\n \n if (\"P\".equals(problem.getProblemClass())) {\n radPersonal.setSelected(true);\n } else if (\"F\".equals(problem.getProblemClass())) {\n radFamily.setSelected(true);\n } else if (\"I\".equals(problem.getStatus())) {\n radInactive.setSelected(true);\n } else {\n radActive.setSelected(true);\n }\n \n int priority = NumberUtils.toInt(problem.getPriority());\n cboPriority.setSelectedIndex(priority < 0 || priority > 5 ? 0 : priority);\n loadNotes();\n }", "public View(String frmWel) {\n super(\"View Data\");\n initComponents();\n con=javaconnect.ConnecrDb();\n nameField.setText(frmWel);\n updateTable();\n \n }", "public form_for_bd() {\n initComponents();\n }", "private void initialize() {\r\n\t\tfrmTelaCadastro = new JFrame();\r\n\t\tfrmTelaCadastro.getContentPane().setBackground(Color.WHITE);\r\n\t\tfrmTelaCadastro.getContentPane().setLayout(null);\r\n\r\n\t\tconsultaagua = new CadastroAguaDAO();\r\n\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.setBounds(80, 24, 832, 94);\r\n\t\tpanel.setLayout(null);\r\n\t\tfrmTelaCadastro.getContentPane().add(panel);\r\n\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextField.setColumns(10);\r\n\t\ttextField.setBounds(64, 37, 242, 20);\r\n\t\tpanel.add(textField);\r\n\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextField_1.setColumns(10);\r\n\t\ttextField_1.setBounds(414, 34, 347, 20);\r\n\t\tpanel.add(textField_1);\r\n\r\n\t\ttextField_4 = new JTextField();\r\n\t\ttextField_4.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextField_4.setColumns(10);\r\n\t\ttextField_4.setBounds(105, 60, 112, 20);\r\n\t\tpanel.add(textField_4);\r\n\r\n\t\tlblNome = new JLabel(\"Nome:\");\r\n\t\tlblNome.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNome.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tlblNome.setBounds(10, 32, 65, 28);\r\n\t\tpanel.add(lblNome);\r\n\r\n\t\tlblEndereco = new JLabel(\"Endereco:\");\r\n\t\tlblEndereco.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tlblEndereco.setBounds(356, 29, 65, 28);\r\n\t\tpanel.add(lblEndereco);\r\n\r\n\t\tlblhidrometro = new JLabel(\"Hidr\\u00F4metro:\");\r\n\t\tlblhidrometro.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblhidrometro.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tlblhidrometro.setBounds(20, 55, 75, 28);\r\n\t\tpanel.add(lblhidrometro);\r\n\r\n\t\tJButton btnNewButton = new JButton(\"Consultar\");\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tList<CadastroAgua> cadagua = new ArrayList<CadastroAgua>();\r\n\r\n\t\t\t\tCadastroAgua c = new CadastroAgua();\r\n\t\t\t\tcadagua = consultaagua.getCadastroAgua(\"8\");\r\n\t\t\t\tfor (int i = 0; i < cadagua.size(); i++)\r\n\r\n\t\t\t\t{\r\n\t\t\t\t\tc = (CadastroAgua) cadagua.get(i);\r\n\r\n\t\t\t\t\ttextRGI.setText(c.getContaAguaRGI());\r\n\t\t\t\t\ttextGrupo.setText(c.getContaAguaGrupo());\r\n\t\t\t\t\ttextNConta.setText(c.getContaAguaNConta());\r\n\t\t\t\t\ttextGrupo.setText(c.getContaAguaGrupo());\r\n\t\t\t\t\ttextMesRef.setText(c.getContaAguaMesRef());\r\n\t\t\t\t\ttextTipoLig.setText(c.getContaAguaTipoLigacao());\r\n\t\t\t\t\ttextTipoFat.setText(c.getContaAguaTipoFaturamento());\r\n\t\t\t\t\ttextConsumo.setText(c.getContaAguaConsumo());\r\n\t\t\t\t\ttextDataAtual.setText(c.getContaAguaDataLeituraAtual());\r\n\t\t\t\t\ttextLeituraAtual.setText(c.getContaAguaLeituraAtual());\r\n\t\t\t\t\ttextDataAnterior.setText(c.getContaAguaDataLeituraAnterior());\r\n\t\t\t\t\ttextLeituraAnterior.setText(c.getContaAguaLeituraAnterior());\r\n\t\t\t\t\ttextObs.setText(c.getContaAguaObservacao());\r\n\t\t\t\t\ttxtValorAgua.setText(c.getContaAguaValorAgua());\r\n\t\t\t\t\ttxtValorEsgoto.setText(c.getContaAguaValorEsgoto());\r\n\t\t\t\t\ttextValorTotal.setText(c.getContaAguaValorTotal());\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton.setBounds(414, 65, 89, 23);\r\n\t\tpanel.add(btnNewButton);\r\n\r\n\t\ttabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\ttabbedPane.setBounds(80, 144, 832, 425);\r\n\t\tfrmTelaCadastro.getContentPane().add(tabbedPane);\r\n\r\n\t\tpanel1 = new JPanel();\r\n\t\ttabbedPane.addTab(\"Dados Conta\", null, panel1, null);\r\n\t\tpanel1.setLayout(null);\r\n\r\n\t\ttextNConta = new JTextField();\r\n\t\ttextNConta.setBounds(193, 54, 155, 20);\r\n\t\ttextNConta.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextNConta.setColumns(10);\r\n\t\tpanel1.add(textNConta);\r\n\r\n\t\tlblNDaConta = new JLabel(\"N\\u00BA da Conta:\");\r\n\t\tlblNDaConta.setBounds(215, 26, 97, 28);\r\n\t\tlblNDaConta.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNDaConta.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblNDaConta);\r\n\r\n\t\tlblGrupo = new JLabel(\"Grupo:\");\r\n\t\tlblGrupo.setBounds(358, 26, 97, 28);\r\n\t\tlblGrupo.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblGrupo.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblGrupo);\r\n\r\n\t\ttextGrupo = new JTextField();\r\n\t\ttextGrupo.setBounds(384, 54, 45, 20);\r\n\t\ttextGrupo.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextGrupo.setColumns(10);\r\n\t\tpanel1.add(textGrupo);\r\n\r\n\t\tlblCodIdentificador_3 = new JLabel(\"RGI:\");\r\n\t\tlblCodIdentificador_3.setBounds(52, 26, 97, 28);\r\n\t\tlblCodIdentificador_3.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblCodIdentificador_3.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblCodIdentificador_3);\r\n\r\n\t\ttextRGI = new JTextField();\r\n\t\ttextRGI.setBounds(30, 54, 155, 20);\r\n\t\ttextRGI.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextRGI.setColumns(10);\r\n\t\tpanel1.add(textRGI);\r\n\r\n\t\tlblMesRef = new JLabel(\"M\\u00EAs Refer\\u00EAncia:\");\r\n\t\tlblMesRef.setBounds(484, 26, 97, 28);\r\n\t\tlblMesRef.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblMesRef.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblMesRef);\r\n\r\n\t\ttextMesRef = new JTextField();\r\n\t\ttextMesRef.setBounds(455, 54, 155, 20);\r\n\t\ttextMesRef.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextMesRef.setColumns(10);\r\n\t\tpanel1.add(textMesRef);\r\n\r\n\t\tlblCodIdentificador_1 = new JLabel(\"Tipo de Liga\\u00E7\\u00E3o:\");\r\n\t\tlblCodIdentificador_1.setBounds(658, 26, 97, 28);\r\n\t\tlblCodIdentificador_1.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblCodIdentificador_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblCodIdentificador_1);\r\n\r\n\t\ttextTipoLig = new JTextField();\r\n\t\ttextTipoLig.setBounds(636, 54, 155, 20);\r\n\t\ttextTipoLig.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextTipoLig.setColumns(10);\r\n\t\tpanel1.add(textTipoLig);\r\n\r\n\t\tlblTipFat = new JLabel(\"Tipo de Faturamento:\");\r\n\t\tlblTipFat.setBounds(215, 100, 120, 28);\r\n\t\tlblTipFat.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblTipFat.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblTipFat);\r\n\r\n\t\ttextTipoFat = new JTextField();\r\n\t\ttextTipoFat.setBounds(198, 128, 155, 20);\r\n\t\ttextTipoFat.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextTipoFat.setColumns(10);\r\n\t\tpanel1.add(textTipoFat);\r\n\r\n\t\ttextConsumo = new JTextField();\r\n\t\ttextConsumo.setBounds(455, 128, 155, 20);\r\n\t\ttextConsumo.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextConsumo.setColumns(10);\r\n\t\tpanel1.add(textConsumo);\r\n\r\n\t\tlblConsumoM = new JLabel(\"Consumo m\\u00B3:\");\r\n\t\tlblConsumoM.setBounds(472, 100, 120, 28);\r\n\t\tlblConsumoM.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblConsumoM.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblConsumoM);\r\n\r\n\t\tlblLeitAtual = new JLabel(\"Leitura Atual:\");\r\n\t\tlblLeitAtual.setBounds(203, 223, 120, 28);\r\n\t\tlblLeitAtual.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblLeitAtual.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblLeitAtual);\r\n\r\n\t\ttextDataAtual = new JTextField();\r\n\t\ttextDataAtual.setBounds(312, 227, 120, 20);\r\n\t\ttextDataAtual.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextDataAtual.setColumns(10);\r\n\t\tpanel1.add(textDataAtual);\r\n\r\n\t\tJLabel lblData = new JLabel(\"Data\");\r\n\t\tlblData.setBounds(314, 185, 120, 28);\r\n\t\tlblData.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblData.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblData);\r\n\r\n\t\tJLabel lblApresentao = new JLabel(\"Apresenta\\u00E7\\u00E3o\");\r\n\t\tlblApresentao.setBounds(205, 185, 120, 28);\r\n\t\tlblApresentao.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblApresentao.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblApresentao);\r\n\r\n\t\tJSeparator separator = new JSeparator();\r\n\t\tseparator.setBounds(130, 202, 0, 35);\r\n\t\tpanel1.add(separator);\r\n\r\n\t\tJSeparator separator_1 = new JSeparator();\r\n\t\tseparator_1.setBounds(232, 214, 355, 2);\r\n\t\tpanel1.add(separator_1);\r\n\r\n\t\tJLabel lblLeitura = new JLabel(\"Leitura\");\r\n\t\tlblLeitura.setBounds(461, 185, 120, 28);\r\n\t\tlblLeitura.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblLeitura.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblLeitura);\r\n\r\n\t\tJLabel lblLeituraAnterior = new JLabel(\"Leitura Anterior:\");\r\n\t\tlblLeituraAnterior.setBounds(203, 250, 120, 28);\r\n\t\tlblLeituraAnterior.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblLeituraAnterior.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tpanel1.add(lblLeituraAnterior);\r\n\r\n\t\ttextDataAnterior = new JTextField();\r\n\t\ttextDataAnterior.setBounds(312, 254, 120, 20);\r\n\t\ttextDataAnterior.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextDataAnterior.setColumns(10);\r\n\t\tpanel1.add(textDataAnterior);\r\n\r\n\t\ttextLeituraAnterior = new JTextField();\r\n\t\ttextLeituraAnterior.setBounds(461, 254, 120, 20);\r\n\t\ttextLeituraAnterior.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextLeituraAnterior.setColumns(10);\r\n\t\tpanel1.add(textLeituraAnterior);\r\n\r\n\t\ttextLeituraAtual = new JTextField();\r\n\t\ttextLeituraAtual.setBounds(461, 227, 120, 20);\r\n\t\ttextLeituraAtual.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextLeituraAtual.setColumns(10);\r\n\t\tpanel1.add(textLeituraAtual);\r\n\r\n\t\tlblObservacao = new JLabel(\"Observa\\u00E7\\u00E3o:\");\r\n\t\tlblObservacao.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblObservacao.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tlblObservacao.setBounds(358, 288, 120, 28);\r\n\t\tpanel1.add(lblObservacao);\r\n\r\n\t\ttextObs = new JTextField();\r\n\t\ttextObs.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextObs.setColumns(10);\r\n\t\ttextObs.setBounds(35, 314, 767, 20);\r\n\t\tpanel1.add(textObs);\r\n\r\n\t\tJSeparator separator_2 = new JSeparator();\r\n\t\tseparator_2.setBounds(444, 211, 0, 78);\r\n\t\tpanel1.add(separator_2);\r\n\t\tJLabel lblValorAgua = new JLabel(\"Valor \\u00C1gua\");\r\n\t\tlblValorAgua.setBounds(130, 345, 149, 28);\r\n\t\tpanel1.add(lblValorAgua);\r\n\t\tlblValorAgua.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblValorAgua.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\ttxtValorAgua = new JTextField();\r\n\t\ttxtValorAgua.setBounds(151, 366, 106, 20);\r\n\t\tpanel1.add(txtValorAgua);\r\n\t\ttxtValorAgua.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttxtValorAgua.setColumns(10);\r\n\t\ttxtValorEsgoto = new JTextField();\r\n\t\ttxtValorEsgoto.setBounds(352, 366, 106, 20);\r\n\t\tpanel1.add(txtValorEsgoto);\r\n\t\ttxtValorEsgoto.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttxtValorEsgoto.setColumns(10);\r\n\t\tJLabel lblValorEsgoto = new JLabel(\"Valor Esgoto\");\r\n\t\tlblValorEsgoto.setBounds(331, 345, 149, 28);\r\n\t\tpanel1.add(lblValorEsgoto);\r\n\t\tlblValorEsgoto.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblValorEsgoto.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\t\tJLabel lblValorTotal = new JLabel(\"Valor Total\");\r\n\t\tlblValorTotal.setBounds(524, 345, 149, 28);\r\n\t\tpanel1.add(lblValorTotal);\r\n\t\tlblValorTotal.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblValorTotal.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\r\n\r\n\t\ttextValorTotal = new JTextField();\r\n\t\ttextValorTotal.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextValorTotal.setColumns(10);\r\n\t\ttextValorTotal.setBounds(547, 366, 106, 20);\r\n\t\tpanel1.add(textValorTotal);\r\n\r\n\t\tJButton btnCadastro = new JButton(\"Cadastro\");\r\n\t\tbtnCadastro.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t\tCadastroAgua cadaguadao = new CadastroAgua();\r\n\r\n\t\t\t\tcadaguadao.setContaAguaRGI(textRGI.getText());\r\n\t\t\t\tcadaguadao.setContaAguaNConta(textNConta.getText());\r\n\t\t\t\tcadaguadao.setContaAguaGrupo(textGrupo.getText());\r\n\t\t\t\tcadaguadao.setContaAguaMesRef(textMesRef.getText());\r\n\t\t\t\tcadaguadao.setContaAguaTipoLigacao(textTipoLig.getText());\r\n\t\t\t\tcadaguadao.setContaAguaTipoFaturamento(textTipoFat.getText());\r\n\t\t\t\tcadaguadao.setContaAguaConsumo(textConsumo.getText());\r\n\t\t\t\tcadaguadao.setContaAguaDataLeituraAtual(textDataAtual.getText());\r\n\t\t\t\tcadaguadao.setContaAguaLeituraAtual(textLeituraAtual.getText());\r\n\t\t\t\tcadaguadao.setContaAguaDataLeituraAnterior(textDataAnterior.getText());\r\n\t\t\t\tcadaguadao.setContaAguaLeituraAnterior(textLeituraAnterior.getText());\r\n\t\t\t\tcadaguadao.setContaAguaObservacao(textObs.getText());\r\n\t\t\t\tcadaguadao.setContaAguaValorAgua(txtValorAgua.getText());\r\n\t\t\t\tcadaguadao.setContaAguaValorEsgoto(txtValorEsgoto.getText());\r\n\t\t\t\tcadaguadao.setContaAguaValorTotal(textValorTotal.getText());\r\n\r\n\t\t\t\tif ((textRGI.getText().isEmpty()) || (textNConta.getText().isEmpty()) || (textGrupo.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textMesRef.getText().isEmpty()) || (textTipoLig.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textTipoFat.getText().isEmpty()) || (textConsumo.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textDataAtual.getText().isEmpty()) || (textLeituraAtual.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textDataAnterior.getText().isEmpty()) || (textLeituraAnterior.getText().isEmpty())\r\n\t\t\t\t\t\t|| (textObs.getText().isEmpty()) || (txtValorAgua.getText().isEmpty())\r\n\t\t\t\t\t\t|| (txtValorEsgoto.getText().isEmpty()) || (textValorTotal.getText().isEmpty())) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Os campos não podem estar vazios\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\r\n\t\t\t\t\tCadastroAguaDAO cadagua = new CadastroAguaDAO();\r\n\t\t\t\t\tcadagua.adiciona(cadaguadao);\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Conta registrada com sucesso! \");\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttextRGI.setText(\"\");\r\n\t\t\t\ttextNConta.setText(\"\");\r\n\t\t\t\ttextGrupo.setText(\"\");\r\n\t\t\t\ttextMesRef.setText(\"\");\r\n\t\t\t\ttextTipoLig.setText(\"\");\r\n\t\t\t\ttextTipoFat.setText(\"\");\r\n\t\t\t\ttextConsumo.setText(\"\");\r\n\t\t\t\ttextDataAtual.setText(\"\");\r\n\t\t\t\ttextLeituraAtual.setText(\"\");\r\n\t\t\t\ttextDataAnterior.setText(\"\");\r\n\t\t\t\ttextLeituraAnterior.setText(\"\");\r\n\t\t\t\ttextObs.setText(\"\");\r\n\t\t\t\ttxtValorAgua.setText(\"\");\r\n\t\t\t\ttxtValorEsgoto.setText(\"\");\r\n\t\t\t\ttextValorTotal.setText(\"\");\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtnCadastro.setBounds(423, 623, 107, 23);\r\n\t\tfrmTelaCadastro.getContentPane().add(btnCadastro);\r\n\r\n\t\tJLabel lblNewLabel_1_1 = new JLabel(\"New label\");\r\n\t\tlblNewLabel_1_1.setIcon(new ImageIcon(\"C:\\\\Users\\\\assen\\\\eclipse-workspace\\\\TecSus\\\\img\\\\IconAgua.png\"));\r\n\t\tlblNewLabel_1_1.setBounds(10, 11, 30, 30);\r\n\t\tfrmTelaCadastro.getContentPane().add(lblNewLabel_1_1);\r\n\r\n\t\tJButton lblNewLabel_3 = new JButton(\"New label\");\r\n\t\tlblNewLabel_3.addActionListener(new ActionListener() {\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tMenuEnergia window = new MenuEnergia();\r\n\t\t\t\twindow.frmMenuEnergia.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tlblNewLabel_3.setIcon(new ImageIcon(\"C:\\\\Users\\\\assen\\\\eclipse-workspace\\\\TecSus\\\\img\\\\IconReturn.png\"));\r\n\t\tlblNewLabel_3.setForeground(Color.WHITE);\r\n\t\tlblNewLabel_3.setBackground(Color.WHITE);\r\n\t\tlblNewLabel_3.setBounds(31, 611, 60, 54);\r\n\t\tfrmTelaCadastro.getContentPane().add(lblNewLabel_3);\r\n\t\ttextField_5 = new JTextField();\r\n\t\ttextField_5.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttextField_5.setColumns(10);\r\n\t\ttextField_5.setBounds(292, 702, 106, 20);\r\n\t\tfrmTelaCadastro.getContentPane().add(textField_5);\r\n\t\tfrmTelaCadastro.setResizable(false);\r\n\t\tfrmTelaCadastro.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tfrmTelaCadastro.setForeground(Color.WHITE);\r\n\t\tfrmTelaCadastro.setTitle(\"TELA CADASTRO \\u00C1GUA\");\r\n\t\tfrmTelaCadastro.setBounds(100, 100, 960, 720);\r\n\t\tfrmTelaCadastro.setLocationRelativeTo(null);\r\n\r\n\t\timageIcon = new ImageIcon(\"img/IconAgua.png\");\r\n\r\n\t}", "private void fillExistingCustomer() {\n idField.setText(String.valueOf(existingCustomer.getCustomerID()));\n nameField.setText(existingCustomer.getCustomerName());\n String[] splitAddress = existingCustomer.getAddress().split(\", \");\n addressField.setText(splitAddress[0]);\n if ( splitAddress.length > 1 ) {\n cityField.setText(splitAddress[1]);\n }\n postalField.setText(existingCustomer.getPostalCode());\n phoneField.setText(existingCustomer.getPhone());\n\n FirstLevelDivision division = getDivisionByID(existingCustomer.getDivisionID());\n divisionComboBox.getSelectionModel().select(division);\n countryComboBox.getSelectionModel().select(getCountryByID(division.getCountryID()));\n }", "private void loadForm() {\n service.getReasons(refusalReasons);\n service.getVacEligibilty(vacElig);\n service.getVacSites(vacSites);\n service.getReactions(vacReactions);\n service.getOverrides(vacOverrides);\n updateComboValues();\n \n selPrv = \"\";\n selLoc = \"\";\n \n //datGiven.setDateConstraint(new SimpleDateConstraint(SimpleDateConstraint.NO_NEGATIVE, DateUtil.addDays(patient.getBirthDate(), -1, true), null, BgoConstants.TX_BAD_DATE_DOB));\n datGiven.setDateConstraint(getConstraintDOBDate());\n datEventDate.setConstraint(getConstraintDOBDate());\n radFacility.setLabel(service.getParam(\"Caption-Facility\", \"&Facility\"));\n if (immunItem != null) {\n \n txtVaccine.setValue(immunItem.getVaccineName());\n txtVaccine.setAttribute(\"ID\", immunItem.getVaccineID());\n txtVaccine.setAttribute(\"DATA\", immunItem.getVaccineID() + U + immunItem.getVaccineName());\n setEventType(immunItem.getEventType());\n \n radRefusal.setDisabled(!radRefusal.isChecked());\n radHistorical.setDisabled(!radHistorical.isChecked());\n radCurrent.setDisabled(!radCurrent.isChecked());\n \n visitIEN = immunItem.getVisitIEN();\n if (immunItem.getProvider() != null) {\n txtProvider.setText(FhirUtil.formatName(immunItem.getProvider().getName()));\n txtProvider.setAttribute(\"ID\", immunItem.getProvider().getId().getIdPart());\n selPrv = immunItem.getProvider().getId().getIdPart() + U + U + immunItem.getProvider().getName();\n }\n switch (immunItem.getEventType()) {\n case REFUSAL:\n ListUtil.selectComboboxItem(cboReason, immunItem.getReason());\n txtComment.setText(immunItem.getComment());\n datEventDate.setValue(immunItem.getDate());\n break;\n case HISTORICAL:\n datEventDate.setValue(immunItem.getDate());\n txtLocation.setValue(immunItem.isImmunization() ? immunItem.getLocationName() : \"\");\n txtLocation.setAttribute(\"ID\", immunItem.isImmunization() ? immunItem.getLocationID() : \"\");\n selLoc = immunItem.getLocationID() + U + U + immunItem.getLocationName();\n radOther.setSelected(txtLocation.getAttribute(\"ID\") != null\n ? txtLocation.getAttribute(\"ID\").toString().isEmpty() : false);\n txtAdminNote.setText(immunItem.getAdminNotes());\n ZKUtil.disableChildren(fraDate, true);\n ZKUtil.disableChildren(fraHistorical, true);\n default:\n service.getLot(lotNumbers, getVaccineID());\n loadComboValues(cboLot, lotNumbers, comboRenderer);\n loadVaccination();\n txtLocation.setValue(immunItem.isImmunization() ? immunItem.getLocationName() : \"\");\n txtLocation.setAttribute(\"ID\", immunItem.isImmunization() ? immunItem.getLocationID() : \"\");\n selLoc = immunItem.getLocationID() + U + U + immunItem.getLocationName();\n radOther.setSelected(txtLocation.getAttribute(\"ID\") != null\n ? txtLocation.getAttribute(\"ID\").toString().isEmpty() : false);\n ListUtil.selectComboboxItem(cboLot, immunItem.getLot());\n ListUtil.selectComboboxItem(cboSite, StrUtil.piece(immunItem.getInjSite(), \"~\", 2));\n spnVolume.setText(immunItem.getVolume());\n datGiven.setDate(immunItem.getDate());\n datVIS.setValue(immunItem.isImmunization() ? immunItem.getVISDate() : null);\n ListUtil.selectComboboxItem(cboReaction, immunItem.getReaction());\n ListUtil.selectComboboxData(cboOverride, immunItem.getVacOverride());\n txtAdminNote.setText(immunItem.getAdminNotes());\n cbCounsel.setChecked(immunItem.wasCounseled());\n }\n } else {\n IUser user = UserContext.getActiveUser();\n Practitioner provider = new Practitioner();\n provider.setId(user.getLogicalId());\n provider.setName(FhirUtil.parseName(user.getFullName()));\n txtProvider.setValue(FhirUtil.formatName(provider.getName()));\n txtProvider.setAttribute(\"ID\", VistAUtil.parseIEN(provider)); //provider.getId().getIdPart());\n selPrv = txtProvider.getAttribute(\"ID\") + U + U + txtProvider.getValue();\n Location location = new Location();\n location.setName(\"\");\n location.setId(\"\");\n datGiven.setDate(getBroker().getHostTime());\n onClick$btnVaccine(null);\n \n if (txtVaccine.getValue().isEmpty()) {\n close(true);\n return;\n }\n \n Encounter encounter = EncounterContext.getActiveEncounter();\n if (!EncounterUtil.isPrepared(encounter)) {\n setEventType(EventType.HISTORICAL);\n radCurrent.setDisabled(true);\n } else {\n if (isCategory(encounter, \"E\")) {\n setEventType(EventType.HISTORICAL);\n Date date = encounter == null ? null : encounter.getPeriod().getStart();\n datEventDate.setValue(DateUtil.stripTime(date == null ? getBroker().getHostTime() : date));\n radCurrent.setDisabled(true);\n txtLocation.setText(user.getSecurityDomain().getName());\n PromptDialog.showInfo(user.getSecurityDomain().getLogicalId());\n txtLocation.setAttribute(\"ID\", user.getSecurityDomain().getLogicalId());\n \n } else {\n if (isVaccineInactive()) {\n setEventType(EventType.HISTORICAL);\n radCurrent.setDisabled(true);\n } else {\n setEventType(EventType.CURRENT);\n radCurrent.setDisabled(false);\n }\n }\n }\n selectItem(cboReason, NONESEL);\n }\n btnSave.setLabel(immunItem == null ? \"Add\" : \"Save\");\n btnSave.setTooltiptext(immunItem == null ? \"Add record\" : \"Save record\");\n txtVaccine.setFocus(true);\n }", "private void fillData() {\n\tparname.setText(UpStudentController.getName());\r\n\tparphone.setText(UpStudentController.getPhone());\r\n\tparmail.setText(UpStudentController.getMail());\r\n\taddres.setText(UpStudentController.getAdr());\r\n\tlocation.setText(UpStudentController.getLoc());\r\n\tkazi.setText(UpStudentController.getOc());\r\n\ttaifa.setText(UpStudentController.getNat());\r\n\t}", "public CRUD_form() {\n initComponents();\n DbCon.getConnection(\"jdbc:mysql://localhost:3306/test\", \"root\", \"rishi\");\n }", "public GestaoFormando() {\n \n initComponents();\n listarEquipamentos();\n listarmapainscritos();\n }", "private void fillData() {\n jTextField1.setEnabled(false);\n jTextField11.setEnabled(false);\n\n if (owners != null && owners.get(\"editedOwner\") != null) {\n this.jTextField1.setText(owners.get(\"editedOwner\").getAsJsonObject().get(\"rc\").getAsString());\n this.jTextField11.setText(owners.get(\"editedOwner\").getAsJsonObject().get(\"share\").getAsString());\n }\n String[] header = new String[]{\"Rodné čislo\", \"Podiel v %\"};\n dtm.setColumnIdentifiers(header);\n jTableOwnerships.setModel(dtm);\n if (owners != null && owners.get(\"ownerships\") != null) {\n for (JsonElement jsonElement : owners.get(\"ownerships\").getAsJsonArray()) {\n JsonObject owner = (JsonObject) jsonElement;\n dtm.addRow(new Object[]{owner.get(\"rc\").getAsString(), owner.get(\"share\").getAsString()});\n }\n }\n }", "public CustomerListForm() {\n initComponents();\n findAllData();\n }", "private void iniciaFrm() {\n statusLbls(false);\n statusBtnInicial();\n try {\n clientes = new Cliente_DAO().findAll();\n } catch (Exception ex) {\n Logger.getLogger(JF_CadastroCliente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void limpiarCamposFormBusqueda() {\n\t}", "private void autoFillForm(String sID) {\n\t\ttry {\n\t\t\tString st=\"SELECT * FROM services WHERE ServiceId=\"+sID;\n\t\t\tConnection con=serviceCentreDBConnection.connect();\n\t\t\tPreparedStatement ps=con.prepareStatement(st);\n\t\t\tResultSet rs=ps.executeQuery();\n\t\t\twhile(rs.next()) {\n\t\t\t\tString rgno=rs.getString(\"regNo\");\n\t\t\t\tString sType=rs.getString(\"serviceType\");\n\t\t\t\tString sCost=rs.getString(\"serviceCost\");\n\t\t\t\tString pDate=rs.getString(\"pickupDate\");\n\t\t\t\tString sDate=rs.getString(\"submitDate\");\n\t\t\t\tString nDate=rs.getString(\"nextDate\");\n\t\t\t\trg.setText(rgno);\n\t\t\t\tsc.setText(sCost);\n\t\t\t\tpd.setText(pDate);\n\t\t\t\tsd.setText(sDate);\n\t\t\t\tnd.setText(nDate);\n\t\t\t\tif(sType.equalsIgnoreCase(\"Free\"))\n\t\t\t\t\t{stype.setSelectedItem(\"Free\");;}\n\t\t\t\telse {stype.setSelectedItem(\"Paid\");;}\n\t\t\t\t\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "private void formFiller(FormLayout fl)\n\t{\n fl.setSizeFull();\n\n\t\ttf0=new TextField(\"Name\");\n\t\ttf0.setRequired(true);\n\t\t\n sf1 = new Select (\"Customer\");\n try \n {\n\t\t\tfor(String st :db.selectAllCustomers())\n\t\t\t{\n\t\t\t\tsf1.addItem(st);\n\t\t\t}\n\t\t} \n \tcatch (UnsupportedOperationException | SQLException e) \n \t{\n \t\tErrorWindow wind = new ErrorWindow(e); \n\t UI.getCurrent().addWindow(wind);\n \t\te.printStackTrace();\n \t}\n sf1.setRequired(true);\n \n sf2 = new Select (\"Project Type\");\n sf2.addItem(\"In house\");\n sf2.addItem(\"Outsourcing\");\n df3=new DateField(\"Start Date\");\n df3.setDateFormat(\"d-M-y\");\n df3.setRequired(true);\n \n df4=new DateField(\"End Date\");\n df4.setDateFormat(\"d-M-y\");\n \n df4.setRangeStart(df3.getValue());\n \n df5=new DateField(\"Next DeadLine\");\n df5.setDateFormat(\"d-M-y\");\n df5.setRangeStart(df3.getValue());\n df5.setRangeEnd(df4.getValue());\n sf6 = new Select (\"Active\");\n sf6.addItem(\"yes\");\n sf6.addItem(\"no\");\n sf6.setRequired(true);\n \n tf7=new TextField(\"Budget(mandays)\");\n \n tf8=new TextArea(\"Description\");\n \n tf9=new TextField(\"Inserted By\");\n \n tf10=new TextField(\"Inserted At\");\n \n tf11=new TextField(\"Modified By\");\n \n tf12=new TextField(\"Modified At\");\n \n if( project.getName()!=null)tf0.setValue(project.getName());\n else tf0.setValue(\"\");\n\t\tif(!editable)tf0.setReadOnly(true);\n fl.addComponent(tf0, 0);\n \n\n if(project.getCustomerID()!=-1)\n\t\t\ttry \n \t{\n\t\t\t\tsf1.setValue(db.selectCustomerforId(project.getCustomerID()));\n\t\t\t}\n \tcatch (ReadOnlyException | SQLException e) \n \t{\n \t\tErrorWindow wind = new ErrorWindow(e); \n\t\t UI.getCurrent().addWindow(wind);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\telse sf1.setValue(\"\");\n if(!editable)sf1.setReadOnly(true);\n fl.addComponent(sf1, 1);\n \n \n if(project.getProjectType()!=null)sf2.setValue(project.getProjectType());\n else sf2.setValue(\"\");\n if(!editable)sf2.setReadOnly(true);\n fl.addComponent(sf2, 2);\n \n if(project.getStartDate()!=null) df3.setValue(project.getStartDate());\n if(!editable)df3.setReadOnly(true);\n fl.addComponent(df3, 3);\n \n if(project.getEndDate()!=null) df4.setValue(project.getEndDate());\n if(!editable)df4.setReadOnly(true);\n fl.addComponent(df4, 4);\n \n if(project.getNextDeadline()!=null)df5.setValue(project.getNextDeadline());\n if(!editable)df5.setReadOnly(true);\n fl.addComponent(df5, 5);\n \n if (project.isActive())sf6.setValue(\"yes\");\n else sf6.setValue(\"no\");\n if(!editable)sf6.setReadOnly(true);\n fl.addComponent(sf6, 6);\n \n if(project.getBudget()!=-1.0) tf7.setValue(String.valueOf(project.getBudget()));\n else tf7.setValue(\"\");\n if(!editable)tf7.setReadOnly(true);\n fl.addComponent(tf7, 7);\n \n if(project.getDescription()!=null)tf8.setValue(project.getDescription());\n else tf8.setValue(\"\");\n if(!editable)tf8.setReadOnly(true);\n fl.addComponent(tf8, 8);\n \n if(project.getInserted_by()!=null)tf9.setValue(project.getInserted_by());\n else tf9.setValue(\"\");\n tf9.setEnabled(false);\n fl.addComponent(tf9, 9);\n \n if(project.getInserted_at()!=null)tf10.setValue(project.getInserted_at().toString());\n else tf10.setValue(\"\");\n tf10.setEnabled(false);\n fl.addComponent(tf10, 10);\n \n if(project.getModified_by()!=null)tf11.setValue(project.getModified_by());\n else tf11.setValue(\"\");\n tf11.setEnabled(false);\n fl.addComponent(tf11, 11);\n \n if(project.getModified_at()!=null)tf12.setValue(project.getModified_at().toString());\n else tf12.setValue(\"\");\n tf12.setEnabled(false);\n fl.addComponent(tf12, 12);\n \n \n\t}", "private void loadData() {\r\n titleField.setText(existingAppointment.getTitle());\r\n descriptionField.setText(existingAppointment.getDescription());\r\n contactField.setText(existingAppointment.getContact());\r\n customerComboBox.setValue(customerList.stream()\r\n .filter(x -> x.getCustomerId() == existingAppointment.getCustomerId())\r\n .findFirst().get());\r\n typeComboBox.setValue(existingAppointment.getType());\r\n locationComboBox.setValue(existingAppointment.getLocation());\r\n startTimeComboBox.setValue(existingAppointment.getStart().toLocalTime().format(DateTimeFormatter.ofPattern(\"HH:mm\")));\r\n endTimeComboBox.setValue(existingAppointment.getEnd().toLocalTime().format(DateTimeFormatter.ofPattern(\"HH:mm\")));\r\n startDatePicker.setValue(existingAppointment.getStart().toLocalDate());\r\n endDatePicker.setValue(existingAppointment.getEnd().toLocalDate());\r\n }", "@Override\r\n\tpublic void fill(FormMap formMap) {\n\t\tif (log.isInfoEnabled()) {\r\n\t\t\tlog.info(\"Into the fill method\");\t\t\t\r\n\t\t}\r\n\t\tif (formMap == null) return;\r\n\t\tif ( formMap.getField(\"name\") != null) {\r\n\t\t\tString name=formMap.getField(\"name\").getValue();\r\n\t\t\tsetName(name);\r\n\t\t}\r\n\t\tif ( formMap.getField(\"email\") != null) {\r\n\t\t\tString email=formMap.getField(\"email\").getValue();\r\n\t\t\tsetEmail(email);\r\n\t\t}\r\n\t\tif ( formMap.getField(\"comment\") != null) {\r\n\t\t\tString comment=formMap.getField(\"comment\").getValue();\r\n\t\t\tsetComment(comment);\r\n\t\t}\r\n\t\tif ( formMap.getField(\"rating\") != null) {\r\n\t\t\tString rating=formMap.getField(\"rating\").getValue();\r\n\t\t\tLong longrating=Long.parseLong(rating);\r\n\t\t\tsetRating(longrating);\r\n\t\t}\r\n\t\t\r\n\t}", "void fillEditTransactionForm(Transaction transaction);", "public FormInserir() {\n initComponents();\n }", "void fillFormBean(IBookFormBean formBean);", "private void recogerDatos() {\n\t\ttry {\n\t\t\tusuSelecc.setId(etId.getText().toString());\n\t\t\tusuSelecc.setName(etNombre.getText().toString());\n\t\t\tusuSelecc.setFirstName(etPApellido.getText().toString());\n\t\t\tusuSelecc.setLastName(etSApellido.getText().toString());\n\t\t\tusuSelecc.setEmail(etCorreo.getText().toString());\n\t\t\tusuSelecc.setCustomFields(etAuth.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n\t\t\tmostrarException(e.getMessage());\n\t\t}\n\t}", "public void loadForm() {\n if (!selectedTipo.equals(\"accion\")) {\n this.renderPaginaForm = true;\n } else {\n this.renderPaginaForm = false;\n }\n if (selectedTipo.equals(null) || selectedTipo.equals(\"menu\")) {\n this.renderGrupoForm = false;\n } else {\n this.renderGrupoForm = true;\n }\n populateListaObjetos();\n }", "private void fillFields() {\n\t\tInteger owner = this.contractor.getOwner();\n\n\t\tnameField.setText(getTrimmedValue(this.contractor.getName()));\n\t\tlocationField.setText(getTrimmedValue(this.contractor.getLocation()));\n\t\townerField.setText(owner == null ? \"\" : owner.toString());\n\t\tsizeField.setText(contractor.getSize().toString());\n\t\trateField.setText(Contractor.RATE_FORMAT.format(this.contractor\n\t\t\t\t.getRate()));\n\t\tspecialtiesList.setListData(this.contractor.getSpecialties());\n\t}", "public void populateFields(String userName){\n this.userNameLabel.setText(userName);\n \n if(this.dbConnection.ConnectDB()){\n //we connected\n String[] temp = this.dbConnection.getUserInformation(userName);\n //take this array and populate the input fields for firstName, lastName,Email,\n this.firstNameInputField.setText(temp[0]);\n this.lastNameInputField.setText(temp[1]);\n this.emailInputField.setText(temp[4]);\n this.roleDropdown.promptTextProperty().set(temp[2]);\n this.departmentDropdown.promptTextProperty().set(temp[3]);\n //add these default values to the map\n this.defaultFirstname = temp[0];\n this.defaultLastname = temp[1];\n this.defaultEmail = temp[4];\n this.defaultRole = temp[2];\n this.defaultDepartment = temp[3];\n \n //repopulate the map\n populateMap();\n //unlock the checkboxes\n this.unlockCheckboxes(this.boxes);\n \n// //print out the mapfor testing purposes\n// for(Map.Entry<String,String> mapObj: this.defaultValuesMap.entrySet()){\n// System.out.println(mapObj.getKey());\n// System.out.println(mapObj.getValue());\n// }\n \n \n }\n }", "private void populateFields() {\n\t\ttypeNameTF.setText(\"\");\n\t\tunitsTF.setText(\"\");\n\t\tunitMeasureTF.setText(\"\");\n\t\tvalidityDaysTF.setText(\"\");\n\t\treorderPointTF.setText(\"\");\n\t\tnotesTF.setText(\"\");\n\t\tstatusCB.getItems().addAll(\"Active\", \"Inactive\");\n\t\tstatusCB.setValue(\"Active\");\n\t}", "public DanielPatricio() throws SQLException {\n initComponents();\n //limpiar();\n recargarDropDownCarros();\n recargarTextArea();\n recargarDataTable();\n \n \n }", "protected void updateForm() {\n //Set the number of contacts\n Long numContacts = myContactList.rowCount();\n this.textContactWorld.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Africa\");\n this.textContactAfrica.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Americas\");\n this.textContactAmericas.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Asia\");\n this.textContactAsia.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Australasia\");\n this.textContactAustralasia.setText(String.valueOf(numContacts));\n numContacts = myContactList.getCountbyContinent(\"Europe\");\n this.textContactEurope.setText(String.valueOf(numContacts));\n\n }", "public crud_empleados() {\n initComponents();\n txt_usuario1.setEditable(false);\n Mostrar();\n \n\n\n }", "public FormCadastroAutomovel() {\n initComponents();\n }", "public ViewCreatePagamento() {\n initComponents();\n clientesDAO cDAO = DaoFactory.createClientesDao(); \n matriculaDAO mDAO = DaoFactory.createMatriculaDao();\n \n cmbIDClientes.addItem(null);\n cDAO.findAll().forEach((p) -> {\n cmbIDClientes.addItem(p.getNome());\n });\n \n \n txtDataAtual.setText(DateFormat.getDateInstance().format(new Date()));\n }", "@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void populateFields() {\n pedidos = pdao.listaTodos();\n cCliente = new HashSet();\n cEstado = new HashSet();\n cCidade = new HashSet();\n cFornecedor = new HashSet();\n\n for (int i = 0; i < pedidos.size(); i++) {\n cCliente.add(pedidos.get(i).getCliente().getNome());\n cEstado.add(pedidos.get(i).getCliente().getEstado());\n cCidade.add(pedidos.get(i).getCliente().getCidade());\n for (int j = 0; j < pedidos.get(i).getItens().size(); j++) {\n cFornecedor.add(pedidos.get(i).getItens().get(j).getProduto().getFornecedor().getNome());\n }\n }\n\n clientes = new ArrayList<>(cCliente);\n fornecedores = new ArrayList<>(cFornecedor);\n\n Iterator i = cCliente.iterator();\n while (i.hasNext()) {\n jCBCliente.addItem(i.next());\n }\n\n i = null;\n i = cEstado.iterator();\n while (i.hasNext()) {\n jCBEstado.addItem(i.next());\n }\n\n i = null;\n i = cCidade.iterator();\n while (i.hasNext()) {\n jCBCidade.addItem(i.next());\n }\n i = null;\n i = cFornecedor.iterator();\n while (i.hasNext()) {\n jCBFornecedor.addItem(i.next());\n }\n\n }", "public ingresarDatos() {\n initComponents();\n Validacion();\n \n }", "private void fillCreateOrEditForm(String name, int branchId) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByValue(xpathSelectBranch, \"number:\" + branchId);\n logger.info(\"# Select branch id: \" + branchId);\n }", "private void createForm(ArrayList<HashMap<String, String>> data) {\n\t\tLayoutInflater inflater = LayoutInflater.from(IPropertyRegistrationActivity.this);\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT,\n\t\t\t\tandroid.widget.LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\tparams.topMargin = 10;\n\n\t\tfields = data;\n\t\tLinearLayout layout = null;\n\t\tint len = fields.size();\n\t\tfor (int j = 0; j < len; j++) {\n\t\t\tfinal HashMap<String, String> field = fields.get(j);\n\t\t\tView fieldView = inflater.inflate(R.layout.iproperty_registration_dynamic_view_item, null);\n\n\t\t\tif (field.get(TYPE).equals(LABEL)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrLabel));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditArea));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\n\t\t\t\tif (field.get(VALUE).toString().trim().length() > 0) {\n\t\t\t\t\tedit.setText(field.get(VALUE));\n\t\t\t\t} else {\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tfinal ImageView imgMap;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditMap));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\timgMap = ((ImageView) layout.findViewById(R.id.imgMap));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.state))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getAdminArea().replace(address.getCountryName() == null ? \"\" : address.getCountryName(), \"\")\n\t\t\t\t\t\t\t\t.replace(address.getPostalCode() == null ? \"\" : address.getPostalCode(), \"\"));\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(NAME).equalsIgnoreCase(getString(R.string.city_town))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getSubAdminArea());\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\timgMap.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\teditMap = edit;\n\t\t\t\t\t\tIntent intent = new Intent(IPropertyRegistrationActivity.this, IjoomerMapAddress.class);\n\t\t\t\t\t\tstartActivityForResult(intent, GET_ADDRESS_FROM_MAP);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(SELECT)) {\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrSpin));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tfinal Spinner spn;\n\t\t\t\tspn = ((Spinner) layout.findViewById(R.id.txtValue));\n\t\t\t\tspn.setAdapter(IjoomerUtilities.getSpinnerAdapter(field));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.country))) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tString country = address.getCountryName();\n\t\t\t\t\t\tint selectedIndex = 0;\n\t\t\t\t\t\tJSONArray jsonArray = null;\n\n\t\t\t\t\t\tjsonArray = new JSONArray(field.get(OPTIONS));\n\t\t\t\t\t\tint optionSize = jsonArray.length();\n\t\t\t\t\t\tfor (int k = 0; k < optionSize; k++) {\n\t\t\t\t\t\t\tJSONObject options = (JSONObject) jsonArray.get(k);\n\n\t\t\t\t\t\t\tif (options.getString(VALUE).equalsIgnoreCase(country)) {\n\t\t\t\t\t\t\t\tselectedIndex = k;\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\tspn.setSelection(selectedIndex);\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tspn.setSelection(0);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getDateDialog(((IjoomerEditText) v).getText().toString(), true, new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(TIME)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getTimeDialog(((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getMultiSelectionDialog(field.get(NAME), field.get(OPTIONS), ((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (field.get(REQUIRED).equalsIgnoreCase(\"1\")) {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME) + \" *\");\n\t\t\t} else {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t}\n\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEdit)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditArea)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrSpin)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrLabel)).setVisibility(View.GONE);\n\n\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrReadOnly));\n\t\t\tlayout.setVisibility(View.VISIBLE);\n\n\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t((IjoomerEditText) layout.findViewById(R.id.txtValue)).setText(field.get(VALUE));\n\t\t\tfieldView.setTag(field);\n\t\t\tlnr_form.addView(fieldView, params);\n\t\t}\n\t}", "public form_utama_kasir() {\n initComponents(); \n koneksi DB = new koneksi(); \n con = DB.getConnection();\n aturtext();\n tampilkan();\n nofakturbaru();\n loadData();\n panelEditDataDiri.setVisible(false);\n txtHapusKodeTransaksi.setVisible(false);\n txtHapusQtyTransaksi.setVisible(false);\n txtHapusStokTersedia.setVisible(false);\n }", "public frmAdministracion() {\n initComponents();\n skin();\n DaoAdministracion da = new DaoAdministracion();\n da.setAdministracion(txtMedioAdministracion.getText());\n tblAdministracion.setModel(da.listar());\n\n }", "public updatedata() {\n initComponents();\n }", "public FormEmpresa() {\n initComponents();\n this.getComboBox();\n this.buscaDadosEmpresa();\n \n }", "public void populateForm(Model model) {\n populateFormats(model);\n }", "private void setFieldValues(){ \n\n if(rDatabaseType.equalsIgnoreCase(\"mysql\")){\n jComboBoxDatabaseType.setSelectedIndex(1);\n }\n if(rDatabaseType.equalsIgnoreCase(\"oracle\")){\n jComboBoxDatabaseType.setSelectedIndex(0);\n }\n jTextFieldDatabaseNameIp.setText(rDatabaseServerName);\n jTextFieldDBPort.setText(rDBPort);\n jTextFieldSchemaTNSName.setText(rTnsNameOrDBName);\n jTextFieldUserName.setText(rUserName);\n jTextFieldPassword.setText(rPassword);\n jTextFieldTableName.setText(rTableName);\n jTextFieldColumnName.setText(rColumnName);\n jTextFieldSQLQuery.setText(rQuery); \n }", "public void populateForm(Appointment row){\n selectedRow = row;\n idText.setText(Integer.toString(row.getId()));\n titleText.setText(row.getTitle());\n descriptionText.setText(row.getDescription());\n for(Location item : locationCombo.getItems()){\n if(item.getCity_state().equals(row.getLocation())){\n locationCombo.getSelectionModel().select(item);\n break;\n }\n }\n for(Contact person : contactCombo.getItems()){\n if(person.getName().equals(row.getContact())){\n contactCombo.getSelectionModel().select(person);\n break;\n }\n }\n for(Type meeting : typeCombo.getItems()){\n if(meeting.getAppointment_type().equals(row.getType())){\n typeCombo.getSelectionModel().select(meeting);\n break;\n }\n }\n for(Customer cust : customerCombo.getItems()){\n if(cust.getId() == row.getCustomer()){\n customerCombo.getSelectionModel().select(cust);\n break;\n }\n }\n for(User user : userCombo.getItems()){\n if(user.getId() == row.getUser()){\n userCombo.getSelectionModel().select(user);\n break;\n }\n }\n startLDT = LocalDateTime.parse(row.getStart(), formatter);\n endLDT = LocalDateTime.parse(row.getEnd(), formatter);\n dateBox.setValue(startLDT.toLocalDate());\n setPrevSpinner = true;\n setSpinners();\n }", "private void initialize() {\n\t\tfrmExibindoResultadoDa = new JFrame();\n\t\tfrmExibindoResultadoDa.setTitle(\"Exibindo Resultado da Consulta\");\n\t\tfrmExibindoResultadoDa.setBounds(100, 100, 450, 300);\n\t\tfrmExibindoResultadoDa.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tfrmExibindoResultadoDa.getContentPane().add(panel, BorderLayout.NORTH);\n\t\tpanel.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tJTextArea textArea = new JTextArea(DEFAULT_QUERY,3,100);\n\t\tpanel.add(textArea);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Enviar Consulta\");\n\t\tbtnNewButton.setHorizontalAlignment(SwingConstants.RIGHT);\n\t\tpanel.add(btnNewButton, BorderLayout.EAST);\n\t\t\n\t\ttable = new JTable();\n\t\tfrmExibindoResultadoDa.getContentPane().add(table, BorderLayout.CENTER);\n\t\t\n\t\tJPanel panel_1 = new JPanel();\n\t\tfrmExibindoResultadoDa.getContentPane().add(panel_1, BorderLayout.SOUTH);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Filtro:\");\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.LEFT);\n\t\tpanel_1.add(lblNewLabel);\n\t\t\n\t\ttextField = new JTextField();\n\t\tpanel_1.add(textField);\n\t\ttextField.setColumns(23);\n\t\t\n\t\tJButton btnAplicarFiltro = new JButton(\"Aplicar Filtro\");\n\t\tpanel_1.add(btnAplicarFiltro);\n\t}", "private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}", "public telaCadastro() {\n initComponents();\n populaTabela();\n }", "public SalidaCajaForm() {\n\t\tinicializarComponentes();\n }", "private void fillCreateOrEditForm(String name, String branch) {\n waitForElementVisibility(xpathFormHeading);\n String actual = assertAndGetAttributeValue(xpathFormHeading, \"innerText\");\n assertEquals(actual, FORM_HEADING,\n \"Actual heading '\" + actual + \"' should be same as expected heading '\" + FORM_HEADING\n + \"'.\");\n logger.info(\"# User is on '\" + actual + \"' form\");\n assertAndType(xpathNameTF, name);\n logger.info(\"# Entered staff name: \" + name);\n selectByVisibleText(xpathSelectBranch, branch);\n logger.info(\"# Select branch name: \" + branch);\n }", "public PDMRelationshipForm() {\r\n initComponents();\r\n }", "public formularioNuevoProveedor() throws SQLException {\n Conexion c=new Conexion();\n Connection conexion=c.getConexion();\n java.sql.Statement declaracion;\n int id = 0;\n declaracion= conexion.createStatement();\n ResultSet resultado=declaracion.executeQuery(\"Select * from proveedor\");\n while(resultado.next()){\n id=resultado.getInt(\"id_proveedor\");\n }\n conexion.close();\n declaracion.close();\n resultado.close();\n initComponents(); \n campoId.setText(Integer.toString(id+1));\n }", "private void initFormulario() {\n btnCadastro = findViewById(R.id.btnCadastro);\n editNome = findViewById(R.id.editNome);\n editEmail = findViewById(R.id.editEmail);\n editSenhaA = findViewById(R.id.editSenha);\n editSenhaB = findViewById(R.id.editSenhaB);\n chTermo = findViewById(R.id.chTermos);\n isFormOk = false;\n }", "public FrmInsertar() {\n initComponents();\n }", "public CadastroDeEmpresa() {\n initComponents();\n preencherTabela(\"select * from empresa order by id\");\n }", "public FrmCadastro() {\n initComponents();\n \n lblNumeroConta.setText(\"Número da conta: \" + Agencia.getProximaConta());\n \n List<Integer> agencias = Principal.banco.retornarNumeroAgencias();\n for(int i : agencias){\n cmbAgencias.addItem(\"Agência \" + i);\n }\n }", "public SpeciesForm() {\n initComponents();\n setTitle(Application.TITLE_APP + \" Species\");\n processor = new SpeciesProcessor();\n loadData(); \n \n \n }", "public CadastroDentista() {\n initComponents();\n con_dent = new ConectaBanco();\n con_dent.OpenDB();\n con_dent.QuerySQL(\"SELECT * FROM dentistas\");\n\n try{\n con_dent.rs.first();\n txtCodigo.setText(con_dent.rs.getString(\"cod_dentista\"));\n txtNome.setText(con_dent.rs.getString(\"nome_dent\"));\n txtRG.setText(con_dent.rs.getString(\"rg_dent\"));\n txtCPF.setText(con_dent.rs.getString(\"cpf_dent\"));\n txtCRO.setText(con_dent.rs.getString(\"cro_dent\"));\n txtNasc.setText(con_dent.rs.getString(\"dtnasc_dent\"));\n cbSexo.setSelectedItem(con_dent.rs.getString(\"sexo_dent\"));\n txtRua.setText(con_dent.rs.getString(\"endereco_dent\"));\n txtNumero.setText(con_dent.rs.getString(\"numero_dent\"));\n txtCidade.setText(con_dent.rs.getString(\"cidade_dent\"));\n txtEstado.setText(con_dent.rs.getString(\"estado_dent\"));\n txtTel.setText(con_dent.rs.getString(\"telefone_dent\"));\n txtCel.setText(con_dent.rs.getString(\"celular_dent\"));\n } \n catch(SQLException erroSQL){\n JOptionPane.showMessageDialog(null,\"Nenhum dentista cadastrado\");\n }\n }", "private void consultantsFieldFill(){\n ObservableList<String> userList = FXCollections.observableArrayList();\n userList.add(\"All\");\n //Query and get results\n String query = \"SELECT * FROM user\";\n QueryDB.returnQuery(query);\n ResultSet result = QueryDB.getResult();\n try {\n while (result.next()) {\n userList.add(result.getString(\"userName\"));\n }\n }\n catch (SQLException e){\n dialog(\"ERROR\",\"SQL Error\",\"Error: \"+ e.getMessage());\n }\n consultantsField.setItems(userList);\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tpublic static void populateFormWithExistingData(OHD ohd, OnHandForm theform) {\n\t\tif(ohd!=null){\n\t\t\tif(ohd.getMatched_incident()!=null && !ohd.getMatched_incident().isEmpty()){\n\t\t\t\tIncident inc=IncidentBMO.getIncidentByID(ohd.getMatched_incident(), null);\n\t\t\t\tif(inc!=null){\n\t\t\t\t\tif(inc.getItemlist()!=null){\n\t\t\t\t\t\ttheform.setExistMatchedItemlist(new ArrayList(inc.getItemlist()));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(inc.getItemtype()!=null){\n\t\t\t\t\t\ttheform.setExistMatchedItemType(inc.getItemtype().getItemType_ID());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(ohd.getDisposal_status()!=null){\n\t\t\t\ttheform.setExistDisposalStatus(ohd.getDisposal_status());\n\t\t\t} else {\n\t\t\t\ttheform.setExistDisposalStatus(new Status());\n\t\t\t}\n\n\t\t\tif(ohd.getRemarks()!=null){\n\t\t\t\ttheform.setExistRemarkSize(ohd.getRemarks().size());\n\t\t\t} else {\n\t\t\t\ttheform.setExistRemarkSize(1);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "private void setFields() {\n\t\tfirstname.setText(guest.getFirstName());\n\t\tlastname.setText(guest.getLastName());\n\t\tpassport.setText(guest.getPassportNumber());\n\t\ttelephone.setText(guest.getTelephoneNumber());\n\t\tarrival.setText(arrivalDate.toString());\n\t\tdeparture.setText(departureDate.toString());\n\n\t\tif (hotelChoice.getName() != null && hotelChoice.getName() != \"\"\n\t\t\t\t&& !(hotelChoice.getName() == Controller.DEFAULT_HOTEL_CHOICE)) {\n\t\t\thotel.setText(hotelChoice.getName());\n\t\t} else {\n\t\t\thotelChoice = new Hotel();\n\t\t\thotelChoice.setName(\"\");\n\t\t\thotel.clear();\n\t\t}\n\t\tif (roomQualityChoice.getQuality() != null && roomQualityChoice.getQuality() != \"\"\n\t\t\t\t&& !(roomQualityChoice.getQuality() == Controller.DEFAULT_QUALITY_CHOICE)) {\n\t\t\tquality.setText(roomQualityChoice.getQuality());\n\t\t} else {\n\t\t\troomQualityChoice = new RoomQuality();\n\t\t\troomQualityChoice.setQuality(\"\");\n\t\t\tquality.clear();\n\t\t}\n\t\tif (discountChoice > 0) {\n\t\t\tdiscount.setText(\"(-\" + discountChoice + \"%)\");\n\t\t}\n\n\t\tloadAvailableRooms();\n\n\t}", "public FrmCadastro() {\n initComponents();\n\n }", "protected RespostaFormularioPreenchido() {\n // for ORM\n }", "public quanlixe_form() {\n initComponents();\n }", "public void buildConsultantData(){\r\n // Connect to database and perform select query on user table\r\n Database db = new Database();\r\n Connection connection = null;\r\n try{\r\n connection = db.jdbc_connection.connect();\r\n Statement statement = connection.createStatement(); // Set up statement\r\n \r\n String sql = \"SELECT userID, userName FROM user\";\r\n ResultSet results = statement.executeQuery(sql); \r\n \r\n while(results.next()) { \r\n int id = results.getInt(\"userID\");\r\n String name = results.getString(\"userName\");\r\n \r\n User user = new User(id, name);\r\n user_list.add(user);\r\n }\r\n \r\n combo_user.setItems(user_list);\r\n \r\n }catch(Exception e) {\r\n System.out.println(e.getMessage());\r\n }finally {\r\n try {\r\n connection.close();\r\n } catch (Exception e2) { // Closing databse error handling\r\n System.err.println(e2.getMessage());\r\n }\r\n } \r\n }", "public FrmIntProveedor() {\n initComponents();\n muestraProveedor();\n\n }", "public void setar_campos() {\n int setar = tblEmpresas.getSelectedRow();\n txtEmpId.setText(tblEmpresas.getModel().getValueAt(setar, 0).toString());\n txtEmpNome.setText(tblEmpresas.getModel().getValueAt(setar, 1).toString());\n txtEmpCNPJ.setText(tblEmpresas.getModel().getValueAt(setar, 2).toString());\n txtEmpEnd.setText(tblEmpresas.getModel().getValueAt(setar, 3).toString());\n txtEmpTel.setText(tblEmpresas.getModel().getValueAt(setar, 4).toString());\n txtEmpEmail.setText(tblEmpresas.getModel().getValueAt(setar, 5).toString());\n\n // a linha abaixo desabilita o botao add\n btnAdicionar.setEnabled(false);\n }", "private void getDataFromView() throws EmptyTextFieldException, EmptyChoiceBoxException, NumberSmallerOneException {\n\n date = _view.getDate().getValue();\n title = _view.getTitle().getText();\n function = _view.getFunction().getText();\n protagonist = _view.getProtagonist().getText();\n source = _view.getSource().getText();\n references = _view.getReferences().getText();\n description = _view.getDescription().getText();\n checkForEmptyFields();\n\n priority = _view.getPriorityMap().get(_view.getPriority().getValue());\n classification = _view.getClassificationMap().get(_view.getClassification().getValue());\n checkForEmptyChoiceBox();\n\n id = Integer.parseInt(_view.getId().getText());\n ftr = Integer.parseInt(_view.getFtr().getText());\n det = Integer.parseInt(_view.getDet().getText());\n checkForNumbersSmallerOne();\n }", "public void fillForm(Event e){\n // name\n eventName.setText(e.getEventname().toString());\n // room\n room.setText(e.getRoom() + \"\");\n // dates\n Calendar from = extractDate(e.getFromDate());\n writeDateToButton(from, R.id.newEvent_button_from);\n Calendar to = extractDate(e.getToDate());\n writeDateToButton(to, R.id.newEvent_button_to);\n Calendar fromTime = null;\n Calendar toTime = null;\n if(e.getFromTime() == -1)\n wholeDay.setChecked(true);\n else {\n fromTime = extractTime(e.getFromTime());\n writeDateToButton(fromTime, R.id.newEvent_button_from_hour);\n toTime = extractTime(e.getToTime());\n writeDateToButton(toTime, R.id.newEvent_button_to_hour);\n }\n // notification\n spinner.setSelection(e.getNotificiation());\n // patient\n PatientAdapter pa = new PatientAdapter(this);\n Patient p = pa.getPatientById(e.getPatient());\n patient_id = p.getPatient_id();\n patient.setText(p.getName());\n // desc\n desc.setText(e.getDescription().toString());\n // putting time and date togehter\n this.fromDate = Calendar.getInstance();\n this.toDate = Calendar.getInstance();\n this.fromDate.set(from.get(Calendar.YEAR), from.get(Calendar.MONTH), from.get(Calendar.DAY_OF_MONTH),\n (fromTime != null ? fromTime.get(Calendar.HOUR_OF_DAY) : 0),\n (fromTime != null ? fromTime.get(Calendar.MINUTE) : 0));\n this.toDate.set(to.get(Calendar.YEAR), to.get(Calendar.MONTH), to.get(Calendar.DAY_OF_MONTH),\n (toTime != null ? toTime.get(Calendar.HOUR_OF_DAY) : 0),\n (toTime != null ? toTime.get(Calendar.MINUTE) : 0));\n startYear = fromDate.get(Calendar.YEAR);\n startMonth = fromDate.get(Calendar.MONTH);\n startDay = fromDate.get(Calendar.DAY_OF_MONTH);\n startHour = fromDate.get(Calendar.HOUR_OF_DAY);\n }", "public TaskDetailUpdateForm() {\n initComponents();\n }", "@FXML\r\n\tprivate void initialize() throws SQLException {\r\n\t\tGetUserID();\r\n\t\tregUsernameField.setText(\"\");\r\n\t\tregFirstNameField.setText(\"\");\r\n\t\tregLastNameField.setText(\"\");\r\n\t\tregPhoneField.setText(\"\");\r\n\t\tregAddressField.setText(\"\");\r\n\t\tregEmailField.setText(\"\");\r\n\t\tregPassField.setText(\"\");\r\n\t\tregConfField.setText(\"\");\r\n\t\tshowList();\r\n\t}", "public OverdueRecordForm() {\n initComponents();\n display_Overdue();\n }", "FORM createFORM();", "void populateFrom(Person r) {\n // nombre.setText(r.mail1);\n // apellido.setText(r.apellido1);\n usu.setText(r.nom_usuario1);\n // mail.setText(r.mail1);\n }", "public Formulario() {\n initComponents();\n modelo = (DefaultTableModel) jTable2.getModel();\n }", "@RequestMapping(method=RequestMethod.GET)\n\tpublic String intializeForm(Model model) {\t\t\n\t\tlog.info(\"GET method is called to initialize the registration form\");\n\t\tEmployeeManagerRemote employeeManager = null;\n\t\tEmployeeRegistrationForm employeeRegistrationForm = new EmployeeRegistrationForm();\n\t\tList<Supervisor> supervisors = null;\n\t\ttry{\n\t\t\temployeeManager = (EmployeeManagerRemote) ApplicationUtil.getEjbReference(emplManagerRef);\n\t\t\tsupervisors = employeeManager.getAllSupervisors();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tmodel.addAttribute(\"supervisors\", supervisors);\n\t\tmodel.addAttribute(\"employeeRegistrationForm\", employeeRegistrationForm);\n\t\t\n\t\treturn FORMVIEW;\n\t}", "public void mostrarDados() {\n txtId.setText(\"\" + lista.get(indice).getId());\n txtNome.setText(lista.get(indice).getNome());\n txtEmail.setText(lista.get(indice).getEmail());\n txtSenha.setText(lista.get(indice).getSenha());\n preencheTabela();\n }", "public Consultar() {\n initComponents();\n }", "private void limparCampos() {\n\t\ttxtCidade.setText(\"\");\n\t\tlblId.setText(\"0\");\n\t\tcboEstado.getSelectionModel().select(0);\n\t}", "public Prisoner_details() {\n initComponents();\n fetch();\n }", "public TableForm() {\n initComponents();\n \n setMyTable();\n }", "public userform() throws SQLException {\n initComponents();\n jComboBox1.setVisible(false);\n jLabel5.setVisible(false);\n jButton1.setEnabled(false);\n jTable1.setAutoCreateRowSorter(true);\n GetData();\n\n }", "public Form_Barang() {\n initComponents();\n model = new DefaultTableModel();\n \n barang.setModel(model);\n model.addColumn(\"KODE PRODUK\");\n model.addColumn(\"NAMA PRODUK\");\n model.addColumn(\"MERK BARANG\");\n model.addColumn(\"JUMLAH STOK\");\n model.addColumn(\"HARGA\");\n getDataProduk();\n \n }", "public FrmEjemploCombo() {\n initComponents();\n \n cargarAutos();\n }", "public formArticulo() {\r\n initComponents();\r\n this.tableModel = (javax.swing.table.DefaultTableModel)tblArt.getModel();\r\n }", "public FrmCadUsuario() {\n initComponents();\n Connection conexao = new Conexao().getConnection();\n\n txtId.setEnabled(false);\n lista = usuarioController.getUsuarios();\n if (lista.isEmpty()) {\n JOptionPane.showMessageDialog(null, \"Ainda não foram cadastrados usuários\");\n } else {\n mostrarDados();\n }\n }", "public void formDatabaseTable() {\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 FrmNuevoProveedor() {\n initComponents();\n }", "private void setDataForTicket(){\n int rowId = ticketGui.getSelectedRowId();\n Ticket ticket = controller.getTicketById(rowId);\n\n // setting the data from the ticket i got to the popup gui\n clientNameTextField.setText(ticket.getClientName());\n starIdTextField.setText(ticket.getStarId());\n emailTextField.setText(ticket.getEmail());\n phoneNumberTextField.setText(ticket.getPhoneNumber());\n deviceModelTextField.setText(ticket.getModel());\n descriptionTextArea.setText(ticket.getDescription());\n clubMemberNameTextField.setText(ticket.getMemberName());\n resolutionTextArea.setText(ticket.getResolution());\n\n }", "private void loadLabelData(){\n try {\n QueryManager Query = new QueryManager();\n String query = \"SELECT * FROM users where username = '\"\n + LoginController.username + \"';\"; // get data from user table using username used for logged in\n ResultSet rs = Query.getDataQuery(query);\n\n if (rs.next()) {\n txtFirstname.setText(rs.getString(\"firstname\"));\n txtLastname.setText(rs.getString(\"lastname\"));\n txtEmailAddress.setText(rs.getString(\"email\"));\n txtDefUsername.setText(rs.getString(\"username\"));\n String date = (rs.getString(\"dob\"));\n if (date.equalsIgnoreCase(\"none\")) {\n dobPicker.setPromptText(\"Date of Birth\");\n } else {\n dobPicker.setValue(LocalDate.parse(date));\n }\n txtPNum.setText(rs.getString(\"contact\"));\n String gender = rs.getString(\"gender\");\n if (gender.equalsIgnoreCase(\"female\")) {\n radFemale.setSelected(true);\n radMale.setSelected(false);\n } else {\n radFemale.setSelected(false);\n radMale.setSelected(true);\n }\n System.out.println(\"We in\");\n }\n } catch (SQLException ex) {\n Logger.getLogger(LoginDetailsController.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public static void ChkForm() throws ClassNotFoundException, SQLException {\r\n try (Statement s = DBConnect.connection.createStatement()) {\r\n String selTable3 = \"SELECT Store As str, Form_Name As frm, Date_Created As dte, Status As st FROM existing_forms WHERE Status = 'In-Process' AND Form_Name LIKE 'ebas_\" + GtStore.store + \"_0%' OR 'ebas_\" + GtStore.store + \"_1%'\";\r\n s.execute(selTable3);\r\n try (ResultSet rs3 = s.getResultSet()) {\r\n if (rs3.next()) {\r\n //rs3.next();\r\n EBAS.Date_Label.setText(\"Date Started: \" + rs3.getString(\"dte\"));\r\n nwFrm = \"no\";\r\n StFrmNm = rs3.getString(\"frm\");\r\n StFrmSt = rs3.getString(\"st\");\r\n gtDB();\r\n } else {\r\n nwFrm = \"yes\";\r\n }\r\n }\r\n }\r\n }", "private void mostrarEditForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tint id = Integer.parseInt(request.getParameter(\"id\"));\n\t\tUsuario existingUser = dao.selecionarUsuario(id);\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"usuario-form.jsp\");\n\t\trequest.setAttribute(\"usuario\", existingUser);\n\t\tdispatcher.forward(request, response);\n\t}", "public Ventaform() {\n initComponents();\n }", "public ConsultarVeiculo() {\n initComponents();\n }", "private void readForm() {\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jLabel8 = new javax.swing.JLabel();\n field_id = new javax.swing.JTextField();\n field_name = new javax.swing.JTextField();\n field_position = new javax.swing.JTextField();\n field_email = new javax.swing.JTextField();\n field_tel = new javax.swing.JTextField();\n passwordField = new javax.swing.JPasswordField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel9 = new javax.swing.JLabel();\n comboBox_dep = new javax.swing.JComboBox<>();\n comboBox_type = new javax.swing.JComboBox<>();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"TH Sarabun New\", 1, 24)); // NOI18N\n jLabel1.setText(\"Insert data\");\n\n jLabel2.setFont(new java.awt.Font(\"TH Sarabun New\", 0, 24)); // NOI18N\n jLabel2.setText(\"id\");\n\n jLabel3.setFont(new java.awt.Font(\"TH Sarabun New\", 0, 24)); // NOI18N\n jLabel3.setText(\"password\");\n\n jLabel4.setFont(new java.awt.Font(\"TH Sarabun New\", 0, 24)); // NOI18N\n jLabel4.setText(\"ืname\");\n\n jLabel5.setFont(new java.awt.Font(\"TH Sarabun New\", 0, 24)); // NOI18N\n jLabel5.setText(\"position\");\n\n jLabel6.setFont(new java.awt.Font(\"TH Sarabun New\", 0, 24)); // NOI18N\n jLabel6.setText(\"email\");\n\n jLabel7.setFont(new java.awt.Font(\"TH Sarabun New\", 0, 24)); // NOI18N\n jLabel7.setText(\"tel\");\n\n jLabel8.setFont(new java.awt.Font(\"TH Sarabun New\", 0, 24)); // NOI18N\n jLabel8.setText(\"type\");\n\n field_id.setBackground(new java.awt.Color(255, 204, 204));\n field_id.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n field_id.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n field_name.setBackground(new java.awt.Color(255, 204, 204));\n field_name.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n field_name.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n field_position.setBackground(new java.awt.Color(255, 204, 204));\n field_position.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n field_position.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n field_email.setBackground(new java.awt.Color(255, 204, 204));\n field_email.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n field_email.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n field_tel.setBackground(new java.awt.Color(255, 204, 204));\n field_tel.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n field_tel.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n passwordField.setBackground(new java.awt.Color(255, 204, 204));\n passwordField.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n passwordField.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));\n\n jButton1.setFont(new java.awt.Font(\"TH Sarabun New\", 0, 24)); // NOI18N\n jButton1.setText(\"save\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setFont(new java.awt.Font(\"TH Sarabun New\", 0, 24)); // NOI18N\n jButton2.setText(\"cancel\");\n jButton2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton2MouseClicked(evt);\n }\n });\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel9.setFont(new java.awt.Font(\"TH Sarabun New\", 0, 24)); // NOI18N\n jLabel9.setText(\"Department\");\n\n comboBox_dep.setFont(new java.awt.Font(\"TH Sarabun New\", 0, 18)); // NOI18N\n comboBox_dep.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Information Technology\", \"Computer Science\" }));\n comboBox_dep.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n comboBox_depActionPerformed(evt);\n }\n });\n\n comboBox_type.setFont(new java.awt.Font(\"TH Sarabun New\", 0, 18)); // NOI18N\n comboBox_type.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Admin\", \"Borrower\" }));\n comboBox_type.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n comboBox_typeActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel2)\n .addComponent(jLabel6)\n .addComponent(jLabel7)\n .addComponent(jLabel4)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel8)\n .addComponent(jLabel9))\n .addGap(37, 37, 37)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(field_name, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)\n .addComponent(field_position, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)\n .addComponent(passwordField, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)\n .addComponent(field_id, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)\n .addComponent(field_email, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)\n .addComponent(field_tel, javax.swing.GroupLayout.DEFAULT_SIZE, 250, Short.MAX_VALUE)\n .addComponent(comboBox_dep, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(comboBox_type, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))))\n .addGroup(layout.createSequentialGroup()\n .addGap(194, 194, 194)\n .addComponent(jLabel1)))\n .addContainerGap(63, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(15, 15, 15)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(field_id))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(15, 15, 15))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(passwordField, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(field_name, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(field_position, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(11, 11, 11)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel6)\n .addComponent(field_email, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel7)\n .addGroup(layout.createSequentialGroup()\n .addComponent(field_tel, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(6, 6, 6)))\n .addGap(17, 17, 17)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel9)\n .addComponent(comboBox_dep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(comboBox_type, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel8))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(23, 23, 23))\n );\n\n pack();\n }", "public ConsultarUsuario() {\n initComponents();\n }", "private void PreencherFormulario(int acao) throws SQLException {\n \n Funcionario_id.setText(String.valueOf(acao)); \n obj_Funcionario = bd_Funcionario.getFuncionarioID(acao);\n campo_nome.setText(obj_Funcionario.getNome());\n campo_endereco.setText(obj_Funcionario.getEndereco());\n campo_bairro.setText(obj_Funcionario.getBairro());\n campo_estado.setText(obj_Funcionario.getUf());\n campo_cpf.setText(obj_Funcionario.getCpf());\n campo_idt.setText(obj_Funcionario.getIdt()); \n campo_login.setText(obj_Funcionario.getLogin());\n campo_senha.setText(obj_Funcionario.getSenha());\n campo_cidade.setText(obj_Funcionario.getCidade()); \n campo_numero.setText(obj_Funcionario.getNumero()); \n campo_cep.setText(String.valueOf((obj_Funcionario.getCep()==0)?\"\":obj_Funcionario.getCep()));\n campo_ddd.setText(String.valueOf((obj_Funcionario.getDdd()==0)?\"\":obj_Funcionario.getDdd()));\n campo_telefone.setText(String.valueOf((obj_Funcionario.getTelefone()==0)?\"\":obj_Funcionario.getTelefone()));\n \n Nivel_id.setText(String.valueOf(obj_Funcionario.getNivel().getNivel_id()));\n combo_nivel.setSelectedItem(obj_Funcionario.getNivel().getNome().toUpperCase());\n \n if(obj_Funcionario.getData_admissao()!=null){\n String strdata1 = new SimpleDateFormat(\"dd/MM/yyyy\").format(obj_Funcionario.getData_admissao());\n String vet1[] = strdata1.split(\"/\");\n campo_adm_dia.setText(vet1[0]);\n campo_adm_mes.setText(vet1[1]);\n campo_adm_ano.setText(vet1[2]);\n }\n /*\n if(!obj_Funcionario.getData_demissao().equals(\"0000-00-00\")){\n String strdata2 = new SimpleDateFormat(\"dd/MM/yyyy\").format(obj_Funcionario.getData_demissao());\n String vet2[] = strdata2.split(\"/\");\n campo_dm_dia.setText(vet2[0]);\n campo_dm_mes.setText(vet2[1]);\n campo_dm_ano.setText(vet2[2]);\n }\n * \n */ \n }", "public Perumahan() {\n initComponents();\n aturModelTabel();\n Tipe();\n showForm(false);\n showData(\"\");\n }" ]
[ "0.70269626", "0.6653479", "0.6465836", "0.64348054", "0.63867426", "0.63178134", "0.62713283", "0.62392175", "0.61903316", "0.6186541", "0.6182731", "0.6182495", "0.61803347", "0.612567", "0.6119562", "0.608461", "0.608185", "0.6056897", "0.60384905", "0.6033561", "0.6030019", "0.6010447", "0.5915889", "0.5915886", "0.59144455", "0.59142476", "0.5883934", "0.58769673", "0.58725005", "0.58713627", "0.5816529", "0.58090097", "0.58010733", "0.5790106", "0.5779481", "0.57736313", "0.5758245", "0.57525563", "0.5750234", "0.57383275", "0.57373685", "0.5732692", "0.57325006", "0.57324576", "0.573208", "0.57314", "0.57216144", "0.5716553", "0.5716026", "0.57130784", "0.570497", "0.5699484", "0.56836945", "0.5676591", "0.5675868", "0.5675094", "0.5675034", "0.5674033", "0.5673199", "0.5641653", "0.56399286", "0.56317747", "0.56192577", "0.5610222", "0.56090003", "0.5572869", "0.55708647", "0.55642664", "0.55627096", "0.55483526", "0.5543342", "0.5538197", "0.5537097", "0.55347884", "0.5534212", "0.5528939", "0.552696", "0.55263996", "0.5522031", "0.55129784", "0.55119854", "0.5506689", "0.5505182", "0.5501541", "0.5500917", "0.5498364", "0.5496068", "0.5496", "0.54931927", "0.5482251", "0.5476816", "0.5469608", "0.54644006", "0.5463704", "0.54597867", "0.54583997", "0.5457948", "0.54566175", "0.5449051", "0.544069", "0.54184705" ]
0.0
-1
Set up listeners for form buttons
private void setupListeners() { // "Save" button Button confirmButton = (Button) findViewById(R.id.button_save_report); confirmButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { setResult(RESULT_OK); saveForm(); finish(); // eventually calls onPause() and onStop() } }); // "Cancel" button Button cancelButton = (Button) findViewById(R.id.button_cancel_edit_report); cancelButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { setResult(RESULT_CANCELED); finish(); // eventually calls onPause() and onStop() } }); TextWatcher onFormChangeListener = new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { mFormChanged = true; } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void afterTextChanged(Editable s) { } }; mValueText.addTextChangedListener(onFormChangeListener); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void configureButtonListener();", "private void listenersInitiation() {\n ActionSelectors listener = new ActionSelectors();\n submit.addActionListener(listener);\n goBack.addActionListener(listener);\n }", "public void eventos() {\n btnAbrir.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent evt) {\n btnAbrirActionPerformed(evt);\n }\n });\n }", "public void registerButtons()\n\t{\n\t\tplot.addActionListener(new ButtonListener());\n\t\tin.addActionListener(new ButtonListener(1));\n\t\tout.addActionListener(new ButtonListener(2));\n\t\t\n\t}", "private void setupEvents(){\n btnOk.addActionListener(new ActionListener() {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n isClick_ok = true;\n password = jPasswordField1.getText();\n dispose();\n }\n });\n btnCancel.addActionListener(new ActionListener() {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n dispose();\n }\n });\n }", "private void cargaListeners() {\n\t\tbtnGuardar.addActionListener(this);\n\n\t}", "private void setupButtons() {\n\n btnCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n finishActivity(null, null);\n }\n });\n\n btnCreate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Pub validatedData = validateFormData();\n\n if ( validatedData != null )\n uploadImagesIfNecessaryThenRegisterNewPub(validatedData);\n }\n });\n }", "private void addButtonListener() {\n\t\trock.addActionListener(buttonListener);\n\t\tpaper.addActionListener(buttonListener);\n\t\tscissors.addActionListener(buttonListener);\n\t}", "void enablButtonListener();", "private void setButtonListener() {\n for(CellButton[] buttonsRow : mainFrame.getButtons()) {\n for(CellButton button :buttonsRow) {\n button.addButtonListener(this);\n }\n }\n }", "private void setupBtnListeners() {\n findViewById(R.id.btnAddValue).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n buttonAddValues();\n updateUI();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n\n //Button to open blood pressure chart sets opens blood pressure chart activity\n findViewById(R.id.btnOpenBPChart).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent bpChart = new Intent(WeightActivity.this, BPChartActivity.class);\n startActivity(bpChart.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION));\n mSettingsOrBPChartOpened = true;\n }\n });\n\n //Clicking date button opens date picker and closes keyboard\n findViewById(R.id.tvDate).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showDatePickerDialog();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\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}", "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}", "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 }", "public void addActionListeners(){\n terugButton.addActionListener(this);\n klaarButton.addActionListener(this);\n\n }", "private void createListeners() {\n btGeneralSave.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n saveGeneralData();\n }\n });\n }", "private void initListeners() {\n btnCadastrar.setOnClickListener(this);\n cadastrar.setOnClickListener(this);\n }", "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}", "public void addListenerOnButton() {\n\n\t\t//koppel de button code aan een widget en voeg een onclicklistener toe\n\t\tsettings = (Button) findViewById(R.id.settings);\n\n\t\tsettings.setOnClickListener(new OnClickListener() {\n\t\t\t//koppel de button aan een nieuw xml scherm wat opent\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Settings.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\n\t\t});\n\n\t\tsearch = (Button) findViewById(R.id.search);\n\n\t\tsearch.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\n\t\t\t\tIntent myIntent = new Intent(view.getContext(), Search.class);\n\t\t\t\tstartActivityForResult(myIntent, 0);\n\t\t\t}\n\t\t});\n\t\tterug = (Button) findViewById(R.id.terug);\n\n\t\tterug.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tsetResult(RESULT_OK, intent);\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t});\n\n\n\t}", "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 buttonInit() {\n panel.add(createButton);\n panel.add(editButton);\n panel.add(changeButton);\n createButton.addActionListener(this);\n editButton.addActionListener(this);\n changeButton.addActionListener(this);\n submitNewUser.addActionListener(this);\n editAccTypeBtn.addActionListener(this);\n changePassBtn.addActionListener(this);\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 }", "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 createEvents(){\r\n\t\tbtnCurrent.addActionListener((ActionEvent e) -> JLabelDialog.run());\r\n\t}", "private void setButtonOnClickListeners() {\n aboutUsButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goToFragment(v, new AboutUsFragment());\n }\n });\n\n contactUsButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goToFragment(v, new ContactUsFragment());\n }\n });\n\n upcomingEventsButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goToFragment(v, new UpcomingEventsFragment());\n }\n });\n\n makeADonationButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n goToFragment(v, new MakeADonationFragment());\n }\n });\n }", "public void registerComponents() \r\n {\r\n grantsByPIForm.jbnRunButton.addActionListener(this);\r\n grantsByPIForm.jbnCloseButton.addActionListener(this);\r\n \r\n }", "private void setOnClickListeners() {\n now_playing_previous_button.setOnClickListener(this::handleTransportControls);\n\n now_playing_play_button.setOnClickListener(this::handleTransportControls);\n\n now_playing_next_button.setOnClickListener(this::handleTransportControls);\n }", "public void setupHandlers(){\n\t\trestartButtonHandler rbh = new restartButtonHandler();\n\t\trestart.addActionListener(rbh);\n\t\tInstructionButtonHandler ibh = new InstructionButtonHandler();\n\t\tinstruction.addActionListener(ibh);\n\t\tCardButtonHandler cbh = new CardButtonHandler();\n\t\tfor (int i = 0; i < 4; i++){\n\t\t\tfor(int j = 0; j < 6; j++){\n\t\t\t\t\tbuttons[i][j].addActionListener(cbh);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void initEvent() {\n\t\tmBtnPower.setOnClickListener(this);\n\t\tmBtnProfile.setOnClickListener(this);\n\t\tmBtnArea.setOnClickListener(this);\n\t\tmBtnSkipTime.setOnClickListener(this);\n\t\tmBtnFrequencyPoint.setOnClickListener(this);\n\t\tmBtnAlgorithm.setOnClickListener(this);\n\t}", "protected void init(){\n ac = new ButtonEventManager(this);\n \n nameField = new JTextField();\n \n done = new JButton(\"DONE\");\n back = new JButton(\"MAIN MENU\");\n quit = new JButton(\"QUIT\");\n \n done.setActionCommand(\"go to game menu after saving\");\n back.setActionCommand(\"go to the main menu\");\n quit.setActionCommand(\"quit the game\");\n \n Font font = new Font(\"Arial\", Font.PLAIN, 10);\n \n nameField.setFont(font);\n \n nameField.setBounds(2 * this.getWidth() / 3 - buttonWidth / 2, (int)(0.4 * this.getHeight() - textFieldHeight / 2), buttonWidth, textFieldHeight);\n \n done.setBounds((this.getWidth() / 2 - buttonWidth) / 2, (int)(0.7 * this.getHeight() - buttonHeight / 2), buttonWidth, buttonHeight);\n back.setBounds((this.getWidth() - buttonWidth) / 2, (int)(0.7 * this.getHeight() - buttonHeight / 2), buttonWidth, buttonHeight);\n quit.setBounds(3 * (this.getWidth() - buttonWidth) / 2, (int)(0.7 * this.getHeight() - buttonHeight / 2), buttonWidth, buttonHeight);\n \n done.addActionListener(ac);\n back.addActionListener(ac);\n quit.addActionListener(ac);\n \n add(nameField);\n \n add(done);\n add(back);\n add(quit);\n }", "private void addActionListeners() {\r\n\t\tbuttonImport.addActionListener(this);\r\n\t\tbuttonCancel.addActionListener(this);\r\n\t\tcbContainsHeader.addActionListener(this);\r\n\t\tcbEnableLenCorrect.addActionListener(this);\r\n\t\ttextfieldDelimSymbol.addKeyListener(this);\r\n\t\ttextfieldLenCorrection.addKeyListener(this);\r\n\t\ttableSelectionPD.registerSelectedProfilesListener(this);\r\n\t}", "private void setClickListeners() {\n buttonSomethingWentWrong.setOnClickListener(this);\n buttonSuggestion.setOnClickListener(this);\n buttonHighlightRequest.setOnClickListener(this);\n closeButton.setOnClickListener(this);\n }", "private void configureButtons() {\n\n\t\t// Set button listeners\n\t\tfor(SLChannelControllerViews views : mChannelViews) {\n\t\t\tviews.getChannelButton().setOnTouchListener(new SLSeekBarOnTouchListener(views.getChannelSeekBar()));\n\t\t}\n\t}", "private void createEvents() {\n\t\taddBtn.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbuildOutput();\n\t\t\t}\n\t\t});\n\t}", "private void initListeners() {\n appCompatButtonLogout.setOnClickListener(this);\n appCompatButtonDelete.setOnClickListener(this);\n }", "private void addControls() {\n\t\tAjaxButton button = new AjaxButton(\"submitButton\", ResourceUtils.getModel(\"button.save\")) {\n\t\t\t@Override\n protected void onSubmit(AjaxRequestTarget target, Form<?> form) {\n onSubmitAction(strWrapper, target, form);\n target.add(form);\n }\n\n\t\t\t@Override\n\t\t\tprotected void onError(AjaxRequestTarget target, Form<?> form) {\n\t\t\t\tsuper.onError(target, form);\n\t\t\t\ttarget.add(form);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onConfigure() {\n\t\t\t\tsuper.onConfigure();\n\t\t\t\tthis.setVisible(true);\n\t\t\t}\n\t\t};\n\t\tform.add(button);\n\n\t\tbutton = new AjaxButton(\"cancelButton\", ResourceUtils.getModel(\"button.cancel\")) {\n\t\t\t@Override\n\t\t\tprotected void onSubmit(AjaxRequestTarget target, Form<?> form) {\n\t\t\t\tonCancelAction(strWrapper, target, form);\n\t\t\t\tform.clearInput();\n\t\t\t\ttarget.add(form);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onConfigure() {\n\t\t\t\tsuper.onConfigure();\n\t\t\t\tthis.setVisible(true);\n\t\t\t}\n\t\t};\n\t\tbutton.setDefaultFormProcessing(false);\n\t\tform.add(button);\n\n\t}", "private void setupEventListeners(){\n\t\t//Check boxes.k\n\t\tchkVisible.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\t((QuestionDef)propertiesObj).setVisible(chkVisible.getValue() == true);\n\t\t\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\t\t}\n\t\t});\n\n\t\tchkEnabled.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\t((QuestionDef)propertiesObj).setEnabled(chkEnabled.getValue() == true);\n\t\t\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\t\t}\n\t\t});\n\n\t\tchkLocked.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\t((QuestionDef)propertiesObj).setLocked(chkLocked.getValue() == true);\n\t\t\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\t\t}\n\t\t});\n\n\t\tchkRequired.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\t((QuestionDef)propertiesObj).setRequired(chkRequired.getValue() == true);\n\t\t\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\t\t}\n\t\t});\n\n\t\t//Text boxes.\n\t\ttxtDefaultValue.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tif(checkDefaultValueAgainstQuestionType()){\n\t\t\t\t\tupdateDefaultValue();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttxtDefaultValue.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tif(checkDefaultValueAgainstQuestionType()){\n\t\t\t\t\tupdateDefaultValue();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tWindow.alert(LocaleText.get(\"invalidDefaultValueForQuestionType\"));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttxtHelpText.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateHelpText();\n\t\t\t}\n\t\t});\n\t\ttxtHelpText.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tupdateHelpText();\n\t\t\t}\n\t\t});\n\n\t\ttxtHelpText.addKeyDownHandler(new KeyDownHandler(){\n\t\t\tpublic void onKeyDown(KeyDownEvent event) {\n\t\t\t\tint keyCode = event.getNativeKeyCode();\n\t\t\t\tif(keyCode == KeyCodes.KEY_ENTER || keyCode == KeyCodes.KEY_DOWN)\n\t\t\t\t\tcbDataType.setFocus(true);\n\t\t\t\telse if(keyCode == KeyCodes.KEY_UP){\n\t\t\t\t\ttxtText.setFocus(true);\n\t\t\t\t\ttxtText.selectAll();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttxtBinding.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateBinding();\n\t\t\t}\n\t\t});\n\t\ttxtBinding.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tString s = txtBinding.getText();\n\n\t\t\t\ts = s.replace(\"%\", \"\");\n\t\t\t\ts = s.replace(\"(\", \"\");\n\t\t\t\ts = s.replace(\"!\", \"\");\n\t\t\t\ts = s.replace(\"&\", \"\");\n\t\t\t\t//s = s.replace(\".\", \"\"); //Looks like this is an allowed character in xml node names.\n\t\t\t\ts = s.replace(\"'\", \"\");\n\t\t\t\ts = s.replace(\"\\\"\", \"\");\n\t\t\t\ts = s.replace(\"$\", \"\");\n\t\t\t\ts = s.replace(\"#\", \"\");\n\n\t\t\t\ttxtBinding.setText(s);\n\t\t\t\tupdateBinding();\n\t\t\t}\n\t\t});\n\n\t\ttxtBinding.addKeyDownHandler(new KeyDownHandler(){\n\t\t\tpublic void onKeyDown(KeyDownEvent event) {\n\t\t\t\tif(event.getNativeKeyCode() == KeyCodes.KEY_UP){\n\t\t\t\t\tif(cbDataType.isEnabled())\n\t\t\t\t\t\tcbDataType.setFocus(true);\n\t\t\t\t\telse{\n\t\t\t\t\t\ttxtText.setFocus(true);\n\t\t\t\t\t\ttxtText.selectAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttxtBinding.addKeyPressHandler(new KeyPressHandler(){\n\t\t\tpublic void onKeyPress(KeyPressEvent event) {\n\t\t\t\tif(propertiesObj instanceof PageDef){\n\t\t\t\t\tif(!Character.isDigit(event.getCharCode())){\n\t\t\t\t\t\t((TextBox) event.getSource()).cancelKey(); \n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(propertiesObj instanceof FormDef || propertiesObj instanceof QuestionDef){\n\t\t\t\t\tif(((TextBox) event.getSource()).getCursorPos() == 0){\n\t\t\t\t\t\tif(!isAllowedXmlNodeNameStartChar(event.getCharCode())){\n\t\t\t\t\t\t\t((TextBox) event.getSource()).cancelKey(); \n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(!isAllowedXmlNodeNameChar(event.getCharCode())){\n\t\t\t\t\t\t((TextBox) event.getSource()).cancelKey(); \n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} //else OptionDef varname can be anything\n\t\t\t}\n\t\t});\n\n\t\ttxtText.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tString orgText = getSelObjetOriginalText();\n\t\t\t\tupdateText();\n\t\t\t\tupdateSelObjBinding(orgText);\n\t\t\t}\n\t\t});\n\t\ttxtText.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tString orgText = getSelObjetOriginalText();\n\t\t\t\tupdateText();\n\t\t\t\tupdateSelObjBinding(orgText);\n\t\t\t}\n\t\t});\n\n\t\ttxtText.addKeyDownHandler(new KeyDownHandler(){\n\t\t\tpublic void onKeyDown(KeyDownEvent event) {\n\t\t\t\tif(event.getNativeKeyCode() == KeyCodes.KEY_ENTER || event.getNativeKeyCode() == KeyCodes.KEY_DOWN){\n\t\t\t\t\tif(txtHelpText.isEnabled())\n\t\t\t\t\t\ttxtHelpText.setFocus(true);\n\t\t\t\t\telse{\n\t\t\t\t\t\ttxtBinding.setFocus(true);\n\t\t\t\t\t\ttxtBinding.selectAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttxtDescTemplate.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateDescTemplate();\n\t\t\t}\n\t\t});\n\t\ttxtDescTemplate.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tupdateDescTemplate();\n\t\t\t}\n\t\t});\n\n\t\ttxtCalculation.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateCalculation();\n\t\t\t}\n\t\t});\n\t\ttxtCalculation.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tupdateCalculation();\n\t\t\t}\n\t\t});\n\n\t\t//Combo boxes\n\t\tcbDataType.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tupdateDataType();\n\t\t\t}\n\t\t});\n\t\tcbDataType.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateDataType();\n\t\t\t}\n\t\t});\n\t\tcbDataType.addKeyDownHandler(new KeyDownHandler(){\n\t\t\tpublic void onKeyDown(KeyDownEvent event) {\n\t\t\t\tint keyCode = event.getNativeEvent().getKeyCode();\n\t\t\t\tif(keyCode == KeyCodes.KEY_ENTER || keyCode == KeyCodes.KEY_DOWN){\n\t\t\t\t\ttxtBinding.setFocus(true);\n\t\t\t\t\ttxtBinding.selectAll();\n\t\t\t\t}\n\t\t\t\telse if(keyCode == KeyCodes.KEY_UP){\n\t\t\t\t\ttxtHelpText.setFocus(true);\n\t\t\t\t\ttxtHelpText.selectAll();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\ttxtFormKey.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateFormKey();\n\t\t\t}\n\t\t});\n\t\ttxtFormKey.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tupdateFormKey();\n\t\t\t}\n\t\t});\n\t}", "private void setupButtons() {\n\t\tsetupCreateCourse();\n\t\tsetupRemoveCourse();\n\t\tsetupCreateOffering();\n\t\tsetupRemoveOffering();\n\t\tsetupAddPreReq();\n\t\tsetupRemovePreReq();\n\t\tsetupBack();\n\t}", "private void 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 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}", "private void initializeListeners() {\n llBack.setOnClickListener(this);\n btnChange.setOnClickListener(this);\n btnNext.setOnClickListener(this);\n }", "public void initializeButtons(){\n\t\t\tplay.setBounds(40,90,280,30);\n\t\t\tadd(play);\n\t\t\tplay.addActionListener(new PlayGame());\n\t\t\tplay.setVisible(true);\n\t\t\t\n\t\t\tenterquestion.setBounds(40,140,280,30);\n\t\t\tadd(enterquestion);\n\t\t\tenterquestion.addActionListener(new EnterQuestion());\n\t\t\tenterquestion.setVisible(true);\n\t\t\t\n\t\t\tdirections.setBounds(40,190,280,30);\n\t\t\tadd(directions);\n\t\t\tdirections.addActionListener(new Instructor());\n\t\t\tdirections.setVisible(true);\n\t\t\t\n\t\t\t\n\t\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 }", "@Override\n\tprotected void setOnClickForButtons() {\n\t\tthis.buttons[0].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(getActivity(), MainScreenActivity.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\tMainFunctions.selectedOption = 1;\n\t\t\t\tdestroyServices();\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\t/* message box - onclick event */\n\t\tthis.buttons[1].setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdestroyServices();\n\t\t\t\tMainFunctions.selectedOption = 2;\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\t\n\t\t/* one tick sound */\n\t\tfor (int i = 0; i < this.totalButtons; i++){\n\t\t\tfinal String desc = buttons[i].getTag().toString();\n\t\t\tbuttons[i].setOnFocusChangeListener(new View.OnFocusChangeListener() {\n\t\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\t\tif (hasFocus) {\n\t\t\t\t\t\tLog.i(TAG, \"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tlogFunctions.logTextFile(\"Button \" + desc + \" was selected\");\n\t\t\t\t\t\tspeakButton(desc, 1.0f, 1.0f);\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}", "private void componentsListeners() {\r\n\t\t// NIFs\r\n\t\tbtnRefrescarnifs.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tcb_nifCliente.setModel(new DefaultComboBoxModel(ContenedorPrincipal.getContenedorPrincipal().getContenedorClientes().getNifs()));\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Clientes\r\n\t\tbtnClientes.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tcontroladorVehiculos.pulsarClientes();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Reparaciones\r\n\t\tbtnRepararVehvulo.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tcontroladorVehiculos.pulsarReparaciones();\r\n\t\t\t}\r\n\t\t});\r\n\t\t// Anterior vehiculo\r\n\t\tbuttonLeftArrow.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tif (!Constantes.MODO_CREAR) {\r\n\t\t\t\t\tcontroladorVehiculos.pulsarLeftArrow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t// Siguiente vehiculo\r\n\t\tbuttonRightArrow.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tif (!Constantes.MODO_CREAR) {\r\n\t\t\t\t\tcontroladorVehiculos.pulsarRightArrow();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Atras\r\n\t\tbtnAtrs.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tcontroladorVehiculos.pulsarAtras();\r\n\t\t\t}\r\n\t\t});\r\n\t\t// Guarda el vehiculo\r\n\t\tbtnGuardar.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tif (Constantes.MODO_CREAR) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tcontroladorVehiculos.guardarVehiculo();\r\n\t\t\t\t\t} catch (NumberFormatException e1) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hay campos vacios\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t} catch (Exception e2) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Algo ha ido mal\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t// Borra el vehículo\r\n\t\tbtnBorrarVehiculo.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\tif (Constantes.MODO_CREAR) {\r\n\t\t\t\t\tcontroladorVehiculos.pulsarBorrarVehiculo();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void actionListenner()\n\t{\n\t\t// Add action Listener to each JButton.\n\t\t// WelcomePanel\n\t\tview.getFrame().add(view.getWelcomePanel().getWelcomePanel());\t\n\t\tview.getFrame().setVisible(true);\n\t\t\n\t\t// welcomeButton\n\t\tview.getWelcomePanel().getWelcomeButton().addActionListener(event -> view.getFrame().remove(view.getWelcomePanel().getWelcomePanel()));\t\t\n\t\tview.getWelcomePanel().getWelcomeButton().addActionListener(event -> view.getFrame().add(view.getMainPanel().getMainPanel()));\t\t\n\t\tview.getWelcomePanel().getWelcomeButton().addActionListener(event -> view.getFrame().pack());\n\n\t\t// MainPanel\n\t\t// playgameButton\n\t\tview.getMainPanel().getPlaygameButtun().addActionListener(event -> view.getFrame().remove(view.getMainPanel().getMainPanel()));\t\n\t\tview.getMainPanel().getPlaygameButtun().addActionListener(event -> view.getFrame().add(view.getPlayerPanel().getPlayerPanel()));\n\t\tview.getMainPanel().getPlaygameButtun().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getMainPanel().getPlaygameButtun().addActionListener(event -> view.getFrame().setSize(600, 800));\n\t\tview.getMainPanel().getPlaygameButtun().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t//leaderboardButton\n\t\tview.getMainPanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().remove(view.getMainPanel().getMainPanel()));\n\t\tview.getMainPanel().getLeaderboardsButton().addActionListener(event -> view.add(view.getLeaderboardPanel().getLeaderboardPanel()));\n\t\tview.getMainPanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getMainPanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().setSize(600, 800));\n\t\tview.getMainPanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t//quit\n\t\tview.getMainPanel().getQuitButton().addActionListener(event -> view.getFrame().remove(view.getMainPanel().getMainPanel()));\n\t\tview.getMainPanel().getQuitButton().addActionListener(event -> view.getFrame().add(view.getQuitPanel().getQuitPane()));\n\t\tview.getMainPanel().getQuitButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getMainPanel().getQuitButton().addActionListener(event -> view.getFrame().setSize(600, 800));\n\t\tview.getMainPanel().getQuitButton().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t// PlayerPanel\n\t\t// createButton\n\t\tview.getPlayerPanel().getCreateButton().addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tString input = view.getPlayerPanel().getInputBox().getText();\n\t\t\t\tSystem.out.println(input);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tboolean validname = gameInfo.getModel().getLeaderboard().isValidNewPlayers(input);\n\t\t\t\tSystem.out.println(validname);\n\t\t\t\t\n\t\t\t\tif(validname)\n\t\t\t\t{\n\t\t\t\t\tgameInfo.getModel().getLeaderboard().addNewPlayer(input);\n\t\t\t\t\tgameInfo.getModel().getLeaderboard().loadPlayer(input);\n\t\t\t\t\tgameInfo.getModel().getGameRule().setLevel(1);\n\t\t\t\t\t\n\t\t\t\t\tview.getInGamePanel().setPlayerInGamePanel(input);\n\t\t\t\t\tview.getInGamePanel().setLabelName(input);\t\n\t\t\t\t\tview.getInGamePanel().getBoardGamePanel().setPlayerName(input);\n\t\t\t\t\t\n\t\t\t\t\tview.getInGamePanel().setLevelLabel(Integer.toString(1));\n\t\t\t\t\tview.getInGamePanel().getBoardGamePanel().setLevel(1);\n\t\t\t\t\t\n\t\t\t\t\tview.getInGamePanel().setScoreLabel(Integer.toString(0));\n\t\t\t\t\tview.getInGamePanel().getBoardGamePanel().setScores(0);\n\t\t\t\t\t\n\t\t\t\t\tview.getInGamePanel().setGameStart(true);\n\t\t\t\t\tview.getFrame().remove(view.getPlayerPanel().getPlayerPanel());\n\t\t\t\t\tview.getFrame().add(view.getInGamePanel().getInGamePanel());\n\t\t\t\t\tview.getInGamePanel().getInGamePanel().setFocusable(true);\n\t\t\t\t\tview.getInGamePanel().getInGamePanel().requestFocusInWindow();\n\t\t\t\t\tview.getFrame().pack();\n\t\t\t\t\tview.getFrame().setSize(800, 890);\n\t\t\t\t\tview.getFrame().repaint();\t\t\n\t\t\t\t\tview.getFrame().setVisible(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!validname)\n\t\t\t\t{\n\t\t\t\t\tview.getPlayerPanel().getInputBox().setText(\"INVALID NAME\");\n\t\t\t\t\tview.getPlayerPanel().getInputBox().addMouseListener(new MouseAdapter(){\n\t\t\t @Override\n\t\t\t public void mouseClicked(MouseEvent e){\n\t\t\t \tview.getPlayerPanel().getInputBox().setText(\"\");\n\t\t\t }\n\t\t\t });\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t// loadPlayer\n\t\tint numberOfLoadPlayer = view.getPlayerPanel().getExistPlayerButton().length;\n\t\tfor(int i = 0; i < numberOfLoadPlayer; i++)\n\t\t{\n\t\t\tview.getPlayerPanel().getExistPlayerButton()[i].addMouseListener(new MouseAdapter()\n\t\t\t{\n\t\t\t\tpublic void mousePressed(MouseEvent e)\n\t\t\t\t{\n\t\t\t\t\tObject o = e.getSource();\n\t\t\t\t\tJButton pressedButton = (JButton) o;\n\t\t\t\t\tString text = pressedButton.getText();\n\t\t\t\t\t\n\t\t\t\t\tview.getInGamePanel().setPlayerInGamePanel(text);\n\t\t\t\t\tview.getInGamePanel().setScoreLabel(Integer.toString(gameInfo.getModel().getGameRule().getScores()));\n\t\t\t\t\tview.getInGamePanel().getBoardGamePanel().setScores(gameInfo.getModel().getGameRule().getScores());\n\t\t\t\t\tview.getInGamePanel().setLabelName(text);\n\t\t\t\t\t\n\t\t\t\t\tgameInfo.getModel().getLeaderboard().loadPlayer(text);\n\t\t\t\t\t\n\t\t\t\t\tview.getPlayerPanel().setLoadPlayer(gameInfo.getModel().getLeaderboard().loadPlayer(text));\t\t\t\n\t\t\t\t\tview.setSelectLevelPanel();\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tview.getFrame().remove(view.getPlayerPanel().getPlayerPanel());\t\t\n\t\t\t\t\tview.getFrame().add(view.getSelectLevelPanel().getSelectLevelPanel());\n\t\t\t\t\tview.getFrame().repaint();\n\t\t\t\t\t//view.getFrame().pack();\n\t\t\t\t\tview.getFrame().setVisible(true);\n\t\t\t\t\t\n\t\t\t\t\t// InGamePanel\n\t\t\t\t\t//case select level unlock\n\t\t\t\t\tfor(int i = 1; i <= 5; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(gameInfo.getModel().getLeaderboard().loadPlayer(text).isLevelUnlocked(i) == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString selectLevel = Integer.toString(i);\n\t\t\t\t\t\t\tint level = i;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().getBoardGamePanel().setPlayerName(gameInfo.getModel().getLeaderboard().loadPlayer(text).getName()));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().getBoardGamePanel().setLevel(level));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().getBoardGamePanel().setLevel(gameInfo.getModel().getGameRule().getLevel()));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> gameInfo.getModel().getGameRule().setLevel(level));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().setLevelLabel(selectLevel));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().setGameStart(true));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getFrame().remove(view.getSelectLevelPanel().getSelectLevelPanel()));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getFrame().setSize(800, 890));\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getFrame().add(view.getInGamePanel().getInGamePanel()));\t\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().getInGamePanel().requestFocusInWindow());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getInGamePanel().getInGamePanel().setFocusable(true));\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getFrame().repaint());\t\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getFrame().pack());\n\t\t\t\t\t\t\tview.getSelectLevelPanel().getLevelButton()[i].addActionListener(event -> view.getFrame().setVisible(true));\t\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\n\t\t});\t\t\n\t\t}\n\t\t\n\t\t// back\n\t\tview.getPlayerPanel().getBackButton().addActionListener(event -> view.getFrame().remove(view.getPlayerPanel().getPlayerPanel()));\n\t\tview.getPlayerPanel().getBackButton().addActionListener(event -> view.getFrame().add(view.getMainPanel().getMainPanel()));\t\n\t\tview.getPlayerPanel().getBackButton().addActionListener(event -> view.getFrame().setSize(600, 800));\n\t\tview.getPlayerPanel().getBackButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getPlayerPanel().getBackButton().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t// LeaderboardPanel\n\t\tview.getLeaderboardPanel().getBackButton().addActionListener(event -> view.getFrame().remove(view.getLeaderboardPanel().getLeaderboardPanel()));\n\t\tview.getLeaderboardPanel().getBackButton().addActionListener(event -> view.getFrame().add(view.getMainPanel().getMainPanel()));\t\n\t\tview.getLeaderboardPanel().getBackButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getLeaderboardPanel().getBackButton().addActionListener(event -> view.getFrame().setSize(600, 800));\t\n\t\tview.getLeaderboardPanel().getBackButton().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t// QuitPanel\n\t\t// no\n\t\tview.getQuitPanel().getNo().addActionListener(event -> view.getFrame().remove(view.getQuitPanel().getQuitPane()));\n\t\tview.getQuitPanel().getNo().addActionListener(event -> view.getFrame().setSize(600, 800));\n\t\tview.getQuitPanel().getNo().addActionListener(event -> view.getFrame().add(view.getMainPanel().getMainPanel()));\n\t\tview.getQuitPanel().getNo().addActionListener(event -> view.getFrame().repaint());\t\n\t\tview.getQuitPanel().getNo().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t// yes\n\t\tview.getQuitPanel().getYes().addActionListener(event -> view.getFrame().dispatchEvent(new WindowEvent(view.getFrame(), WindowEvent.WINDOW_CLOSING)));\n\t\t\n\t\t\n\t\t// InGamePanel\n\t\tview.getInGamePanel().getInGamePanel().addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyTyped(KeyEvent e) {}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tswitch (e.getKeyCode()) {\n\n\t\t\t\t// Case press esc to pause the game\n\t\t\t\tcase KeyEvent.VK_ESCAPE:\t\n\t\t\t\t\tview.getInGamePanel().setGameStart(false);\n\t\t\t\t\tview.getFrame().remove(view.getInGamePanel().getInGamePanel());\n\t\t\t\t\tview.getFrame().add(view.getPausePanel().getPausePanel());\n\t\t\t\t\tview.getFrame().repaint();\n\t\t\t\t\tview.getFrame().setSize(600, 800);\t\n\t\t\t\t\tview.getFrame().pack();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase KeyEvent.VK_LEFT:\n\t\t\t\t\tmessage = new Message(Message.ValveResponse.MOVE_LEFT);\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase KeyEvent.VK_RIGHT:\n\t\t\t\t\tmessage = new Message(Message.ValveResponse.MOVE_RIGHT);\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase KeyEvent.VK_Z:\n\t\t\t\t\tmessage = new Message(Message.ValveResponse.ROTATE_LEFT);\n\t\t\t\t\t\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase KeyEvent.VK_SPACE:\n\t\t\t\t\tmessage = new Message(Message.ValveResponse.FASTER);\n\t\t\t\t\t\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase KeyEvent.VK_ENTER:\n\t\t\t\t\tif(lost)\n\t\t\t\t\t{\n\t\t\t\t\t\tview.getInGamePanel().setGameStart(true);\n\t\t\t\t\t\tview.getInGamePanel().getBoardGamePanel().setLost(false);\n\t\t\t\t\t\tlost = false;\n\t\t\t\t\t\tmessage = new Message(Message.ValveResponse.RESTART);\n\t\t\t\t\t\ttry \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t\t\t} \n\t\t\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(winLevel)\n\t\t\t\t\t{\n\t\t\t\t\t\tview.getInGamePanel().setGameStart(true);\n\t\t\t\t\t\tview.getInGamePanel().getBoardGamePanel().setWinLevel(false);\n\t\t\t\t\t\twinLevel = false;\n\t\t\t\t\t\tmessage = new Message(Message.ValveResponse.GET_NEXTLEVEL);\n\t\t\t\t\t\ttry \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t\t\t} \n\t\t\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void keyReleased(KeyEvent e) {}\n\t\t});\n\t\t\n\t\t// PausePanel\n\t\t// back\n\t\tview.getPausePanel().getBack().addActionListener(event -> view.getInGamePanel().setGameStart(true));\n\t\tview.getPausePanel().getBack().addActionListener(event -> view.getFrame().remove(view.getPausePanel().getPausePanel()));\n\t\tview.getPausePanel().getBack().addActionListener(event -> view.getFrame().setSize(800, 890));\t\n\t\tview.getPausePanel().getBack().addActionListener(event -> view.getFrame().add(view.getInGamePanel().getInGamePanel()));\n\t\tview.getPausePanel().getBack().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getPausePanel().getBack().addActionListener(event -> view.getFrame().pack());\n\t\t\t\t\n\t\t// LeaderBoardInPausePanel\n\t\tview.getPausePanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().remove(view.getPausePanel().getPausePanel()));\n\t\tview.getPausePanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().add(view.getLeaderboardInPausePanel().getLeaderboardPanel()));\n\t\tview.getPausePanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getPausePanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().setSize(600, 800));\t\n\t\tview.getPausePanel().getLeaderboardsButton().addActionListener(event -> view.getFrame().pack());\n\t\t\n\t\t// ControlsPanel\n\t\tview.getPausePanel().getControlsButton().addActionListener(event -> view.getFrame().remove(view.getPausePanel().getPausePanel()));\n\t\tview.getPausePanel().getControlsButton().addActionListener(event -> view.getFrame().add(view.getControlsPanel().getControlsPanel()));\n\t\tview.getPausePanel().getControlsButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getPausePanel().getControlsButton().addActionListener(event -> view.getFrame().setSize(600, 800));\t\n\t\tview.getPausePanel().getControlsButton().addActionListener(event -> view.getFrame().pack());\n\t\t\t\n\t\tview.getPausePanel().getReturnToMainManuButton().addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\t\t\t\t\n\t\t\t\tmessage = new Message(Message.ValveResponse.GET_NEWGAME);\n\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tviewToControllerQueue.put(message);\n\t\t\t\t} \n\t\t\t\tcatch (InterruptedException e1) {}\n\t\t\t\t\n\t\t\t\tview.getFrame().remove(view.getPausePanel().getPausePanel());\n\t\t\t\tview.getFrame().add(view.getMainPanel().getMainPanel());\t\n\t\t\t\tview.getFrame().pack();\n\t\t\t\tview.getFrame().setSize(600, 800);\t\n\t\t\t\tview.getFrame().repaint();\n\t\t\t\t\n\t\t\t\t//viewAllPanels.getFrame().pack();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t// LeaderboardInGame\n\t\tview.getLeaderboardInPausePanel().getBackButton().addActionListener(Event -> view.getFrame().remove(view.getLeaderboardInPausePanel().getLeaderboardPanel()));\n\t\tview.getLeaderboardInPausePanel().getBackButton().addActionListener(event -> view.getFrame().add(view.getPausePanel().getPausePanel()));\t\n\t\tview.getLeaderboardInPausePanel().getBackButton().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getLeaderboardInPausePanel().getBackButton().addActionListener(event -> view.getFrame().setSize(600, 800));\t\n\t\tview.getLeaderboardInPausePanel().getBackButton().addActionListener(event -> view.getFrame().pack());\n\t\t\t\n\t\t// ControlPanel\n\t\tview.getControlsPanel().getBack().addActionListener(event -> view.getFrame().remove(view.getControlsPanel().getControlsPanel()));\n\t\tview.getControlsPanel().getBack().addActionListener(event -> view.getFrame().add(view.getPausePanel().getPausePanel()));\t\n\t\tview.getControlsPanel().getBack().addActionListener(event -> view.getFrame().repaint());\n\t\tview.getControlsPanel().getBack().addActionListener(event -> view.getFrame().setSize(600, 800));\t\n\t\tview.getControlsPanel().getBack().addActionListener(event -> view.getFrame().pack());\n\t}", "public void listenButtons() {\n\n playGameButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mActivities = MyActivities.PLAY_GAME;\n startActivity();\n }\n });\n\n freePlayButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mActivities = MyActivities.FREE_PLAY;\n startActivity();\n }\n });\n\n informationIcon.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mActivities = MyActivities.POP_UP;\n startActivity();\n }\n });\n }", "private void setupClickEvents() {\n btnCreateUser.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (edtEnterPin.getText().toString().equals(edtConfirmPin.getText().toString())) {\n if (validate())\n createNewUser();\n } else\n Toast.makeText(CreatePinActivity.this, Constants.ERR_MSG_PIN_MUST_SAME, Toast.LENGTH_SHORT).show();\n }\n });\n\n rgGender.setOnCheckedChangeListener((radioGroup, i) -> {\n selectedGenderId = rgGender.getCheckedRadioButtonId();\n rbGender = findViewById(selectedGenderId);\n });\n\n edtDateOfBirth.setOnClickListener(view -> {\n DTU.showDatePickerDialog(context, DTU.FLAG_OLD_AND_NEW, edtDateOfBirth);\n });\n }", "private void initializeButtons() {\n confirmChange.setOnAction((ActionEvent e) -> {\n if (seatNum != null) {\n //If alert box returns true: update the database with changes\n SceneController.AlertBox.draw(\"Confirm Change\", \"Accept booking changes?\");\n if (SceneController.AlertBox.answer) {\n updateEmployeeSeating();\n goLandingPage();\n }\n } else {\n noBookingsLabel.setText(\"You need to select a seat first.\");\n noBookingsLabel.setVisible(true);\n }\n });\n\n deleteBooking.setOnAction((ActionEvent e) -> {\n //If alert box returns true: delete the entry from the database\n SceneController.AlertBox.draw(\"Delete Booking\", \"Really delete booking?\");\n if (SceneController.AlertBox.answer) {\n deleteEmployeeBooking();\n goLandingPage();\n }\n });\n\n returnHome.setOnAction((ActionEvent e) -> goLandingPage());\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}", "private void buildThenAddActionListenersForButtons(Phone phone) {\n\n\t\t/***\n\t\t * If accept button was pressed to begin the program, then display the\n\t\t * corresponding information for the incoming call on the GUI.\n\t\t */\n\t\tacceptButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tphone.closeRingtone();\n\t\t\t\t} catch (LineUnavailableException | IOException e1) {\n\t\t\t\t\tSystem.out.println(\"Ringtone failed to stop\");\n\t\t\t\t}\n\t\t\t\t// details of incoming call are based on if the call is spam or not\n\t\t\t\tisIncomingCall = false; // not a new call, just picking up the phone\n\t\t\t\t// re-use isSpam instance variable that startButton listener set to true or\n\t\t\t\t// false.\n\t\t\t\twelcomeThenDisplayCallInfo\n\t\t\t\t\t\t.setText(displaySpamOrNotSpamToUserForIncomingOrAcceptedCalls(phone, isSpam, isIncomingCall));\n\n\t\t\t\tuserInstructions.setVisible(false); // show user instructions for accept/decline call\n\t\t\t\tstartButton.setVisible(true);\n\t\t\t\tacceptButton.setVisible(false);\n\t\t\t\tdeclineButton.setVisible(false);\n\t\t\t}\n\t\t});\n\n\t\t/***\n\t\t * Actions associated with pressing decline button including changing text and\n\t\t * displaying statistics for session.\n\t\t */\n\t\tdeclineButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tphone.closeRingtone();\n\t\t\t\t} catch (LineUnavailableException | IOException e1) {\n\t\t\t\t\tSystem.out.println(\"Ringtone failed to stop\");\n\t\t\t\t}\n\t\t\t\tpercentageSpamCalls = 100\n\t\t\t\t\t\t* (phone.getSpamAlgoForPhone().getNumberOfSpamCallsReceived() / numberOfCalls);\n\t\t\t\tDecimalFormat df = new DecimalFormat(\"###.##\"); // format to 2 decimal places\n\t\t\t\t// Output a textfile of all the users blocked at the end at the project level\n\t\t\t\t// folder\n\t\t\t\tphone.blockListTextFile();\n\t\t\t\t// re-use user instructions label and set it to these statistics from the\n\t\t\t\t// session\n\t\t\t\twelcomeThenDisplayCallInfo.setVisible(false);\n\t\t\t\tdeclineDisplay.setText(\"<html>\" + \"<br>\" + \"<br>\" + \"Total spam calls received were: \"\n\t\t\t\t\t\t+ phone.getSpamAlgoForPhone().getNumberOfSpamCallsReceived() + \"<br>\"\n\t\t\t\t\t\t+ \"Total number of calls were: \" + (int) numberOfCalls + \"<br>\"\n\t\t\t\t\t\t+ \"Percentage of spam calls was: \" + df.format(percentageSpamCalls) + \"%\" + \"<br>\" + \"<br>\"\n\t\t\t\t\t\t+ \"Please press block to see the spam callers\" + \"<br>\"\n\t\t\t\t\t\t+ \"that have been added to your blocked list.\" + \"<br>\" + \"</html>\");\n\t\t\t\tdeclineDisplay.setVisible(true);\n\t\t\t\tuserInstructions.setVisible(false);\n\t\t\t\tblockButton.setVisible(true);\n\t\t\t\tacceptButton.setVisible(false);\n\t\t\t\tdeclineButton.setVisible(false);\n\t\t\t}\n\t\t});\n\n\t\t/***\n\t\t * Pressing start button initiates an incoming call, passes it to phone object,\n\t\t * plays ringtone, and prompts user to accept or decline the call\n\t\t */\n\t\tstartButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tphone.ringtone();\n\t\t\t\tisIncomingCall = true; // start button creates an incoming call\n\t\t\t\ttry {\n\t\t\t\t\tphone.startRingtone();\n\t\t\t\t} catch (LineUnavailableException | IOException e1) {\n\t\t\t\t\tSystem.out.println(\"Ringtone failed to start\");\n\t\t\t\t}\n\n\t\t\t\tphone.createIncomingCallDisplayOnPhoneScreenGUI(phone.getUsersContacts());\n\t\t\t\tisSpam = phone.isIncomingCallSpam();\n\t\t\t\twelcomeThenDisplayCallInfo\n\t\t\t\t\t\t.setText(displaySpamOrNotSpamToUserForIncomingOrAcceptedCalls(phone, isSpam, isIncomingCall));\n\t\t\t\tuserInstructions.setVisible(true); // show user instructions for accept/decline call\n\t\t\t\tstartButton.setVisible(false);\n\t\t\t\tacceptButton.setVisible(true);\n\t\t\t\tdeclineButton.setVisible(true);\n\t\t\t\tnumberOfCalls++;\n\t\t\t}\n\t\t});\n\n\t\t/***\n\t\t * Block button shows the list of calls marked as spam to the user in the GUI, \n\t\t * and also writes the list to a text file. \n\t\t */\n\t\tblockButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdeclineDisplay.setText(\"<html>\" + \"These spam callers have been blocked: \" + \"<br>\" + \"<br>\"\n\t\t\t\t\t\t+ phone.printBlockedCallers().replaceAll(\"\\n\", \"<br/>\") + \"<br>\"\n\t\t\t\t\t\t+ \"A list of these callers can also be found as a textfile\" + \"<br>\"\n\t\t\t\t\t\t+ \"called \\\"BlockList.txt\\\" in the project folder.\" + \"</html>\");\n\t\t\t\tblockButton.setVisible(false);\n\t\t\t\tdeclineDisplay.setVisible(true);\n\t\t\t\tuserInstructions.setVisible(false);\n\t\t\t}\n\t\t});\n\t}", "private void buttonInitiation() {\n submit = new JButton(\"Submit\");\n submit.setBounds(105, 250, 90, 25);\n this.add(submit);\n goBack = new JButton(\"Return to Main Menu\");\n goBack.setBounds(205, 250, 200, 25);\n this.add(goBack);\n }", "private void registerListeners() {\r\n View.OnClickListener clickListener = new ButtonListener();\r\n btnStart.setOnClickListener(clickListener);\r\n btnStop.setOnClickListener(clickListener);\r\n }", "public void eventos()\n\t{\n\t\tvuelos.addActionListener(new ActionListener()\n\t\t{\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0)\n\t\t\t{\n\t\t\t\tVuelo v = (Vuelo) vuelos.getSelectedItem();\n\t\t\t\tif(v!=null)\n\t\t\t\t{\n\t\t\t\t\tllenarPasabordos(v.getId());\n\t\t\t\t}\n\t\t\t}\n\t\t});\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 static void buttonSetup() {\n \n // For all buttons except clear and equals=, update display\n for(JButton i:buttonOrder) {\n if(i.equals(clear) || i.equals(equals))\n continue;\n i.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n if(displayString.toString().equals(\"ERROR\")) {\n displayString.replace(0, displayString.length(), i.getText());\n numField.setText(displayString.toString());\n } else {\n displayString.append(i.getText());\n numField.setText(displayString.toString());\n }\n }\n });\n }\n \n // Clears display\n clear.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n displayString.delete(0, displayString.length());\n numField.setText(displayString.toString());\n }\n });\n \n // Clears display, shows result\n equals.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n equationParse(displayString);\n }\n });\n }", "private void setButtonActions() {\n\t\tbrowseButton.setAction(new AbstractAction(\"Browse\") {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint result = fileChooser.showDialog(ImportAnalysesView.this,\n\t\t\t\t\t\t\"Import\");\n\t\t\t\tif (result == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\timportFileField.setText(fileChooser.getSelectedFile()\n\t\t\t\t\t\t\t.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\timportButton.setAction(new AbstractAction(\"Import\") {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\timportAnalyses();\n\t\t\t}\n\t\t});\n\t\tloadButton.setAction(new AbstractAction(\"Load\") {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tloadAnalyses();\n\t\t\t}\n\t\t});\n\t\timportButton.getAction().setEnabled(false);\n\t\tloadButton.getAction().setEnabled(false);\n\t\tpathTextBoxChanged();\n\t}", "private void createEvents() {\n\t\tbtnRetour.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tdispose();\r\n\t\t\t\tDashboard_Preteur dashboard_Preteur = new Dashboard_Preteur(currentPreteur);\r\n\t\t\t\tdashboard_Preteur.setVisible(true);\r\n\t\t\t\tdashboard_Preteur.setResizable(false);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void initListeners() {\n appCompatButtonLogin.setOnClickListener(this);\n }", "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}", "private void fixButtons() {\n\t\tfixModButtonListener();\n\t\tfixBuscarButtonListener();\n\t\tfixDeleteButtonListener();\n\t\tfixClearFieldsButtonListener();\n\t}", "private void setActionListeners() {\r\n gm.getSave().addActionListener(e -> {\r\n gtm.saveChanges();\r\n this.serialize();\r\n });\r\n gm.getSaveAs().addActionListener(e -> {\r\n gtm.saveChanges();\r\n this.serializeAs();\r\n });\r\n gm.getOpen().addActionListener(e -> {\r\n if (!newFile && !path.equals(\"\")) {\r\n this.serializeBeforeOpen();\r\n }\r\n this.serializeOpen();\r\n });\r\n gm.getNewToDo().addActionListener(e -> {\r\n gtm.addToDo();\r\n });\r\n gm.getClose().addActionListener(e -> {\r\n System.exit(0);\r\n });\r\n gm.getMinimize().addActionListener(e -> {\r\n this.setState(Frame.ICONIFIED);\r\n });\r\n gm.getZoom().addActionListener(e -> {\r\n this.setExtendedState(this.getExtendedState() | JFrame.MAXIMIZED_BOTH);\r\n });\r\n }", "public void addActionListeners(ActionListener evt)\r\n\t{\r\n\t\tconfirmButton.addActionListener(evt);\r\n\t\tstartButton.addActionListener(evt);\r\n\t}", "private void addListeners() {\r\n updateMethod.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n enableFieldBasedOnUpdateMethod();\r\n }\r\n });\r\n cbUseLeakyLearning.addActionListener(this);\r\n cbUseLeakyLearning.setActionCommand(\"useLeakyLearning\");\r\n }", "private void setButtons()\n\t{\n\t\tstartSim = new JButton(\"Start Sim\");\n\t\tstartSim.addActionListener(this);\n\t\tpauseSim = new JButton(\"Pause Sim\");\n\t\tpauseSim.addActionListener(this);\n\t\taddEat = new JButton(\"Add Eatery\");\n\t\taddEat.addActionListener(this);\n\t\tsubEat = new JButton(\"Subtract Eatery\");\n\t\tsubEat.addActionListener(this);\n\t\taddCash = new JButton(\"Add Cashier\");\n\t\taddCash.addActionListener(this);\n\t\tsubCash = new JButton(\"Subtract Cashier\");\n\t\tsubCash.addActionListener(this);\n\t}", "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}", "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}", "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}", "@Override\n protected void addButtons()\n {\n JLabel agentOptions = new JLabel(\"Client Options \", SwingConstants.CENTER);\n addComponentToGridBag(this, agentOptions, 0, 0, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n\n JButton agentSendMessage = new JButton(\"Send Message\");\n addComponentToGridBag(this, agentSendMessage, 0, 2, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentSendMessage.addActionListener((ActionEvent e) ->\n {\n String to = getTo();\n String content = getContent(to);\n sendMessage(to, content);\n });\n\n JButton agentShowPortal = new JButton(\"Show Portal\");\n addComponentToGridBag(this, agentShowPortal, 0, 3, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentShowPortal.addActionListener((ActionEvent e) ->\n {\n displayConnections();\n });\n\n JButton agentexit = new JButton(\"Exit\");\n addComponentToGridBag(this, agentexit, 0, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH);\n agentexit.addActionListener((ActionEvent e) ->\n {\n System.exit(0);\n });\n }", "void setActionListener(ActionListener listener) {\n goButton.addActionListener(listener);\n for (JRadioButton rb : buttons) {\n rb.addActionListener(listener);\n }\n }", "@Override\n\tprotected void on_button_pressed(String button_name) {\n\n\t}", "public void setListeners() {\n mbt_no_realizar_comentario.setOnClickListener(this);\n mbt_realizar_comentario_propietario.setOnClickListener(this);\n }", "private void initializeListeners()\n {\n btnBack.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n });\n\n btnCreateAccount.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String email = etEmail.getText().toString();\n String username = etUsername.getText().toString();\n String password = etPassword.getText().toString();\n CreateAccountDTO createAccountDTO = new CreateAccountDTO(email, username, password);\n createAccount(createAccountDTO);\n }\n });\n }", "private void setActionListener(){\r\n \tthis.addPropertyChangeListener(\"Refresh\", this);\r\n \tdeleteButton.addActionListener(this);\r\n \taddNewButton.addActionListener(this);\r\n }", "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 void createListeners() {\n\n addRow.addActionListener(e -> gui.addRow());\n deleteRow.addActionListener(e -> gui.deleteRow());\n }", "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}", "private void initButtonsListener(){\n initDraw();\n initResign();\n initRedo();\n }", "private void initButtons() {\r\n\t\texitGameButton\t\t= game.screenHelper.createTextButton(BUTTON_EXIT_GAME_TEXT, BUTTON_EXIT_GAME_MOUSEOVER_TEXT, menuText);\r\n\t\tcancelExitButton\t= game.screenHelper.createTextButton(BUTTON_CANCEL_EXIT_TEXT, BUTTON_CANCEL_EXIT_MOUSEOVER_TEXT, menuText);\r\n\t\tcancelExitButton.addListener(new ChangeScreenInputListener(new MenuScreenChangeCommand()));\r\n\t\t// Event Listeners \r\n\t\t// TODO: clean up this giant piece of shitty code.\r\n\t\t\r\n\t\texitGameButton.addListener(new InputListener() {\r\n\t\t\tpublic boolean touchDown (InputEvent event, float x, float y, int pointer, int button) {\r\n\t\t\t\texitGame();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void boundButtons() {\r\n \tsingleplayer = (Button) findViewById(R.id.single);\r\n \tsingleplayer.setTypeface(tf);\r\n \tsingleplayer.setOnClickListener(new OnClickListener() {\r\n \t\t\r\n \t\t/** Start a drawing surface for one player*/\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent = new Intent(Main.this, DrawingActivitySingle.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t}});\r\n \t\r\n \tmultiplayer = (Button) findViewById(R.id.multi);\r\n \tmultiplayer.setTypeface(tf);\r\n \tmultiplayer.setOnClickListener(new OnClickListener() {\r\n \t\t\r\n \t\t/** Connect to other users to start a drawing surface*/\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tif (multiplayer.isEnabled()) {\r\n\t\t\t\t\tmultiplayer.setEnabled(false);\r\n\t\t\t\t\t\r\n\t\t\t\t\tinitMultiPlayer();\r\n\t\t\t\t}\r\n\t\t}});\r\n \t\r\n \toptions = (Button) findViewById(R.id.options);\r\n \toptions.setTypeface(tf);\r\n \toptions.setOnClickListener(new OnClickListener() {\r\n \t\t\r\n \t\t/** Start the options menu */\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent = new Intent(Main.this, Options.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t}});\r\n }", "private void setViewListeners() {\n // Set an OnClickListener for each button.\n btnDecrease.setOnClickListener(this);\n btnIncrease.setOnClickListener(this);\n btnOrder.setOnClickListener(this);\n\n // Set an OnTouchListener for each view.\n btnDecrease.setOnTouchListener(touchListener);\n btnIncrease.setOnTouchListener(touchListener);\n etTitle.setOnTouchListener(touchListener);\n etAuthor.setOnTouchListener(touchListener);\n etPrice.setOnTouchListener(touchListener);\n etEditQuantity.setOnTouchListener(touchListener);\n etSupplier.setOnTouchListener(touchListener);\n etPhoneNumber.setOnTouchListener(touchListener);\n\n /* Format the phone number as the user types it.\n Reference: https://stackoverflow.com/a/15647444\n Date: 8/1/18\n */\n etPhoneNumber.addTextChangedListener(new PhoneNumberFormattingTextWatcher());\n // End referenced code.\n }", "private void setupClickEvents() {\n ivAddNewCategory.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n addNewCategory();\n }\n });\n }", "public void setButtonListeners(ActionListener clicks) {\n buttonPanel.setListeners(clicks);\n menuBar.setButtonListener(clicks);\n }", "private void ControlsActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void createMainEvents() {\n\t\taddWindowListener(new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\t\tjdbc.closeSQLConnection();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtn_settings.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t}\n\t\t});\n\n\t}", "@Override\n\tpublic void initListeners() {\n\t\tmClick.setOnClickListener(this);\n\t}", "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 viewForm() {\n this.addGLEventListener(this);\n }", "private void createActionListener() {\n this.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n SearchBox source = (SearchBox) e.getSource();\n searchLinker.doSearch(source.getText());\n }\n });\n }", "private void setUpButton() {\n // Find view\n Button button = (Button) findViewById(R.id.this_weekend_dialog_match_button);\n // Set click mListener\n button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mListener.onMatchMadeDialogSeen();\n dismiss();\n }\n });\n }", "@Override\n\tpublic void buttonClick(ClickEvent event) {\n\t\tif (event.getButton()==view.getBtnAddForm()){\n\t\t\taddHeader();\n\t\t} else if (event.getButton()==view.getBtnDeleteForm()){\n\t\t\tdeleteHeader();\n\t\t} else if (event.getButton()==view.getBtnSearchForm()){\n\t\t\tsearchHeader();\n\t\t} else if (event.getButton()==view.getBtnAdd()){\n\t\t\taddDetailModul();\n\t\t} else if (event.getButton()==view.getBtnRem()){\n\t\t\tremDetailModul();\n\t\t} else if (event.getButton()==view.getBtnSaveForm()){\n\t\t\tsaveForm();\n\t\t} else if (event.getButton()==view.getBtnCancelForm()){\n\t\t\tcancelForm();\n\t\t} \n\t\t\n\t}", "private void addCheckCustomerButtonFunction() {\n\t\tcheckCustomerButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tGUICheckCustomer check = new GUICheckCustomer();\n\t\t\t\tcloseFrame();\n\t\t\t}\t\t\n\t\t});\n\t}", "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 }", "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}", "public void addSaveBtnListener(ActionListener listenForSaveBtn){\n this.save.addActionListener(listenForSaveBtn);\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 initListener() {\n\t\tbtnCancel.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\n\t\t\t}\n\t\t});\n\t}", "public interface customButtonListener {\n public void onNavigateButtonClickListener(int position,String value);\n\n public void onFeedbackButtonClickListener(int position,String value);\n }", "protected void actionPerformedBtnProcesarVenta(ActionEvent e) {\n\t}", "private void addSubmitListener() {\n\t\tview.addSubmitListener(new SubmitListener());\n\t}" ]
[ "0.7359973", "0.7247385", "0.7199521", "0.71204484", "0.7082931", "0.7038929", "0.70049006", "0.69988877", "0.69748646", "0.69063425", "0.69011927", "0.6898217", "0.68514353", "0.6813738", "0.6783595", "0.6779376", "0.67641884", "0.67526263", "0.6749014", "0.6711112", "0.66537356", "0.6624611", "0.6615832", "0.657506", "0.65733093", "0.6568765", "0.65666765", "0.6543616", "0.65413564", "0.6537505", "0.6526044", "0.65167534", "0.6500135", "0.6484411", "0.6477325", "0.6471116", "0.6455491", "0.64490294", "0.6441558", "0.64368635", "0.6424698", "0.64236826", "0.64159787", "0.64094687", "0.64053845", "0.6390146", "0.63792086", "0.6373473", "0.63580775", "0.63458735", "0.6310644", "0.6308804", "0.63010716", "0.63005316", "0.6289967", "0.6286867", "0.62829953", "0.62673086", "0.62592185", "0.6255214", "0.62517184", "0.62487453", "0.6240916", "0.6238522", "0.6238287", "0.62186325", "0.6218164", "0.6214405", "0.61932003", "0.61772376", "0.6171189", "0.6170364", "0.61616063", "0.6156412", "0.61504024", "0.61492753", "0.61347985", "0.6134728", "0.61228806", "0.6118277", "0.6109062", "0.6109035", "0.6094178", "0.6093922", "0.60854226", "0.6083417", "0.60788333", "0.6071364", "0.6063872", "0.6051714", "0.6048935", "0.6045952", "0.6036267", "0.60347855", "0.6020918", "0.601967", "0.60063", "0.6001233", "0.6000291", "0.59994924" ]
0.7240812
2
Check whether a report with the current date already exists
private boolean reportWithCurrentDateExists() { boolean exists = false; String sqlDateString = android.text.format.DateFormat.format("yyyy-MM-dd", mCalendar).toString(); Cursor reportCursor = mDbHelper.getReportPeer().fetchReportByTaskIdAndDate(mTaskId, sqlDateString); startManagingCursor(reportCursor); if (reportCursor != null && reportCursor.getCount() > 0) { long rowId = reportCursor.getLong(reportCursor.getColumnIndexOrThrow(ReportPeer.KEY_ID)); if (mRowId == null || mRowId != rowId) { exists = true; } } if (reportCursor != null) { reportCursor.close(); } return exists; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic boolean checkReportIfExist(ArrayList<Object> msg) {\n\t\t\tString parkName = (String) msg.get(2);\n\t\t\tint month = ((Date) msg.get(1)).getMonth() + 1;\n\t\t\tif (hashMapDB.get(parkName).get(month) == null)\n\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t}", "public boolean checkRecordExistsForToday() {\n ArrayList<Record> todaysRecords = getRecordsForDate(new Date());\n return (todaysRecords != null && todaysRecords.size() > 0);\n }", "public boolean isSetReportDate() {\n return this.reportDate != null;\n }", "public boolean isExist(Date date) {\n return mysqlDao.isExist(date);\n }", "void verifyOrCreateReport(String reportId);", "boolean hasDate();", "@Test\n\tvoid existDataInDBTest() {\n\t\tparkName = \"Haifa Park\";\n\t\tdate = new Date(120, 2, 1);\n\t\texpected = \"1 2 3 4 5 6 1 23 2 8 9 2 3 2 4 3 2 2 1 1 1 5 32 6 12 7 23 8 12 5 32 6 12 5 23 7\";\n\t\tresult = ReportsController.getReport(date, reportType, parkName);\n\n\t\tassertEquals(expected, result);\n\n\t}", "private boolean isExist(String name, Date date) {\n\t\t\n\t\tString sql = \"SELECT * from `expenses` WHERE Name='\"+name+\"' AND Date='\"+date+\"';\";\n\t\tResultSet rs = this.queryHandler.executeQuery(sql);\n\t\ttry {\n\t\t\tboolean exist = false;\n\t\t\twhile(rs.next()) {\n\t\t\t\texist = true;\n\t\t\t}\n\t\t\treturn exist;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.queryHandler.close();\n\t\treturn false;\n\t}", "@Test\n\tvoid existDataInDBTest2() {\n\t\tparkName = \"Tel-Aviv Park\";\n\t\tdate = new Date(120, 5, 1);\n\t\texpected = \"11 22 33 44 55 66 17 23 5 8 4 2 3 2 54 34 2 32 1 61 1 75 32 46 12 67 23 82 12 56 32 36 12 85 232 7\";\n\t\tresult = ReportsController.getReport(date, reportType, parkName);\n\n\t\tassertEquals(expected, result);\n\n\t}", "private boolean dateExists(){\n SimpleDateFormat dateFormat = getDateFormat();\n String toParse = wheels.getDateTimeString();\n try {\n dateFormat.setLenient(false); // disallow parsing invalid dates\n dateFormat.parse(toParse);\n return true;\n } catch (ParseException e) {\n return false;\n }\n }", "public boolean isAlreadyReported() {\n return this.alreadyReported;\n }", "boolean isSetFoundingDate();", "public void timesheet_report()\n {\n\t boolean timesheetreppresent =timesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\"Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }", "public boolean checkDate() {\n\t\tboolean cd = checkDate(this.year, this.month, this.day, this.hour);\n\t\treturn cd;\n\t}", "public void my_timesheet_report()\n {\n\t boolean timesheetreppresent =mytimesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\" My Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }", "public boolean checkDuplicates() {\n List<Booking> dupbookings = new ArrayList<>();\n try {\n dupbookings = bookingHelper.checkDuplicates(b_facility.getId(), b_evdate, b_startTime, b_endTime);\n } catch (Exception e) {\n //facesMessage(\"No other bookings found for the day and time\");\n }\n return dupbookings.size() > 0;\n }", "public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }", "@java.lang.Override\n public boolean hasReportLocation() {\n return reportLocation_ != null;\n }", "boolean hasAcquireDate();", "boolean hasStartDate();", "public int isHistoryExist() {\n\n int count = 0;\n String selectCount = \"SELECT COUNT * FROM\" + DATA_TABLE\n + \"WHERE\" + Columns.DATE + \" < DATE('NOW','LOCALTIME','START OF DAY')\";\n Cursor c = getReadableDatabase().rawQuery(selectCount, null);\n if (c.getCount() > 0) {\n c.moveToFirst();\n count = c.getColumnIndex(Columns.DATE);\n }\n c.close();\n return count;\n }", "public boolean checkIfExisting(ServiceRequest sr) throws SQLException\r\n {\r\n \tSystem.out.println(\"Entered checkIfExisting service request...\");\r\n \t\r\n \tSession session = sessionFactory.getCurrentSession();\r\n \tServiceRequest existingSR = null;\r\n \tboolean existing = false;\r\n \t\r\n \tint serviceId = 0;\r\n \tString preferredDate = null;\r\n \t\r\n \tQuery query = null;\r\n \t\r\n \tif (sr != null)\r\n \t{\r\n \t\tserviceId = sr.getServiceId();\r\n \t\tpreferredDate = sr.getPreferredDate();\r\n \t\t\r\n \t\tSystem.out.println(\"===================== serviceId: \" + serviceId);\r\n \t\tSystem.out.println(\"===================== preferredDate: \" + preferredDate);\r\n \t\t\r\n \t\t\r\n \t\ttry\r\n \t\t{\r\n \t\t\tquery = session.createQuery(GET_DUPLICATE_SERVICE_REQUEST_HQL);\r\n \t\t\r\n \t\tquery.setParameter(\"serviceId\", serviceId);\r\n \t\t\tquery.setParameter(\"preferredDate\", preferredDate);\r\n \t\t\t\r\n \t\t\tif (query.list() != null && query.list().size() > 0)\r\n \t\t\t{\r\n \t\t\t\texistingSR = (ServiceRequest) query.list().get(0);\r\n \t\t\t\t\r\n \t\t\t\tif (existingSR != null)\r\n \t \t{\r\n \t \t\tSystem.out.println(\"=========== existingSR ID: \" + existingSR.getId());\r\n \t \t\texisting = true;\r\n \t \t}\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"=========== NO DUPLICATE! \");\r\n \t\t\t}\r\n \t\t\t\r\n \t\t}\r\n \t\tcatch (Exception ex)\r\n \t\t{\r\n \t\t\tthrow new SQLException(\"Error in validating the request \" + ex.getMessage(), ex);\r\n \t\t}\t\r\n }\r\n \t\r\n \treturn existing;\r\n }", "boolean doesFileExist(String date)\n throws FlooringMasteryPersistenceException;", "public boolean checkIfUserHadCheckedAttendanceToday(int userID, String date) {\n connect();\n boolean bool;\n try {\n ResultSet result = statement.executeQuery(\"SELECT EXISTS (SELECT date FROM Attendance\" +\n \"WHERE studentID LIKE '\" + userID + \"\" +\n \"AND date LIKE '\" + date + \"'');\");\n\n // tutaj if obslugujacy wynik query\n result.close();\n statement.close();\n connection.close();\n return true;\n } catch (SQLException e) {\n// e.printStackTrace();\n return false;\n }\n// return bool;\n }", "private boolean checkIfHabitDoneToday() {\n ArrayList<HabitEvent> eventList = habit_type.getHabitEvents();\n Locale locale = new Locale(\"English\", \"Canada\");\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"EEEE',' MMMM d',' yyyy\", locale);\n String currentDate = simpleDateFormat.format(new Date());\n Calendar calendar = Calendar.getInstance();\n int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);\n if (dayOfWeek == 1) {\n dayOfWeek = 8;\n }\n if (!habit_type.getWeeklyPlan()[dayOfWeek - 2]) {\n return true;\n }\n for (HabitEvent event : eventList) {\n if (currentDate.equals(event.getCompletionDateString())) {\n return true;\n }\n }\n return false;\n }", "boolean generateReport();", "public boolean hasDate() {\n return true;\n }", "boolean hasTradeDate();", "private boolean isToday(Calendar currentCal){\n return currentCal.get(Calendar.DATE) == Calendar.getInstance().get(Calendar.DATE)\n && currentCal.get(Calendar.MONTH) == Calendar.getInstance().get(Calendar.MONTH)\n && currentCal.get(Calendar.YEAR) == Calendar.getInstance().get(Calendar.YEAR);\n }", "public static String assertCreationDateExists(final String message, final Document document) throws Exception {\r\n\r\n return assertCreationDateExists(message, document, null);\r\n }", "private boolean addNewReport(HttpServletRequest request){\n\t\ttry {\n\t\t\tint totalTime = 0;\n\t\t\tString[] act_sub_values = new String[ReportGenerator.act_sub_names.length];\n\t\t\tString[] lower_activity_values = new String[ReportGenerator.lower_activities.length];\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString value = request.getParameter(ReportGenerator.act_sub_names[i]);\n\t\t\t\tif (!value.equals(\"\")) {\n\t\t\t\t\tact_sub_values[i] = value;\n\t\t\t\t\tif(!checkInt(value)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttotalTime += Integer.parseInt(value);\n\t\t\t\t}else {\n\t\t\t\t\tact_sub_values[i] = \"0\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length; i++) {\n\t\t\t\tString value = request.getParameter(ReportGenerator.lower_activities_names[i]);\n\t\t\t\tif (!value.equals(\"\")) {\n\t\t\t\t\tlower_activity_values[i] = value;\n\t\t\t\t\tif(!checkInt(value)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttotalTime += Integer.parseInt(value);\n\t\t\t\t} else {\n\t\t\t\t\tlower_activity_values[i] = \"0\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tDate date = new Date(cal.getTimeInMillis()); \n\t\t\tString week = request.getParameter(\"week\");\n\t\t\tint userGroupID = (int) session.getAttribute(\"userGroupID\");\n\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tstmt.executeUpdate(\"INSERT INTO reports (user_group_id, date, week, total_time, signed) VALUES (\"+userGroupID+\",'\"+date.toString()+\"',\"+week+\",\"+totalTime+\",\"+0+\")\");\n\n\t\t\tStatement stmt1 = conn.createStatement();\n\t\t\tResultSet rs = stmt1.executeQuery(\"select * from reports where user_group_id = \"+userGroupID+\" and week = \"+week); \n\t\t\tint reportID = -1;\n\t\t\tif (rs.first()) {\n\t\t\t\treportID = rs.getInt(\"id\");\n\t\t\t}\n\t\t\tstmt.close();\n\n\t\t\tString q = \"INSERT INTO report_times (report_id, \";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = ReportGenerator.act_sub_names[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = ReportGenerator.lower_activities[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += ReportGenerator.lower_activities[ReportGenerator.lower_activities.length-1];\n\n\t\t\tq += \") VALUES (\"+reportID+\",\";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = act_sub_values[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = lower_activity_values[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += lower_activity_values[lower_activity_values.length-1]+\");\";\n\t\t\tStatement stmt2 = conn.createStatement();\n\t\t\tstmt2.executeUpdate(q);\n\t\t\tstmt2.close();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\n\t\treturn true;\n\t}", "boolean isSetDate();", "public boolean isUsefulReport() {\n if (metadata_ == null) {\n return false;\n }\n return capturedLogContent_ != null && !capturedLogContent_.isEmpty();\n }", "boolean hasSettlementDate();", "public void checkAddTrackDay() {\n int hour = this.timeTrankiManager.getHour();\n int minute = this.timeTrankiManager.getMinute();\n\n if (hour == 9 && minute == 00) {\n this.trackListFinal.addTrackDay(1);\n }\n }", "boolean hasFromDay();", "public void tracking_Report()\n {\n\t boolean trackingpresent =trackingreport.size()>0;\n\t if(trackingpresent)\n\t {\n\t\t //System.out.println(\"Tracking report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Tracking report is not present\");\n\t }\n }", "void onReportResult(Report report, boolean isNew);", "public boolean checkForDuplicates(StockId stock_key) {\n\t\treturn stockRepo.findById(stock_key).isPresent();\n\t}", "@Override\r\n\tpublic boolean isExist() {\n\t\treturn false;\r\n\t}", "private boolean CheckAvailableDate(TimePeriod tp)\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query = \"SELECT * FROM Available WHERE available_hid = '\"+hid+\"' AND \"+\n\t\t\t\t\t\t\t\"startDate = '\"+tp.stringStart+\"' AND endDate = '\"+tp.stringEnd+\"'\"; \n\t\t\t\n\t\t\tResultSet rs = con.stmt.executeQuery(query); \n\t\t\t\n\t\t\tcon.closeConnection();\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\treturn true; \n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "public Boolean isExpired() {\n\t\tCalendar today = Calendar.getInstance();\n\t\treturn today.get(Calendar.DAY_OF_YEAR) != date.get(Calendar.DAY_OF_YEAR);\n\t}", "public boolean addReport(String name,Report report)\n\t{\n\t\tboolean retval = false;\n\t\t\n\t\tif(!reports.containsKey(name))\n\t\t{\n\t\t\treports.put(name, report);\n\t\t\tretval = true;\n\t\t}\n\t\t\n\t\treturn retval;\n\t}", "public boolean checkCurrentDate()\n {\n boolean valid = this.check();\n if(!valid) return valid;\n\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n\n if (date != null\n &&\n (date.after(currentDate) || date.equals(currentDate)))\n {\n super.clearMessage();\n super.setMessage(FacesHelper.getBundleMessage(\"date_after_current\"));\n\n return valid && false;\n }\n return valid;\n }", "private static boolean interestAlreadyAddedThisMonth() {\n\t\tStatement stmt = null;\n \tConnection conn = null;\n \tString sql = \"\";\n \n\t try {\n\t \tClass.forName(JDBCdriver.JDBC_DRIVER);\n\t \t\n\t \tconn = DriverManager.getConnection(JDBCdriver.DB_URL, JDBCdriver.USERNAME, JDBCdriver.PASSWORD);\n\t \t\n\t stmt = conn.createStatement();\n\t \t \n\t sql = \"SELECT *\" +\n\t \" FROM TRANSACTIONS T\" +\n\t \t \" WHERE T.TYPE = 'A'\";\t \n\t \n ResultSet rs = stmt.executeQuery(sql);\n \t \n \t while(rs.next()){\n \t return true;\n \t }\n \t \n \t rs.close();\n \t \n \t return false;\n\t \n\t }catch(SQLException se){\n\t //Handle errors for JDBC\n\t se.printStackTrace();\n\t }catch(Exception e){\n\t //Handle errors for Class.forName\n\t e.printStackTrace();\n\t }finally{\n\t try{\n\t if(conn!=null)\n\t conn.close();\n\t }catch(SQLException se){\n\t se.printStackTrace();\n\t }//end finally try\n\t }//end try\n\t\treturn false;\n\t}", "private boolean isCurrentDataWasChanedByAnotherUser(final Monthly_report_revision monthlyReport) {\n Monthly_report_revision currentMonthlyReport = this.monthly_reportRepository.findAndRefresh(monthlyReport);\n return !StringUtils.equalsIgnoreCase(monthlyReport.getShounin_joutai(),\n currentMonthlyReport.getShounin_joutai());\n }", "public void checkIfXslCreated() {\n final File extStore = Environment.getExternalStorageDirectory();\n File myFile = new File(extStore.getAbsolutePath() + \"/backup/\" + fileName);\n\n if (myFile.exists()) {\n Log.d(\"YES\", \"YES\");\n } else {\n Log.d(\"NO\", \"NO\");\n }\n }", "public boolean isSetCreateDate() {\n return this.createDate != null;\n }", "public boolean isSetCreateDate() {\n return this.createDate != null;\n }", "boolean hasOrderDate();", "@Override\n public boolean isExists(Buyer buyer) {\n return false;\n }", "public boolean isFirstOfTheDay() {\r\n return !strDate.equals(game.settings.getLastSeen());\r\n }", "public boolean exist() {\n\t\treturn false;\n\t}", "public boolean checkTodayCurrencyListInDb() {\n LOGGER.info(\"CHECKING OF EXISTING CURRENCY LIST IN DB.\");\n List<Optional<Currency>> optionalList = currencyRepository.findByDateOfValue(LocalDate.now());\n\n return !optionalList.isEmpty();\n }", "public static String assertCreationDateExists(final String message, final Document document, final String xPath)\r\n throws Exception {\r\n\r\n final String creationDate = getCreationDateValue(document, xPath);\r\n assertNotNull(prepareAssertionFailedMessage(message) + \"No creation-date\", creationDate);\r\n return creationDate;\r\n }", "public boolean wasToday() {\n\t\tlong endInMillis = endTime.getTime();\n\t\tCalendar endTimeDate = Calendar.getInstance();\n\t\tendTimeDate.setTimeInMillis(endInMillis);\n\t\tCalendar today = Calendar.getInstance();\n\t\tif (today.get(Calendar.YEAR) == endTimeDate.get(Calendar.YEAR) && today.get(Calendar.DAY_OF_YEAR) == endTimeDate.get(Calendar.DAY_OF_YEAR)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }", "@Deprecated\n public void verifyIfReportCsvFileExists(final String reportFileName,\n final boolean shallExist) {\n final File reportFile = new File(reportFileLocation + reportFileName);\n int i = 8;\n if (shallExist) {\n do {\n Platform.sleep(Log.giAutomationPause2TO);\n Log.logScriptInfo(\"Waiting for Report to get downloaded\");\n i--;\n } while (!reportFile.exists() && i != 0);\n }\n if (shallExist) {\n Log.altVerify(true, exceptionMessage == null,\n \"if \" + reportFileName + \" exists\");\n } else {\n if (reportFile.delete()) {\n exceptionMessage = \"deleted\";\n Log.logScriptInfo(\n reportFile.getName() + \" was found. Deleting the file.\");\n }\n Log.altVerify(true, exceptionMessage != null,\n \"if \" + reportFileName + \" NOT exists\");\n exceptionMessage = null;\n }\n }", "@Override\r\n\tpublic boolean isExisting() {\n\t\treturn false;\r\n\t}", "public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }", "public boolean isOverdue(int today);", "boolean hasDay();", "boolean hasDay();", "if (payDateTime == adhocTicket.getPaidDateTime()) {\n System.out.println(\"Paid Date Time is passed\");\n }", "public boolean exists() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry { return myData.record.exists(background.getClient()); }\n\t\tcatch (LDBException e) { setStatus(e); }\n\t\treturn false;\n\t}", "private void todayReport() {\n\t\tListSeries dollarEarning = new ListSeries();\n\t\tString[] dates = new String[1];\n\t\t/* Create a DateField with the default style. */\n Calendar calendar=Calendar.getInstance();\n\t\t\n\t\tvReportDisplayLayout.removeAllComponents();\n\t\tdates[0] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\tdollarEarning = getTodayData();\n\t\t\n\t\tdisplayChart chart = new displayChart();\n\t\t\n\t\tdReportPanel.setContent(chart.getDisplayChart(dates, dollarEarning));\n\t\tvReportDisplayLayout.addComponent(dReportPanel);\n\t}", "@Override\r\n\tpublic boolean exists() {\n\t\treturn false;\r\n\t}", "public boolean hasReportLimit()\n {\n return (this.getReportLimit() > 0L);\n }", "public boolean isToday()\n {\n Calendar todayCalendar = Calendar.getInstance();\n\n return (calendar.get(Calendar.YEAR ) == todayCalendar.get(Calendar.YEAR ))\n && (calendar.get(Calendar.MONTH ) == todayCalendar.get(Calendar.MONTH ))\n && (calendar.get(Calendar.DAY_OF_MONTH) == todayCalendar.get(Calendar.DAY_OF_MONTH));\n }", "public boolean verifyDataOfDatePicker(boolean isNewToDoPage) {\n try {\n Calendar cal = Calendar.getInstance();\n int currentDay = cal.get(Calendar.DAY_OF_MONTH);\n int currentMonth = cal.get(Calendar.MONTH);\n int currentYear = cal.get(Calendar.YEAR);\n int focusDay = 0;\n int focusMonth = 0;\n int focusYear = 0;\n // If isNewToDoPage = true, verify in add new to-do page\n if (isNewToDoPage) {\n waitForClickableOfElement(eleIdDueDate, \"Due date text box\");\n clickElement(eleIdDueDate, \"click to eleIdDueDate\");\n waitForClickableOfElement(eleXpathChooseDate, \"Date picker\");\n waitForVisibleElement(eleDataPickerToDate, \"Date picker to date\");\n waitForVisibleElement(eleDataPickerToDay, \"Date picker to day\");\n\n focusDay = Integer.parseInt(eleDataPickerToDay.getAttribute(\"text\").trim());\n focusMonth = Integer.parseInt(eleDataPickerToDate.getAttribute(\"data-month\").trim());\n focusYear = Integer.parseInt(eleDataPickerToDate.getAttribute(\"data-year\").trim());\n getLogger().info(\"Day : \" + eleDataPickerToDay.getAttribute(\"text\") + \"Month :\" + eleDataPickerToDate\n .getAttribute(\"data-month\") + \" Year :\" + eleDataPickerToDate.getAttribute(\"data-year\"));\n\n }\n // Compare focus day, month, year with current day, month, year\n if (focusDay != currentDay || focusMonth != currentMonth || focusYear != currentYear) {\n NXGReports.addStep(\"TestScript Failed: Verify data in date pickerd\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return false;\n }\n NXGReports.addStep(\"Verify data in date picker\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify data in date pickerd\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n return true;\n }", "private boolean dateAvailable(List<DateGroup> dateGroups) {\n final int NOT_AVAILABLE = 0;\n return dateGroups.size() > NOT_AVAILABLE;\n }", "private void givenExchangeRateExistsForABaseAndDate() {\n }", "@Override\n\tpublic boolean exists() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean isAccountExist(Account account) {\n\t\treturn false;\r\n\t}", "public boolean calendarExist(String userName) throws RemoteException {\n\t\tSystem.out.println(\"Server: Message > \" + \"calendarExist() invoked\");\n\t\tif (names.contains(userName)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n\tvoid addReportDataToDBTest() {\n\t\tparkName = \"Haifa Park\";\n\t\tboolean condition = false;\n\t\tdate = new Date(120, 4, 1);\n\t\texpected = \"1 2 3 4 5 6 1 23 2 8 9 2 3 2 4 3 2 2 1 1 1 5 32 6 12 7 23 8 12 5 32 6 12 5 2 5\";\n\n\t\tString[] str = expected.split(\" \");\n\n\t\tif (ReportsController.CheckReportExistInDB(reportType, date, parkName))\n\t\t\tassertTrue(condition);\n\n\t\tReportsController.addReportToDB(reportType, date, new ArrayList<>(Arrays.asList(str)), parkName);\n\n\t\tresult = ReportsController.getReport(date, reportType, parkName);\n\n\t\tassertEquals(expected, result);\n\n\t}", "public Boolean hasCardExpired(Date currentDate);", "boolean addHistoricVisitsToUsageReportsBuffer();", "public boolean containsNow() {\r\n return contains(DateTimeUtils.currentTimeMillis());\r\n }", "boolean hasExpirationDate();", "boolean hasEndDate();", "public boolean hasCreateDate() {\n return fieldSetFlags()[2];\n }", "public boolean isNew() {\n return this.lastUpdateTime == NOT_YET;\n }", "boolean hasCreationTime();", "@Override\n\tpublic boolean create(Dates obj) {\n\t\treturn false;\n\t}", "private boolean isNewDay(Calendar calDate) {\n\t\tif (days.size() == 0)\r\n\t\t\treturn true;\r\n\r\n\t\t// get the last day entry\r\n\t\tDay day = days.get(days.size() - 1);\r\n\r\n\t\t// we have a new day if\r\n\t\t// 1a. the previous day was different OR\r\n\t\t// 1b. the previous day last entry was before the day begins AND\r\n\t\t// 2. if the time is after a certain hour (i.e. 4 a.m.) AND\r\n\t\t// 3. more then X number of hours have passed since anything changed\r\n\t\tif (calDate.get(Calendar.HOUR_OF_DAY) > Day.BEGINING_HOUR_OF_DAY\r\n\t\t\t\t&& (day.lastTime.get(Calendar.DAY_OF_YEAR) < calDate.get(Calendar.DAY_OF_YEAR) || day.lastTime\r\n\t\t\t\t\t\t.get(Calendar.HOUR_OF_DAY) < Day.BEGINING_HOUR_OF_DAY)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "boolean hasContinuousDay();", "public boolean existsLoan() throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\ttry{\n\t\t\tString query = \"SELECT * FROM loan \"\n\t\t\t\t\t\t+ \" WHERE client_id = '\"+this.client_id+\"' AND start_date = '\"+this.start_date+\"';\";\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(query);\n\t\t\tif (rs.next())\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}", "public boolean removeReport(String name)\n\t{\n\t\tboolean retval = false;\n\t\t\n\t\tif(reports.containsKey(name))\n\t\t{\n\t\t\treports.remove(name);\n\t\t\tretval = true;\n\t\t}\n\t\t\n\t\treturn retval;\n\t}", "public boolean isSetCreatetime() {\n return this.createtime != null;\n }", "public boolean experired() {\n\t\tint month = Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t\tint year = Calendar.getInstance().get(Calendar.YEAR);\n\t\tString[] parts = this.experiation.split(\"/\");\n\t\tString originalMonth = parts[0];\n\t\tint oM = Integer.parseInt(originalMonth);\n\t\tString originalYear = parts[1];\n\t\tint oY = Integer.parseInt(originalYear);\n\t\t\n\t\tif(oY < year) {\n\t\t\treturn true;\n\t\t}\n\t\tif(oY == year && oM < month) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean isToday(Date lectureDate){\n Date now = new Date();\n if(lectureDate.getYear()<now.getYear()|| lectureDate.getYear()>now.getYear()){\n return false;\n }else{\n if(lectureDate.getMonth()<now.getMonth()||(lectureDate.getMonth()>now.getMonth())){\n return false;\n }else{\n if(lectureDate.getDate()<now.getDate()|| lectureDate.getDate()>now.getDate()){\n return false;\n }else{\n return true;\n }\n }\n }\n }", "private void checkOnlinePaymentAlreadyExistWithCreatedState(PaymentFeeLink paymentFeeLink) {\n Date ninetyMinAgo = new Date(System.currentTimeMillis() - 90 * 60 * 1000);\n Optional<Payment> existedPayment = paymentFeeLink.getPayments().stream()\n .filter(payment -> payment.getPaymentStatus().getName().equalsIgnoreCase(\"created\")\n && payment.getPaymentProvider().getName().equalsIgnoreCase(\"gov pay\")\n && payment.getDateCreated().compareTo(ninetyMinAgo) >= 0)\n .sorted(Comparator.comparing(Payment::getDateCreated).reversed())\n .findFirst();\n\n if (!existedPayment.isEmpty()) {\n delegatingPaymentService.cancel(existedPayment.get(), paymentFeeLink.getCcdCaseNumber(),paymentFeeLink.getEnterpriseServiceName());\n }\n }", "public boolean isSetDay()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DAY$0) != 0;\n }\n }", "public boolean checkDateEqual(LocalDate date) {\n return date.equals(this.date);\n }", "boolean hasExpireDate();", "private boolean updateReport(int reportID, HttpServletRequest request){\n\t\ttry {\n\t\t\tint totalTime = 0;\n\t\t\tString[] act_sub_values = new String[ReportGenerator.act_sub_names.length];\n\t\t\tString[] lower_activity_values = new String[ReportGenerator.lower_activities.length];\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString value = request.getParameter(ReportGenerator.act_sub_names[i]);\n\t\t\t\tif (!value.equals(\"\")) {\n\t\t\t\t\tact_sub_values[i] = value;\n\t\t\t\t\tif(!checkInt(value)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttotalTime += Integer.parseInt(value);\n\t\t\t\t}else {\n\t\t\t\t\tact_sub_values[i] = \"0\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length; i++) {\n\t\t\t\tString value = request.getParameter(ReportGenerator.lower_activities_names[i]);\n\t\t\t\tif (!value.equals(\"\")) {\n\t\t\t\t\tlower_activity_values[i] = value;\n\t\t\t\t\tif(!checkInt(value)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttotalTime += Integer.parseInt(value);\n\t\t\t\t} else {\n\t\t\t\t\tlower_activity_values[i] = \"0\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tDate date = new Date(cal.getTimeInMillis());\n\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tstmt.executeUpdate(\"UPDATE reports SET date='\"+date.toString()+\"',total_time=\"+totalTime+\" WHERE id=\"+reportID);\n\t\t\tstmt.executeUpdate(\"DELETE FROM report_times WHERE report_id=\"+reportID);\n\t\t\tstmt.close();\n\n\t\t\tString q = \"INSERT INTO report_times (report_id, \";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = ReportGenerator.act_sub_names[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = ReportGenerator.lower_activities[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += ReportGenerator.lower_activities[ReportGenerator.lower_activities.length-1];\n\n\t\t\tq += \") VALUES (\"+reportID+\",\";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = act_sub_values[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = lower_activity_values[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += lower_activity_values[lower_activity_values.length-1]+\");\";\n\t\t\tStatement stmt2 = conn.createStatement();\n\t\t\tstmt2.executeUpdate(q);\n\t\t\tstmt2.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\n\t\treturn true;\n\t}", "@And ( \"^The obstetrics patient has a documented labor and delivery report$\" )\n public void existingReportNoTwins () {\n waitForAngular();\n\n final LaborDeliveryReportForm form = new LaborDeliveryReportForm();\n form.setDatetimeOfLabor( ZonedDateTime.of( 2019, 3, 22, 5, 2, 20, 2, ZoneId.of( \"-05:00\" ) ).toString() );\n form.setDatetimeOfDelivery( ZonedDateTime.of( 2019, 3, 22, 10, 2, 20, 2, ZoneId.of( \"-05:00\" ) ).toString() );\n form.setWeight( 1.1 );\n form.setLength( 12.34 );\n form.setHeartRate( 7 );\n form.setBloodPressure( 70 );\n form.setFirstName( \"Madhura\" );\n form.setLastName( \"Waghmare\" );\n\n final ObstetricsRecord record = new ObstetricsRecord();\n final LocalDate lmp = LocalDate.parse( \"2019-03-02\" );\n record.setLmp( lmp );\n record.setConception( 2019 );\n record.setWeeksPreg( 1 );\n record.setHoursInLabor( 25 );\n record.setDeliveryMethod( DeliveryMethod.Cesarean );\n record.setCurrentRecord( true );\n record.setTwins( false );\n record.setPatient( \"JillBob\" );\n record.save();\n form.setObstetricsRecord( record );\n form.setDeliveryMethod( record.getDeliveryMethod() );\n LaborDeliveryReport ldRecord;\n try {\n ldRecord = new LaborDeliveryReport( form );\n ldRecord.setPatient( \"JillBob\" );\n ldRecord.save();\n }\n catch ( final ParseException e ) {\n fail();\n }\n }", "public void CheckRecurring() {\n\n // Set up variables\n ArrayList<Recurring> recurringlist;\n Recurring recurring;\n Transaction transaction;\n long currentime;\n\n int id;\n String name;\n double amount;\n String category;\n long startdate;\n long nextdate;\n int timetype;\n int numofunit;\n int repeats;\n int counter;\n\n // Load all recurring objects into arraylist\n dbHandler.OpenDatabase();\n recurringlist = dbHandler.getAllRecurring();\n\n // cycle through arraylist\n for (int i = 0; i < recurringlist.size(); i++) {\n currentime = dateHandler.currentTimeMilli();\n\n recurring = recurringlist.get(i);\n nextdate = recurring.getNextDate();\n\n\n if (recurring.getCounter() < 1){\n break;\n }\n\n\n // if nextdate < current date\n if (currentime > nextdate){\n // add transaction (with recurring id different)\n transaction = transferringObjects.RecurringToTransaction(recurring);\n dbHandler.addTransaction(transaction);\n\n // reduce counter by 1\n counter = recurring.getCounter() - 1;\n recurring.setCounter(counter);\n\n // update nextdate\n timetype = recurring.getTimeType();\n numofunit = recurring.getNumofUnit();\n nextdate = dateHandler.nextDate(timetype,numofunit,nextdate);\n recurring.setNextDate(nextdate);\n dbHandler.editRecurring(recurring);\n\n // recheck this recurring object\n i--;\n }\n\n\n }\n }", "boolean hasExists();" ]
[ "0.68090767", "0.68044937", "0.6432344", "0.630838", "0.6300194", "0.60715663", "0.60593235", "0.59147054", "0.59146196", "0.5880867", "0.5870716", "0.58693266", "0.5827314", "0.57775825", "0.57759964", "0.57603985", "0.5752552", "0.5742035", "0.5721049", "0.5671637", "0.5659601", "0.56234044", "0.56037664", "0.56000763", "0.55600256", "0.554401", "0.55264556", "0.5515808", "0.54926366", "0.548358", "0.54676443", "0.54599756", "0.5431097", "0.5430994", "0.54292136", "0.5411944", "0.5402742", "0.54026896", "0.5400356", "0.53813046", "0.53796536", "0.53771967", "0.53590035", "0.53208584", "0.53175336", "0.53145903", "0.5312489", "0.5311384", "0.5311384", "0.5308649", "0.5289363", "0.5285057", "0.528406", "0.5280311", "0.52788943", "0.52768093", "0.5274174", "0.52449644", "0.5237219", "0.5223373", "0.5213892", "0.52128106", "0.52128106", "0.5209069", "0.5208114", "0.5201013", "0.5197545", "0.5194697", "0.5188497", "0.5174911", "0.5169126", "0.51682097", "0.51663953", "0.5157458", "0.5156513", "0.5152247", "0.5141166", "0.51401615", "0.5112487", "0.5096801", "0.509596", "0.509583", "0.5095231", "0.5093138", "0.5082001", "0.5080916", "0.50770986", "0.5074436", "0.5067128", "0.5066342", "0.5058059", "0.50508696", "0.5050018", "0.50461036", "0.50457054", "0.50444585", "0.50309265", "0.5029573", "0.50223744", "0.50189227" ]
0.8201045
0
Save the form when "Back" key pressed
@Override public void onBackPressed() { super.onBackPressed(); if (mFormChanged) { saveForm(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onBackPressed() {\n saveData();\n }", "@Override\n public void onBackPressed() {\n showUnsavedChangesDialog();\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 public void onBackPressed( ) {\n update_storage( );\n super.onBackPressed( );\n }", "private void jButton_BackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_BackActionPerformed\n saveToFile();\n new StepThree(this.digPopGUIInformation).setVisible(true);\n dispose();\n }", "@Override\n public void onBackPressed() {\n changeForm(R.id.btnSignInForm);\n }", "@Override\n\tpublic void onBackKeyPressed() {\n\treturn;\t\n\t}", "private void goBack() {\n\n \tsave();\n \t\n \tToast.makeText(ContactActivity.this, getString(R.string.done_contact_toast), Toast.LENGTH_SHORT).show();\n\n dbHelper.commit();\n setResult(RESULT_OK, null);\n finish();\n }", "@Override\r\n public void onBackPressed() {\n if (!RecipeHasChanged) {\r\n super.onBackPressed();\r\n return;\r\n } else {\r\n DialogInterface.OnClickListener discardButtonClickListener = new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n finish();\r\n }\r\n };\r\n //show dialog that there are unsaved changes\r\n showUnsavedChnageDialog(discardButtonClickListener);\r\n }\r\n }", "@Override\n public void onBackPressed() {\n if (!mEditSymptomChanged) {\n super.onBackPressed();\n return;\n }\n //otherwise if there are unsaved changes setup a dialog to warn the user\n //handles the user confirming that changes should be made\n mHomeChecked = false;\n showUnsavedChangesDialogFragment();\n }", "public void back(){\n\t\tif(validaEditText(R.string.Registro_manual_llena_todos_los_campos)){\n\t\t\tif(guardaLasPreferencias()){\n\t\t\t\t\tDialogos.Toast(RegistroContactosEmergenciaActivity.this, getResources().getString(R.string.Registro_manual_datos_guardados), Toast.LENGTH_SHORT);\n\t\t\t\t\tsuper.onBackPressed();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void onBackKeyPressed() {\n\t\treturn;\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tBack();\n\t}", "@Override\n public void onBackPressed() {\n logBackPressed();\n finishOk();\n }", "protected void handleBack(ActionEvent event) {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tupdata();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tcheckSavePwd();\n\t\tsuper.onBackPressed();\n\t}", "public void keyBackIsPressed(){}", "public void back() {\n Views.goBack();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n unsavedChanges = false;\n //continue with back button\n onBackPressed();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n Write_data();\n overridePendingTransition(R.anim.open_main, R.anim.close_next);\n }", "public void onBackPressed() {\n C0486WU wu = this.f2780c;\n if (wu != null) {\n wu.mo1418b();\n }\n finish();\n Share_IP.super.onBackPressed();\n setResult(0, new Intent());\n }", "public void onBackPressed(){\n // If the pet has not changed\n if(!mPetHasChanged){\n super.onBackPressed();\n return;\n }\n // Otherwise if there are unsaved changes, set a dialog\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 }", "public boolean backPressedSimple(){\n String title = \"Save?\";\n String msg = \"Do you want to save the note before exit?\";\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext(), R.style.AppDialogTheme);\n builder.setTitle(title);\n if (StaticFields.darkThemeSet) {\n builder.setIcon(R.drawable.dialog_warning_dark);\n }else{\n builder.setIcon(R.drawable.dialog_warning);\n }\n builder.setMessage(msg);\n builder.setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n if (!noteTitle.getText().toString().isEmpty()) {\n exit = true;\n //save the data\n StaticFields.noteTitle = noteTitle.getText().toString();\n StaticFields.noteContent = noteContent.getText().toString();\n getActivity().onBackPressed();\n }else{\n new PortableContent(getContext()).showSnackBar(Type.WARNING,\"Title can't be empty.\",\n Duration.SHORT);\n }\n }\n });\n builder.setNegativeButton(\"Discard\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n exit = true;\n StaticFields.noteTitle = StaticFields.noteContent = \"\";\n getActivity().onBackPressed();\n }\n });\n if (!exit) {\n builder.show();\n }\n return exit;\n }", "@Override\r\n public boolean onKeyDown(int keyCode, KeyEvent event) {\r\n if ((keyCode == KeyEvent.KEYCODE_BACK)) {\r\n \tfinish();\r\n \t\r\n return true;\r\n }\r\n return super.onKeyDown(keyCode, event);\r\n }", "public static void goBack() {\n\t\tif (touchGUI.getTouchModel().getGuiModel().isDialogShown()) {\n\t\t\ttouchGUI.getTouchModel().getGuiModel().closeActiveDialog();\n\t\t} else {\n\t\t\t// else go to last view in history\n\t\t\tif (!appWidget.goBack()) {\n\t\t\t\t// if history is empty -> close app\n\t\t\t\tphoneGap.exitApp();\n\t\t\t}\n\t\t}\n\n\t\tlaf.updateUndoSaveButtons();\n\t\ttouchGUI.updateViewSizes();\n\t}", "@Override\n\t\tpublic boolean handleBackPressed() {\n\t\t\treturn false;\n\t\t}", "@Override\n public void onBackPressed() {\n new AlertDialog.Builder(this)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(\"Leaving page\")\n .setMessage(\"You have not saved this new flat. Press Yes to discard or No to remain on page.\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n }", "@Override\n public void onBackPressed() {\n\n DataBase myData = new DataBase(this);\n boolean flag = false;\n\n if(flagT & !flagC)\n {\n flag = myData.updateNotes(value,changedTitle,Date,\"\");\n }\n\n if(flagC & !flagT)\n {\n flag = myData.updateNotes(value,\"\",Date,changedContent);\n }\n\n if(flagC & flagT)\n {\n flag = myData.updateNotes(value,changedTitle,Date,changedContent);\n }\n\n if(flag)\n {\n Toast.makeText(getApplicationContext(),\"Saved\",Toast.LENGTH_SHORT).show();;\n }\n\n Intent intent = new Intent(getApplicationContext(),NoteList.class);\n\n startActivity(intent);\n\n finish();\n\n super.onBackPressed();\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}", "@Override\r\n\tpublic void backButton() {\n\t\t\r\n\t}", "@Override\n public void onBackPressed() {\n //If no changes occur, leave the app's activity\n if (!mPhoneProductHasChanged) {\n super.onBackPressed();\n return;\n }\n //Otherwise, if there are changes to the activity, display a dialog which prompts the user\n //whether he wants to enforce changes or not\n DialogInterface.OnClickListener discardButtonClickListener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //User clicked the \"discard\" button, exit the activity\n finish();\n }\n };\n showUnsavedChangesDialog(discardButtonClickListener);\n\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\t finish();\n\t}", "@Override\n\tpublic void onBackPressed()\n\t\t{\n\t\tbackPressed();\n\t\t}", "@Override\n\tpublic void onBackPressed() {\n\t\t\n\t}", "private void backActionPerformed(ActionEvent e) {\r\n ctr_pres.principal();\r\n setVisible(false);\r\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tbackButtonHandler();\r\n\t\treturn;\r\n\t}", "@Override\n public boolean onKeyDown(int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_BACK) {\n finish();\n }\n return super.onKeyDown(keyCode, event);\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}", "public void back() {\n\t\tstate.back();\n\t}", "@Override\n public void onBackPressed() {\n showEndShiftDialog();\n }", "@Override\n public void onBackPressed() {\n timesBackPressed++;\n if (timesBackPressed > 1) {\n currentStateSaveToSharedPref();\n finish();\n } else\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.leave_warning), Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tthis.finish();\n\t\tsuper.onBackPressed();\n\t}", "@Override\n public void onBackPressed() {\n confirmExit();\n }", "@Override\n public boolean onKeyDown(int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_BACK) {\n finish();\n return true;\n }\n return super.onKeyDown(keyCode, event);\n }", "@Override\n public void onBackPressed() {\n \tshowDialog(DLG_BUTTONS);\n }", "private void btn_BackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_BackActionPerformed\n // go back to database access screen\n SS.StudentScreenPopulate();\n SS.setVisible(true);\n this.setVisible(false);\n\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}", "@Override\n\tpublic void onBackPressed() {\n\treturn;\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tdoBack();\r\n\t}", "public void back()\n\t{\n\t\tdriver.findElementById(OR.getProperty(\"BackButton\")).click();\n\t}", "@Override\n public void onBackPressed() {\n leaveDialog(this);\n }", "@Override\n public void onBackPressed() {\n\n finish();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tthis.finish();\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tgame.getController().undoLastMove();\r\n\t}", "public void back(){\n\t\tswitch(state){\n\t\tcase LOGINID:\n\t\t\tbreak; //do nothing, already at top menu\n\t\tcase LOGINPIN:\n\t\t\tloginMenu();\n\t\t\tbreak;\n\t\tcase TRANSACTION:\n\t\t\tbreak; //do nothing, user must enter the choice to log out\n\t\tcase DEPOSIT:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase DEPOSITNOTIFICATION:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAW:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase BALANCE:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAWALNOTIFICATION:\n\t\t\tbreak; //do onthing, user must press ok\n\t\t}\n\t\t\n\t\tcurrentInput = \"\";\n\t}", "@Override\r\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n this.finish();\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n this.finish();\n }", "@Override\n public void onBackPressed() {\n Timestamp timestamp = new Timestamp(System.currentTimeMillis());\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyyMMddHHmmssSS\");\n\n String ts = \"Clips-\" + simpleDateFormat.format(timestamp);\n informationManager.saveRecordedBeaconInformation(ts);\n Intent intent = getParentActivityIntent();\n startActivity(intent);\n finish();\n }", "@Override\n\tpublic void onBackPressed()\n\t{\n\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 }", "boolean onBackPressed();", "boolean onBackPressed();", "@Override\n public void onBackPressed() {\n this.finish();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\treturn;\n\t}", "protected void exitByBackKey() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"EXIT\");\n builder.setMessage(\"ARE YOU SURE?\");\n builder.setPositiveButton(\"EXIT\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n\n builder.setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n return;\n }\n });\n builder.show();\n\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "@Override\n public void onBackPressed() {\n finish();\n }", "public void onGoBackClicked() {\r\n EnterChange();\r\n\r\n //condition to check if time is entered by customer\r\n if(textTime.getText().length() > 0){\r\n _ReservationList.load();\r\n\r\n EnterChange();\r\n Stage stage = (Stage) btnGoBack.getScene().getWindow();\r\n stage.close();\r\n }\r\n }", "@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n public void onBackPressed() {\n return;\n }", "@Override\n\tpublic void onBackPressed() {\n\n\t}", "@Override\n public void onBackPressed() {\n\n if( edf != null ) {\n if( edf.onBackPressed() ) {\n super.onBackPressed();\n }\n }\n }", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\r\n public void onBackPressed() {\r\n \t// Handle the back button click event such that if user \r\n \t// is performing an IMCI or CCM assessment then a confirmation dialog \r\n \t// will be displayed to confirm that the user wishes to exit the \r\n \t// patient assessment\r\n \texitAssessmentDialogHandler();\r\n }", "@Override\n public boolean onKeyDown(int keyCode, KeyEvent event) {\n if(keyCode==KeyEvent.KEYCODE_BACK){\n return back();\n }\n return super.onKeyDown(keyCode, event);\n }", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t}", "@Override\n public void onBackPressed()\n {\n\n }", "@Override\n \tpublic void onBackPressed() {\n \t}", "@Override\n public void onBackPressed() {\n if (!mBookHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, close the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "@Override\n public void onBackPressed() {\n super.onBackPressed();\n finish();\n }", "@Override\r\n\tpublic boolean onKeyDown(int keyCode, KeyEvent event)\r\n\t{\r\n\t\tif ((keyCode == KeyEvent.KEYCODE_BACK))\r\n\t\t{\r\n\t\t\tfinish();\r\n\t\t}\r\n\t\treturn super.onKeyDown(keyCode, event);\r\n\t}" ]
[ "0.7553849", "0.7443691", "0.7354045", "0.73293406", "0.73134094", "0.7279322", "0.7229007", "0.72235113", "0.71194136", "0.71170545", "0.7055443", "0.7054858", "0.70421183", "0.7038857", "0.7028049", "0.7025198", "0.70195496", "0.7019548", "0.69807774", "0.69748354", "0.6966817", "0.69657934", "0.69546163", "0.69400704", "0.6933462", "0.6932916", "0.6931258", "0.6908609", "0.69062465", "0.69048876", "0.69048876", "0.69006115", "0.6900577", "0.6893636", "0.6888146", "0.68789", "0.6868014", "0.686552", "0.6864599", "0.68560106", "0.68560106", "0.68514335", "0.6847007", "0.6843617", "0.68433696", "0.68433595", "0.6843148", "0.6841726", "0.68397325", "0.6837757", "0.6837757", "0.6837757", "0.6832092", "0.6830352", "0.68194485", "0.6814284", "0.68127126", "0.6812189", "0.68048894", "0.68036455", "0.6803463", "0.6802789", "0.6802789", "0.67991245", "0.6789199", "0.67876387", "0.67873377", "0.67873377", "0.6786062", "0.67844725", "0.6782246", "0.6781504", "0.6781504", "0.6781504", "0.6781504", "0.6781504", "0.6781504", "0.6781504", "0.6780959", "0.67733526", "0.67733526", "0.677312", "0.677312", "0.677312", "0.677312", "0.67705667", "0.6769057", "0.67685145", "0.67685145", "0.67685145", "0.67685145", "0.67638", "0.6759056", "0.67531526", "0.67531526", "0.6750937", "0.67446166", "0.67408043", "0.67352647", "0.6734676" ]
0.8644436
0
Save form data to the database
private void saveForm() { if (reportWithCurrentDateExists()) { // Can't save this case return; } boolean isNewReport = (mRowId == null); // Get field values from the form elements // Date SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); String date = df.format(mCalendar.getTime()); // Value Double value; try { value = Double.valueOf(mValueText.getText().toString()); } catch (NumberFormatException e) { value = 0.0; } // Create/update report boolean isSaved; if (isNewReport) { mRowId = mDbHelper.getReportPeer().createReport(mTaskId, date, value); isSaved = (mRowId != 0); } else { isSaved = mDbHelper.getReportPeer().updateReport(mRowId, date, value); } // Show toast notification if (isSaved) { int toastMessageId = isNewReport ? R.string.message_report_created : R.string.message_report_updated; Toast toast = Toast.makeText(getApplicationContext(), toastMessageId, Toast.LENGTH_SHORT); toast.show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\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 saveFormData() {\r\n if(!saveRequired) return;\r\n if(cvHierarchyData != null && cvHierarchyData.size()>0) {\r\n SponsorHierarchyBean sponsorHierarchyBean;\r\n for(int index=0; index<cvHierarchyData.size(); index++) {\r\n try {\r\n sponsorHierarchyBean = (SponsorHierarchyBean)cvHierarchyData.get(index);\r\n if(sponsorHierarchyBean.getAcType() != null) {\r\n if(sponsorHierarchyBean.getAcType() == TypeConstants.UPDATE_RECORD) {\r\n queryEngine.update(queryKey,sponsorHierarchyBean);\r\n }else if(sponsorHierarchyBean.getAcType() == TypeConstants.INSERT_RECORD) {\r\n queryEngine.insert(queryKey,sponsorHierarchyBean);\r\n }else if(sponsorHierarchyBean.getAcType() == TypeConstants.DELETE_RECORD) {\r\n queryEngine.delete(queryKey,sponsorHierarchyBean);\r\n }\r\n }\r\n }catch(CoeusException coeusException){\r\n coeusException.printStackTrace();\r\n }\r\n }\r\n }\r\n saveRequired = false;\r\n }", "void save(DeliveryOrderForm deliveryOrderForm);", "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 }", "protected void saveValues() {\n dataModel.persist();\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}", "public void saveFormData() throws edu.mit.coeus.exception.CoeusException {\r\n instRateClassTypesController.saveFormData();\r\n instituteRatesController.saveFormData(); \r\n }", "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 void saveForm(ActionEvent event) throws SQLException, ParseException {\n actionItemClass obj = new actionItemClass();\n obj.saveForm(this);\n }", "private void onClickSaveButton() {\n // Validate and save form\n if (mDynamicForm.validate()) {\n triggerSubmitForm(mDynamicForm.getForm().getAction(), mDynamicForm.save());\n }\n }", "public void save();", "public void save();", "public void save();", "public void save();", "private void save() {\n if (String.valueOf(tgl_pengobatanField.getText()).equals(null)\n || String.valueOf(waktu_pengobatanField.getText()).equals(null) ) {\n Toast.makeText(getApplicationContext(),\n \"Ada Yang Belum Terisi\", Toast.LENGTH_SHORT).show();\n } else {\n SQLite.insert(nama_pasien2,\n nama_dokter2,\n tgl_pengobatanField.getText().toString().trim(),\n waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),\n hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "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}", "public void savePerson()\r\n { \r\n\t/*get values from text fields*/\r\n\tname = tfName.getText();\r\n\taddress = tfAddress.getText();\r\n\tphone = Integer.parseInt(tfPhone.getText());\r\n\temail = tfEmail.getText();\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null, \"Please enter person name.\");\r\n\t}else\r\n {\r\n\r\n\t /*create a new PersonInfo object and pass it to PersonDAO to save it*/\r\n\t PersonInfo person = new PersonInfo(name, address, phone, email);\r\n\t pDAO.savePerson(person);\r\n\r\n\t JOptionPane.showMessageDialog(null, \"Record added\");\r\n }\r\n }", "private void save(ActionEvent e){\r\n // Make sure all required fields are filled out before saving\r\n if (formIsValid()){\r\n // Check if client currently exists. If so, modify. Otherwise create new entry.\r\n if (existingClient){\r\n // Modify the existing currentClient holder -- Change the variable to global currentClient cache holder\r\n currClient.setName(NAME_FIELD.getText());\r\n currClient.setAddress1(ADDRESS_1_FIELD.getText());\r\n currClient.setAddress2(ADDRESS_2_FIELD.getText());\r\n currClient.setCity(CITY_FIELD.getText());\r\n currClient.setZip(ZIP_FIELD.getText());\r\n currClient.setCountry(COUNTRY_FIELD.getText());\r\n currClient.setPhone(PHONE_FIELD.getText());\r\n // Update client in database\r\n Client.modifyClient(currClient, currClient.getClientID());\r\n }\r\n // Create new client entry\r\n else { \r\n Client c = new Client (NAME_FIELD.getText(),ADDRESS_1_FIELD.getText(),\r\n ADDRESS_2_FIELD.getText(),CITY_FIELD.getText(),\r\n ZIP_FIELD.getText(),COUNTRY_FIELD.getText(),PHONE_FIELD.getText());\r\n Client.addNewClient(c);\r\n }\r\n\r\n existingClient = false; // reset existing client flag\r\n clearFields(); // remove data from fields\r\n // Return to Appt Mgmt Screen if we came from there\r\n if (fromAppt){\r\n goToManageApptScreen();\r\n }\r\n }\r\n // If forms are not complete throw an alert\r\n else {\r\n AlertBox.display(\"Invalid Submission\", \"Form is missing required information or has invalid input.\"\r\n + \" The following information is required:\\n\"\r\n + \"Name\\nAddress 1\\nCity, State, Country, Zipcode\\nPhoneNumber\"\r\n + \"\\nPlease complete form with valid input and submit again.\");\r\n }\r\n }", "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 }", "protected void Save() {\n\t\tString WareName = txtWareName.getText().trim();\n\t\tint WareCap = Integer.parseInt(txtWareCap.getText().trim());\n\t\tString WareAddress = txtWareAddress.getText().trim();\n\t\tint WareUser = Integer.parseInt(txtWareUser.getText().trim());\n\t\tWareUserDto wud = new WareUserDto();\n\t\t\n\t\twud.setWareID(this.wud.getWareID());\n\t\twud.setWareName(WareName);\n\t\twud.setWareCap(WareCap);\n\t\twud.setWareAddress(WareAddress);\n\t\twud.setWareUser(WareUser);\n\t\t\n\t\tif(service.updateWareUserService(wud)){\n\t\t\tList<WareUserDto> list = service.getWareHouseAllInfo();\n\t\t\t//bwj.setTabDate(list);\n\t\t\tbtnWareJDialog.setTabDate(list);\n\t\t\tthis.dispose();\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(this, \"修改失败\", \"错误\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t}", "public void save() {\t\n\t\n\t\n\t}", "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}", "private void save() {\r\n if (String.valueOf(txt_name.getText()).equals(\"\") || String.valueOf(txt_bagian.getText()).equals(\"\")|| String.valueOf(txt_address.getText()).equals(\"\")|| String.valueOf(txt_telp.getText()).equals(\"\")) {\r\n Toast.makeText(getApplicationContext(),\r\n \"Anda belum memasukan Nama atau ALamat ...\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n SQLite.insert(txt_name.getText().toString().trim(),txt_bagian.getText().toString().trim(), txt_address.getText().toString().trim(), txt_telp.getText().toString().trim());\r\n Toast.makeText(getApplicationContext(),\"Berhasil Menambahkan Data\",Toast.LENGTH_SHORT).show();\r\n blank();\r\n finish();\r\n }\r\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 saveToDatabase(View view) {\n // new implementation\n EditText recipeName = findViewById(R.id.input_Name);\n EditText recipeDirections = findViewById(R.id.input_Directions);\n EditText recipeNotes = findViewById(R.id.input_Notes);\n\n\n if (!(recipeName.getText().toString().equals(\"\"))) {\n newRecipe.setName(recipeName.getText().toString());\n newRecipe.setDirections(recipeDirections.getText().toString());\n newRecipe.setNotes(recipeNotes.getText().toString());\n\n dbHandler.addRecipe(newRecipe);\n\n finish();\n }\n else {\n Toast.makeText(this, \"You must enter a name for your recipe!\", Toast.LENGTH_SHORT).show();\n }\n }", "void save();", "void save();", "void save();", "@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}", "public void save() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.save(this);\r\n\t}", "public void insert() {\n SiswaModel m = new SiswaModel();\n m.setNisn(view.getTxtNis().getText());\n m.setNik(view.getTxtNik().getText());\n m.setNamaSiswa(view.getTxtNama().getText());\n m.setTempatLahir(view.getTxtTempatLahir().getText());\n \n //save date format\n String date = view.getDatePickerLahir().getText();\n DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\"); \n Date d = null;\n try {\n d = df.parse(date);\n } catch (ParseException ex) {\n System.out.println(\"Error : \"+ex.getMessage());\n }\n m.setTanggalLahir(d);\n \n //Save Jenis kelamin\n if(view.getRadioLaki().isSelected()){\n m.setJenisKelamin(JenisKelaminEnum.Pria);\n }else{\n m.setJenisKelamin(JenisKelaminEnum.Wanita);\n }\n \n m.setAsalSekolah(view.getTxtAsalSekolah().getText());\n m.setHobby(view.getTxtHoby().getText());\n m.setCita(view.getTxtCita2().getText());\n m.setJumlahSaudara(Integer.valueOf(view.getTxtNis().getText()));\n m.setAyah(view.getTxtNamaAyah().getText());\n m.setAlamat(view.getTxtAlamat().getText());\n \n if(view.getRadioLkkAda().isSelected()){\n m.setLkk(LkkEnum.ada);\n }else{\n m.setLkk(LkkEnum.tidak_ada);\n }\n \n //save agama\n m.setAgama(view.getComboAgama().getSelectedItem().toString());\n \n dao.save(m);\n clean();\n }", "public void save(View view){\n\t\tIntent saveIntent = new Intent(this, SaveActivity.class);\n\t\t//First Name\n\t\tEditText firstName = (EditText) findViewById(R.id.first_name_edit);\n \tString sFirstName = firstName.getText().toString();\n \t\n \t//Last Name\n \tEditText lastName = (EditText) findViewById(R.id.last_name_edit);\n \tString sLastName = lastName.getText().toString();\n \t\n \t//Address\n \tEditText address = (EditText) findViewById(R.id.address_edit);\n \tString sAddress = address.getText().toString();\n \t\n \t//Credit Details\n \tEditText creditDetails = (EditText) findViewById(R.id.credit_details_edit);\n \tString sCreditDetails = creditDetails.getText().toString();\n \t\n \t//Attach Strings to Intent\n \tsaveIntent.putExtra(FIRST_NAME, sFirstName);\n \tsaveIntent.putExtra(LAST_NAME, sLastName);\n \tsaveIntent.putExtra(ADDRESS, sAddress);\n \tsaveIntent.putExtra(CREDIT_DETAILS, sCreditDetails);\n \t\n \t//Start Activity\n \tstartActivity(saveIntent);\n\t}", "private void saveStudent() {\n // Check that every required field has been filled in with valid parameters\n if (!checkUserInputValidity()) {\n return;\n }\n\n // Insert the new student info into the database\n if (isEditStudent) {\n updateStudentOnFirebaseDatabase();\n } else {\n // Make a unique id for the student\n String studentId = UUID.randomUUID().toString();\n saveNewStudentToFirebaseDatabase(studentId);\n }\n }", "public void save() {\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 }", "public boolean save();", "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 }", "public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }", "public boolean save(Data model);", "void storeFormState();", "@Override\n\tpublic void saveStudent(StudentForm student) {\n\t\t\n\t}", "public void save(){\n\t\tlowresModelManager.save();\n\t}", "public void save()throws Exception{\n if(!pname1.getText().isEmpty() && !qty1.getText().isEmpty() && !prc1.getText().isEmpty() && !rsp1.getText().isEmpty() ){\r\n s_notif1.setId(\"hide\");\r\n ArrayList<Product> ar = new ArrayList<>();\r\n com.mysql.jdbc.Connection conn = db.getConnection();\r\n Statement stm = conn.createStatement();\r\n int rs = stm.executeUpdate(\"UPDATE products SET \"\r\n + \"name='\"+pname1.getText()+\"', \"\r\n + \"qty='\"+qty1.getText()+\"', \"\r\n + \"price='\"+prc1.getText()+\"',\"\r\n + \"re_stock_point='\"+rsp1.getText()+\"' WHERE ID ='\"+S_ID+\"';\");\r\n if(rs > 0){\r\n s_notif1.setId(\"show\");\r\n }\r\n }\r\n loadData();\r\n }", "@Override\n\tpublic void save(Account userForm) {\n\t\taccount.save(userForm);\n\n\t}", "public void save() throws DfException {\n\t\tobject.save();\n\t}", "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 boolean save() {\n\t\tboolean isCreate = false;\n\t\tif(!validate() || !beforeSave(isCreate)){\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\tupdate();\n\t\t} catch (SQLException e) {\n\t\t\tnew Event(Event.getLeafLevelClassName(this), \"save\",\n\t\t\t\t\t\"SQL error while saving: \" + e.toString(), Event.ERROR);\n\t\t\treturn false;\n\t\t}\n\t\tthis.setPersisted(true);\n\t\tafterSave(isCreate);\n\t\treturn true;\n\t}", "@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n int cid=Integer.parseInt(request.getParameter(\"cid\"));\n String stime=request.getParameter(\"stime\"); \n String etime=request.getParameter(\"etime\");\n int tid=Integer.parseInt(request.getParameter(\"tid\"));\n String date=request.getParameter(\"date\");\n if(request.getParameter(\"action\").equalsIgnoreCase(\"save\")){\n GroupModel gm=new GroupModel();\n gm.setCid(cid);\n gm.setStime(stime);\n gm.setEtime(etime);\n gm.setTid(tid);\n gm.setDate(date);\n System.out.println(\"cid\"+cid);\n System.out.println(\"stime\"+stime);\n System.out.println(\"tis\"+tid);\n GroupDao.insert(gm);\n\n \n }\n \n }", "private void saveData() {\n }", "public static Result save() {\n List<Manufacturer> manufacturers = Manufacturer.find.all();\n if(request().method() == \"POST\")\n {\n // Read form data\n Form<Product> form = Form.form(Product.class).bindFromRequest();\n\n // Validate the name\n if(form.field(\"name\").valueOr(\"\").isEmpty()){\n Logger.info(form.field(\"name\").valueOr(\"\"));\n form.reject(\"name\", \"Product name cannot be empty!!\");\n }\n // Validate the description\n if(form.field(\"description\").valueOr(\"\").isEmpty()){\n Logger.info(form.field(\"description\").valueOr(\"\"));\n form.reject(\"description\", \"Product description cannot be empty!!\");\n }\n // If errors, return the form\n if(form.hasErrors()){\n Logger.info(\"Why am I here!!!\");\n flash(\"danger\", \"Product form submission has error!!!\");\n return badRequest(views.html.product.form.render(form, manufacturers));\n }\n else{\n Manufacturer manufacturer = Manufacturer.findById(Integer.parseInt(form.field(\"manufacturer_id\").value()));\n Product p = form.get();\n p.manufacturer = manufacturer;\n if(p.id == 0)\n p.save();\n else\n p.update();\n flash(\"success\", \"Product created/updated successfully!!!\");\n return redirect(routes.ProductController.list());\n }\n }\n else{\n flash(\"danger\", \"Invalid product edit request!!!\");\n return redirect(routes.ProductController.list());\n }\n }", "public static void insertForm(Form form) {\n\t\t\n\t\ttry {\n\t\t\tConnection connection = getConnection();\n\t\t\ttry {\n\t\t\t\tPreparedStatement statement = connection.prepareStatement(\"INSERT INTO form (form_version, form_name, field_id, field_value) \"\n\t\t\t\t\t\t+ \"VALUES ('\"+form.getTheVersion()+\"','\"+form.getTheName()+\"', '\"+form.getTheFieldId()+\"', '\"+form.getTheFieldValue()+\"')\");\n\t\t\t\t\n\t\t\t\tstatement.executeUpdate();\n\n statement.close();\n connection.close();\n\t\t\t\t\n\t\t\t}catch(SQLException ex) {\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch (Exception e) {\n e.printStackTrace();\n }\n\t\t\n\t}", "int insert(AbiFormsForm record);", "private String handleSave(WikiContext context, Query form) throws ChildContainerException, IOException {\n System.err.println(\"handleSave -- ENTERED\");\n String name = form.get(\"savepage\");\n String wikiText = form.get(\"savetext\");\n \n System.err.println(\"handleSave --got params\");\n if (name == null || wikiText == null) {\n context.raiseAccessDenied(\"Couldn't parse parameters from POST.\");\n }\n \n System.err.println(\"Writing: \" + name);\n context.getStorage().putPage(name, unescapeHTML(wikiText));\n System.err.println(\"Raising redirect!\");\n context.raiseRedirect(context.makeLink(\"/\" + name), \"Redirecting...\");\n System.err.println(\"SOMETHING WENT WRONG!\");\n return \"unreachable code\";\n }", "private String handleSave(WikiContext context, Query form) throws ChildContainerException, IOException {\n System.err.println(\"handleSave -- ENTERED\");\n String name = form.get(\"savepage\");\n String wikiText = form.get(\"savetext\");\n \n System.err.println(\"handleSave --got params\");\n if (name == null || wikiText == null) {\n context.raiseAccessDenied(\"Couldn't parse parameters from POST.\");\n }\n \n System.err.println(\"Writing: \" + name);\n context.getStorage().putPage(name, unescapeHTML(wikiText));\n System.err.println(\"Raising redirect!\");\n context.raiseRedirect(context.makeLink(\"/\" + name), \"Redirecting...\");\n System.err.println(\"SOMETHING WENT WRONG!\");\n return \"unreachable code\";\n }", "private void postDataToSQLite() {\n if (!inputValidation.isInputEditTextFilled(nomeLogin, regNome, getString(R.string.error_message_name))) {\n return;\n }\n if (!inputValidation.isInputEditTextFilled(emailLogin, regEmail, getString(R.string.error_message_email))) {\n return;\n }\n if (!inputValidation.isInputEditTextEmail(emailLogin, regEmail, getString(R.string.error_message_email))) {\n return;\n }\n if (!inputValidation.isInputEditTextFilled(senhaLogin, regSenha, getString(R.string.error_message_password))) {\n return;\n }\n if (!inputValidation.senhaForca(senhaLogin, regSenha, getString(R.string.error_força_senha))){\n return;\n }\n if (!inputValidation.isInputEditTextFilled(senhaLoginConfirmar, regSenhaConfirmar, getString(R.string.error_message_password))) {\n return;\n }\n if (!inputValidation.isInputEditTextMatches(senhaLogin, senhaLoginConfirmar, regSenhaConfirmar, getString(R.string.error_password_match))) {\n return;\n }\n if (!databaseHelper.checkUser(emailLogin.getText().toString().trim())) {\n user.setNome(nomeLogin.getText().toString().trim());\n user.setEmail(emailLogin.getText().toString().trim());\n user.setSenha(senhaLogin.getText().toString().trim());\n databaseHelper.addUser(user);\n // Snack Bar to show success message that record saved successfully\n Snackbar.make(nestedScrollView, getString(R.string.success_message), Snackbar.LENGTH_SHORT).show();\n emptyInputEditText();\n } else {\n // Snack Bar to show error message that record already exists\n Snackbar.make(nestedScrollView, getString(R.string.error_email_exists), Snackbar.LENGTH_LONG).show();\n }\n }", "private void saveUserDetails() {\n UserModel userModel = new UserModel();\n userModel.setUserName(editUserName.getText().toString());\n userModel.setPassword(editPassword.getText().toString());\n\n /* if (db.insertUserDetils(userModel)) {\n //Toast.makeText(LoginActivity.this, \"Successfully save\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"Data not Saved\", Toast.LENGTH_SHORT).show();\n }*/\n }", "public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}", "public void saveAndClose(ActionEvent ae) {\n\n\t\tif (fieldEmail.getText().isEmpty() || fieldPassword.getText().isEmpty() || fieldName.getText().isEmpty()\n\t\t\t\t|| fieldSurname.getText().isEmpty() || fieldAddress.getText().isEmpty() || fieldCAP.getText().isEmpty()\n\t\t\t\t|| fieldCity.getText().isEmpty() || fieldNumber.getText().isEmpty()) {\n\t\t\tlblError.setText(\"ATTENZIONE: è necessario compilare tutti i campi!\");\n\t\t\tlblError.setVisible(true);\n\n\t\t}\n\n\t\t/*\n\t\t * Controllo errori TODO, eventualmente display errore TODO, salvataggio TODO\n\t\t */\n\t\telse {\n\n\t\t\t//Salvataggio dati\n\t\t\tGlobals.currentUser.setEmail(fieldEmail.getText());\n\t\t\tGlobals.currentUser.setPassword(fieldPassword.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setName(fieldName.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setFamilyName(fieldSurname.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setAddress(fieldAddress.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setAddress(fieldAddress.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setCity(fieldCity.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setCAP(fieldCAP.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setMobileNumber(fieldNumber.getText());\n\t\t\t\n\t\t\tSystem.out.println(\"[✓] Nuovo nome salvato in memoria (ram)\");\n\n\t\t\tJsonSaver.saveUser();\n\t\t\tJsonSaver.saveWorker();\n\t\t\tcloseUI(ae);\n\n\t\t}\n\n\t}", "private void saveProduct() {\n //Delegating to the Presenter to trigger focus loss on listener registered Views,\n //in order to persist their data\n mPresenter.triggerFocusLost();\n\n //Retrieving the data from the views and the adapter\n String productName = mEditTextProductName.getText().toString().trim();\n String productSku = mEditTextProductSku.getText().toString().trim();\n String productDescription = mEditTextProductDescription.getText().toString().trim();\n ArrayList<ProductAttribute> productAttributes = mProductAttributesAdapter.getProductAttributes();\n mCategoryOtherText = mEditTextProductCategoryOther.getText().toString().trim();\n\n //Delegating to the Presenter to initiate the Save process\n mPresenter.onSave(productName,\n productSku,\n productDescription,\n mCategoryLastSelected,\n mCategoryOtherText,\n productAttributes\n );\n }", "public void saveEmpleado(){\n \n //validor los campos antes de generar algún cambio\n if(!camposValidos()) {\n mFrmMantenerEmpleado.messageBoxAlert(Constant.APP_NAME, \"los campos no deben estar vacíos\");\n return;\n }\n \n //empleado nuevo\n boolean isUpdate=true;\n if(mEmpleado==null){ \n isUpdate=false; \n mEmpleado= new Empleado(); \n }\n \n \n mEmpleado.setFullNamePer(mFrmMantenerEmpleado.txtName.getText());//persona\n mEmpleado.setRucDNI(mFrmMantenerEmpleado.txtDniRuc.getText());//persona \n mEmpleado.setEdad((int)mFrmMantenerEmpleado.spnEdad.getValue());//persona\n mEmpleado.setTelefono(mFrmMantenerEmpleado.txtPhone.getText());//persona\n mEmpleado.setCorreo(mFrmMantenerEmpleado.txtEmail.getText());//persona\n mEmpleado.setDireccion(mFrmMantenerEmpleado.txtAddress.getText());//persona\n mEmpleado.setTipoEmpleado(mTipoEmpleadoList.get(mFrmMantenerEmpleado.cmbEmployeeType.getSelectedIndex()));//empleado\n mEmpleado.setSueldo((float)mFrmMantenerEmpleado.spnPayment.getValue());//empleado\n mEmpleado.setHorarioLaboralEmp(mFrmMantenerEmpleado.txtHorarioLaboral.getText());//empleado\n mEmpleado.setEstadoEmp(mFrmMantenerEmpleado.txtEstate.getText());//empleado\n \n \n \n //guardar o actualizar\n mEmpleado.save();\n \n this.mFrmMantenerEmpleado.messageBox(Constant.APP_NAME, (isUpdate?\"Se ha actualizado el empleado\":\"Se ha agregado un nuevo empleado al sistema\") );\n clear();\n }", "@FXML\r\n private void handleSaveBtn(ActionEvent event) {\r\n\r\n LocalDate date_of_birth = dob.getValue(); //get date of birth value from calender and convert it to local date\r\n LocalDate reg_date = registrationDate.getValue(); //get registration date from calendar and convert it to local date\r\n Connection connection = DBConnection.Connect();//creates and instance of the DBConnection class and invokes the Connect Method\r\n String sql;\r\n PreparedStatement pst;\r\n //Beginning of if-else block\r\n if (userTypeComboBox.getValue().equals(\"Admin\")) {\r\n sql = \"INSERT INTO admin (admin_name, admin_gender, admin_DOB, admin_reg_date, admin_phn, profile_pic, admin_login, admin_password)\"\r\n + \" VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n try {\r\n fis = new FileInputStream(f);\r\n pst = connection.prepareStatement(sql);\r\n pst.setString(1, userNameTextField.getText().toUpperCase());\r\n pst.setString(2, radioLabel.getText().toUpperCase());\r\n pst.setString(3, date_of_birth.toString());\r\n pst.setString(4, reg_date.toString());\r\n pst.setString(5, phoneNumberTextField.getText());\r\n pst.setBinaryStream(6, (InputStream) fis, (int) f.length());\r\n pst.setString(7, loginNameTextField.getText());\r\n pst.setString(8, password1Field.getText());\r\n\r\n int i = pst.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW ADMIN RECORD ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n\r\n } catch (FileNotFoundException ex) {\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setContentText(\"FILE UPLOAD ERROR\");\r\n alert.showAndWait();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else if (userTypeComboBox.getValue().equals(\"Doctor\")) {\r\n\r\n sql = \"INSERT INTO doctor(\"\r\n + \"doctor_name,\"\r\n + \" doctor_address,\"\r\n + \"doctor_phone_number,\"\r\n + \"doctor_gender,\"\r\n + \"doctor_pic,\"\r\n + \"doctor_DOB, \"\r\n + \"specialty, \"\r\n + \"doctor_reg_date, \"\r\n + \"doctor_login, \"\r\n + \"doctor_password)\"\r\n + \"VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n try {\r\n fis = new FileInputStream(f);\r\n PreparedStatement statement = connection.prepareStatement(sql);\r\n statement.setString(1, userNameTextField.getText().toUpperCase());\r\n statement.setString(2, addressTextField.getText());\r\n statement.setString(3, phoneNumberTextField.getText());\r\n statement.setString(4, radioLabel.getText().toUpperCase());\r\n statement.setBinaryStream(5, (InputStream) fis, (int) f.length());\r\n statement.setString(6, date_of_birth.toString());\r\n statement.setString(7, specialtyCmbBox.getValue());\r\n statement.setString(8, reg_date.toString());\r\n statement.setString(9, loginNameTextField.getText());\r\n statement.setString(10, password1Field.getText());\r\n int i = statement.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW DOCTOR RECORDED SUCCESSFULLY ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"COULDN'T PASS FILE TO INPUT STREAM\");\r\n }\r\n\r\n } else if (userTypeComboBox.getValue().equals(\"Receptionist\")) {\r\n sql = \"INSERT INTO receptionist (receptionist_name, receptionist_gender, receptionist_address, receptionist_phn, receptionist_reg_date, receptionist_DOB, profile_pic, receptionist_login, receptionist_password)\"\r\n + \" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n try {\r\n fis = new FileInputStream(f);\r\n pst = connection.prepareStatement(sql);\r\n pst.setString(1, userNameTextField.getText().toUpperCase());\r\n pst.setString(2, radioLabel.getText().toUpperCase());\r\n pst.setString(3, addressTextField.getText());\r\n pst.setString(4, phoneNumberTextField.getText());\r\n pst.setString(5, reg_date.toString());\r\n pst.setString(6, date_of_birth.toString());\r\n pst.setBinaryStream(7, (InputStream) fis, (int) f.length());\r\n pst.setString(8, loginNameTextField.getText());\r\n pst.setString(9, password1Field.getText());\r\n\r\n int i = pst.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW RECEPTIONIST RECORD SUCCESSFULLY ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else if (userTypeComboBox.getValue().equals(\"Pharmacist\")) {\r\n sql = \"INSERT INTO pharmacist(pharmacist_name, pharnacist_gender, pharmacist_address, pharnacist_phn, \"\r\n + \"pharnacist_DOB, pharmacist_reg_date, profile_pic, pharnacist_login, pharmacist_password)\"\r\n + \"VALUES (?,?,?,?,?,?,?,?,?)\";\r\n\r\n try {\r\n fis = new FileInputStream(f);\r\n pst = connection.prepareStatement(sql);\r\n\r\n pst = connection.prepareStatement(sql);\r\n pst.setString(1, userNameTextField.getText().toUpperCase());\r\n pst.setString(2, radioLabel.getText().toUpperCase());\r\n pst.setString(3, addressTextField.getText());\r\n pst.setString(4, phoneNumberTextField.getText());\r\n pst.setString(5, date_of_birth.toString());\r\n pst.setString(6, reg_date.toString());\r\n pst.setBinaryStream(7, (InputStream) fis, (int) f.length());\r\n pst.setString(8, loginNameTextField.getText());\r\n pst.setString(9, password1Field.getText());\r\n\r\n int i = pst.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW PHARMACIST RECORD SUCCESSFULLY ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else if (userTypeComboBox.getValue().equals(\"Biologist\")) { //insert into biologist table depending on the value of the userType comboBox\r\n sql = \"INSERT INTO biologist (biologist_name, biologist_gender, biologist_address, \"\r\n + \"biologist_DOB, biologist_reg_date, biologist_phn, profile_pic, biologist_login, biologist_password) \"\r\n + \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n try {\r\n fis = new FileInputStream(f);\r\n pst = connection.prepareStatement(sql);\r\n\r\n pst = connection.prepareStatement(sql);\r\n pst.setString(1, userNameTextField.getText().toUpperCase());\r\n pst.setString(2, radioLabel.getText().toUpperCase());\r\n pst.setString(3, addressTextField.getText());\r\n pst.setString(4, date_of_birth.toString());\r\n pst.setString(5, reg_date.toString());\r\n pst.setString(6, phoneNumberTextField.getText());\r\n pst.setBinaryStream(7, (InputStream) fis, (int) f.length());\r\n pst.setString(8, loginNameTextField.getText());\r\n pst.setString(9, password1Field.getText());\r\n\r\n int i = pst.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW BIOLOGIST RECORD SUCCESSFULLY ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setContentText(\"INVALID USER TYPE\\nCONSULT SYSTEM MANNUAL\");\r\n alert.showAndWait();\r\n }\r\n\r\n }", "private void saveUserDetails()\r\n\t{\r\n\t\t/*\r\n\t\t * Retrieve content from form\r\n\t\t */\r\n\t\tContentValues reg = new ContentValues();\r\n\r\n\t\treg.put(UserdataDBAdapter.C_NAME, txtName.getText().toString());\r\n\r\n\t\treg.put(UserdataDBAdapter.C_USER_EMAIL, txtUserEmail.getText()\r\n\t\t\t\t.toString());\r\n\r\n\t\treg.put(UserdataDBAdapter.C_RECIPIENT_EMAIL, lblAddressee.getText()\r\n\t\t\t\t.toString());\r\n\r\n\t\tif (rdbKilo.isChecked())\r\n\t\t{\r\n\t\t\treg.put(UserdataDBAdapter.C_USES_METRIC, 1);\t// , true\r\n\t\t}\r\n\t\telse\r\n\t\t\tif (rdbPound.isChecked())\r\n\t\t\t{\r\n\t\t\t\treg.put(UserdataDBAdapter.C_USES_METRIC, 0);\t// , false\r\n\t\t\t}\r\n\r\n\t\t/*\r\n\t\t * Save content into database source:\r\n\t\t * http://stackoverflow.com/questions/\r\n\t\t * 9212574/calling-activity-methods-from-fragment\r\n\t\t */\r\n\t\ttry\r\n\t\t{\r\n\t\t\tActivity parent = getActivity();\r\n\r\n\t\t\tif (parent instanceof LauncherActivity)\r\n\t\t\t{\r\n\t\t\t\tif (arguments == null)\r\n\t\t\t\t{\r\n\t\t\t\t\t((LauncherActivity) parent).getUserdataDBAdapter().insert(\r\n\t\t\t\t\t\t\treg);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treg.put(UserdataDBAdapter.C_ID, arguments.getInt(\"userId\"));\r\n\r\n\t\t\t\t\t((LauncherActivity) parent).getUserdataDBAdapter().update(\r\n\t\t\t\t\t\t\treg);\r\n\r\n\t\t\t\t\t((LauncherActivity) parent).queryForUserDetails();\r\n\t\t\t\t}\r\n\t\t\t\tToast.makeText(parent, \"User details successfully stored\",\r\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (SQLException e)\r\n\t\t{\r\n\t\t\tLog.i(this.getClass().toString(), e.getMessage());\r\n\t\t}\r\n\t}", "@FXML\n public void save(ActionEvent event) throws SQLException {\n current.parseRole(roleTextBox.getText());\n \n current.setName(comboFkp.getValue());\n current.setTitle(comboFkm.getValue());\n \n if(inserting) {\n System.out.println(\"Inserting \" + current.getTitle() + \" \" + current.getName());\n // Precisa inserir dois booleanos no final, um para ator e um para diretor\n dh.insertPersonMidia(current.getTitle(), current.getName(), current.getActor(), current.getDirector());\n }\n\n closeWindow();\n }", "public void SaveInfo() {\n if (NameSurname_enter.getText() != null && validateString(NameSurname_enter.getText())) {\n patient.setName(NameSurname_enter.getText());\n } else {\n JOptionPane.showMessageDialog(null, \"Please, enter a valid name and surname. It should only contain characters and spaces. \", \"Warning\", JOptionPane.INFORMATION_MESSAGE);\n }\n if (Age_enter.getText() != null && validateInt(Age_enter.getText())) {\n patient.setAge(Integer.parseInt(Age_enter.getText()));\n } else {\n JOptionPane.showMessageDialog(null, \"Please, enter a valid age. It should be a number. \", \"Warning\", JOptionPane.INFORMATION_MESSAGE);\n }\n if (Sex_box.getSelectedItem().equals(\"Male\")) {\n patient.setSex(\"MALE\");\n } else {\n patient.setSex(\"FEMALE\");\n }\n\n }", "public void save(){\r\n\t\tmanager.save(this);\r\n\t}", "protected void saveDatos() {\r\n\r\n myNombre = (TextView) findViewById(R.id.spinNombre);\r\n myPrecio = (TextView) findViewById(R.id.spinPrecio);\r\n myMarca = (TextView) findViewById(R.id.spinMarca);\r\n myId_juego = (TextView) findViewById(R.id.spinID);\r\n\r\n String id = myId_juego.getText().toString();\r\n String precio = myPrecio.getText().toString();\r\n String marca = myMarca.getText().toString();\r\n String nombre = myNombre.getText().toString();\r\n\r\n try {\r\n MainActivity.myDbHelper.open();\r\n MainActivity.myDbHelper.insertJuegos(nombre, precio, marca, id);\r\n MainActivity.myDbHelper.close();\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "protected abstract void doSave();", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "public void save() {\n sessionBean.saveStudent();\n success = true;\n }", "public void save() {\r\n\t\tString checkQuery = \"SELECT * FROM users WHERE id = \" + this.id;\r\n\t\tStatement stm;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tconnection = DBConnection.getConnection();\r\n\t\t\tstm = connection.createStatement();\r\n\t\t\trs = stm.executeQuery(checkQuery);\r\n\t\t\t// istnieje już ten obiekt - update\r\n\t\t\tif (rs.first()) {\r\n\t\t\t\tString query = \"UPDATE users SET name = \" + toStringOrNULL(name)\r\n\t\t\t\t\t\t+ \", password = \" + toStringOrNULL(password)\r\n\t\t\t\t\t\t+ \", is_admin = \" + isAdmin \r\n\t\t\t\t\t\t+ \", removed_at = \" + toStringOrNULL(removedAt) \r\n\t\t\t\t\t\t+ \" WHERE id = \" + getId();\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t\t// jeszcze go nie ma - zapis nowego\r\n\t\t\telse {\r\n\t\t\t\tString query = \"INSERT INTO users (name, password, removed_at, is_admin) VALUES (\"\r\n\t\t\t\t\t\t+ toStringOrNULL(name) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(password) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(removedAt) + \", \"\r\n\t\t\t\t\t\t+ isAdmin + \")\";\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.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\t}", "Long save(ArticleForm articleForm) throws ServiceException;", "public void saveData(){\n String name = editTextName.getText().toString();\n if(!name.isEmpty()){\n DataManager.getInstance().addName(name);\n }\n\n finish();\n }", "protected void saveRecord() throws DAOException {\r\n\t\t// Prepara para actualizar\r\n\t\tobject.prepareToUpdate();\r\n\t\t// Guarda objecto\r\n\t\tobjectDao.save(object);\r\n\t\t// Guarda registros de relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\t// Asigna Id padre\r\n\t\t\trelco.getId().setDconsecnk(object.getDconsecnk());\r\n\t\t\tsedrelcoDao.save(relco);\r\n\t\t}\r\n\t}", "public void save(Object o) throws BindingException {\r\n \t\ttry {\r\n\t \tif (binding != null) {\r\n\t\t \tbinding.saveFormToModel(form, o);\r\n\t\t \t\r\n\t \t} else {\r\n\t \t\tthrow new BindingException(\"Error! - No binding setted\");\r\n\t \t}\r\n \t\t} catch (BindingException bex) {\r\n \t\t\tthrow bex;\r\n \t\t}\r\n\t }", "@Action(value=\"save\",results={@Result(name=\"save\",location=\"/zjwqueryMange.jsp\")})\n\tpublic String save()\n\t{\n\t\tkehuDAO.save(kehu);\n\t\t//保存 kehu\n\t\tkehuList = (ArrayList) kehuDAO.findAll();\n\t\treturn \"save\";\n\t}", "@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}", "Article saveArticleFromForm(ArticleForm form) throws ServiceException;", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "public static void save() {\n if (instance != null) {\n // -> SyncedDatabases.syncAll();\n instance.markDirty();\n }\n }", "public void save() {\n\t\tSystem.out.println(\"-----------from PersonDao.save()\");\n\t}", "public String save() throws SQLException {\r\n\t\taktieDao = new AktieDAO();\r\n\t\tAktie aktie = new Aktie();\r\n\t\tMeldungFormBean m = new MeldungFormBean();\r\n\t\taktie.setName(name);\r\n\t\taktie.setKuerzel(kuerzel);\r\n\t\taktie.setNominalwert(nominalpreis);\r\n\t\taktie.setDividende(dividende);\r\n\t\taktie = aktieDao.insertAktie(aktie);\r\n\r\n\t\tVerkaufDAO verkaufDao = new VerkaufDAO();\r\n\t\t// insert in DB\r\n\t\tverkaufDao.insertAuftragAdmin(nominalpreis, aktie.getId());\r\n\t\t// Meldung\r\n\t\tm.setAktuelleMeldung(m.getMeldung1() + name);\r\n\t\tm.putMeldungToSession(m);\r\n\t\treturn \"/private/admin/Admin?faces-redirect=true\";\r\n\r\n\t}", "@Override\n public void save()\n {\n \n }", "private void jButtonSaveStageplaatsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSaveStageplaatsActionPerformed\n\n storeDisplayedStageplaats();\n \n this.dbFacade.persist((this.geselecteerdeStageplaats));\n refreshDataCache();\n refreshListbox();\n }", "private void saveDBValues() {\r\n this.pl_DB.setParam(\"Hostname\", this.rhostfield.getText());\r\n this.pl_DB.setParam(\"Port\", this.rportfield.getText());\r\n this.pl_DB.setParam(\"Username\", this.ruserfield.getText());\r\n\r\n String pw = \"\";\r\n for (int i = 0; i < this.rpasswdfield.getPassword().length; i++) {\r\n pw += this.rpasswdfield.getPassword()[i];\r\n }\r\n this.pl_DB.setParam(\"Password\", pw);\r\n this.pl_DB.setParam(\"Database\", this.rdatabasefield.getText());\r\n this.pl_DB.setParam(\"nodeTableName\", this.rtablename1efield.getText());\r\n this.pl_DB.setParam(\"nodeColIDName\", this.colnodeIdfield.getText());\r\n this.pl_DB.setParam(\"nodeColLabelName\", this.colnodeLabelfield.getText());\r\n this.pl_DB.setParam(\"edgeTableName\", this.rtablename2efield.getText());\r\n this.pl_DB.setParam(\"edgeCol1Name\", this.coledge1field.getText());\r\n this.pl_DB.setParam(\"edgeCol2Name\", this.coledge2field.getText());\r\n this.pl_DB.setParam(\"edgeColWeightName\", this.colweightfield.getText());\r\n this.pl_DB.setParam(\"resultTableName\", this.otablenamefield.getText());\r\n\r\n this.is_alg_started = false;\r\n this.is_already_read_from_DB = false;\r\n this.is_already_renumbered = false;\r\n }", "@Override\n public void save() {\n \n }", "public void guardar() {\n String msj = \"\";\n int idpagoanulado = daoPagoCuotaAnulado.nuevoID();\n Date SYSDATE = new Date();\n java.sql.Timestamp fechaPagoCuotaAnuladoSQL = new java.sql.Timestamp(SYSDATE.getTime());\n String observacion = txtObservacion.getText();\n int idmotivo = Integer.parseInt(txtCodigoMotivo.getText());\n int idusuario = appLogin.IDUSUARIO;\n int idpago =Integer.parseInt(txtNumeroPago.getText());\n Date fechapago = daoCotizacion.parseFecha(txtFechaPago.getText());\n java.sql.Date fechapagoSQL = new java.sql.Date(fechapago.getTime());\n double mPago = montoPago;\n String numerocomprobante = txtComprobante.getText();\n String numerorecibo = txtRecibo.getText();\n //VALIDACIONES\n if (idmotivo == 0) {\n msj += \"CODIGO DEL MOTIVO DE ANULACION ESTA VACIO.\\n\";\n }\n if (idpago == 0) {\n msj += \"NO HA SELECCIONADO NINGUN PAGO PARA LA ANULACIÓN.\\n\";\n }\n if (msj.isEmpty()) {\n cpca.setIdpagoanulado(idpagoanulado);\n cpca.setFechahoranulado(fechaPagoCuotaAnuladoSQL);\n cpca.setObservacion(observacion);\n cpca.setIdmotivo(idmotivo);\n cpca.setIdusuario(idusuario);\n cpca.setIdpago(idpago);\n cpca.setFechapago(fechapagoSQL);\n cpca.setMonto(mPago);\n cpca.setNumerocomprobante(numerocomprobante);\n cpca.setNumerorecibo(numerorecibo);\n daoPagoCuotaAnulado.agregar(cpca);\n } else {\n JOptionPane.showMessageDialog(null, msj, \"ERRORES\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void onSaveClicked(View view) {\n if (isAllInputValid()) {\n saveValues();\n showToast(R.string.toast_changes_applied);\n finish();\n }\n else {\n new AlertDialog.Builder(this).\n setTitle(R.string.dialog_error_title).\n setMessage(R.string.dialog_error_msg).\n setPositiveButton(R.string.dialog_error_pos, (dialog, which) -> {}).\n create().show();\n }\n }", "void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }", "public void save()\n\t{\t\n\t\tfor (Preis p : items) {\n\t\t\titmDAO.create(p.getItem());\n\t\t\tprcDAO.create(p);\n\t\t}\n\t\tstrDAO.create(this);\n\t}", "@Override\r\n public void save(BuyTicketModel value) {\n String sql = \"insert into buyticket values(?,?,?,?,?,?,?,?,?,?,?,?) \";\r\n \r\n try {\r\n PreparedStatement pstm = database.getCon().prepareStatement(sql);\r\n pstm.setString(1, value.getSlno());\r\n pstm.setString(2, value.getCustomername());\r\n pstm.setString(10,value.getContact());\r\n pstm.setString(3, value.getDestination());\r\n pstm.setString(4, value.getTime());\r\n pstm.setString(5, value.getFare());\r\n pstm.setString(6, value.getComment());\r\n pstm.setString(7, value.getDate());\r\n pstm.setString(8, value.getPayment());\r\n pstm.setString(9, value.getSeat());\r\n pstm.setString(11, value.getType());\r\n pstm.setString(12, value.getBusname());\r\n \r\n \r\n pstm.executeUpdate();\r\n pstm.close();\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(BuyTicketImpl.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n }", "@Override\n public void save() {\n\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 save(Teacher teacher);", "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 save() throws Exception {\n\t\tgetControl(\"saveButton\").click();\n\t\tVoodooUtils.pause(3000);\n\t}" ]
[ "0.70776993", "0.6981292", "0.6790259", "0.67693913", "0.6712632", "0.66797805", "0.65895474", "0.6541339", "0.65015703", "0.649762", "0.64895594", "0.6480315", "0.6480315", "0.6480315", "0.6480315", "0.647385", "0.64416546", "0.6407843", "0.64017916", "0.6313965", "0.61872077", "0.61594766", "0.6130996", "0.6112697", "0.61004376", "0.60877347", "0.6083922", "0.6083922", "0.6083922", "0.6076133", "0.6059386", "0.6039175", "0.6026128", "0.60002446", "0.5996915", "0.599547", "0.5977405", "0.5970359", "0.596902", "0.59615123", "0.59577614", "0.59524536", "0.5938504", "0.5937448", "0.593151", "0.5924468", "0.59231865", "0.59123176", "0.59018975", "0.590072", "0.5871094", "0.5862822", "0.5859626", "0.58550256", "0.58535045", "0.58512175", "0.5841615", "0.584089", "0.58370936", "0.58266586", "0.5820107", "0.5818757", "0.5812609", "0.57938045", "0.5773716", "0.57727724", "0.57707244", "0.5763809", "0.5757533", "0.5757533", "0.57507074", "0.5746334", "0.5746334", "0.57300806", "0.572227", "0.5709441", "0.5708754", "0.57066643", "0.5705173", "0.5683112", "0.56752354", "0.56643856", "0.5654888", "0.5652952", "0.56472987", "0.5637823", "0.5636768", "0.56317997", "0.5631172", "0.56302977", "0.56273127", "0.5623564", "0.5619369", "0.5606701", "0.56026137", "0.5599633", "0.5595458", "0.55891407", "0.5576004", "0.55728287" ]
0.71291393
0
Launches confirmation dialog asking is user really wants to delete the report, then deletes it if user confirms
private void runDeleteReport() { showDialog(DIALOG_CONFIRM_DELETE_REPORT_ID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void confirmDelete(){\n\t\tAlertDialog.Builder dialog = new AlertDialog.Builder(this);\n\t\tdialog.setIcon(R.drawable.warning);\n\t\tdialog.setTitle(\"Confirm\");\n\t\tdialog.setMessage(\"Are you sure you want to Delete Selected Bookmark(s).?\");\n\t\tdialog.setCancelable(false);\n\t\tdialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdeleteBookmark();\n\t\t\t}\n\t\t});\n\t\tdialog.setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Pack and show\n\t\tAlertDialog alert = dialog.create();\n\t\talert.show();\n\t}", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\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 }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the goal.\n deleteGoal();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public void showDeleteConfirmationAlertDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n //builder.setTitle(\"AlertDialog\");\n builder.setMessage(R.string.income_deletion_confirmation);\n\n // add the buttons\n builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n if (mIncome.getReceiptPic() != null) {\n if (!mIncome.getReceiptPic().equals(\"\")) {\n new File(mIncome.getReceiptPic()).delete();\n }\n }\n mDatabaseHandler.setPaymentLogEntryInactive(mIncome);\n //IncomeListFragment.incomeListAdapterNeedsRefreshed = true;\n setResult(MainActivity.RESULT_DATA_WAS_MODIFIED);\n IncomeViewActivity.this.finish();\n }\n });\n builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n }\n });\n\n // create and show the alert mDialog\n mDialog = builder.create();\n mDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder to display a confirmation message about deleting the book\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.editor_activity_delete_message);\n builder.setPositiveButton(getString(R.string.editor_activity_delete_message_positive),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Delete\"\n deleteBook();\n }\n });\n\n builder.setNegativeButton(getString(R.string.editor_activity_delete_message_negative),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Cancel\"\n if (dialogInterface != null)\n dialogInterface.dismiss();\n }\n });\n\n // Create and show the dialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void actionDelete() {\r\n showDeleteDialog();\r\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteEmployee();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteBook();\n finish();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg_course);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteCourse();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(R.string.delete_dialog_msg);\r\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n // User clicked the \"Delete\" button, so delete the pet.\r\n// deletePet();\r\n }\r\n });\r\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n // User clicked the \"Cancel\" button, so dismiss the dialog\r\n // and continue editing.\r\n if (dialog != null) {\r\n dialog.dismiss();\r\n }\r\n }\r\n });\r\n\r\n // Create and show the AlertDialog\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n // Set the message.\n builder.setMessage(R.string.delete_dialog_msg);\n\n // Handle the button clicks.\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void deleteDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.warmhint));\n\t\tbuilder.setMessage(getString(R.string.changequestion2));\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdeleteAllTag();\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\tgetString(R.string.successdelete),\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "private void addConfirmDialog() {\n builder = UIUtil.getConfirmDialog(getContext(),\"You are about to delete data for this payment. proceed ?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n boolean isDeleted = mydb.deletePayment(paymentId);\n if(isDeleted) {\n Bundle bundle = new Bundle();\n bundle.putString(\"orderId\", String.valueOf(orderId));\n FragmentViewPayments mfragment = new FragmentViewPayments();\n UIUtil.refreshFragment(mfragment,bundle, getFragmentManager());\n } else {\n Toast.makeText(getContext(),\"Error deleting data!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void confirmDeleteLog() {\n new AlertDialog.Builder(this)\n .setTitle(R.string.confirm_delete_log_title)\n .setMessage(R.string.confirm_delete_log_message)\n .setPositiveButton(R.string.btn_delete_log, (dialog, which) -> {\n service.deleteEntireAuditLog();\n dialog.dismiss();\n })\n .setNegativeButton(R.string.btn_cancel, (dialog, which) -> dialog.dismiss())\n .show();\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteAllBooks();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deletePet();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void 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 }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteFav();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "void deleteDialog(){\r\n\t\tString title = getString(R.string.confirm);\r\n\t\tString message = getString(R.string.delete_message);\r\n\t\tString positive = getString(R.string.delete); \r\n\t\tString negative = getString(R.string.cancel);\r\n\t\t\r\n \tAlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\t \r\n \t// set the dialog title\r\n\t builder.setTitle(title);\r\n\t // set the dialog message\r\n\t builder.setMessage(message);\r\n\t\t\r\n\t // set positive button\r\n\t builder.setPositiveButton(positive, new DialogInterface.OnClickListener() {\r\n\t @Override\r\n\t public void onClick(DialogInterface dialog, int id) {\r\n\t \t\r\n\t \t// delete data from database if delete button clicked\r\n\t \tHomeActivity.dbPrograms.deleteData(ProgramID);\r\n\t \tToast.makeText(DetailProgramActivity.this, getString(R.string.success_delete), Toast.LENGTH_SHORT).show();\r\n\t \tgetSupportFragmentManager()\r\n\t\t\t\t.beginTransaction().\r\n\t\t\t\tremove(HomeActivity.programListFrag)\r\n\t\t\t\t.commit();\r\n\t \tfinish();\r\n\t }\r\n\t });\r\n\t \r\n\t // set negative button\r\n\t builder.setNegativeButton(negative, new DialogInterface.OnClickListener() {\r\n\t @Override\r\n\t public void onClick(DialogInterface dialog, int id) {\r\n\t \t// close dialog if cancel button clicked\r\n\t \tdialog.dismiss();\r\n\t }\r\n\t });\r\n\r\n\t // show dialog\r\n\t\tAlertDialog alert = builder.create();\r\n\t\talert.show();\r\n\t}", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the fruit.\n deleteFruit();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the fruit.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteDialog(String yesLabel, String noLabel, String messageText, final int parameterId){\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this,R.style.AppTheme_Dialog));\n builder.setMessage(messageText)\n .setPositiveButton(yesLabel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n new DeleteAquariumTask(parameterId).execute();\n }\n })\n .setNegativeButton(noLabel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n builder.create();\n builder.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the inventory item.\n deleteItem();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the inventory item.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteDialog() {\r\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n View view = View.inflate(this, R.layout.delete_alert_dialog, null);\r\n builder.setView(view);\r\n TextView okBtn = (TextView) view.findViewById(R.id.alert_yes_button);\r\n TextView cancelBtn = (TextView) view.findViewById(R.id.alert_no_button);\r\n final AlertDialog deleteDialog = builder.create();\r\n deleteDialog.show();\r\n okBtn.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n // method to delete file after click on OK button\r\n deleteFile();\r\n deleteDialog.dismiss();\r\n }\r\n });\r\n cancelBtn.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n deleteDialog.dismiss();\r\n }\r\n });\r\n }", "public void deleteReport()\n\t{\n\t\tloading.setVisibility(View.VISIBLE);\n\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"DCIncident\");\n\t\tquery.getInBackground(incident.getId(), new GetCallback<ParseObject>() \n\t\t{\n\t\t\tpublic void done(ParseObject object, ParseException e) \n\t\t\t{\n\t\t\t\tif (e == null) \n\t\t\t\t{\t\t\n\t\t\t\t\tobject.deleteInBackground(new DeleteCallback()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void done(ParseException e) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tIntent returnIntent = new Intent();\n\t\t\t\t\t\t\treturnIntent.putExtra(\"reportPosition\", reportPosition);\n\t\t\t\t\t\t\tsetResult(RESULT_OK, returnIntent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Report is deleted, go back to previous screen\n\t\t\t\t\t\t\tloading.setVisibility(View.INVISIBLE);\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\toverridePendingTransition(R.anim.slide_right_main,\tR.anim.slide_right_sub);\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}", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message\n // This also creates click listeners for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the phone.\n deletePhone();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the phone.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showConfirmationDeleteDialog(\n DialogInterface.OnClickListener yesButtonClickListener) {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.are_you_sure);\n builder.setPositiveButton(R.string.yes, yesButtonClickListener);\n builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the Item.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showConfirmDeletionDialog(){\n //give builder our custom dialog fragment style\n new AlertDialog.Builder(this, R.style.dialogFragment_title_style)\n .setMessage(getString(R.string.powerlist_confirmRemoval))\n .setTitle(getString(R.string.powerList_confirmRemoval_title))\n .setPositiveButton(getString(R.string.action_remove),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n myActionListener.userDeletingPowersFromList(\n PowerListActivity.this.adapter.getSelectedSpells());\n deleteButton.setVisibility(View.GONE);\n //tell adapter to switch selection mode off\n PowerListActivity.this.adapter.endSelectionMode();\n }\n })\n .setNegativeButton(getString(R.string.action_cancel), null)\n .show();\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(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 deleteProduct();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the Product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void deleteButtonClicked(){\n\t\tif (theDialogClient != null) theDialogClient.dialogFinished(DialogClient.operation.DELETEING);\n\t\tdispose();\n\t}", "public void deleteDialog(){\n AlertDialog ad = new AlertDialog.Builder(this).create();\n ad.setMessage(getString(R.string.del_message));\n ad.setButton(getString(R.string.del_btnPos),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n deleteTaleFromStorage();\n }\n });\n ad.setButton2(getResources().getString(R.string.del_btnNeg),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n ad.setCancelable(true);\n ad.show();\n }", "private void initDialog() {\n\t\tint res = JOptionPane.showConfirmDialog(this,\n\t\t\t\tString.format(\"Are you sure you want to delete the file \\\"%s\\\" from your %s account?\",\n\t\t\t\t\t\t this.fileToDelete.getPath(), this.fileToDelete.getRemoteDrive().getServiceNiceName()));\n\t\tif (res == JOptionPane.YES_OPTION) {\n\t\t\tDelMethodWorker dmw = new DelMethodWorker(this.fileToDelete);\n\t\t\tdmw.execute();\n\t\t\tboolean succ;\n\t\t\tint delResult;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsucc = dmw.get(); //TODO: This will block until the file is deleted!\n\t\t\t\tif (succ) {\n\t\t\t\t\t//TODO\n\t\t\t\t\t// I think this should be done by callback, but I\n\t\t\t\t\t// can't get it to work so I've passed in the\n\t\t\t\t\t// model to this dialog... -Cam\n\t\t\t\t\tmodel.removeElement(fileToDelete);\n\t\t\t\t\t\n\t\t\t\t\tdelResult = JOptionPane.showConfirmDialog(this,\n\t\t\t\t\t\t\t\"File had been deleted.\", \"Delete file success\",\n\t\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\t\t\t} else {\n\t\t\t\t\tdelResult = JOptionPane.showConfirmDialog(this,\n\t\t\t\t\t\t\t\"Delete file failed...\" + \"Try again.\",\n\t\t\t\t\t\t\t\"Delete file failure\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\n\t\t\t\tif (delResult == JOptionPane.YES_OPTION) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException | ExecutionException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "public void showDeleteConfirmationDialog(){\n //Create an AlertDialog.Builder and set the message, and click listeners\n //for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Delete this item?\");\n builder.setPositiveButton(\"Delete\", new DialogInterface.OnClickListener(){\n public void onClick(DialogInterface dialog, int id){\n //User clicked the \"Delete\" button, so delete the item.\n deleteItem();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener(){\n public void onClick(DialogInterface dialog, int id){\n //User clicked the \"Cancel\" button, so dismiss the dialog\n //and continue editing the item.\n if(dialog != null){\n dialog.dismiss();\n }\n }\n });\n\n //Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "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}", "public void showSucceedDeleteDialog() {\n\t\tString msg = getApplicationContext().getResources().getString(\n\t\t\t\tR.string.MSG_DLG_LABEL_DELETE_ITEM_SUCCESS);\n\t\tfinal AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n\t\t\t\tthis);\n\t\talertDialogBuilder\n\t\t\t\t.setMessage(msg)\n\t\t\t\t.setCancelable(false)\n\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\tgetApplicationContext().getResources().getString(\n\t\t\t\t\t\t\t\tR.string.MSG_DLG_LABEL_OK),\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\tstartActivity(getIntent());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\tAlertDialog alertDialog = alertDialogBuilder.create();\n\t\talertDialog.show();\n\n\t}", "@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 }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_products_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the product.\n deleteAllProducts();\n }\n });\n builder.setNegativeButton(R.string.cancel, null);\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the product.\n deleteProduct();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_products);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete products.\n deleteAllProducts();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@Override\n public void onClick(View v) {\n builder.setMessage(\"Are you sure you want to delete this?\")\n .setTitle(\"Warning\");\n\n // Add the buttons\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked OK button\n Pokemon crtPokemon = database.PokemonDao().getEntries().get(index);\n database.PokemonDao().delete(crtPokemon);\n finish();\n }\n });\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // 3. Get the AlertDialog from create()\n AlertDialog dialog = builder.create();\n dialog.show();\n\n }", "public void buttonDelete(View view) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(UserEditActivity.this);\n builder.setMessage(R.string.text_delete_confirmation)\n .setTitle(R.string.text_attention_title)\n .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Delete the record confirmed\n deleteRecord();\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "public void delLift(){\n //https://stackoverflow.com/questions/36747369/how-to-show-a-pop-up-in-android-studio-to-confirm-an-order\n AlertDialog.Builder builder = new AlertDialog.Builder(SetsPage.this);\n builder.setCancelable(true);\n builder.setTitle(\"Confirm Delete\");\n builder.setMessage(\"Are you sure you want to delete this lift?\");\n builder.setPositiveButton(\"Confirm Delete\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n lift.setId(lift.getId()*-1);\n Intent intent=new Intent(SetsPage.this, LiftsPage.class);\n intent.putExtra(\"lift\", lift);\n setResult(Activity.RESULT_OK, intent);\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 }", "@FXML\n private void confirmDeletionOfRecords(){\n ObservableList<Record> recordsToBeDeleted = tbvRecords.getSelectionModel().getSelectedItems();\n\n DBhandler db = new DBhandler();\n String title =\"Confirm delete\";\n String HeaderText = \"Record(s) will be permanently deleted\";\n String ContentText = \"Are you sure you want to delete this data?\";\n AlertHandler ah = new AlertHandler();\n\n if(recordsToBeDeleted.isEmpty()){\n ah.getTableError();\n }\n else{\n if (ah.getConfirmation(title, HeaderText, ContentText) == ButtonType.OK) {\n System.out.println(\"Ok pressed\");\n db.deleteRecordsFromDatabase(recordsToBeDeleted);\n populateRecords();\n } else {\n System.out.println(\"Cancel pressed\");\n }\n }}", "@Override\n public void onPermissionGranted(PermissionGrantedResponse response) {\n Dialog deleteDialog = new Dialog(SettingsActivity.this, R.style.Theme_Dialog);\n // Include dialog.xml file\n deleteDialog.setContentView(R.layout.dialog_delete_confirmation);\n deleteDialog.setTitle(null);\n\n TextView agree, disagree, title, content;\n agree = deleteDialog.findViewById(R.id.agree);\n disagree = deleteDialog.findViewById(R.id.disagree);\n title = deleteDialog.findViewById(R.id.title);\n content = deleteDialog.findViewById(R.id.textContent);\n\n title.setText(\"Import Notes?\");\n content.setText(\"Existing backup notes will be replaced by latest imported notes.\");\n\n agree.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n importDB();\n check = 1;\n }\n });\n\n disagree.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n deleteDialog.dismiss();\n }\n });\n\n deleteDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n deleteDialog.show();\n }", "private void showDeleteSuccess() {\n Notification notification = Notification.show(\"Your Advert Has Been Deleted \");\n notification.addThemeVariants(NotificationVariant.LUMO_ERROR);\n UI.getCurrent().getPage().reload();\n }", "private void confirmerSuppressionCourse() {\n new AlertDialog.Builder(this)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(R.string.activity_course_dialog_suppr_title)\n .setMessage(R.string.activity_course_dialog_suppr_message)\n .setPositiveButton(R.string.activity_course_dialog_suppr_yes, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n DbHelper.getInstance(CourseDetails.this).deleteCourse(course);\n finish();\n }\n })\n .setNegativeButton(R.string.activity_course_dialog_suppr_no, null).show();\n }", "private void deleteComic() {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setTitle(\"Delete Comic?\");\n builder.setMessage(\"Are you sure you want to delete this comic? This cannot be undone\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if(dbHandler.deleteComic(comic.getComicID())) {\n //Success\n Toast.makeText(getContext(), \"Comic successfully deleted\", Toast.LENGTH_SHORT).show();\n mainActivity.loadViewCollectionFragment();\n } else {\n //Failure\n Toast.makeText(getContext(), \"Comic not deleted successfully. Please try again\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Nothing needs to happen here\n }\n });\n builder.create().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 }", "public String btn_confirm_delete_action()\n {\n //delete the accession\n getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n deleteSemental(\n getgermplasm$SementalSessionBean().getDeleteSemental());\n //refresh the list\n getgermplasm$SementalSessionBean().getPagination().deleteItem();\n getgermplasm$SementalSessionBean().getPagination().refreshList();\n getgermplasm$SemenGatheringSessionBean().setPagination(null);\n \n //show and hidde panels\n this.getMainPanel().setRendered(true);\n this.getAlertMessage().setRendered(false);\n MessageBean.setSuccessMessageFromBundle(\"delete_semental_success\", this.getMyLocale());\n \n return null;\n }", "private void showDeleteAlert(final String title) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n LayoutInflater layoutInflater = LayoutInflater.from(this);\n final View view = layoutInflater.inflate(R.layout.unfollow_alert_dialog, null);\n TextView tvDialogContent = (TextView) view.findViewById(R.id.dialog_content);\n tvDialogContent.setText(getResources().getString(R.string.delete_topic_message));\n builder.setView(view);\n\n Button yesBtn = (Button) view.findViewById(R.id.yes_btn);\n Button noBtn = (Button) view.findViewById(R.id.no_btn);\n\n yesBtn.setText(getString(R.string.yes));\n noBtn.setText(getString(R.string.no));\n\n final AlertDialog alertDialog = builder.create();\n alertDialog.setCancelable(false);\n alertDialog.show();\n\n yesBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.dismiss();\n deleteMagazine(title);\n }\n });\n\n\n noBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alertDialog.dismiss();\n }\n });\n }", "@FXML\n void confirmDelete () {\n\n// cycles through all Elements to be deleted\n for (Element element : app.deleteElements) {\n\n// if it is a Timeline, it removes it\n if (element instanceof Timeline) {\n app.timelines.remove(element);\n }\n\n// if it is an Event, it finds the relevant Timeline, then removes the Event\n if (element instanceof Event) {\n for (Timeline timeline : app.timelines) {\n if (timeline == ((Event) element).timeline) {\n timeline.events.remove(element);\n }\n }\n }\n }\n\n exitDeleteWindow();\n\n// creates a message for the user\n setMessage(\"Exited Delete Mode: \" + app.deleteElements.size() + \" elements deleted\", false);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.deleteEntrenador) {\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);\n // set title\n //String alert_title = getResources().getString(\"Confirmación\");\n String alert_title = (getResources().getString(R.string.confirmation));\n String alert_description = (getResources().getString(R.string.areYouSure));\n alertDialogBuilder.setTitle(alert_title);\n\n // set dialog message\n alertDialogBuilder\n .setMessage(alert_description)\n .setCancelable(false)\n .setPositiveButton(getResources().getString(R.string.yes),new DialogInterface.OnClickListener() {\n // Lo que sucede si se pulsa yes\n public void onClick(DialogInterface dialog,int id) {\n\n try {\n Client myUserClient = null;\n do {\n myUserClient = ClientsFromEntrenadorSuperAdmin.this.searchEntrenador(selectedEntrenador.getObjectId());\n if (myUserClient != null) {\n HashMap<String, Object> params = new HashMap<String, Object>();\n params.put(\"entrenadorId\", selectedEntrenador.getObjectId());\n ParseCloud.callFunction(\"deleteEntrenadorDependencies\", params);\n }\n }while(myUserClient != null);\n\n HashMap<String, Object> params = new HashMap<String, Object>();\n params.put(\"entrenadorId\", selectedEntrenador.getObjectId());\n ParseCloud.callFunction(\"deleteEntrenador\", params);\n\n } catch (ParseException e) {\n e.printStackTrace();\n } catch (java.text.ParseException e) {\n e.printStackTrace();\n }\n Intent i = new Intent(getApplicationContext(), SuperAdminDashboard.class);\n startActivity(i);\n finish();\n }\n\n\n })\n .setNegativeButton(getResources().getString(R.string.no),new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n // Si se pulsa no no hace nada\n dialog.cancel();\n }\n });\n\n // create alert dialog\n AlertDialog alertDialog = alertDialogBuilder.create();\n\n // show it\n alertDialog.show();\n }\n\n return super.onOptionsItemSelected(item);\n }", "private void deleteItem(final int id){\n // Instantiate AlertDialog builder\n builder = new AlertDialog.Builder(context);\n\n // Inflate the confirmation dialog\n inflater = LayoutInflater.from(context);\n View view = inflater.inflate(R.layout.confirmation_popup, null);\n\n // Instantiate buttons\n Button noButton = view.findViewById(R.id.conf_no_button);\n Button yesButton = view.findViewById(R.id.conf_yes_button);\n\n builder.setView(view);\n dialog = builder.create();\n dialog.show();\n\n\n // When user confirms to delete, delete the task item and clear the dialog\n yesButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // DatabaseHandler\n DatabaseHandler db1 = new DatabaseHandler(context, \"task_details\"); // MODIFIED JUNE 5TH\n\n // Delete the task from database\n db1.deleteTask(id);\n todoItems.remove(getAdapterPosition());\n notifyItemRemoved(getAdapterPosition());\n\n dialog.dismiss();\n }\n });\n\n // When user confirms not to delete, just get rid of the dialog\n noButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n }", "@Override\n public void onPermissionGranted(PermissionGrantedResponse response) {\n Dialog deleteDialog = new Dialog(SettingsActivity.this, R.style.Theme_Dialog);\n // Include dialog.xml file\n deleteDialog.setContentView(R.layout.dialog_delete_confirmation);\n deleteDialog.setTitle(null);\n\n TextView agree, disagree, title, content;\n agree = deleteDialog.findViewById(R.id.agree);\n disagree = deleteDialog.findViewById(R.id.disagree);\n title = deleteDialog.findViewById(R.id.title);\n content = deleteDialog.findViewById(R.id.textContent);\n\n title.setText(\"Export Notes?\");\n content.setText(\"Existing backup notes will be replaced by latest exported notes.\");\n\n agree.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //creating a new folder for the database to be backuped to\n File direct = new File(Environment.getExternalStorageDirectory() + \"/Scrittor_Backup\");\n\n if (!direct.exists()) {\n if (direct.mkdir()) {\n exportDB();\n } else {\n direct.mkdir();\n exportDB();\n }\n }\n exportDB();\n }\n });\n\n disagree.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n deleteDialog.dismiss();\n }\n });\n\n deleteDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n deleteDialog.show();\n }", "@Override\n public void onClickDelete() {\n new DeleteDialog(this.getActivity(), this).show();\n }", "public void onDelete() {\n if (DEBUG) Log.e(Thread.currentThread().getStackTrace()[2].getClassName(), Thread.currentThread().getStackTrace()[2].getMethodName());\n showDialog(R.id.dialog_confirm_delete);\n }", "@FXML\n\tprivate void handleDelete() {\n\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\talert.getButtonTypes().clear();\n\t\talert.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO);\n\t\talert.setHeaderText(lang.getString(\"deleteCustomerMessage\"));\n\t\talert.initOwner(stage);\n\t\talert.showAndWait()\n\t\t.filter(answer -> answer == ButtonType.YES)\n\t\t.ifPresent(answer -> {\n\t\t\tCustomer customer = customerTable.getSelectionModel().getSelectedItem();\n\t\t\tdeleteCustomer(customer);\n\t\t});\n\t}", "private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}", "public void doDeleteconfirm ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\t\tSet deleteIdSet = new TreeSet();\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\tString[] deleteIds = data.getParameters ().getStrings (\"selectedMembers\");\n\t\tif (deleteIds == null)\n\t\t{\n\t\t\t// there is no resource selected, show the alert message to the user\n\t\t\taddAlert(state, rb.getString(\"choosefile3\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdeleteIdSet.addAll(Arrays.asList(deleteIds));\n\t\t\tList deleteItems = new Vector();\n\t\t\tList notDeleteItems = new Vector();\n\t\t\tList nonEmptyFolders = new Vector();\n\t\t\tList roots = (List) state.getAttribute(STATE_COLLECTION_ROOTS);\n\t\t\tIterator rootIt = roots.iterator();\n\t\t\twhile(rootIt.hasNext())\n\t\t\t{\n\t\t\t\tBrowseItem root = (BrowseItem) rootIt.next();\n\n\t\t\t\tList members = root.getMembers();\n\t\t\t\tIterator memberIt = members.iterator();\n\t\t\t\twhile(memberIt.hasNext())\n\t\t\t\t{\n\t\t\t\t\tBrowseItem member = (BrowseItem) memberIt.next();\n\t\t\t\t\tif(deleteIdSet.contains(member.getId()))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(member.isFolder())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(ContentHostingService.allowRemoveCollection(member.getId()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdeleteItems.add(member);\n\t\t\t\t\t\t\t\tif(! member.isEmpty())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnonEmptyFolders.add(member);\n\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{\n\t\t\t\t\t\t\t\tnotDeleteItems.add(member);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(ContentHostingService.allowRemoveResource(member.getId()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdeleteItems.add(member);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnotDeleteItems.add(member);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(! notDeleteItems.isEmpty())\n\t\t\t{\n\t\t\t\tString notDeleteNames = \"\";\n\t\t\t\tboolean first_item = true;\n\t\t\t\tIterator notIt = notDeleteItems.iterator();\n\t\t\t\twhile(notIt.hasNext())\n\t\t\t\t{\n\t\t\t\t\tBrowseItem item = (BrowseItem) notIt.next();\n\t\t\t\t\tif(first_item)\n\t\t\t\t\t{\n\t\t\t\t\t\tnotDeleteNames = item.getName();\n\t\t\t\t\t\tfirst_item = false;\n\t\t\t\t\t}\n\t\t\t\t\telse if(notIt.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tnotDeleteNames += \", \" + item.getName();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnotDeleteNames += \" and \" + item.getName();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\taddAlert(state, rb.getString(\"notpermis14\") + notDeleteNames);\n\t\t\t}\n\n\n\t\t\t/*\n\t\t\t\t\t//htripath-SAK-1712 - Set new collectionId as resources are not deleted under 'more' requirement.\n\t\t\t\t\tif(state.getAttribute(STATE_MESSAGE) == null){\n\t\t\t\t\t String newCollectionId=ContentHostingService.getContainingCollectionId(currentId);\n\t\t\t\t\t state.setAttribute(STATE_COLLECTION_ID, newCollectionId);\n\t\t\t\t\t}\n\t\t\t*/\n\n\t\t\t// delete item\n\t\t\tstate.setAttribute (STATE_DELETE_ITEMS, deleteItems);\n\t\t\tstate.setAttribute (STATE_DELETE_ITEMS_NOT_EMPTY, nonEmptyFolders);\n\t\t}\t// if-else\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\tstate.setAttribute (STATE_MODE, MODE_DELETE_CONFIRM);\n\t\t\tstate.setAttribute(STATE_LIST_SELECTIONS, deleteIdSet);\n\t\t}\n\n\n\t}", "public void onClick(DialogInterface dialog, int id) {\n deleteRecord();\n }", "public ConfirmDialogPage pressDeleteButton() {\n controls.getDeleteButton().click();\n return new ConfirmDialogPage();\n }", "public void tryDelete() throws Exception {\r\n\t\tif (_confirmDelete && getPageDataStoresStatus() != DataStoreBuffer.STATUS_NEW) {\r\n\t\t\tscrollToMe();\r\n if (getValidator().getUseAlertsForErrors()) {\r\n addConfirmScript(_okToDeleteQuestion, _okToDeleteValue);\r\n }\r\n else {\r\n _validator.setErrorMessage(_okToDeleteQuestion, null, -1, _okToDelete);\r\n }\r\n\t\t}\r\n else {\r\n\t\t\tdoDelete();\r\n }\r\n\t}", "void deletePodcast(ActionEvent event){\n //removes context menu that was displaed\n cm.hide();\n //Creates and shows a pop-up that will prompt user to decide what happens to podcast\n Alert alert = new Alert(Alert.AlertType.NONE, \"Delete \"+this.podcast.getTitle()+\"?\", ButtonType.YES, ButtonType.NO, ButtonType.CANCEL);\n alert.showAndWait();\n\n //CASE: YES, deletes podcast\n if(alert.getResult() == ButtonType.YES){\n if(model.DEBUG)\n System.err.println(\"[LibCell] Deleting \"+this.podcast.getTitle());\n\n Main.model.deletePodcast(this.podcast);\n //CASE: NO, hides alert\n } else {\n alert.hide();\n }\n }", "private void popupRemoveTrap() {\n\n new AlertDialog.Builder(this)\n .setTitle(\"Remove \" + trap.getName())\n .setMessage(\"Do you really want to remove \" + trap.getName() + \"?\")\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int whichButton) {\n dialog.dismiss();\n\n Auth.getInstance().removeDeviceTopics(trap.getId(), new Runnable() {\n @Override\n public void run() {\n MqttClient.getInstance().connect();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n remove = true;\n finish();\n }\n });\n }\n });\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n }).show();\n }", "public void onDelete(View view){\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setMessage(\"Are you sure you want to delete this item?\")\n\t\t .setCancelable(false)\n\t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t dialog.cancel();\n\t\t }\n\t\t })\n\t\t\t\t.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t public void onClick(DialogInterface dialog, int id) {\n\t deleteItem();\n\t }\n\t });\n\t\tAlertDialog alert = builder.create();\n\t\talert.show();\n\t}", "@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 confirmRemove(View view) {\n if(networkID == null || networkID.equals(\"Select a Network\"))\n {\n Toast.makeText(getApplicationContext(), \"You must select a network\", Toast.LENGTH_LONG).show();\n return;\n }\n if(gatewayID == null || gatewayID.length() == 0)\n {\n Toast.makeText(getApplicationContext(), \"You must select a gateway\", Toast.LENGTH_LONG).show();\n return;\n }\n AlertDialog.Builder alert = new AlertDialog.Builder(RemoveGatewayActivity.this);\n alert.setTitle(\"Delete\");\n alert.setMessage(\"Are you sure you want to delete \" + gatewayName + \"?\");\n\n alert.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n removeGateway();\n dialog.dismiss();\n }\n });\n\n alert.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n alert.show();\n }", "@Override\n protected Dialog onCreateDialog(int id) {\n final Dialog dialog;\n dialog = new AlertDialog.Builder(this).setMessage(\n \"Are you sure you want to delete \" + listOfMyPalaces.getPalace(palacePosition).getName() + \" ?\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n System.out.println(listOfMyPalaces + \" \" + palacePosition);\n listOfMyPalaces.deletePalace(palacePosition, getApplicationContext());\n finish();\n startActivity(new Intent(MyPalaceDetail.this, ViewPalaceList.class));\n }\n })\n .setNegativeButton(\"No\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n\n }\n }).create();\n return dialog;\n\n }", "public void deleteRelationshipDialog() { new DeleteRelationshipDialog(); }", "public void deleteAllAlert(){\n\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.setHeaderText(\"Du er i ferd med å tømme handlekurven!\");\n alert.setContentText(\"Er du sikker på at du vil fortsette?\");\n\n\n ButtonType cancelButton = new ButtonType(\"Avbryt\", ButtonBar.ButtonData.CANCEL_CLOSE);\n alert.getDialogPane().getButtonTypes().add(cancelButton);\n\n Optional<ButtonType> result = alert.showAndWait();\n\n if (result.isPresent() && result.get() == ButtonType.OK) {\n deleteCartAll();\n }\n }", "@Override\r\n public void onDialogPositiveConfirmation(int requestID) {\r\n switch (requestID) {\r\n case REQUEST_CONFIRMATION_DELETE_EVENT:\r\n deleteEvent();\r\n break;\r\n case REQUEST_CONFIRMATION_DELETE_PHOTO:\r\n deletePressedPhoto();\r\n break;\r\n case REQUEST_CONFIRMATION_DELETE_EVENT_CALENDAR_ENTRY:\r\n removeFromCalendar();\r\n break;\r\n case REQUEST_CONFIRMATION_ADD_EVENT_CALENDAR_ENTRY:\r\n addToCalendar();\r\n break;\r\n }\r\n }", "private void DeleteRecord(final Record temp) {\n\t\tDialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tswitch (which) {\n\t\t\t\tcase DialogInterface.BUTTON_POSITIVE:\n\t\t\t\t\trecordlist.remove(temp);\n\t\t\t\t\tsetRecNull();\n\t\t\t\t\tlistadapter.notifyDataSetChanged();\n\t\t\t\t\tbreak;\n\t\t\t\tcase DialogInterface.BUTTON_NEGATIVE:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\tbuilder.setMessage(\"Are you sure you want to delete the record?\")\n\t\t\t\t.setPositiveButton(\"Yes\", dialogClickListener)\n\t\t\t\t.setNegativeButton(\"No\", dialogClickListener).show();\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 }", "@Override\r\n public void onClick(View v) {\n\t\t\t\tfinal Dialog confirmDialog = new Dialog(context, R.style.Dialog);\r\n\t\t\t\tconfirmDialog.setContentView(R.layout.question_delete);\r\n\t\t\t\tDisplay displaySize = ActivityUtil.getDisplaySize(getContext());\r\n\t\t\t\tconfirmDialog.getWindow().setLayout(displaySize.getWidth(), displaySize.getHeight());\r\n\t\t\t\tconfirmDialog.show();\r\n\t\t\t\t\r\n\t\t\t\t// Adding listeners on each button\r\n\t\t\t\tButton btCancel = (Button) confirmDialog.findViewById(R.id.bt_cancel);\r\n\t\t\t\tButton btConfirm = (Button) confirmDialog.findViewById(R.id.bt_confirm);\r\n \t\r\n btCancel.setOnClickListener(new CloseClickListenerUtil(confirmDialog));\r\n btConfirm.setOnClickListener(new Button.OnClickListener() {\r\n \t\r\n \tpublic void onClick(View v) {\r\n \t\t//\r\n // #91 XXX TODO: Add some error handling to check whether we really need to delete or not before we\r\n // incorrectly assume our REST call to the server worked.\r\n \t\ttry {\r\n\t\t\t\t\t\t\tSmilePlugServerManager spsm = new SmilePlugServerManager();\r\n String status = spsm.deleteQuestionInSessionByNumber(ip, context, currentQuestion);\r\n Toast.makeText(context, status, Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t} catch (NetworkErrorException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n Toast.makeText(context, \"Error deleting question, reason: \" + e.getMessage(), Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t}\r\n \t\t\r\n \t\t\tconfirmDialog.dismiss();\r\n \t\t\tdetailsDialog.dismiss();\r\n \t\t\t\r\n \t\t\t// QuestionsManager.addDeletedQuestionInLocalFile(context, currentQuestion);\r\n\t\t\t\t\t};\r\n });\r\n \t }", "public void verifyDeleteRequestOnPopup() {\n getLogger().info(\"Verify to delete a request on the popup.\");\n boolean isCheckDeleteRequest = false;\n try {\n clickElement(deleteRequestBtn, \"click to deleteRequestBtn\");\n waitForClickableOfLocator(By.xpath(deleteRequestMenuStr));\n Thread.sleep(smallerTimeOut);\n sendKeyTextBox(findRequestEmpty1, \"Deleted the request\", \"send data to findRequestEmpty1\");\n isCheckDeleteRequest = clickElement(deleteRequestMenu, \"click to deleteRequestMenu\");\n if (isCheckDeleteRequest) {\n NXGReports.addStep(\"Verify to delete a request on the popup.\", LogAs.PASSED, null);\n } else {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Verify to delete a request on the popup.\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n } catch (Exception ex) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Verify to delete a request on the popup.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "public void Confirm(){\n new AlertDialog.Builder(MapsActivity.this)\n .setTitle(\"Confirm Location\")\n .setMessage(\"Are you sure about this location?\")\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // continue with delete\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "public void execute() {\n if (myItemSelection.getSize() > 0) {\n confirmationDialogbox = new ConfirmationDialogbox(constants.deleteRolesDialogbox(), patterns.deleteRolesWarn( myItemSelection.getSelectedItems().size()), constants.okButton(), constants.cancelButton());\n confirmationDialogbox.addCloseHandler(new CloseHandler<PopupPanel>(){\n public void onClose(CloseEvent<PopupPanel> event) {\n if(confirmationDialogbox.getConfirmation()){\n deleteSelectedItems();\n }\n }} );\n } else {\n if (myMessageDataSource != null) {\n myMessageDataSource.addWarningMessage(messages.noRoleSelected());\n }\n } \n \n }", "void confirm();", "void onDeleteDataEntryDialogPositiveClick(DeleteDataEntryDialog dialog);", "private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"How would you like to delete data?\", \"Delete Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n jtModel.removeRow(toCount()-toCount());\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted first row\");\n }\n else if(option==1)\n {\n jtModel.removeRow(toCount()-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted last row\");\n }\n else if(option==2)\n {\n toDeletIndex();\n }\n else\n {\n \n }\n }\n }", "public void verifyGUIDeleteConfirmPopup() {\n try {\n String errorMessage = \"Can not test verify gui of delete confirm popup because ToDo list is empty \";\n boolean result = true;\n getLogger().info(\"Verify GUI Delete ToDo popup when click trash ToDo icon.\");\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n // Check ToDo row list is empty\n if (checkEmptyToDoListRow && checkEmptyToDoCompleteListRow) {\n NXGReports.addStep(\"TestScript Failed: \" + errorMessage, LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n AbstractService.sStatusCnt++;\n return;\n }\n // Get id delete row\n String idRow = getIdRowDelete(checkEmptyToDoListRow, checkEmptyToDoCompleteListRow, eleToDoCheckboxRow, eleToDoCompleteCheckboxRow,\n eleToDoRowList, eleToDoCompleteRowList);\n //verify delete confirm icon\n clickElement(trashToDoBtnEle, \"Trash icon click\");\n //verify popup\n PopUpPage popUpPage = new PopUpPage(getLogger(), getDriver());\n result = popUpPage\n .verifyGUIPopUpDelete(categoryTitleEle, centerDeleteToDoDescriptionEle, cancelDeletedToDoButtonEle, deletedToDoButtonEle);\n if (!result) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n //verify close popup icon\n // Check row is delete out of list\n if (!checkEmptyToDoListRow) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoRowList, idRow);\n }\n if (!checkEmptyToDoCompleteListRow && result) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoCompleteRowList, idRow);\n }\n Assert.assertFalse(result, \"Popup icon close does not work\");\n NXGReports.addStep(\"Close popup icon working correct\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "private AlertDialog showDeleteConfirmationDialog(Activity activity)\n {\n AlertDialog alertDialog = new AlertDialog.Builder(activity)\n // set message, title, and icon\n .setTitle(\"Delete\")\n .setMessage(\"Do you want to delete the selection?\")\n .setIcon(android.R.drawable.ic_menu_delete)\n .setPositiveButton(\"Delete\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int whichButton) {\n if(imageFile != null) {\n Toast.makeText(getApplicationContext(),\"Deleting image...\"+imageFile.getName(), Toast.LENGTH_SHORT).show();\n GalleryUtil.deleteImage(imageFile);\n GalleryFragment.listImageModel.remove(currentPosition);\n GalleryFragment.gridAdapter.notifyDataSetChanged();\n activity.finish();\n }\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n })\n .setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialog) {\n dialog.dismiss();\n }\n })\n .create();\n\n return alertDialog;\n }", "public static void deleteAlert() {\n\n }", "private void delete(ActionEvent e){\r\n if (client != null){\r\n ConfirmBox.display(\"Confirm Deletion\", \"Are you sure you want to delete this entry?\");\r\n if (ConfirmBox.response){\r\n Client.deleteClient(client);\r\n AlertBox.display(\"Delete Client\", \"Client Deleted Successfully\");\r\n // Refresh view\r\n refresh();\r\n \r\n }\r\n }\r\n }", "public void deleteChapterWarningFragmentDoPositiveClick() {\n chapterManager.removeChapter();\n finish();\n }", "private void confirmExit() {\n if (hasChanges()) {\n new AlertDialog.Builder(this).\n setMessage(R.string.dialog_discard_msg).\n setNegativeButton(R.string.dialog_discard_neg, (dialog, which) -> {}).\n setPositiveButton(R.string.dialog_discard_pos, (dialog, which) -> finish()).\n create().\n show();\n }\n else {\n showToast(R.string.toast_no_changes);\n finish();\n }\n }", "@Override\r\n public void confirmClicked(boolean result, int id) {\r\n if (result == true) {\r\n deleteSelectedWaypoints();\r\n }\r\n\r\n // reset the current gui screen to be ourselves now that we are done\r\n // with the GuiYesNo dialog\r\n this.mc.displayGuiScreen(this);\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n String[] buttons = { \"Yes\", \"No\" };\n int returnValue = JOptionPane.showOptionDialog(frame, \"Are you sure you want to delete this user?\", \"Confirm Deletion\",\n JOptionPane.WARNING_MESSAGE, 0, null, buttons, buttons[1]);\n\n if (returnValue == 0) {\n Billboard billboard = billboardList.get(billboardJList.getSelectedIndex());\n\n Request deleteBillboard = Request.deleteBillboardReq(billboard.getBillboardName(), connector.session);\n\n Response response;\n\n try {\n response = deleteBillboard.Send(connector);\n } catch (IOException excep) {\n JOptionPane.showMessageDialog(null, \"Cannot delete billboard\");\n return;\n }\n\n // check status of response\n boolean status = response.isStatus();\n\n if (!status) {\n String errorMsg = (String) response.getData();\n JOptionPane.showMessageDialog(null, \"Cannot delete billboard. Error: \" + errorMsg);\n }\n\n if (status) {\n billboardList.remove(billboard);\n model.removeElement(billboard.getBillboardName());\n billboardJList.setModel(model);\n JOptionPane.showMessageDialog(null, \"Billboard successfully deleted.\");\n }\n }\n }", "@FXML\r\n void onActionDelete(ActionEvent event) throws IOException {\r\n\r\n Appointment toDelete = appointmentsTable.getSelectionModel().getSelectedItem();\r\n\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to delete appointment ID# \" + toDelete.getAppointmentID() + \" Title: \" + toDelete.getTitle()\r\n + \" Type: \" + toDelete.getType());\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n\r\n DBAppointments.deleteAppointment(toDelete.getAppointmentID());\r\n\r\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/appointments.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }\r\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\t\t\t\tObject data = event.getButton().getData();\r\n\t\t\t\t\t\t\t\ttableObjects.select(data);\r\n\t\t\t\t\t\t\t\tItem itemClickEvent = tableObjects.getItem(data);\r\n\t\t\t\t\t\t\t\tConfirmDialog.Factory df = new DefaultConfirmDialogFactory() {\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t @Override\r\n\t\t\t\t\t\t\t\t\tpublic ConfirmDialog create(String caption, String message, String okCaption,\r\n\t\t\t\t\t\t\t\t\t\t\tString cancelCaption, String notOkCaption) {\r\n\r\n\t\t\t\t\t\t\t\t ConfirmDialog d = super.create(caption,message,okCaption, cancelCaption, notOkCaption\r\n\t\t\t\t\t\t\t\t );\r\n\t\t\t\t\t\t\t\t // Change the order of buttons\r\n\t\t\t\t\t\t\t\t Button ok = d.getOkButton();\r\n\t\t\t\t\t\t\t\t HorizontalLayout buttons = (HorizontalLayout) ok.getParent();\r\n\t\t\t\t\t\t\t\t buttons.removeComponent(ok);\r\n\t\t\t\t\t\t\t\t buttons.addComponent(ok,1);\r\n\t\t\t\t\t\t\t\t buttons.setComponentAlignment(ok, Alignment.MIDDLE_RIGHT);\r\n\t\t\t\t\t\t\t\t return d;\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\tConfirmDialog.setFactory(df);\t\t\r\n\t\t\t\t\t\t \tConfirmDialog.show(UI.getCurrent(), \"Delete Pack\", \"Are you sure delete all objects of this Pack ?\",\r\n\t\t\t\t\t\t \t \"Yes\", \"No\", new ConfirmDialog.Listener() {\r\n\r\n\t\t\t\t\t\t \t public void onClose(ConfirmDialog dialog) {\r\n\t\t\t\t\t\t \t if (dialog.isConfirmed()) {\r\n\r\n\t\t\t\t\t\t \t \t// Borramos el registro\r\n\t\t\t\t\t\t \t \ttry {\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tconexion = new Conexion();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tConnection con = conexion.getConnection();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tStatement statement = con.createStatement();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tObject rowId = tableObjects.getValue(); // get the selected rows id\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tInteger id = (Integer)tableObjects.getContainerProperty(rowId,\"IdObject\").getValue();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tString cadena = \"DELETE ObjectBYPacks WHERE IDpack =\" + String.valueOf(id); \r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.executeUpdate(cadena);\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.close();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tcon.close();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t\t\t\t\ttableObjects.removeItem(rowId);\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\tnew Notification(\"Process OK\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t\"Object deleted\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.TRAY_NOTIFICATION, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\r\n\t\t\t\t\t\t \t \t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t } catch (SQLException e) {\r\n\t\t\t\t\t\t \t \t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t \t \t\t \te.printStackTrace();\r\n\t\t\t\t\t\t \t \t\t \tnew Notification(\"Got an exception!\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\te.getMessage(),\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.ERROR_MESSAGE, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\r\n\t\t\t\t\t\t \t \t\t \t\r\n\t\t\t\t\t\t \t \t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t\t\t}\r\n\t\t\t\t\t\t \t } \r\n\t\t\t\t\t\t \t }\r\n\t\t\t\t\t\t \t });\r\n\t\t\t\t\t\t\t\t}", "public void deleteRequest(Request request) {\n String title = \"Confirm delete of request(Y/N): \";\n if (Validation.confirmAction(title)) {\n if (Database.deleteRequest(request)) System.out.println(\"Request deleted successfully\");\n else System.out.println(\"Failed to delete request\");\n }else System.out.println(\"Delete of request aborted\");\n }", "@Override\r\n public void onClick(DialogInterface dialog, int which) {\n subjectDAO.deleteFridayEntry(employee);\r\n subjectListAdapter.remove(employee);\r\n Toast.makeText(getActivity(), \"Subject Deleted\",\r\n Toast.LENGTH_SHORT).show();\r\n\r\n }", "private void showConfirmClearDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(getActivity());\n dialog.setTitle(res.getString(R.string.dialog_clear_sale));\n dialog.setPositiveButton(res.getString(R.string.no), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n\n dialog.setNegativeButton(res.getString(R.string.clear), new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n register.cancleSale();\n update();\n }\n });\n\n dialog.show();\n }", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdbService.deleteRecord(idList.get(arg2));\n\t\t\t\t\tinitdate(null);\n\t\t\t\t}", "public static Boolean confirmDeletion() {\n final AtomicReference<Boolean> reference = new AtomicReference<>(false);\n\n TopsoilNotification.showNotification(\n TopsoilNotification.NotificationType.VERIFICATION,\n \"Delete Table\",\n \"Do you really want to delete this table?\\n\"\n + \"This operation can not be undone.\"\n ).ifPresent(response -> {\n if (response == ButtonType.OK) {\n reference.set(true);\n }\n });\n\n return reference.get();\n }", "public boolean getUserConfirmation() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation Box\");\n alert.setHeaderText(\"Are you sure you want to delete?\");\n alert.setResizable(false);\n Optional<ButtonType> result = alert.showAndWait();\n ButtonType button = result.orElse(ButtonType.CANCEL);\n\n if (button == ButtonType.OK) {\n return true;\n } else {\n return false;\n }\n }", "public void DeleteBill(View v) {\r\n\r\n //DeleteVoid(Byte.parseByte(\"1\"));\r\n tblOrderItems.removeAllViews();\r\n\r\n AlertDialog.Builder DineInTenderDialog = new AlertDialog.Builder(myContext);\r\n\r\n LayoutInflater UserAuthorization = (LayoutInflater) myContext\r\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n\r\n View vwAuthorization = UserAuthorization.inflate(R.layout.dinein_reprint, null);\r\n\r\n final ImageButton btnCal_reprint = (ImageButton) vwAuthorization.findViewById(R.id.btnCal_reprint);\r\n\r\n final EditText txtReprintBillNo = (EditText) vwAuthorization.findViewById(R.id.txtDineInReprintBillNumber);\r\n final TextView tv_inv_date = (TextView) vwAuthorization.findViewById(R.id.tv_inv_date);\r\n tv_inv_date.setText(tvDate.getText().toString());\r\n btnCal_reprint.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n DateSelection(tv_inv_date);\r\n }\r\n });\r\n\r\n\r\n DineInTenderDialog.setIcon(R.drawable.ic_launcher)\r\n .setTitle(\"Delete Bill\")\r\n /*.setMessage(\"Enter Bill Number\")*/\r\n .setView(vwAuthorization)\r\n .setNegativeButton(\"Cancel\", null)\r\n .setPositiveButton(\"Delete\", new DialogInterface.OnClickListener() {\r\n\r\n public void onClick(DialogInterface dialog, int which) {\r\n // TODO Auto-generated method stub\r\n\r\n if (txtReprintBillNo.getText().toString().equalsIgnoreCase(\"\")) {\r\n MsgBox.Show(\"Warning\", \"Please enter Bill Number\");\r\n return;\r\n } else if (tv_inv_date.getText().toString().equalsIgnoreCase(\"\")) {\r\n MsgBox.Show(\"Warning\", \"Please enter Bill Date\");\r\n setInvoiceDate();\r\n return;\r\n } else {\r\n try {\r\n int InvoiceNo = Integer.valueOf(txtReprintBillNo.getText().toString());\r\n String date_reprint = tv_inv_date.getText().toString();\r\n tvDate.setText(date_reprint);\r\n Date date = new SimpleDateFormat(\"dd-MM-yyyy\").parse(date_reprint);\r\n Cursor result = dbBillScreen.getBillDetail(InvoiceNo, String.valueOf(date.getTime()));\r\n\r\n\r\n if (result.moveToFirst()) {\r\n if (result.getInt(result.getColumnIndex(\"BillStatus\")) != 0) {\r\n int Custid = result.getInt(result.getColumnIndex(\"CustId\"));\r\n String jBilling_str = result.getString(result.getColumnIndex(\"BillingMode\"));\r\n Cursor crsr = dbBillScreen.getKOTItems(Custid, jBilling_str);\r\n if (crsr != null && crsr.moveToFirst()) {\r\n if (Integer.parseInt(jBilling_str) == 3) {\r\n MsgBox.Show(\"Warning\", \"Since this order is not delivered yet,\\nto delete bill ,kindly goto \\\"PickUp Status\\\" \" +\r\n \"\\n Select this customer and click \\\"Cancel Order \\\"\");\r\n } else if (Integer.parseInt(jBilling_str) == 4) {\r\n MsgBox.Show(\"Warning\", \"Since this order is not delivered yet, \\nto delete bill, kindly goto \\\"Delivery Status\\\" \" +\r\n \"\\n Select this customer and click \\\"Cancel Order \\\"\");\r\n }\r\n return;\r\n } else {\r\n VoidBill(InvoiceNo,String.valueOf(date.getTime()));\r\n }\r\n } else {\r\n\r\n //Toast.makeText(myContext, \"Bill is already voided\", Toast.LENGTH_SHORT).show();\r\n String msg = \"Bill Number \" + InvoiceNo + \" is already voided\";\r\n MsgBox.Show(\"Note\",msg);\r\n Log.d(\"VoidBill\", msg);\r\n }\r\n } else {\r\n //Toast.makeText(myContext, \"No bill found with bill number \" + InvoiceNo, Toast.LENGTH_SHORT).show();\r\n String msg = \"No bill found with bill number \" + InvoiceNo;\r\n MsgBox.Show(\"Note\",msg);\r\n Log.d(\"VoidBill\", msg);\r\n }\r\n ClearAll();\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }).show();\r\n }", "private void promptUserToDeleteGame(final BaseDTO game) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(R.string.removeGame);\n\t\t\n\t\tTextView textView = new TextView(this);\n\t\ttextView.setText(R.string.removeGameMsg);\n\t\tbuilder.setView(textView);\n\t\t\n\t\tbuilder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tremoveGame(game);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuilder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\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}\n\t\t});\n\t\t\n\t\tbuilder.show();\n\t}", "@FXML\r\n void onActionDelete(ActionEvent event) throws IOException {\r\n\r\n Customer customerToDelete = customerTable.getSelectionModel().getSelectedItem();\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to delete customer ID# \" + customerToDelete.getID() + \", Name: \" + customerToDelete.getName());\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n\r\n DBCustomer.deleteCustomer(customerToDelete.getID());\r\n\r\n //Alert alert1 = new Alert(Alert.AlertType.WARNING, \"You have deleted customer ID# \" + customerToDelete.getID() + \", Name: \" + customerToDelete.getName());\r\n //Optional<ButtonType> result1 = alert.showAndWait();\r\n\r\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/MainScreen.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }\r\n\r\n }" ]
[ "0.72815996", "0.71644086", "0.71285194", "0.7085946", "0.7038009", "0.6941081", "0.69333774", "0.69312316", "0.6929058", "0.6925906", "0.6900476", "0.6887684", "0.68848515", "0.6860787", "0.68600065", "0.68350476", "0.6823358", "0.68054056", "0.6791677", "0.6787123", "0.6764471", "0.67544776", "0.67542154", "0.67394555", "0.6703902", "0.66873115", "0.66827923", "0.6673956", "0.66702795", "0.6653145", "0.6653032", "0.6651099", "0.6646905", "0.6624148", "0.6604843", "0.65883803", "0.6572033", "0.6556908", "0.6551936", "0.65146565", "0.65082586", "0.64236563", "0.63928604", "0.6392005", "0.63108355", "0.63102543", "0.6300058", "0.62741375", "0.6254264", "0.6247947", "0.62467784", "0.62423295", "0.6215643", "0.62092733", "0.61989224", "0.6193178", "0.61689234", "0.61650324", "0.61646545", "0.6161625", "0.61593515", "0.6158449", "0.61455923", "0.6144939", "0.61383975", "0.61298716", "0.61285293", "0.61222506", "0.6118874", "0.6117679", "0.6114321", "0.61101145", "0.6103497", "0.6101432", "0.60957223", "0.60871536", "0.6074098", "0.6072372", "0.6064493", "0.60577214", "0.6051085", "0.60308343", "0.6030307", "0.6028648", "0.60148513", "0.6006893", "0.59836185", "0.59819335", "0.5977718", "0.5965634", "0.593821", "0.5937496", "0.59300274", "0.59268767", "0.59126127", "0.59072036", "0.5905064", "0.5890437", "0.58847857", "0.588048" ]
0.81112534
0
/ method that assigns determines the category of the vehicle depending on its weight
private void recordWeight(double weight) { this.weight = weight; if (weight <= 3) { category = "N/A"; } else if ((weight >= 3.1) && (weight <= 4.5)) { category = "LIGHT"; } else if ((weight >= 4.51) && (weight <= 8.0)) { category = "MEDIUM"; } else if (weight > 8.0) { category = "HEAVY"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory();", "private void setWeight() {\n \tthis.trainWeight = (this.trainCars*TRAIN_WEIGHT) + (this.crew + this.numPassengers) * AVE_PASSENGER_WEIGHT;\n }", "private void setWeight(float weight){\n this.weight = weight;\n }", "RoomType getCostCategory();", "public void setWeight(String weight) {\n this.weight = weight;\n }", "public void setWeight(double weight) {\r\n this.weight = weight;\r\n }", "public void setWeight(double w){\n weight = w;\n }", "public void setWeight(double weight) {\n this.weight = weight;\n }", "public void setWeight(float w) {\n weight = w;\n }", "public void setWeight(float value) {\n this.weight = value;\n }", "public void setCargoWeight(int cargoWeight) { // set the cargo weight\n\t\tthis.cargoWeight = cargoWeight;\n\t}", "public void setWeight(int weight){\n\t\tthis.weight = weight;\n\t}", "public ConditionTargetWeight(int weight)\n\t{\n\t\t_weight = weight;\n\t}", "public void setWeight(int w){\n\t\tweight = w;\n\t}", "@Override\r\n\tpublic void setWeight(double weight) {\n\t\t\r\n\t}", "public void setWeight(Integer weight) {\n this.weight = weight;\n }", "public void setWeight(double weight){\n\t\tthis.weight = weight;\n\t}", "public void setWeight(Double weight) {\n this.weight = weight;\n }", "@Override\n public void setWeight(double w) {\n this.weight = w;\n\n }", "public void setWeight(String newValue);", "public void setWeight(int w) {\n\t\tweight = w;\n\t}", "@Override\n\tpublic void setWeight(final double weight) {\n\n\t}", "public void setWeight(final int weight) {\n this.weight = weight;\n }", "public void setWeight(double weight){\n\t\tthis._weight = weight;\n\t}", "public void setWeight(double weight) {\n\t\tthis.weight = weight;\n\t}", "@java.lang.Override public google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = google.maps.fleetengine.v1.Vehicle.VehicleType.Category.valueOf(category_);\n return result == null ? google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED : result;\n }", "public Weight getWeight();", "private Category classify() {\n Category category = null;\n if (name != null) {\n if (name.contains(\"potato\") || name.contains(\"apple\")) {\n category = Category.FOOD;\n } else if (name.contains(\"cloths\") || name.contains(\"pants\") || name.contains(\"shirt\")) {\n category = Category.CLOTHING;\n }\n }\n return category;\n }", "public abstract double getWeight ();", "public int getWeight();", "int getWeight();", "int getWeight();", "@java.lang.Override\n public google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = google.maps.fleetengine.v1.Vehicle.VehicleType.Category.valueOf(category_);\n return result == null ? google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED : result;\n }", "public CategoryWeight(WeightedPairLiteral pair) {\n \n String baseA = pair.getBaseValueA();\n String baseB = pair.getBaseValueB();\n \n List<String> mismatchA = pair.getMismatchTokensA();\n List<String> mismatchB = pair.getMismatchTokensB();\n \n List<String> specialsA = pair.getSpecialTermsA();\n List<String> specialsB = pair.getSpecialTermsB();\n \n Set<CommonSpecialTerm> common = pair.getCommonSpecialTerms();\n \n // giann: added the fullZeroBaseSimilarity check / \n if(baseA.isEmpty() && baseB.isEmpty()){\n fullZeroBaseSimilarity = true;\n }\n \n /*giann: replaced with XOR*/\n if(baseA.isEmpty() ^ baseB.isEmpty()){\n zeroBaseSimilarity = true;\n }\n\n if((mismatchA.isEmpty() && !mismatchB.isEmpty()) || (!mismatchA.isEmpty() && mismatchB.isEmpty())){\n halfEmptyMismatch = true;\n }\n\n if(mismatchA.isEmpty() && mismatchB.isEmpty()){\n fullEmptyMismatch = true;\n }\n \n if(specialsA.isEmpty() && specialsB.isEmpty()){\n emptySpecials = true;\n } \n \n if(common.isEmpty()){\n emptyCommon = true;\n } \n }", "public void setWeight(int newWeight) {\n weight = newWeight;\n }", "public float getWeight();", "public String getVehicleTypeCategory() {\r\n return vehicleType.getCategory();\r\n }", "public void setWeight(final double pWeight){this.aWeight = pWeight;}", "public void setObjectWeight(short weight) { this.objectWeight=weight; }", "double getWeight(V v, V w);", "private static String bmiClassification (Double bmi) {\n String bmiToString = \"\";\n\n if (bmi < 18.5)\n bmiToString = \"Underweight\";\n else if (bmi < 25.0)\n bmiToString = \"Normal\";\n else if (bmi < 30.0)\n bmiToString = \"Overweight\";\n else if (bmi >= 30.0)\n bmiToString = \"Obese\";\n\n return bmiToString;\n }", "public String FindCategory(double index){\n \n if(index < 18.5) \n return \"undernourished.\";\n\n if(index < 25) \n return \"regular.\";\n\n if(index < 30) \n return \"overweight.\";\n \n return \"obese.\"; //Could over accumulated with overweight in Test\n\n }", "public Cucumber(float weight) {\n\t\tthis(DEFAULT_CALORIES, weight);\n\t}", "abstract void setWeight(int i, int j, Double weight);", "public void addWeight(){\n\t\tweight++;\n\t}", "public void setWeight(float value) {\n\t\t\tthis.weight = value;\n\t\t}", "public void setWeight (java.lang.Double weight) {\r\n\t\tthis.weight = weight;\r\n\t}", "public double getWeight(){return this.aWeight;}", "public void setWeight(int x)\n {\n weightCarried=x;\n }", "public int getWeight(){\n \treturn weight;\n }", "public void setWeight(Byte weight) {\n\t\tthis.weight = weight;\n\t}", "private void determinationExciseRate(Vehicle vehicle) {\n if (vehicle.getEngineType().name().equals(\"petrol\") && vehicle.getCapacity() <= 3000) {\n vehicle.setExciseRate(serviceForNumber.roundingNumber(\n (double) 50 / 1000 * vehicle.getAgeCoefficient(),\n 2));\n\n } else if (vehicle.getEngineType().name().equals(\"petrol\") && vehicle.getCapacity() > 3000) {\n vehicle.setExciseRate(serviceForNumber.roundingNumber(\n (double) 100 / 1000 * vehicle.getAgeCoefficient(),\n 2));\n\n } else if (vehicle.getEngineType().name().equals(\"diesel\") && vehicle.getCapacity() <= 3500) {\n vehicle.setExciseRate(serviceForNumber.roundingNumber(\n (double) 75 / 1000 * vehicle.getAgeCoefficient(),\n 2));\n\n } else if (vehicle.getEngineType().name().equals(\"diesel\") && vehicle.getCapacity() > 3500) {\n vehicle.setExciseRate(serviceForNumber.roundingNumber(\n (double) 150 / 1000 * vehicle.getAgeCoefficient(),\n 2));\n\n } else if (vehicle.getEngineType().name().equals(\"electric\")) {\n vehicle.setExciseRate(1);\n }\n }", "public double getWeight(){\n return weight;\n }", "public synchronized void setWeight(int weight){\n\t\tthis.personWeight = weight; \n\t}", "@Override\n protected void calculateCategoryRates(Node node) {\n\n double propVariable = 1.0;\n int cat = 0;\n\n //if (/*invarParameter != null && */invarParameter.getValue() > 0 ) {\n //System.out.println(\"----------------\");\n double pr;\n if(invPrLogit){\n pr = 1.0/(1.0 + Math.exp(-invarParameter.getValue()));\n //System.out.println(pr);\n }else{\n pr = invarParameter.getValue();\n }\n\n if (hasPropInvariantCategory) {\n categoryRates[0] = 0.0;\n //System.out.println(getCurrModel()+\" \"+INVAR_INDEX);\n categoryProportions[0] = pr*INDICATORS[getCurrModel()][INVAR_INDEX];\n //System.out.println(invarParameter.getValue()+\" \"+INDICATORS[getCurrModel()][INVAR_INDEX]);\n //System.out.println(\"categoryProportions[0]: \"+categoryProportions[0]);\n }\n\n //System.out.println(invarParameter.getID()+\" \" +invarParameter.getValue()+\" \"+pr);\n propVariable = 1.0 - pr*INDICATORS[getCurrModel()][INVAR_INDEX];\n if (hasPropInvariantCategory) {\n cat = 1;\n }\n //}\n\n //System.out.println(\"categoryProportions[0]: \"+categoryProportions[0]);\n\n if (INDICATORS[getCurrModel()][SHAPE_INDEX] == PRESENT) {\n\n final double a = shapeParameter.getValue();\n double mean = 0.0;\n final int gammaCatCount = categoryCount - cat;\n //System.out.println(\"a: \"+a);\n final GammaDistribution g = new GammaDistributionImpl(a, 1.0 / a);\n //System.out.println(\"gammaCatCount:\"+gammaCatCount);\n //if(gammaCatCount == 3){\n //throw new RuntimeException(\"\");\n //}\n for (int i = 0; i < gammaCatCount; i++) {\n try {\n // RRB: alternative implementation that seems equally good in\n // the first 5 significant digits, but uses a standard distribution object\n if(a < 1e-3){\n\n categoryRates[i + cat] = Double.NEGATIVE_INFINITY;\n }else if(a > 1e10){\n categoryRates[i + cat] = 1.0;\n }else if (useBeast1StyleGamma) {\n categoryRates[i + cat] = GammaDistributionQuantile((2.0 * i + 1.0) / (2.0 * gammaCatCount), a, 1.0 / a);\n \t} else {\n \t\tcategoryRates[i + cat] = g.inverseCumulativeProbability((2.0 * i + 1.0) / (2.0 * gammaCatCount));\n \t}\n\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(\"Something went wrong with the gamma distribution calculation\");\n System.exit(-1);\n }\n mean += categoryRates[i + cat];\n\n categoryProportions[i + cat] = propVariable / gammaCatCount;\n }\n\n if(a >= 1e-3 ){\n\n mean = (propVariable * mean) / gammaCatCount;\n\n for (int i = 0; i < gammaCatCount; i++) {\n\n categoryRates[i + cat] /= mean;\n\n }\n }\n } else {\n\n int gammaCatCount = categoryCount - cat;\n //System.out.println(\"Hi!\");\n for(int i = cat; i < categoryRates.length;i++){\n categoryRates[i] = 1.0 / propVariable/gammaCatCount;\n\n categoryProportions[i] = propVariable/gammaCatCount;\n }\n }\n /*System.out.println(\"-------------------------------\");\n System.out.println(\"ID: \"+getID());\n System.out.println(modelChoice);\n System.out.print (invarParameter.getValue()*INDICATORS[getCurrModel()][INVAR_INDEX]+\" \");\n System.out.println(getID());\n System.out.println(\"alpha: \"+shapeParameter.getValue());\n System.out.println(\"invPr: \"+invarParameter.getValue());\n System.out.println(\"siteModel: \"+modelChoice.getValue());\n System.out.println(\"rate: \"+muParameter.getValue());\n for(int i = 0; i < categoryRates.length;i++){\n System.out.print(categoryRates[i]+\" \");\n }\n System.out.println();\n\n System.out.println(invarParameter.getValue());\n for(int i = 0; i < categoryProportions.length;i++){\n\n System.out.print(categoryProportions[i]+\" \");\n }\n System.out.println();\n System.out.println(\"----------------\"); */\n\n\n ratesKnown = true;\n }", "public int weight(){\n\t\treturn this.weight;\n\t}", "public int getWeight(){\n\t\treturn weight;\n\t}", "@Override\r\n\tpublic boolean canHaveAsWeight(int weight) {\r\n\t\treturn (weight >= 10 && weight <= 50);\r\n\t}", "public int getWeight() {\n return weight;\n }", "public int getWeight()\n {\n return weight;\n }", "public void testSetWeight()\n {\n WeightedKernel<Vector> instance = new WeightedKernel<Vector>();\n assertEquals(WeightedKernel.DEFAULT_WEIGHT, instance.getWeight());\n \n double weight = RANDOM.nextDouble();\n instance.setWeight(weight);\n assertEquals(weight, instance.getWeight());\n \n weight = 0.0;\n instance.setWeight(weight);\n assertEquals(weight, instance.getWeight());\n \n weight = 4.7;\n instance.setWeight(weight);\n assertEquals(weight, instance.getWeight());\n \n boolean exceptionThrown = false;\n try\n {\n instance.setWeight(-1.0);\n }\n catch ( IllegalArgumentException ex )\n {\n exceptionThrown = true;\n }\n finally\n {\n assertTrue(exceptionThrown);\n }\n \n }", "public void setWeight(double weight) {\n\t\tweightConfiguration.setWeightForIdentifier(this.getIdentifier(), weight);\n\t}", "public int getWeight()\n {\n return weightCarried;\n }", "int getWeight() {\n return weight;\n }", "int getWeight() {\n return weight;\n }", "public double getWeight(){\n\t\treturn this._weight;\n\t}", "public int weight ();", "public SpaceWeights(int weight)\n {\n earthWeight = weight;\n }", "public int weight() {\n \treturn weight;\n }", "public void setMaxWeight(String newValue);", "public float getWeight() {\n return weight;\n }", "public float getWeight() {\n return weight;\n }", "public void setWeight(int weight) {\n\t\tif (weight > 0) {\n\t\t\tthis.weight = weight;\n\t\t} else {\n\t\t\tthis.weight = 0;\n\t\t}\n\t}", "public void setWeight(T3 eWeight) {\r\n\t\tthis.weight = eWeight;\r\n\t}", "public static String getWeightClass(int weight) throws Exception {\n\t\tif (weight < 0) {\n\t\t\tthrow new Exception(\"Invalid weight value\");\n\t\t}\n\n\t\tString weightClass = null;\n\n\t\tswitch (weight) {\n\t\t\tcase 220: {\n\t\t\t\treturn \"Super heavyweight\";\n\t\t\t}\n\t\t\tcase 190: {\n\t\t\t\treturn \"Heavyweight\";\n\t\t\t}\n\t\t\tcase 183: {\n\t\t\t\treturn \"Cruiserweight\";\n\t\t\t}\n\t\t\tcase 175: {\n\t\t\t\treturn \"Super light heavyweight\";\n\t\t\t}\n\t\t\tcase 167: {\n\t\t\t\treturn \"Light heavyweight\";\n\t\t\t}\n\t\t\tcase 160: {\n\t\t\t\treturn \"Super middleweight\";\n\t\t\t}\n\t\t\tcase 154: {\n\t\t\t\treturn \"Middleweight\";\n\t\t\t}\n\t\t\tcase 147: {\n\t\t\t\treturn \"Super welterweight\";\n\t\t\t}\n\t\t\tcase 140: {\n\t\t\t\treturn \"Welterweight\";\n\t\t\t}\n\t\t\tcase 135: {\n\t\t\t\treturn \"Super lightweight\";\n\t\t\t}\n\t\t\tcase 130: {\n\t\t\t\treturn \"Lightweight\";\n\t\t\t}\n\t\t\tcase 126: {\n\t\t\t\treturn \"Super featherweight\";\n\t\t\t}\n\t\t\tcase 122: {\n\t\t\t\treturn \"Featherweight\";\n\t\t\t}\n\t\t\tcase 118: {\n\t\t\t\treturn \"Super bantamweight\";\n\t\t\t}\n\t\t\tcase 115: {\n\t\t\t\treturn \"Bantamweight\";\n\t\t\t}\n\t\t\tcase 112: {\n\t\t\t\treturn \"Super flyweight\";\n\t\t\t}\n\t\t\tcase 0: {\n\t\t\t\treturn \"Flyweight\";\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn weightClass;\n\t\t}\n\t}", "public double getWeight(){\n\t\treturn weight;\n\t}", "private Object getAnomizedCategory() {\r\n\tString categorie = (String) record.get(\"categorie\");\r\n\tif (categorie != null) {\r\n\t switch (categorie) {\r\n\t case \"AD\":\r\n\t case \"CO\":\r\n\t case \"FI\":\r\n\t case \"IBL\":\r\n\t case \"KI\":\r\n\t case \"KL\":\r\n\t case \"VO\":\r\n\t\tbreak;\r\n\t default:\r\n\t\tcategorie = null;\r\n\t\tbreak;\r\n\t }\r\n\t}\r\n\r\n\treturn categorie;\r\n }", "public int weight() {\n if (this.weight == null) {\n return 0;\n } else {\n return this.weight;\n } // if/else\n }", "public int getWeight() {\n return weight;\n }", "public int getWeight() {\n return weight;\n }", "public int getWeight() {\n return weight;\n }", "@Override\n public double getWeight() {\n // For this example just assuming all cars weigh 500kg and people weigh 70kg\n return 500 + (70 * this.getNumPassengers());\n }", "public ColorWeight()\n {\n weight = 0;\n }", "NetWeightMeasureType getNetWeightMeasure();", "private void categorize(Map<Integer, Double> trips,\n\t\t\tMap<Integer, Double> category1, Map<Integer, Double> category2,\n\t\t\tMap<Integer, Double> category3) {\n\t\t// Add 3 first elements to categories\n\t\tObject[] arrTrips = trips.keySet().toArray();\n\t\tcategory1.put((Integer) arrTrips[0], trips.get((Integer) arrTrips[0]));\n\t\tcategory2.put((Integer) arrTrips[1], trips.get((Integer) arrTrips[1]));\n\t\tcategory3.put((Integer) arrTrips[2], trips.get((Integer) arrTrips[2]));\n\n\t\t// Categorize all the entries a few times for better result\n\t\tfor (int i = 0; i < CATEGORIZING_TIMES; i++) {\n\t\t\t// Compute categories' averages\n\t\t\tDouble avg1 = getValuesAvg(category1);\n\t\t\tDouble avg2 = getValuesAvg(category2);\n\t\t\tDouble avg3 = getValuesAvg(category3);\n\n\t\t\t// Move each entry to it's closest category by average\n\t\t\tfor (Entry<Integer, Double> entry : trips.entrySet()) {\n\t\t\t\tcategorizeEntry(category1, category2, category3, avg1, avg2,\n\t\t\t\t\t\tavg3, entry);\n\t\t\t}\n\t\t}\n\t}", "public String getWeight()\r\n\t{\r\n\t\treturn weight;\r\n\t}", "int getCategoryValue();", "public abstract double totalWeight();", "public double getWeight() {\r\n return weight;\r\n }", "public double getWeight() {\r\n return weight;\r\n }", "public void setWeight(double weight2) {\n\t\tthis.weight = weight2;\n\t}", "public Cgg_veh_categoria(){}", "public float getWeight() {\n return weight;\n }", "public float getWeight() {\n return weight;\n }", "public void setItem(String itemDescription, int weight)\n {\n currentItem = new Item(itemDescription, weight); \n }", "public int getWeight() {\n return this.weight;\n }", "public Knight(String name, int weight, List<Equipment> equipment) {\n this.equipment = equipment;\n this.name = name;\n this.weight = weight;\n }", "@Override\r\n public double getBaseWeight() { return type.getWeight(); }", "@Test\n void findVeichleByWeight() {\n\n final int ALL_CARS = 500;\n final int ONE_CAR = 1500;\n final int NO_CARS = 2500;\n\n vr.registerVeichle(dieselCar);\n vr.registerVeichle(dieselCar2);\n //check if all cars are returned as all cars are over 500 kg\n assertEquals(vr.getVeichles(), vr.findVeichleByWeight(ALL_CARS));\n //checks if that only dieselCar2 is returned as its the only car over 1500 kg\n assertTrue(vr.findVeichleByWeight(ONE_CAR).contains(dieselCar2) && !vr.findVeichleByWeight(ONE_CAR).contains(dieselCar));\n //Checks that no cars are returned since no cars is heavier than 2500\n assertFalse(vr.findVeichleByWeight(NO_CARS).contains(dieselCar) || vr.findVeichleByWeight(NO_CARS).contains(dieselCar2));\n\n }", "private double generateWeight(String model) {\n\t\tif (model.equals(\"compact\")) {\n\t\t\treturn (double) Math.round((1500 + (2000 - 1500) * randomGenerator.nextDouble()) * 100) / 100;\n\t\t} else if (model.equals(\"intermediate\")) {\n\t\t\treturn (double) Math.round((2000 + (2500 - 2000) * randomGenerator.nextDouble()) * 100) / 100;\n\t\t} else {\n\t\t\treturn (double) Math.round((2500 + (4000 - 2500) * randomGenerator.nextDouble()) * 100) / 100;\n\t\t}\n\t}" ]
[ "0.6224552", "0.6101917", "0.6038535", "0.59908026", "0.5989573", "0.59412444", "0.59240586", "0.59211713", "0.59039336", "0.58924454", "0.5891838", "0.5889766", "0.58877206", "0.5880692", "0.58806366", "0.5878886", "0.58463776", "0.5823045", "0.58222806", "0.5817711", "0.57977474", "0.57713884", "0.57384264", "0.57160306", "0.5695304", "0.5684275", "0.56827646", "0.56807613", "0.56755173", "0.56723034", "0.56633925", "0.56633925", "0.56588876", "0.5617677", "0.5614546", "0.56015587", "0.5596309", "0.5563418", "0.55029356", "0.55023915", "0.5496758", "0.5471308", "0.5460094", "0.54574573", "0.5425168", "0.540582", "0.5379177", "0.5365864", "0.5330486", "0.5323862", "0.53067017", "0.5305362", "0.5303707", "0.529846", "0.52801466", "0.52788705", "0.52739114", "0.52405095", "0.5236406", "0.52358806", "0.522971", "0.52286637", "0.5219938", "0.5218992", "0.5218992", "0.5212464", "0.52115846", "0.5199057", "0.5198388", "0.51942915", "0.51903135", "0.51903135", "0.518896", "0.5184142", "0.51833755", "0.5180967", "0.5178964", "0.5175432", "0.5156714", "0.5155119", "0.5155119", "0.51510173", "0.5130282", "0.5129215", "0.5127728", "0.51160604", "0.51126635", "0.5107867", "0.51057994", "0.51057994", "0.5100124", "0.5097096", "0.50963724", "0.5095727", "0.5091931", "0.50904137", "0.5083966", "0.50801355", "0.5071938", "0.5051546" ]
0.71245724
0
/ method that calculates the totalFee for an Oversized Vehicle and throws an exception if the user enters an invalid weight
public double book(int numPassengers, DateTime date, double weight) throws VehicleException { double surcharge = 0; if ((numPassengers < 1) || (numPassengers > 6)) { throw new VehicleException("Error - Invalid Number of passengers: Must be b/w 1 and 6."); } else if (date.getFormattedDate().compareTo(DateTime.getCurrentTime()) < 0) { throw new VehicleException("Error - Date must be in the future."); } recordWeight(weight); if (CLEARANCE_HEIGHT > 3) { //return -3; } else if (category.equals("LIGHT")) { surcharge = LIGHT_VEHICLE_CHARGE; } else if (category.equals("MEDIUM")) { surcharge = MEDIUM_VEHICLE_CHARGE; } else if (category.equals("HEAVY")) { surcharge = HEAVY_VEHICLE_CHARGE; } if (weight <= 0) { throw new VehicleException("Error - weight must be greater than 0!"); } double totalFee = super.book(numPassengers, date) + ((weight - 3) * surcharge); return totalFee; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract double calculateFee(int aWidth);", "public double calFee() {\n return weight * FEE + GiftBox.this.price;\n }", "public abstract double totalWeight();", "public abstract double getComplianceFee();", "public abstract double getLateFee(int daysLate);", "public static double inputWeight() {\n String lbsInput;\n Double weightDouble = 0.0;\n\n System.out.println(\"Please enter your weight (in lbs): \");\n do {\n try {\n lbsInput = input.nextLine();\n weightDouble = Double.parseDouble(lbsInput);\n\n } catch (Exception e) {\n\n }\n if (weightDouble <= 0) {\n System.out.println(INPUT_ERROR);\n }\n } while (weightDouble <= 0);\n\n\n return weightDouble;\n }", "public double fuelQuantity() throws Exception;", "@Override\r\n public double purchaseFee(){\r\n return fee;\r\n }", "public double calculateFee(int width)\t\t{\n\t\tdouble fee;\n\n\t\tswitch(width)\t{\n\t\t\tcase 10:\n\t\t\t\tfee = 800;\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\tfee = 900;\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\tfee = 1100;\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\tfee = 1500;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tfee = 0;\n\t\t}\n\n\t\treturn fee;\n\t}", "@Override\n public int computeProfit() {\n return getVehiclePerformance() / getVehiclePrice();\n }", "double calculatePrice(VehicleType vehicleType, Date entryTime, Date exitTime);", "public void heightWeightTest() {\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.feetDropDownLocator, \"Feet drop-down\", 5)) {\r\n\t\t\tdropDownTest(QuoteForm_ComponentObject.feetDropDownLocator, QuoteForm_ComponentObject.feetDefaultLocator, \r\n\t\t\t\t\tQuoteForm_ComponentObject.feetValidSelectionLocator, QuoteForm_ComponentObject.feetInvalidSelectionLocator, \"FT.\", \"6\");\r\n\t\t}\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.inchesDropDownLocator, \"Inches drop-down\", 5)) {\r\n\t\t\tdropDownTest(QuoteForm_ComponentObject.inchesDropDownLocator, QuoteForm_ComponentObject.inchesDefaultLocator,\r\n\t\t\t\t\tQuoteForm_ComponentObject.inchesValidSelectionLocator, QuoteForm_ComponentObject.inchesInvalidSelectionLocator, \"IN.\", \"1\");\r\n\t\t}\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.weightInputLocator, \"Weight input field\", 5)) {\r\n\t\t\tString weightPlaceHolderLBS = Step.Extract.getContent(QuoteForm_ComponentObject.weightInputLocator, \"Weight placeholder\", \"placeholder\");\r\n\t\t\t\r\n\t\t\tif(weightPlaceHolderLBS.contentEquals(\"LBS.\")) {\r\n\t\t\t\tStep.Passed(\"Weight text box displays 'LBS.' as a placeholder\");\r\n\t\t\t} else {\r\n\t\t\t\tStep.Failed(\"Weight text box does not display 'LBS.' as a placeholder\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tStep.Action.typeText(QuoteForm_ComponentObject.weightInputLocator, \"Weight input field\", \"2345\");\r\n\t\t\tString weightSpecified = Step.Extract.getContentUsingJS(QuoteForm_ComponentObject.weightInputLocator,\r\n\t\t\t\t\t\"Weight input field content\");\r\n\t\t\tif(weightSpecified.length() > 3) {\r\n\t\t\t\tStep.Failed(\"Weight input field accepts more than 3 digits\");\r\n\t\t\t} else {\r\n\t\t\t\tStep.Passed(\"Weight input field does not accept more than 3 digits\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public double calcSalesFee() {\n return getCost() + getSalesPurchase();\n }", "public static void main(String[] args) {\r\n Scanner in = new Scanner(System.in);\r\n System.out.println(\"Please, enter the height\");\r\n float height = in.nextFloat();\r\n System.out.println(\"Please, enter the weight\");\r\n float weight = in.nextFloat();\r\n float idealWeight = height - 110;\r\n\r\n if (idealWeight < weight){\r\n System.out.println(\"You need to loose \" + (weight - idealWeight) + \"kg\");\r\n } else if (idealWeight > weight){\r\n System.out.println(\"You need to gain \" + (idealWeight - weight) + \"kg\");\r\n } else {\r\n System.out.println(\"Your weight is perfect\");\r\n }\r\n }", "@Override\n\tpublic double getAdditionalFee() {\n\t\t\n\t\treturn 0;\n\t}", "public float getCost(int weight, int volume) {\r\n\t\t//System.out.println(\"getCost method in Journey called. should have been a delivery.\");\r\n\t\ttimesUsed++;\r\n\t\tfloat total = 0;\r\n\t\tfor(Path p: usedPaths){\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttotal += p.calcCost(weight, volume);\r\n\t\t\t\t} catch (OverweightException 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} catch (ExceededVolumeException 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}\r\n\t\ttotalCost += total;\r\n\t\treturn total;\r\n\t}", "@Override\n\tpublic double getAdditionalFee() {\n\t\treturn 0.0;\n\t}", "@Override\n\tpublic double getRentalFee() {\n\t\treturn 10;\n\t}", "public float calculatePrice(Airline flight, String type, int baggage);", "public Double getPrice(int weight, int volume){\r\n\t\t//System.out.println(\"getPrice method in Journey called. should have been a delivery.\");\r\n\t\tdouble price = weightPrice*weight + volumePrice*volume;\r\n\t\tprice = Math.round(price * 100);\r\n\t\ttotalPrice += (price/100);\r\n\t\treturn price/100;\r\n\r\n\t}", "public int getFee(){return 0;}", "@Override\n protected UnitsNeeded calculateUnitsNeeded() {\n long firetrucks = 0;\n long policecars = 0;\n switch (this.getSize()) {\n case LOCAL:\n firetrucks = 1;\n break;\n case HOUSE:\n firetrucks = 2;\n policecars = 1;\n break;\n case FACILITY:\n firetrucks = 4;\n policecars = 3;\n }\n try {\n DispatchUnitsConstraint fir = new NumberDispatchUnitsConstraint(new FiretruckFireSizeValidator(this.getSize()), firetrucks);\n DispatchUnitsConstraint amb = new NumberDispatchUnitsConstraint(new TypeUnitValidator(Ambulance.class), this.getNumberOfInjured() + this.getTrappedPeople());\n DispatchUnitsConstraint pol = new NumberDispatchUnitsConstraint(new TypeUnitValidator(Policecar.class), policecars);\n UnitsNeeded un = new UnitsNeeded(this, new AndDispatchUnitsConstraint(fir, amb, pol));\n un.pushPolicy(new FireSizeDispatchPolicy(un,new ASAPDispatchPolicy(un)));\n return un;\n } catch (InvalidEmergencyException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidDispatchUnitsConstraintException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (NumberOutOfBoundsException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidUnitValidatorException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidClassException ex) {\n //we assume this can't happen\n Logger.getLogger(Robbery.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidConstraintListException ex) {\n //we assume this can't happen\n Logger.getLogger(TrafficAccident.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidDispatchPolicyException ex) {\n //We assume this can't happen\n Logger.getLogger(Fire.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InvalidUnitsNeededException ex) {\n //We assume this can't happen\n Logger.getLogger(Fire.class.getName()).log(Level.SEVERE, null, ex);\n }\n //should never be returned.\n return null;\n }", "public double getServiceFee() {\r\n\t\treturn 0.00;\r\n\t}", "@Test\n void calculateDaysRentedTooLowTest() throws Exception {\n ToolType toolType = ToolType.JACKHAMMER; // weekendFree: true holidayFree: true\n String toolCode = \"JAKR\";\n String brand = \"Werner\";\n int discount = 0;\n int daysRented = 0;\n LocalDate checkoutDate = createDate(\"2015-09-03\");\n\n Tool tool = createTool(toolType, toolCode, brand);\n\n List<Tool> tools = Arrays.asList(tool);\n Order order = new Order(tools, checkoutDate, daysRented);\n\n List<LocalDate> holidays = createHolidays(checkoutDate.getYear());\n RentalAgreement rentAgmt = createRentalAgreement(order, discount, holidays);\n\n Assertions.assertThrows(Exception.class, ()->\n rentAgmt.calculate(), \"Expected calculate() to throw Exception but it didn't\"\n );\n }", "public double totalFee(){\n return (this.creditHours*this.feePerCreditHour)-this.scholarshipAmount+((this.healthInsurancePerAnnum*4)/12);\n }", "@Override\n\tpublic int fees() {\n\t\treturn 25000;\n\t\t\n\t}", "private Boolean calculateTotalEmission() {\n\t\ttry {\n\n\t\t\tfoodCO2E = Double.valueOf(JTFFood.getText().isEmpty() ? \"0.0\" : JTFFood.getText())\n\t\t\t\t\t* energySourceDetail.get(FoodIntake).get(JCBFoodUnit.getSelectedItem().toString());\n\n\t\t\tlandfillingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFLandfillingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFLandfillingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(LandfillingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBLandfillingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t\tcompostingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFCompostingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFCompostingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(CompostingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBCompostingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t} catch (NumberFormatException ne) {\n\t\t\tSystem.out.println(\"Number Format Exception while calculating House Hold Emission\" + ne);\n\t\t\treturn false;\n\t\t}\n\t\t//\n\t\ttotalFoodCO2E = foodCO2E + landfillingFoodWasteCO2E + compostingFoodWasteCO2E;\n\t\ttotalFoodCO2E = Math.round(totalFoodCO2E * 100D) / 100D;\n\t\treturn true;\n\t}", "public int getFee()\n {\n return fee;\n }", "@Test\n void calculateDiscountTooLowTest() throws Exception {\n ToolType toolType = ToolType.JACKHAMMER; // weekendFree: true holidayFree: true\n String toolCode = \"JAKR\";\n String brand = \"Werner\";\n int discount = -10;\n int daysRented = 0;\n LocalDate checkoutDate = createDate(\"2015-09-03\");\n\n Tool tool = createTool(toolType, toolCode, brand);\n\n List<Tool> tools = Arrays.asList(tool);\n Order order = new Order(tools, checkoutDate, daysRented);\n\n List<LocalDate> holidays = createHolidays(checkoutDate.getYear());\n RentalAgreement rentAgmt = createRentalAgreement(order, discount, holidays);\n\n Assertions.assertThrows(Exception.class, ()->\n rentAgmt.calculate(), \"Expected calculate() to throw Exception but it didn't\"\n );\n }", "public double getFees(){\n\t\treturn (this.getPassengerFacilityFee() + this.get911SecurityFee());\n\t}", "public int calculateBill() {\n\t\treturn chargeVehicle(); \n\t}", "public abstract double getWeight ();", "private void businessValidationForOnlinePaymentServiceRequestOrder(PaymentFeeLink order, OnlineCardPaymentRequest request) {\n Optional<BigDecimal> totalCalculatedAmount = order.getFees().stream().map(paymentFee -> paymentFee.getCalculatedAmount()).reduce(BigDecimal::add);\n if (totalCalculatedAmount.isPresent() && (totalCalculatedAmount.get().compareTo(request.getAmount()) != 0)) {\n throw new ServiceRequestExceptionForNoMatchingAmount(\"The amount should be equal to serviceRequest balance\");\n }\n\n //Business validation for amount due for fees\n Optional<BigDecimal> totalAmountDue = order.getFees().stream().map(paymentFee -> paymentFee.getAmountDue()).reduce(BigDecimal::add);\n if (totalAmountDue.isPresent() && totalAmountDue.get().compareTo(BigDecimal.ZERO) == 0) {\n throw new ServiceRequestExceptionForNoAmountDue(\"The serviceRequest has already been paid\");\n }\n }", "@Override\n public double calcCost() {\n return calcSalesFee()+calcTaxes();\n }", "public static double bmiCalculator (double weight, double height) { \n double bmi = weight/(height*height); // calculates BMI with formula\n System.out.println(\"Your BMI is \" + String.valueOf(bmi).substring(0, 2)); // prints rounded BMI value\n \n // announces what the BMI value of the user means\n if (bmi > 50 || bmi < 10) {\n System.out.println(\"That doesn't sound right.\");\n System.out.println(\"Please ensure that the correct information has been inputted.\");\n }\n else if (bmi < 18) {\n System.out.println(\"That means you are underweight.\");\n }\n else if (bmi >= 18 && bmi <= 24) {\n System.out.println(\"That means you are healthy.\");\n }\n else if (bmi > 24 && bmi <= 29) {\n System.out.println(\"That means you are overweight.\");\n }\n else if (bmi > 29 && bmi <= 39) {\n System.out.println(\"That means you are obese.\");\n }\n else if (bmi > 39) {\n System.out.println(\"That means you are extremely obese.\");\n }\n else { // if BMI is above 50\n System.out.println(\"Are you okay?\");\n System.out.println(\"That doesn't sound right.\");\n System.out.println(\"Please ensure that the correct information has been inputted.\");\n }\n return bmi; //returns the user bmi value\n }", "private void VehicleValidation(Vehicle vehicle) throws ServiceException {\n\n\n if (vehicle.getTitle() == null) {\n throw new ServiceException(\"Title is null ! \");\n }\n if (vehicle.getTitle().equals(\"\")) {\n throw new ServiceException(\"Title is empty ! \");\n }\n\n if (vehicle.getYear() == 0) {\n throw new ServiceException(\"year ist empty !\");\n }\n if (!isNumeric(vehicle.getYear() + \"\")) {\n throw new ServiceException(\"wrong format for year !\");\n }\n if (vehicle.getYear()<1885 || vehicle.getYear() >2018){\n throw new ServiceException(\"year has to be between 2018 and 1885 !\");\n }\n String s = vehicle.getYear() + \"\";\n if (s.length() != 4) {\n throw new ServiceException(\"only 4 digit ! \");\n }\n if (!isNumeric(vehicle.getSeats() + \"\")) {\n throw new ServiceException(\"only 1-10 !\");\n }\n if (!vehicle.getLicenseClass().isEmpty()) {\n if (vehicle.getLicensePlate().isEmpty()) {\n throw new ServiceException(\"License Plate is empty !\");\n }\n if (vehicle.getLicensePlate().equals(\"\")) {\n throw new ServiceException(\"License Plate is empty !\");\n }\n }\n if (!isNumeric(vehicle.getPrice() + \"\")) {\n throw new ServiceException(\"wrong format for Price !\");\n }\n if (vehicle.getPrice() == 0 || vehicle.getPrice() < 0) {\n throw new ServiceException(\"wrong format for Price !\");\n }\n\n if (vehicle.getTypeOfDrive().equals(\"motorized\")) {\n if (!isNumeric(vehicle.getPower() + \"\")) {\n throw new ServiceException(\"wrong format for power !\");\n }\n if (vehicle.getPower() == 0) {\n throw new ServiceException(\"power is empty!\");\n }\n }\n\n\n }", "public void calculateOrderCost(){\n int tmpCost=0;\n for (Vehicle v : vehicleList){\n tmpCost+=v.getCost();\n }\n totalCost=tmpCost;\n }", "double getWeight(V v, V w);", "double calculatePrice();", "@Override\n\tpublic double CalcularFuel() {\n\t\tdouble consumo=this.getCargaActual()*30+2*numEje;\n\t\treturn consumo;\n\t}", "public static void main( String [] args )\n {\n Scanner input = new Scanner( System.in );\n\n int weightInput = 0; // Init weight input\n int heightInput = 0; // Init height input\n\n double weightKg = 0; // Init weight conversion\n double heightM = 0; // Init height conversion\n\n double actual = 0;\n float bmi = 0; // Init calculated bmi\n\n\n System.out.println(\"\\n\\n\");\n System.out.print( \"Enter body weight(lbs):\" ); // promt for weight\n weightInput = input.nextInt(); // Input weight value\n\n System.out.print( \"Enter body height(in):\" ); // promt for height\n heightInput = input.nextInt(); // Input height value\n\n weightKg = weightInput * .45349237 ; // convert weight\n heightM = heightInput * .0254 ; // convert height\n\n actual = weightKg / (heightM * heightM); // calculate BMI\n\n bmi = (float) actual; //simplify BMI\n\n // Output BMI and Chart\n System.out.println(\"\\n\");\n System.out.println(\"-------------------------------\");\n System.out.println(\"Your Body Mass Index: \" + bmi);\n System.out.println(\"-------------------------------\");\n System.out.println(\"\\n\");\n System.out.println(\"-------------------------------\");\n System.out.println(\"Underweight: less than 18.5\");\n System.out.println(\"Normal: 18.5 – 24.9\");\n System.out.println(\"Overweight: 25 – 29.9\");\n System.out.println(\"Obese: 30 or greater\");\n System.out.println(\"-------------------------------\");\n System.out.println(\"\\n\\n\");\n\n\n }", "public Double calcMovieRentalPrice(Integer unitPrice, Integer numOfDays);", "public void doCalculation() throws BadInputFormatException {\r\n\t\tSet<LocalDate> allTradingDays = dateEntityMap.keySet();\r\n\r\n\t\tfor (LocalDate ld : allTradingDays) {\r\n\t\t\tDouble outgoingUsd = 0d;\r\n\t\t\tDouble incomingUsd = 0d;\r\n\t\t\tList<TradeEntity> entitiesOnThisDay = dateEntityMap.get(ld);\r\n\r\n\t\t\tfor (TradeEntity e : entitiesOnThisDay) {\r\n\t\t\t\tif (e.getBuySell().equalsIgnoreCase(\"B\")) {\r\n\t\t\t\t\toutgoingUsd += e.getPricePerUnit() * e.getUnits() * e.getAgreedFx();\r\n\r\n\t\t\t\t} else if (e.getBuySell().equalsIgnoreCase(\"S\")) {\r\n\t\t\t\t\tincomingUsd += e.getPricePerUnit() * e.getUnits() * e.getAgreedFx();\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new BadInputFormatException(\"The value of BuyOrSell must be either S or B\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateTotalIncomingForEntity(e, incomingUsd);\r\n\t\t\t\tupdateTotalOutgoingForEntity(e, outgoingUsd);\r\n\t\t\t}\r\n\r\n\t\t\tdateOutgoingUsdMap.put(ld, outgoingUsd);\r\n\t\t\tdateIncomingUsdMap.put(ld, incomingUsd);\r\n\t\t}\r\n\t}", "private void determinationExciseRate(Vehicle vehicle) {\n if (vehicle.getEngineType().name().equals(\"petrol\") && vehicle.getCapacity() <= 3000) {\n vehicle.setExciseRate(serviceForNumber.roundingNumber(\n (double) 50 / 1000 * vehicle.getAgeCoefficient(),\n 2));\n\n } else if (vehicle.getEngineType().name().equals(\"petrol\") && vehicle.getCapacity() > 3000) {\n vehicle.setExciseRate(serviceForNumber.roundingNumber(\n (double) 100 / 1000 * vehicle.getAgeCoefficient(),\n 2));\n\n } else if (vehicle.getEngineType().name().equals(\"diesel\") && vehicle.getCapacity() <= 3500) {\n vehicle.setExciseRate(serviceForNumber.roundingNumber(\n (double) 75 / 1000 * vehicle.getAgeCoefficient(),\n 2));\n\n } else if (vehicle.getEngineType().name().equals(\"diesel\") && vehicle.getCapacity() > 3500) {\n vehicle.setExciseRate(serviceForNumber.roundingNumber(\n (double) 150 / 1000 * vehicle.getAgeCoefficient(),\n 2));\n\n } else if (vehicle.getEngineType().name().equals(\"electric\")) {\n vehicle.setExciseRate(1);\n }\n }", "public void consumeFuel(double amount);", "@Override\n public double computeProfitUsingRisk() {\n return (getVehiclePerformance() / getVehiclePrice()) * evaluateRisk();\n }", "public double calculateCost(Purchase purchase);", "private double calculateTotalFeesEarned(ArrayList<Pair<Fees, Time>> timeslots) {\n double sumOfFees = 0.00;\n for (DayOfWeek day : DayOfWeek.values()) {\n sumOfFees += calculateFeesEarnedEachDayOfWeek(timeslots, day);\n }\n return sumOfFees;\n }", "@Override\n public double getWeight() {\n // For this example just assuming all cars weigh 500kg and people weigh 70kg\n return 500 + (70 * this.getNumPassengers());\n }", "@Override\n\tpublic void calculateAndUpdateBalance() {\n\n\t\tbalance -= fee;\n\n\t}", "@Test\n void calculateNegativeDailyCostTest() throws Exception {\n ToolType toolType = ToolType.JACKHAMMER; // weekendFree: true holidayFree: true\n String toolCode = \"JAKR\";\n String brand = \"Werner\";\n int discount = 0;\n int daysRented = 5;\n LocalDate checkoutDate = createDate(\"2015-09-03\");\n\n Tool tool = new Tool(toolType, toolCode, brand, -50.00, false, false);\n\n List<Tool> tools = Arrays.asList(tool);\n Order order = new Order(tools, checkoutDate, daysRented);\n\n List<LocalDate> holidays = createHolidays(checkoutDate.getYear());\n RentalAgreement rentAgmt = createRentalAgreement(order, discount, holidays);\n\n Assertions.assertThrows(Exception.class, ()->\n rentAgmt.calculate(), \"Expected calculate() to throw Exception but it didn't\"\n );\n }", "public FeeCalculation calculateFee(SendRequest req, Coin value, List<TransactionInput> originalInputs,\n boolean needAtLeastReferenceFee, List<TransactionOutput> candidates) throws InsufficientMoneyException {\n FeeCalculation result;\n Coin fee = Coin.ZERO;\n while (true) {\n result = new FeeCalculation();\n UldTransaction tx = new UldTransaction(params);\n addSuppliedInputs(tx, req.tx.getInputs());\n\n Coin valueNeeded = value;\n if (!req.recipientsPayFees) {\n valueNeeded = valueNeeded.add(fee);\n }\n if (req.recipientsPayFees) {\n result.updatedOutputValues = new ArrayList<Coin>();\n }\n for (int i = 0; i < req.tx.getOutputs().size(); i++) {\n TransactionOutput output = new TransactionOutput(params, tx,\n req.tx.getOutputs().get(i).ulordSerialize(), 0);\n if (req.recipientsPayFees) {\n // Subtract fee equally from each selected recipient\n output.setValue(output.getValue().subtract(fee.divide(req.tx.getOutputs().size())));\n // first receiver pays the remainder not divisible by output count\n if (i == 0) {\n output.setValue(\n output.getValue().subtract(fee.divideAndRemainder(req.tx.getOutputs().size())[1])); // Subtract fee equally from each selected recipient\n }\n result.updatedOutputValues.add(output.getValue());\n if (output.getMinNonDustValue().isGreaterThan(output.getValue())) {\n throw new CouldNotAdjustDownwards();\n }\n }\n tx.addOutput(output);\n }\n CoinSelector selector = req.coinSelector == null ? coinSelector : req.coinSelector;\n // selector is allowed to modify candidates list.\n CoinSelection selection = selector.select(valueNeeded, new LinkedList<TransactionOutput>(candidates));\n result.bestCoinSelection = selection;\n // Can we afford this?\n if (selection.valueGathered.compareTo(valueNeeded) < 0) {\n Coin valueMissing = valueNeeded.subtract(selection.valueGathered);\n throw new InsufficientMoneyException(valueMissing);\n }\n Coin change = selection.valueGathered.subtract(valueNeeded);\n if (change.isGreaterThan(Coin.ZERO)) {\n // The value of the inputs is greater than what we want to send. Just like in real life then,\n // we need to take back some coins ... this is called \"change\". Add another output that sends the change\n // back to us. The address comes either from the request or currentChangeAddress() as a default.\n Address changeAddress = req.changeAddress;\n TransactionOutput changeOutput = new TransactionOutput(params, tx, change, changeAddress);\n if (req.recipientsPayFees && changeOutput.isDust()) {\n // We do not move dust-change to fees, because the sender would end up paying more than requested.\n // This would be against the purpose of the all-inclusive feature.\n // So instead we raise the change and deduct from the first recipient.\n Coin missingToNotBeDust = changeOutput.getMinNonDustValue().subtract(changeOutput.getValue());\n changeOutput.setValue(changeOutput.getValue().add(missingToNotBeDust));\n TransactionOutput firstOutput = tx.getOutputs().get(0);\n firstOutput.setValue(firstOutput.getValue().subtract(missingToNotBeDust));\n result.updatedOutputValues.set(0, firstOutput.getValue());\n if (firstOutput.isDust()) {\n throw new CouldNotAdjustDownwards();\n }\n }\n if (changeOutput.isDust()) {\n // Never create dust outputs; if we would, just\n // add the dust to the fee.\n // Oscar comment: This seems like a way to make the condition below \"if\n // (!fee.isLessThan(feeNeeded))\" to become true.\n // This is a non-easy to understand way to do that.\n // Maybe there are other effects I am missing\n fee = fee.add(changeOutput.getValue());\n } else {\n tx.addOutput(changeOutput);\n result.bestChangeOutput = changeOutput;\n }\n }\n\n for (TransactionOutput selectedOutput : selection.gathered) {\n TransactionInput input = tx.addInput(selectedOutput);\n // If the scriptBytes don't default to none, our size calculations will be thrown off.\n checkState(input.getScriptBytes().length == 0);\n }\n\n int size = tx.unsafeUlordSerialize().length;\n size += estimateBytesForSigning(selection);\n\n Coin feePerKb = req.feePerKb;\n if (needAtLeastReferenceFee && feePerKb.compareTo(UldTransaction.REFERENCE_DEFAULT_MIN_TX_FEE) < 0) {\n feePerKb = UldTransaction.REFERENCE_DEFAULT_MIN_TX_FEE;\n }\n Coin feeNeeded = feePerKb.multiply(size).divide(1000);\n\n if (!fee.isLessThan(feeNeeded)) {\n // Done, enough fee included.\n break;\n }\n\n // Include more fee and try again.\n fee = feeNeeded;\n }\n return result;\n\n }", "private void calculateEarnings()\n {\n // get user input\n int items = Integer.parseInt( itemsSoldJTextField.getText() );\n double price = Double.parseDouble( priceJTextField.getText() );\n Integer integerObject = \n ( Integer ) commissionJSpinner.getValue();\n int commissionRate = integerObject.intValue();\n \n // calculate total sales and earnings\n double sales = items * price;\n double earnings = ( sales * commissionRate ) / 100;\n \n // display the results\n DecimalFormat dollars = new DecimalFormat( \"$0.00\" );\n grossSalesJTextField.setText( dollars.format( sales ) );\n earningsJTextField.setText( dollars.format( earnings ) );\n\n }", "@Test(expected = TrainException.class)\n\tpublic void testCreateFreightCarWithInvalidGrossWeight() throws TrainException\n\t{\n\t\tString validGoodsType = \"G\";\n\t\tInteger invalidGrossWeight = -1;\n\t\t\n\t\t@SuppressWarnings(\"unused\")\n\t\tasgn2RollingStock.RollingStock freightCarWithInvalidGrossWeight = \n\t\t\t\tnew asgn2RollingStock.FreightCar(invalidGrossWeight , validGoodsType);\n\t}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\t\r\n\t\r\n\t//asks user to enter full name\r\n\t\tSystem.out.println(\"Enter your full name: \");\r\n\t\r\n\t//allows user to enter name via stringed characters\r\n\t\tString name = input.nextLine();\r\n\t\tint space = name.indexOf(' ');\r\n\t\tString firstName = name.substring(0, space);\r\n\t\tString lastName = name.substring(space + 1);\r\n\t\t\r\n\t//asks user to enter package weight\t\r\n\t\tSystem.out.println(\"Enter package weight: \");\r\n\t\r\n\t//allows user to enter value for weight\r\n\t\tdouble weight = input.nextDouble();\t\r\n\t\r\n\t//initiates cost\r\n\t\tdouble cost = 0;\r\n\t\r\n //conditionals\r\n\t//package cost if 0 < weight <= 15\t\r\n\tif(0 < weight && weight <= 15 ) {\r\n\t cost = 3 + (weight)* 4;\r\n\t System.out.println(firstName + \", the total cost for your package is \" + cost);\r\n\t//package if 15 < weight <= 25\t\r\n\t} else if(15 < weight && weight <= 25){ \r\n\t\tcost = 35 + (weight - 1)* 2;\r\n\t\tSystem.out.println(firstName + \", the total cost for your package is \" + cost);\r\n\t//package if 25 < weight <= 40\t\r\n\t} else if(25 < weight && weight <= 40) {\r\n\t\tcost = 7.25 + (weight - 12)* 3.25;\r\n\t\tSystem.out.println(firstName + \", the total cost for your package is \" + cost);\r\n\t//package if weight > 40 OR weight < 0\r\n\t} else if(weight > 40 || weight < 0) {\r\n\t\tSystem.out.println(firstName + \", your package cannot be shipped.\");\r\n\t}\r\n\t}", "public void caltotalprice(){\n \tthis.mTotalPrice = 0;\n \tif (this.isCoachSeat) {\n \t\tfor (Flight f: this.mLegs) {\n \t\t\tthis.mTotalPrice += f.coachprice();\n \t\t}\n \t}else {\n \t\tfor (Flight f: this.mLegs) {\n \t\t\tthis.mTotalPrice += f.firstclassprice();\n \t\t}\n \t}\n }", "@Test\n public void testMoreRequired() throws VendingMachineInventoryException{\n service.addFunds(\"1.00\");\n Item testitem = new Item(\"testitem\", \"1.50\", \"5\");\n service.addItem(\"testitem\", testitem);\n BigDecimal moneyRequired = service.moreRequired(\"testitem\");\n BigDecimal expectedMoneyRequired = new BigDecimal(\"0.50\");\n assertEquals(moneyRequired, expectedMoneyRequired);\n }", "private double calculateCommissionAmountVehicles(PrintItinerary itinerary) {\n\t\tdouble commissionAmount = 0.0;\n\t\tif (itinerary.getVehicles() != null\n\t\t\t\t&& itinerary.getVehicles().size() > 0) {\n\t\t\tfor (Vehicle vehicle : itinerary.getVehicles()) {\n\t\t\t\tcommissionAmount = commissionAmount\n\t\t\t\t\t\t+ vehicle.getPrice().getCommissionAmount();\n\t\t\t}\n\t\t}\n\n\t\treturn commissionAmount;\n\t}", "float calFuelConsumption(float distance, float numLiters);", "public double findWeight(){\n int totalCoins = gold + silver + copper + electrum + platinum;\n if((totalCoins % 3) == 0){\n return totalCoins/3;\n }\n return totalCoins * weight;\n }", "private int calculate() {\n double grade = 0;\n double average = 0;\n\n if (weight1.getText().length() != 0) {\n for (int n : grades1)\n average += n;\n average /= grades1.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight1.getText())) * average);\n average = 0;\n }\n if (weight2.getText().length() != 0) {\n for (int n : grades2)\n average += n;\n average /= grades2.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight2.getText())) * average);\n average = 0;\n }\n if (weight3.getText().length() != 0) {\n for (int n : grades3)\n average += n;\n average /= grades3.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight3.getText())) * average);\n average = 0;\n }\n if (weight4.getText().length() != 0) {\n for (int n : grades4)\n average += n;\n average /= grades4.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight4.getText())) * average);\n average = 0;\n }\n if (weight5.getText().length() != 0) {\n for (int n : grades5)\n average += n;\n average /= grades5.size();\n average /= 100;\n grade += (Integer.parseInt(String.valueOf(weight5.getText())) * average);\n }\n int intGrade = (int) Math.round(grade);\n return intGrade;\n }", "public void calculateSalary() ;", "public abstract double calculateAppraisalPrice();", "int getWeight();", "int getWeight();", "public double validation(Product prod){\n if((wbu)>(Double.parseDouble(prod.getMaxWeight())))\n return Double.parseDouble(prod.getPrice());\n return 0;\n }", "void calculateReceivableByUIComponent() throws Exception{\t\t\n\t\tdouble receivableAmt = ConvertUtil.convertCTextToNumber(txtDueAmount).doubleValue();\t\n\t\tdouble receiveAmt = chkPayall.isSelected()?ConvertUtil.convertCTextToNumber(txtDueAmount).doubleValue()\n\t\t\t\t:ConvertUtil.convertCTextToNumber(txtReceiptAmount).doubleValue();\n\t\tdouble bfAmt = ConvertUtil.convertCTextToNumber(txtCustomerBF).doubleValue();\n\t\tdouble paidAmt = ConvertUtil.convertCTextToNumber(txtPaidAmount).doubleValue(); \n\t\tdouble cfAmt = bfAmt + receivableAmt - receiveAmt - paidAmt;\t\t\n\t\ttxtReceiptAmount.setText(SystemConfiguration.decfm.format(receiveAmt));\n\t\ttxtCustomerCfAmount.setText(SystemConfiguration.decfm.format(cfAmt));\t\n\t\ttxtReceiptAmount.selectAll();\n\t}", "public double getEquipmentWeight() {\r\n\t\tdouble ret = 0;\r\n\t\tPerson p = model.getData();\r\n\t\tif ( p!=null ) {\r\n\t\t\tret = p.getCarriedWeight();\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "private double getFee(int ISBN) {\r\n\t\t/* Query to get the fee */\r\n\t\tdouble price = db.findPrice(ISBN);\r\n\t\tSystem.out.println(\"price that you're charging: \" + price / 2);\r\n\t\treturn (price / 2);\r\n\t}", "public Double getTotalBuyFee() {\r\n return totalBuyFee;\r\n }", "public float calculateTotalFee(){\n int endD = parseInt(endDay);\n int startD = parseInt(startDay);\n int endM = parseInt(convertMonthToDigit(endMonth));\n int startM = parseInt(convertMonthToDigit(startMonth));\n int monthDiff = 0;\n float totalFee = 0;\n //get the stay duration in months\n monthDiff = endM - startM;\n \n System.out.println(\"CALCULATING TOTAL FEE:\");\n \n stayDuration = 1;\n if(monthDiff == 0){ //on the same month\n if(startD == endD){\n stayDuration = 1;\n }else if(startD < endD){ //Same month, diff days\n stayDuration = 1 + (parseInt(endDay) - parseInt(startDay));\n }\n }else if(monthDiff > 0){ //1 month difference\n \n if(startD > endD){ // End day is next month\n switch(startMonth){\n case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": \n case \"October\": case \"December\":\n stayDuration = 1 + ( (31+ parseInt(endDay)) - parseInt(startDay));\n break;\n\n case \"April\": case \"June\": case \"September\": case \"November\":\n stayDuration = 1 + ((30+ parseInt(endDay)) - parseInt(startDay));\n break; \n \n case \"February\": \n stayDuration = 1 + ((29+ parseInt(endDay)) - parseInt(startDay));\n break; \n default:\n break;\n }\n }else if(startD <= endD){ //if end day is greater than start day\n switch(startMonth){\n case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": \n case \"October\": case \"December\":\n stayDuration = 1 + ((parseInt(endDay)) - parseInt(startDay));\n stayDuration += 31;\n break;\n\n case \"April\": case \"June\": case \"September\": case \"November\":\n stayDuration = 1 + ( (parseInt(endDay)) - parseInt(startDay));\n stayDuration += 30;\n break; \n \n case \"February\": \n stayDuration = 1 + ( (parseInt(endDay)) - parseInt(startDay));\n stayDuration += 29;\n break; \n \n default:\n break;\n }\n }\n }else if(monthDiff < 0){\n if(startMonth == \"December\" && endMonth == \"January\"){\n if(startD > endD){ // End day is next month\n switch(startMonth){\n case \"January\": case \"March\": case \"May\": case \"July\": case \"August\": \n case \"October\": case \"December\":\n stayDuration = 1 + ( (31+ parseInt(endDay)) - parseInt(startDay));\n break;\n\n case \"April\": case \"June\": case \"September\": case \"November\":\n stayDuration = 1 + ((30+ parseInt(endDay)) - parseInt(startDay));\n break; \n\n case \"February\": \n stayDuration = 1 + ((29+ parseInt(endDay)) - parseInt(startDay));\n break; \n default:\n break;\n }\n }else{\n stayDuration = 1 + ((parseInt(endDay)) - parseInt(startDay));\n stayDuration += 31;\n }\n }\n }\n \n totalFee = (int) (getSelectedRoomsCounter() * getSelectedRoomPrice());\n totalFee *= stayDuration;\n \n //console log\n System.out.println(\"stayDuration: \"+ stayDuration);\n System.out.println(\"Total Fee: \" + totalFee +\"php\");\n return totalFee;\n }", "double getTotalProfit();", "public abstract double calculateTax();", "public abstract double calculateQuarterlyFees();", "@Override\n public double sendCostCalculated(String length, String vehicleType) {\n\n double numOfKm = Double.parseDouble(length);\n double totalCost = 50.0;\n\n if ((numOfKm - 1) < 1) {\n return totalCost;\n }\n\n double nextLength = numOfKm - 1;\n\n switch (vehicleType) {\n case \"budget\":\n totalCost += nextLength * 35;\n break;\n case \"hybrid\":\n totalCost += nextLength * 55;\n break;\n default:\n totalCost += nextLength * 45;\n }\n\n return totalCost;\n }", "public Double calculateTotal(String type, Double price, Double numberOfCoins, Double fees) {\n\t\tif (type == \"Kauf\") {\n\t\t\treturn (price * numberOfCoins) + fees;\n\t\t} else {\n\t\t\treturn ((price * numberOfCoins) + fees) * -1;\n\t\t}\n\t}", "public double getFee() {\n\t\treturn fee;\n\t}", "public void calculateSalary() {\n if (hours < 0 || hourlyRate < 0) {\r\n salary = -1;\r\n }\r\n else if (hours > 40) {\r\n salary = 40 * hourlyRate;\r\n }\r\n else {\r\n salary = hours * hourlyRate;\r\n }\r\n }", "public float getWeight();", "@Override\n\tpublic double calcSpendFuel() {\n\t\tdouble result = distance / (literFuel - fuelStart);\n\t\treturn result;\n\t}", "public Double calcMovieRentalPrice(Integer unitPrice, Integer numOfDays, Integer maxAge);", "public int chargeVehicle() {\n\t\t\n\t\tint price = 0; \n\t\t\n\t\tfor (int i = 0; i < vehicles.size(); i++) {\n\t\t\t\n\t\t\tif(vehicles.get(i) instanceof Car) { // charge 10 GBP per car \n\t\t\t\tprice += 10;\n\t\t\t}\n\t\t\telse if(vehicles.get(i) instanceof Motorcycle) { // charge 5 GBP per motorcycle \n\t\t\t\tprice += 5;\n\t\t\t}\n\t\t\telse if(vehicles.get(i) instanceof Bus) { // charge 25 GBP per bus \n\t\t\t\tprice += 25; \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn price; \n\t}", "public static double getTotalWeight(Vm vm, int amount) {\n\t\treturn VmUtils.getWeight(vm) * amount;\n\t}", "public BigDecimal\tgetOrderFee();", "@Override\n\tpublic double getPremiumFee(FDRuleContextI ctx) {\n\t\treturn 0;\n\t}", "private Vehicle calculationTaxes(Vehicle vehicle) {\n double exchangeRateCurrencyOfContract = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(vehicle.getCurrencyOfContract().name());\n double exchangeRateEUR = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(\"EUR\");\n\n // Calculation Impost\n vehicle.setImpostBasis(serviceForNumber.roundingNumber(\n vehicle.getPriceInCurrency() * exchangeRateCurrencyOfContract,\n 2));\n determinationImpostRate(vehicle);\n vehicle.setImpost(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() * vehicle.getImpostRate() / 100,\n 2));\n\n // Calculation Excise\n vehicle.setExciseBasis(vehicle.getCapacity());\n determinationExciseRate(vehicle);\n vehicle.setExcise(serviceForNumber.roundingNumber(\n vehicle.getExciseBasis() * vehicle.getExciseRate() * exchangeRateEUR,\n 2));\n\n // Calculation VAT\n vehicle.setVATBasis(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() + vehicle.getImpost() + vehicle.getExcise(),\n 2));\n determinationVATRate(vehicle);\n vehicle.setVAT(serviceForNumber.roundingNumber(\n vehicle.getVATBasis() * vehicle.getVATRate() / 100,\n 2));\n\n return vehicle;\n }", "public void addFuel(double fuelToAdd){\n\n fuelRemaining = fuelRemaining + fuelToAdd;\n }", "public double getBurntFuelMass();", "private void calculationAndAddAgeCoefficient(Vehicle vehicle) {\n Calendar calendar = Calendar.getInstance();\n int nowYear = calendar.get(Calendar.YEAR);\n int yearOfManufacture;\n int differenceOfYears;\n\n if (vehicle.getYearOfManufacture() != null) {\n // Get year of manufacture\n if (vehicle.getYearOfManufacture().getDescription().equals(\"2003 і раніше\")) { // Change data at the beginning of the year!!!\n yearOfManufacture = 2003; // Change data at the beginning of the year!!!\n } else {\n yearOfManufacture = Integer.parseInt(vehicle.getYearOfManufacture().getDescription());\n }\n\n differenceOfYears = nowYear - yearOfManufacture;\n\n if (differenceOfYears <= 2) {\n vehicle.setAgeCoefficient(1);\n } else {\n vehicle.setAgeCoefficient(differenceOfYears - 1);\n }\n }\n }", "private double calculateCommissionAmountHotels(PrintItinerary itinerary) {\n\t\tdouble commissionAmount = 0.0;\n\t\tif (itinerary.getHotels() != null && itinerary.getHotels().size() > 0) {\n\t\t\tfor (Hotel hotel : itinerary.getHotels()) {\n\t\t\t\tfor (RoomPrice roomPrice : hotel.getSelectedRooms()) {\n\t\t\t\t\tcommissionAmount = commissionAmount\n\t\t\t\t\t\t\t+ roomPrice.getCommissionAmount();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn commissionAmount;\n\t}", "public static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tInvoiceService service= new InvoiceServiceImpl();\r\n\t\twhile(true) {\r\n\t\t\tSystem.out.println(\"==============MENU====================\");\r\n\t System.out.println(\"1. Generate Bill \");\r\n\t System.out.println(\"2. EXIT\");\r\n\t System.out.println(\"Enter your choice\\n\");\r\n\t String choice;\r\n\t\t\ttry {\r\n\t\t\t\tchoice = br.readLine();\r\n\t\t\t\tswitch (choice) {\r\n\t\t\t\tcase \"1\":\r\n\t\t\t\t\tdouble weight;\r\n\t\t\t\t\tint distance;\r\n\t\t\t\t\tSystem.out.println(\"Enter Invoice\");\r\n\t\t\t\t\tSystem.out.println(\"Enter the weight: \");\r\n\t\t\t\t\twhile(true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tString pr=br.readLine();\r\n\t\t\t\t\tboolean b1 = Validation.validatedata(pr,Validation.weightpattern);\r\n\t\t\t\t\tif(b1 == true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tweight = Double.parseDouble(pr);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Enter Again!!!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Wrong details Enter Again!!!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"Enter the distance: \");\r\n\t\t\t\t\twhile(true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tString dis=br.readLine();\r\n\t\t\t\t\t\r\n\t\t\t\t\tboolean b1 = Validation.compareData(dis);\r\n\t\t\t\t\tif(b1 == true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry \r\n\t\t\t\t\t\t{\t\r\n\t\t\t\t\t\t\tdistance = Integer.parseInt(dis);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch(Exception e)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Enter Again!!!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Wrong input. Enter again:\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tint id = (int) (Math.random()*1000);\r\n\t\t\t\t\tInvoice o = new Invoice(id, weight, distance);\r\n\t\t\t\t\tservice.calculateInvoice(o);\r\n\t\t\t\t\t//\t\t\t\t\tOrder p = service.calculateOrder();\r\n\t\t\t\t\tSystem.out.println(\"Order ID: \"+o.getId());\r\n\t\t\t\t\tSystem.out.println(\"Weight: \"+o.getWeight());\r\n\t\t\t\t\tSystem.out.println(\"Distance: \"+o.getDistance());\r\n\t\t\t\t\tSystem.out.println(\"Amount: \"+o.getAmount());\r\n\t\t\t\t\tSystem.out.println(\"CGST: \"+o.getCgst());\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"SGST: \"+o.getSgst());\r\n\t\t\t\t\tdouble total= o.getAmount()+ o.getCgst()+ o.getSgst();\r\n\t\t\t\t\tSystem.out.println(\"Total Amount:\"+ total);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tSystem.out.println(\"Thank You have a nice day!\");\r\n\t\t\t\t\t System.exit(0);\r\n\t break;\r\n\t \r\n\t default:\r\n\t \t System.out.println(\"Invalid choice\");\r\n\t\t }\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t }\r\n\t}", "public double calculateNetWage(){\r\n\t return (getGrossWage()-fines);\r\n }", "public static void main(String[] args) {\r\n\t\tScanner scan = new Scanner(System.in);\r\n\r\n\t\tSystem.out.println(\"Enter your weight in pounds:\");\r\n\t\tdouble pounds = scan.nextDouble();\r\n\t\t\r\n\t\tSystem.out.println(\"Enter your height in feet followed by a space then additional inches:\");\r\n\t\tdouble feets = scan.nextDouble();\r\n\t\tdouble inches = scan.nextDouble();\r\n\t\t\r\n\t\tdouble BMI = 0;\r\n\t\tdouble poundsToKgs = pounds/2.2;\r\n\t\tdouble heightToMeters = (feets*12 + inches)*0.0254;\r\n\t\t\r\n\t\tBMI=poundsToKgs/(heightToMeters*heightToMeters);\r\n\t\t\r\n\t\tSystem.out.println(\"Your BMI is \" + BMI );\r\n\r\n\t\tif(BMI<18.5) {\r\n\t\t\tSystem.out.println(\"Your risk factory is Underweight\");\r\n\t\t}else if(BMI>=25 && BMI<25) {\r\n\t\t\tSystem.out.println(\"Your risk factory is Normal Weight\");\r\n\t\t}else if(BMI>=25 && BMI<30) {\r\n\t\t\tSystem.out.println(\"Your risk factory is Overweight\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"Your risk factory is Obese\");\r\n\t\t}\r\n\t\t\r\n\t}", "public synchronized void applyFee() {\r\n balance -= FEE;\r\n }", "public void onClick(View w) {\n\n\t\t\t\tString stringHeightCm = heightCm.getText().toString();\n\t\t\t\tString stringWaistCm = waistCm.getText().toString();\n\t\t\t\tString stringWeightKgs = weightKgs.getText().toString();\n\t\t\t\tString stringNeckCm = neckCm.getText().toString();\n\t\t\t\tString stringHipsCm = hipsCm.getText().toString();\n\n\t\t\t\tdouble htCm = 0.5;\n\t\t\t\t// double wtKgs = 0.5;\n\t\t\t\tdouble nckCm = 0.5;\n\t\t\t\tdouble wstCm = 0.5;\n\t\t\t\tdouble hpsCm = 0.5;\n\n\t\t\t\t// if female\n\t\t\t\tif (stringHeightCm.length() > 0 && stringWeightKgs.length() > 0\n\t\t\t\t\t\t&& stringWaistCm.length() > 0\n\t\t\t\t\t\t&& stringNeckCm.length() > 0\n\t\t\t\t\t\t&& stringHipsCm.length() > 0) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t// wtKgs = Double.parseDouble(stringWeightKgs);\n\t\t\t\t\t\thtCm = Double.parseDouble(stringHeightCm);\n\t\t\t\t\t\tnckCm = Double.parseDouble(stringNeckCm);\n\t\t\t\t\t\twstCm = Double.parseDouble(stringWaistCm);\n\t\t\t\t\t\thpsCm = Double.parseDouble(stringHipsCm);\n\n\t\t\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\t\t\tSystem.out.println(\"Could not parse \" + nfe);\n\t\t\t\t\t}\n\t\t\t\t\t// htIn = (stringHeightIn.equals(\"null\") ? 0 : htIn);\n\n\t\t\t\t\tcalcFemale(htCm, nckCm, wstCm, hpsCm);\n\n\t\t\t\t} else if (stringHeightCm.length() > 0\n\t\t\t\t\t\t&& stringWeightKgs.length() > 0\n\t\t\t\t\t\t&& stringWaistCm.length() > 0\n\t\t\t\t\t\t&& stringNeckCm.length() > 0\n\t\t\t\t\t\t&& stringHipsCm.length() == 0) { // if male\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\thtCm = Double.parseDouble(stringHeightCm);\n\n\t\t\t\t\t\t// wtKgs = Double.parseDouble(stringWeightKgs);\n\t\t\t\t\t\tnckCm = Double.parseDouble(stringNeckCm);\n\t\t\t\t\t\twstCm = Double.parseDouble(stringWaistCm);\n\t\t\t\t\t\thpsCm = Double.parseDouble(stringHipsCm);\n\n\t\t\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\t\t\tSystem.out.println(\"Could not parse \" + nfe);\n\t\t\t\t\t}\n\n\t\t\t\t\tcalcMale(htCm, nckCm, wstCm);\n\n\t\t\t\t} else {\n\t\t\t\t\tbodyfat = -1;\n\t\t\t\t\tbfTxt.setText(\"error \" + bodyfat);\n\n\t\t\t\t}\n\n\t\t\t\tbfTxt.setText(\"Your bodyfat is \" + bodyfat + \"%\");\n\t\t\t\tbfCategory.setText(\"Body Fat Category: \" + category);\n\n\t\t\t\tInputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\timm.hideSoftInputFromWindow(neckCm.getWindowToken(), 0);\n\t\t\t\timm.hideSoftInputFromWindow(hipsCm.getWindowToken(), 0);\n\n\t\t\t}", "PriceCalculationModel calculateLeasePrice(Long leaseId);", "@Override\r\n\tpublic double foodConsumption() {\n\t\treturn 0;\r\n\t}", "public BigDecimal getFee() {\n return fee;\n }", "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 static double calculateEmployeePension(int employeeSalaryForBenefits) {\n double total = 0;\n try {\n Scanner stdin = new Scanner(System.in);\n\n System.out.println(\"Please enter start date in format (example: May,2015): \");\n String joiningDate = stdin.nextLine();\n System.out.println(\"Please enter today's date in format (example: August,2017): \");\n String todayDate = stdin.nextLine();\n String convertedJoiningDate = DateConversion.convertDate(joiningDate);\n String convertedTodayDate = DateConversion.convertDate(todayDate);\n stdin.close();\n String[] actualDateToday = convertedTodayDate.split(\"/\");\n String[] actualJoiningDate = convertedJoiningDate.split(\"/\");\n\n Integer yearsEmployed = Integer.valueOf(actualDateToday[1]) - Integer.valueOf(actualJoiningDate[1]);\n\n if ( Integer.valueOf(actualJoiningDate[0]) > Integer.valueOf(actualDateToday[0]) ) {\n yearsEmployed--;\n }\n\n total = (((employeeSalaryForBenefits * 12) * 0.05) * yearsEmployed);\n\n\n\n\n System.out.println(\"Total pension to receive by employee based on \" + yearsEmployed + \" years with the company \" +\n \"(5% of yearly salary for each year, based on employee's monthly salary of $\" + employeeSalaryForBenefits + \"): \" + total);\n\n }\n catch (NumberFormatException e) {\n e.printStackTrace();\n }\n return total;\n }" ]
[ "0.64466256", "0.61729693", "0.60532176", "0.60445607", "0.5981742", "0.5967424", "0.5848334", "0.5716767", "0.5708767", "0.5708498", "0.5683535", "0.5676596", "0.56686914", "0.5665464", "0.5652628", "0.5651743", "0.5635675", "0.5613533", "0.5588288", "0.5558946", "0.5557995", "0.5538558", "0.55350345", "0.55106556", "0.54840285", "0.5449831", "0.5446137", "0.5443251", "0.54410255", "0.54153574", "0.54101634", "0.54055804", "0.53781515", "0.53667283", "0.53633857", "0.53589183", "0.5348788", "0.5348738", "0.5348658", "0.534443", "0.53353703", "0.5333781", "0.53316915", "0.53248423", "0.53135663", "0.5313094", "0.53049344", "0.5300655", "0.5299525", "0.5297572", "0.528206", "0.52759755", "0.52740914", "0.5274023", "0.52666444", "0.5264073", "0.5260933", "0.5260668", "0.52593666", "0.5256567", "0.5256114", "0.5256066", "0.5253024", "0.52503884", "0.52503884", "0.5240341", "0.5238158", "0.52366585", "0.52277374", "0.52201545", "0.52193195", "0.52173567", "0.5214892", "0.5212557", "0.52109665", "0.5208492", "0.5206896", "0.5206292", "0.51995957", "0.5197398", "0.5190726", "0.5178958", "0.51743996", "0.5169482", "0.5167663", "0.5164085", "0.5162196", "0.5154244", "0.51530504", "0.5149544", "0.51406467", "0.5123515", "0.51186574", "0.5117636", "0.5116592", "0.51156664", "0.51147985", "0.51126117", "0.5106352", "0.5102123" ]
0.69414526
0
/ method that prints out the vehicle details for an oversized vehicle
public String getVehicleDetails() throws VehicleException { if (weight == 0) { String ninthLine = String.format("%-20s %s\n", "Clearance Height: ", CLEARANCE_HEIGHT); return super.getVehicleDetails() + ninthLine; } System.out.println(); String ninthLine = String.format("%-20s %s\n", "Clearance Height: ", CLEARANCE_HEIGHT); String tenthline = String.format("%-20s %s\n", "Weight: ", weight); String eleventhLine = String.format("%-20s %s\n", "Category: ", category); return super.getVehicleDetails() + ninthLine + tenthline + eleventhLine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printVehicleDetails(Vehicle v) {\n\t\tSystem.out.println(\"Mileage: \"+v.mileage());\n\t\tSystem.out.println(\"Wheels: \"+v.wheels());\n\t}", "void vehicleDetails();", "public static void vehicleInfo() {\n\t\n\tSystem.out.println(\"numberOfVehicles: \"+numberOfVehicles);\n\tint count=getNumberOfVehicles();\n\tString make=\"Kia\";\n\tmake=make.toUpperCase();\n\tSystem.out.println(\"make\"+make);\n\t\n}", "public void showVehicles() {\n\t\tfor (Vehicle vehicle : vehicles) {\n\t\t\tSystem.out.println(vehicle);\n\t\t}\n\t}", "public void viewVehiclesInGarage() {\n\t\tfor (Vehicle vehicle : vehicleList) {\n\t\t\tvehicle.print();\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public String getDetailsForVehicle() throws VehicleException {\r\n\t\tif (weight == 0) {\r\n\t\t\tString thirdLine = \",\" + CLEARANCE_HEIGHT;\r\n\t\t\treturn super.getDetailsForVehicle() + thirdLine;\r\n\t\t}\r\n\t\tString tenthLine = \",\" + CLEARANCE_HEIGHT + \",\" + weight + \",\" + \",\" + category;\r\n\t\treturn super.getDetailsForVehicle() + tenthLine;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"VehicleID : \" + vehicleID + \"|vehicleType : \" + vehicleType + \"|vehicleName : \" + vehicleName\n\t\t\t\t+ \"|weight : \" + weight + \"|color : \" + color + \"|limitSpeed : \" + limitSpeed + \"|isControlled \"\n\t\t\t\t+ isControlled;\n\t}", "@Override\n public void print() {\n System.out.println(\"VIn:- \"+getVehicalIndentificationNumber());\n System.out.println(\"Description:- \"+getVechicalDiscription());\n System.out.println(\"Manufacturer:- \"+getManufacturerName());\n System.out.println(\"isSelfDrive:- \"+getSelfDrive());\n System.out.println(\"isInsured:- \"+getInsured());\n System.out.println(\"insuranceProviderName:- \"+getInsuranceProviderName());\n System.out.println(\"NumberOfSeat:- \"+getNoOfSeat());\n System.out.println(\"FuelType:- \"+getFuelType());\n System.out.println(\"BaseRate:- \"+getBaseRate());\n System.out.println(\"RatePerKm:- \"+getRatePerKm());\n System.out.println(\"VehicleType:- \"+getVehicleType());\n System.out.println(\"Color:- \"+getColor());\n }", "void printCarInfo();", "public String toString() {\n\t\tStringBuilder returnStr = new StringBuilder();\n\t\tfor (Vehicle v : vehicles) {\n\t\t\treturnStr.append(v + \"\\n\");\n\t\t}\n\t\treturn returnStr.toString();\n\t}", "public String printDetail(){\r\n\t\tString str=\"Room Details: \\n\";\r\n\t\tString str1=\"\";\r\n\t\tString str2=\"\";\r\n\t\tString str3=\"\";\r\n\t\tString str4=\"\";\r\n\t\tstr3=\"\\tSeats: \"+this.getNumSeats()+\"\\n\";\r\n\t\tif(this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tHas Whiteboard\\n \";\r\n\t\tif(!this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tDoesn't have Whiteboard\\n\";\r\n\t\tif(this.hasChalkboard)\r\n\t\t\tstr2=\"\\tHas Chalkboard\\n \";\r\n\t\tif(!this.hasChalkboard)\r\n\t\t\tstr2=\"\\tDoen't have Chalkboard\";\r\n\t\tstr4=\"\\tAV Amenities: \"+this.getAVEquipmentList().toString()+\"\\n\";\r\n\t\tstr=str+str3+str1+str2+str4;\r\n\t\treturn str;\r\n\t}", "@Override\n public String toString() {\n return \"Floor: \" + floor + \" Total Price: \" + price + \" Vehicle Type: \" + vehicleType + \" Hours: \" + hours; \n }", "public void inspect(Vehicle v) {\r\n v.inspectVehicle();\r\n }", "public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }", "public void printDetails(Edge street) {\n System.out.printf(\"Driver %d heading from %s to %s via %s\\n\",\n this.driverNum, street.from.getLocationName(), street.to.getLocationName(), street.streetName);\n\n // print where we are leaving to, and how many cups of coffee consumed\n if (street.to.getLocationName().equals(\"Outside City\")) {\n if (street.streetName.equals(\"Fourth Ave.\")) {\n // Philadelphia\n System.out.printf(\"Driver %d has gone to Philadelphia!\\n\", this.driverNum);\n }\n if (street.streetName.equals(\"Fifth Ave.\")) {\n // Cleveland\n System.out.printf(\"Driver %d has gone to Cleveland!\\n\", this.driverNum);\n }\n // print how many cups of coffee\n System.out.printf(\"Driver %d got %d cup(s) of coffee.\\n\", this.driverNum, this.cupsCoffee);\n }\n\n }", "@Override\r\n\tpublic String getDetails() {\r\n\t\tString result = \"\";\r\n\t\tresult += \"Vehicle ID: \t\t\t\" + getID() + \"\\n\" + \"Year:\t\t\t\t\" + getYear() + \"\\n\"\r\n\t\t\t\t+ \"Make:\t\t\t\t\" + getMake() + \"\\n\" + \"Model:\t\t\t\t\" + getModel() + \"\\n\"\r\n\t\t\t\t+ \"Number of seats:\t\t\" + getNumOfSeats() + \"\\n\" + \"Status:\t\t\t\t\" + getStatus() + \"\\n\"\r\n\t\t\t\t+ \"RENTAL RECORD:\t\t\" + \"\\n\";\r\n\r\n\t\tList<RentalRecord> carRecorder = databaseHandle.getAllRecordsByVehicleID(ID);\r\n\t\tfor (int i = 0; i < carRecorder.size() && i < 10; i++) {\r\n\t\t\tif (i == 0 && status == Status.RENTED) {\r\n\r\n\t\t\t\tRentalRecord temp = carRecorder.get(carRecorder.size() - 1);\r\n\t\t\t\tresult += \"Record ID: \t\t\t \" + temp.getId() + \"\\n\" + \"Rent date:\t\t\t \" + temp.getRentDate()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Estimated Return Date: \" + temp.getEstimatedReturnDate() + \"\\n\";\r\n\r\n\t\t\t} else {\r\n\t\t\t\tresult += \"------------------------------------\" + \"\\n\";\r\n\t\t\t\tRentalRecord temp = carRecorder.get(carRecorder.size() - 1 - i);\r\n\t\t\t\tresult += \"Record ID: \t\t\t \" + temp.getId() + \"\\n\" + \"Rent date:\t \t\t \" + temp.getRentDate()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Estimated Return Date: \" + temp.getEstimatedReturnDate() + \"\\n\"\r\n\t\t\t\t\t\t+ \"Actual Return Date: \" + temp.getActualReturnDate() + \"\\n\" + \"Rental Fee: \t\t\t \"\r\n\t\t\t\t\t\t+ temp.getRentalFee() + \"\\n\" + \"Late Fee: \" + temp.getLateFee() + \"\\n\";\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tresult += \"====================================\" + \"\\n\";\r\n\t\treturn result;\r\n\t}", "public void printDetails()\r\n\t{\r\n\t\tSystem.out.println(flightNumber);\r\n\t\tSystem.out.println(departurePoint);\r\n\t\tSystem.out.println(destination);\r\n\t\tSystem.out.println(departureTime);\r\n\t\tSystem.out.println(arrivalTime);\r\n\t\tSystem.out.println(checkedInPassengers);\r\n\t\tif(status == 'S')\r\n\t\t\tSystem.out.println(\"Scheduled\");\r\n\t\t\t\r\n\t\tif(status == 'B')\r\n\t\t\tSystem.out.println(\"Boarding\");\r\n\t\tif(status == 'D')\r\n\t\t\tSystem.out.println(\"Departed\");\r\n\t\tif(status == 'C')\r\n\t\t\tSystem.out.println(\"Canceled\");\r\n\t\t\r\n\t\t\t\t\r\n\t}", "public String toString(){\r\n // creating instance\r\n StringBuilder sb = new StringBuilder();\r\n if(!isAvailable()){\r\n if(veh.getSize() == VehicleSize.Bus){\r\n sb.append('B');\r\n } else if (veh.getSize() == VehicleSize.Car){\r\n sb.append('C');\r\n } else {\r\n sb.append('M');\r\n }\r\n } else {\r\n if(sizeOfSp == VehicleSize.Bus){\r\n sb.append('b');\r\n } else if (sizeOfSp == VehicleSize.Car){\r\n sb.append('c');\r\n } else {\r\n sb.append('m');\r\n }\r\n }\r\n // return statement\r\n return sb.toString();\r\n }", "public static void listVehicles() {\n\t\tSystem.out.println(\"-----------------\");\n\t\tSystem.out.println(\"Listing Vehicles\");\n\t\tSystem.out.println(\"-----------------\");\n\t\t\n\t\tfor (int i = 0; i < owners.size(); i++) {\n\t\t\tfor (Vehicle v : owners.get(i).getVehicles()) {\n\t\t\t\t\n\t\t\t\tSystem.out.println((owners.get(i).getName() + \"'s \" + v.toString()));\n\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\t\n\t}", "void printPos() {\n\n System.out.println(\"\\nMoving vehicles....\\n\");\n for (int v = 0; v < roads.size(); v++) {\n System.out.println(\"\\n__________________ Vehicles on Road: \" + v + \"______________________________\");\n if (roads.get(v).lightAtStart()) {\n if (roads.get(v).getStartLight().isGreen()) {\n System.out.println(\"|Start light is green|\\n\");\n } else System.out.println(\"|Start light red|\\n\");\n\n } else if (roads.get(v).lightAtEnd()) {\n if (roads.get(v).getEndLight().isGreen()) {\n System.out.println(\"|End light green|\\n\");\n } else System.out.println(\"|End light red|\\n\");\n }\n\n if (roads.get(v).vehicles.size() == 0) {\n System.out.println(\"No vehicles are currently on this road...\");\n }\n for (int x = 0; x < roads.get(v).vehicles.size(); x++) {\n if (roads.get(v).vehicles.get(x).getType().equals(\"Motorbike\")) {\n System.out.println(\"Type: \" + roads.get(v).vehicles.get(x).getType() + \" |Direction: \" +\n roads.get(v).vehicles.get(x).getDirection()\n + \" |X Position: \" + roads.get(v).vehicles.get(x).getXpos() + \" |Y Position: \"\n + roads.get(v).vehicles.get(x).getYpos() + \" |Speed: \" + roads.get(v).vehicles.get(x).getSpeed());\n\n\n } else {\n\n System.out.println(\"Type: \" + roads.get(v).vehicles.get(x).getType() + \" |Direction: \" +\n roads.get(v).vehicles.get(x).getDirection()\n + \" |X Position: \" + roads.get(v).vehicles.get(x).getXpos() + \" |Y Position: \"\n + roads.get(v).vehicles.get(x).getYpos() + \" |Speed: \" + roads.get(v).vehicles.get(x).getSpeed());\n }\n }\n\n }\n }", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"Body type: \" + bodyType + \" Number of doors: \" + noOfDoors + \" Number of seats: \" + noOfSeats);\n System.out.println();\n }", "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "public void displayModelDetails() {\n System.out.println(\"Name: \" + getFirstName() + \" \" + getLastName());\n System.out.println(\"Height: \" + getHeightInFeetAndInches());\n System.out.println(\"Weight: \" + getWeight() + \" pounds\");\n String travelMessage = canTravel ? \"yep\" : \"nope\";\n System.out.println(\"Travels: \" + travelMessage);\n String smokeMessage = smokes ? \"yep\" : \"nope\";\n System.out.println(\"Smokes\" + smokeMessage);\n System.out.println(\"Hourly rate: $\" + calculatePayDollarsPerHour());\n }", "@Override\r\n public void printAllVehicles(Integer age) {\r\n if(!drivers.containsKey(age)) {\r\n System.out.println(\"No vehicle found parked by the driver of age \" + age.toString() + \".\");\r\n return;\r\n }\r\n Driver driver = drivers.get(age);\r\n Iterator<Vehicle> it = driver.getVehiclesOwned().iterator();\r\n System.out.print(\"Vehicle Registeration Numbers of all cars parked by driver of age \" + age.toString() + \" are as follows: \");\r\n while(it.hasNext()){\r\n System.out.print(it.next().getVehicleNumber() + \" | \");\r\n }\r\n System.out.println();\r\n }", "public static void getVehicleInformation(Employee [] employee) {\n\t\tif (Vehicle.getVehicleQuantity() == 0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"There is no vehicle!\");\n\t\t} else {\n\t\t\tfor (int i = 0; i < Vehicle.getVehicleQuantity(); i++) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"-------List of Vehicles-------\\n\"\n\t\t\t\t\t\t+ (i+1) + \" \" + employee[i+1].getVehicle().getName() + \"\\n\");\n\t\t\t}\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Vehicle [Id=\" + Id + \", Year=\" + Year + \", Make=\" + Make + \", Model=\" + Model + \"]\";\n\t}", "@Override\r\n public String print(){\r\n String geneString = \"Customer: \" + getNode() + \", isVehicle: \" + getIsVehicle() + \", capacity:\" + getSize();\r\n return geneString;\r\n }", "public void printDetails() {\n PrintFormatter pf = new PrintFormatter();\n\n String first = \"############# Armor Details #############\";\n System.out.println(first);\n pf.formatText(first.length(), \"# Items stats for: \" + name);\n pf.formatText(first.length(), \"# Armor Type: \" + itemsType);\n pf.formatText(first.length(), \"# Slot: \" + slot);\n pf.formatText(first.length(), \"# Armor level: \" + level);\n\n if (baseStats.getHealth() > 0)\n pf.formatText(first.length(), \"# Bonus HP: \" + baseStats.getHealth());\n\n if (baseStats.getStrength() > 0)\n pf.formatText(first.length(), \"# Bonus Str: \" + baseStats.getStrength());\n\n if (baseStats.getDexterity() > 0)\n pf.formatText(first.length(), \"# Bonus Dex: \" + baseStats.getDexterity());\n\n if (baseStats.getIntelligence() > 0)\n pf.formatText(first.length(), \"# Bonus Int: \" + baseStats.getIntelligence());\n\n System.out.println(\"########################################\");\n\n }", "public void inventoryPrint() {\n System.out.println(\"Artifact Name: \" + name);\r\n System.out.println(\"Desc:\" + description);\r\n System.out.println(\"Value: \" + value);\r\n System.out.println(\"Mobility: \" + mobility); \r\n }", "@Override\n\tpublic String toString() { // output\n\t\tString s = \"Flight #\" + getFlightNumber() + \" Cargo: \" + cargoCapacity\n\t\t\t\t+ \"/\" + getMaximumCapacity() + \" cu/ft. \" + +cargoWeight + \"/\"\n\t\t\t\t+ getMaximumWeight() + \" lbs.\";\n\t\ts += \" \\n CARGO DETAILS: \\n\";\n\t\tfor (int i = 0; i < getCargoInPlane().getSize(); i++) {\n\t\t\ts += \"\\t\" + getCargoInPlane().get(i) + \"\\n\";\n\t\t}\n\n\t\tif (getCargoInPlane().isEmpty()) {\n\t\t\ts += \"\\t\" + \"NO CARGO\"; // if nothing on plane\n\t\t}\n\t\treturn s; // the original string of all info\n\t}", "public void carDetails() {\n\t\t\r\n\t}", "@Override // Inherited from the Object class.\n public String toString() {\n return \"gear: \" + gear + \" cadence: \" + cadence + \" speed: \" + speed +\n \" name: \" + name;\n }", "@Override\n public String toString() {\n if (this.getType() == BikeType.ELECTRICAL) {\n return String.format(\"Bike - %d - %d - %s - %.2f - %.2f - %b\", this.idBike, this.idPark, this.type, this.currentBattery, this.maxBattery, this.isActive);\n }\n return String.format(\"Bike - %d - %d - %s - %b\", this.idBike, this.idPark, this.type, this.isActive);\n }", "public void displayCar()\n\t{\n\t\tSystem.out.println(\"Wheels of car\t:\t\" + objCar.getWheel());\n\t\tSystem.out.println(\"Speed of car\t:\t\" + objCar.getSpeed());\n\t\tSystem.out.println(\"Passengers of car\t:\t\" + objCar.getCarPassengerNumber());\n\t}", "public String toString() {\n return String.format(\"%s:%n\\t%-10s: %s%n\\t%-10s: %s%n\\t%-10s: $%.2f%n\\t%-10s: %s%n\\t%-10s: %s%n\", \n \"Boat\", \"Model\", getVehicleModel(), \"Color\", getVehicleColor(), \"Cost\", getVehicleCost(), \n \"Type\", getBoatType(), \"Made of\", getBoatConstruct());\n }", "public String getDescription() {\n return \"Driver[Name:'\" + this.name + \"', Vehicle:'\" + this.vehicle + \"']\";\n }", "public void printDetails() {\n System.out.println(\"Name: \" + getFirstName() + \" \" + getLastName());\n System.out.println(\"Height: \" + getHeight() + \" inches\");\n System.out.println(\"Weight: \" + (int) getWeight() + \" pounds\");\n\n // unary, binary, ternary(3)\n // ternary operator\n String travelMessage = canTravel ? \"Does travel\" : \"Does not travel\";\n System.out.println(travelMessage);\n\n String smokeMessage = smokes ? \"Does smoke\" : \"Does not smoke\";\n System.out.println(smokeMessage);\n\n // ternary operators can replace simple if-else statement\n // System.out.print(\"Does \");\n // if (!isCanTravel())\n // System.out.print(\"not \");\n // System.out.println(\"travel\");\n // System.out.print(\"Does \");\n // if (!isSmokes())\n // System.out.print(\"not \");\n // System.out.println(\"smoke\");\n }", "void displayCharge(Vehicle obj, long leaveTime);", "@Override\n public String getInfo() {\n return \"Car:\\n\" + \"\\tBrand: \" + getBrand() + \"\\n\" + \"\\tModel: \" + getModel() + \"\\n\"\n + \"\\tRegistration Number: \" + getRegistrationNumber() + \"\\n\"\n + \"\\tNumber of Doors: \" + getNumberOfDoors() + \"\\n\"\n + \"\\tBelongs to \" + owner.getName() + \" - \" + owner.getAddress();\n }", "private void drawDebugInfo(final Graphics2D theGraphics, final Vehicle theVehicle) {\n int x = theVehicle.getX() * SQUARE_SIZE;\n int y = theVehicle.getY() * SQUARE_SIZE;\n\n // draw numbers on each vehicle\n theGraphics.setColor(Color.WHITE);\n theGraphics.drawString(theVehicle.toString(), x, y + SQUARE_SIZE - 1);\n theGraphics.setColor(Color.BLACK);\n theGraphics.drawString(theVehicle.toString(), x + 1, y + SQUARE_SIZE);\n\n // draw arrow on vehicle for its direction\n final Direction dir = theVehicle.getDirection();\n int dx = (SQUARE_SIZE - MARKER_SIZE) / 2;\n int dy = dx;\n\n switch (dir) {\n case WEST:\n dx = 0;\n break;\n\n case EAST:\n dx = SQUARE_SIZE - MARKER_SIZE;\n break;\n\n case NORTH:\n dy = 0;\n break;\n\n case SOUTH:\n dy = SQUARE_SIZE - MARKER_SIZE;\n break;\n\n default:\n }\n\n x = x + dx;\n y = y + dy;\n\n theGraphics.setColor(Color.YELLOW);\n theGraphics.fillOval(x, y, MARKER_SIZE, MARKER_SIZE);\n }", "public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}", "private void print() {\r\n // Print number of survivors and zombies\r\n System.out.println(\"We have \" + survivors.length + \" survivors trying to make it to safety (\" + childNum\r\n + \" children, \" + teacherNum + \" teachers, \" + soldierNum + \" soldiers)\");\r\n System.out.println(\"But there are \" + zombies.length + \" zombies waiting for them (\" + cInfectedNum\r\n + \" common infected, \" + tankNum + \" tanks)\");\r\n }", "@Override\n public void showInfo() {\n System.out.println(\"Garage {\");\n System.out.println(\"\\tGarage is \" + (isBig ? \"big\" : \"small\"));\n int i = 0;\n for (T car : carsInGarage) {\n System.out.println(\"\\tCar №\" + i + \": \" + car.getShortInfo());\n i++;\n }\n System.out.println(\"}\");\n }", "@Override\n public String toString() {\n return \"Car \" + this.id + \". Size : \" + this.size\n + \".\\nOrientation :\" + this.orientation\n + \". Current position : \" + this.currentPosition;\n }", "public void print() {\n\t\tSystem.out.println(\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName+\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)+\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress);\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Jet model=\" + model + \", speedMach=\" + speedMach + \", range=\" + range + \", price=\" + price + \"\";\n\t}", "public void display(){\n System.out.println(\"\\n Car 2:\");\n System.out.println(toString());\n }", "public String getVehiclename() {\r\n\t\treturn vehiclename;\r\n\t}", "@Override\r\n public String toString() {\r\n return \"the car \"+this.id+\"has as size \"+this.size+\r\n \"and is oriented \"+this.orientation+\r\n \" and have a currentPosition in \"+this.currentPosition;\r\n }", "public String print(){\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.trackNumber, \r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.numRailCars, \r\n\t\t\t\tthis.destCity);\r\n\t\t}", "public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }", "public String toString()\r\n {\r\n System.out.println(\"SOUT\");\r\n return \"Vroom!!\";\r\n }", "public String displayDetails()\n\t{\n\t\tString displayDetail = \"\";\n\t\t \n\t\tdisplayDetail = (\"Make of your System\\t\\t=>\\t\" + make + \n\t\t\t\t\t\t\"\\nModel of your System\\t\\t=>\\t\" + model + \n\t\t\t\t\t\t\"\\nSpeed of your System\\t\\t=>\\t\" + speed + \n\t\t\t\t\t\t\"\\nMemory of your System\\t\\t=>\\t\" + memorySize + \" MB \" +\n\t\t\t\t\t\t\"\\nHard Disk of your System\\t=>\\t\" + hardDiskSize + \" GB \" +\n\t\t\t\t\t\t\"\\nPurchase Cost of your System\\t=>\\t\" + purchaseCost);\n\t\t\n\t\treturn displayDetail;\n\t}", "void dump() {\n\t\tSystem.out.print(\"I am: \" + (territoryID));\n\t\tSystem.out.print(\"\\tNeighbour of:\");\n\n\t}", "public void showCar(){\n for (int i=0; i<car.size(); i++){\n System.out.println((i+1) + \". \" + car.get(i).formatForBuy());\n }\n }", "@Override\n public String getDescription() {\n return String.format(\n \"This is a %s car, its top speed is %.2fkm/h and it can hold %d people\",\n this.getBrand(), this.getSpeed(), this.getNumPassengers()\n );\n }", "public void PrintAirCondition() {\r\n System.out.println(\"\\ndevice details for Air Condition: \");\r\n System.out.println(\"dimensions: \"+\"\\nlength:\" +length +\"\\nheight:\" +height +\"\\ndepth:\" +depth);\r\n System.out.println(\"Manufacturer: \" + manufacturer_name);\r\n System.out.println(\"Device name: \" + device_name);\r\n System.out.println(\"device type: \" + device_type);\r\n System.out.println(\"energy consumption: \" + energy_consumption);\r\n System.out.println(\"cooling power: \" + cooling_power);\r\n System.out.println(\"heating power: \" + heating_Power);\r\n System.out.println(\"Ecological coolant (R32): \" + Ecological_Coolant_R32);\r\n System.out.println(\"air filter: \" + air_filter);\r\n System.out.println(\"ionist: \" + ionist);\r\n }", "public static void printVMinfo(VirtualMachine vm) throws IOException, InterruptedException{\n\t\t\t\n\t\t\t\tvm.getResourcePool();\n\t\t\t\tSystem.out.println(\"Hello \" + vm.getName());\n\t\t\t\tSystem.out.println(\"Status \" + vm.getGuestHeartbeatStatus());\n\t\t\t\tSystem.out.println(\"get ip \"+ vm.getSummary().getGuest().getIpAddress());\n\t\t\t\tSystem.out.println(\"get id \"+ vm.getSummary().getGuest().getGuestId());\n\t\t\t\tSystem.out.println(\"get toolstatus \"+ vm.getSummary().getGuest().toolsRunningStatus);\n\t\t\t\tSystem.out.println(\"get hostname \"+ vm.getSummary().getGuest().getHostName());\n\t\t\t\tSystem.out.println(\"GuestOS: \" + vm.getConfig().getGuestFullName());\n\t\t\t\tSystem.out.println(\"vm version: \" + vm.getConfig().version);\n\t\t\t\tSystem.out.println(\"meomery: \" + vm.getConfig().getHardware().memoryMB + \"MB\");\n\t\t\t\t//System.out.println(\"meomery overhead: \" + vm.getConfig().memoryAllocation.reservation.toString() + \"MB\");\n\t\t\t\tSystem.out.println(\"cpu: \" + vm.getConfig().getHardware().numCPU);\n\t\t\t\tSystem.out.println(\"Multiple snapshot supported: \" + vm.getCapability().isMultipleSnapshotsSupported());\n\t\t\t\tSystem.out.println(\"====================================================================\");\n\t\t\t}", "public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}", "public void printSpecs(int i) {\r\n try {\r\n System.out.println(i + \". \" + name + \" - \" + sipp + \" - \" + carType + \" - \" + doorsCarType + \" - \" + transmision + \" - \" + fuel + \" - \" + ac);\r\n } catch (Exception e) {\r\n System.out.println(\"VehicleDTO printSpec error \" + e.getMessage());\r\n }\r\n }", "public void torpedoInfo() {\r\n System.out.println(\"[\" + TiePilot.sep + \"]\");\r\n System.out.println(\"Cannon Model: \" + ModelNumber);\r\n System.out.println(\"Max Fire Range: \" + MaxFiringRange);\r\n System.out.println(\"Torpedo Cap: \" + TorpedoCapacity);\r\n System.out.println(\"Current Torpedo Count: \" + this.getCurrentTorpedoCount());\r\n System.out.println(\"[\" + TiePilot.sep + \"]\");\r\n }", "private String requestInfo(Long vehicleId) {\n return \"vehicleId(\" + vehicleId + \") \";\n }", "private void displayRent(){\r\n\r\n System.out.println(\"To rent:\");\r\n for(HardwareDevice devices: hardwares){\r\n\r\n devices.displayDescription();\r\n }\r\n }", "public String printOutput(driver driver){\n \t\tString street = new String();\n \t\tif(name == driver.start.option1.name){\n \t\t\t\tstreet = driver.start.outStreet1;\n \t\t\t}\n \t\t\telse{\n \t\t\t\tstreet = driver.start.outStreet2;\n \t\t\t}\n \tString printStr = \"Driver \" + driver.id + \" heading from \" + driver.start.name + \" to \" + name + \" via \" + street;\n \treturn printStr;\n \t\n \t}", "@Override\n public String toString() {\n return String.format(\"Name: %s, Venom ratings: %.2f\", name, venomRating);\n }", "public String toString() {\n String memory = super.toString();\n return memory + \"(\" + locations + \", \" + vehicles + \")\";\n }", "public String toString() {\n\t\treturn \"This Airplane is manufactured by \" + this.brand +\". It costs \" + this.price + \"$ and its horse power is \" + this.horsePower + \".\";\n\t}", "private void printInfo()\n {\n if(currentRoom.getItems().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Items in room are: \" );\n ArrayList<Item> items = currentRoom.getItems();\n \n for(Item i : items)\n {\n System.out.println(i.getItemName() + i.getDescription()); \n }\n \n }\n \n \n \n if(currentRoom.getWeapons().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Weapons in room are: \" );\n \n ArrayList<Weapon> weapons = currentRoom.getWeapons();\n for(Weapon w : weapons)\n {\n System.out.println(w.getWeaponName() + w.getDescription());\n }\n \n }\n \n \n }", "public String toString() {\n\t\treturn(\"\\nComputer Info:\" +\n\t\t\t \"\\nBrand: \" + brand +\n\t\t\t \"\\nModel: \" + model +\n\t\t\t \"\\nSN: \" + SN +\n\t\t\t \"\\nPrice: \" + price);\n\t}", "public String toString() {\n\t\tthis.setDepartureTime(System.currentTimeMillis());\n\t\tfloat waittime = (float)(departureTime - arrivalTime) / 1000 ;\n\n\t\treturn \"[Time \" + departureTime + \"] Omnibus #\" + vehicleNumber + \" (\" + getBound() + \"). Tiempo total de espera \" + waittime + \" segundos.\";\n\t}", "public void displayAllInfo(){\nSystem.out.println(\"Dimensions of the room - length in feet : \" + room.getLengthInFeet() + \" width in feet :\" + room.getWidthInFeet());\nSystem.out.println(\"Price per square foot :\" + pricePerSquareFoot);\nSystem.out.println(\"Total Cost :\" + calculateTotalCost());\n}", "public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }", "public String toString() {\n\t\treturn super.toString() + \", NumberOfSeat: \" + this.numberOfSeats + \", HorsePower: \" + this.power;\n\t}", "public String toString(){\n \n \t\t return \"make:\"+this.make+\" ,model:\"+this.model+\",year:\"+this.year+\",Mileage\"+this.mileage;\n\t}", "public String toString(){\n\t\t\tString x = (roomnumber + \" \" + nop + \" \" + equipment + \" \" + price + \" \" + priceoffer + \" \" + rating);\n\t\t\treturn x;\n\t\t}", "public static void main(String[] args) {\n\t\tVehicl[] v = new Vehicl[5];\r\n\t\tv[0]=new Bike (\"Red\",\"CBZ\",30);\r\n\t\tv[1]=new TwoWheeler (\"Yellow\",\"BUS\");\r\n\t\tv[2]=new Vehicl (\"Red\");\r\n\t\tv[3]=new TwoWheeler (\"Blue\",\"Scooty\");\r\n\t\tv[4]=new Bike (\"Red\",\"CBZ\",30);\r\n\t\tfor(Vehicl vehicle:v)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Colour is:\"+vehicle.color);\r\n\t\t\tif (vehicle instanceof TwoWheeler)\r\n\t\t\tSystem.out.println(\"Name is:\"+((TwoWheeler)vehicle).name);\r\n\t\t\tif (vehicle instanceof Bike)\r\n\t\t\t\tSystem.out.println(\"Mileage is:\"+((Bike)vehicle).mileage);\r\n\t\t\tSystem.out.println(\"**************\");\r\n\t\t}\r\n\t}", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public String display(){\r\n\t\tif(this.AWD==true){\r\n\t\t\treturn super.display()+\" \"+model+\" \"+this.price+\"$ SF: \"+this.safetyRating+\" RNG: \" +this.maxRange+\" AWD\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn super.display()+\" \"+model+\" \"+this.price+\"$ SF: \"+this.safetyRating+\" RNG: \" +this.maxRange+\" 2WD\";\r\n\t\t}\r\n \r\n\t}", "@ApiModelProperty(required = true, value = \"More information about the type of vehicle on offer.\")\n public VehicleInfo getVehicleInfo() {\n return vehicleInfo;\n }", "public static void main(String[] args) {\n Virus Ebola = new Virus();\n // set member variables on the instance of Virus stored in Herpes\n Ebola.Baltimore = \"V\";\n Ebola.Order = \"Mononegavirales\";\n Ebola.Family = \"Filoviridae\";\n Ebola.Genus = \"Ebolavirus\";\n Ebola.Tropism = \"Anything it can liquefy\";\n Ebola.HumanOnly = false;\n Ebola.Envelope = false;\n Ebola.GenomeSize = 19;\n \n // send our Car instance to a helper method to print its member variables\n displayVirusStats(Ebola);\n // test its methods\n Ebola.startReplication();\n Ebola.notReplicating();\n Ebola.getCurrentSpeed();\n \n}", "@SuppressWarnings(\"unused\")\r\n private void printVOI(VOI theVOI) {\r\n int numCurves;\r\n VOIContour curve;\r\n Vector<VOIBase>[] curves = theVOI.getSortedCurves(zDim);\r\n for (int sliceIdx = 0; sliceIdx < zDim; sliceIdx++) {\r\n numCurves = curves[sliceIdx].size();\r\n ViewUserInterface.getReference().getMessageFrame().append(\"Slice number: \" +sliceIdx +\" number of curves: \" +numCurves+\"\\n\", ViewJFrameMessage.DEBUG);\r\n for (int curveIdx = 0; curveIdx < numCurves; curveIdx++) {\r\n curve = ((VOIContour)curves[sliceIdx].get(curveIdx));\r\n ViewUserInterface.getReference().getMessageFrame().append(\" Curve: \" +curveIdx +\" number of points: \" +curve.size()+\"\\n\", ViewJFrameMessage.DEBUG);\r\n } // end for (int curveIdx = 0; ...)\r\n } // end for (int sliceIdx = 0; ...)\r\n }", "public String getDisplay() {\n\t\tString output;\n\t\tStringBuilder tempout = new StringBuilder();\n\t\tfor(Entry<String, ParkingSpace> entry:hashmap.entrySet()) {\n\t\t\tString key = entry.getKey();\n\t\t\tVehicle temp = entry.getValue().getVehicle();\n\t\t\ttempout.append(\"Plate# \" + key + \" \" + temp.toString() + \"\\n\");\n\t\t}\n\t\toutput = tempout.toString();\n\t\treturn output;\n\t}", "public static String getCarDetails(Car car) {\n\n if (car.getMake() == null || car.getModel() == null || car.getYear() == null || car.getColor() == null) {\n return \"Not able to provide details\";\n }\n\n return String.format(\"%s %s %s %s\", car.getColor(), car.getYear(), car.getMake(), car.getModel());\n\n }", "public String toString()\r\n {\r\n return(\"No of gears are \"+gear\r\n +\"\\n\"\r\n + \"speed of bicycle is \"+speed);\r\n }", "@Override\n public String toString()\n {\n String aDevolver= \"\";\n aDevolver += super.toString();\n aDevolver += \"potenciaCV: \" + potenciaCV + \"\\n\";\n return aDevolver;\n }", "public String toString()\n {\n String toStringOut = \"\";\n String vetVisitAttributes = super.toString();\n String vetVisitUrgAttributes = \"\";\n \n vetVisitUrgAttributes = \"diagnosis: \" + this.getDiagnosis() + \" \" +\n \"treatment: \" + this.getTreatment();\n \n toStringOut = vetVisitAttributes + \" \" + vetVisitUrgAttributes;\n \n return toStringOut;\n \n }", "public void showInfomation()\n {\n\t System.out.println(\"\\nSide\"+\"\\n\\tnumber: \"+ super.getNumber() +\"\\n\\tdishName: \" + super.getDishName() + \"\\n\\tmaker: \"+maker+\"\\n\\tprice : \" + super.getPrice()+\"$\");\n }", "private void displayChampionshipDetails()\n {\n displayLine();\n System.out.println(\"########Formula 9131 Championship Details########\");\n displayLine();\n System.out.println(getDrivers().getChampionshipDetails());\n }", "public void printVmInfo(String vmName){\r\n\t\ttry {\r\n\t\t\tVirtualMachine virtualMachine = searchVirtualMachine(vmName);\r\n\t\t\tGuestInfo guestInfo = virtualMachine.getGuest();\r\n\t\t\tSystem.out.println(\"Name = \"+vmName);\r\n\t\t\tSystem.out.println(\"Guest full name = \"+guestInfo.getGuestFullName());\r\n\t\t\tSystem.out.println(\"Guest state = \"+guestInfo.getGuestState());\r\n\t\t\tSystem.out.println(\"IP addr = \"+guestInfo.getIpAddress());\r\n\t\t\tSystem.out.println(\"Tool running status = \"+guestInfo.getToolsRunningStatus());\r\n\t\t\tSystem.out.println(\"Power state = \"+virtualMachine.getRuntime().getPowerState());\r\n\t\t} catch (Exception e) {\r\n\t\t\tprintInvalidVmMessage(vmName);\r\n\t\t}\r\n\t}", "public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\n\t}", "public void printCustomerDetails()\r\n {\r\n System.out.println(title + \" \" + firstName + \" \" \r\n + lastName + \"\\n\" +getAddress() \r\n + \"\\nCard Number: \" + cardNumber \r\n + \"\\nPoints available: \" + points);\r\n }", "public void display_inventory() {\n\t\t// displays all identified crystals\n\t\tfor(int i = 0;i<maxInvSize;i++) {\n\t\t\tif(identifiedArray[i] != null) {\n\t\t\t\tcrystal_description(identifiedArray[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public String toString() {\n\t\treturn \"Road from \" + getLeave() + \" to \" + getArrive() + \" with toll \" + getToll();\n\t}", "public String toString() {\n\t\treturn \"This Tram has \" + numOfStops + \" stops, and costs \" + ticketPrice + \"$. Its maximum speed is \"\n\t\t\t\t+ maxSpeed + \"km/h, route number is \" + routeNum + \", line name is \" + lineName\n\t\t\t\t+ \". it has been operated \" + beginOperationYear + \" year(s), and driver(s) name is \" + driverName;\n\t}", "public void visOversikt() {\r\n System.out.println(\"\\nPerson Oversikt:\");\r\n\r\n for(Person person : personListe.values()) {\r\n System.out.println(\"\\n\" + person);\r\n System.out.println(person + \" eier \" + (person.eierSize() + person.utlaantSize()) + \" DVD'er\");\r\n System.out.println(person + \" laaner ut \" + person.utlaantSize() + \" DVD'er\");\r\n System.out.println(person + \" laaner \" + person.laanerSize() + \" DVD'er\");\r\n }\r\n }", "public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }", "@Override\r\n public String toString() \r\n { \r\n //Referenced: https://javarevisited.blogspot.com/2012/03/how-to-format-decimal-number-in-java.html\r\n DecimalFormat twoPlace = new DecimalFormat(\"##.00\");\r\n \r\n \r\n //Referenced: https://stackoverflow.com/questions/29038627/how-can-i-print-a-new-line-in-a-tostring-method-in-java\r\n return \"\\tFirst Name: \" + getFirstName() + \"\\n\" + \"\\tLast Name: \" + getLastName() + \"\\n\" + \"\\tTicket: \" + getTicketType() + \"(\" +getDesc() + \")\" \r\n + \"\\n\" + \"\\tPrice: $\" + twoPlace.format(getPrice()) + \"\\n\" + \"\\tVenue: \" + getVenueName() + \"\\n\" + \"\\tPerformance: \" + getPerformanceName() +\r\n \"\\n\" + \"\\tDate: \" + getPerformanceDate() + \"\\n\" + \"\\tTime: \" + getPerformanceTime();\r\n }", "public static void printMovieInformation(Movie movieObj) {\n\n System.out.print(\"The movie \"+movieObj.getName());\n System.out.print(\" is \"+movieObj.getLength() + \" hour long\");\n System.out.println(\" and it genre is \"+movieObj.getType());\n\n \n\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 String toString()\n {\n return (\"its engine has \" + cyl + \" cylinders and runs on \" +\n getFuelString() + \".\");\n }" ]
[ "0.75626993", "0.7062652", "0.7062194", "0.70587075", "0.69075996", "0.6886497", "0.6865782", "0.68589324", "0.66697425", "0.647194", "0.6463292", "0.643899", "0.6395755", "0.63867635", "0.6305824", "0.62881404", "0.62573767", "0.6253958", "0.62222445", "0.619747", "0.61849695", "0.61783296", "0.61708134", "0.6166131", "0.6158575", "0.6142675", "0.6137141", "0.61157835", "0.6099618", "0.60734683", "0.60710484", "0.6060996", "0.59749126", "0.596843", "0.5931255", "0.59229237", "0.5919945", "0.5895916", "0.5894437", "0.589096", "0.58736163", "0.586558", "0.58466434", "0.5842773", "0.5822426", "0.58050823", "0.5797804", "0.5787047", "0.5784913", "0.5783843", "0.57764226", "0.5775217", "0.5766994", "0.576613", "0.57651836", "0.57630336", "0.5756982", "0.5753461", "0.5752931", "0.57511246", "0.57478625", "0.5745442", "0.5732385", "0.57251596", "0.57194525", "0.57165694", "0.57067674", "0.5706656", "0.57012916", "0.5689513", "0.56836516", "0.56729543", "0.5662058", "0.566142", "0.56421494", "0.56386054", "0.5636971", "0.5636054", "0.5627723", "0.5626681", "0.56146216", "0.5610543", "0.56051856", "0.56033427", "0.5587723", "0.5582864", "0.55817693", "0.55803686", "0.55729353", "0.55650085", "0.55619746", "0.55494386", "0.5545664", "0.55451554", "0.55419564", "0.5534791", "0.55231625", "0.55209154", "0.550336", "0.5501214" ]
0.7313831
1
/ another method that prints out the vehicle details for an oversized Vehicle when writing to the Vehicle.txt file
public String getDetailsForVehicle() throws VehicleException { if (weight == 0) { String thirdLine = "," + CLEARANCE_HEIGHT; return super.getDetailsForVehicle() + thirdLine; } String tenthLine = "," + CLEARANCE_HEIGHT + "," + weight + "," + "," + category; return super.getDetailsForVehicle() + tenthLine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveVehicles() throws IOException {\n //Overwrite data file\n FileWriter fw = new FileWriter(new File(VE_FILE), false);\n BufferedWriter bw = new BufferedWriter(fw);\n try {\n System.out.print(\"Vehicle is saving into data file vehicles.txt...\");\n\n //Writes number of Vehicle\n bw.write(String.valueOf(this.vehicles.size()));\n\n for (int i = 0; i < this.vehicles.size(); i++) {\n //Inits Vehicle's information\n int contractId = this.vehicles.get(i).getContractId();\n String type = this.vehicles.get(i).getType();\n String licensePlate = this.vehicles.get(i).getLicensePlate();\n String chassisId = this.vehicles.get(i).getChassisId();\n String enginesId = this.vehicles.get(i).getEnginesId();\n\n //Writes Vehicle's information into data file\n bw.newLine();\n bw.write(String.valueOf(contractId));\n bw.newLine();\n bw.write(type);\n bw.newLine();\n bw.write(licensePlate);\n bw.newLine();\n bw.write(chassisId);\n bw.newLine();\n bw.write(enginesId);\n\n }\n } finally {\n //Saves data file (from RAM into HDD)\n bw.close();\n System.out.println(\"Done!\");\n }\n }", "public String getVehicleDetails() throws VehicleException {\r\n\r\n\t\tif (weight == 0) {\r\n\t\t\tString ninthLine = String.format(\"%-20s %s\\n\", \"Clearance Height: \", CLEARANCE_HEIGHT);\r\n\t\t\treturn super.getVehicleDetails() + ninthLine;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tString ninthLine = String.format(\"%-20s %s\\n\", \"Clearance Height: \", CLEARANCE_HEIGHT);\r\n\t\tString tenthline = String.format(\"%-20s %s\\n\", \"Weight: \", weight);\r\n\t\tString eleventhLine = String.format(\"%-20s %s\\n\", \"Category: \", category);\r\n\t\treturn super.getVehicleDetails() + ninthLine + tenthline + eleventhLine;\r\n\r\n\t}", "public void printVehicleDetails(Vehicle v) {\n\t\tSystem.out.println(\"Mileage: \"+v.mileage());\n\t\tSystem.out.println(\"Wheels: \"+v.wheels());\n\t}", "public static void vehicleInfo() {\n\t\n\tSystem.out.println(\"numberOfVehicles: \"+numberOfVehicles);\n\tint count=getNumberOfVehicles();\n\tString make=\"Kia\";\n\tmake=make.toUpperCase();\n\tSystem.out.println(\"make\"+make);\n\t\n}", "public void writeInfoTofile() throws IOException\n\t{\n\t\tFileWriter fstream = new FileWriter(\"booking.txt\",true);\n BufferedWriter out = new BufferedWriter(fstream); //buffer class name out\n out.append(\"name : \"+this.customer_name);\n out.newLine();\n out.append(hotelInfo.getName());// Writing all customer info\n out.newLine();\n out.append(\"country : \"+hotelInfo.getCountry());\n out.newLine();\n out.append(\"Hotel rating : \"+hotelInfo.getStar());\n out.newLine(); \n out.append(\"check-in date : \"+this.checkin_date);\n out.newLine();\n out.append(\"check-out date: \"+this.checkout_date);\n out.newLine();\n out.append(\"Total price : \"+this.totalPrice);\n out.newLine();\n out.close();\n System.out.println(\"Writting successful.\");\n\t}", "public static void storeDataIntoFile() {\n\r\n try {\r\n FileWriter writer = new FileWriter(\"DetailsOfVaccination.txt.txt\");\r\n writer.write(\"Vaccination booth info - First names-\" + Arrays.toString(firstName)); //Write the patients first name\r\n writer.write(\"\\n Patient's surnames - \" + Arrays.toString(surname)); //Write the patients surname\r\n writer.write(\"\\n Number of remaining vaccines = \" + vaccines); //Write the remaining of vaccines in stock\r\n writer.close();\r\n System.out.println(\"Successfully stored data into the file.\");\r\n }\r\n catch (IOException e) { //Runs if there was an error in file\r\n System.out.println(\"An error occurred while storing data into the file. Please try again.\");\r\n e.printStackTrace(); //Tool used to handle exceptions and errors (gives the line number and class name where exception happened)\r\n }\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"VehicleID : \" + vehicleID + \"|vehicleType : \" + vehicleType + \"|vehicleName : \" + vehicleName\n\t\t\t\t+ \"|weight : \" + weight + \"|color : \" + color + \"|limitSpeed : \" + limitSpeed + \"|isControlled \"\n\t\t\t\t+ isControlled;\n\t}", "@Override\n public void print() {\n System.out.println(\"VIn:- \"+getVehicalIndentificationNumber());\n System.out.println(\"Description:- \"+getVechicalDiscription());\n System.out.println(\"Manufacturer:- \"+getManufacturerName());\n System.out.println(\"isSelfDrive:- \"+getSelfDrive());\n System.out.println(\"isInsured:- \"+getInsured());\n System.out.println(\"insuranceProviderName:- \"+getInsuranceProviderName());\n System.out.println(\"NumberOfSeat:- \"+getNoOfSeat());\n System.out.println(\"FuelType:- \"+getFuelType());\n System.out.println(\"BaseRate:- \"+getBaseRate());\n System.out.println(\"RatePerKm:- \"+getRatePerKm());\n System.out.println(\"VehicleType:- \"+getVehicleType());\n System.out.println(\"Color:- \"+getColor());\n }", "public void saveAllVehiclesToFile(ArrayList<DeliveryVehicle> vehicleList) throws java.io.IOException {\n\n // write object to file\n FileOutputStream fos = new FileOutputStream(_filePath); //object to hold a file, e.g. EmployeeData.txt\n PrintStream writer = new PrintStream(fos); //object to write data\n\n //For loop to read each employee and write them to the file\n for(DeliveryVehicle vehicle : vehicleList){\n writer.println(vehicle);\n }\n\n writer.close();//close the writer\n fos.close();//close the file\n\n }", "public void writeFile()\n\t{\n\t\t//Printwriter object\n\t\tPrintWriter writer = FileUtils.openToWrite(\"TobaccoUse.txt\");\n\t\twriter.print(\"Year, State, Abbreviation, Percentage of Tobacco Use\\n\");\n\t\tfor(int i = 0; i < tobacco.size(); i++)\n\t\t{\n\t\t\tStateTobacco state = tobacco.get(i);\n\t\t\tString name = state.getState();\n\t\t\tString abbr = state.getAbbreviation();\n\t\t\tdouble percent = state.getPercentUse();\n\t\t\tint year = state.getYear();\n\t\t\twriter.print(\"\"+ year + \", \" + name + \", \" + abbr + \", \" + percent + \"\\n\");\n\t\t} \n\t\twriter.close(); //closes printwriter object\n\t}", "void vehicleDetails();", "public void recordOrder(){ \n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Tea);//writes into the file contents of String Tea\n output.close();//closes file\n }", "private static void writeToFileInventory() throws IOException {\n FileWriter write = new FileWriter(path, append);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Product> stock = Inventory.getStock();\n for (int i = 0; i < stock.size(); i++) {\n Product product = stock.get(i);\n String name = product.getProductName();\n String location = product.getLocation().getLocationInfo();\n int UPC = product.getUpc();\n int quantity = product.getQuantity();\n String cost = String.valueOf(product.price.getCost());\n String threshold = String.valueOf(product.getThreshold());\n String price = String.valueOf(product.price.getRegularPrice());\n String distributor = product.getDistributor();\n textLine =\n name + \",\" + location + \",\" + UPC + \",\" + quantity + \",\" + cost + \",\" + price + \",\" +\n threshold + \",\" + distributor;\n print_line.printf(\"%s\" + \"%n\", textLine);\n }\n print_line.close();\n }", "public void saveFile() {\r\n final String file = \"respuestaConjuntoDeDatosCon\" + this.numberOfBees + \"abejas.txt\";\r\n try {\r\n int count = 0;\r\n PrintWriter writer = new PrintWriter(file, \"UTF-8\");\r\n for (int i = 0; i < this.numberOfBees; i++) {\r\n if (beesArray[i].isInCollisionRisk()) {\r\n writer.println(beesArray[i].getLatitude() + \",\" + beesArray[i].getLongitude() + \",\" + beesArray[i].getHeight());\r\n count++;\r\n }\r\n }\r\n System.out.println(\"Number of bees in collision risk: \" + count);\r\n writer.close();\r\n } catch (IOException ioe) {\r\n System.out.println(\"Something went wrong writing the exit file\");\r\n }\r\n }", "public void viewVehiclesInGarage() {\n\t\tfor (Vehicle vehicle : vehicleList) {\n\t\t\tvehicle.print();\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "void printCarInfo();", "public String toString() {\n\t\tStringBuilder returnStr = new StringBuilder();\n\t\tfor (Vehicle v : vehicles) {\n\t\t\treturnStr.append(v + \"\\n\");\n\t\t}\n\t\treturn returnStr.toString();\n\t}", "private static void writeToSaleItems() throws IOException {\n FileWriter write = new FileWriter(path4, false);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Product> stock = Inventory.getStock();\n for (int i = 0; i < stock.size(); i++) {\n Product product = (Product) stock.get(i);\n if (product.price.isOnSale()) {\n int UPC = product.getUpc();\n float price = product.price.getSalePrice();\n String period = product.price.getSalePeriod();\n\n textLine = UPC + \" \" + price + \" \" + period;\n\n print_line.printf(\"%s\" + \"%n\", textLine);\n\n }\n }\n print_line.close();\n\n }", "public void recordOrder(){\n PrintWriter output = null;\n try{\n output = \n new PrintWriter(new FileOutputStream(\"record.txt\", true));\n }\n catch(Exception e){//throws exception\n System.out.println(\"File not found\");\n System.exit(0);\n }\n output.println(Coffee);//prints in file contents of Coffee\n output.close();//closes file\n }", "public void showVehicles() {\n\t\tfor (Vehicle vehicle : vehicles) {\n\t\t\tSystem.out.println(vehicle);\n\t\t}\n\t}", "public static void fileBanner(PrintWriter fout){\n \tfout.println(\"*******************************************\");\n \tfout.println(\"Name:\t\tsveinson\");\n \tfout.println(\"Class:\t\tCS20S\");\n \tfout.println(\"Assignment:\tAx Qy\");\n \tfout.println(\"*******************************************\"); \n }", "public String toString(){\r\n // creating instance\r\n StringBuilder sb = new StringBuilder();\r\n if(!isAvailable()){\r\n if(veh.getSize() == VehicleSize.Bus){\r\n sb.append('B');\r\n } else if (veh.getSize() == VehicleSize.Car){\r\n sb.append('C');\r\n } else {\r\n sb.append('M');\r\n }\r\n } else {\r\n if(sizeOfSp == VehicleSize.Bus){\r\n sb.append('b');\r\n } else if (sizeOfSp == VehicleSize.Car){\r\n sb.append('c');\r\n } else {\r\n sb.append('m');\r\n }\r\n }\r\n // return statement\r\n return sb.toString();\r\n }", "public void writeReport() {\n\t\tint gridSize = 55; // Total character spaces between the borders\n\t\tprint(\"+-------------------------------------------------------+\");\n\t\tprint(String.format(\"|%s|\", centerName(gridSize)));\n\t\tprint(\"+---------------+---------------------------------------+\");\n\t\t/*\n\t\t * Loops through each room in the hotel and prints out the relevant\n\t\t * information on a new line And draws southern, eastern and western\n\t\t * borders to allow it to connect up to the main table.\n\t\t */\n\t\tfor (int i = 0; i < myHotel.getSize(); i++) {\n\t\t\tprint(formatRooms(i).toUpperCase());\n\t\t\tprint(formatAmount(i).toUpperCase());\n\t\t\tprint(formatSleepAmount(i).toUpperCase());\n\t\t\tprint(formatOccupied(i).toUpperCase());\n\t\t\tprint(\"+---------------+---------------------------------------+\");\n\t\t}\n\t\t/*\n\t\t * After every hotel room's information has been displayed The overall\n\t\t * hotel information is displayed such as total occupancy, if there is a\n\t\t * vacancy. And if there is a vacancy, the total amount of free rooms\n\t\t * and beds.\n\t\t */\n\t\tprint(String.format(\"| Hotel\\t\\t|\\tTotal Occupancy:\\t%s\\t|\", getHotel().getTotalOccupancy()).toUpperCase());\n\t\tprint(String.format(\"| information:\\t|\\tHas Vacancies:\\t\\t%s\\t|\", convertBoolean(getHotel().getVacancies()))\n\t\t\t\t.toUpperCase());\n\t\tif (getHotel().getVacancies()) {\n\t\t\tprint(String.format(\"|\\t\\t|\\tVacant Rooms:\\t\\t%s\\t|\", getHotel().getEmptyRooms()).toUpperCase());\n\t\t\tprint(String.format(\"|\\t\\t|\\tVacant Beds:\\t\\t%s\\t|\", getHotel().getTotalVacancy()).toUpperCase());\n\t\t}\n\t\t/*\n\t\t * Draws a final southern border to close the table\n\t\t */\n\t\tprint(\"+---------------+---------------------------------------+\");\n\t}", "public String printDetail(){\r\n\t\tString str=\"Room Details: \\n\";\r\n\t\tString str1=\"\";\r\n\t\tString str2=\"\";\r\n\t\tString str3=\"\";\r\n\t\tString str4=\"\";\r\n\t\tstr3=\"\\tSeats: \"+this.getNumSeats()+\"\\n\";\r\n\t\tif(this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tHas Whiteboard\\n \";\r\n\t\tif(!this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tDoesn't have Whiteboard\\n\";\r\n\t\tif(this.hasChalkboard)\r\n\t\t\tstr2=\"\\tHas Chalkboard\\n \";\r\n\t\tif(!this.hasChalkboard)\r\n\t\t\tstr2=\"\\tDoen't have Chalkboard\";\r\n\t\tstr4=\"\\tAV Amenities: \"+this.getAVEquipmentList().toString()+\"\\n\";\r\n\t\tstr=str+str3+str1+str2+str4;\r\n\t\treturn str;\r\n\t}", "private static void writeToOrder() throws IOException {\n FileWriter write = new FileWriter(path5, append);\n PrintWriter print_line = new PrintWriter(write);\n ArrayList<Order> orders = Inventory.getOrderHistory();\n for (int i = 0; i < orders.size(); i++) {\n Order o = (Order) orders.get(i);\n\n String orderNum = String.valueOf(o.getOrderNumber());\n String UPC = String.valueOf(o.getUpc());\n String productName = o.getProductName();\n String distName = o.getDistributorName();\n String cost = String.valueOf(o.getCost());\n String quantity = String.valueOf(o.getQuantity());\n String isProcesed = String.valueOf(o.isProcessed());\n\n textLine =\n orderNum + \", \" + UPC + \", \" + quantity + \",\" + productName + \", \" + distName + \", \" + cost\n + \", \" + isProcesed;\n print_line.printf(\"%s\" + \"%n\", textLine);\n\n }\n print_line.close();\n\n }", "public ArrayList<DeliveryVehicle> getVehiclesFromFile() throws java.io.IOException {\n \n DeliveryVehicleController controller = new DeliveryVehicleController();\n \n //reading the file and adding all lines to the list\n List<String> lines = Files.readAllLines(Paths.get(_filePath));\n String[] lineTokens;\n List<String> fileLines = Files.readAllLines(Paths.get(_filePath));\n\n for(String line : fileLines) {\n lineTokens = line.split(\" \");\n \n //Possible to change if statement case statement instead\n // [0] = Bike Used to check what type (never going to change)\n // [1] = RegNumber\n // [2] = EngineSize\n // [3] = DaysInService\n // [4] = MilesCovered\n // [5] = Deliverys\n\n if (lineTokens[0].equalsIgnoreCase(\"Bike\")){\n // System.out.print(lineTokens[1] + \"THISSHOULD BE REG NUMBER\");\n controller.addBike( lineTokens[1] , Integer.parseInt(lineTokens[2]), Integer.parseInt(lineTokens[3] ), Double.parseDouble(lineTokens[4] ), Integer.parseInt(lineTokens[5]) );\n // return _vehicleList;\n // System.out.print(_vehicleList);\n }\n\n else if (lineTokens[0].equalsIgnoreCase(\"Car\")){\n controller.addCar( lineTokens[1] , Integer.parseInt(lineTokens[2]), Integer.parseInt(lineTokens[3] ), Double.parseDouble(lineTokens[4] ), Integer.parseInt(lineTokens[5]) );\n // return _vehicleList;\n }\n\n else if (lineTokens[0].equalsIgnoreCase(\"Scooter\")){\n // _vehicleList.add(new DeliveryScooter( lineTokens[1] , Integer.parseInt(lineTokens[2]), Integer.parseInt(lineTokens[3] ), Double.parseDouble(lineTokens[4] ), Integer.parseInt(lineTokens[5]) ));\n controller.addScooter( lineTokens[1] , Integer.parseInt(lineTokens[2]), Integer.parseInt(lineTokens[3] ), Double.parseDouble(lineTokens[4] ), Integer.parseInt(lineTokens[5]) );\n // return _vehicleList;\n }\n } \n \n return controller.getVehiclesList();\n \n }", "@Override\r\n public String print(){\r\n String geneString = \"Customer: \" + getNode() + \", isVehicle: \" + getIsVehicle() + \", capacity:\" + getSize();\r\n return geneString;\r\n }", "public void writeToTxtStats() throws IOException{\n\t\tPath fileName = Path.of(\"stats.out\");\n \n\t\tString outputText = \"Day \" + day + \", Spring \" + inventory.get(0).getStock() + \", Egg \" + inventory.get(1).getStock() \n + \", Sausage \" + inventory.get(2).getStock() + \", Jelly \" + inventory.get(3).getStock()\n\t+ \", Pastry \" + inventory.get(4).getStock() + \", Outages \" + dailyDisruptions+ \"\";\n\t\toutputText = outputText + \"\\n\";\n Files.writeString(fileName, outputText, StandardOpenOption.APPEND);\n\t\t//Day x, Spring x, Egg x, Sausage x, Jelly x, Pastry x, Outages x \\n\n\t}", "static void recordProcess() {\n try {\n PrintWriter output = new PrintWriter(new FileWriter(file, true));\n output.print(huLuWaList.size() + \" \");\n lock.lock();\n for (Creature creature : huLuWaList) {\n output.print(creature.getCreatureName() + \" \" + creature.getX() + \" \" + creature.getY()+\" \");\n }\n output.print(enemyList.size() + \" \");\n for (Creature creature : enemyList) {\n output.print(creature.getCreatureName() + \" \" + creature.getX() + \" \" + creature.getY()+\" \");\n }\n output.println();\n output.close();\n lock.unlock();\n }catch (Exception ex){\n System.out.println(ex);\n }\n }", "public void saveInfoToFile(File file) {\n PrintWriter printFile = null;\n try {\n printFile = new PrintWriter(file);\n } catch (FileNotFoundException e) {\n e.getStackTrace();\n return;\n }\n ArrayList<Passenger> reservedPas = airplane.getAllReservedPas(false);\n reservedPas.addAll(airplane.getAllReservedPas(true));\n\n for (Passenger k : reservedPas) {\n String info = getReservedPassInfo(k);\n printFile.println(info);\n }\n printFile.close();\n }", "public String printFileConsultationDetail() {\n String consultationDetail = \"\";\n for (String symptom : symptoms) {\n consultationDetail += symptom + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.SYMPTOM_DELIMITER;\n for (String diagnosis : diagnoses) {\n consultationDetail += diagnosis + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.DIAGNOSIS_DELIMITER;\n for (String prescription : prescriptions) {\n consultationDetail += prescription + Constants.DETAILS_DELIMITER;\n }\n consultationDetail += Constants.PRESCRIPTION_DELIMITER;\n return consultationDetail;\n }", "public void printToFile(Path filename) {\n\t\t\n\t\tlock.lockRead();\n\t\ttry{\n//\t\t\t create a new file if it is not existed; \n//\t\t\t otherwise delete previous one and create a new one.\n\t\t\tif(!Files.exists(filename)){\n\t\t\t\ttry {\n\t\t\t\t\tFiles.createFile(filename);\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\telse{\n\t\t\t\ttry {\n\t\t\t\t\tFiles.delete(filename);\n\t\t\t\t\tFiles.createFile(filename);\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\tfor(String hotelId : hotelMap.keySet()){\n\t\t\t\tString output = this.toString(hotelId);\n\t\t\t\t\t\t\t\n\t\t\t\t// start of the hotel.\n\t\t\t\tString emptyLine = \"\\n\";\n\t\t\t\tString ast = \"********************\";\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tFiles.write(filename, emptyLine.getBytes(), StandardOpenOption.APPEND);\n\t\t\t\t\tFiles.write(filename, ast.getBytes(), StandardOpenOption.APPEND);\n\t\t\t\t\tFiles.write(filename, emptyLine.getBytes(), StandardOpenOption.APPEND);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tFiles.write(filename, output.getBytes(), StandardOpenOption.APPEND);\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}\n\t\tfinally{\n\t\t\tlock.unlockRead();\n\t\t}\n\t\t\t\n\t}", "public void write() {\n\t\tint xDist, yDist;\r\n\t\ttry {\r\n\t\t\tif (Pipes.getPipes().get(0).getX() - b.getX() < 0) { // check if pipes are behind bird\r\n\t\t\t\txDist = Pipes.getPipes().get(1).getX() - b.getX();\r\n\t\t\t\tyDist = Pipes.getPipes().get(1).getY() - b.getY() + Pipes.height;\r\n\t\t\t} else {\r\n\t\t\t\txDist = Pipes.getPipes().get(0).getX() - b.getX();\r\n\t\t\t\tyDist = Pipes.getPipes().get(0).getY() - b.getY() + Pipes.height;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\txDist = -6969;\r\n\t\t\tyDist = -6969;\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Pipe out of bounds\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"DATA.txt\");\r\n\t\t\tFileWriter fr = new FileWriter(file, true);\r\n\t\t\tfr.write(xDist + \",\" + yDist + \",\" + b.getYVel() + \",\" + didJump);\r\n\t\t\tfr.write(System.getProperty(\"line.separator\")); // makes a new line\r\n\t\t\tfr.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Wtrie file error\");\r\n\t\t}\r\n\t}", "public void writeToFile(){\n\t\ttry {\r\n\t\t\tFile f = new File(\"E:\\\\Study\\\\Course\\\\CSE215L\\\\ProjectModify\\\\src\\\\Railway.txt\");\r\n\t\t\tFileWriter fw = new FileWriter(f);\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < persons.length; i++){\r\n\t\t\t\tif(persons[i] != null){\r\n\t\t\t\t\tfw.write(\"Name :\" +persons[i].getName());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Phone Number :\"+persons[i].getPhn()); \r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Age :\"+persons[i].getAge());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Train Name :\"+persons[i].getStrain());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Destination :\"+persons[i].getDestination());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Starting Point :\"+persons[i].getStpoint());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Seat Class :\"+persons[i].getSclass());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t\tfw.write(\"Fare :\"+persons[i].getFare());\r\n\t\t\t\t\tfw.write(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfw.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws WrongVehicleException, ParseException, NotAvailableException, IOException {\n List<Company> companies = CompanyDAO.getCompaniesSortByNameThenRevenue();\r\n companies.forEach(System.out::println);\r\n System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^Output companies sorted BY name then revenue^^^^^^^^^^^^^^^^^^^^^^^^^^\");\r\n\r\n\r\n //Output drivers sorted by category then by salary\r\n List<Driver> drivers = DriverDAO.getDriversByCategoryThenSalary();\r\n drivers.forEach(System.out::println);\r\n System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^Output drivers sorted by category then by salary^^^^^^^^^^^^^^^^^^^^^^^^^^\");\r\n\r\n\r\n //Get trips by destination\r\n List<Trip> trips = TripDAO.getTripsByDestination();\r\n trips.forEach(System.out::println);\r\n System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^Get trips by destination^^^^^^^^^^^^^^^^^^^^^^^^^^\");\r\n\r\n\r\n\r\n CompanyDAO.getCompaniesToTxt(\"company1.txt\");\r\n System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^Companies to txt, read file^^^^^^^^^^^^^^^^^^^^^^^^^^\");\r\n\r\n //Get all trips for a given company\r\n List<Trip> tripsByCompany = TripDAO.getTripsByCompany(CompanyDAO.getCompany(1));\r\n System.out.println(tripsByCompany);\r\n System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^Get all trips for a given company^^^^^^^^^^^^^^^^^^^^^^^^^^\");\r\n\r\n //Number of trips a given company has done\r\n Company companyX = CompanyDAO.getCompany(1);\r\n System.out.println(companyX.countTrips());\r\n System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^Number of trips a given company has done^^^^^^^^^^^^^^^^^^^^^^^^^^\");\r\n\r\n //Get revenue from each trip done by a given company\r\n Company companyY = CompanyDAO.getCompany(1);\r\n companyY.revenueFromEachTrip();\r\n System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^Get revenue from each trip done by a given company^^^^^^^^^^^^^^^^^^^^^^^^^^\");\r\n\r\n List<Driver> driversRevenue = DriverDAO.getDrivers();\r\n driversRevenue.forEach(driver -> System.out.println(driver.getName() + \" has made \"\r\n + driver.getRevenueFromTrips() + \" for company \" + driver.getCompany() + \"!\"));\r\n System.out.println(\"^^^^^^^^^^^^^^^^^^^^^^^^^^Revenue from each driver^^^^^^^^^^^^^^^^^^^^^^^^^^\");\r\n }", "public static void Store(Room[] hotel) {\n try {\n FileWriter filewriter = new FileWriter(\"Output.txt\");\n filewriter.write(\"|--------------------------HOTEL DATA---------------------------|\" + \"\\n\");\n filewriter.write(\"\\n\");\n\n for(int x = 0; x < 8; x++) {\n if (hotel[x].equals(\"Empty\")) {\n filewriter.write(\"---------------------------------------------------------------\" + \"\\n\");\n filewriter.write(\"Room number \" + (x + 1) + \" is empty \\n\");\n\n }else{\n filewriter.write(\"---------------------------------------------------------------\"+ \"\\n\");\n filewriter.write(\"Room number \" + (x + 1) + \" is occupied by \" + hotel[x].getName() + \"\\n\");\n filewriter.write(\"Guest's Full Name: \" + firstName[x].getFirstName() + \" \" + surName[x].getSurName() +\"\\n\");\n filewriter.write(\"Number of Guests in the room: \" + guestNumber[x].getGuestNum() + \" Credit card number: \" + creditNumber[x].getCreditNum()+ \"\\n\");\n }\n filewriter.write(\"---------------------------------------------------------------\" + \"\\n\");\n filewriter.write(\"\\n\");\n }\n filewriter.close();\n System.out.println(\"Data has been successfully Stored in a file.\");\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "public void carWriter(Car car, Inventory inventory) {\n\t\tcar.setPurchased(true);\n\t\t\n\t\tArrayList<Car> update = new ArrayList<Car>(); \n\t\t\n\t\tfor(Car cars: inventory.getCarList()) {\n\t\t\tif(cars.isPurchased() == false) {\n\t\t\t\tupdate.add(cars);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//formatting the strings\n\t\tString formattedString = update.toString()\n\t\t\t .replace(\",\", \"\") //remove the commas\n\t\t\t .replace(\"[\", \"\") //remove the right bracket\n\t\t\t .replace(\"]\", \"\") //remove the left bracket\n\t\t\t .trim(); //remove extra whitespace\n\t\t\t \n\t\t\n\t\t//deleting all contents in file\n\t\tBufferedWriter writer;\n\t\ttry {\n\t\t\twriter = Files.newBufferedWriter(Paths.get(\"/Users/nicholassandy/git/car-dealership/car-dealership/src/com/dealership//cars.txt\"));\n\t\t\twriter.write(\"\");\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t\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//writing new contents in file\n\t\ttry {\n\t\t PrintWriter pw = new PrintWriter(new FileOutputStream(\"/Users/nicholassandy/git/car-dealership/car-dealership/src/com/dealership//cars.txt\"));\n\t\t \n\t\t pw.println(formattedString);\n\t\t pw.close();\n\t\t}\n\t\tcatch (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}", "private void writeMachine() throws VendingMachinePersistenceException {\n // We are not handling the IOException - but\n // we are translating it to an application specific exception and \n // then simple throwing it (i.e. 'reporting' it) to the code that\n // called us. It is the responsibility of the calling code to \n // handle any errors that occur.\n PrintWriter out;\n\n try {\n out = new PrintWriter(new FileWriter(MACHINE_FILE));\n } catch (IOException e) {\n throw new VendingMachinePersistenceException(\n \"Could not save item data.\", e);\n }\n\n // Write out the Item objects to the machine file.\n // We could just grab the item map,\n // get the Collection of Items and iterate over them. However, if we've\n // already created a method that gets a List of Items - then\n // reuse it. We also can use ForEach terminal operation here.\n Collection<Item> itemValues = items.values();\n\n // write the Item object to the file\n itemValues.stream().forEach((i) -> {\n out.println(i.getName() + DELIMITER\n + i.getItemsNumber() + DELIMITER\n + i.getCost());\n // force PrintWriter to write line to the file\n out.flush();\n });\n\n // Clean up\n out.close();\n }", "@Override\n\tpublic String toString() { // output\n\t\tString s = \"Flight #\" + getFlightNumber() + \" Cargo: \" + cargoCapacity\n\t\t\t\t+ \"/\" + getMaximumCapacity() + \" cu/ft. \" + +cargoWeight + \"/\"\n\t\t\t\t+ getMaximumWeight() + \" lbs.\";\n\t\ts += \" \\n CARGO DETAILS: \\n\";\n\t\tfor (int i = 0; i < getCargoInPlane().getSize(); i++) {\n\t\t\ts += \"\\t\" + getCargoInPlane().get(i) + \"\\n\";\n\t\t}\n\n\t\tif (getCargoInPlane().isEmpty()) {\n\t\t\ts += \"\\t\" + \"NO CARGO\"; // if nothing on plane\n\t\t}\n\t\treturn s; // the original string of all info\n\t}", "@Override\r\n\tpublic String getDetails() {\r\n\t\tString result = \"\";\r\n\t\tresult += \"Vehicle ID: \t\t\t\" + getID() + \"\\n\" + \"Year:\t\t\t\t\" + getYear() + \"\\n\"\r\n\t\t\t\t+ \"Make:\t\t\t\t\" + getMake() + \"\\n\" + \"Model:\t\t\t\t\" + getModel() + \"\\n\"\r\n\t\t\t\t+ \"Number of seats:\t\t\" + getNumOfSeats() + \"\\n\" + \"Status:\t\t\t\t\" + getStatus() + \"\\n\"\r\n\t\t\t\t+ \"RENTAL RECORD:\t\t\" + \"\\n\";\r\n\r\n\t\tList<RentalRecord> carRecorder = databaseHandle.getAllRecordsByVehicleID(ID);\r\n\t\tfor (int i = 0; i < carRecorder.size() && i < 10; i++) {\r\n\t\t\tif (i == 0 && status == Status.RENTED) {\r\n\r\n\t\t\t\tRentalRecord temp = carRecorder.get(carRecorder.size() - 1);\r\n\t\t\t\tresult += \"Record ID: \t\t\t \" + temp.getId() + \"\\n\" + \"Rent date:\t\t\t \" + temp.getRentDate()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Estimated Return Date: \" + temp.getEstimatedReturnDate() + \"\\n\";\r\n\r\n\t\t\t} else {\r\n\t\t\t\tresult += \"------------------------------------\" + \"\\n\";\r\n\t\t\t\tRentalRecord temp = carRecorder.get(carRecorder.size() - 1 - i);\r\n\t\t\t\tresult += \"Record ID: \t\t\t \" + temp.getId() + \"\\n\" + \"Rent date:\t \t\t \" + temp.getRentDate()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Estimated Return Date: \" + temp.getEstimatedReturnDate() + \"\\n\"\r\n\t\t\t\t\t\t+ \"Actual Return Date: \" + temp.getActualReturnDate() + \"\\n\" + \"Rental Fee: \t\t\t \"\r\n\t\t\t\t\t\t+ temp.getRentalFee() + \"\\n\" + \"Late Fee: \" + temp.getLateFee() + \"\\n\";\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tresult += \"====================================\" + \"\\n\";\r\n\t\treturn result;\r\n\t}", "@Override\n\tpublic void writeReadableDiffereces() {\n\t\t\n\t\tPrintWriter printWriter = null; \n\t\t\n\t\tString filename = \"AGB-Versions-Aenderungen2.txt\";\n\t\t\n\t\t//System.out.println(\"Schreibe Textdatei mit Aenderungen: \");\n\t\t\n\t\ttry \n\t\t{\n\t\t\ttry \n\t\t\t{\n\t\t\t\tprintWriter = new PrintWriter(new FileWriter(filename));\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tIterator iter = readableDifferences.iterator();\n\t\t\t\n\t\t\twhile (iter.hasNext())\n\t\t\t{\n\t\t\t\t printWriter.println(iter.next()+LINE_SEPARATOR);\n\t\t\t}\n } \n\t\tfinally \n\t\t{\n if(printWriter != null) printWriter.close();\n } \n\t}", "public void loadVehicles() throws IOException {\n File veFile = new File(VE_FILE);\n\n //Checks is file created\n if (!veFile.exists()) {\n veFile.createNewFile(); //If not, creates new file\n System.out.print(\"The data file vehicles.txt is not exits. \" +\n \"Creating new data file vehicles.txt... \" +\n \"Done!\");\n this.numberOfVehicle = 0; //New data file with the number of Vehicle is 0\n } else {\n //If file is existed, so loading this data file\n System.out.print(\"The data file vehicles.txt is found. \" +\n \"Data of vehicles is loading...\");\n\n //Loads text file into buffer\n try (BufferedReader br = new BufferedReader(new FileReader(VE_FILE))) {\n String line, contractId, type, licensePlate, chassisId, enginesId;\n\n //Reads number of vehicles\n line = br.readLine();\n if (line == null) return;\n this.numberOfVehicle = Integer.parseInt(line);\n\n for (int i = 0; i < this.numberOfVehicle; i++) {\n //Reads Vehicle's information\n contractId = br.readLine();\n type = br.readLine();\n licensePlate = br.readLine();\n chassisId = br.readLine();\n enginesId = br.readLine();\n\n\n //Create new instance of Vehicle and adds to Vehicle bank\n this.vehicles.add(new Vehicle(Integer.parseInt(contractId), type, licensePlate, chassisId, enginesId));\n }\n }\n System.out.print(\"Done!\");\n }\n }", "public void printDetails(Edge street) {\n System.out.printf(\"Driver %d heading from %s to %s via %s\\n\",\n this.driverNum, street.from.getLocationName(), street.to.getLocationName(), street.streetName);\n\n // print where we are leaving to, and how many cups of coffee consumed\n if (street.to.getLocationName().equals(\"Outside City\")) {\n if (street.streetName.equals(\"Fourth Ave.\")) {\n // Philadelphia\n System.out.printf(\"Driver %d has gone to Philadelphia!\\n\", this.driverNum);\n }\n if (street.streetName.equals(\"Fifth Ave.\")) {\n // Cleveland\n System.out.printf(\"Driver %d has gone to Cleveland!\\n\", this.driverNum);\n }\n // print how many cups of coffee\n System.out.printf(\"Driver %d got %d cup(s) of coffee.\\n\", this.driverNum, this.cupsCoffee);\n }\n\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Vehicle [Id=\" + Id + \", Year=\" + Year + \", Make=\" + Make + \", Model=\" + Model + \"]\";\n\t}", "void printPos() {\n\n System.out.println(\"\\nMoving vehicles....\\n\");\n for (int v = 0; v < roads.size(); v++) {\n System.out.println(\"\\n__________________ Vehicles on Road: \" + v + \"______________________________\");\n if (roads.get(v).lightAtStart()) {\n if (roads.get(v).getStartLight().isGreen()) {\n System.out.println(\"|Start light is green|\\n\");\n } else System.out.println(\"|Start light red|\\n\");\n\n } else if (roads.get(v).lightAtEnd()) {\n if (roads.get(v).getEndLight().isGreen()) {\n System.out.println(\"|End light green|\\n\");\n } else System.out.println(\"|End light red|\\n\");\n }\n\n if (roads.get(v).vehicles.size() == 0) {\n System.out.println(\"No vehicles are currently on this road...\");\n }\n for (int x = 0; x < roads.get(v).vehicles.size(); x++) {\n if (roads.get(v).vehicles.get(x).getType().equals(\"Motorbike\")) {\n System.out.println(\"Type: \" + roads.get(v).vehicles.get(x).getType() + \" |Direction: \" +\n roads.get(v).vehicles.get(x).getDirection()\n + \" |X Position: \" + roads.get(v).vehicles.get(x).getXpos() + \" |Y Position: \"\n + roads.get(v).vehicles.get(x).getYpos() + \" |Speed: \" + roads.get(v).vehicles.get(x).getSpeed());\n\n\n } else {\n\n System.out.println(\"Type: \" + roads.get(v).vehicles.get(x).getType() + \" |Direction: \" +\n roads.get(v).vehicles.get(x).getDirection()\n + \" |X Position: \" + roads.get(v).vehicles.get(x).getXpos() + \" |Y Position: \"\n + roads.get(v).vehicles.get(x).getYpos() + \" |Speed: \" + roads.get(v).vehicles.get(x).getSpeed());\n }\n }\n\n }\n }", "@Override\n public String toString() {\n return \"Floor: \" + floor + \" Total Price: \" + price + \" Vehicle Type: \" + vehicleType + \" Hours: \" + hours; \n }", "public static void ReadVehicle(String inputfile, String outputfile, String[] styleids) {\n\r\n\t\tString StyleID_0 = \"\";\r\n\t\tString ImageID_1 = \"\";\r\n\t\tString FileName_2 = \"\";\r\n\t\tString Type_3 = \"\";\r\n\t\tString Background_4 = \"\";\r\n\t\tString Size_5 = \"\";\r\n\t\tString Carryover_6 = \"\";\r\n\t\tString Year_7 = \"\";\r\n\t\tString DivisionName_8 = \"\";\r\n\t\tString ModelName_9 = \"\";\r\n\t\tString BodyType_10 = \"\";\r\n\t\tString ExactMatch_11 = \"\";\r\n\t\tString OEMTemp_12 = \"\";\r\n\t\t// Assume default encoding.\r\n\t\tFileWriter fileWriter = null;\r\n\t\ttry {\r\n\t\t\tfileWriter = new FileWriter(outputfile);\r\n\t\t} catch (IOException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\t// Always wrap FileWriter in BufferedWriter.\r\n\t\tBufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\r\n\r\n\t\tSystem.out.println(\"Started!\");\r\n\t\tint styleLenth = styleids.length;\r\n\t\tfor (String styleid : styleids) {\r\n\r\n\t\t\ttry (BufferedReader br = new BufferedReader(new FileReader(inputfile))) {\r\n\t\t\t\tString line;\r\n\t\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\t\t// process the line.\r\n\t\t\t\t\tList<String> elephantList = Arrays.asList(line.split(\",\"));\r\n\t\t\t\t\tStyleID_0 = elephantList.get(0);\r\n\t\t\t\t\t// StyleID_0=elephantList.get(12); //\r\n\r\n\t\t\t\t\tif (StyleID_0.equalsIgnoreCase(styleid)) {\r\n\t\t\t\t\t\t// if (StyleID_0.equalsIgnoreCase(\"~Y~\")) {\r\n\t\t\t\t\t\tbufferedWriter.write(line);\r\n\t\t\t\t\t\tbufferedWriter.newLine();\r\n\r\n\t\t\t\t\t\tSystem.out.println(line);\r\n\t\t\t\t\t\t// System.out.println(elephantList);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (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} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tbufferedWriter.close();\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\tSystem.out.println(\"Total StyleIDs=\" + styleLenth + \". Complete!\");\r\n\r\n\t}", "public void saveToFile() {\n FileOutputStream fos = null;\n try {\n //write the object into file\n fos = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(travelGUI.getTravelAgent());\n oos.flush();\n oos.close();\n }\n catch (IOException ioe) {\n System.out.println(ioe.getMessage());\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n return;\n }\n finally {\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }", "public void writeTicketToFile(){\n\t\ttry{\n\t\t\tString fileName = \"flight\";\n\t\t\tfileName += Integer.toString(flightNum);\n\t\t\tfileName += \"ticket\";\n\t\t\tfileName += Integer.toString(ticketNum);\n\t\t\tfileName += \".txt\";\n\t\t\tFileWriter fw = new FileWriter(fileName, false);\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\t\n\n\t\t\tbw.write(\"ENSF Airline Ticket:\\n\\n\");\n\t\t\tbw.write(\"Passenger first name: \" + pass.firstName + \"\\n\");\n\t\t\tbw.write(\"Passenger last name: \" + pass.lastName + \"\\n\");\n\t\t\tbw.write(\"Passenger date of birth: \" + pass.dOB + \"\\n\\n\");\n\t\t\tbw.write(\"Flight number: \" + flightNum + \"\\n\");\n\t\t\tbw.write(\"Flight origin: \" + source + \"\\n\");\n\t\t\tbw.write(\"Flight destination: \" + dest + \"\\n\");\n\t\t\tbw.write(\"Flight date (YYYYMMDD): \" + date + \"\\n\");\n\t\t\tbw.write(\"Flight time (HH:MM): \" + time + \"\\n\");\n\t\t\tbw.write(\"Flight duration: \" + duration +\" hours\");\n\t\t\t\n\t\t\tbw.close();\n\t\t}\n\t\tcatch(IOException ex){\n\t\t\tSystem.out.println(\"Error writing to output file 1\\n\");\n\t\t}\n\t}", "public void inventoryPrint() {\n System.out.println(\"Artifact Name: \" + name);\r\n System.out.println(\"Desc:\" + description);\r\n System.out.println(\"Value: \" + value);\r\n System.out.println(\"Mobility: \" + mobility); \r\n }", "public void writeCustomerDetails (String firstName, String lastName, int mobile, String email, String deliveryAddressNumber, String deliveryAddress)\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\tPrintWriter out = new PrintWriter(new FileWriter(\"customersWhoPurchased.txt\", true));\r\n\t\t\tout.println(\"First Name: \" +firstName);\t\t\t\r\n\t\t\tout.println(\"Last Name: \" +lastName);\r\n\t\t\tout.println(\"Mobile number: \" +mobile);\r\n\t\t\tout.println(\"Email: \" +email);\r\n\t\t\tout.println(\"Devliery address: \" +deliveryAddressNumber+ \" \" +deliveryAddress);\r\n\t\t\tout.println(\" \");\r\n\t\t\tout.close();\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: Cannot open file for writing\");\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Error: Cannot write to file\");\r\n\t\t}\r\n\t}", "static void saveClinFromInstances(String fileName,Instances instances) throws Exception{\n\t\t\t\t\n\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(fileName)));\n\t\t\n\t\t\n\t\t// Write header...\n\t\tAttribute IDAttribute = instances.attribute(\"ID\");\n\t\tFastVector instNames = attributeValues(instances,IDAttribute);\t\t\n\t\tpw.write(\"Features\\t\");\n\t\tfor(int i = 0;i < instNames.size()-1;i++){\n\t\t\tpw.print(instNames.elementAt(i));\n\t\t\tpw.print(\"\\t\");\n\t\t}\n\t\tpw.print(instNames.elementAt(instNames.size()-1));\n\t\tpw.print(\"\\n\");\n\t\t\n\t\tint classIdx = instances.classIndex();\n\t\tfor(int i = 0;i < instances.numAttributes();i++){\n\t\t\tif ((i != 0) && (i == classIdx)){\n\t\t\t\tString attName = instances.attribute(i).name();\n\t\t\t\tAttribute attribute = instances.attribute(i);\t\t\t\t\t\t\n\t\t\t\n\t\t\t\tFastVector atValues = attributeValues(instances,attribute);\n\t\t\t\tpw.print(attName);\n\t\t\t\tpw.print(\"\\t\");\n\t\t\t\tfor(int v = 0;v < atValues.size()-1;v++){\n\t\t\t\t\tpw.print(atValues.elementAt(v));\n\t\t\t\t\tpw.print(\"\\t\");\n\t\t\t\t}\n\t\t\t\tpw.print(atValues.elementAt(atValues.size()-1));\n\t\t\t\tpw.print(\"\\n\");\n\t\t\t}\n\t\t}\n\t\tpw.close();\n\t}", "public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}", "void genReport() {\n\n current_part.save_state(); \n\n JTextArea ta = text;\n\n ta.setText(\"\");\n\n if (!t_foil_name.equals(\"Test\"))\n ta.append(\"Hydrofoil: \" + t_foil_name);\n\n java.util.Date date = new java.util.Date();\n ta.append(\"\\n Date: \" + date);\n \n wing.print( \"Main Wing\", ta);\n stab.print( \"Stabilizer Wing\", ta);\n strut.print(\"Mast (a.k.a. Strut)\", ta);\n fuse.print( \"Fuselage\", ta);\n\n ta.append( \"\\n\\n\");\n // tail volume is LAElev * AreaElev / (MACWing * AreaWing)\n // LAElev : The elevator's Lever Arm measured at the wing's and elevator's quarter chord point\n double LAElev = stab.xpos + stab.chord_xoffs + 0.25*stab.chord - (wing.xpos + wing.chord_xoffs + 0.25*wing.chord);\n // MAC : The main wing's Mean Aerodynamic Chord\n // AreaWing : The main wing's area\n // AreaElev : The elevator's area\n \n ta.append( \"\\nTail Voulume: \" + LAElev*stab.span*stab.chord/(wing.chord*wing.chord*wing.span));\n \n\n ta.append( \"\\n\\n\");\n switch (planet) {\n case 0: { \n ta.append( \"\\n Standard Earth Atmosphere\" );\n break;\n }\n case 1: { \n ta.append( \"\\n Martian Atmosphere\" );\n break;\n }\n case 2: { \n ta.append( \"\\n Water\" );\n break;\n }\n case 3: { \n ta.append( \"\\n Specified Conditions\" );\n break;\n }\n case 4: { \n ta.append( \"\\n Specified Conditions\" );\n break;\n }\n }\n\n // ta.append( \"\\n Altitude = \" + filter0(alt_val) );\n // if (lunits == IMPERIAL) ta.append( \" ft ,\" );\n // else /*METRIC*/ ta.append( \" m ,\" );\n \n switch (lunits) {\n case 0: { /* English */\n ta.append( \"\\n Density = \" + filter5(rho_EN) );\n ta.append( \"slug/cu ft\" );\n ta.append( \"\\n Pressure = \" + filter3(ps0/144.) );\n ta.append( \"lb/sq in,\" );\n ta.append( \" Temperature = \" + filter0(ts0 - 460.) );\n ta.append( \"F,\" );\n break;\n }\n case 1: { /* Metric */\n ta.append( \" Density = \" + filter3(rho_EN*515.4) );\n ta.append( \"kg/cu m\" );\n ta.append( \"\\n Pressure = \" + filter3(101.3/14.7*ps0/144.) );\n ta.append( \"kPa,\" );\n ta.append( \" Temperature = \" + filter0(ts0*5.0/9.0 - 273.1) );\n ta.append( \"C,\" );\n break;\n }\n }\n\n ta.append( \"\\n Speed = \" + filter1(velocity * (lunits==IMPERIAL? 0.868976 : 0.539957 )) + \"Kts, or\" );\n ta.append( \" \" + filter1(velocity) );\n if (lunits == IMPERIAL) ta.append( \" mph ,\" );\n else /*METRIC*/ ta.append( \" km/hr ,\" );\n\n // if (out_aux_idx == 1)\n // ta.append( \"\\n Lift Coefficient = \" + filter3(current_part.cl) );\n // if (out_aux_idx == 0) {\n // if (Math.abs(lift) <= 10.0) ta.append( \"\\n Lift = \" + filter3(lift) );\n // if (Math.abs(lift) > 10.0) ta.append( \"\\n Lift = \" + filter0(lift) );\n // if (lunits == IMPERIAL) ta.append( \" lbs \" );\n // else /*METRIC*/ ta.append( \" Newtons \" );\n // }\n // if ( polarOut == 1)\n // ta.append( \"\\n Drag Coefficient = \" + filter3(current_part.cd) );\n // if (out_aux_idx == 0) {\n // ta.append( \"\\n Drag = \" + filter0(drag) );\n // if (lunits == IMPERIAL) ta.append( \" lbs \" );\n // else /*METRIC*/ ta.append( \" Newtons \" );\n // }\n\n ta.append( \"\\n Lift = \" + dash.outTotalLift.getText());\n ta.append( \"\\n Drag = \" + dash.outTotalDrag.getText());\n\n if (min_takeoff_speed_info != null) \n ta.append( \"\\n\\n\" + min_takeoff_speed_info);\n\n if (cruising_info != null) \n ta.append( \"\\n\\n\" + cruising_info);\n\n if (max_speed_info != null) \n ta.append( \"\\n\\n\" + max_speed_info);\n\n // ensure end ta.setCaretPosition(ta.getText().length());\n // ensure start\n ta.setCaretPosition(0);\n }", "private static void writeToOutput() {\r\n FileWriter salida = null;\r\n String archivo;\r\n JFileChooser jFC = new JFileChooser();\r\n jFC.setDialogTitle(\"KWIC - Seleccione el archivo de salida\");\r\n jFC.setCurrentDirectory(new File(\"src\"));\r\n int res = jFC.showSaveDialog(null);\r\n if (res == JFileChooser.APPROVE_OPTION) {\r\n archivo = jFC.getSelectedFile().getPath();\r\n } else {\r\n archivo = \"src/output.txt\";\r\n }\r\n try {\r\n salida = new FileWriter(archivo);\r\n PrintWriter bfw = new PrintWriter(salida);\r\n System.out.println(\"Índice-KWIC:\");\r\n for (String sentence : kwicIndex) {\r\n bfw.println(sentence);\r\n System.out.println(sentence);\r\n }\r\n bfw.close();\r\n System.out.println(\"Se ha creado satisfactoriamente el archivo de texto\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "void dump() {\n\t\tSystem.out.print(\"I am: \" + (territoryID));\n\t\tSystem.out.print(\"\\tNeighbour of:\");\n\n\t}", "public void printDetails()\r\n\t{\r\n\t\tSystem.out.println(flightNumber);\r\n\t\tSystem.out.println(departurePoint);\r\n\t\tSystem.out.println(destination);\r\n\t\tSystem.out.println(departureTime);\r\n\t\tSystem.out.println(arrivalTime);\r\n\t\tSystem.out.println(checkedInPassengers);\r\n\t\tif(status == 'S')\r\n\t\t\tSystem.out.println(\"Scheduled\");\r\n\t\t\t\r\n\t\tif(status == 'B')\r\n\t\t\tSystem.out.println(\"Boarding\");\r\n\t\tif(status == 'D')\r\n\t\t\tSystem.out.println(\"Departed\");\r\n\t\tif(status == 'C')\r\n\t\t\tSystem.out.println(\"Canceled\");\r\n\t\t\r\n\t\t\t\t\r\n\t}", "public static void PrintAllProperties(String output_filename, ArrayList<Apartment> apartments, ArrayList<House> houses, ArrayList<Villa> villas) {\n String output_information = \"\";\n\n String apartment_title = (\"********************************************************Apartment Information********************************************************\");\n System.out.println(apartment_title);\n for (Apartment a : apartments) {\n String apartments_information = (\"Register Number:\" + a.getRegister_number() + \" PropertyId:\"+ a.getPropertyID() +\" Owner name:\" + a.getOwner_name() + \" Address: \" + a.getPostal_address() + \" Cost/day(€):\"\n + a.getRental_cost_per_day() + \" Number of Storey:\" + a.getStorey_number() + \" Number of Beds:\"\n + a.getNumber_of_beds());\n System.out.println(apartments_information);\n output_information += apartment_title+ \"\\n\" + apartments_information + \"\\n\";\n }\n System.out.println();\n\n String house_title = (\"********************************************************House Information********************************************************\");\n System.out.println(house_title);\n for (House h : houses) {\n String houses_information = (\"Register Number:\" + h.getRegister_number() + \" PropertyId:\"+ h.getPropertyID() + \" Owner name:\" + h.getOwner_name() + \" Address: \" + h.getPostal_address() + \" Cost/day(€):\"\n + h.getRental_cost_per_day() + \" Number of Storey:\" + h.getNumber_of_storeys() + \" Clearing Fees(€):\"\n + h.getClearing_fees());\n System.out.println(houses_information);\n output_information += house_title + \"\\n\"+ houses_information + \"\\n\";\n }\n System.out.println();\n\n String villas_title = (\"***********************************************************Villa Information***********************************************************\");\n System.out.println(villas_title);\n for (Villa v : villas) {\n String villas_information = (\"Register Number:\" + v.getRegister_number() + \" PropertyId:\"+ v.getPropertyID() + \" Owner name:\" + v.getOwner_name() + \" Address: \" + v.getPostal_address() + \" Cost/day(€):\"\n + v.getRental_cost_per_day() + \" Luxury Tax/day(€):\" + v.getLuxury_tax_per_day() + \" Room Service/day(€):\"\n + v.getRoom_service_cost_per_day());\n System.out.println(villas_information);\n output_information += villas_title + \"\\n\" + villas_information + \"\\n\";\n }\n System.out.println();\n\n try{\n PrintWriter myOutFile = new PrintWriter(output_filename);\n myOutFile.write(output_information);\n myOutFile.close();\n }\n catch(Exception ex){\n System.out.println(\"exception\" +ex.getMessage()+\"caught\");\n }\n }", "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "public void restock(String fileName) {\n\t\tString timeFormat = \"dd'/'MM'/'yyyy' 'hh:mm:ss a\";\n\t\tFile log = new File(\"Log.txt\");\n\t\tLocalDateTime dateTime = LocalDateTime.now();\n\t\t\n\t\ttry(PrintWriter tracker = new PrintWriter(new FileOutputStream(log,true))){\n\t\t\ttracker.println(dateTime.format(DateTimeFormatter.ofPattern(timeFormat)) + \" \" + \"Restocking Vending Machine\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Audit error: log not found\");\n\t\t}\n\t\t\n\t\t/*String timeFormat2 = \"dd'_'MM'_'yyyy'-'hh_mm_ss_a\";\n\t\tString time = dateTime.format(DateTimeFormatter.ofPattern(timeFormat2));\n\t\tthis.salesReportFileName = \"SalesReport:\" + time + \".txt\";\n\t\tFile salesReport = new File(salesReportFileName);*/\n\t\t\n\t\t\n\t\tSimpleDateFormat dt = new SimpleDateFormat(\"yyyy-MM-dd_HH-mm-ss\"); \n\t\tDate date = new Date();\n\t\tsalesReportFileName = \"SalesReport-\" + dt.format(date) + \".txt\";\n\t\tFile salesReport = new File(salesReportFileName);\n\t\t\n\t\ttry {\n\t\t\tsalesReport.createNewFile();\n\t\t} catch (IOException e1) {\n\t\t}\n\t\t\n\t\tFile inputFile = new File(fileName);\n\t\t\n\t\ttry(Scanner fileScanner = new Scanner(inputFile)){\n\t\t\n\t\twhile (fileScanner.hasNextLine()) {\n\t\t\tString line = fileScanner.nextLine();\n\t\t\tString [] lineArr = line.split(\"\\\\|\");\n\t\t\t\n\t\t\tString slotLocation = lineArr[0];\n\t\t\tString productName = lineArr[1];\n\t\t\tBigDecimal price = new BigDecimal(lineArr[2]);\n\t\t\tString category = lineArr[3];\n\t\t\tif (category.contentEquals(\"Drink\")) {\n\t\t\t\t\n\t\t\t\tBeverage product = new Beverage(slotLocation, productName, price);\n\t\t\t\tsellables.put(slotLocation, product);\n\t\t\t\torderedSellables.add(product);\n\t\t\t\tsales.put(productName, 0);\n\t\t\t}\n\t\t\t\n\t\t\tif (category.contentEquals(\"Chip\")) {\n\t\t\t\t\n\t\t\t\tChips product = new Chips(slotLocation, productName, price);\n\t\t\t\tsellables.put(slotLocation,product);\n\t\t\t\torderedSellables.add(product);\n\t\t\t\tsales.put(productName, 0);\n\t\t\t}\n\t\t\tif (category.contentEquals(\"Gum\")) {\n\t\t\t\t\n\t\t\t\tGum product = new Gum(slotLocation, productName, price);\n\t\t\t\tsellables.put(slotLocation, product);\n\t\t\t\torderedSellables.add(product);\n\t\t\t\tsales.put(productName, 0);\n\t\t\t}\n\t\t\t\n\t\t\tif (category.contentEquals(\"Candy\")) {\n\t\t\t\t\n\t\t\t\tCandy product = new Candy(slotLocation, productName, price);\n\t\t\t\tsellables.put(slotLocation, product);\n\t\t\t\torderedSellables.add(product);\n\t\t\t\tsales.put(productName, 0);\n\t\t\t}\n\t\t}\n\t} catch (FileNotFoundException e) {\n\t\t\n\t\tSystem.out.println(\"File not found\");\n\t\tSystem.exit(1);\n\t}\n\n}", "public static void writingSpecializedArea(String newArea){//writing to objcet to file \n String filePath = \"userData\\\\specializedArea.txt\";\n BufferedWriter bw = null;\n try {//try catch start\n //file function\n File file = new File(filePath);\n \n if (!file.exists()) {//checking the is given file exists\n file.createNewFile();//creating new file\n Exception fileError=new IOException(\"File is not founded\");\n }\n \n FileWriter fw = new FileWriter(file,true);\n \n bw = new BufferedWriter(fw);\n \n bw.write(newArea);\n bw.newLine();\n \n } catch (IOException ioe) {\n System.out.println(ioe);\n ioe.printStackTrace();\n }\n finally{ \n try{\n if(bw!=null){\n bw.close();\n }\n }catch(Exception ex){\n System.out.println(\"Error in closing the BufferedWriter\"+ex);\n }\n }\n }", "public void printDetails() {\n PrintFormatter pf = new PrintFormatter();\n\n String first = \"############# Armor Details #############\";\n System.out.println(first);\n pf.formatText(first.length(), \"# Items stats for: \" + name);\n pf.formatText(first.length(), \"# Armor Type: \" + itemsType);\n pf.formatText(first.length(), \"# Slot: \" + slot);\n pf.formatText(first.length(), \"# Armor level: \" + level);\n\n if (baseStats.getHealth() > 0)\n pf.formatText(first.length(), \"# Bonus HP: \" + baseStats.getHealth());\n\n if (baseStats.getStrength() > 0)\n pf.formatText(first.length(), \"# Bonus Str: \" + baseStats.getStrength());\n\n if (baseStats.getDexterity() > 0)\n pf.formatText(first.length(), \"# Bonus Dex: \" + baseStats.getDexterity());\n\n if (baseStats.getIntelligence() > 0)\n pf.formatText(first.length(), \"# Bonus Int: \" + baseStats.getIntelligence());\n\n System.out.println(\"########################################\");\n\n }", "public void saveFile() throws FileNotFoundException {\r\n try {\r\n PrintWriter out = new PrintWriter(FILE_NAME);\r\n //This puts back the labels that the loadFile removed\r\n out.println(\"date,cust_email,cust_location,product_id,product_quantity\");\r\n int i = 0;\r\n\r\n while (i < orderInfo.size()) {\r\n String saved = orderInfo.get(i).toString();\r\n out.println(saved);\r\n i++;\r\n }\r\n out.close();\r\n } catch (FileNotFoundException e) {\r\n }\r\n\r\n }", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"Body type: \" + bodyType + \" Number of doors: \" + noOfDoors + \" Number of seats: \" + noOfSeats);\n System.out.println();\n }", "public void statsOut(PrintWriter out) throws IOException {\n\t\t\n\t\tanalyze(); //see the above method\n\t\tint i;\n\t\t\n\t\tif (bundle.getString(\"otherStatsToggle\").equals(\"true\") || bundle.getString(\"groupsToggle\").equals(\"true\") \n\t\t\t\t|| bundle.getString(\"percentToggle\").equals(\"true\") || bundle.getString(\"diffToggle\").equals(\"true\")) {\n\t\t\t\n\t\t\tSystem.out.println(\"|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-| \\n\");\n\t\t\tout.println(\"|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-| \\n\");\n\t\t}\n\t\t\n\t\tif (lowestRating == 2) { //implies no data was ever given since no rating will ever be above 1, let alone at 2\n\t\t\tSystem.out.println(\"Nothing here to give statistics on \\n\");\n\t\t\tout.println(\"Nothing here to give statistics on \\n\");\n\t\t}\n\t\t\n\t\telse {\n\t\t\t\n\t\t\tif (bundle.getString(\"otherStatsToggle\").equals(\"true\")) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Relevant Segment of Revision History: \" + then + \" to \" + now + \" \\n\");\n\t\t\t\tout.println(\"Relevant Segment of Revision History: \" + then + \" to \" + now + \" \\n\");\n\t\t\t\tSystem.out.println(\"Total Number of Relevant Revisions: \" + revisionTotal);\n\t\t\t\tout.println(\"Total Number of Relevant Revisions: \" + revisionTotal);\n\t\t\t\tSystem.out.println(\"\\t Average Number of relevant files per revision: \" + Math.round(relevantAverage) + \"\\n\");\n\t\t\t\tout.println(\"\\t Average Number of relevant files per revision: \" + Math.round(relevantAverage) + \"\\n\");\n\t\t\t\t\n\t\t\t\tfor (i = 0; i < args.length; i++) {\n\t\t\t\t\tSystem.out.println(\"\\t Number of Revisions Changing \" + (i + 1) + \" of the Relevant Files: \" + relevantPresent[i]);\n\t\t\t\t\tout.println(\"\\t Number of Revisions Changing \" + (i + 1) + \" of the Relevant Files: \" + relevantPresent[i]);\n\t\t\t\t\tSystem.out.println(\"\\t\\t Number of these revisions with under \" + (10 * (i + 1)) + \" irrelevant extra files: \" + irrelevantPresent[i] + \"\\n\");\n\t\t\t\t\tout.println(\"\\t\\t Number of these revisions with under \" + (10 * (i + 1)) + \" irrelevant extra files: \" + irrelevantPresent[i] + \"\\n\");\n\t\t\t\t}\n\t\t\n\t\t\t\tSystem.out.println();\n\t\t\t\tout.println();\n\t\t\t\t\n\t\t\t\ttimeStats(\"Average\", timeDiffAverage, \"\", out);\n\t\t\t\ttimeStats(\"\\t Lowest\", timeDiffLow, revisionReference[5], out);\n\t\t\t\ttimeStats(\"\\t Highest\", timeDiffHigh, revisionReference[4], out);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nAverage Rating: \" + ratingAverage);\n\t\t\t\tout.println(\"\\nAverage Rating: \" + ratingAverage);\n\t\t\t\tSystem.out.println(\"\\t Lowest Rating: \" + lowestRating + \" for Revision \" + revisionReference[1]);\n\t\t\t\tout.println(\"\\t Lowest Rating: \" + lowestRating + \" for Revision \" + revisionReference[1]);\n\t\t\t\tSystem.out.println(\"\\t Highest Rating: \" + highestRating + \" for Revision \" + revisionReference[0] + \"\\n\");\n\t\t\t\tout.println(\"\\t Highest Rating: \" + highestRating + \" for Revision \" + revisionReference[0] + \"\\n\");\n\t\t\n\t\t\t\tSystem.out.println(\"Average Number of Changed files: \" + nFilesAverage);\n\t\t\t\tout.println(\"Average Number of Changed files: \" + nFilesAverage);\n\t\t\t\tSystem.out.println(\"\\t Lowest Number of Changed Files: \" + lowestFileNumber + \" changed at Revision \" + revisionReference[3]);\n\t\t\t\tout.println(\"\\t Lowest Number of Changed Files: \" + lowestFileNumber + \" changed at Revision \" + revisionReference[3]);\n\t\t\t\tSystem.out.println(\"\\t Highest Number of Changed Files: \" + highestFileNumber + \" changed at Revision \" + revisionReference[2] + \"\\n\");\n\t\t\t\tout.println(\"\\t Highest Number of Changed Files: \" + highestFileNumber + \" changed at Revision \" + revisionReference[2] + \"\\n\");\n\t\t\t}\n\t\t\t\n\t\t\tif (bundle.getString(\"groupsToggle\").equals(\"true\")) {\n\t\t\t\tgrouping.currentOutput(out);\n\t\t\t}\n\t\t\t\n\t\t\tif (args.length > 1) {\n\t\t\t\t\n\t\t\t\tif (bundle.getString(\"percentToggle\").equals(\"true\")) {\n\t\t\t\t\tpercentages(args, out);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (bundle.getString(\"CSVToggle\").equals(\"true\")) {\n\t\t\t\tcsv();\n\t\t\t}\n\t\t\t\n\t\t\tif (bundle.getString(\"diffToggle\").equals(\"true\") && revisionTotal > 1) {\t\t\n\t\t\t\tdiff(out);\n\t\t\t}\n\t\t\t\n\t\t\tif (bundle.getString(\"commentToggle\").equals(\"true\")) {\n\t\t\t\tSystem.out.println(\"\\nRevision Comments (IMPORTANT DISCLAIMER: all commas have been replaced with semi-colons to allow insertion into a csv file): \\n\");\n\t\t\t\tout.println(\"Revision Comments (IMPORTANT DISCLAIMER: all commas have been replaced with semi-colons to allow insertion into a csv file): \\n\");\n\t\t\t\t\n\t\t\t\tfor (i = 0; i < commenting.size(); i++) {\n\t\t\t\t\tSystem.out.println(\"\\t\" + revisions[i] + \":\");\n\t\t\t\t\tout.println(\"\\t\" + revisions[i] + \":\");\n\t\t\t\t\tSystem.out.println(commenting.get(i) + \"\\n\");\n\t\t\t\t\tout.println(commenting.get(i) + \"\\n\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tif (bundle.getString(\"otherStatsToggle\").equals(\"true\") || bundle.getString(\"groupsToggle\").equals(\"true\") || \n\t\t\t\tbundle.getString(\"percentToggle\").equals(\"true\") || bundle.getString(\"diffToggle\").equals(\"true\")) {\n\t\t\t\n\t\t\tSystem.out.println(\"|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-| \\n\");\n\t\t\tout.println(\"|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-| \\n\");\n\t\t}\n\n\t}", "private String report(){\r\n if(location[0] > plateau[0] || location[0] < 0 || location[1] > plateau[1] || location[1] < 0)\r\n return \"Rover has stopped responding. Last transmission suggests Rover has fallen off the plateau.\\nPlease take better care of the rovers, these things are expensive.\";\r\n else\r\n return location[0] + \" \" + location[1] + \" \" + orientation;\r\n }", "void writeToFile () throws IOException{\n FileWriter deleteFile = new FileWriter(\"Resolved Ticket of \" + this.resovedDate + \".txt\");\n BufferedWriter FileDeleted = new BufferedWriter(deleteFile);\n\n FileDeleted.write(\"Resolution: \" + this.Resolution + \" ; Date: \" + this.resovedDate);\n FileDeleted.close();\n }", "private void writeDeviceInfo() {\n StringBuffer text = new StringBuffer(getDeviceReport());\n dataWriter.writeTextData(text, \"info.txt\");\n }", "public String print(){\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.trackNumber, \r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.numRailCars, \r\n\t\t\t\tthis.destCity);\r\n\t\t}", "public void writeToHotelRoomListFile()\r\n {\r\n\ttry(ObjectOutputStream toHotelRoomListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/hotelroomlist.dta\")))\r\n\t{\r\n toHotelRoomListFile.writeObject(hotelRoomList);\r\n hotelRoomList.saveStaticPrice(toHotelRoomListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Hotelrom objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "protected void printSubAuction(int i){\n\t\t/*\n\t\tFile subAuctionFile = new File(System.getProperty(\"user.dir\")+\"/src/auctions/\"\n\t\t\t\t+gameName+\"/Config_subAuct_\"+(i%maxSeq)+\"_\"+(maxSim-(i/maxSeq)-1)+\".txt\");*/\n\t\tFile subAuctionFile = new File(\"src/auctions/Config_\"+getAuctionName(auctionsSchedule[i])+\"_\"\n\t\t\t\t+(i%maxSeq)+\"_\"+(i/maxSeq)+\".txt\");\n\n\t\t//if the file does not exist, create and write it\n\t\tif(!subAuctionFile.exists()){\n\t\t\ttry{\n\t\t\t\tsubAuctionFile.createNewFile();\n\t\t\t\tFileWriter fstreamsuper = new FileWriter(subAuctionFile);\n\t\t\t\tBufferedWriter outSub = new BufferedWriter(fstreamsuper);\n\n\n\n\t\t\t\tif(auctionsSchedule[i]==3 || auctionsSchedule[i]==4){\n\t\t\t\t\tif(respTime){\n\t\t\t\t\t\toutSub.write(\"Full_Response_Time:true\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\toutSub.write(\"Full_Response_Time:false\");\n\t\t\t\t\t }\n\t\t\t\t\toutSub.write(\" Response_Time:\"+responseTime);\n\t\t\t\t\toutSub.newLine();\n\t\t\t\t}\n\t\t\t\toutSub.write(\"Good:\"+ itemNames.get(itemsSchedule[i]));\n\t\t\t\toutSub.write(\" Reserve:\"+auctionParams.get(i).get(\"Reserve\"));\n\t\t\t\tif(auctionsSchedule[i]==1 || auctionsSchedule[i]==2){\n\t\t\t\t\tif(respTime){\n\t\t\t\t\t\toutSub.write(\" Full_Response_Time:true\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\toutSub.write(\" Full_Response_Time:false\");\n\t\t\t\t\t }\n\t\t\t\t\toutSub.write(\" Response_Time:\"+responseTime);\n\t\t\t\t}\n\n\t\t\t\t//add parameter for the price increment for ascending auction\n\t\t\t\tif(auctionsSchedule[i]==3){\n\t\t\t\t\toutSub.write(\" Min_Price_Increment:\"+auctionParams.get(i).get(\"Min_Price_Increment\"));\n\t\t\t\t//add parameter for the starting price for a descending clock auction\n\t\t\t\t}else if(auctionsSchedule[i]==4){\n\t\t\t\t\toutSub.write(\" Start_Price:\"+auctionParams.get(i).get(\"Start_Price\"));\n\t\t\t\t}\n\n\t\t\t\toutSub.newLine();\n\t\t\t\toutSub.close();\n\t\t\t}catch(IOException e){\n\t\t\t\tSystem.out.println(\"File error creating Sub Auction Config.\");\n\t\t\t}\n\t\t}\n\n\n\t}", "public String toString() {\n return String.format(\"%s:%n\\t%-10s: %s%n\\t%-10s: %s%n\\t%-10s: $%.2f%n\\t%-10s: %s%n\\t%-10s: %s%n\", \n \"Boat\", \"Model\", getVehicleModel(), \"Color\", getVehicleColor(), \"Cost\", getVehicleCost(), \n \"Type\", getBoatType(), \"Made of\", getBoatConstruct());\n }", "private void saveEmployee()\n {\n Employee tempEmployee = new Employee();\n String line = \"\";\n try\n {\n PrintWriter out = new PrintWriter(fileName);\n for(int i = 0; i < employees.size(); i++)\n {\n tempEmployee = (Employee) employees.get(i);\n line = tempEmployee.getName() + \",\" + tempEmployee.getHours() + \",\" +\n tempEmployee.getRate();\n out.println(line);\n }\n out.close(); \n }\n catch(IOException ex)\n {\n ex.printStackTrace();\n }\n }", "public static void save(){\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tPrintWriter pw=new PrintWriter(f);\n\t\t\tpw.println(turn);\n\t\t\tpw.println(opponent.toString());\n\t\t\tfor(Unit u:punits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Player Units\");\n\t\t\tfor(Unit u:ounits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Opponent Units\");\n\t\t\tpw.println(priorities);\n\t\t\tpw.println(Arrays.asList(xpgains));\n\t\t\tpw.println(spikesplaced+\" \"+numpaydays+\" \"+activeindex+\" \"+activeunit.getID()+\" \"+weather+\" \"+weatherturn);\n\t\t\tpw.println(bfmaker.toString());\n\t\t\tpw.close();\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}", "@Override // Inherited from the Object class.\n public String toString() {\n return \"gear: \" + gear + \" cadence: \" + cadence + \" speed: \" + speed +\n \" name: \" + name;\n }", "public String writeFileUnderGrad(String fileName) {\n Formatter f = new Formatter();//Use Formatter\r\n f.format(\"%s (%d, %s, %s)%n\", super.getStudentName(), super.getStudentNumber(), super.getStudentSex(), super.getStudentDOB());//Format Student Output\r\n //System.out.println(f);\r\n BufferedWriter out = null; //BufferedWriter\r\n PrintWriter out1 = null; //Use PrintWriter\r\n //Try and Catch method to create the txt file, flush and close\r\n try {\r\n\r\n out = new BufferedWriter(new FileWriter(fileName, true));\r\n out1 = new PrintWriter(out);\r\n out1.write(f.toString());\r\n out1.flush();//Flush text file\r\n } catch (IOException e) {\r\n System.out.println(\"Exception \");\r\n } finally {\r\n try {\r\n out.close();\r\n out1.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(UnderGraduate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n return \"\";\r\n\r\n }", "@Override\n public String toString() {\n return String.format(\"Name: %s, Venom ratings: %.2f\", name, venomRating);\n }", "public static void WriteInputGallerySpecification(GalleryProblem galleryProblem) {\n \n try {\n String fileName = \"tempGallery.txt\";\n FileWriter fileWriter = new FileWriter(fileName);\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n \n Gallery gallery = galleryProblem.getGallery();\n Polygon outerPolygon = gallery.getOuterPolygon();\n List<Vertex> verticesOuterPolygon = outerPolygon.getVertices();\n List<Polygon> innerPolygons = gallery.getInnerPolygons();\n //bufferedWriter.write(numOfGuards);\n //bufferedWriter.newLine();\n \n // line 1\n numOfVertices = verticesOuterPolygon.size();\n numOfHoles = innerPolygons.size();\n numOfExits = gallery.getExits();\n numOfArts = gallery.getArtPieces();\n \n bufferedWriter.write(numOfVertices + \", \" + numOfHoles + \", \" + numOfExits + \", \" + numOfArts + \", \");\n //bufferedWriter.write(numOfVertices + \", \" + numOfHoles + \", \" + numOfExits + \", \" + numOfArts);\n bufferedWriter.newLine();\n \n for (Polygon innerPolygon : innerPolygons ) {\n List<Vertex> verticesHole = innerPolygon.getVertices();\n bufferedWriter.write(verticesHole.size() + \", \");\n }\n \n bufferedWriter.newLine();\n \n //g, vmax, T, deltaT\n numOfGuards = galleryProblem.getGuards();\n vmaxGuards = galleryProblem.getSpeed();\n globalTime = galleryProblem.getGlobalTime();\n deltaT = galleryProblem.getObservationTime();\n \n bufferedWriter.write(numOfGuards + \", \" + vmaxGuards + \", \" + globalTime + \", \" + deltaT + \", \");\n //bufferedWriter.write(numOfGuards + \", \" + vmaxGuards + \", \" + globalTime + \", \" + deltaT);\n bufferedWriter.newLine();\n \n for (Vertex vertexOuterPolygon : verticesOuterPolygon) {\n x = vertexOuterPolygon.getX();\n y = vertexOuterPolygon.getY();\n artFlag = vertexOuterPolygon.getArtFlag();\n exitFlag = vertexOuterPolygon.getExitFlag();\n bufferedWriter.write(x + \", \" + y + \", \" + artFlag + \", \" + exitFlag + \", \");\n //bufferedWriter.write(x + \", \" + y + \", \" + artFlag + \", \" + exitFlag);\n bufferedWriter.newLine();\n }\n \n for (Polygon innerPolygon : innerPolygons) {\n List<Vertex> verticesHole = innerPolygon.getVertices();\n for (Vertex verticeHole : verticesHole) {\n x = verticeHole.getX();\n y = verticeHole.getY();\n artFlag = verticeHole.getArtFlag();\n bufferedWriter.write(x + \", \" + y + \", \" + artFlag + \", \");\n //bufferedWriter.write(x + \", \" + y + \", \" + artFlag);\n bufferedWriter.newLine();\n }\n }\n \n bufferedWriter.close();\n }\n catch(IOException ex) {\n ex.printStackTrace();\n }\n }", "public static void Save(String filename) throws IOException {\n\t\tFileWriter fw=new FileWriter(filename);\r\n\t\tround=A1063307_GUI.round;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tfw.write(\"Round:\"+round+\",Turn:\"+who+\"\\n\");\r\n\t\tint t2=1;\r\n\t\twhile(t2<(linenumber)) {\r\n\t\t\tint zz=0;\r\n\t\t\twhile(zz<5) {\r\n\t\t\t\tif(zz==0) {\t\t\r\n\t\t\t\t\tch[t2].location=ch[t2].location%20;\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].location)+\",\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(zz==1){\r\n\t\t\t\t fw.write(Integer.toString(ch[t2].CHARACTER_NUMBER)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\telse if(zz==2){\r\n\t\t\t\t\tfw.write(Integer.toString(ch[t2].money)+\",\");\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t else if(zz==3){\r\n\t\t\t \tfw.write(Integer.toString(ch[t2].status)+\",\");\r\n\t\t\t \r\n\t\t\t \t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tfw.write(ch[t2].IMAGE_FILENAME);\t\t\t\t\r\n\t\t\t\t\t }\r\n\t\t\t\tzz++;\r\n\t\t\t}\r\n\t\t\tfw.write(\"\\n\");\r\n\t\t\tt2++;\r\n\t\t}\r\n\t\tfw.close();\r\n\t\tFileWriter fw1=new FileWriter(\"Land.txt\");\r\n\t\tfw1.write(\"LOCATION_NUMBER, owner\\n\");\r\n\t\tfor(int i=1;i<17;i++) {\r\n\t\t\tfw1.write(Land[i].PLACE_NUMBER+\",\"+Land[i].owner+\"\\n\");\r\n\t\t}\r\n\t\tfw1.close();\r\n\t}", "static void headerFormat(FileWriter fw) throws IOException { \r\n\t\t//fw.append(\"\\n\");\r\n\t\tfw.append(\"levelId\");\r\n fw.append(',');\r\n fw.append(\"rideName\");\r\n fw.append(',');\r\n fw.append(\"ridestartEndLocation\");\r\n fw.append(',');\r\n fw.append(\"rideData\");\r\n fw.append('\\n');\r\n\t}", "void setOpp(PrintWriter out_opp){ this.out_opp = out_opp; }", "public void printDataToFile(){\n\ttry {\n\t File file = new File(\"media/gameOutput.txt\");\n \n\t // if file doesnt exists, then create it\n\t if (!file.exists()) {\n\t\tfile.createNewFile();\n\t }\n \n\t FileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t BufferedWriter bw = new BufferedWriter(fw);\n\t bw.write(printString);\n\t bw.close();\n\t} catch (IOException e) {\n\t e.printStackTrace();\n\t}\n }", "public void writeTourResultsAllCarrier() {\n\t\tString fileName = this.outputFolder + \"total_tour_infos_per_vehicleType.csv\";\n\t\tFile file = new File(fileName);\n\n\t\ttry {\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(file));\n\t\t\tbw.write(fileName);\n\t\t\tbw.newLine();\n\t\t\tbw.write(\"____________________________________________________________________________\");\n\t\t\tbw.newLine();\n\n\t\t\tbw.write(\"personId; vehType Id;distance [m] ; distance [km] ;TravelTime [s]; TravelTime [h];\" +\n\t\t\t\t\t\"FuelConsumption[l]; Emission [t Co2]; FuelConsumptionRate[l/100m]; \" +\n\t\t\t\t\t\"EmissionRate [g/m]; \");\n\t\t\tbw.newLine();\n\n\n\n\t\t\t//\t\t\tKT:\n\t\t\tMap<Id<Person>, Double> personId2tourDistance = this.handler.getPersonId2TourDistances();\n\t\t\tMap<Id<Person>, Double> personId2tourTravelTimes = this.handler.getPersonId2TravelTimes();\n\n\t\t\tMap<Id<VehicleType>, VehicleTypeSpezificCapabilities> vehTypId2Capabilities = new TreeMap<Id<VehicleType>, VehicleTypeSpezificCapabilities>();\n\n\t\t\tCarrierVehicleTypes vehicleTypes = this.handler.getVehicleTypes();\n\n\t\t\t//preparation:\n\t\t\tfor (Id<VehicleType> vehicleTypeId : vehicleTypes.getVehicleTypes().keySet()){\n\t\t\t\tVehicleTypeSpezificCapabilities capabilities = this.handler.getVehTypId2Capabilities().get(vehicleTypeId);\n\t\t\t\tif (capabilities != null){\n\t\t\t\t\tvehTypId2Capabilities.put(vehicleTypeId, capabilities);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//write results:\n\t\t\tfor (Id<Person> personId :personId2tourDistance.keySet()) {\n\n\t\t\t\tDouble tourDistanceMeter = personId2tourDistance.get(personId);\n\t\t\t\tDouble tourTravelTimeSec = personId2tourTravelTimes.get(personId);\n\n\t\t\t\tId<VehicleType> vehTypeId = null;\n\n\t\t\t\tfor (Id<VehicleType> vehTypeIdsAvail : vehicleTypes.getVehicleTypes().keySet()) {\n\t\t\t\t\tif(personId.toString().contains(\"_\"+vehTypeIdsAvail.toString()+\"_\")){\n\t\t\t\t\t\tif (vehTypeIdsAvail.toString().endsWith(\"frozen\") == personId.toString().contains(\"frozen\")) {//only frozen\n\t\t\t\t\t\t\tvehTypeId = vehTypeIdsAvail;\n\t\t\t\t\t\t} else { //not \"frozen\"\n\t\t\t\t\t\t\tvehTypeId = vehTypeIdsAvail;\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\tif (vehTypeId == null) {\n\t\t\t\t\tlog.error(\"Vehicle type for person not defined: \" + personId);\n\t\t\t\t}\n\n\t\t\t\tdouble fuelConsuptionRate = (vehTypId2Capabilities.get(vehTypeId)).getFuelConsumtion()*1000; // Usually in l/100km\n\t\t\t\tdouble emissionsRatePerMeter = vehTypId2Capabilities.get(vehTypeId).getEmissionsPerMeter(); \n\n\t\t\t\tbw.write(personId + \";\" +\n\t\t\t\t\t\tvehTypeId + \";\" +\n\t\t\t\t\t\ttourDistanceMeter + \";\" + \n\t\t\t\t\t\ttourDistanceMeter/1000 + \";\" + //km\n\t\t\t\t\t\ttourTravelTimeSec + \";\" + \n\t\t\t\t\t\ttourTravelTimeSec/3600 + \";\" + \t//h\n\t\t\t\t\t\ttourDistanceMeter*fuelConsuptionRate/100/1000 + \";\" + // rate is in [liter/100km]\n\t\t\t\t\t\ttourDistanceMeter*emissionsRatePerMeter /1000000 +\";\" + \t// CO2-Ausstoss in t (= 1Mio g)\n\t\t\t\t\t\tfuelConsuptionRate+ \";\" + \n\t\t\t\t\t\temissionsRatePerMeter \n\t\t\t\t\t\t);\n\t\t\t\tbw.newLine();\n\n\t\t\t}\t\n\t\t\t\n\t\t\tlog.info(\"Output written to \" + fileName);\n\t\t\tbw.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void buildOutPutFile() throws Exception {\n\t\tFile theFile = openInputFile();\n\t\t\n\t\t// Open a random access file for reading the file from the disk\n\t\tRandomAccessFile theRAFile = new RandomAccessFile(theFile, \"r\");\t\n\t\tBufferedWriter theOutFile = null;\n\t\t// Create the file name\n\t\tString fileName = getOutPutFilePath();\n\t\t\n\t\t// Create the buffered writer\n\t\ttheOutFile = new BufferedWriter(new FileWriter(fileName));\n\t\t\n\t\tString badChars[] = {\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"0\"};\n\t\t\n\t\t\n\t\tString line = \"\";\n\t\twhile(line != null) {\t\t\t\t\t\t\t// Loop through the list\n\t\t\tline = theRAFile.readLine();\t\t\t\t// read the next line\n\t\t\tString goodLine=line;\t\t\t\t\t\t// set the good line equal to the line in the file\n\t\t\t// Loop through the line and replace all of the bad characters\n\t\t\tfor (int i=0; i < badChars.length; i++) {\n\t\t\t\t\n\t\t\t\tif (goodLine != null) {\n\t\t\t\t\t// take out the beginning line numbers\n\t\t\t\t\tgoodLine = goodLine.replace(badChars[i], \"\");\t\n\t\t\t\t\tSystem.out.println(\"goodLine\" + goodLine);\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t}\n\t\t\t// Write the good file out\n\t\t\twriteFile(goodLine, theOutFile);\t\t\t\n\t\t}\n\t\ttheRAFile.close();\t\t\t\t\t\t\t\t// close the reader \n\t\ttheOutFile.close();\t\t\t\t\t\t\t\t// close the writer\t\t\n\t}", "public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }", "@Override\n public String toString() {\n if (this.getType() == BikeType.ELECTRICAL) {\n return String.format(\"Bike - %d - %d - %s - %.2f - %.2f - %b\", this.idBike, this.idPark, this.type, this.currentBattery, this.maxBattery, this.isActive);\n }\n return String.format(\"Bike - %d - %d - %s - %b\", this.idBike, this.idPark, this.type, this.isActive);\n }", "@Override\r\n\tpublic void SavePlayerData() {\r\n\r\n Player player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerInfo.txt\";\r\n\t\tString playerlifepoint = \"\"+player.getLifePoints();\r\n\t\tString playerArmore = player.getArmorDescription();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerlifepoint);\r\n\t\t\tprint.println(playerArmore);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "private void saveCarListings() {\r\n try {\r\n Writer writer = new Writer(new File(CARLISTINGS_FILE));\r\n writer.write(cars);\r\n writer.close();\r\n System.out.println(\"Car Listings saved to file \" + CARLISTINGS_FILE);\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Unable to save Car Listings to \" + CARLISTINGS_FILE);\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void writeTextFile(\r\n\t\t\tGDMSMain theMainHomePage,\r\n\t\t\tArrayList<QtlDetailElement> listOfAllQTLDetails, HashMap<Integer, String> hmOfQtlPosition, HashMap<String, Integer> hmOfQtlNameId,\r\n\t\t\tHashMap<Integer, String> hmOfQtlIdandName, String strSelectedExportType, boolean bQTLExists) throws GDMSException {\n\t\t\r\n\t\t\r\n\t\tString strFlapjackTextFile = \"Flapjack\";\r\n\t\tFile baseDirectory = theMainHomePage.getMainWindow().getApplication().getContext().getBaseDirectory();\r\n\t\tFile absoluteFile = baseDirectory.getAbsoluteFile();\r\n\r\n\t\tFile[] listFiles = absoluteFile.listFiles();\r\n\t\tFile fileExport = baseDirectory;\r\n\t\tfor (File file : listFiles) {\r\n\t\t\tif(file.getAbsolutePath().endsWith(\"Flapjack\")) {\r\n\t\t\t\tfileExport = file;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tString strFilePath = fileExport.getAbsolutePath();\r\n\t\t//System.out.println(\"strFilePath=:\"+strFilePath);\r\n\t\tgeneratedTextFile = new File(strFilePath + \"\\\\\" + strFlapjackTextFile + \".txt\");\r\n\r\n\t\t/**\twriting tab delimited qtl file for FlapJack \r\n\t\t * \tconsisting of marker chromosome & position\r\n\t\t * \r\n\t\t * **/\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t//factory = new ManagerFactory(GDMSModel.getGDMSModel().getLocalParams(), GDMSModel.getGDMSModel().getCentralParams());\r\n\t\t\tfactory=GDMSModel.getGDMSModel().getManagerFactory();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tOntologyDataManager ontManager=factory.getOntologyDataManager();\r\n\t\t\t*/\r\n\t\t\tFileWriter flapjackTextWriter = new FileWriter(generatedTextFile);\r\n\t\t\tBufferedWriter flapjackBufferedWriter = new BufferedWriter(flapjackTextWriter);\r\n\t\t\t//getAllelicValuesByGidsAndMarkerNames\r\n\t\t\t//genoManager.getAlle\r\n\t\t\t//\t\t\t fjackQTL.write(\"QTL\\tChromosome\\tPosition\\tMinimum\\tMaximum\\tTrait\\tExperiment\\tTrait Group\\tLOD\\tR2\\tFlanking markers in original publication\");\r\n\t\t\tflapjackBufferedWriter.write(\"QTL\\tChromosome\\tPosition\\tMinimum\\tMaximum\\tTrait\\tExperiment\\tTrait Group\\tLOD\\tR2\\tFlanking markers in original publication\\teffect\");\r\n\t\t\tflapjackBufferedWriter.write(\"\\n\");\r\n\t\t\tfor (int i = 0 ; i < listOfAllQTLDetails.size(); i++){\r\n\t\t\t\t//System.out.println(listOfAllQTLDetails.get(i));\r\n\t\t\t\tQtlDetailElement qtlDetails = listOfAllQTLDetails.get(i);\r\n\t\t\t\t\r\n\t\t\t\t/*QtlDetailsPK id = qtlDetails.getQtlName().get.getId();\r\n\t\t\t\tInteger qtlId = id.getQtlId();*/\r\n\t\t\t\t//String strQtlName = hmOfQtlIdandName.get(qtlId);\r\n\t\t\t\tString strQtlName =qtlDetails.getQtlName();\r\n\t\t\t\tint qtlId=hmOfQtlNameId.get(strQtlName);\r\n\t\t\t\t//qtlDetails.get\r\n\t\t\t\t//Float clen = qtlDetails.getClen();\r\n\t\t\t\t//Float fEffect = qtlDetails.getEffect();\r\n\t\t\t\tint fEffect = qtlDetails.getEffect();\r\n\t\t\t\tFloat fMaxPosition = qtlDetails.getMaxPosition();\r\n\t\t\t\tFloat fMinPosition = qtlDetails.getMinPosition();\r\n\t\t\t\t//Float fPosition = qtlDetails.getPosition();\r\n\t\t\t\tString fPosition = hmOfQtlPosition.get(qtlId);\r\n\t\t\t\tFloat frSquare = qtlDetails.getRSquare();\r\n\t\t\t\tFloat fScoreValue = qtlDetails.getScoreValue();\r\n\t\t\t\tString strExperiment = qtlDetails.getExperiment();\r\n\t\t\t\t//String strHvAllele = qtlDetails..getHvAllele();\r\n\t\t\t\t//String strHvParent = qtlDetails.getHvParent();\r\n\t\t\t\t//String strInteractions = qtlDetails.getInteractions();\r\n\t\t\t\tString strLeftFlankingMarker = qtlDetails.getLeftFlankingMarker();\r\n\t\t\t\tString strLinkageGroup = qtlDetails.getChromosome();\r\n\t\t\t\t//String strLvAllele = qtlDetails.getLvAllele();\r\n\t\t\t\t//String strLvParent = qtlDetails.getLvParent();\r\n\t\t\t\tString strRightFM = qtlDetails.getRightFlankingMarker();\r\n\t\t\t\t//String strSeAdditive = qtlDetails.getSeAdditive();\r\n\t\t\t\t\r\n\t\t\t\t//String strTrait = qtlDetails.getTrait();\r\n\t\t\t\tString strTrait = qtlDetails.getTRName();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tflapjackBufferedWriter.write(strQtlName + \"\\t\" + strLinkageGroup + \"\\t\" + fPosition + \"\\t\" + fMinPosition + \"\\t\" + fMaxPosition + \"\\t\" +\r\n\t\t\t\t\t\tstrTrait + \"\\t\" + strExperiment + \"\\t \\t\" + fScoreValue + \"\\t\" + frSquare+\r\n\t \"\\t\" + strLeftFlankingMarker+\"/\"+strRightFM + \"\\t\" + fEffect);\r\n\t\t\t\t\r\n\t\t\t\tflapjackBufferedWriter.write(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tflapjackBufferedWriter.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new GDMSException(e.getMessage());\r\n\t\t} \r\n\t\t\r\n\t}", "public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }", "private void writeFile(String path)\n {\n FileIO fileIO = new FileIO();\n StringBuffer stringBuf = new StringBuffer();\n for(int i = 0; i< getDrivers().getSize(); i++) // go through each driver in the collection\n {\n stringBuf.append(getDrivers().getDriver(i).getName() + \",\" + getDrivers().getDriver(i).getRanking() \n + \",\" + getDrivers().getDriver(i).getSpecialSkill() + ((i == (getDrivers().getSize() - 1)) ? \"\" :\"\\n\")); // append details to buffer\n }\n fileIO.setFileName(path);\n fileIO.writeFile(stringBuf.toString());\n }", "private void outputToFile(String filename) throws FileNotFoundException, IOException {\n\t\tBufferedWriter writer = new BufferedWriter(\n\t\t\t\tnew FileWriter(filename+\".tmp\"));\n\t\twriter.write(VERIFY_STRING + \"\\n\");\n\n\t\t// output automata info\n\t\twriter.write(machine.getName() + \"\\n\");\n\t\twriter.write(machine.getType() + \"\\n\");\n\n\t\t// output state info\n\t\tfor (State state : machine.getStates()) {\n\t\t\twriter.write(\"STATE\\n\");\n\t\t\twriter.write(state.getName() + \"\\n\");\n\t\t\twriter.write(state.isAccept() + \" \" + state.isStart() + \" \" + \n\t\t\t\t\tstate.getID() + \" \" + state.getGraphic().getX() + \" \" + \n\t\t\t\t\tstate.getGraphic().getY() + \"\\n\");\n\n\t\t\t// output transitions\n\t\t\tfor (Transition t : state.getTransitions())\n\t\t\t\twriter.write(t.getID() + \" \" + t.getInput() + \" \" + \n\t\t\t\t\t\tt.getNext().getID() + \"\\n\");\n\t\t}\n\t\twriter.close();\n\t}", "@Override\n public String toString() {\n return \"Car \" + this.id + \". Size : \" + this.size\n + \".\\nOrientation :\" + this.orientation\n + \". Current position : \" + this.currentPosition;\n }", "public static void savecars(){\n Cars xx = new Cars();\n System.out.println(\"save cars\");\n String outtext;\n try {\n File rentfile = new File(\"cars.csv\");\n FileWriter out = new FileWriter(rentfile);\n for (int i = 0; i < listcars.size();i++) {\n xx = listcars.get(i);\n String newline = System.getProperty(\"line.separator\");\n outtext = xx.getBrand()+ \";\"+ xx.getModel()+ \";\"+ xx.getReference()+ \";\"+ xx.getYear()+ newline;\n out.write(outtext);\n }\n out.close();\n System.out.println(\"cars data saved in cars.csv\");\n } catch (IOException i) {\n i.printStackTrace();\n }\n }", "public void printBestIndividual() {\n\t\tSystem.out.println(\"Finalizing\");\n\t\tQuoridorBoard board;\n\t\tfor (int t = 0; t < (Math.log(individuals.length) / Math.log(2)); t++) {\n\t\t\tfor (int i = 0; i < individuals.length - 1; i++) {\n\t\t\t\tif (individuals[i].fitness == t) {\n\t\t\t\t\tfor (int j = i + 1; j < individuals.length; j++) {\n\t\t\t\t\t\tif (individuals[j].fitness == t) {\n\t\t\t\t\t\t\tboard = new QuoridorBoard(individuals[i],\n\t\t\t\t\t\t\t\t\tindividuals[j]);\n\t\t\t\t\t\t\tboard.play();\n\t\t\t\t\t\t\tif (board.getWinner() != null) {\n\t\t\t\t\t\t\t\tAI winner = board.getWinner();\n\t\t\t\t\t\t\t\tAI loser = board.getLoser();\n\t\t\t\t\t\t\t\twinner.fitness++;\n\t\t\t\t\t\t\t\tindividuals[i] = winner;\n\t\t\t\t\t\t\t\tindividuals[j] = loser;\n\t\t\t\t\t\t\t}\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}\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tFileWriter fstream = new FileWriter(\"evoOutput.txt\");\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tint max1 = 0;\n\t\t\tint max2 = 0;\n\t\t\tAI best1 = new AI();\n\t\t\tAI best2 = new AI();\n\t\t\tfor (AI ai : individuals) {\n\t\t\t\tif (ai.fitness > max1) {\n\t\t\t\t\tmax1 = ai.fitness;\n\t\t\t\t\tbest1 = ai.clone();\n\t\t\t\t} else if (ai.fitness > max2) {\n\t\t\t\t\tmax2 = ai.fitness;\n\t\t\t\t\tbest2 = ai.clone();\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.write(best1.outputString() + \"\\r\\n\" + best2.outputString()\n\t\t\t\t\t+ \"\\r\\n\");\n\t\t\tout.close();\n\t\t\tSystem.out.println(\"Done\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t}", "public String writeDetails ()\n {\n String memberData = \"\";\n memberData = memberData.concat(fname);\n memberData = memberData.concat(\",\");\n memberData = memberData.concat(sname);\n memberData = memberData.concat(\",\");\n memberData = memberData.concat(Float.toString(mark));\n return memberData;\n }", "private void drawDebugInfo(final Graphics2D theGraphics, final Vehicle theVehicle) {\n int x = theVehicle.getX() * SQUARE_SIZE;\n int y = theVehicle.getY() * SQUARE_SIZE;\n\n // draw numbers on each vehicle\n theGraphics.setColor(Color.WHITE);\n theGraphics.drawString(theVehicle.toString(), x, y + SQUARE_SIZE - 1);\n theGraphics.setColor(Color.BLACK);\n theGraphics.drawString(theVehicle.toString(), x + 1, y + SQUARE_SIZE);\n\n // draw arrow on vehicle for its direction\n final Direction dir = theVehicle.getDirection();\n int dx = (SQUARE_SIZE - MARKER_SIZE) / 2;\n int dy = dx;\n\n switch (dir) {\n case WEST:\n dx = 0;\n break;\n\n case EAST:\n dx = SQUARE_SIZE - MARKER_SIZE;\n break;\n\n case NORTH:\n dy = 0;\n break;\n\n case SOUTH:\n dy = SQUARE_SIZE - MARKER_SIZE;\n break;\n\n default:\n }\n\n x = x + dx;\n y = y + dy;\n\n theGraphics.setColor(Color.YELLOW);\n theGraphics.fillOval(x, y, MARKER_SIZE, MARKER_SIZE);\n }", "public static void listVehicles() {\n\t\tSystem.out.println(\"-----------------\");\n\t\tSystem.out.println(\"Listing Vehicles\");\n\t\tSystem.out.println(\"-----------------\");\n\t\t\n\t\tfor (int i = 0; i < owners.size(); i++) {\n\t\t\tfor (Vehicle v : owners.get(i).getVehicles()) {\n\t\t\t\t\n\t\t\t\tSystem.out.println((owners.get(i).getName() + \"'s \" + v.toString()));\n\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\t\n\t}", "@Override\r\n public void printAllVehicles(Integer age) {\r\n if(!drivers.containsKey(age)) {\r\n System.out.println(\"No vehicle found parked by the driver of age \" + age.toString() + \".\");\r\n return;\r\n }\r\n Driver driver = drivers.get(age);\r\n Iterator<Vehicle> it = driver.getVehiclesOwned().iterator();\r\n System.out.print(\"Vehicle Registeration Numbers of all cars parked by driver of age \" + age.toString() + \" are as follows: \");\r\n while(it.hasNext()){\r\n System.out.print(it.next().getVehicleNumber() + \" | \");\r\n }\r\n System.out.println();\r\n }", "public void writeToFile(String file) throws IOException {\r\n\t\tString body = \"\"; //everything is stored in a string which\r\n\t\t//is written to the file\r\n\t\tFile writeFile = new File(file);\r\n\t\tBufferedWriter audWriter = new BufferedWriter(new FileWriter(writeFile));\r\n\t\tTheaterSeat current = getFirst();\r\n\t\tbody += current.getTicketType();\r\n\t\tfor (int i=0; i<numRows - 1; i++) {\r\n\t\t\t\r\n\t\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\t\tcurrent = current.getRight();\r\n\t\t\t\tbody += current.getTicketType();\r\n\t\t\t}\r\n\t\t\tfor (int j=0; j<numCols - 1; j++) {\r\n\t\t\t\tcurrent = current.getLeft();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tbody += \"\\n\";\r\n\t\t\tcurrent = current.getDown();\r\n\t\t\tbody += current.getTicketType();\r\n\t\t}\r\n\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\tcurrent = current.getRight();\r\n\t\t\tbody += current.getTicketType();\r\n\t\t}\r\n\t\taudWriter.write(body);\r\n\t\taudWriter.close();\r\n\t}" ]
[ "0.703169", "0.67014354", "0.6612812", "0.6300219", "0.62595534", "0.62095076", "0.6184774", "0.6174699", "0.61712563", "0.6032189", "0.59971726", "0.5995123", "0.5949046", "0.5927394", "0.58461595", "0.5837638", "0.5825525", "0.5785731", "0.57693684", "0.57484937", "0.57462656", "0.57427585", "0.5729071", "0.5722909", "0.57018065", "0.57015383", "0.56944036", "0.5693583", "0.5676903", "0.5672102", "0.56694955", "0.5667217", "0.5662423", "0.5658165", "0.56516886", "0.56139815", "0.56082517", "0.56000084", "0.5599998", "0.55897677", "0.55716765", "0.55510414", "0.55335015", "0.55276024", "0.55192775", "0.5514272", "0.5513042", "0.55102223", "0.5503239", "0.5488987", "0.5474916", "0.5474865", "0.5474436", "0.5474421", "0.5471337", "0.5461879", "0.5461613", "0.54549146", "0.54469997", "0.5445679", "0.5436499", "0.54341936", "0.5424228", "0.54197365", "0.5414424", "0.54129064", "0.54074335", "0.54019403", "0.53751296", "0.5374918", "0.5368533", "0.5358835", "0.5357082", "0.5354686", "0.5347885", "0.5346517", "0.5337354", "0.53333783", "0.5328913", "0.53271306", "0.5320642", "0.53166735", "0.53139055", "0.53105146", "0.5304603", "0.530216", "0.5299045", "0.529625", "0.5293634", "0.5293392", "0.5293001", "0.5289733", "0.52842337", "0.528265", "0.5282419", "0.5279588", "0.5262615", "0.52606475", "0.52595353", "0.5257175" ]
0.6432658
3
if( seq != null ) System.err.println( "set aligned seq " + seq.getName() + " " + alseq.length() ); else System.err.println( "seq null" );
public void setAlignedSequence( Sequence alseq ) { this.alignedsequence = alseq; if(alseq.id == null) alseq.id = id; if(seq != null) alseq.name = seq.getGroup(); if(alseq.group == null) alseq.group = group; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String validateAlignment() {\n\t\treturn null;\n\t}", "public void prepareAlignment(String sq1, String sq2) {\n if(F == null) {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n F = new float[3][n+1][m+1];\n B = new TracebackAffine[3][n+1][m+1];\n for(int k = 0; k < 3; k++) {\n for(int i = 0; i < n+1; i ++) {\n for(int j = 0; j < m+1; j++)\n B[k][i][j] = new TracebackAffine(0,0,0);\n }\n }\n }\n\n //alignment already been run and existing matrix is big enough to reuse.\n else if(seq1.length() <= n && seq2.length() <= m) {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n }\n\n //alignment already been run but matrices not big enough for new alignment.\n //create all new matrices.\n else {\n this.n = sq1.length(); this.m = sq2.length();\n this.seq1 = strip(sq1); this.seq2 = strip(sq2);\n F = new float[3][n+1][m+1];\n B = new TracebackAffine[3][n+1][m+1];\n for(int k = 0; k < 3; k++) {\n for(int i = 0; i < n+1; i ++) {\n for(int j = 0; j < m+1; j++)\n B[k][i][j] = new TracebackAffine(0,0,0);\n }\n }\n }\n }", "public abstract void doAlignment(String sq1, String sq2);", "public int getAlignment() {\n/* */ return this.newAlign;\n/* */ }", "public void printAlignment(SWGAlignment alignment){\n\t\t\tString \torigSeq1 = alignment.getOriginalSequence1().toString(),\n\t\t\t\t\torigSeq2 = alignment.getOriginalSequence2().toString(),\n\t\t\t\t\talnSeq1 = new String(alignment.getSequence1()),\n\t\t\t\t\talnSeq2 = new String(alignment.getSequence2());\n\t\t\tint \tstart1 = alignment.getStart1(),\n\t\t\t\t\tstart2 = alignment.getStart2(),\n\t\t\t\t\tgap1 = alignment.getGaps1(),\n\t\t\t\t\tgap2 = alignment.getGaps2();\n\t\t\t\n\t\t\tString seq1, seq2, mark;\n\t\t\tif(start1>=start2){\n\t\t\t\tseq1=origSeq1.substring(0, start1) + alnSeq1 + origSeq1.substring(start1+alnSeq1.length()-gap1);\n\t\t\t\tString \tseq2Filler = start1==start2?\"\":String.format(\"%\"+(start1-start2)+\"s\", \"\"),\n\t\t\t\t\t\tmarkFiller = start1==0?\"\":String.format(\"%\"+start1+\"s\", \"\");\n\t\t\t\tseq2= seq2Filler + origSeq2.substring(0, start2) + alnSeq2 + origSeq2.substring(start2+alnSeq2.length()-gap2);\n\t\t\t\tmark= markFiller+String.valueOf(alignment.getMarkupLine());\n\t\t\t}else{\n\t\t\t\tseq2=origSeq2.substring(0, start2) + alnSeq2 + origSeq2.substring(start2+alnSeq2.length()-gap2);\n\t\t\t\tString \tmarkFiller = start2==0?\"\":String.format(\"%\"+start2+\"s\", \"\");\n\t\t\t\tseq1=String.format(\"%\"+(start2-start1)+\"s\", \"\") + origSeq1.substring(0, start1) + alnSeq1 + origSeq1.substring(start1+alnSeq1.length()-gap1);\n\t\t\t\tmark=markFiller+String.valueOf(alignment.getMarkupLine());\n\t\t\t}\n\t\t\tSystem.out.println(alignment.getSummary());\n\t\t\tSystem.out.println(seq1);\n\t\t\tSystem.out.println(mark);\n\t\t\tSystem.out.println(seq2);\n\t\t}", "public SequenceFasta(){\n description = null;\n\t sequence = null;\n\t}", "void setSeq(long seq) {\n this.seq = seq;\n }", "private boolean prepareInput(SequenceI[] seqs, int minlen)\n {\n int nseqs = 0;\n if (minlen < 0)\n {\n throw new Error(\n \"Implementation error: minlen must be zero or more.\");\n }\n for (int i = 0; i < seqs.length; i++)\n {\n if (seqs[i].getEnd() - seqs[i].getStart() > minlen - 1)\n {\n nseqs++;\n }\n }\n boolean valid = nseqs > 1; // need at least two seqs\n vamsas.objects.simple.Sequence[] seqarray = (valid) ? new vamsas.objects.simple.Sequence[nseqs]\n : null;\n for (int i = 0, n = 0; i < seqs.length; i++)\n {\n\n String newname = jalview.analysis.SeqsetUtils.unique_name(i); // same\n // for\n // any\n // subjob\n SeqNames.put(newname,\n jalview.analysis.SeqsetUtils.SeqCharacterHash(seqs[i]));\n if (valid && seqs[i].getEnd() - seqs[i].getStart() > minlen - 1)\n {\n seqarray[n] = new vamsas.objects.simple.Sequence();\n seqarray[n].setId(newname);\n seqarray[n++].setSeq((submitGaps) ? seqs[i].getSequenceAsString()\n : AlignSeq.extractGaps(jalview.util.Comparison.GapChars,\n seqs[i].getSequenceAsString()));\n }\n else\n {\n String empty = null;\n if (seqs[i].getEnd() >= seqs[i].getStart())\n {\n empty = (submitGaps) ? seqs[i].getSequenceAsString() : AlignSeq\n .extractGaps(jalview.util.Comparison.GapChars,\n seqs[i].getSequenceAsString());\n }\n emptySeqs.add(new String[]\n { newname, empty });\n }\n }\n this.seqs = new vamsas.objects.simple.SequenceSet();\n this.seqs.setSeqs(seqarray);\n return valid;\n }", "@Test\n \tpublic void testSimpleAlignments()\n \t{\n \t\tSystem.out.format(\"\\n\\n-------testSimpleAlignments() ------------------------\\n\");\n \t\tPseudoDamerauLevenshtein DL = new PseudoDamerauLevenshtein();\n \t\t//DL.init(\"AB\", \"CD\", false, true);\n \t\t//DL.init(\"ACD\", \"ADE\", false, true);\n \t\t//DL.init(\"AB\", \"XAB\", false, true);\n \t\t//DL.init(\"AB\", \"XAB\", true, true);\n \t\t//DL.init(\"fit\", \"xfity\", true, true);\n \t\t//DL.init(\"fit\", \"xxfityyy\", true, true);\n \t\t//DL.init(\"ABCD\", \"BACD\", false, true);\n \t\t//DL.init(\"fit\", \"xfityfitz\", true, true);\n \t\t//DL.init(\"fit\", \"xfitfitz\", true, true);\n \t\t//DL.init(\"fit\", \"xfitfitfitfitz\", true, true);\n \t\t//DL.init(\"setup\", \"set up\", true, true);\n \t\t//DL.init(\"set up\", \"setup\", true, true);\n \t\t//DL.init(\"hobbies\", \"hobbys\", true, true);\n \t\t//DL.init(\"hobbys\", \"hobbies\", true, true);\n \t\t//DL.init(\"thee\", \"The x y the jdlsjds salds\", true, false);\n \t\tDL.init(\"Bismark\", \"... Bismarck lived...Bismarck reigned...\", true, true);\n \t\t//DL.init(\"refugee\", \"refuge x y\", true, true);\n \t\t//StringMatchingStrategy.APPROXIMATE_MATCHING_MINPROB\n \t\tList<PseudoDamerauLevenshtein.Alignment> alis = DL.computeAlignments(0.65);\n \t\tSystem.out.format(\"----------result of testSimpleAlignments() ---------------------\\n\\n\");\n \t\tfor (Alignment ali: alis)\n \t\t{\n \t\t\tali.print();\n \t\t}\n \t}", "public void setAlignmentX(AlignX anAlignX) { }", "public Alignment()\n\t{\n\t}", "public void setSeq(Integer seq) {\n this.seq = seq;\n }", "public void setSeq(Integer seq) {\n this.seq = seq;\n }", "public void setSeq(Integer seq) {\n this.seq = seq;\n }", "int getSeq();", "int getSeq();", "int getSeq();", "public void setAlignment(int align)\n {\n this.align = align;\n }", "int align();", "@Test\n\tpublic void testFindAlignment1() {\n\t\tint[] s = new int[cs5x3.length];\n\t\tfor (int i = 0; i < s.length; i++)\n\t\t\ts[i] = -1;\n\t\tAlignment.AlignmentScore score = testme3.findAlignment(s);\n\t\t// AAG-- 3\n\t\t// --GCC 3\n\t\t// -CGC- 2\n\t\t// -AGC- 3\n\t\t// --GCT 2\n\t\tassertEquals(13, score.actual);\n\t\tscore = testme4.findAlignment(s);\n\t\t// AAG-- 3\n\t\t// --GCC 3\n\t\t// -CGC- 2\n\t\t// -AGC- 3\n\t\t// -AGC- 3 [reverse strand]\n\t\tassertEquals(14, score.actual);\n\t}", "private static void _assertSizeAlignment(boolean[] one, boolean[] other){\r\n assert one.length==other.length:\r\n String.format(\"Incompatible Arrays %s / %s\",one.length,other.length);\r\n }", "java.lang.String getSeq();", "boolean hasSeq();", "@Override\r\n\t\tpublic String seq(ColumnRecord record) {\n\t\t\treturn null;\r\n\t\t}", "@Override\r\n\t\tpublic String seq(ColumnRecord record) {\n\t\t\treturn null;\r\n\t\t}", "@Override\r\n\t\tpublic String seq(ColumnRecord record) {\n\t\t\treturn null;\r\n\t\t}", "public int size() { return seq.size(); }", "int getAlignValue();", "static int size_of_lda(String passed){\n\t\treturn 3;\n\t}", "public int getAlignment()\n {\n return align;\n }", "@Override\n\tpublic int sequence() {\n\t\treturn 0;\n\t}", "public boolean isSetKey_seq() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __KEY_SEQ_ISSET_ID);\n }", "public void setAlignment(int paramInt) {\n/* */ this.newAlign = paramInt;\n/* */ switch (paramInt) {\n/* */ case 3:\n/* */ this.align = 0;\n/* */ return;\n/* */ case 4:\n/* */ this.align = 2;\n/* */ return;\n/* */ } \n/* */ this.align = paramInt;\n/* */ }", "@Override\n public boolean isFinished() {\n return this.isAligned;\n }", "boolean hasOriginseqnum();", "private void alignSingle(RevisionDocument doc, double[][] probMatrix,\n\t\t\tdouble[][] fixedMatrix, int option) throws Exception {\n\t\tint oldLength = probMatrix.length;\n\t\tint newLength = probMatrix[0].length;\n\t\tif (doc.getOldSentencesArray().length != oldLength\n\t\t\t\t|| doc.getNewSentencesArray().length != newLength) {\n\t\t\tthrow new Exception(\"Alignment sentence does not match\");\n\t\t} else {\n\t\t\t/*\n\t\t\t * Rules for alignment 1. Allows one to many and many to one\n\t\t\t * alignment 2. No many to many alignments (which would make the\n\t\t\t * annotation even more difficult)\n\t\t\t */\n\t\t\tif (option == -1) { // Baseline 1, using the exact match baseline\n\t\t\t\tfor (int i = 0; i < oldLength; i++) {\n\t\t\t\t\tfor (int j = 0; j < newLength; j++) {\n\t\t\t\t\t\tif (probMatrix[i][j] == 1) {\n\t\t\t\t\t\t\tdoc.predictNewMappingIndex(j + 1, i + 1);\n\t\t\t\t\t\t\tdoc.predictOldMappingIndex(i + 1, j + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (option == -2) { // Baseline 2, using the similarity\n\t\t\t\t\t\t\t\t\t\t// baseline\n\t\t\t\tfor (int i = 0; i < oldLength; i++) {\n\t\t\t\t\tfor (int j = 0; j < newLength; j++) {\n\t\t\t\t\t\tif (probMatrix[i][j] > 0.5) {\n\t\t\t\t\t\t\tdoc.predictNewMappingIndex(j + 1, i + 1);\n\t\t\t\t\t\t\tdoc.predictOldMappingIndex(i + 1, j + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else { // current best approach\n\t\t\t\tfor (int i = 0; i < oldLength; i++) {\n\t\t\t\t\tfor (int j = 0; j < newLength; j++) {\n\t\t\t\t\t\tif (fixedMatrix[i][j] == 1) {\n\t\t\t\t\t\t\tdoc.predictNewMappingIndex(j + 1, i + 1);\n\t\t\t\t\t\t\tdoc.predictOldMappingIndex(i + 1, j + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Code for improving\n\t\t\t}\n\t\t}\n\t}", "public void setAlign(String align) {\n this.align = align;\n }", "void setAlignment(Alignment alignment) {\n this.alignment = alignment;\n }", "public static void main(String[] args) {\n\t\t\n\t\t List<Result> outputK = new ArrayList<Result>();\n\n\t\t\t\n\t\t\tint alignment_type = Integer.parseInt(args[0]);\n\t\t\t\n\t\t\tif(alignment_type==1){\n\t\t\t\t\n\t\t\t\tGlobalAlignment gb = new GlobalAlignment();\n\n\t\t\t\toutputK = \tgb.PerformGlobalAlignment(args[1],args[2],args[3],args[4],Integer.parseInt(args[5]),Integer.parseInt(args[6]));\n\t\t\t\t\n \n\t\t\t\t\n\t\t\t\tfor(int i=0;i<outputK.size();i++){\n\t\t\t\t\tResult r = outputK.get(i);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(r.score);\n \tSystem.out.println(\"id1 \"+r.id1+\" \"+r.startpos1+\" \"+r.seq1);\n\t\t\t\t\tSystem.out.println(\"id2 \"+r.id2+\" \"+r.startpos2+\" \"+r.seq2);\n//\t\t\t\t\t\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else if(alignment_type==2){\n\t\t\t\t\n\t\t\t\tLocalAlignment loc = new LocalAlignment();\n\t\t\t\toutputK = \tloc.PerformLocalAlignment(args[1],args[2],args[3],args[4],Integer.parseInt(args[5]),Integer.parseInt(args[6]));\n\t\t\t\t\n \n\t\t\t\t\n\t\t\t\tfor(int i=0;i<outputK.size();i++){\n\t\t\t\t\tResult r = outputK.get(i);\n\n\t\t\t\t\tSystem.out.println(r.score);\n System.out.println(\"id1 \"+r.id1+\" \"+r.startpos1+\" \"+r.seq1);\n\t\t\t\t\tSystem.out.println(\"id2 \"+r.id2+\" \"+r.startpos2+\" \"+r.seq2);\n\n\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}else if(alignment_type==3){\n\t\t\t\t\n\t\t \tDoveTail dt = new DoveTail();\t\t\n\t\t\t\toutputK = \tdt.PerformDoveTailAlignment(args[1],args[2],args[3],args[4],Integer.parseInt(args[5]),Integer.parseInt(args[6]));\n\t\t\t\t\n \n\t\t\t\t\n\t\t\t\tfor(int i=0;i<outputK.size();i++){\n\t\t\t\t\tResult r = outputK.get(i);\n\n\t\t\t\t\tSystem.out.println(r.score);\n System.out.println(\"id1 \"+r.id1+\" \"+r.startpos1+\" \"+r.seq1);\n\t\t\t\t\tSystem.out.println(\"id2 \"+r.id2+\" \"+r.startpos2+\" \"+r.seq2);\n\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Enter 1,2 or 3\");\n\t\t\t}\n\t\t\n\t\n\t}", "public void alignLocation();", "public boolean hasSequence() {\n return (sequenceName != null &&\n !\"\".equals(sequenceName.trim()));\n }", "public void setSequence(String sequence) {\r\n this.sequence = sequence;\r\n }", "@XmlElement(\"IsAligned\")\n boolean IsAligned();", "@Override\n\tpublic int compareTo(SequenceFasta other){\n return sequence.length() - other.sequence.length();\n\t}", "long getOriginseqnum();", "public void mergeAlignment() {\n \n SAMFileReader unmappedSam = null;\n if (this.unmappedBamFile != null) {\n unmappedSam = new SAMFileReader(IoUtil.openFileForReading(this.unmappedBamFile));\n }\n \n // Write the read groups to the header\n if (unmappedSam != null) header.setReadGroups(unmappedSam.getFileHeader().getReadGroups());\n \n int aligned = 0;\n int unmapped = 0;\n \n final PeekableIterator<SAMRecord> alignedIterator = \n new PeekableIterator(getQuerynameSortedAlignedRecords());\n final SortingCollection<SAMRecord> alignmentSorted = SortingCollection.newInstance(\n SAMRecord.class, new BAMRecordCodec(header), new SAMRecordCoordinateComparator(),\n MAX_RECORDS_IN_RAM);\n final ClippedPairFixer pairFixer = new ClippedPairFixer(alignmentSorted, header);\n \n final CloseableIterator<SAMRecord> unmappedIterator = unmappedSam.iterator();\n SAMRecord nextAligned = alignedIterator.hasNext() ? alignedIterator.next() : null;\n SAMRecord lastAligned = null;\n \n final UnmappedReadSorter unmappedSorter = new UnmappedReadSorter(unmappedIterator);\n while (unmappedSorter.hasNext()) {\n final SAMRecord rec = unmappedSorter.next();\n rec.setReadName(cleanReadName(rec.getReadName()));\n if (nextAligned != null && rec.getReadName().compareTo(nextAligned.getReadName()) > 0) {\n throw new PicardException(\"Aligned Record iterator (\" + nextAligned.getReadName() +\n \") is behind the umapped reads (\" + rec.getReadName() + \")\");\n }\n rec.setHeader(header);\n \n if (isMatch(rec, nextAligned)) {\n if (!ignoreAlignment(nextAligned)) {\n setValuesFromAlignment(rec, nextAligned);\n if (programRecord != null) {\n rec.setAttribute(ReservedTagConstants.PROGRAM_GROUP_ID,\n programRecord.getProgramGroupId());\n }\n aligned++;\n }\n nextAligned = alignedIterator.hasNext() ? alignedIterator.next() : null;\n }\n else {\n unmapped++;\n }\n \n // Add it if either the read or its mate are mapped, unless we are adding aligned reads only\n final boolean eitherReadMapped = !rec.getReadUnmappedFlag() || (rec.getReadPairedFlag() && !rec.getMateUnmappedFlag());\n \n if (eitherReadMapped || !alignedReadsOnly) {\n pairFixer.add(rec);\n }\n }\n unmappedIterator.close();\n alignedIterator.close();\n \n final SAMFileWriter writer =\n new SAMFileWriterFactory().makeBAMWriter(header, true, this.targetBamFile);\n int count = 0;\n CloseableIterator<SAMRecord> it = alignmentSorted.iterator();\n while (it.hasNext()) {\n SAMRecord rec = it.next();\n if (!rec.getReadUnmappedFlag()) {\n if (refSeq != null) {\n byte referenceBases[] = refSeq.get(rec.getReferenceIndex()).getBases();\n rec.setAttribute(SAMTag.NM.name(),\n SequenceUtil.calculateSamNmTag(rec, referenceBases, 0, bisulfiteSequence));\n rec.setAttribute(SAMTag.UQ.name(),\n SequenceUtil.sumQualitiesOfMismatches(rec, referenceBases, 0, bisulfiteSequence));\n }\n }\n writer.addAlignment(rec);\n if (++count % 1000000 == 0) {\n log.info(count + \" SAMRecords written to \" + targetBamFile.getName());\n }\n }\n writer.close();\n \n \n log.info(\"Wrote \" + aligned + \" alignment records and \" + unmapped + \" unmapped reads.\");\n }", "public boolean isSequenceMatch(String sequence) {\n\t\tif (uniqueSequenceList.size() == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUniqueSequenceList u = uniqueSequenceList.get(0);\n\t\tString referenceSequence = u.getSeqResSequence();\n\t\tProteinSequence s1 = new ProteinSequence(referenceSequence);\n\t\tif (s1.getLength() == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tProteinSequence s2 = new ProteinSequence(sequence);\n\t\tif (s2.getLength() == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (referenceSequence.equals(sequence)) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tSmithWaterman3DParameters params = new SmithWaterman3DParameters();\n\t\tGapPenalty penalty = new SimpleGapPenalty();\n\t\tpenalty.setOpenPenalty(params.getGapOpen());\n\t\tpenalty.setExtensionPenalty(params.getGapExtend());\n\t\tSubstitutionMatrix<AminoAcidCompound> matrix = SubstitutionMatrixHelper.getBlosum65();\n\t\tPairwiseSequenceAligner<ProteinSequence, AminoAcidCompound> smithWaterman =\n\t\t\tAlignments.getPairwiseAligner(s1, s2, PairwiseSequenceAlignerType.LOCAL, penalty, matrix);\n\n\t\tSequencePair<ProteinSequence, AminoAcidCompound> pair = smithWaterman.getPair();\n//\t\tSystem.out.println(\"Len1: \" + referenceSequence.length() + \" - \" + s1.getLength());\n//\t\tSystem.out.println(\"Len2: \" + sequence.length() + \" - \" + s2.getLength());\n//\t\tSystem.out.println(\"Length: \" + pair.getLength() + \"idenities: \" + pair.getNumIdenticals());\n\t\tif (pair.getLength() == 0)\n\t\t\treturn false;\n\t\tdouble sequenceIdentity = (double)pair.getNumIdenticals()/pair.getLength();\n\t\tdouble alignmentLengthFraction = (double)pair.getLength()/Math.max(s1.getLength(), s2.getLength());\n//\t\tSystem.out.println(\"Ref seq. identity: \" + sequenceIdentity + \" fraction: \" + alignmentLengthFraction);\n\t\treturn sequenceIdentity >= parameters.getSequenceIdentityThreshold() && alignmentLengthFraction >= parameters.getAlignmentFractionThreshold();\n\t}", "protected void setValuesFromAlignment(final SAMRecord rec, final SAMRecord alignment) {\n for (final SAMRecord.SAMTagAndValue attr : alignment.getAttributes()) {\n // Copy over any non-reserved attributes.\n if (RESERVED_ATTRIBUTE_STARTS.indexOf(attr.tag.charAt(0)) == -1) {\n rec.setAttribute(attr.tag, attr.value);\n }\n }\n rec.setReadUnmappedFlag(alignment.getReadUnmappedFlag());\n rec.setReferenceIndex(alignment.getReferenceIndex());\n rec.setAlignmentStart(alignment.getAlignmentStart());\n rec.setReadNegativeStrandFlag(alignment.getReadNegativeStrandFlag());\n if (!alignment.getReadUnmappedFlag()) {\n // only aligned reads should have cigar and mapping quality set\n rec.setCigar(alignment.getCigar()); // cigar may change when a\n // clipCigar called below\n rec.setMappingQuality(alignment.getMappingQuality());\n }\n if (rec.getReadPairedFlag()) {\n rec.setProperPairFlag(alignment.getProperPairFlag());\n rec.setInferredInsertSize(alignment.getInferredInsertSize());\n rec.setMateUnmappedFlag(alignment.getMateUnmappedFlag());\n rec.setMateReferenceIndex(alignment.getMateReferenceIndex());\n rec.setMateAlignmentStart(alignment.getMateAlignmentStart());\n rec.setMateNegativeStrandFlag(alignment.getMateNegativeStrandFlag());\n }\n \n // If it's on the negative strand, reverse complement the bases\n // and reverse the order of the qualities\n if (rec.getReadNegativeStrandFlag()) {\n SAMRecordUtil.reverseComplement(rec);\n }\n \n if (clipAdapters && rec.getAttribute(ReservedTagConstants.XT) != null){\n CigarUtil.softClip3PrimeEndOfRead(rec, rec.getIntegerAttribute(ReservedTagConstants.XT));\n }\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n DBSequence dBSequence0 = new DBSequence((String) null, (DBSchema) null);\n String string0 = SQLUtil.typeAndName(dBSequence0);\n assertEquals(\"sequence null\", string0);\n }", "public void testExistingSeqWithChangedSrcCollapse() throws Exception\n {\n String sql = \"select _source_key from seq_source_assoc \" +\n \"where _assoc_key = -100\";\n String accid = \"T00313\";\n MSRawAttributes raw = new MSRawAttributes();\n raw.setOrganism(\"mouse, laboratory\");\n raw.setCellLine(\"C57MG\");\n Integer seqKey = new Integer(-200);\n msProcessor.processExistingSeqSrc(accid, seqKey, null, raw);\n ResultsNavigator nav = sqlMgr.executeQuery(sql);\n nav.next();\n RowReference row = nav.getRowReference();\n assertEquals(new Integer(-90), row.getInt(1));\n }", "@Override\n public boolean includeSequence(Sequence sequence) {\n return false;\n }", "public int getAlignment() {\r\n return Alignment;\r\n }", "public int getAlignment() {\r\n return Alignment;\r\n }", "public void defenceAlign() {\n\t\tdouble angle = angleToX();\n\t\tdouble angleSign = Math.signum(angle);\n\t\tdouble unsignedAngle = Math.abs(angle);\n\t\t\n\t\tdouble toRotate = angleSign * (90 - unsignedAngle);\n//\t\tSystem.out.printf(\"Rotate by: %f.2\\n\", toRotate);\n\t\tSystem.out.println(CommandQueue.commandQueue2D.size());\n\t\trotate(toRotate);\n\t}", "public void setAlignmentY(AlignY anAlignX) { }", "public String consensus_sequence () {\n return(current_contig.consensus.sequence.toString());\r\n }", "public String getAlign() {\n return align;\n }", "@Test\n public void testConstructorTransformations() {\n\n String t1 = \"A C G T A C G T A A A A\";\n Sequence seq1 = new Sequence(\"t1\", t1, five);\n assertTrue(s1.equals(seq1.sequence()));\n\n String t2 = \"acgtacgtaaaa\";\n Sequence seq2 = new Sequence(\"t2\", t2, five);\n assertTrue(s1.equals(seq2.sequence()));\n\n }", "AstroArg seq(AstroArg first,\n AstroArg second,\n AstroArg third,\n AstroArg fourth);", "public int getLength(){\n return sequence.length(); \n\t}", "protected void initQMark() {\n\t\tINF = calcMaxCapPlus1();\n\t\tmarkVertice(srcId, new Tuple4(NULL_DIRECTION, NO_PRED, INF, false));\n\t}", "@Override\r\n\tpublic int getAlignmentSize() {\r\n\t\treturn getSize();\r\n\t}", "public void setSequence(Integer sequence) {\n this.sequence = sequence;\n }", "private jalview.datamodel.Sequence[] getVamsasAlignment(\n vamsas.objects.simple.Alignment valign)\n {\n vamsas.objects.simple.Sequence[] seqs = valign.getSeqs().getSeqs();\n jalview.datamodel.Sequence[] msa = new jalview.datamodel.Sequence[seqs.length];\n\n for (int i = 0, j = seqs.length; i < j; i++)\n {\n msa[i] = new jalview.datamodel.Sequence(seqs[i].getId(),\n seqs[i].getSeq());\n }\n\n return msa;\n }", "int getAlignmentStart(String[] fields) throws NumberFormatException {\n int alignmentStart = Integer.parseInt(fields[3].trim()) - 1;\n return alignmentStart;\n }", "public String get_sequence() {\n return m_aa_sequence;\n }", "boolean hasAligning();", "public String getSequence()\r\n\t{\r\n\t\treturn sequence;\r\n\t}", "@Override\n public void align(@NonNull PbVnAlignment alignment) {\n boolean noAgentiveA0 = alignment.proposition().predicate().ancestors(true).stream()\n .allMatch(s -> s.roles().stream()\n .map(r -> ThematicRoleType.fromString(r.type()).orElse(ThematicRoleType.NONE))\n .noneMatch(ThematicRoleType::isAgentive));\n\n for (PropBankPhrase phrase : alignment.sourcePhrases(false)) {\n List<NounPhrase> unaligned = alignment.targetPhrases(false).stream()\n .filter(i -> i instanceof NounPhrase)\n .map(i -> ((NounPhrase) i))\n .collect(Collectors.toList());\n if (phrase.getNumber() == ArgNumber.A0) {\n // TODO: seems like a hack\n if (alignment.proposition().predicate().verbNetId().classId().startsWith(\"51\") && noAgentiveA0) {\n for (NounPhrase unalignedPhrase : unaligned) {\n if (unalignedPhrase.thematicRoleType() == ThematicRoleType.THEME) {\n alignment.add(phrase, unalignedPhrase);\n break;\n }\n }\n } else {\n for (NounPhrase unalignedPhrase : unaligned) {\n if (EnumSet.of(ThematicRoleType.AGENT, ThematicRoleType.CAUSER,\n ThematicRoleType.STIMULUS, ThematicRoleType.PIVOT)\n .contains(unalignedPhrase.thematicRoleType())) {\n alignment.add(phrase, unalignedPhrase);\n break;\n }\n }\n }\n } else if (phrase.getNumber() == ArgNumber.A1) {\n for (NounPhrase unalignedPhrase : unaligned) {\n if (unalignedPhrase.thematicRoleType() == ThematicRoleType.THEME\n || unalignedPhrase.thematicRoleType() == ThematicRoleType.PATIENT) {\n alignment.add(phrase, unalignedPhrase);\n break;\n }\n }\n } else if (phrase.getNumber() == ArgNumber.A3) {\n if (containsNumber(phrase)) {\n continue;\n }\n for (NounPhrase unalignedPhrase : unaligned) {\n if (unalignedPhrase.thematicRoleType().isStartingPoint()) {\n alignment.add(phrase, unalignedPhrase);\n break;\n }\n }\n } else if (phrase.getNumber() == ArgNumber.A4) {\n if (containsNumber(phrase)) {\n continue;\n }\n for (NounPhrase unalignedPhrase : unaligned) {\n if (unalignedPhrase.thematicRoleType().isEndingPoint()) {\n alignment.add(phrase, unalignedPhrase);\n break;\n }\n }\n }\n\n\n }\n }", "@Override\n\tpublic String getNextSequenceValue(String sequence) {\n\t\treturn \"\";\n\t}", "private static void translate(Sequence seq) {\n int frame;\n if(seq.getFrameWithLongestORF()==2){\n frame =0;\n }\n else if (seq.getFrameWithLongestORF()==0){\n //** TEst annomalies??? this frame produces the best aa\n frame = 0;\n }\n else if (seq.getFrameWithLongestORF()==1){\n frame = 2;\n }\n else if(seq.getFrameWithLongestORF()==3){\n frame = 0;\n compliment(seq);\n }\n else if(seq.getFrameWithLongestORF()==4){\n frame = 1;\n compliment(seq);\n }\n else{\n frame = 2;\n compliment(seq);\n }\n String temp = seq.getRawSeq();\n StringBuilder finalreturn = new StringBuilder();\n String codon;\n for (int i = frame; i < seq.getLength() - 2; i+=3) {\n codon = temp.substring(i, i+3);\n if(codon.contains(\"N\") || codon.contains(\"n\")){\n finalreturn.append(\"^\");\n }\n else {\n finalreturn.append(codonsMap.get(codon));\n }\n }\n seq.setTranslatedAA(finalreturn.toString());\n }", "TableSectionBuilder align(String align);", "public void setTextAlign(TEXT_ALIGN align);", "public String getQuerySequencesString() {\n \t\treturn null;\n \t}", "Sequence createSequence();", "public int getLength()\n {\n return seq.length;\n }", "public int getSeq() {\n return -1;\n }", "@Test\n \tpublic void testOverlapsWith()\n \t{\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 4, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 4, 0, 0)));\n \t\t\n \t\t// 1. [1,2] [2,4] => false\n \t\tAssert.assertFalse(PDL.new Alignment(\"\", \"\", 0.0, 1, 2, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 2, 4, 0, 0)));\n \t\t\n \t\t// 2. [1,3] [2,5] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 3, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 2, 5, 0, 0)));\n \t\t\n \t\t// 3. [1,5] [0,6] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 1, 5, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 0, 6, 0, 0)));\n \t\t\n \t\t// 4. [2,4] [1,2] => false\n \t\tAssert.assertFalse(PDL.new Alignment(\"\", \"\", 0.0, 2, 4, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 2, 0, 0)));\n \t\t\n \t\t// 5. [2,5] [1,3] => true\n \t\tAssert.assertTrue(PDL.new Alignment(\"\", \"\", 0.0, 2, 5, 0, 0)\n \t\t .overlapsWith(PDL.new Alignment(\"\", \"\", 0.0, 1, 3, 0, 0)));\n \t}", "public void setLayoutsequence(Long layoutsequence) {\n this.layoutsequence = layoutsequence;\n }", "public void setAnalyzerSequence(AnalyzerSequence analyzerSequence) {\n }", "public int getLength() {\r\n return this.seqLength;\r\n }", "public String getSequence() \n\t{\n\t\treturn sequence;\n\t\t\n\t}", "public Integer getSeq() {\n return seq;\n }", "public Integer getSeq() {\n return seq;\n }", "public Integer getSeq() {\n return seq;\n }", "long getSeq() {\n return seq;\n }", "public AlignX getAlignmentX() { return AlignX.Left; }", "public SequenceRegion sequencesBefore(Sequence sequence) {\n\tthrow new PasseException();\n/*\nudanax-top.st:15743:SequenceSpace methodsFor: 'smalltalk: passe'!\n{SequenceRegion} sequencesBefore: sequence {Sequence}\n\t\"Essential. All sequences less than or equal to the given sequence.\n\tShould this just be supplanted by CoordinateSpace::region ()?\"\n\t\n\tself passe.\n\t^SequenceRegion usingx: true\n\t\twith: (PrimSpec pointer arrayWith: (AfterSequence make: sequence))!\n*/\n}", "org.landxml.schema.landXML11.AlignmentNameRefs xgetAlignmentRefs();", "public void align( Alignment alignment, Properties param ) {\n\t\t// For the classes : no optmisation cartesian product !\n\t\tfor ( OWLEntity cl1 : ontology1.getClassesInSignature()){\n\t\t\tfor ( OWLEntity cl2: ontology2.getClassesInSignature() ){\n\t\t\t\tdouble confidence = match(cl1,cl2);\n\t\t\t\tif (confidence > 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\taddAlignCell(cl1.getIRI().toURI(),cl2.getIRI().toURI(),\"=\", confidence);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(e.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\tfor (OWLEntity cl1:getDataProperties(ontology1)){\n\t\t\tfor (OWLEntity cl2:getDataProperties(ontology2)){\n\t\t\t\tdouble confidence = match(cl1,cl2);\n\t\t\t\tif (confidence > 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\taddAlignCell(cl1.getIRI().toURI(),cl2.getIRI().toURI(),\"=\", confidence);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(e.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (OWLEntity cl1:getObjectProperties(ontology1)){\n\t\t\tfor (OWLEntity cl2:getObjectProperties(ontology2)){\n\t\t\t\tdouble confidence = match(cl1,cl2);\n\t\t\t\tif (confidence > 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\taddAlignCell(cl1.getIRI().toURI(),cl2.getIRI().toURI(),\"=\", confidence);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(e.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\n\n\n\n\n\n\n\t}", "public int getAlignment()\n {\n return bouquet.getAlignment();\n }", "@Test\n public void countNbrOfBoxAligneByAtBeginning(){\n int res = alignment.countNbrOfBoxAligneBy(player,2);\n assertEquals(\"EXpected 1 alignmenet\", 1, res);\n }", "@Override\n public boolean mayContainSequenceConstructor() {\n return true;\n }", "@Override\n public boolean mayContainSequenceConstructor() {\n return true;\n }", "public boolean mayContainSequenceConstructor() {\r\n return true;\r\n }", "public boolean mayContainSequenceConstructor() {\r\n return true;\r\n }", "private void presentShowcaseSequence() {\n }", "public boolean isPartOfAPairedAlignment(){\n\t\treturn testBitwiseFlag(1);\n\t}", "public String[] getStrAlign() {\n if (state) return new String[]{alignB, alignA};\n return new String[]{alignA, alignB};\n }", "@Override\n\tpublic String getNextSequenceValuesQuery(String sequence) {\n\t\treturn \"\";\n\t}" ]
[ "0.64603424", "0.6180176", "0.61798114", "0.5908184", "0.58335245", "0.5701966", "0.57003474", "0.56753737", "0.56728905", "0.5668732", "0.5600769", "0.5554887", "0.5554887", "0.5554887", "0.5540892", "0.5540892", "0.5540892", "0.5514078", "0.54986346", "0.54744333", "0.5445721", "0.5437884", "0.543005", "0.54234654", "0.54234654", "0.54234654", "0.54123616", "0.54079705", "0.54030097", "0.539993", "0.53928757", "0.5390736", "0.53822976", "0.5328705", "0.5326731", "0.5309045", "0.5294236", "0.52814204", "0.5276182", "0.52500623", "0.5239763", "0.52269113", "0.5216591", "0.5215091", "0.5205461", "0.5196927", "0.5189719", "0.5175044", "0.5157503", "0.5139555", "0.51284415", "0.5126907", "0.5126907", "0.5116471", "0.5089388", "0.50693756", "0.5061879", "0.50610393", "0.50606793", "0.50581175", "0.5038442", "0.50350416", "0.50293666", "0.5020305", "0.5012172", "0.50115883", "0.5010177", "0.49975693", "0.49971533", "0.49899524", "0.4986384", "0.4979202", "0.49784806", "0.49726588", "0.49676916", "0.49664542", "0.4965853", "0.49618566", "0.4949391", "0.4947942", "0.49443543", "0.49418563", "0.4939418", "0.4939418", "0.4939418", "0.49355263", "0.49327752", "0.49304974", "0.49284995", "0.4926432", "0.4921312", "0.49150842", "0.49149093", "0.49149093", "0.49113882", "0.49113882", "0.49101904", "0.49001247", "0.48848614", "0.48844704" ]
0.7346962
0
if( ori == 1 ) return new Color( 1.0f, 1.0f, 1.0f ); int i = contshort.tlist.indexOf(this); if( i == 0 || i == contshort.tlist.size()1 ) return Color.blue; else if( unresolvedGap() > 0 ) return Color.red;
public Color getBackFlankingGapColor() { return backgap ? Color.red : Color.lightGray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getColor();", "public int getColor();", "public int getRenderColor(int p_149741_1_)\n {\n \n \tBlock[] coloredStones = MachineryCraft.blocks.coloredStoneSlab;\n \n \tfor(int i = 0; i<coloredStones.length; i++){\n \t\tif(this == coloredStones[i]) return this.colors[i];\n \t\t\n \t}\n \treturn colors[1];\n \n }", "public Color getColorIndex(int index) {\r\n\t\tif(index >= q.size())\r\n\t\t\treturn Color.white;\r\n\r\n\t\treturn q.get(index).getColor();\r\n\t}", "String getColor();", "int getContactColor();", "@Override\r\n\tpublic Color backgroundColor() {\n\t\tProperty<IntegerPropertyType> colorDiff = this.getProperty(PROPERTY_NAME_COLOR_DIFFERENCE);\r\n\t\tColor c = labs[colorDiff.getValue().intValue() % labs.length].getColor();\r\n\t\t\r\n\t\treturn c;\r\n\t}", "public Color getColor(int anIndex)\n{\n if(anIndex<_colors.length) return _colors[anIndex];\n return COLORS[(anIndex - _colors.length)%COLORS.length];\n}", "public abstract BossColor getColor();", "public void setShortBgColors(weatherData tmp, int i, int j) {\n\t\t\tswitch(tmp.getCondit()) {\n\t\t\t\tcase \"sky is clear \":\n\t\t\t\tcase \"clear sky \":\n\t\t\t\tcase \"Sky is Clear \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(255, 215,0);\n\t\t\t\t\t\t\tshortColors[j] = new Color(255, 111, 0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"few clouds \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(160, 255, 0);\n\t\t\t\t\t\t\tshortColors[j] = new Color(9, 173, 33);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"scattered clouds \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(30, 255, 90);\n\t\t\t\t\t\t\tshortColors[j] = new Color(45, 110, 35);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"broken clouds \":\n\t\t\t\tcase \"overcast clouds \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(30, 255, 150);\n\t\t\t\t\t\t\tshortColors[j] = new Color(40, 150, 130);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"shower rain \":\n\t\t\t\tcase \"light intensity drizzle \":\n\t\t\t\tcase \"drizzle \":\n\t\t\t\tcase \"heavy intensity drizzle \":\n\t\t\t\tcase \"light intensity drizzle rain \":\n\t\t\t\tcase \"drizzle rain \":\n\t\t\t\tcase \"heavy intensity drizzle rain \":\n\t\t\t\tcase \"shower rain and drizzle \":\n\t\t\t\tcase \"heavy shower rain and drizzle \":\n\t\t\t\tcase \"shower drizzle \":\n\t\t\t\tcase \"light intensity shower rain \":\n\t\t\t\tcase \"heavy intensity shower rain \":\n\t\t\t\tcase \"ragged shower rain \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(0,255,255);\n\t\t\t\t\t\t\tshortColors[j] = new Color(30, 130, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"rain \":\n\t\t\t\tcase \"light rain \":\n\t\t\t\tcase \"moderate rain \":\n\t\t\t\tcase \"heavy intensity rain \":\n\t\t\t\tcase \"very heavy rain \":\n\t\t\t\tcase \"extreme rain \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(0, 166, 255);\n\t\t\t\t\t\t\tshortColors[j] = new Color(30, 50, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"thunderstorm \":\n\t\t\t\tcase \"thunderstorm with light rain \":\n\t\t\t\tcase \"thunderstorm with rain \":\n\t\t\t\tcase \"thunderstorm with heavy rain \":\n\t\t\t\tcase \"light thunderstorm \":\n\t\t\t\tcase \"heavy thunderstorm \":\n\t\t\t\tcase \"ragged thunderstorm \":\n\t\t\t\tcase \"thunderstorm with light drizzle \":\n\t\t\t\tcase \"thunderstorm with drizzle \":\n\t\t\t\tcase \"thunderstorm with heavy drizzle \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(0, 95, 255);\n\t\t\t\t\t\t\tshortColors[j] = new Color(60, 30, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"snow \":\n\t\t\t\tcase \"freezing rain \":\n\t\t\t\tcase \"light snow \":\n\t\t\t\tcase \"heavy snow \":\n\t\t\t\tcase \"sleet \":\n\t\t\t\tcase \"shower sleet \":\n\t\t\t\tcase \"light rain and snow \":\n\t\t\t\tcase \"rain and snow \":\n\t\t\t\tcase \"light shower snow \":\n\t\t\t\tcase \"shower snow \":\n\t\t\t\tcase \"heavy shower snow \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(145, 245, 245);\n\t\t\t\t\t\t\tshortColors[j] = new Color(75, 150, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"mist \":\n\t\t\t\tcase \"smoke \":\n\t\t\t\tcase \"haze \":\n\t\t\t\tcase \"sand, dust whirls \":\n\t\t\t\tcase \"fog \":\n\t\t\t\tcase \"sand \":\n\t\t\t\tcase \"dust \":\n\t\t\t\tcase \"volcanic ash \":\n\t\t\t\tcase \"squalls \":\n\t\t\t\tcase \"tornado \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(200, 210, 210);\n\t\t\t\t\t\t\tshortColors[j] = new Color(85, 110, 100);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t\t\tshortColors[i] = new Color(160, 120, 240);\n\t\t\t\t\t\t\tshortColors[j] = new Color(40, 10, 90);\n\t\t\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "int getColour();", "public Color recupColor(int nb){\r\n\t\tColor color;\r\n\t\tif(nb == 1){\r\n\t\t\tcolor = Config.colorJ1;\r\n\t\t}\r\n\t\telse if(nb == 2){\r\n\t\t\tcolor = Config.colorJ2;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcolor =\tConfig.colorVide;\r\n\t\t}\r\n\t\treturn color;\r\n\t}", "public GlyphColor GetGlythColor(GlyphPos pos)\n {\n GlyphColor color = GlyphColor.NONE;\n // TODO LIST, add logic here to termine the color\n switch(pos) {\n case DOOR_NEAR:\n //TODO: read the hue of the color sensor on the door, and check the value.\n break;\n case DOOR_FAR:\n //TODO: read the hue of the color sensor on the door, and check the value.\n break;\n default:\n break;\n }\n return color;\n }", "@Override\n\tpublic String getColor() {\n\t\treturn \"blue\";\n\t}", "@Override\n public Color getColor() {\n return Utils.Pion.BLANC.getCouleur();\n }", "public int getColor() {\n \t\treturn color;\n \t}", "public char getColor();", "public int getColor(){\r\n\t\treturn color;\r\n\t}", "Color get(int index);", "public Color getHighlight();", "int getHighLightColor();", "private Colors ingameColor() {\n\t\tList<Colors> colors = new ArrayList<Colors>();\n\t\tIterator<Sphere> it = this.spheres.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tSphere s = it.next();\n\t\t\tif (!colors.contains(s.color())) {\n\t\t\t\tcolors.add(s.color());\n\t\t\t}\n\t\t}\n\t\treturn colors.get(MathUtils.random(colors.size() - 1));\n\t}", "public void initColors() {\n\n int i;\n float j;\n\n int start;\n int numShades = 5;\n float shadeInc = 1 / (float) numShades;\n\n\n aColors = new Color[glb.MAXCOLORS]; /* set array size */\n\n\n /* White to Black */\n start = 0;\n for (i = start, j = 1; i < start + 6; j -= shadeInc, i++) {\n aColors[i] = new Color(j, j, j);\n }\n\n start = 6;\n /* Red to almost Magenta */\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 1, (float) 0, j);\n }\n\n\n /* Magenta to almost Blue */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color(j, (float) 0, (float) 1);\n }\n\n\n /* Blue to almost Cyan */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 0, j, (float) 1);\n }\n\n /* Cyan to almost Green */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 0, (float) 1, j);\n }\n\n\n\n /* Green to almost Yellow */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color(j, (float) 1, (float) 0);\n }\n\n /* Yellow to almost Red */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 1, j, (float) 0);\n }\n\n }", "public String getColor() { \n return color; \n }", "abstract String getColor();", "private static String getColorString(int index) {\n switch (index) {\n case 0: return \"None\";\n case 1: case 6: return \"Orange\";\n case 2: case 7: return \"Green\";\n case 3: return \"Blue\";\n case 4: case 14: return \"Yellow\";\n case 8: return \"Black\";\n default: return \"not a color\";\n }\n }", "public String getColorString();", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "@Override\n\t\tpublic Color color() { return color; }", "@Override\n public Color getColor() {\n return color;\n }", "@Override\n\tpublic String getColor() {\n\t\treturn \"red\";\n\t}", "public Color getColor() { return color; }", "public static void setColor(ArrayList<LaverieButton> L){\n int n = LABEL.size();\n for (int i=0; i<n; i++){\n switch (LABEL.get(i)){\n case \"empty\":\n L.get(i).setBackgroundColor(Color.GREEN);\n break;\n case \"full\":\n L.get(i).setBackgroundColor(Color.RED);\n break;\n case \"reserved\":\n L.get(i).setBackgroundColor(Color.GRAY);\n break;\n }\n }\n }", "private Color couleurOfficiel( int numeroDeCouleur) {\n\t\tif(numeroDeCouleur ==1) {\n\n\t\t\treturn new Color(230,57,70);\n\t\t}\n\n\t\tif(numeroDeCouleur ==2) {\n\n\t\t\treturn new Color(241,250,238);\n\t\t}\n\t\tif(numeroDeCouleur ==3) {\n\n\t\t\treturn new Color(168,218,220);\n\t\t}\n\t\tif(numeroDeCouleur ==4) {\n\n\t\t\treturn new Color(168,218,220);\n\t\t}\n\t\telse {\n\t\t\treturn new Color(29,53,87);\n\t\t}\n\n\t}", "abstract public String getColor();", "abstract public String getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "public PDColor getInteriorColor() {\n/* 435 */ return getColor(COSName.IC);\n/* */ }", "public String getColor() {\n\t\treturn null;\n\t}", "public Color getColor()\n {\n return color;\n }", "Integer getTxtColor();", "public Color getColor();", "public Color getColor();", "public Color getColor();", "public Color getColor()\r\n {\r\n return currentColor;\r\n }", "public boolean isRed()\n {\n // TODO: replace this line with your code\n }", "public int getColor() {\n return color;\n }", "String getColour();", "public GameColor getColor();", "public Color getColor()\n { \n return color;\n }", "private PrinterLabel highlightMatch(PrinterLabel label, Printer printer) {\n\t\t/* Matches array Index Reference:\n\t\t * \n\t\t * 0 = Tension\n\t\t * 1 = Compression\n\t\t * 2 = Impact\n\t\t * 3 = vendor\n\t\t * 4 = Range of Mats.\n\t\t * 5 = Tolerance\n\t\t * 6 = Finish\n\t\t */\n\t\tif(printer.getMatches()[0] > 0)\n\t\t{\n\t\t\tlabel.getTension().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[1] > 0)\n\t\t{\n\t\t\tlabel.getCompression().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[2] > 0)\n\t\t{\n\t\t\tlabel.getImpact().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[3] > 0)\n\t\t{\n\t\t\tlabel.getVendor().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[4] > 0)\n\t\t{\n\t\t\tlabel.getMaterials().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[5] > 0)\n\t\t{\n\t\t\tlabel.getTolerance().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[6] > 0)\n\t\t{\n\t\t\tlabel.getFinish().setForeground(highlight);\n\t\t}\n\t\treturn label;\n\t}", "@Override\r\n\tpublic String getColor() {\n\t\treturn \"white\";\r\n\t}", "public Color getFrontFlankingGapColor() {\n\t\treturn frontgap ? Color.red : Color.lightGray;\n\t}", "public int getPrimaryColor(int i) {\n return primary[i];\n }", "private String getNextColor(){\n\t\tif(currentIndex < MAX_COLORS){\n\t\t\tcurrentIndex++;\n\t\t\treturn colors[currentIndex - 1];\n\t\t}\n\t\treturn null;\n\t}", "PRColor occupiedBy() {\n return c;\n }", "public String getColor(){\n return this.color;\n }", "private int getCurrentMainColor () {\n int translatedHue = 255 - ( int ) ( mCurrentHue * 255 / 360 );\n int index = 0;\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255, 0, ( int ) i );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255 - ( int ) i, 0, 255 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 0, ( int ) i, 255 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 0, 255, 255 - ( int ) i );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( ( int ) i, 255, 0 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255, 255 - ( int ) i, 0 );\n index++;\n }\n return Color.RED;\n }", "@SideOnly(Side.CLIENT)\n @Override\n public int getRenderColor(int metadata)\n {\n return 0xFFFFFF;\n }", "public RMColor getColor() { return getFill()==null? RMColor.black : getFill().getColor(); }", "@Override\n Color getColor() {\n return new Color(32, 83, 226, 255);\n }", "@Override\r\n\tpublic void howToColor() {\n\t\t\r\n\t}", "public void setLongBgColors(weatherData tmp, int i, int j) {\n\t\t\tswitch(tmp.getCondit()) {\n\t\t\t\tcase \"sky is clear \":\n\t\t\t\tcase \"clear sky \":\n\t\t\t\tcase \"Sky is Clear \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(255, 215,0);\n\t\t\t\t\t\t\tlongColors[j] = new Color(255, 111, 0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"few clouds \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(160, 255, 0);\n\t\t\t\t\t\t\tlongColors[j] = new Color(9, 173, 33);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"scattered clouds \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(30, 255, 90);\n\t\t\t\t\t\t\tlongColors[j] = new Color(45, 110, 35);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"broken clouds \":\n\t\t\t\tcase \"overcast clouds \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(30, 255, 150);\n\t\t\t\t\t\t\tlongColors[j] = new Color(40, 150, 130);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"shower rain \":\n\t\t\t\tcase \"light intensity drizzle \":\n\t\t\t\tcase \"drizzle \":\n\t\t\t\tcase \"heavy intensity drizzle \":\n\t\t\t\tcase \"light intensity drizzle rain \":\n\t\t\t\tcase \"drizzle rain \":\n\t\t\t\tcase \"heavy intensity drizzle rain \":\n\t\t\t\tcase \"shower rain and drizzle \":\n\t\t\t\tcase \"heavy shower rain and drizzle \":\n\t\t\t\tcase \"shower drizzle \":\n\t\t\t\tcase \"light intensity shower rain \":\n\t\t\t\tcase \"heavy intensity shower rain \":\n\t\t\t\tcase \"ragged shower rain \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(0,255,255);\n\t\t\t\t\t\t\tlongColors[j] = new Color(30, 130, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"rain \":\n\t\t\t\tcase \"light rain \":\n\t\t\t\tcase \"moderate rain \":\n\t\t\t\tcase \"heavy intensity rain \":\n\t\t\t\tcase \"very heavy rain \":\n\t\t\t\tcase \"extreme rain \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(0, 166, 255);\n\t\t\t\t\t\t\tlongColors[j] = new Color(30, 50, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"thunderstorm \":\n\t\t\t\tcase \"thunderstorm with light rain \":\n\t\t\t\tcase \"thunderstorm with rain \":\n\t\t\t\tcase \"thunderstorm with heavy rain \":\n\t\t\t\tcase \"light thunderstorm \":\n\t\t\t\tcase \"heavy thunderstorm \":\n\t\t\t\tcase \"ragged thunderstorm \":\n\t\t\t\tcase \"thunderstorm with light drizzle \":\n\t\t\t\tcase \"thunderstorm with drizzle \":\n\t\t\t\tcase \"thunderstorm with heavy drizzle \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(0, 95, 255);\n\t\t\t\t\t\t\tlongColors[j] = new Color(60, 30, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"snow \":\n\t\t\t\tcase \"freezing rain \":\n\t\t\t\tcase \"light snow \":\n\t\t\t\tcase \"heavy snow \":\n\t\t\t\tcase \"sleet \":\n\t\t\t\tcase \"shower sleet \":\n\t\t\t\tcase \"light rain and snow \":\n\t\t\t\tcase \"rain and snow \":\n\t\t\t\tcase \"light shower snow \":\n\t\t\t\tcase \"shower snow \":\n\t\t\t\tcase \"heavy shower snow \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(145, 245, 245);\n\t\t\t\t\t\t\tlongColors[j] = new Color(75, 150, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"mist \":\n\t\t\t\tcase \"smoke \":\n\t\t\t\tcase \"haze \":\n\t\t\t\tcase \"sand, dust whirls \":\n\t\t\t\tcase \"fog \":\n\t\t\t\tcase \"sand \":\n\t\t\t\tcase \"dust \":\n\t\t\t\tcase \"volcanic ash \":\n\t\t\t\tcase \"squalls \":\n\t\t\t\tcase \"tornado \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(200, 210, 210);\n\t\t\t\t\t\t\tlongColors[j] = new Color(85, 110, 100);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t\t\tlongColors[i] = new Color(160, 120, 240);\n\t\t\t\t\t\t\tlongColors[j] = new Color(40, 10, 90);\n\t\t\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public String getColor(){\r\n return color;\r\n }", "public static Color getColorSuccess() {\n return Color.white;\n }", "public void Color() {\n\t\t\r\n\t}", "public boolean isGreen()\n {\n // TODO: replace this line with your code\n }", "@Override\n public Color getColor() {\n\n if(clicked)\n {\n return Color.BLUE;\n }\n\n if(energy < 0.1*maxEnergy)\n {\n return Color.LINEN;\n }\n else if (energy < 0.2*maxEnergy)\n {\n return Color.MISTYROSE;\n }\n else if(energy < 0.3*maxEnergy)\n {\n return Color.LIGHTPINK;\n }\n else if(energy < 0.4*maxEnergy)\n {\n return Color.PINK;\n }\n else if (energy < 0.5*maxEnergy)\n {\n return Color.LIGHTCORAL;\n }\n else if (energy < 0.6*maxEnergy)\n {\n return Color.RED;\n }\n else if (energy < 0.7*maxEnergy)\n {\n return Color.FIREBRICK;\n }\n else if (energy < 0.8*maxEnergy)\n {\n return Color.DARKRED;\n }\n else if (energy < 0.9*maxEnergy)\n {\n return Color.MAROON;\n }\n return Color.BLACK;\n }", "public Color getBackgroundColor()\n {\n return sfondocolore;\n }", "boolean similarColorTo(Card c);", "private void lineColor() {\n\n\t}", "public void changeWildRouteColor() {\n if (mCardsList.get(0))\n mSelectedRoute.setColor(\"red\");\n else if (mCardsList.get(1))\n mSelectedRoute.setColor(\"blue\");\n else if (mCardsList.get(2))\n mSelectedRoute.setColor(\"yellow\");\n else if (mCardsList.get(3))\n mSelectedRoute.setColor(\"green\");\n else if (mCardsList.get(4))\n mSelectedRoute.setColor(\"black\");\n else if (mCardsList.get(5))\n mSelectedRoute.setColor(\"orange\");\n else if (mCardsList.get(6))\n mSelectedRoute.setColor(\"purple\");\n else if (mCardsList.get(7))\n mSelectedRoute.setColor(\"white\");\n }", "public static Color getColor() { return lblColor.getBackground(); }", "@Override\r\n public Llama.Color getColor() {\r\n return color;\r\n }", "public short getColor() {\n\t\treturn this.color;\n\t}", "public String keyColor(int i){\r\n if(this.down.contains(this.draw.get(i)))\r\n return \"red\";\r\n return \"black\";\r\n }", "private Color generateColor() {\r\n\t\tint length = nameColor.size();\r\n\t\tif(length == 0) return colorArray[0];\r\n\t\t\r\n\t\tColor lastColor = nameColor.get(length-1);\r\n\t\tint lastColorIndex = 0;\r\n\t\tfor(int i = 0; i<colorArray.length; i++) {\r\n\t\t\tif(lastColor == colorArray[i]) {\r\n\t\t\t\tlastColorIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tColor curColor = colorArray[(lastColorIndex+1)%3];\r\n\t\treturn curColor;\r\n\t}", "private ColorMixerModel.ColorItem selectedColor(Point p){\n for(ColorMixerModel.ColorItem c: cmModel.colorSet){\n if(p.distance(c.getPos()) < c.getR()){\n return c;\n }\n }\n return null;\n }", "public Color get_color() {return this.color;}", "public int getSecondaryColor(int i) {\n return secondary[i];\n }", "public int getColorIndex() {\n return colorIndex;\n }", "public ColorStateList mo27006f() {\n TextView textView = this.f24573m;\n if (textView != null) {\n return textView.getTextColors();\n }\n return null;\n }", "@Override\n\tprotected char getColor(int position) {\n\t\treturn color;\n\t}", "protected Color preferredColor()\r\n {\r\n if (isMoving())\r\n return Color.green;\r\n else\r\n return new Color(0, 100, 0);\r\n }", "public Color getLineColor();", "public int[] getColorIndexPointer()\n\t {\n\t \t return null;\n\t \t }", "private void colorizeCore() {\n\n\t\tfor (Class c : this.core) {\n\n\t\t\tint color = 0;\n\t\t\tboolean colored = false;\n\n\t\t\t// Get conflict graph\n\t\t\tHashSet<Class> relatedTo = c.getRelatedTo();\n\t\t\tif (this.conflictGraph.containsKey(c)) {\n\t\t\t\tfor (Class rel : this.conflictGraph.get(c)) {\n\t\t\t\t\trelatedTo.add(rel);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Lookup for a free color\n\t\t\twhile (!colored) {\n\n\t\t\t\tboolean colorBusy = false;\n\t\t\t\tfor (Class rel : relatedTo) {\n\t\t\t\t\tif (rel.getColor() != null && rel.getColor() == color)\n\t\t\t\t\t\tcolorBusy = true;\n\t\t\t\t}\n\n\t\t\t\tif (!colorBusy) {\n\t\t\t\t\tc.setColor(color);\n\t\t\t\t\tcolored = true;\n\t\t\t\t} else {\n\t\t\t\t\tcolor++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcomputeAdaptations(c);\n\t\t}\n\t}", "boolean getNoColor();", "public Color getColor() { return color.get(); }", "public Color color() {\n return null;\n }", "@Override\n public String getColor() {\n return this.color;\n }", "public String getColor(){\n return this._color;\n }", "int getRed(int x, int y);", "public int getColor() {\n return this.color;\n }", "public int getColor(ItemStack par1ItemStack)\n {\n \n NBTTagCompound nbttagcompound = par1ItemStack.getTagCompound();\n\n if (nbttagcompound == null)\n {\n return 4984077;\n }\n else\n {\n NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag(\"display\");\n return nbttagcompound1 == null ? 4984077 : (nbttagcompound1.hasKey(\"color\") ? nbttagcompound1.getInteger(\"color\") : 4984077);\n }\n \n }" ]
[ "0.6212231", "0.6212231", "0.60384053", "0.5919615", "0.5892464", "0.58370095", "0.5831902", "0.58234894", "0.5793363", "0.57710415", "0.57375294", "0.5719992", "0.5675713", "0.565664", "0.5634139", "0.56336814", "0.5619134", "0.561635", "0.56056654", "0.56044513", "0.5601916", "0.55942464", "0.5588443", "0.5586545", "0.5579998", "0.55789053", "0.5578683", "0.5560826", "0.5560826", "0.5560207", "0.5540058", "0.55381316", "0.55324644", "0.5526897", "0.55241627", "0.5523455", "0.5523455", "0.5518445", "0.5518445", "0.5518445", "0.5518445", "0.5518445", "0.5515691", "0.5512418", "0.55108356", "0.5505683", "0.5501238", "0.5501238", "0.5501238", "0.5498266", "0.54926425", "0.54903936", "0.5483853", "0.5479872", "0.5475779", "0.5461631", "0.5450891", "0.54503363", "0.54487723", "0.5444884", "0.5444624", "0.54364794", "0.5436027", "0.5435224", "0.543289", "0.5432235", "0.542231", "0.54163015", "0.541535", "0.54141754", "0.54114455", "0.5408774", "0.5396266", "0.53885645", "0.538689", "0.53835934", "0.5379394", "0.53775656", "0.5365205", "0.53602856", "0.5359695", "0.5353286", "0.53523207", "0.535221", "0.5350013", "0.5344461", "0.5344066", "0.5342243", "0.5339584", "0.53373396", "0.53360933", "0.5334885", "0.5331065", "0.53307426", "0.5322376", "0.53188974", "0.531778", "0.5309056", "0.53030837", "0.53015834" ]
0.53048575
98
if( ori == 1 ) return new Color( 1.0f, 1.0f, 1.0f ); int i = contshort.tlist.indexOf(this); if( i == 0 || i == contshort.tlist.size()1 ) return Color.blue; else if( unresolvedGap() > 0 ) return Color.red;
public Color getFrontFlankingGapColor() { return frontgap ? Color.red : Color.lightGray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getColor();", "public int getColor();", "public int getRenderColor(int p_149741_1_)\n {\n \n \tBlock[] coloredStones = MachineryCraft.blocks.coloredStoneSlab;\n \n \tfor(int i = 0; i<coloredStones.length; i++){\n \t\tif(this == coloredStones[i]) return this.colors[i];\n \t\t\n \t}\n \treturn colors[1];\n \n }", "public Color getColorIndex(int index) {\r\n\t\tif(index >= q.size())\r\n\t\t\treturn Color.white;\r\n\r\n\t\treturn q.get(index).getColor();\r\n\t}", "String getColor();", "int getContactColor();", "@Override\r\n\tpublic Color backgroundColor() {\n\t\tProperty<IntegerPropertyType> colorDiff = this.getProperty(PROPERTY_NAME_COLOR_DIFFERENCE);\r\n\t\tColor c = labs[colorDiff.getValue().intValue() % labs.length].getColor();\r\n\t\t\r\n\t\treturn c;\r\n\t}", "public Color getColor(int anIndex)\n{\n if(anIndex<_colors.length) return _colors[anIndex];\n return COLORS[(anIndex - _colors.length)%COLORS.length];\n}", "public abstract BossColor getColor();", "public void setShortBgColors(weatherData tmp, int i, int j) {\n\t\t\tswitch(tmp.getCondit()) {\n\t\t\t\tcase \"sky is clear \":\n\t\t\t\tcase \"clear sky \":\n\t\t\t\tcase \"Sky is Clear \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(255, 215,0);\n\t\t\t\t\t\t\tshortColors[j] = new Color(255, 111, 0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"few clouds \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(160, 255, 0);\n\t\t\t\t\t\t\tshortColors[j] = new Color(9, 173, 33);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"scattered clouds \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(30, 255, 90);\n\t\t\t\t\t\t\tshortColors[j] = new Color(45, 110, 35);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"broken clouds \":\n\t\t\t\tcase \"overcast clouds \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(30, 255, 150);\n\t\t\t\t\t\t\tshortColors[j] = new Color(40, 150, 130);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"shower rain \":\n\t\t\t\tcase \"light intensity drizzle \":\n\t\t\t\tcase \"drizzle \":\n\t\t\t\tcase \"heavy intensity drizzle \":\n\t\t\t\tcase \"light intensity drizzle rain \":\n\t\t\t\tcase \"drizzle rain \":\n\t\t\t\tcase \"heavy intensity drizzle rain \":\n\t\t\t\tcase \"shower rain and drizzle \":\n\t\t\t\tcase \"heavy shower rain and drizzle \":\n\t\t\t\tcase \"shower drizzle \":\n\t\t\t\tcase \"light intensity shower rain \":\n\t\t\t\tcase \"heavy intensity shower rain \":\n\t\t\t\tcase \"ragged shower rain \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(0,255,255);\n\t\t\t\t\t\t\tshortColors[j] = new Color(30, 130, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"rain \":\n\t\t\t\tcase \"light rain \":\n\t\t\t\tcase \"moderate rain \":\n\t\t\t\tcase \"heavy intensity rain \":\n\t\t\t\tcase \"very heavy rain \":\n\t\t\t\tcase \"extreme rain \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(0, 166, 255);\n\t\t\t\t\t\t\tshortColors[j] = new Color(30, 50, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"thunderstorm \":\n\t\t\t\tcase \"thunderstorm with light rain \":\n\t\t\t\tcase \"thunderstorm with rain \":\n\t\t\t\tcase \"thunderstorm with heavy rain \":\n\t\t\t\tcase \"light thunderstorm \":\n\t\t\t\tcase \"heavy thunderstorm \":\n\t\t\t\tcase \"ragged thunderstorm \":\n\t\t\t\tcase \"thunderstorm with light drizzle \":\n\t\t\t\tcase \"thunderstorm with drizzle \":\n\t\t\t\tcase \"thunderstorm with heavy drizzle \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(0, 95, 255);\n\t\t\t\t\t\t\tshortColors[j] = new Color(60, 30, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"snow \":\n\t\t\t\tcase \"freezing rain \":\n\t\t\t\tcase \"light snow \":\n\t\t\t\tcase \"heavy snow \":\n\t\t\t\tcase \"sleet \":\n\t\t\t\tcase \"shower sleet \":\n\t\t\t\tcase \"light rain and snow \":\n\t\t\t\tcase \"rain and snow \":\n\t\t\t\tcase \"light shower snow \":\n\t\t\t\tcase \"shower snow \":\n\t\t\t\tcase \"heavy shower snow \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(145, 245, 245);\n\t\t\t\t\t\t\tshortColors[j] = new Color(75, 150, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"mist \":\n\t\t\t\tcase \"smoke \":\n\t\t\t\tcase \"haze \":\n\t\t\t\tcase \"sand, dust whirls \":\n\t\t\t\tcase \"fog \":\n\t\t\t\tcase \"sand \":\n\t\t\t\tcase \"dust \":\n\t\t\t\tcase \"volcanic ash \":\n\t\t\t\tcase \"squalls \":\n\t\t\t\tcase \"tornado \":\n\t\t\t\t\t\t\tshortColors[i] = new Color(200, 210, 210);\n\t\t\t\t\t\t\tshortColors[j] = new Color(85, 110, 100);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t\t\tshortColors[i] = new Color(160, 120, 240);\n\t\t\t\t\t\t\tshortColors[j] = new Color(40, 10, 90);\n\t\t\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "int getColour();", "public Color recupColor(int nb){\r\n\t\tColor color;\r\n\t\tif(nb == 1){\r\n\t\t\tcolor = Config.colorJ1;\r\n\t\t}\r\n\t\telse if(nb == 2){\r\n\t\t\tcolor = Config.colorJ2;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcolor =\tConfig.colorVide;\r\n\t\t}\r\n\t\treturn color;\r\n\t}", "public GlyphColor GetGlythColor(GlyphPos pos)\n {\n GlyphColor color = GlyphColor.NONE;\n // TODO LIST, add logic here to termine the color\n switch(pos) {\n case DOOR_NEAR:\n //TODO: read the hue of the color sensor on the door, and check the value.\n break;\n case DOOR_FAR:\n //TODO: read the hue of the color sensor on the door, and check the value.\n break;\n default:\n break;\n }\n return color;\n }", "@Override\n\tpublic String getColor() {\n\t\treturn \"blue\";\n\t}", "@Override\n public Color getColor() {\n return Utils.Pion.BLANC.getCouleur();\n }", "public int getColor() {\n \t\treturn color;\n \t}", "public char getColor();", "public int getColor(){\r\n\t\treturn color;\r\n\t}", "Color get(int index);", "public Color getHighlight();", "int getHighLightColor();", "private Colors ingameColor() {\n\t\tList<Colors> colors = new ArrayList<Colors>();\n\t\tIterator<Sphere> it = this.spheres.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tSphere s = it.next();\n\t\t\tif (!colors.contains(s.color())) {\n\t\t\t\tcolors.add(s.color());\n\t\t\t}\n\t\t}\n\t\treturn colors.get(MathUtils.random(colors.size() - 1));\n\t}", "public void initColors() {\n\n int i;\n float j;\n\n int start;\n int numShades = 5;\n float shadeInc = 1 / (float) numShades;\n\n\n aColors = new Color[glb.MAXCOLORS]; /* set array size */\n\n\n /* White to Black */\n start = 0;\n for (i = start, j = 1; i < start + 6; j -= shadeInc, i++) {\n aColors[i] = new Color(j, j, j);\n }\n\n start = 6;\n /* Red to almost Magenta */\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 1, (float) 0, j);\n }\n\n\n /* Magenta to almost Blue */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color(j, (float) 0, (float) 1);\n }\n\n\n /* Blue to almost Cyan */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 0, j, (float) 1);\n }\n\n /* Cyan to almost Green */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 0, (float) 1, j);\n }\n\n\n\n /* Green to almost Yellow */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color(j, (float) 1, (float) 0);\n }\n\n /* Yellow to almost Red */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 1, j, (float) 0);\n }\n\n }", "public String getColor() { \n return color; \n }", "abstract String getColor();", "public String getColorString();", "private static String getColorString(int index) {\n switch (index) {\n case 0: return \"None\";\n case 1: case 6: return \"Orange\";\n case 2: case 7: return \"Green\";\n case 3: return \"Blue\";\n case 4: case 14: return \"Yellow\";\n case 8: return \"Black\";\n default: return \"not a color\";\n }\n }", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "@Override\n\t\tpublic Color color() { return color; }", "@Override\n public Color getColor() {\n return color;\n }", "@Override\n\tpublic String getColor() {\n\t\treturn \"red\";\n\t}", "public Color getColor() { return color; }", "public static void setColor(ArrayList<LaverieButton> L){\n int n = LABEL.size();\n for (int i=0; i<n; i++){\n switch (LABEL.get(i)){\n case \"empty\":\n L.get(i).setBackgroundColor(Color.GREEN);\n break;\n case \"full\":\n L.get(i).setBackgroundColor(Color.RED);\n break;\n case \"reserved\":\n L.get(i).setBackgroundColor(Color.GRAY);\n break;\n }\n }\n }", "private Color couleurOfficiel( int numeroDeCouleur) {\n\t\tif(numeroDeCouleur ==1) {\n\n\t\t\treturn new Color(230,57,70);\n\t\t}\n\n\t\tif(numeroDeCouleur ==2) {\n\n\t\t\treturn new Color(241,250,238);\n\t\t}\n\t\tif(numeroDeCouleur ==3) {\n\n\t\t\treturn new Color(168,218,220);\n\t\t}\n\t\tif(numeroDeCouleur ==4) {\n\n\t\t\treturn new Color(168,218,220);\n\t\t}\n\t\telse {\n\t\t\treturn new Color(29,53,87);\n\t\t}\n\n\t}", "abstract public String getColor();", "abstract public String getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "public PDColor getInteriorColor() {\n/* 435 */ return getColor(COSName.IC);\n/* */ }", "public String getColor() {\n\t\treturn null;\n\t}", "public Color getColor()\n {\n return color;\n }", "Integer getTxtColor();", "public Color getColor();", "public Color getColor();", "public Color getColor();", "public Color getColor()\r\n {\r\n return currentColor;\r\n }", "public boolean isRed()\n {\n // TODO: replace this line with your code\n }", "public int getColor() {\n return color;\n }", "String getColour();", "public GameColor getColor();", "public Color getColor()\n { \n return color;\n }", "private PrinterLabel highlightMatch(PrinterLabel label, Printer printer) {\n\t\t/* Matches array Index Reference:\n\t\t * \n\t\t * 0 = Tension\n\t\t * 1 = Compression\n\t\t * 2 = Impact\n\t\t * 3 = vendor\n\t\t * 4 = Range of Mats.\n\t\t * 5 = Tolerance\n\t\t * 6 = Finish\n\t\t */\n\t\tif(printer.getMatches()[0] > 0)\n\t\t{\n\t\t\tlabel.getTension().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[1] > 0)\n\t\t{\n\t\t\tlabel.getCompression().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[2] > 0)\n\t\t{\n\t\t\tlabel.getImpact().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[3] > 0)\n\t\t{\n\t\t\tlabel.getVendor().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[4] > 0)\n\t\t{\n\t\t\tlabel.getMaterials().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[5] > 0)\n\t\t{\n\t\t\tlabel.getTolerance().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[6] > 0)\n\t\t{\n\t\t\tlabel.getFinish().setForeground(highlight);\n\t\t}\n\t\treturn label;\n\t}", "@Override\r\n\tpublic String getColor() {\n\t\treturn \"white\";\r\n\t}", "public int getPrimaryColor(int i) {\n return primary[i];\n }", "PRColor occupiedBy() {\n return c;\n }", "private String getNextColor(){\n\t\tif(currentIndex < MAX_COLORS){\n\t\t\tcurrentIndex++;\n\t\t\treturn colors[currentIndex - 1];\n\t\t}\n\t\treturn null;\n\t}", "public String getColor(){\n return this.color;\n }", "private int getCurrentMainColor () {\n int translatedHue = 255 - ( int ) ( mCurrentHue * 255 / 360 );\n int index = 0;\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255, 0, ( int ) i );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255 - ( int ) i, 0, 255 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 0, ( int ) i, 255 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 0, 255, 255 - ( int ) i );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( ( int ) i, 255, 0 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255, 255 - ( int ) i, 0 );\n index++;\n }\n return Color.RED;\n }", "@SideOnly(Side.CLIENT)\n @Override\n public int getRenderColor(int metadata)\n {\n return 0xFFFFFF;\n }", "@Override\n Color getColor() {\n return new Color(32, 83, 226, 255);\n }", "public RMColor getColor() { return getFill()==null? RMColor.black : getFill().getColor(); }", "@Override\r\n\tpublic void howToColor() {\n\t\t\r\n\t}", "public void setLongBgColors(weatherData tmp, int i, int j) {\n\t\t\tswitch(tmp.getCondit()) {\n\t\t\t\tcase \"sky is clear \":\n\t\t\t\tcase \"clear sky \":\n\t\t\t\tcase \"Sky is Clear \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(255, 215,0);\n\t\t\t\t\t\t\tlongColors[j] = new Color(255, 111, 0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"few clouds \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(160, 255, 0);\n\t\t\t\t\t\t\tlongColors[j] = new Color(9, 173, 33);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"scattered clouds \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(30, 255, 90);\n\t\t\t\t\t\t\tlongColors[j] = new Color(45, 110, 35);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"broken clouds \":\n\t\t\t\tcase \"overcast clouds \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(30, 255, 150);\n\t\t\t\t\t\t\tlongColors[j] = new Color(40, 150, 130);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"shower rain \":\n\t\t\t\tcase \"light intensity drizzle \":\n\t\t\t\tcase \"drizzle \":\n\t\t\t\tcase \"heavy intensity drizzle \":\n\t\t\t\tcase \"light intensity drizzle rain \":\n\t\t\t\tcase \"drizzle rain \":\n\t\t\t\tcase \"heavy intensity drizzle rain \":\n\t\t\t\tcase \"shower rain and drizzle \":\n\t\t\t\tcase \"heavy shower rain and drizzle \":\n\t\t\t\tcase \"shower drizzle \":\n\t\t\t\tcase \"light intensity shower rain \":\n\t\t\t\tcase \"heavy intensity shower rain \":\n\t\t\t\tcase \"ragged shower rain \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(0,255,255);\n\t\t\t\t\t\t\tlongColors[j] = new Color(30, 130, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"rain \":\n\t\t\t\tcase \"light rain \":\n\t\t\t\tcase \"moderate rain \":\n\t\t\t\tcase \"heavy intensity rain \":\n\t\t\t\tcase \"very heavy rain \":\n\t\t\t\tcase \"extreme rain \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(0, 166, 255);\n\t\t\t\t\t\t\tlongColors[j] = new Color(30, 50, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"thunderstorm \":\n\t\t\t\tcase \"thunderstorm with light rain \":\n\t\t\t\tcase \"thunderstorm with rain \":\n\t\t\t\tcase \"thunderstorm with heavy rain \":\n\t\t\t\tcase \"light thunderstorm \":\n\t\t\t\tcase \"heavy thunderstorm \":\n\t\t\t\tcase \"ragged thunderstorm \":\n\t\t\t\tcase \"thunderstorm with light drizzle \":\n\t\t\t\tcase \"thunderstorm with drizzle \":\n\t\t\t\tcase \"thunderstorm with heavy drizzle \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(0, 95, 255);\n\t\t\t\t\t\t\tlongColors[j] = new Color(60, 30, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"snow \":\n\t\t\t\tcase \"freezing rain \":\n\t\t\t\tcase \"light snow \":\n\t\t\t\tcase \"heavy snow \":\n\t\t\t\tcase \"sleet \":\n\t\t\t\tcase \"shower sleet \":\n\t\t\t\tcase \"light rain and snow \":\n\t\t\t\tcase \"rain and snow \":\n\t\t\t\tcase \"light shower snow \":\n\t\t\t\tcase \"shower snow \":\n\t\t\t\tcase \"heavy shower snow \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(145, 245, 245);\n\t\t\t\t\t\t\tlongColors[j] = new Color(75, 150, 160);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase \"mist \":\n\t\t\t\tcase \"smoke \":\n\t\t\t\tcase \"haze \":\n\t\t\t\tcase \"sand, dust whirls \":\n\t\t\t\tcase \"fog \":\n\t\t\t\tcase \"sand \":\n\t\t\t\tcase \"dust \":\n\t\t\t\tcase \"volcanic ash \":\n\t\t\t\tcase \"squalls \":\n\t\t\t\tcase \"tornado \":\n\t\t\t\t\t\t\tlongColors[i] = new Color(200, 210, 210);\n\t\t\t\t\t\t\tlongColors[j] = new Color(85, 110, 100);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t\t\tlongColors[i] = new Color(160, 120, 240);\n\t\t\t\t\t\t\tlongColors[j] = new Color(40, 10, 90);\n\t\t\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public String getColor(){\r\n return color;\r\n }", "public static Color getColorSuccess() {\n return Color.white;\n }", "public void Color() {\n\t\t\r\n\t}", "public boolean isGreen()\n {\n // TODO: replace this line with your code\n }", "@Override\n public Color getColor() {\n\n if(clicked)\n {\n return Color.BLUE;\n }\n\n if(energy < 0.1*maxEnergy)\n {\n return Color.LINEN;\n }\n else if (energy < 0.2*maxEnergy)\n {\n return Color.MISTYROSE;\n }\n else if(energy < 0.3*maxEnergy)\n {\n return Color.LIGHTPINK;\n }\n else if(energy < 0.4*maxEnergy)\n {\n return Color.PINK;\n }\n else if (energy < 0.5*maxEnergy)\n {\n return Color.LIGHTCORAL;\n }\n else if (energy < 0.6*maxEnergy)\n {\n return Color.RED;\n }\n else if (energy < 0.7*maxEnergy)\n {\n return Color.FIREBRICK;\n }\n else if (energy < 0.8*maxEnergy)\n {\n return Color.DARKRED;\n }\n else if (energy < 0.9*maxEnergy)\n {\n return Color.MAROON;\n }\n return Color.BLACK;\n }", "public Color getBackgroundColor()\n {\n return sfondocolore;\n }", "boolean similarColorTo(Card c);", "private void lineColor() {\n\n\t}", "public void changeWildRouteColor() {\n if (mCardsList.get(0))\n mSelectedRoute.setColor(\"red\");\n else if (mCardsList.get(1))\n mSelectedRoute.setColor(\"blue\");\n else if (mCardsList.get(2))\n mSelectedRoute.setColor(\"yellow\");\n else if (mCardsList.get(3))\n mSelectedRoute.setColor(\"green\");\n else if (mCardsList.get(4))\n mSelectedRoute.setColor(\"black\");\n else if (mCardsList.get(5))\n mSelectedRoute.setColor(\"orange\");\n else if (mCardsList.get(6))\n mSelectedRoute.setColor(\"purple\");\n else if (mCardsList.get(7))\n mSelectedRoute.setColor(\"white\");\n }", "public static Color getColor() { return lblColor.getBackground(); }", "@Override\r\n public Llama.Color getColor() {\r\n return color;\r\n }", "public short getColor() {\n\t\treturn this.color;\n\t}", "public String keyColor(int i){\r\n if(this.down.contains(this.draw.get(i)))\r\n return \"red\";\r\n return \"black\";\r\n }", "public Color get_color() {return this.color;}", "private Color generateColor() {\r\n\t\tint length = nameColor.size();\r\n\t\tif(length == 0) return colorArray[0];\r\n\t\t\r\n\t\tColor lastColor = nameColor.get(length-1);\r\n\t\tint lastColorIndex = 0;\r\n\t\tfor(int i = 0; i<colorArray.length; i++) {\r\n\t\t\tif(lastColor == colorArray[i]) {\r\n\t\t\t\tlastColorIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tColor curColor = colorArray[(lastColorIndex+1)%3];\r\n\t\treturn curColor;\r\n\t}", "private ColorMixerModel.ColorItem selectedColor(Point p){\n for(ColorMixerModel.ColorItem c: cmModel.colorSet){\n if(p.distance(c.getPos()) < c.getR()){\n return c;\n }\n }\n return null;\n }", "public int getSecondaryColor(int i) {\n return secondary[i];\n }", "public ColorStateList mo27006f() {\n TextView textView = this.f24573m;\n if (textView != null) {\n return textView.getTextColors();\n }\n return null;\n }", "public int getColorIndex() {\n return colorIndex;\n }", "@Override\n\tprotected char getColor(int position) {\n\t\treturn color;\n\t}", "protected Color preferredColor()\r\n {\r\n if (isMoving())\r\n return Color.green;\r\n else\r\n return new Color(0, 100, 0);\r\n }", "public Color getLineColor();", "public int[] getColorIndexPointer()\n\t {\n\t \t return null;\n\t \t }", "private void colorizeCore() {\n\n\t\tfor (Class c : this.core) {\n\n\t\t\tint color = 0;\n\t\t\tboolean colored = false;\n\n\t\t\t// Get conflict graph\n\t\t\tHashSet<Class> relatedTo = c.getRelatedTo();\n\t\t\tif (this.conflictGraph.containsKey(c)) {\n\t\t\t\tfor (Class rel : this.conflictGraph.get(c)) {\n\t\t\t\t\trelatedTo.add(rel);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Lookup for a free color\n\t\t\twhile (!colored) {\n\n\t\t\t\tboolean colorBusy = false;\n\t\t\t\tfor (Class rel : relatedTo) {\n\t\t\t\t\tif (rel.getColor() != null && rel.getColor() == color)\n\t\t\t\t\t\tcolorBusy = true;\n\t\t\t\t}\n\n\t\t\t\tif (!colorBusy) {\n\t\t\t\t\tc.setColor(color);\n\t\t\t\t\tcolored = true;\n\t\t\t\t} else {\n\t\t\t\t\tcolor++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcomputeAdaptations(c);\n\t\t}\n\t}", "public Color getColor() { return color.get(); }", "boolean getNoColor();", "public Color color() {\n return null;\n }", "@Override\n public String getColor() {\n return this.color;\n }", "public String getColor(){\n return this._color;\n }", "int getRed(int x, int y);", "public Color getBackFlankingGapColor() {\n\t\treturn backgap ? Color.red : Color.lightGray;\n\t}", "public int getColor() {\n return this.color;\n }", "public int getColor(ItemStack par1ItemStack)\n {\n \n NBTTagCompound nbttagcompound = par1ItemStack.getTagCompound();\n\n if (nbttagcompound == null)\n {\n return 4984077;\n }\n else\n {\n NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag(\"display\");\n return nbttagcompound1 == null ? 4984077 : (nbttagcompound1.hasKey(\"color\") ? nbttagcompound1.getInteger(\"color\") : 4984077);\n }\n \n }" ]
[ "0.62130034", "0.62130034", "0.60389304", "0.5919552", "0.5893306", "0.58371836", "0.583277", "0.5823158", "0.57945734", "0.5772804", "0.57383585", "0.57206565", "0.56765234", "0.5658118", "0.5635753", "0.563491", "0.5620467", "0.5617629", "0.56057906", "0.5604929", "0.5603329", "0.5594117", "0.5588212", "0.55879587", "0.5580669", "0.5579678", "0.5579483", "0.55621475", "0.55621475", "0.5561763", "0.55414015", "0.5539331", "0.5533737", "0.55261403", "0.55249125", "0.5524407", "0.5524407", "0.551957", "0.551957", "0.551957", "0.551957", "0.551957", "0.5516275", "0.55135137", "0.5512202", "0.5505951", "0.5502223", "0.5502223", "0.5502223", "0.54994506", "0.5493462", "0.549161", "0.54848146", "0.5480972", "0.5477212", "0.54613936", "0.5451753", "0.5449086", "0.54456484", "0.54449296", "0.54381067", "0.54368985", "0.54360956", "0.5434037", "0.54337287", "0.5423579", "0.5417447", "0.54167855", "0.5415211", "0.5412516", "0.5410108", "0.5397819", "0.5389901", "0.5387221", "0.53839606", "0.5379556", "0.53780943", "0.53664386", "0.5362842", "0.53606063", "0.53539735", "0.5353247", "0.5351892", "0.5351218", "0.5345706", "0.5345312", "0.5343014", "0.53403854", "0.53377795", "0.533634", "0.5335083", "0.53320277", "0.533169", "0.5323587", "0.53204626", "0.5319566", "0.5309059", "0.5304906", "0.5304502", "0.5302405" ]
0.54501665
57
Gets the method with the given id. Return null if obsolete and filterObsolete is true.
Method getMethod(int id, boolean filterObsolete);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static RemindMethod fromId(String id) {\n if (id != null) {\n for (RemindMethod method : values()) {\n if (method.id.equals(id)) {\n return method;\n }\n }\n }\n return POPUP;\n }", "String get(String id);", "@Override\n\tpublic Mfunction getById(Long id) {\n\t\treturn mfunctionDao.getById(id);\n\t}", "@GetMapping(\"/transport-methods/{id}\")\n @Timed\n public ResponseEntity<TransportMethod> getTransportMethod(@PathVariable UUID id) {\n log.debug(\"REST request to get TransportMethod : {}\", id);\n Optional<TransportMethod> transportMethod = transportMethodService.findOne(id);\n return ResponseUtil.wrapOrNotFound(transportMethod);\n }", "@ApiMethod(name = \"getMyBean\")\n public MyBean getMyBean(@Named(\"id\") Long id) {\n // TODO: Implement this function\n logger.info(\"Calling getMyBean method\");\n return null;\n }", "@Override\r\n\tpublic Function getFunctionById(int id) {\n\t\treturn getHibernateTemplate().get(Function.class, id);\r\n\t}", "Optional<Funcionario> buscarPorId(Long id);", "@Override\n\tpublic ServiceFee getById(long id) {\n\t\treturn servicefeerepo.getOne(id);\n\t}", "@Override\n\tpublic T get(ID id) {\n\t\tOptional<T> obj = getDao().findById(id);\n\t\tif (obj.isPresent()) {\n\t\t\treturn obj.get();\n\t\t}\t\t\n\t\treturn null;\n\t}", "@GetMapping(\"/methods/{id}\")\n @Timed\n public ResponseEntity<MethodsDTO> getMethods(@PathVariable Long id) {\n log.debug(\"REST request to get Methods : {}\", id);\n MethodsDTO methodsDTO = methodsService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(methodsDTO));\n }", "Decorator getDecorator(String id);", "@Override\n public Optional<ScheduledInterview> get(long id) {\n if (data.containsKey(id)) {\n return Optional.of(data.get(id));\n }\n return Optional.empty();\n }", "public Object lookup(String id) {\n return null;\n }", "public static native short getRemoteMethodInfo(short objID, short methodID);", "@SuppressWarnings(\"unchecked\")\n\t@Deprecated\n\tpublic <T extends Base> T get(T model, String id) throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn (T) get(model.getClass(), id);\n\t}", "public Object consultar(int id) throws Exception {\n throw new UnsupportedOperationException(\"Not supported yet.\");\n }", "@Override\n\tpublic Contract get(String id) {\n\t\treturn contractDao.findOne(id);\n\t}", "public InterfaceBean get(String id) {\n\t\treturn null;\n\t}", "V get(K id);", "T get(ID id);", "@Override\n\tpublic CcNoticereceive get(String id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic finalDataBean findById(int id) throws Exception {\n\t\treturn null;\n\t}", "T get(Integer id);", "public Future<?> doFindAlarm(long id)\n\t{\n\t\tif (id < 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tNacAlarmDao dao = this.getAlarmDao();\n\t\treturn NacAlarmDatabase.getExecutor().submit(() -> dao.findAlarm(id));\n\t}", "@Override\n\tpublic T getById(long id) {\n\t\treturn null;\n\t}", "@Override\n public Event getById(UUID id) {\n TypedQuery<EventAdapter> query = em.createQuery(\n \"SELECT e FROM EventAdapter e \"\n + \"WHERE e.id = :id \"\n + \"ORDER BY e.id\", EventAdapter.class)\n .setParameter(\"id\", id.toString());\n\n EventAdapter ea = query.getSingleResult();\n if (ea != null) {\n return ea.getEvent();\n } else {\n return null;\n }\n }", "@Override\r\n\tpublic Food getFoodById(int id) {\n\t\tString sql=\"select * from food where id=?\";\r\n\t\tList<Food> list=(List<Food>) BaseDao.select(sql, Food.class,id);\r\n\t\tif(list.size()>0) {\r\n\t\t\treturn list.get(0);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "Object get(ID id) throws Exception;", "@Override\n public Revue getById(int id) {\n return null;\n }", "@Override\r\n\tpublic XftPayment get(Integer id) {\n\t\treturn xftPaymentMapper.selectByPrimaryKey(id);\r\n\t}", "@Override\r\n\tpublic Action findById(String id) throws SQLException {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Optional<Dispositivo> getById(int id) {\n\t\treturn dispositivoDao.findById(id);\n\t}", "public Product get(String id);", "@PostAuthorize(\"hasPermission(returnObject, 'READ')\")\n public File returnFileIfTheyCanRead(long id) {\n Optional<File> optionalFile = fileRepository.findById(id);\n return optionalFile.orElse(null);\n }", "T getById(int id);", "Optional<T> find(long id);", "@Override\r\n\tpublic Product get(int id) {\n\t\treturn null;\r\n\t}", "public Timecurve getById(Long id) {\n return timecurveRepository.findById(id)\n .orElseThrow(() -> timecurveNotFound(id.toString()));\n\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic S<T> get(String id){\n\t\tid =id.trim();\n\t\t\n\t\tif(id.contains(\"*\")){\n\t\t\tif(l==null)\n\t\t\tl = (LinkedList<Sview>) getTableId();\n\t\t\t\n\t\t\tString sufix = getSufix(id);\n\t\t\tLinkedList<View> lv = new LinkedList<View>();\n\t\t\tfor (Sview v : l) {\n\t\t\t\tif(v.name.startsWith(sufix)){\n\t\t\t\t\tView vi = activity.findViewById(v.id);\n\t\t\t\t\tif(vi!=null)\n\t\t\t\t\tlv.add(vi);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(lv.size()!=0){\n\t\t\t\tt = (T) lv;\n\t\t\t}\n\t\t\t\n\t\t\treturn this;\n\t\t}\n\t\tif(id.equals(\"TextView\")){\t\t\n\t\t\tgetViewByType(\"TextView\");\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tif(id.equals(\"Button\")){\n\t\t\tgetViewByType(\"Button\");\n\t\t\treturn this;\n\t\t}\n\t\tif(id.equals(\"ImageView\")){\n\t\t\tgetViewByType(\"ImageView\");\n\t\t\treturn this;\n\t\t}\n\t\tif(id.equals(\"EditText\")){\n\t\t\tgetViewByType(\"EditText\");\n\t\t\treturn this;\n\t\t}\n\t\tif(id.equals(\"CheckBox)\")){\n\t\t\tgetViewByType(\"CheckBox\");\n\t\t\treturn this;\n\t\t}\n\t\tif(id.equals(\"ImageButton)\")){\n\t\t\tgetViewByType(\"ImageButton\");\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tif(id.equals(\"RadioButton)\")){\n\t\t\tgetViewByType(\"RadioButton\");\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\t\n\t\t\tt = (T) activity.findViewById(getId(id));\n\n\t\treturn this;\n\t}", "ServiceEndpointPolicy getById(String id);", "private SpeedDialActionItem findActionItem(int id) {\r\n for (SpeedDialActionItem item : speedDial.getActionItems())\r\n if (item.getId() == id)\r\n return item;\r\n\r\n return null;\r\n }", "public <T extends Base> T get(Class<T> T, String id) throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn Core.get(T, id, getHttpMethodExecutor());\n\t}", "private IMethod findMethod(IType type, String sourceMethod) throws JavaModelException {\n\t\tIMethod[] methods = type.getMethods();\r\n\t\tfor (IMethod method : methods) {\r\n\t\t\tif (sourceMethod.equals(method.getElementName())) {\r\n\t\t\t\treturn method;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@LogExceptions\n @Override\n public Optional<Data> find(int id) throws SQLException {\n Connection conn = DatabaseConnection.getConnection();\n \n try(PreparedStatement stmt = \n conn.prepareStatement(getMembers().getSelectFormat())) \n {\n stmt.setInt(1, id);\n try(ResultSet rs = stmt.executeQuery()) {\n if(rs.next()) {\n Event event = new Event();\n event.setID(rs.getInt(1));\n event.setEvent(rs.getString(2));\n event.setDescription(rs.getString(3));\n event.setLocation(rs.getString(4));\n event.setDate(rs.getString(5));\n event.setStart(rs.getString(9));\n event.setEnd(rs.getString(10));\n return Optional.of(event);\n }\n else \n return Optional.empty();\n }\n }\n }", "public Optional<VirtualFile> getAnyFileById(String id) {\n Stream<VirtualFile> files = Stream.concat(Stream.concat(public_files.stream(), resource_files.stream()), Stream.concat(solution_files.stream(), private_files.stream()));\n return files.filter(file -> file.getId().equals(id)).findFirst();\n }", "@Override\n\tpublic PI findById(Long id) throws NotFoundException {\n\t\treturn null;\n\t}", "Message get(String id);", "@Override\n public T findById(Long id) {\n return manager.find(elementClass, id);\n }", "@Override\n\tpublic MemberBean findById(String id) {\n\t\treturn null;\n\t}", "public DynamicMethod retrieveMethod(String name) {\n return getMethods().get(name);\n }", "@Override\n public Optional<Task> getTaskById(UUID id)\n {\n return null;\n }", "@Override\n public ServiceCall<NotUsed, Product> getProductById(String id) {\n return request -> CompletableFuture\n .completedFuture(productRepository.getProduct(id));\n }", "public FiAvailableInvoice getFiAvailableInvoice(final String id);", "@Override\n\tpublic car getById(int id) {\n\t\ttry{\n\t\t\tcar so=carDataRepository.getById(id);\n\t\t\t\n\t\t\treturn so;\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t}", "public Ticket getTicket(String id);", "T getById(ID id);", "@PostAuthorize(\"hasPermission(returnObject, 'read') or hasPermission(returnObject, 'administration') \")\n public File findById(long id) {\n Optional<File> file = fileRepository.findById(id);\n return file.orElse(null);\n }", "@Override\r\n\tpublic ServiceRequest getServiceRequestById(int id) throws SQLException\r\n\t{\r\n\t\tlogger.info(\"DAO getting a service request with ID: \" + id);\r\n \tSystem.out.println(\"DAO getting a service request with ID: \" + id);\r\n \t\r\n \tServiceRequest sr = null;\r\n \tSession session = sessionFactory.getCurrentSession();\r\n \t\r\n\t\tQuery query = session.createQuery(GET_SERVICE_REQUEST_BY_ID_HQL);\r\n\t\tquery.setParameter(\"id\", id);\r\n\t\t\r\n\t\tif (query.list() != null && query.list().size() > 0)\r\n\t\t{\r\n\t\t\tsr = (ServiceRequest) query.list().get(0);\r\n\t\t}\r\n\t\t\r\n\t\treturn sr;\r\n\t}", "public Optional<VirtualFile> getPublicOrResourcesFile(String id) {\n Stream<VirtualFile> files = Stream.concat(public_files.stream(), resource_files.stream());\n return files.filter(file -> file.getId().equals(id)).findFirst();\n }", "@Nullable\n abstract Method getMethod();", "public Payment getPayment(long id) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n Cursor cursor = db.query(tableName,\n new String[]{Payment.COLUMN_ID, Payment.COLUMN_NAME, Payment.COLUMN_PRICE, Payment.COLUMN_DETAILS, Payment.COLUMN_TIMESTAMP},\n Payment.COLUMN_ID + \"=?\", new String[]{String.valueOf(id)}, null, null, null, null);\n\n if (cursor != null)\n cursor.moveToFirst();\n\n // prepare payment object\n Payment payment = new Payment(\n cursor.getInt(cursor.getColumnIndex(Payment.COLUMN_ID)),\n cursor.getString(cursor.getColumnIndex(Payment.COLUMN_NAME)),\n cursor.getString(cursor.getColumnIndex(Payment.COLUMN_PRICE)),\n cursor.getString(cursor.getColumnIndex(Payment.COLUMN_DETAILS)),\n cursor.getString(cursor.getColumnIndex(Payment.COLUMN_TIMESTAMP)));\n\n // close the db connection\n cursor.close();\n\n return payment;\n }", "public Fuel getFuel(long id) {\n\t\treturn fuelDao.findOne(id);\n\t}", "T getbyId(I id);", "public ToDo getToDo(String id) {\n return Arrays.stream(allTodos).filter(x -> x._id.equals(id)).findFirst().orElse(null);\n }", "Optional<EtatOperation> findOne(Long id);", "@Override\n\tpublic File getById(long id) {\n\t\treturn getSession().find(File.class, id);\n\t}", "@Override\n\tpublic Book get(String id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Optional<Fournisseur> findById(int id) {\n\t\treturn null;\n\t}", "public Fichier getFichier(int id) throws SQLException {\n\t\tString query = SQLQueries.GET_FICHIER_QUERY + id;\n\t\tResultSet rs = null;\n\t\tFichier fichier = null;\n\t\ttry {\n\t\t\tconnection = Connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\trs = statement.executeQuery(query);\n\t\t\tif (rs.next()) {\n\t\t\t\tfichier = new Fichier();\n\t\t\t\tfichier.setNom_fichier(rs.getString(\"nom_fichier\"));\n\t\t\t\tfichier.setDate_fichier(rs.getDate(\"date_fichier\"));\n\t\t\t\tfichier.setCommentaire(rs.getString(\"commentaire\"));\n\t\t\t\tfichier.setId_matiere(rs.getInt(\"id_matiere\"));\n\t\t\t\tfichier.setFichier(rs.getBytes(\"fichier\"));\n\t\t\t}\n\t\t} finally {\n\t\t\tif (statement != null)\n\t\t\t\tstatement.close();\n\t\t\tif (rs != null)\n\t\t\t\trs.close();\n\t\t\tconnection.close();\n\t\t}\n\t\treturn fichier;\n\t}", "@PostAuthorize(\"hasPermission(returnObject, 'ADMINISTRATION')\")\n public File returnFileIfTheyCanAdmin(long id) {\n Optional<File> optionalFile = fileRepository.findById(id);\n return optionalFile.orElse(null);\n }", "public Dependent getDependent(String id) {\n\t\tOptional<Dependent> dependent = depDao.findById(id);\n\t\tif(dependent.isPresent())\n\t\t\treturn dependent.get();\n\t\telse\n\t\t\treturn null;\n\t}", "@Override\r\n\tpublic Code get(int id) {\n\t\treturn this.getHibernateTemplate().get(Code.class, id);\r\n\t}", "public T get( final int id )\n\t{\n\t\treturn this.dao.findById( id ).get();\n\t}", "Optional<TITransferDetails> findOne(UUID id);", "@Override\n\tpublic Utente get(Long id) throws Exception {\n\t\treturn null;\n\t}", "public BaseBean get(Serializable id) throws Exception {\n\t\treturn null;\r\n\t}", "Optional<SrInwardTruckQualityCheck> get(Integer id);", "@Override\n\tpublic PointVO getPoint(String id) throws Exception {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Product getProduct(String id) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Optional<MedioPago> findbyid(Integer id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Parameter<?> getParameter(String id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Optional<Audit> findById(Integer id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object getById(Integer id) {\n\t\treturn null;\n\t}", "public Object getResource(String id) {\n\t\tint idx = rks.indexOf(id);\n\t\tif (idx < 0) throw new NoSuchElementException(id);\n\t\telse return rvs.get(idx);\n\t}", "@Override\r\n\tpublic Shipper getById(int id) {\n\t\t\r\n\t\treturn shipperDao.getById(id);\r\n\t}", "@RequestMapping(method = RequestMethod.GET, value = \"/{id}\")\r\n public Callable<ResponseObject> findById(@PathVariable(\"id\") Long id) {\r\n return new Callable<ResponseObject>() {\r\n @Override\r\n public ResponseObject call() throws Exception {\r\n return candidateService.findById(id);\r\n }\r\n };\r\n }", "@Override\r\n\tpublic Permission getPermission(int id) {\n\t\treturn null;\r\n\t}", "public Proveedor buscarPorId(Integer id) {\r\n\r\n if (id != 22 && id < 123) {\r\n\r\n return ServiceLocator.getInstanceProveedorDAO().find(id);\r\n }\r\n return null;\r\n\r\n }", "public Event getEvent(String id) {\n for (Event e : eventMap.keySet()) {\n if (e.getEventId().equals(id)) {\n return e;\n }\n }\n return null;\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected ByteConsumerIF getData(String _id) {\n\t\tif(data instanceof List<?>) {\n\t\t\tfor(ByteConsumerIF b: ((List<ByteConsumerIF>)data)) {\n\t\t\t\tif(b.getId().equals(_id)) return b;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Log get(int id) {\n\t\tConnection con = MysqlDatabase.getInstance().getConnection();\r\n\t\tLog log = null;\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GetById);\r\n\t\t\tps.setInt(1, id);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tlog = generate(rs);\r\n\t\t\t}\r\n\t\t\tcon.close();\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 log;\r\n\t}", "@Override\n\tpublic ExportProduct get(Serializable id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic BatimentoCardiaco get(long id) {\n\t\treturn null;\n\t}", "public Doctor get(String id) {\n\t\treturn dao.get(id);\n\t}", "@Override\r\n\tpublic PaymentPO findByID(String id) {\n\t\treturn null;\r\n\t}", "public Method getMethod();", "public FileManagerFile getFile(int id) throws Exception {\n\n if (files == null) { // defer loading files list until requested.\n cacheFoldersFiles();\n }\n for (FileManagerFile file : files) {\n if (file.getId() == id) {\n return file;\n }\n }\n return null;\n }", "@Override\n public Filter getFilter(String filterId) {\n return null;\n }", "<T> T get(Class<T> clazz, Serializable id);", "T getById(Long id);" ]
[ "0.54904014", "0.5473703", "0.5398275", "0.5344563", "0.5335167", "0.53122133", "0.5241082", "0.5222071", "0.5183282", "0.51454437", "0.51156694", "0.5087522", "0.5078955", "0.50645596", "0.5057858", "0.503261", "0.502204", "0.5008808", "0.49984396", "0.4990659", "0.49753225", "0.49724588", "0.49465677", "0.49421054", "0.4898416", "0.4897873", "0.48922008", "0.4889724", "0.4888364", "0.4880432", "0.4878854", "0.4874257", "0.48586252", "0.48551118", "0.48449558", "0.4843595", "0.48354474", "0.48349047", "0.4825107", "0.48249385", "0.4823118", "0.48193714", "0.48176384", "0.4816687", "0.48145708", "0.481295", "0.48101473", "0.48041332", "0.48013005", "0.48002523", "0.47918493", "0.47861716", "0.47857285", "0.47827923", "0.4781098", "0.47806105", "0.47801447", "0.4772192", "0.47689953", "0.47687697", "0.47683507", "0.47663853", "0.4764791", "0.47632322", "0.4745168", "0.47327173", "0.47208545", "0.47183836", "0.4717928", "0.47177532", "0.47174388", "0.4716899", "0.47129956", "0.4708652", "0.47083122", "0.47070748", "0.47039932", "0.47009712", "0.4700043", "0.4699347", "0.4698096", "0.46954596", "0.46905524", "0.46864966", "0.46846655", "0.4684599", "0.46791896", "0.46761677", "0.4673044", "0.46721572", "0.46687075", "0.4666019", "0.46625498", "0.46617052", "0.4659309", "0.4657298", "0.46536887", "0.46534854", "0.46514478", "0.4649631" ]
0.739941
0
Gets the all methods from Central and Local.
List<Method> getAllMethods();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<IMethod> getMethods();", "public List<IMethod> getMethods();", "ISourceMethod[] getMethods();", "public static MethodClass getMethods (){\n\t\treturn methods;\n\t}", "public Set<Method> getMethods() {\r\n \t\t// We will only consider private methods in the declared class\r\n \t\tif (forceAccess)\r\n \t\t\treturn setUnion(source.getDeclaredMethods(), source.getMethods());\r\n \t\telse\r\n \t\t\treturn setUnion(source.getMethods());\r\n \t}", "public List<MethodInfo> getMethods() { \n return lstMethodInfo;\n }", "public Enumeration getMethods()\n {\n ensureLoaded();\n return m_tblMethod.elements();\n }", "public List<ResolvedMethodDeclaration> getAllMethods() {\n List<ResolvedMethodDeclaration> allMethods = new LinkedList<>(this.getTypeDeclaration().getDeclaredMethods());\n getDirectAncestors().forEach(a -> allMethods.addAll(a.getAllMethods()));\n return allMethods;\n }", "public String[] getMethods() {\n\t\treturn methods;\n\t}", "@XRMethod(value = \"system.listMethods\", help = \"List all method names available\")\r\n\tList<String> listMethods();", "public Set<AbstractProgramData<?>> getMethods()\n {\n return this.methods;\n }", "public abstract Set<MethodUsage> getDeclaredMethods();", "public List<ServiceMethod> getMethodList()\n {\n return Collections.unmodifiableList(methods);\n }", "@Override\n\tpublic String[] getMethods() {\n\t\treturn null;\n\t}", "private void findMethods() {\n List<Method> methods = new ArrayList<Method>(Arrays.asList(getObject().getClass().getMethods()));\r\n List<Method> objectMethods = new ArrayList<Method>(Arrays.asList(Object.class.getMethods()));\r\n methods.removeAll(objectMethods);\r\n \r\n for(Method method:methods) {\r\n //does method have @ManagedAttribute annotation?\r\n if(method.isAnnotationPresent(ManagedAttribute.class) || method.isAnnotationPresent(Property.class)) {\r\n exposeManagedAttribute(method);\r\n }\r\n //or @ManagedOperation\r\n else if (method.isAnnotationPresent(ManagedOperation.class) || isMBeanAnnotationPresentWithExposeAll()){\r\n exposeManagedOperation(method); \r\n } \r\n }\r\n }", "@Override\r\n\tpublic List<Method> getMethods(File f) {\n\t\tEolModule module = new EolModule();\r\n\t\treturn this.getMethods(f, module);\r\n\t}", "public MethodDeclaration[] getMethods() {\n return m_classBuilder.getMethods();\n }", "@Override public Iterable<JflowModel.Method> getStartMethods()\n{\n Vector<JflowModel.Method> v = new Vector<JflowModel.Method>();\n\n for (JflowMethod cm : model_master.getStartMethods()) {\n ModelMethod cs = complete_calls.get(cm);\n if (cs != null) v.add(cs);\n }\n\n return v;\n}", "List<MethodNode> getMethods() {\n return this.classNode.methods;\n }", "private Map<String, MethodNode> getMethods(ClassNode cls) {\n Map<String, MethodNode> methods = new HashMap<String, MethodNode>();\n\n Map<String, Node> allAttrs = cls.getMembers();\n Iterator allAttrs_it = allAttrs.entrySet().iterator();\n while(allAttrs_it.hasNext()) {\n Map.Entry attr_entry = (Map.Entry)allAttrs_it.next();\n if(attr_entry.getValue() instanceof MethodNode) {\n String methodName = (String)attr_entry.getKey();\n MethodNode method = (MethodNode)attr_entry.getValue();\n methods.put(methodName, method);\n }\n }\n return methods;\n }", "public ArrayList<Method> getMethods() {\n\t\treturn arrayMethods;\n\t}", "public TreeMap<String,CheckOutMethod>\n getMethods()\n {\n TreeMap<String,CheckOutMethod> methods = new TreeMap<String,CheckOutMethod>();\n for(String name : pVersionFields.keySet()) {\n JCollectionField field = pMethodFields.get(name);\n methods.put(name, CheckOutMethod.values()[field.getSelectedIndex()]);\n }\n return methods;\n }", "public List<Method> getMethods(File f, EolModule module) {\n\t\tList<Method> methods = new ArrayList<>();\r\n\t\tEglPreprocessorModule pm = ((EglModule)module).getPreprocessorModule();\r\n\t\tfor (Operation op : pm.getDeclaredOperations()) {\r\n\t\t\t//EolType contextClass = op.getContextType(module.getContext());\r\n\t\t\tTypeExpression contextClass = op.getContextTypeExpression();\r\n\t\t\tMethod m;\r\n\t\t\tif (contextClass!=null)\r\n\t\t\t\tm = new Method(contextClass.getName(), op.getName(), f);\r\n\t\t\telse\r\n\t\t\t\tm = new Method(null, op.getName(), f);\r\n\t\t\tmethods.add(m);\r\n\t\t}\r\n\t\treturn methods;\r\n\t}", "@GetMapping(\"/methods\")\n @Timed\n public List<MethodsDTO> getAllMethods() {\n log.debug(\"REST request to get all Methods\");\n return methodsService.findAll();\n }", "private static Method[] retrieveAllMethods(final Object object) {\r\n\t\tMethod[] methodsArray = null;\r\n\r\n\t\t// - Retrieve methods array from cache if exists.\r\n\t\tif (KerAnnotation.methodsCache.containsKey(object.getClass())) {\r\n\t\t\tmethodsArray = KerAnnotation.methodsCache.get(object.getClass());\r\n\t\t}\r\n\t\t// - Else get methods and cache them.\r\n\t\telse {\r\n\t\t\t// - Aggregate all annotated methods (declared, inherited, etc.).\r\n\t\t\tfinal Set<Method> methods = new HashSet<Method>();\r\n\r\n\t\t\tfor (final Method method : object.getClass().getMethods()) {\r\n\t\t\t\tif (method.getAnnotations().length > 0) {\r\n\t\t\t\t\tmethods.add(method);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (final Method method : object.getClass().getDeclaredMethods()) {\r\n\t\t\t\tif (method.getAnnotations().length > 0) {\r\n\t\t\t\t\tmethods.add(method);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// - Convert set to array.\r\n\t\t\tmethodsArray = methods.toArray(new Method[0]);\r\n\r\n\t\t\t// - Cache array.\r\n\t\t\tKerAnnotation.methodsCache.put(object.getClass(), methodsArray);\r\n\t\t}\r\n\r\n\t\treturn methodsArray;\r\n\t}", "public MethodDescriptor[] getMethodDescriptors() {\n return getMdescriptor();\n }", "@Override\n public MethodDescriptor[] getMethodDescriptors() {\n return getMdescriptor();\n }", "java.util.List<org.mojolang.mojo.lang.FuncDecl> \n getMethodsList();", "public String getFunctions();", "public List<String> getMethodList() throws CallError, InterruptedException {\n return (List<String>)service.call(\"getMethodList\").get();\n }", "public static List<Map<String, Object>> getMethods(Map<String, Object> model) {\n @SuppressWarnings(\"unchecked\")\n List<Map<String, Object>> methods = (List<Map<String, Object>>) getRoot(model).get(ModelConstant.METHODS);\n return methods;\n }", "public ArrayList<String> getNullMethods() {\n\t\treturn methods;\n\t}", "public Enumeration getMethodNames()\n {\n final EnumerationUnion eu = new EnumerationUnion();\n if( methods != null )\n {\n eu.add( methods.keys() );\n }\n if( ancestors != null )\n {\n final int size = ancestors.size();\n for( int i = 0; i < size; i++ )\n {\n final ScriptingClass clazz = (ScriptingClass)\n ancestors.elementAt( i );\n eu.add( clazz.getMethodNames() );\n }\n }\n try\n {\n final ScriptingClass object = getClassLoader().load( \"object\" );\n eu.add( object.getMethodNames() );\n }\n catch( ScriptingClassNotFoundException e )\n {\n }\n return eu;\n }", "public Collection<ResourceMethod> getMethodsForPath(\n RemainingPath remainingPath) {\n // NICE results may be chached, if any method is returned.\n // The 404 case will be called rarely and produce a lot of cached data.\n final List<ResourceMethod> resourceMethods = new ArrayList<ResourceMethod>();\n for (final ResourceMethod method : this.resourceMethods) {\n final PathRegExp methodPath = method.getPathRegExp();\n if (remainingPath.isEmptyOrSlash()) {\n if (methodPath.isEmptyOrSlash()) {\n resourceMethods.add(method);\n }\n } else {\n if (methodPath.matchesWithEmpty(remainingPath)) {\n resourceMethods.add(method);\n }\n }\n }\n return resourceMethods;\n }", "public HashMap<String, LabTest> getMethods() {\n HashMap<String, LabTest> methods = new HashMap<>();\n if (isApiAvailable(\"getMethods\")) {\n makeConnection(\"getMethods\");\n BufferedReader in = null;\n try {\n in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n String inputLine = null;\n StringBuilder content = new StringBuilder();\n while (true) {\n try {\n assert in != null;\n if ((inputLine = in.readLine()) == null) break;\n } catch (IOException e) {\n e.printStackTrace();\n }\n content.append(inputLine);\n }\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n String jsonstring = content.toString();\n jsonArray = new JSONArray(jsonstring);\n for (int i = 0; i < jsonArray.length(); i++) {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n JsonObject jsonObject = gson.fromJson(String.valueOf(jsonArray.get(i)), JsonObject.class);\n LabTest method = makeMethod(jsonObject);\n methods.put(method.getNameOfMethod(), method);\n }\n con.disconnect();\n }\n return methods;\n }", "public FunctionInfo[] getFunctions() {\n/* 236 */ return this.functions;\n/* */ }", "public List<MethodCall> searchMethods( final MethodsFilter aFilter ) {\n\t\t// Get the methods\n\t\tfinal MonitoringLogService monitoringLogService = getService( MonitoringLogService.class );\n\t\tfinal List<MethodCall> methods = monitoringLogService.getMethods( );\n\n\t\t// Filter the methods\n\t\tfinal FilterService filterService = getService( FilterService.class );\n\t\treturn methods\n\t\t\t\t.parallelStream( )\n\t\t\t\t.filter( filterService.getStringPredicate( MethodCall::getHost, aFilter.getHost( ), aFilter.isUseRegExpr( ) ) )\n\t\t\t\t.filter( filterService.getStringPredicate( MethodCall::getClazz, aFilter.getClazz( ), aFilter.isUseRegExpr( ) ) )\n\t\t\t\t.filter( filterService.getStringPredicate( MethodCall::getMethod, aFilter.getMethod( ), aFilter.isUseRegExpr( ) ) )\n\t\t\t\t.filter( filterService.getStringPredicate( MethodCall::getException, aFilter.getException( ), aFilter.isUseRegExpr( ) ) )\n\t\t\t\t.filter( filterService.getLongPredicate( MethodCall::getTraceId, aFilter.getTraceId( ) ) )\n\t\t\t\t.filter( getSearchTypePredicate( aFilter.getSearchType( ) ) )\n\t\t\t\t.filter( filterService.getAfterTimePredicate( MethodCall::getTimestamp, aFilter.getLowerDate( ), aFilter.getLowerTime( ) ) )\n\t\t\t\t.filter( filterService.getBeforeTimePredicate( MethodCall::getTimestamp, aFilter.getUpperDate( ), aFilter.getUpperTime( ) ) )\n\t\t\t\t.collect( Collectors.toList( ) );\n\t}", "static Method[] getAllDeclaredMethods(String testsClassName) {\n\n Class<?> testsClazz = getClassObject(testsClassName);\n\n //Get all methods from file\n Method[] methods = testsClazz.getDeclaredMethods();\n\n\n if (methods.length != 0) {\n return methods;\n } else {\n log.error(\"В классе {} нет ни одного метода !\", testsClazz);\n return new Method[0];\n }\n\n\n }", "public List<ResourceMethod> getResourceMethods() {\n return resourceMethods;\n }", "abstract protected Set<Method> createMethods();", "public List<Method> getMethod_list() {\n\t\treturn arrayMethods;\n\t}", "public HashSet<SootMethod> getMethodsToExplore(int invocationLevel){\n\t\tHashSet<SootMethod> methodsToExplore = new HashSet<SootMethod>();\r\n\t\t\r\n\t\tfor (SootMethod method : tadaMethods) {\r\n\t\t\tHashSet<SootMethod> invokingMethods = getMethodsInvokingAtLevel(method, invocationLevel);\r\n\t\t\tmethodsToExplore.addAll(invokingMethods);\r\n\t\t}\r\n\t\treturn methodsToExplore;\r\n\t}", "public List<String> getMethodList() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getMethodList\").get();\n }", "public abstract String[] getMethodNames();", "public static Method[] getPublicMethods(Class<?> paramClass) {\n/* 107 */ if (System.getSecurityManager() == null) {\n/* 108 */ return paramClass.getMethods();\n/* */ }\n/* 110 */ HashMap<Object, Object> hashMap = new HashMap<>();\n/* 111 */ while (paramClass != null) {\n/* 112 */ boolean bool = getInternalPublicMethods(paramClass, (Map)hashMap);\n/* 113 */ if (bool) {\n/* */ break;\n/* */ }\n/* 116 */ getInterfaceMethods(paramClass, (Map)hashMap);\n/* 117 */ paramClass = paramClass.getSuperclass();\n/* */ } \n/* 119 */ return (Method[])hashMap.values().toArray((Object[])new Method[hashMap.size()]);\n/* */ }", "public Future<List<String>> getMethodList() throws DynamicCallException, ExecutionException {\n return call(\"getMethodList\");\n }", "public static Method[] getAllMethods(Class forClass) {\r\n\t\tfinal List<Method> methods = new ArrayList<Method>();\r\n\t\tClass aktClass = forClass;\r\n\t\twhile (!aktClass.equals(Object.class)) {\r\n\t\t\tMethod[] tmp = aktClass.getDeclaredMethods();\r\n\t\t\tfor (Method akt : tmp) {\r\n\t\t\t\tmethods.add(akt);\r\n\t\t\t}\r\n\t\t\taktClass = aktClass.getSuperclass();\r\n\t\t}\r\n\t\treturn methods.toArray(new Method[methods.size()]);\r\n\t}", "private Set<Method> getVirtualMethods()\n {\n return this.getContainer().getVirtualMethods();\n }", "public Set<String> getRegisteredFunctions();", "public List<Function> getFunctions(){\n\t\t\n\t\treturn null;\n\t}", "public String[] getMethods(String url) throws RemoteException{\n\t\ttry{\n\t\t//reading wsdl here...\n String wsdlFile = url+\"?wsdl\";\n \n WSDLParser parser = new WSDLParser(wsdlFile);\n\t\treturn parser.getAllMethodNames();\n\t\t}catch(Exception e){\n\t\t\tSystem.err.println(e.getMessage());\t\n\t\t}\n\n\t\treturn null;\n\t}", "public Collection<Method> getRemoveMethods() {\n Set<Method> removeMethods = new HashSet<Method>();\n\n if( ejbDesc.getType().equals(EjbSessionDescriptor.TYPE) ) {\n EjbSessionDescriptor sessionDesc = (EjbSessionDescriptor) ejbDesc;\n if( sessionDesc.isStateful() && sessionDesc.hasRemoveMethods() ) {\n\n for(EjbRemovalInfo next : sessionDesc.getAllRemovalInfo()) {\n\n MethodDescriptor mDesc = next.getRemoveMethod();\n Method m = mDesc.getMethod(ejbDesc);\n if( m == null ) {\n throw new IllegalStateException(\"Can't resolve remove method \" +\n mDesc + \" For EJB \" + sessionDesc.getName());\n }\n removeMethods.add(m);\n\n }\n\n }\n }\n\n return removeMethods;\n\n }", "public java.beans.MethodDescriptor[] getMethodDescriptors() {\n\ttry {\n\t\tjava.beans.MethodDescriptor aDescriptorList[] = {\n\t\t\tclearMethodDescriptor()\n\t\t\t,main_javalangString__MethodDescriptor()\n\t\t\t,toggleVisibilityMethodDescriptor()\n\t\t};\n\t\treturn aDescriptorList;\n\t} catch (Throwable exception) {\n\t\thandleException(exception);\n\t};\n\treturn null;\n}", "protected Set<IService> getContributedServices() {\n \t\tServiceModelManager smm = ServiceModelManager.getInstance();\n \t\tSet<IService> cppServices = smm.getServices(CCProjectNature.CC_NATURE_ID);\n \t\tSet<IService> cServices = smm.getServices(CProjectNature.C_NATURE_ID);\n \n \t\tSet<IService> allApplicableServices = new LinkedHashSet<IService>();\n \t\tallApplicableServices.addAll(cppServices);\n \t\tallApplicableServices.addAll(cServices);\n \n \t\treturn allApplicableServices;\n \t}", "private void readMethodsAnnotations() {\n Method[] methods = clazz.getDeclaredMethods();\n for (Method method : methods) {\n Annotation[] annotations = method.getDeclaredAnnotations();\n for (Annotation a : annotations) {\n Class<? extends Annotation> aType = a.annotationType();\n List<Entry<Annotation>> list = entries.get(aType);\n if (list == null) {\n list = new ArrayList();\n entries.put(aType, list);\n }\n list.add(new Entry<>(method, a));\n }\n }\n }", "public static Map<Method, Method> findManagedMethods(Class<?> clazz)\n {\n Map<Method, Method> result = new HashMap<>();\n\n // gather all publicly available methods\n // this returns everything, even if it's declared in a parent\n for (Method method : clazz.getMethods()) {\n // skip methods that are used internally by the vm for implementing covariance, etc\n if (method.isSynthetic() || method.isBridge()) {\n continue;\n }\n\n // look for annotations recursively in superclasses or interfaces\n Method managedMethod = findManagedMethod(clazz, method.getName(), method.getParameterTypes());\n if (managedMethod != null) {\n result.put(method, managedMethod);\n }\n }\n\n return result;\n }", "public interface Methods {\n\n /**\n * List all static methods for a given content model.\n *\n * @param cmpid Pid of the content model.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If content model doesn't exist.\n */\n public List<Method> getStaticMethods(String cmpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * List all dynamic methods for a given object.\n *\n * @param objpid Pid of the object.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object doesn't exist.\n */\n public List<Method> getDynamicMethods(String objpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * Invoke a given method with the given parameters.\n *\n * @param pid The pid of the content model or object defining the method.\n * @param methodName The name of the method.\n * @param parameters Parameters for the method, as a map from name list of values.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return Result of calling method.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object, content model or method doesn't exist.\n */\n public String invokeMethod(String pid,\n String methodName,\n Map<String, List<String>> parameters,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n}", "public CachetActionList getActions() {\n throw new RuntimeException(\"Method not implemented.\");\n }", "public AuthMethod[] getAuthMethods() {\n\t\treturn authMethods.clone();\n\t}", "public List<Function> getGlobalFunctions(String name);", "public HashMap<String, HashMap<String, Object>> getResultsForMethods() {\n return resultsForMethods;\n }", "private void mappingMethodGet() throws SecurityException, NoSuchMethodException{\n\t\tString aux = upFirstLetter();\n\t\tString methodGet = \"get\" + aux;\n\t\tthis.methodGet = this.classFather.getMethod(methodGet);\n\t}", "public static List<Method> getMethods( Class<?> klass )\r\n {\r\n return Arrays.asList( org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods( klass ) );\r\n }", "private static Set<SootMethod> searchUpForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\tif(sm.isConcrete()){\n\t\t\tif(containsInitMethod(sm, type)){\n\t\t\t\tmethods.add(sm);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tList<Type> parameterTypes = sm.getParameterTypes();\n\t\t\t\tif(parameterTypes.contains(RefType.v(type))){\n\t\t\t\t\tList<SootMethod> sources = InterMethodAnalysis.getSourcesMethods(sm);\t\n\t\t\t\t\tfor(SootMethod src:sources){\n\t\t\t\t\t\tif(src.equals(sm))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif(src.isAbstract()){\n\t\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(src)){\n\t\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(src, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}", "public List<ResourceMethod> getSubResourceMethods() {\n return subResourceMethods;\n }", "public List<MethodDeclaration> getMethodDeclarations() {\n return methodDeclarations;\n }", "@Override\r\n\tpublic String[] getMethodNames() {\n\t\treturn this.methodNames;\r\n\t\t//未实现\r\n\t}", "@Override\n public List<Method> getAllUssdMethodes(String className) {\n\n Class klass = null;\n\n try {\n klass = Class.forName(className);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n List<Method> resultMethods = new ArrayList<Method>();\n if (klass == null)\n return resultMethods;\n Method[] methods = klass.getDeclaredMethods();\n\n\n for (Method method : methods) {\n method.setAccessible(true);\n if (method.isAnnotationPresent(UssdMethod.class)) {\n resultMethods.add(method);\n }\n }\n\n return resultMethods;\n }", "Iterable<T> getFunctions();", "public Collection<Helper> getAll() {\n return helpers;\n }", "private static Set<SootMethod> searchDownForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\t//1.判断sm中是否含有intent的定义信息,若有,则返回\n\t\tif(containsInitMethod(sm, type)){\n\t\t\tmethods.add(sm);\n\t\t}\n\t\telse{\n\t\t\tList<SootMethod> targets = InterMethodAnalysis.getTargetsMethods(sm);\t\n\t\t\tfor(SootMethod tgt:targets){\n\t\t\t\tif(tgt.equals(sm))\n\t\t\t\t\tcontinue;\n\t\t\t\tif(tgt.getReturnType().toString().contains(type)){\n\t\t\t\t\tif(tgt.isAbstract()){\n\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(tgt)){\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchDownForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSet<SootMethod> methods2 = searchDownForDefineMethods(tgt, type);\n\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}", "public Map getKeyMethodMap() {\r\n\t\tMap map = new HashMap();\r\n\r\n\t\tString pkg = this.getClass().getPackage().getName();\r\n\t\tResourceBundle methods = ResourceBundle.getBundle(pkg\r\n\t\t\t\t+ \".LookupMethods\");\r\n\r\n\t\tEnumeration keys = methods.getKeys();\r\n\r\n\t\twhile (keys.hasMoreElements()) {\r\n\t\t\tString key = (String) keys.nextElement();\r\n\t\t\tmap.put(key, methods.getString(key));\r\n\t\t}\r\n\r\n\t\treturn map;\r\n\t}", "@Override\n public List<Function> getFunctions() {\n if (!isLoaded()) {\n throw new IllegalStateException(\"Error: The module is not loaded\");\n }\n\n return new ArrayList<Function>(m_functions);\n }", "public String methodBase() {\n\t\tString tmp = name;\n\t\ttmp = tmp.replaceFirst(\"^get\", \"\");\n\t\ttmp = tmp.replaceFirst(\"^is\", \"\");\n\t\treturn tmp.substring(0,1).toLowerCase()+tmp.substring(1);\n\t}", "@Override\n public ServiceResponse listMethods(final ServiceRequest request) throws SOAPException {\n return this.soapClient.listMethods(request, this.getTargetUrl());\n }", "private void populateFoundMethods()\n \t{\n \t\t// For each non test method, find if it's invoked in each test method one by one.\n \t\t for (IMethod nonTestMethod : this.nonTestMethods)\n \t\t {\n \t\t\t FoundMethod tempFoundMethod = new FoundMethod(nonTestMethod);\n \t\t\t for (IMethod testMethod : this.testMethods)\n \t\t\t {\n \t\t\t\t IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {testMethod});\n \t\t\t\t searchFor(nonTestMethod, scope);\n \t\t\t\t \n \t\t\t\t tempFoundMethod.addMatch(testMethod, this.requestor.getCounter());\n \t\t\t\t \n \t\t\t\t // System.out.println(nonTestMethod.getElementName() + \" found in \" + testMethod.getElementName() + \": \" + this.requestor.getCounter() + \" times.\");\n \t\t\t\t this.requestor.resetCounter();\n \t\t\t }\n \t\t\t foundMethods.add(tempFoundMethod);\n \t\t }\n \t}", "private List<RhFuncionario> getFuncionarios()\n {\n System.out.println(\"supiEscalaFacade.findEnfermeiros():\"+supiEscalaFacade.findEnfermeiros());\n return supiEscalaFacade.findEnfermeiros();\n }", "public Collection<IFunction> getAllFunctions()\r\n\t{\r\n\t\treturn expressionRegistry.getAllFunctions();\r\n\t}", "public List<ResourceMethod> getSubResourceLocators() {\n return subResourceLocators;\n }", "private HashSet<SootMethod> getMethodsInvokingAtLevel(SootMethod method,\r\n\t\t\tint level) {\n\t\tHashSet<SootMethod> workSet = new HashSet<SootMethod>();\r\n\t\tworkSet.add(method);\r\n\t\t\r\n\t\tHashSet<SootMethod> newWorkset = new HashSet<SootMethod>(1);\r\n\t\tHashSet<SootMethod> topLevel = new HashSet<SootMethod>();\r\n\t\tHashSet<SootMethod> processed = new HashSet<SootMethod>(1);\r\n\t\tfor(int i=0; i< level; i++){\r\n\t\t\tif(i !=0){\r\n\t\t\t\tfor (SootMethod sootMethod : newWorkset) {\r\n\t\t\t\t\tif(!processed.contains(sootMethod))\r\n\t\t\t\t\t\tworkSet = new HashSet<SootMethod>(newWorkset);\r\n\t\t\t\t}\r\n\t\t\t\tnewWorkset = new HashSet<SootMethod>(1);\r\n\t\t\t}\r\n\t\t\tif(workSet.isEmpty())\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tHashSet<SootMethod> implementedMethods = new HashSet<SootMethod>();\r\n\t\t\tfor (SootMethod m : workSet) {\r\n\t\t\t\tfor (SootClass interfaze : m.getDeclaringClass().getInterfaces()) {\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tSootMethod m2 = interfaze.getMethod(m.getName(), \r\n\t\t\t\t\t\t\t\tm.getParameterTypes(), m.getReturnType());\r\n\t\t\t\t\t\tif(!processed.contains(m2))\r\n\t\t\t\t\t\t\timplementedMethods.add(m2);\r\n\t\t\t\t\t}catch (RuntimeException e) {\r\n\t\t\t\t\t\t//e.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tworkSet.addAll(implementedMethods);\r\n\t\t\tIterator<SootMethod> iter = workSet.iterator();\r\n\t\t\t\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tSootMethod m = iter.next();\r\n\t\t\t\tif(getMethodsInvoking(m) != null){\r\n\t\t\t\t\tnewWorkset.addAll(getMethodsInvoking(m));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\ttopLevel.add(m);\r\n\t\t\t}\r\n\t\t\tprocessed.addAll(workSet);\r\n\t\t}\r\n\t\tprocessed.remove(method);\r\n\t\ttadaMethodInvokedByMap.put(method, processed);\r\n\t\ttopLevel.addAll(newWorkset);\r\n\t\treturn topLevel;\r\n\t}", "public\tList<JsClass.Method>\tgetAddedMethods() {\n\t\t\n\t\treturn\tCollections.unmodifiableList(this.addedMethods);\n\t}", "public void getMainListForActions() {\n mMainListForActions = mDatabaseManager.getAllCurrenciesForCurrenciesFragment(false);\n checkDefaultData();\n setLang();\n }", "Map getAll();", "@Override\n public ArrayList<ICatLocDetail> getLocalities() {\n return localities;\n }", "public Method getMethod();", "@Override\n public List<ProducerMember> listCentralServices() {\n return this.soapClient.listCentralServices(this.getTargetUrl());\n }", "String getMethod();", "String getMethod();", "org.mojolang.mojo.lang.FuncDecl getMethods(int index);", "public List<PaymentEntity> getPaymentMethods() {\n return entityManager.createNamedQuery(\"getAllPaymentMethods\", PaymentEntity.class).getResultList();\n\n }", "java.util.List<? extends org.mojolang.mojo.lang.FuncDeclOrBuilder> \n getMethodsOrBuilderList();", "public static Method[] getInstanceMethods(Class<?> cls) {\n List<Method> instanceMethods = new ArrayList<>();\n for (Class<?> c = cls; c != null; c = c.getSuperclass()) {\n Method[] methods = c.getDeclaredMethods();\n for (Method method : methods)\n if (!Modifier.isStatic(method.getModifiers()))\n instanceMethods.add(method);\n }\n Method[] ims = new Method[instanceMethods.size()];\n for (int j = 0; j < instanceMethods.size(); j++)\n ims[j] = instanceMethods.get(j);\n return ims;\n }", "protected HashSet<IMethod> getIMethods(MethodWrapper[] methodWrappers) {\r\n\t\tHashSet<IMethod> c = new HashSet<IMethod>();\r\n\t\tfor (MethodWrapper m : methodWrappers) {\r\n\t\t\tIMethod im = getIMethodFromMethodWrapper(m);\r\n\t\t\tif (im != null) {\r\n\t\t\t\tc.add(im);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn c;\r\n\t}", "public final List<DepFunction> getFunctions() {\n\t\treturn new LinkedList<>(this.functionMap.values());\n\t}", "public static Collection<Method> findAnnotatedMethods(\n Class<?> type,\n Class<? extends Annotation> annotation\n ) {\n\n List<Method> result = new ArrayList<>();\n\n // gather all publicly available methods\n // this returns everything, even if it's declared in a parent\n for (Method method : type.getMethods()) {\n // skip methods that are used internally by the vm for implementing covariance, etc\n if (method.isSynthetic() || method.isBridge() || isStatic(method.getModifiers())) {\n continue;\n }\n\n // look for annotations recursively in super-classes or interfaces\n Method managedMethod = findAnnotatedMethod(\n type,\n annotation,\n method.getName(),\n method.getParameterTypes()\n );\n if (managedMethod != null) {\n result.add(managedMethod);\n }\n }\n\n return result;\n }", "public static Multimap<String, Method> getMethodsMultimap( Class<?> klass )\r\n {\r\n Multimap<String, Method> methods = ArrayListMultimap.create();\r\n getMethods( klass ).forEach( method -> methods.put( method.getName(), method ) );\r\n return methods;\r\n }", "public List<Method> getStaticMethods(String cmpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;", "static public List<GlobalSimilarityNode> getFunciones() {\n if (funciones == null) {\n addFunciones();\n }\n return funciones;\n }", "@Test\n\tpublic void testGetActionMethods() throws ClassNotFoundException,\n\t\t\tNoSuchMethodException, SecurityException {\n\t\tConcreteActionsFactory concreteActionsFactory = new ConcreteActionsFactory();\n\n\t\tClass clazz = Class.forName(\"org.dsol.service.ConcreteActions1\");\n\t\tList<Method> methods = concreteActionsFactory.getActionMethods(clazz);\n\n\t\tAssert.assertEquals(2, methods.size());\n\n\t\tAssert.assertTrue(methods.contains(clazz.getMethod(\"hi\", String.class,\n\t\t\t\tString.class)));\n\t\tAssert.assertTrue(methods.contains(clazz.getMethod(\"getStarted\")));\n\n\t}", "private void mappingMethods() throws SecurityException, NoSuchMethodException{\n\t\tmappingMethodGet();\n\t\tmappingMethodSet();\n\t}" ]
[ "0.67035663", "0.67035663", "0.6637281", "0.650306", "0.6482952", "0.63945127", "0.634939", "0.62821394", "0.61453086", "0.6123645", "0.61123174", "0.60747695", "0.6005262", "0.59738654", "0.59420174", "0.5924087", "0.5869853", "0.5837978", "0.57907885", "0.576035", "0.5758154", "0.5748912", "0.57225573", "0.57130146", "0.5701133", "0.5647827", "0.5638026", "0.55932975", "0.5585125", "0.5569003", "0.5556915", "0.5489089", "0.5477938", "0.5477036", "0.54747266", "0.5452078", "0.544994", "0.54365", "0.54343647", "0.5433735", "0.54076725", "0.53957784", "0.5384985", "0.5378526", "0.53717756", "0.5360677", "0.5355894", "0.5324983", "0.5299326", "0.5294536", "0.5285123", "0.527071", "0.5245743", "0.5234053", "0.52217984", "0.5220857", "0.5217156", "0.52032024", "0.5199928", "0.5192253", "0.51905483", "0.5185009", "0.5170227", "0.51652974", "0.5155215", "0.5147425", "0.514469", "0.51395077", "0.5137256", "0.5136714", "0.5134865", "0.51278025", "0.5125771", "0.5122611", "0.511393", "0.5062853", "0.5049932", "0.50395906", "0.50235957", "0.50178206", "0.5006539", "0.5006378", "0.49922183", "0.49908394", "0.4990592", "0.4964352", "0.49454847", "0.49454847", "0.49402583", "0.49341473", "0.49289927", "0.4923688", "0.4916848", "0.4916142", "0.49116445", "0.49093407", "0.49093342", "0.490486", "0.490475", "0.49026924" ]
0.6920107
0
Adds a method. If the method is already found in the local database, it simply retrieves the record found.
void addMethod(Method method);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addMethod(String method) {\n\t\tif (!(methods.contains(method))){\n\t\t\tmethods.add(method);\t\t\t\n\t\t}\n\t}", "public void addMethod(Method methodToAdd) {\n\t\tif (!verifyExistsMethod(methodToAdd))\n\t\t\tarrayMethods.add(methodToAdd);\n\t}", "org.hl7.fhir.CodeableConcept addNewMethod();", "public void addMethod(MethodRequest method) {\n\t\tmethods.add(method);\n\t}", "private void addMethod(MethodNode methodNode){\n\t\t\tString[] exceptions = new String[methodNode.exceptions.size()];\n\t\t\tmethodNode.exceptions.toArray(exceptions);\n\t\t\tMethodVisitor mv = cv.visitMethod(methodNode.access, methodNode.name, methodNode.desc, methodNode.signature, exceptions);\n\n\t\t\tmethodNode.instructions.resetLabels();\n\t\t\t// SimpleRemapper -> maps old name to new name\n\t\t\t// updates owners and descriptions appropriately\n\t\t\tmethodNode.accept(new RemappingMethodAdapter(methodNode.access, methodNode.desc, mv, new SimpleRemapper(classToMerge.name, baseClassName)));\n\t\t}", "public void addSimpleMethod(SimpleMethod method) {\n this.simpleMethodNameSet.add(method.getLocationAndName());\n }", "public TypeData addMethod(final AbstractProgramData<?> _method)\n {\n this.methods.add(_method);\n return this;\n }", "public void addMethod(MethodDeclaration method) {\n m_classBuilder.addMethod(method);\n }", "public void addMethodItem(WjrMethodItem methodItem) {\r\n checkNotNull(methodItem, \"The methodItem parameter is null.\");\r\n\r\n String className = methodItem.getClassName();\r\n checkState(\r\n classItems.containsKey(className),\r\n \"The %s is not found.\",\r\n className);\r\n\r\n String classAndMethodName = methodItem.getClassAndMethodName();\r\n checkState(\r\n !methodItems.containsKey(classAndMethodName),\r\n \"The %s has already existed.\",\r\n classAndMethodName);\r\n\r\n methodItems.put(classAndMethodName, methodItem);\r\n }", "private static void addMethod(Map classMethods, Method method) {\n try {\n classMethods.put(method.getName(),\n SqlTypeConverter.toSqlType(method.getReturnType()));\n }\n catch (IllegalArgumentException error) {\n classMethods.put(method.getName(), NOT_SUPPORTED);\n }\n\n try {\n Class[] argsClass = method.getParameterTypes();\n if (argsClass == null || argsClass.length == 0) {\n return;\n }\n Integer[] argsSqlType = new Integer[argsClass.length];\n for (int i = 0; i < argsClass.length; i++) {\n argsSqlType[i] = SqlTypeConverter.toSqlType(argsClass[i]);\n }\n classMethods.put(method.getName() + Arrays.asList(argsSqlType).toString(),\n SqlTypeConverter.toSqlType(method.getReturnType()));\n }\n catch (SqlTypeConverter.UnsupportedConvertionException error) {\n ; // Les méthodes avec une conversion impossible sont pas prise en compte\n }\n }", "public boolean addMethod(Object pID, TypeMethod pTypeMethod) {\n\t\t\treturn this.addElement(pID, pTypeMethod);\n\t\t}", "public Method addMethod(String sName, String sSig)\n {\n ensureLoaded();\n Method method = new Method(sName, sSig, m_flags.isInterface());\n m_tblMethod.put(method.getIdentity(), method);\n setModified(true);\n return method;\n }", "private void addClassOrMethod(String methodOrClass) {\n\t\t//System.out.println(\"###addClassOrMethod [\" + methodOrClass + \"]\");\n\t\tSimpleMethod method = new SimpleMethod();\n\t\t\n\t\tList<SimpleMethod> allMethods = null;\n\t\t\n\t\tString[] parts = methodOrClass.split(CLASS_METHOD_DELIMITER);\n\t\tif (parts.length >= 1 && parts[0]!=null) {\n\t\t\tallMethods = this.myInstrCriteria.get(parts[0]);\n\t\t\tif (allMethods == null) {\n\t\t\t\tallMethods = new ArrayList<SimpleMethod>();\n\t\t\t\t//this.logVerbose(\"in addClassOrMethod just created allMethods hash[\" + allMethods.hashCode() + \"]myInstrCriteriaHash[\" + myInstrCriteria.hashCode() + \"]\");\n\t\t\t\tthis.myInstrCriteria.put(parts[0], allMethods);\n\t\t\t}\n\t\t\t\n\t\t\tswitch (parts.length) {\n\t\t\t\tcase 1: //just the package and class name were specified, meaning that all methods should be instrumented.\n\t\t\t\t\tmethod.ynAllMethods = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2: //a method was specified after a # sign...only instrument this specific method.\n\t\t\t\t\tmethod.setNameAndArgs(parts[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new RuntimeException(\"Was expecting to find either zero or one of the [\" + this.CLASS_METHOD_DELIMITER + \"] character inside of [\" + methodOrClass + \"]\");\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Error adding this method/class [\" + methodOrClass + \"]\");\n\t\t}\n\t\tallMethods.add(method);\n//\t\tSystem.out.println(\"## Just added methodName[\" + method.name + \"] methodArg [\" + method.args + \"]methodArgGetter [\" + method.getArgs() + \"]\");\n//\t\tSystem.out.println(\"@@@@@@@Class count [\" + myInstrCriteria.size() + \"] for class[\" + parts[0] + \"] count is [\" + allMethods.size() + \"]\");\n\t}", "private String addNewMethodToProto() {\n String methodName = METHOD_IN_PROTO_PREFIX + methodsInProtoCount;\n addMethodToProto(methodName);\n methodsInProtoCount++;\n\n return methodName;\n }", "public void addMethod(MethodInfo methodInfo) {\n lstMethodInfo.add(methodInfo);\n }", "public void addMethodDeclaration(MethodDeclaration method) {\n methodDeclarations.add(method);\n }", "public void addMethod(MethodSignature signature) {\n signature.setOuter(this);\n String name = signature.getSymbol();\n\n if (methodTable.containsKey(name)) methodTable.get(name).add(signature);\n else {\n List<MethodSignature> list = new LinkedList<>();\n list.add(signature);\n methodTable.put(name, list);\n }\n }", "void updateMethod(Method method);", "@Override\n\tpublic void addSeedToModel(Method method, String algorithm,\n\t\t\tList<RelatedMethodDescription> relatedMethods,\n\t\t\tProjectModel projectModel) {\n\t\t\n\t}", "public void addMethod(final Class<?> theClass,\n final String methodName,\n final String location)\n throws SecurityException, NoSuchMethodException {\n\n addMethod(theClass,\n theClass.getDeclaredMethod(methodName),\n location);\n }", "public void updateMethods (Method method) throws RepeatMethodName{\n for (Method met:methods){ // check if there isn't already method with such name\n if (met.getName().equals(method.getName())){\n throw new RepeatMethodName();\n }\n }\n methods.add(method);\n }", "public Object visit(Method node){\n ClassTreeNode treeNode = classMap.get(currentClass);\n treeNode.getMethodSymbolTable().add(node.getName(), node);\n //System.out.println(\"Adding method \" + node.getName() + \" to \" + currentClass);\n treeNode.getVarSymbolTable().enterScope();\n super.visit(node);\n return null;\n }", "public NullSafeBuilder<T> onMethod(String methodName)\n {\n /* find matching method */\n boolean isMethodFound = false;\n for (Method checkMethod : type.getDeclaredMethods()) {\n if ( checkMethod.getName().equals(methodName) ) {\n nullSafeMethods.add(checkMethod);\n log.info(\"added null safe method: {}\", checkMethod);\n isMethodFound = true;\n }\n }\n \n if ( !isMethodFound ) {\n throw new IllegalArgumentException(\"method not found: \" + methodName);\n }\n \n return this;\n }", "public void setMethod(String method) {\r\n this.method = method;\r\n }", "public void addProfiledMethod(String name, DynamicMethod method) {\n if (!config.isProfiling()) return;\n if (method.isUndefined()) return;\n if (method.getSerialNumber() > MAX_PROFILE_METHODS) return;\n \n int index = (int)method.getSerialNumber();\n if (profiledMethods.length <= index) {\n int newSize = Math.min((int)index * 2 + 1, MAX_PROFILE_METHODS);\n String[] newProfiledNames = new String[newSize];\n System.arraycopy(profiledNames, 0, newProfiledNames, 0, profiledNames.length);\n profiledNames = newProfiledNames;\n DynamicMethod[] newProfiledMethods = new DynamicMethod[newSize];\n System.arraycopy(profiledMethods, 0, newProfiledMethods, 0, profiledMethods.length);\n profiledMethods = newProfiledMethods;\n }\n profiledNames[index] = name;\n profiledMethods[index] = method;\n }", "private IMethod findMethod(IType type, String sourceMethod) throws JavaModelException {\n\t\tIMethod[] methods = type.getMethods();\r\n\t\tfor (IMethod method : methods) {\r\n\t\t\tif (sourceMethod.equals(method.getElementName())) {\r\n\t\t\t\treturn method;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "protected Method fetchMethod() {\n int i = randomGenerator.nextInt(allCallableMethods.size());\n Method selected = allCallableMethods.get(i);\n allCallableMethods.add(selected); // We add it back to the list of methods, to make it more likely to be selected!\n return selected;\n }", "public void setMethod(Method method) {\n this.method = method;\n }", "@Test\n\tpublic void testAddMethod() {\n\t\taddSomeMethods();\n\t\tassertTrue(manager.famixMethodExists(\"pack1.TestClass.a\"));\n\t\tassertTrue(manager.famixMethodExists(\"pack1.TestClass.b\"));\n\t\tassertEquals(1, manager.getFamixMethod(\"pack1.TestClass.a\").getAffectingChanges().size());\n\t\tassertEquals(1, manager.getFamixMethod(\"pack1.TestClass.b\").getAffectingChanges().size());\n\t\t// TODO check that this change is actually an addition!!!\n\t}", "void addMiximMethod(MethodNode method) {\n this.miximMethods.add(method);\n }", "public ForLoadedMethod(Method method) {\n this.method = method;\n }", "public void addMethod(String className, String methodName, String methodType, String methodVis, List<String> paramNames, List<String> paramTypes)\n\t{\n\t\tstoreViewState();\n\t\tproject.addMethod(className, methodName, methodType, methodVis, paramNames, paramTypes);\n\t\tcheckStatus();\n\t}", "public String addMember()//value=\"addmember\", method=RequestMethod.)\n\t{\n\t\treturn \"addmember\";\n\t}", "public StacLink method(String method) {\n this.method = method;\n return this;\n }", "public StrColumn getMethod() {\n return delegate.getColumn(\"method\", DelegatingStrColumn::new);\n }", "MethodName getMethod();", "@Override\n public boolean visit(MethodDeclaration node) {\n methods.add(node);\n return super.visit(node);\n }", "public DynamicMethod retrieveMethod(String name) {\n return getMethods().get(name);\n }", "boolean hasMethod();", "boolean hasMethod();", "boolean hasMethod();", "public Method getMethod();", "Method getMethod();", "Method getMethod();", "@Override\n\tpublic String getMethod() {\n\t\treturn ProcessorID.method_attention_isadd;\n\t}", "public OperationInfo addOperation(String name, Method method)\n {\n if ((name == null) || (name.length() == 0))\n {\n throw new IllegalArgumentException(\"Invalid name [\" + name + \"]\");\n }\n if (nameToOperation.containsKey(name))\n {\n throw new IllegalArgumentException(\"An operation with name [\" + name + \"] already exists in this service\");\n }\n \n OperationInfo operation = new OperationInfo(name, method, this);\n addOperation(operation);\n return operation;\n }", "public abstract void add(T input, List<Method> methods);", "protected String addMethodInfoField(int modifiers, CtClass addTo, MethodTransformation trans) throws NotFoundException, CannotCompileException\n {\n return addMethodInfoField(modifiers, addTo, trans, null);\n }", "Method addMethod(PositionString name, Symbol resultType, Iterator<Variable> parameters,\n\t\t\tModifier modifier) throws\n\t\t\tDuplicateIdentifierException, ShadowedIdentifierException, WrongModifierException, InvalidIdentifierException;", "DevelopmentMethod getRelatedMethod();", "public static BinaryExpression add(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }", "public void addRecord();", "@Override\n public void addGetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) {\n\n }", "@SuppressWarnings(\"hiding\")\n @Override\n public void setMethod(String method) {\n this.method = method;\n }", "public void setMethod(java.lang.reflect.Method method)\n {\n __m_Method = method;\n }", "public void addExtensionMethod(String extensionMethod) {\n \tif (extensionMethod.equals(Request.NOTIFY)) {\n \t\tif (LogWriter.needsLogging) \n \t\t\tLogWriter.logMessage(\"NOTIFY Supported Natively\");\n \t} else {\n this.dialogCreatingMethods.add(extensionMethod.trim().toUpperCase());\n \t}\n }", "ClassMember search (ClassMember method) {\r\n ClassMember m = (ClassMember) by_name_table.get (method.type.toString ());\r\n\r\n if (m == null) return null;\r\n\r\n if (!((MethodType) m.type).return_type.isSame (((MethodType) method.type).return_type)) {\r\n /* overriding methods must be exactly same */\r\n OzcError.illegalOverride (method);\r\n return null;\r\n } \r\n\r\n if ((m.isPublic () && !method.isPublic ()) ||\r\n\t(m.isProtected () && method.isPrivate ())) {\r\n /* overriding methods must be more publicity */\r\n OzcError.illegalOverridePublicity (method);\r\n return null;\r\n }\r\n\r\n return m;\r\n }", "public AnnotatedTypeBuilder<X> addToMethod(Method method, Annotation annotation) {\n\t\tif (methods.get(method) == null) {\n\t\t\tmethods.put(method, new AnnotationBuilder());\n\t\t}\n\t\tmethods.get(method).add(annotation);\n\t\treturn this;\n\t}", "Get<K, C> addColumn(C column);", "public void add() {\n\n }", "public JDBCRawSqlQueryMetaData(Method method) {\n this.method = method;\n }", "ClassMember getMethod () { return method; }", "public static void methodEntry(String methodName) {\n\tadd(DEVELOPMENT, \"METHOD_ENTRY\", methodName);\n }", "public Method addMethod(String sSig)\n {\n int of = sSig.indexOf('(');\n return addMethod(sSig.substring(0, of), sSig.substring(of));\n }", "public\tvoid\tsetAddedMethods(List<JsClass.Method> addedMethods) {\n\t\tthis.addedMethods = addedMethods;\n\t}", "public void add(MethodInterceptor interceptor) {\r\n\r\n\t\tif (this.interceptors == null) {\r\n\t\t\tthis.interceptors = new ArrayList<MethodInterceptor>();\r\n\t\t}\r\n\t\tthis.interceptors.add(interceptor);\r\n\t}", "static void add() {\r\n\t\tSystem.out.println(\"Overloading Method\");\r\n\t}", "public QueryMethodType<T> setMethodName(String methodName)\n {\n childNode.getOrCreate(\"method-name\").text(methodName);\n return this;\n }", "@Override\r\n\tpublic boolean addRepair(Repair repair) {\n\t\treturn repairDao.addRepair(repair);\r\n\t}", "public UITMethodIF getMethod (String methodName) throws ServiceException {\n UITMethodIF method = null;\n try {\n method = (UITMethodIF)_methods.get(methodName);\n } catch (NullPointerException n) {\n throw new ServiceException(\"No method \" + methodName);\n }\n return method;\n }", "private void populateMethod(UIBean uiBean) {\r\n String methodName;\r\n if (method != null) {\r\n methodName = eval.evaluateExpression(method);\r\n } else {\r\n methodName = DEFAULT_METHOD;\r\n }\r\n uiBean.addParameter(\"method\", methodName);\r\n }", "public void add() {\n }", "@Override\n\tpublic Object visitMethodDecl(MethodDecl myMethod) {\n\t\tif (!currentClass.methodTable.containsKey(myMethod.name)) {\n\t\t\tcurrentClass.methodTable.put(myMethod.name, myMethod);\n\t\t}\n\t\telse {\n\t\t\terrorMsg.error(myMethod.pos, \"Error: duplicate method declaration: \" + myMethod.name);\n\t\t\treturn null;\n\t\t}\n\n\t\t// no need to traverse subnodes, nothing lower down that we need to do anything with\n\t\treturn null;\n\t}", "@Description(\"request with method '{method}'\")\n public static Criteria<HarEntry> recordedRequestMethod(@DescriptionFragment(\"method\") HttpMethod method) {\n checkArgument(nonNull(method), \"Method should be defined\");\n\n return condition(entry -> {\n HttpMethod requestMethod = entry.getRequest().getMethod();\n\n return Objects.equals(requestMethod, method);\n });\n }", "public void setMethod(String newValue);", "Method createMethod();", "Method createMethod();", "public void setMethod(String method)\r\n {\r\n routing_method=method;\r\n }", "@Override\n public void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable) {\n //添加方法注释\n CommentUtils.addGeneralMethodComment(method, introspectedTable);\n }", "@Override\r\n\tpublic void add() {\n\t\tif(alreadyAdded()) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Member is already added\");\r\n\t\t}else {\r\n\t\t\t\r\n\t\t\t\ttry(Connection connection= db.getConnection();) {\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString addString=\"INSERT INTO members VALUES(?,?,?,?)\";\r\n\t\t\t\tpreparedStatement=connection.prepareStatement(addString);\r\n\t\t\t\tpreparedStatement.setString(1, super.getIdString());\r\n\t\t\t\tpreparedStatement.setString(2, super.getNameString());\r\n\t\t\t\tpreparedStatement.setString(3, super.getSurnameString());\r\n\t\t\t\tpreparedStatement.setString(4, super.getEmailString());\r\n\t\t\t\t\r\n\t\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Something went wrong\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t}", "public DynamicMethod searchMethod(String name) {\n return searchWithCache(name).method;\n }", "void setMethod(org.hl7.fhir.CodeableConcept method);", "public void removeMethod(String method) {\n\t\tmethods.remove(method);\n\t}", "public void setMethod(String method) {\n this.method = method == null ? null : method.trim();\n }", "public void setMethod(String method) {\n this.method = method == null ? null : method.trim();\n }", "public void addMethodToProto(String methodName) {\n protoClassBuilder.addField(FieldSpec\n .builder(Function.class, methodName, Modifier.PUBLIC)\n .build());\n }", "public AnnotatedTypeBuilder<X> addToMethod(AnnotatedMethod<? super X> method, Annotation annotation) {\n\t\treturn addToMethod(method.getJavaMember(), annotation);\n\t}", "protected String addMethodInfoField(int modifiers, CtClass addTo, MethodTransformation trans, CtField.Initializer init) throws NotFoundException, CannotCompileException\n {\n String name = getMethodInfoFieldName(trans.getOriginalName(), trans.getHash());\n TransformerCommon.addInfoField(instrumentor, METHOD_INFO_CLASS_NAME, name, modifiers, addTo, addInfoAsWeakReference(), init);\n \n return name;\n }", "public Boolean add(String addThis) {\n try {\n Statement statement = con.createStatement();\n return statement.executeUpdate(addThis) == 0 ? false : true;\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return false;\n }", "public Method getWriteMethod() { // basically unused in DBFlute, use gateway instead\n return _writeMethod;\n }", "@Nullable\n abstract Method getMethod();", "public void add();", "public void add() {\n\t\tSystem.out.println(\"I am from Add method\");\n\t}", "@Override\n protected void createMethodTables() throws Exception\n {\n // Call Super\n super.createMethodTables();\n\n // Obtain Virtual Methods declared by the EJB\n Set<Method> virtualMethods = getVirtualMethods();\n\n // If virtual methods exist\n if (virtualMethods != null)\n {\n // For each virtual method\n for (Method virtualMethod : virtualMethods)\n {\n // Calculate the hash\n long hash = MethodHashing.methodHash(virtualMethod);\n\n // Add to the advised methods\n this.advisedMethods.put(hash, virtualMethod);\n\n // Log\n log.debug(\"Added method with hash \" + hash + \" to those advised for \" + this.clazz + \": \" + virtualMethod);\n }\n }\n }", "public static Method getMethod(String method) throws IllegalArgumentException {\n/* 119 */ return getMethod(method, false);\n/* */ }", "public void add(String methodName, Closure closure) {\n handlers.put(closure, new ClosureInvocationHandler(methodName, closure));\n }", "@Test(priority = 3, enabled = true, description = \"click on the dishes\")\r\n\tpublic void adddish(Method method) throws InterruptedException {\r\n\t\t myTest = extent.startTest(method.getName());\r\n\t\t myTest.log(LogStatus.INFO, \"Starting test\", \"Start test\");\r\n\t\t logger.debug(\"debug it\");\r\n\t\t Assert.assertTrue(restorantsearch.AddDishes(\"תשלום\"), \"is not apayment pop up\");\r\n\t}", "public void method(){}", "private void changeMethod(CtBehavior method) throws NotFoundException, CannotCompileException {\n\t\t// method.insertBefore(\" __start = System.currentTimeMillis();\");\n\t\t// method.insertAfter(\" __stop = System.currentTimeMillis() -\n\t\t// __start;\");\n\t\t// method.addLocalVariable(\"__start\", CtClass.longType);\n\t\t// method.addLocalVariable(\"__stop\", CtClass.longType);\n\t\tString longName = method.getDeclaringClass().getSimpleName() + \".\" + method.getName();\n\t\tmethod.insertBefore(\"ProfileSession.opStart(\\\"\" + longName + \"\\\", $args);\");\n\t\tmethod.insertAfter(\"ProfileSession.opStop(\\\"\" + longName + \"\\\");\", true);\n\t}", "@Override\n public void run() {\n PsiElementFactory elementFactory = PsiElementFactory.SERVICE.getInstance(project);\n\n PsiField newField = elementFactory.createFieldFromText(fieldSource, null);\n PsiMethod newMethod = elementFactory.createMethodFromText(methodSource, null);\n\n psiFieldModel.set(newField);\n psiMethodModel.set(newMethod);\n }" ]
[ "0.7007756", "0.65135163", "0.6408191", "0.6333302", "0.60597116", "0.59620535", "0.58173287", "0.5784127", "0.5782353", "0.57652223", "0.5726793", "0.5699533", "0.5686059", "0.5657185", "0.56483227", "0.5602929", "0.5584003", "0.55310214", "0.5502188", "0.54440415", "0.54249233", "0.5418249", "0.54000854", "0.53510594", "0.5271732", "0.52612287", "0.5245603", "0.5219018", "0.5198538", "0.5174289", "0.51692253", "0.51278955", "0.5101122", "0.509143", "0.50833106", "0.50624585", "0.5061743", "0.5045298", "0.50429523", "0.50429523", "0.50429523", "0.5036276", "0.50286204", "0.50286204", "0.50266147", "0.49878675", "0.49800697", "0.49743477", "0.49634895", "0.49400407", "0.49305937", "0.49283218", "0.491217", "0.48962653", "0.48827174", "0.4869707", "0.48422348", "0.48252273", "0.48044983", "0.4800087", "0.47929958", "0.4790113", "0.478778", "0.47823313", "0.4778823", "0.47699964", "0.47683313", "0.47653547", "0.4756165", "0.47554672", "0.47528586", "0.47456646", "0.4738567", "0.47381294", "0.47315785", "0.47278434", "0.47278434", "0.4725237", "0.47174704", "0.47115806", "0.47105843", "0.46970555", "0.46849877", "0.46691504", "0.46691504", "0.4667534", "0.4667038", "0.46623585", "0.46621656", "0.46568754", "0.4653796", "0.4650198", "0.464968", "0.4645155", "0.4644141", "0.46420303", "0.46291375", "0.462176", "0.4616433", "0.4613162" ]
0.7150795
0
Updates the given method. This searches for the id. If it exists, the entry in the database is replaced with the new value.
void updateMethod(Method method);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int updateByPrimaryKey(FunctionInfo record);", "int updateByPrimaryKey(AccountPaymentMethodEntity record);", "@Override\n\tpublic String update(Integer id, Model m) throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic String update(Integer id, Model m) throws Exception {\n\t\treturn null;\n\t}", "@Update(UPDATE_BY_ID)\n @Override\n int updateById(Object position);", "int updateByPrimaryKeySelective(FunctionInfo record);", "int updateByPrimaryKeySelective(PracticeClass record);", "default E update(ID id, E entity) {\n return update(id, entity, null);\n }", "@Override\n\tpublic String update(Long id, Model m) throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic String update(Long id, Model m) throws Exception {\n\t\treturn null;\n\t}", "public void setMethod(String newValue);", "@Override\n public Long updateById(Store t, long id) {\n return null;\n }", "@Override\n\tpublic T update(T t, long id) {\n\t\treturn null;\n\t}", "int updateByPrimaryKey(PracticeClass record);", "int updateByPrimaryKey(Shareholder record);", "int updateByPrimaryKey(Clazz record);", "int updateByPrimaryKey(CodeBuildProcedure record);", "int updateByPrimaryKeySelective(GirlInfo record);", "int updateByPrimaryKey(SysRoleFunction record);", "@Override\n\tpublic int update(int id) {\n\t\treturn rolDao.update(id);\n\t}", "int updateByPrimaryKey(UserGift record);", "int updateByPrimaryKeySelective(UserGift record);", "int updateByPrimaryKey(StudentInfo record);", "int updateByPrimaryKey(Resource record);", "int updateByPrimaryKey(Student record);", "int updateByPrimaryKey(Student record);", "int updateByPrimaryKey(Student record);", "void updateOfProductById(long id);", "@Override\n\tpublic PI update(PIDTO updated) throws NotFoundException {\n\t\treturn null;\n\t}", "int updateByPrimaryKey(PageFunc record);", "int updateByPrimaryKey(PathologyInfo record);", "int updateByPrimaryKeySelective(Clazz record);", "int updateByPrimaryKey(Question record);", "int updateByPrimaryKey(Question record);", "int updateByPrimaryKey(Question record);", "int updateByPrimaryKey(Question record);", "int updateByPrimaryKey(Question record);", "int updateByPrimaryKey(MemberTag record);", "int updateByPrimaryKeySelective(StudentInfo record);", "int updateByPrimaryKeySelective(Shareholder record);", "int updateByPrimaryKey(TblBTSSysFunctionDO record);", "int updateByPrimaryKeySelective(CodeBuildProcedure record);", "int updateByPrimaryKeySelective(Tourst record);", "Update withIdProvider(String idProvider);", "int updateByPrimaryKeySelective(Student record);", "int updateByPrimaryKeySelective(Student record);", "int updateByPrimaryKeySelective(Student record);", "int updateByPrimaryKeySelective(Tipologia record);", "public void update(K id, Update<P> update);", "int updateByPrimaryKeySelective(Question record);", "int updateByPrimaryKeySelective(Question record);", "int updateByPrimaryKeySelective(Question record);", "int updateByPrimaryKeySelective(Question record);", "int updateByPrimaryKey(T record);", "int updateByPrimaryKeySelective(SysRoleFunction record);", "int updateByPrimaryKey(SysCode record);", "public M updateAndReturn(K id, Update<P> update);", "int updateByPrimaryKey(UserTips record);", "int updateByPrimaryKey(SBCallAlarm record);", "int updateByPrimaryKey(SdkPhone record);", "int updateByPrimaryKey(TCpySpouse record);", "public void update() throws NotFoundException {\n\tUserDA.update(this);\n }", "int updateByPrimaryKey(Model record);", "int updateByPrimaryKeySelective(FinMonthlySnapModel record);", "int updateByPrimaryKeySelective(SysCode record);", "int updateByPrimaryKey(_task record);", "int updateByPrimaryKey(CfgSearchRecommend record);", "int updateByPrimaryKeySelective(SdkPhone record);", "int updateByPrimaryKey(GirlInfo record);", "int updateByPrimaryKey(QuestionOne record);", "int updateByPrimaryKeySelective(TCpySpouse record);", "int updateByPrimaryKey(TempletLink record);", "int updateByPrimaryKey(Member record);", "int updateByPrimaryKey(StudentEntity record);", "int updateByPrimaryKey(Tourst record);", "int updateByPrimaryKey(SPerms record);", "int updateByPrimaryKeySelective(FactRoomLog record);", "int updateByPrimaryKey(Powers record);", "int updateByPrimaryKey(TLinkman record);", "int updateByPrimaryKey(TherapyAction record);", "int updateByPrimaryKey(DataSync record);", "public void update (String key_val, String val)\n {\n }", "Code updateCode(Code code)\n throws DAOException;", "int updateByPrimaryKeySelective(TLinkman record);", "int updateByPrimaryKey(Card record);", "int updateByPrimaryKey(Shipping record);", "int updateByPrimaryKey(ExamRoom record);", "int updateByPrimaryKeySelective(QuestionOne record);", "int updateByPrimaryKey(ParkCurrent record);", "int updateByPrimaryKeySelective(StudentGuardian record);", "int updateByPrimaryKeySelective(UserTips record);", "@UpdateProvider(type = ServeInfoSqlProvider.class, method = \"updateById\")\n int update(ServeInfoDO model);", "int updateByPrimaryKey(UsrMmenus record);", "int updateByPrimaryKeySelective(TblBTSSysFunctionDO record);", "int updateByPrimaryKey(Book record);", "int updateByPrimaryKey(Book record);", "int updateByPrimaryKey(Location record);", "int updateByPrimaryKeySelective(Prueba record);", "int updateByPrimaryKeySelective(StudentEntity record);", "int updateByPrimaryKey(StudentGuardian record);" ]
[ "0.58494246", "0.57861996", "0.57462573", "0.57462573", "0.5703731", "0.5660558", "0.564182", "0.56294423", "0.56160706", "0.56160706", "0.5606159", "0.5591771", "0.5563881", "0.5561071", "0.5558994", "0.55474275", "0.55389017", "0.553155", "0.55280054", "0.55169636", "0.5504888", "0.5499471", "0.5496441", "0.54915655", "0.5488102", "0.5488102", "0.5488102", "0.54844046", "0.5474747", "0.5472189", "0.5470775", "0.5470627", "0.54669714", "0.54669714", "0.54669714", "0.54669714", "0.54669714", "0.54638755", "0.5448967", "0.54477906", "0.5445186", "0.54384303", "0.54380214", "0.5430081", "0.5429517", "0.5429517", "0.5429517", "0.54282606", "0.5428224", "0.5427604", "0.5427604", "0.5427604", "0.5427604", "0.54269254", "0.5423652", "0.5420564", "0.54205406", "0.5419862", "0.541809", "0.54125", "0.54111713", "0.5410689", "0.5410609", "0.5409497", "0.54086304", "0.540701", "0.5403848", "0.54023063", "0.5399303", "0.5397536", "0.5397163", "0.53843075", "0.53817403", "0.5377778", "0.537658", "0.53747165", "0.5372561", "0.5370986", "0.53667283", "0.53637254", "0.53632915", "0.5361138", "0.5360992", "0.53603345", "0.53600127", "0.53596914", "0.53580594", "0.5356245", "0.5355884", "0.5355693", "0.53505504", "0.5348585", "0.5346707", "0.53444767", "0.5341451", "0.5341451", "0.5341018", "0.5340487", "0.5337971", "0.53376657" ]
0.6940746
0
Prevents the occasional unintentional call. I needed this.
@Override public void onReceive(Context context, Intent intent) { if (mDownloadedFileID == -1) return; Toast.makeText(getApplicationContext(), getString(R.string.atom_ui_tip_download_success), //To notify the Client that the file is being downloaded Toast.LENGTH_LONG).show(); QunarWebActvity.this.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public boolean isSafe() {\n return false;\r\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void doTheFaultyThing();", "protected abstract void beforeCall();", "public void trySafeMethod(){\n safeMethod();\n }", "static void ignore() {\n }", "static void m61437a() {\n if (!m61442b()) {\n throw new IllegalStateException(\"Method call should happen from the main thread.\");\n }\n }", "protected boolean func_70041_e_() { return false; }", "public boolean method_4088() {\n return false;\n }", "private static void notPossible () {\r\n\t\tSystem.out.println(\"This operation is not possible\");\r\n\t}", "public void setStuckCall(){\n this.stuckCall = true;\n }", "public void swrap() throws NoUnusedObjectExeption;", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "public void smell() {\n\t\t\n\t}", "public boolean method_2434() {\r\n return false;\r\n }", "public void forceReasonerReSynchronization();", "private void wtfIfInLock() {\n if (Thread.holdsLock(mLockDoNoUseDirectly)) {\n Slogf.wtfStack(LOG_TAG, \"Shouldn't be called with DPMS lock held\");\n }\n }", "@Override\n\tpublic void exucute() {\n\t\t\n\t}", "public boolean method_196() {\r\n return false;\r\n }", "protected void failed()\r\n {\r\n //overwrite\r\n }", "@Override\r\n\t\t\tpublic boolean onIntercept() {\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\n public boolean onCall() {\n return true;\n }", "public boolean method_2453() {\r\n return false;\r\n }", "@Override\n protected boolean shouldSendThrowException() {\n return false;\n }", "@Override\n public boolean isSoft() {\n return true;\n }", "public static void SelfCallForLoading() {\n\t}", "public boolean method_4093() {\n return false;\n }", "public boolean method_194() {\r\n return false;\r\n }", "@Override\n\tpublic void coreProblemExecution() {\n\t\t\n\t}", "@Override\n\tpublic void coreProblemExecution() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "static void badMethod() {\n doStuff();\n }", "public boolean method_218() {\r\n return false;\r\n }", "public boolean method_216() {\r\n return false;\r\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "public boolean method_108() {\r\n return false;\r\n }", "@Override\n public Object preProcess() {\n return null;\n }", "public void inquiryError() {\n\t\t\n\t}", "public static void doNothing(){\n\t}", "public boolean proceedOnErrors() {\n return false;\n }", "public boolean method_208() {\r\n return false;\r\n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic boolean postIt() {\n\t\treturn false;\n\t}", "protected void doSomethingElse()\r\n {\r\n \r\n }", "public boolean method_214() {\r\n return false;\r\n }", "public void isDeceased(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "public void execute()\n/* */ throws Pausable, Exception\n/* */ {\n/* 378 */ errNotWoven(this);\n/* */ }", "protected boolean reallyCancel() throws Exception { return true; }", "@Override\n\tpublic boolean takeControl() {\n\t\treturn false;\n\t}", "public boolean method_4132() {\n return false;\n }", "public boolean method_198() {\r\n return false;\r\n }", "@Override\n\tpublic void call() {\n\t\t\n\t}", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "@Override\n\tpublic synchronized Throwable fillInStackTrace() {\n\t\treturn super.fillInStackTrace();\n\t}", "@Override\r\n\tpublic void SAFE_TO_EAT() {\n\t\tSystem.out.println(\"Yes\");\r\n\t}", "void cannotHandle(Call call) {\n\t\t// escalate the call to a higher rank\n\t\tcall.rank = rank + 1;\n\t\tcallHandler.dispatchCall(call);\n\t\tfree = true;\n\t\tcallHandler.getNextCall(this);\n\t}", "void unavailable();", "void unavailable();", "@Override\n\tpublic boolean handlesThrowable() {\n\t\treturn false;\n\t}", "public void method_6349() {\r\n super.method_6349();\r\n }", "public boolean method_3897() {\r\n return false;\r\n }", "public boolean method_210() {\r\n return false;\r\n }", "boolean ignoreExceptionsDuringInit();", "public boolean method_4102() {\n return false;\n }", "synchronized boolean ignoreForRecovery() {\n return ignoreForRecovery;\n }", "protected void userErrorOccurred()\n {\n traceOK = false;\n }", "public final void mo51373a() {\n }", "@Override\r\n\tprotected void onCancelled() {\n\t\tsuper.onCancelled();\r\n\t}", "protected void onBadCoords()\n\t{\n\t}", "public void excavate();", "@Override\n public boolean c() {\n return false;\n }", "public void doNothing(){\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\n\tpublic void suppress() {\n\t\tsuppressed = true;\n\t}", "@Override\r\n protected final void checkNotPrepared ()\r\n {\r\n if (isPrepared ())\r\n throw new IllegalStateException (\"This object was already prepared and can therefore not be modified: \" +\r\n toString ());\r\n }", "@Override\n public boolean isFrozen() {\n return true;\n }", "default boolean pollOnExecutionFailed() {\n return false;\n }", "@Override\n\tprotected void interr() {\n\t}", "boolean isIgnorable() { return false; }", "private TedCorrigendumHandler() {\n throw new AssertionError();\n }", "void berechneFlaeche() {\n\t}", "@Override\n\tboolean isRegistedMethodNotNeed() {\n\t\treturn true;\n\t}", "@Override\n public boolean ignoreAbsorbedDamage() {\n return false;\n }", "@Override\n public boolean ignoreAbsorbedDamage() {\n return false;\n }", "private Unescaper() {\n\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "@Override\r\n\tpublic void doException() {\n\r\n\t}", "public boolean refresh() {\n/* 153 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private final void m90475d() {\n RxBus.m86979a().mo84367a(new UnFriendlyEvent(1));\n popSelf();\n }", "@Override\n\tpublic void suppress() {\n\n\t}", "@Override\n public boolean d() {\n return false;\n }", "public void method_9653() {\r\n this.field_9138.method_4479(false);\r\n }", "@Override\n\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t\t\t\t\t}", "@Override\n\tprotected void onCancelled()\n\t{\n\t\tsuper.onCancelled();\n\t}", "protected void onFirstUse() {}", "public synchronized void mo28699e() {\n if (mo27566d()) {\n throw new PooledByteBuffer.C3959a();\n }\n }", "@Override\n\tprotected Object run() {\n\t\treturn null;\n\t}", "@Override\n protected void prot() {\n }" ]
[ "0.6557121", "0.6444977", "0.6191014", "0.61556965", "0.608798", "0.60020566", "0.59867567", "0.59741116", "0.59685475", "0.5934289", "0.592331", "0.59211594", "0.5907866", "0.5907866", "0.59023887", "0.5902047", "0.58981425", "0.5893067", "0.58918196", "0.58803326", "0.5877441", "0.58664924", "0.58271885", "0.58131486", "0.5812969", "0.57898283", "0.5786178", "0.5776633", "0.57710356", "0.5764927", "0.5764927", "0.57568693", "0.57533395", "0.57489157", "0.5739545", "0.5738486", "0.57371354", "0.57262", "0.5725653", "0.57252395", "0.57173", "0.5708914", "0.5690876", "0.56858945", "0.56767035", "0.5669109", "0.56652814", "0.5659908", "0.56543344", "0.56524", "0.5651088", "0.56468767", "0.5646644", "0.5643143", "0.56341124", "0.5629903", "0.5629647", "0.5622889", "0.5622889", "0.56205374", "0.56126034", "0.5599752", "0.5584847", "0.5581504", "0.5575701", "0.55753976", "0.55727917", "0.5571992", "0.5571504", "0.5560879", "0.55587155", "0.55497426", "0.5549034", "0.5546369", "0.5546369", "0.5546369", "0.5545361", "0.5540563", "0.5535942", "0.55354327", "0.5534626", "0.5532815", "0.5524036", "0.5521478", "0.5521341", "0.5521341", "0.5519999", "0.5518306", "0.5518306", "0.55155736", "0.5513053", "0.5512188", "0.55086035", "0.5506829", "0.5502183", "0.5501542", "0.54947066", "0.54934466", "0.54837584", "0.5477861", "0.54775286" ]
0.0
-1
Resets the array to its original configuration and return it.
public int[] reset() { return nums; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[] reset() {\n\t\t\treturn originalArr;\n\t\t}", "public int[] reset() {\n return Arrays.copyOf(origin, origin.length);\n }", "public int[] reset() {\r\n return reset;\r\n }", "public int[] reset() \n {\n return reset;\n }", "public int[] reset() {\n return store;\n }", "private int[] reset() {\n return data;\n }", "public int[] reset() {\n return nums.clone();\n }", "private T[] modifyArray(T[] array) {\n array[index] = null;\n return array;\n }", "@SuppressWarnings({\"unused\", \"RedundantSuppression\"})\n public void resetArray() {\n Utils.postToMainLoop(new Runnable() {\n @Override\n public void run() {\n mBaseCacheAdapter.resetArray();\n mBaseRecyclerViewAdapter.notifyDataSetChanged();\n }\n\n @NonNull\n @Override\n public String toString() {\n return \"BaseCacheAdapterWrapper.resetArray()\";\n }\n });\n }", "public static int[] reset() {\n nums = Arrays.copyOf(numsBackUp, numsBackUp.length);\n return nums;\n }", "@Override\n public void clear() {\n array.reset();\n }", "public void compact()\n {\n array = toArray();\n }", "void reset() {\n for (int i = 0; i < array.length; i++) {\n array[i] = -1;\n }\n }", "public int[] reset() {\n\t\treturn memos;\n\t}", "private void reset(){\n int j=0;\n for(int i=0; i<array.length; i++){\n if(j == itemCount) {return;}\n if(array[i]!=null){\n temp[j] = array[i];\n j++;\n }\n }\n }", "public int[] reset() {\n System.out.println(Arrays.toString(soluzioneIniziale));\n return soluzioneIniziale;\n }", "private void restartArray() {\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n Start.shemaArray[i][j].baseModel.state = 0;\n }\n }\n }", "public int[] reset() {\r\n return nums;\r\n }", "public GoLBoard reset()\n\t{\n\t\treturn reset(new GoLRandomInitializer(setSize));\n\t}", "void reset()\n {\n reset(values);\n }", "public int[] clone()\n\t{\t\n\t\tint[] newArray = new int[array.length];\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tnewArray[index] = array[index];\n\t\t}\n\t\treturn newArray;\n\t}", "public int[] reset() {\r\n\t\t\treturn this.initNums;\r\n\t\t}", "@Override\r\n\tpublic void reset() {\r\n\t\tthis.priorityElements = Lists.newArrayList(originalElements);\r\n\t\tCollections.shuffle(priorityElements);\r\n\t\tthis.currentElements = Lists.newArrayListWithExpectedSize(2 * originalElements.size());\r\n\t\tthis.currentElements.addAll(originalElements);\r\n\t}", "public void restore() {\n currentIm= originalIm.copy();\n }", "public void resetChangeableArrays(int[] reg)\n {\n valList = new LinkedList<Integer>();\n possibilityList = new LinkedList<Point>();\n for(int j = 0; j<accumulator.length; j ++)Arrays.fill(accumulator[j],0);\n //accumulator = zeroAccumulator;\n region = reg;\n \n }", "private int[] cloneArr(final int[] origArr) {\n return Arrays.copyOf(origArr, origArr.length);\n }", "public Array<T> compactClone()\n {\n Array<T> out = Array.fromUnsafe(new Object[next], next);\n System.arraycopy(array, 0, out.array, 0, next);\n return out;\n }", "public void reset_array() {\r\n\t\tfor(int i=0;i<9;i++) {\r\n\t\t\ts[i]=\"\";\r\n\t\t}\r\n\t}", "public int[] shuffle() {\n\t\t\tif (originalArr == null)\n\t\t\t\treturn null;\n\t\t\tint randomArr[] = originalArr.clone();\n\t\t\tfor (int i = 1; i < originalArr.length; i++) {\n\t\t\t\tint newIndex = random.nextInt(i + 1);\n\t\t\t\tswap(i, newIndex, randomArr);\n\t\t\t}\n\t\t\treturn randomArr;\n\t\t}", "public UnorderedArray cloneArray(){\r\n UnorderedArray clone = new UnorderedArray(maxSize);\r\n clone.mArray = mArray.clone();\r\n clone.numItems = numItems;\r\n return clone;\r\n }", "public void reset() {\n for (int i = 0; i < this.numRows; i++) {\n this.rows[i] = new int[0];\n }\n for (int k = 0; k < this.numCols; k++) {\n this.cols[k] = new IntOpenHashSet();\n }\n }", "public OccList reset()\n {\n size = 0;\n return this;\n }", "private void reset() {\n\t\tdata.clear();\n\t}", "public void reSize() {\n int newSize = arr.length * 2;\n arr = Arrays.copyOf(arr, newSize);\n }", "public void reset() {\n this.setIndex(0);\n }", "private void resetMask() {\n maskArray = new int [][]{\n {0,0,0,0},\n {0,0,0,0},\n {0,0,0,0},\n {0,0,0,0}\n };\n }", "public void reset() {\n this.predictor.reset();\n for(int i=0; i<this.predictedIntraday.length; i++) {\n this.predictedIntraday[i] = 0;\n }\n }", "public void reset() {\n\t\tlength = 0;\n\t}", "@Override\n public void resetAllValues() {\n }", "private static void modifyArray(int[] array) {\n\t\t\n\t\tarray[0] = 99;\n\t\t\n\t\tarray = new int[5] ;\n\t\treturn;\n\t}", "public GoLBoard reset(GoLInitializer myInitializer)\n\t{\n \tmyGoLCell = myInitializer.getCellArray();\n \treturn this;\n\t}", "protected void recycleArray(Bitmap[][] array)\n\t{\n\t\tint length = array.length;\n\t\tfor(int i = 0; i < length; i++)\n\t\t{\n\t\t\tif(array[i] != null)\n\t\t\t{\n\t\t\t\tint length2 = array[i].length;\n\t\t\t\tfor(int j = 0; j < length2; j++)\n\t\t\t\t{\n\t\t\t\t\tif(array[i][j] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tarray[i][j].recycle();\n\t\t\t\t\t\tarray[i][j] = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void resetGrid() {\n grid = new byte[grid.length];\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "@Override\n public void clear() {\n array = null;\n }", "@Override\n\tpublic void resetToExisting() {\n\t\t\n\t}", "private void reallocate() {\n capacity = 2 * capacity;\n ElementType[] newData = (ElementType[]) new Object[DEFAULT_INIT_LENGTH];\n System.arraycopy(elements, 0, newData, 0, size);\n elements = newData;\n }", "public static void fillArray() {\r\n\t\tfor (int i = 0; i < myOriginalArray.length - 1; i++) {\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tmyOriginalArray[i] = rand.nextInt(250);\r\n\t\t}\r\n\t\t// Copies original array 4 times for algorithm arrays\r\n\t\tmyBubbleArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmySelectionArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmyInsertionArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmyQuickArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t}", "public void reset() {\n this.index = this.startIndex;\n }", "public DynamicArray<E> copy(DynamicArray<E> array) {\n synchronized (this) {\n return this.array;\n }\n }", "protected void recycleArray(Bitmap[] array)\n\t{\n\t\tint length = array.length;\n\t\tfor(int i = 0; i < length; i++)\n\t\t{\n\t\t\tif(array[i] != null)\n\t\t\t{\n\t\t\t\tarray[i].recycle();\n\t\t\t\tarray[i] = null;\n\t\t\t}\n\t\t}\n\t}", "public void reset() {\n\t\tfor (int i=0; i < this.WAYS; i++) {\n\t\t\tthis.cache[i] = new Line(this.alpha[i], REPL_VAL);\n\t\t}\n\t\t// set mru\n\t\tthis.cache[this.WAYS-1].state = INSERT_VAL;\n\t}", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public int[] cloneMemory(){\n return memory.clone();\n }", "public void reset () {\n\t\topen();\n\t\ttry {\n\t\t\tcontainer.setLength(0);\n\t\t\treservedBitMap.setLength(0);\n\t\t\tupdatedBitMap.setLength(0);\n\t\t\tfreeList.setLength(0);\n\t\t\tsize = 0;\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t}\n\t}", "public void resetField() {\n setFields(new boolean[getLength()][getHeight()]);\n }", "@SuppressWarnings(\"unchecked\")\n public final T[] obtainArrayCopy() {\n final T[] localArray = array;\n if (localArray == null) return (T[]) Array.newInstance(clazz, 0);\n\n return Arrays.copyOf(localArray, localArray.length);\n }", "public void newArray() {\n\t\t\n\t\tE[] newArray= (E[]) new Object[list.length * 2]; //Holds the old elements from the list array while new list array is being made\n\t\t\n\t\tfor(int i = 0; i < list.length; i++) {\n\t\t\t\n\t\t\tnewArray[i] = list[i]; //Copy the old list array into the newArray\n\t\t}\n\t\t\n\t\tlist = newArray; //Point the old array at the newArray starting memory location\n\t\t\n\t}", "private void trimArray()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"[INFO] <RADIOBUTTON_PANEL_BUILDER> Running trimArray\");\r\n\t\t\t\r\n\t\t\tJRadioButton[] newArray = new JRadioButton[nextRadioButtonLocation]; // Create a new array of the correct size\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < nextRadioButtonLocation; i++) // For each object in the array\r\n\t\t\t{\r\n\t\t\t\tnewArray[i] = radioButtons[i]; // Copy the object\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tradioButtons = newArray; // Store the new trimmed array in components\r\n\t\t}", "@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}", "private void reallocate(){\n capacity = 2 * capacity;\n theData = Arrays.copyOf(theData, capacity);\n }", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "public void reset () {}", "public void reset() {\n\n\t}", "@Override\r\n\tpublic void reset()\r\n\t{\r\n\t}", "@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}", "public ResizingArray() {\r\n super();\r\n this.aObjects = new Object[ResizingArray.DEFAULT_SIZE];\r\n this.aFreeElements = new int[ResizingArray.DEFAULT_SIZE];\r\n }", "private final void restoreOriginalGraph() {\n // Safeguard against multiple restores\n if (startIndex == -1) return;\n \n markEdgesFrom(startIndex, false);\n markEdgesFrom(endIndex, false);\n markHasEdgeToGoal(false);\n nOutgoingEdgess[endIndex] = endOriginalSize;\n nOutgoingEdgess[startIndex] = startOriginalSize;\n nEdges = originalNEdges;\n\n nNodes = originalSize;\n startIndex = -1;\n endIndex = -1;\n }", "public void reallocate()\r\n\t{\r\n\t\tE[] newArray = (E[]) new Object[capacity * 2];\r\n\t\tint i = 0;\r\n\t\tfor(i = 0; i < this.size(); i++)\r\n\t\t{\r\n\t\t\tnewArray[i] = innerArray[(front + i) % capacity];\r\n\t\t\tSystem.out.println((front + i) % capacity);\r\n\t\t}\r\n\t\tfront = 0;\r\n\t\trear = this.size() - 1;\r\n\t\tcapacity = capacity * 2;\r\n\t\tinnerArray = newArray;\r\n\t}", "public void reset(final byte[] treeData) {\n \t\traw = treeData;\n \t\trawPtr = 0;\n \t}", "protected abstract void reset();", "public void reset() {\r\n\t\tcards.addAll(dealt);\r\n\t\tdealt.clear();\r\n\t}", "public static int[] copy(int[] theArray) {\n\n return theArray.clone();\n }", "public void reset() {\n\n }", "public OpRewriter reset() {\n result = OpSequence.create();\n return this;\n }", "public T[] toArray() {\n return null;\n }", "private static void resetGroupLineArrays() {\n // Reset the arrays to make sure that we have uptodate information in them\n itemsArray = null;\n itemsArrayForAlterations = null;\n itemsArrayForOpenDeposit = null;\n }", "@Override\n public void reset() \n {\n\n }", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();" ]
[ "0.76831263", "0.6969837", "0.6902472", "0.68346685", "0.6712453", "0.6639414", "0.6442922", "0.6318073", "0.628754", "0.6259741", "0.62571716", "0.61955863", "0.6182389", "0.6126946", "0.60903704", "0.601111", "0.60027075", "0.5967417", "0.5868995", "0.5866338", "0.5781086", "0.5766629", "0.5752213", "0.5714192", "0.5683923", "0.56763655", "0.56645596", "0.5660544", "0.5655626", "0.5633615", "0.5632107", "0.5600066", "0.55572486", "0.55383986", "0.55328965", "0.55196655", "0.55192876", "0.5511004", "0.550168", "0.54987395", "0.5495786", "0.54705226", "0.5469066", "0.54648817", "0.54565424", "0.5450902", "0.54209703", "0.5402436", "0.5387264", "0.53785765", "0.5377447", "0.53707665", "0.5369688", "0.53692406", "0.53409094", "0.53393126", "0.53373724", "0.53357625", "0.5332158", "0.5332024", "0.53141755", "0.5311847", "0.5311847", "0.5311847", "0.5311847", "0.5308099", "0.5285711", "0.5277009", "0.5272304", "0.5270265", "0.52692896", "0.5267808", "0.52522665", "0.5251653", "0.52456975", "0.52431065", "0.5241236", "0.5239921", "0.523634", "0.5233099", "0.52299786", "0.5225365", "0.5225365", "0.5225365", "0.5225365", "0.5225365", "0.5225365", "0.5225365", "0.5225365", "0.5225365", "0.5225365", "0.5225365", "0.5225365", "0.5225365" ]
0.5941242
23
Returns a random shuffling of the array.
public int[] shuffle() { int[] shuffle = new int[nums.length]; int[] clone = nums.clone(); int last = clone.length - 1; for(int i = 0; i < clone.length; i++){ int index = random.nextInt(last + 1); shuffle[i] = clone[index]; clone[index] = clone[last--]; } return shuffle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int[] shuffle() {\n int len = data_random.length;\n Random rand = new Random();\n for (int i = 0; i < len; i++) {\n int r = rand.nextInt(len);\n int temp = data_random[i];\n data_random[i] = data_random[r];\n data_random[r]=temp;\n }\n return data_random;\n }", "public int[] shuffle() {\n\t\t\tif (originalArr == null)\n\t\t\t\treturn null;\n\t\t\tint randomArr[] = originalArr.clone();\n\t\t\tfor (int i = 1; i < originalArr.length; i++) {\n\t\t\t\tint newIndex = random.nextInt(i + 1);\n\t\t\t\tswap(i, newIndex, randomArr);\n\t\t\t}\n\t\t\treturn randomArr;\n\t\t}", "public int[] shuffle() {\n int[] result = reset();\n\n Random rand = new Random();\n for (int i = 0; i < result.length; i++) {\n int j = rand.nextInt(result.length - i) + i;\n int tmp = result[i];\n result[i] = result[j];\n result[j] = tmp;\n }\n return result;\n }", "private static void shuffleArray(int[] array)\n {\n int index, temp;\n Random random = new Random();\n for (int i = array.length - 1; i > 0; i--)\n {\n index = random.nextInt(i + 1);\n temp = array[index];\n array[index] = array[i];\n array[i] = temp;\n }\n }", "Actor[] shuffle(Actor[] array) {\n for (int i = array.length; i > 0; i--) {\n int k = rand.nextInt(i);\n Actor tmp = array[k];\n array[k] = array[i - 1];\n array[i - 1] = tmp;\n }\n return array;\n }", "public static <T> void shuffle(T[] array){\n Random rnd = ThreadLocalRandom.current();\n for (int i = array.length - 1; i > 0; i--)\n {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n T a = array[index];\n array[index] = array[i];\n array[i] = a;\n }\n }", "public static <T> void shuffle(T[] array){\n Random rnd = ThreadLocalRandom.current();\n for (int i = array.length - 1; i > 0; i--)\n {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n T a = array[index];\n array[index] = array[i];\n array[i] = a;\n }\n }", "private static void shuffleArray(final int[] a) {\n for (int i = 1; i < a.length; i++) {\n int j = random.nextInt(i);\n int temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }\n }", "private static void shuffleArray(int[] ar) {\n Random rnd = ThreadLocalRandom.current();\n for (int i = ar.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i + 1);\n int a = ar[index];\n ar[index] = ar[i];\n ar[i] = a;\n }\n }", "public void shuffle();", "public int[] shuffle() {\r\n if (nums == null) return nums;\r\n int tmp = 0;\r\n \r\n int[] newNums = nums.clone();\r\n \r\n for (int i=1; i<newNums.length; i++) {\r\n int selectPos = rd.nextInt(i+1);\r\n tmp = newNums[i];\r\n newNums[i] = newNums[selectPos];\r\n newNums[selectPos] = tmp;\r\n }\r\n \r\n return newNums;\r\n }", "public int[] shuffle() {\r\n int max = nums.length - 1;\r\n for (int i = 0; i < nums.length; i++) {\r\n int index = new Random().nextInt(max)%(max - i + 1) + i;\r\n int tmp = nums[i];\r\n nums[i] = nums[index];\r\n nums[index] = tmp;\r\n }\r\n return nums;\r\n }", "public static void shuffle(int[] array)\n {\n int n = array.length;\n for (int i = 0; i < n; i++)\n {\n // choose index uniformly in [0, i]\n //explicit conversion to int\n int r = (int) (Math.random() * (i + 1));\n swap(array,r,i);\n }\n }", "public int[] shuffle() {\n for (int i = nums.length - 1; i >= 0; i--) {\n swap(i, rnd.nextInt(i + 1));\n }\n \n return nums;\n }", "void shuffleArray(String[] ar) {\n for (int i = ar.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n String a = ar[index];\n ar[index] = ar[i];\n ar[i] = a;\n }\n }", "void shuffle();", "void shuffle();", "private static char[] shuffle(char[] array) {\n\t\tRandom rand = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tint randIndex = rand.nextInt(array.length - 1);\n\t\t\tchar temp = array[i];\n\t\t\tarray[i] = array[randIndex];\n\t\t\tarray[randIndex] = temp;\n\t\t}\n\t\treturn array;\n\t}", "public static void shuffle(int[] a) {\r\n int N = a.length;\r\n for (int i = 0; i < N; i++) {\r\n int r = i + uniform(N-i); // between i and N-1\r\n int temp = a[i];\r\n a[i] = a[r];\r\n a[r] = temp;\r\n }\r\n }", "public void shuffle() {\n for (int i = size - 1; i > 0; i--) {\n swap(i, (int)(Math.random() * (i + 1)));\n }\n }", "public static void shuffle( int[] a ) {\n int N = a.length;\n \n for ( int i = 0; i < N; i++ ) {\n int r = i + uniform( N - i ); // between i and N-1\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "public static int[] shuffle() {\n Random random = new Random();\n for (int i = 0; i < len; i++) {\n int j = random.nextInt(len);\n int temp = nums[i];\n nums[i] = nums[j];\n nums[j] = temp;\n }\n return nums;\n }", "static void shuffleArray(String[] ar)\r\n {\n Random rnd = ThreadLocalRandom.current();\r\n for (int i = ar.length - 1; i > 0; i--)\r\n {\r\n int index = rnd.nextInt(i + 1);\r\n // Simple swap\r\n String a = ar[index];\r\n ar[index] = ar[i];\r\n ar[i] = a;\r\n }\r\n }", "public int[] shuffle() {\n if (nums == null) {\n return null;\n }\n int[] a = nums.clone();\n for (int j = 1; j < a.length; j++) {\n // 类似蓄水池采样算法\n // i == j -> 1/(1+j)\n // j != j -> (1 - 1/(1+j)) * (1/j) = 1/(1/j)\n int i = random.nextInt(j + 1);\n swap(a, i, j);\n }\n return a;\n }", "public int[] shuffle() {\n int[] shuffle = nums.clone();\n for(int i = 0; i < shuffle.length; i++){\n int index = random.nextInt(i + 1);\n swap(shuffle,i,index);\n }\n return shuffle;\n }", "public int[] shuffle() {\n int i = random.nextInt(nums.length);\n int j = random.nextInt(nums.length);\n swap(temp, i , j);\n return temp;\n }", "public int[] shuffle() {\n int[] res = new int[nums.length];\n int r;\n for (int i = 0; i < nums.length; i++) {\n r = random.nextInt(i + 1);\n res[i] = res[r];\n res[r] = nums[i];\n }\n\n\n return res;\n }", "static void shuffleArray(int[] ar) {\n Random rnd = new Random();\n for (int i = ar.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n int a = ar[index];\n ar[index] = ar[i];\n ar[i] = a;\n }\n }", "public int[] shuffle() {\n int[] random = new int[nums.length];\n for (int i = 0; i < nums.length; i++) {\n // generate a random between 0 ~ i\n int r = (int)(Math.random() * (i + 1));\n random[i] = random[r];\n random[r] = nums[i];\n }\n return random;\n }", "public static void shuffle( Object[] a ) {\n int N = a.length;\n for ( int i = 0; i < N; i++ ) {\n int r = i + uniform( N - i ); // between i and N-1\n Object temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "public int[] shuffle() {\n\t\tRandom r = new Random();\n\t\tfor (int i = 0; i < this.nums.length; i++) {\n\t\t\tint index = r.nextInt(this.nums.length);\n\t\t\tif (i != index) {\n\t\t\t\tnums[i] = nums[i] ^ nums[index];\n\t\t\t\tnums[index] = nums[i] ^ nums[index];\n\t\t\t\tnums[i] = nums[i] ^ nums[index];\n\t\t\t}\n\t\t}\n\t\treturn nums;\n\t}", "public void shuffle() {\n for (int i = 0; i < this.cards.length ; i++ ) {\n double x = Math.floor(Math.random() * ((double)this.cards.length - (double)0)) + (double)0;\n Card temp = this.cards[i];\n this.cards[i]= this.cards[(int)x];\n this.cards[(int)x]= temp;\n }\n }", "public static int[] selectionShuffle(int[] arr) { \n int temp;\n int idx;\n for(int i = 0; i < arr.length; i ++){\n idx = (int) (Math.random() * arr.length);\n temp = arr[i];\n arr[i] = arr[idx];\n arr[idx] = temp;\n }\n return arr;\n }", "public static void shuffle(Object[] a) {\r\n int N = a.length;\r\n for (int i = 0; i < N; i++) {\r\n int r = i + uniform(N-i); // between i and N-1\r\n Object temp = a[i];\r\n a[i] = a[r];\r\n a[r] = temp;\r\n }\r\n }", "public int[] shuffle() {\n int[] shuffled = Arrays.copyOf(origin, origin.length);\n \n for (int i = shuffled.length - 1; i > 0; i--) {\n int index = random.nextInt(i + 1);\n int temp = shuffled[i];\n shuffled[i] = shuffled[index];\n shuffled[index] = temp;\n }\n return shuffled;\n }", "public static void shuffle(double[] a) {\r\n int N = a.length;\r\n for (int i = 0; i < N; i++) {\r\n int r = i + uniform(N-i); // between i and N-1\r\n double temp = a[i];\r\n a[i] = a[r];\r\n a[r] = temp;\r\n }\r\n }", "public static void shuffle( double[] a ) {\n int N = a.length;\n \n for ( int i = 0; i < N; i++ ) {\n int r = i + uniform( N - i ); // between i and N-1\n double temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "public static void shuffle(String[] arrayList){\n int num=arrayList.length; \n for(int j=0;j<60;j++){ // the number of shuffling>50 times, so I choose 60 times\n for(int i=0;i<num;i++){ \n int index=(int)(Math.random()*num);\n //Swap the position of elements in the array at that index with the first element\n String temp=arrayList[i]; \n arrayList[i]=arrayList[index];\n arrayList[index]=temp;\n }}}", "public void shuffle()\r\n\t{\r\n\t\tRandom rand = ThreadLocalRandom.current();\r\n\t\t\r\n\t\tfor (int i = topCard; i > 0; i--)\r\n\t\t{\r\n\t\t\tint index = rand.nextInt(i + 1);\r\n\t\t\tString temp = cards[index];\r\n\t\t\tcards[index] = cards[i];\r\n\t\t\tcards[i] = temp;\r\n\t\t}\r\n\t}", "public int[] shuffle() {\n int[] shuffled = new int[length];\n for (int i = 0; i < length; i++)\n shuffled[i] = nums[i];\n for (int i = 0; i < length; i++) {\n int randomIndex = (int) (Math.random() * length);\n int temp = shuffled[i];\n shuffled[i] = shuffled[randomIndex];\n shuffled[randomIndex] = temp;\n }\n return shuffled;\n }", "static public <T> void shuffle(T[] a, RNG rng) {\r\n\r\n for (int i = a.length - 1; i > 0; i--) {\r\n int j = (int) rng.random((i + 1));\r\n //System.out.println(j);\r\n T x = a[i];\r\n a[i] = a[j];\r\n a[j] = x;\r\n }\r\n \r\n }", "private static void scrambleArray(int[] a, boolean randomize) {\n\t\tfor (int k = 0; k < a.length; k++)\n\t\t\ta[k] = k;\n\t\tif (randomize) // use unpredictable random shuffle\n\t\t{\n\t\t\tRandom gen = new Random();\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, gen.nextInt(a.length));\n\t\t\t}\n\t\t} else // use repeatable math formula for shuffle\n\t\t{\n\t\t\tint cell = (int) (a.length * 3.14159) % a.length;\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, cell);\n\t\t\t\tcell = (int) (cell * 3.14159) % a.length;\n\t\t\t}\n\t\t}\n\n\t}", "public static void shuffle(int data[]) {\n\n }", "public static int[] shuffle(int[] deck){\n\t\tRandom rnd = new Random();\n\t for (int i = deck.length - 1; i > 0; i--)\n\t {\n\t int index = rnd.nextInt(i + 1);\n\t int a = deck[index];\n\t deck[index] = deck[i];\n\t deck[i] = a;\n\t }\n\t return deck;\n\t}", "public int[] shuffle() {\r\n\t\t\tRandom r = new Random();\r\n\t\t\tint[] shuffle = new int[this.nums.length];\r\n\t\t\tint i = 0;\r\n\t\t\tMap<Integer, Boolean> map = new HashMap<Integer, Boolean>();\r\n\t\t\twhile (i < this.nums.length) {\r\n\t\t\t\tint count = r.nextInt(this.nums.length);\r\n\t\t\t\tif (map.get(count) != null && map.get(count)) {\r\n\t\t\t\t} else {\r\n\t\t\t\t\tshuffle[i] = this.nums[count];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tmap.put(count, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn shuffle;\r\n\t\t}", "public void shuffle() {\n\t\tCollections.shuffle(inds);\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(Arrays.asList(reel));\n\t}", "@Override\n public <T> T[] shuffle(T[] elements) {\n return super.shuffle(elements);\n }", "public void shuffle() {\n Collections.shuffle(this);\n }", "public void shuffle() {\r\n for (int i = 0; i < this.numCards; i++) {\r\n int spot = (int) (Math.random() * ((this.numCards - 1) - i + 1) + i);\r\n Card temp = cards[i];\r\n cards[i] = cards[spot];\r\n cards[spot] = temp;\r\n\r\n\r\n }\r\n }", "public paintIntegers[] shuffle(paintIntegers[] arr){\n paintIntegers[] arrayNew = new paintIntegers[arr.length];\n paintIntegers.initPaint(arrayNew);\n //updates n\n n = arr.length;\n for(int i = 0; i < arrayNew.length; i++){\n arrayNew[i].val = i + 1;\n }//init the array with 0 to n;\n for(int i = 0; i < arrayNew.length; i++){ // shuffles the array\n //random index past current -> thats why random\n int ridx = i + rand.nextInt(arrayNew.length - i);\n //swap values\n int temp = arrayNew[ridx].val;\n arrayNew[ridx].val = arrayNew[i].val;\n arrayNew[i].val = temp;\n }\n // new origarray array\n return arrayNew.clone();\n }", "static void shuffleArray(String[] ar) {\n Random rnd = new Random();\n for (int i = ar.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n String a = ar[index];\n ar[index] = ar[i];\n ar[i] = a;\n }\n }", "public static void scrambledArray(int[] array){\n Random rand=new Random();// use java.util.random method to scramble the index number\n for(int i=0;i<array.length;i++){\n int num=rand.nextInt(15);\n // swap the two different positioned values by swaping their index number \n int temp=array[i];\n array[i]=array[num];\n array[num]=temp; }\n }", "public abstract void shuffled();", "public Deck randomShuffle(){\n\t\tshuffleOnceRandom();\n\t\tshuffleOnceRandom();\n\t\treturn ourDeck;\n\t}", "public static List arrayShuffle(List arrayToShuffle)\n\t{\n\t\tCollections.shuffle(arrayToShuffle);\n\t\treturn arrayToShuffle;\n\t}", "public int[] shuffle() \n {\n List<Integer> al = new ArrayList(reset.length);\n //push all values of the original array onto an arraylist\n for(int i = 0; i < reset.length; i++)\n {\n al.add(reset[i]);\n }\n //shuffles the arraylist\n Collections.shuffle(al);\n return al.stream().mapToInt(Integer::intValue).toArray();\n }", "public void shuffle() {\n\t\tfor (int i = deck.length - 1; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tCard temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcardsUsed = 0;\n\t}", "void myshuffleArray(String[] ar1, String[] ar2) {\n for (int i = ar1.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i+1);\n // Simple swap\n String a1 = ar1[index];\n String a2 = ar2[index];\n ar1[index] = ar1[i];\n ar2[index] = ar2[i];\n ar1[i]=a1;\n ar2[i]=a2;\n }\n }", "public void shuffle() {\n\t\tfor (int i = 51; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tint temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcurrentPosition = 0;\n\t}", "public static void knuthShuffle(Comparable[] a) {\n int r, n = a.length;\n for (int i = 1; i < n; i++) {\n r = randInt(0, i);\n exch(a, i, r);\n }\n }", "public void Shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public void shuffle()\n\t{\n\t\tHashSet<Integer> usedRandoms = new HashSet<Integer>();\n\t\tthis.currentCard = 0;\n\t\tint i= 0;\n\t\twhile (i < deck.length)\n\t\t{\n\t\t\tint another = this.rand.nextInt(NUMBER_OF_CARDS);\n\t\t\tif(!usedRandoms.contains(another))\n\t\t\t{\n\t\t\t\tCard temp = this.deck[i];\n\t\t\t\tthis.deck[i] = this.deck[another];\n\t\t\t\tthis.deck[another] = temp;\n\t\t\t\ti++;\n\t\t\t\tusedRandoms.add(another);\n\t\t\t}\n\t\t}\n\t}", "public int[] shuffle() {\n Collections.shuffle(list);\n int[] temp = new int[list.size()];\n for (int i = 0; i < list.size(); i++) {\n temp[i] = list.get(i);\n }\n return temp;\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t\t// : Shuffle with random seed each time, then we can save the seed\r\n\t\t// Collections.shuffle(cards, new Random(10));\r\n\t}", "public void scramble(){\r\n for (int i = 0; i < data.length / 2; i++){\r\n int randomIndex1 = (int)(Math.random()*(data.length - 1));\r\n int randomIndex2 = (int)(Math.random()*(data.length - 1));\r\n swap(randomIndex1, randomIndex2);\r\n }\r\n }", "public void shuffle(){\r\n Collections.shuffle(cards);\r\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t}", "private static void scrambleArray(Integer[] a, boolean randomize) {\n\t\tfor (int k = 0; k < a.length; k++)\n\t\t\ta[k] = k;\n\t\tif (randomize) {\n\t\t\tRandom gen = new Random();\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, gen.nextInt(a.length));\n\t\t\t}\n\t\t} else {\n\t\t\tint cell = (int) (a.length * 3.14159) % a.length;\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, cell);\n\t\t\t\tcell = (int) (cell * 3.14159) % a.length;\n\t\t\t}\n\t\t}\n\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(Shoe);\n\t}", "public static String [] randomizeArray(String[] array){\n Random rgen = new Random(); // Random number generator\n\n for (int i=0; i<array.length; i++) {\n int randomPosition = rgen.nextInt(array.length);\n String temp = array[i];\n array[i] = array[randomPosition];\n array[randomPosition] = temp;\n }\n\n return array;\n }", "public void shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public final <T> T random(T[] array) {\n return array[random(0, array.length)];\n }", "public void shuffle()\r\n {\r\n // We will start from the last element and swap the cards one by one. We actually\r\n // don't need to swap the last element.\r\n for (int i = valid - 1; i > 0; i --) { \r\n \r\n // By using Math.random, we will get a random integer from 0 to i\r\n int j = (int) ( (i+1) * Math.random()); \r\n \r\n // Swapping with the help of temp instance of Card Class.\r\n Card temp = cards[i]; \r\n cards[i] = cards[j]; \r\n cards[j] = temp; \r\n } \r\n // Prints the random array \r\n }", "public void shuffle(){\n Collections.shuffle(Arrays.asList(this.deck));\n }", "public void shuffle() {\n\n\tcardsLeft = cards.length;\n\tfor (int i=cards.length-1; i>=0; --i) {\n\n\t int r = (int)(Math.random()*(i+1)); // pick a random pos <= i\n\n\t Card t = cards[i];\n\t cards[i] = cards[r];\n\t cards[r] = t;\n\n\t}\n }", "public void shuffle() {\n\t\t\t/*\n\t\t\t * This is very different from the sort method because:\n\t\t\t * @ we decant the cards into an array list;\n\t\t\t * @ we use a library function to do the work;\n\t\t\t * The implementation you write for the sort method should\n\t\t\t * have *neither* of these characteristics.\n\t\t\t */\n\t\t\tList<Card> cards = new ArrayList<Card>();\n\t\t\twhile (!isEmpty()) {\n\t\t\t\tcards.add(draw());\n\t\t\t}\n\t\t\tCollections.shuffle(cards);\n\t\t\tfor (Card c: cards) {\n\t\t\t\tadd(c);\n\t\t\t}\n\t\t}", "public void shuffle() {\n Collections.shuffle(this.plateau);\n }", "public void shuffle() {\n Random rand = new Random();\n for(int i = 0; i < deck.length; i++) {\n // get random index past current index\n int randomVal = i + rand.nextInt(deck.length - i);\n // swaps randomly selected card with card at index i\n Card swap = deck[randomVal];\n deck[randomVal] = deck[i];\n deck[i] = swap;\n }\n }", "public void shuffle() {\n\t\tRandom randIndex = new Random();\n\t\tint size = cards.size();\n\t\t\n\t\tfor(int shuffles = 1; shuffles <= 20; ++shuffles)\n\t\t\tfor (int i = 0; i < size; i++) \n\t\t\t\tCollections.swap(cards, i, randIndex.nextInt(size));\n\t\t\n\t}", "public static String[] randomizeHand(String[] arrayShuffle){\n String[] combine=new String[5];\n int k=-1;\n for(int i=0;i<5;i++){\n int j=(int)(Math.random()*52);\n if(j==k){continue;} // use if statements to avoid from picking up the same item twice\n else{combine[i]=arrayShuffle[j];k=j;\n }}\n return combine;}", "public void shuffle() {\n\t\tfor (int i = 0; i < cards.size(); i++){\n\t\t\t//exchange card i with the random card from i to cards.size() - 1\n\t\t\tint j = Randoms.randomIntInRange(i, cards.size() - 1);\n\t\t\tT c1 = cards.get(i);\n\t\t\tT c2 = cards.get(j);\n\t\t\tcards.set(i, c2);\n\t\t\tcards.set(j, c1);\n\t\t}\n\t}", "public void shuffle(){\n Collections.shuffle(this.deckOfCards);\n }", "private void shuffle(ArrayList<Product> dataSet) {\n\t\tfor (int i = 0; i < dataSet.size(); i++) {\n\t\t\tint k = rand(0, i);\n\t\t\tProduct temp = dataSet.get(k);\n\t\t\tdataSet.set(k, dataSet.get(i));\n\t\t\tdataSet.set(i, temp);\n\t\t}\t\n\t}", "public static void shuffle(int[] deck){\n //temporary variable for swapping the values\n int storage = 0;\n //random integer\n int randomInt;\n for(int i = 0; i < deck.length; i++){\n //set the variable equal to a random integer every time\n randomInt = (int) (Math.random() * (deck.length));\n //store the original deck[i] in storage\n //swap deck[i] and deck[randomInt]\n storage = deck[i];\n deck[i] = deck[randomInt];\n deck[randomInt] = storage;\n }\n }", "public int[] shuffle() {\n\n Random random = new Random();\n int posizioneRandom;\n int i = 0;\n int[] shuffleArray = new int[soluzione.length];\n\n while(i < soluzione.length){\n\n posizioneRandom = random.nextInt(soluzione.length);\n\n if(shuffleArray[posizioneRandom] == 0){\n\n shuffleArray[posizioneRandom] = soluzione[i];\n i++;\n }\n\n continue;\n\n\n }\n\n soluzione = shuffleArray;\n\n return soluzione;\n\n }", "public void shuffle()\n\t{\n\t\tCollections.shuffle(card);\n\t}", "public static void arraySwaping(int array[]) {\r\n\r\n\t\tint temp, randInt;\r\n\r\n\t\tRandom rand = new Random();\r\n\r\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\r\n\t\t\trandInt = rand.nextInt(array.length);\r\n\r\n\t\t\ttemp = array[i];\r\n\t\t\tarray[i] = array[randInt];\r\n\t\t\tarray[randInt] = temp;\r\n\r\n\t\t}\r\n\r\n\t}", "public void shuffle() {\n Collections.shuffle((List<Nummer>) this.albumNummers);\n }", "public JumbleBoard shuffle()\n {\n\n for (int i = 0; i < dice.length; i++)\n {\n for (int j = 0; j < dice[i].length; j++)\n {\n int a = random.nextInt(dice.length);\n int b = random.nextInt(dice[i].length);\n\n char c = dice[i][j];\n dice[i][j] = dice[a][b];\n dice[a][b] = c;\n\n }\n }\n\n return this;\n\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle(){\n //After shuffling dealing starts at deck[0] again\n currentCard = 0;\n //for each card , pick another random card and swap them\n for(int first = 0; first < deck.length; first++){\n int second = randomNumbers.nextInt(NUMBER_OF_CARDS);\n\n //Swap Method to swap current card with randomly selected card\n Card temp = deck[first];\n deck[first] = deck[second];\n deck[second] = temp;\n }\n }", "public void shuffle() {\n List<Card> shuffledCards = new ArrayList<>(52);\n while (cards.size() > 0) {\n int index = random.nextInt(cards.size());\n shuffledCards.add(cards.remove(index));\n }\n cards = shuffledCards;\n }", "private static void __exercise37(final int[] a) {\n final int N = a.length;\n for (int i = 0; i < N; ++i) {\n final int r = StdRandom.uniform(N);\n final int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "private static void __exercise36(final int[] a) {\n final int N = a.length;\n for (int i = 0; i < N; ++i) {\n final int r = i + StdRandom.uniform(N - i);\n final int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "private void shuffleCards(final ICard[] myCards) {\r\n ICard tmp;\r\n int rand;\r\n for (int i = ZERO; i < myCards.length; i++) {\r\n rand = rmd.nextInt(myCards.length);\r\n tmp = myCards[i];\r\n myCards[i] = myCards[rand];\r\n myCards[rand] = tmp;\r\n }\r\n }", "public static int[] shuffleArray(int[] array) {\n\t\tList<Integer> list = new ArrayList<>();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tlist.add(array[i]);\n\t\t}\n\t\tCollections.shuffle(list, rand);\n\t\treturn list.stream().mapToInt(i->i).toArray();\n\t}", "void shuffleDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tint randomNumber = index + (int)(Math.random() * (this.getNumberOfCards() - index));\n\t\t\tCard temp = this.cardsInDeck[randomNumber];\n\t\t\tthis.cardsInDeck[randomNumber] = this.cardsInDeck[index];\n\t\t\tthis.cardsInDeck[index] = temp;\n\t\t}\n\t}", "static void randomize(int arr[], Random r) {\n for (int i = arr.length - 1; i > 0; i--) {\n\n // Pick a random index from 0 to i\n int j = r.nextInt(i);\n\n // Swap arr[i] with the element at random index\n int temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }\n\n }" ]
[ "0.7936801", "0.77815646", "0.7755353", "0.77481586", "0.76945996", "0.7655841", "0.7655841", "0.7645461", "0.7631857", "0.7544279", "0.74736184", "0.74547815", "0.7453523", "0.7453179", "0.742156", "0.74097514", "0.74097514", "0.7386949", "0.7363305", "0.73603714", "0.73556274", "0.7324663", "0.732027", "0.7305232", "0.72755456", "0.7271691", "0.72595114", "0.7242401", "0.72036356", "0.72024816", "0.71873564", "0.7155728", "0.7129506", "0.7121502", "0.71041536", "0.70979637", "0.70792806", "0.70755935", "0.7063514", "0.7052733", "0.70474225", "0.70446116", "0.70168495", "0.70047617", "0.7002241", "0.6999917", "0.6998814", "0.6996168", "0.69685775", "0.696535", "0.6959311", "0.6948054", "0.69460744", "0.6921231", "0.69054973", "0.6842034", "0.6835788", "0.6815201", "0.6774189", "0.6765277", "0.67623097", "0.6760793", "0.6729232", "0.6719754", "0.66914153", "0.66903937", "0.66736484", "0.6673258", "0.663625", "0.6631408", "0.66301227", "0.6623996", "0.66129386", "0.6608841", "0.65947205", "0.65946513", "0.65838456", "0.65540755", "0.655047", "0.6543361", "0.65304285", "0.6523665", "0.6513393", "0.6508635", "0.65004385", "0.6473791", "0.64551646", "0.64493805", "0.64411134", "0.6430591", "0.6417735", "0.6417735", "0.6403785", "0.63832164", "0.63679254", "0.6359572", "0.6349031", "0.6341128", "0.6331627", "0.6328281" ]
0.7268953
26
Resets the array to its original configuration and return it.
public int[] reset() { return nums; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[] reset() {\n\t\t\treturn originalArr;\n\t\t}", "public int[] reset() {\n return Arrays.copyOf(origin, origin.length);\n }", "public int[] reset() {\r\n return reset;\r\n }", "public int[] reset() \n {\n return reset;\n }", "public int[] reset() {\n return store;\n }", "private int[] reset() {\n return data;\n }", "public int[] reset() {\n return nums.clone();\n }", "private T[] modifyArray(T[] array) {\n array[index] = null;\n return array;\n }", "@SuppressWarnings({\"unused\", \"RedundantSuppression\"})\n public void resetArray() {\n Utils.postToMainLoop(new Runnable() {\n @Override\n public void run() {\n mBaseCacheAdapter.resetArray();\n mBaseRecyclerViewAdapter.notifyDataSetChanged();\n }\n\n @NonNull\n @Override\n public String toString() {\n return \"BaseCacheAdapterWrapper.resetArray()\";\n }\n });\n }", "public static int[] reset() {\n nums = Arrays.copyOf(numsBackUp, numsBackUp.length);\n return nums;\n }", "@Override\n public void clear() {\n array.reset();\n }", "public void compact()\n {\n array = toArray();\n }", "void reset() {\n for (int i = 0; i < array.length; i++) {\n array[i] = -1;\n }\n }", "public int[] reset() {\n\t\treturn memos;\n\t}", "private void reset(){\n int j=0;\n for(int i=0; i<array.length; i++){\n if(j == itemCount) {return;}\n if(array[i]!=null){\n temp[j] = array[i];\n j++;\n }\n }\n }", "public int[] reset() {\n System.out.println(Arrays.toString(soluzioneIniziale));\n return soluzioneIniziale;\n }", "private void restartArray() {\n for (int i = 0; i < 8; i++) {\n for (int j = 0; j < 8; j++) {\n Start.shemaArray[i][j].baseModel.state = 0;\n }\n }\n }", "public int[] reset() {\r\n return nums;\r\n }", "public GoLBoard reset()\n\t{\n\t\treturn reset(new GoLRandomInitializer(setSize));\n\t}", "void reset()\n {\n reset(values);\n }", "public int[] clone()\n\t{\t\n\t\tint[] newArray = new int[array.length];\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tnewArray[index] = array[index];\n\t\t}\n\t\treturn newArray;\n\t}", "public int[] reset() {\r\n\t\t\treturn this.initNums;\r\n\t\t}", "@Override\r\n\tpublic void reset() {\r\n\t\tthis.priorityElements = Lists.newArrayList(originalElements);\r\n\t\tCollections.shuffle(priorityElements);\r\n\t\tthis.currentElements = Lists.newArrayListWithExpectedSize(2 * originalElements.size());\r\n\t\tthis.currentElements.addAll(originalElements);\r\n\t}", "public void restore() {\n currentIm= originalIm.copy();\n }", "public void resetChangeableArrays(int[] reg)\n {\n valList = new LinkedList<Integer>();\n possibilityList = new LinkedList<Point>();\n for(int j = 0; j<accumulator.length; j ++)Arrays.fill(accumulator[j],0);\n //accumulator = zeroAccumulator;\n region = reg;\n \n }", "private int[] cloneArr(final int[] origArr) {\n return Arrays.copyOf(origArr, origArr.length);\n }", "public void reset_array() {\r\n\t\tfor(int i=0;i<9;i++) {\r\n\t\t\ts[i]=\"\";\r\n\t\t}\r\n\t}", "public Array<T> compactClone()\n {\n Array<T> out = Array.fromUnsafe(new Object[next], next);\n System.arraycopy(array, 0, out.array, 0, next);\n return out;\n }", "public int[] shuffle() {\n\t\t\tif (originalArr == null)\n\t\t\t\treturn null;\n\t\t\tint randomArr[] = originalArr.clone();\n\t\t\tfor (int i = 1; i < originalArr.length; i++) {\n\t\t\t\tint newIndex = random.nextInt(i + 1);\n\t\t\t\tswap(i, newIndex, randomArr);\n\t\t\t}\n\t\t\treturn randomArr;\n\t\t}", "public void reset() {\n for (int i = 0; i < this.numRows; i++) {\n this.rows[i] = new int[0];\n }\n for (int k = 0; k < this.numCols; k++) {\n this.cols[k] = new IntOpenHashSet();\n }\n }", "public UnorderedArray cloneArray(){\r\n UnorderedArray clone = new UnorderedArray(maxSize);\r\n clone.mArray = mArray.clone();\r\n clone.numItems = numItems;\r\n return clone;\r\n }", "public OccList reset()\n {\n size = 0;\n return this;\n }", "private void reset() {\n\t\tdata.clear();\n\t}", "public void reSize() {\n int newSize = arr.length * 2;\n arr = Arrays.copyOf(arr, newSize);\n }", "public void reset() {\n this.setIndex(0);\n }", "private void resetMask() {\n maskArray = new int [][]{\n {0,0,0,0},\n {0,0,0,0},\n {0,0,0,0},\n {0,0,0,0}\n };\n }", "public void reset() {\n this.predictor.reset();\n for(int i=0; i<this.predictedIntraday.length; i++) {\n this.predictedIntraday[i] = 0;\n }\n }", "public void reset() {\n\t\tlength = 0;\n\t}", "@Override\n public void resetAllValues() {\n }", "private static void modifyArray(int[] array) {\n\t\t\n\t\tarray[0] = 99;\n\t\t\n\t\tarray = new int[5] ;\n\t\treturn;\n\t}", "public GoLBoard reset(GoLInitializer myInitializer)\n\t{\n \tmyGoLCell = myInitializer.getCellArray();\n \treturn this;\n\t}", "protected void recycleArray(Bitmap[][] array)\n\t{\n\t\tint length = array.length;\n\t\tfor(int i = 0; i < length; i++)\n\t\t{\n\t\t\tif(array[i] != null)\n\t\t\t{\n\t\t\t\tint length2 = array[i].length;\n\t\t\t\tfor(int j = 0; j < length2; j++)\n\t\t\t\t{\n\t\t\t\t\tif(array[i][j] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tarray[i][j].recycle();\n\t\t\t\t\t\tarray[i][j] = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void resetGrid() {\n grid = new byte[grid.length];\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "@Override\n public void clear() {\n array = null;\n }", "@Override\n\tpublic void resetToExisting() {\n\t\t\n\t}", "private void reallocate() {\n capacity = 2 * capacity;\n ElementType[] newData = (ElementType[]) new Object[DEFAULT_INIT_LENGTH];\n System.arraycopy(elements, 0, newData, 0, size);\n elements = newData;\n }", "public static void fillArray() {\r\n\t\tfor (int i = 0; i < myOriginalArray.length - 1; i++) {\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tmyOriginalArray[i] = rand.nextInt(250);\r\n\t\t}\r\n\t\t// Copies original array 4 times for algorithm arrays\r\n\t\tmyBubbleArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmySelectionArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmyInsertionArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t\tmyQuickArray = Arrays.copyOf(myOriginalArray, myOriginalArray.length);\r\n\t}", "public void reset() {\n this.index = this.startIndex;\n }", "protected void recycleArray(Bitmap[] array)\n\t{\n\t\tint length = array.length;\n\t\tfor(int i = 0; i < length; i++)\n\t\t{\n\t\t\tif(array[i] != null)\n\t\t\t{\n\t\t\t\tarray[i].recycle();\n\t\t\t\tarray[i] = null;\n\t\t\t}\n\t\t}\n\t}", "public DynamicArray<E> copy(DynamicArray<E> array) {\n synchronized (this) {\n return this.array;\n }\n }", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void reset() {\n\t\tfor (int i=0; i < this.WAYS; i++) {\n\t\t\tthis.cache[i] = new Line(this.alpha[i], REPL_VAL);\n\t\t}\n\t\t// set mru\n\t\tthis.cache[this.WAYS-1].state = INSERT_VAL;\n\t}", "public int[] cloneMemory(){\n return memory.clone();\n }", "public void reset () {\n\t\topen();\n\t\ttry {\n\t\t\tcontainer.setLength(0);\n\t\t\treservedBitMap.setLength(0);\n\t\t\tupdatedBitMap.setLength(0);\n\t\t\tfreeList.setLength(0);\n\t\t\tsize = 0;\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t}\n\t}", "public void resetField() {\n setFields(new boolean[getLength()][getHeight()]);\n }", "@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void newArray() {\n\t\t\n\t\tE[] newArray= (E[]) new Object[list.length * 2]; //Holds the old elements from the list array while new list array is being made\n\t\t\n\t\tfor(int i = 0; i < list.length; i++) {\n\t\t\t\n\t\t\tnewArray[i] = list[i]; //Copy the old list array into the newArray\n\t\t}\n\t\t\n\t\tlist = newArray; //Point the old array at the newArray starting memory location\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n public final T[] obtainArrayCopy() {\n final T[] localArray = array;\n if (localArray == null) return (T[]) Array.newInstance(clazz, 0);\n\n return Arrays.copyOf(localArray, localArray.length);\n }", "private void trimArray()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"[INFO] <RADIOBUTTON_PANEL_BUILDER> Running trimArray\");\r\n\t\t\t\r\n\t\t\tJRadioButton[] newArray = new JRadioButton[nextRadioButtonLocation]; // Create a new array of the correct size\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < nextRadioButtonLocation; i++) // For each object in the array\r\n\t\t\t{\r\n\t\t\t\tnewArray[i] = radioButtons[i]; // Copy the object\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tradioButtons = newArray; // Store the new trimmed array in components\r\n\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void reset() {\n\t\t\t\t\n\t\t\t}", "private void reallocate(){\n capacity = 2 * capacity;\n theData = Arrays.copyOf(theData, capacity);\n }", "public void reset () {}", "public void reset() {\n\n\t}", "@Override\r\n\tpublic void reset()\r\n\t{\r\n\t}", "@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}", "private final void restoreOriginalGraph() {\n // Safeguard against multiple restores\n if (startIndex == -1) return;\n \n markEdgesFrom(startIndex, false);\n markEdgesFrom(endIndex, false);\n markHasEdgeToGoal(false);\n nOutgoingEdgess[endIndex] = endOriginalSize;\n nOutgoingEdgess[startIndex] = startOriginalSize;\n nEdges = originalNEdges;\n\n nNodes = originalSize;\n startIndex = -1;\n endIndex = -1;\n }", "public ResizingArray() {\r\n super();\r\n this.aObjects = new Object[ResizingArray.DEFAULT_SIZE];\r\n this.aFreeElements = new int[ResizingArray.DEFAULT_SIZE];\r\n }", "public void reallocate()\r\n\t{\r\n\t\tE[] newArray = (E[]) new Object[capacity * 2];\r\n\t\tint i = 0;\r\n\t\tfor(i = 0; i < this.size(); i++)\r\n\t\t{\r\n\t\t\tnewArray[i] = innerArray[(front + i) % capacity];\r\n\t\t\tSystem.out.println((front + i) % capacity);\r\n\t\t}\r\n\t\tfront = 0;\r\n\t\trear = this.size() - 1;\r\n\t\tcapacity = capacity * 2;\r\n\t\tinnerArray = newArray;\r\n\t}", "public void reset(final byte[] treeData) {\n \t\traw = treeData;\n \t\trawPtr = 0;\n \t}", "protected abstract void reset();", "public void reset() {\r\n\t\tcards.addAll(dealt);\r\n\t\tdealt.clear();\r\n\t}", "public void reset() {\n\n }", "public OpRewriter reset() {\n result = OpSequence.create();\n return this;\n }", "public static int[] copy(int[] theArray) {\n\n return theArray.clone();\n }", "private static void resetGroupLineArrays() {\n // Reset the arrays to make sure that we have uptodate information in them\n itemsArray = null;\n itemsArrayForAlterations = null;\n itemsArrayForOpenDeposit = null;\n }", "public T[] toArray() {\n return null;\n }", "@Override\n public void reset() \n {\n\n }", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();" ]
[ "0.7683946", "0.697118", "0.6904059", "0.68361205", "0.6714145", "0.6640303", "0.64434683", "0.6318128", "0.6288678", "0.62609303", "0.6259935", "0.6196086", "0.6185046", "0.6129283", "0.60915095", "0.601098", "0.60055953", "0.5967921", "0.5872889", "0.5870918", "0.57786286", "0.5768219", "0.57543355", "0.5716322", "0.5685787", "0.56746763", "0.5663266", "0.5663077", "0.56539774", "0.5636272", "0.56317455", "0.5601983", "0.55621237", "0.5538473", "0.55365205", "0.5524326", "0.55232364", "0.5515195", "0.5507188", "0.54990935", "0.54981965", "0.54725003", "0.54724085", "0.54705334", "0.54596317", "0.54540956", "0.542261", "0.54031897", "0.5390596", "0.53796774", "0.5376527", "0.53748786", "0.53740066", "0.53673774", "0.5346156", "0.5341975", "0.53368694", "0.53350514", "0.5333946", "0.5333095", "0.53167206", "0.53167206", "0.53167206", "0.53167206", "0.5314903", "0.53133017", "0.52908844", "0.5282181", "0.5277244", "0.52719283", "0.52713454", "0.5267086", "0.52567065", "0.5256291", "0.5249986", "0.5246228", "0.5242759", "0.5241111", "0.52362406", "0.52356803", "0.52347755", "0.5230565", "0.5230565", "0.5230565", "0.5230565", "0.5230565", "0.5230565", "0.5230565", "0.5230565", "0.5230565", "0.5230565", "0.5230565", "0.5230565", "0.5230565" ]
0.59418577
24
Returns a random shuffling of the array.
public int[] shuffle() { int[] shuffle = nums.clone(); for(int i = 0; i < shuffle.length; i++){ int index = random.nextInt(i + 1); swap(shuffle,i,index); } return shuffle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int[] shuffle() {\n int len = data_random.length;\n Random rand = new Random();\n for (int i = 0; i < len; i++) {\n int r = rand.nextInt(len);\n int temp = data_random[i];\n data_random[i] = data_random[r];\n data_random[r]=temp;\n }\n return data_random;\n }", "public int[] shuffle() {\n\t\t\tif (originalArr == null)\n\t\t\t\treturn null;\n\t\t\tint randomArr[] = originalArr.clone();\n\t\t\tfor (int i = 1; i < originalArr.length; i++) {\n\t\t\t\tint newIndex = random.nextInt(i + 1);\n\t\t\t\tswap(i, newIndex, randomArr);\n\t\t\t}\n\t\t\treturn randomArr;\n\t\t}", "public int[] shuffle() {\n int[] result = reset();\n\n Random rand = new Random();\n for (int i = 0; i < result.length; i++) {\n int j = rand.nextInt(result.length - i) + i;\n int tmp = result[i];\n result[i] = result[j];\n result[j] = tmp;\n }\n return result;\n }", "private static void shuffleArray(int[] array)\n {\n int index, temp;\n Random random = new Random();\n for (int i = array.length - 1; i > 0; i--)\n {\n index = random.nextInt(i + 1);\n temp = array[index];\n array[index] = array[i];\n array[i] = temp;\n }\n }", "Actor[] shuffle(Actor[] array) {\n for (int i = array.length; i > 0; i--) {\n int k = rand.nextInt(i);\n Actor tmp = array[k];\n array[k] = array[i - 1];\n array[i - 1] = tmp;\n }\n return array;\n }", "public static <T> void shuffle(T[] array){\n Random rnd = ThreadLocalRandom.current();\n for (int i = array.length - 1; i > 0; i--)\n {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n T a = array[index];\n array[index] = array[i];\n array[i] = a;\n }\n }", "public static <T> void shuffle(T[] array){\n Random rnd = ThreadLocalRandom.current();\n for (int i = array.length - 1; i > 0; i--)\n {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n T a = array[index];\n array[index] = array[i];\n array[i] = a;\n }\n }", "private static void shuffleArray(final int[] a) {\n for (int i = 1; i < a.length; i++) {\n int j = random.nextInt(i);\n int temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }\n }", "private static void shuffleArray(int[] ar) {\n Random rnd = ThreadLocalRandom.current();\n for (int i = ar.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i + 1);\n int a = ar[index];\n ar[index] = ar[i];\n ar[i] = a;\n }\n }", "public void shuffle();", "public int[] shuffle() {\r\n if (nums == null) return nums;\r\n int tmp = 0;\r\n \r\n int[] newNums = nums.clone();\r\n \r\n for (int i=1; i<newNums.length; i++) {\r\n int selectPos = rd.nextInt(i+1);\r\n tmp = newNums[i];\r\n newNums[i] = newNums[selectPos];\r\n newNums[selectPos] = tmp;\r\n }\r\n \r\n return newNums;\r\n }", "public int[] shuffle() {\r\n int max = nums.length - 1;\r\n for (int i = 0; i < nums.length; i++) {\r\n int index = new Random().nextInt(max)%(max - i + 1) + i;\r\n int tmp = nums[i];\r\n nums[i] = nums[index];\r\n nums[index] = tmp;\r\n }\r\n return nums;\r\n }", "public static void shuffle(int[] array)\n {\n int n = array.length;\n for (int i = 0; i < n; i++)\n {\n // choose index uniformly in [0, i]\n //explicit conversion to int\n int r = (int) (Math.random() * (i + 1));\n swap(array,r,i);\n }\n }", "public int[] shuffle() {\n for (int i = nums.length - 1; i >= 0; i--) {\n swap(i, rnd.nextInt(i + 1));\n }\n \n return nums;\n }", "void shuffleArray(String[] ar) {\n for (int i = ar.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n String a = ar[index];\n ar[index] = ar[i];\n ar[i] = a;\n }\n }", "void shuffle();", "void shuffle();", "private static char[] shuffle(char[] array) {\n\t\tRandom rand = new Random();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tint randIndex = rand.nextInt(array.length - 1);\n\t\t\tchar temp = array[i];\n\t\t\tarray[i] = array[randIndex];\n\t\t\tarray[randIndex] = temp;\n\t\t}\n\t\treturn array;\n\t}", "public static void shuffle(int[] a) {\r\n int N = a.length;\r\n for (int i = 0; i < N; i++) {\r\n int r = i + uniform(N-i); // between i and N-1\r\n int temp = a[i];\r\n a[i] = a[r];\r\n a[r] = temp;\r\n }\r\n }", "public void shuffle() {\n for (int i = size - 1; i > 0; i--) {\n swap(i, (int)(Math.random() * (i + 1)));\n }\n }", "public static void shuffle( int[] a ) {\n int N = a.length;\n \n for ( int i = 0; i < N; i++ ) {\n int r = i + uniform( N - i ); // between i and N-1\n int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "public static int[] shuffle() {\n Random random = new Random();\n for (int i = 0; i < len; i++) {\n int j = random.nextInt(len);\n int temp = nums[i];\n nums[i] = nums[j];\n nums[j] = temp;\n }\n return nums;\n }", "static void shuffleArray(String[] ar)\r\n {\n Random rnd = ThreadLocalRandom.current();\r\n for (int i = ar.length - 1; i > 0; i--)\r\n {\r\n int index = rnd.nextInt(i + 1);\r\n // Simple swap\r\n String a = ar[index];\r\n ar[index] = ar[i];\r\n ar[i] = a;\r\n }\r\n }", "public int[] shuffle() {\n if (nums == null) {\n return null;\n }\n int[] a = nums.clone();\n for (int j = 1; j < a.length; j++) {\n // 类似蓄水池采样算法\n // i == j -> 1/(1+j)\n // j != j -> (1 - 1/(1+j)) * (1/j) = 1/(1/j)\n int i = random.nextInt(j + 1);\n swap(a, i, j);\n }\n return a;\n }", "public int[] shuffle() {\n int i = random.nextInt(nums.length);\n int j = random.nextInt(nums.length);\n swap(temp, i , j);\n return temp;\n }", "public int[] shuffle() {\n int[] shuffle = new int[nums.length];\n int[] clone = nums.clone();\n int last = clone.length - 1;\n for(int i = 0; i < clone.length; i++){\n int index = random.nextInt(last + 1);\n shuffle[i] = clone[index];\n clone[index] = clone[last--];\n }\n return shuffle;\n }", "public int[] shuffle() {\n int[] res = new int[nums.length];\n int r;\n for (int i = 0; i < nums.length; i++) {\n r = random.nextInt(i + 1);\n res[i] = res[r];\n res[r] = nums[i];\n }\n\n\n return res;\n }", "static void shuffleArray(int[] ar) {\n Random rnd = new Random();\n for (int i = ar.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n int a = ar[index];\n ar[index] = ar[i];\n ar[i] = a;\n }\n }", "public int[] shuffle() {\n int[] random = new int[nums.length];\n for (int i = 0; i < nums.length; i++) {\n // generate a random between 0 ~ i\n int r = (int)(Math.random() * (i + 1));\n random[i] = random[r];\n random[r] = nums[i];\n }\n return random;\n }", "public static void shuffle( Object[] a ) {\n int N = a.length;\n for ( int i = 0; i < N; i++ ) {\n int r = i + uniform( N - i ); // between i and N-1\n Object temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "public int[] shuffle() {\n\t\tRandom r = new Random();\n\t\tfor (int i = 0; i < this.nums.length; i++) {\n\t\t\tint index = r.nextInt(this.nums.length);\n\t\t\tif (i != index) {\n\t\t\t\tnums[i] = nums[i] ^ nums[index];\n\t\t\t\tnums[index] = nums[i] ^ nums[index];\n\t\t\t\tnums[i] = nums[i] ^ nums[index];\n\t\t\t}\n\t\t}\n\t\treturn nums;\n\t}", "public void shuffle() {\n for (int i = 0; i < this.cards.length ; i++ ) {\n double x = Math.floor(Math.random() * ((double)this.cards.length - (double)0)) + (double)0;\n Card temp = this.cards[i];\n this.cards[i]= this.cards[(int)x];\n this.cards[(int)x]= temp;\n }\n }", "public static int[] selectionShuffle(int[] arr) { \n int temp;\n int idx;\n for(int i = 0; i < arr.length; i ++){\n idx = (int) (Math.random() * arr.length);\n temp = arr[i];\n arr[i] = arr[idx];\n arr[idx] = temp;\n }\n return arr;\n }", "public static void shuffle(Object[] a) {\r\n int N = a.length;\r\n for (int i = 0; i < N; i++) {\r\n int r = i + uniform(N-i); // between i and N-1\r\n Object temp = a[i];\r\n a[i] = a[r];\r\n a[r] = temp;\r\n }\r\n }", "public int[] shuffle() {\n int[] shuffled = Arrays.copyOf(origin, origin.length);\n \n for (int i = shuffled.length - 1; i > 0; i--) {\n int index = random.nextInt(i + 1);\n int temp = shuffled[i];\n shuffled[i] = shuffled[index];\n shuffled[index] = temp;\n }\n return shuffled;\n }", "public static void shuffle(double[] a) {\r\n int N = a.length;\r\n for (int i = 0; i < N; i++) {\r\n int r = i + uniform(N-i); // between i and N-1\r\n double temp = a[i];\r\n a[i] = a[r];\r\n a[r] = temp;\r\n }\r\n }", "public static void shuffle( double[] a ) {\n int N = a.length;\n \n for ( int i = 0; i < N; i++ ) {\n int r = i + uniform( N - i ); // between i and N-1\n double temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "public static void shuffle(String[] arrayList){\n int num=arrayList.length; \n for(int j=0;j<60;j++){ // the number of shuffling>50 times, so I choose 60 times\n for(int i=0;i<num;i++){ \n int index=(int)(Math.random()*num);\n //Swap the position of elements in the array at that index with the first element\n String temp=arrayList[i]; \n arrayList[i]=arrayList[index];\n arrayList[index]=temp;\n }}}", "public void shuffle()\r\n\t{\r\n\t\tRandom rand = ThreadLocalRandom.current();\r\n\t\t\r\n\t\tfor (int i = topCard; i > 0; i--)\r\n\t\t{\r\n\t\t\tint index = rand.nextInt(i + 1);\r\n\t\t\tString temp = cards[index];\r\n\t\t\tcards[index] = cards[i];\r\n\t\t\tcards[i] = temp;\r\n\t\t}\r\n\t}", "public int[] shuffle() {\n int[] shuffled = new int[length];\n for (int i = 0; i < length; i++)\n shuffled[i] = nums[i];\n for (int i = 0; i < length; i++) {\n int randomIndex = (int) (Math.random() * length);\n int temp = shuffled[i];\n shuffled[i] = shuffled[randomIndex];\n shuffled[randomIndex] = temp;\n }\n return shuffled;\n }", "static public <T> void shuffle(T[] a, RNG rng) {\r\n\r\n for (int i = a.length - 1; i > 0; i--) {\r\n int j = (int) rng.random((i + 1));\r\n //System.out.println(j);\r\n T x = a[i];\r\n a[i] = a[j];\r\n a[j] = x;\r\n }\r\n \r\n }", "private static void scrambleArray(int[] a, boolean randomize) {\n\t\tfor (int k = 0; k < a.length; k++)\n\t\t\ta[k] = k;\n\t\tif (randomize) // use unpredictable random shuffle\n\t\t{\n\t\t\tRandom gen = new Random();\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, gen.nextInt(a.length));\n\t\t\t}\n\t\t} else // use repeatable math formula for shuffle\n\t\t{\n\t\t\tint cell = (int) (a.length * 3.14159) % a.length;\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, cell);\n\t\t\t\tcell = (int) (cell * 3.14159) % a.length;\n\t\t\t}\n\t\t}\n\n\t}", "public static void shuffle(int data[]) {\n\n }", "public static int[] shuffle(int[] deck){\n\t\tRandom rnd = new Random();\n\t for (int i = deck.length - 1; i > 0; i--)\n\t {\n\t int index = rnd.nextInt(i + 1);\n\t int a = deck[index];\n\t deck[index] = deck[i];\n\t deck[i] = a;\n\t }\n\t return deck;\n\t}", "public int[] shuffle() {\r\n\t\t\tRandom r = new Random();\r\n\t\t\tint[] shuffle = new int[this.nums.length];\r\n\t\t\tint i = 0;\r\n\t\t\tMap<Integer, Boolean> map = new HashMap<Integer, Boolean>();\r\n\t\t\twhile (i < this.nums.length) {\r\n\t\t\t\tint count = r.nextInt(this.nums.length);\r\n\t\t\t\tif (map.get(count) != null && map.get(count)) {\r\n\t\t\t\t} else {\r\n\t\t\t\t\tshuffle[i] = this.nums[count];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tmap.put(count, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn shuffle;\r\n\t\t}", "public void shuffle() {\n\t\tCollections.shuffle(inds);\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(Arrays.asList(reel));\n\t}", "@Override\n public <T> T[] shuffle(T[] elements) {\n return super.shuffle(elements);\n }", "public void shuffle() {\n Collections.shuffle(this);\n }", "public void shuffle() {\r\n for (int i = 0; i < this.numCards; i++) {\r\n int spot = (int) (Math.random() * ((this.numCards - 1) - i + 1) + i);\r\n Card temp = cards[i];\r\n cards[i] = cards[spot];\r\n cards[spot] = temp;\r\n\r\n\r\n }\r\n }", "public paintIntegers[] shuffle(paintIntegers[] arr){\n paintIntegers[] arrayNew = new paintIntegers[arr.length];\n paintIntegers.initPaint(arrayNew);\n //updates n\n n = arr.length;\n for(int i = 0; i < arrayNew.length; i++){\n arrayNew[i].val = i + 1;\n }//init the array with 0 to n;\n for(int i = 0; i < arrayNew.length; i++){ // shuffles the array\n //random index past current -> thats why random\n int ridx = i + rand.nextInt(arrayNew.length - i);\n //swap values\n int temp = arrayNew[ridx].val;\n arrayNew[ridx].val = arrayNew[i].val;\n arrayNew[i].val = temp;\n }\n // new origarray array\n return arrayNew.clone();\n }", "static void shuffleArray(String[] ar) {\n Random rnd = new Random();\n for (int i = ar.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i + 1);\n // Simple swap\n String a = ar[index];\n ar[index] = ar[i];\n ar[i] = a;\n }\n }", "public static void scrambledArray(int[] array){\n Random rand=new Random();// use java.util.random method to scramble the index number\n for(int i=0;i<array.length;i++){\n int num=rand.nextInt(15);\n // swap the two different positioned values by swaping their index number \n int temp=array[i];\n array[i]=array[num];\n array[num]=temp; }\n }", "public abstract void shuffled();", "public Deck randomShuffle(){\n\t\tshuffleOnceRandom();\n\t\tshuffleOnceRandom();\n\t\treturn ourDeck;\n\t}", "public static List arrayShuffle(List arrayToShuffle)\n\t{\n\t\tCollections.shuffle(arrayToShuffle);\n\t\treturn arrayToShuffle;\n\t}", "public int[] shuffle() \n {\n List<Integer> al = new ArrayList(reset.length);\n //push all values of the original array onto an arraylist\n for(int i = 0; i < reset.length; i++)\n {\n al.add(reset[i]);\n }\n //shuffles the arraylist\n Collections.shuffle(al);\n return al.stream().mapToInt(Integer::intValue).toArray();\n }", "public void shuffle() {\n\t\tfor (int i = deck.length - 1; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tCard temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcardsUsed = 0;\n\t}", "void myshuffleArray(String[] ar1, String[] ar2) {\n for (int i = ar1.length - 1; i > 0; i--) {\n int index = rnd.nextInt(i+1);\n // Simple swap\n String a1 = ar1[index];\n String a2 = ar2[index];\n ar1[index] = ar1[i];\n ar2[index] = ar2[i];\n ar1[i]=a1;\n ar2[i]=a2;\n }\n }", "public void shuffle() {\n\t\tfor (int i = 51; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tint temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcurrentPosition = 0;\n\t}", "public static void knuthShuffle(Comparable[] a) {\n int r, n = a.length;\n for (int i = 1; i < n; i++) {\n r = randInt(0, i);\n exch(a, i, r);\n }\n }", "public void Shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public void shuffle()\n\t{\n\t\tHashSet<Integer> usedRandoms = new HashSet<Integer>();\n\t\tthis.currentCard = 0;\n\t\tint i= 0;\n\t\twhile (i < deck.length)\n\t\t{\n\t\t\tint another = this.rand.nextInt(NUMBER_OF_CARDS);\n\t\t\tif(!usedRandoms.contains(another))\n\t\t\t{\n\t\t\t\tCard temp = this.deck[i];\n\t\t\t\tthis.deck[i] = this.deck[another];\n\t\t\t\tthis.deck[another] = temp;\n\t\t\t\ti++;\n\t\t\t\tusedRandoms.add(another);\n\t\t\t}\n\t\t}\n\t}", "public int[] shuffle() {\n Collections.shuffle(list);\n int[] temp = new int[list.size()];\n for (int i = 0; i < list.size(); i++) {\n temp[i] = list.get(i);\n }\n return temp;\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t\t// : Shuffle with random seed each time, then we can save the seed\r\n\t\t// Collections.shuffle(cards, new Random(10));\r\n\t}", "public void scramble(){\r\n for (int i = 0; i < data.length / 2; i++){\r\n int randomIndex1 = (int)(Math.random()*(data.length - 1));\r\n int randomIndex2 = (int)(Math.random()*(data.length - 1));\r\n swap(randomIndex1, randomIndex2);\r\n }\r\n }", "public void shuffle(){\r\n Collections.shuffle(cards);\r\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t}", "private static void scrambleArray(Integer[] a, boolean randomize) {\n\t\tfor (int k = 0; k < a.length; k++)\n\t\t\ta[k] = k;\n\t\tif (randomize) {\n\t\t\tRandom gen = new Random();\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, gen.nextInt(a.length));\n\t\t\t}\n\t\t} else {\n\t\t\tint cell = (int) (a.length * 3.14159) % a.length;\n\t\t\tfor (int k = 0; k < a.length; k++) {\n\t\t\t\tswap(a, k, cell);\n\t\t\t\tcell = (int) (cell * 3.14159) % a.length;\n\t\t\t}\n\t\t}\n\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(Shoe);\n\t}", "public static String [] randomizeArray(String[] array){\n Random rgen = new Random(); // Random number generator\n\n for (int i=0; i<array.length; i++) {\n int randomPosition = rgen.nextInt(array.length);\n String temp = array[i];\n array[i] = array[randomPosition];\n array[randomPosition] = temp;\n }\n\n return array;\n }", "public void shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public final <T> T random(T[] array) {\n return array[random(0, array.length)];\n }", "public void shuffle()\r\n {\r\n // We will start from the last element and swap the cards one by one. We actually\r\n // don't need to swap the last element.\r\n for (int i = valid - 1; i > 0; i --) { \r\n \r\n // By using Math.random, we will get a random integer from 0 to i\r\n int j = (int) ( (i+1) * Math.random()); \r\n \r\n // Swapping with the help of temp instance of Card Class.\r\n Card temp = cards[i]; \r\n cards[i] = cards[j]; \r\n cards[j] = temp; \r\n } \r\n // Prints the random array \r\n }", "public void shuffle(){\n Collections.shuffle(Arrays.asList(this.deck));\n }", "public void shuffle() {\n\n\tcardsLeft = cards.length;\n\tfor (int i=cards.length-1; i>=0; --i) {\n\n\t int r = (int)(Math.random()*(i+1)); // pick a random pos <= i\n\n\t Card t = cards[i];\n\t cards[i] = cards[r];\n\t cards[r] = t;\n\n\t}\n }", "public void shuffle() {\n\t\t\t/*\n\t\t\t * This is very different from the sort method because:\n\t\t\t * @ we decant the cards into an array list;\n\t\t\t * @ we use a library function to do the work;\n\t\t\t * The implementation you write for the sort method should\n\t\t\t * have *neither* of these characteristics.\n\t\t\t */\n\t\t\tList<Card> cards = new ArrayList<Card>();\n\t\t\twhile (!isEmpty()) {\n\t\t\t\tcards.add(draw());\n\t\t\t}\n\t\t\tCollections.shuffle(cards);\n\t\t\tfor (Card c: cards) {\n\t\t\t\tadd(c);\n\t\t\t}\n\t\t}", "public void shuffle() {\n Collections.shuffle(this.plateau);\n }", "public void shuffle() {\n Random rand = new Random();\n for(int i = 0; i < deck.length; i++) {\n // get random index past current index\n int randomVal = i + rand.nextInt(deck.length - i);\n // swaps randomly selected card with card at index i\n Card swap = deck[randomVal];\n deck[randomVal] = deck[i];\n deck[i] = swap;\n }\n }", "public void shuffle() {\n\t\tRandom randIndex = new Random();\n\t\tint size = cards.size();\n\t\t\n\t\tfor(int shuffles = 1; shuffles <= 20; ++shuffles)\n\t\t\tfor (int i = 0; i < size; i++) \n\t\t\t\tCollections.swap(cards, i, randIndex.nextInt(size));\n\t\t\n\t}", "public static String[] randomizeHand(String[] arrayShuffle){\n String[] combine=new String[5];\n int k=-1;\n for(int i=0;i<5;i++){\n int j=(int)(Math.random()*52);\n if(j==k){continue;} // use if statements to avoid from picking up the same item twice\n else{combine[i]=arrayShuffle[j];k=j;\n }}\n return combine;}", "public void shuffle() {\n\t\tfor (int i = 0; i < cards.size(); i++){\n\t\t\t//exchange card i with the random card from i to cards.size() - 1\n\t\t\tint j = Randoms.randomIntInRange(i, cards.size() - 1);\n\t\t\tT c1 = cards.get(i);\n\t\t\tT c2 = cards.get(j);\n\t\t\tcards.set(i, c2);\n\t\t\tcards.set(j, c1);\n\t\t}\n\t}", "public void shuffle(){\n Collections.shuffle(this.deckOfCards);\n }", "private void shuffle(ArrayList<Product> dataSet) {\n\t\tfor (int i = 0; i < dataSet.size(); i++) {\n\t\t\tint k = rand(0, i);\n\t\t\tProduct temp = dataSet.get(k);\n\t\t\tdataSet.set(k, dataSet.get(i));\n\t\t\tdataSet.set(i, temp);\n\t\t}\t\n\t}", "public static void shuffle(int[] deck){\n //temporary variable for swapping the values\n int storage = 0;\n //random integer\n int randomInt;\n for(int i = 0; i < deck.length; i++){\n //set the variable equal to a random integer every time\n randomInt = (int) (Math.random() * (deck.length));\n //store the original deck[i] in storage\n //swap deck[i] and deck[randomInt]\n storage = deck[i];\n deck[i] = deck[randomInt];\n deck[randomInt] = storage;\n }\n }", "public int[] shuffle() {\n\n Random random = new Random();\n int posizioneRandom;\n int i = 0;\n int[] shuffleArray = new int[soluzione.length];\n\n while(i < soluzione.length){\n\n posizioneRandom = random.nextInt(soluzione.length);\n\n if(shuffleArray[posizioneRandom] == 0){\n\n shuffleArray[posizioneRandom] = soluzione[i];\n i++;\n }\n\n continue;\n\n\n }\n\n soluzione = shuffleArray;\n\n return soluzione;\n\n }", "public void shuffle()\n\t{\n\t\tCollections.shuffle(card);\n\t}", "public static void arraySwaping(int array[]) {\r\n\r\n\t\tint temp, randInt;\r\n\r\n\t\tRandom rand = new Random();\r\n\r\n\t\tfor (int i = 0; i < array.length; i++) {\r\n\r\n\t\t\trandInt = rand.nextInt(array.length);\r\n\r\n\t\t\ttemp = array[i];\r\n\t\t\tarray[i] = array[randInt];\r\n\t\t\tarray[randInt] = temp;\r\n\r\n\t\t}\r\n\r\n\t}", "public void shuffle() {\n Collections.shuffle((List<Nummer>) this.albumNummers);\n }", "public JumbleBoard shuffle()\n {\n\n for (int i = 0; i < dice.length; i++)\n {\n for (int j = 0; j < dice[i].length; j++)\n {\n int a = random.nextInt(dice.length);\n int b = random.nextInt(dice[i].length);\n\n char c = dice[i][j];\n dice[i][j] = dice[a][b];\n dice[a][b] = c;\n\n }\n }\n\n return this;\n\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle(){\n //After shuffling dealing starts at deck[0] again\n currentCard = 0;\n //for each card , pick another random card and swap them\n for(int first = 0; first < deck.length; first++){\n int second = randomNumbers.nextInt(NUMBER_OF_CARDS);\n\n //Swap Method to swap current card with randomly selected card\n Card temp = deck[first];\n deck[first] = deck[second];\n deck[second] = temp;\n }\n }", "public void shuffle() {\n List<Card> shuffledCards = new ArrayList<>(52);\n while (cards.size() > 0) {\n int index = random.nextInt(cards.size());\n shuffledCards.add(cards.remove(index));\n }\n cards = shuffledCards;\n }", "private static void __exercise37(final int[] a) {\n final int N = a.length;\n for (int i = 0; i < N; ++i) {\n final int r = StdRandom.uniform(N);\n final int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "private static void __exercise36(final int[] a) {\n final int N = a.length;\n for (int i = 0; i < N; ++i) {\n final int r = i + StdRandom.uniform(N - i);\n final int temp = a[i];\n a[i] = a[r];\n a[r] = temp;\n }\n }", "private void shuffleCards(final ICard[] myCards) {\r\n ICard tmp;\r\n int rand;\r\n for (int i = ZERO; i < myCards.length; i++) {\r\n rand = rmd.nextInt(myCards.length);\r\n tmp = myCards[i];\r\n myCards[i] = myCards[rand];\r\n myCards[rand] = tmp;\r\n }\r\n }", "public static int[] shuffleArray(int[] array) {\n\t\tList<Integer> list = new ArrayList<>();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tlist.add(array[i]);\n\t\t}\n\t\tCollections.shuffle(list, rand);\n\t\treturn list.stream().mapToInt(i->i).toArray();\n\t}", "void shuffleDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tint randomNumber = index + (int)(Math.random() * (this.getNumberOfCards() - index));\n\t\t\tCard temp = this.cardsInDeck[randomNumber];\n\t\t\tthis.cardsInDeck[randomNumber] = this.cardsInDeck[index];\n\t\t\tthis.cardsInDeck[index] = temp;\n\t\t}\n\t}", "static void randomize(int arr[], Random r) {\n for (int i = arr.length - 1; i > 0; i--) {\n\n // Pick a random index from 0 to i\n int j = r.nextInt(i);\n\n // Swap arr[i] with the element at random index\n int temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }\n\n }" ]
[ "0.7936801", "0.77815646", "0.7755353", "0.77481586", "0.76945996", "0.7655841", "0.7655841", "0.7645461", "0.7631857", "0.7544279", "0.74736184", "0.74547815", "0.7453523", "0.7453179", "0.742156", "0.74097514", "0.74097514", "0.7386949", "0.7363305", "0.73603714", "0.73556274", "0.7324663", "0.732027", "0.7305232", "0.7271691", "0.7268953", "0.72595114", "0.7242401", "0.72036356", "0.72024816", "0.71873564", "0.7155728", "0.7129506", "0.7121502", "0.71041536", "0.70979637", "0.70792806", "0.70755935", "0.7063514", "0.7052733", "0.70474225", "0.70446116", "0.70168495", "0.70047617", "0.7002241", "0.6999917", "0.6998814", "0.6996168", "0.69685775", "0.696535", "0.6959311", "0.6948054", "0.69460744", "0.6921231", "0.69054973", "0.6842034", "0.6835788", "0.6815201", "0.6774189", "0.6765277", "0.67623097", "0.6760793", "0.6729232", "0.6719754", "0.66914153", "0.66903937", "0.66736484", "0.6673258", "0.663625", "0.6631408", "0.66301227", "0.6623996", "0.66129386", "0.6608841", "0.65947205", "0.65946513", "0.65838456", "0.65540755", "0.655047", "0.6543361", "0.65304285", "0.6523665", "0.6513393", "0.6508635", "0.65004385", "0.6473791", "0.64551646", "0.64493805", "0.64411134", "0.6430591", "0.6417735", "0.6417735", "0.6403785", "0.63832164", "0.63679254", "0.6359572", "0.6349031", "0.6341128", "0.6331627", "0.6328281" ]
0.72755456
24
Constructor vacio de la clase
public ProductosPuntoVentaDaoImpl() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public Pasien() {\r\n }", "public AntrianPasien() {\r\n\r\n }", "public Alojamiento() {\r\n\t}", "public Carrera(){\n }", "public Clade() {}", "public Chauffeur() {\r\n\t}", "public SlanjePoruke() {\n }", "public CyanSus() {\n\n }", "protected Asignatura()\r\n\t{}", "public Lanceur() {\n\t}", "public Curso() {\r\n }", "public Cgg_jur_anticipo(){}", "public PSRelation()\n {\n }", "public Caso_de_uso () {\n }", "public prueba()\r\n {\r\n }", "public Kullanici() {}", "public Corso() {\n\n }", "public Pitonyak_09_02() {\r\n }", "public Classe() {\r\n }", "public Trening() {\n }", "public Vehiculo() {\r\n }", "public Supercar() {\r\n\t\t\r\n\t}", "private Instantiation(){}", "public DetArqueoRunt () {\r\n\r\n }", "public Aritmetica(){ }", "public Coche() {\n super();\n }", "public Achterbahn() {\n }", "public Odontologo() {\n }", "public Cohete() {\n\n\t}", "public TCubico(){}", "public Anschrift() {\r\n }", "public Rol() {}", "public TTau() {}", "public Livro() {\n\n\t}", "public TebakNusantara()\n {\n }", "public CSSTidier() {\n\t}", "public Libro() {\r\n }", "public Exercicio(){\n \n }", "public Excellon ()\n {}", "public Propuestas() {}", "public Orbiter() {\n }", "public Plato(){\n\t\t\n\t}", "public Nota() {\n }", "public MorteSubita() {\n }", "public Troco() {\n }", "public Carrinho() {\n\t\tsuper();\n\t}", "private TMCourse() {\n\t}", "public AfiliadoVista() {\r\n }", "public Tigre() {\r\n }", "public Postoj() {}", "public Valvula(){}", "public NhanVien()\n {\n }", "public Candidatura (){\n \n }", "public Venda() {\n }", "public JSFOla() {\n }", "public RptPotonganGaji() {\n }", "private BaseDatos() {\n }", "public Mannschaft() {\n }", "public Ov_Chipkaart() {\n\t\t\n\t}", "public Funcionario() {\r\n\t\t\r\n\t}", "public Phl() {\n }", "public Busca(){\n }", "public SgaexpedbultoImpl()\n {\n }", "public _355() {\n\n }", "protected Approche() {\n }", "public Contato() {\n }", "public Chick() {\n\t}", "public Banco(){}", "public Aktie() {\n }", "public FiltroMicrorregiao() {\r\n }", "public MPaciente() {\r\n\t}", "public YonetimliNesne() {\n }", "public Erreur() {\n\t}", "public Mitarbeit() {\r\n }", "public Documento() {\n\n\t}", "public Lotto2(){\n\t\t\n\t}", "private UsineJoueur() {}", "private ControleurAcceuil(){ }", "public Aanbieder() {\r\n\t\t}", "public Respuesta() {\n }", "public Magazzino() {\r\n }", "public Prova() {}", "public Gasto() {\r\n\t}", "public Tarifa() {\n ;\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public AvaliacaoRisco() {\n }", "public Tbdcongvan36() {\n super();\n }", "public Corrida(){\n\n }", "public Tbdtokhaihq3() {\n super();\n }", "public EnsembleLettre() {\n\t\t\n\t}", "public Chant(){}", "public ValorVariavel() {\r\n }", "public Persona() {\n\t}", "public Datos(){\n }", "private Rekenhulp()\n\t{\n\t}", "public CorreoElectronico() {\n }", "public Transportista() {\n }", "public AirAndPollen() {\n\n\t}" ]
[ "0.8160863", "0.78734547", "0.7777367", "0.7733038", "0.7650829", "0.75838345", "0.755206", "0.753821", "0.7518583", "0.74763346", "0.7455214", "0.7451668", "0.74491715", "0.7443669", "0.74232185", "0.7395759", "0.738699", "0.7382754", "0.7340022", "0.7335235", "0.731383", "0.7310695", "0.7292842", "0.7291925", "0.7283305", "0.728125", "0.72781646", "0.72779727", "0.72741365", "0.7262867", "0.72523826", "0.72356886", "0.7233635", "0.7221566", "0.7220781", "0.72119623", "0.71897113", "0.71804774", "0.71694493", "0.71643835", "0.7156816", "0.71542436", "0.7148419", "0.7143859", "0.713567", "0.712659", "0.7126103", "0.71231776", "0.7118419", "0.71118027", "0.71038073", "0.7087371", "0.7085782", "0.70846474", "0.7084469", "0.7074564", "0.7071175", "0.70697343", "0.70675933", "0.7061705", "0.70604914", "0.70554876", "0.70552534", "0.7051575", "0.70508444", "0.7048686", "0.7048287", "0.70279264", "0.70251954", "0.70225996", "0.7020617", "0.70120525", "0.70096016", "0.70060194", "0.70048916", "0.7001752", "0.70005345", "0.69994026", "0.6998495", "0.6995649", "0.69951344", "0.6994942", "0.6986782", "0.6981628", "0.6979089", "0.6969552", "0.6963166", "0.6955917", "0.6950338", "0.69490516", "0.6947732", "0.6947556", "0.6941175", "0.6929594", "0.6927307", "0.69189394", "0.6918708", "0.69181234", "0.6914286", "0.69133216", "0.690681" ]
0.0
-1
Constructor conparametros de la clase
public ProductosPuntoVentaDaoImpl(final java.sql.Connection userConn) { this.userConn = userConn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public Pasien() {\r\n }", "public Carrera(){\n }", "public Classe() {\r\n }", "public prueba()\r\n {\r\n }", "public AntrianPasien() {\r\n\r\n }", "public Alojamiento() {\r\n\t}", "public Caso_de_uso () {\n }", "public Chauffeur() {\r\n\t}", "public CyanSus() {\n\n }", "public Clade() {}", "public Curso() {\r\n }", "public Propuestas() {}", "public Vehiculo() {\r\n }", "public Corso() {\n\n }", "public Datos(){\n }", "public SlanjePoruke() {\n }", "public Busca(){\n }", "public Cgg_jur_anticipo(){}", "public Parameters() {\n\t}", "public Supercar() {\r\n\t\t\r\n\t}", "public Contructor(int year, String name) {\n // constructor name must match class name and cannot have return type\n // all classes have constructor by default\n // f you do not create a class constructor yourself, Java creates one for you.\n // However, then you are not able to set initial values for object attributes.\n // constructor can also take parameters\n batchYear = year;\n studentName = name;\n }", "public Cohete() {\n\n\t}", "public Achterbahn() {\n }", "public BaseParameters(){\r\n\t}", "public Candidatura (){\n \n }", "private Instantiation(){}", "public Kullanici() {}", "public CCuenta()\n {\n }", "public Aritmetica(){ }", "public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }", "private BaseDatos() {\n }", "public Postoj() {}", "public Odontologo() {\n }", "public Plato(){\n\t\t\n\t}", "public Exercicio(){\n \n }", "public TebakNusantara()\n {\n }", "public Troco() {\n }", "public PSRelation()\n {\n }", "public NhanVien()\n {\n }", "public Funcionario() {\r\n\t\t\r\n\t}", "public TCubico(){}", "public Banco(){}", "public Persona() {\n\t}", "defaultConstructor(){}", "public Coche() {\n super();\n }", "public Persona(){\n \n }", "public Persona(){\n \n }", "public Prova() {}", "public Ciudad()\n {\n\n }", "public Trening() {\n }", "public Methods() { // ini adalah sebuah construktor kosong tidak ada parameternya\n System.out.println(\"Ini adalah Sebuah construktor \");\n }", "public MorteSubita() {\n }", "public Lanceur() {\n\t}", "public Persona() {\n }", "public Carrinho() {\n\t\tsuper();\n\t}", "public Livro() {\n\n\t}", "public Car(){\n\t\t\n\t}", "public Pitonyak_09_02() {\r\n }", "public Contato() {\n }", "public Valvula(){}", "public Excellon ()\n {}", "public Producto() {\r\n }", "public Producto (){\n\n }", "public ContaBancaria() {\n }", "public Corrida(){\n\n }", "public Respuesta() {\n }", "public Documento() {\n\n\t}", "public Perro() {\n// super(\"No define\", \"NN\", 0); en caso el constructor de animal tenga parametros\n this.pelaje = \"corto\";\n }", "public Facturacion() {\n }", "public Funcionaria(){\n\n }", "public TTau() {}", "public Propiedad(){\n\t}", "private void __sep__Constructors__() {}", "public Persona() {\n \t\n }", "public TParametrosVOImpl() {\r\n }", "public Student(){}", "public ValorVariavel() {\r\n }", "public RptPotonganGaji() {\n }", "public Produto() {}", "public Rol() {}", "public Chick() {\n\t}", "public EnsembleLettre() {\n\t\t\n\t}", "public Libro() {\r\n }", "public Mannschaft() {\n }", "public PersonaFisica() {}", "public DetArqueoRunt () {\r\n\r\n }", "public CSSTidier() {\n\t}", "protected Asignatura()\r\n\t{}", "public Venda() {\n }", "public Data() {\n \n }", "public AfiliadoVista() {\r\n }", "ConstuctorOverloading(){\n\t\tSystem.out.println(\"I am non=argument constructor\");\n\t}", "public Ov_Chipkaart() {\n\t\t\n\t}", "public Transportista() {\n }", "public MPaciente() {\r\n\t}", "public Phl() {\n }", "public Empleado() { }", "public Demo3() {}", "public Chant(){}" ]
[ "0.7653707", "0.7616943", "0.74203366", "0.7255387", "0.7234089", "0.722716", "0.71369016", "0.7121878", "0.70673394", "0.7059527", "0.703816", "0.70366865", "0.7031362", "0.70154995", "0.69875765", "0.6983159", "0.6981577", "0.69739133", "0.6956336", "0.69249725", "0.692227", "0.68866384", "0.6877995", "0.68764055", "0.68486255", "0.6837851", "0.6836134", "0.68129647", "0.680911", "0.68084896", "0.68068737", "0.6804655", "0.67936933", "0.6786803", "0.6786022", "0.6773869", "0.67598087", "0.6759135", "0.6755469", "0.6746491", "0.67423254", "0.67252654", "0.67159", "0.67142373", "0.67089367", "0.67068917", "0.670155", "0.6700185", "0.6700185", "0.6699687", "0.6695914", "0.6689516", "0.66838", "0.6680047", "0.6677579", "0.66574776", "0.66563994", "0.66559786", "0.66533476", "0.6651971", "0.66464084", "0.6646161", "0.664345", "0.6642097", "0.664096", "0.66383326", "0.6624787", "0.6622429", "0.6621781", "0.6619752", "0.6616755", "0.6614652", "0.6606604", "0.6602155", "0.66002196", "0.65942043", "0.65818226", "0.6576663", "0.6562063", "0.6549649", "0.654368", "0.6541456", "0.6540312", "0.65378034", "0.6536471", "0.65335625", "0.6529592", "0.652932", "0.65286285", "0.6519084", "0.6512144", "0.6511562", "0.6500372", "0.64957184", "0.64920515", "0.6487564", "0.64863783", "0.6484938", "0.6483013", "0.64801157", "0.6477437" ]
0.0
-1
Inserta un nuevo registro en la tabla Productos_punto_venta.
@Override public ProductosPuntoVentaPk insert(ProductosPuntoVenta dto) throws ProductosPuntoVentaDaoException { long t1 = System.currentTimeMillis(); PreparedStatement stmt = null; try { // Validamos la conexion this.validateConnection(); stmt = userConn.prepareStatement(SQL_INSERT); int index = 1; stmt.setInt(index++, dto.getIdPuntoVenta()); stmt.setInt(index++, dto.getIdProducto()); stmt.setInt(index++, dto.getCantidad()); System.out.println("Executing " + SQL_INSERT + " with DTO: " + dto); int rows = stmt.executeUpdate(); long t2 = System.currentTimeMillis(); System.out.println(rows + " rows affected (" + (t2 - t1) + " ms)"); reset(dto); return dto.createPk(); } catch (SQLException e) { e.printStackTrace(); throw new ProductosPuntoVentaDaoException("Exception: " + e.getMessage(), e); } finally { ResourceManager.close(stmt); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertNewProduto(ProdutoTO produto){\n\t\ttry {\n\t\t\tmodelProduto.insertNewProduto(produto);\n\t\t\tsuper.updateViewPrincipal(viewPrincipal);\n\t\t} catch (ProdutoException e) {\n\t\t\te.printStackTrace();\n\t\t\tgetControllerError().initialize(e);\n\t\t}\n\t}", "@Override\r\n\tpublic void inserir(Evento evento) {\n\t\trepository.save(evento);\r\n\t}", "public void insertar(Proceso p, int tiempo) {\n\t\tif (p == null || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.id = p.id;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "public void insertProblema() {\n \n \n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n \n this.equipo.setEstado(true);\n this.prob = new ReporteProblema(equipo, this.problema, true,fecha);\n f.registrarReporte(this.prob);\n \n }", "public void agregar(Producto producto) throws BusinessErrorHelper;", "public void insert(Object objekt) throws SQLException {\r\n\t\t \r\n\t\tPomagaloVO ul = (PomagaloVO) objekt;\r\n\r\n\t\tif (ul == null)\r\n\t\t\tthrow new SQLException(\"Insert \" + tablica\r\n\t\t\t\t\t+ \", ulazna vrijednost je null!\");\r\n\t\t \r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement ps = null;\r\n\r\n\t\ttry {\r\n\t\t\tconn = conBroker.getConnection();\r\n\r\n\t\t\tps = conn.prepareStatement(insertUpit);\r\n\r\n\t\t\tps.setString(1, ul.getSifraArtikla());\r\n\t\t\tps.setString(2, ul.getNaziv());\r\n\t\t\tps.setInt(3, ul.getPoreznaSkupina().intValue());\r\n\r\n\t\t\tif (ul.getCijenaSPDVom() == null\r\n\t\t\t\t\t|| ul.getCijenaSPDVom().intValue() <= 0)\r\n\t\t\t\tps.setNull(4, Types.INTEGER);\r\n\t\t\telse\r\n\t\t\t\tps.setInt(4, ul.getCijenaSPDVom().intValue());\r\n\r\n\t\t\tString op = ul.getOptickoPomagalo() != null\r\n\t\t\t\t\t&& ul.getOptickoPomagalo().booleanValue() ? DA : NE;\r\n\r\n\t\t\tps.setString(5, op);\r\n\t\t\t\r\n\t\t\tps.setTimestamp(6, new Timestamp(System.currentTimeMillis()));\r\n\t\t\tps.setInt(7, NEPOSTOJECA_SIFRA);\r\n\t\t\tps.setTimestamp(8, null);\r\n\t\t\tps.setNull(9, Types.INTEGER);\r\n\r\n\t\t\tint kom = ps.executeUpdate();\r\n\r\n\t\t\tif (kom == 1) {\r\n\t\t\t\tul.setSifra(Integer.valueOf(0)); // po tome i pozivac zna da je\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// insert uspio...\r\n\t\t\t}// if kom==1\r\n\t\t\telse {\r\n\t\t\t\t//Logger.fatal(\"neuspio insert zapisa u tablicu \" + tablica, null);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// nema catch-anja SQL exceptiona... neka se pozivatelj iznad jebe ...\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (ps != null)\r\n\t\t\t\t\tps.close();\r\n\t\t\t} catch (SQLException e1) {\r\n\t\t\t}\r\n\t\t\tconBroker.freeConnection(conn);\r\n\t\t}// finally\r\n\r\n\t}", "public void insert(ProdutoPedido produtoPedido) {\n\t\tem.getTransaction().begin();\n\t\tem.persist(produtoPedido);\n\t\tem.getTransaction().commit();\n\t\tem.close();\n\t\temf.close();\n\t}", "public void insere(Pessoa pessoa){\n\t\tdb.save(pessoa);\n\t}", "@Override\r\n\tpublic MensajeBean inserta(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.inserta(nuevo);\r\n\t}", "public void insertar(Proceso p) {\n\t\tif (p == null) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.tllegada = p.tllegada;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.rrejecutada = p.rrejecutada;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\t\tint tamaņo = p.id.length();\n\t\tif (tamaņo == 1) {\n\t\t\tnuevo.id = p.id + \"1\";\n\t\t} else {\n\t\t\tchar id = p.id.charAt(0);\n\t\t\tint numeroId = Integer.parseInt(String.valueOf(p.id.charAt(1))) + 1;\n\t\t\tnuevo.id = String.valueOf(id) + String.valueOf(numeroId);\n\t\t}\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "private void insertar() {\n try {\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.insertar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Ingresado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para guardar registro!\");\n }\n }", "public void salvaProduto(Produto produto){\n conecta = new Conecta();\n conecta.iniciaConexao();\n\n String sql = \"INSERT INTO `JoalheriaJoia`.`Produto` (`codigo`, `nome`, `valorCusto`, `valorVenda`, `idTipoJoia` , `quantidadeEstoque`) VALUES (?, ?, ?, ?, ?, ?);\";\n\n try {\n PreparedStatement pstm;\n pstm = conecta.getConexao().prepareStatement(sql); \n \n pstm.setString(1, produto.getCodigo());\n pstm.setString(2, produto.getNome());\n pstm.setFloat(3, produto.getValorCusto());\n pstm.setFloat(4, produto.getValorVenda());\n pstm.setInt(5, produto.getTipoJoia().getIdTipoJoia());\n pstm.setInt(6, produto.getQuantidadeEstoque());\n pstm.execute();\n } catch (SQLException ex) {\n Logger.getLogger(ProdutoDao.class.getName()).log(Level.SEVERE, null, ex);\n }\n conecta.fechaConexao(); \n \n }", "public boolean inserirProposta(Proposta novaProposta) {\n\n conectarnoBanco();\n\n String sql = \"INSERT INTO proposta (propostaRealizada,valorProposta,id_usuario,id_projeto,id_client) values (?,?,?,?,?)\";\n\n try {\n pst = con.prepareStatement(sql);\n \n pst.setString(1, novaProposta.getPropostaRealizada());\n String prop = Float.toString(novaProposta.getValorProposta());\n pst.setString(2, prop);\n String usuario = Integer.toString(novaProposta.getIdUsuario());\n pst.setString(3, usuario);\n String proj = Integer.toString(novaProposta.getIdProjeto());\n pst.setString(4, proj);\n String cliente = Integer.toString(novaProposta.getIdCliente());\n pst.setString(5, cliente);\n pst.execute();\n\n sucesso = true;\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao inserir proposta = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return sucesso;\n }", "public void AgregarUsuario(Usuario usuario)\n {\n //encerramos todo en un try para manejar los errores\n try{\n //si no hay ninguna conexion entonces generamos una\n if(con == null)\n con = Conexion_Sql.getConexion();\n \n String sql = \"INSERT INTO puntajes(nombre,puntaje) values(?,?)\";\n \n PreparedStatement statement = con.prepareStatement(sql);\n statement.setString(1, usuario.RetornarNombre());\n statement.setInt(2, usuario.RetornarPremio());\n int RowsInserted = statement.executeUpdate();\n \n if(RowsInserted > 0)\n {\n System.out.println(\"La insercion fue exitosa\");\n System.out.println(\"--------------------------------------\");\n }\n else\n {\n System.out.println(\"Hubo un error con la insercion\");\n System.out.println(\"--------------------------------------\");\n }\n }\n catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n }", "public static Posee insertPosee(Date fecha_inicio,ServicioAdicional serv_adicional,\n Producto producto){\n Posee miPosee = new Posee(fecha_inicio,serv_adicional,producto);\n miPosee.registrarPosee();\n \n return miPosee;\n }", "public static void inserir(Venda venda)\r\n throws Exception {\r\n venda.setId(totalVenda++);\r\n listaVenda.add(venda);\r\n }", "public Producto guardar(Producto producto) throws IWDaoException;", "@Override\r\n\tpublic void insertar() {\n\t\ttab_cuenta.eliminar();\r\n\t\t\r\n\t\t\r\n\t}", "public SgfensPedidoProductoPk insert(SgfensPedidoProducto dto) throws SgfensPedidoProductoDaoException;", "public void InsertarProceso(Proceso nuevo) {\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tthis.cabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t}", "private void insertar() {\n String nombre = edtNombre.getText().toString();\n String telefono = edtTelefono.getText().toString();\n String correo = edtCorreo.getText().toString();\n // Validaciones\n if (!esNombreValido(nombre)) {\n TextInputLayout mascaraCampoNombre = (TextInputLayout) findViewById(R.id.mcr_edt_nombre_empresa);\n mascaraCampoNombre.setError(\"Este campo no puede quedar vacío\");\n } else {\n mostrarProgreso(true);\n String[] columnasFiltro = {Configuracion.COLUMNA_EMPRESA_NOMBRE, Configuracion.COLUMNA_EMPRESA_TELEFONO\n , Configuracion.COLUMNA_EMPRESA_CORREO, Configuracion.COLUMNA_EMPRESA_STATUS};\n String[] valorFiltro = {nombre, telefono, correo, estado};\n Log.v(\"AGET-ESTADO\", \"ENVIADO: \" + estado);\n resultado = new ObtencionDeResultadoBcst(this, Configuracion.INTENT_EMPRESA_CLIENTE, columnasFiltro, valorFiltro, tabla, null, false);\n if (ID.isEmpty()) {\n resultado.execute(Configuracion.PETICION_EMPRESA_REGISTRO, tipoPeticion);\n } else {\n resultado.execute(Configuracion.PETICION_EMPRESA_MODIFICAR_ELIMINAR + ID, tipoPeticion);\n }\n }\n }", "@Override\n\tpublic void insertarServicio(Servicio nuevoServicio) {\n\t\tservicioDao= new ServicioDaoImpl();\n\t\tservicioDao.insertarServicio(nuevoServicio);\n\t\t\n\t\t\n\t}", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }", "public static void guardarNuevaConsulta(Consulta consulta) throws SQLException {\n\t\tjava.sql.Date fechaSQL = new java.sql.Date(consulta.getFecha().getTime());\r\n\t\t\r\n\t\tconsultaInsertarConsulta.setDate(1, fechaSQL);\r\n\t\tconsultaInsertarConsulta.setString(2, consulta.getMascota().getNroPatente());\r\n\t\tconsultaInsertarConsulta.setString(3, consulta.getVeterinario().getCodigo());\r\n\t\tconsultaInsertarConsulta.executeQuery();\r\n\r\n\t}", "boolean agregarProducto(Producto p) {\n boolean hecho = false;\n try {\n operacion = ayudar.beginTransaction();\n ayudar.save(p);\n operacion.commit();\n } catch (Exception e) {\n operacion.rollback();\n System.out.println(e);\n }\n return hecho;\n }", "public void insertar(int rafaga, int tiempo) {\n\t\tif (rafaga <= 0 || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.id = String.valueOf((char) this.caracter);\n\t\tthis.caracter++;\n\t\tnuevo.rafaga = rafaga;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.ColaProviene = this.NombreCola;\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += rafaga;\n\t\tthis.Ordenamiento();\n\t}", "public void insertar(String dato){\r\n \r\n if(estaVacia()){\r\n \r\n primero = new NodoJugador(dato);\r\n }else{\r\n NodoJugador temporal = primero;\r\n while(temporal.getSiguiente()!=null){\r\n temporal = temporal.getSiguiente();\r\n }\r\n \r\n temporal.setSiguiente(new NodoJugador(dato));\r\n }\r\n }", "@Override\r\n public int createDetalleventa(Detalleventa dv) {\r\n sql = \"INSERT INTO public.detalle_venta(id_venta, item, igv, sub_total, descuento, id_producto_stock, cantidad, precio_unit) \"\r\n + \"VALUES(\"+dv.getId_venta()+\",\"+dv.getItem()+\",\"+dv.getIgv()+\",\"+dv.getSub_total()+\",\"+dv.getDescuento()+\",\"+dv.getId_producto_stock()+\",\"+dv.getCantidad()+\", \"+dv.getPrecio_unit()+\")\";\r\n return cx.performKeys(sql);\r\n }", "public void crearProductoSucursal(BProducto bProducto,\r\n\t\t\tBSucursal bSucursal, Connection conn, BUsuario usuario) throws SQLException {\n\t\tPreparedStatement pstm;\r\n\t\t\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"INSERT \\n\");\r\n\t\tsql.append(\"INTO fidelizacion.producto_sucursal \\n\");\r\n\t\tsql.append(\" ( \\n\");\r\n\t\tsql.append(\" sucursal_id , \\n\");\r\n\t\tsql.append(\" producto_id , \\n\");\r\n\t\tsql.append(\" stock , \\n\");\r\n\t\tsql.append(\" usuario_modificacion, \\n\");\r\n\t\tsql.append(\" fecha_creacion , \\n\");\r\n\t\tsql.append(\" fecha_modificacion , \\n\");\r\n\t\tsql.append(\" estado , \\n\");\r\n\t\tsql.append(\" usuario_creacion \\n\");\r\n\t\tsql.append(\" ) \\n\");\r\n\t\tsql.append(\" VALUES \\n\");\r\n\t\tsql.append(\" ( \\n\");\r\n\t\tsql.append(\" ? , \\n\");\r\n\t\tsql.append(\" ? , \\n\");\r\n\t\tsql.append(\" 0 , \\n\");\r\n\t\tsql.append(\" NULL , \\n\");\r\n\t\tsql.append(\" SYSDATE, \\n\");\r\n\t\tsql.append(\" NULL , \\n\");\r\n\t\tsql.append(\" 1 , \\n\");\r\n\t\tsql.append(\" ? \\n\");\r\n\t\tsql.append(\" )\");\r\n\t\t\r\n\t\tpstm = conn.prepareStatement(sql.toString());\r\n\t\tpstm.setInt(1,bSucursal.getCodigo());\r\n\t\tpstm.setInt(2,bProducto.getCodigo());\r\n\t\tpstm.setInt(3,usuario.getCodigo());\r\n\t\t\r\n\t\tpstm.executeUpdate();\r\n\t\r\n\t\tpstm.close();\r\n\t}", "public void salvar() throws Exception {\t\r\n\t\t\t\t\r\n\t\tDate date = new Date();\r\n\t\tString url = evento.getUrl();\r\n\t\tevento.setNmStatus(EventoService.getStatus(url));\r\n\t\tevento.setDataHora(date);\r\n\t\teventoRepository.save(evento); // COLOCAMOS NO BANCO\r\n\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage(\"Cadastro inserido\"));\r\n\t\tif (!modoEdicao)\r\n\t\t\teventos.add(evento); // COLOCAMOS NA LISTA\r\n\t\tevento = new Evento();\r\n\t\tmodoEdicao = false;\r\n\t}", "@Override\r\n\tpublic void insertar() {\n\t\ttab_nivel_funcion_programa.insertar();\r\n\t\t\t\r\n\t\t\r\n\t}", "public void darDeAltaProducto(Producto producto) throws SQLException {\n\t\tDataProducto dp = new DataProducto();\n\t\tdp.updateBajaLogica(producto);\n\t}", "@Override\n\tpublic MensajeBean inserta(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.inserta(nuevo);\n\t}", "public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}", "public void createEmp(Empresa p) throws ClassNotFoundException {\r\n\r\n java.sql.Connection con = ConnectionFactory.getConnection();\r\n PreparedStatement stmt = null;\r\n\r\n try {\r\n stmt = con.prepareStatement(\"INSERT INTO tbempresas(codEmp,nomeEmp)\" + \"VALUES(?,?)\");\r\n stmt.setInt(1, p.getCodEmp());\r\n stmt.setString(2, p.getNomeEmp());\r\n\r\n stmt.executeUpdate();\r\n\r\n JOptionPane.showMessageDialog(null, \"salvo com sucesso\");\r\n } catch (SQLException ex) {\r\n System.out.println(ex);\r\n } finally {\r\n ConnectionFactory.closeConnection((com.mysql.jdbc.Connection) con, stmt);\r\n }\r\n }", "public void insertar(Trabajo t){\r\n\t\tif(!estaLlena()){\r\n\t\t\tultimo = siguiente(ultimo);\r\n\t\t\telementos[ultimo] = t;\r\n\t\t}\r\n\t}", "public void insertar() throws SQLException {\n String sentIn = \" INSERT INTO datosnodoactual(AmigoIP, AmigoPuerto, AmigoCertificado, AmigoNombre, AmigoSobreNombre, AmigoLogueoName, AmigoPassword) \"\r\n + \"VALUES (\" + AmigoIp + \",\" + AmigoPuerto + \",\" + AmigoCertificado + \",\" + AmigoNombre + \",\" + AmigoSobreNombre + \",\" + AmigoLogueoName + \",\" + AmigoPassword + \")\";\r\n System.out.println(sentIn);\r\n InsertApp command = new InsertApp();\r\n try (Connection conn = command.connect();\r\n PreparedStatement pstmt = conn.prepareStatement(sentIn)) {\r\n if (pstmt.executeUpdate() != 0) {\r\n System.out.println(\"guardado\");\r\n } else {\r\n System.out.println(\"error\");\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }", "@Override\n\tpublic void insertProduct(ProductVO dto) {\n\n\t}", "@Override\r\n\tpublic void insert(Product product) {\n\t\tproduct.setCreateDate(new Date());\r\n\t\tproductMapper.insert(product);\r\n\t}", "private void insertData() \n {\n for (int i = 0; i < 3; i++) {\n TarjetaPrepagoEntity entity = factory.manufacturePojo(TarjetaPrepagoEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n for(int i = 0; i < 3; i++)\n {\n PagoEntity pagos = factory.manufacturePojo(PagoEntity.class);\n em.persist(pagos);\n pagosData.add(pagos);\n\n }\n \n data.get(2).setSaldo(0.0);\n data.get(2).setPuntos(0.0);\n \n double valor = (Math.random()+1) *100;\n data.get(0).setSaldo(valor);\n data.get(0).setPuntos(valor); \n data.get(1).setSaldo(valor);\n data.get(1).setPuntos(valor);\n \n }", "public void insertarInicio(E dato) {\n\t\tprimero=new Nodo<E>(dato,primero);\n\t\tif (estaVacia()) {\n\t\t\tultimo=primero;\n\t\t}\n\t\tcantidad++;\n\t}", "@Override\n @Transactional\n public Producto save(Producto producto) {\n Presentacion presentacion = presentacionDao.findById(producto.getPresentacion().getId());\n producto.setPresentacion(presentacion);\n return productoDao.save(producto);\n }", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }", "private void insertarImpresora() throws SQLException {\n String vCodigoSerie = FarmaLoadCVL.getCVLCode(\"cmbSerie\", cmbSerie.getSelectedIndex());\n String vCodigoComprobante = FarmaLoadCVL.getCVLCode(\"cmbComprobante\", cmbComprobante.getSelectedIndex());\n String vCodigoModelo = cmbModelo.getSelectedItem().toString();\n String vSerieImpr = txtSerieImpr.getText();\n DBImpresoras.ingresaImpresora(FarmaVariables.vCodGrupoCia, FarmaVariables.vCodLocal, vCodigoSerie,\n vCodigoComprobante, txtDescImpresora.getText().trim(),\n txtNroComprobante.getText().trim(), txtColaImpresion.getText().trim(),\n vCodigoModelo,vSerieImpr);\n }", "public void nuevoPaciente(String idPaciente, String DNI, String nombres, String apellidos, String direccion, String ubigeo, String telefono1, String telefono2, String edad)\n {\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"insert into \" + \" paciente(idPaciente, dui, nombres, apellidos, direccion, ubigeo, telefono1, telefono2, edad)\" + \"values (?,?,?,?,?,?,?,?,?)\");\n \n pstm.setString(1, idPaciente);\n pstm.setString(2, DNI);\n pstm.setString(3, nombres);\n pstm.setString(4, apellidos);\n pstm.setString(5, direccion);\n pstm.setString(6, ubigeo);\n pstm.setString(7, telefono1);\n pstm.setString(8, telefono2);\n pstm.setString(9, edad); \n \n pstm.execute();\n pstm.close();\n }\n catch(SQLException e)\n {\n System.out.print(e);\n }\n }", "@Insert(onConflict = OnConflictStrategy.IGNORE)\n void insert(DataTugas dataTugas);", "public void AgregarVenta() {\r\n if (vista.jTcodigodebarras.equals(\"\")) {//C.P.M si el componete esta vacio es que no a insertado algun codigo a buscar\r\n JOptionPane.showMessageDialog(null, \"No has ingresado un codigo de barras\");//C.P.M se lo notificamos a el usuario\r\n } else {//C.P.M de lo contrario es que inserto algo y ay que buscarlo\r\n try {\r\n modelo.setCodigobarras(vista.jTcodigodebarras.getText());//C.P.M le mandamos el codigo a buscar a el modelo\r\n rs = modelo.Buscarcodigobarras();//C.P.M cachamos el resultado de la consulta\r\n if (rs.next() == true) {//C.P.M preguntamos si trai datos si es asi \r\n String nombre = rs.getString(\"nombre_producto\");//C.P.M obtenemos el nombre de el resultado\r\n float precio = Float.parseFloat(rs.getString(\"precio\"));//C.P.M obtenemos el precio\r\n String precioformato = format.format(precio);//C.P.M le damos el formato adecuado esta variable la utilizamos para enviarla a la vista\r\n float totalPro = Float.parseFloat(precioformato);//C.P.M cambiamos a flotante ya el precio con el formato adecuado\r\n String cant = JOptionPane.showInputDialog(null, \"Cantidad: \");//C.P.M preguntamos la cantidad del prducto\r\n float cantidad = Float.parseFloat(cant);//C.P.M convertimos a flotante la cantidad\r\n totalPro = totalPro * cantidad;//C.P.M obtenemos el total de ese producto multiplicando al cantidad por el precio\r\n total = Float.parseFloat(vista.jTtotal.getText());//C.P.M obtenemos el total de la venta \r\n total = totalPro + total;//C.P.M le sumamos el total del producto ingresado al total ya de la venta\r\n String totalaenviar = format.format(total);//C.P.M le damos el formato adecuado para enviar el nuevo total\r\n vista.jTtotal.setText(totalaenviar);//C.P.M le enviamos el nuevo total a la vista\r\n DefaultTableModel temp = (DefaultTableModel) vista.Tlista.getModel();//C.P.M obtenemos el modelo de la tabla\r\n Object[] fila = new Object[3];//C.P.M creamos un areglo con el tamano de la nota\r\n fila[0] = cant;//C.P.M le agregamos la cantidad \r\n fila[1] = nombre;//C.P.M le agregamos el nombre\r\n fila[2] = precioformato;//C.P.M y el precio con el formato\r\n temp.addRow(fila);//C.P.M lo agregamos a la tabla como una nueva fila\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"No existe un artículo con dicho código\");\r\n }\r\n vista.jTcodigodebarras.setText(\"\");//C.P.M limpiamos el codigo de barras y le colocamos el foco\r\n vista.jTcodigodebarras.requestFocus();//C.P.M le colocamos el foco\r\n } catch (SQLException ex) {//C.P.M si ocurre un error le notificamos a el usuario\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al consultar el codigo de barras\");\r\n }\r\n }\r\n }", "private void insertData() {\n compra = factory.manufacturePojo(CompraVentaEntity.class);\n compra.setId(1L);\n compra.setQuejasReclamos(new ArrayList<>());\n em.persist(compra);\n\n for (int i = 0; i < 3; i++) {\n QuejasReclamosEntity entity = factory.manufacturePojo(QuejasReclamosEntity.class);\n entity.setCompraVenta(compra);\n em.persist(entity);\n data.add(entity);\n compra.getQuejasReclamos().add(entity);\n }\n }", "@Override\n\tpublic void insert(Product product) {\n\t\tTransaction txTransaction = session.beginTransaction();\n\t\tsession.save(product);\n\t\ttxTransaction.commit();\n\t\tSystem.out.println(\"Product Inserted\");\n\t\t\n\t\t\n\t}", "public void crearActividad (Actividad a) {\r\n String query = \"INSERT INTO actividad (identificacion_navegate, numero_matricula, fecha, hora, destino, eliminar) VALUES (\\\"\" \r\n + a.getIdentificacionNavegante()+ \"\\\", \" \r\n + a.getNumeroMatricula() + \", \\\"\" \r\n + a.getFecha() + \"\\\", \\\"\" \r\n + a.getHora() + \"\\\", \\\"\" \r\n + a.getDestino()+ \"\\\" ,false)\";\r\n try {\r\n Statement st = con.createStatement();\r\n st.executeUpdate(query);\r\n st.close();\r\n JOptionPane.showMessageDialog(null, \"Actividad creada\", \"Operación exitosa\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PActividad.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public boolean añadirproducto(ProductoDTO c) {/* */\r\n try {\r\n\r\n try {\r\n try {\r\n PreparedStatement ps;\r\n ps = conn.getConn().prepareStatement(SQL_INSERT);\r\n ps.setInt(1, c.getId());\r\n ps.setString(2, c.getDescripcion());\r\n ps.setString(3, c.getFechaproducto());\r\n ps.setInt(4, c.getStock());\r\n ps.setInt(5, c.getPrecio());\r\n ps.setString(6, c.getNombre());\r\n ps.setString(7, c.getFechacaducidad());\r\n ps.setString(8, c.getFechaelaboracion());\r\n ps.setString(9, c.getNombrecategoria());\r\n\r\n if (ps.executeUpdate() > 0) {\r\n\r\n JOptionPane.showMessageDialog(null, \"Producto registrado correctamente\");\r\n return true;\r\n }\r\n } catch (MysqlDataTruncation ef) {\r\n JOptionPane.showMessageDialog(null, \"Formato de fecha debe ser MM/DD/AAAA\");\r\n }\r\n\r\n } catch (MySQLIntegrityConstraintViolationException e) {\r\n JOptionPane.showMessageDialog(null, \"codigo ya existe\");\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n conn.cerrarconexion();\r\n }\r\n JOptionPane.showMessageDialog(null, \"no se ha podido registrar\");\r\n return false;\r\n\r\n }", "public void InsertarNodo(int nodo) {\r\n Nodo nuevo_nodo = new Nodo(nodo);\r\n nuevo_nodo.siguiente = UltimoValorIngresado;\r\n UltimoValorIngresado = nuevo_nodo;\r\n tamaño++;\r\n }", "private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n em.persist(entity);\r\n dataUsuario.add(entity);\r\n }\r\n for (int i = 0; i < 3; i++) {\r\n CarritoDeComprasEntity entity = factory.manufacturePojo(CarritoDeComprasEntity.class);\r\n if (i == 0 ){\r\n entity.setUsuario(dataUsuario.get(0));\r\n }\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }", "public void registrarQuarto(Quarto vossoQuarto) {\n\t\t\n\n\t\ttry {\n\t\t\tStatement stm = conex.getConnection().createStatement();\n\t\t\tstm.executeUpdate(\"INSERT INTO quarto(tipo,metro,descricao) VALUES ('\"\n\t\t\t\t\t+ vossoQuarto.getTipo() + \"', \"\n\t\t\t\t\t+ vossoQuarto.getMetro() + \", '\"\n\t\t\t\t\t+ vossoQuarto.getDescricao() + \n \"')\"); \n \n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Feito Registro na Base de Dados\", \"Informativo\",\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\tstm.close();\n\t\t\tconex.desconectar();\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Registro não realizado, verifique seu console para verificar o error informado\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}", "@Transactional\r\n\r\n\t@Override\r\n\tpublic void insertar(Distrito distrito) {\n\t\tem.persist(distrito);\t\r\n\t}", "@Override\r\n\tpublic void insert(Object obj) throws DAOException {\n\t\tOfferta offerta;\r\n\t\ttry {\r\n\t\t\tofferta = (Offerta) obj;\r\n\r\n\t\t\tconn = getConnection(usr, pass);\r\n\r\n\t\t\tps = conn.prepareStatement(insertQuery);\r\n\r\n\t\t\tSystem.out.println(\"Inserimento dell'offerta nel db.\");\r\n\t\t\tofferta.print();\r\n\r\n\t\t\tps.setInt(1, offerta.getIdOfferta());\r\n\t\t\tps.setInt(2, offerta.getIdTratta());\r\n\t\t\tps.setInt(3, offerta.getData().getGiorno());\r\n\t\t\tps.setInt(4, offerta.getData().getMese());\r\n\t\t\tps.setInt(5, offerta.getData().getAnno());\r\n\t\t\tps.setInt(6, offerta.getOraPartenza().getOra());\r\n\t\t\tps.setInt(7, offerta.getOraPartenza().getMinuti());\r\n\t\t\tps.setInt(8, offerta.getOraArrivo().getOra());\r\n\t\t\tps.setInt(9, offerta.getOraArrivo().getMinuti());\r\n\t\t\tps.setInt(10, offerta.getPosti());\r\n\t\t\tps.setInt(11, offerta.getDataInserimento().getGiorno());\r\n\t\t\tps.setInt(12, offerta.getDataInserimento().getMese());\r\n\t\t\tps.setInt(13, offerta.getDataInserimento().getAnno());\r\n\r\n\t\t\tps.executeUpdate();\r\n\r\n\t\t} catch (ClassCastException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert ClassCastException.\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new DAOException(\"Errore in insert SQLException.\");\r\n\t\t}\r\n\r\n\t}", "public void insertarObservacionTrbInvestigacion(String periodo, String identificacion, String obs) {\n\t\ttry {\n\t\t\tthis.objADAO.insertarObservacionTrbInvestigacion(periodo, identificacion, obs);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ServicioEntity entity = factory.manufacturePojo(ServicioEntity.class);\n em.persist(entity);\n dataServicio.add(entity);\n }\n for (int i = 0; i < 3; i++) {\n QuejaEntity entity = factory.manufacturePojo(QuejaEntity.class);\n if (i == 0) {\n entity.setServicio(dataServicio.get(0));\n }\n em.persist(entity);\n data.add(entity);\n }\n }", "@FXML\n\t private void insertProduct (ActionEvent actionEvent) throws SQLException, ClassNotFoundException {\n\t try {\n\t ProductDAO.insertProd(denumireText.getText(),producatorText.getText(),pretText.getText(),marimeText.getText(),culoareText.getText());\n\t resultArea.setText(\"Product inserted! \\n\");\n\t } catch (SQLException e) {\n\t resultArea.setText(\"Problem occurred while inserting product \" + e);\n\t throw e;\n\t }\n\t }", "@Override\r\n\tpublic void guardarCambiosProducto(Producto producto) {\r\nconectar();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = miConexion.prepareStatement(ConstantesSql.GUARDAR_CAMBIOS_PRODUCTO);\r\n\t\t\tps.setString(1, producto.getNombre());\r\n\t\t\tps.setString(2, producto.getCantidad());;\r\n\t\t\tps.setString(3, producto.getPrecio());\r\n\t\t\tps.setString(6, producto.getOferta());\r\n\t\t\tps.setString(4, producto.getFechaCad());\r\n\t\t\tps.setString(5, producto.getProveedor());\r\n\t\t\tps.setString(7, producto.getComentario());\r\n\t\t\tps.setInt(8, producto.getId());\r\n\t\t\tps.execute();\r\n\t\t\tps.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"error sql guardar producto\");\r\n\t\t}\r\n\t\t\r\n\t\tdesconectar();\r\n\t}", "public String agregarCuenta(Cuenta cuenta) {\n String mensaje = \"\";\n try {\n PreparedStatement PrSt;\n String Query = \"INSERT INTO Cuenta VALUES(?,?,?,?)\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, cuenta.getCodigo());\n PrSt.setDate(2, cuenta.getCreacion());\n PrSt.setDouble(3, cuenta.getCredito());\n PrSt.setString(4, cuenta.getCodigo_cliente());\n int resultado = PrSt.executeUpdate();\n if (resultado > 0) {\n mensaje = \"Agregada Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n } else {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente();\n }\n PrSt.close();\n } catch (SQLException e) {\n mensaje = \"Fallo al agregar Cuenta Codigo No.\" + cuenta.getCodigo() + \" Para el cliente con codigo: \" + cuenta.getCodigo_cliente() + \" Error: \" + e.toString();\n }\n return mensaje;\n }", "private void insertData() {\n\n cliente = factory.manufacturePojo(ClienteEntity.class);\n em.persist(cliente);\n for (int i = 0; i < 3; i++) {\n FormaPagoEntity formaPagoEntity = factory.manufacturePojo(FormaPagoEntity.class);\n formaPagoEntity.setCliente(cliente);\n em.persist(formaPagoEntity);\n data.add(formaPagoEntity);\n }\n }", "public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }", "void insert(CTipoComprobante record) throws SQLException;", "public boolean insertar(vpoliza dts) {\r\n sSql = \"INSERT INTO poliza\\n\"\r\n + \"(monto_total,fecha_inicio, fecha_venc, cliente_vehiculo_chapaId) \\n\"\r\n + \"VALUES\\n\"\r\n + \"(?,?,?,?);\";\r\n try {\r\n PreparedStatement pst = cn.prepareStatement(sSql);\r\n /*Se crea un objeto pst del tipo PreparedStatement (prepara la consulta sql)\r\n para insertar los datos en la base de datos mediante insert into*/\r\n pst.setInt(1, dts.getMonto_total());\r\n pst.setDate(2, dts.getFecha_inicio());\r\n pst.setDate(3, dts.getFecha_venc());\r\n \r\n pst.setString(4, dts.getCliente_vehiculo_chapaId());\r\n \r\n int n = pst.executeUpdate();\r\n \r\n if (n != 0) {\r\n return true;\r\n }\r\n return false;\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n JOptionPane.showMessageDialog(null, \"LO SENTIMOS HA OCURRIDO UN ERROR >> \" + ex + \" <<\");\r\n return false;\r\n }\r\n }", "public static void addOnePayment(Payment pagamento) throws ClassNotFoundException{\r\n\t\t\r\n\t\t//Insertion occurs in table \"metododipagamento\"\r\n \t//username:= postgres\r\n \t//password:= effe\r\n \t//Database name:=strumenti_database\r\n \t\r\n \tClass.forName(\"org.postgresql.Driver\");\r\n \t\r\n \ttry (Connection con = DriverManager.getConnection(JDBC_URL, JDBC_USERNAME, JDBC_PASSWORD)){\r\n \t\t\r\n \t\ttry (PreparedStatement pst = con.prepareStatement(\r\n \t\t\t\t\"INSERT INTO \" + NOME_TABELLA + \" \"\r\n \t\t\t\t+ \"(cliente, nomemetodo, credenziali) \"\r\n \t\t\t\t+ \"VALUES (?,?,?)\")) {\r\n \t\t\t\r\n \t\t\tpst.setString(1, pagamento.getUserMailFromPayment());\r\n \t\t\tpst.setString(2, pagamento.getNomeMetodo());\r\n \t\t\tpst.setString(3, pagamento.getCredenziali());\r\n \t\t\t\r\n \t\t\tint n = pst.executeUpdate();\r\n \t\t\tSystem.out.println(\"Inserite \" + n + \" righe in tabella \" \r\n \t\t\t\t\t\t\t\t+ NOME_TABELLA + \": \" + pagamento.getUserMailFromPayment() + \".\");\r\n \t\t\t\r\n \t\t} catch (SQLException e) {\r\n \t\t\tSystem.out.println(\"Errore durante inserimento dati: \" + e.getMessage());\r\n \t\t}\r\n \t\t\r\n \t} catch (SQLException e){\r\n \t\tSystem.out.println(\"Problema durante la connessione iniziale alla base di dati: \" + e.getMessage());\r\n \t}\r\n\t\t\r\n\t}", "public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }", "public static boolean insertar (Prospecto prospecto){\r\n \r\n \r\n try {\r\n PreparedStatement sentencia = Conexion.getConexion().prepareStatement(SQL_INSERT_PROSPECTO);\r\n \r\n sentencia.setString(1, prospecto.getCedula());\r\n sentencia.setString(2, prospecto.getNombre());\r\n sentencia.setString(3, prospecto.getApellido1());\r\n sentencia.setString(4, prospecto.getApellido2());\r\n sentencia.setObject(5, prospecto.getFechaNacimiento());\r\n sentencia.setObject(6, prospecto.getFechaGraduacionColegio());\r\n sentencia.setObject(7, prospecto.getFechaPosibleIngreso());\r\n sentencia.setString(8, prospecto.getCorreo());\r\n sentencia.setString(9, prospecto.getCelular());\r\n \r\n int fila = sentencia.executeUpdate();\r\n return fila>0; // Si es mayor que cero quiere decir que se insertó el registro en base de datos.\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProspectoGestion.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n return false;\r\n \r\n }", "public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public void insert(Curso curso) throws SQLException {\n String query = \"\";\n Conexion db = new Conexion();\n\n query = \"INSERT INTO curso VALUES (NULL,?,?,?);\";\n \n PreparedStatement ps = db.conectar().prepareStatement(query);\n //Aquí se asignaran a los interrogantes(?) anteriores el valor oportuno en el orden adecuado\n ps.setString(1, curso.getNombre()); \n ps.setInt(2, curso.getFamilia());\n ps.setString(3, curso.getProfesor());\n \n\n if (ps.executeUpdate() > 0) {\n System.out.println(\"El registro se insertó exitosamente.\");\n } else {\n System.out.println(\"No se pudo insertar el registro.\");\n }\n\n ps.close();\n db.conexion.close();\n }", "public boolean insertarOrdenador(Ordenador o) {\n\t\tboolean resultado = false;\n\t\ttry {\n\t\t\tSimpleDateFormat formato = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\n\t\t\tXPathQueryService consulta = (XPathQueryService) col.getService(\"XPathQueryService\", \"1.0\");\n\t\t\tconsulta.query(\"update insert \"\n\t\t\t\t\t+ \"<ordenador codigo='\"+o.getCodigo()+\"' fecha='\"+\n\t\t\t\t\t formato.format(o.getFecha())+\"'>\"\n\t\t\t\t\t + \"<piezas/>\" +\n\t\t\t\t\t \"<precio>0</precio>\" \n\t\t\t\t\t+\"</ordenador>\"\n\t\t\t\t\t+ \"into /ordenadores\");\n\t\t\tresultado=true;\n\t\t} catch (XMLDBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "public void insert(Service servico){\n Database.servico.add(servico);\n }", "public void insertPokemon(Pokemon p) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tem.persist(p);\r\n\t\tem.getTransaction().commit();\r\n\t\tem.close();\r\n\t}", "@LogExceptions\n @Override\n public void insert(Data data) throws SQLException {\n Event event = (Event)data;\n Connection conn = DatabaseConnection.getConnection();\n \n try(PreparedStatement stmt = \n conn.prepareStatement(getMembers().getInsertFormat())) \n {\n stmt.setString(1, event.getEvent());\n stmt.setString(2, event.getDescription());\n stmt.setString(3, event.getLocation());\n stmt.setString(4, event.getDate());\n stmt.setString(5, event.getYear());\n stmt.setString(6, event.getMonth());\n stmt.setString(7, event.getDay());\n stmt.setString(8, event.getStart());\n stmt.setString(9, event.getEnd());\n stmt.executeUpdate();\n }\n }", "@Test\n\tpublic void test() {\n\t\tmyPDO pdo = myPDO.getInstance();\n\t\tString sql = \"INSERT INTO `RESTAURANT` (`NUMRESTO`,`MARGE`,`NBSALLES`,`NBEMPLOYEE`,`ADRESSE`,`PAYS`,`NUMTEL`,`VILLE`,`CP`) VALUES (?,?,?,?,?,?,?,?,?)\";\n\t\tpdo.prepare(sql);\n\t\tObject[] data = new Object[9];\n\t\tdata[0] = null;\n\t\tdata[1] = 10;\n\t\tdata[2] = 2;\n\t\tdata[3] = 2;\n\t\tdata[4] = \"test\";\n\t\tdata[5] = \"France\";\n\t\tdata[6] = \"0656056560\";\n\t\tdata[7] = \"reims\";\n\t\tdata[8] = \"51100\";\n\t\tpdo.execute(data,true);\n\t}", "@Override\n\tpublic void salvar(ProdutoPedido produtoPedido) {\n\t\tdao.save(produtoPedido);\n\t}", "public boolean addProductToTable(Product product) {\r\n\t\tString sqlCommand = \"Insert Into ProductTable \\n\"\r\n\t\t\t\t+ \"(Barcode, Product_Name, Delivery_Time, Quantity_In_Store, Quantity_In_storeroom, Supplier_Name, Average_Sales_Per_Day, \"\r\n\t\t\t\t+ \"Location_In_Store, Location_In_Storeroom, Faulty_Product_In_Store,Faulty_Product_In_Storeroom, Category)\\n\" + \"values(\" \r\n\t\t\t\t+ \"?\"+ \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\" + \"?\" + \",\"\r\n\t\t\t\t+ \"?\" + \",\" + \"?\" + \",\" + \"?\" + \")\";\r\n\t\ttry (Connection conn = DriverManager.getConnection(dataBase);\r\n\t\t\t\tPreparedStatement pstmt = conn.prepareStatement(sqlCommand)) {\r\n\t\t\tpstmt.setInt(1, product.getBarcodeProduct());\r\n\t\t\tpstmt.setString(2, product.getProductName());\r\n\t\t\tpstmt.setInt(3, product.getDeliveryTime());\r\n\t\t\tpstmt.setInt(4, product.getStoreQuantity());\r\n\t\t\tpstmt.setInt(5, product.getStoreroomQuantity());\r\n\t\t\tpstmt.setString(6, product.getSupplier());\r\n\t\t\tpstmt.setDouble(7, product.getAverageSalesPerDay());\r\n\t\t\tpstmt.setString(8, product.getStoreLocation());\r\n\t\t\tpstmt.setString(9, product.getStoreroomLocation());\r\n\t\t\tpstmt.setInt(10, product.getFaultyProductInStore());\r\n\t\t\tpstmt.setInt(11, product.getFaultyProductInStoreroom());\r\n\t\t\tpstmt.setInt(12, product.getCategoryID());\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"addProductToTable: \"+e.getMessage());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public void SalvarNovaPessoa(){\r\n \r\n\t\tpessoaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\r\n \r\n\t\t//INFORMANDO QUE O CADASTRO FOI VIA INPUT\r\n\t\tpessoaModel.setOrigemCadastro(\"I\");\r\n \r\n\t\tpessoaRepository.SalvarNovoRegistro(this.pessoaModel);\r\n \r\n\t\tthis.pessoaModel = null;\r\n \r\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\r\n \r\n\t}", "private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }", "@Override\n public synchronized int insert(final UfficioTecnico uff)\n throws SQLException {\n final Connection connection = connectionManager.getConnection();\n try {\n\n final PreparedStatement preparedStatement = connection\n .prepareStatement(INSERT_UFFICIO_TECNICO);\n int i = 1;\n preparedStatement.setString(i++, uff.getNome());\n preparedStatement.setString(i++, uff.getTel());\n preparedStatement.setString(i++, uff.getEmail());\n preparedStatement.setString(i, uff.getUbicazione());\n return preparedStatement.executeUpdate();\n } finally {\n connectionManager.freeConnection(connection);\n }\n }", "public static void insertarDatos(ArrayList<Producto> lista_productos) {\n\t\tfor (Producto producto : lista_productos) {\r\n\t\t\tDocument doc = new Document();\r\n\t\t\tdoc.put(\"nombre\", producto.getNombre());\r\n\t\t\tdoc.put(\"descripcion\", producto.getDescripcion());\r\n\t\t\tdoc.put(\"precio\", producto.getPrecio());\r\n\t\t\tcoleccion.insertOne(doc);\r\n\t\t}\r\n\t}", "int insert(ItoProduct record);", "@Override\n public void add(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"INSERT INTO curso (nombrecurso, idprofesor, claveprofesor, clavealumno) values (?, ?, ?, ?)\");\n\n pstmt.setString(1, entity.getNombre());\n pstmt.setInt(2, (entity.getIdProfesor() == 0)?4:entity.getIdProfesor() ); //creo que es sin profesor confirmado o algo por el estilo\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n \n pstmt.execute();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void processInsertar() {\n }", "private static void CrearVenda (BaseDades bd, int idproducte, int quantitat) {\n Producte prod = bd.consultarUnProducte(idproducte);\n java.sql.Date dataActual = getCurrentDate();//Data SQL\n if (prod != null) {\n if (bd.actualitzarStock(prod, quantitat, dataActual)>0) {//Hi ha estoc\n String taula = \"VENDES\";\n int idvenda = bd.obtenirUltimID(taula);\n Venda ven = new Venda(idvenda, prod.getIdproducte(), dataActual, quantitat);\n \n if (bd.inserirVenda(ven)>0)\n System.out.println(\"VENDA INSERIDA...\");\n } else\n System.out.println(\"NO ES POT FER LA VENDA, NO HI HA ESTOC...\");\n \n } else {\n System.out.println(\"NO HI HA EL PRODUCTE\");\n }\n }", "public void guardarProveedor(Proveedor v){\n pr.save(v);\n }", "public void insert(Product product) {\n this.products.add(product);\n }", "@Override\n\tpublic int insert(ProductDTO dto) {\n\t\treturn 0;\n\t}", "@Override\n public boolean inserir(Pessoa p) {\n try {\n pessoa.getPessoas().add(p);\n serializar(arquivo2Serializado, pessoa);\n } catch (Exception ex) {\n Logger.getLogger(PessoaDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return true;\n }", "@Override\n public void registrarPropiedad(Propiedad nuevaPropiedad, String pIdAgente) {\n int numFinca = nuevaPropiedad.getNumFinca();\n String modalidad = nuevaPropiedad.getModalidad();\n double area = nuevaPropiedad.getAreaTerreno();\n double metro = nuevaPropiedad.getValorMetroCuadrado();\n double fiscal = nuevaPropiedad.getValorFiscal();\n String provincia = nuevaPropiedad.getProvincia();\n String canton = nuevaPropiedad.getCanton();\n String distrito = nuevaPropiedad.getDistrito();\n String dirExacta = nuevaPropiedad.getDirExacta();\n String estado = nuevaPropiedad.getEstado();\n String tipo = nuevaPropiedad.getTipo();\n System.out.println(nuevaPropiedad.getFotografias().size());\n double precio = nuevaPropiedad.getPrecio();\n try {\n bdPropiedad.manipulationQuery(\"INSERT INTO PROPIEDAD (ID_PROPIEDAD, ID_AGENTE, MODALIDAD, \"\n + \"AREA_TERRENO, VALOR_METRO, VALOR_FISCAL, PROVINCIA, CANTON, DISTRITO, DIREXACTA, TIPO, \"\n + \"ESTADO, PRECIO) VALUES (\" + numFinca + \", '\" + pIdAgente + \"' , '\" + modalidad + \"',\" + \n area + \",\" + metro + \",\" + fiscal + \", '\" + provincia + \"' , '\" + canton + \"' , '\" + distrito \n + \"' , '\" + dirExacta + \"' , '\" + tipo + \"' , '\" + estado + \"', \" + precio + \")\");\n bdPropiedad.insertarFotografias(nuevaPropiedad);\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void create(PessoasEspacosDeCafe pec) {\n\n Connection con = ConnectionFactory.getConnection();\n PreparedStatement stmt = null;\n\n try {\n stmt = con.prepareStatement(\"INSERT INTO PessoasEspacosDeCafe (pessoasIdPessoas, espacosDeCafeIdEspacosDeCafe)VALUES(?, ?)\");\n\n stmt.setInt(1, pec.getPessoasIdPessoas());\n stmt.setInt(2, pec.getEspacosDeCafeIdEspacosDeCafe());\n\n stmt.executeUpdate();\n\n JOptionPane.showMessageDialog(null, \"Salvo com Sucesso!\");\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Erro ao Salvar: \" + ex);\n } finally {\n ConnectionFactory.closeConnection(con, stmt);\n }\n }", "public static Producto insertProducto(int codProd,String nomb_modelo,Cliente cliente){\n Producto prod = new Producto(codProd,nomb_modelo,cliente);\n try {\n prod.registrarProducto();\n } catch (SQLException ex) {\n // En caso de haber una excepcion se imprime el mensaje\n System.err.println(ex.getMessage());\n }\n return prod;\n }", "public void insertarOrden(Object dato) {\n Nodo nuevo = new Nodo(dato);\n int res = 0;\n // System.out.println(\"esxa\"+res);\n if (primero == null) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n // System.out.println(\"Es nulo\");\n// System.out.println(\"sss\"+primero.getDato());\n } else {\n res = comp.evaluar(dato, primero.getDato());\n // System.out.println(\"\"+res);\n if (res == -1) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n } else {\n int auxres = 0;\n Nodo anterior, actual;\n anterior = actual = primero;\n auxres = comp.evaluar(dato, actual.getDato());\n while ((actual.getReferencia() != null) && (auxres == 1)) {\n anterior = actual;\n actual = actual.getReferencia();\n auxres = comp.evaluar(dato, actual.getDato());\n }\n if (auxres == 1) {\n anterior = actual;\n }\n nuevo.setReferencia(anterior.getReferencia());\n anterior.setReferencia(nuevo);\n\n }\n }\n\n }", "public void insertarNota(Note nota){\n ContentValues valores = new ContentValues();\n valores.put(\"fecha\",nota.obtenerFechaFormateada());\n valores.put(\"titulo\",nota.getTitulo());\n valores.put(\"nota\",nota.getNota());\n if(nota.getIdExamenAsociado()!=-1){\n valores.put(\"examenAsociado\",nota.getIdExamenAsociado());\n }\n db.insert(\"nota\",null,valores);\n }", "private void nuevoJuego() { \n\n objJuegoTresEnRaya = new JuegoTresEnRaya();\n objJuegoTresEnRaya.addObserver(this);\n objJuegoTresEnRaya.setQuienComienza(JuegoTresEnRaya.JUGADOR);\n objJuegoTresEnRaya.setQuienJuega(JuegoTresEnRaya.JUGADOR);\n \n }", "@FXML\n private void guardarNuevaTarea(ActionEvent event) {\n String asignadoA = usuario.getUsuario();\n if (asignarComboBox.getSelectionModel().getSelectedItem().equals(\"otro usuario\")) {\n asignadoA = asignadoFX.getText();\n }\n String porcentaje = labelPorcentaje.getText().replace(\" %\", \"\");\n\n Tarea nuevaTarea = new Tarea(tituloFX.getText(), descripcionFX.getText(), prioridadFX.getValue(),\n estadoFX.getValue(), usuario.getUsuario(), asignadoA, Integer.parseInt(porcentaje));\n\n Connection con = Conexion.conectar(\"gestortareas\", \"proyecto\", \"proyecto\");\n try {\n PreparedStatement consulta = con.prepareStatement(\"INSERT INTO Tareas(Titulo, Descripcion, Prioridad, Estado, Creador, Asignacion, Progreso) \"\n + \"VALUES(?, ?, ?, ?, ?, ?, ?);\", Statement.RETURN_GENERATED_KEYS);\n consulta.setString(1, nuevaTarea.getTitulo());\n consulta.setString(2, nuevaTarea.getDescripcion());\n consulta.setString(3, nuevaTarea.getPrioridad());\n consulta.setString(4, nuevaTarea.getEstado());\n consulta.setString(5, nuevaTarea.getCreador());\n consulta.setString(6, nuevaTarea.getAsignacion());\n consulta.setInt(7, nuevaTarea.getProgreso());\n consulta.executeUpdate();\n // Se obtiene la clave generada por la base de datos\n ResultSet rs = consulta.getGeneratedKeys();\n rs.next();\n int codigo = rs.getInt(1);\n\n // Se envía la nueva tarea a la ventana de tareas para actualizar la tabla\n ventana.anyadirTareaTabla(nuevaTarea);\n\n Stage stage = (Stage) buttonGuardar.getScene().getWindow();\n stage.close();\n } catch (SQLException e) {\n Dialogo.error(\"Error\", null, \"Error al insertar en la base de datos.\");\n }\n Conexion.desconectar(con);\n }", "public VentanaCrearProducto(ControladorProducto controladorProducto) {\n initComponents();\n this.controladorProducto=controladorProducto;\n txtCodigoCrearProducto.setText(String.valueOf(this.controladorProducto.getCodigo()));\n this.setSize(1000,600);\n }", "public void insertar2(String nombre, String apellido, String mail, String celular, String comuna,String profesor,String alumno,String clave) {\n db.execSQL(\"insert into \" + TABLE_NAME + \" values (null,'\" + nombre + \"','\" + apellido + \"','\" + mail + \"','\" + celular + \"','\" + comuna + \"',\" + profesor + \",0,0,0,0,\" + alumno + \",'\" + clave + \"')\");\n }", "private void insertData() {\n\n for (int i = 0; i < 3; i++) {\n ProveedorEntity proveedor = factory.manufacturePojo(ProveedorEntity.class);\n BonoEntity entity = factory.manufacturePojo(BonoEntity.class);\n int noOfDays = 8;\n Date dateOfOrder = new Date();\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n Date date = calendar.getTime();\n entity.setExpira(date);\n noOfDays = 1;\n calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n date = calendar.getTime();\n entity.setAplicaDesde(date);\n entity.setProveedor(proveedor);\n em.persist(entity);\n ArrayList lista=new ArrayList<>();\n lista.add(entity);\n proveedor.setBonos(lista);\n em.persist(proveedor);\n pData.add(proveedor);\n data.add(entity); \n }\n }", "public long registrarAlmacenamiento(PersistenceManager pm,int tipo, int volumen, int peso, int nivelAbastecimiento, int unidadesDisponibles,\n\t\t\tint categoriaId, int idSucursal, int productoCodigoBarras) \n\t{\n\t\tQuery q = pm.newQuery(SQL, \"INSERT INTO \" + pp.darTablaAlmacenamiento () + \"(idSucursal, tipo, volumen, peso, nivelAbastecimiento, unidadesDisponible, idCategoria, productoCodigoBarras) values (?, ?, ?, ?, ?, ?, ?, ?)\");\n\t\tq.setParameters(idSucursal, tipo, volumen, peso, nivelAbastecimiento, unidadesDisponibles, categoriaId, productoCodigoBarras);\n\t\treturn (long) q.executeUnique(); \n\t}" ]
[ "0.6712313", "0.64485985", "0.62382156", "0.6211269", "0.6105365", "0.6098935", "0.60961777", "0.5985283", "0.5927029", "0.5920979", "0.5878651", "0.58688664", "0.58587056", "0.58474725", "0.58229727", "0.5810277", "0.5808715", "0.58053684", "0.57859904", "0.57642305", "0.5749229", "0.5736442", "0.5722738", "0.57168823", "0.5716289", "0.5708657", "0.5707669", "0.56978595", "0.56590813", "0.56488526", "0.56348616", "0.5631821", "0.56243724", "0.56186026", "0.5610265", "0.55991495", "0.5595651", "0.55859596", "0.5544248", "0.5542227", "0.5541003", "0.5524952", "0.55223656", "0.5517722", "0.5513842", "0.55096626", "0.54907507", "0.5482913", "0.54819256", "0.5480885", "0.547319", "0.5462759", "0.54564565", "0.5454213", "0.54451513", "0.54347277", "0.54337376", "0.5431573", "0.542931", "0.5425208", "0.5420264", "0.54199207", "0.5415752", "0.5398802", "0.5398484", "0.5398026", "0.5397415", "0.539687", "0.5396828", "0.5394211", "0.539393", "0.53921306", "0.5388775", "0.5387476", "0.53870404", "0.53866285", "0.53670305", "0.5364595", "0.536016", "0.535713", "0.5354388", "0.5350485", "0.53489614", "0.53467834", "0.53398085", "0.5333562", "0.5332352", "0.5330564", "0.53276664", "0.53212315", "0.5320621", "0.53197336", "0.5310573", "0.52988565", "0.52966595", "0.5293994", "0.52840215", "0.5273934", "0.5270305", "0.5268642" ]
0.5929833
8
Actualiza un unico registro en la tabla Productos_punto_venta.
@Override public void update(ProductosPuntoVentaPk pk, ProductosPuntoVenta dto) throws ProductosPuntoVentaDaoException { long t1 = System.currentTimeMillis(); PreparedStatement stmt = null; try { // Validamos la conexion this.validateConnection(); System.out.println("Executing " + SQL_UPDATE + " with DTO: " + dto); stmt = userConn.prepareStatement(SQL_UPDATE); int index = 1; stmt.setInt(index++, dto.getCantidad()); stmt.setInt(index++, dto.getIdPuntoVenta()); stmt.setInt(index, dto.getIdProducto()); int rows = stmt.executeUpdate(); reset(dto); long t2 = System.currentTimeMillis(); System.out.println(rows + " rows affected (" + (t2 - t1) + " ms)"); } catch (SQLException e) { e.printStackTrace(); throw new ProductosPuntoVentaDaoException("Exception: " + e.getMessage(), e); } finally { ResourceManager.close(stmt); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void atualizar(BeanProdutosJsp produto) {\n\n\t\ttry {\n\t\t\tString sql = \"update produtos set nome = ?, quantidade = ?, valor = ?, categoria_id = ? where id = \" + produto.getId();\n\t\t\t\n\t\t\tPreparedStatement preparedStatement;\n\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\n\t\t\tpreparedStatement.setString(1, produto.getNome());\n\t\t\tpreparedStatement.setDouble(2, produto.getQuantidade());\n\t\t\tpreparedStatement.setDouble(3, produto.getValor());\n\t\t\tpreparedStatement.setLong(4, produto.getCategoria_id());\n\n\t\t\tpreparedStatement.executeUpdate();\n\t\t\tconnection.commit();\n\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\n\t\t\ttry {\n\n\t\t\t\tconnection.rollback();\n\n\t\t\t} catch (SQLException e1) {\n\n\t\t\t\te1.printStackTrace();\n\n\t\t\t}\n\t\t}\n\t}", "public void darDeAltaProducto(Producto producto) throws SQLException {\n\t\tDataProducto dp = new DataProducto();\n\t\tdp.updateBajaLogica(producto);\n\t}", "public Producto actualizar(Producto producto) throws IWDaoException;", "@Override\r\n\tpublic void alterar(Evento evento) {\n\t\trepository.save(evento);\r\n\t}", "private void actualizarInventarios() {\r\n\t\tfor (InventarioProducto inventarioProducto : inventariosEditar) {\r\n\t\t\tproductoEJB.editarInventarioProducto(inventarioProducto);\r\n\t\t}\r\n\t}", "@Override\n @Transactional\n public Producto save(Producto producto) {\n Presentacion presentacion = presentacionDao.findById(producto.getPresentacion().getId());\n producto.setPresentacion(presentacion);\n return productoDao.save(producto);\n }", "@Override\n\tpublic void atualizar(Produto entidade) {\n\n\t}", "@Override\r\n\tpublic void guardarCambiosProducto(Producto producto) {\r\nconectar();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = miConexion.prepareStatement(ConstantesSql.GUARDAR_CAMBIOS_PRODUCTO);\r\n\t\t\tps.setString(1, producto.getNombre());\r\n\t\t\tps.setString(2, producto.getCantidad());;\r\n\t\t\tps.setString(3, producto.getPrecio());\r\n\t\t\tps.setString(6, producto.getOferta());\r\n\t\t\tps.setString(4, producto.getFechaCad());\r\n\t\t\tps.setString(5, producto.getProveedor());\r\n\t\t\tps.setString(7, producto.getComentario());\r\n\t\t\tps.setInt(8, producto.getId());\r\n\t\t\tps.execute();\r\n\t\t\tps.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"error sql guardar producto\");\r\n\t\t}\r\n\t\t\r\n\t\tdesconectar();\r\n\t}", "private void actualizarVentanaOperadores() throws SQLException {\n Sistema.getControladorVentanaOperadores().actualizarTablaOperadores(\"SELECT * FROM operador WHERE activo=TRUE ORDER BY id ASC;\");\n }", "public void agregar(Producto producto) throws BusinessErrorHelper;", "@Override\n public void actualizarPropiedad(Propiedad nuevaPropiedad) {\n int numFinca = nuevaPropiedad.getNumFinca();\n String modalidad = nuevaPropiedad.getModalidad();\n double area = nuevaPropiedad.getAreaTerreno();\n double metro = nuevaPropiedad.getValorMetroCuadrado();\n double fiscal = nuevaPropiedad.getValorFiscal();\n String provincia = nuevaPropiedad.getProvincia();\n String canton = nuevaPropiedad.getCanton();\n String distrito = nuevaPropiedad.getDistrito();\n String dirExacta = nuevaPropiedad.getDirExacta();\n String estado = nuevaPropiedad.getEstado();\n String tipo = nuevaPropiedad.getTipo();\n System.out.println(nuevaPropiedad.getFotografias().size());\n double precio = nuevaPropiedad.getPrecio();\n try {\n bdPropiedad.manipulationQuery(\"UPDATE PROPIEDAD SET MODALIDAD = '\" + modalidad + \"', AREA_TERRENO \"\n + \"= \" + area + \", VALOR_METRO = \" + metro + \", VALOR_FISCAL = \"+ fiscal + \", PROVINCIA = '\" \n + provincia + \"', CANTON = '\" + canton + \"' , DISTRITO = '\" + distrito + \"', DIREXACTA = '\" \n + dirExacta + \"', ESTADO = '\" + estado + \"', PRECIO = \" + precio + \" WHERE ID_PROPIEDAD = \" \n + numFinca);\n bdPropiedad.manipulationQuery(\"DELETE FROM FOTOGRAFIA_PROPIEDAD WHERE ID_PROPIEDAD = \" + numFinca);\n bdPropiedad.insertarFotografias(nuevaPropiedad);\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "@Scheduled(fixedDelay = 5000)\n @Transactional\n public void atribuirCartaoAPropostaElegivel(){\n List<Proposta> propostasElegiveis = propostaRepository.findByEstado(EstadoProposta.ELEGIVEL);\n\n for(Proposta proposta: propostasElegiveis){\n if(proposta.getCartao() == null){\n CartaoClientResponse response = cartoesClient.criaCartao(proposta.getId());\n Cartao novoCartaoProposta = response.toModel(proposta);\n\n proposta.setCartao(novoCartaoProposta);\n manager.merge(proposta);\n }\n }\n }", "public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }", "private void establecerTablaPlatillos() {\n Object[] columnas = {\"Platillo\", \"Cantidad\", \"Costo\"};\n Object[][] modelo = new Object[platillosAVender.size()][3];\n int x = 0;\n\n for (VentaPlatillo ventaPlatillo : platillosAVender) {\n\n modelo[x][0] = ventaPlatillo.getPlatillo().getNombre();\n modelo[x][1] = ventaPlatillo.getCantidad();\n modelo[x][2] = ventaPlatillo.getCosto();\n x++;\n }\n // Se establece el modelo en la tabla con los datos\n tablaPlatillosAVender.setDefaultEditor(Object.class, null);\n tablaPlatillosAVender.setModel(new DefaultTableModel(modelo, columnas));\n tablaPlatillosAVender.setCellSelectionEnabled(false);\n tablaPlatillosAVender.setRowSelectionAllowed(false);\n txtTotal.setText(total + \"\");\n }", "private void poTableEdited(javax.swing.event.TableModelEvent evt){\n \tString[] tmp0=new String[18];\n \tint r=evt.getFirstRow();\n \tint c=evt.getColumn();\n \tjavax.swing.table.TableModel m=(javax.swing.table.TableModel)evt.getSource();\n \tfor (int i = 0; i<18; i++){\n \t\ttmp0[i]=m.getValueAt(r, i).toString();\n \t}\n \t\n \tObject[] tmp1=new inventorycontroller.function.PurchaseOrderProcessor(dbInterface1)\n \t .calculateNetAmt(tmp0, c);\n \tfor (int i = 0; i<18; i++){\n \t\tm.setValueAt(tmp1[i], r, i);\n \t}\n \tupdatePoTotal();\n }", "public VentanaCrearProducto(ControladorProducto controladorProducto) {\n initComponents();\n this.controladorProducto=controladorProducto;\n txtCodigoCrearProducto.setText(String.valueOf(this.controladorProducto.getCodigo()));\n this.setSize(1000,600);\n }", "public void modificar() {\r\n\r\n ModificaProducto modprodu = new ModificaProducto(vista, true);//C.P.M instanciamos la forma de modificar producto en modo modal y le mandamos al vista \r\n int Opcion = vista.jTbuscar.getSelectedRow();//C.P.M obtenemos los datos de la fila la cual este seleccionada\r\n modprodu.id = vista.jTbuscar.getValueAt(Opcion, 0).toString();//C.P.M se los mandamos a la forma dentro de sus campos\r\n modprodu.jTbcodigobarras.setText(vista.jTbuscar.getValueAt(Opcion, 1).toString());\r\n modprodu.jTproducto.setText(vista.jTbuscar.getValueAt(Opcion, 2).toString());\r\n modprodu.jTbprecio.setText(vista.jTbuscar.getValueAt(Opcion, 3).toString());\r\n modprodu.jTbcaducidad.setText(vista.jTbuscar.getValueAt(Opcion, 4).toString());\r\n modprodu.jTbexistencia.setText(vista.jTbuscar.getValueAt(Opcion, 5).toString());\r\n modprodu.jTbdescripcion2.setText(vista.jTbuscar.getValueAt(Opcion, 6).toString());\r\n modprodu.jTbespecificaciones.setText(vista.jTbuscar.getValueAt(Opcion, 7).toString());\r\n modprodu.setLocationRelativeTo(vista);//C.P.M centramos la forma a la vista\r\n modprodu.setVisible(true);//C.P.M y la asemos visible\r\n }", "private void productosButtonActionPerformed(java.awt.event.ActionEvent evt) {\n actualizarProductos();\n }", "public void salvaProduto(Produto produto){\n conecta = new Conecta();\n conecta.iniciaConexao();\n\n String sql = \"INSERT INTO `JoalheriaJoia`.`Produto` (`codigo`, `nome`, `valorCusto`, `valorVenda`, `idTipoJoia` , `quantidadeEstoque`) VALUES (?, ?, ?, ?, ?, ?);\";\n\n try {\n PreparedStatement pstm;\n pstm = conecta.getConexao().prepareStatement(sql); \n \n pstm.setString(1, produto.getCodigo());\n pstm.setString(2, produto.getNome());\n pstm.setFloat(3, produto.getValorCusto());\n pstm.setFloat(4, produto.getValorVenda());\n pstm.setInt(5, produto.getTipoJoia().getIdTipoJoia());\n pstm.setInt(6, produto.getQuantidadeEstoque());\n pstm.execute();\n } catch (SQLException ex) {\n Logger.getLogger(ProdutoDao.class.getName()).log(Level.SEVERE, null, ex);\n }\n conecta.fechaConexao(); \n \n }", "public void SalvarNovaPessoa(){\r\n \r\n\t\tpessoaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\r\n \r\n\t\t//INFORMANDO QUE O CADASTRO FOI VIA INPUT\r\n\t\tpessoaModel.setOrigemCadastro(\"I\");\r\n \r\n\t\tpessoaRepository.SalvarNovoRegistro(this.pessoaModel);\r\n \r\n\t\tthis.pessoaModel = null;\r\n \r\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\r\n \r\n\t}", "@Override\r\n\tprotected void editarObjeto() throws ClassNotFoundException {\n\t\tif (tbJustificaciones.getSelectedRow() != -1\r\n\t\t\t\t&& tbJustificaciones.getValueAt(tbJustificaciones.getSelectedRow(), 0) != null) {\r\n\t\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (MODIFICANDO)\");\r\n\t\t\tthis.opcion = 2;\r\n\t\t\tactivarFormulario();\r\n\t\t\tcargarDatosModificar();\r\n\t\t\ttxtCedula.setEnabled(false);\r\n\t\t\tlimpiarTabla();\r\n\t\t\tthis.panelBotones.habilitar();\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, GlobalUtil.MSG_ITEM_NO_SELECCIONADO, \"ATENCION\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t}", "public void insertNewProduto(ProdutoTO produto){\n\t\ttry {\n\t\t\tmodelProduto.insertNewProduto(produto);\n\t\t\tsuper.updateViewPrincipal(viewPrincipal);\n\t\t} catch (ProdutoException e) {\n\t\t\te.printStackTrace();\n\t\t\tgetControllerError().initialize(e);\n\t\t}\n\t}", "@Override\n\tpublic void editar(ProdutoPedido produtoPedido) {\n\t\tdao.update(produtoPedido);\n\t}", "public void guardarCambiosProducto(BProducto producto, BUsuario usuario, Connection conn)throws SQLException {\n\t\tPreparedStatement pstm;\r\n\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"UPDATE producto \\n\");\r\n\t\tsql.append(\"SET tipo_producto_id = ? , \\n\");\r\n\t\tsql.append(\" descripcion = ? , \\n\");\r\n\t\tsql.append(\" usuario_modificacion = ? , \\n\");\r\n\t\tsql.append(\" fecha_modificacion = SYSDATE, \\n\");\r\n\t\tsql.append(\" nombre = ?, \\n\");\r\n\t\tsql.append(\" codigo_imagen = ? \\n\");\r\n\t\tsql.append(\"WHERE producto_id = ?\");\r\n\t\t\r\n\t\tpstm = conn.prepareStatement(sql.toString());\r\n\t\t\r\n\t\tpstm.setInt(1,producto.getTipo().getCodigo());\r\n\t\tpstm.setString(2,producto.getDescripcion());\r\n\t\tpstm.setString(3,usuario.getLogin());\r\n\t\tpstm.setString(4,producto.getNombre());\r\n\t\tpstm.setInt(5,producto.getImagen().getCodigo());\r\n\t\tpstm.setInt(6,producto.getCodigo());\r\n\t\tpstm.executeUpdate();\r\n\t\t\r\n\t\tpstm.close();\r\n\t}", "public void setProducto(Long producto) {\n this.producto.set(producto);\n }", "public void controladorVistoNotif(Controlador controlador){\n this.contVistoNotif = controlador.getVistoNotif();\n notif.setControlVisto(contVistoNotif);\n }", "public int actualizar(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"UPDATE conftbc_producto SET nombre_producto=?, imagen=?, idcategoria=?, idmarca=?, idmodelo=? WHERE idmodelo = ?\";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tps.setString(1,producto.getNombre());\n\t\t\tps.setString(2,producto.getImagen());\n\t\t\tps.setInt(3,producto.getCategoria().getIdcategoria());\n\t\t\tps.setInt(4, producto.getMarca().getIdmarca());\n\t\t\tps.setInt(5, producto.getModelo().getIdmodelo());\n\t\t\tps.setInt(6, producto.getModelo().getIdmodelo());// como el producto se originacuando se crea el modelo lo actualizamos por el modelo\n\t\t\tint rpta = ps.executeUpdate();\t\t\n\t\t\tthis.objCnx.confirmarDB();\n\t\t\treturn rpta;\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally {\t\t\t\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public BuscarProducto(AgregandoProductos ventanaPadre) {\n this.daoProductos = new ProductoJpaController();\n this.ventanaPadre = ventanaPadre;\n initComponents();\n this.setupComponents();\n }", "private void Actualizar_Tabla() {\n String[] columNames = {\"iditem\", \"codigo\", \"descripcion\", \"p_vent\", \"p_comp\", \"cant\", \"fecha\"};\n dtPersona = db.Select_Item();\n // se colocan los datos en la tabla\n DefaultTableModel datos = new DefaultTableModel(dtPersona, columNames);\n jTable1.setModel(datos);\n }", "public Producto() {\r\n\t\tsuper();\r\n\t\tID = getIDnuevoProducto();\r\n\t\tnombre = \"\";\r\n\t\tvendedor = \"\";\r\n\t\tprecio = 0;\r\n\t\tcantidad = 0;\r\n\t\tenVenta = false;\r\n\t\tdescripcion = \"\";\r\n\t\tcategorias = new Categoria();\r\n\t\tcaracteristicas = null;//TODO CORREGIR\r\n\t}", "private void insertData() \n {\n for (int i = 0; i < 3; i++) {\n TarjetaPrepagoEntity entity = factory.manufacturePojo(TarjetaPrepagoEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n for(int i = 0; i < 3; i++)\n {\n PagoEntity pagos = factory.manufacturePojo(PagoEntity.class);\n em.persist(pagos);\n pagosData.add(pagos);\n\n }\n \n data.get(2).setSaldo(0.0);\n data.get(2).setPuntos(0.0);\n \n double valor = (Math.random()+1) *100;\n data.get(0).setSaldo(valor);\n data.get(0).setPuntos(valor); \n data.get(1).setSaldo(valor);\n data.get(1).setPuntos(valor);\n \n }", "public ActualizarProducto() {\n initComponents();\n }", "public void salvarProdutos(Produto produto){\n }", "public void mudaQuantidadeAprovada(PedidoProduto pedidoProduto) {\n String sql = \"UPDATE pedidosprodutos SET QuantidadeAprovada=? WHERE Id=?\";\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, pedidoProduto.getQuantidadeAprovada());\n stmt.setInt(2, pedidoProduto.getId());\n stmt.execute();\n connFac.closeAll(rs, stmt, st, conn);\n } catch(SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.mudaQuantidadeAprovada: \" + error);\n throw new RuntimeException(\"PedidoDAO.mudaQuantidadeAprovada: \" + error);\n }\n }", "private void aumentarPuntos() {\r\n this.puntos++;\r\n this.form.AumentarPuntos(this.puntos);\r\n }", "public void setProducto(com.monitor.webService.VoProducto producto) {\r\n this.producto = producto;\r\n }", "@Override\n\tpublic void ativar(EntidadeDominio entidade) throws SQLException {\n\t\t\t\tPreparedStatement pst=null;\n\t\t\t\tLivro livro = (Livro)entidade;\t\t\n\t\t\t\ttry {\n\t\t\t\t\topenConnection();\n\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\tStringBuilder sql = new StringBuilder();\t\t\t\n\t\t\t\t\tsql.append(\"UPDATE livro SET livStatus=?\");\n\t\t\t\t\tsql.append(\"WHERE idlivro=?\");\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\tpst.setString(1, \"ATIVADO\");\n\t\t\t\t\tpst.setInt(2, livro.getId());\n\t\t\t\t\tpst.executeUpdate();\t\t\t\n\t\t\t\t\tconnection.commit();\t\n\t\t\t\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t} catch (SQLException e) {\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\t//SEGUNDA PARTE\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\topenConnection();\n\t\t\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\t\t//FALTA COLOCAR EDITORA\t\t\n\t\t\t\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\t\t\t\tSystem.out.println(livro.getId());\n\t\t\t\t\t\t\tSystem.out.println(livro.getJustificativa());\n\t\t\t\t\t\t\tSystem.out.println(livro.getIdCatJustificativa());\n\t\t\t\t\t\t\tsql.append(\"INSERT INTO justificativaativar (id_livro , justificativa, id_Ativar) VALUES (?,?,?)\");\t\t\n\t\t\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\t\t\tpst.setInt(1, livro.getId());\n\t\t\t\t\t\t\tpst.setString(2,livro.getJustificativa());\n\t\t\t\t\t\t\tpst.setInt(3,livro.getIdCatJustificativa());\n\t\t\t\t\t\t\tpst.executeUpdate();\n\t\t\t\t\t\t\tconnection.commit();\t\t\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t\t\t}finally{\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t}", "public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}", "@Override\r\n\tpublic void actualizar(int id_evento_vista, Object datos) {\r\n\t\t//Borra lo anterior\r\n \t\r\n \t jFormattedTextFieldPiso.setText(\"\");\r\n jFormattedTextFieldNumero.setText(\"\");\r\n jFormattedTextFieldTipo.setText(\"\");\r\n \r\n\t\t\r\n\t\tif(id_evento_vista == EventoVista.ALTA_HABITACION_EXITO){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Se ha creado la Habitacion con exito\", \"Nuevo Habitacion\", JOptionPane.INFORMATION_MESSAGE);\t\t\r\n\t\t}\t\r\n\t\r\n\t\telse if (id_evento_vista == EventoVista.ALTA_HABITACION_FALLO){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"ERROR!! Ha ocurrido un error con la BD\", \"Nuevo Habitacion\", JOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void atualizar(Tipo tipo) {\n String sql = \"update tipos_servicos set nome = ? \"\r\n + \"where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n \r\n stmt.setString(1, tipo.getNome());\r\n \r\n \r\n stmt.setInt(3, tipo.getId());\r\n \r\n stmt.executeUpdate();\r\n \r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}", "public boolean modificar(DueñoMascota pro) {\n PreparedStatement ps = null;\n Connection con = getConexion();\n\n \n String sql = \"UPDATE datos SET nom_dueño=?, ap_dueño=?, tel=?,nom_mascota=?,observaciones=? WHERE id_datos=? \";\n\n try {\n ps = con.prepareStatement(sql);\n // ps.setInt(1, pro.getId()); //NÚMERe almacena\n ps.setString(1, pro.getNomDueño());\n ps.setString(2, pro.getApDueño());\n ps.setInt(3, pro.getTel());\n ps.setString(4, pro.getNomMascota());\n ps.setString(5, pro.getObservaciones());\n ps.setInt(6, pro.getId());\n ps.execute();\n ps.close();\n return true;\n } catch (SQLException e) {\n System.err.println(e);\n return false;\n } finally {\n try {\n con.close();\n } catch (SQLException e) {\n System.err.println(e);\n }\n }\n }", "@Override\r\n\tpublic void inserir(Evento evento) {\n\t\trepository.save(evento);\r\n\t}", "@Test\n public void updateTarjetaPrepagoTest() throws BusinessLogicException \n {\n TarjetaPrepagoEntity entity = data.get(0);\n TarjetaPrepagoEntity pojoEntity = factory.manufacturePojo(TarjetaPrepagoEntity.class);\n pojoEntity.setId(entity.getId());\n tarjetaPrepagoLogic.updateTarjetaPrepago(pojoEntity.getId(), pojoEntity);\n TarjetaPrepagoEntity resp = em.find(TarjetaPrepagoEntity.class, entity.getId());\n Assert.assertEquals(pojoEntity.getId(), resp.getId());\n Assert.assertEquals(pojoEntity.getSaldo(), resp.getSaldo(),0.001);\n Assert.assertEquals(pojoEntity.getPuntos(), resp.getPuntos(), 0.001);\n Assert.assertEquals(pojoEntity.getNumTarjetaPrepago(), resp.getNumTarjetaPrepago());\n }", "@Override\r\n\tpublic void actualizarStockProductoSucursal(BProducto bProducto,\r\n\t\t\tBSucursal bSucursal, int cantidad,Connection conn, BUsuario usuario) throws SQLException {\n\t\tPreparedStatement pstm;\r\n\t\t\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"UPDATE fidelizacion.producto_sucursal ps \\n\");\r\n\t\tsql.append(\"SET ps.stock = (nvl(ps.stock,0) - ?), \\n\");\r\n\t\tsql.append(\" ps.usuario_modificacion = ? , \\n\");\r\n\t\tsql.append(\" ps.fecha_modificacion = SYSDATE \\n\");\r\n\t\tsql.append(\"WHERE ps.sucursal_id = ? \\n\");\r\n\t\tsql.append(\"AND ps.producto_id = ?\");\r\n\t\t\r\n\t\tpstm = conn.prepareStatement(sql.toString());\r\n\t\tpstm.setInt(1,cantidad);\r\n\t\tpstm.setString(2,usuario.getLogin());\r\n\t\tpstm.setInt(3,bSucursal.getCodigo());\r\n\t\tpstm.setInt(4,bProducto.getCodigo());\r\n\t\t\r\n\t\tpstm.executeUpdate();\r\n\t\r\n\t\tpstm.close();\r\n\t}", "public void rowEdit(RowEditEvent event){\n //obtenemos la instancia de la Fila modificada \n Detallefactura detalle = (Detallefactura)event.getObject();\n \n //obtenemos el indice de la fila modificada\n DataTable table = (DataTable) event.getSource();\n Integer indice = table.getRowIndex();\n \n //Calculamos el nuevo total del producto\n BigDecimal nuevoTotal = detalle.getPrecioVenta().multiply(new BigDecimal(detalle.getCantidad()));\n //seteamos al detalle el nuevo total\n //detalle.setTotal(nuevoTotal);\n \n //Recorremos la lista de Detalle y actualizamos el item correspondiente\n int i =0;\n for(Detallefactura det : listDetalle){\n if(det.getCodBarra().equals(detalle.getCodBarra()) && indice.equals(i)){\n //listDetalle.set(i, detalle);\n listDetalle.get(i).setTotal(nuevoTotal);\n break; //para que se salfa del for de manera inmediata\n }\n i++;\n }\n \n totalFacturaVenta();\n System.out.println(\"TOTAL: \"+ factura.getTotalVenta());\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Correcto\"\n , \"Producto: Cantidad de producto Modificado\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }", "public Registrar_Producto() {\n this.setContentPane(fondo);\n initComponents();\n llenaArr();\n llenaCB();\n soloLetras(rp_tx_nombre);\n soloNumeros(rp_tx_cantidad);\n soloNumeros(rp_tx_precio);\n soloLetras(rp_tx_descripcion);\n }", "public ControladorVentanaDatosOperador(Modelo modelo) throws SQLException {\n this.modelo = modelo;\n ventanaAgregarOperador = new VentanaDatosOperador();\n ventanaEditarOperador = new VentanaDatosOperador();\n registrarListeners();\n }", "@Override\n\tpublic void atualizar() {\n\t\t\n\t\t \n\t\t String idstring = id.getText();\n\t\t UUID idlong = UUID.fromString(idstring);\n\t\t \n\t\t PedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\tPedidoCompra.setId(idlong);\n\t\t\tPedidoCompra.setAtivo(true);\n//\t\t\tPedidoCompra.setNome(nome.getText());\n\t\t\tPedidoCompra.setStatus(StatusPedido.valueOf(status.getSelectionModel().getSelectedItem().name()));\n//\t\t\tPedidoCompra.setSaldoinicial(saldoinicial.getText());\n\t\t\tPedidoCompra.setData(new Date());\n\t\t\tPedidoCompra.setIspago(false);\n\t\t\tPedidoCompra.setData_criacao(new Date());\n//\t\t\tPedidoCompra.setFornecedor(fornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setFornecedor(cbfornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setTotal(PedidoCompra.CalcularTotal(PedidoCompra.getItems()));\n\t\t\tPedidoCompra.setTotalpago(PedidoCompra.CalculaTotalPago(PedidoCompra.getFormas()));\n\t\t\t\n\t\t\t\n\t\t\tgetservice().edit(PedidoCompra);\n\t\t\tupdateAlert(PedidoCompra);\n\t\t\tclearFields();\n\t\t\tdesligarLuz();\n\t\t\tloadEntityDetails();\n\t\t\tatualizar.setDisable(true);\n\t\t\tsalvar.setDisable(false);\n\t\t\t\n\t\t \n\t\t \n\t\tsuper.atualizar();\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPInventario = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTbInventario = new javax.swing.JTable();\n jPProducto = new javax.swing.JPanel();\n jLbID = new javax.swing.JLabel();\n jTFID = new javax.swing.JTextField();\n jLbNombre = new javax.swing.JLabel();\n jTFNombre = new javax.swing.JTextField();\n jTFTipo = new javax.swing.JTextField();\n jLbTipo = new javax.swing.JLabel();\n jLbCantidad = new javax.swing.JLabel();\n jTFCantidad = new javax.swing.JTextField();\n jTFColor = new javax.swing.JTextField();\n jLbColor = new javax.swing.JLabel();\n jTFTalla = new javax.swing.JTextField();\n jLbTalla = new javax.swing.JLabel();\n jTFPrecio = new javax.swing.JTextField();\n jLbPrecio = new javax.swing.JLabel();\n jBEditar = new javax.swing.JButton();\n jBEliminar = new javax.swing.JButton();\n jBtnActualizar = new javax.swing.JButton();\n jLbAgregarInventario = new javax.swing.JLabel();\n jBAgregar = new javax.swing.JButton();\n\n jPInventario.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Inventario\"));\n\n jTbInventario.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"Nombre\", \"Tipo\", \"Cantidad\", \"Color\", \"Talla\", \"Precio\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n });\n jScrollPane1.setViewportView(jTbInventario);\n\n javax.swing.GroupLayout jPInventarioLayout = new javax.swing.GroupLayout(jPInventario);\n jPInventario.setLayout(jPInventarioLayout);\n jPInventarioLayout.setHorizontalGroup(\n jPInventarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1)\n );\n jPInventarioLayout.setVerticalGroup(\n jPInventarioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPInventarioLayout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n jPProducto.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Producto\"));\n\n jLbID.setText(\"ID\");\n\n jLbNombre.setText(\"Nombre\");\n\n jLbTipo.setText(\"Tipo\");\n\n jLbCantidad.setText(\"Cantidad\");\n\n jLbColor.setText(\"Color\");\n\n jLbTalla.setText(\"Talla\");\n\n jLbPrecio.setText(\"Precio\");\n\n javax.swing.GroupLayout jPProductoLayout = new javax.swing.GroupLayout(jPProducto);\n jPProducto.setLayout(jPProductoLayout);\n jPProductoLayout.setHorizontalGroup(\n jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addGap(20, 20, 20)\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTFID, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(jLbID)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTFNombre, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPProductoLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLbNombre)\n .addGap(27, 27, 27)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTFTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addComponent(jLbTipo)))\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTFCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addGap(21, 21, 21)\n .addComponent(jLbCantidad)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTFColor, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLbColor)))\n .addGap(16, 16, 16)\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(jLbTalla))\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTFTalla, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(26, 26, 26)\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTFPrecio, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jLbPrecio)))\n .addContainerGap(79, Short.MAX_VALUE))\n );\n jPProductoLayout.setVerticalGroup(\n jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jTFPrecio, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPProductoLayout.createSequentialGroup()\n .addComponent(jLbPrecio)\n .addGap(36, 36, 36)))\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jTFCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPProductoLayout.createSequentialGroup()\n .addComponent(jLbColor)\n .addGap(36, 36, 36))\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addComponent(jLbTalla)\n .addGap(12, 12, 12)\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jTFTalla, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTFColor, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jTFTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPProductoLayout.createSequentialGroup()\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLbID)\n .addComponent(jLbNombre)\n .addComponent(jLbTipo)\n .addComponent(jLbCantidad))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jTFID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jTFNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))))\n .addContainerGap(42, Short.MAX_VALUE))\n );\n\n jBEditar.setText(\"Editar\");\n jBEditar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBEditarActionPerformed(evt);\n }\n });\n\n jBEliminar.setText(\"Eliminar\");\n jBEliminar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBEliminarActionPerformed(evt);\n }\n });\n\n jBtnActualizar.setText(\"♻\");\n jBtnActualizar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBtnActualizarActionPerformed(evt);\n }\n });\n\n jLbAgregarInventario.setText(\"Agregar un nuevo producto a Inventario\");\n\n jBAgregar.setText(\"Agregar\");\n jBAgregar.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jBAgregarActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jPInventario, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jPProducto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(219, 219, 219)\n .addComponent(jBEditar)\n .addGap(52, 52, 52)\n .addComponent(jBEliminar)\n .addGap(108, 108, 108)\n .addComponent(jBtnActualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(195, 195, 195)\n .addComponent(jLbAgregarInventario)\n .addGap(152, 152, 152)\n .addComponent(jBAgregar)))\n .addContainerGap(10, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPInventario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPProducto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jBEditar)\n .addComponent(jBEliminar)\n .addComponent(jBtnActualizar))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLbAgregarInventario)\n .addComponent(jBAgregar))\n .addGap(28, 28, 28))\n );\n\n pack();\n }", "public Venta(Producto producto,Cliente comprador,Cliente vendedor){\n this.fechaCompra=fechaCompra.now();\n this.comprador=comprador;\n this.vendedor=vendedor;\n this.producto=producto;\n \n }", "public void modificarEstadoCuota2(CuotaObject cuota) throws SQLException, ParseException \r\n {\r\n PreparedStatement prepStmt = null;\r\n\r\n String insertStatement = \"UPDATE FINANCIADO_PAGOS SET ESTADO=?,FECHA=? where IDRUBRO=?\";\r\n \r\n prepStmt = con.prepareStatement(insertStatement);\r\n \r\n prepStmt.setString(1, cuota.getEstado());\r\n \r\n \r\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n Date date1 = formatter.parse(cuota.getFecha());\r\n java.sql.Date datetmp = new java.sql.Date(date1.getTime());\r\n \r\n prepStmt.setDate(2, datetmp);\r\n \r\n \r\n prepStmt.setString(3, cuota.getIdrubro());\r\n \r\n prepStmt.executeUpdate();\r\n if (prepStmt != null) {\r\n prepStmt.close();\r\n }\r\n }", "public void actualizarStock(Long idProducto, Long cantidad) {\n\t\t\n\t}", "public void AgregarVenta() {\r\n if (vista.jTcodigodebarras.equals(\"\")) {//C.P.M si el componete esta vacio es que no a insertado algun codigo a buscar\r\n JOptionPane.showMessageDialog(null, \"No has ingresado un codigo de barras\");//C.P.M se lo notificamos a el usuario\r\n } else {//C.P.M de lo contrario es que inserto algo y ay que buscarlo\r\n try {\r\n modelo.setCodigobarras(vista.jTcodigodebarras.getText());//C.P.M le mandamos el codigo a buscar a el modelo\r\n rs = modelo.Buscarcodigobarras();//C.P.M cachamos el resultado de la consulta\r\n if (rs.next() == true) {//C.P.M preguntamos si trai datos si es asi \r\n String nombre = rs.getString(\"nombre_producto\");//C.P.M obtenemos el nombre de el resultado\r\n float precio = Float.parseFloat(rs.getString(\"precio\"));//C.P.M obtenemos el precio\r\n String precioformato = format.format(precio);//C.P.M le damos el formato adecuado esta variable la utilizamos para enviarla a la vista\r\n float totalPro = Float.parseFloat(precioformato);//C.P.M cambiamos a flotante ya el precio con el formato adecuado\r\n String cant = JOptionPane.showInputDialog(null, \"Cantidad: \");//C.P.M preguntamos la cantidad del prducto\r\n float cantidad = Float.parseFloat(cant);//C.P.M convertimos a flotante la cantidad\r\n totalPro = totalPro * cantidad;//C.P.M obtenemos el total de ese producto multiplicando al cantidad por el precio\r\n total = Float.parseFloat(vista.jTtotal.getText());//C.P.M obtenemos el total de la venta \r\n total = totalPro + total;//C.P.M le sumamos el total del producto ingresado al total ya de la venta\r\n String totalaenviar = format.format(total);//C.P.M le damos el formato adecuado para enviar el nuevo total\r\n vista.jTtotal.setText(totalaenviar);//C.P.M le enviamos el nuevo total a la vista\r\n DefaultTableModel temp = (DefaultTableModel) vista.Tlista.getModel();//C.P.M obtenemos el modelo de la tabla\r\n Object[] fila = new Object[3];//C.P.M creamos un areglo con el tamano de la nota\r\n fila[0] = cant;//C.P.M le agregamos la cantidad \r\n fila[1] = nombre;//C.P.M le agregamos el nombre\r\n fila[2] = precioformato;//C.P.M y el precio con el formato\r\n temp.addRow(fila);//C.P.M lo agregamos a la tabla como una nueva fila\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"No existe un artículo con dicho código\");\r\n }\r\n vista.jTcodigodebarras.setText(\"\");//C.P.M limpiamos el codigo de barras y le colocamos el foco\r\n vista.jTcodigodebarras.requestFocus();//C.P.M le colocamos el foco\r\n } catch (SQLException ex) {//C.P.M si ocurre un error le notificamos a el usuario\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al consultar el codigo de barras\");\r\n }\r\n }\r\n }", "public void actionPerformed(ActionEvent e) {\n Profesor p = new Profesor();\n p.setNombre(textNombre.getText().toUpperCase());\n p.setDni(textDni.getText().toUpperCase());\n p.setEdad(Integer.parseInt(textEdad.getText()));\n p.setCurso(Integer.parseInt(textCurso.getText()));\n p.setSueldo(Integer.parseInt(textSueldo.getText()));\n try {\n Ficheros.guardar(p, Ficheros.D_PROFESORES);\n } catch (IOException e2) {\n System.out.println(\"Fichero no encontrado - guardarAlumno()\");\n }\n }", "public void setProducto(Producto producto) {\n\t\tthis.producto = producto;\n\t}", "public void actualizarPodio() {\r\n\t\tordenarXPuntaje();\r\n\t\tint tam = datos.size();\r\n\t\traizPodio = datos.get(tam-1);\r\n\t\traizPodio.setIzq(datos.get(tam-2));\r\n\t\traizPodio.setDer(datos.get(tam-3));\r\n\t}", "@Override\n\tpublic boolean update(Produto t) {\n\t\treturn true;\n\t}", "@Override\n\tpublic void salvar(ProdutoPedido produtoPedido) {\n\t\tdao.save(produtoPedido);\n\t}", "private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_cliente(vista.txtCorreo.getText());\n cvo.setClave_cliente(vista.txtClave.getText());\n cdao.actualizar(cvo);\n vista.txtNombre.setText(\"\");\n vista.txtApellido.setText(\"\");\n vista.txtDireccion.setText(\"\");\n vista.txtCorreo.setText(\"\");\n vista.txtClave.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Registro Modificado\");\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Debe ingresar Datos para Modificar registro!\");\n }\n }", "private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n em.persist(entity);\r\n dataUsuario.add(entity);\r\n }\r\n for (int i = 0; i < 3; i++) {\r\n CarritoDeComprasEntity entity = factory.manufacturePojo(CarritoDeComprasEntity.class);\r\n if (i == 0 ){\r\n entity.setUsuario(dataUsuario.get(0));\r\n }\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\n\n try {\n\n Object o[] = null;\n List<Producto> listP = CProducto.findProductoEntities();\n boolean resp = false; //ESTO ES LA BANDERA PARA SABER SI EL PRODUCTO EXISTE\n int num = 0;\n String nombreP = txtproducto.getText();\n for (int i = 0; i < listP.size(); i++) {\n\n if (listP.get(i).getNombreProducto().equals(txtproducto.getText())) {\n resp = true;\n num = i;\n }\n }\n if (resp != true) { //VA A VENDER UN PRODUCTO QUE NO EXISTE:\n JOptionPane.showMessageDialog(null, \"Estás intentando vender un articulo que no existe!\\nRevisa tu inventario.\", \"ERROR\", JOptionPane.WARNING_MESSAGE);\n\n } else {\n //Obtenemos el valor total y la cantidad que tenemos hasta ahora en inventarios.\n int cantidadTotal = listP.get(num).getCantidadAlmacenada();\n\n //Obtenemos el valor total de la compra que acabamos de realizar\n int cantidadCompra = Integer.parseInt(txtcantidad.getText());\n\n int resultado = cantidadTotal - cantidadCompra;\n if (resultado < 0) {\n JOptionPane.showMessageDialog(null, \"Lo sentimos, no tenemos esa cantidad.\\nActualmente solo le podemos vender \" + cantidadTotal + \" unidades de ese articulo.\", \"Total excedido\", JOptionPane.INFORMATION_MESSAGE);\n\n int respuesta = JOptionPane.showConfirmDialog(null, \"¿Desea realizar una compra por esta cantidad?\", \"Alerta!\", JOptionPane.YES_NO_OPTION);\n\n if (respuesta == 0) {\n int id = traerNombre(nombreP);\n Transaccion t = new Transaccion();\n\n //REALIZAMOS EL REGISTRO DE LOS DATOS EN LA TABLA TRANSACCION\n t.setNombreProducto(txtproducto.getText());\n t.setCantidad(Integer.parseInt(txtcantidad.getText()));\n t.setPrecio(Float.parseFloat(txtvalorU.getText()));\n\n //Extraemos la fecha del txtdate\n t.setFechaT(txtdate.getDate());\n t.setTipo(\"salida\");\n\n CTransaccion.create(t);\n\n CProducto.destroy(id);\n JOptionPane.showMessageDialog(null, \"Transacción Exitosa.\");\n JOptionPane.showMessageDialog(null, \"El producto ahora se encentra agotado!\");\n this.setVisible(false);\n } else {\n this.setVisible(false);\n }\n } else if (resultado == 0) {\n int id = traerNombre(nombreP);\n Transaccion t = new Transaccion();\n\n //REALIZAMOS EL REGISTRO DE LOS DATOS EN LA TABLA TRANSACCION\n t.setNombreProducto(txtproducto.getText());\n t.setCantidad(Integer.parseInt(txtcantidad.getText()));\n t.setPrecio(Float.parseFloat(txtvalorU.getText()));\n\n //Extraemos la fecha del txtdate\n t.setFechaT(txtdate.getDate());\n t.setTipo(\"salida\");\n\n CTransaccion.create(t);\n\n CProducto.destroy(id);\n JOptionPane.showMessageDialog(null, \"Transacción Exitosa.\");\n JOptionPane.showMessageDialog(null, \"El producto ahora se encentra agotado!\");\n this.setVisible(false);\n } else {\n\n int id = traerNombre(nombreP);\n Transaccion t = new Transaccion();\n\n //REALIZAMOS EL REGISTRO DE LOS DATOS EN LA TABLA TRANSACCION\n t.setNombreProducto(txtproducto.getText());\n t.setCantidad(Integer.parseInt(txtcantidad.getText()));\n t.setPrecio(Float.parseFloat(txtvalorU.getText()));\n\n //Extraemos la fecha del txtdate\n t.setFechaT(txtdate.getDate());\n t.setTipo(\"salida\");\n\n CTransaccion.create(t);\n\n float valorTotal = listP.get(num).getValorUnitario() * cantidadTotal;\n\n float valorTotalC = Float.parseFloat(txtvalorU.getText()) * cantidadCompra;\n\n //Actualizamos el valor total y la cntidad de inventario (Producto)\n valorTotal = valorTotal - valorTotalC;\n float valorUnitario = valorTotal / resultado; //Este es el costo unitario\n Producto pEdit = CProducto.findProducto(id);\n pEdit.setCantidadAlmacenada(resultado);\n pEdit.setValorUnitario(valorUnitario);\n\n CProducto.edit(pEdit);\n JOptionPane.showMessageDialog(null, \"Transacción Exitosa.\");\n this.setVisible(false);\n }\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage() + e.getCause());\n }\n }", "public void guardarProductosVendidos() {\n try {\n //Si hay datos los guardamos...\n if (!productosVendidos.isEmpty()) {\n /****** Serialización de los objetos ******/\n //Serialización de los productosVendidos\n FileOutputStream archivo = new FileOutputStream(\"productosVendidos\"+this.getCorreo()+\".dat\");\n ObjectOutputStream guardar= new ObjectOutputStream(archivo);\n //guardamos el array de personas\n guardar.writeObject(productosVendidos);\n archivo.close();\n } else {\n System.out.println(\"Error: No hay datos...\");\n }\n\n } catch (IOException ioe) {\n System.out.println(\"ERROR: \" + ioe.getMessage());\n } catch (Exception e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n }", "public TelaProduto() {\n initComponents();\n \n carregaProdutos();\n }", "public ProductosInventario(String codigoDeBarras, String nombre, Empresa empresa, int presentacion, int iva, int costo, int cantidad, String tipo, int precio) {\n\t\tthis.producto = new Producto(codigoDeBarras, nombre, empresa, presentacion, iva, costo,precio);\n\t\tthis.cantidad = 0;\n\t\tsetCantidad(cantidad);\n\t\tthis.tipo = tipo;\n\t}", "@Override\n protected void onConvertTransfer(Persona_tiene_Existencia values, DataSetEvent e) throws SQLException, UnsupportedOperationException\n {\n if (e.getDML() == insertProcedure)\n {\n e.setInt(1, values.getIdPersona());//\"vid_persona\"\n e.setInt(2, values.getEntrada());//\"ventrada\"\n e.setInt(3, values.getIdUbicacion());//\"vid_ubicacion\"\n e.setFloat(4, values.getExistencia());//\"vexistencia\"\n }\n\n else if (e.getDML() == updateProcedure)\n {\n e.setInt(1, values.getLinea_Viejo());//\"vlinea_old\"\n e.setInt(2, values.getIdPersona_Viejo());//\"vid_persona_old\"\n e.setInt(3, values.getIdPersona());//\"vid_persona_new\"\n e.setInt(4, values.getEntrada());//\"ventrada\"\n e.setInt(5, values.getIdUbicacion());//\"vid_ubicacion\"\n e.setFloat(6, values.getExistencia());//\"vexistencia\"\n }\n }", "private void actualizaProducto(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString codArticulo = request.getParameter(\"cArt\");\n\t\tString seccion = request.getParameter(\"seccion\");\n\t\tString nombreArticulo = request.getParameter(\"NArt\");\n\t\tSimpleDateFormat formatoFecha = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate fecha = null;\n\t\ttry {\n\t\t\tfecha = formatoFecha.parse(request.getParameter(\"fecha\"));\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdouble precio = Double.parseDouble(request.getParameter(\"precio\"));\n\t\tString importado = request.getParameter(\"importado\");\n\t\tString paisOrigen = request.getParameter(\"POrig\");\n\n\t\t// Crear un objeto producto con la info del formulario\n\n\t\tProducto producto = new Producto(codArticulo, seccion, nombreArticulo, precio, fecha, importado, paisOrigen);\n\t\tSystem.out.println(\"el codArticulo es: \" + codArticulo + \" y los datos del producto\" + producto);\n\t\t// Actualizar la BBDD\n\t\tmodeloProductos.actualizarProducto(producto);\n\n\t\t// Volver al listado con la info actualizada\n\t\tobtenerProductos(request, response);\n\n\t}", "private void tiendasButtonActionPerformed(java.awt.event.ActionEvent evt) {\n actualizarTiendas();\n }", "public Producto guardar(Producto producto) throws IWDaoException;", "public void setPuntoDeVenta(PuntoDeVenta puntoDeVenta)\r\n/* 145: */ {\r\n/* 146:166 */ this.puntoDeVenta = puntoDeVenta;\r\n/* 147: */ }", "public void buscarproducto() {\r\n try {\r\n modelo.setNombre(vista.jTbnombre2.getText());//C.P.M le mandamos al modelo el nombre del producto\r\n rs = modelo.Buscar();//C.P.M obtenemos el resultado del modelos\r\n if (rs.equals(\"\")) {//C.P.M en caso de que el resultado venga vacio notificamos a el usuario que no encontro el producto\r\n JOptionPane.showMessageDialog(null, \"No se encontro: \" + vista.jTbnombre2.getText() + \" en la base de datos.\");\r\n }\r\n //C.P.M Para establecer el modelo al JTable\r\n DefaultTableModel buscar = new DefaultTableModel() {\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M Aqui le decimos que no seran editables los campos de la tabla\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M Auui 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 el resultado \r\n Object[] fila = new Object[cantidadColumnas];//C.P.M Creamos un objeto con el numero de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recoremos ese vector\r\n fila[i] = rs.getObject(i + 1);//C.P.M Aqui vamos insertando la informacion obtenida de la base de datos\r\n }\r\n buscar.addRow(fila);//C.P.M y agregamos el arreglo como una nueva fila a la tabla\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurio un error al buscar el producto\");\r\n }\r\n\r\n }", "private void setUpFrom(){\n\t\tEPVentanaTemporal ven = new EPVentanaTemporal();\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\t//setemamos la ventana.\n\t\tven.setNombre(\"time_batch\");\n\t\tven.setValor(\"10\");\n\t\tven.setUnidadTemporal(\"seconds\");\n\t\tven.setPseudonombre(\"a1\");\n\t\tpro.setNombre(\"p4\");\n\t\tpro.setPseudonombre(\"\");\n\t\tpro.setVentana(ven);\n\t\texpresionesFrom.add(pro);\n\t}", "public void guardarProductosEnVenta() {\n try {\n //Si hay datos los guardamos...\n \n /****** Serialización de los objetos ******/\n //Serialización de las productosEnVenta\n FileOutputStream archivo = new FileOutputStream(\"productosVentaCliente\"+this.getCorreo()+\".dat\");\n ObjectOutputStream guardar= new ObjectOutputStream(archivo);\n //guardamos el array de productosEnVenta\n guardar.writeObject(productosEnVenta);\n archivo.close();\n \n\n } catch (IOException ioe) {\n System.out.println(\"ERROR: \" + ioe.getMessage());\n } catch (Exception e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n }", "@Override\n\tpublic void alterar(Parcela entidade) {\n\n\t}", "public void insertProblema() {\n \n \n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n \n this.equipo.setEstado(true);\n this.prob = new ReporteProblema(equipo, this.problema, true,fecha);\n f.registrarReporte(this.prob);\n \n }", "boolean agregarProducto(Producto p) {\n boolean hecho = false;\n try {\n operacion = ayudar.beginTransaction();\n ayudar.save(p);\n operacion.commit();\n } catch (Exception e) {\n operacion.rollback();\n System.out.println(e);\n }\n return hecho;\n }", "@FXML\n void salvar(ActionEvent event) {\n\n Tarefa tp = new Tarefa();\n tp.setNome(projeto.getNome());\n tp.setDataInicio(projeto.getDataPrevInicio());\n tp.setDataFim(projeto.getDataPrevFim());\n tp.setDescricao(projeto.getDescricao());\n tp.setStatus(1);\n tp.setProjeto(projeto);\n\n tarefasDao.Insert(tp);\n\n projeto.setTarefaPrincipal(tp);\n \n projetoDao.Update(projeto);\n\n setores.forEach(x -> {\n\n if (x.selecionado.get()) {\n\n Setor s = x.setor.get();\n\n Tarefa t = new Tarefa();\n t.setSetor(s);\n t.setNome(s.getNome());\n t.setDataInicio(projeto.getDataPrevInicio());\n t.setDataFim(projeto.getDataPrevFim());\n t.setDescricao(s.getNome());\n t.setTarefaPai(tp);\n t.setStatus(1);\n t.setProjeto(projeto);\n tarefasDao.Insert(t);\n }\n\n });\n\n }", "public void editarProveedor() {\n try {\n proveedorFacadeLocal.edit(proTemporal);\n this.proveedor = new Proveedor();\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Proveedor editado\", \"Proveedor editado\"));\n } catch (Exception e) {\n \n }\n\n }", "@Override\n\tpublic void inativar(EntidadeDominio entidade) {\n\t\tPreparedStatement pst=null;\n\t\tLivro livro = (Livro)entidade;\t\t\n\t\ttry {\n\t\t\topenConnection();\n\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\n\t\t\tStringBuilder sql = new StringBuilder();\t\t\t\n\t\t\tsql.append(\"UPDATE livro SET livStatus=?\");\n\t\t\tsql.append(\"WHERE idlivro=?\");\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\tpst.setString(1, \"INATIVADO\");\n\t\t\tpst.setInt(2, livro.getId());\n\t\t\tpst.executeUpdate();\t\t\t\n\t\t\tconnection.commit();\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\ttry {\n\t\t\t\tconnection.rollback();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\te.printStackTrace();\t\t\t\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\tpst.close();\n\t\t\t\tconnection.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\t//SEGUNDA PARTE\n\t\t\t\ttry {\n\t\t\t\t\topenConnection();\n\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t//FALTA COLOCAR EDITORA\t\t\n\t\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\t\tSystem.out.println(livro.getId());\n\t\t\t\t\tSystem.out.println(livro.getJustificativa());\n\t\t\t\t\tSystem.out.println(livro.getIdCatJustificativa());\n\t\t\t\t\tsql.append(\"INSERT INTO justificativainativar (id_livro , justificativa, id_Inativar) VALUES (?,?,?)\");\t\t\n\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\tpst.setInt(1, livro.getId());\n\t\t\t\t\tpst.setString(2,livro.getJustificativa());\n\t\t\t\t\tpst.setInt(3,livro.getIdCatJustificativa());\n\t\t\t\t\tpst.executeUpdate();\n\t\t\t\t\tconnection.commit();\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\n\t}", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }", "public void setCuenta(Cuenta cuenta) {\r\n this.cuenta = cuenta;\r\n fireTableDataChanged();\r\n }", "public void actualizarEstadoSiendoAtendido(Paciente paciente) {\n paciente.setStatus(\"Siendo atendido\");\n Paciente elemento = pacienteRepository.save(paciente);\n }", "public ProduttoreDato(Semaforo pieno, Semaforo vuoto) {\n this.pieno = pieno;\n this.vuoto = vuoto;\n }", "private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela Paciente\\n\");\n\t\tpaciente = new Paciente();\n\t\tlistaPaciente = pacienteService.buscarTodos();\n\t\t\n\t}", "private void controladorNuevoProyecto(Controlador controlador){\n this.contCargarImagen = controlador.getCargarImagen();\n nuevoProyecto.setControlFoto(contCargarImagen);\n\n this.contNuevoProyecto = controlador.getNuevoProyecto();\n nuevoProyecto.setControlProponerProyecto(contNuevoProyecto);\n }", "@Test(expected = BusinessLogicException.class)\n public void updateTarjetaPrepagoConPuntosInvalidoTest() throws BusinessLogicException \n {\n TarjetaPrepagoEntity entity = data.get(0);\n TarjetaPrepagoEntity pojoEntity = factory.manufacturePojo(TarjetaPrepagoEntity.class);\n double valor = (Math.random()) * (-100);\n pojoEntity.setPuntos(valor);\n pojoEntity.setId(entity.getId());\n tarjetaPrepagoLogic.updateTarjetaPrepago(pojoEntity.getId(), pojoEntity);\n }", "public void actualizar(Procedimiento procedimiento) {\n IProcedimientoDao dao = new ProcedimientoDaoImpl();\n dao.actualizarProcedimiento(procedimiento);\n }", "public void guardar(int sel){\n \n if (modelo.getRowCount() == 0) {\n JOptionPane.showMessageDialog(this, \"Necesitas agregar elementos.\");\n } else{\n Producto prod[] = new Producto[modelo.getRowCount()];\n for (int i = 0; i < modelo.getRowCount(); i++) { \n prod[i] = new Producto(Integer.parseInt(modelo.getValueAt(i, 0)+\"\"),\n (String)modelo.getValueAt(i, 1),\n (String)modelo.getValueAt(i, 2),\n Integer.parseInt(modelo.getValueAt(i, 3)+\"\"),\n Double.parseDouble(modelo.getValueAt(i, 4)+\"\"));\n }\n \n \n //Ordenamos\n if (sel == 0) {\n ArchivosBinarios.ordQS_A_ID(prod, 0, prod.length-1);\n } else if (sel == 1){\n ArchivosBinarios.ord_QS_Dsc_Asc(prod, 0, prod.length-1);\n } else if (sel == 2) {\n JOptionPane.showMessageDialog(null, \"La informacipón se guardo.\");\n }\n\n \n for (int i = 0; i < prod.length; i++) {\n modelo.setValueAt(prod[i].getId(), i, 0);\n modelo.setValueAt(prod[i].getTipo(), i, 1);\n modelo.setValueAt(prod[i].getMarca(), i, 2);\n modelo.setValueAt(prod[i].getCantidad(), i, 3);\n modelo.setValueAt(prod[i].getPrecio(), i, 4);\n }\n }\n }", "public void ModificarPrestamo(PrestamoFila pf) {\n this.conexion.ConectarBD();\n String consulta = \"update prestamos set IdSocio = ?, IdLibro = ?, FechaInicio = ?, FechaFin = ? where IdPrestamo = ?\";\n try {\n this.pstm = this.conexion.getConexion().prepareStatement(consulta);\n //Indicamos los parametros del update\n this.pstm.setInt(1, pf.getIdSocio());\n this.pstm.setInt(2, pf.getIdLibro());\n this.pstm.setDate(3, new java.sql.Date(pf.getFechaInicio().getTime()));\n this.pstm.setDate(4, new java.sql.Date(pf.getFechaFin().getTime()));\n this.pstm.setInt(5, pf.getIdPrestamo());\n //Ejecutamos la consulta\n int res = pstm.executeUpdate();\n } catch (SQLException e) { \n throw new MisException(\"Error al modificar un Prestamo.\\n\"+e.toString());\n \n } catch (Exception e) {\n throw new MisException(\"Error.\\n\"+e.toString());\n \n }\n \n //Desconectamos de la BD\n this.conexion.DesconectarBD(); \n }", "@Override protected void eventoMemoriaModificata(Campo campo) {\n Campo tipoPrezzo;\n boolean acceso;\n\n try { // prova ad eseguire il codice\n// if (campo.getNomeInterno().equals(AlbSottoconto.CAMPO_FISSO)) {\n// tipoPrezzo = this.getCampo(AlbSottoconto.CAMPO_TIPO_PREZZO);\n// acceso = (Boolean)campo.getValore();\n// tipoPrezzo.setVisibile(acceso);\n// if (!acceso) {\n// tipoPrezzo.setValore(0);\n// }// fine del blocco if\n// }// fine del blocco if\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela PressaoArterial\\n\");\n\t\tpressaoArterial = new PressaoArterial();\n\t\tlistaPressaoArterial = pressaoArterialService.buscarTodos();\n\n\t}", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "ProductoDto persistirProducto(ProductoDto productoDto) {\n\t\tTipoSuperheroe tipoSuperheroe = tipoSuperheroeService.findById(productoDto.getTipoSuperheroe().getId());\n\t\t\n\t\tProducto producto = new Producto();\n\t\tproducto.setCodProducto(productoDto.getCodProducto());\n\t\tproducto.setCosto(productoDto.getCosto());\n\t\tproducto.setDescripcion(productoDto.getDescripcion());\n\t\tproducto.setTipoSuperheroe(tipoSuperheroe);\n\t\t\n\t\tProducto newProducto = productoService.save(producto);\n\t\t\n\t\tInventario inventario = new Inventario();\n\t\tinventario.setFechaUltimaActualizacion(new Timestamp(System.currentTimeMillis()));\n\t\tinventario.setProducto(producto);\n\t\tinventario.setStock(0L);\n\t\t\n\t\tinventarioService.save(inventario);\n\t\t\n\t\treturn modelMapper.map(newProducto, ProductoDto.class);\n\t}", "public void Atualizar(Fornecedor fornecedor) throws SQLException {\r\n\t\ttry {\r\n\t\t\tString update = \"update fornecedor set nm_fornecedor=?, vl_fornecedor=?, nm_local=?, qt_peso=?, ds_descricao=?\"\r\n\t\t\t\t\t+ \"where cd_fornecedor=?\";\r\n\t\t\tPreparedStatement preparedStatement = this.connection.prepareStatement(update);\r\n\t\t\tpreparedStatement.setString(1, fornecedor.getNomeFornecedor());\r\n\t\t\tpreparedStatement.setDouble(2, fornecedor.getValorFornecedor());\r\n\t\t\tpreparedStatement.setString(3, fornecedor.getNomeLocal());\r\n\t\t\tpreparedStatement.setInt(4, fornecedor.getQuantidadePeso());\r\n\t\t\tpreparedStatement.setString(5, fornecedor.getDescricao());\r\n\t\t\tpreparedStatement.setInt(6, fornecedor.getCodigoFornecedor());\r\n\t\t\tpreparedStatement.execute();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\tthis.connection.close();\r\n\t\t}\r\n\t}", "private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ServicioEntity entity = factory.manufacturePojo(ServicioEntity.class);\n em.persist(entity);\n dataServicio.add(entity);\n }\n for (int i = 0; i < 3; i++) {\n QuejaEntity entity = factory.manufacturePojo(QuejaEntity.class);\n if (i == 0) {\n entity.setServicio(dataServicio.get(0));\n }\n em.persist(entity);\n data.add(entity);\n }\n }", "@Override\n public void actualizarUnObjeto(Object unObjeto) {\n if (unObjeto instanceof Equipamiento){\n try {\n if (unObjeto instanceof Bascula)\n throw new ExcepcionCargaParametros(\"No se puede seleccionar una bascula como destino\");\n this.unEquipamientoSeleccionado = (Equipamiento) unObjeto;\n exhibirEquipamiento();\n } catch (ExcepcionCargaParametros ex) {\n JOptionPane.showMessageDialog(null,ex.getMessage());\n return;\n }\n }\n }", "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 void actionPerformed(ActionEvent event)\n {\n if (event.getSource()==balterar)\n {\n operacao=\"edicao\";\t\n int linha = aTable.getSelectedRow();\n if (linha>=0)\n {\n \t desbloqueia();\n String idprod = aTable.getValueAt(linha,0).toString();\n String desprod = aTable.getValueAt(linha,1).toString();\n String quantidade = aTable.getValueAt(linha,2).toString();\n String valunit = aTable.getValueAt(linha,3).toString();\n String ultmov = aTable.getValueAt(linha,4).toString();\n String categoria = aTable.getValueAt(linha,5).toString();\n String idcateg = aTable.getValueAt(linha,6).toString();\n tidprod.setText(idprod);\n tidprod.setEnabled(false);\n tdesprod.setText(desprod);\n tquantidade.setText(quantidade);\n tvalunit.setText(valunit);\n tultmov.setDate(dma_to_amd(ultmov));\n tlistacateg.setSelectedItem(categoria);\n g_idcateg = Integer.parseInt(idcateg);\n }\n else\n {\n \t JOptionPane.showMessageDialog(null,\"Selecione na tabela o registro que deseja editar\");\n }\n }\n \n \t \n // Executa este if se for clicado o botao Gravar\n if (event.getSource()==bgravar)\n {\n try\n {\n \t int idprod = Integer.parseInt(tidprod.getText());\n \t \n \t if (idprod>0 && \"edicao\".equals(operacao))\n \t { \t \n \t PreparedStatement st = conex.prepareStatement(\"update produtos set desprod=?,quantidade=?,valunit=?,codcateg=?, ultmov=? where idprod=?\");\n st.setString(1,tdesprod.getText());\n st.setDouble(2,Double.parseDouble(tquantidade.getText()));\n st.setDouble(3,Double.parseDouble(tvalunit.getText()));\n st.setInt(4,g_idcateg);\n st.setDate(5,new java.sql.Date(tultmov.getDate().getTime())); \n st.setInt(6,Integer.parseInt(tidprod.getText()));\n st.executeUpdate();\n \t }\n \n \t if (idprod > 0 && \"novo\".equals(operacao))\n \t { \t \n PreparedStatement st = conex.prepareStatement(\"select idprod from produtos where idprod = ?\");\n st.setInt(1,Integer.parseInt(tidprod.getText()));\n ResultSet rs = st.executeQuery();\n if (rs.first())\n {\n JOptionPane.showMessageDialog(null,\"Este codigo ja existe!\");\n }\n else\n {\n String sql = \"insert into produtos (idprod,desprod,quantidade,valunit,codcateg,ultmov) values (?,?,?,?,?,?)\";\n PreparedStatement vs = conex.prepareStatement(sql);\n vs.setInt(1,Integer.parseInt(tidprod.getText()));\n vs.setString(2,tdesprod.getText());\n vs.setDouble(3,Double.parseDouble(tquantidade.getText()));\n vs.setDouble(4,Double.parseDouble(tvalunit.getText()));\n vs.setInt(5,g_idcateg);\n vs.setDate(6,new java.sql.Date(tultmov.getDate().getTime()));\n vs.executeUpdate();\n }\n rs.close();\n \t }\n \t \n } catch (Exception sqlEx) {JOptionPane.showMessageDialog(null,\"erro\");}\n preenche_grid();\n limpaBase();\n bloqueia();\n }\n \n // Executa este if se for clicado o botao Excluir\n if (event.getSource()==bexcluir)\n {\n int linha = aTable.getSelectedRow();\n if (linha>=0)\n {\n \t int resp = JOptionPane.showOptionDialog(null,\"Confirma exclusão\",\"Atenção\",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,null,null,null);\n \t if (resp==0)\n \t {\n String idprod = aTable.getValueAt(linha,0).toString();\n try\n {\n PreparedStatement st = conex.prepareStatement(\"delete from produtos where idprod = ?\");\n st.setInt(1,Integer.parseInt(idprod));\n st.executeUpdate();\n } catch (Exception sqlEx) {}\n preenche_grid();\n \t }\n }\n else\n {\n \t JOptionPane.showMessageDialog(null,\"Selecione na tabela o registro que deseja excluir\");\n }\n\n }\n \n // Executa este if se for clicado o botao Incluir\n if (event.getSource()==bincluir)\n {\n \toperacao=\"novo\";\t\n try\n {\n \tlimpaBase();\n \tdesbloqueia();\n } catch (Exception sqlEx) {}\n }\n \n \n \n }", "public void salvar() throws Exception {\t\r\n\t\t\t\t\r\n\t\tDate date = new Date();\r\n\t\tString url = evento.getUrl();\r\n\t\tevento.setNmStatus(EventoService.getStatus(url));\r\n\t\tevento.setDataHora(date);\r\n\t\teventoRepository.save(evento); // COLOCAMOS NO BANCO\r\n\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage(\"Cadastro inserido\"));\r\n\t\tif (!modoEdicao)\r\n\t\t\teventos.add(evento); // COLOCAMOS NA LISTA\r\n\t\tevento = new Evento();\r\n\t\tmodoEdicao = false;\r\n\t}", "public VerInfoProd(Producto prod) {\n initComponents();\n \n Fabrica fabrica = Fabrica.getInstance();\n ICP = fabrica.getICtrlProducto();\n modelo = (DefaultTableModel) jTabla.getModel();\n this.txtNomProd.setText(prod.getNombre());\n this.txtDescProd.setText(prod.getDescripcion());\n String precio = Double.toString(prod.getPrecio());\n this.txtPrecioProd.setText(precio);\n p = prod;\n Promocional prom = (Promocional)p;\n if(prom.isActiva())\n this.txtEstadoPromo.setText(\"ACTIVA\");\n else\n this.txtEstadoPromo.setText(\"INACTIVA\");\n cargartabla();\n }" ]
[ "0.6145394", "0.6126497", "0.6099589", "0.6026105", "0.5918052", "0.5793429", "0.5730658", "0.5712497", "0.5710023", "0.55908275", "0.55886716", "0.5586022", "0.55745345", "0.5534827", "0.5531492", "0.552872", "0.55281174", "0.55183434", "0.5516427", "0.5511681", "0.5495829", "0.54912865", "0.5479096", "0.5464055", "0.5460754", "0.5445842", "0.5440459", "0.5429941", "0.54270726", "0.5421963", "0.53940976", "0.5390934", "0.5390063", "0.538922", "0.53812397", "0.53750527", "0.5369727", "0.53586596", "0.53570324", "0.53560066", "0.5354852", "0.5351142", "0.5345825", "0.5337446", "0.5337205", "0.5336518", "0.533533", "0.5333389", "0.53318167", "0.53318065", "0.5316012", "0.53127843", "0.5297291", "0.5295841", "0.52921194", "0.52909493", "0.5279536", "0.5270839", "0.526517", "0.52633786", "0.52631974", "0.5257907", "0.5256047", "0.5241665", "0.5239967", "0.52383995", "0.5234766", "0.52294207", "0.522508", "0.52239937", "0.5219751", "0.52175945", "0.5202501", "0.5201066", "0.5198169", "0.51972485", "0.5194646", "0.519407", "0.51910424", "0.51898974", "0.51892066", "0.51847243", "0.51838386", "0.5182613", "0.51758564", "0.5175274", "0.51676464", "0.5166793", "0.51544166", "0.5154147", "0.5152879", "0.5148479", "0.5147304", "0.51451707", "0.51449865", "0.51449805", "0.5144777", "0.51416075", "0.51379645", "0.5137506" ]
0.5368795
37
Elimina un unico registro en la tabla Productos_punto_venta.
@Override public void delete(ProductosPuntoVentaPk pk) throws ProductosPuntoVentaDaoException { long t1 = System.currentTimeMillis(); PreparedStatement stmt = null; try { // Validamos la conexion this.validateConnection(); System.out.println("Executing " + SQL_DELETE + " with PK: " + pk); stmt = userConn.prepareStatement(SQL_DELETE); if (pk.getIdPuntoVenta() != null && pk.getIdProducto() != null) { stmt.setInt(IDaoConstants.INT_ONE, pk.getIdPuntoVenta()); stmt.setInt(IDaoConstants.INT_TWO, pk.getIdProducto().intValue()); } else { stmt.setNull(IDaoConstants.INT_ONE, java.sql.Types.INTEGER); stmt.setNull(IDaoConstants.INT_TWO, java.sql.Types.INTEGER); } int rows = stmt.executeUpdate(); long t2 = System.currentTimeMillis(); System.out.println(rows + " rows affected (" + (t2 - t1) + " ms)"); } catch (SQLException e) { e.printStackTrace(); throw new ProductosPuntoVentaDaoException("Exception: " + e.getMessage(), e); } finally { ResourceManager.close(stmt); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void eliminar(Producto producto) throws BusinessErrorHelper;", "public void eliminar(Producto producto) throws IWDaoException;", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Se elimino los datos del equipo\");\r\n\t}", "@Override\r\n\tpublic void eliminar() {\n\t\tLOG.info(\"Eliminar los datos del equipo\");\r\n\t}", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_cuenta.eliminar();\r\n\t}", "public void eliminar(TipoDocumento tpDocu) {\n try {\n boolean verificarReLaboraldEnTpDocu = servReLaboral.buscarRegistroPorTpDocumento(tpDocu);\n if (verificarReLaboraldEnTpDocu) {\n MensajesFaces.informacion(\"No se puede eliminar\", \"Existen Datos Relacionados\");\n } else {\n servtpDocumento.eliminarTipoDocumento(tpDocu);\n tipoDocumento = new TipoDocumento();\n MensajesFaces.informacion(\"Eliminado\", \"Exitoso\");\n }\n } catch (Exception e) {\n MensajesFaces.advertencia(\"Error al eliminar\", \"detalle\" + e);\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 }", "@Override\r\n\tpublic void excluir(Evento evento) {\n\t\trepository.delete(evento);\r\n\t}", "@Override\n public void eliminarElemento(Object elemento) {\n database.delete(elemento);\n }", "public void eliminar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.remove(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }", "public void eliminarElemento(T dato) {\n\t\tNodeTabla<K, T> nodo = primerElemento;\n\n\t\t// itera los elementos hasta que se acaben o encuentre el elemento\n\t\twhile (nodo != null && !nodo.getElemento().equals(dato)) {\n\t\t\tnodo = nodo.getSiguiente();\n\t\t}\n\n\t\t// se encontro el nodo?\n\t\tif (nodo != null) {\n\t\t\tif (nodo != primerElemento) {\n\t\t\t\t// borra el nodo de la existencia\n\t\t\t\tnodo.getAnterior().setSiguiente(nodo.getSiguiente());\n\t\t\t\tnodo.getSiguiente().setAnterior(nodo.getAnterior());\n\t\t\t} else {\n\t\t\t\tprimerElemento = primerElemento.getSiguiente();\n\t\t\t}\n\t\t\t// baja en uno el tamano\n\t\t\ttamano--;\n\n\t\t} else {\n\t\t\t// Bruh, no esta el nodo\n\t\t\tSystem.out.println(\"No se encontro el elemento a eliminar.\");\n\t\t}\n\n\t}", "@Override\r\n public void eliminar(final Empleat entitat) throws UtilitatPersistenciaException {\r\n JdbcPreparedDao jdbcDao = new JdbcPreparedDao() {\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n int field=0;\r\n pstm.setInt(++field, entitat.getCodi());\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"delete from Empleat where codi = ?\";\r\n }\r\n };\r\n UtilitatJdbcPlus.executar(con, jdbcDao);\r\n }", "@FXML\n\tpublic void handleExcluir(MouseEvent event) {\n\t\tif(colNome.getCellData(jtvIngredienteTable.getSelectionModel().getSelectedIndex()) != null){\n\t\t\tingredienteService = new IngredienteService();\n\t\t\tIngrediente ingrediente = jtvIngredienteTable.getSelectionModel().getSelectedItem();\n\t\t\tingredienteService.delete(ingrediente.getId());\n\t\t\tatualizarTable();\n\t\t}else{\n\t\t\tScreenUtils.janelaInformação(spDialog, Internationalization.getMessage(\"header_erro3\"), Internationalization.getMessage(\"item_nao_selecionado\"), Internationalization.getMessage(\"erro_button2\"));\n//\t\t\tScreenUtils.janelaInformação(spDialog, \"Ops\", \"Por favor, selecione um item.\", \"Sem problemas\");\n\t\t}\n\t}", "private void borrarAeropuertoMenuActionPerformed(ActionEvent evt) {\n if (tblAeropuertos.getSelectedRow() != -1) {\n\n int eleccion = JOptionPane.showConfirmDialog(this, \"Quieres borrar el aeropuerto?\", \"Confirmacion\", JOptionPane.YES_NO_OPTION);\n\n if (eleccion == JOptionPane.YES_OPTION) {\n int fila = tblAeropuertos.getSelectedRow(); //GUARDA QUE FILA FUE SELECCIONADA\n\n int id = (int) tblAeropuertos.getValueAt(fila, 0); //EVALUA LA FILA Y LA COLUMNA, Y COMO LA FILA ME LA DA LA LINEA ANTERIOR, Y LA COLUMNA ES 0, YA QUE ESTAMOS EVALUANDO EL ID\n Aeropuerto aeropuerto = buscarAeropuerto(id);\n\n VariablesGlobales.aeropuertos.remove(aeropuerto);\n\n try {\n MetodosSueltos.actualizarFichero();\n\n } catch (IOException ex) {\n Logger.getLogger(Principal.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n if (rdbPrivado.isSelected()) {\n cargarDatos(PRIVADO, txtFiltroNombre.getText());\n\n } else {\n cargarDatos(PUBLICO, txtFiltroNombre.getText());\n }\n }\n\n } else {\n JOptionPane.showMessageDialog(this, \"No hay filas seleccionadas\", \"error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\n\tpublic void eliminar(Object T) {\n\t\tSeccion seccionE= (Seccion)T;\n\t\tif(seccionE!=null){\n\t\t\ttry{\n\t\t\tString insertTableSQL = \"update seccion set estatus=?\" +\"where codigo=? and estatus='A'\";\n\t\t\tPreparedStatement preparedStatement = conexion.prepareStatement(insertTableSQL);\n\t\t\tpreparedStatement.setString(1, \"I\");\n\t\t\tpreparedStatement.setString(2, seccionE.getCodigo());\n\t\t\tpreparedStatement.executeUpdate();\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"No se elimino el registro\");\n\t\t}\n\t\tSystem.out.println(\"Eliminacion exitosa\");\n\t}\n\n\t}", "@Override\r\n\tpublic MensajeBean elimina(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.elimina(nuevo);\r\n\t}", "public int eliminar(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"DELETE FROM conftbc_producto WHERE idmodelo = ?\";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tps.setInt(1,producto.getModelo().getIdmodelo());\n\t\t\tint rpta = ps.executeUpdate();\t\t\n\t\t\tthis.objCnx.confirmarDB();\n\t\t\treturn rpta;\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally {\t\t\t\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "private void eliminarProducto(HttpServletRequest request, HttpServletResponse response) {\n\t\tString codArticulo = request.getParameter(\"cArticulo\");\n\t\t// Borrar producto de la BBDD\n\t\ttry {\n\t\t\tmodeloProductos.borrarProducto(codArticulo);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Volver al listado con la info actualizada\n\t\tobtenerProductos(request, response);\n\n\t}", "public void supprimerEmpruntsParEleve(int indice_eleve) {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\trequete.execute(\"DELETE FROM emprunts WHERE id_eleve = \" + indice_eleve + \" AND date_rendu is not null\");\n\t\t\trafraichir_tableau();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "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 static void removeOnePayment(Payment pagamento) throws ClassNotFoundException{\r\n\t\t\r\n\t\t//Deletion occurs in table \"metododipagamento\"\r\n \t//username:= postgres\r\n \t//password:= effe\r\n \t//Database name:=strumenti_database\r\n \t\r\n \tClass.forName(\"org.postgresql.Driver\");\r\n \t\r\n \ttry (Connection con = DriverManager.getConnection(JDBC_URL, JDBC_USERNAME, JDBC_PASSWORD)){\r\n \t\t\r\n \t\ttry (PreparedStatement pst = con.prepareStatement(\r\n \t\t\t\t\"DELETE FROM \" + NOME_TABELLA + \" \"\r\n \t\t\t\t+ \"WHERE cliente = ? AND \"\r\n \t\t\t\t+ \"nomemetodo = ? AND \"\r\n \t\t\t\t+ \"credenziali = ?\")) {\r\n \t\t\t\r\n \t\t\tpst.setString(1, pagamento.getUserMailFromPayment());\r\n \t\t\tpst.setString(2, pagamento.getNomeMetodo());\r\n \t\t\tpst.setString(3, pagamento.getCredenziali());\r\n \t\t\t\r\n \t\t\tint n = pst.executeUpdate();\r\n \t\t\tSystem.out.println(\"Rimosse \" + n + \" righe da tabella \" + NOME_TABELLA + \": \" + pagamento.getUserMailFromPayment());\r\n \t\t\t\r\n \t\t} catch (SQLException e) {\r\n \t\t\tSystem.out.println(\"Errore durante cancellazione dati: \" + e.getMessage());\r\n \t\t}\r\n \t\t\r\n \t} catch (SQLException e){\r\n \t\tSystem.out.println(\"Problema durante la connessione iniziale alla base di dati: \" + e.getMessage());\r\n \t}\r\n\t\t\r\n\t}", "@Override\n\tpublic void excluir(Produto entidade) {\n\n\t}", "public void eliminar(Provincia provincia) throws BusinessErrorHelper;", "public void eliminarVenta(int codVenta) throws Exception {\n if (this.ventas.containsKey(codVenta)) {\r\n this.ventas.remove(codVenta);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"La Venta no Existe\");\r\n }\r\n //return retorno;\r\n }", "private void removeProducto(int position) {\n losproductos.remove(position);\n // Notificamos de un item borrado en nuestro array\n eladaptador.notifyItemRemoved(position);\n }", "public void eliminarDatos(EstructuraContratosDatDTO estructuraNominaSelect) {\n\t\t\n\t}", "@Override\r\n\tpublic void remover(Tipo tipo) {\n String sql = \"delete from tipos_servicos where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, tipo.getId());\r\n \r\n stmt.execute();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}", "public void deleteProveedor (Long id_proveedor){\n proveedorPersistence.delete(id_proveedor);\n }", "public void eliminarProductoCliente(Producto producto) throws Exception{\n try{\n if(!productosEnVenta.contains(producto)){\n throw new productoNoRegistrado();\n }\n productosEnVenta.remove(producto);\n UtilidadJavaPop.eliminarProducto(producto);\n \n \n }catch(productoNoRegistrado pNR){\n throw pNR;\n }catch(NullPointerException npe){\n throw npe;\n }catch(Exception e){\n throw e;\n }\n \n }", "@Override\n\tpublic MensajeBean elimina(Tramite_informesem nuevo) {\n\t\treturn tramite_informesemDao.elimina(nuevo);\n\t}", "public void eliminaBD() {\r\n CBD.openConexion();\r\n //------Reune los datos de producto con id--------------//\r\n String A = CBD.getInveID(II.lblid.getText());\r\n String B[] = A.split(\",\");\r\n //------Reune los datos de producto con id--------------//\r\n //------Verifica si la cantidad es 0--------------//\r\n if (Integer.parseInt(B[5]) == 0) {\r\n //------Elimina--------------//\r\n if(CBD.deleteDBProd(\"[ID PRODUCTO]\", B[7])){\r\n JOptionPane.showMessageDialog(II, \"Producto eliminado\");\r\n }else{\r\n JOptionPane.showMessageDialog(II, \"Error producto no pudo ser eliminado\");\r\n }\r\n //------Elimina--------------//\r\n } else {\r\n JOptionPane.showMessageDialog(II, \"No puedes eliminar un producto si su existencia es mayor a 0\");\r\n }\r\n CBD.closeConexion();\r\n }", "@Override\n public void eliminarPropiedad(String pIdPropiedad) {\n try {\n bdPropiedad.manipulationQuery(\"DELETE FROM PROPIEDAD WHERE ID_PROPIEDAD = '\" + pIdPropiedad + \"'\");\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void eliminarProducto(int codigo, BUsuario usuario, Connection conn)throws SQLException {\n\t\tPreparedStatement pstm;\r\n\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"UPDATE producto \\n\");\r\n\t\tsql.append(\"SET usuario_modificacion = ? , \\n\");\r\n\t\tsql.append(\" fecha_modificacion = SYSDATE, \\n\");\r\n\t\tsql.append(\" estado = 0 \\n\");\r\n\t\tsql.append(\"WHERE producto_id = ?\");\r\n\t\t\r\n\t\tpstm = conn.prepareStatement(sql.toString());\r\n\t\tpstm.setString(1,usuario.getLogin());\r\n\t\tpstm.setInt(2,codigo);\r\n\t\tpstm.executeUpdate();\r\n\t\t\r\n\t\tpstm.close();\r\n\t\t\r\n\t}", "public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }", "public void deleteEquipoComunidad(EquipoComunidad equipoComunidad);", "public void eliminar(Procedimiento procedimiento) {\n IProcedimientoDao dao = new ProcedimientoDaoImpl();\n dao.eliminarProcedimiento(procedimiento);\n }", "void eliminarPedido(UUID idPedido);", "void desalocar(Processo processo) {\n for (int r = 0; r < size(); r++) {\n if (get(r).idProcesso == processo.getId()) {\n //TODO Marcar o bloco como livre\n get(r).espaçoUsado = 0;\n get(r).idProcesso = -1;\n }\n }\n }", "public void eliminaEdificio() {\n this.edificio = null;\n // Fijo el tipo después de eliminar el personaje\n this.setTipo();\n }", "public void eliminar() {\n try {\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(3, this.Selected);\n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"2\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue eliminada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n addMessage(\"Eliminado Exitosamente\", 1);\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al eliminar el registro, contacte al administrador del sistema\", 2);\n }\n }", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_nivel_funcion_programa.eliminar();\r\n\t\t\r\n\t}", "@Override\n public void excluir(Pessoa pessoa) {\n String sql = \"DELETE FROM pessoa WHERE uuid=?\";\n try {\n this.conexao = Conexao.abrirConexao();\n PreparedStatement statement = conexao.prepareStatement(sql);\n statement.setLong(1, pessoa.getId());\n statement.executeUpdate();\n } catch (SQLException ex) {\n Logger.getLogger(PessoasJDBC.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n Conexao.fecharConexao(conexao);\n }\n\n }", "public void eliminar(Periodo periodo)\r\n/* 27: */ {\r\n/* 28: 53 */ this.periodoDao.eliminar(periodo);\r\n/* 29: */ }", "public static void deletarProduto(long id_produto) {\r\n PreparedStatement stmn = null;\r\n try {\r\n stmn = connection.prepareStatement(\"Delete from produto where id_produto = ?\");\r\n stmn.setLong(1, id_produto);\r\n\r\n int row = stmn.executeUpdate();\r\n if (row == 0) {\r\n System.out.println(\"Não foi possível excluir o registro do id \" + id_produto);\r\n } else {\r\n System.out.println(\"Produto exluído com sucesso\");\r\n }\r\n } catch (SQLException throwables) {\r\n throwables.printStackTrace();\r\n }\r\n }", "public void quitarProducto(String producto) {\n\t\t this.compras.remove(producto);\n\t\t this.datosCompras.remove(producto);\n\t}", "public void eliminar_datos_de_tabla(String tabla_a_eliminar){\n try {\n Class.forName(\"org.postgresql.Driver\");\n Connection conexion = DriverManager.getConnection(cc);\n Statement comando = conexion.createStatement();\n //Verificar dependiendo del tipo de tabla lleva o no comillas\n \n String sql=\"delete from \\\"\"+tabla_a_eliminar+\"\\\"\";\n \n comando.executeUpdate(sql);\n \n comando.close();\n conexion.close();\n } catch(ClassNotFoundException | SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\r\n\tprotected void borrarObjeto() throws ClassNotFoundException {\n\t\tif (tbJustificaciones.getSelectedRow() != -1\r\n\t\t\t\t&& tbJustificaciones.getValueAt(tbJustificaciones.getSelectedRow(), 0) != null) {\r\n\t\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (ELIMINANDO)\");\r\n\t\t\tthis.opcion = 3;\r\n\t\t\tactivarFormulario();\r\n\t\t\tcargarDatosModificar();\r\n\t\t\ttxtCedula.setEnabled(false);\r\n\t\t\tlimpiarTabla();\r\n\t\t\tthis.panelBotones.habilitar();\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, GlobalUtil.MSG_ITEM_NO_SELECCIONADO, \"ATENCION\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t}", "public static void deleteequipo(Integer idequipo) {\r\n\r\n\t\tConnection c = ConnectionDB.conectarMySQL();\r\n\t\ttry {\r\n\t\t\tPreparedStatement stm = c.prepareStatement(\"update jugador set equipo =null where equipo=\"+idequipo);\r\n\t\t\tstm.executeUpdate();\r\n\t\t\tPreparedStatement stmt = c.prepareStatement(\"Delete from equipo where id =\" + idequipo);\r\n\t\t\tstmt.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public static void vaciartabla(){\n DefaultTableModel modelo=(DefaultTableModel) jtproveedores.getModel(); \n for (int i = 0; i < jtproveedores.getRowCount(); i++) {\n modelo.removeRow(i);\n i-=1;\n } \n }", "Boolean remover(String userName, Long idProducto);", "public boolean eliminar(){\n\t\tString query = \"DELETE FROM Almacen WHERE Id_Producto = \"+this.getId();\n\t\tif(updateQuery(query)){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic void quitar(Alumno alumno) {\n\t\tcomision.remove(alumno);\n\t}", "private void borrarPieza(PosicionAjedrez pos){\n\t\tint fila= transformar(pos).getFila();\n\t\tint col= transformar(pos).getColumna();\n\n\t\tthis.getChildren().remove(tablero[col][fila]);\n\t\ttablero[col][fila]=new Canvas(CASILLERO_ANCHO,CASILLERO_ALTO);\n\t\ttablero[col][fila].setTranslateX(CASILLERO_ANCHO*col);\n\t\ttablero[col][fila].setTranslateY(CASILLERO_ALTO*fila);\n\n\t\tthis.getChildren().add(tablero[col][fila]);\n\t}", "public void eliminarTipoPago(String codTipoPago) throws Exception {\n if (this.tiposPagos.containsKey(codTipoPago)) {\r\n this.generarAuditoria(\"BAJA\", \"TIPOPAGO\", codTipoPago, \"\", GuiIngresar.getUsuario());\r\n this.tiposPagos.remove(codTipoPago);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"El tipo pago no Existe\");\r\n }\r\n //return retorno;\r\n }", "public void darDeAltaProducto(Producto producto) throws SQLException {\n\t\tDataProducto dp = new DataProducto();\n\t\tdp.updateBajaLogica(producto);\n\t}", "public void eliminarEmpleado(String nroDocEmpleado) throws Exception {\n if (this.empleados.containsKey(nroDocEmpleado)) {\r\n this.generarAuditoria(\"BAJA\", \"EMPLEADO\", nroDocEmpleado, \"\", GuiIngresar.getUsuario());\r\n this.empleados.remove(nroDocEmpleado);\r\n setChanged();\r\n notifyObservers();\r\n //retorno = true;\r\n } else {\r\n throw new Exception(\"El cajero no Existe\");\r\n }\r\n //return retorno;\r\n }", "@Override\n\t\tpublic void eliminar() {\n\t\t\tutilitario.getTablaisFocus().eliminar();\n\t\t}", "public boolean EliminarProducto(int id) {\n boolean status=false;\n int res =0;\n try {\n conectar();\n res=state.executeUpdate(\"delete from producto where idproducto=\"+id+\";\");\n \n if(res>=1){\n status=true;\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return status;\n }", "private void eliminar() {\n\n int row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n int men = JOptionPane.showConfirmDialog(null, \"Estas seguro que deceas eliminar el registro?\", \"pregunta\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\n if (men == JOptionPane.YES_OPTION) {\n try {\n cdao.eliminar(cvo);\n cvo.setId_cliente(row);\n } catch (Exception e) {\n System.out.println(\"Mensaje eliminar\" + e.getMessage());\n }\n }\n }", "public void deleteTbagendamento() {\n\n if (agendamentoLogic.removeTbagendamento(tbagendamentoSelected)) {\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento removido com sucesso.\");\n listTbagendamentos = agendamentoLogic.findAllTbagendamentoFromCurrentDay();\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falha ao remover agendamento.\");\n }\n\n }", "public void sepulsaeliminar(View view) {\n\t\tif(posicionArrayList !=-1) {\n\t\t\tarrayList.get(posicionArrayList);\n\n\t\t\tfinal DatabaseReference referenciaUseraBorrar=FirebaseDatabase.getInstance().getReference(\"users\").child(arrayList.get(posicionArrayList));\n\n\t\t\treferenciaUseraBorrar.removeValue(); //Elimina el campo del User de la BD\n\t\t\tarrayList.remove(posicionArrayList); //Elimina la posición correspondiente del ArrayList\n\t\t\tarrayAdapter.notifyDataSetChanged(); //Función que actualiza el arrayAdapter y lo dibuja de nuevo.\n\t\t\tToast.makeText(getApplicationContext(),\"Usuario Cuidador eliminado\",Toast.LENGTH_LONG).show();\n\n\t\t}else{\n\t\t\tToast.makeText(getApplicationContext(),\"No se ha seleccionado ningún elemento\",Toast.LENGTH_LONG).show();\n\t\t}\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 }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(cbElPuesto.getSelectedIndex()!=0) {\n\t\t\t\t\tString eliminar=((String) cbElPuesto.getSelectedItem());\n\t\t\t\t\tSystem.out.println(eliminar);\n\t\t\t\t\tdata.setQuery(\"DELETE FROM TipoPuesto WHERE puesto='\"+eliminar+\"'\");\n\t\t\t\t\tcbElPuesto.removeAllItems();\n\t\t\t\t\tcbEdPuesto.removeAllItems();\n\t\t\t\t\tcbElPuesto.addItem(\"Seleccione un hospital...\");\n\t\t\t\t\tcbEdPuesto.addItem(\"Seleccione un hospital...\");\n\t\t\t\t\tJOptionPane.showMessageDialog(btnEliminar,\"Eliminación exitosa\");\n\t\t\t\t\tregistros=(ResultSet) data.getQuery(\"Select * from TipoPuesto\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\twhile(registros.next()) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcbElPuesto.addItem(registros.getString(\"puesto\"));\n\t\t\t\t\t\t\tcbEdPuesto.addItem(registros.getString(\"puesto\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}", "public void eliminarControlProducto(RequisitoConformidadDto control) {\n\t\tcurrentPao.getListaRequisitosConformidad().remove(control);\r\n\t\tFacesContext context = FacesContext.getCurrentInstance();\r\n\t\tcontext.addMessage(null, new FacesMessage(\"Mensaje\", \"Se eliminó control de producto correctamente\"));\r\n\t}", "public void EliminarElmento(int el) throws Exception{\n if (!estVacia()) {\n if (inicio == fin && el == inicio.GetDato()) {\n inicio = fin = null;\n } else if (el == inicio.GetDato()) {\n inicio = inicio.GetSiguiente();\n } else {\n NodoDoble ante, temporal;\n ante = inicio;\n temporal = inicio.GetSiguiente();\n while (temporal != null && temporal.GetDato() != el) {\n ante = ante.GetSiguiente();\n temporal = temporal.GetSiguiente();\n }\n if (temporal != null) {\n ante.SetSiguiente(temporal.GetSiguiente());\n if (temporal == fin) {\n fin = ante;\n }\n }\n }\n }else{\n throw new Exception(\"No existen datos por borrar!!!\");\n }\n }", "public void supprimer(Etudiant t) {\n\t\tdao.supprimer(t);\r\n\t}", "public GrupoProducto borrar(GrupoProducto grupoProducto){\r\n Long id = grupoProducto.getId();\r\n for (int i = 0; i < listaGrupoProductos.size(); i++) {\r\n if (id.equals(listaGrupoProductos.get(i).getId())) {\r\n listaGrupoProductos.get(i).setEliminado(true);\r\n return grupoProducto;\r\n }\r\n }\r\n return null;\r\n }", "public void eliminarProductoSucursal(int codigo, BUsuario usuario, Connection conn)throws SQLException {\n\t\tPreparedStatement pstm;\r\n\r\n\t\tStringBuffer sql = new StringBuffer();\r\n\t\tsql.append(\"UPDATE producto_sucursal \\n\");\r\n\t\tsql.append(\"SET usuario_modificacion = ? , \\n\");\r\n\t\tsql.append(\" fecha_modificacion = SYSDATE, \\n\");\r\n\t\tsql.append(\" estado = 0 \\n\");\r\n\t\tsql.append(\"WHERE producto_id = ?\");\r\n\t\t\r\n\t\tpstm = conn.prepareStatement(sql.toString());\r\n\t\tpstm.setString(1,usuario.getLogin());\r\n\t\tpstm.setInt(2,codigo);\r\n\t\tpstm.executeUpdate();\r\n\t\t\r\n\t\tpstm.close();\t\t\r\n\t}", "public void buttonDelete(ActionEvent event) {\n\t\tObservableList<Player> allProduct, SinglePlayer;\n\t\tallProduct = tableview.getItems();\n\t\tSinglePlayer = tableview.getSelectionModel().getSelectedItems();\n\t\tSinglePlayer.forEach(allProduct::remove);\n\t}", "private void supprimerEmpruntsParLivre(int id_livre) {\n\t\ttry{\n\t\t\trequete_tmp = \"DELETE FROM emprunts WHERE id_livre = \" + id_livre + \" AND date_rendu is not null\";\n\t\t\trequete.execute(requete_tmp);\n\t\t}catch(SQLException e) {\n\t\t\tafficherErreur(requete_tmp, e);\n\t\t}\n\t}", "@Override\n\tpublic void remover(Parcela entidade) {\n\n\t}", "public void eliminarPersonaje(Personaje p) {\n this.listaPersonajes.remove(p);\n // Fijo el tipo después de eliminar el personaje\n this.setTipo();\n }", "public void removerProdutoPedidos(Produto produto) {\n\t\tList<Pedido> pedidos = pedidoService.buscarPedidosProduto(produto.getId());\n\t\tfor (Pedido pedido : pedidos) {\n\t\t\tList<Produto> produtos = pedido.getProdutos();\n\t\t\twhile(produtos.contains(produto))\n\t\t\t\tprodutos.remove(produto);\n\t\t\t\n\t\t\tpedido.setProdutos(produtos);\n\t\t\tpedidoService.salvar(pedido);\n\t\t}\t\t\n\t}", "@Override\n public boolean eliminar(T dato) {\n if (esVacio())\n return (false); \n super.setRaiz(buscarAS(dato));\n int cmp = ((Comparable)dato).compareTo(super.getRaiz().getInfo()); \n //Si se encontro el elemento\n if (cmp==0){\n if (super.getRaiz().getIzq()==null){\n super.setRaiz(super.getRaiz().getDer());\n } \n else {\n NodoBin<T> x = super.getRaiz().getDer();\n super.setRaiz(super.getRaiz().getIzq());\n super.setRaiz(biselar(super.getRaiz(), dato));\n super.getRaiz().setDer(x);\n }\n return (true);\n }\n //El dato no fue encontrado\n return (false);\n }", "public void removeEmpleado(){\n //preguntar al empleado si realmente eliminar o no al objeto empleado\n this.mFrmMantenerEmpleado.messageBox(Constant.APP_NAME, \"<html>\"\n + \"¿Deseas remover el empleado del sistema?<br> \"\n + \"<b>OJO: EL EMPLEADO SERÁ ELIMINADO PERMANENTEMENTE.</b> \"\n + \"</html>\",\n new Callback<Boolean>(){\n @Override\n public void execute(Boolean[] answer) {\n //si la respuesta fue YES=true, remover al empleado y limpiar el formulario\n if(answer[0]){\n mEmpleado.remove();\n clear();\n }\n //si la respuesta es NO=false, no hacer nada\n }\n }\n );\n \n }", "@Override\r\n\tpublic <T extends Evento> Evento borrarEvento(Evento evento) {\n\t\treturn null;\r\n\t}", "public void removeOperador() {\r\n\t\toperadorLaboratorio=null;\r\n\t}", "public void EliminarPrestamo(Integer idPrestamo) {\n this.conexion.ConectarBD();\n String consulta = \"delete from prestamos where IdPrestamo = ?\";\n try {\n this.pstm = this.conexion.getConexion().prepareStatement(consulta);\n //Indicamos los parametros del delete\n this.pstm.setInt(1, idPrestamo);\n //Ejecutamos la consulta\n int res = pstm.executeUpdate();\n } catch (SQLException e) { \n throw new MisException(\"Error al eliminar un Prestamo.\\n\"+e.toString());\n //System.out.println(\"Error al eliminar un Libro.\");\n } catch (Exception e) {\n throw new MisException(\"Error.\\n\"+e.toString());\n //e.printStackTrace();\n }\n \n //Desconectamos de la BD\n this.conexion.DesconectarBD();\n }", "public void borrarTodosTripulantes();", "public void borrar(Especialiadad espe,JTextField txtcodigo ){\r\n\t\tConnection con = null;\r\n\t\tStatement stmt = null;\r\n\t\tint result = 0;\r\n\t\t\r\n\t\tSystem.out.println(txtcodigo.getText());\r\n\t\tString sql = \"DELETE FROM Especialiadad \"\r\n\t\t\t\t+ \"WHERE codigo = \"+ txtcodigo.getText();\r\n\t\t\t\t\r\n\t\ttry {\r\n\t\t\tcon = ConexionBD.getConnection();\r\n\t\t stmt = con.createStatement();\r\n\t\t result = stmt.executeUpdate(sql);\r\n\t\t//\tPreparedStatement ps= con.prepareStatement(sql);\r\n\t\t // ps.setInt(1, espe.getCodigo());\r\n\t\t // ps.setString(2, espe.getNombre());\r\n\t\t \t\t \r\n\t\t \r\n\t\t// ps.executeUpdate();\r\n\t\t \r\n\t\t} catch (Exception e) {\r\n\t\t e.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tConexionBD.close(con);\r\n\t\t}\r\n\t\t}", "private void depurarElementos() {\n\t\tfor(int i=0; i<JuegoListener.elementos.size();i++){\n\t\t\tif (!JuegoListener.elementos.get(i).estaVivo())\n\t\t\t\tJuegoListener.elementos.remove(i);\n\t\t}\n\t\t\n\t}", "public void deleteProveedor(Proveedor proveedor) {\n\t\tdelete(proveedor);\n\t}", "public static void delete(String titulo) {\n\t\tif (pelisList.containsKey(titulo)) {\n\t\t\tSystem.out.println(\"Haz borrado \" + pelisList.remove(titulo) + \" de la cartelera\");\n\t\t} else {\n\t\t\tSystem.out.println(\"El título de esa película no está registrado\\nNo se ha realizado ninguna modificación\");\n\t\t}\n\t\twriteTxt(\"peliculas.txt\", pelisList);\n\t}", "public Integer DeletarTodos(){\n\n //REMOVENDO OS REGISTROS CADASTRADOS\n return databaseUtil.GetConexaoDataBase().delete(\"tb_log\",\"log_ID = log_ID\",null);\n\n }", "private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {\n String delete = TabelSiswa.getValueAt(baris, 1).toString();\n try{\n Statement stmt = koneksi.createStatement();\n String query = \"DELETE FROM pasien WHERE nis = '\" + delete + \"'\";\n int berhasil = stmt.executeUpdate(query);\n if(berhasil == 1){\n JOptionPane.showMessageDialog(null, \"Data berhasil dihapus\");\n dtm.getDataVector().removeAllElements();\n showData();\n showStok();\n }else{\n JOptionPane.showMessageDialog(null, \"Data gagal dihapus\");\n }\n }catch(SQLException ex){\n ex.printStackTrace();\n JOptionPane.showMessageDialog(null, \"Terjadi kesalahan\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\r\n\tpublic void insertar() {\n\t\ttab_cuenta.eliminar();\r\n\t\t\r\n\t\t\r\n\t}", "public boolean eliminarproducto(ProductoDTO c) {\r\n \r\n try {\r\n PreparedStatement ps;\r\n ps = conn.getConn().prepareStatement(SQL_DELETE);\r\n ps.setInt(1, c.getId());\r\n\r\n if (ps.executeUpdate() > 0) {\r\n\r\n JOptionPane.showMessageDialog(null, \"Prudcto eliminado exitosamente\");\r\n return true;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n conn.cerrarconexion();\r\n }\r\n JOptionPane.showMessageDialog(null, \"No se ha podido registrar\");\r\n return false;\r\n\r\n }", "@Override\r\n\tpublic void eliminar(Long idRegistro) {\n\t\t\r\n\t}", "public void delete(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;", "public void removeByequip_id(long equip_id);", "void actualizarItemVentaEliminada(DetalleVentaJPA dv);", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\talunos.remove(indice);\n\t\t\t\t\n//LIMPAR OS CAMPOS\n\t\t\t\ttxtNome.setText(\"\");\n\t\t\t\ttxtNota1.setText(\"\");\n\t\t\t\ttxtNota2.setText(\"\");\n\t\t\t\t\n//CURSOR NO CAMPO NOME\n\t\t\t\ttxtNome.requestFocus();\n\t\t\t\t\n//ATUALIZAR DEFAULT TABLE MODEL\n\t\t\t\tdtm.setRowCount(0);\n\t\t\t\tfor (int i=0; i<alunos.size(); i++) {\n\t\t\t\t\tdtm.addRow(new Object[] {\n\t\t\t\t\t\talunos.get(i).getNome(),\n\t\t\t\t\t\talunos.get(i).getNota1(),\n\t\t\t\t\t\talunos.get(i).getNota2(),\n\t\t\t\t\t\talunos.get(i).getMedia(),\n\t\t\t\t\t\talunos.get(i).getSituacao()\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}", "public VistaBorrar() throws SQLException {\n initComponents();\n Conexion.getInstance();\n \n llenarTabla();\n \n //jTable1.setModel(defaultTableModel);\n //controladorListar = new ControladorListar();\n //ArrayList<Pelicula> listPelicula=controladorListar.getListadoPeliculaEliminar();\n //Object[] fila=new Object[2];\n //for(int x=0; x<listPelicula.size(); x++){\n // fila[0]=listPelicula.get(x).getCodigo();\n // fila[1]=listPelicula.get(x).getNombre();\n // defaultTableModel.addRow(fila);\n \n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Command\n\tpublic void eliminar(@BindingParam(\"documento\") TipoDocumento documentoSeleccionada){\n\n\t\tif (documentoSeleccionada == null) {\n\t\t\tClients.showNotification(\"Seleccione una opción de la lista.\");\n\t\t\treturn; \n\t\t}\n\n\t\tMessagebox.show(\"Desea eliminar el registro seleccionado?\", \"Confirmación de Eliminación\", Messagebox.YES | Messagebox.NO, Messagebox.QUESTION, new EventListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\tif (event.getName().equals(\"onYes\")) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\ttipoDocumentoDAO.getEntityManager().getTransaction().begin();\n\t\t\t\t\t\tdocumentoSeleccionada.setEstado(\"I\");\n\t\t\t\t\t\ttipoDocumentoDAO.getEntityManager().merge(documentoSeleccionada);\n\t\t\t\t\t\ttipoDocumentoDAO.getEntityManager().getTransaction().commit();;\n\t\t\t\t\t\t// Actualiza la lista\n\t\t\t\t\t\t//BindUtils.postGlobalCommand(null, null, \"Categoria.buscarPorPatron\", null);\n\t\t\t\t\t\tbuscar();\n\t\t\t\t\t\tClients.showNotification(\"Transaccion ejecutada con exito.\");\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\ttipoDocumentoDAO.getEntityManager().getTransaction().rollback();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\t\n\t}", "public void processEliminar() {\n }", "private void removerPontos(final String matricula, final int pontos) {\n firebase.child(\"Alunos/\" + matricula + \"/pontuacao\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n long qtdAtual = (long) dataSnapshot.getValue();\n if (qtdAtual >= pontos) {\n firebase.child(\"Alunos/\" + matricula + \"/pontuacao\").setValue(qtdAtual - pontos);\n Toast.makeText(getContext(), \"Pontuação removida com sucesso.\", Toast.LENGTH_SHORT).show();\n quantidade.setText(\"\");\n\n if (alunoEncontrado == null) {\n Log log = new Log(matricula, pontos);\n log.pontos(\"Remover\");\n } else {\n Log log = new Log(alunoEncontrado, pontos);\n log.pontos(\"Remover\");\n }\n } else {\n Toast.makeText(getContext(), \"Aluno com menor quantidade de pontos que o solicitado.\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@GetMapping(\"/misproductos/{id}/eliminar\")\n\tpublic String eliminar(@PathVariable Long id) {\n\t\tProducto p = productoServicio.findById(id);\n\t\tif (p.getCompra() == null)\n\t\t\tproductoServicio.borrar(p);\n\t\treturn \"redirect:/app/misproductos\";\n\t}", "@Override\r\n public void elminarVehiculo(String placa) {\n Connection conn = null;\r\n try{\r\n conn = Conexion.getConnection();\r\n String sql = \"delete from vehiculo where veh_placa=?\";\r\n PreparedStatement statement = conn.prepareStatement(sql);\r\n statement.setString(1, placa);\r\n int rowsDelete = statement.executeUpdate();\r\n if(rowsDelete > 0){\r\n JOptionPane.showMessageDialog(null, \"Registro eliminado de manera correcta\");\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(VehiculoDAOJDBCImpl.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void borrarTodo()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\tStatement st = conexion.createStatement();\r\n\t\tst.execute(\"DROP TABLE usuarios\");\r\n\t\tst.execute(\"DROP TABLE prestamos\");\r\n\t\tst.execute(\"DROP TABLE libros\");\r\n\t\t}\r\n\t\tcatch (SQLException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "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}" ]
[ "0.6581559", "0.64593303", "0.634427", "0.62885755", "0.59860116", "0.59680223", "0.59385103", "0.59112716", "0.5910446", "0.5880686", "0.58349365", "0.5820308", "0.5790192", "0.57665366", "0.57577246", "0.57533336", "0.5727747", "0.57160205", "0.5715315", "0.5709231", "0.5693458", "0.56934214", "0.5688852", "0.5663774", "0.56514996", "0.5647729", "0.5646899", "0.56283516", "0.56250966", "0.56113523", "0.5608683", "0.5604155", "0.55928123", "0.5580436", "0.55696243", "0.5545516", "0.5533631", "0.55156744", "0.5506301", "0.5505908", "0.5505689", "0.5503298", "0.5491702", "0.54912305", "0.5481292", "0.54705894", "0.5468324", "0.54591423", "0.5451624", "0.54434294", "0.5434706", "0.5432839", "0.5430743", "0.5429786", "0.5409561", "0.54087216", "0.53988373", "0.53987944", "0.5392454", "0.5382348", "0.53734636", "0.53716445", "0.5371642", "0.5367341", "0.535722", "0.5352802", "0.5333944", "0.53231275", "0.53183824", "0.53077674", "0.5293346", "0.52915865", "0.528853", "0.5276628", "0.5275074", "0.5273162", "0.5250576", "0.5243067", "0.5238508", "0.523632", "0.523576", "0.5232488", "0.522382", "0.5222019", "0.52199656", "0.5212412", "0.52111423", "0.5204579", "0.5197903", "0.51855314", "0.5178051", "0.51771027", "0.51678133", "0.5165361", "0.5162369", "0.5160019", "0.51546943", "0.51530236", "0.5147432", "0.51432365" ]
0.5552132
35
Retorna un unico registro en la tabla Productos_punto_venta que conicida con la primarykey especificada.
@Override public ProductosPuntoVenta findByPrimaryKey(ProductosPuntoVentaPk pk) throws ProductosPuntoVentaDaoException { return findByPrimaryKey(pk.getIdPuntoVenta(), pk.getIdProducto()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;", "ItoProduct selectByPrimaryKey(Integer id);", "public NominaPuesto findByPrimaryKey(int idPuesto) throws NominaPuestoDaoException;", "@Override\n public long getPrimaryKey() {\n return _partido.getPrimaryKey();\n }", "public ProductoPk createPk() {\r\n return new ProductoPk(idProducto);\r\n }", "Product selectByPrimaryKey(Long id);", "public NominaPuesto findByPrimaryKey(NominaPuestoPk pk) throws NominaPuestoDaoException;", "@Override\n public FecetProrrogaOrden findByPrimaryKey(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n List<FecetProrrogaOrden> list = getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(),\n idProrroga);\n return list.isEmpty() ? null : list.get(0);\n\n }", "Product selectByPrimaryKey(Integer id);", "EtpBase selectByPrimaryKey(String id);", "Tipologia selectByPrimaryKey(BigDecimal id);", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "GoodsPo selectByPrimaryKey(Long id);", "Prueba selectByPrimaryKey(Integer id);", "CTipoPersona selectByPrimaryKey(String idTipoPersona) throws SQLException;", "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "TRepairs selectByPrimaryKey(Integer id);", "OrderPO selectByPrimaryKey(Integer id);", "public Producto BuscarProducto(int id) {\n Producto nuevo = new Producto();\n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto where idproducto=\"+id+\";\");\n while(result.next()) {\n \n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return nuevo;\n }", "Movimiento selectByPrimaryKey(Integer idMovCta);", "public Tipo findByPrimaryKey(TipoPk pk) throws TipoDaoException;", "public ProveedorEntity getProveedor(Long id_proveedor){\n ProveedorEntity proveedor = proveedorPersistence.find(id_proveedor);\n if(proveedor == null){\n throw new IllegalArgumentException(\"El proveedor solicitado no existe\");\n }\n return proveedor;\n }", "public Profesor selectByPrimaryKey(Integer id) {\n Profesor key = new Profesor();\n key.setId(id);\n Profesor record = (Profesor) getSqlMapClientTemplate().queryForObject(\"tbl_profesor.ibatorgenerated_selectByPrimaryKey\", key);\n return record;\n }", "EventDetail selectByPrimaryKey(Long id);", "public static Evento obtenerEntidadPorId(int id){\r\n\t\tEvento evento = new Evento();\r\n\t\tString query = \"SELECT * FROM Evento WHERE id = '\" + id + \"'\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tConnection connection = ConexionMySQL.getConnection();\r\n\t\t\tStatement stmt = connection.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tevento.setId(rs.getInt(\"id\"));\r\n\t\t\t\tevento.setSociedadId(rs.getInt(\"sociedadId\"));\r\n\t\t\t\tevento.setNombre(rs.getString(\"nombre\"));\r\n\t\t\t\tevento.setDescripcion(rs.getString(\"descripcion\"));\r\n\t\t\t\tevento.setFechaInicio(rs.getDate(\"fechaInicio\"));\r\n\t\t\t\tevento.setFechaFin(rs.getDate(\"fechaFin\"));\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\treturn evento;\r\n\t}", "PfCombElementEvent selectByPrimaryKey(String id);", "public long getPrimaryKey() {\n\t\treturn _telefonoSolicitudProducto.getPrimaryKey();\n\t}", "UserPonumberGoods selectByPrimaryKey(String ponumberGoodsId);", "Pet selectByPrimaryKey(Integer petid);", "public Tipo findByPrimaryKey(Integer idTipo) throws TipoDaoException;", "Ltsprojectpo selectByPrimaryKey(Long id);", "@Query(value = \"SELECT * FROM produtos WHERE prd_id = ?\", nativeQuery = true)\r\n public ProdutosModel findOneById (Integer id);", "public int getIdProducto() {\n return idProducto;\n }", "CartDO selectByPrimaryKey(Integer id);", "@Override\n\tpublic Producto buscarIdProducto(Integer codigo) {\n\t\treturn productoDao.editarProducto(codigo);\n\t}", "public TipologiaStruttura findByPrimaryKey(TipologiaStrutturaPk pk) throws TipologiaStrutturaDaoException;", "PayLogInfoPo selectByPrimaryKey(Long id);", "@Override\n\tpublic Integer getId() {\n\t\treturn ofertaOpexId;\n\t}", "public Utente findByPrimaryKey(UtentePk pk) throws UtenteDaoException\n\t{\n\t\treturn findByPrimaryKey( pk.getUteId() );\n\t}", "public FecetProrrogaOrden findByPrimaryKey(FecetProrrogaOrdenPk pk) {\n return findByPrimaryKey(pk.getIdProrrogaOrden());\n }", "PurchasePayment selectByPrimaryKey(Long id);", "Especialidad getEspecialidadPorId(Integer especialidadId);", "public Product getProductByPrimaryKey(Integer tid)\r\n\t\t\tthrows DataAccessException {\n\t\treturn productDAO.getProductByPrimaryKey(tid);\r\n\t}", "Nutrition selectByPrimaryKey(Integer nutritionid);", "ProEmployee selectByPrimaryKey(String id);", "public Tblproductos findById(Integer idSucursal){\n em = getEntityManager();\n return em.find(Tblproductos.class, idSucursal);\n }", "@Query(value = \"SELECT * FROM proveedor WHERE id=:id\", nativeQuery = true)\n public Proveedor obtenerPorId(@Param(\"id\") int id);", "public String getProductoId() {\n\t\treturn productoId;\n\t}", "public SgfensPedidoProducto findByPrimaryKey(int idPedido, int idConcepto) throws SgfensPedidoProductoDaoException;", "@Id\n\t@GeneratedValue(strategy = GenerationType.IDENTITY, generator=\"TB_PRODUTO_ID_SEQ\")\n\t@SequenceGenerator(allocationSize=1, initialValue=1, name=\"TB_PRODUTO_ID_SEQ\", sequenceName=\"TB_PRODUTO_ID_SEQ\")\n\t@Column(name=\"id\",length=11, unique=true)\n\tpublic Integer getIdProduto() {\n\t\treturn idProduto;\n\t}", "@Override\r\n public int createDetalleventa(Detalleventa dv) {\r\n sql = \"INSERT INTO public.detalle_venta(id_venta, item, igv, sub_total, descuento, id_producto_stock, cantidad, precio_unit) \"\r\n + \"VALUES(\"+dv.getId_venta()+\",\"+dv.getItem()+\",\"+dv.getIgv()+\",\"+dv.getSub_total()+\",\"+dv.getDescuento()+\",\"+dv.getId_producto_stock()+\",\"+dv.getCantidad()+\", \"+dv.getPrecio_unit()+\")\";\r\n return cx.performKeys(sql);\r\n }", "Forumpost selectByPrimaryKey(Integer postid);", "Promo selectByPrimaryKey(Integer id);", "public Integer obterIdEmpresaPorRota(Rota rota) throws ErroRepositorioException;", "ProductSellerGoods selectByPrimaryKey(Integer productId);", "public static int crearEntidad(Evento evento) {\t\t\r\n\t\tint id = 0;\r\n\t\t\r\n\t\tString query = \r\n\t\t\t\t\"INSERT INTO Evento (sociedadID, nombre, descripcion, fechaInicio, \" +\r\n\t\t\t\t\"fechaFin) VALUES(\" +\r\n\t\t\t\t\"'\" + evento.getSociedadId()\t\t+ \"', \" +\r\n\t\t\t\t\"'\" + evento.getNombre()\t\t\t+ \"', \" +\r\n\t\t\t\t\"'\" + evento.getDescripcion()\t\t+ \"', \" +\r\n\t\t\t\t\"'\" + evento.getFechaInicio()\t\t+ \"', \" +\r\n\t\t\t\t\"'\" + evento.getFechaFin()\t\t\t+ \"')\";\r\n\t\ttry {\r\n\t\t\tConnection connection = ConexionMySQL.getConnection();\r\n\t\t\tStatement stmt = connection.createStatement();\r\n\t\t\tstmt.execute(query, Statement.RETURN_GENERATED_KEYS);\r\n\t\t\tResultSet rs = stmt.getGeneratedKeys();\r\n\t\t\t\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tid = rs.getInt(\"id\");\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn id;\r\n\t}", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}", "BpmInstanciaHistorica selectByPrimaryKey(Long idreg);", "@Override\n public Product read(int produktid) {\n Product productToReturn = new Product();\n try {\n PreparedStatement getSingleProdukt = conn.prepareStatement(\"SELECT * FROM produkter WHERE produktID=?\");\n getSingleProdukt.setInt(1, produktid);\n System.out.println(\"Vi er i read i linie 115\");\n ResultSet rs = getSingleProdukt.executeQuery();\n while (rs.next()) {\n productToReturn = new Product();\n productToReturn.setproduktID(rs.getInt(\"produktID\"));\n productToReturn.setNavn(rs.getString(2));\n productToReturn.setPris(rs.getDouble(3));\n productToReturn.setBeskrivelse(rs.getString(4));\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return productToReturn;\n //return null;\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "public PessoaVO(Long pk){\r\n\t\tsuper(pk);\r\n\t}", "public int getIdproducto() {\r\n\t\treturn idproducto;\r\n\t}", "NjProductTaticsRelation selectByPrimaryKey(String id);", "public Long getIdProveedor() {\r\n return idProveedor;\r\n }", "public CalendarioFecha obtenerPorEvento(Reservacion reservacion) throws Exception { \n\t \n\t\t CalendarioFecha datos = new CalendarioFecha(); \n\t\t Session em = sesionPostgres.getSessionFactory().openSession(); \t\n\t try { \t\n\t\t datos = (CalendarioFecha) em.createCriteria(CalendarioFecha.class).add(Restrictions.eq(\"reservacion\", reservacion))\n\t\t \t\t.add(Restrictions.eq(\"activo\", true)).uniqueResult(); \n\t } catch (Exception e) { \n\t \n\t throw new Exception(e.getMessage(),e.getCause());\n\t } finally { \n\t em.close(); \n\t } \n\t \n\t return datos; \n\t}", "PrhFree selectByPrimaryKey(Integer id);", "public CalendarioFecha obtenerPorEvento(Evento evento) throws Exception { \n\t \n\t\t CalendarioFecha datos = new CalendarioFecha(); \n\t\t Session em = sesionPostgres.getSessionFactory().openSession(); \t\n\t try { \t\n\t\t datos = (CalendarioFecha) em.createCriteria(CalendarioFecha.class).add(Restrictions.eq(\"evento\", evento))\n\t\t \t\t.add(Restrictions.eq(\"activo\", true)).uniqueResult(); \n\t } catch (Exception e) { \n\t \n\t throw new Exception(e.getMessage(),e.getCause());\n\t } finally { \n\t em.close(); \n\t } \n\t \n\t return datos; \n\t}", "public co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Bitacora_peticionLocal findByPrimaryKey(\n\t\tco.com.telefonica.atiempo.ejb.eb.Bitacora_peticionKey primaryKey)\n\t\tthrows javax.ejb.FinderException;", "@Override\n @Transactional\n public Producto findById(long id) {\n return productoDao.findById(id);\n }", "PineAlarm selectByPrimaryKey(Long pineAlarmId);", "VentaJPA obtenerVenta(int comprobante);", "@Override\n\tpublic TestPoEntity selectById(Integer pk) {\n\t\treturn null;\n\t}", "O obtener(PK id) throws DAOException;", "@Override\r\n public ProductosPuntoVentaPk insert(ProductosPuntoVenta dto)\r\n throws ProductosPuntoVentaDaoException {\r\n long t1 = System.currentTimeMillis();\r\n PreparedStatement stmt = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n stmt = userConn.prepareStatement(SQL_INSERT);\r\n int index = 1;\r\n stmt.setInt(index++, dto.getIdPuntoVenta());\r\n stmt.setInt(index++, dto.getIdProducto());\r\n stmt.setInt(index++, dto.getCantidad());\r\n System.out.println(\"Executing \" + SQL_INSERT + \" with DTO: \" + dto);\r\n int rows = stmt.executeUpdate();\r\n long t2 = System.currentTimeMillis();\r\n System.out.println(rows + \" rows affected (\" + (t2 - t1) + \" ms)\");\r\n reset(dto);\r\n return dto.createPk();\r\n }\r\n catch (SQLException e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(stmt);\r\n }\r\n }", "public Integer getIdProveedor() {\n return idProveedor;\n }", "PaymentTrade selectByPrimaryKey(String id);", "BasicEquipment selectByPrimaryKey(Integer id);", "public String getIdProduto() {\r\n\t\treturn idProduto;\r\n\t}", "@Override\r\n\tpublic PayRecord selectByPrimaryKey(Integer prid) {\n\t\treturn null;\r\n\t}", "public abstract java.lang.Long getId_causal_peticion();", "public Cliente findByPrimaryKey(ClientePk pk) throws ClienteDaoException;", "Cargo selectByPrimaryKey(Integer idCargo);", "@Override\n public Paciente procurarPorId(int id) {\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n Paciente paciente = em.find(Paciente.class, id);\n em.close();\n factory.close();\n return (paciente);\n }", "@Override\n public synchronized ComprobanteContable procesarComprobante(ComprobanteContable comprobante) throws CRUDException {\n Integer numero = getNextComprobantePK(comprobante.getFecha(), comprobante.getTipo());\n\n comprobante.setIdNumeroGestion(numero);\n comprobante.setFechaInsert(DateContable.getCurrentDate());\n //comprobante.setComprobanteContablePK(new ComprobanteContablePK(0, numero.getGestion()));\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(comprobante.getFecha(), DateContable.LATIN_AMERICA_FORMAT)));\n Integer idLibro = insert(comprobante);\n\n comprobante.setIdLibro(idLibro);\n\n return comprobante;\n\n }", "Notifiction selectByPrimaryKey(Long id);", "UcOrderGuestInfo selectByPrimaryKey(Long id);", "HuoDong selectByPrimaryKey(Integer id);", "@Override\n\tpublic long altaTransporte(Transporte transporte) {\n\t\treturn repositorio.save(transporte).getIdTransporte();\n\t\t\n\t\t//Emitir el cobre del transporte\n\t\t\n\t\t//Avisar al transportista para que recoja el producto\n\n\t}", "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 }", "int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;", "Payment selectByPrimaryKey(Long id);", "T getByPk(int key) throws PersistException;", "Sequipment selectByPrimaryKey(Integer id);", "public Tipousr findbyIdTipo(Long idTipoUsr){\n\t\t\t em.getTransaction().begin();\n\t\t\t Tipousr t= em.find(Tipousr.class, idTipoUsr);\n\t\t\t em.getTransaction().commit();\n\t\t\t return t;\n\t\t }", "Goods selectByPrimaryKey(String goodsId);", "Notice selectByPrimaryKey(Integer id);", "@Override\n\tpublic TrabajadorEmpresa fetchByPrimaryKey(Serializable primaryKey)\n\t\tthrows SystemException {\n\t\treturn fetchByPrimaryKey((String)primaryKey);\n\t}", "public Integer getId_inventario() {\r\n return id_inventario;\r\n }" ]
[ "0.6485974", "0.6030008", "0.58633125", "0.5725994", "0.5702908", "0.5675806", "0.5666095", "0.5642231", "0.56166106", "0.5577734", "0.5556208", "0.55513155", "0.55422217", "0.55172896", "0.5515629", "0.5476026", "0.54422253", "0.5373843", "0.53608316", "0.5359084", "0.5352642", "0.5350385", "0.53451276", "0.5334105", "0.5312742", "0.529717", "0.529302", "0.5290458", "0.5288325", "0.5284622", "0.5275285", "0.52589625", "0.52583915", "0.5255919", "0.5255541", "0.52473456", "0.52366847", "0.5236673", "0.5235891", "0.52176183", "0.5212945", "0.5208875", "0.5202698", "0.51984435", "0.51856476", "0.51855505", "0.51818156", "0.5178584", "0.5157303", "0.5156888", "0.51489836", "0.5148035", "0.5146869", "0.51404184", "0.51371485", "0.5130777", "0.512515", "0.51178783", "0.51162195", "0.50943977", "0.50898284", "0.5075718", "0.507558", "0.5073147", "0.50668323", "0.50655687", "0.5053648", "0.50459504", "0.504083", "0.50199956", "0.5006417", "0.50034845", "0.4995148", "0.4990118", "0.49893537", "0.49846765", "0.4978441", "0.49773487", "0.4976437", "0.4974372", "0.49724743", "0.49690986", "0.49688268", "0.4963976", "0.49562055", "0.49520847", "0.4949872", "0.49494404", "0.4944282", "0.49434432", "0.49423352", "0.49415553", "0.49408558", "0.49407426", "0.49299017", "0.49275437", "0.49258527", "0.49245563", "0.49216622", "0.49206448" ]
0.6093436
1
Retorna un registro de la tabla Productos_punto_venta que coincida con el criterio 'id_pdv = :idPuntoVenta AND id_producto = :idProducto'.
@Override public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta, Integer idProducto) throws ProductosPuntoVentaDaoException { ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT + " WHERE id_pdv = ? AND id_producto = ?", new Object[] { idPuntoVenta, idProducto }); return ret.length == 0 ? null : ret[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_pdv = ?\",\r\n new Object[] { idPuntoVenta });\r\n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(ProductosPuntoVentaPk pk)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByPrimaryKey(pk.getIdPuntoVenta(), pk.getIdProducto());\r\n }", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto findByPrimaryKey(SgfensPedidoProductoPk pk) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "public NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "public Venta(Producto producto,Cliente comprador,Cliente vendedor){\n this.fechaCompra=fechaCompra.now();\n this.comprador=comprador;\n this.vendedor=vendedor;\n this.producto=producto;\n \n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public SgfensPedidoProducto findByPrimaryKey(int idPedido, int idConcepto) throws SgfensPedidoProductoDaoException;", "@Override\n public FecetProrrogaOrden findByPrimaryKey(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(getTableName()).append(\" WHERE ID_PRORROGA_ORDEN = ?\");\n List<FecetProrrogaOrden> list = getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(),\n idProrroga);\n return list.isEmpty() ? null : list.get(0);\n\n }", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public boolean existeProducto(String p) throws DBException {\r\n\t\tboolean existe = false;\r\n\t\tString sentSQL = \"SELECT * FROM producto WHERE nombre ='\"+ p +\"'\";\r\n\t\ttry {\r\n\t\t\tStatement st = conexion.createStatement();\r\n\t\t\tResultSet rs = st.executeQuery(sentSQL);\r\n\t\t\tif(rs.next()) \r\n\t\t\t\texiste = true;\r\n\t\t\trs.close();\r\n\t\t\tst.close();\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\tthrow new DBException(\"No se ha podido buscar el produtco en la tabla Productos\");\r\n\t\t}\r\n\t\treturn existe;\r\n\t}", "public Prototipo encontrarPrototipoPorIdProducto(Producto id) {\r\n Prototipo pro;\r\n try {\r\n EntityManager em = getEntityManager();\r\n Query q = em.createNamedQuery(\"Prototipo.findByIdProducto\", Prototipo.class).setParameter(\"idProducto\", id);\r\n pro = (Prototipo) q.getSingleResult();\r\n } catch (Exception e) {\r\n pro = null;\r\n }\r\n return pro;\r\n }", "public VotoPregunta findVoto(Usuario user, Pregunta pregunta);", "@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 }", "@Override\n\tpublic List<AppointmentDto> getAppointmentByProduct(int productId) {\n\t\t// TODO Auto-generated method stub\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(FETCH_FOR_PRODUCT, (rs, rownnum)->{\n\t\t\t\treturn new AppointmentDto(rs.getInt(\"appointmentId\"), rs.getTime(\"startTime\"), rs.getTime(\"endTime\"), rs.getDate(\"date\"), rs.getInt(\"physicianId\"), rs.getInt(\"userId\"), rs.getInt(\"productId\"), rs.getString(\"confirmationStatus\"), rs.getString(\"zip\"), rs.getString(\"cancellationReason\"), rs.getString(\"additionalNotes\"), rs.getBoolean(\"hasMeetingUpdate\"),rs.getBoolean(\"hasMeetingExperienceFromSR\"),rs.getBoolean(\"hasMeetingExperienceFromPH\"), rs.getBoolean(\"hasPitch\"));\n\t\t\t}, productId);\n\t\t}catch(DataAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public ProveedorEntity getProveedor(Long id_proveedor){\n ProveedorEntity proveedor = proveedorPersistence.find(id_proveedor);\n if(proveedor == null){\n throw new IllegalArgumentException(\"El proveedor solicitado no existe\");\n }\n return proveedor;\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "private boolean existeCondicionTrabajoEspecifico(ConcursoPuestoAgr concursoPuestoAgr) {\r\n\t\tString query =\r\n\t\t\t\" SELECT * FROM planificacion.det_condicion_trabajo_especif \"\r\n\t\t\t\t+ \" where id_concurso_puesto_agr = \" + concursoPuestoAgr.getIdConcursoPuestoAgr()\r\n\t\t\t\t+ \" and tipo = 'GRUPO' \";\r\n\t\treturn seleccionUtilFormController.existeNative(query);\r\n\t}", "boolean agregarProducto(Producto p) {\n boolean hecho = false;\n try {\n operacion = ayudar.beginTransaction();\n ayudar.save(p);\n operacion.commit();\n } catch (Exception e) {\n operacion.rollback();\n System.out.println(e);\n }\n return hecho;\n }", "public NominaPuesto findByPrimaryKey(int idPuesto) throws NominaPuestoDaoException;", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "PromoModel getPromoByProductId(Integer ProductId);", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof DetalleOrdenCompraProductoPK)) {\r\n return false;\r\n }\r\n DetalleOrdenCompraProductoPK other = (DetalleOrdenCompraProductoPK) object;\r\n if (this.idOrdenCompra != other.idOrdenCompra) {\r\n return false;\r\n }\r\n if (this.idProducto != other.idProducto) {\r\n return false;\r\n }\r\n return true;\r\n }", "public BuscarProducto(AgregandoProductos ventanaPadre) {\n this.daoProductos = new ProductoJpaController();\n this.ventanaPadre = ventanaPadre;\n initComponents();\n this.setupComponents();\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public boolean inserirProposta(Proposta novaProposta) {\n\n conectarnoBanco();\n\n String sql = \"INSERT INTO proposta (propostaRealizada,valorProposta,id_usuario,id_projeto,id_client) values (?,?,?,?,?)\";\n\n try {\n pst = con.prepareStatement(sql);\n \n pst.setString(1, novaProposta.getPropostaRealizada());\n String prop = Float.toString(novaProposta.getValorProposta());\n pst.setString(2, prop);\n String usuario = Integer.toString(novaProposta.getIdUsuario());\n pst.setString(3, usuario);\n String proj = Integer.toString(novaProposta.getIdProjeto());\n pst.setString(4, proj);\n String cliente = Integer.toString(novaProposta.getIdCliente());\n pst.setString(5, cliente);\n pst.execute();\n\n sucesso = true;\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao inserir proposta = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return sucesso;\n }", "public boolean existe(Producto producto);", "public Producto(Producto p) {\r\n\t\tsuper();\r\n\t\tID = getIDnuevoProducto();\r\n\t\tsetNombre(p.getNombre());\r\n\t\tsetCantidad(p.getCantidad());\r\n\t\tsetEnVenta(p.isEnVenta());\r\n\t\tsetCaracteristicas(p.getCaracteristicas());\r\n\t\tsetCategoria(p.getCategoria());\r\n\t\tsetDescripcion(p.getDescripcion());\r\n\t\tsetPrecio(p.getPrecio());\r\n\t\tsetVendedor(p.getVendedor());\r\n\t}", "public Boolean regresarEstadoDelAjusteDetalle(Integer idAjusteProducto) {\n\t\ttry {\n\t\t\tInvAjusteProducto ipr = em.find(InvAjusteProducto.class, idAjusteProducto);\n\t\t\tif (ipr.getImpreso() == false)\n\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "public boolean procesarPedido(Pedido p) {\n try {\n this.controlPedido = new ControlPedido();\n bitacora.info(\"Registro Pedido Iniciado correctamente\");\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro Pedido por \" + ex.getMessage());\n } finally {\n return this.controlPedido.agregarUnPedido(p);\n }\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "@Override\r\n public void delete(ProductosPuntoVentaPk pk)\r\n throws ProductosPuntoVentaDaoException {\r\n long t1 = System.currentTimeMillis();\r\n PreparedStatement stmt = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n System.out.println(\"Executing \" + SQL_DELETE + \" with PK: \" + pk);\r\n stmt = userConn.prepareStatement(SQL_DELETE);\r\n if (pk.getIdPuntoVenta() != null && pk.getIdProducto() != null) {\r\n stmt.setInt(IDaoConstants.INT_ONE, pk.getIdPuntoVenta());\r\n stmt.setInt(IDaoConstants.INT_TWO,\r\n pk.getIdProducto().intValue());\r\n }\r\n else {\r\n stmt.setNull(IDaoConstants.INT_ONE, java.sql.Types.INTEGER);\r\n stmt.setNull(IDaoConstants.INT_TWO, java.sql.Types.INTEGER);\r\n }\r\n int rows = stmt.executeUpdate();\r\n long t2 = System.currentTimeMillis();\r\n System.out.println(rows + \" rows affected (\" + (t2 - t1) + \" ms)\");\r\n }\r\n catch (SQLException e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(stmt);\r\n }\r\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 }", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "@Override\n public List<FecetProrrogaOrden> findWhereIdProrrogaEquals(BigDecimal idProrroga) {\n\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" WHERE ID_PRORROGA_ORDEN = ? ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idProrroga);\n\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 }", "public void setProductoId(String productoId) {\n\t\tthis.productoId = productoId;\n\t}", "public static Posee insertPosee(Date fecha_inicio,ServicioAdicional serv_adicional,\n Producto producto){\n Posee miPosee = new Posee(fecha_inicio,serv_adicional,producto);\n miPosee.registrarPosee();\n \n return miPosee;\n }", "public ProduttoreDato(Semaforo pieno, Semaforo vuoto) {\n this.pieno = pieno;\n this.vuoto = vuoto;\n }", "public FecetProrrogaOrden findByPrimaryKey(FecetProrrogaOrdenPk pk) {\n return findByPrimaryKey(pk.getIdProrrogaOrden());\n }", "public SgfensPedidoProducto[] findWhereDescuentoPorcentajeEquals(double descuentoPorcentaje) throws SgfensPedidoProductoDaoException;", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "public ExistenciaMaq generar(final Producto producto,final Date fecha, final Long almacenId);", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Venta)) {\n return false;\n }\n Venta other = (Venta) object;\n if ((this.ventaPK == null && other.ventaPK != null) || (this.ventaPK != null && !this.ventaPK.equals(other.ventaPK))) {\n return false;\n }\n return true;\n }", "public List<Produit> searchProduitsByVendeur(String theVendeur);", "@Override\n\tpublic Produto pesquisar(Produto entidade) {\n\t\treturn null;\n\t}", "public SgfensPedidoProducto[] findWhereDescuentoMontoEquals(double descuentoMonto) throws SgfensPedidoProductoDaoException;", "public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }", "public List getPorPertenceAProduto(long id) throws DaoException {\n\t\tsetMontador(null);\n\t\tString sql;\n \tsql = \"select \" + camposOrdenadosJoin() + \" from \" + tabelaSelect() + \n outterJoinAgrupado() +\n \t\" where id_produto_pa = \" + id + orderByLista();\n \tsetMontador(getMontadorAgrupado());\n \treturn getListaSql(sql);\n\t}", "@Query(value = \"SELECT * FROM proveedor WHERE id=:id\", nativeQuery = true)\n public Proveedor obtenerPorId(@Param(\"id\") int id);", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public static List<DocumentoDetalleVo> ordenar(List<DocumentoDetalleVo> productos) {\n\t\tList<DocumentoDetalleVo> temp = new ArrayList<>();\n\t\tfor (DocumentoDetalleVo ddV : productos) {\n\t\t\tif (ddV.getProductoId().getVarios() != null && ddV.getProductoId().getVarios() != 1) {\n\t\t\t\ttemp.add(ddV);\n\t\t\t}\n\t\t}\n\t\tfor (DocumentoDetalleVo ddV : productos) {\n\t\t\tif (!temp.contains(ddV)) {\n\t\t\t\ttemp.add(ddV);\n\t\t\t}\n\t\t}\n\t\treturn temp;\n\t}", "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 VentanaProveedor(VentanaPrincipal v) {\n initComponents();\n v = ventanaPrincipal;\n cp = new ControladorProveedor();\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Producto)) {\n return false;\n }\n Producto other = (Producto) object;\n if ((this.productoPK == null && other.productoPK != null) || (this.productoPK != null && !this.productoPK.equals(other.productoPK))) {\n return false;\n }\n return true;\n }", "public boolean permisoDeCreacionDeTicket(Usuario usuario, ItemProducto itemProducto) {\n Calendar c = Calendar.getInstance();\n //Contrato contrato = this.contratoFacade.\n c.setTime(itemProducto.getContratonumero().getFechaDeSuscripcion());\n c.add(Calendar.YEAR, itemProducto.getContratonumero().getTiempoDeValidez());\n\n Date fechaDeVencimientoDeContrato = c.getTime();\n\n //Verificamos que el usuario pueda crear el ticket de soporte validando la fecha de vencimiento del contrato y que su cuenta se encuentre activa\n if (usuario.getActivo()) {\n return true;\n } else {\n return fechaDeVencimientoDeContrato.compareTo(Calendar.getInstance().getTime()) <= 0;\n }\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 String guardarTemporal(Proveedor p) {\n proTemporal = p;\n return \"/RecepProveedorModificar.xhtml\";\n }", "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<ExistenciaMaq> buscarExistencias(final Producto producto,final Date fecha);", "public VentanaCrearProducto(ControladorProducto controladorProducto) {\n initComponents();\n this.controladorProducto=controladorProducto;\n txtCodigoCrearProducto.setText(String.valueOf(this.controladorProducto.getCodigo()));\n this.setSize(1000,600);\n }", "public Producto(String nombre, String descripcion, LocalDate fechaPubl, double pvp, Tag tagProducto, boolean stock,\n\t\t\tlong idProducto) {\n\t\tsuper();\n\t\tthis.nombre = nombre;\n\t\tthis.descripcion = descripcion;\n\t\tthis.fechaPubl = fechaPubl;\n\t\tthis.pvp = pvp;\n\t\tthis.tagProducto = tagProducto;\n\t\tthis.stock = stock;\n\t\tthis.idProducto = idProducto;\n\t}", "VentaJPA obtenerVenta(int comprobante);", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Produto)) {\n return false;\n }\n Produto other = (Produto) object;\n if ((this.proId == null && other.proId != null) || (this.proId != null && !this.proId.equals(other.proId))) {\n return false;\n }\n return true;\n }", "public Producto(String nombre, String vendedor, float precio, int cantidad,boolean enVenta, String descripcion,\r\n\t\t\tCaracteristica caracteristicas, Categoria categoria) {\r\n\t\tsuper();\r\n\t\tID = getIDnuevoProducto();\r\n\t\tsetNombre(nombre);\r\n\t\tsetCantidad(cantidad);\r\n\t\tsetEnVenta(enVenta);\r\n\t\tsetCaracteristicas(caracteristicas);\r\n\t\tsetCategoria(categoria);\r\n\t\tsetDescripcion(descripcion);\r\n\t\tsetPrecio(precio);\r\n\t\tsetVendedor(vendedor);\r\n\t}", "public Proveedor buscarProveedor(long id) {\n EntityManager em = getEntityManager();\n try {\n return em.find(Proveedor.class, id);\n } finally {\n em.close();\n }\n }", "public void aceptarPresupuesto(Long idPresupuesto) {\n\n Presupuesto presupuesto = buscarPresupuesto(idPresupuesto);\n\n EstadoPresupuesto estadoAceptado = estadoPresupuestoRepository\n .findByNombreEstado(globales.NOMBRE_ESTADO_PRESUPUESTO_ACEPTADO);\n if (presupuesto.getEstadoPresupuesto().equals(estadoAceptado)) {\n\n // este presupuesto ya fue aceptado\n // avisar por pantalla la fecha de aceptacion\n LocalDate fechaAceptado = presupuesto.getFechaAceptado();\n\n } else {\n // cambio el estado del presupuesto a aceptado y tambien del pedido de repuesto\n EstadoPresupuesto estadoCreado = estadoPresupuestoRepository\n .findByNombreEstado(globales.NOMBRE_ESTADO_PRESUPUESTO_CREADO);\n if (presupuesto.getEstadoPresupuesto().equals(estadoCreado)) {\n\n presupuesto.setEstadoPresupuesto(estadoAceptado);\n presupuesto.setFechaAceptado(LocalDate.now());\n\n EstadoPedidoRepuesto estadoPendienteDePedido = estadoPedidoRepuestoRepository\n .findByNombreEstado(globales.NOMBRE_ESTADO_PEDIDO_REPUESTO_PENDIENTE_DE_PEDIDO);\n\n PedidoRepuesto pedido = pedidoRepuestoRepository.findByPresupuesto(presupuesto);\n\n pedido.setEstadoPedidoRepuesto(estadoPendienteDePedido);\n\n // GUARDAR\n pedidoRepuestoRepository.save(pedido);\n }\n }\n }", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public Producto BuscarProducto(int id) {\n Producto nuevo = new Producto();\n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto where idproducto=\"+id+\";\");\n while(result.next()) {\n \n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return nuevo;\n }", "List<FecetDocExpediente> findWhereIdPropuestaEquals(BigDecimal idPropuesta);", "public Produto buscaPorId(int idProduto) throws NullPointerException {\r\n for (Produto produto : this.produtos) {\r\n if (produto.getId() == idProduto) {\r\n return produto;\r\n }\r\n }\r\n //Joga a exceção pois o método precisa retornar um produto caso seja digitado um id de produto que exista\r\n //caso desse errado teria que ser retorna um produto null e isso é feio e teria que ser trado fora\r\n //com a exceção fica melhor de se entender o que aconteceu\r\n throw new NullPointerException();\r\n }", "private void sumarTotalVenta(int cantidad, double precioProducto) {\r\n\t\tdouble valorProductos = cantidad * precioProducto;\r\n\t\ttotalVenta += valorProductos;\r\n\t}", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "@Override\r\n public ProductosPuntoVentaPk insert(ProductosPuntoVenta dto)\r\n throws ProductosPuntoVentaDaoException {\r\n long t1 = System.currentTimeMillis();\r\n PreparedStatement stmt = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n stmt = userConn.prepareStatement(SQL_INSERT);\r\n int index = 1;\r\n stmt.setInt(index++, dto.getIdPuntoVenta());\r\n stmt.setInt(index++, dto.getIdProducto());\r\n stmt.setInt(index++, dto.getCantidad());\r\n System.out.println(\"Executing \" + SQL_INSERT + \" with DTO: \" + dto);\r\n int rows = stmt.executeUpdate();\r\n long t2 = System.currentTimeMillis();\r\n System.out.println(rows + \" rows affected (\" + (t2 - t1) + \" ms)\");\r\n reset(dto);\r\n return dto.createPk();\r\n }\r\n catch (SQLException e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(stmt);\r\n }\r\n }", "@Override\n\tpublic PromotionEntity getByProductId(int appId, int productId) {\n\t\treturn promotionDao.getByProductId(appId,productId);\n\t}", "@Override\n public List<FecetProrrogaOrden> findWhereIdEstatusIdOrdenEquals(final BigDecimal estado, BigDecimal idOrden) {\n StringBuilder query = new StringBuilder();\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName());\n query.append(\" WHERE ID_ORDEN = ? AND ID_ESTATUS = ? \");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper(), idOrden, estado);\n }", "public boolean inserir(Professor p) throws SQLException{\n\t\tboolean inseriu = false;\n\t\tString query = \"INSERT INTO deinfo.professor(CPF_PROF, EXTERNO, IES, TITULACAO, DEPAT_PROF) values(?,?,?,?,?)\";\n\t\ttry{\n\t\t\tPreparedStatement smt = bancoConnect.retornoStatement(query);\n\t\t\tsmt.setString(1, p.getCpf());\n\t\t\tsmt.setString(2, p.getIes());\n\t\t\tsmt.setString(3, p.getTitulo());\n\t\t\tsmt.setInt(4, p.getDepartamento().getId());\n\t\t\tsmt.execute();\n\t\t\tinseriu = true;\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn inseriu;\n\t}", "@Override\r\n public int createDetalleventa(Detalleventa dv) {\r\n sql = \"INSERT INTO public.detalle_venta(id_venta, item, igv, sub_total, descuento, id_producto_stock, cantidad, precio_unit) \"\r\n + \"VALUES(\"+dv.getId_venta()+\",\"+dv.getItem()+\",\"+dv.getIgv()+\",\"+dv.getSub_total()+\",\"+dv.getDescuento()+\",\"+dv.getId_producto_stock()+\",\"+dv.getCantidad()+\", \"+dv.getPrecio_unit()+\")\";\r\n return cx.performKeys(sql);\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Serviciosxempproveedoras)) {\r\n return false;\r\n }\r\n Serviciosxempproveedoras other = (Serviciosxempproveedoras) object;\r\n if ((this.idServiciosxEmpProveedoras == null && other.idServiciosxEmpProveedoras != null) || (this.idServiciosxEmpProveedoras != null && !this.idServiciosxEmpProveedoras.equals(other.idServiciosxEmpProveedoras))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "ConsultaDto<ProdutorVO> obterByNomeApelido(String nomeApelido, Integer idInstituicao, int pagina, int tamanhoPagina, Boolean filtrarCategoriaAtiva) throws BancoobException;", "CTipoPersona selectByPrimaryKey(String idTipoPersona) throws SQLException;", "public void guardarProductosVendidos() {\n try {\n //Si hay datos los guardamos...\n if (!productosVendidos.isEmpty()) {\n /****** Serialización de los objetos ******/\n //Serialización de los productosVendidos\n FileOutputStream archivo = new FileOutputStream(\"productosVendidos\"+this.getCorreo()+\".dat\");\n ObjectOutputStream guardar= new ObjectOutputStream(archivo);\n //guardamos el array de personas\n guardar.writeObject(productosVendidos);\n archivo.close();\n } else {\n System.out.println(\"Error: No hay datos...\");\n }\n\n } catch (IOException ioe) {\n System.out.println(\"ERROR: \" + ioe.getMessage());\n } catch (Exception e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n }", "@Override\n\tpublic Servicos pesquisar(int idServicos) throws SQLException {\n\t\treturn null;\n\t}", "public Product searchId(int idProduc) {\n\t\tSession session = getSessionFactory().openSession();\n\t\treturn null;\n\t}", "@ManyToOne\r\n\t@JoinColumn(name=\"idpouchproceso\")\r\n\tpublic PouchProceso getPouchProceso() {\r\n\t\treturn this.pouchProceso;\r\n\t}", "public Cliente[] findWhereIdVendedorConsignaEquals(int idVendedorConsigna) throws ClienteDaoException;", "@Override\n\t@Transactional(readOnly=true)\n\tpublic boolean isProductAvailavle(String productId) {\n\t\treturn true;\n\t}" ]
[ "0.67820287", "0.6508345", "0.64863247", "0.604925", "0.59435016", "0.58970404", "0.57372725", "0.5644121", "0.5643421", "0.55544376", "0.5542547", "0.55404633", "0.55386066", "0.5524111", "0.54342854", "0.53887993", "0.5361677", "0.53573567", "0.5299196", "0.5292414", "0.5291678", "0.5267324", "0.5229263", "0.52291614", "0.5219584", "0.52118737", "0.5207947", "0.5199782", "0.5184636", "0.516996", "0.5166798", "0.5161115", "0.5160212", "0.51322687", "0.5132268", "0.5121578", "0.5118203", "0.511773", "0.5110691", "0.50932074", "0.5081107", "0.50798255", "0.5066153", "0.50610775", "0.50551564", "0.5042915", "0.504109", "0.5037138", "0.50269455", "0.5022743", "0.5010997", "0.5003764", "0.5002209", "0.49943122", "0.4993512", "0.49926603", "0.4985426", "0.49758053", "0.49690655", "0.49570054", "0.49523604", "0.4941434", "0.49363133", "0.4930247", "0.4922958", "0.49094102", "0.4901537", "0.48785606", "0.48762512", "0.48706913", "0.48687413", "0.48662654", "0.48636815", "0.486274", "0.4858362", "0.48509532", "0.48499432", "0.4842238", "0.48415333", "0.48395464", "0.48329642", "0.48228428", "0.4810912", "0.48034516", "0.48020938", "0.4795614", "0.4793122", "0.47901115", "0.47869518", "0.4785706", "0.4784758", "0.47835475", "0.47824693", "0.4778654", "0.4777", "0.47756308", "0.4774172", "0.47674498", "0.4761799", "0.47612974" ]
0.7398575
0
Retorna todas las filas de la tabla Productos_punto_venta.
@Override public ProductosPuntoVenta[] findAll() throws ProductosPuntoVentaDaoException { return findByDynamicSelect(SQL_SELECT + " ORDER BY id_pdv", null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private DefaultTableModel getDatos3(){\n String folio = String.valueOf(venta.ns);\n //consulta sql\n String SQL_SELECT = \"SELECT p.Nombres,dv.Cantidad,dv.PrecioVenta FROM ventas v JOIN detalle_ventas dv ON v.IdVentas=dv.IdVentas JOIN producto p ON p.IdProducto=dv.IdProducto WHERE v.NumeroSerie = \"+folio+\"\";\n try {\n setTitutlos3();\n ps = con.getConnection().prepareStatement(SQL_SELECT);\n RS = ps.executeQuery();\n Object[] fila = new Object[3];\n while (RS.next()){\n fila[0] = RS.getString(1);\n fila[1] = RS.getInt(2);\n fila[2] = RS.getDouble(3);\n DT.addRow(fila);\n }\n //System.out.println(\"si hizo el desmadre\");\n } catch (SQLException e) {\n System.out.println(\"error en la tabla de ticket\");\n }\n \n return DT;\n \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 }", "public List<Talla> tallasProducto(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Talla> lista = new ArrayList<Talla>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idtalla, t.nombre, t.observacion FROM conftbc_talla t \"\n\t\t\t\t\t+ \" INNER JOIN conftbc_producto p ON t.idcategoria = p.idcategoria WHERE p.idproducto = \"+producto.getIdproducto();\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tTalla talla = new Talla();\n\t\t\t\ttalla.setIdtalla(rs.getInt(\"idtalla\"));\n\t\t\t\ttalla.setNombre(rs.getString(\"nombre\"));\n\t\t\t\ttalla.setObservacion(rs.getString(\"observacion\"));\n\t\t\t\tlista.add(talla);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public ArrayList<Vector<Object>> recuperaTablaFacturas(String filtro) {\r\n\t\tArrayList<Vector<Object>> tableData = null;\r\n\t\tArrayList<Factura> lista = recuperaFacturaParaTabla(filtro);\r\n\t\ttableData = new ArrayList<>();\r\n\t\tfor (Factura factura : lista) {\r\n\t\t\tVector<Object> filaData = new Vector<>();\r\n\t\t\tfilaData.add(factura);\r\n\t\t\tfilaData.add(factura.getFecha());\r\n\t\t\tfilaData.add(factura.getCliente().toString());\r\n\t\t\tfilaData.add(factura.getImpTotal());\r\n\t\t\tfilaData.add(factura.isCobrada());\r\n\t\t\ttableData.add(filaData);\r\n\t\t}\r\n\t\treturn tableData;\r\n\t}", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "private void establecerTablaPlatillos() {\n Object[] columnas = {\"Platillo\", \"Cantidad\", \"Costo\"};\n Object[][] modelo = new Object[platillosAVender.size()][3];\n int x = 0;\n\n for (VentaPlatillo ventaPlatillo : platillosAVender) {\n\n modelo[x][0] = ventaPlatillo.getPlatillo().getNombre();\n modelo[x][1] = ventaPlatillo.getCantidad();\n modelo[x][2] = ventaPlatillo.getCosto();\n x++;\n }\n // Se establece el modelo en la tabla con los datos\n tablaPlatillosAVender.setDefaultEditor(Object.class, null);\n tablaPlatillosAVender.setModel(new DefaultTableModel(modelo, columnas));\n tablaPlatillosAVender.setCellSelectionEnabled(false);\n tablaPlatillosAVender.setRowSelectionAllowed(false);\n txtTotal.setText(total + \"\");\n }", "public void getProdotti() {\r\n\t\tprodotti = ac.getProdotti();\r\n\r\n\t\t//la tabella sara' non nulla quando sara' caricato il file VisualizzaLog.fxml\r\n\t\tif(tabellaProdotti != null) {\r\n\t\t\tcodiceCol.setCellValueFactory(new PropertyValueFactory<Prodotto, Integer>(\"codiceInteger\"));\r\n\t prodottoCol.setCellValueFactory(new PropertyValueFactory<Prodotto, String>(\"nome\"));\r\n\t descCol.setCellValueFactory(new PropertyValueFactory<Prodotto, String>(\"descrizione\"));\r\n\t prezzoCol.setCellValueFactory(new PropertyValueFactory<Prodotto, Float>(\"prezzoFloat\"));\r\n\t disponibilitaCol.setCellValueFactory(new PropertyValueFactory<Prodotto, Integer>(\"disponibilitaInteger\"));\r\n\t \r\n\t Collections.sort(prodotti);\r\n\t tabellaProdotti.getItems().setAll(prodotti);\t \r\n\t tabellaProdotti.setOnMouseClicked(e -> {\r\n\t \tif(tabellaProdotti.getSelectionModel().getSelectedItem() != null)\r\n\t \t\taggiornaQuantita(tabellaProdotti.getSelectionModel().getSelectedItem().getDisponibilita());\r\n\t });\r\n\t\t}\r\n\t}", "public List<TabelaFrete> getFreightPriceTable(Long codigoTransportadora, String localidade) \n\t{\n\t\tList<TabelaFrete> tabelaFretes = new ArrayList<>();\n\n\t\tjdbcCall = new SimpleJdbcCall(jdbcTemplate).withSchemaName(\"PROCAPI\")\n\t\t\t\t.withCatalogName(\"PROCAPI_JQT_GKO_INTEGRATION\").withProcedureName(\"PRC_LE_TABELA_PRECO\")\n\t\t\t\t.withoutProcedureColumnMetaDataAccess()\n\t\t\t\t.declareParameters(new SqlParameter(\"P_COD_TRANSPORTADORA\", OracleTypes.NUMBER),\n\t\t\t\t\t\tnew SqlParameter(\"P_LOCALIDADE\", OracleTypes.VARCHAR),\n\t\t\t\t\t\tnew SqlOutParameter(\"X_PRICE_TABS\", OracleTypes.CURSOR,\n\t\t\t\t\t\t\t\tBeanPropertyRowMapper.newInstance(TabelaFrete.class)),\n\t\t\t\t\t\tnew SqlOutParameter(\"W_STS_CODE\", OracleTypes.VARCHAR),\n\t\t\t\t\t\tnew SqlOutParameter(\"W_MSG\", OracleTypes.VARCHAR));\n\n\t\tSqlParameterSource inPutParameters = new MapSqlParameterSource()\n\t\t\t\t.addValue(\"P_COD_TRANSPORTADORA\", codigoTransportadora).addValue(\"P_LOCALIDADE\", localidade);\n\n\t\ttabelaFretes = jdbcCall.executeObject(List.class, inPutParameters);\n\n\t\treturn tabelaFretes;\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}", "public List<Tipo> getTiposOrdenadosNumerosEventosDecrescente() {\n\t\tList<Tipo> listaOrdenada = new ArrayList<Tipo>();\n\n\t\ttry {\n\t\t\tverificaTiposOrdenados(listaOrdenada);\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"[ERRO] Arquivo não encontrado no caminho: '\" + ARQUIVO_CSV + \"'\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"[ERRO] Erro ao ler arquivo csv.\");\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tfechaBuffer();\n\t\t}\n\t\treturn listaOrdenada;\n\t}", "public List<Talla> obtenTallasDeModelo(Modelo modelo) {\r\n try {\r\n FacAdmInventario admInventario = new FacAdmInventario();\r\n return admInventario.obtenTallasDeModelo(modelo);\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }", "public List<Fuente> obtenerListaFuentes() {\n\t\tString etiqueta = \"\";\n\t\tint id = 0;\n\t\tList<Fuente> listaFuentes = new ArrayList<Fuente>();\n\n\t\ttry {\n\n\t\t\trs = stmt.executeQuery(\"SELECT IDFUENTE, NOMBRE FROM FUENTE\");\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tid = rs.getInt(\"IDFUENTE\");\n\t\t\t\tetiqueta = rs.getString(\"NOMBRE\");\n\t\t\t\tFuente f = new Fuente(etiqueta, id, \"\", \"\");\n\t\t\t\tlistaFuentes.add(f);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"No es posible recuperar la lista de fuentes\");\n\n\t\t}\n\n\t\treturn listaFuentes;\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 ArrayList<Producto> ListaProductos() {\n ArrayList<Producto> list = new ArrayList<Producto>();\n \n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto;\");\n while(result.next()) {\n Producto nuevo = new Producto();\n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n list.add(nuevo);\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return list;\n }", "public void listar_mais_vendeu(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisVendidas.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisVendeu(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal_vendido()});\n }\n \n \n }", "public Vector listaTitulaciones()\n {\n try\n {\n\n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM titulaciones WHERE activa='s'\";\n\n //Se crea un vector de asignaturas\n Vector vectorTitulaciones = new Vector();\n\n //Se ejecuta la query\n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n\n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n titulacion titulacion = new titulacion();\n\n titulacion.setCodigo(resultado.getString(\"codigo\"));\n titulacion.setTitulacion(resultado.getString(\"titulacion\"));\n\n //Se añade la asignatura al vector de asignaturas\n vectorTitulaciones.add(titulacion);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorTitulaciones;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a las titulaciones de la Base de Datos: \"+e.getMessage());\n return null;\n }\n }", "public void llenadoDeTablas() {\n /**\n *\n * creaccion de la tabla de de titulos \n */\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Bitacora\");\n modelo.addColumn(\"Usuario\");\n modelo.addColumn(\"Fecha\");\n modelo.addColumn(\"Hora\");\n modelo.addColumn(\"Ip\");\n modelo.addColumn(\"host\");\n \n modelo.addColumn(\"Accion\");\n modelo.addColumn(\"Codigo Aplicacion\");\n modelo.addColumn(\"Modulo\");\n /**\n *\n * instaciamiento de las las clases Bitacora y BiracoraDAO\n * intaciamiento de la clases con el llenado de tablas\n */\n BitacoraDao BicDAO = new BitacoraDao();\n List<Bitacora> usuario = BicDAO.select();\n JtProductos1.setModel(modelo);\n String[] dato = new String[9];\n for (int i = 0; i < usuario.size(); i++) {\n dato[0] = usuario.get(i).getId_Bitacora();\n dato[1] = usuario.get(i).getId_Usuario();\n dato[2] = usuario.get(i).getFecha();\n dato[3] = usuario.get(i).getHora();\n dato[4] = usuario.get(i).getHost();\n dato[5] = usuario.get(i).getIp();\n dato[6] = usuario.get(i).getAccion();\n dato[7] = usuario.get(i).getCodigoAplicacion();\n dato[8] = usuario.get(i).getModulo();\n \n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }}", "private TableModel getTabelaProduto() {\r\n\t\tString[] columnNames = { \"id_c\", \"nome\", \"telefone\", \"endereco\", \"cidade\", \"estado\", \"email\", \"genero\" };\r\n\r\n\t\tObject[][] dados = new Object[listacliente.size()][8];\r\n\t\tfor (int i = 0; i < listacliente.size(); i++) {\r\n\t\t\tint x = 0;\r\n\t\t\tdados[i][x++] = listacliente.get(i).getId();\r\n\t\t\tdados[i][x++] = listacliente.get(i).getNome();\r\n\t\t\tdados[i][x++] = listacliente.get(i).getTelefone();\r\n\t\t\tdados[i][x++] = listacliente.get(i).getEndereco();\r\n\t\t\tdados[i][x++] = listacliente.get(i).getCidade();\r\n\t\t\tdados[i][x++] = listacliente.get(i).getEstado().getNome();\r\n\t\t\tdados[i][x++] = listacliente.get(i).getEmail();\r\n\t\t\tdados[i][x++] = listacliente.get(i).getGenero().getNome();\r\n\t\t}\r\n\r\n\t\treturn new DefaultTableModel(dados, columnNames);\r\n\r\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 }", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "public BaseDatosProductos iniciarProductos() {\n\t\tBaseDatosProductos baseDatosProductos = new BaseDatosProductos();\n\t\t// construcion datos iniciales \n\t\tProductos Manzanas = new Productos(1, \"Manzanas\", 8000.0, 65);\n\t\tProductos Limones = new Productos(2, \"Limones\", 2300.0, 15);\n\t\tProductos Granadilla = new Productos(3, \"Granadilla\", 2500.0, 38);\n\t\tProductos Arandanos = new Productos(4, \"Arandanos\", 9300.0, 55);\n\t\tProductos Tomates = new Productos(5, \"Tomates\", 2100.0, 42);\n\t\tProductos Fresas = new Productos(6, \"Fresas\", 4100.0, 3);\n\t\tProductos Helado = new Productos(7, \"Helado\", 4500.0, 41);\n\t\tProductos Galletas = new Productos(8, \"Galletas\", 500.0, 8);\n\t\tProductos Chocolates = new Productos(9, \"Chocolates\", 3500.0, 806);\n\t\tProductos Jamon = new Productos(10, \"Jamon\", 15000.0, 10);\n\n\t\t\n\n\t\tbaseDatosProductos.agregar(Manzanas);\n\t\tbaseDatosProductos.agregar(Limones);\n\t\tbaseDatosProductos.agregar(Granadilla);\n\t\tbaseDatosProductos.agregar(Arandanos);\n\t\tbaseDatosProductos.agregar(Tomates);\n\t\tbaseDatosProductos.agregar(Fresas);\n\t\tbaseDatosProductos.agregar(Helado);\n\t\tbaseDatosProductos.agregar(Galletas);\n\t\tbaseDatosProductos.agregar(Chocolates);\n\t\tbaseDatosProductos.agregar(Jamon);\n\t\treturn baseDatosProductos;\n\t\t\n\t}", "public static void tablaPuntos(Mano[] jug){\n StringBuilder toret= new StringBuilder();\n for (int i = 0; i < jug.length; i++) {\n toret.append(jug[i].getNombre());\n toret.append(\": \\n\");\n toret.append(jug[i]);\n toret.append(\"\\nPuntos: \");\n toret.append(jug[i].getPuntuacion());\n toret.append(\"\\n\");\n }\n System.out.println(toret.toString());\n }", "public DefaultTableModel getTablaFutbolistas() {\n DefaultTableModel tablemodel = new DefaultTableModel();\n\n int registros = 0;\n String[] columNames = {\"Id\", \"NIF\", \"Nombre\", \"Apellidos\", \"Fecha nac.\", \"Nacionalidad\"};\n //obtenemos la cantidad de registros existentes en la tabla y se almacena en la variable \"registros\"\n //para formar la matriz de datos\n try {\n PreparedStatement pstm = this.getConnection().prepareStatement(\"SELECT count(*) as total FROM Futbolistas\");\n ResultSet res = pstm.executeQuery();\n res.next();\n registros = res.getInt(\"total\");\n close(res);\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n }\n //se crea una matriz con tantas filas y columnas que necesite\n Object[][] data = new String[registros][7];\n try {\n //realizamos la consulta sql y llenamos los datos en la matriz \"Object[][] data\"\n PreparedStatement pstm = this.getConnection().prepareStatement(\"SELECT * FROM Futbolistas\");\n ResultSet res = pstm.executeQuery();\n int i = 0;\n while (res.next()) {\n data[i][0] = res.getString(\"id_futbolista\");\n data[i][1] = res.getString(\"nif\");\n data[i][2] = res.getString(\"nombre\");\n data[i][3] = res.getString(\"apellidos\");\n data[i][4] = res.getString(\"fecha_nacimiento\");\n data[i][5] = res.getString(\"nacionalidad\");\n i++;\n }\n close(res);\n //se añade la matriz de datos en el DefaultTableModel\n tablemodel.setDataVector(data, columNames);\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n }\n return tablemodel;\n }", "public void popularTabela() {\n\n try {\n\n RelatorioRN relatorioRN = new RelatorioRN();\n\n ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos();\n\n javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel();\n dtm.fireTableDataChanged();\n dtm.setRowCount(0);\n\n for (PedidoVO pedidoVO : pedidos) {\n\n String[] linha = {\"\" + pedidoVO.getIdpedido(), \"\" + pedidoVO.getData(), \"\" + pedidoVO.getCliente(), \"\" + pedidoVO.getValor()};\n dtm.addRow(linha);\n }\n\n } catch (SQLException sqle) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + sqle.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n \n } catch (Exception e) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + e.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public void filtrarTablaNomProducto(JTable table, String filtro) throws Conexion.DataBaseException {\n String[] titulos = {\"Id Producto\", \"Nombre Producto\", \"Tipo\", \"Cantidad en Stock\", \"Descripción\", \"Proveedor\", \"Precio\"};\n String[] registros = new String[7];\n DefaultTableModel model = new DefaultTableModel(null, titulos);\n String sql = \"SELECT * FROM Productos WHERE name LIKE '%\" + filtro + \"%'\";\n try {\n con = conectar.getConnexion();\n ps = con.prepareStatement(sql);\n rs = ps.executeQuery();\n while (rs.next()) {\n registros[0] = rs.getString(\"idProducto\"); //como se llama el campo en la base de datos\n registros[1] = rs.getString(\"name\");\n registros[2] = rs.getString(\"type\");\n registros[3] = rs.getString(\"quantity\");\n registros[4] = rs.getString(\"description\");\n registros[5] = rs.getString(\"idProveedor\");\n registros[6] = rs.getString(\"price\");\n model.addRow(registros);\n }\n table.setModel(model);\n } catch (SQLException e) {\n System.out.println(\"Error al buscar los datos: \" + e.getMessage());\n }\n }", "public void buscarxdescrip() {\r\n try {\r\n modelo.setDescripcion(vista.jTbdescripcion.getText());//C.P.M le enviamos al modelo la descripcion y consultamos\r\n rs = modelo.Buscarxdescrip();//C.P.M cachamos el resultado de la consulta\r\n\r\n DefaultTableModel buscar = 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.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo a la tabla\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"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 columnas de la consulta\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con una dimencion igual a 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 vamos insertando los resultados dentor del arreglo\r\n }\r\n buscar.addRow(fila);//C.P.M y lo agregamos como una nueva fila a la tabla\r\n }\r\n\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar producto por descripcion\");\r\n }\r\n }", "public void buscarproducto() {\r\n try {\r\n modelo.setNombre(vista.jTbnombre2.getText());//C.P.M le mandamos al modelo el nombre del producto\r\n rs = modelo.Buscar();//C.P.M obtenemos el resultado del modelos\r\n if (rs.equals(\"\")) {//C.P.M en caso de que el resultado venga vacio notificamos a el usuario que no encontro el producto\r\n JOptionPane.showMessageDialog(null, \"No se encontro: \" + vista.jTbnombre2.getText() + \" en la base de datos.\");\r\n }\r\n //C.P.M Para establecer el modelo al JTable\r\n DefaultTableModel buscar = new DefaultTableModel() {\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M Aqui le decimos que no seran editables los campos de la tabla\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M Auui 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 el resultado \r\n Object[] fila = new Object[cantidadColumnas];//C.P.M Creamos un objeto con el numero de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recoremos ese vector\r\n fila[i] = rs.getObject(i + 1);//C.P.M Aqui vamos insertando la informacion obtenida de la base de datos\r\n }\r\n buscar.addRow(fila);//C.P.M y agregamos el arreglo como una nueva fila a la tabla\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurio un error al buscar el producto\");\r\n }\r\n\r\n }", "public List<SistemaFazendaModel> listaTudo(){\n\t\treturn this.session.createCriteria(SistemaFazendaModel.class).list();\n\t}", "private TableModel getTableModelProduto() {\n\t\tString[] columnNames = { \"cod_p\", \"cod_barra\", \"categoria\", \"descricao\", \"unidade\", \"custo\", \"marge_lucro\" };\n\n\t\tObject[][] data = new Object[listaP.size()][7];\n\t\tfor (int i = 0; i < listaP.size(); i++) {\n\t\t\tint j = 0;\n\t\t\tdata[i][j++] = Long.valueOf(listaP.get(i).getCod());\n\t\t\tdata[i][j++] = listaP.get(i).getCodBarra();\n\t\t\tdata[i][j++] = listaP.get(i).getCategoria();\n\t\t\tdata[i][j++] = listaP.get(i).getDescricao();\n\t\t\tdata[i][j++] = listaP.get(i).getUnidade();\n\t\t\tdata[i][j++] = listaP.get(i).getCusto();\n\t\t\tdata[i][j++] = listaP.get(i).getMargenLucro();\n\t\t}\n\t\treturn new DefaultTableModel(data, columnNames);\n\t}", "private JTable itensNaoPagos() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT cod_item_d, nome_item_d, valor_item_d, data_vencimento_item_d FROM Item_despesa WHERE vencimento_item_d = '0'\";\n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Item de despesa\", \"Valor total\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t \n\t while (rs.next()){\n\t\t linhas.add(new Object[]{rs.getString(\"nome_item_d\"),rs.getString(\"valor_item_d\"),rs.getString(\"data_vencimento_item_d\"), \"Pagar\", rs.getString(\"cod_item_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"itemPedido\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\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 }", "private JTable itensNaoRecebidos() {\n\t\tinitConexao();\t\t\n try {\t \n\t String select = \"SELECT cod_item_r, nome_item_r, valor_item_r FROM Item_receita WHERE recebimento_item_r = '0'\";\n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Item de receita\", \"Valor total\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t while (rs.next()){\n\t\t linhas.add(new Object[]{rs.getString(\"nome_item_r\"),rs.getString(\"valor_item_r\"),\"Receber\", rs.getString(\"cod_item_r\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 2, \"itemNaoRecebido\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "public DefaultTableModel getTablaFutbolistasPersonalizada(String nombre) {\n DefaultTableModel tablemodel = new DefaultTableModel();\n int registros = 0;\n String[] columNames = {\"Id\", \"NIF\", \"Nombre\", \"Apellidos\", \"Fecha nac.\", \"Nacionalidad\", \"Temporada\"};\n //obtenemos la cantidad de registros existentes en la tabla y se almacena en la variable \"registros\"\n //para formar la matriz de datos\n try {\n PreparedStatement pstm = this.getConnection().prepareStatement(\"SELECT count(*) as total FROM Futbolistas\");\n ResultSet res = pstm.executeQuery();\n res.next();\n registros = res.getInt(\"total\");\n close(res);\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n }\n //se crea una matriz con tantas filas y columnas que necesite\n Object[][] data = new String[registros][8];\n try {\n //realizamos la llamada al procedimiento de la bd y llenamos los datos en la matriz \"Object[][] data\"\n PreparedStatement pstm = this.getConnection().prepareStatement(\"{call buscarJugadores(?)}\");\n pstm.setString(1, nombre);\n ResultSet res = pstm.executeQuery();\n int i = 0;\n while (res.next()) {\n data[i][0] = res.getString(\"id_futbolista\");\n data[i][1] = res.getString(\"nif\");\n data[i][2] = res.getString(\"nombre\");\n data[i][3] = res.getString(\"apellidos\");\n data[i][4] = res.getString(\"fecha_nacimiento\");\n data[i][5] = res.getString(\"nacionalidad\");\n data[i][6] = res.getString(\"temporada\");\n i++;\n }\n close(res);\n //se añade la matriz de datos en el DefaultTableModel\n tablemodel.setDataVector(data, columNames);\n } catch (SQLException e) {\n System.err.println(e.getMessage());\n }\n return tablemodel;\n }", "public void PreencherTabela() throws SQLException {\n try (Connection connection = ConnectionFactory.getConnection()) {\n String[] colunas = new String[]{\"ID\", \"Nome\", \"Nomenclatura\", \"Quantidade\"};\n ArrayList dados = new ArrayList();\n for (ViewProdutoPedido v : viewProdutoPedidos) {\n dados.add(new Object[]{v.getId(), v.getNome(), v.getNomenclatura(), v.getQuantidade()});\n }\n ModeloTabela modelo = new ModeloTabela(dados, colunas);\n jTableItensPedido.setModel(modelo);\n jTableItensPedido.setRowSorter(new TableRowSorter(modelo));\n jTableItensPedido.getColumnModel().getColumn(0).setPreferredWidth(2);\n jTableItensPedido.getColumnModel().getColumn(0).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(1).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(1).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(2).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(2).setResizable(false);\n jTableItensPedido.getColumnModel().getColumn(3).setPreferredWidth(20);\n jTableItensPedido.getColumnModel().getColumn(3).setResizable(false);\n\n }\n }", "private JTable getTablePacientes() {\n\t\t\n\t\t try {\n\t \t ConnectDatabase db = new ConnectDatabase();\n\t\t\t\tResultSet rs = db.sqlstatment().executeQuery(\"SELECT * FROM PACIENTE WHERE NOMBRE LIKE '%\"+nombre.getText()+\"%' AND APELLIDO LIKE '%\"+apellido.getText()+\"%'AND DNI LIKE '%\"+dni.getText()+\"%'\");\n\t\t\t\tObject[] transf = QueryToTable.getSingle().queryToTable(rs);\n\t\t\t\treturn table = new JTable(new DefaultTableModel((Vector<Vector<Object>>)transf[0], (Vector<String>)transf[1]));\t\t\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn table;\n\t}", "public List<Tipousr> findAllTipos(){\n\t\t List<Tipousr> listado;\n\t\t Query q;\n\t\t em.getTransaction().begin();\n\t\t q=em.createQuery(\"SELECT u FROM Tipousr u ORDER BY u.idTipousr\");\n\t\t listado= q.getResultList();\n\t\t em.getTransaction().commit();\n\t\t return listado;\n\t\t \n\t\t}", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "public 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 }", "public Vector listaProfesores()\n {\n try\n {\n\n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM profesores\";\n\n //Se crea un vector de asignaturas\n Vector vectorProfesores = new Vector();\n\n //Se ejecuta la query\n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n\n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n profesor profesor = new profesor();\n\n profesor.setIdProfesor(Integer.valueOf(resultado.getString(\"idprofesor\")));\n profesor.setNombre(resultado.getString(\"nombre\"));\n profesor.setEmail(resultado.getString(\"email\"));\n profesor.setTelefono(Integer.valueOf(resultado.getString(\"telefono\")));\n\n //Se añade la asignatura al vector de asignaturas\n vectorProfesores.add(profesor);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorProfesores;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a los profesores de la Base de Datos: \"+e.getMessage());\n return null;\n }\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 void llenadoDeTablas() {\n \n DefaultTableModel modelo1 = new DefaultTableModel();\n modelo1 = new DefaultTableModel();\n modelo1.addColumn(\"ID Usuario\");\n modelo1.addColumn(\"NOMBRE\");\n UsuarioDAO asignaciondao = new UsuarioDAO();\n List<Usuario> asignaciones = asignaciondao.select();\n TablaPerfiles.setModel(modelo1);\n String[] dato = new String[2];\n for (int i = 0; i < asignaciones.size(); i++) {\n dato[0] = (Integer.toString(asignaciones.get(i).getId_usuario()));\n dato[1] = asignaciones.get(i).getNombre_usuario();\n\n modelo1.addRow(dato);\n }\n }", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "public void llenadoDeTablas() {\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Articulo\");\n modelo.addColumn(\"Fecha Ingreso\");\n modelo.addColumn(\"Nombre Articulo\");\n modelo.addColumn(\"Talla XS\");\n modelo.addColumn(\"Talla S\");\n modelo.addColumn(\"Talla M\");\n modelo.addColumn(\"Talla L\");\n modelo.addColumn(\"Talla XL\");\n modelo.addColumn(\"Color Articulo\");\n modelo.addColumn(\"Nombre Proveedor\");\n modelo.addColumn(\"Existencias\");\n\n RegistroArticuloDAO registroarcticuloDAO = new RegistroArticuloDAO();\n\n List<RegistroArticulo> registroarticulos = registroarcticuloDAO.select();\n TablaArticulo.setModel(modelo);\n String[] dato = new String[11];\n for (int i = 0; i < registroarticulos.size(); i++) {\n dato[0] = Integer.toString(registroarticulos.get(i).getPK_id_articulo());\n dato[1] = registroarticulos.get(i).getFecha_ingreso();\n dato[2] = registroarticulos.get(i).getNombre_articulo();\n dato[3] = registroarticulos.get(i).getTalla_articuloXS();\n dato[4] = registroarticulos.get(i).getTalla_articuloS();\n dato[5] = registroarticulos.get(i).getTalla_articuloM();\n dato[6] = registroarticulos.get(i).getTalla_articuloL();\n dato[7] = registroarticulos.get(i).getTalla_articuloXL();\n dato[8] = registroarticulos.get(i).getColor_articulo();\n dato[9] = registroarticulos.get(i).getNombre_proveedor();\n dato[10] = registroarticulos.get(i).getExistencia_articulo();\n\n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }\n }", "public void listar_saldoMontadoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo_Montado.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaMontadoPorData(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public void mostarProductos() {\n System.out.println(\"Codigo \\tNombre \\t\\t\\tDescripcion \\t\\t\\t\\t\\t\\t Precio\");\n for (Producto producto1 : productos) {\n var codigo1 = producto1.getCodigo();\n var nombre = producto1.getNombre();\n var descripcion = producto1.getDescripcion();\n var precio = producto1.getPrecio();\n System.out.printf(\"%-10d %-25s %-60s %.2f \\n\", codigo1, nombre, descripcion, precio);\n\n }\n System.out.println(\"\");\n\n }", "public List<Talla> obtenTallas() throws Exception {\r\n IntAdmInventario inv = new FacAdmInventario();\r\n\r\n return inv.obtenListaTallas();\r\n }", "@Override\n public List<UfficioTecnico> getAll() throws SQLException {\n final Connection connection = connectionManager.getConnection();\n try {\n final PreparedStatement preparedStatement = connection\n .prepareStatement(SELECT_ALL);\n final ResultSet rs = preparedStatement.executeQuery();\n final List<UfficioTecnico> uffici = new ArrayList<UfficioTecnico>();\n while (rs.next()) {\n final UfficioTecnico uff = new UfficioTecnico();\n uff.setId(rs.getInt(\"Id\"));\n uff.setNome(rs.getString(\"nome\"));\n uff.setTel(rs.getString(\"tel\"));\n uff.setEmail(rs.getString(\"email\"));\n uff.setUbicazione(rs.getString(\"ubicazione\"));\n uffici.add(uff);\n }\n return uffici;\n } finally {\n connectionManager.freeConnection(connection);\n }\n }", "private void dibujarPuntos() {\r\n for (int x = 0; x < 6; x++) {\r\n for (int y = 0; y < 6; y++) {\r\n panelTablero[x][y].add(obtenerIcono(partida.getTablero()\r\n .getTablero()[x][y].getColor()));\r\n }\r\n }\r\n }", "private static void popuniTabelu() {\r\n\t\tDefaultTableModel dfm = (DefaultTableModel) teretanaGui.getTable().getModel();\r\n\r\n\t\tdfm.setRowCount(0);\r\n\r\n\t\tfor (int i = 0; i < listaClanova.size(); i++) {\r\n\t\t\tClan c = listaClanova.getClan(i);\r\n\t\t\tdfm.addRow(new Object[] { c.getBrojClanskeKarte(), c.getIme(), c.getPrezime(), c.getPol() });\r\n\t\t}\r\n\t\tcentrirajTabelu();\r\n\t}", "public void buscaxnombre() {\r\n try {\r\n modelo.setNombre(vistabuscapro.jTvnombre.getText());//C.P.M le mandamos a el modelo el nombre para consultarlo\r\n rs = modelo.Buscarxnombre();//C.P.M ejecutamo el metodo del modelo y atrapamos el resultado\r\n\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M se establese el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M no sera editable\r\n return false;\r\n }\r\n };\r\n vistabuscapro.Tproductos.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"los encabeados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de el resultado\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de columnas\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un objeto con la cantidad de columnas obtenidas\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 le agregamos la informacion obtenida\r\n }\r\n buscar.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 un error al buscar por nombre\");\r\n }\r\n }", "public void listarEquipamentos() {\n \n \n List<Equipamento> formandos =new EquipamentoJpaController().findEquipamentoEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeEquipamento.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Equipamento f : formandos) {\n tbm.addRow(new String[1]);\n \n listadeEquipamento.setValueAt(f.getIdequipamento(), i, 0);\n listadeEquipamento.setValueAt(f.getEquipamento(), i, 1);\n \n i++;\n }\n \n \n \n }", "private ArrayList<FornecedorModelo> iniciaTabela() {\n int i;\n DefaultTableModel model=(DefaultTableModel)tblFornecedor.getModel();\n // atribui 0 linhas à coluna\n model.setNumRows(0);\n // atribui um tamanho fixo a coluna codigo\n tblFornecedor.getColumnModel().getColumn(0).setPreferredWidth(2);\n ArrayList<FornecedorModelo> listaFornecedores = new ArrayList<FornecedorModelo>();\n listaFornecedores = new FornecedorControle().listarFornecedor();\n //adiciona alunos as tabelas\n for (i=0;i<=listaFornecedores.size()-1;i++){\n model.addRow(\n new Object[]{\n listaFornecedores.get(i).getCodFornecedor(),\n listaFornecedores.get(i).getNomeFantasia(),\n listaFornecedores.get(i).getRazaoSocial(),\n listaFornecedores.get(i).getEndereco(),\n listaFornecedores.get(i).getEmail(),\n listaFornecedores.get(i).getTelefone(),\n listaFornecedores.get(i).getCnpj(),\n Boolean.FALSE\n }\n );\n }\n return listaFornecedores;\n }", "private JTable fontesNaoPagas() {\n\t\tinitConexao();\n\t\t\n try {\t \n\t String select = \"SELECT data_ultimo_vencimento_fonte_r, cod_fonte_d, nome_fonte_d, valor_fonte_d, tipo_valor_fonte_d, data_abertura_fonte_d, periodo_fonte_d FROM Fonte_despesa WHERE vencimento_fonte_d = '0'\";\n\t \n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Fonte de despesa\", \"Valor previsto\", \"Data do vencimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t select = \"select DATE_ADD(?,INTERVAL ? day)\";\n\t while (rs.next()){\n\t \t \n\t \tptStatement = c.prepareStatement(select);\n\t\t\t\tptStatement.setString(1, rs.getString(\"data_ultimo_vencimento_fonte_r\"));\n\t\t\t\tptStatement.setString(2, rs.getString(\"periodo_fonte_d\"));\n\t\t\t\trs2 = ptStatement.executeQuery();\n\t\t\t\trs2.next();\n\t\t linhas.add(new Object[]{rs.getString(\"nome_fonte_d\"),rs.getString(\"valor_fonte_d\"),rs2.getString(1), \"Pagar\", rs.getString(\"cod_fonte_d\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"fonteNaoPaga\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "public List<Fornecedor> Listar() throws SQLException {\r\n\t\ttry {\r\n\t\t\tString query = \"select * from fornecedor\";\r\n\t\t\tPreparedStatement preparedStatement = this.connection.prepareStatement(query);\r\n\r\n\t\t\tResultSet rs = preparedStatement.executeQuery();\r\n\t\t\tList<Fornecedor> fornecedors = new ArrayList<>();\r\n\t\t\t\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tFornecedor fornecedor = new Fornecedor();\r\n\t\t\t\tfornecedor.setCodigoFornecedor(rs.getInt(\"cd_fornecedor\"));\r\n\t\t\t\tfornecedor.setNomeLocal(rs.getString(\"nm_local\"));\r\n\t\t\t\tfornecedor.setValorFornecedor(rs.getDouble(\"vl_fornecedor\"));\r\n\t\t\t\tfornecedor.setQuantidadePeso(rs.getInt(\"qt_peso\"));\r\n\t\t\t\tfornecedor.setNomeFornecedor(rs.getString(\"nm_fornecedor\"));\r\n\t\t\t\tfornecedor.setDescricao(rs.getString(\"ds_descricao\"));\r\n\t\t\t\tfornecedors.add(fornecedor);\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn fornecedors;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\tthis.connection.close();\r\n\t\t}\r\n\t}", "private void llenar_tabla() {\n \n try {\n DefaultTableModel modelo;\n conexion cnx = new conexion();\n Connection registros = cnx.conexion();\n String[] nombre_atributos = {\"id_producto\", \"nombre\",\"id_categoria\"};\n String sql = (\"SELECT *FROM producto\");\n modelo = new DefaultTableModel(null, nombre_atributos);\n Statement st = (Statement) registros.createStatement();\n ResultSet rs = st.executeQuery(sql);\n String[] filas = new String[3];\n\n while (rs.next()) {\n filas[0] = rs.getString(\"id_producto\");\n filas[1] = rs.getString(\"nombre\");\n filas[2] = rs.getString(\"id_categoria\");\n modelo.addRow(filas);\n\n }\n jtabla.setModel(modelo);\n registros.close();\n } catch (SQLException ex) {\n Logger.getLogger(responsable.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "private JTable fontesNaoRecebidas() {\n\t\tinitConexao();\t\t\n try {\t \n\t String select = \"SELECT data_ultimo_recebimento_fonte_r, cod_fonte_r, nome_fonte_r, valor_fonte_r, tipo_valor_fonte_r, periodo_fonte_r FROM Fonte_receita WHERE status_fonte_r = '0'\";\n\t \n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Fonte de receita\", \"Valor previsto\", \"Data prevista do recebimento\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t\t\t select = \"select DATE_ADD(?,INTERVAL ? day)\";\n\t while (rs.next()){\n\t \t \n\t \tptStatement = c.prepareStatement(select);\n\t\t\t\tptStatement.setString(1, rs.getString(\"data_ultimo_recebimento_fonte_r\"));\n\t\t\t\tptStatement.setString(2, rs.getString(\"periodo_fonte_r\"));\n\t\t\t\trs2 = ptStatement.executeQuery();\n\t\t\t\trs2.next();\n\t\t linhas.add(new Object[]{rs.getString(\"nome_fonte_r\"),rs.getString(\"valor_fonte_r\"),rs2.getString(1), \"Receber\", rs.getString(\"cod_fonte_r\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 3, \"fonteNaoRecebida\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "public List<String> getTiposEmpleados() {\n List<String> tipos = new ArrayList<String>();\n tipos.add(TipoEmpleado.EmpleadoAsalarido.name());\n tipos.add(TipoEmpleado.EmpleadoBaseMasComision.name());\n tipos.add(TipoEmpleado.EmpleadoPorComision.name());\n tipos.add(TipoEmpleado.EmpleadoPorHora.name());\n\n return tipos;\n }", "public static String obtenerListaNombres (String producto) {\n StringBuilder sb;\n Statement stmt;\n String query;\n ResultSet result;\n try {\n iniciarConexion();\n sb = new StringBuilder();\n stmt = connection.createStatement();\n query = \"SELECT * FROM \" + producto;\n result = stmt.executeQuery(query);\n while (result.next()) {\n sb.append(result.getString(2));\n sb.append(\" \");\n }\n return sb.toString();\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return \"\";\n }\n }", "public Vector listaAsignaturasTotal(String nombre_titulacion)\n {\n try\n { \n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM asignaturatotal \";\n query += \"WHERE tit_nombre='\"+nombre_titulacion+\"' AND activa = 's'\";\n\n //Se crea un vector de asignaturas\n Vector vectorAsignaturas = new Vector();\n\n //Se ejecuta la query\n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n\n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n asignatura asignatura = new asignatura();\n\n asignatura.setCodigo(resultado.getString(\"codigo\"));\n asignatura.setTitulo(resultado.getString(\"titulo\"));\n asignatura.setFechaInicio(resultado.getDate(\"fechainicio\"));\n asignatura.setFechaFin(resultado.getDate(\"fechafin\"));\n asignatura.setResponsable(resultado.getString(\"responsable\"));\n asignatura.setEmail(resultado.getString(\"email\"));\n asignatura.setTelefono(resultado.getString(\"telefono\"));\n\n //Se añade la asignatura al vector de asignaturas\n vectorAsignaturas.add(asignatura);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorAsignaturas;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a las asignaturas de la Base de Datos: \"+e.getMessage());\n return null;\n }\n }", "public void llenarTabla() {\n\n String matriz[][] = new String[lPComunes.size()][2];\n\n for (int i = 0; i < AccesoFichero.lPComunes.size(); i++) {\n matriz[i][0] = AccesoFichero.lPComunes.get(i).getPalabra();\n matriz[i][1] = AccesoFichero.lPComunes.get(i).getCodigo();\n\n }\n\n jTableComun.setModel(new javax.swing.table.DefaultTableModel(\n matriz,\n new String[]{\n \"Palabra\", \"Morse\"\n }\n ) {// Bloquea que las columnas se puedan editar, haciendo doble click en ellas\n @SuppressWarnings(\"rawtypes\")\n Class[] columnTypes = new Class[]{\n String.class, String.class\n };\n\n @SuppressWarnings({\"unchecked\", \"rawtypes\"})\n @Override\n public Class getColumnClass(int columnIndex) {\n return columnTypes[columnIndex];\n }\n boolean[] columnEditables = new boolean[]{\n false, false\n };\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return columnEditables[column];\n }\n });\n\n }", "public List<Oferta> ofertasEmpresa(int idEmpresa) throws SQLException {\n\t\ttry {\n\t\t\tList<Oferta> lista = new ArrayList<>();\n\n\t\t\tString sql = \"SELECT * FROM ofertas where empresa_id = (?) ORDER BY fecha_registro DESC\";\n\n\t\t\tthis.conectar();\n\n\t\t\tcs = conexion.prepareCall(sql);\n\t\t\tcs.setInt(1, idEmpresa);\n\t\t\trs = cs.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tOferta oferta = new Oferta();\n\t\t\t\toferta.setIdOferta(rs.getInt(\"oferta_id\"));\n\t\t\t\toferta.setTituloOferta(rs.getString(\"titulo\"));\n\t\t\t\toferta.setCantidadCuponesOferta(rs.getInt(\"cantidad_cupones\"));\n\t\t\t\toferta.setDescripcionOferta(rs.getString(\"descripcion\"));\n\t\t\t\toferta.setPrecioRegularOferta(rs.getDouble(\"precio_regular\"));\n\t\t\t\toferta.setPrecio_ofertaOferta(rs.getDouble(\"precio_oferta\"));\n\t\t\t\toferta.setFechaInicioOferta(rs.getDate(\"fecha_inicio\"));\n\t\t\t\toferta.setFechaFinOferta(rs.getDate(\"fecha_fin\"));\n\t\t\t\toferta.setFechaRegistroOferta(rs.getDate(\"fecha_registro\"));\n\t\t\t\toferta.setEstadoOferta(rs.getInt(\"estado\"));\n\n\t\t\t\tlista.add(oferta);\n\t\t\t}\n\n\t\t\tthis.desconectar();\n\n\t\t\treturn lista;\n\t\t} catch (SQLException ex) {\n\t\t\tLogger.getLogger(UsuarioModel.class.getName()).log(Level.SEVERE, null, ex);\n\n\t\t\tthis.desconectar();\n\n\t\t\treturn null;\n\t\t}\n\t}", "public DefaultTableModel Ordernar() {\n String sql;\n sql = \"SELECT idempleado,empleados.documento,nombre,apellido,sueldo,trabajo FROM empleados,personas WHERE empleados.documento=personas.documento ORDER BY idempleado\";\n try {\n setTitulos();\n PS = con.Conectarse().prepareStatement(sql);\n rst = PS.executeQuery();\n Object[] fila = new Object[6];\n while (rst.next()) {\n fila[0] = rst.getInt(\"idempleado\");\n fila[1] = rst.getString(\"documento\");\n fila[2] = rst.getString(\"nombre\");\n fila[3] = rst.getString(\"apellido\");\n fila[4] = rst.getDouble(\"sueldo\");\n fila[5] = rst.getString(\"trabajo\");\n DIM.addRow(fila);\n }\n\n } catch (SQLException e) {\n Toolkit.getDefaultToolkit().beep();\n JOptionPane.showMessageDialog(null, \"NO EXISTEN DATOS\", \"AVISO\", JOptionPane.INFORMATION_MESSAGE);\n }\n return DIM;\n }", "public void facturaventa() {\r\n if (vista.Tlista.getRowCount() == 0) {//C.P.M Preguntamos si ay articulos en la tabla de venta\r\n JOptionPane.showMessageDialog(null, \"No hay ningun elemento en la tabla de venta\");//C.P.M Si no hay elementos en la tabla\r\n } else {\r\n try {\r\n rowCount = vista.Tlista.getRowCount(); //C.P.M guardamos el numero de articulos en la tabla de la venta\r\n numfac = 1;//C.P.M inicializamos el numero de la factura en 1 \r\n rs = modeloventa.Facturaventa();//C.P.M Consultamos el numero de facturas \r\n while (rs.next()) {//C.P.M recorremos la consulta \r\n numfac++;//C.P.M y incrementamos nustra variable para obtener el numero de la factura siguiente\r\n }\r\n Fac.setNum(numfac);//C.P.M le enviamos el numero de la factura siguiente\r\n JTable t = Fac.getTabla();//C.P.M inicializamos una tabla\r\n for (int k = 0; k < vista.Tlista.getRowCount(); k++) {//C.P.M recoremos la tabla \r\n t.setValueAt(vista.Tlista.getValueAt(k, 0), k, 0);//C.P.M y vamos agregando los productos que tenemos en venta\r\n t.setValueAt(vista.Tlista.getValueAt(k, 1), k, 1);\r\n t.setValueAt(vista.Tlista.getValueAt(k, 2), k, 2);\r\n }\r\n Fac.setTabla(t);//C.P.M enviamos la tabla a la forma de factura\r\n Fac.setTotal(vista.jTtotal.getText());//C.P.M enviamos el total\r\n Fac.setVisible(true);//C.P.M y asemos visible la tabla\r\n } catch (SQLException ex) {//C.P.M Si ocurre algun error lo notificamos\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al generar la factura\");\r\n }\r\n }\r\n }", "private void cargarTabla() {\n\t\tObject[] fila = new Object[7];\r\n\t\tfila[1] = txtCedula.getText();\r\n\t\tfila[2] = txtFuncionario.getText();\r\n\t\tfila[3] = util.getDateToString(dcDesde.getDate());\r\n\t\tif (cbTipo.getSelectedIndex() == 1 || cbTipo.getSelectedIndex() == 2) {\r\n\t\t\tfila[4] = util.getDateToString(dcDesde.getDate());\r\n\t\t} else {\r\n\t\t\tfila[4] = util.getDateToString(dcHasta.getDate());\r\n\t\t}\r\n\t\tfila[5] = cbTipo.getSelectedItem();\r\n\t\tfila[6] = txtMotivo.getText().toUpperCase();\r\n\t\tthis.modelo.addRow(fila);\r\n\t\ttbJustificaciones.setModel(this.modelo);\r\n\t}", "public List<ServicioTicket> obtenerTodosLosServiciosDeTicket() {\n return this.servicioTicketFacade.findAll();\n }", "public ArrayList<Object[]> obtenerOfertas(String usuario2) {\n\t\tArrayList<Object[]> resultado = new ArrayList<>();\n\t\ttry {\n\t\t\tPreparedStatement sentencia = \n\t\t\t\tconexion.prepareStatement(\"select * from ofertas \"\n\t\t\t\t\t\t+ \"where establec = ?\");\n\t\t\t\n\t\t\tsentencia.setString(1, usuario2);\n\t\t\tResultSet r = sentencia.executeQuery();\n\t\t\twhile(r.next()) {\n\t\t\t\tObject[] o = new Object[5];\n\t\t\t\to[0] = r.getInt(1);\n\t\t\t\to[1] = r.getDate(2);\n\t\t\t\to[2] = r.getDate(3);\n\t\t\t\to[3] = r.getString(4);\n\t\t\t\to[4] = r.getString(5);\n\t\t\t\tresultado.add(o);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "public List<Venta> getVentas() {\n List<Venta> vts = new ArrayList<>();\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"src/Archivo/ventas/ventas.txt\"));\n String record;\n\n while ((record = br.readLine()) != null) {\n\n StringTokenizer st = new StringTokenizer(record, \",\");\n \n String id = st.nextToken();\n String idCliente = st.nextToken();\n String sacosVendidos = st.nextToken();\n String valueVenta = st.nextToken();\n String fecha = st.nextToken();\n\n\n Venta venta = new Venta(\n Integer.parseInt(id),\n Integer.parseInt(idCliente),\n Integer.parseInt(sacosVendidos),\n Float.parseFloat(valueVenta),\n fecha\n );\n\n vts.add(venta);\n }\n\n br.close();\n } catch (Exception e) {\n System.err.println(e);\n }\n\n return vts;\n }", "public static List<Fattura> tutteLeFatture() {\n\t\tEntityManager em = JPAUtil.getInstance().getEmf().createEntityManager();\n\t\tList<Fattura> _return = em.createQuery(\"SELECT f FROM Fattura f\", Fattura.class).getResultList();\n\t\tem.close();\n\t\treturn _return;\n\t}", "public final void detalleTabla()\n {\n \n try\n {\n ResultSet obj=nueva.executeQuery(\"SELECT cli_nit,cli_razon_social FROM clientes.cliente ORDER BY cli_razon_social ASC\");\n \n while (obj.next()) \n {\n \n Object [] datos = new Object[2];\n \n \n for (int i=0;i<2;i++)\n {\n datos[i] =obj.getObject(i+1);\n }\n\n modelo.addRow(datos);\n \n }\n tabla_cliente.setModel(modelo);\n nueva.desconectar();\n \n \n \n }catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, e, \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@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}", "public String getInfoTitulos(){\r\n String infoTitulos = \"\";\r\n \r\n if(this.propriedadesDoJogador.size() > 0 || this.companhiasDoJogador.size() > 0){\r\n for(int i = 0; i < this.propriedadesDoJogador.size(); i++){\r\n infoTitulos += propriedadesDoJogador.get(i).getDescricao()+\"\\n\";\r\n }\r\n for(int i = 0; i < this.companhiasDoJogador.size(); i++){\r\n infoTitulos += companhiasDoJogador.get(i).getDescricao()+\"\\n\";\r\n }\r\n return infoTitulos;\r\n \r\n }else{\r\n return \"Você não possui títulos\";\r\n }\r\n }", "public void cargarTitulos1() throws SQLException {\n\n tabla1.addColumn(\"CLAVE\");\n tabla1.addColumn(\"NOMBRE\");\n tabla1.addColumn(\"DIAS\");\n tabla1.addColumn(\"ESTATUS\");\n\n this.tbpercep.setModel(tabla1);\n\n TableColumnModel columnModel = tbpercep.getColumnModel();\n\n columnModel.getColumn(0).setPreferredWidth(15);\n columnModel.getColumn(1).setPreferredWidth(150);\n columnModel.getColumn(2).setPreferredWidth(50);\n columnModel.getColumn(3).setPreferredWidth(70);\n\n }", "public void MostrarFacturas() {// METODO MOSTRAR FACTURAS\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera fc, facturadetalle fd WHERE \"\n + \"fc.idFacturaCabecera = fd.FacturaCabecera_idFacturaCabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n\n while (rs.next()) {\n System.out.println(rs.getInt(\"idFacturaCabecera\") + \"|\" + rs.getDate(\"fecha\") + \"|\"\n + rs.getFloat(\"subtotal\") + \"|\" + rs.getFloat(\"iva\") + \"|\" + rs.getFloat(\"total\") + \"|\"\n + rs.getString(\"estado\") + \"|\" + rs.getString(\"descripcion\"));\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public List<Profesor> consultarTodos() {\n\t\treturn daoProfesor.consultarTodos();\n\t}", "public List<Veiculo> listarTodosVeiculos(){\n\t\tList<Veiculo> listar = null;\n\t\t\n\t\ttry{\n\t\t\tlistar = veiculoDAO.listarTodosVeiculos();\n\t\t}catch(Exception e){\n\t\t\te.getMessage();\n\t\t}\n\t\treturn listar;\n\t}", "public String estadisticasProductosMasVendidos() {\n String html = \"\";\n DefaultTableModel dtm = producto.estadisticaTopProductosMasVendidos();\n html = Utils.dibujarGraficasHTMLDonut(dtm, \"TOP PRODUCTOS MAS VENDIDOS\");\n return html;\n }", "private static void VeureProductes (BaseDades bd) {\n ArrayList <Producte> llista = new ArrayList<Producte>();\n llista = bd.consultaPro(\"SELECT * FROM PRODUCTE\");\n if (llista != null)\n for (int i = 0; i<llista.size();i++) {\n Producte p = (Producte) llista.get(i);\n System.out.println(\"ID=>\"+p.getIdproducte()+\": \"\n +p.getDescripcio()+\"* Estoc: \"+p.getStockactual()\n +\"* Pvp: \"+p.getPvp()+\" Estoc Mínim: \"\n + p.getStockminim());\n }\n }", "public List<Filme> listar() {\r\n\r\n //Pegando o gerenciador de acesso ao BD\r\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery consulta = gerenciador.createQuery(\r\n \"Select f from Filme f\", Filme.class);\r\n\r\n //Retornar a lista de atores\r\n return consulta.getResultList();\r\n\r\n }", "private void apresentarListaNaTabela() {\n DefaultTableModel modelo = (DefaultTableModel) tblAlunos.getModel();\n modelo.setNumRows(0);\n for (Aluno item : bus.getLista()) {\n modelo.addRow(new Object[]{\n item.getIdAluno(),\n item.getNome(),\n item.getEmail(),\n item.getTelefone()\n });\n }\n }", "public DefaultTableModel listarNotas() {\r\n\t\tDefaultTableModel modelo = new DefaultTableModel();\r\n\t\tmodelo.addColumn(\"idNota\");\r\n\t\tmodelo.addColumn(\"nota\");\r\n\t\tmodelo.addColumn(\"idAluno\");\r\n\t\tmodelo.addColumn(\"idProfessor\");\r\n\t\tmodelo.addColumn(\"idMateria\");\r\n\r\n\t\tString sql = \"SELECT * FROM notas\";\r\n\t\ttry {\r\n\t\t\tStatement stmt = conexao.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tmodelo.addRow(new Object[] { rs.getInt(\"idNota\"), rs.getDouble(\"nota\"), rs.getInt(\"idAluno\"),\r\n\t\t\t\t\t\trs.getInt(\"idProfessor\"), rs.getInt(\"idMateria\") });\r\n\t\t\t}\r\n\r\n\t\t\tstmt.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Falha ao listar os registros cadastrados na tabela notas\");\r\n\t\t}\r\n\t\treturn modelo;\r\n\t}", "public void mostrarTablero(){\n for(int fila = 0; fila < FILAS; fila++){\n for(int columna : tablero[fila]){\n System.out.printf(\"%2d \", columna);\n }\n System.out.println();\n }\n }", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "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 Object[][] seleccionarEventosTodos(Connection conn) {\r\n\t\tint totalRows = 0;\r\n\r\n\t\tObject datos2[][] = null;\r\n\t\ttry {\r\n\r\n\t\t\tint cont = 0;\r\n\r\n\t\t\tPreparedStatement statement = conn\r\n\t\t\t\t\t.prepareStatement(\"select ID_ALERTA, DESCRIPCION, FECHA_INI, FECHA_FIN, ESTADO, DESCRIPCION2 from alertas limit 200\");\r\n\t\t\tResultSet rs = statement.executeQuery();\r\n\t\t\trs.last();\r\n\t\t\ttotalRows = rs.getRow();\r\n\t\t\trs.beforeFirst();\r\n\t\t\tObject datos[][] = new Object[totalRows][6];\r\n\r\n\t\t\twhile (rs.next()) {\r\n\r\n\t\t\t\tdatos[cont][0] = rs.getString(\"ID_ALERTA\");\r\n\t\t\t\tdatos[cont][1] = rs.getString(\"DESCRIPCION\");\r\n\t\t\t\tdatos[cont][2] = rs.getDate(\"FECHA_INI\");\r\n\t\t\t\tdatos[cont][3] = rs.getDate(\"FECHA_FIN\");\r\n\t\t\t\tdatos[cont][4] = rs.getString(\"ESTADO\");\r\n\t\t\t\tdatos[cont][5] = rs.getString(\"DESCRIPCION2\");\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tdatos2 = datos;\r\n\t\t\tstatement.close();\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tJOptionPane.showMessageDialog(null, \"\" + e.getMessage(), \"Alerta!\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\r\n\t\t}\r\n\t\treturn datos2;\r\n\t}", "public ArrayList consultarTodo() {\n Cursor cursor = this.myDataBase.rawQuery(\"SELECT des_invfisico_tmp._id,des_invfisico_tmp.cod_ubicacion,des_invfisico_tmp.cod_referencia,des_invfisico_tmp.cod_plu,plu.descripcion FROM des_invfisico_tmp LEFT OUTER JOIN plu ON plu.cod_plu = des_invfisico_tmp.cod_plu \", null);\n ArrayList arrayList = new ArrayList();\n new ArrayList();\n if (cursor.moveToFirst()) {\n do {\n for (int i = 0; i <= 4; ++i) {\n if (cursor.isNull(i)) {\n arrayList.add(\"\");\n continue;\n }\n arrayList.add(cursor.getString(i));\n }\n } while (cursor.moveToNext());\n }\n\n return arrayList;\n }", "public IFilialAux vendaToFilial();", "public String getTableName() {\r\n return IDaoConstants.TABLE_PROD_PTOS_VTA;\r\n }", "public List<Producto> listar() throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idproducto, t.nombre_producto, t.imagen, t.idcategoria, t.idmarca, t.idmodelo, c.nombre as categoria, m.nombre as marca, d.nombre as modelo \"\n\t\t\t\t\t+ \" FROM conftbc_producto t INNER JOIN conftbc_categoria c on c.idcategoria = t.idcategoria\"\n\t\t\t\t\t+ \" INNER JOIN conftbc_marca m on m.idmarca = t.idmarca INNER JOIN conftbc_modelo d on d.idmodelo = t.idmodelo \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n\t\t\t\tCategoria categoria = new Categoria();\n\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n\t\t\t\tproducto.setCategoria(categoria);\n\t\t\t\tMarca marca = new Marca();\n\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n\t\t\t\tproducto.setMarca(marca);\n\t\t\t\tModelo modelo = new Modelo();\n\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public List<TriplaModeloLocal> obtenerMapeoIn(String pIdNodo, int pIdFuente)\n\n\t{\n\t\tList<TriplaModeloLocal> triplas = new ArrayList<TriplaModeloLocal>();\n\t\tString valorTripla = \"\";\n\t\ttry {\n\n\t\t\trs = stmt\n\t\t\t\t\t.executeQuery(\"SELECT TRIPLAINTEGRADORA FROM INTEGRACION WHERE IDNODO='\"\n\t\t\t\t\t\t\t+ pIdNodo\n\t\t\t\t\t\t\t+ \"'\"\n\t\t\t\t\t\t\t+ \"AND IDFUENTE='\"\n\t\t\t\t\t\t\t+ pIdFuente\n\t\t\t\t\t\t\t+ \"'\");\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tvalorTripla = rs.getString(\"TRIPLAINTEGRADORA\");\n\t\t\t\tTriplaModeloLocal t = new TriplaModeloLocal(valorTripla,\n\t\t\t\t\t\tpIdFuente);\n\t\t\t\ttriplas.add(t);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"No es posible recuperar las triplas de integracion de :\"\n\t\t\t\t\t\t\t+ pIdNodo);\n\t\t\tSystem.err.println(\"error: \" + e.getMessage());\n\n\t\t}\n\n\t\treturn triplas;\n\t}", "public void buscaTodasOSs() {\n try {\n ServicoDAO sDAO = new ServicoDAO(); // instancia a classe ProdutoDB()\n ArrayList<OS> cl = sDAO.consultaTodasOs(); // coloca o método dentro da variável\n\n DefaultTableModel modeloTabela = (DefaultTableModel) jTable1.getModel();\n // coloca a tabela em uma variável do tipo DefaultTableModel, que permite a modelagem dos dados da tabela\n\n for (int i = modeloTabela.getRowCount() - 1; i >= 0; i--) {\n modeloTabela.removeRow(i);\n // loop que limpa a tabela antes de ser atualizada\n }\n\n for (int i = 0; i < cl.size(); i++) {\n // loop que pega os dados e insere na tabela\n Object[] dados = new Object[7]; // instancia os objetos. Cada objeto representa um atributo \n dados[0] = cl.get(i).getNumero_OS();\n dados[3] = cl.get(i).getStatus_OS();\n dados[4] = cl.get(i).getDefeito_OS();\n dados[5] = cl.get(i).getDataAbertura_OS();\n dados[6] = cl.get(i).getDataFechamento_OS();\n\n // pega os dados salvos do banco de dados (que estão nas variáveis) e os coloca nos objetos definidos\n modeloTabela.addRow(dados); // insere uma linha nova a cada item novo encontrado na tabela do BD\n }\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Falha na operação.\\nErro: \" + ex.getMessage());\n } catch (Exception ex) {\n Logger.getLogger(FrmPesquisar.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public List<MunicipioDTO> listaUF() throws ClassNotFoundException, SQLException{\n\n\t\t// ativa conexão com BD\n\t\tConnection connection = ConexaoUtil.getInstance().getConnection();\n \n\t\tPreparedStatement statement = null;\n ResultSet rs = null;\n\n List<MunicipioDTO> ufs = new ArrayList<>();\n\n try {\n \t\n\t\t\tString sql = \"SELECT DISTINCT Uf FROM Municipio ORDER BY Uf\";\n\t\t\t// realiza uma ponte entre o java e o BD\n\t\t\tstatement = connection.prepareStatement(sql); \t\n \t\n //stmt = connection.prepareStatement(\"SELECT * FROM topicos\");\n rs = statement.executeQuery();\n\n while (rs.next()) {\n\n \tMunicipioDTO uf = new MunicipioDTO();\n \t\t\n \t//recupera valores de acordo com as colunas do BD\n \tuf.setUf(rs.getString(\"Uf\"));\n \t//adiciona o municipio na lista de municipios\n \tufs.add(uf);\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(MunicipioDAO.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n //ConnectionFactory.closeConnection(con, stmt, rs);\n \tstatement.close();\n }\n\n return ufs;\n\n }", "public List<InvDetalleAjusteProducto> findAllDetalle() {\n\t\treturn em.createNamedQuery(\"InvDetalleAjusteProducto.findAll\", InvDetalleAjusteProducto.class).getResultList();\n\t}", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "public List<Listas_de_las_Solicitudes> Mostrar_las_peticiones_que_han_llegado_al_Usuario_Administrador(int cedula) {\n\t\t//paso3: Obtener el listado de peticiones realizadas por el usuario\n\t\tEntityManagerFactory entitymanagerfactory = Persistence.createEntityManagerFactory(\"LeyTransparencia\");\n\t\tEntityManager entitymanager = entitymanagerfactory.createEntityManager();\n\t\tentitymanager.getEntityManagerFactory().getCache().evictAll();\n\t\tQuery consulta4=entitymanager.createQuery(\"SELECT g FROM Gestionador g WHERE g.cedulaGestionador =\"+cedula);\n\t\tGestionador Gestionador=(Gestionador) consulta4.getSingleResult();\n\t\t//paso4: Obtener por peticion la id, fecha y el estado\n\t\tList<Peticion> peticion=Gestionador.getEmpresa().getPeticions();\n\t\tList<Listas_de_las_Solicitudes> peticion2 = new ArrayList();\n\t\t//paso5: buscar el area de cada peticion\n\t\tfor(int i=0;i<peticion.size();i++){\n\t\t\tString almcena=\"\";\n\t\t\tString sarea=\"no posee\";\n\t\t\tBufferedReader in;\n\t\t\ttry{\n\t\t\t\tin = new BufferedReader(new InputStreamReader(new FileInputStream(\"C:/area/area\"+String.valueOf(peticion.get(i).getIdPeticion())+\".txt\"), \"utf-8\"));\n\t\t\t\ttry {\n\t\t\t\t\twhile((sarea=in.readLine())!=null){\n\t\t\t\t\t\tint s=0;\n\t\t\t\t\t\talmcena=sarea;\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\t\t\t\t\tSystem.out.println(almcena);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t//paso6: Mostrar un listado de peticiones observando el id, la fecha de realizacion de la peticion, hora de realizacion de la peticion, y el estado actual de la peticion\n\t\t\tListas_de_las_Solicitudes agregar=new Listas_de_las_Solicitudes();\n\t\t\tagregar.setId(String.valueOf(peticion.get(i).getIdPeticion()));\n\t\t\tagregar.setFechaPeticion(peticion.get(i).getFechaPeticion());\n\t\t\tagregar.setNombreestado(peticion.get(i).getEstado().getTipoEstado());\n\t\t\tagregar.setArea(almcena);\n\t\t\tpeticion2.add(agregar);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"el usuario existe\");\n\t\treturn peticion2;\n\t\t//aun no se\n\t}", "public 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 void llenarTabla(int inicio, int limite) {\n DefaultTableModel dtm = (DefaultTableModel) jTableVerRondas.getModel();//se usa DefaultTableModel para manipular facilmente el Tablemodel\n dtm.setRowCount(0);//eliminando la s filas que ya hay. para agregar desde el principio.\n //los datos se agregan la defaultTableModel.\n ArrayList<Partido> llenar = miOpenAustralia.getPartidos();//sacando al informacion a agregar en la tabla.\n\n //como se va a llenar una tabla de 5 columnas, se crea un vector de 3 elementos.\n //se usa un arreglo de Object para poder agregar a la tabla cualquier tipo de datos.\n Object[] datos = new Object[5];\n for (int i = inicio; i < limite; i++) {\n\n Partido parti = llenar.get(i);\n //Se agrega este if para evitar que el extraiga datos en un campo null\n if (parti != null) {\n\n datos[0] = parti.getId();\n datos[1] = parti.getFechaHora();//el primer elemetno del arreglo va a ser el id,la primera col en la Tabla.\n datos[2] = parti.getJugador1().getNombre();\n datos[3] = parti.getJugador2().getNombre();\n datos[4] = parti.getPista().getNombre();\n\n //agrego al TableModleo ese arreglo\n dtm.addRow(datos);\n }\n }\n }", "public Vector listaAsignaturas(String nombre_titulacion)\n {\n try\n {\n Date fechaActual = new Date();\n SimpleDateFormat formato = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\n //Se obtiene una conexion\n Connection conexion = this.bbdd.getConexion();\n\n //Se prepara la query\n String query = \"SELECT * FROM asignaturatotal \";\n query += \"WHERE fechainicio <='\" + formato.format(fechaActual) +\"' \";\n query += \"AND fechafin >= '\"+formato.format(fechaActual)+\"' AND tit_nombre='\"+nombre_titulacion+\"' AND activa = 's'\";\n\n //Se crea un vector de asignaturas\n Vector vectorAsignaturas = new Vector();\n\n //Se ejecuta la query \n Statement st = conexion.createStatement();\n ResultSet resultado = st.executeQuery(query);\n \n //Para cada fila se creará un objeto y se rellenará\n //con los valores de las columnas.\n while(resultado.next())\n {\n asignatura asignatura = new asignatura();\n \n asignatura.setCodigo(resultado.getString(\"codigo\"));\n asignatura.setTitulo(resultado.getString(\"titulo\"));\n asignatura.setFechaInicio(resultado.getDate(\"fechainicio\"));\n asignatura.setFechaFin(resultado.getDate(\"fechafin\"));\n asignatura.setResponsable(resultado.getString(\"responsable\"));\n asignatura.setEmail(resultado.getString(\"email\"));\n asignatura.setTelefono(resultado.getString(\"telefono\"));\n \n //Se añade la asignatura al vector de asignaturas\n vectorAsignaturas.add(asignatura);\n }\n\n //Se cierra la conexión\n this.bbdd.cerrarConexion(conexion);\n\n return vectorAsignaturas;\n }\n catch(SQLException e)\n {\n System.out.println(\"Error al acceder a las asignaturas de la Base de Datos: \"+e.getMessage());\n return null;\n }\n }" ]
[ "0.5935079", "0.5808732", "0.5801111", "0.5797044", "0.5741226", "0.5681878", "0.5658374", "0.5655232", "0.560009", "0.55721045", "0.5473123", "0.546751", "0.5453259", "0.54358286", "0.54253113", "0.5419127", "0.5409857", "0.54088944", "0.5383117", "0.5381659", "0.53761697", "0.5371099", "0.53277594", "0.5326886", "0.53205246", "0.5309266", "0.53090316", "0.53004366", "0.5293791", "0.5291423", "0.5275428", "0.5271653", "0.5265219", "0.5250244", "0.5232507", "0.52291024", "0.5226287", "0.52183264", "0.52147394", "0.5210394", "0.520739", "0.52057475", "0.5205613", "0.52047914", "0.52020717", "0.5198795", "0.51796424", "0.5178209", "0.51776063", "0.5165013", "0.51598114", "0.5154354", "0.5149782", "0.5137399", "0.5133216", "0.5132686", "0.5127021", "0.5121414", "0.51179254", "0.51060146", "0.5104482", "0.509479", "0.5089301", "0.50887465", "0.50885403", "0.5080865", "0.5078541", "0.50780493", "0.5073427", "0.50718576", "0.50611866", "0.50566536", "0.50455356", "0.5042203", "0.50406563", "0.5037778", "0.5037365", "0.5035256", "0.50327134", "0.5028228", "0.50274384", "0.50267726", "0.5022922", "0.5022662", "0.5012544", "0.501038", "0.5008073", "0.5007871", "0.50036037", "0.50017804", "0.4997298", "0.4992016", "0.4985361", "0.4980984", "0.4973734", "0.49711233", "0.4968426", "0.49681368", "0.49625817", "0.49578968" ]
0.53565174
22
Retorna todos los registros de la tabla Productos_punto_venta que coincidan con el criterio 'id_pdv = :idPuntoVenta'.
@Override public ProductosPuntoVenta[] findByPuntoVenta(Integer idPuntoVenta) throws ProductosPuntoVentaDaoException { return findByDynamicSelect(SQL_SELECT + " WHERE id_pdv = ?", new Object[] { idPuntoVenta }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "@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 }", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "@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 }", "public List<Proveedor> verProveedoresAll() {\n List<Proveedor> proveedores = new ArrayList<>();\n proveedores = dao.getProveedorAll();\n return proveedores;\n }", "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "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 }", "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 NominaPuesto[] findWhereIdPuestoEquals(int idPuesto) throws NominaPuestoDaoException;", "@Override\r\n public List<Prova> consultarTodosProva() throws Exception {\n return rnProva.consultarTodos();\r\n }", "public List<Produit> searchProduitsByVendeur(String theVendeur);", "@Override\n public List<FecetProrrogaOrden> getHistoricoProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(\" INNER JOIN \").append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" ORDER BY P.ID_PRORROGA_ORDEN, FP.ID_FLUJO_PRORROGA_ORDEN \");\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }", "public List getPorPertenceAProduto(long id) throws DaoException {\n\t\tsetMontador(null);\n\t\tString sql;\n \tsql = \"select \" + camposOrdenadosJoin() + \" from \" + tabelaSelect() + \n outterJoinAgrupado() +\n \t\" where id_produto_pa = \" + id + orderByLista();\n \tsetMontador(getMontadorAgrupado());\n \treturn getListaSql(sql);\n\t}", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(ProductosPuntoVentaPk pk)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByPrimaryKey(pk.getIdPuntoVenta(), pk.getIdProducto());\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 void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "public List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\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 }", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\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}", "@Override\n @SuppressWarnings(\"unchecked\")\n public List<PontoTuristico> searchByID(Integer pIdPonto)\n {\n List<PontoTuristico> tLista = new ArrayList<>();\n\n try\n {\n // Obtendo a sessão hibernate\n SessionFactory tFactory = HibernateUtil.getSessionFactory();\n Session tSessao = tFactory.getCurrentSession();\n\n // Criando o critério para pesquisa\n Criteria tCriterio = tSessao.createCriteria(PontoTuristico.class)\n .add(Restrictions.idEq(pIdPonto));\n\n // Recuperando a lista via hibernate\n tLista = tCriterio.list();\n }\n catch (HibernateException tExcept)\n {\n ExceptionUtil.mostrarErro(tExcept, \"Erro no método de recuperação da lista de PontoTuristicos\");\n }\n\n // Retornando a lista de PontoTuristicos\n return tLista;\n }", "public List<Veiculo> listarTodosVeiculos(){\n\t\tList<Veiculo> listar = null;\n\t\t\n\t\ttry{\n\t\t\tlistar = veiculoDAO.listarTodosVeiculos();\n\t\t}catch(Exception e){\n\t\t\te.getMessage();\n\t\t}\n\t\treturn listar;\n\t}", "public List<ProveedorPromocionHotelEntity> getPromociones(){\n List<ProveedorPromocionHotelEntity>promociones = proveedorPromocionHotelPersistence.findAll();\n return promociones;\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}", "@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 ArrayList<GrupoProducto> consultarTodos(){\r\n ArrayList<GrupoProducto> grupoProducto = new ArrayList<>();\r\n for (int i = 0; i < listaGrupoProductos.size(); i++) {\r\n if (!listaGrupoProductos.get(i).isEliminado()) {\r\n grupoProducto.add(listaGrupoProductos.get(i));\r\n }\r\n }\r\n return grupoProducto;\r\n }", "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 }", "@Override\r\n\tpublic List<Producto> productosMasVendidos(@DateTimeFormat(pattern = \"dd-MM-yyyy\")Date fecha) {\n\t\treturn (List<Producto>)productoFacturaClienteDao.productosMasVendidos(fecha);\r\n\t}", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "public List<Poliza> generarPoliza(final Periodo p){\r\n\t\tList<Poliza> polizas=new ArrayList<Poliza>();\r\n\t\tfor(Date dia:p.getListaDeDias()){\r\n\t\t\ttry {\r\n\t\t\t\tPoliza res=generarPoliza(dia);\r\n\t\t\t\tpolizas.add(res);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlogger.error(\"No genero la poliza para el dia: \"+dia+ \" \\nMsg: \"+ExceptionUtils.getRootCauseMessage(e)\r\n\t\t\t\t\t\t,e);\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn polizas;\r\n\t}", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "@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}", "public List<Tb_Prod_Painel_PromoBeans> getProdPainel(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "public List<Produto> listar() {\n return manager.createQuery(\"select distinct (p) from Produto p\", Produto.class).getResultList();\n }", "public List<ReciboPension> buscarRecibosPendientesDependientes(long idPersona) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"\tselect r from ReciboPension r where r.fechaPago is null and r.alumno.idPersona\tin ( select a.idPersona from Apoderado ap inner join ap.alumnos a \twhere ap.idPersona = :id ) \")\n \t\t.setParameter(\"id\", idPersona).getResultList();\n\t}", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public void listar_mais_vendeu(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisVendidas.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisVendeu(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal_vendido()});\n }\n \n \n }", "public ArrayList<FormularioServ> listaFServActivos(){\n\t\tArrayList<FormularioServ> listFServ = new ArrayList<FormularioServ>();\n\t\ttry{\n\t\t\tc = PoolConexion.getConnection();\n\t\t\tps = c.prepareStatement(\"select * from public.\\\"formularioServ\\\" where estado<>3\", ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE, ResultSet.HOLD_CURSORS_OVER_COMMIT);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tFormularioServ Fserv = new FormularioServ();\n\t\t\t\tFserv.setIdFormulario(rs.getInt(\"idFormulario\"));\n\t\t\t\tFserv.setIdServ(rs.getInt(\"idServ\"));\n\t\t\t\tFserv.setNombreUsuario(rs.getString(\"nombreUsuario\"));\n\t\t\t\tFserv.setEmail(rs.getString(\"email\"));\n\t\t\t\tFserv.setCuerpoEmail(rs.getString(\"cuerpoEmail\"));\n\t\t\t\tFserv.setNumerotelefono(rs.getString(\"numerotelefono\"));\n\t\t\t\tFserv.setfCreacion(rs.getTimestamp(\"fcreacion\"));\n\t\t\t\tFserv.setEstado(rs.getInt(\"estado\"));\n\t\t\t\t\n\t\t\t\tlistFServ.add(Fserv);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(\"DATOS: ERROR EN LISTAR Formularios \"+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\tif(rs != null){\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null){\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t\tif(c != null){\n\t\t\t\t\tPoolConexion.closeConnection(c);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn listFServ;\n\t}", "public List<CXPFactura> buscarFacturas(final Proveedor proveedor){\r\n\t\treturn getFacturaDao().buscarFacturas(proveedor);\r\n\t}", "public List<Profesor> consultarTodos() {\n\t\treturn daoProfesor.consultarTodos();\n\t}", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public List<ReciboPension> buscarRecibosDependientes(long idPersona) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"\tselect r from ReciboPension r where r.alumno.idPersona\tin ( select a.idPersona from Apoderado ap inner join ap.alumnos a \twhere ap.idPersona = :id ) \")\n \t\t.setParameter(\"id\", idPersona).getResultList();\n\t}", "public List<ProveedorEntity> getProveedores(){\n List<ProveedorEntity>proveedores = proveedorPersistence.findAll();\n return proveedores;\n }", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "private List<PromocionConcursoAgr> listaPromocionConcursoAgr() {\r\n\t\tString select = \" select distinct(puesto_det.*) \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab \"\r\n\t\t\t\t+ \"on estado_cab.id_estado_cab = estado_det.id_estado_cab \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \" where puesto_det.id_concurso_puesto_agr is null \"\r\n\t\t\t\t+ \"and lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and lower(estado_cab.descripcion) = 'concurso' \"\r\n\t\t\t\t//+ \"and puesto_det.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t;\r\n\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tlista = em.createNativeQuery(select, PromocionConcursoAgr.class)\r\n\t\t\t\t.getResultList();\r\n\r\n\t\treturn lista;\r\n\t}", "public ArrayList<TicketDto> consultarVentasChance(String fecha, String moneda) {\n ArrayList<TicketDto> lista = new ArrayList();\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,sum(vrl_apuesta) \"\n + \"FROM ticket\"\n + \" where \"\n + \" fecha='\" + fecha + \"' and moneda='\" + moneda + \"' group by codigo\";\n\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n TicketDto dto = new TicketDto();\n dto.setCodigo(rs.getString(1));\n dto.setValor(rs.getInt(2));\n dto.setMoneda(moneda);\n lista.add(dto);\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorPremio.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n }", "public List<conteoTab> filtro() throws Exception {\n iConteo iC = new iConteo(path, this);\n try {\n fecha = sp.getString(\"date\", \"\");\n iC.nombre = fecha;\n\n List<conteoTab> cl = iC.all();\n\n for (conteoTab c : cl) {\n boolean val = true;\n for (int i = 0; i <= clc.size(); i++) {\n if (c.getIdBloque() == sp.getInt(\"bloque\", 0) || c.getIdVariedad() == sp.getInt(\"idvariedad\", 0)) {\n val = true;\n } else {\n val = false;\n }\n }\n if (val) {\n clc.add(c);\n } else {\n }\n }\n } catch (Exception e) {\n Toast.makeText(this, \"No existen registros actuales que coincidan con la fecha\", Toast.LENGTH_LONG).show();\n clc.clear();\n }\n return clc;\n }", "@Override\n public ArrayList<Comentario> getComentarios(String pId) throws SQLException {\n ArrayList<Comentario> comentarios = new ArrayList<Comentario>();\n comentarios = (ArrayList<Comentario>) bdComentario.selectQuery(\"SELECT * FROM COMENTARIO WHERE \"\n + \"ID_PROPIEDAD = \" + pId);\n return comentarios;\n }", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "@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 List<ReciboPension> buscarRecibosPendientesAlumno(\tlong idAlumno) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"select r from ReciboPension r where r.fechaPago is null and r.alumno.idPersona = :id\")\n \t\t.setParameter(\"id\", idAlumno).getResultList();\n\t\t}", "public Venta[] listarVentas(String nombreVendedor)throws java.rmi.RemoteException{\n\t\tString driver = \"org.apache.derby.jdbc.EmbeddedDriver\";\n\t\t// the database name \n\t\tString dbName=\"VentasDB\";\n\t\t// define the Derby connection URL to use \n\t\tString connectionURL = \"jdbc:derby:\" + dbName + \";create=true\";\n\n\t\tConnection conn = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pst = null;\n\t\tResultSet rs2 = null;\n\t\tPreparedStatement pst2 = null;\n\t\tResultSet rs3 = null;\n\t\tPreparedStatement pst3 = null;\n\t\tResultSet rs4 = null;\n\t\tPreparedStatement pst4 = null;\n\t\tResultSet rs5 = null;\n\t\tPreparedStatement pst5 = null;\n\t\t\n System.out.println(\"Listando ventas...\");\n\t\t\n\t\tString sql = \"SELECT COUNT(IdentificadorVenta) FROM VentasArticulos WHERE NombreVendedor=?\";\n\t\tint cantidadVentas = 0;\n\t\t\n\t\ttry{\n\t\t\tClass.forName(driver).newInstance();\n\t\t\tconn = DriverManager.getConnection(connectionURL);\n pst = conn.prepareStatement(sql);\n\t\t\tpst.setString(1, nombreVendedor);\n \n rs = pst.executeQuery();\n \n if (rs.next()){\n cantidadVentas = rs.getInt(1);\n }\n\t\t\t\n\t\t\tVenta[] ventas = new Venta[cantidadVentas];\n\t\t\tString sql2 = \"SELECT NombreComprador, ApellidoComprador, DocumentoComprador, AnioVenta, MesVenta, DiaVenta, IdentificadorVenta FROM VentasArticulos WHERE NombreVendedor=?\";\n\t\t\t\n\t\t\tpst2 = conn.prepareStatement(sql2);\n\t\t\tpst2.setString(1, nombreVendedor);\n\t\t\t\n\t\t\trs2 = pst2.executeQuery();\n\t\t\t\n\t\t\tint k = 0;\n\t\t\twhile (rs2.next()){\n\t\t\t\tString nombreComprador = rs2.getString(1);\n\t\t\t\tString apellidoComprador = rs2.getString(2);\n\t\t\t\tString numeroDocumentoComprador = rs2.getString(3);\n\t\t\t\t\n\t\t\t\tint anioVenta = rs2.getInt(4);\n\t\t\t\tint mesVenta = rs2.getInt(5);\n\t\t\t\tint diaVenta = rs2.getInt(6);\n\t\t\t\t\n\t\t\t\tint identificadorVenta = rs2.getInt(7);\n\t\t\t\t\n\t\t\t\tString sql3 = \"SELECT COUNT(A_NombreArticulo) FROM ArticuloDeVenta WHERE VA_IdentificadorVenta=?\";\n\t\t\t\t\n\t\t\t\tpst3 = conn.prepareStatement(sql3);\n\t\t\t\tpst3.setInt(1, identificadorVenta);\n\t\t\t\t\n\t\t\t\trs3 = pst3.executeQuery(); \n\t\t\t\t\n\t\t\t\tint cantArticulosVenta = 0;\n\t\t\t\t\n\t\t\t\tif (rs3.next()){\n\t\t\t\t\tcantArticulosVenta = rs3.getInt(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArticuloVenta[] listaArticulosVenta = new ArticuloVenta[cantArticulosVenta];\n\t\t\t\tString sql4 = \"SELECT A_NombreArticulo, Cantidad FROM ArticuloDeVenta WHERE VA_IdentificadorVenta=?\";\n\t\t\t\t\n\t\t\t\tpst4 = conn.prepareStatement(sql4);\n\t\t\t\tpst4.setInt(1, identificadorVenta);\n\t\t\t\t\n\t\t\t\trs4 = pst4.executeQuery();\n\t\t\t\t\n\t\t\t\tint j=0;\n\t\t\t\twhile (rs4.next()){\n\t\t\t\t\tString nombreArticulo = rs4.getString(1);\n\t\t\t\t\tint cantidadArticulo = rs4.getInt(2);\n\t\t\t\t\t\n\t\t\t\t\tArticuloVenta articulo = new ArticuloVenta(nombreArticulo, cantidadArticulo);\n\t\t\t\t\tlistaArticulosVenta[j] = articulo;\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tVenta venta = new Venta(nombreComprador, apellidoComprador, numeroDocumentoComprador, anioVenta, mesVenta, diaVenta, listaArticulosVenta);\n\t\t\t\t\n\t\t\t\tventas[k] = venta;\n\t\t\t\t\n\t\t\t\tk++;\n\t\t\t}\n\t\t\treturn ventas;\n }catch(Exception e){\n\t\t\tSystem.out.println(\"Error al listar las ventas.\");\n\t\t\tSystem.out.println(\"Informacion del error: \" + e.toString());\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n }\n }", "public List<Propriedade> getListaDePropriedadesComMonopolio(){\r\n List<Propriedade> proComMonopolio = new ArrayList<>();\r\n for(Propriedade pro: this.propriedadesDoJogador){\r\n for(String cor: this.monopolioNoGrupoDeCor){\r\n if(pro.getCor().equals(cor)){\r\n proComMonopolio.add(pro);\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return proComMonopolio;\r\n }", "public ResultSet mostrarPacientesTodos() throws SQLException {\n ResultSet listaPacientes;\n String sql;\n\n sql = \"SELECT * \"\n + \"FROM centromedico.paciente, centromedico.paciente_borrado\"\n + \"ORDER BY DNI\" + \";\";\n listaPacientes = this.conexion.makeQuery(sql);\n\n return listaPacientes;\n }", "@Override\n\tpublic ResponseConsulta consultarVehiculos() {\n\t\tResponseConsulta respConsulta = new ResponseConsulta();\n\t\ttry {\n\t\t\tList<Vehiculo> listaVeiculos = vehiculoRepositorio.buscarTodasVehiculo();\n\t\t\trespConsulta.setListVehiculos(listaVeiculos);\n\t\t\trespConsulta.setMensaje(properties.msgExito);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(properties.errorGenerico + e);\n\t\t\trespConsulta.setMensaje(properties.errorGenerico);\n\t\t}\n\t\treturn respConsulta;\n\t}", "public List<EstructuraContratosDatDTO> obtenerConsultaProsperaLista() {\n\t\tList<EstructuraContratosDatDTO> consultaNominaLista = consultaProsperaService.listaEstructuraProspera();\n\t\treturn consultaNominaLista;\n\t}", "public List<VencimentoCP> listVencimento() {\r\n\r\n\t\tArrayList<VencimentoCP> lista = new ArrayList<VencimentoCP>();\r\n\r\n\t\tStatement st = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\ttry {\r\n\t\t\tst = conexao.createStatement();\r\n\t\t\tString sql = \"select * from vencimento_cp\";\r\n\t\t\trs = st.executeQuery(sql);\r\n\r\n\t\t\twhile (rs.next()) {\r\n\r\n\t\t\t\tVencimentoCP vencimento = new VencimentoCP();\r\n\t\t\t\tvencimento.setVencimento_codigo(rs.getInt(\"vencimento_codigo\"));\r\n\t\t\t\tvencimento.setVencimento(rs.getDate(\"vencimento\"));\r\n\t\t\t\tvencimento.setTitulo(rs.getString(\"titulo\"));\r\n\t\t\t\tvencimento.setValor(rs.getString(\"valor\"));\r\n\t\t\t\tvencimento.setDesconto(rs.getString(\"desconto\"));\r\n\t\t\t\tvencimento.setCodigoag(rs.getString(\"codigoag\"));\r\n\t\t\t\tvencimento.setNomeag(rs.getString(\"nomeag\"));\r\n\t\t\t\tvencimento.setLancamento(rs.getString(\"lancamento\"));\r\n\t\t\t\tvencimento.setBanco(rs.getString(\"banco\"));\r\n\t\t\t\tvencimento.setAgenciabanco(rs.getString(\"agenciabanco\"));\r\n\t\t\t\tvencimento.setDigagencia(rs.getString(\"digagencia\"));\r\n\t\t\t\tvencimento.setConta(rs.getString(\"conta\"));\r\n\t\t\t\tvencimento.setDigconta(rs.getString(\"digconta\"));\r\n\t\t\t\tvencimento.setAgendar(rs.getDate(\"agendar\"));\r\n\r\n\t\t\t\tlista.add(vencimento);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tLogger lgr = Logger.getLogger(Connection.class.getName());\r\n\t\t\tlgr.log(Level.SEVERE, ex.getMessage(), ex);\r\n\r\n\t\t} finally {\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "public List<PedidoIndividual> obtenerNuevosPedidosPorPedidoMesa(Long idPedido) throws QRocksException;", "public void marcarTodos() {\r\n\t\tfor (int i = 0; i < listaPlantaCargoDto.size(); i++) {\r\n\t\t\tPlantaCargoDetDTO p = new PlantaCargoDetDTO();\r\n\t\t\tp = listaPlantaCargoDto.get(i);\r\n\t\t\tif (!obtenerCategoria(p.getPlantaCargoDet())\r\n\t\t\t\t\t.equals(\"Sin Categoria\"))\r\n\t\t\t\tp.setReservar(true);\r\n\t\t\tlistaPlantaCargoDto.set(i, p);\r\n\t\t}\r\n\t\tcantReservados = listaPlantaCargoDto.size();\r\n\t}", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public List<Veterinario> pesquisar(String nomeOuCpf) throws ClassNotFoundException, SQLException{ \n VeterinarioDAO dao = new VeterinarioDAO();\n if (!nomeOuCpf.equals(\"\"))\n return dao.listar(\"(nome = '\" + nomeOuCpf + \"' or cpf = '\" + nomeOuCpf + \"') and ativo = true\");\n else\n return dao.listar(\"ativo = true\");\n }", "public <TPDVPagamentos extends br.lry.process.AUTPDVPagamentoPedido> TPDVPagamentos autPDVPagamentos() {\r\n\t\tif(pdvPagamentos==null) {\r\n\t\t\tpdvPagamentos = new AUTPDVPagamentoPedido();\r\n\t\t\tpdvPagamentos.AUT_AGENT_SILK4J = new com.borland.silktest.jtf.Desktop();\r\n\t\t\tpdvPagamentos.AUT_AGENT_SILK4J_CONFIGURATION = new BaseState(\"pdv.settings\");\r\n\t\t\tpdvPagamentos.AUT_AGENT_SILK4J.executeBaseState(pdvPagamentos.AUT_AGENT_SILK4J_CONFIGURATION);\r\n\t\t\t\r\n\t\t\treturn (TPDVPagamentos)pdvPagamentos;\r\n\t\t}\r\n\t\telse {\t\r\n\t\t\treturn (TPDVPagamentos)pdvPagamentos;\t\t\t\r\n\t\t}\r\n\t}", "public ArrayList<Veiculo> pesquisarCarro(int tipoCarro);", "@Transactional\n\tpublic List<Odgovor> getAllOdgovor(int idPitanje) {\n\t\treturn quizDAO.getAllOdgovor(idPitanje);\n\t}", "public Collection<Object[]> pesquisarMovimentoRoteiroEmpresa(Integer idRoteiroEmpresa, Integer anoMesFaturamento,\n\t\t\t\t\tInteger idFaturamentoGrupo) throws ErroRepositorioException;", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "public List<Poruke> getAllPoruke(){\r\n return porukeBeanLocal.getAllPoruke();\r\n }", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Profilo> getAll() {\r\n\t\t//Recupero la sessione da Hibernate\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\t//Creo la query usando il linguaggio HQL (Hibernate Query Language)\r\n\t\tQuery query = session.createQuery(\"FROM Vocelicenza\");\r\n\t\t\t\r\n\t\t//Restituisco la lista di Profili\r\n\t\treturn query.list();\r\n\t}", "public List<CXPFactura> buscarFacturas(Periodo p) {\r\n\t\treturn getFacturaDao().buscarFacturas(p);\r\n\t}", "List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;", "public List getPorReferenteAProduto(long id) throws DaoException {\n\t\t// Existe no DAO\n\t\tCompartilhamentoProdutoDao dao = getDao();\n\t\tDaoConexao conn = dao.criaConexao();\n\t\tdao.setConexao(conn);\n\t\treturn dao.ListaPorProdutoReferenteA(id);\n\t}", "public List<Venta> getVentas() {\n List<Venta> vts = new ArrayList<>();\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"src/Archivo/ventas/ventas.txt\"));\n String record;\n\n while ((record = br.readLine()) != null) {\n\n StringTokenizer st = new StringTokenizer(record, \",\");\n \n String id = st.nextToken();\n String idCliente = st.nextToken();\n String sacosVendidos = st.nextToken();\n String valueVenta = st.nextToken();\n String fecha = st.nextToken();\n\n\n Venta venta = new Venta(\n Integer.parseInt(id),\n Integer.parseInt(idCliente),\n Integer.parseInt(sacosVendidos),\n Float.parseFloat(valueVenta),\n fecha\n );\n\n vts.add(venta);\n }\n\n br.close();\n } catch (Exception e) {\n System.err.println(e);\n }\n\n return vts;\n }", "@GET\r\n public List<ProveedorDetailDTO> obtenerProveedores() {\r\n List<ProveedorDetailDTO> result = listEntityToDetailDTO(proveedorLogic.getProveedores());\r\n return result;\r\n }", "public List<ProcedimientoItemBean> obtenerItemsPorProcedimiento(Long idTaskInstance) {\n\t\t\n\t\tProcedimientoTaskInstanceManager taskHelper = new ProcedimientoTaskInstanceManager(idTaskInstance);\n\t\t\n\t\treturn administrarProcedimientoServicio.obtenerItemsPorProcedimiento(taskHelper.getIdProcedimiento());\n\t}", "@Override\n public List<Patente> getAllPatente() {\n return this.getDaoPatente().takeAll();\n }", "@GET\r\n\t@Path(\"notasPendentes/{id}\")\r\n\tpublic ArrayList<VendasDTO> notasPendentes(@PathParam(\"id\") int id) {\r\n\t\treturn controller.notasPendentes(id);\r\n\t}", "public List<CXPFactura> buscarFacturasPendientes(){\r\n\t\treturn getFacturaDao().buscarFacturasPendientes();\r\n\t}", "public List<ServicioTicket> obtenerTodosLosServiciosDeTicket() {\n return this.servicioTicketFacade.findAll();\n }", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\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}", "public List<Res_Agente_P> getAgentesNuevoP(int efiscal, int p, int idAgencia){\r\n\t\treturn resAgenteDAO.getAgentesNuevoP(efiscal, p, idAgencia);\r\n\t}" ]
[ "0.6921899", "0.6468108", "0.63651276", "0.62731045", "0.6200815", "0.6175741", "0.61518186", "0.6115118", "0.6114653", "0.6016264", "0.6000548", "0.5968991", "0.59628373", "0.5929147", "0.5920396", "0.5904134", "0.58667463", "0.58405066", "0.5806896", "0.5800779", "0.5785596", "0.57591575", "0.57489675", "0.5717369", "0.5709797", "0.5701871", "0.5699443", "0.5698201", "0.5680331", "0.5639414", "0.56389594", "0.5635094", "0.5634667", "0.56295466", "0.5621982", "0.5618467", "0.56178254", "0.56113005", "0.5596501", "0.5592953", "0.5581459", "0.55640787", "0.5554458", "0.5554206", "0.55326486", "0.55145067", "0.5512573", "0.55119294", "0.5506608", "0.54996365", "0.54834694", "0.5457054", "0.5454227", "0.5450258", "0.5449769", "0.5442126", "0.5432967", "0.5424841", "0.542114", "0.5417923", "0.5410949", "0.5406974", "0.54033315", "0.5392086", "0.5374414", "0.5372194", "0.5367197", "0.5366627", "0.53657806", "0.5353306", "0.534142", "0.5333849", "0.53313833", "0.53212565", "0.531205", "0.5307668", "0.5304327", "0.5295687", "0.5289103", "0.5284972", "0.5284397", "0.52821714", "0.52744156", "0.5268705", "0.52679", "0.52677846", "0.5267182", "0.5266933", "0.52528274", "0.5252099", "0.5251277", "0.52422273", "0.52336216", "0.523108", "0.52263343", "0.52262104", "0.5225503", "0.522376", "0.52202475", "0.5217592" ]
0.70731443
0
Retorna todos los registros de la tabla Productos_punto_venta que coincidan con el criterio 'id_producto = :idProducto'.
@Override public ProductosPuntoVenta[] findByProducto(Integer idProducto) throws ProductosPuntoVentaDaoException { return findByDynamicSelect(SQL_SELECT + " WHERE id_producto = ?", new Object[] { idProducto }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public ArrayList<GrupoProducto> consultarTodos(){\r\n ArrayList<GrupoProducto> grupoProducto = new ArrayList<>();\r\n for (int i = 0; i < listaGrupoProductos.size(); i++) {\r\n if (!listaGrupoProductos.get(i).isEliminado()) {\r\n grupoProducto.add(listaGrupoProductos.get(i));\r\n }\r\n }\r\n return grupoProducto;\r\n }", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "public List<ExistenciaXSedeEntity> consultaExistenciasXId(Integer idProducto){\n\t\t List<ExistenciaXSedeEntity> lista = new ArrayList<ExistenciaXSedeEntity>();\n\t\t try {\n\t\t\tlista =conexionWSProd().getPortProd().obtenerCantidadesXProducto(idProducto);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return lista;\n\t}", "public List<Producto> getProductos(Producto producto) throws Exception {\n\t\treturn null;\n\t}", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "@GetMapping(\"buscarProductos\")\n\tpublic List<Producto> getProductos(){\n\t\treturn this.productoServicios.findAll();\n\t}", "public Productos1[] buscarTodos() {\n\t\treturn productosColeccion.values().toArray(new Productos1[productosColeccion.size()]);// y te mide lo que ocupa procutosColeccion.\r\n\r\n\t}", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public List<ExistenciaMaq> buscarExistencias(final Producto producto,final Date fecha);", "public void filtrarTablaNomProducto(JTable table, String filtro) throws Conexion.DataBaseException {\n String[] titulos = {\"Id Producto\", \"Nombre Producto\", \"Tipo\", \"Cantidad en Stock\", \"Descripción\", \"Proveedor\", \"Precio\"};\n String[] registros = new String[7];\n DefaultTableModel model = new DefaultTableModel(null, titulos);\n String sql = \"SELECT * FROM Productos WHERE name LIKE '%\" + filtro + \"%'\";\n try {\n con = conectar.getConnexion();\n ps = con.prepareStatement(sql);\n rs = ps.executeQuery();\n while (rs.next()) {\n registros[0] = rs.getString(\"idProducto\"); //como se llama el campo en la base de datos\n registros[1] = rs.getString(\"name\");\n registros[2] = rs.getString(\"type\");\n registros[3] = rs.getString(\"quantity\");\n registros[4] = rs.getString(\"description\");\n registros[5] = rs.getString(\"idProveedor\");\n registros[6] = rs.getString(\"price\");\n model.addRow(registros);\n }\n table.setModel(model);\n } catch (SQLException e) {\n System.out.println(\"Error al buscar los datos: \" + e.getMessage());\n }\n }", "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 ArrayList<Producto> ListaProductos() {\n ArrayList<Producto> list = new ArrayList<Producto>();\n \n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto;\");\n while(result.next()) {\n Producto nuevo = new Producto();\n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n list.add(nuevo);\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return list;\n }", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenFirmada(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES);\n query.append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN);\n query.append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \\n\");\n query.append(\" AND FP.ID_ESTATUS = ? \\n\");\n query.append(SQL_ORDER_BY);\n logger.debug(\" [PRORROGAS DE LA ORDEN] \");\n logger.debug(\"SQL : {} \", query.toString());\n logger.debug(\"PARAMS : {} \", idOrden);\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_APROBADA_FIRMANTE.getBigIdEstatus());\n\n }", "public List<Talla> tallasProducto(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Talla> lista = new ArrayList<Talla>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idtalla, t.nombre, t.observacion FROM conftbc_talla t \"\n\t\t\t\t\t+ \" INNER JOIN conftbc_producto p ON t.idcategoria = p.idcategoria WHERE p.idproducto = \"+producto.getIdproducto();\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tTalla talla = new Talla();\n\t\t\t\ttalla.setIdtalla(rs.getInt(\"idtalla\"));\n\t\t\t\ttalla.setNombre(rs.getString(\"nombre\"));\n\t\t\t\ttalla.setObservacion(rs.getString(\"observacion\"));\n\t\t\t\tlista.add(talla);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public static String obtenerListaNombres (String producto) {\n StringBuilder sb;\n Statement stmt;\n String query;\n ResultSet result;\n try {\n iniciarConexion();\n sb = new StringBuilder();\n stmt = connection.createStatement();\n query = \"SELECT * FROM \" + producto;\n result = stmt.executeQuery(query);\n while (result.next()) {\n sb.append(result.getString(2));\n sb.append(\" \");\n }\n return sb.toString();\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return \"\";\n }\n }", "public List<Color> coloresProducto(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Color> lista = new ArrayList<Color>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idcolor, t.nombre, t.observacion FROM conftbc_color t \"\n\t\t\t\t\t+ \" INNER JOIN conftbc_producto p ON t.idmarca = p.idmarca WHERE p.idproducto = \"+producto.getIdproducto();\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tColor color = new Color();\n\t\t\t\tcolor.setIdcolor(rs.getInt(\"idcolor\"));\n\t\t\t\tcolor.setNombre(rs.getString(\"nombre\"));\n\t\t\t\tcolor.setObservacion(rs.getString(\"observacion\"));\n\t\t\t\tlista.add(color);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "@Select(FIND_ALL)\r\n public List<CProducto> findAll();", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "private void cargarProductos() {\r\n\t\tproductos = productoEJB.listarInventariosProductos();\r\n\r\n\t\tif (productos.size() == 0) {\r\n\r\n\t\t\tList<Producto> listaProductos = productoEJB.listarProductos();\r\n\r\n\t\t\tif (listaProductos.size() > 0) {\r\n\r\n\t\t\t\tMessages.addFlashGlobalWarn(\"Para realizar una venta debe agregar los productos a un inventario\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public List<Producto> buscar(String nombre) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT idproducto, nombre_producto, imagen \"\n\t\t\t\t\t+ \" FROM conftbc_producto WHERE nombre_producto like '%\"+nombre+\"%' \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n//\t\t\t\tCategoria categoria = new Categoria();\n//\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n//\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n//\t\t\t\tproducto.setCategoria(categoria);\n//\t\t\t\tMarca marca = new Marca();\n//\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n//\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n//\t\t\t\tproducto.setMarca(marca);\n//\t\t\t\tModelo modelo = new Modelo();\n//\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n//\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n//\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public BaseDatosProductos iniciarProductos() {\n\t\tBaseDatosProductos baseDatosProductos = new BaseDatosProductos();\n\t\t// construcion datos iniciales \n\t\tProductos Manzanas = new Productos(1, \"Manzanas\", 8000.0, 65);\n\t\tProductos Limones = new Productos(2, \"Limones\", 2300.0, 15);\n\t\tProductos Granadilla = new Productos(3, \"Granadilla\", 2500.0, 38);\n\t\tProductos Arandanos = new Productos(4, \"Arandanos\", 9300.0, 55);\n\t\tProductos Tomates = new Productos(5, \"Tomates\", 2100.0, 42);\n\t\tProductos Fresas = new Productos(6, \"Fresas\", 4100.0, 3);\n\t\tProductos Helado = new Productos(7, \"Helado\", 4500.0, 41);\n\t\tProductos Galletas = new Productos(8, \"Galletas\", 500.0, 8);\n\t\tProductos Chocolates = new Productos(9, \"Chocolates\", 3500.0, 806);\n\t\tProductos Jamon = new Productos(10, \"Jamon\", 15000.0, 10);\n\n\t\t\n\n\t\tbaseDatosProductos.agregar(Manzanas);\n\t\tbaseDatosProductos.agregar(Limones);\n\t\tbaseDatosProductos.agregar(Granadilla);\n\t\tbaseDatosProductos.agregar(Arandanos);\n\t\tbaseDatosProductos.agregar(Tomates);\n\t\tbaseDatosProductos.agregar(Fresas);\n\t\tbaseDatosProductos.agregar(Helado);\n\t\tbaseDatosProductos.agregar(Galletas);\n\t\tbaseDatosProductos.agregar(Chocolates);\n\t\tbaseDatosProductos.agregar(Jamon);\n\t\treturn baseDatosProductos;\n\t\t\n\t}", "@ModelAttribute(\"misproductos\")\n\tpublic List<Producto> misProductos() {\n\t\tString email = SecurityContextHolder.getContext().getAuthentication().getName();\n\t\tusuario = usuarioServicio.buscarPorEmail(email);\n\t\treturn productoServicio.productosDeUnPropietario(usuario);\n\t}", "public static List<DocumentoDetalleVo> ordenar(List<DocumentoDetalleVo> productos) {\n\t\tList<DocumentoDetalleVo> temp = new ArrayList<>();\n\t\tfor (DocumentoDetalleVo ddV : productos) {\n\t\t\tif (ddV.getProductoId().getVarios() != null && ddV.getProductoId().getVarios() != 1) {\n\t\t\t\ttemp.add(ddV);\n\t\t\t}\n\t\t}\n\t\tfor (DocumentoDetalleVo ddV : productos) {\n\t\t\tif (!temp.contains(ddV)) {\n\t\t\t\ttemp.add(ddV);\n\t\t\t}\n\t\t}\n\t\treturn temp;\n\t}", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<Producto> findAll() {\n\n\t\treturn (List<Producto>) productoDao.findAll();\n\t}", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN).append(\" WHERE P.ID_ORDEN = ? \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "@Override\r\n public List<Prova> consultarTodosProva() throws Exception {\n return rnProva.consultarTodos();\r\n }", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "public List<conteoTab> filtro() throws Exception {\n iConteo iC = new iConteo(path, this);\n try {\n fecha = sp.getString(\"date\", \"\");\n iC.nombre = fecha;\n\n List<conteoTab> cl = iC.all();\n\n for (conteoTab c : cl) {\n boolean val = true;\n for (int i = 0; i <= clc.size(); i++) {\n if (c.getIdBloque() == sp.getInt(\"bloque\", 0) || c.getIdVariedad() == sp.getInt(\"idvariedad\", 0)) {\n val = true;\n } else {\n val = false;\n }\n }\n if (val) {\n clc.add(c);\n } else {\n }\n }\n } catch (Exception e) {\n Toast.makeText(this, \"No existen registros actuales que coincidan con la fecha\", Toast.LENGTH_LONG).show();\n clc.clear();\n }\n return clc;\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 }", "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 }", "@Override\r\n\tpublic List<Producto> productosMasVendidos(@DateTimeFormat(pattern = \"dd-MM-yyyy\")Date fecha) {\n\t\treturn (List<Producto>)productoFacturaClienteDao.productosMasVendidos(fecha);\r\n\t}", "@Override\r\n\tprotected List<Producto> filtrar(Comercio comercio) {\r\n\t\tList<Producto> resultado= new ArrayList<Producto>();\r\n\t\tfor(Producto pAct:comercio.getProductos()){\r\n\t\t\tif(pAct.presentacionesSuperanStockCritico())\r\n\t\t\t\tresultado.add(pAct);\r\n\t\t}\r\n\t\treturn resultado;\r\n\t}", "public List<ProductoMaterial> getListaProductoMaterial(int idOrganizacion, Producto producto, Bodega bodega, Date fechaDesde, Date fechaHasta)\r\n/* 29: */ {\r\n/* 30:52 */ return this.reporteProyeccionKidsDao.getListaProductoMaterial(idOrganizacion, producto, bodega, fechaDesde, fechaHasta);\r\n/* 31: */ }", "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 }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public List<Produto> listar() {\n return manager.createQuery(\"select distinct (p) from Produto p\", Produto.class).getResultList();\n }", "@Override\r\n public ProductosPuntoVenta findByPrimaryKey(Integer idPuntoVenta,\r\n Integer idProducto) throws ProductosPuntoVentaDaoException {\r\n ProductosPuntoVenta[] ret = findByDynamicSelect(SQL_SELECT\r\n + \" WHERE id_pdv = ? AND id_producto = ?\", new Object[] {\r\n idPuntoVenta, idProducto });\r\n return ret.length == 0 ? null : ret[0];\r\n }", "public SgfensPedidoProducto[] findWhereIdPedidoEquals(int idPedido) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereIdAlmacenOrigenEquals(int idAlmacenOrigen) throws SgfensPedidoProductoDaoException;", "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 }", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "@WebMethod\n @WebResult(name = \"ResultadoObtenerProductos\")\n public List<Producto> consultaObtenerProductos(\n @WebParam(name = \"idIntermediario\") Long idIntermediario) {\n logger.debug(\"consultaObtenerProductos-Inicia idIntermediario:\" + idIntermediario);\n\n List<Producto> productos = new ArrayList<Producto>();\n try {\n productos = administracionParametrosService\n .obtenerProductos(idIntermediario);\n } catch (Exception e1) {\n logger.error(\"consultaObtenerProductos-Fin Error Exception:\" + e1.getMessage(), e1);\n \n }\n return productos;\n }", "public List<Proveedor> verProveedoresAll() {\n List<Proveedor> proveedores = new ArrayList<>();\n proveedores = dao.getProveedorAll();\n return proveedores;\n }", "public void listarProducto() {\n }", "public List<Producto> listar() throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idproducto, t.nombre_producto, t.imagen, t.idcategoria, t.idmarca, t.idmodelo, c.nombre as categoria, m.nombre as marca, d.nombre as modelo \"\n\t\t\t\t\t+ \" FROM conftbc_producto t INNER JOIN conftbc_categoria c on c.idcategoria = t.idcategoria\"\n\t\t\t\t\t+ \" INNER JOIN conftbc_marca m on m.idmarca = t.idmarca INNER JOIN conftbc_modelo d on d.idmodelo = t.idmodelo \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n\t\t\t\tCategoria categoria = new Categoria();\n\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n\t\t\t\tproducto.setCategoria(categoria);\n\t\t\t\tMarca marca = new Marca();\n\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n\t\t\t\tproducto.setMarca(marca);\n\t\t\t\tModelo modelo = new Modelo();\n\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public DAOTablaMenuProductos() {\r\n\t\trecursos = new ArrayList<Object>();\r\n\t}", "@Override\r\n\tpublic List<Producto> getAll() throws Exception {\n\t\treturn productRepository.buscar();\r\n\t}", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria,String palabrasClave){\n try{\n ArrayList<Producto>productosFiltrados = new ArrayList<>();\n ArrayList<Producto>productosEncontrados = busquedaProductos(categoria);\n ArrayList<String>palabras = new ArrayList<>();\n StringTokenizer tokens = new StringTokenizer(palabrasClave);\n\n while(tokens.hasMoreTokens()){\n palabras.add(tokens.nextToken()); \n }\n \n if(palabras.size()>1){\n for(String cadaPalabra : palabras){\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(cadaPalabra.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n }else{\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(palabrasClave.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n ArrayList <Producto> productosFiltradosOrdenado=getProductosOrdenados(productosFiltrados, this);\n return productosFiltradosOrdenado;\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n return null;\n }", "@Override\n\tpublic List<Produto> listarTodos() throws ControleEstoqueSqlException {\n\t\treturn null;\n\t}", "@Override\n public List<FecetProrrogaOrden> getHistoricoProrrogaPorOrden(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SELECT_PRORROGAS_RELACIONES).append(\" INNER JOIN \").append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" ORDER BY P.ID_PRORROGA_ORDEN, FP.ID_FLUJO_PRORROGA_ORDEN \");\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden);\n\n }", "public List<Tb_Prod_Painel_PromoBeans> getProdPainel(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "public void buscarproducto() {\r\n try {\r\n modelo.setNombre(vista.jTbnombre2.getText());//C.P.M le mandamos al modelo el nombre del producto\r\n rs = modelo.Buscar();//C.P.M obtenemos el resultado del modelos\r\n if (rs.equals(\"\")) {//C.P.M en caso de que el resultado venga vacio notificamos a el usuario que no encontro el producto\r\n JOptionPane.showMessageDialog(null, \"No se encontro: \" + vista.jTbnombre2.getText() + \" en la base de datos.\");\r\n }\r\n //C.P.M Para establecer el modelo al JTable\r\n DefaultTableModel buscar = new DefaultTableModel() {\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M Aqui le decimos que no seran editables los campos de la tabla\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M Auui 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 el resultado \r\n Object[] fila = new Object[cantidadColumnas];//C.P.M Creamos un objeto con el numero de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recoremos ese vector\r\n fila[i] = rs.getObject(i + 1);//C.P.M Aqui vamos insertando la informacion obtenida de la base de datos\r\n }\r\n buscar.addRow(fila);//C.P.M y agregamos el arreglo como una nueva fila a la tabla\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurio un error al buscar el producto\");\r\n }\r\n\r\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria){\n ArrayList <Producto> productosEncontrados = new ArrayList<>();\n for(Producto cadaProducto : UtilidadJavaPop.getProductosTotales()){\n if(cadaProducto.getCategoria().equals(categoria) && !productosEncontrados.contains(cadaProducto)\n && !cadaProducto.getVendedor().getCorreo().equals(this.getCorreo())){\n productosEncontrados.add(cadaProducto);\n }\n }\n ArrayList<Producto>productosEncontradosOrdenado = getProductosOrdenados(productosEncontrados, this);\n return productosEncontradosOrdenado;\n \n }", "public Producto BuscarProducto(int id) {\n Producto nuevo = new Producto();\n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto where idproducto=\"+id+\";\");\n while(result.next()) {\n \n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return nuevo;\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}", "public List<ReciboPension> buscarRecibosAlumno(\tlong idAlumno) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"select r from ReciboPension r where r.alumno.idPersona = :id\")\n \t\t.setParameter(\"id\", idAlumno).getResultList();\n\t\t}", "private List<Produto> todosProdutos() {\n\t\treturn produtoService.todosProdutos();\n\t}", "public void buscarxdescrip() {\r\n try {\r\n modelo.setDescripcion(vista.jTbdescripcion.getText());//C.P.M le enviamos al modelo la descripcion y consultamos\r\n rs = modelo.Buscarxdescrip();//C.P.M cachamos el resultado de la consulta\r\n\r\n DefaultTableModel buscar = 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.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo a la tabla\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"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 columnas de la consulta\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con una dimencion igual a 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 vamos insertando los resultados dentor del arreglo\r\n }\r\n buscar.addRow(fila);//C.P.M y lo agregamos como una nueva fila a la tabla\r\n }\r\n\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar producto por descripcion\");\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Profilo> getAll() {\r\n\t\t//Recupero la sessione da Hibernate\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\t//Creo la query usando il linguaggio HQL (Hibernate Query Language)\r\n\t\tQuery query = session.createQuery(\"FROM Vocelicenza\");\r\n\t\t\t\r\n\t\t//Restituisco la lista di Profili\r\n\t\treturn query.list();\r\n\t}", "List<CarritoProductoResponseDTO> consultarCarritoCompras(String userName,TipoMoneda tipoMoneda);", "public List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "public SgfensPedidoProducto[] findWhereIdConceptoEquals(int idConcepto) throws SgfensPedidoProductoDaoException;", "public void llenarTabla() {\n DefaultTableModel modelos = (DefaultTableModel) tableProducto.getModel();\n while (modelos.getRowCount() > 0) {\n modelos.removeRow(0);\n }\n MarcaDAO marcaDao = new MarcaDAO();\n CategoriaProductoDAO catProDao = new CategoriaProductoDAO();\n ProductoDAO proDao = new ProductoDAO();\n Marca marca = new Marca();\n CategoriaProducto catPro = new CategoriaProducto();\n\n for (Producto producto : proDao.findAll()) {\n DefaultTableModel modelo = (DefaultTableModel) tableProducto.getModel();\n modelo.addRow(new Object[10]);\n int nuevaFila = modelo.getRowCount() - 1;\n tableProducto.setValueAt(producto.getIdProducto(), nuevaFila, 0);\n tableProducto.setValueAt(producto.getNombreProducto(), nuevaFila, 1);\n tableProducto.setValueAt(producto.getCantidadProducto(), nuevaFila, 2);\n tableProducto.setValueAt(producto.getPrecioCompra(), nuevaFila, 3);\n tableProducto.setValueAt(producto.getPrecioVenta(), nuevaFila, 4);\n tableProducto.setValueAt(producto.getFechaCaducidadProducto(), nuevaFila, 5);\n tableProducto.setValueAt(producto.getFechaCaducidadProducto(), nuevaFila, 6);\n tableProducto.setValueAt(producto.getDescripcionProducto(), nuevaFila, 7);\n marca.setIdMarca(producto.getFK_idMarca());\n tableProducto.setValueAt(marcaDao.findBy(marca, \"idMarca\").get(0).getNombreMarca(), nuevaFila, 8);//PARA FK ID MARCA\n catPro.setIdCategoriaProducto(producto.getFK_idCategoriaProducto());\n tableProducto.setValueAt(catProDao.findBy(catPro, \"idCategoriaProducto\").get(0).getNombreCategoriaProducto(), nuevaFila, 9);\n //PARA FK ID CATEGORIA PRODUCTO\n\n }\n }", "public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "public List<ItemProducto> obtenerTodosLosProductosDeUnCliente(ClienteEmpresa clienteIDSeleccionado) {\n return clienteIDSeleccionado != null ? this.itemProductoFacade.obtenerTodosLosProductosDeCliente(clienteIDSeleccionado.getContratoList()) : null;\n }", "public List<ProveedorPromocionHotelEntity> getPromociones(){\n List<ProveedorPromocionHotelEntity>promociones = proveedorPromocionHotelPersistence.findAll();\n return promociones;\n }", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<ProdutoPedido> buscarTodos() {\n\t\treturn dao.findAll();\n\t}", "public List<ProyeccionKid> getListaProyeccionKids(int idOrganizacion, Producto producto, Bodega bodega, Date fechaDesde, Date fechaHasta)\r\n/* 34: */ {\r\n/* 35:62 */ List<ProyeccionKid> listaProyeccionKid = new ArrayList();\r\n/* 36:63 */ for (ProductoMaterial productoMaterial : getListaProductoMaterial(0, null, null, null, null))\r\n/* 37: */ {\r\n/* 38:64 */ ProyeccionKid proyeccionKid = new ProyeccionKid();\r\n/* 39:65 */ proyeccionKid.setProductoMaterial(productoMaterial);\r\n/* 40:66 */ proyeccionKid.setStock(getStock(productoMaterial.getMaterial(), null, null, null));\r\n/* 41:67 */ proyeccionKid.setSaldo(proyeccionKid.getStock().divide(productoMaterial.getCantidad(), RoundingMode.HALF_UP));\r\n/* 42:68 */ listaProyeccionKid.add(proyeccionKid);\r\n/* 43: */ }\r\n/* 44:70 */ return listaProyeccionKid;\r\n/* 45: */ }", "public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "@Override\n public List<FecetProrrogaOrden> getProrrogaPorOrdenEstatusPendienteAuditor(final BigDecimal idOrden) {\n\n StringBuilder query = new StringBuilder();\n query.append(SELECT_PRORROGAS_RELACIONES).append(SQL_LEFT_JOIN).append(NAME_TABLE_PRORROGA_ORDEN)\n .append(SQL_FP);\n query.append(SQL_INNER_ID_PRORROGA_ORDEN);\n query.append(\" WHERE P.ID_ORDEN = ? \");\n query.append(\" AND P.ID_ESTATUS = ? \");\n query.append(\" AND (FP.ID_FLUJO_PRORROGA_ORDEN IS NULL OR FP.ID_ESTATUS = ? ) \");\n query.append(SQL_ORDER_BY);\n\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenConRelacionesMapper(), idOrden,\n EstatusProrroga.PRORROGA_PENDIENTE_APROBACION.getBigIdEstatus(),\n EstatusFlujoProrroga.RESOLUCION_PRORROGA_RECHAZADA_FIRMANTE.getBigIdEstatus());\n }", "public List<Tipousr> findAllTipos(){\n\t\t List<Tipousr> listado;\n\t\t Query q;\n\t\t em.getTransaction().begin();\n\t\t q=em.createQuery(\"SELECT u FROM Tipousr u ORDER BY u.idTipousr\");\n\t\t listado= q.getResultList();\n\t\t em.getTransaction().commit();\n\t\t return listado;\n\t\t \n\t\t}", "public List<UsuarioxLibro> todoPorUsuario(int idUsuario) {\r\n Connection con = Conexion.getConnection();\r\n PreparedStatement ps;\r\n ResultSet rs;\r\n List<UsuarioxLibro> uxl = new ArrayList<>();\r\n String sql = \"select * from usuarioxlibro where idusuario =\" + idUsuario;\r\n UsuarioxLibro usli;\r\n try {\r\n ps = con.prepareStatement(sql);\r\n rs = ps.executeQuery();\r\n while (rs.next()) {\r\n usli = new UsuarioxLibro(idUsuario, rs.getInt(\"idlibro\"), rs.getDouble(\"nota\"), rs.getBoolean(\"evaluacion\"), rs.getDouble(\"puntuacion\"));\r\n uxl.add(usli);\r\n }\r\n ps.close();\r\n rs.close();\r\n con.close();\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n return uxl;\r\n }", "public ArrayList<PedidoProduto> selecionarPorId(String Id) {\n String sql = \"SELECT * FROM pedidos \"\n + \"LEFT JOIN pedidosprodutos ON pedidosprodutos.PedidoId = pedidos.Id \"\n + \"LEFT JOIN produtos ON pedidosprodutos.ProdutoId = produtos.Id \"\n + \"LEFT JOIN estoque ON estoque.ProdutoId = produtos.Id \"\n + \"LEFT JOIN usuarios ON pedidos.UsuarioId = usuarios.Id \"\n + \"WHERE pedidos.Id = ?\";\n int queryId = Integer.parseInt(Id);\n try {\n conn = connFac.getConexao();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, queryId);\n rs = stmt.executeQuery();\n while(rs.next()) {\n Pedido pedido = new Pedido();\n this.helper.fillPedido(pedido, rs);\n \n Usuario usuario = new Usuario();\n this.helper.fillUsuario(usuario, rs);\n pedido.setSolicitante(usuario);\n \n Produto produto = new Produto();\n this.helper.fillProduto(produto, rs);\n \n PedidoProduto pedidoProduto = new PedidoProduto();\n this.helper.fillPedidoProduto(pedidoProduto, pedido, produto, rs);\n \n pedidosProdutos.add(pedidoProduto);\n }\n connFac.closeAll(rs, stmt, st, conn);\n return pedidosProdutos;\n } catch (SQLException error) {\n Methods.getLogger().error(\"PedidoDAO.selecionarPorId: \" + error);\n throw new RuntimeException(\"PedidoDAO.selecionarPorId: \" + error);\n }\n }", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "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 }", "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<Veiculo> listarTodosVeiculos(){\n\t\tList<Veiculo> listar = null;\n\t\t\n\t\ttry{\n\t\t\tlistar = veiculoDAO.listarTodosVeiculos();\n\t\t}catch(Exception e){\n\t\t\te.getMessage();\n\t\t}\n\t\treturn listar;\n\t}", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\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}", "@GetMapping(\"/productos\")\n @Timed\n public List<Producto> getAllProductos() {\n log.debug(\"REST request to get all Productos\");\n List<Producto> productos = productoRepository.findAll();\n return productos;\n }", "public List<ServicioTicket> obtenerTodosLosServiciosDeTicket() {\n return this.servicioTicketFacade.findAll();\n }", "public List<ReciboPension> buscarRecibosDependientes(long idPersona) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"\tselect r from ReciboPension r where r.alumno.idPersona\tin ( select a.idPersona from Apoderado ap inner join ap.alumnos a \twhere ap.idPersona = :id ) \")\n \t\t.setParameter(\"id\", idPersona).getResultList();\n\t}", "public List getPorReferenteAProduto(long id) throws DaoException {\n\t\t// Existe no DAO\n\t\tCompartilhamentoProdutoDao dao = getDao();\n\t\tDaoConexao conn = dao.criaConexao();\n\t\tdao.setConexao(conn);\n\t\treturn dao.ListaPorProdutoReferenteA(id);\n\t}", "@Test\n public void puedeObtenerProductos() {\n Producto pro1 = new Producto(1, \"mate\", 15.4, 10);\n Producto pro2 = new Producto(2, \"termo\", 20.7, 15);\n List<Producto> productosEncontrados = List.of(pro1, pro2);\n\n\n //Act\n productoRepositoryTest.findAll();\n when(productoServiceTest.listarAll()).thenReturn(productosEncontrados);\n\n //Assert\n verify(productoRepositoryTest).findAll();\n assertEquals(productosEncontrados, productoRepositoryTest.findAll());\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 }", "public List getPorPertenceAProduto(long id) throws DaoException {\n\t\tsetMontador(null);\n\t\tString sql;\n \tsql = \"select \" + camposOrdenadosJoin() + \" from \" + tabelaSelect() + \n outterJoinAgrupado() +\n \t\" where id_produto_pa = \" + id + orderByLista();\n \tsetMontador(getMontadorAgrupado());\n \treturn getListaSql(sql);\n\t}", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public ArrayList consultarTodo() {\n Cursor cursor = this.myDataBase.rawQuery(\"SELECT des_invfisico_tmp._id,des_invfisico_tmp.cod_ubicacion,des_invfisico_tmp.cod_referencia,des_invfisico_tmp.cod_plu,plu.descripcion FROM des_invfisico_tmp LEFT OUTER JOIN plu ON plu.cod_plu = des_invfisico_tmp.cod_plu \", null);\n ArrayList arrayList = new ArrayList();\n new ArrayList();\n if (cursor.moveToFirst()) {\n do {\n for (int i = 0; i <= 4; ++i) {\n if (cursor.isNull(i)) {\n arrayList.add(\"\");\n continue;\n }\n arrayList.add(cursor.getString(i));\n }\n } while (cursor.moveToNext());\n }\n\n return arrayList;\n }" ]
[ "0.68946606", "0.62856543", "0.6273333", "0.6241328", "0.6210546", "0.6106984", "0.60910773", "0.6014217", "0.60113513", "0.60063833", "0.5992422", "0.596636", "0.59602594", "0.5934711", "0.593031", "0.5887734", "0.5880886", "0.5840338", "0.5834083", "0.58271736", "0.5821713", "0.58072096", "0.5785774", "0.5782037", "0.5779253", "0.5777584", "0.57461154", "0.5744582", "0.5736007", "0.57334846", "0.5729633", "0.572962", "0.5710739", "0.5693221", "0.5691951", "0.566449", "0.5645265", "0.5641515", "0.56407666", "0.56359446", "0.56292", "0.5623377", "0.5614813", "0.56107265", "0.56103635", "0.5607186", "0.56069416", "0.5606129", "0.5592514", "0.5590441", "0.558689", "0.55759406", "0.5561253", "0.5552464", "0.55504745", "0.5549368", "0.55493665", "0.5546441", "0.55395025", "0.5534544", "0.5534438", "0.552955", "0.55281454", "0.55272233", "0.5523333", "0.55220616", "0.5519727", "0.551487", "0.5504232", "0.5503733", "0.5502078", "0.5497244", "0.5492231", "0.54897475", "0.5484917", "0.54789776", "0.5473504", "0.5471215", "0.5470826", "0.54622704", "0.5461854", "0.54584193", "0.54520833", "0.54514605", "0.5449274", "0.54452986", "0.5444422", "0.5439543", "0.54383886", "0.5436199", "0.5432985", "0.5425824", "0.5417797", "0.5417092", "0.5412055", "0.5408465", "0.540838", "0.5405772", "0.540488", "0.5397087" ]
0.68376774
1
Retorna todos los registros de la tabla Productos_punto_venta que coincidan con la sentencia SQL especificada arbitrariamente
@Override public ProductosPuntoVenta[] findByDynamicSelect(String sql, Object[] sqlParams) throws ProductosPuntoVentaDaoException { PreparedStatement stmt = null; ResultSet rs = null; try { // Validamos la conexion this.validateConnection(); System.out.println("Executing " + sql); // prepare statement stmt = userConn.prepareStatement(sql); stmt.setMaxRows(maxRows); // se setean los parametros de la consulta for (int i = 0; sqlParams != null && i < sqlParams.length; i++) { stmt.setObject(i + 1, sqlParams[i]); } System.out.println(sql); rs = stmt.executeQuery(); // recuperamos los resultados return fetchMultiResults(rs); } catch (SQLException e) { e.printStackTrace(); throw new ProductosPuntoVentaDaoException("Exception: " + e.getMessage(), e); } finally { ResourceManager.close(rs); ResourceManager.close(stmt); if (userConn != null) { ResourceManager.close(userConn); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "public List<Tb_Prod_Painel_PromoBeans> 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 void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}", "public void buscarxdescrip() {\r\n try {\r\n modelo.setDescripcion(vista.jTbdescripcion.getText());//C.P.M le enviamos al modelo la descripcion y consultamos\r\n rs = modelo.Buscarxdescrip();//C.P.M cachamos el resultado de la consulta\r\n\r\n DefaultTableModel buscar = 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.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo a la tabla\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"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 columnas de la consulta\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con una dimencion igual a 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 vamos insertando los resultados dentor del arreglo\r\n }\r\n buscar.addRow(fila);//C.P.M y lo agregamos como una nueva fila a la tabla\r\n }\r\n\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar producto por descripcion\");\r\n }\r\n }", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "public List<Tb_Prod_Painel_PromoBeans> getProdPainel(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "public static String obtenerListaNombres (String producto) {\n StringBuilder sb;\n Statement stmt;\n String query;\n ResultSet result;\n try {\n iniciarConexion();\n sb = new StringBuilder();\n stmt = connection.createStatement();\n query = \"SELECT * FROM \" + producto;\n result = stmt.executeQuery(query);\n while (result.next()) {\n sb.append(result.getString(2));\n sb.append(\" \");\n }\n return sb.toString();\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return \"\";\n }\n }", "public synchronized static String lista_Dr_regt_equiparaciones() {\n String sql = \"Select a.eqp_sol_numero,a.solte_id,B.solte_nombre,a.eqp_carrera_continuar_est,c.smrprle_program_desc,a.eqp_grado_continuar,a.eqp_fecha_atencion_usuario,a.eqp_fecha_area_rec,a.eqp_fecha_envio_unidad,a.eqp_fecha_recepcion_final,a.eqp_total_pagar,a.eqp_estado,a.eqp_numero_sesion,a.eqp_fecha_sesion,a.eqp_observaciones,a.eqp_periodo, EXTRACT(YEAR FROM TO_DATE (sysdate)) annoActual, a.eqp_fecha_recepcion_orer,b.solte_apellidos_solicitante, b.Solte_nombre_solicitante, b.solte_seg_nombre_solicitante from DR_REGT_EQUIPARACIONES a inner join DR_REGT_SOLICITANTE B ON A.solte_id = B.solte_id inner join SMRPRLE c on REPLACE(a.eqp_carrera_continuar_est,'Ñ','N') = REPLACE(c.smrprle_program,'Ñ','N') WHERE EQP_ESTADO != 3 order by a.EQP_FECHA_ATENCION_USUARIO desc\";\n return (sql);\n }", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "@Override\r\n public List<QuestaoMultiplaEscolha> consultarTodosQuestaoMultiplaEscolha()\r\n throws Exception {\n return rnQuestaoMultiplaEscolha.consultarTodos();\r\n }", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "@Override\r\n public List<Prova> consultarTodosProva() throws Exception {\n return rnProva.consultarTodos();\r\n }", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "public void buscarproducto() {\r\n try {\r\n modelo.setNombre(vista.jTbnombre2.getText());//C.P.M le mandamos al modelo el nombre del producto\r\n rs = modelo.Buscar();//C.P.M obtenemos el resultado del modelos\r\n if (rs.equals(\"\")) {//C.P.M en caso de que el resultado venga vacio notificamos a el usuario que no encontro el producto\r\n JOptionPane.showMessageDialog(null, \"No se encontro: \" + vista.jTbnombre2.getText() + \" en la base de datos.\");\r\n }\r\n //C.P.M Para establecer el modelo al JTable\r\n DefaultTableModel buscar = new DefaultTableModel() {\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M Aqui le decimos que no seran editables los campos de la tabla\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M Auui 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 el resultado \r\n Object[] fila = new Object[cantidadColumnas];//C.P.M Creamos un objeto con el numero de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recoremos ese vector\r\n fila[i] = rs.getObject(i + 1);//C.P.M Aqui vamos insertando la informacion obtenida de la base de datos\r\n }\r\n buscar.addRow(fila);//C.P.M y agregamos el arreglo como una nueva fila a la tabla\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurio un error al buscar el producto\");\r\n }\r\n\r\n }", "public void buscaTodasOSs() {\n try {\n ServicoDAO sDAO = new ServicoDAO(); // instancia a classe ProdutoDB()\n ArrayList<OS> cl = sDAO.consultaTodasOs(); // coloca o método dentro da variável\n\n DefaultTableModel modeloTabela = (DefaultTableModel) jTable1.getModel();\n // coloca a tabela em uma variável do tipo DefaultTableModel, que permite a modelagem dos dados da tabela\n\n for (int i = modeloTabela.getRowCount() - 1; i >= 0; i--) {\n modeloTabela.removeRow(i);\n // loop que limpa a tabela antes de ser atualizada\n }\n\n for (int i = 0; i < cl.size(); i++) {\n // loop que pega os dados e insere na tabela\n Object[] dados = new Object[7]; // instancia os objetos. Cada objeto representa um atributo \n dados[0] = cl.get(i).getNumero_OS();\n dados[3] = cl.get(i).getStatus_OS();\n dados[4] = cl.get(i).getDefeito_OS();\n dados[5] = cl.get(i).getDataAbertura_OS();\n dados[6] = cl.get(i).getDataFechamento_OS();\n\n // pega os dados salvos do banco de dados (que estão nas variáveis) e os coloca nos objetos definidos\n modeloTabela.addRow(dados); // insere uma linha nova a cada item novo encontrado na tabela do BD\n }\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Falha na operação.\\nErro: \" + ex.getMessage());\n } catch (Exception ex) {\n Logger.getLogger(FrmPesquisar.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static String todosLosEmpleados(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=1;\";\n return query;\n }", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "public ArrayList<DTOcantComentarioxComercio> listaOrdenadaxComentario() {\n ArrayList<DTOcantComentarioxComercio> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select co.nombre, count (Comentarios.id_comercio) comentarios\\n\"\n + \"from Comentarios join Comercios co on co.id_comercio = Comentarios.id_comercio\\n\"\n + \"group by co.nombre\\n\"\n + \"order by comentarios\");\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cant = rs.getInt(2);\n\n DTOcantComentarioxComercio oc = new DTOcantComentarioxComercio(nombreO, cant);\n\n lista.add(oc);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public static String buscarTodosLosLibros() throws Exception{ //BUSCARtODOS no lleva argumentos\r\n //primero: nos conectamos a oracle con la clase conxion\r\n \r\n Connection con=Conexion.conectarse(\"system\",\"system\");\r\n //segundo: generamos un statemenr de sql con la conexion anterior\r\n Statement st=con.createStatement();\r\n //3: llevamos a cabo la consulta select \r\n ResultSet res=st.executeQuery(\"select * from persona\"); //reset arreglo enmutado de java estructura de datos\r\n System.out.println(\"depues del select\");\r\n int indice=0;\r\n ArrayList<persona> personas=new ArrayList<persona>();\r\n while(res.next()){ //del primero hasta el ultimo prod que vea SI PONGO SECUENCIA NO ENTRA AL WHILE\r\n Integer id= res.getInt(1); \r\n String nombre=res.getString(2);\r\n String empresa=res.getString(3);\r\n Integer edad=res.getInt(4);\r\n String telefono=res.getString(5);\r\n \r\n ///llenamos el arrayList en cada vuelta\r\n personas.add(new persona(id,nombre,empresa,edad,telefono));\r\n \r\n System.out.println(\"estoy en el array list despues del select\");\r\n }\r\n \r\n //el paso final, transformamos a objeto json con jackson\r\n ObjectMapper maper=new ObjectMapper(); //mapeo a objeto jackson\r\n \r\n st.close();\r\n con.close();\r\n System.out.println(\"convirtiendo el json\");\r\n return maper.writeValueAsString(personas);\r\n \r\n }", "public void buscaxnombre() {\r\n try {\r\n modelo.setNombre(vistabuscapro.jTvnombre.getText());//C.P.M le mandamos a el modelo el nombre para consultarlo\r\n rs = modelo.Buscarxnombre();//C.P.M ejecutamo el metodo del modelo y atrapamos el resultado\r\n\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M se establese el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M no sera editable\r\n return false;\r\n }\r\n };\r\n vistabuscapro.Tproductos.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"los encabeados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de el resultado\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de columnas\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un objeto con la cantidad de columnas obtenidas\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 le agregamos la informacion obtenida\r\n }\r\n buscar.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 un error al buscar por nombre\");\r\n }\r\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 Productos1[] buscarTodos() {\n\t\treturn productosColeccion.values().toArray(new Productos1[productosColeccion.size()]);// y te mide lo que ocupa procutosColeccion.\r\n\r\n\t}", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "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 }", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "public static String todosLosEmpleados_baja(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=0;\";\n return query;\n }", "public void filtrarTablaNomProducto(JTable table, String filtro) throws Conexion.DataBaseException {\n String[] titulos = {\"Id Producto\", \"Nombre Producto\", \"Tipo\", \"Cantidad en Stock\", \"Descripción\", \"Proveedor\", \"Precio\"};\n String[] registros = new String[7];\n DefaultTableModel model = new DefaultTableModel(null, titulos);\n String sql = \"SELECT * FROM Productos WHERE name LIKE '%\" + filtro + \"%'\";\n try {\n con = conectar.getConnexion();\n ps = con.prepareStatement(sql);\n rs = ps.executeQuery();\n while (rs.next()) {\n registros[0] = rs.getString(\"idProducto\"); //como se llama el campo en la base de datos\n registros[1] = rs.getString(\"name\");\n registros[2] = rs.getString(\"type\");\n registros[3] = rs.getString(\"quantity\");\n registros[4] = rs.getString(\"description\");\n registros[5] = rs.getString(\"idProveedor\");\n registros[6] = rs.getString(\"price\");\n model.addRow(registros);\n }\n table.setModel(model);\n } catch (SQLException e) {\n System.out.println(\"Error al buscar los datos: \" + e.getMessage());\n }\n }", "@Override\n\tpublic List<Produto> listarTodos() throws ControleEstoqueSqlException {\n\t\treturn null;\n\t}", "public ArrayList<GrupoProducto> consultarTodos(){\r\n ArrayList<GrupoProducto> grupoProducto = new ArrayList<>();\r\n for (int i = 0; i < listaGrupoProductos.size(); i++) {\r\n if (!listaGrupoProductos.get(i).isEliminado()) {\r\n grupoProducto.add(listaGrupoProductos.get(i));\r\n }\r\n }\r\n return grupoProducto;\r\n }", "public void actualizarFiltrarEstadoRequisicion(Requisicion req) throws Exception{\n String carnet = req.getCarnetEmpleado();\n\n java.util.Date utilDate = req.getFechaNueva();\n java.sql.Date fechaConvertida = new java.sql.Date(utilDate.getTime()); \n\n List<Requisicion> requisicion = new ArrayList<>();\n \n Connection miConexion = null;\n Statement miStatement = null;\n ResultSet miResultset = null; \n\n \n //Establecer la conexion\n miConexion = origenDatos.getConexion();\n \n \n //Verificar si existe empleado\n String sqlEmpleado = \"Select CARNETEMPLEADO FROM EMPLEADO WHERE CARNETEMPLEADO = '\"+carnet+\"'\";\n miStatement = miConexion.createStatement();\n miResultset = miStatement.executeQuery(sqlEmpleado);\n \n if(miResultset.next()){\n \n String empleado = carnet;\n \n \n String sqlDepto = \"select d.NOMBREDEPARTAMENTO from departamento d \" + \n \"inner join catalagopuesto c on d.codigodepartamento = c.codigodepartamento \" + \n \"inner join empleado e on c.codigopuesto = e.codigopuesto where e.carnetempleado ='\"+carnet+\"'\";\n \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(sqlDepto);\n //Crear sentencia SQL y Statement\n miResultset.next();\n String nomdepto = miResultset.getString(\"NOMBREDEPARTAMENTO\");\n \n String miSQl = \"select r.NUMREQ, r.FECPEDIDOREQ, r.FECENTREGAREQ, r.AUTORIZADO, e.CARNETEMPLEADO, e.NOMBREEMPLEADO, e.APELLIDOEMPLEADO, d.NOMBREDEPARTAMENTO \" + \n \"from requisicion r inner join empleado e on r.carnetempleado =e.carnetempleado \" + \n \"inner join catalagopuesto c on e.codigopuesto =c.codigopuesto \" + \n \"inner join departamento d on c.codigodepartamento = d.codigodepartamento \" + \n \"where r.AUTORIZADO = 1 and d.NOMBREDEPARTAMENTO='\"+nomdepto+\"' and r.FECPEDIDOREQ >=TO_DATE('\"+fechaConvertida+\"', 'YYYY/MM/DD HH:MI:SS') order by r.FECPEDIDOREQ\";\n \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(miSQl);\n \n while(miResultset.next()){\n int numReq = miResultset.getInt(\"NUMREQ\");\n Date fechaPedido = miResultset.getDate(\"FECPEDIDOREQ\");\n Date fechaEntrega = miResultset.getDate(\"FECENTREGAREQ\"); \n String carnetEmpleado = miResultset.getString(\"CARNETEMPLEADO\");\n String nombreEmpleado = miResultset.getString(\"NOMBREEMPLEADO\"); \n String apellidoEmpleado = miResultset.getString(\"APELLIDOEMPLEADO\");\n String nombreDepartamento = miResultset.getString(\"NOMBREDEPARTAMENTO\"); \n\n //*************************ACTUALIZAR**************************\n Connection miConexion1 = null;\n PreparedStatement miStatement1 = null;\n \n //Obtener la conexion\n \n miConexion1 = origenDatos.getConexion();\n \n //Crear sentencia sql que inserte la requisicion a la base\n String misql = \"UPDATE requisicion SET autorizado = ? WHERE numreq = ?\";\n \n miStatement1 = miConexion1.prepareStatement(misql);\n \n //Establecer los parametros para insertar la requisicion \n if(\"aceptado\".equals(req.getEstadoAut())) {\n miStatement1.setInt(1, 0);\n }else{\n miStatement1.setInt(1, 1);\n } \n\n miStatement1.setInt(2, numReq);//se obtendra dentro del while\n \n //Ejecutar la instruccion sql\n miStatement1.execute(); \n //Requisicion temporal = new Requisicion(numReq, fechaPedido, fechaEntrega, carnetEmpleado, nombreEmpleado, apellidoEmpleado, nombreDepartamento);\n //requisicion.add(temporal);\n }\n \n }\n //return requisicion; \n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "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 ArrayList<TicketDto> consultarVentasChance(String fecha, String moneda) {\n ArrayList<TicketDto> lista = new ArrayList();\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,sum(vrl_apuesta) \"\n + \"FROM ticket\"\n + \" where \"\n + \" fecha='\" + fecha + \"' and moneda='\" + moneda + \"' group by codigo\";\n\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n TicketDto dto = new TicketDto();\n dto.setCodigo(rs.getString(1));\n dto.setValor(rs.getInt(2));\n dto.setMoneda(moneda);\n lista.add(dto);\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorPremio.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n }", "public List<ItemVenda> getItemVenda(Lancamento lancamento) {\r\n\r\n List<ItemVenda> resultado = new ArrayList<ItemVenda>();\r\n Connection con = pool.getConnection();\r\n PreparedStatement ps = null;\r\n ResultSet rs = null;\r\n String sqlSelect = \"SELECT \\n\" +\r\n \" *\\n\" +\r\n \"FROM\\n\" +\r\n \" (SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PRODUTO AS CODIGO_PRODUTO,\\n\" +\r\n \" D.NOME_PRODUTO AS DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PRODUTO D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PRODUTO_CODIGO_PRODUTO = D.CODIGO_PRODUTO UNION ALL SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PACOTE_PROMOCIONAL AS CODIGO_PRODUTO,\\n\" +\r\n \" D.DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PACOTE_PROMOCIONAL D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PACOTE_PROMOCIONAL_CODIGO_PACOTE_PROMOCIONAL = D.CODIGO_PACOTE_PROMOCIONAL) AS CONSULTA\\n\" +\r\n \" WHERE CODIGO_LANCAMENTO = ?\";\r\n\r\n try {\r\n ps = con.prepareStatement(sqlSelect);\r\n ps.setInt(1, lancamento.getCodigo_lancamento());\r\n\r\n rs = ps.executeQuery();\r\n\r\n resultado = getListaItensVenda(rs);\r\n\r\n ps.close();\r\n } catch (ParseException ex) {\r\n return null;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(LocacaoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n pool.liberarConnection(con);\r\n }\r\n return resultado;\r\n }", "@Override\n public List<UfficioTecnico> getAll() throws SQLException {\n final Connection connection = connectionManager.getConnection();\n try {\n final PreparedStatement preparedStatement = connection\n .prepareStatement(SELECT_ALL);\n final ResultSet rs = preparedStatement.executeQuery();\n final List<UfficioTecnico> uffici = new ArrayList<UfficioTecnico>();\n while (rs.next()) {\n final UfficioTecnico uff = new UfficioTecnico();\n uff.setId(rs.getInt(\"Id\"));\n uff.setNome(rs.getString(\"nome\"));\n uff.setTel(rs.getString(\"tel\"));\n uff.setEmail(rs.getString(\"email\"));\n uff.setUbicazione(rs.getString(\"ubicazione\"));\n uffici.add(uff);\n }\n return uffici;\n } finally {\n connectionManager.freeConnection(connection);\n }\n }", "public Object[][] seleccionarEventosTodos(Connection conn) {\r\n\t\tint totalRows = 0;\r\n\r\n\t\tObject datos2[][] = null;\r\n\t\ttry {\r\n\r\n\t\t\tint cont = 0;\r\n\r\n\t\t\tPreparedStatement statement = conn\r\n\t\t\t\t\t.prepareStatement(\"select ID_ALERTA, DESCRIPCION, FECHA_INI, FECHA_FIN, ESTADO, DESCRIPCION2 from alertas limit 200\");\r\n\t\t\tResultSet rs = statement.executeQuery();\r\n\t\t\trs.last();\r\n\t\t\ttotalRows = rs.getRow();\r\n\t\t\trs.beforeFirst();\r\n\t\t\tObject datos[][] = new Object[totalRows][6];\r\n\r\n\t\t\twhile (rs.next()) {\r\n\r\n\t\t\t\tdatos[cont][0] = rs.getString(\"ID_ALERTA\");\r\n\t\t\t\tdatos[cont][1] = rs.getString(\"DESCRIPCION\");\r\n\t\t\t\tdatos[cont][2] = rs.getDate(\"FECHA_INI\");\r\n\t\t\t\tdatos[cont][3] = rs.getDate(\"FECHA_FIN\");\r\n\t\t\t\tdatos[cont][4] = rs.getString(\"ESTADO\");\r\n\t\t\t\tdatos[cont][5] = rs.getString(\"DESCRIPCION2\");\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tdatos2 = datos;\r\n\t\t\tstatement.close();\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tJOptionPane.showMessageDialog(null, \"\" + e.getMessage(), \"Alerta!\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\r\n\t\t}\r\n\t\treturn datos2;\r\n\t}", "public void iniciarProduccion(){\n try {\n Connection conn = Conectar.conectar();\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select nick from usuarios where nick in(select usuario from construcciones) or nick \"\n +\"in(select usuario from investigaciones) or nick in(select usuario from movimientos)\");\n\n while(rs.next()){\n produccion.add(new Construcciones(rs.getString(1)));\n System.out.println(rs.getString(1));\n }\n\n st.close();\n rs.close();\n conn.close();\n\n }catch(SQLException e){\n System.out.println(\"Fallo actualizacion de produccion.\");\n }\n}", "public String[][] obtenerConsultas(){\n //VARIABLES PARA ALMACENAR LOS DATOS DE LA BASE DE DATOS\n int i = 0;\n String[][] datos = new String[obtenerRegistros()][5];\n //SE INTENTA HACE LA CONEXION Y OBTENER LOS RSULTDOS\n try {\n //METODOS DE CONEXION\n Connection connect = getConnection();\n PreparedStatement ps;\n ResultSet res;\n\n //QUERY PARA OBTENER LOS VALORES\n ps = connect.prepareStatement(\"SELECT nombre, apellidos, incentivo, descuentos, total FROM personal INNER JOIN nomina ON personal.id = nomina.id;\");\n res = ps.executeQuery();\n \n while (res.next()) {\n //SE ALMACENANAN LOS DATOS DE LA BASE DE DATOS EN EL ARREGLO\n datos[i][0] = res.getString(\"nombre\");\n datos[i][1] = res.getString(\"apellidos\");\n datos[i][2] = res.getString(\"incentivo\");\n datos[i][3] = res.getString(\"descuentos\");\n datos[i][4] = res.getString(\"total\"); \n i++; \n }\n //SE CIERRA LA CONEXION Y SE RETORNAN LOS DATOS OBTENIDOS\n connect.close();\n return datos;\n }\n //EN CASO DE ERROR SE MUESTRA EL MENSAJE \n catch (Exception e) {\n System.out.println(\"error en resultado: \"+e);\n JOptionPane.showMessageDialog(null, \"Hubo un error:\"+e);\n return datos;\n }\n }", "public List<Curso> recuperaTodosCursos(){\r\n Connection conexao = ConexaoComBD.conexao();\r\n //instrução sql\r\n String sql = \"SELECT * FROM curso;\";\r\n try {\r\n //statement de conexão\r\n PreparedStatement ps = conexao.prepareStatement(sql);\r\n //recebe a tabela de retorno do banco de dados em um formato java\r\n ResultSet rs = ps.executeQuery();\r\n //criar lista de retorno\r\n List<Curso> lista = new ArrayList<>();\r\n \r\n //tratar o retorno do banco\r\n \r\n while(rs.next()){\r\n //criar um objeto modelo do tipo do retorno \r\n Curso c = new Curso();\r\n c.setIdCurso(rs.getInt(1));\r\n c.setNome(rs.getString(2));\r\n c.setArea(rs.getString(3));\r\n c.setCargaHoraria(rs.getInt(5));\r\n c.setValorCurso(rs.getDouble(6));\r\n c.setValorMensal(rs.getDouble(7));\r\n c.setCod(rs.getString(8));\r\n lista.add(c);\r\n }\r\n //retornar lista preenchida \r\n return lista;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(CursoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //retorna null em caso de excessao\r\n return null;\r\n }", "private JTable itensNaoRecebidos() {\n\t\tinitConexao();\t\t\n try {\t \n\t String select = \"SELECT cod_item_r, nome_item_r, valor_item_r FROM Item_receita WHERE recebimento_item_r = '0'\";\n\t PreparedStatement ptStatement = c.prepareStatement(select);\n\t rs = ptStatement.executeQuery();\n\t \n\t Object[] colunas = {\"Item de receita\", \"Valor total\", \"\", \"code\"}; \t\t\n\t\t\t DefaultTableModel model = new DefaultTableModel();\t\t \n\t\t\t model.setColumnIdentifiers(colunas); \t\t \n\t\t\t Vector<Object[]> linhas = new Vector<Object[]>(); \n\t\t\t \n\t while (rs.next()){\n\t\t linhas.add(new Object[]{rs.getString(\"nome_item_r\"),rs.getString(\"valor_item_r\"),\"Receber\", rs.getString(\"cod_item_r\")}); \t \t\n\t \t } \n\t \n\t\t\t for (Object[] linha : linhas) { \n\t\t model.addRow(linha); \n\t\t } \t\t \n\t\t\t final JTable tarefasTable = new JTable(); \t\t \n\t\t\t tarefasTable.setModel(model); \t\t\n\t\t\t \n\t\t\t ButtonColumn buttonColumn = new ButtonColumn(tarefasTable, 2, \"itemNaoRecebido\");\n\t\t\t \n\t\t\t tarefasTable.removeColumn(tarefasTable.getColumn(\"code\")); \t \n\t return tarefasTable; \n } catch (SQLException ex) {\n System.out.println(\"ERRO: \" + ex);\n }\n\t\treturn null; \n\t}", "private void selectAll() {\n //To change body of generated methods, choose Tools | Templates.\n \n tabelpulsa.setModel(model);\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n \n \n try {\n Connection c=koneksidb.getkoneksi();\n Statement s=c.createStatement();\n ResultSet r=s.executeQuery(\"select* from pulsa\");\n while(r.next()){\n Object[] pulsa = new Object[5]; \n pulsa[0]=r.getString(\"operator\");\n pulsa[1]=r.getString(\"id_pulsa\");\n pulsa[2]=r.getString(\"harga_default\");\n pulsa[3]=r.getString(\"harga_jual\");\n pulsa[4]=r.getString(\"harga_member\");\n model.addRow(pulsa);\n }\n }catch (SQLException e){\n System.out.println(\"terjadi error :\" +e);\n }\n }", "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 }", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "@Override\n public List<FecetProrrogaOrden> findAll() {\n\n StringBuilder query = new StringBuilder();\n\n query.append(SQL_SELECT).append(SQL_ALL_COLUMNS).append(SQL_FROM).append(getTableName())\n .append(\" ORDER BY ID_PRORROGA_ORDEN\");\n return getJdbcTemplateBase().query(query.toString(), new FecetProrrogaOrdenMapper());\n\n }", "private void llenarListado1() {\r\n\t\tString sql1 = Sentencia1()\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tdet.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor det.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\t\tString sql2 = Sentencia2()\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarLista(sql1, sql2);\r\n\t}", "private void cargarProductos() {\r\n\t\tproductos = productoEJB.listarInventariosProductos();\r\n\r\n\t\tif (productos.size() == 0) {\r\n\r\n\t\t\tList<Producto> listaProductos = productoEJB.listarProductos();\r\n\r\n\t\t\tif (listaProductos.size() > 0) {\r\n\r\n\t\t\t\tMessages.addFlashGlobalWarn(\"Para realizar una venta debe agregar los productos a un inventario\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public List<Product> getFullProductList(){\n\t\t/*\n\t\t * La lista dei prodotti da restituire.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\t\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella PRODOTTO.\n\t\t */\n\t\tStatement productStm = null;\n\t\tResultSet productRs = null;\n\t\t\n\t\ttry{\n\t\t\tproductStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM PRODOTTO;\";\n\t\t\tproductRs = productStm.executeQuery(sql);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tproductList = this.getProductListFromRs(productRs);\n\t\t\tproductStm.close(); // Chiude anche il ResultSet productRs\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"ResultSet issue 2: failed to retrive data from ResultSet.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\treturn productList;\n\t}", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "private List<PromocionConcursoAgr> listaPromocionConcursoAgr() {\r\n\t\tString select = \" select distinct(puesto_det.*) \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab \"\r\n\t\t\t\t+ \"on estado_cab.id_estado_cab = estado_det.id_estado_cab \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \" where puesto_det.id_concurso_puesto_agr is null \"\r\n\t\t\t\t+ \"and lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and lower(estado_cab.descripcion) = 'concurso' \"\r\n\t\t\t\t//+ \"and puesto_det.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t;\r\n\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tlista = em.createNativeQuery(select, PromocionConcursoAgr.class)\r\n\t\t\t\t.getResultList();\r\n\r\n\t\treturn lista;\r\n\t}", "public void introducirPagosALojamientoHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];// pago de alojamiento en rango fchas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);\n objeto[3] = resultado.getDate(4);// pago de alojamiento en rango fchas\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();// pago de alojamiento en rango fchas\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public void CargarProveedores() {\n DefaultTableModel modelo = (DefaultTableModel) vista.Proveedores.jTable1.getModel();\n modelo.setRowCount(0);\n res = Conexion.Consulta(\"select * From proveedores\");\n try {\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getInt(1));\n v.add(res.getString(2));\n v.add(res.getString(3));\n v.add(res.getString(4));\n modelo.addRow(v);\n vista.Proveedores.jTable1.setModel(modelo);\n }\n } catch (SQLException e) {\n }\n }", "public List<conteoTab> filtro() throws Exception {\n iConteo iC = new iConteo(path, this);\n try {\n fecha = sp.getString(\"date\", \"\");\n iC.nombre = fecha;\n\n List<conteoTab> cl = iC.all();\n\n for (conteoTab c : cl) {\n boolean val = true;\n for (int i = 0; i <= clc.size(); i++) {\n if (c.getIdBloque() == sp.getInt(\"bloque\", 0) || c.getIdVariedad() == sp.getInt(\"idvariedad\", 0)) {\n val = true;\n } else {\n val = false;\n }\n }\n if (val) {\n clc.add(c);\n } else {\n }\n }\n } catch (Exception e) {\n Toast.makeText(this, \"No existen registros actuales que coincidan con la fecha\", Toast.LENGTH_LONG).show();\n clc.clear();\n }\n return clc;\n }", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "public ResultSet mostrarPacientesTodos() throws SQLException {\n ResultSet listaPacientes;\n String sql;\n\n sql = \"SELECT * \"\n + \"FROM centromedico.paciente, centromedico.paciente_borrado\"\n + \"ORDER BY DNI\" + \";\";\n listaPacientes = this.conexion.makeQuery(sql);\n\n return listaPacientes;\n }", "public List<ExistenciaMaq> buscarExistencias(final Producto producto,final Date fecha);", "public ArrayList consultarTodo() {\n Cursor cursor = this.myDataBase.rawQuery(\"SELECT des_invfisico_tmp._id,des_invfisico_tmp.cod_ubicacion,des_invfisico_tmp.cod_referencia,des_invfisico_tmp.cod_plu,plu.descripcion FROM des_invfisico_tmp LEFT OUTER JOIN plu ON plu.cod_plu = des_invfisico_tmp.cod_plu \", null);\n ArrayList arrayList = new ArrayList();\n new ArrayList();\n if (cursor.moveToFirst()) {\n do {\n for (int i = 0; i <= 4; ++i) {\n if (cursor.isNull(i)) {\n arrayList.add(\"\");\n continue;\n }\n arrayList.add(cursor.getString(i));\n }\n } while (cursor.moveToNext());\n }\n\n return arrayList;\n }", "public ArrayList<rubro> obtenerTodoslosRubros() {\n ArrayList<rubro> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement pr = conn.prepareStatement(\"select id_rubro , nombre, descripcion, estado, ruta \\n\"\n + \" from rubros \");\n\n ResultSet rs = pr.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n boolean estado = rs.getBoolean(4);\n String ruta = rs.getString(5);\n\n rubro r = new rubro(id, nombre, estado, descripcion, ruta);\n\n lista.add(r);\n }\n\n rs.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n\n }", "public List<ReporteRetencionesResumido> getRetencionSRIResumido(int mes, int anio, int idOrganizacion)\r\n/* 27: */ {\r\n/* 28: 58 */ String sql = \"SELECT new ReporteRetencionesResumido(f.fechaEmisionRetencion,f.fechaRegistro,f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero),\\tf.identificacionProveedor,c.descripcion,CASE WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE then (SUM(COALESCE(dfp.baseImponibleRetencion, 0)+COALESCE(dfp.baseImponibleTarifaCero, 0) +COALESCE(dfp.baseImponibleDiferenteCero, 0)+COALESCE(dfp.baseImponibleNoObjetoIva, 0))) else COALESCE(dfp.baseImponibleRetencion, 0) end,dfp.porcentajeRetencion,dfp.valorRetencion,\\tc.codigo,CASE WHEN c.tipoConceptoRetencion = :tipoConceptoIVA then 'IVA' WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE then 'FUENTE' WHEN c.tipoConceptoRetencion = :tipoConceptoISD then 'ISD' else '' end,f.numeroRetencion) FROM DetalleFacturaProveedorSRI dfp INNER JOIN dfp.facturaProveedorSRI f INNER JOIN dfp.conceptoRetencionSRI c WHERE MONTH(f.fechaRegistro) =:mes\\tAND YEAR(f.fechaRegistro) =:anio AND f.estado!=:estadoAnulado AND f.indicadorSaldoInicial!=true AND f.idOrganizacion = :idOrganizacion\\tGROUP BY c.codigo,f.numero,f.puntoEmision,\\tf.establecimiento, f.identificacionProveedor,\\tc.descripcion,dfp.baseImponibleRetencion,dfp.porcentajeRetencion,dfp.valorRetencion,f.fechaEmisionRetencion,f.fechaRegistro,f.fechaEmision,f.numeroRetencion, c.tipoConceptoRetencion ORDER BY c.tipoConceptoRetencion, c.codigo \";\r\n/* 29: */ \r\n/* 30: */ \r\n/* 31: */ \r\n/* 32: */ \r\n/* 33: */ \r\n/* 34: */ \r\n/* 35: */ \r\n/* 36: */ \r\n/* 37: */ \r\n/* 38: */ \r\n/* 39: */ \r\n/* 40: */ \r\n/* 41: */ \r\n/* 42: */ \r\n/* 43: */ \r\n/* 44: */ \r\n/* 45: 75 */ Query query = this.em.createQuery(sql);\r\n/* 46: 76 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 47: 77 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 48: 78 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 49: 79 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 50: 80 */ query.setParameter(\"tipoConceptoIVA\", TipoConceptoRetencion.IVA);\r\n/* 51: 81 */ query.setParameter(\"tipoConceptoFUENTE\", TipoConceptoRetencion.FUENTE);\r\n/* 52: 82 */ query.setParameter(\"tipoConceptoISD\", TipoConceptoRetencion.ISD);\r\n/* 53: 83 */ List<ReporteRetencionesResumido> lista = query.getResultList();\r\n/* 54: */ \r\n/* 55: 85 */ return lista;\r\n/* 56: */ }", "public static void procFilter(){\r\n try {\r\n String choice = home_RegisterUser.comboFilter.getSelectedItem().toString();\r\n ResultSet rs = null;\r\n singleton.dtm = new DefaultTableModel();\r\n \r\n singleton.dtm.setColumnIdentifiers(proc);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n Statement stmt = singleton.conn.createStatement();\r\n \r\n switch (choice) {\r\n case \"Nombre\":\r\n //BUSCA POR NOMBRE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND nombre LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break;\r\n case \"Precio mayor que\":\r\n //BUSCA POR PRECIO MAYOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND precio > '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break;\r\n case \"Precio menor que\":\r\n //BUSCA POR PRECIO MENOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND precio < '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break; \r\n case \"Fabricante\":\r\n //BUSCA POR FABRICANTE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND fabricante LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break;\r\n case \"Nucleos\":\r\n //BUSCA POR RESOLUCION\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND nucleos = '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break;\r\n case \"Tipo Socket\":\r\n //BUSCA POR RESOLUCION\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND tiposocket LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break;\r\n case \"Velocidad\":\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND velocidad = '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break;\r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n } \r\n }", "public void listar_saldoMontadoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo_Montado.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaMontadoPorData(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public List<Producto> buscar(String nombre) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT idproducto, nombre_producto, imagen \"\n\t\t\t\t\t+ \" FROM conftbc_producto WHERE nombre_producto like '%\"+nombre+\"%' \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n//\t\t\t\tCategoria categoria = new Categoria();\n//\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n//\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n//\t\t\t\tproducto.setCategoria(categoria);\n//\t\t\t\tMarca marca = new Marca();\n//\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n//\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n//\t\t\t\tproducto.setMarca(marca);\n//\t\t\t\tModelo modelo = new Modelo();\n//\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n//\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n//\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public List<Talla> tallasProducto(Producto producto) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Talla> lista = new ArrayList<Talla>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT t.idtalla, t.nombre, t.observacion FROM conftbc_talla t \"\n\t\t\t\t\t+ \" INNER JOIN conftbc_producto p ON t.idcategoria = p.idcategoria WHERE p.idproducto = \"+producto.getIdproducto();\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tTalla talla = new Talla();\n\t\t\t\ttalla.setIdtalla(rs.getInt(\"idtalla\"));\n\t\t\t\ttalla.setNombre(rs.getString(\"nombre\"));\n\t\t\t\ttalla.setObservacion(rs.getString(\"observacion\"));\n\t\t\t\tlista.add(talla);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "List<CarritoProductoResponseDTO> consultarCarritoCompras(String userName,TipoMoneda tipoMoneda);", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "public List<Empleat> obtenirEmpleatsQueTreballenOnViuen() throws UtilitatJdbcSQLException {\r\n JdbcPreparedQueryDao jdbcDao = new JdbcPreparedQueryDao() {\r\n @Override\r\n public Object writeObject(ResultSet rs) throws SQLException {\r\n int field=0;\r\n Empleat empleat = new Empleat();\r\n empleat.setCodi(rs.getInt(++field));\r\n empleat.setNom(rs.getString(++field));\r\n empleat.setCiutat(rs.getString(++field));\r\n \r\n Establiment est=new Establiment();\r\n est.setCodi(rs.getInt(++field));\r\n if(!rs.wasNull()){\r\n est.setNom(rs.getString(++field));\r\n est.setCiutat(rs.getString(++field));\r\n }else{\r\n est=null;\r\n }\r\n empleat.setEstabliment(est);\r\n \r\n return empleat;\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"SELECT e.codi, e.nom, e.ciutat, e.establiment, es.nom, es.ciutat FROM Empleat e JOIN Establiment es ON e.establiment = es.codi WHERE e.ciutat = es.ciutat\";\r\n }\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n \r\n }\r\n };\r\n List<Empleat> empleat = UtilitatJdbcPlus.obtenirLlista(con, jdbcDao); \r\n return empleat;\r\n }", "public List<Tblproductos> getAll(){\n String hql = \"Select tp from Tblproductos tp\";\n try{\n em = getEntityManager();\n Query q = em.createQuery(hql);\n List<Tblproductos> listProductos = q.getResultList();\n return listProductos; \n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "public List<Meta> obtTotalVentaXLineaProductos(Integer numPeri, Integer idPers) throws SQLException, Exception{\n \n CallableStatement statement = null;\n ResultSet rsConsulta = null;\n Connection cnConexion = null;\n List<Meta> lstResult = new ArrayList<>();\n \n try {\n \n cnConexion = ConexionBD.obtConexion();\n String strFiltro = \"\";\n \n if(idPers > 0 ){\n strFiltro += \" AND S1.ID_PERS = \" + idPers;\n }\n \n String sql = \"SELECT \" +\n \" S1.ID_PERS\\n\" +\n \" ,USU.COD_USUARIO\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END AS COD_STIPOPROD\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END AS DES_STIPOPROD\\n\" +\n \" ,SUM((T1.NUM_VALOR * T1.NUM_CANTIDAD) - (NVL(T1.NUM_MTODSCTO,0) * T1.NUM_CANTIDAD)) AS NUM_TOTALVENTA \\n\" +\n \" FROM SIC3DOCUPROD T1\\n\" +\n \" JOIN SIC1DOCU S1 ON T1.ID_DOCU = S1.ID_DOCU \\n\" +\n \" JOIN SIC1PROD T3 ON T3.ID_PROD = T1.ID_PROD \\n\" +\n \" JOIN VI_SICSTIPOPROD V2 ON V2.ID_STIPOPROD = T3.ID_STIPOPROD\\n\" +\n \" JOIN SIC1STIPODOCU T6 ON T6.ID_STIPODOCU = S1.ID_STIPODOCU\\n\" +\n \" JOIN SIC3DOCUESTA RELESTA ON RELESTA.ID_DOCU = S1.ID_DOCU\\n\" +\n \" AND TO_CHAR(RELESTA.FEC_HASTA,'DD/MM/YYYY') = '31/12/2400' \\n\" +\n \" JOIN VI_SICESTA ESTA ON ESTA.ID_ESTA = RELESTA.ID_ESTADOCU\\n\" +\n \" AND ((ESTA.COD_ESTA = 'VI_SICESTAFINALIZADO' AND T6.COD_STIPODOCU IN ('VI_SICFACTURA','VI_SICBOLETA','VI_SICSINDOCU')))\\n\" +\n \" JOIN SIC1USUARIO USU ON USU.ID_USUARIO = S1.ID_PERS\\n\" +\n \" WHERE S1.ID_SCLASEEVEN = 2 \" + \n \" AND TO_NUMBER(TO_CHAR(S1.FEC_DESDE,'YYYYMM')) = \" + numPeri + strFiltro +\n \" GROUP BY CASE WHEN COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END \" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END \" +\n \" ,USU.COD_USUARIO \" +\n \" ,S1.ID_PERS\";\n \n \n \n statement = cnConexion.prepareCall( sql,\n ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_READ_ONLY,\n ResultSet.CLOSE_CURSORS_AT_COMMIT ); \n \n rsConsulta = statement.executeQuery(); \n \n while(rsConsulta.next()){\n\n Meta obj = new Meta();\n \n String codStipoprod = rsConsulta.getString(\"COD_STIPOPROD\");\n BigDecimal numTotalVentasMes = rsConsulta.getBigDecimal(\"NUM_TOTALVENTA\");\n \n BigDecimal numPorcAlcanzado;\n if(codStipoprod.equals(\"VI_SICVINILCORTE\")){\n obj.setDesMeta(\"% Logrado Meta(Vinil)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAVINIL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAVINIL));\n }\n else{\n obj.setDesMeta(\"% Logrado Meta(Papel)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAPAPEL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAPAPEL));\n }\n \n Sic1pers objPers = new Sic1pers();\n objPers.setIdPers(rsConsulta.getBigDecimal(\"ID_PERS\"));\n objPers.setDesPers(rsConsulta.getString(\"COD_USUARIO\"));\n \n obj.setCodStipoprod(codStipoprod);\n obj.setDesStipoprod(rsConsulta.getString(\"DES_STIPOPROD\"));\n obj.setNumTotalventalogrado(numTotalVentasMes);\n obj.setNumPorclogrado(numPorcAlcanzado);\n obj.setSic1pers(objPers);\n \n lstResult.add(obj); \n }\n }catch(Exception ex){\n throw new Exception(ex.getMessage());\n }finally{\n if(statement != null)\n statement.close();\n if(rsConsulta != null)\n rsConsulta.close();\n if(cnConexion != null)\n cnConexion.close();\n }\n \n return lstResult;\n }", "public List<ProveedorPromocionHotelEntity> getPromociones(){\n List<ProveedorPromocionHotelEntity>promociones = proveedorPromocionHotelPersistence.findAll();\n return promociones;\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 }", "public SgfensPedidoProducto[] findAll() throws SgfensPedidoProductoDaoException;", "public static String[][] leerPrestados() {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][11];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n //leolos registros y los guardo cada uno en un renglon de la matriz\n System.out.println(\"ResultSet: \" + result.getString(1));\n \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\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 }", "public static void ConsultarReq(String codCurso) {\n try {\n DefaultTableModel model = (DefaultTableModel) Vistas.ConsultaCursoReq.tblConsultaCurso.getModel();\n model.setRowCount(0);\n String consulta = \"Select distinct curreq.codigoCursoReq AS 'Requerimiento', Curso.nombreCurso AS 'Nombre curso'\\n\"\n + \"from Curso cur\\n\"\n + \"inner join Curso_Requisito curreq\\n\"\n + \"ON (Cur.codigoCurso= curreq.codigoCurso)\\n\"\n + \"join Curso \\n\"\n + \"ON (Curso.codigoCurso = curreq.codigoCursoReq)\"\n + \"WHERE cur.codigoCurso ='\" + codCurso + \"' \";\n ResultSet res = Modelo.ConexionSQL.consulta(consulta);\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getString(1));\n v.add(res.getString(2));\n model.addRow(v);\n Vistas.ConsultaCursoReq.tblConsultaCurso.setModel(model);\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error \" + e.getMessage(), \"Error conexion\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "public ArrayList<oferta> listadoOfertaxComercio(int idComercio) {\n ArrayList<oferta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\"select o.nombre, o.cantidad, o.precio , c.id_comercio, id_oferta, descripcion, fecha, o.ruta, o.estado\\n\"\n + \"from Comercios c \\n\"\n + \"join Ofertas o on c.id_comercio = o.id_comercio \\n\"\n + \"where c.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cantidad = rs.getInt(2);\n Float precio = rs.getFloat(3);\n int id = rs.getInt(4);\n int ido = rs.getInt(5);\n String descripcion = rs.getString(6);\n String fecha = rs.getString(7);\n String ruta = rs.getString(8);\n boolean estado = rs.getBoolean(9);\n\n rubro rf = new rubro(0, \"\", true, \"\", \"\");\n comercio c = new comercio(\"\", \"\", \"\", id, true, \"\", \"\", rf, \"\");\n oferta o = new oferta(ido, nombreO, cantidad, precio, c, estado, descripcion, fecha,ruta );\n\n lista.add(o);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public ArrayList<Producto> ListaProductos() {\n ArrayList<Producto> list = new ArrayList<Producto>();\n \n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto;\");\n while(result.next()) {\n Producto nuevo = new Producto();\n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n list.add(nuevo);\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return list;\n }", "public void listar_mais_pedidos(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisPedidos.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisPedidos(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getQtd_pedido()});\n }\n \n \n }", "public List<Requisicion> getRequisicionesNoAutorizadas() throws Exception{\n \n List<Requisicion> requisicion = new ArrayList<>();\n \n Connection miConexion = null;\n Statement miStatement = null;\n ResultSet miResultset = null;\n \n //Establecer la conexion\n miConexion = origenDatos.getConexion();\n \n //Crear sentencia SQL y Statement\n String miSql = \"select r.NUMREQ, r.FECPEDIDOREQ, r.FECENTREGAREQ, r.AUTORIZADO, e.CARNETEMPLEADO, e.NOMBREEMPLEADO, e.APELLIDOEMPLEADO, d.NOMBREDEPARTAMENTO \" + \n \"from requisicion r inner join empleado e on r.carnetempleado =e.carnetempleado \" + \n \"inner join catalagopuesto c on e.codigopuesto =c.codigopuesto \" + \n \"inner join departamento d on c.codigodepartamento = d.codigodepartamento where r.AUTORIZADO = 1\";\n \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(miSql);\n \n while(miResultset.next()){\n int numReq = miResultset.getInt(\"NUMREQ\");\n Date fechaPedido = miResultset.getDate(\"FECPEDIDOREQ\");\n Date fechaEntrega = miResultset.getDate(\"FECENTREGAREQ\"); \n String carnetEmpleado = miResultset.getString(\"CARNETEMPLEADO\");\n String nombreEmpleado = miResultset.getString(\"NOMBREEMPLEADO\"); \n String apellidoEmpleado = miResultset.getString(\"APELLIDOEMPLEADO\");\n String nombreDepartamento = miResultset.getString(\"NOMBREDEPARTAMENTO\"); \n \n Requisicion temporal = new Requisicion(numReq, fechaPedido, fechaEntrega, carnetEmpleado, nombreEmpleado, apellidoEmpleado, nombreDepartamento);\n requisicion.add(temporal);\n }\n \n return requisicion;\n \n }", "public List<TblRetur>getAllDataRetur();", "public static List<Payment> getPaymentsFromDatabase(String mailUtente) throws ClassNotFoundException {\r\n\t\t\r\n\t\t//Query occurs in table \"metododipagamento\"\r\n \t//username:= postgres\r\n \t//password:= effe\r\n \t//Database name:=strumenti_database\r\n\t\t\r\n\t\tList<Payment> pagamentiAggiornati = new ArrayList<Payment>();\r\n \t\r\n \tClass.forName(\"org.postgresql.Driver\");\r\n \t\r\n \ttry (Connection con = DriverManager.getConnection(JDBC_URL, JDBC_USERNAME, JDBC_PASSWORD)){\r\n \t\t\r\n \t\ttry (PreparedStatement pst = con.prepareStatement(\r\n \t\t\t\t\"SELECT * FROM \" + NOME_TABELLA + \" \"\r\n \t\t\t\t+ \"WHERE cliente = ?\")) {\r\n \t\t\t\r\n \t\t\tpst.setString(1, mailUtente);\r\n \t\t\t\r\n \t\t\tResultSet rs = pst.executeQuery();\r\n \t\t\t\r\n \t\t\twhile (rs.next()) {\r\n\r\n \t\t\t\tString userMail = rs.getString(\"cliente\");\r\n \t\t\t\tString nomeMetodo = rs.getString(\"nomemetodo\");\r\n \t\t\t\tString credenziali = rs.getString(\"credenziali\");\r\n \t\t\t\t\r\n \t\t\t\tpagamentiAggiornati.add(new Payment(userMail, nomeMetodo, credenziali));\r\n\r\n \t\t\t}\r\n \t\t\t\r\n \t\t} catch (SQLException e) {\r\n \t\t\tSystem.out.println(\"Errore durante query dei dati: \" + e.getMessage());\r\n \t\t}\r\n \t\t\r\n \t} catch (SQLException e){\r\n \t\tSystem.out.println(\"Problema durante la connessione iniziale alla base di dati: \" + e.getMessage());\r\n \t}\r\n \t\r\n \treturn pagamentiAggiornati;\r\n\t\t\r\n\t}", "public List<Product> searchProduct(List<String> tokens) throws SQLException {\n\t\tif(tokens.size() == 0) {\n\t\t\treturn new ArrayList<Product>();\n\t\t}\n\t\t\n\t\t/*\n\t\t * Costruiamo una query di ricerca per un insieme di prodotti che esibiscono uno dei\n\t\t * token o parte di esso in uno dei campi nome, tipo, linea, materiali o descrizione.\n\t\t */\n\t\tString searchSql = \"SELECT CODICE\" +\n\t\t\t\" FROM PRODOTTO LEFT JOIN COMPOSIZIONE\" +\n\t\t\t\" ON PRODOTTO.CODICE = COMPOSIZIONE.CODICEPRODOTTO\" +\n\t\t\t\" WHERE (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per il primo token\n\n\t\tfor(int i = 1; i < tokens.size(); i++) {\n\t\t\tsearchSql += \" AND (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per uno dei successivi\n\t\t}\n\t\tsearchSql += \" GROUP BY CODICE;\";\n\t\t\n\t\t/*\n\t\t * SQLite non supporta lo OUTER JOIN ma solo lo INNER JOIN. Pertanto non abbiamo potuto includere nella\n\t\t * ricerca i materiali costituenti i prodotti poiché i prodotti per i quali non viene specificato un\n\t\t * materiale costituente vengono tagliati fuori.\n\t\t * \n\t\t * TODO - Preleva i codici prodotto dalla tabella COMPOSIZIONE dove trovi i token di ricerca\n\t\t * fai una intersezione dei codici prodotto con quelli ricavati dalla tabella PRODOTTO precedentemente restituiti.\n\t\t */\n\t\t\n\t\t/*\n\t\t * Per ogni token si verifica che esso appaia nel nome, nella lina, nel tipo\n\t\t * nel materiale o nella descrizione\n\t\t */\n\t\tPreparedStatement searchStm = connection.prepareStatement(searchSql);\n\t\t\n\t\tfor(int i = 0; i < tokens.size(); i++) {\n\t\t\tString token = tokens.get(i);\n\t\t\t\n\t\t\tsearchStm.setString( (i * 5) + 1, token);\n\t\t\tsearchStm.setString( (i * 5) + 2, token);\n\t\t\tsearchStm.setString( (i * 5) + 3, token);\n\t\t\tsearchStm.setString( (i * 5) + 4, token);\n\t\t\tsearchStm.setString( (i * 5) + 5, token);\n\t\t}\n\t\t\n\t\tResultSet productCodesRs = searchStm.executeQuery();\n\t\tList<Integer> productCodesList = new ArrayList<Integer>();\n\t\twhile(productCodesRs.next()) {\n\t\t\tproductCodesList.add(productCodesRs.getInt(1));\n\t\t}\n\t\t\n\t\treturn getProductListByCode(productCodesList);\n\t}", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "public static void searchAll(){\r\n try {\r\n singleton.dtm = new DefaultTableModel(); \r\n singleton.dtm.setColumnIdentifiers(general);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n \r\n Statement stmt = singleton.conn.createStatement();\r\n ResultSet rs = stmt.executeQuery(\"SELECT * FROM articulos\");\r\n //SELECT a.*,c.nombre FROM articulos a,categorias c,prodcategoria p WHERE a.codigo = p.articulo AND c.categoria_id = p.categoria\r\n \r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectos(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2)); \r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "public void buscarEstudiante(String codEstudiante){\n estudianteModificar=new Estudiante();\n estudianteGradoModificar=new EstudianteGrado();\n StringBuilder query=new StringBuilder();\n query.append(\"select e.idestudiante,e.nombre,e.apellido,e.ci,e.cod_est,e.idgrado,e.idcurso,g.grado,c.nombre_curso \" );\n query.append(\" from estudiante e \");\n query.append(\" inner join grado g on e.idgrado=g.idgrado \");\n query.append(\" inner join cursos c on e.idcurso=c.idcurso \");\n query.append(\" where idestudiante=? \");\n try {\n PreparedStatement pst=connection.prepareStatement(query.toString());\n pst.setInt(1, Integer.parseInt(codEstudiante));\n ResultSet resultado=pst.executeQuery();\n //utilizamos una condicion porque la busqueda nos devuelve 1 registro\n if(resultado.next()){\n //cargando la informacion a nuestro objeto categoriaModificarde tipo categoria\n estudianteModificar.setCodEstudiante(resultado.getInt(1));\n estudianteModificar.setNomEstudiante(resultado.getString(2));\n estudianteModificar.setApEstudiante(resultado.getString(3));\n estudianteModificar.setCiEstudiante(resultado.getInt(4));\n estudianteModificar.setCodigoEstudiante(resultado.getString(5));\n estudianteModificar.setIdgradoEstudiante(resultado.getInt(6));\n estudianteModificar.setIdCursoEstudiante(resultado.getInt(7));\n estudianteGradoModificar.setNomGrado(resultado.getString(8));\n estudianteGradoModificar.setNomCurso(resultado.getString(9));\n }\n } catch (SQLException e) {\n System.out.println(\"Error de conexion\");\n e.printStackTrace();\n }\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public 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 List<TipoDocumento> listar() throws SQLException{\n ArrayList<TipoDocumento> tipodocumentos = new ArrayList();\n TipoDocumento tipodocumento;\n ResultSet resultado;\n String sentenciaSQL = \"SELECT documentoid, descripcion FROM tipodocumento;\";\n \n resultado = gestorJDBC.ejecutarConsulta(sentenciaSQL);\n while(resultado.next()){ \n //para hacer \"new Genero\" necesito tener un Construtor vacio.\n tipodocumento = new TipoDocumento();\n tipodocumento.setTipodocumentoid(resultado.getInt(\"documentoid\"));\n tipodocumento.setDescripcion(resultado.getString(\"descripcion\"));\n tipodocumentos.add(tipodocumento);\n }\n resultado.close();\n return tipodocumentos; \n }", "private String getQuerySelecaoPromocoes()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" PROMOCAO.IDT_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.NOM_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.DAT_INICIO_VALIDADE, \" +\n\t\t\t\" PROMOCAO.DAT_FIM_VALIDADE, \" +\n\t\t\t\" PROMOCAO.VLR_MAX_CREDITO_BONUS \" +\n\t\t \"FROM \" +\n\t\t \" TBL_GER_PROMOCAO PROMOCAO \" + \n\t\t \"WHERE \" +\n\t\t \" PROMOCAO.IDT_CATEGORIA = \" + String.valueOf(ID_CATEGORIA_PULA_PULA);\n\t\t\n\t\treturn result;\n\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public ArrayList<ComentarioComp> listaComentarioNoRespondido() {\n ArrayList<ComentarioComp> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select co.nombre, c.nombreUsuario, c.descripcion, c.fecha, c.valoracion\\n\" +\n\"from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\" +\n\"where id_comentario not in (select id_comentario from Respuestas r )\");\n\n while (rs.next()) {\n String nombreC = rs.getString(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n String fecha = rs.getString(4);\n int valoracion = rs.getInt(5);\n\n ComentarioComp c = new ComentarioComp(nombreC, nombre, descripcion, fecha, valoracion);\n\n lista.add(c);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public void popular(){\n DAO dao = new DAO();\n modelo.setNumRows(0);\n\n for(Manuais m: dao.selecTudoManuaisVenda()){\n modelo.addRow(new Object[]{m.getId(),m.getNome(),m.getClasse(),m.getEditora(),m.getPreco()+\".00 MZN\"});\n \n }\n }", "public Venta[] listarVentas(String nombreVendedor)throws java.rmi.RemoteException{\n\t\tString driver = \"org.apache.derby.jdbc.EmbeddedDriver\";\n\t\t// the database name \n\t\tString dbName=\"VentasDB\";\n\t\t// define the Derby connection URL to use \n\t\tString connectionURL = \"jdbc:derby:\" + dbName + \";create=true\";\n\n\t\tConnection conn = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pst = null;\n\t\tResultSet rs2 = null;\n\t\tPreparedStatement pst2 = null;\n\t\tResultSet rs3 = null;\n\t\tPreparedStatement pst3 = null;\n\t\tResultSet rs4 = null;\n\t\tPreparedStatement pst4 = null;\n\t\tResultSet rs5 = null;\n\t\tPreparedStatement pst5 = null;\n\t\t\n System.out.println(\"Listando ventas...\");\n\t\t\n\t\tString sql = \"SELECT COUNT(IdentificadorVenta) FROM VentasArticulos WHERE NombreVendedor=?\";\n\t\tint cantidadVentas = 0;\n\t\t\n\t\ttry{\n\t\t\tClass.forName(driver).newInstance();\n\t\t\tconn = DriverManager.getConnection(connectionURL);\n pst = conn.prepareStatement(sql);\n\t\t\tpst.setString(1, nombreVendedor);\n \n rs = pst.executeQuery();\n \n if (rs.next()){\n cantidadVentas = rs.getInt(1);\n }\n\t\t\t\n\t\t\tVenta[] ventas = new Venta[cantidadVentas];\n\t\t\tString sql2 = \"SELECT NombreComprador, ApellidoComprador, DocumentoComprador, AnioVenta, MesVenta, DiaVenta, IdentificadorVenta FROM VentasArticulos WHERE NombreVendedor=?\";\n\t\t\t\n\t\t\tpst2 = conn.prepareStatement(sql2);\n\t\t\tpst2.setString(1, nombreVendedor);\n\t\t\t\n\t\t\trs2 = pst2.executeQuery();\n\t\t\t\n\t\t\tint k = 0;\n\t\t\twhile (rs2.next()){\n\t\t\t\tString nombreComprador = rs2.getString(1);\n\t\t\t\tString apellidoComprador = rs2.getString(2);\n\t\t\t\tString numeroDocumentoComprador = rs2.getString(3);\n\t\t\t\t\n\t\t\t\tint anioVenta = rs2.getInt(4);\n\t\t\t\tint mesVenta = rs2.getInt(5);\n\t\t\t\tint diaVenta = rs2.getInt(6);\n\t\t\t\t\n\t\t\t\tint identificadorVenta = rs2.getInt(7);\n\t\t\t\t\n\t\t\t\tString sql3 = \"SELECT COUNT(A_NombreArticulo) FROM ArticuloDeVenta WHERE VA_IdentificadorVenta=?\";\n\t\t\t\t\n\t\t\t\tpst3 = conn.prepareStatement(sql3);\n\t\t\t\tpst3.setInt(1, identificadorVenta);\n\t\t\t\t\n\t\t\t\trs3 = pst3.executeQuery(); \n\t\t\t\t\n\t\t\t\tint cantArticulosVenta = 0;\n\t\t\t\t\n\t\t\t\tif (rs3.next()){\n\t\t\t\t\tcantArticulosVenta = rs3.getInt(1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tArticuloVenta[] listaArticulosVenta = new ArticuloVenta[cantArticulosVenta];\n\t\t\t\tString sql4 = \"SELECT A_NombreArticulo, Cantidad FROM ArticuloDeVenta WHERE VA_IdentificadorVenta=?\";\n\t\t\t\t\n\t\t\t\tpst4 = conn.prepareStatement(sql4);\n\t\t\t\tpst4.setInt(1, identificadorVenta);\n\t\t\t\t\n\t\t\t\trs4 = pst4.executeQuery();\n\t\t\t\t\n\t\t\t\tint j=0;\n\t\t\t\twhile (rs4.next()){\n\t\t\t\t\tString nombreArticulo = rs4.getString(1);\n\t\t\t\t\tint cantidadArticulo = rs4.getInt(2);\n\t\t\t\t\t\n\t\t\t\t\tArticuloVenta articulo = new ArticuloVenta(nombreArticulo, cantidadArticulo);\n\t\t\t\t\tlistaArticulosVenta[j] = articulo;\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t\tVenta venta = new Venta(nombreComprador, apellidoComprador, numeroDocumentoComprador, anioVenta, mesVenta, diaVenta, listaArticulosVenta);\n\t\t\t\t\n\t\t\t\tventas[k] = venta;\n\t\t\t\t\n\t\t\t\tk++;\n\t\t\t}\n\t\t\treturn ventas;\n }catch(Exception e){\n\t\t\tSystem.out.println(\"Error al listar las ventas.\");\n\t\t\tSystem.out.println(\"Informacion del error: \" + e.toString());\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n }\n }", "public List<Tipo> listaTipo() throws SQLException{\n String sql= \"SELECT * FROM aux_tipo_obra\";\n ResultSet rs = null ;\n try {\n PreparedStatement stmt = connection.prepareStatement(sql);\n rs=stmt.executeQuery();\n List<Tipo> listaTipo = new ArrayList<>();\n \n while(rs.next()){\n Tipo tipo = new Tipo();\n tipo.setId(rs.getInt(\"id_tipo\"));\n tipo.setTipo(rs.getString(\"Tipo\"));\n listaTipo.add(tipo); \n }\n return listaTipo;\n }\n catch (SQLException e) {\n throw new RuntimeException(e);\n }\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 void listarRegistros() {\n System.out.println(\"\\nLISTA DE TODOS LOS REGISTROS\\n\");\n for (persona ps: pd.listaPersonas()){\n System.out.println(ps.getId()+ \" \"+\n ps.getNombre()+ \" \"+\n ps.getAp_paterno()+ \" \"+ \n ps.getAp_materno()+ \" DIRECCION: \"+ \n ps.getDireccion()+ \" SEXO: \"+ ps.getSexo());\n }\n }", "public void generarDocumentosCoactivosAnteriores() {\n\n try {\n\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"Set Language 'Español'\");\n\n Query update = em.createNativeQuery(sql.toString());\n update.executeUpdate();\n\n // Consulta de coactivos\n sql = new StringBuilder();\n sql.append(\n \"SELECT c.id_proceso, c.id_coactivo, p.fecha_inicio, c.valor_total_obligaciones, p.numero_proceso, tp.id_trazabilidad_proceso , tp2.id_trazabilidad_proceso as traza2 \");\n sql.append(\"FROM coactivo c \");\n sql.append(\"JOIN proceso p ON p.id_proceso = c.id_proceso \");\n sql.append(\"JOIN trazabilidad_proceso tp ON p.id_proceso = tp.id_proceso \");\n sql.append(\"AND tp.id_estado_proceso = 22 \");\n sql.append(\"JOIN trazabilidad_proceso tp2 ON p.id_proceso = tp2.id_proceso \");\n sql.append(\"AND tp2.id_estado_proceso = 24 \");\n sql.append(\"WHERE NOT EXISTS (SELECT 1 FROM trazabilidad_proceso tp \");\n sql.append(\n \"WHERE EXISTS (select 1 from documento_proceso dp where dp.id_trazabilidad_proceso = tp.id_trazabilidad_proceso) \");\n sql.append(\"AND tp.id_proceso = p.id_proceso) \");\n sql.append(\"AND CAST(p.numero_proceso AS bigint) <= 6179 \");\n sql.append(\"ORDER BY c.id_coactivo\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n @SuppressWarnings(\"unchecked\")\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n for (Object[] filaCoactivo : listaResultados) {\n iLCoactivo.generarDocumentosAnteriores(filaCoactivo);\n }\n } catch (Exception e) {\n logger.error(\"Error en generación de documento de apertura de coactivo\", e);\n\n }\n }", "@Override\n public List recuperarTodosLosElementos(Class clase) {\n Query query = database.query();\n query.constrain(clase);\n ObjectSet result = query.execute();\n return result;\n }", "public DefaultTableModel obtenerInmuebles(String minPrecio,String maxPrecio,String direccion,String lugarReferencia){\n\t\tDefaultTableModel tableModel=new DefaultTableModel();\n\t\tint registros=0;\n\t\tString[] columNames={\"ID\",\"DIRECCION\",\"PRECIO\",\"USUARIO\"};\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"select count(*) as total from inmuebles where precio between \"+minPrecio+\" and \"+maxPrecio+\" and direccion like '%\"+direccion+\"%' and lugarReferencia like '%\"+lugarReferencia+\"%' \");\n\t\t\t\n\t\t\tResultSet respuesta=statement.executeQuery();\n\t\t\trespuesta.next();\n\t\t\tregistros=respuesta.getInt(\"total\");\n\t\t\trespuesta.close();\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception.getMessage());\n\t\t}\n\t\tObject [][] data=new String[registros][5];\n\t\ttry{\n\t\t\tPreparedStatement statement=getConnection().prepareStatement(\"select id,direccion,precio,idUsuario from inmuebles where precio between \"+minPrecio+\" and \"+maxPrecio+\" and direccion like ? and lugarReferencia like ? \");\n\t\t\tstatement.setString(1, \"%\"+direccion+\"%\");\n\t\t\tstatement.setString(2, \"%\"+lugarReferencia+\"%\");\n\t\t\tResultSet respuesta=statement.executeQuery();\n\t\t\tint i=0;\n\t\t\twhile(respuesta.next()){\n\t\t\t\tdata[i][0]=respuesta.getString(\"id\");\n\t\t\t\tdata[i][1]=respuesta.getString(\"direccion\");\n\t\t\t\tdata[i][2]=respuesta.getString(\"precio\");\n\t\t\t\tdata[i][3]=respuesta.getString(\"idUsuario\");\n\t\t\t\ti++;\n\t\t\t}\n\t\t\trespuesta.close();\n\t\t\ttableModel.setDataVector(data, columNames);\n\t\t}catch(SQLException exception){\n\t\t\tSystem.err.println(exception.getMessage());\n\t\t}\n\t\treturn tableModel;\n\t}" ]
[ "0.6421245", "0.6127032", "0.6105367", "0.6027453", "0.5976632", "0.59437925", "0.5937403", "0.59258395", "0.59136075", "0.5887838", "0.58808905", "0.5869778", "0.586863", "0.5861766", "0.5851606", "0.58469796", "0.5792767", "0.57832175", "0.5782679", "0.57744455", "0.57455295", "0.5735188", "0.57315797", "0.5726966", "0.57174724", "0.5715019", "0.570908", "0.5698885", "0.5693915", "0.56865686", "0.56758654", "0.5666942", "0.5666088", "0.5665801", "0.5665442", "0.56456906", "0.5625588", "0.5604401", "0.5603136", "0.5601621", "0.55714285", "0.5568653", "0.5564647", "0.5556103", "0.55532324", "0.55496716", "0.5548526", "0.5546027", "0.5545788", "0.5543721", "0.55396146", "0.55385846", "0.5538147", "0.55380124", "0.55362415", "0.552231", "0.551024", "0.55051094", "0.55034906", "0.5488194", "0.54869246", "0.54818666", "0.5479691", "0.547957", "0.5476405", "0.546702", "0.5457363", "0.54538834", "0.5446163", "0.5445926", "0.5445558", "0.5444638", "0.5441517", "0.54382604", "0.54376864", "0.543677", "0.54346794", "0.5434161", "0.5433056", "0.54321426", "0.5431946", "0.54307544", "0.5430313", "0.5430105", "0.54279315", "0.54247254", "0.5423665", "0.542139", "0.5419266", "0.5415888", "0.5414283", "0.5410788", "0.54098195", "0.54079425", "0.5407601", "0.54036784", "0.5401611", "0.5400939", "0.5393653", "0.5392657", "0.5387635" ]
0.0
-1
Retorna todos los registros de la tabla Productos_punto_venta que coincidan con el WHERE SQL especificado arbitrariamente
@Override public ProductosPuntoVenta[] findByDynamicWhere(String sql, Object[] sqlParams) throws ProductosPuntoVentaDaoException { PreparedStatement stmt = null; ResultSet rs = null; try { // Validamos la conexion this.validateConnection(); // construct the SQL statement final String SQL = SQL_SELECT + " WHERE " + sql; System.out.println("Executing " + SQL); // prepare statement stmt = userConn.prepareStatement(SQL); stmt.setMaxRows(maxRows); // se setean los parametros de la consulta for (int i = 0; sqlParams != null && i < sqlParams.length; i++) { stmt.setObject(i + 1, sqlParams[i]); } rs = stmt.executeQuery(); // recuperamos los resultados return fetchMultiResults(rs); } catch (Exception e) { e.printStackTrace(); throw new ProductosPuntoVentaDaoException("Exception: " + e.getMessage(), e); } finally { ResourceManager.close(rs); ResourceManager.close(stmt); if (userConn != null) { ResourceManager.close(userConn); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Producto> verProductos(){\n SessionFactory sf = NewHibernateUtil.getSessionFactory();\n Session session = sf.openSession();\n // El siguiente objeto de query se puede hacer de dos formas una delgando a hql (lenguaje de consulta) que es el\n //lenguaje propio de hibernate o ejecutar ancestarmente la colsulta con sql\n Query query = session.createQuery(\"from Producto\");\n // En la consulta hql para saber que consulta agregar se procede a añadirla dandole click izquierdo sobre\n // hibernate.cfg.xml y aquí añadir la correspondiente consulta haciendo referencia a los POJOS\n List<Producto> lista = query.list();\n session.close();\n return lista;\n }", "private void buscar (String valor){\n try {\n int f,i;\n conn=App.ConnectionBd.Enlace(conn);\n String sql1=\"Select * from Reserva where idReserva like '%\"+valor+\"%' or tipoReserva like '%\"+valor+\"%';\";\n \n Statement st1=conn.createStatement();\n ResultSet rs1=st1.executeQuery(sql1);\n String datos[]=new String[7];\n f=datostabla.getRowCount();\n if(f>0)\n for(i=0;i<f;i++)\n datostabla.removeRow(0);\n while(rs1.next()) {\n datos[0]=(String)rs1.getString(1);\n datos[1]=(String)rs1.getString(2);\n datos[2]=(String)rs1.getString(3);\n datos[3]=(String)rs1.getString(5);\n datos[4]=(String)rs1.getString(6);\n datos[5]=(String)rs1.getString(7);\n datos[6]=(String)rs1.getString(9);\n datostabla.addRow(datos);\n }\n conn.close();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error al buscar datos, verifique porfavor\");\n }\n }", "public SgfensPedidoProducto[] findWhereUnidadEquals(String unidad) throws SgfensPedidoProductoDaoException;", "public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;", "private void llenarListadoPromocionSalarial() {\n\t\tString sql1 = \"select det.* from seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab cab on cab.id_estado_cab = det.id_estado_cab \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab\"\r\n\t\t\t\t+ \" left join seleccion.promocion_concurso_agr agr \"\r\n\t\t\t\t+ \"on agr.id_promocion_salarial = det.id_promocion_salarial\"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tagr.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor agr.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n//\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n//\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n//\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n//\t\t\tsql1 += \" and det.permanente is true \";\r\n//\t\t}\r\n\t\t\r\n\t\tString sql2 = \"select puesto_det.* \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial det \"\r\n\t\t\t\t+ \"on det.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \"join planificacion.configuracion_uo_cab uo_cab \"\r\n\t\t\t\t+ \"on uo_cab.id_configuracion_uo = det.id_configuracion_uo_cab \"\r\n\t\t\t//\t+ \"join seleccion.concurso concurso \"\r\n\t\t\t//\t+ \"on concurso.id_concurso = puesto_det.id_concurso \"\r\n\t\t\t\t\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t//\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarListaPromocionSalarial(sql1, sql2);\r\n\t}", "public void filtrarTablaNomProducto(JTable table, String filtro) throws Conexion.DataBaseException {\n String[] titulos = {\"Id Producto\", \"Nombre Producto\", \"Tipo\", \"Cantidad en Stock\", \"Descripción\", \"Proveedor\", \"Precio\"};\n String[] registros = new String[7];\n DefaultTableModel model = new DefaultTableModel(null, titulos);\n String sql = \"SELECT * FROM Productos WHERE name LIKE '%\" + filtro + \"%'\";\n try {\n con = conectar.getConnexion();\n ps = con.prepareStatement(sql);\n rs = ps.executeQuery();\n while (rs.next()) {\n registros[0] = rs.getString(\"idProducto\"); //como se llama el campo en la base de datos\n registros[1] = rs.getString(\"name\");\n registros[2] = rs.getString(\"type\");\n registros[3] = rs.getString(\"quantity\");\n registros[4] = rs.getString(\"description\");\n registros[5] = rs.getString(\"idProveedor\");\n registros[6] = rs.getString(\"price\");\n model.addRow(registros);\n }\n table.setModel(model);\n } catch (SQLException e) {\n System.out.println(\"Error al buscar los datos: \" + e.getMessage());\n }\n }", "@Query(value = \"SELECT * FROM proveedor where (:idTipoProveedor \"\n + \"= 0 or idTipoProveedor=:idTipoProveedor) and (:idLocalidad \"\n + \"= 0 or idLocalidad=:idLocalidad) and (:idCondicionCompra=0 or \"\n + \"idCondicionCompra=:idCondicionCompra)\", nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") String idTipoProveedor, @Param(\"idLocalidad\") String idLocalidad,\n @Param(\"idCondicionCompra\") String idCondicionCompra);", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public static void procFilter(){\r\n try {\r\n String choice = home_RegisterUser.comboFilter.getSelectedItem().toString();\r\n ResultSet rs = null;\r\n singleton.dtm = new DefaultTableModel();\r\n \r\n singleton.dtm.setColumnIdentifiers(proc);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n Statement stmt = singleton.conn.createStatement();\r\n \r\n switch (choice) {\r\n case \"Nombre\":\r\n //BUSCA POR NOMBRE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND nombre LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break;\r\n case \"Precio mayor que\":\r\n //BUSCA POR PRECIO MAYOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND precio > '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break;\r\n case \"Precio menor que\":\r\n //BUSCA POR PRECIO MENOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND precio < '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break; \r\n case \"Fabricante\":\r\n //BUSCA POR FABRICANTE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND fabricante LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break;\r\n case \"Nucleos\":\r\n //BUSCA POR RESOLUCION\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND nucleos = '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break;\r\n case \"Tipo Socket\":\r\n //BUSCA POR RESOLUCION\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND tiposocket LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break;\r\n case \"Velocidad\":\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,proc r WHERE a.codigo = r.codart AND velocidad = '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosProc(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"velocidad\"),rs.getString(\"tiposocket\"),rs.getInt(\"nucleos\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchProcessors();\r\n }\r\n break;\r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n } \r\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 }", "public List<conteoTab> filtro() throws Exception {\n iConteo iC = new iConteo(path, this);\n try {\n fecha = sp.getString(\"date\", \"\");\n iC.nombre = fecha;\n\n List<conteoTab> cl = iC.all();\n\n for (conteoTab c : cl) {\n boolean val = true;\n for (int i = 0; i <= clc.size(); i++) {\n if (c.getIdBloque() == sp.getInt(\"bloque\", 0) || c.getIdVariedad() == sp.getInt(\"idvariedad\", 0)) {\n val = true;\n } else {\n val = false;\n }\n }\n if (val) {\n clc.add(c);\n } else {\n }\n }\n } catch (Exception e) {\n Toast.makeText(this, \"No existen registros actuales que coincidan con la fecha\", Toast.LENGTH_LONG).show();\n clc.clear();\n }\n return clc;\n }", "@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);", "public ArrayList<GrupoProducto> consultarTodos(){\r\n ArrayList<GrupoProducto> grupoProducto = new ArrayList<>();\r\n for (int i = 0; i < listaGrupoProductos.size(); i++) {\r\n if (!listaGrupoProductos.get(i).isEliminado()) {\r\n grupoProducto.add(listaGrupoProductos.get(i));\r\n }\r\n }\r\n return grupoProducto;\r\n }", "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 }", "public SgfensPedidoProducto[] findWhereComentariosEquals(String comentarios) throws SgfensPedidoProductoDaoException;", "public static void generalFilter(){\r\n try {\r\n String choice = home_RegisterUser.comboFilter.getSelectedItem().toString();\r\n ResultSet rs = null;\r\n singleton.dtm = new DefaultTableModel();\r\n \r\n singleton.dtm.setColumnIdentifiers(general);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n Statement stmt = singleton.conn.createStatement();\r\n \r\n switch (choice) {\r\n case \"Nombre\":\r\n //BUSCA POR NOMBRE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT DISTINCT * FROM articulos WHERE nombre LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectos(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2)); \r\n }\r\n }else{\r\n searchAll();\r\n }\r\n break;\r\n case \"Precio mayor que\":\r\n //BUSCA POR PRECIO MAYOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT DISTINCT * FROM articulos WHERE precio > '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectos(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2)); \r\n }\r\n }else{\r\n searchAll();\r\n }\r\n break;\r\n case \"Precio menor que\":\r\n //BUSCA POR PRECIO MENOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT DISTINCT * FROM articulos WHERE precio < '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectos(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2)); \r\n }\r\n }else{\r\n searchAll();\r\n }\r\n break; \r\n case \"Fabricante\":\r\n //BUSCA POR FABRICANTE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT DISTINCT * FROM articulos WHERE fabricante LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectos(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2)); \r\n }\r\n }else{\r\n searchAll();\r\n }\r\n break;\r\n default:\r\n \r\n break;\r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "public static void searchAll(){\r\n try {\r\n singleton.dtm = new DefaultTableModel(); \r\n singleton.dtm.setColumnIdentifiers(general);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n \r\n Statement stmt = singleton.conn.createStatement();\r\n ResultSet rs = stmt.executeQuery(\"SELECT * FROM articulos\");\r\n //SELECT a.*,c.nombre FROM articulos a,categorias c,prodcategoria p WHERE a.codigo = p.articulo AND c.categoria_id = p.categoria\r\n \r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectos(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2)); \r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "public List<ExistenciaMaq> buscarExistencias(final Producto producto,final Date fecha);", "public void actualizarFiltrarEstadoRequisicion(Requisicion req) throws Exception{\n String carnet = req.getCarnetEmpleado();\n\n java.util.Date utilDate = req.getFechaNueva();\n java.sql.Date fechaConvertida = new java.sql.Date(utilDate.getTime()); \n\n List<Requisicion> requisicion = new ArrayList<>();\n \n Connection miConexion = null;\n Statement miStatement = null;\n ResultSet miResultset = null; \n\n \n //Establecer la conexion\n miConexion = origenDatos.getConexion();\n \n \n //Verificar si existe empleado\n String sqlEmpleado = \"Select CARNETEMPLEADO FROM EMPLEADO WHERE CARNETEMPLEADO = '\"+carnet+\"'\";\n miStatement = miConexion.createStatement();\n miResultset = miStatement.executeQuery(sqlEmpleado);\n \n if(miResultset.next()){\n \n String empleado = carnet;\n \n \n String sqlDepto = \"select d.NOMBREDEPARTAMENTO from departamento d \" + \n \"inner join catalagopuesto c on d.codigodepartamento = c.codigodepartamento \" + \n \"inner join empleado e on c.codigopuesto = e.codigopuesto where e.carnetempleado ='\"+carnet+\"'\";\n \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(sqlDepto);\n //Crear sentencia SQL y Statement\n miResultset.next();\n String nomdepto = miResultset.getString(\"NOMBREDEPARTAMENTO\");\n \n String miSQl = \"select r.NUMREQ, r.FECPEDIDOREQ, r.FECENTREGAREQ, r.AUTORIZADO, e.CARNETEMPLEADO, e.NOMBREEMPLEADO, e.APELLIDOEMPLEADO, d.NOMBREDEPARTAMENTO \" + \n \"from requisicion r inner join empleado e on r.carnetempleado =e.carnetempleado \" + \n \"inner join catalagopuesto c on e.codigopuesto =c.codigopuesto \" + \n \"inner join departamento d on c.codigodepartamento = d.codigodepartamento \" + \n \"where r.AUTORIZADO = 1 and d.NOMBREDEPARTAMENTO='\"+nomdepto+\"' and r.FECPEDIDOREQ >=TO_DATE('\"+fechaConvertida+\"', 'YYYY/MM/DD HH:MI:SS') order by r.FECPEDIDOREQ\";\n \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(miSQl);\n \n while(miResultset.next()){\n int numReq = miResultset.getInt(\"NUMREQ\");\n Date fechaPedido = miResultset.getDate(\"FECPEDIDOREQ\");\n Date fechaEntrega = miResultset.getDate(\"FECENTREGAREQ\"); \n String carnetEmpleado = miResultset.getString(\"CARNETEMPLEADO\");\n String nombreEmpleado = miResultset.getString(\"NOMBREEMPLEADO\"); \n String apellidoEmpleado = miResultset.getString(\"APELLIDOEMPLEADO\");\n String nombreDepartamento = miResultset.getString(\"NOMBREDEPARTAMENTO\"); \n\n //*************************ACTUALIZAR**************************\n Connection miConexion1 = null;\n PreparedStatement miStatement1 = null;\n \n //Obtener la conexion\n \n miConexion1 = origenDatos.getConexion();\n \n //Crear sentencia sql que inserte la requisicion a la base\n String misql = \"UPDATE requisicion SET autorizado = ? WHERE numreq = ?\";\n \n miStatement1 = miConexion1.prepareStatement(misql);\n \n //Establecer los parametros para insertar la requisicion \n if(\"aceptado\".equals(req.getEstadoAut())) {\n miStatement1.setInt(1, 0);\n }else{\n miStatement1.setInt(1, 1);\n } \n\n miStatement1.setInt(2, numReq);//se obtendra dentro del while\n \n //Ejecutar la instruccion sql\n miStatement1.execute(); \n //Requisicion temporal = new Requisicion(numReq, fechaPedido, fechaEntrega, carnetEmpleado, nombreEmpleado, apellidoEmpleado, nombreDepartamento);\n //requisicion.add(temporal);\n }\n \n }\n //return requisicion; \n }", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "public SgfensPedidoProducto[] findWhereFechaEntregaEquals(Date fechaEntrega) throws SgfensPedidoProductoDaoException;", "@Override\r\n public List<QuestaoMultiplaEscolha> consultarTodosQuestaoMultiplaEscolha()\r\n throws Exception {\n return rnQuestaoMultiplaEscolha.consultarTodos();\r\n }", "public synchronized static String lista_Dr_regt_equiparaciones() {\n String sql = \"Select a.eqp_sol_numero,a.solte_id,B.solte_nombre,a.eqp_carrera_continuar_est,c.smrprle_program_desc,a.eqp_grado_continuar,a.eqp_fecha_atencion_usuario,a.eqp_fecha_area_rec,a.eqp_fecha_envio_unidad,a.eqp_fecha_recepcion_final,a.eqp_total_pagar,a.eqp_estado,a.eqp_numero_sesion,a.eqp_fecha_sesion,a.eqp_observaciones,a.eqp_periodo, EXTRACT(YEAR FROM TO_DATE (sysdate)) annoActual, a.eqp_fecha_recepcion_orer,b.solte_apellidos_solicitante, b.Solte_nombre_solicitante, b.solte_seg_nombre_solicitante from DR_REGT_EQUIPARACIONES a inner join DR_REGT_SOLICITANTE B ON A.solte_id = B.solte_id inner join SMRPRLE c on REPLACE(a.eqp_carrera_continuar_est,'Ñ','N') = REPLACE(c.smrprle_program,'Ñ','N') WHERE EQP_ESTADO != 3 order by a.EQP_FECHA_ATENCION_USUARIO desc\";\n return (sql);\n }", "public List<CXPFactura> buscarFacturasPorRequisitar(final Proveedor proveedor,final Currency moneda){\r\n\t\treturn getFacturaDao().buscarFacturasPorRequisitar(proveedor, moneda);\r\n\t}", "private void llenarListado1() {\r\n\t\tString sql1 = Sentencia1()\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tdet.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor det.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\t\tString sql2 = Sentencia2()\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarLista(sql1, sql2);\r\n\t}", "@Override\r\n\tprotected List<Producto> filtrar(Comercio comercio) {\r\n\t\tList<Producto> resultado= new ArrayList<Producto>();\r\n\t\tfor(Producto pAct:comercio.getProductos()){\r\n\t\t\tif(pAct.presentacionesSuperanStockCritico())\r\n\t\t\t\tresultado.add(pAct);\r\n\t\t}\r\n\t\treturn resultado;\r\n\t}", "@Override\r\n public ProductosPuntoVenta[] findAll()\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" ORDER BY id_pdv\", null);\r\n }", "public void iniciarProduccion(){\n try {\n Connection conn = Conectar.conectar();\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select nick from usuarios where nick in(select usuario from construcciones) or nick \"\n +\"in(select usuario from investigaciones) or nick in(select usuario from movimientos)\");\n\n while(rs.next()){\n produccion.add(new Construcciones(rs.getString(1)));\n System.out.println(rs.getString(1));\n }\n\n st.close();\n rs.close();\n conn.close();\n\n }catch(SQLException e){\n System.out.println(\"Fallo actualizacion de produccion.\");\n }\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<Product> searchProduct(List<String> tokens) throws SQLException {\n\t\tif(tokens.size() == 0) {\n\t\t\treturn new ArrayList<Product>();\n\t\t}\n\t\t\n\t\t/*\n\t\t * Costruiamo una query di ricerca per un insieme di prodotti che esibiscono uno dei\n\t\t * token o parte di esso in uno dei campi nome, tipo, linea, materiali o descrizione.\n\t\t */\n\t\tString searchSql = \"SELECT CODICE\" +\n\t\t\t\" FROM PRODOTTO LEFT JOIN COMPOSIZIONE\" +\n\t\t\t\" ON PRODOTTO.CODICE = COMPOSIZIONE.CODICEPRODOTTO\" +\n\t\t\t\" WHERE (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per il primo token\n\n\t\tfor(int i = 1; i < tokens.size(); i++) {\n\t\t\tsearchSql += \" AND (NOMEPRODOTTO LIKE '%'||?||'%' OR LINEA LIKE '%'||?||'%' OR TIPO LIKE '%'||?||'%' OR DESCRIZIONE LIKE '%'||?||'%' OR MATERIALE LIKE '%'||?||'%')\"; // Per uno dei successivi\n\t\t}\n\t\tsearchSql += \" GROUP BY CODICE;\";\n\t\t\n\t\t/*\n\t\t * SQLite non supporta lo OUTER JOIN ma solo lo INNER JOIN. Pertanto non abbiamo potuto includere nella\n\t\t * ricerca i materiali costituenti i prodotti poiché i prodotti per i quali non viene specificato un\n\t\t * materiale costituente vengono tagliati fuori.\n\t\t * \n\t\t * TODO - Preleva i codici prodotto dalla tabella COMPOSIZIONE dove trovi i token di ricerca\n\t\t * fai una intersezione dei codici prodotto con quelli ricavati dalla tabella PRODOTTO precedentemente restituiti.\n\t\t */\n\t\t\n\t\t/*\n\t\t * Per ogni token si verifica che esso appaia nel nome, nella lina, nel tipo\n\t\t * nel materiale o nella descrizione\n\t\t */\n\t\tPreparedStatement searchStm = connection.prepareStatement(searchSql);\n\t\t\n\t\tfor(int i = 0; i < tokens.size(); i++) {\n\t\t\tString token = tokens.get(i);\n\t\t\t\n\t\t\tsearchStm.setString( (i * 5) + 1, token);\n\t\t\tsearchStm.setString( (i * 5) + 2, token);\n\t\t\tsearchStm.setString( (i * 5) + 3, token);\n\t\t\tsearchStm.setString( (i * 5) + 4, token);\n\t\t\tsearchStm.setString( (i * 5) + 5, token);\n\t\t}\n\t\t\n\t\tResultSet productCodesRs = searchStm.executeQuery();\n\t\tList<Integer> productCodesList = new ArrayList<Integer>();\n\t\twhile(productCodesRs.next()) {\n\t\t\tproductCodesList.add(productCodesRs.getInt(1));\n\t\t}\n\t\t\n\t\treturn getProductListByCode(productCodesList);\n\t}", "@Override\r\n public ProductosPuntoVenta[] findByDynamicSelect(String sql,\r\n Object[] sqlParams) throws ProductosPuntoVentaDaoException {\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n try {\r\n // Validamos la conexion\r\n this.validateConnection();\r\n System.out.println(\"Executing \" + sql);\r\n // prepare statement\r\n stmt = userConn.prepareStatement(sql);\r\n stmt.setMaxRows(maxRows);\r\n // se setean los parametros de la consulta\r\n for (int i = 0; sqlParams != null && i < sqlParams.length; i++) {\r\n stmt.setObject(i + 1, sqlParams[i]);\r\n }\r\n System.out.println(sql);\r\n rs = stmt.executeQuery();\r\n // recuperamos los resultados\r\n return fetchMultiResults(rs);\r\n }\r\n catch (SQLException e) {\r\n e.printStackTrace();\r\n throw new ProductosPuntoVentaDaoException(\"Exception: \"\r\n + e.getMessage(), e);\r\n }\r\n finally {\r\n ResourceManager.close(rs);\r\n ResourceManager.close(stmt);\r\n if (userConn != null) {\r\n ResourceManager.close(userConn);\r\n }\r\n }\r\n }", "public List<Tb_Prod_Painel_PromoBeans> getProdPainel(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "public void buscarxdescrip() {\r\n try {\r\n modelo.setDescripcion(vista.jTbdescripcion.getText());//C.P.M le enviamos al modelo la descripcion y consultamos\r\n rs = modelo.Buscarxdescrip();//C.P.M cachamos el resultado de la consulta\r\n\r\n DefaultTableModel buscar = 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.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo a la tabla\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"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 columnas de la consulta\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con una dimencion igual a 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 vamos insertando los resultados dentor del arreglo\r\n }\r\n buscar.addRow(fila);//C.P.M y lo agregamos como una nueva fila a la tabla\r\n }\r\n\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar producto por descripcion\");\r\n }\r\n }", "public ArrayList<TicketDto> consultarVentasChance(String fecha, String moneda) {\n ArrayList<TicketDto> lista = new ArrayList();\n Connection con = null;\n try {\n con = Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,sum(vrl_apuesta) \"\n + \"FROM ticket\"\n + \" where \"\n + \" fecha='\" + fecha + \"' and moneda='\" + moneda + \"' group by codigo\";\n\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n TicketDto dto = new TicketDto();\n dto.setCodigo(rs.getString(1));\n dto.setValor(rs.getInt(2));\n dto.setMoneda(moneda);\n lista.add(dto);\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } finally {\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorPremio.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n }", "static public ArrayList<Mascota> filtroLugar(String pLugar){\n ArrayList<Mascota> resul = new ArrayList<>(); \n for(Mascota mascota : mascotas){\n if(mascota.getUbicacion().equals(pLugar)){\n resul.add(mascota); \n }\n }\n return resul;\n }", "public List<ReporteComprasVentasRetenciones> getReporteRetencionClientes(int mes, int anio, int idOrganizacion)\r\n/* 231: */ {\r\n/* 232:307 */ StringBuffer sql = new StringBuffer();\r\n/* 233:308 */ sql.append(\"SELECT new ReporteComprasVentasRetenciones(fp.codigo, fp.nombre, COUNT(fp.codigo),\");\r\n/* 234:309 */ sql.append(\" (CASE WHEN fp.indicadorRetencionIva = true OR fp.indicadorRetencionFuente = true THEN SUM(dcfc.valor) END),\");\r\n/* 235:310 */ sql.append(\" 'Ventas', '' )\");\r\n/* 236:311 */ sql.append(\" FROM DetalleCobroFormaCobro dcfc\");\r\n/* 237:312 */ sql.append(\" JOIN dcfc.detalleFormaCobro dfc\");\r\n/* 238:313 */ sql.append(\" LEFT JOIN dfc.cobro c\");\r\n/* 239:314 */ sql.append(\" LEFT OUTER JOIN dfc.formaPago fp\");\r\n/* 240:315 */ sql.append(\" LEFT OUTER JOIN dcfc.detalleCobro dc\");\r\n/* 241:316 */ sql.append(\" LEFT OUTER JOIN dc.cuentaPorCobrar cpc\");\r\n/* 242:317 */ sql.append(\" LEFT OUTER JOIN cpc.facturaCliente fc\");\r\n/* 243:318 */ sql.append(\" WHERE MONTH(c.fecha) =:mes\");\r\n/* 244:319 */ sql.append(\" AND YEAR(c.fecha) =:anio\");\r\n/* 245:320 */ sql.append(\" AND fc.estado!=:estadoAnulado\");\r\n/* 246:321 */ sql.append(\" AND c.estado!=:estadoAnulado\");\r\n/* 247:322 */ sql.append(\" AND (fp.indicadorRetencionIva=true OR fp.indicadorRetencionFuente=true)\");\r\n/* 248:323 */ sql.append(\" AND fc.idOrganizacion = :idOrganizacion\");\r\n/* 249:324 */ sql.append(\" GROUP BY fp.codigo, fp.nombre, fp.indicadorRetencionIva, fp.indicadorRetencionFuente\");\r\n/* 250:325 */ sql.append(\" ORDER BY fp.codigo, fp.nombre\");\r\n/* 251:326 */ Query query = this.em.createQuery(sql.toString());\r\n/* 252:327 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 253:328 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 254:329 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 255:330 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 256:331 */ return query.getResultList();\r\n/* 257: */ }", "public static void ramFilter(){\r\n try {\r\n String choice = home_RegisterUser.comboFilter.getSelectedItem().toString();\r\n ResultSet rs = null;\r\n singleton.dtm = new DefaultTableModel();\r\n singleton.dtm.setColumnIdentifiers(ram);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n Statement stmt = singleton.conn.createStatement();\r\n \r\n switch (choice) {\r\n case \"Nombre\":\r\n //BUSCA POR NOMBRE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND nombre LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),rs.getInt(\"capacidad\"),rs.getInt(\"velocidad\")));\r\n }\r\n }else{\r\n searchRam();\r\n }\r\n break;\r\n case \"Precio mayor que\":\r\n //BUSCA POR PRECIO MAYOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND precio > '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),rs.getInt(\"capacidad\"),rs.getInt(\"velocidad\")));\r\n }\r\n }else{\r\n searchRam();\r\n }\r\n break;\r\n case \"Precio menor que\":\r\n //BUSCA POR PRECIO MENOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND precio < '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),rs.getInt(\"capacidad\"),rs.getInt(\"velocidad\")));\r\n }\r\n }else{\r\n searchRam();\r\n }\r\n break; \r\n case \"Fabricante\":\r\n //BUSCA POR FABRICANTE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND fabricante LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),rs.getInt(\"capacidad\"),rs.getInt(\"velocidad\")));\r\n }\r\n }else{\r\n searchRam();\r\n }\r\n break;\r\n case \"Tipo\":\r\n //BUSCA POR TIPO\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND tipo LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),rs.getInt(\"capacidad\"),rs.getInt(\"velocidad\")));\r\n }\r\n }else{\r\n searchRam();\r\n }\r\n break;\r\n case \"Capacidad\":\r\n //BUSCA POR CAPACIDAD\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND capacidad = '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),rs.getInt(\"capacidad\"),rs.getInt(\"velocidad\")));\r\n }\r\n }else{\r\n searchRam();\r\n }\r\n break;\r\n case \"Velocidad\":\r\n //BUSCA POR VELOCIDAD \r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND velocidad = '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),rs.getInt(\"capacidad\"),rs.getInt(\"velocidad\")));\r\n }\r\n }else{\r\n searchRam();\r\n }\r\n break;\r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "public static String todosLosEmpleados(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=1;\";\n return query;\n }", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "public SgfensPedidoProducto[] findByDynamicSelect(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;", "@Override\r\n public List<Prova> consultarTodosProva() throws Exception {\n return rnProva.consultarTodos();\r\n }", "public static void displayFilter(){\r\n try {\r\n String choice = home_RegisterUser.comboFilter.getSelectedItem().toString();\r\n ResultSet rs = null;\r\n singleton.dtm = new DefaultTableModel();\r\n \r\n singleton.dtm.setColumnIdentifiers(displays);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n Statement stmt = singleton.conn.createStatement();\r\n \r\n switch (choice) {\r\n case \"Nombre\":\r\n //BUSCA POR NOMBRE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id AND nombre LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"tam\"),rs.getString(\"resolucion\")));\r\n }\r\n }else{\r\n searchDisplays();\r\n }\r\n break;\r\n case \"Precio mayor que\":\r\n //BUSCA POR PRECIO MAYOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id AND precio > '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"tam\"),rs.getString(\"resolucion\")));\r\n }\r\n }else{\r\n searchDisplays();\r\n }\r\n break;\r\n case \"Precio menor que\":\r\n //BUSCA POR PRECIO MENOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id AND precio < '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"tam\"),rs.getString(\"resolucion\")));\r\n }\r\n }else{\r\n searchDisplays();\r\n }\r\n break; \r\n case \"Fabricante\":\r\n //BUSCA POR FABRICANTE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id AND fabricante LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"tam\"),rs.getString(\"resolucion\")));\r\n }\r\n }else{\r\n searchDisplays();\r\n }\r\n break;\r\n case \"Resolución\":\r\n //BUSCA POR RESOLUCION\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id AND resolucion LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"tam\"),rs.getString(\"resolucion\")));\r\n }\r\n }else{\r\n searchDisplays();\r\n }\r\n break;\r\n case \"Tamaño\":\r\n //BUSCA POR TAMAÑO\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT *,r.tam,r.resolucion FROM articulos a,mon r WHERE a.codigo = r.producto_id AND tam LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosMon(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getInt(\"tam\"),rs.getString(\"resolucion\")));\r\n }\r\n }else{\r\n searchDisplays();\r\n }\r\n break;\r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "public List<ItemVenda> getItemVenda(Lancamento lancamento) {\r\n\r\n List<ItemVenda> resultado = new ArrayList<ItemVenda>();\r\n Connection con = pool.getConnection();\r\n PreparedStatement ps = null;\r\n ResultSet rs = null;\r\n String sqlSelect = \"SELECT \\n\" +\r\n \" *\\n\" +\r\n \"FROM\\n\" +\r\n \" (SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PRODUTO AS CODIGO_PRODUTO,\\n\" +\r\n \" D.NOME_PRODUTO AS DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PRODUTO D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PRODUTO_CODIGO_PRODUTO = D.CODIGO_PRODUTO UNION ALL SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PACOTE_PROMOCIONAL AS CODIGO_PRODUTO,\\n\" +\r\n \" D.DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PACOTE_PROMOCIONAL D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PACOTE_PROMOCIONAL_CODIGO_PACOTE_PROMOCIONAL = D.CODIGO_PACOTE_PROMOCIONAL) AS CONSULTA\\n\" +\r\n \" WHERE CODIGO_LANCAMENTO = ?\";\r\n\r\n try {\r\n ps = con.prepareStatement(sqlSelect);\r\n ps.setInt(1, lancamento.getCodigo_lancamento());\r\n\r\n rs = ps.executeQuery();\r\n\r\n resultado = getListaItensVenda(rs);\r\n\r\n ps.close();\r\n } catch (ParseException ex) {\r\n return null;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(LocacaoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n pool.liberarConnection(con);\r\n }\r\n return resultado;\r\n }", "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 java.sql.ResultSet consultaporespecialidad(String CodigoEspecialidad){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where pes.codigo=\"+CodigoEspecialidad+\" and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporespecialidad \"+ex);\r\n }\t\r\n return rs;\r\n }", "@Override\n public List recuperarTodosLosElementos(Class clase) {\n Query query = database.query();\n query.constrain(clase);\n ObjectSet result = query.execute();\n return result;\n }", "public void buscaTodasOSs() {\n try {\n ServicoDAO sDAO = new ServicoDAO(); // instancia a classe ProdutoDB()\n ArrayList<OS> cl = sDAO.consultaTodasOs(); // coloca o método dentro da variável\n\n DefaultTableModel modeloTabela = (DefaultTableModel) jTable1.getModel();\n // coloca a tabela em uma variável do tipo DefaultTableModel, que permite a modelagem dos dados da tabela\n\n for (int i = modeloTabela.getRowCount() - 1; i >= 0; i--) {\n modeloTabela.removeRow(i);\n // loop que limpa a tabela antes de ser atualizada\n }\n\n for (int i = 0; i < cl.size(); i++) {\n // loop que pega os dados e insere na tabela\n Object[] dados = new Object[7]; // instancia os objetos. Cada objeto representa um atributo \n dados[0] = cl.get(i).getNumero_OS();\n dados[3] = cl.get(i).getStatus_OS();\n dados[4] = cl.get(i).getDefeito_OS();\n dados[5] = cl.get(i).getDataAbertura_OS();\n dados[6] = cl.get(i).getDataFechamento_OS();\n\n // pega os dados salvos do banco de dados (que estão nas variáveis) e os coloca nos objetos definidos\n modeloTabela.addRow(dados); // insere uma linha nova a cada item novo encontrado na tabela do BD\n }\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Falha na operação.\\nErro: \" + ex.getMessage());\n } catch (Exception ex) {\n Logger.getLogger(FrmPesquisar.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public List listaCarneMensalidadesAgrupado(String id_pessoa, String datas) {\n String and = \"\";\n\n if (id_pessoa != null) {\n and = \" AND func_titular_da_pessoa(M.id_beneficiario) IN (\" + id_pessoa + \") \\n \";\n }\n\n// String text\n// = \" -- CarneMensalidadesDao->listaCarneMensalidadesAgrupado(new Pessoa(), new Date()) \\n\\n\"\n// + \" SELECT P.ds_nome AS titular, \\n \"\n// + \" S.matricula, \\n \"\n// + \" S.categoria, \\n \"\n// + \" M.id_pessoa AS id_responsavel, \\n \"\n// + \" sum(nr_valor - nr_desconto_ate_vencimento) AS valor, \\n\"\n// + \" M.dt_vencimento AS vencimento \\n\"\n// + \" FROM fin_movimento AS M \\n\"\n// + \" INNER JOIN pes_pessoa AS P ON P.id = M.id_pessoa \\n\"\n// + \" INNER JOIN pes_pessoa AS B ON B.id = M.id_beneficiario \\n\"\n// + \" LEFT JOIN soc_socios_vw AS S ON S.codsocio = M.id_pessoa \\n\"\n// + \" WHERE is_ativo = true \\n\"\n// + \" AND id_baixa IS NULL \\n\"\n// + \" AND to_char(M.dt_vencimento, 'MM/YYYY') IN (\" + datas + \")\\n\"\n// + \" AND M.id_servicos NOT IN (SELECT id_servicos \\n\"\n// + \" FROM fin_servico_rotina \\n\"\n// + \" WHERE id_rotina = 4 \\n\"\n// + \") \\n\"\n// + and\n// + \" GROUP BY P.ds_nome, \\n\"\n// + \" S.matricula, \\n\"\n// + \" S.categoria, \\n\"\n// + \" M.id_pessoa, \\n\"\n// + \" M.dt_vencimento \\n\"\n// + \" ORDER BY P.ds_nome, \\n\"\n// + \" M.id_pessoa\";\n String queryString = \"\"\n + \"( \\n\"\n + \" -- CarneMensalidadesDao->listaCarneMensalidadesAgrupado(new Pessoa(), new Date()) \\n\"\n + \" \\n\"\n + \" SELECT P.ds_nome AS titular, \\n\"\n + \" S.matricula AS matricula, \\n\"\n + \" S.categoria AS categoria, \\n\"\n + \" M.id_pessoa AS id_responsavel, \\n\"\n + \" sum(nr_valor - nr_desconto_ate_vencimento) AS valor, \\n\"\n + \" M.dt_vencimento AS vencimento, \\n\"\n + \" '' AS servico , \\n\"\n + \" 0 AS quantidade \\n\"\n + \" FROM fin_movimento AS M \\n\"\n + \" INNER JOIN pes_pessoa AS P ON P.id = M.id_pessoa \\n\"\n + \" INNER JOIN pes_pessoa AS B ON B.id = M.id_beneficiario \\n\"\n + \" LEFT JOIN soc_socios_vw AS S ON S.codsocio = M.id_pessoa \\n\"\n + \" WHERE is_ativo = true \\n\"\n + \" AND id_baixa IS NULL \\n\"\n + \" AND to_char(M.dt_vencimento, 'MM/YYYY') IN (\" + datas + \") \\n\"\n + \" AND M.id_servicos NOT IN (SELECT id_servicos \\n\"\n + \" FROM fin_servico_rotina \\n\"\n + \" WHERE id_rotina = 4 \\n\"\n + \") \\n\"\n + and\n + \" GROUP BY P.ds_nome, \\n\"\n + \" S.matricula, \\n\"\n + \" S.categoria, \\n\"\n + \" M.id_pessoa, \\n\"\n + \" M.dt_vencimento \\n\"\n + \") \\n\"\n + \" \\n\"\n + \" \\n\"\n + \"UNION \\n\"\n + \" \\n\"\n + \" \\n\"\n + \" \\n\"\n + \"( \\n\"\n + \" SELECT P.ds_nome AS titular, \\n\"\n + \" S.matricula AS matricula, \\n\"\n + \" S.categoria AS categoria, \\n\"\n + \" M.id_pessoa AS id_responsavel, \\n\"\n + \" sum(nr_valor - nr_desconto_ate_vencimento) AS valor,\\n\"\n + \" '01/01/1900' AS vencimento, \\n\"\n + \" SE.ds_descricao AS servico, \\n\"\n + \" count(*) AS quantidade \\n\"\n + \" FROM fin_movimento AS M \\n\"\n + \" INNER JOIN fin_servicos AS SE ON SE.id = M.id_servicos \\n\"\n + \" INNER JOIN pes_pessoa AS P ON P.id = M.id_pessoa \\n\"\n + \" INNER JOIN pes_pessoa AS B ON B.id = M.id_beneficiario \\n\"\n + \" LEFT JOIN soc_socios_vw AS S ON S.codsocio = M.id_pessoa \\n\"\n + \" WHERE is_ativo = true \\n\"\n + \" AND id_baixa IS NULL \\n\"\n + \" AND to_char(M.dt_vencimento, 'MM/YYYY') IN (\" + datas + \")\\n\"\n + \" AND M.id_servicos NOT IN (SELECT id_servicos \\n\"\n + \" FROM fin_servico_rotina \\n\"\n + \" WHERE id_rotina = 4 \\n\"\n + \") \\n\"\n + and\n + \" GROUP BY P.ds_nome, \\n\"\n + \" S.matricula, \\n\"\n + \" S.categoria, \\n\"\n + \" M.id_pessoa, \\n\"\n + \" SE.ds_descricao\\n\"\n + \") \\n\"\n + \" ORDER BY 1,4,6\";\n try {\n Query query = getEntityManager().createNativeQuery(queryString);\n return query.getResultList();\n } catch (Exception e) {\n e.getMessage();\n }\n return new ArrayList();\n }", "public SgfensPedidoProducto[] findWhereCantidadEntregadaEquals(double cantidadEntregada) throws SgfensPedidoProductoDaoException;", "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}", "private ArrayList<Pelicula> busquedaPorGenero(ArrayList<Pelicula> peliculas, String genero){\r\n\r\n ArrayList<Pelicula> peliculasPorGenero = new ArrayList<>();\r\n\r\n\r\n\r\n for(Pelicula unaPelicula:peliculas){\r\n\r\n if(unaPelicula.getGenre().contains(genero)){\r\n\r\n peliculasPorGenero.add(unaPelicula);\r\n }\r\n }\r\n\r\n return peliculasPorGenero;\r\n }", "public SgfensPedidoProducto[] findByDynamicWhere(String sql, Object[] sqlParams) throws SgfensPedidoProductoDaoException;", "public static void mbFilter(){\r\n try {\r\n String choice = home_RegisterUser.comboFilter.getSelectedItem().toString();\r\n ResultSet rs = null;\r\n singleton.dtm = new DefaultTableModel();\r\n \r\n singleton.dtm.setColumnIdentifiers(mb);\r\n home_RegisterUser.table.setModel(singleton.dtm);\r\n Statement stmt = singleton.conn.createStatement();\r\n \r\n switch (choice) {\r\n case \"Nombre\":\r\n //BUSCA POR NOMBRE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,pb r WHERE a.codigo = r.codart AND nombre LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosPB(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipoprocesador\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchMotherboard();\r\n }\r\n break;\r\n case \"Precio mayor que\":\r\n //BUSCA POR PRECIO MAYOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,pb r WHERE a.codigo = r.codart AND precio > '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosPB(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipoprocesador\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchMotherboard();\r\n }\r\n break;\r\n case \"Precio menor que\":\r\n //BUSCA POR PRECIO MENOR\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,pb r WHERE a.codigo = r.codart AND precio < '\"+home_RegisterUser.filterField.getText()+\"'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosPB(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipoprocesador\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchMotherboard();\r\n }\r\n break; \r\n case \"Fabricante\":\r\n //BUSCA POR FABRICANTE\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,pb r WHERE a.codigo = r.codart AND fabricante LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosPB(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipoprocesador\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchMotherboard();\r\n }\r\n break;\r\n case \"Tipo Procesador\":\r\n if(!home_RegisterUser.filterField.getText().equals(\"\")){\r\n rs = stmt.executeQuery(\"SELECT * FROM articulos a,pb r WHERE a.codigo = r.producto_id AND tipoprocesador LIKE '%\"+home_RegisterUser.filterField.getText()+\"%'\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosPB(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipoprocesador\"),rs.getString(\"caracteristicas\")));\r\n }\r\n }else{\r\n searchMotherboard();\r\n }\r\n break;\r\n }\r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }", "public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\r\n\t\t\t\t}\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\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "public SgfensPedidoProducto[] findWhereCantidadEquals(double cantidad) throws SgfensPedidoProductoDaoException;", "public Object[][] seleccionarEventosTodos(Connection conn) {\r\n\t\tint totalRows = 0;\r\n\r\n\t\tObject datos2[][] = null;\r\n\t\ttry {\r\n\r\n\t\t\tint cont = 0;\r\n\r\n\t\t\tPreparedStatement statement = conn\r\n\t\t\t\t\t.prepareStatement(\"select ID_ALERTA, DESCRIPCION, FECHA_INI, FECHA_FIN, ESTADO, DESCRIPCION2 from alertas limit 200\");\r\n\t\t\tResultSet rs = statement.executeQuery();\r\n\t\t\trs.last();\r\n\t\t\ttotalRows = rs.getRow();\r\n\t\t\trs.beforeFirst();\r\n\t\t\tObject datos[][] = new Object[totalRows][6];\r\n\r\n\t\t\twhile (rs.next()) {\r\n\r\n\t\t\t\tdatos[cont][0] = rs.getString(\"ID_ALERTA\");\r\n\t\t\t\tdatos[cont][1] = rs.getString(\"DESCRIPCION\");\r\n\t\t\t\tdatos[cont][2] = rs.getDate(\"FECHA_INI\");\r\n\t\t\t\tdatos[cont][3] = rs.getDate(\"FECHA_FIN\");\r\n\t\t\t\tdatos[cont][4] = rs.getString(\"ESTADO\");\r\n\t\t\t\tdatos[cont][5] = rs.getString(\"DESCRIPCION2\");\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tdatos2 = datos;\r\n\t\t\tstatement.close();\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t\tJOptionPane.showMessageDialog(null, \"\" + e.getMessage(), \"Alerta!\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\r\n\t\t}\r\n\t\treturn datos2;\r\n\t}", "public static String todosLosEmpleados_baja(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=0;\";\n return query;\n }", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroAgente(String pCriterio, String pDato, String pId)\n throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "public List<MascotaExtraviadaEntity> darProcesosExtraviadaConNombreDeMascotaIgualA(String nombreMascota){\n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n procesos.stream().filter((p) -> (p.getMascota().getNombre().equals(nombreMascota))).forEachOrdered((p) -> {\n procesosFiltrados.add(p);\n });\n \n return procesosFiltrados;\n }", "public SgfensPedidoProducto[] findWhereNoAptoParaVentaEquals(double noAptoParaVenta) throws SgfensPedidoProductoDaoException;", "private void selectAll() {\n //To change body of generated methods, choose Tools | Templates.\n \n tabelpulsa.setModel(model);\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n \n \n try {\n Connection c=koneksidb.getkoneksi();\n Statement s=c.createStatement();\n ResultSet r=s.executeQuery(\"select* from pulsa\");\n while(r.next()){\n Object[] pulsa = new Object[5]; \n pulsa[0]=r.getString(\"operator\");\n pulsa[1]=r.getString(\"id_pulsa\");\n pulsa[2]=r.getString(\"harga_default\");\n pulsa[3]=r.getString(\"harga_jual\");\n pulsa[4]=r.getString(\"harga_member\");\n model.addRow(pulsa);\n }\n }catch (SQLException e){\n System.out.println(\"terjadi error :\" +e);\n }\n }", "public List<FieEsq53313> listarFieEsq53313(String filtro) {\n\t String consulta = \"select l from FieEsq53313 l where l.numEsq53313 like :nuncerc\";\n\t TypedQuery<FieEsq53313> query = manager.createQuery(consulta, FieEsq53313.class).setMaxResults(limite);\n\t query.setParameter(\"nuncerc\", \"%\" +filtro+ \"%\");\t \n\t return query.getResultList();\n\t\t}", "@Override\n\tpublic List<Comisiones> buscar(Comisiones comisiones) {\n\t\tEntityManager manager = createEntityManager();\n\t\tCriteriaBuilder builder = manager.getCriteriaBuilder();\n\t\t\n\t\tCriteriaQuery<Comisiones> criteriaQuery = builder.createQuery(Comisiones.class);\n\t\tRoot<Comisiones> root = criteriaQuery.from(Comisiones.class);\n\t\t\n\t\t \n\t\tPredicate valor1 = builder.equal(root.get(\"region\"), comisiones.getRegion().getrEgionidpk());\n\t\tPredicate valor2 = builder.equal(root.get(\"vCodcomision\"),comisiones.getvCodcomision());\n\t\tPredicate valor3 = builder.equal(root.get(\"vNumdocapr\"),comisiones.getvNumdocapr());\n\t\tPredicate valor4 = null;\n\t\tPredicate valor6 = null; \n\t\tif(comisiones.getvDescripcion().length() >0) {\n\t\t\t valor4 = builder.like(root.get(\"vDescripcion\"), \"%\"+comisiones.getvDescripcion()+\"%\"); \n\t\t\t valor6 = builder.or(valor4);\n\t\t}else {\n\t\t\t if(comisiones.getNombrencargado().length()>0) {\n\t\t\t\t valor4 = builder.like(root.get(\"consejero\").get(\"vDesnombre\"), \"%\"+comisiones.getNombrencargado()+\"%\"); \n\t\t\t\t valor6 = builder.or(valor4);\n\t\t\t }else {\n\t\t\t\t valor6 = builder.or(valor2,valor3); \n\t\t\t }\n\t\t\t \n\t\t}\n\t\tPredicate valor7 = builder.and(valor1,valor6);\n\t\tcriteriaQuery.where(valor7);\n\t\tQuery<Comisiones> query = (Query<Comisiones>) manager.createQuery(criteriaQuery);\n\t\tList<Comisiones> resultado = query.getResultList();\n\t\tmanager.close();\n\t\treturn resultado; \n\t}", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public SgfensPedidoProducto[] findWhereCostoUnitarioEquals(double costoUnitario) throws SgfensPedidoProductoDaoException;", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "public List<Proveedor> listProveedoresByFilter(FilterProveedor filterProveedor, GridControl gridControl) throws Exception {\r\n\t\treturn getSqlSessionTemplate().selectList(\"proveedor.listProveedores\", filterProveedor, gridControl.getRowBounds());\r\n\t}", "public SgfensPedidoProducto[] findWhereIdentificacionEquals(String identificacion) throws SgfensPedidoProductoDaoException;", "private String getQuerySelecaoPromocoes()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" PROMOCAO.IDT_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.NOM_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.DAT_INICIO_VALIDADE, \" +\n\t\t\t\" PROMOCAO.DAT_FIM_VALIDADE, \" +\n\t\t\t\" PROMOCAO.VLR_MAX_CREDITO_BONUS \" +\n\t\t \"FROM \" +\n\t\t \" TBL_GER_PROMOCAO PROMOCAO \" + \n\t\t \"WHERE \" +\n\t\t \" PROMOCAO.IDT_CATEGORIA = \" + String.valueOf(ID_CATEGORIA_PULA_PULA);\n\t\t\n\t\treturn result;\n\t}", "public static String obtenerListaNombres (String producto) {\n StringBuilder sb;\n Statement stmt;\n String query;\n ResultSet result;\n try {\n iniciarConexion();\n sb = new StringBuilder();\n stmt = connection.createStatement();\n query = \"SELECT * FROM \" + producto;\n result = stmt.executeQuery(query);\n while (result.next()) {\n sb.append(result.getString(2));\n sb.append(\" \");\n }\n return sb.toString();\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return \"\";\n }\n }", "public void buscarproducto() {\r\n try {\r\n modelo.setNombre(vista.jTbnombre2.getText());//C.P.M le mandamos al modelo el nombre del producto\r\n rs = modelo.Buscar();//C.P.M obtenemos el resultado del modelos\r\n if (rs.equals(\"\")) {//C.P.M en caso de que el resultado venga vacio notificamos a el usuario que no encontro el producto\r\n JOptionPane.showMessageDialog(null, \"No se encontro: \" + vista.jTbnombre2.getText() + \" en la base de datos.\");\r\n }\r\n //C.P.M Para establecer el modelo al JTable\r\n DefaultTableModel buscar = new DefaultTableModel() {\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M Aqui le decimos que no seran editables los campos de la tabla\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M Auui 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 el resultado \r\n Object[] fila = new Object[cantidadColumnas];//C.P.M Creamos un objeto con el numero de columnas\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recoremos ese vector\r\n fila[i] = rs.getObject(i + 1);//C.P.M Aqui vamos insertando la informacion obtenida de la base de datos\r\n }\r\n buscar.addRow(fila);//C.P.M y agregamos el arreglo como una nueva fila a la tabla\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurio un error al buscar el producto\");\r\n }\r\n\r\n }", "List<CarritoProductoResponseDTO> consultarCarritoCompras(String userName,TipoMoneda tipoMoneda);", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\n // atenção ao ? q é a continuacao da string SQL\n pst.setString(1, txtEmpPesquisar.getText() + \"%\");\n rs = pst.executeQuery();\n // a linha abaixo usa a biblioteca rs2xml.jar p preencher a TABELA\n tblEmpresas.setModel(DbUtils.resultSetToTableModel(rs));\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria){\n ArrayList <Producto> productosEncontrados = new ArrayList<>();\n for(Producto cadaProducto : UtilidadJavaPop.getProductosTotales()){\n if(cadaProducto.getCategoria().equals(categoria) && !productosEncontrados.contains(cadaProducto)\n && !cadaProducto.getVendedor().getCorreo().equals(this.getCorreo())){\n productosEncontrados.add(cadaProducto);\n }\n }\n ArrayList<Producto>productosEncontradosOrdenado = getProductosOrdenados(productosEncontrados, this);\n return productosEncontradosOrdenado;\n \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}", "public ArrayList<Producto> busquedaProductos(Producto.Categoria categoria,String palabrasClave){\n try{\n ArrayList<Producto>productosFiltrados = new ArrayList<>();\n ArrayList<Producto>productosEncontrados = busquedaProductos(categoria);\n ArrayList<String>palabras = new ArrayList<>();\n StringTokenizer tokens = new StringTokenizer(palabrasClave);\n\n while(tokens.hasMoreTokens()){\n palabras.add(tokens.nextToken()); \n }\n \n if(palabras.size()>1){\n for(String cadaPalabra : palabras){\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(cadaPalabra.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n }else{\n for(Producto cadaProducto : productosEncontrados){\n String titulo=cadaProducto.getTitulo().toLowerCase();\n if(titulo.contains(palabrasClave.toLowerCase()) && !productosFiltrados.contains(cadaProducto)){\n productosFiltrados.add(cadaProducto);\n }\n }\n }\n ArrayList <Producto> productosFiltradosOrdenado=getProductosOrdenados(productosFiltrados, this);\n return productosFiltradosOrdenado;\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n return null;\n }", "public ArrayList<Cuenta> obtenerCuentasAsociadas(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n PreparedStatement PrSt2;\n ResultSet rs = null;\n ResultSet rs2 = null;\n String Query = \"SELECT * FROM Solicitud WHERE Codigo_ClienteS = ? AND Estado = 'Aceptada'\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = obtenerCuenta(rs.getString(\"Codigo_Cuenta\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "@Override\r\n public ProductosPuntoVenta[] findByProducto(Integer idProducto)\r\n throws ProductosPuntoVentaDaoException {\r\n return findByDynamicSelect(SQL_SELECT + \" WHERE id_producto = ?\",\r\n new Object[] { idProducto });\r\n }", "@Override\n\tpublic List<Produto> listarTodos() throws ControleEstoqueSqlException {\n\t\treturn null;\n\t}", "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 List<MascotaExtraviadaEntity> darProcesosConRecompensaMenorA(Double precio) throws Exception{\n \n if(precio < 0){\n throw new BusinessLogicException(\"El precio de una recompensa no puede ser negativo\");\n }\n \n List<MascotaExtraviadaEntity> procesos = mascotaExtraviadaPersistence.findAll();\n List<MascotaExtraviadaEntity> procesosFiltrados = new LinkedList<>();\n \n for( MascotaExtraviadaEntity p : procesos){\n if(p.getRecompensa().getValor() <= precio){\n procesosFiltrados.add(p);\n }\n }\n \n return procesosFiltrados;\n }", "public static void ConsultarReq(String codCurso) {\n try {\n DefaultTableModel model = (DefaultTableModel) Vistas.ConsultaCursoReq.tblConsultaCurso.getModel();\n model.setRowCount(0);\n String consulta = \"Select distinct curreq.codigoCursoReq AS 'Requerimiento', Curso.nombreCurso AS 'Nombre curso'\\n\"\n + \"from Curso cur\\n\"\n + \"inner join Curso_Requisito curreq\\n\"\n + \"ON (Cur.codigoCurso= curreq.codigoCurso)\\n\"\n + \"join Curso \\n\"\n + \"ON (Curso.codigoCurso = curreq.codigoCursoReq)\"\n + \"WHERE cur.codigoCurso ='\" + codCurso + \"' \";\n ResultSet res = Modelo.ConexionSQL.consulta(consulta);\n while (res.next()) {\n Vector v = new Vector();\n v.add(res.getString(1));\n v.add(res.getString(2));\n model.addRow(v);\n Vistas.ConsultaCursoReq.tblConsultaCurso.setModel(model);\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Error \" + e.getMessage(), \"Error conexion\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "public List<ReporteComprasVentasRetenciones> getReporteCompras(int mes, int anio, int idOrganizacion)\r\n/* 167: */ {\r\n/* 168:227 */ StringBuffer sql = new StringBuffer();\r\n/* 169: */ \r\n/* 170:229 */ sql.append(\" SELECT new ReporteComprasVentasRetenciones(tc.codigo, tc.nombre, COUNT(tc.codigo), \");\r\n/* 171:230 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.baseImponibleTarifaCero) ELSE SUM(fps.baseImponibleTarifaCero) END), \");\r\n/* 172:231 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.baseImponibleDiferenteCero) ELSE SUM(fps.baseImponibleDiferenteCero) END), \");\r\n/* 173:232 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.baseImponibleNoObjetoIva) ELSE SUM(fps.baseImponibleNoObjetoIva) END), \");\r\n/* 174:233 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.montoIva) ELSE SUM(fps.montoIva) END), 'Compras',ct.codigo,ct.nombre) \");\r\n/* 175:234 */ sql.append(\" FROM FacturaProveedorSRI fps \");\r\n/* 176:235 */ sql.append(\" LEFT OUTER JOIN fps.tipoComprobanteSRI tc \");\r\n/* 177:236 */ sql.append(\" LEFT OUTER JOIN fps.creditoTributarioSRI ct\");\r\n/* 178:237 */ sql.append(\" WHERE MONTH(fps.fechaRegistro) =:mes \");\r\n/* 179:238 */ sql.append(\" AND YEAR(fps.fechaRegistro) =:anio \");\r\n/* 180:239 */ sql.append(\" AND fps.estado!=:estadoAnulado \");\r\n/* 181:240 */ sql.append(\" AND fps.indicadorSaldoInicial!=true \");\r\n/* 182:241 */ sql.append(\" AND fps.idOrganizacion = :idOrganizacion \");\r\n/* 183:242 */ sql.append(\" GROUP BY tc.codigo, tc.nombre,ct.codigo,ct.nombre\");\r\n/* 184:243 */ sql.append(\" ORDER BY tc.codigo, tc.nombre \");\r\n/* 185: */ \r\n/* 186:245 */ Query query = this.em.createQuery(sql.toString());\r\n/* 187:246 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 188:247 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 189:248 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 190:249 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 191: */ \r\n/* 192:251 */ return query.getResultList();\r\n/* 193: */ }", "public void buscaxnombre() {\r\n try {\r\n modelo.setNombre(vistabuscapro.jTvnombre.getText());//C.P.M le mandamos a el modelo el nombre para consultarlo\r\n rs = modelo.Buscarxnombre();//C.P.M ejecutamo el metodo del modelo y atrapamos el resultado\r\n\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M se establese el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M no sera editable\r\n return false;\r\n }\r\n };\r\n vistabuscapro.Tproductos.setModel(buscar);//C.P.M le mandamos el modelo\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"los encabeados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de el resultado\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de columnas\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un objeto con la cantidad de columnas obtenidas\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 le agregamos la informacion obtenida\r\n }\r\n buscar.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 un error al buscar por nombre\");\r\n }\r\n }", "public List<Filme> getAll(String filtro) throws SQLException {\r\n\t\tString sql = \"SELECT F.*, G.Descricao as genero FROM filme F\"\r\n\t\t\t\t+ \" JOIN genero G on f.idGenero = g.idGenero \";\r\n\r\n\t\tif (filtro != null)\r\n\t\t\tsql += \"WHERE nome LIKE '%\" + filtro + \"%'\";\r\n\t\tsql += \" ORDER BY F.idFilme \";\r\n\r\n\t\tPreparedStatement stmt = Conexao.getConexao().prepareStatement(sql);\r\n\t\tResultSet rs = stmt.executeQuery();\r\n\r\n\t\tList<Filme> result = new ArrayList<Filme>();\r\n\r\n\t\twhile (rs.next()) {\r\n\t\t\tFilme dados = criaFilme(rs);\r\n\t\t\tresult.add(dados);\r\n\t\t}\r\n\t\trs.close();\r\n\t\tstmt.close();\r\n\t\treturn result;\r\n\t}", "public ResultSet mostrarPacientesTodos() throws SQLException {\n ResultSet listaPacientes;\n String sql;\n\n sql = \"SELECT * \"\n + \"FROM centromedico.paciente, centromedico.paciente_borrado\"\n + \"ORDER BY DNI\" + \";\";\n listaPacientes = this.conexion.makeQuery(sql);\n\n return listaPacientes;\n }", "public SgfensPedidoProducto[] findWherePorcentajeComisionEmpleadoEquals(double porcentajeComisionEmpleado) throws SgfensPedidoProductoDaoException;", "public List<Producto> buscar(String nombre) throws Exception {\n\t\ttry{\n\t\t\tthis.objCnx = new Conexion(\"MYSQL\");\n\t\t\tList<Producto> lista = new ArrayList<Producto>();\n\t\t\tthis.objCnx.conectarBD();\n\t\t\tString sql = \"SELECT idproducto, nombre_producto, imagen \"\n\t\t\t\t\t+ \" FROM conftbc_producto WHERE nombre_producto like '%\"+nombre+\"%' \";\n\t\t\tPreparedStatement ps = this.objCnx.cnx.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tProducto producto = new Producto();\n\t\t\t\tproducto.setIdproducto(rs.getInt(\"idproducto\"));\n\t\t\t\tproducto.setNombre(rs.getString(\"nombre_producto\"));\n\t\t\t\tproducto.setImagen(rs.getString(\"imagen\"));\n//\t\t\t\tCategoria categoria = new Categoria();\n//\t\t\t\tcategoria.setIdcategoria(rs.getInt(\"idcategoria\"));\n//\t\t\t\tcategoria.setNombre(rs.getString(\"categoria\"));\n//\t\t\t\tproducto.setCategoria(categoria);\n//\t\t\t\tMarca marca = new Marca();\n//\t\t\t\tmarca.setIdmarca(rs.getInt(\"idmarca\"));\n//\t\t\t\tmarca.setNombre(rs.getString(\"marca\"));\n//\t\t\t\tproducto.setMarca(marca);\n//\t\t\t\tModelo modelo = new Modelo();\n//\t\t\t\tmodelo.setIdmodelo(rs.getInt(\"idmodelo\"));\n//\t\t\t\tmodelo.setNombre(rs.getString(\"modelo\"));\n//\t\t\t\tproducto.setModelo(modelo);\n\t\t\t\tlista.add(producto);\n\t\t\t}\n\t\t\treturn lista;\n\t\t\t\n\t\t}catch(Exception ex){\n\t\t\tthis.objCnx.deshacerDB();\n\t\t\tthrow ex;\n\t\t}finally{\n\t\t\tthis.objCnx.closeDB();\n\t\t\tthis.objCnx = null;\n\t\t}\n\t}", "public List<Meta> obtTotalVentaXLineaProductos(Integer numPeri, Integer idPers) throws SQLException, Exception{\n \n CallableStatement statement = null;\n ResultSet rsConsulta = null;\n Connection cnConexion = null;\n List<Meta> lstResult = new ArrayList<>();\n \n try {\n \n cnConexion = ConexionBD.obtConexion();\n String strFiltro = \"\";\n \n if(idPers > 0 ){\n strFiltro += \" AND S1.ID_PERS = \" + idPers;\n }\n \n String sql = \"SELECT \" +\n \" S1.ID_PERS\\n\" +\n \" ,USU.COD_USUARIO\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END AS COD_STIPOPROD\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END AS DES_STIPOPROD\\n\" +\n \" ,SUM((T1.NUM_VALOR * T1.NUM_CANTIDAD) - (NVL(T1.NUM_MTODSCTO,0) * T1.NUM_CANTIDAD)) AS NUM_TOTALVENTA \\n\" +\n \" FROM SIC3DOCUPROD T1\\n\" +\n \" JOIN SIC1DOCU S1 ON T1.ID_DOCU = S1.ID_DOCU \\n\" +\n \" JOIN SIC1PROD T3 ON T3.ID_PROD = T1.ID_PROD \\n\" +\n \" JOIN VI_SICSTIPOPROD V2 ON V2.ID_STIPOPROD = T3.ID_STIPOPROD\\n\" +\n \" JOIN SIC1STIPODOCU T6 ON T6.ID_STIPODOCU = S1.ID_STIPODOCU\\n\" +\n \" JOIN SIC3DOCUESTA RELESTA ON RELESTA.ID_DOCU = S1.ID_DOCU\\n\" +\n \" AND TO_CHAR(RELESTA.FEC_HASTA,'DD/MM/YYYY') = '31/12/2400' \\n\" +\n \" JOIN VI_SICESTA ESTA ON ESTA.ID_ESTA = RELESTA.ID_ESTADOCU\\n\" +\n \" AND ((ESTA.COD_ESTA = 'VI_SICESTAFINALIZADO' AND T6.COD_STIPODOCU IN ('VI_SICFACTURA','VI_SICBOLETA','VI_SICSINDOCU')))\\n\" +\n \" JOIN SIC1USUARIO USU ON USU.ID_USUARIO = S1.ID_PERS\\n\" +\n \" WHERE S1.ID_SCLASEEVEN = 2 \" + \n \" AND TO_NUMBER(TO_CHAR(S1.FEC_DESDE,'YYYYMM')) = \" + numPeri + strFiltro +\n \" GROUP BY CASE WHEN COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END \" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END \" +\n \" ,USU.COD_USUARIO \" +\n \" ,S1.ID_PERS\";\n \n \n \n statement = cnConexion.prepareCall( sql,\n ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_READ_ONLY,\n ResultSet.CLOSE_CURSORS_AT_COMMIT ); \n \n rsConsulta = statement.executeQuery(); \n \n while(rsConsulta.next()){\n\n Meta obj = new Meta();\n \n String codStipoprod = rsConsulta.getString(\"COD_STIPOPROD\");\n BigDecimal numTotalVentasMes = rsConsulta.getBigDecimal(\"NUM_TOTALVENTA\");\n \n BigDecimal numPorcAlcanzado;\n if(codStipoprod.equals(\"VI_SICVINILCORTE\")){\n obj.setDesMeta(\"% Logrado Meta(Vinil)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAVINIL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAVINIL));\n }\n else{\n obj.setDesMeta(\"% Logrado Meta(Papel)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAPAPEL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAPAPEL));\n }\n \n Sic1pers objPers = new Sic1pers();\n objPers.setIdPers(rsConsulta.getBigDecimal(\"ID_PERS\"));\n objPers.setDesPers(rsConsulta.getString(\"COD_USUARIO\"));\n \n obj.setCodStipoprod(codStipoprod);\n obj.setDesStipoprod(rsConsulta.getString(\"DES_STIPOPROD\"));\n obj.setNumTotalventalogrado(numTotalVentasMes);\n obj.setNumPorclogrado(numPorcAlcanzado);\n obj.setSic1pers(objPers);\n \n lstResult.add(obj); \n }\n }catch(Exception ex){\n throw new Exception(ex.getMessage());\n }finally{\n if(statement != null)\n statement.close();\n if(rsConsulta != null)\n rsConsulta.close();\n if(cnConexion != null)\n cnConexion.close();\n }\n \n return lstResult;\n }", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "private void buscarProducto() {\n EntityManagerFactory emf= Persistence.createEntityManagerFactory(\"pintureriaPU\");\n List<Almacen> listaproducto= new FacadeAlmacen().buscarxnombre(jTextField1.getText().toUpperCase());\n DefaultTableModel modeloTabla=new DefaultTableModel();\n modeloTabla.addColumn(\"Id\");\n modeloTabla.addColumn(\"Producto\");\n modeloTabla.addColumn(\"Proveedor\");\n modeloTabla.addColumn(\"Precio\");\n modeloTabla.addColumn(\"Unidades Disponibles\");\n modeloTabla.addColumn(\"Localizacion\");\n \n \n for(int i=0; i<listaproducto.size(); i++){\n Vector vector=new Vector();\n vector.add(listaproducto.get(i).getId());\n vector.add(listaproducto.get(i).getProducto().getDescripcion());\n vector.add(listaproducto.get(i).getProducto().getProveedor().getNombre());\n vector.add(listaproducto.get(i).getProducto().getPrecio().getPrecio_contado());\n vector.add(listaproducto.get(i).getCantidad());\n vector.add(listaproducto.get(i).getLocalizacion());\n modeloTabla.addRow(vector);\n }\n jTable1.setModel(modeloTabla);\n }", "public ArrayList<ComentarioComp> listaComentarioNoRespondido() {\n ArrayList<ComentarioComp> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select co.nombre, c.nombreUsuario, c.descripcion, c.fecha, c.valoracion\\n\" +\n\"from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\" +\n\"where id_comentario not in (select id_comentario from Respuestas r )\");\n\n while (rs.next()) {\n String nombreC = rs.getString(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n String fecha = rs.getString(4);\n int valoracion = rs.getInt(5);\n\n ComentarioComp c = new ComentarioComp(nombreC, nombre, descripcion, fecha, valoracion);\n\n lista.add(c);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "private List<PromocionConcursoAgr> listaPromocionConcursoAgr() {\r\n\t\tString select = \" select distinct(puesto_det.*) \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab \"\r\n\t\t\t\t+ \"on estado_cab.id_estado_cab = estado_det.id_estado_cab \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \" where puesto_det.id_concurso_puesto_agr is null \"\r\n\t\t\t\t+ \"and lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and lower(estado_cab.descripcion) = 'concurso' \"\r\n\t\t\t\t//+ \"and puesto_det.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t;\r\n\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tlista = em.createNativeQuery(select, PromocionConcursoAgr.class)\r\n\t\t\t\t.getResultList();\r\n\r\n\t\treturn lista;\r\n\t}", "@Override\n\tpublic List<ttu.rakarh1.backend.model.data.Product> searchProducts(\n\t\t\tfinal ProductSearchCriteria ProductSearchCriteria, final HttpServletRequest request)\n\t{\n\t\tList<ttu.rakarh1.backend.model.data.Product> ProductList = null;\n\t\ttry\n\t\t{\n\t\t\tProduct Product;\n\t\t\tProductList = new ArrayList<ttu.rakarh1.backend.model.data.Product>();\n\t\t\tdb = dbconnection.getConnection();\n\t\t\tst = this.db.createStatement();\n\t\t\tString sql_and = \"\";\n\t\t\tString sql_where = \"\";\n\t\t\tString sql_all_together = \"\";\n\t\t\tString sql_criteria = \"\";\n\t\t\tString sql_end = \" ORDER BY name\";\n\t\t\tString sql_additional_attr = \"\";\n\t\t\tString genSql = \"\";\n\t\t\tList<ttu.rakarh1.backend.model.data.FormAttribute> formAttributes = null;\n\t\t\tMyLogger.LogMessage(\"FORMATTRIBUTES1\");\n\t\t\tformAttributes = (List<FormAttribute>) request.getAttribute(\"formAttributes\");\n\n\t\t\tif (formAttributes != null)\n\t\t\t{\n\t\t\t\tMyLogger.LogMessage(\"FORMATTRIBUTES2\");\n\t\t\t\tsql_additional_attr = getAdditionalSqlAttr(formAttributes);\n\t\t\t}\n\n\t\t\tString sql_from = \" FROM item i \"; /* ,unit_type, item_type \"; */\n\t\t\tString sql_start = \"SELECT distinct i.item, i.unit_type_fk, i.supplier_enterprise_fk, i.item_type_fk,name, i.store_price, i.sale_price, i.producer, i.description, i.producer_code, i.created \";\n\t\t\t// MyLogger.LogMessage(\"SEARCH CRITERIA PRODUCT CODE\" +\n\t\t\t// ProductSearchCriteria.getProduct_code());\n\t\t\tif (ProductSearchCriteria.getGenAttrList() != null)\n\t\t\t{\n\t\t\t\tgenSql = getGeneralSqlAttr(ProductSearchCriteria);\n\t\t\t}\n\n\t\t\tif (!(ProductSearchCriteria.getProduct_code().equals(\"\")))\n\t\t\t{\n\t\t\t\tsql_criteria = \"UPPER(i.producer_code) LIKE UPPER('\"\n\t\t\t\t\t\t+ ProductSearchCriteria.getProduct_code() + \"%')\";\n\t\t\t}\n\n\t\t\tif (!(ProductSearchCriteria.getName().equals(\"\")))\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tString search_string = ProductSearchCriteria.getName().replace(\" \", \" & \");\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" (to_tsvector(name) @@ to_tsquery('\"\n\t\t\t\t\t\t+ search_string + \"'))\";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getMin_price() != -1)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" i.store_price >= \"\n\t\t\t\t\t\t+ Float.toString(ProductSearchCriteria.getMin_price()) + \" \";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getMax_price() != -1)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" i.store_price <= \"\n\t\t\t\t\t\t+ Float.toString(ProductSearchCriteria.getMax_price()) + \" \";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getSupplier_enterprise_fk() != 0)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" i.supplier_enterprise_fk = \"\n\t\t\t\t\t\t+ Integer.toString(ProductSearchCriteria.getSupplier_enterprise_fk()) + \" \";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getUnit_type_fk() != 0)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria + sql_and + \" i.unit_type_fk = \"\n\t\t\t\t\t\t+ Integer.toString(ProductSearchCriteria.getUnit_type_fk()) + \" \";\n\t\t\t}\n\n\t\t\tif (ProductSearchCriteria.getItem_type_fk() != 0)\n\t\t\t{\n\t\t\t\tif (sql_criteria.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tsql_and = \"\";\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsql_and = \" AND \";\n\t\t\t\t}\n\t\t\t\tsql_criteria = sql_criteria\n\t\t\t\t\t\t+ sql_and\n\t\t\t\t\t\t+ \" i.item_type_fk in (with recursive sumthis(item_type, super_type_fk) as (\"\n\t\t\t\t\t\t+ \"select item_type, super_type_fk \" + \"from item_type \"\n\t\t\t\t\t\t+ \"where item_type =\"\n\t\t\t\t\t\t+ Integer.toString(ProductSearchCriteria.getItem_type_fk()) + \" \"\n\t\t\t\t\t\t+ \"union all \" + \"select C.item_type, C.super_type_fk \" + \"from sumthis P \"\n\t\t\t\t\t\t+ \"inner join item_type C on P.item_type = C.super_type_fk \" + \") \"\n\t\t\t\t\t\t+ \"select item_type from sumthis\" + \") \";\n\t\t\t}\n\n\t\t\tif (!(sql_criteria.equals(\"\")))\n\t\t\t{\n\t\t\t\tsql_where = \" WHERE \";\n\t\t\t}\n\t\t\tif (!genSql.equals(\"\"))\n\t\t\t{\n\t\t\t\tsql_from += \"inner join item_type it on it.item_type = i.item_type_fk inner join type_attribute ta on ta.item_type_fk = it.item_type inner join item_attribute_type iat on iat.item_attribute_type = ta.item_attribute_type_fk inner join item_attribute ia on ia.item_attribute_type_fk = iat.item_attribute_type\";\n\t\t\t\tsql_criteria += \" and (\" + genSql + \")\";\n\t\t\t\t// sql_all_together = \" inner join ( \" + sql_additional_attr +\n\t\t\t\t// \") q2 on q2.item_fk = item\";\n\t\t\t}\n\t\t\tsql_all_together = sql_start + sql_from;\n\t\t\tif (sql_additional_attr != \"\")\n\t\t\t{\n\t\t\t\tsql_all_together += \" inner join ( \" + sql_additional_attr\n\t\t\t\t\t\t+ \") q2 on q2.item_fk = i.item\";\n\n\t\t\t}\n\n\t\t\tsql_all_together += sql_where + sql_criteria + sql_end;\n\n\t\t\tMyLogger.LogMessage(\"ProductDAOImpl -> fdfdf \" + sql_all_together);\n\t\t\tSystem.out.println(sql_all_together);\n\t\t\tResultSet rs = this.st.executeQuery(sql_all_together);\n\t\t\tint cnt = 0;\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t\tProduct = new Product();\n\t\t\t\tProduct.setProduct(rs.getInt(\"item\"));\n\t\t\t\tProduct.setName(rs.getString(\"name\"));\n\t\t\t\tProduct.setDescription(rs.getString(\"description\"));\n\t\t\t\tProduct.setProduct_code(rs.getString(\"producer_code\"));\n\t\t\t\tProduct.setStore_price(rs.getFloat(\"store_price\"));\n\t\t\t\tProduct.setSale_price(rs.getInt(\"sale_price\"));\n\t\t\t\tProduct.setProduct_catalog(rs.getInt(\"item_type_fk\"));\n\t\t\t\tProductList.add(Product);\n\t\t\t\tcnt = cnt + 1;\n\t\t\t}\n\n\t\t}\n\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tMyLogger.Log(\"searchProducts():\", ex.getMessage());\n\n\t\t}\n\n\t\treturn ProductList;\n\t}", "public SgfensPedidoProducto[] findWhereAptoParaVentaEquals(double aptoParaVenta) throws SgfensPedidoProductoDaoException;", "@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 void filtro() {\n int columnaABuscar = 0;\n \n \n if (comboFiltro.getSelectedItem() == \"nombre\") {\n columnaABuscar = 0;\n }\n if (comboFiltro.getSelectedItem().toString() == \"Apellido\") {\n columnaABuscar = 1;\n }\n \n trsFiltro.setRowFilter(RowFilter.regexFilter(txtfiltro.getText(), columnaABuscar));\n }", "Collection<GestionPrecioDTO> findCampaniasFiltros (GestionPrecioDTO gestionPrecio,String estadoCobro);" ]
[ "0.6111765", "0.60193205", "0.59149873", "0.5884707", "0.5845975", "0.5818293", "0.5807381", "0.57382053", "0.56990457", "0.5657364", "0.5654097", "0.5644999", "0.56251085", "0.55715805", "0.55487853", "0.5528444", "0.55153424", "0.5505389", "0.54953355", "0.5493769", "0.54890597", "0.5482913", "0.54772246", "0.5453425", "0.54494506", "0.54459226", "0.54410136", "0.5438842", "0.5423417", "0.5416879", "0.5415606", "0.5415236", "0.54060537", "0.53989255", "0.539496", "0.5390973", "0.5368176", "0.5366009", "0.5365125", "0.5365084", "0.5363766", "0.53568804", "0.5354837", "0.53522503", "0.535113", "0.5351018", "0.53429204", "0.5342342", "0.53412646", "0.53341275", "0.53237486", "0.53219914", "0.5303438", "0.53014296", "0.529911", "0.52968115", "0.52925426", "0.52867454", "0.5285914", "0.5284597", "0.52806044", "0.5277925", "0.5273799", "0.5270492", "0.5267122", "0.5266829", "0.52619797", "0.5256609", "0.52493095", "0.5248373", "0.5247117", "0.5230489", "0.52205426", "0.5219778", "0.52189404", "0.52184653", "0.5209839", "0.5208635", "0.51962256", "0.51951754", "0.51951", "0.518784", "0.5183272", "0.51828307", "0.5180566", "0.5179907", "0.51795787", "0.5177425", "0.5176527", "0.5175033", "0.5170946", "0.5167608", "0.5167566", "0.51669437", "0.51569897", "0.51513785", "0.5146414", "0.5142369", "0.51416963", "0.5139986" ]
0.555358
14
Recupera una unica fila desde el result set especificado
protected ProductosPuntoVenta fetchSingleResult(ResultSet rs) throws SQLException { if (rs.next()) { ProductosPuntoVenta dto = new ProductosPuntoVenta(); populateDto(dto, rs); return dto; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Artista loadNext(ResultSet resultSet)\r\n\t\t\tthrows SQLException {\n\t\tint i = 1;\r\n\t\tLong codArtista = resultSet.getLong(i++);\t \r\n\t\tString nomeArtista = resultSet.getString(i++);\r\n\r\n\t\t// Rellena el objeto\r\n\t\tArtista a = new Artista();\r\n\t\ta.setCodArtista(codArtista);\r\n\t\ta.setNomeArtista(nomeArtista);\r\n\t\treturn a;\r\n\t}", "public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\r\n\t\t\t\t}\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\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "public void MostrarFacturas() {// METODO MOSTRAR FACTURAS\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera fc, facturadetalle fd WHERE \"\n + \"fc.idFacturaCabecera = fd.FacturaCabecera_idFacturaCabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n\n while (rs.next()) {\n System.out.println(rs.getInt(\"idFacturaCabecera\") + \"|\" + rs.getDate(\"fecha\") + \"|\"\n + rs.getFloat(\"subtotal\") + \"|\" + rs.getFloat(\"iva\") + \"|\" + rs.getFloat(\"total\") + \"|\"\n + rs.getString(\"estado\") + \"|\" + rs.getString(\"descripcion\"));\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Object [][] getRubrosPresupuesto2(String presupuesto) throws SQLException \r\n {\n\r\n Statement stmt = con.createStatement();\r\n String strSQL = \"SELECT idrubro,nombre,saldo,tipo_pago FROM RUBROS WHERE IDPRESUPUESTO=\"+ presupuesto+\" ORDER BY TIPO_PAGO\";\r\n\r\n ResultSet rs = stmt.executeQuery(strSQL); \r\n \r\n String registro[];\r\n ArrayList arrayList = new ArrayList();\r\n\r\n int index=0;\r\n Utilities utils = new Utilities();\r\n while (rs.next())\r\n { \r\n registro = new String[5];\r\n registro [0] = rs.getString(\"IDRUBRO\");\r\n registro [1] = rs.getString(\"TIPO_PAGO\");\r\n registro [2] = rs.getString(\"NOMBRE\").trim();\r\n registro [3] = utils.priceWithDecimal(rs.getDouble(\"SALDO\")); \r\n arrayList.add(registro);\r\n \r\n index++;\r\n } \r\n \r\n Object[][] rowData = new Object[index][4]; \r\n int j=0;\r\n while (j<index)\r\n {\r\n arrayList.iterator().hasNext();\r\n String reg[] = (String[]) arrayList.get(j);\r\n rowData [j][0] = reg[0] ;\r\n rowData [j][1] = reg[1] ;\r\n rowData [j][2] = reg[2] ;\r\n rowData [j][3] = reg[3] ; \r\n j++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n \r\n return rowData; \r\n }", "public List<SpasaCRN> obtenerSpasaFiltros() {\n\n if (conectado) {\n try {\n String bool = \"false\";\n List<SpasaCRN> filtrosCRNs = new ArrayList();\n\n String Query = \"SELECT * FROM `spasa_filtros` WHERE anio = YEAR(NOW()) AND ciclo = CURRENT_CICLO() ;\";\n Logy.mi(\"Query: \" + Query);\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n while (resultSet.next()) {\n\n SpasaCRN crn = new SpasaCRN();\n SpasaMateria mat = new SpasaMateria();\n crn.setCodigoProf(resultSet.getString(\"usuario\")); //modificado ahora que se cambio in a String\n crn.setCrnCpr(resultSet.getString(\"crn\"));\n String mc = resultSet.getString(\"materia_cod\");\n if (mc != null && !mc.isEmpty() && !mc.equals(\"null\")) {\n crn.setMateriaRuta(mc);\n mat.setMateriaRuta(mc);\n }\n String m = resultSet.getString(\"materia_nom\");\n if (m != null && !m.isEmpty() && !m.equals(\"null\")) {\n mat.setNombreMat(m);\n }\n String d = resultSet.getString(\"departamento_nom\");\n if (d != null && !d.isEmpty() && !d.equals(\"null\")) {\n mat.setNombreDepto(d);\n }\n String dia = resultSet.getString(\"dia\");\n if (dia != null && !dia.isEmpty() && !dia.equals(\"null\")) {\n crn.setDiaHr(dia);\n }\n String h = resultSet.getString(\"hora\");\n if (h != null && !h.isEmpty() && !h.equals(\"null\")) {\n crn.setHiniHr(h);\n }\n crn.setMateria(mat);\n filtrosCRNs.add(crn);\n }\n\n return filtrosCRNs;\n\n } catch (SQLException ex) {\n Logy.me(\"No se pudo consultar tabla spasa_filtros : \" + ex.getMessage());\n return null;\n }\n } else {\n Logy.me(\"No se ha establecido previamente una conexion a la DB\");\n return null;\n }\n }", "public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }", "public Collection cargarDeObjetivo(int codigoCiclo, int codigoPlan, int objetivo, int periodo, String estado) {\n/* 121 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 123 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion as Nombretipomedicion, Est.Descripcion as Nombreestado, Um.Descripcion as Nombre_Unidad_Medida, SUM(CASE WHEN ac.NUMERO IS NOT NULL THEN 1 ELSE 0 END) acciones from Cal_Plan_Metas m left join Am_Acciones Ac on( m.Codigo_Ciclo = Ac.Codigo_Ciclo and m.Codigo_Plan = Ac.Codigo_Plan and m.Codigo_Meta = Ac.Codigo_Meta and Ac.Asociado = 'P'), \\t\\t Sis_Multivalores Tm, \\t\\t Sis_Multivalores Est, \\t\\t Sis_Multivalores Um where m.Tipo_Medicion = Tm.Valor and Tm.Tabla = 'CAL_TIPO_MEDICION' and m.Estado = Est.Valor and Est.Tabla = 'CAL_ESTADO_META' and m.Unidad_Medida = Um.Valor and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META' and m.codigo_ciclo=\" + codigoCiclo + \" and m.codigo_plan=\" + codigoPlan + \" and m.codigo_objetivo=\" + objetivo;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 180 */ if (estado.length() > 0) {\n/* 181 */ s = s + \" and m.estado='A'\";\n/* */ }\n/* */ \n/* 184 */ if (periodo == 1) {\n/* 185 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 187 */ else if (periodo == 2) {\n/* 188 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 190 */ else if (periodo == 3) {\n/* 191 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 193 */ else if (periodo == 4) {\n/* 194 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 196 */ else if (periodo == 5) {\n/* 197 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 199 */ else if (periodo == 6) {\n/* 200 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 202 */ else if (periodo == 7) {\n/* 203 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 205 */ else if (periodo == 8) {\n/* 206 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 208 */ else if (periodo == 9) {\n/* 209 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 211 */ else if (periodo == 10) {\n/* 212 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 214 */ else if (periodo == 11) {\n/* 215 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 217 */ else if (periodo == 12) {\n/* 218 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 221 */ s = s + \" GROUP BY m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion, Est.Descripcion, Um.Descripcion order by m.descripcion\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 259 */ boolean rtaDB = this.dat.parseSql(s);\n/* 260 */ if (!rtaDB) {\n/* 261 */ return resultados;\n/* */ }\n/* */ \n/* 264 */ this.rs = this.dat.getResultSet();\n/* 265 */ while (this.rs.next()) {\n/* 266 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 269 */ catch (Exception e) {\n/* 270 */ e.printStackTrace();\n/* 271 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 273 */ return resultados;\n/* */ }", "public List<TblRetur>getAllDataRetur();", "public Collection<FlujoDetalleDTO> cargarTodos(int codigoFlujo) {\n/* 138 */ Collection<FlujoDetalleDTO> resultados = new ArrayList<FlujoDetalleDTO>();\n/* */ try {\n/* 140 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" order by t.secuencia\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 178 */ boolean rtaDB = this.dat.parseSql(s);\n/* 179 */ if (!rtaDB) {\n/* 180 */ return resultados;\n/* */ }\n/* 182 */ this.rs = this.dat.getResultSet();\n/* 183 */ while (this.rs.next()) {\n/* 184 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 187 */ catch (Exception e) {\n/* 188 */ e.printStackTrace();\n/* 189 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarTodos \", e);\n/* */ } \n/* 191 */ return resultados;\n/* */ }", "public ResultSet selecionar(String tabela);", "public ArrayList<oferta> listadoOfertaxComercio(int idComercio) {\n ArrayList<oferta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\"select o.nombre, o.cantidad, o.precio , c.id_comercio, id_oferta, descripcion, fecha, o.ruta, o.estado\\n\"\n + \"from Comercios c \\n\"\n + \"join Ofertas o on c.id_comercio = o.id_comercio \\n\"\n + \"where c.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cantidad = rs.getInt(2);\n Float precio = rs.getFloat(3);\n int id = rs.getInt(4);\n int ido = rs.getInt(5);\n String descripcion = rs.getString(6);\n String fecha = rs.getString(7);\n String ruta = rs.getString(8);\n boolean estado = rs.getBoolean(9);\n\n rubro rf = new rubro(0, \"\", true, \"\", \"\");\n comercio c = new comercio(\"\", \"\", \"\", id, true, \"\", \"\", rf, \"\");\n oferta o = new oferta(ido, nombreO, cantidad, precio, c, estado, descripcion, fecha,ruta );\n\n lista.add(o);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public Object [][] getRubrosPresupuesto(String presupuesto) throws SQLException \r\n {\n\r\n Statement stmt = con.createStatement();\r\n String strSQL = \"SELECT * FROM RUBROS WHERE IDPRESUPUESTO=\"+ presupuesto+\" ORDER BY TIPO_PAGO\";\r\n\r\n ResultSet rs = stmt.executeQuery(strSQL); \r\n \r\n String registro[];\r\n ArrayList arrayList = new ArrayList();\r\n\r\n int index=0;\r\n Utilities utils = new Utilities();\r\n while (rs.next())\r\n { \r\n registro = new String[5];\r\n registro [0] = rs.getString(\"IDRUBRO\");\r\n registro [1] = rs.getString(\"TIPO_PAGO\");\r\n registro [2] = rs.getString(\"NOMBRE\").trim();\r\n registro [3] = utils.priceWithDecimal(rs.getDouble(\"MONTO\")); \r\n registro [4] = utils.priceWithDecimal(rs.getDouble(\"SALDO\")); \r\n arrayList.add(registro);\r\n \r\n index++;\r\n } \r\n \r\n Object[][] rowData = new Object[index][5]; \r\n int j=0;\r\n while (j<index)\r\n {\r\n arrayList.iterator().hasNext();\r\n String reg[] = (String[]) arrayList.get(j);\r\n rowData [j][0] = reg[0] ;\r\n rowData [j][1] = reg[1] ;\r\n rowData [j][2] = reg[2] ;\r\n rowData [j][3] = reg[3] ;\r\n rowData [j][4] = reg[4] ; \r\n j++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n \r\n return rowData; \r\n }", "@Override\n public Collection<FasciaOrariaBean> doRetrieveAll() throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria\";\n ArrayList<FasciaOrariaBean> collection = new ArrayList<>();\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n System.out.println(\"DoRetriveAll\" + statement);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n collection.add(bean);\n }\n return collection;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n return collection;\n }", "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 static ArrayList <FichajeOperarios> obtenerFichajeOperarios(Date fecha) throws SQLException{\n Connection conexion=null;\n Connection conexion2=null;\n ResultSet resultSet;\n PreparedStatement statement;\n ArrayList <FichajeOperarios> FichajeOperarios=new ArrayList();\n Conexion con=new Conexion();\n\n //java.util.Date fecha = new Date();\n \n //para saber la fecha actual\n Date fechaActual = new Date();\n DateFormat formatoFecha = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n //System.out.println(formatoFecha.format(fechaActual));\n \n try {\n\n conexion = con.connecta();\n\n\n statement=conexion.prepareStatement(\"select codigo,nombre,HORA_ENTRADA,centro from \"\n + \" (SELECT op.codigo,op.nombre,F2.FECHA AS FECHA_ENTRADA,F2.HORA AS HORA_ENTRADA,F2.FECHA+f2.HORA AS FICHA_ENTRADA,centro.DESCRIP as CENTRO,\"\n + \" (select top(1) f22.fecha \"\n + \" from e001_fichajes2 as f22 where f22.OPERARIO=f2.OPERARIO and f22.tipo='S' and f22.recno>f2.recno order by f22.recno) AS FECHA_SALIDA,\"\n + \" (select top(1) f22.hora \"\n + \" from e001_fichajes2 as f22 \"\n + \" where f22.OPERARIO=f2.OPERARIO and f22.tipo='S' and f22.recno>f2.recno \"\n + \" order by f22.recno) AS HORA_SALIDA,\"\n + \" (select top(1) f22.fecha \"\n + \" from e001_fichajes2 as f22 \"\n + \" where f22.OPERARIO=f2.OPERARIO and f22.tipo='S' and f22.recno>f2.recno \"\n + \" order by f22.recno)+\"\n + \" (select top(1) f22.hora \"\n + \" from e001_fichajes2 as f22 \"\n + \" where f22.OPERARIO=f2.OPERARIO and f22.tipo='S' and f22.recno>f2.recno \"\n + \" order by f22.recno) as FICHA_SALIDA \"\n + \" FROM E001_OPERARIO as op left join e001_fichajes2 as f2 on op.codigo=f2.OPERARIO and f2.tipo='E' JOIN E001_centrost as centro on f2.CENTROTRAB=centro.CODIGO \"\n + \" WHERE F2.FECHA='\"+formatoFecha.format(fecha)+\"' and f2.HORA=(select max(hora) from e001_fichajes2 as f22 where f2.operario=f22.operario and f22.tipo='e' and f22.FECHA=f2.FECHA)) as a\"\n + \" where FICHA_SALIDA is null \"\n + \" ORDER BY codigo\");\n \n resultSet = statement.executeQuery();\n while (resultSet.next()) {\n FichajeOperarios fiop=new FichajeOperarios(); \n fiop.setCodigo(resultSet.getString(\"CODIGO\"));\n fiop.setNombre(resultSet.getString(\"NOMBRE\"));\n fiop.setHora_Entrada(resultSet.getString(\"HORA_ENTRADA\"));\n //fiop.setHora_Salida(resultSet.getString(\"HORA_SALIDA\"));\n fiop.setCentro(resultSet.getString(\"CENTRO\"));\n FichajeOperarios.add(fiop);\n }\n \n } catch (SQLException ex) {\n System.out.println(ex);\n \n }\n return FichajeOperarios;\n \n \n }", "public static String[][] leerPrestados() {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][11];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n //leolos registros y los guardo cada uno en un renglon de la matriz\n System.out.println(\"ResultSet: \" + result.getString(1));\n \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }", "protected Utente[] fetchMultiResults(ResultSet rs) throws SQLException\n\t{\n\t\tCollection resultList = new ArrayList();\n\t\twhile (rs.next()) {\n\t\t\tUtente dto = new Utente();\n\t\t\tpopulateDto( dto, rs);\n\t\t\tresultList.add( dto );\n\t\t}\n\t\t\n\t\tUtente ret[] = new Utente[ resultList.size() ];\n\t\tresultList.toArray( ret );\n\t\treturn ret;\n\t}", "public void getAllCursosAvanzado() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT id_curso, nombre_curso, familia.nombre_familia as familia, id_profesor FROM curso \"\n + \"INNER JOIN familia ON curso.id_familia = familia.id_familia;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n \n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n String familia = rs.getString(\"familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n \n System.out.format(\"%d,%s,%s,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public List<Usuarios> getUsuarios(){ //retorna una lista con todos los Usuarios en la database\n List<Usuarios> listaUsuarios = new ArrayList<Usuarios>();\n conexion = base.GetConnection();\n try{\n String consulta = \"select Cedula from usuarios\";\n PreparedStatement select = conexion.prepareStatement(consulta);\n boolean r = select.execute();\n if(r){\n ResultSet result = select.getResultSet();\n while(result.next()){\n Usuarios usuario = new Usuarios(result.getString(1));\n System.out.println(usuario);\n listaUsuarios.add(usuario);\n }\n result.close();\n }\n conexion.close();\n }catch(SQLException ex){\n System.out.println(ex.toString());\n }\n return listaUsuarios;\n}", "public Collection cargarMasivo(int codigoCiclo, String proceso, String subproceso, int periodo) {\n/* 287 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 289 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, u.Descripcion Nombre_Area, Um.Descripcion as Nombre_Unidad_Medida, to_char(m.Codigo_Objetivo,'9999999999') ||' - ' || o.Descripcion Nombre_Objetivo, to_char(m.Codigo_Meta,'9999999999') ||' - ' || m.Descripcion Nombre_Meta, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, l.Valor_Logro, case when l.Valor_Logro is not null then 'A' else 'N' end Existe from Cal_Planes p, Cal_Plan_Objetivos o, Cal_Plan_Metas m left join Cal_Logros l on( m.Codigo_Ciclo = l.Codigo_Ciclo and m.Codigo_Plan = l.Codigo_Plan and m.Codigo_Meta = l.Codigo_Meta and m.Codigo_Objetivo = l.Codigo_Objetivo and \" + periodo + \" = l.Periodo),\" + \" Unidades_Dependencia u,\" + \" Sis_Multivalores Um\" + \" where p.Ciclo = o.Codigo_Ciclo\" + \" and p.Codigo_Plan = o.Codigo_Plan\" + \" and o.Codigo_Ciclo = m.Codigo_Ciclo\" + \" and o.Codigo_Plan = m.Codigo_Plan\" + \" and o.Codigo_Objetivo = m.Codigo_Objetivo\" + \" and p.Codigo_Area = u.Codigo\" + \" and m.Unidad_Medida = Um.Valor\" + \" and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META'\" + \" and o.Proceso = '\" + proceso + \"'\" + \" and o.Subproceso = '\" + subproceso + \"'\" + \" and p.Ciclo = \" + codigoCiclo + \" and m.Estado = 'A'\" + \" and o.Estado = 'A'\" + \" and o.Tipo_Objetivo in ('G', 'M')\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 333 */ if (periodo == 1) {\n/* 334 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 336 */ else if (periodo == 2) {\n/* 337 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 339 */ else if (periodo == 3) {\n/* 340 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 342 */ else if (periodo == 4) {\n/* 343 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 345 */ else if (periodo == 5) {\n/* 346 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 348 */ else if (periodo == 6) {\n/* 349 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 351 */ else if (periodo == 7) {\n/* 352 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 354 */ else if (periodo == 8) {\n/* 355 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 357 */ else if (periodo == 9) {\n/* 358 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 360 */ else if (periodo == 10) {\n/* 361 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 363 */ else if (periodo == 11) {\n/* 364 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 366 */ else if (periodo == 12) {\n/* 367 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 370 */ s = s + \" order by m.Codigo_Ciclo, m.Codigo_Objetivo, m.Codigo_Meta, u.Descripcion\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 377 */ boolean rtaDB = this.dat.parseSql(s);\n/* 378 */ if (!rtaDB) {\n/* 379 */ return resultados;\n/* */ }\n/* */ \n/* 382 */ this.rs = this.dat.getResultSet();\n/* 383 */ while (this.rs.next()) {\n/* 384 */ CalMetasDTO reg = new CalMetasDTO();\n/* 385 */ reg.setCodigoCiclo(codigoCiclo);\n/* 386 */ reg.setCodigoPlan(this.rs.getInt(\"codigo_plan\"));\n/* 387 */ reg.setCodigoMeta(this.rs.getInt(\"codigo_meta\"));\n/* 388 */ reg.setCodigoObjetivo(this.rs.getInt(\"codigo_objetivo\"));\n/* 389 */ reg.setNombreArea(this.rs.getString(\"Nombre_Area\"));\n/* 390 */ reg.setNombreMeta(this.rs.getString(\"Nombre_meta\"));\n/* 391 */ reg.setNombreObjetivo(this.rs.getString(\"Nombre_Objetivo\"));\n/* 392 */ reg.setUnidadMedida(this.rs.getString(\"unidad_medida\"));\n/* 393 */ reg.setValorMinimo(this.rs.getDouble(\"valor_minimo\"));\n/* 394 */ reg.setValorMaximo(this.rs.getDouble(\"valor_maximo\"));\n/* 395 */ reg.setValorLogro(this.rs.getDouble(\"Valor_Logro\"));\n/* 396 */ reg.setNombreUnidadMedida(this.rs.getString(\"nombre_unidad_medida\"));\n/* 397 */ reg.setEstado(this.rs.getString(\"existe\"));\n/* 398 */ resultados.add(reg);\n/* */ }\n/* */ \n/* 401 */ } catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 405 */ return resultados;\n/* */ }", "public ArrayList < Dataclass > getData() {\n ArrayList < Dataclass > dataList = new ArrayList < Dataclass > ();\n Connection connection = getConnection();\n String query = \"SELECT * FROM `przychodnia` \";\n if (option == 1) query = \"SELECT * FROM `lekarz` \";\n if (option == 2) query = \"SELECT * FROM `wizyta` \";\n if (option == 3) query = \"SELECT * FROM `badanie` \";\n Statement st;\n ResultSet rs;\n\n try {\n st = connection.createStatement();\n rs = st.executeQuery(query);\n Dataclass dc;\n while (rs.next()) {\n if (option == 1) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Imię\"), rs.getString(\"Nazwisko\"), rs.getString(\"Specjalizacja\"), rs.getInt(\"ID_Przychodni\"));\n else if (option == 2) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getString(\"Opis Badania\"), rs.getString(\"Imię i nazwisko pacjenta\"), rs.getInt(\"ID_Lekarza\"));\n else if (option == 3) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getBlob(\"Załącznik\"));\n else dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Nazwa\"), rs.getString(\"Adres\"), rs.getString(\"Miasto\"));\n dataList.add(dc);\n }\n } catch (Exception e) {\n System.err.print(e);\n }\n return dataList;\n }", "@Override\r\n\tpublic Map<String, Object> readAll() {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate).withCatalogName(\"PKG_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .withProcedureName(\"PR_LIS_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .declareParameters(new SqlOutParameter(\"CUR_ESTADO_CIVIL\", OracleTypes.CURSOR,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t new ColumnMapRowMapper()));\r\n\t\treturn simpleJdbcCall.execute();\r\n\t}", "public ArrayList<Vector<Object>> recuperaTablaFacturas(String filtro) {\r\n\t\tArrayList<Vector<Object>> tableData = null;\r\n\t\tArrayList<Factura> lista = recuperaFacturaParaTabla(filtro);\r\n\t\ttableData = new ArrayList<>();\r\n\t\tfor (Factura factura : lista) {\r\n\t\t\tVector<Object> filaData = new Vector<>();\r\n\t\t\tfilaData.add(factura);\r\n\t\t\tfilaData.add(factura.getFecha());\r\n\t\t\tfilaData.add(factura.getCliente().toString());\r\n\t\t\tfilaData.add(factura.getImpTotal());\r\n\t\t\tfilaData.add(factura.isCobrada());\r\n\t\t\ttableData.add(filaData);\r\n\t\t}\r\n\t\treturn tableData;\r\n\t}", "public List<Clientes> read(){\n Connection con = ConectionFactory.getConnection();\n PreparedStatement pst = null;\n ResultSet rs = null;\n \n List<Clientes> cliente = new ArrayList<>();\n \n try {\n pst = con.prepareStatement(\"SELECT * from clientes ORDER BY fantasia\");\n rs = pst.executeQuery();\n \n while (rs.next()) { \n Clientes clientes = new Clientes();\n clientes.setCodigo(rs.getInt(\"codigo\"));\n clientes.setFantasia(rs.getString(\"fantasia\"));\n clientes.setCep(rs.getString(\"cep\"));\n clientes.setUf(rs.getString(\"uf\"));\n clientes.setLogradouro(rs.getString(\"logradouro\"));\n clientes.setNr(rs.getString(\"nr\"));\n clientes.setCidade(rs.getString(\"cidade\"));\n clientes.setBairro(rs.getString(\"bairro\"));\n clientes.setContato(rs.getString(\"contato\"));\n clientes.setEmail(rs.getString(\"email\"));\n clientes.setFixo(rs.getString(\"fixo\"));\n clientes.setCelular(rs.getString(\"celular\"));\n clientes.setObs(rs.getString(\"obs\"));\n cliente.add(clientes); \n }\n } catch (SQLException ex) {\n \n }finally{\n ConectionFactory.closeConnection(con, pst, rs);\n }\n return cliente;\n}", "public List<Aflevering> readAll() {\n List<Aflevering> lijst = new ArrayList<>();\n try {\n ResultSet rs = sqlConnection.executeSql(\"SELECT * FROM AFLEVERING\");\n while(rs.next()) {\n lijst.add(new Aflevering(rs.getString(\"ID\"),\n rs.getString(\"Serie\"),\n rs.getString(\"Seizoen\"),\n rs.getString(\"Titel\"),\n rs.getString(\"Tijdsduur\")));\n }\n }\n catch(Exception e) {\n System.out.println(e);\n }\n return lijst;\n }", "public ArrayList<CFicheFrais> fetchFichesFrais(String matricule) {\r\n if (bdd.connecter() == true) {\r\n ArrayList<CFicheFrais> liste = new ArrayList();\r\n ResultSet rs = bdd.executerRequeteQuery(\"SELECT * FROM `fiche_frais` WHERE fiche_frais.VIS_MATRICULE_VISITEUR=\"+ matricule +\" ;\");\r\n //ResultSet rs = bdd.executerRequeteQuery(\"SELECT * FROM `fiche_frais` ,`inclure`, `type_frais` WHERE fiche_frais.VIS_MATRICULE_VISITEUR=\"+ matricule +\" AND fiche_frais.FF_ID_FICHE_FRAIS=inclure.FF_ID_FICHE_FRAIS AND inclure.TF_CODE_TYPE_FRAIS=type_frais.TF_CODE_TYPE_FRAIS ;\");\r\n try {\r\n while (rs.next()) {\r\n CFicheFrais FicheFrais = convertir_RS_FicheFrais(rs);\r\n liste.add(FicheFrais);\r\n }\r\n } catch (SQLException ex) {\r\n }\r\n bdd.deconnecter();\r\n \r\n \r\n return liste;\r\n } else {\r\n System.out.println(\"Connexion KO\");\r\n }\r\n return null;\r\n }", "@Override\n public Collection<resumenSemestre> resumenSemestre(int idCurso, int mesApertura, int mesCierre) throws Exception {\n Collection<resumenSemestre> retValue = new ArrayList();\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"select ma.nombremateria, p.idcuestionario as test, \"\n + \"round(avg(p.puntaje),2) as promedio, cue.fechainicio, MONTH(cue.fechacierre) as mes \"\n + \"from puntuaciones p, cuestionario cue, curso cu, materia ma \"\n + \"where cu.idcurso = ma.idcurso and ma.idmateria = cue.idmateria \"\n + \"and cue.idcuestionario = p.idcuestionario and cu.idcurso = ? \"\n + \"and MONTH(cue.fechacierre) >= ? AND MONTH(cue.fechacierre) <= ? and YEAR(cue.fechacierre) = YEAR(NOW())\"\n + \"GROUP by ma.nombremateria, MONTH(cue.fechacierre) ORDER BY ma.nombremateria\");\n pstmt.setInt(1, idCurso );\n pstmt.setInt(2, mesApertura);\n pstmt.setInt(3, mesCierre);\n rs = pstmt.executeQuery();\n while (rs.next()) { \n retValue.add(new resumenSemestre(rs.getString(\"nombremateria\"), rs.getInt(\"test\"), rs.getInt(\"promedio\"), rs.getInt(\"mes\")));\n }\n return retValue;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n\n\n }", "public ListaPartidas recuperarPartidas() throws SQLException {\n ListaPartidas listaPartidas = null;\n try {\n getConexion();\n String consulta = \"SELECT MANOS.id_mano, CARTAS.valor, CARTAS.palo, JUGADORES.nombre, PARTIDAS.id_partida \" +\n \"FROM MANOS \" +\n \"LEFT JOIN PARTIDAS ON PARTIDAS.id_mano = MANOS.id_mano \" +\n \"LEFT JOIN CARTAS ON CARTAS.id_carta = MANOS.id_carta \" +\n \"LEFT JOIN JUGADORES ON JUGADORES.id_jug = PARTIDAS.id_jug \" +\n \"ORDER BY PARTIDAS.id_mano\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n // Compruebo que se han devuelto datos\n if (registros.next()) {\n // Inicializo el contenedor que se devolverá\n listaPartidas = new ListaPartidas();\n // Declaro e inicializo los objetos que servirán de buffer para añadir datos a cada partida\n LinkedList<Jugador> listaJugadores = new LinkedList<Jugador>();\n LinkedList<Mano> resultado = new LinkedList<Mano>();\n Mano mano = new Mano();\n // Variable que sirve para controlar cuando hay una nueva partida\n int numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n // Variable que sirve para controlar cuando hay una nueva mano\n int numMano = registros.getInt(\"MANOS.id_mano\");\n // Devuelvo el cursor del ResultSet a su posición inicial\n registros.beforeFirst();\n // Bucle encargado de añadir datos a los contenedores\n while (registros.next()) {\n // Declaración de variables\n String palo = registros.getString(\"CARTAS.palo\");\n String valor = registros.getString(\"CARTAS.valor\");\n String nombre = registros.getString(\"JUGADORES.nombre\");\n // Se crea una carta con el palo y el valor devuelto por la consulta SQL\n Carta carta = new Carta(palo, valor);\n // Agrego la carta a la mano\n mano.agregarCarta(carta);\n // Agrego jugadores al contenedor de jugadores controlando si hay duplicados\n if (!listaJugadores.contains(nombre) || listaJugadores.isEmpty()) {\n Jugador jugador = new Jugador(nombre);\n listaJugadores.add(jugador);\n }\n // Cuando hay una nueva mano, la añado al contenedor resultados y creo una nueva Mano\n if (numMano != registros.getInt(\"MANOS.id_mano\") || registros.isLast()) {\n numMano = registros.getInt(\"MANOS.id_mano\");\n mano.setPropietario(nombre);\n resultado.add(mano);\n mano = new Mano();\n }\n // Cuando hay una nueva partida, guardo un objeto Partida en el contenedor de partidas\n if (numPartida != registros.getInt(\"PARTIDAS.id_partida\") || registros.isLast()) {\n numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n Partida partida = new Partida(numPartida, listaJugadores, resultado);\n listaPartidas.agregarPartida(partida);\n // Reinicio los buffers de datos\n listaJugadores = new LinkedList<Jugador>();\n resultado = new LinkedList<Mano>();\n }\n }\n }\n } finally {\n closeConexion();\n }\n return listaPartidas;\n }", "public RecordSet obtenerResumen(DTOResumen dtoe) throws MareException{\n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerResumen(DTOResumen dtoe): Entrada\");\n \n RecordSet rs = new RecordSet();\n StringBuffer query = new StringBuffer();\n BelcorpService bs;\n try\n { bs = BelcorpService.getInstance();\n }\n catch(MareMiiServiceNotFoundException ex)\n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n /*query.append(\" SELECT distinct p.IDPRINCIPAL AS OID,CONCAT(p.name,CONCAT(' ',CONCAT(pv.STRINGVALUE,CONCAT(' ',CONCAT(pv2.STRINGVALUE,CONCAT(' ',CONCAT(pv3.STRINGVALUE,CONCAT(' ',pv4.STRINGVALUE)))))))) NOMBRE, \");\n query.append(\" gen.VAL_I18N AS CANAL, \");\n query.append(\" sma.DES_MARC AS MARCA, \"); \n query.append(\" subvta.DES_SUBG_VENT AS SUBGERVENTA, \");\n query.append(\" gen2.VAL_I18N AS REGION, \");\n query.append(\" gen3.VAL_I18N AS ZONA, \");\n query.append(\" secc.DES_SECCI AS SECCION, \");\n query.append(\" gen5.VAL_I18N AS TERRITORIO \");\n query.append(\" FROM v_gen_i18n_sicc gen, \");\n query.append(\" v_gen_i18n_sicc gen2, \");\n query.append(\" v_gen_i18n_sicc gen3, \");\n query.append(\" v_gen_i18n_sicc gen5, \");\n query.append(\" seg_marca sma, \");\n query.append(\" zon_secci secc, \");\n query.append(\" cob_usuar_etapa_cobra_detal cdetal, \");\n query.append(\" zon_sub_geren_venta subvta, \");\n query.append(\" cob_usuar_etapa_cobra_cabec ccabe, \");\n query.append(\" cob_usuar_cobra usucob, \");\n query.append(\" own_mare.principals p, \");\n query.append(\" propertyvalues pv, \");\n query.append(\" propertyvalues pv2, \");\n query.append(\" propertyvalues pv3, \");\n query.append(\" propertyvalues pv4, \");\n query.append(\" own_mare.users u \");\n query.append(\" WHERE cdetal.zsgv_oid_subg_vent = subvta.oid_subg_vent \");\n query.append(\" AND ccabe.oid_usua_etap_cobr = cdetal.oid_usua_etap_cobr_deta \");\n query.append(\" AND secc.oid_secc(+) = cdetal.zscc_oid_secc \");\n query.append(\" AND sma.oid_marc = subvta.marc_oid_marc \");\n query.append(\" AND ccabe.usco_oid_usua_cobr = usucob.oid_usua_cobr \");\n query.append(\" AND gen.val_oid = subvta.cana_oid_cana \");\n query.append(\" AND gen.attr_enti = 'SEG_CANAL' \");\n query.append(\" AND gen.attr_num_atri = 1 \");\n query.append(\" AND gen.idio_oid_idio = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND pv.idproperty(+) = 2 \");\n query.append(\" AND pv.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv2.idproperty(+) = 3 \");\n query.append(\" AND pv2.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv3.idproperty = 5 \");\n query.append(\" AND pv3.idprincipal = p.idprincipal \");\n query.append(\" AND pv4.idproperty = 6 \");\n query.append(\" AND pv4.idprincipal = p.idprincipal \");\n query.append(\" AND gen2.val_oid(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen2.attr_enti(+) = 'ZON_REGIO' \");\n query.append(\" AND gen2.attr_num_atri(+) = 1 \");\n query.append(\" AND gen2.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen3.val_oid(+) = cdetal.zzon_oid_zona \");\n query.append(\" AND gen3.attr_enti(+) = 'ZON_ZONA' \");\n query.append(\" AND gen3.attr_num_atri(+) = 1 \");\n query.append(\" AND gen3.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen5.val_oid(+) = cdetal.terr_oid_terr \");\n query.append(\" AND gen5.attr_enti(+) = 'ZON_TERRI' \");\n query.append(\" AND gen5.attr_num_atri(+) = 1 \");\n query.append(\" AND gen5.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND u.iduser = p.idprincipal \");\n query.append(\" AND p.idprincipal = ccabe.usco_oid_usua_cobr \");\n */\n \n /*query.append(\" SELECT distinct p.IDPRINCIPAL AS OID, \");\n query.append(\" p.name AS USUARIO, \");\n */\n //Se le agega \"p.IDPRINCIPAL,\" segun BELC300017927 \n //query.append(\" SELECT distinct p.name AS USUARIO, \"); \n query.append(\" SELECT distinct p.IDPRINCIPAL, p.name AS USUARIO, \");\n query.append(\" CONCAT(p.name,CONCAT(' ',CONCAT(pv.STRINGVALUE,CONCAT(' ',CONCAT(pv2.STRINGVALUE,CONCAT(' ',CONCAT(pv3.STRINGVALUE,CONCAT(' ',pv4.STRINGVALUE)))))))) NOMBRE, \");\n query.append(\" sma.DES_MARC AS MARCA, \");\n query.append(\" gen.VAL_I18N AS CANAL, \"); \n query.append(\" subvta.DES_SUBG_VENT AS SUBGERVENTA, \");\n query.append(\" regio.DES_REGI AS REGION, \");\n query.append(\" zona.DES_ZONA AS ZONA, \"); \n \t query.append(\" secc.DES_SECCI AS SECCION, \"); \n query.append(\" terri.COD_TERR AS TERRITORIO \");\n query.append(\" FROM v_gen_i18n_sicc gen, \");\n query.append(\" SEG_CANAL canal, \");\n query.append(\" ZON_TERRI terri, \");\n query.append(\" ZON_ZONA zona, \");\n query.append(\" ZON_REGIO regio, \");\n query.append(\" seg_marca sma, \");\n query.append(\" zon_secci secc, \");\n query.append(\" cob_usuar_etapa_cobra_detal cdetal, \");\n query.append(\" zon_sub_geren_venta subvta, \");\n query.append(\" cob_usuar_etapa_cobra_cabec ccabe, \");\n query.append(\" cob_usuar_cobra usucob, \");\n query.append(\" principals p, \");\n query.append(\" propertyvalues pv, \");\n query.append(\" propertyvalues pv2, \");\n query.append(\" propertyvalues pv3, \");\n query.append(\" propertyvalues pv4, \");\n query.append(\" users u \");\n query.append(\" WHERE cdetal.zsgv_oid_subg_vent = subvta.oid_subg_vent \");\n query.append(\" AND ccabe.oid_usua_etap_cobr = cdetal.UECC_OID_USUA_ETAP_COBR \");\n query.append(\" AND secc.oid_secc(+) = cdetal.zscc_oid_secc \");\n query.append(\" AND sma.oid_marc = subvta.marc_oid_marc \");\n query.append(\" AND ccabe.usco_oid_usua_cobr = usucob.oid_usua_cobr \");\n query.append(\" AND gen.val_oid = subvta.cana_oid_cana \");\n query.append(\" AND gen.attr_enti = 'SEG_CANAL' \");\n query.append(\" AND gen.attr_num_atri = 1 \");\n query.append(\" AND gen.idio_oid_idio = '1' \");\n query.append(\" AND pv.idproperty(+) = 2 \");\n query.append(\" AND pv.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv2.idproperty(+) = 3 \");\n query.append(\" AND pv2.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv3.idproperty = 5 \");\n query.append(\" AND pv3.idprincipal = p.idprincipal \");\n query.append(\" AND pv4.idproperty = 6 \");\n query.append(\" AND pv4.idprincipal = p.idprincipal \t\t \");\n query.append(\" AND terri.OID_TERR = cdetal.terr_oid_terr\t\t \");\n query.append(\" AND zona.OID_ZONA = cdetal.zzon_oid_zona\t\t \");\n query.append(\" AND regio.OID_REGI = cdetal.ZORG_OID_REGI\t\t \");\n query.append(\" AND u.iduser = p.idprincipal \");\n query.append(\" AND p.idprincipal = usucob.USER_OID_USUA_COBR \");\n \n /* Validaciones */\n if( dtoe.getOidMarca()!= null ){\n query.append(\" AND subvta.MARC_OID_MARC = \" + dtoe.getOidMarca() );\n }\n if( dtoe.getOidCanal() != null){\n query.append(\" AND subvta.CANA_OID_CANA = \" + dtoe.getOidCanal() );\n }\n if( dtoe.getOidSGV() != null ){\n query.append(\" AND subvta.OID_SUBG_VENT = \" + dtoe.getOidSGV() );\n }\n if( dtoe.getOidRegion() != null ){\n query.append(\" AND cdetal.ZORG_OID_REGI = \" + dtoe.getOidRegion() ); \n }\n if( dtoe.getOidZona() != null ){\n query.append(\" AND cdetal.ZZON_OID_ZONA = \" + dtoe.getOidZona() ); \n }\n if( dtoe.getOidSeccion() != null ){\n query.append(\" AND cdetal.ZSCC_OID_SECC = \" + dtoe.getOidSeccion() );\n }\n if( dtoe.getOidTerritorio() != null ){\n query.append(\" AND cdetal.TERR_OID_TERR = \" + dtoe.getOidTerritorio() );\n }\n UtilidadesLog.debug(\"query \" + query.toString() );\n try \n { rs = bs.dbService.executeStaticQuery(query.toString());\n }\n catch (Exception ex) \n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n }\t\n \n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerResumen(DTOResumen dtoe): Salida\");\n \n return rs; \n }", "public void Get() { ob = ti.Get(currentrowi, \"persoana\"); ID = ti.ID; CNP = ob[0]; Nume = ob[1]; Prenume = ob[2]; }", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "public List<Aluguel> listarAlugueisPorFilme(Filme filme) throws Exception{\n \n StringBuilder sql = new StringBuilder();\n sql.append(\" SELECT a.id id, a.data_aluguel data_aluguel, a.data_devolucao data_devolucao, a.valor valor, c.nome nome FROM aluguel a \"); \n sql.append(\" INNER JOIN aluguel_filme af ON af.aluguel_id = a.id INNER JOIN filme f ON f.id = af.filme_id \") ;\n sql.append(\" INNER JOIN cliente c on c.id = a.cliente_id \") ;\n sql.append(\" where f.titulo like ? \");\n sql.append(\" GROUP BY a.id, a.data_aluguel, a.data_devolucao, a.valor, c.nome \");\n \n Connection connection = ConexaoUtil.getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(sql.toString());\n preparedStatement.setString(1, \"%\" + filme.getTitulo() + \"%\");\n ResultSet resultSet = preparedStatement.executeQuery();\n \n List<Aluguel> alugueis = new ArrayList<Aluguel>();\n while(resultSet.next()){\n Aluguel aluguel = new Aluguel();\n aluguel.setId(resultSet.getLong(\"id\"));\n aluguel.setDataAluguel(resultSet.getDate(\"data_aluguel\"));\n aluguel.setDataDevolucao(resultSet.getDate(\"data_devolucao\"));\n aluguel.setValor(resultSet.getDouble(\"valor\"));\n Cliente cliente = new Cliente();\n cliente.setNome(resultSet.getString(\"nome\"));\n aluguel.setCliente(cliente);\n alugueis.add(aluguel);\n }\n resultSet.close();\n preparedStatement.close();\n connection.close();\n return alugueis;\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 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 }", "@Override\n\tpublic ArrayList<ClienteFisico> listar() throws SQLException {\n\t\t\n\t\tArrayList<ClienteFisico> listar = new ArrayList<ClienteFisico>();\n\t\t\n\t\t\n\t\tfor(ClienteFisico c : this.set){\n\t\t\t\n\t\t\tlistar.add(c);\n\t\t}\n\t\n\t\t\n\t\treturn listar;\n\t}", "public String[][] obtenerConsultas(){\n //VARIABLES PARA ALMACENAR LOS DATOS DE LA BASE DE DATOS\n int i = 0;\n String[][] datos = new String[obtenerRegistros()][5];\n //SE INTENTA HACE LA CONEXION Y OBTENER LOS RSULTDOS\n try {\n //METODOS DE CONEXION\n Connection connect = getConnection();\n PreparedStatement ps;\n ResultSet res;\n\n //QUERY PARA OBTENER LOS VALORES\n ps = connect.prepareStatement(\"SELECT nombre, apellidos, incentivo, descuentos, total FROM personal INNER JOIN nomina ON personal.id = nomina.id;\");\n res = ps.executeQuery();\n \n while (res.next()) {\n //SE ALMACENANAN LOS DATOS DE LA BASE DE DATOS EN EL ARREGLO\n datos[i][0] = res.getString(\"nombre\");\n datos[i][1] = res.getString(\"apellidos\");\n datos[i][2] = res.getString(\"incentivo\");\n datos[i][3] = res.getString(\"descuentos\");\n datos[i][4] = res.getString(\"total\"); \n i++; \n }\n //SE CIERRA LA CONEXION Y SE RETORNAN LOS DATOS OBTENIDOS\n connect.close();\n return datos;\n }\n //EN CASO DE ERROR SE MUESTRA EL MENSAJE \n catch (Exception e) {\n System.out.println(\"error en resultado: \"+e);\n JOptionPane.showMessageDialog(null, \"Hubo un error:\"+e);\n return datos;\n }\n }", "private ArrayList<HashMap<String, String>> processRetrieve() {\n //Transform and Return Rows to a List of HashMaps\n try {\n if (rs == null) {\n System.out.println(\"rs is null\");\n } else {\n return rsToMaps();\n }\n } catch (SQLException ex) {\n throw new RuntimeException(ex);\n }\n return null;\n }", "public String[][] datosActividades(String where)\n {\n ResultSet sql; \n try {\n Connection con = conexion.abrirConexion();\n Statement s = con.createStatement();\n sql = s.executeQuery(\"SELECT actividad.idActividad, actividad.nombre, tiene.foto FROM actividad \" +\n \"INNER JOIN tiene ON actividad.idActividad = tiene.Actividad_idActividad \" +\n \"INNER JOIN posee ON posee.tiene_idTiene = tiene.idTiene \" +\n where);\n //número de registros obrenidos\n int count = 0;\n while (sql.next()) {\n ++count;\n }\n //declaración del array\n String [][] a = new String [count][4];\n //se regresa al primero\n sql.beforeFirst();\n //contador para copiar del resultset al array\n int i = 0;\n //copiar del resultset al array\n while (sql.next())\n {\n a[i][0] = sql.getString(1);\n a[i][1] = sql.getString(2);\n a[i][2] = sql.getString(3);\n i++;\n } \n conexion.cerrarConexion(con);\n return a;\n }\n catch (SQLException ex)\n {\n return null;\n }\n catch(NullPointerException e){\n JOptionPane.showMessageDialog(null, \"Error al intentar conectar con el servidor.\");\n return null;\n }\n }", "public void actualizarFiltrarEstadoRequisicion(Requisicion req) throws Exception{\n String carnet = req.getCarnetEmpleado();\n\n java.util.Date utilDate = req.getFechaNueva();\n java.sql.Date fechaConvertida = new java.sql.Date(utilDate.getTime()); \n\n List<Requisicion> requisicion = new ArrayList<>();\n \n Connection miConexion = null;\n Statement miStatement = null;\n ResultSet miResultset = null; \n\n \n //Establecer la conexion\n miConexion = origenDatos.getConexion();\n \n \n //Verificar si existe empleado\n String sqlEmpleado = \"Select CARNETEMPLEADO FROM EMPLEADO WHERE CARNETEMPLEADO = '\"+carnet+\"'\";\n miStatement = miConexion.createStatement();\n miResultset = miStatement.executeQuery(sqlEmpleado);\n \n if(miResultset.next()){\n \n String empleado = carnet;\n \n \n String sqlDepto = \"select d.NOMBREDEPARTAMENTO from departamento d \" + \n \"inner join catalagopuesto c on d.codigodepartamento = c.codigodepartamento \" + \n \"inner join empleado e on c.codigopuesto = e.codigopuesto where e.carnetempleado ='\"+carnet+\"'\";\n \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(sqlDepto);\n //Crear sentencia SQL y Statement\n miResultset.next();\n String nomdepto = miResultset.getString(\"NOMBREDEPARTAMENTO\");\n \n String miSQl = \"select r.NUMREQ, r.FECPEDIDOREQ, r.FECENTREGAREQ, r.AUTORIZADO, e.CARNETEMPLEADO, e.NOMBREEMPLEADO, e.APELLIDOEMPLEADO, d.NOMBREDEPARTAMENTO \" + \n \"from requisicion r inner join empleado e on r.carnetempleado =e.carnetempleado \" + \n \"inner join catalagopuesto c on e.codigopuesto =c.codigopuesto \" + \n \"inner join departamento d on c.codigodepartamento = d.codigodepartamento \" + \n \"where r.AUTORIZADO = 1 and d.NOMBREDEPARTAMENTO='\"+nomdepto+\"' and r.FECPEDIDOREQ >=TO_DATE('\"+fechaConvertida+\"', 'YYYY/MM/DD HH:MI:SS') order by r.FECPEDIDOREQ\";\n \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(miSQl);\n \n while(miResultset.next()){\n int numReq = miResultset.getInt(\"NUMREQ\");\n Date fechaPedido = miResultset.getDate(\"FECPEDIDOREQ\");\n Date fechaEntrega = miResultset.getDate(\"FECENTREGAREQ\"); \n String carnetEmpleado = miResultset.getString(\"CARNETEMPLEADO\");\n String nombreEmpleado = miResultset.getString(\"NOMBREEMPLEADO\"); \n String apellidoEmpleado = miResultset.getString(\"APELLIDOEMPLEADO\");\n String nombreDepartamento = miResultset.getString(\"NOMBREDEPARTAMENTO\"); \n\n //*************************ACTUALIZAR**************************\n Connection miConexion1 = null;\n PreparedStatement miStatement1 = null;\n \n //Obtener la conexion\n \n miConexion1 = origenDatos.getConexion();\n \n //Crear sentencia sql que inserte la requisicion a la base\n String misql = \"UPDATE requisicion SET autorizado = ? WHERE numreq = ?\";\n \n miStatement1 = miConexion1.prepareStatement(misql);\n \n //Establecer los parametros para insertar la requisicion \n if(\"aceptado\".equals(req.getEstadoAut())) {\n miStatement1.setInt(1, 0);\n }else{\n miStatement1.setInt(1, 1);\n } \n\n miStatement1.setInt(2, numReq);//se obtendra dentro del while\n \n //Ejecutar la instruccion sql\n miStatement1.execute(); \n //Requisicion temporal = new Requisicion(numReq, fechaPedido, fechaEntrega, carnetEmpleado, nombreEmpleado, apellidoEmpleado, nombreDepartamento);\n //requisicion.add(temporal);\n }\n \n }\n //return requisicion; \n }", "public CalMetasDTO cargarRegistro(int codigoCiclo, int codigoPlan, int codigoMeta) {\n/* */ try {\n/* 416 */ String s = \"select m.*,\";\n/* 417 */ s = s + \"tm.descripcion as nombreTipoMedicion,\";\n/* 418 */ s = s + \"est.descripcion as nombreEstado,\";\n/* 419 */ s = s + \"Um.Descripcion as nombre_unidad_medida\";\n/* 420 */ s = s + \" from cal_plan_metas m,sis_multivalores tm,sis_multivalores est,Sis_Multivalores Um\";\n/* 421 */ s = s + \" where \";\n/* 422 */ s = s + \" m.tipo_medicion =tm.valor\";\n/* 423 */ s = s + \" and tm.tabla='CAL_TIPO_MEDICION'\";\n/* 424 */ s = s + \" and m.estado =est.valor\";\n/* 425 */ s = s + \" and est.tabla='CAL_ESTADO_META'\";\n/* 426 */ s = s + \" and m.Unidad_Medida = Um.Valor\";\n/* 427 */ s = s + \" and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META'\";\n/* 428 */ s = s + \" and m.codigo_ciclo=\" + codigoCiclo;\n/* 429 */ s = s + \" and m.codigo_plan=\" + codigoPlan;\n/* 430 */ s = s + \" and m.codigo_meta=\" + codigoMeta;\n/* 431 */ boolean rtaDB = this.dat.parseSql(s);\n/* 432 */ if (!rtaDB) {\n/* 433 */ return null;\n/* */ }\n/* */ \n/* 436 */ this.rs = this.dat.getResultSet();\n/* 437 */ if (this.rs.next()) {\n/* 438 */ return leerRegistro();\n/* */ }\n/* */ }\n/* 441 */ catch (Exception e) {\n/* 442 */ e.printStackTrace();\n/* 443 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarCalMetas \", e);\n/* */ } \n/* 445 */ return null;\n/* */ }", "@Override\n\tpublic Ficha_epidemiologia_n3 consultarDatos(Map<String, Object> map,\n\t\t\tFicha_epidemiologia ficha_epidemiologia) throws Exception {\n\t\t\t\t\n\t\t\t\tImpresion_diagnostica impresion_diagnostica = (Impresion_diagnostica) map.get(\"impresion_diagnostica\");\n\t\t\t\tCie_epidemiologia cie_epidemiologia = (Cie_epidemiologia) map.get(\"cie_epidemiologia\");\n\t\t\t\tAdmision admision = (Admision) map.get(\"admision\");\n\t\t\t\t\n\t\t\t\tMap<String,Object> parameters = new HashMap<String,Object>();\n\t\t\t\tparameters.put(\"codigo_empresa\", admision.getCodigo_empresa());\n\t\t\t\tparameters.put(\"codigo_sucursal\", admision.getCodigo_sucursal());\n\t\t\t\tparameters.put(\"nro_identificacion\", admision.getNro_identificacion());\n\t\t\t\t\n\t\t\t\tif(impresion_diagnostica != null){\n\t\t\t\tparameters.put(\"codigo_historia\", impresion_diagnostica.getCodigo_historia());\n\t\t\t\t}else{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(cie_epidemiologia != null){\n\t\t\t\t\tparameters.put(\"codigo\", cie_epidemiologia.getCodigo_cie());\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tgetServiceLocator().getFicha_epidemiologia_nnService().setLimit(\"limit 25 offset 0\");\n\t\t\t\t\n\t\t\t\tList<Ficha_epidemiologia_n3> lista_datos = getServiceLocator().getFicha_epidemiologia_nnService().listar(\n\t\t\t\t\t\tFicha_epidemiologia_n3.class, parameters);\n\t\t\t\t\n\t\t\t\t//log.info(\"lista_datos\"+lista_datos);\n\t\t\t\t\n\t\t\t\tif (!lista_datos.isEmpty()){\n\t\t\t\t\tFicha_epidemiologia_n3 ficha_n3 = lista_datos.get(lista_datos.size() -1);\n\t\t\t\t\t\n\t\t\t\t\treturn ficha_n3;\n\t\t\t\t}else{\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t}", "public ArrayList<ArrayList<Object>> getRowSet()\r\n {\r\n ArrayList<ArrayList<Object>> list = new ArrayList<>();\r\n try {\r\n int c = 0; \r\n while(c < rows)\r\n {\r\n rs.next();\r\n System.out.println(c);\r\n ArrayList<Object> obj = new ArrayList<>();\r\n int col = rs.getMetaData().getColumnCount();\r\n for(int i = 1; i < col; i++)\r\n {\r\n obj.add(rs.getObject(i));\r\n }\r\n list.add(obj);\r\n c++;\r\n }\r\n return list;\r\n \r\n } catch (SQLException ex) {\r\n return list;\r\n }\r\n }", "public ArrayList<rubro> obtenerTodoslosRubros() {\n ArrayList<rubro> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement pr = conn.prepareStatement(\"select id_rubro , nombre, descripcion, estado, ruta \\n\"\n + \" from rubros \");\n\n ResultSet rs = pr.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n boolean estado = rs.getBoolean(4);\n String ruta = rs.getString(5);\n\n rubro r = new rubro(id, nombre, estado, descripcion, ruta);\n\n lista.add(r);\n }\n\n rs.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n\n }", "public void selectFromTable(){\n //SQL query\n String query = \"SELECT fNavn, eNavn, konto_Navn, konto_Reg, konto_ID, konto_Saldo FROM person JOIN konti ON Person_ID = fk_Person_ID\";\n\n try {\n //connection\n stmt = con.createStatement();\n //execute query\n rs = stmt.executeQuery(query);\n System.out.println(\"\\nFornavn: \\t\\tEfternavn: \\t\\tKonto: \\t\\tReg.nr: \\t\\tKontonr.: \\t\\tSaldo: \\n____________________________________\");\n\n //get data\n while (rs.next()){\n String fNavn = rs.getString(\"fNavn\"); //returns fornavn\n String eNavn = rs.getString(\"eNavn\"); //returns efternavn\n String kontoNavn = rs.getString(\"konto_Navn\"); //returns kontonavn\n int kontoReg = rs.getInt(\"konto_Reg\"); //returns kontoreg\n double kontoID = rs.getDouble(\"konto_ID\"); //returns kontoID\n double kontoSaldo = rs.getDouble(\"konto_Saldo\"); //returns kontoSaldo\n System.out.println(fNavn + \"\\t\\t\" + eNavn + \"\\t\\t\" + kontoNavn + \"\\t\\t\" + kontoReg + \"\\t\\t\" + kontoID + \"\\t\\t\" + kontoSaldo);\n }\n }\n catch (SQLException ex){\n System.out.println(\"\\n--Query did not execute--\");\n ex.printStackTrace();\n }\n\n\n }", "private List<PreDocumentoEntrata> ricercaSinteticaPreDocumentoEntrata() {\n\t\tRicercaSinteticaPreDocumentoEntrataResponse resRSPD = ricercaSinteticaPreDocumentoEntrata(0);\t\t\n\t\tList<PreDocumentoEntrata> result = resRSPD.getPreDocumenti();\n\t\t\n\t\tfor(int i = 1; i < resRSPD.getTotalePagine(); i++) {\t\t\t\n\t\t\tresRSPD = ricercaSinteticaPreDocumentoEntrata(i);\n\t\t\tresult.addAll(resRSPD.getPreDocumenti());\t\t\t\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic Ficha_epidemiologia_n13 consultarDatos(Map<String, Object> map,\n\t\t\tFicha_epidemiologia ficha_epidemiologia) throws Exception {\n\t\t\t\t\n\t\t\t\tImpresion_diagnostica impresion_diagnostica = (Impresion_diagnostica) map.get(\"impresion_diagnostica\");\n\t\t\t\tCie_epidemiologia cie_epidemiologia = (Cie_epidemiologia) map.get(\"cie_epidemiologia\");\n\t\t\t\tAdmision admision = (Admision) map.get(\"admision\");\n\t\t\t\t\n\t\t\t\tMap<String,Object> parameters = new HashMap<String,Object>();\n\t\t\t\tparameters.put(\"codigo_empresa\", admision.getCodigo_empresa());\n\t\t\t\tparameters.put(\"codigo_sucursal\", admision.getCodigo_sucursal());\n\t\t\t\tparameters.put(\"identificacion\", admision.getNro_identificacion());\n\t\t\t\t\n\t\t\t\tif(impresion_diagnostica != null){\n\t\t\t\tparameters.put(\"codigo_historia\", impresion_diagnostica.getCodigo_historia());\n\t\t\t\t}else{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(cie_epidemiologia != null){\n\t\t\t\t\tparameters.put(\"codigo_diagnostico\", cie_epidemiologia.getCodigo_cie());\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tgetServiceLocator().getFicha_epidemiologia_nnService().setLimit(\"limit 25 offset 0\");\n\t\t\t\t\n\t\t\t\tList<Ficha_epidemiologia_n13> lista_datos = getServiceLocator().getFicha_epidemiologia_nnService().listar(\n\t\t\t\t\t\tFicha_epidemiologia_n13.class, parameters);\n\t\t\t\t\n\t\t\t\t//log.info(\"lista_datos\"+lista_datos);\n\t\t\t\t\n\t\t\t\tif (!lista_datos.isEmpty()){\n\t\t\t\t\tFicha_epidemiologia_n13 ficha_n13 = lista_datos.get(lista_datos.size() -1);\n\t\t\t\t\t\n\t\t\t\t\treturn ficha_n13;\n\t\t\t\t}else{\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t}", "public String[][] obtenerConsultasBusqueda(String nombre){\n //VARIABLES PARA ALMACENAR LOS DATOS DE LA BASE DE DATOS\n String[][] datos = new String[obtenerRegistrosBusqueda(nombre)][5];\n int i = 0;\n //SE INTENTA HACE LA CONEXION Y OBTENER LOS RSULTDOS\n try {\n //METODOS DE CONEXION\n Connection connect = getConnection();\n PreparedStatement ps;\n ResultSet res;\n \n //QUERY PARA OBTENER LOS VALORES\n ps = connect.prepareStatement(\"SELECT nombre, apellidos, incentivo, descuentos, total FROM personal INNER JOIN nomina ON personal.id = nomina.id WHERE nombre = ?\");\n ps.setString(1, nombre);\n res = ps.executeQuery();\n \n while (res.next()) {\n //SE ALMACENANAN LOS DATOS DE LA BASE DE DATOS EN EL ARREGLO\n datos[i][0] = res.getString(\"nombre\");\n datos[i][1] = res.getString(\"apellidos\");\n datos[i][2] = res.getString(\"incentivo\");\n datos[i][3] = res.getString(\"descuentos\");\n datos[i][4] = res.getString(\"total\");\n i++; \n }\n //SE CIERRA LA CONEXION Y SE RETORNAN LOS DATOS OBTENIDOS\n connect.close();\n return datos;\n }\n //EN CASO DE ERROR SE MUESTRA EL MENSAJE \n catch (Exception e) {\n System.out.println(\"error en resultado: \"+e);\n JOptionPane.showMessageDialog(null, \"Hubo un error:\"+e);\n return datos;\n }\n }", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "public ArrayList<Info_laboral> findAll(){\n ConexionBD con = new ConexionBD();\n Connection c = con.conOracle();\n\n ArrayList<Info_laboral> eeg = new ArrayList();\n\n try{\n ResultSet gs = con.ejecutaCon(\" Select * from Info_laboral\"); \n while(gs.next()){\n \n Estudios_Egresado ee=new Estudios_Egresado();\n Info_laboral i =new Info_laboral();\n Egresado eg = new Egresado();\n Estudios es = new Estudios();\n \n i.setId(gs.getInt(1));\n i.setJefe(gs.getString(2));\n i.setCargo(gs.getString(3));\n i.setFuncion(gs.getString(4));\n i.setFecha_ini(gs.getDate(5));\n i.setFecha_fin(gs.getDate(6));\n i.setMotivo_retiro(gs.getString(7));\n eg.setId(gs.getLong(8));\n i.setId_egresado(eg);\n i.setPerfil(gs.getString(9));\n \n eeg.add(i);\n }\n }catch(SQLException e){\n System.out.println(\"error \"+e);\n return null;\n }\n return eeg;\n }", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }", "public ArrayList<Comobox> fontesRendimentos()\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n @SuppressWarnings(\"UnusedAssignment\")\n ResultSet rs = null;\n sql=\"select * FROM VER_FONTEPAGAMENTO\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n cs = conexao.getCon().prepareCall(sql);\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"REALID\"), rs.getString(\"FONTE\")));\n } \n }\n rs.close();\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter fontes rendimentos \"+ex.getMessage());\n }\n }\n return al;\n }", "public Object[][] Consulta(String Comsql) {\n Object Datos[][] = null;\n try {\n PreparedStatement pstm = con.prepareStatement(Comsql);\n /* declarando ResulSet que va a contener el resultado de la ejecucion del Query */\n ResultSet rs = pstm.executeQuery();\n /*se ubica en el ultimo registro, para saber cuantos ahi */\n rs.last();\n /*para saber el numero de filas y columnas del ResulSet */\n ResultSetMetaData rsmd = rs.getMetaData();\n /*aqui muestra la cantidad de filas y colmnas ahi */\n int numCols = rsmd.getColumnCount();\n int numFils = rs.getRow();\n /*cojemos nuestro objeto datos y le damos formato, eso es igual a numero de filas y numero de columnas */\n Datos = new Object[numFils][numCols];\n /* nos ubicamos antes de la primera fila */\n rs.beforeFirst();\n\n /*j= filas\n i= columnas\n */\n int j = 0;\n /*recorremos los datos del RS\n */\n while (rs.next()) {\n /*i siempre se inicializa en cero; la condicion va hasta que i sea menor que e numcol; y aumenta de 1 en 1 */\n for (int i = 0; i < numCols; i++) {\n /*aqui le asignamos valor a nuestro arreglo */\n Datos[j][i] = rs.getObject(i + 1);\n }\n j++;\n }\n pstm.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(\"Error : \" + e.getMessage());\n }\n return Datos;\n }", "private QueryResult mapResultSet(ResultSet rs) throws SQLException {\n QueryResult results = new QueryResult();\n\n ResultSetMetaData metadata = rs.getMetaData();\n\n int columnCount = metadata.getColumnCount();\n for (int i = 0; i < columnCount; i++) {\n results.addColumnName(metadata.getColumnLabel(i + 1), i);\n }\n\n List<QueryResultRow> rows = new ArrayList<QueryResultRow>();\n while (rs.next()) {\n Object[] columnValues = new Object[columnCount];\n for (int i = 1; i <= columnCount; i++) {\n columnValues[i - 1] = rs.getObject(i);\n\n }\n rows.add(new QueryResultRow(columnValues));\n }\n results.setRows(rows.toArray(new QueryResultRow[] {}));\n return results;\n }", "public void getRequest() {\n\t\tint rowNum = 0, colNum = 0; // row and column counters start at 0\n\t\ttry {\n\t\t\tStatement myStmtCount = Connect.getDbConnect().createStatement(); // creates a statement\n\t\t\tResultSet rs = myStmtCount // creates a resultSet\n\t\t\t\t\t// counts how many elements there are in table 'furniture' with the matching\n\t\t\t\t\t// 'type'\n\t\t\t\t\t.executeQuery(\"SELECT COUNT(*) FROM \" + furniture + \" WHERE Type = '\" + type + \"'\");\n\n\t\t\twhile (rs.next()) {\n\t\t\t\t// used to count the number of rows that elements fill\n\t\t\t\trowNum = rs.getInt(1); // keeps track of the last element that belongs in specific furniture and type\n\t\t\t}\n\n\t\t\trs = myStmtCount.executeQuery(\n\t\t\t\t\t\"SELECT COUNT(*) FROM information_schema.columns WHERE table_name = '\" + furniture + \"'\");\n\t\t\twhile (rs.next()) {\n\t\t\t\t// used to count the number of colums that a specific row has\n\t\t\t\tcolNum = rs.getInt(1); // keeps track of the last element that belongs in specific row of type\n\t\t\t\t\t\t\t\t\t\t// 'furniture'\n\t\t\t}\n\n\t\t\tmyStmtCount.close(); // close statement\n\t\t\trs.close(); // close resultset\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace(); // catch an exception\n\t\t}\n\n\t\tthis.foundRequest = new String[rowNum][colNum]; // initializes double array foundRequest\n\t\tString query = \"SELECT * FROM \" + furniture + \" WHERE Type = \" + \"'\" + type + \"'\";\n\t\ttry {\n\t\t\tStatement myStmntNames = Connect.getDbConnect().createStatement();\n\t\t\t// selecting all rows with matching desired type from desired furniture table\n\t\t\tconnection.setResults(myStmntNames.executeQuery(query));\n\t\t\tint counter = 0;\n\t\t\twhile (Connect.getResults().next()) {// while there is a next row of \"type\"\n\t\t\t\tfor (int j = 0; j < colNum; j++) { // goes through each column\n\t\t\t\t\tthis.foundRequest[counter][j] = Connect.getResults().getString(j + 1);\n\t\t\t\t}\n\t\t\t\tcounter++;\n\t\t\t}\n\n\t\t\tmyStmntNames.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (this.foundRequest.length == 0) {\n\t\t\tsetOrderIsPossible(false); // setOrder is not possible if length of foundRequest is 0\n\t\t\treturn;\n\t\t}\n\n\t\tString[] outputRow = new String[colNum - 4];// countBoolean(foundRequest)];\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\t// call to method findCombinations\n\t\t\tfindCombinations(2, foundRequest.length, outputRow.length, foundRequest, outputRow);\n\t\t\tif (this.bestCombination != null) {\n\t\t\t\t// once a combination is found, checks if there are extra parts to be used in\n\t\t\t\t// furniture piece\n\t\t\t\tcheckExtraParts(); // call to checkExtraParts to see if there are spare elements\n\t\t\t\treset(foundRequest); // removes from foundRequest, resets bestCombination, updates orderedIDs\n\t\t\t} else {\n\t\t\t\tsetOrderIsPossible(false);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tfor (String val : orderedIDs) {\n\t\t\tremoveFromInventory(val); // removes val from database\n\t\t}\n\n\t\tif (this.hasExtra > 0) { // amount must be greater than one to use an extra\n\t\t\tint length = 0; // will count how many extras there are\n\t\t\tfor (String val : orderedIDs) {\n\t\t\t\tif (val.contains(\"Extra\")) {\n\t\t\t\t\tlength++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tString[] newOrdered = new String[orderedIDs.length]; // new array, same length as orderedIDs\n\t\t\tSystem.arraycopy(orderedIDs, 0, newOrdered, 0, orderedIDs.length); // copy orderedIDs to newOrdered\n\n\t\t\tif (length == 0) {\n\t\t\t\torderedIDs = new String[orderedIDs.length];\n\t\t\t} else if (length > 0) {\n\t\t\t\torderedIDs = new String[orderedIDs.length - hasExtra];\n\t\t\t}\n\n\t\t\tint i = 0;\n\t\t\tfor (String val : newOrdered) {\n\t\t\t\tif (!val.contains(\"Extra\")) { // copying all ids that are not the extra pieces\n\t\t\t\t\torderedIDs[i++] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tOrderForm.createFile(this.orderedIDs, this.totalPrice);\n\t\tsetOrderIsPossible(true);\n\t}", "public List<PessoasEspacosDeCafe> read() {\n\n Connection con = null;\n\n PreparedStatement stmt = null;\n\n ResultSet rs = null;\n\n List<PessoasEspacosDeCafe> mostrarEspacosDeCafe = new ArrayList<>();\n\n try {\n con = ConnectionFactory.getConnection();\n stmt = con.prepareStatement(\"SELECT * FROM PessoasEspacosDeCafe\");\n rs = stmt.executeQuery();\n\n while (rs.next()) {\n\n PessoasEspacosDeCafe EspacosDeCafeDoBanco = new PessoasEspacosDeCafe();\n\n EspacosDeCafeDoBanco.setPessoasIdPessoas(rs.getInt(\"pessoasIdPessoas\"));\n EspacosDeCafeDoBanco.setEspacosDeCafeIdEspacosDeCafe(rs.getInt(\"espacosDeCafeIdEspacosDeCafe\"));\n mostrarEspacosDeCafe.add(EspacosDeCafeDoBanco);\n\n }\n } catch (SQLException ex) {\n Logger.getLogger(PessoasDAO.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n ConnectionFactory.closeConnection(con, stmt, rs);\n }\n\n return mostrarEspacosDeCafe;\n\n }", "public FlujoDetalleDTO cargarRegistro(int codigoFlujo, int secuencia) {\n/* */ try {\n/* 201 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.enviar_hermana,t.enviar_si_hermana_cerrada,t.ind_cliente_inicial,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" and t.secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 243 */ boolean rtaDB = this.dat.parseSql(s);\n/* 244 */ if (!rtaDB) {\n/* 245 */ return null;\n/* */ }\n/* 247 */ this.rs = this.dat.getResultSet();\n/* 248 */ if (this.rs.next()) {\n/* 249 */ return leerRegistro();\n/* */ }\n/* */ }\n/* 252 */ catch (Exception e) {\n/* 253 */ e.printStackTrace();\n/* 254 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarFlujoDetalle\", e);\n/* */ } \n/* 256 */ return null;\n/* */ }", "public void introducirPagosALojamientoClienteFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo,String dpiCliente){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);// pago de alojamiento en rango fchas\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Dpi_Cliente=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n declaracion.setString(3, dpiCliente);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);// pago de alojamiento en rango fchas\n objeto[3] = resultado.getDate(4);\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public Antecedentes getData(long dni) {\n\n\t\t\tMapSqlParameterSource params = new MapSqlParameterSource();\n\t\t\tparams.addValue(\"dni\", dni);\n\t\t\t\n\n\t\t \n\t\t\ttry {\n\t\t\t\treturn jdbc.queryForObject(\"select * from antecedentes where dni = :dni \", params, new RowMapper<Antecedentes>() {\n\t\t\n\t\t\t\t\t\t\tpublic Antecedentes mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tAntecedentes antecedentes = new Antecedentes();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tantecedentes.setDni(rs.getBigDecimal(\"dni\"));\n\t\t\t\t\t\t\t\tantecedentes.setBecario(rs.getString(\"becario\"));\n\t\t\t\t\t\t\t\tantecedentes.setTesista_doctoral(rs.getString(\"tesista_doctoral\"));\n\t\t\t\t\t\t\t\tantecedentes.setTesista_maestria(rs.getString(\"tesista_maestria\"));\n\t\t\t\t\t\t\t\tantecedentes.setTesista_grado(rs.getString(\"tesista_grado\"));\n\t\t\t\t\t\t\t\tantecedentes.setInvestigadores(rs.getString(\"investigadores\"));\n\t\t\t\t\t\t\t\tantecedentes.setPasantes_id_y_facademica(rs.getString(\"pasantes_id_y_facademica\"));\n\t\t\t\t\t\t\t\tantecedentes.setPersonal_apoyo_id(rs.getString(\"personal_apoyo_id\"));\n\t\t\t\t\t\t\t\tantecedentes.setFinanciamiento_cientifico_tecnologico(rs.getString(\"financiamiento_cientifico_tecnologico\"));\n\t\t\t\t\t\t\t\tantecedentes.setActividades_divulgacion(rs.getString(\"actividades_divulgacion\"));\n\t\t\t\t\t\t\t\tantecedentes.setExtension_rural_industrial(rs.getString(\"extension_rural_industrial\"));\n\t\t\t\t\t\t\t\tantecedentes.setPrestacion_servicios_sociales(rs.getString(\"prestacion_servicios_sociales\"));\n\t\t\t\t\t\t\t\tantecedentes.setProduccion_divulgacion_artistica(rs.getString(\"produccion_divulgacion_artistica\"));\n\t\t\t\t\t\t\t\tantecedentes.setOtro_tipo_actividad(rs.getString(\"otro_tipo_actividad\"));\n\t\t\t\t\t\t\t\tantecedentes.setEvaluacion_personal(rs.getString(\"evaluacion_personal\"));\n\t\t\t\t\t\t\t\tantecedentes.setEvaluacion_programas(rs.getString(\"evaluacion_programas\"));\n\t\t\t\t\t\t\t\tantecedentes.setEvaluacion_institucional(rs.getString(\"evaluacion_institucional\"));\n\t\t\t\t\t\t\t\tantecedentes.setOtro_tipo_evaluacion(rs.getString(\"otro_tipo_evaluacion\"));\n\t\t\t\t\t\t\t\tantecedentes.setBecas(rs.getString(\"becas\"));\n\t\t\t\t\t\t\t\tantecedentes.setEstancias_pasantias(rs.getString(\"estancias_pasantias\"));\n\t\t\t\t\t\t\t\tantecedentes.setOperacion_mantenimiento(rs.getString(\"operacion_mantenimiento\"));\n\t\t\t\t\t\t\t\tantecedentes.setProduccion(rs.getString(\"produccion\"));\n\t\t\t\t\t\t\t\tantecedentes.setNormalizacion(rs.getString(\"normalizacion\"));\n\t\t\t\t\t\t\t\tantecedentes.setEjercicio_profesion_ambito_no_academico(rs.getString(\"ejercicio_profesion_ambito_no_academico\"));\n\t\t\t\t\t\t\t\tantecedentes.setOtra_actividad_cyt(rs.getString(\"otra_actividad_cyt\"));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn antecedentes;\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t});\n\t\t\t}\n\t\t\t catch(EmptyResultDataAccessException erdae) {\n\t\t\t\t System.out.println(\"en antecedentesDAO devuelve null\");\n\t\t\t return null;\n\t\t\t }\n\t\t}", "public List<Meta> obtTotalVentaXLineaProductos(Integer numPeri, Integer idPers) throws SQLException, Exception{\n \n CallableStatement statement = null;\n ResultSet rsConsulta = null;\n Connection cnConexion = null;\n List<Meta> lstResult = new ArrayList<>();\n \n try {\n \n cnConexion = ConexionBD.obtConexion();\n String strFiltro = \"\";\n \n if(idPers > 0 ){\n strFiltro += \" AND S1.ID_PERS = \" + idPers;\n }\n \n String sql = \"SELECT \" +\n \" S1.ID_PERS\\n\" +\n \" ,USU.COD_USUARIO\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END AS COD_STIPOPROD\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END AS DES_STIPOPROD\\n\" +\n \" ,SUM((T1.NUM_VALOR * T1.NUM_CANTIDAD) - (NVL(T1.NUM_MTODSCTO,0) * T1.NUM_CANTIDAD)) AS NUM_TOTALVENTA \\n\" +\n \" FROM SIC3DOCUPROD T1\\n\" +\n \" JOIN SIC1DOCU S1 ON T1.ID_DOCU = S1.ID_DOCU \\n\" +\n \" JOIN SIC1PROD T3 ON T3.ID_PROD = T1.ID_PROD \\n\" +\n \" JOIN VI_SICSTIPOPROD V2 ON V2.ID_STIPOPROD = T3.ID_STIPOPROD\\n\" +\n \" JOIN SIC1STIPODOCU T6 ON T6.ID_STIPODOCU = S1.ID_STIPODOCU\\n\" +\n \" JOIN SIC3DOCUESTA RELESTA ON RELESTA.ID_DOCU = S1.ID_DOCU\\n\" +\n \" AND TO_CHAR(RELESTA.FEC_HASTA,'DD/MM/YYYY') = '31/12/2400' \\n\" +\n \" JOIN VI_SICESTA ESTA ON ESTA.ID_ESTA = RELESTA.ID_ESTADOCU\\n\" +\n \" AND ((ESTA.COD_ESTA = 'VI_SICESTAFINALIZADO' AND T6.COD_STIPODOCU IN ('VI_SICFACTURA','VI_SICBOLETA','VI_SICSINDOCU')))\\n\" +\n \" JOIN SIC1USUARIO USU ON USU.ID_USUARIO = S1.ID_PERS\\n\" +\n \" WHERE S1.ID_SCLASEEVEN = 2 \" + \n \" AND TO_NUMBER(TO_CHAR(S1.FEC_DESDE,'YYYYMM')) = \" + numPeri + strFiltro +\n \" GROUP BY CASE WHEN COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END \" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END \" +\n \" ,USU.COD_USUARIO \" +\n \" ,S1.ID_PERS\";\n \n \n \n statement = cnConexion.prepareCall( sql,\n ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_READ_ONLY,\n ResultSet.CLOSE_CURSORS_AT_COMMIT ); \n \n rsConsulta = statement.executeQuery(); \n \n while(rsConsulta.next()){\n\n Meta obj = new Meta();\n \n String codStipoprod = rsConsulta.getString(\"COD_STIPOPROD\");\n BigDecimal numTotalVentasMes = rsConsulta.getBigDecimal(\"NUM_TOTALVENTA\");\n \n BigDecimal numPorcAlcanzado;\n if(codStipoprod.equals(\"VI_SICVINILCORTE\")){\n obj.setDesMeta(\"% Logrado Meta(Vinil)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAVINIL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAVINIL));\n }\n else{\n obj.setDesMeta(\"% Logrado Meta(Papel)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAPAPEL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAPAPEL));\n }\n \n Sic1pers objPers = new Sic1pers();\n objPers.setIdPers(rsConsulta.getBigDecimal(\"ID_PERS\"));\n objPers.setDesPers(rsConsulta.getString(\"COD_USUARIO\"));\n \n obj.setCodStipoprod(codStipoprod);\n obj.setDesStipoprod(rsConsulta.getString(\"DES_STIPOPROD\"));\n obj.setNumTotalventalogrado(numTotalVentasMes);\n obj.setNumPorclogrado(numPorcAlcanzado);\n obj.setSic1pers(objPers);\n \n lstResult.add(obj); \n }\n }catch(Exception ex){\n throw new Exception(ex.getMessage());\n }finally{\n if(statement != null)\n statement.close();\n if(rsConsulta != null)\n rsConsulta.close();\n if(cnConexion != null)\n cnConexion.close();\n }\n \n return lstResult;\n }", "public ArrayList<Cuenta> obtenerCuentasAsociadas(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n PreparedStatement PrSt2;\n ResultSet rs = null;\n ResultSet rs2 = null;\n String Query = \"SELECT * FROM Solicitud WHERE Codigo_ClienteS = ? AND Estado = 'Aceptada'\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = obtenerCuenta(rs.getString(\"Codigo_Cuenta\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "private RecordSet getRecordSet(String arg[]){\n RecordSet datos = new RecordSet();\n datos.addColumn(\"CODIGO\");\n\t\tdatos.addColumn(\"VALOR\"); \n\n for(int j=0;j<arg.length;j++) { \n datos.addRow(new Object[] { arg[j], arg[j] }); \n }\n return datos;\n }", "public ResultSet getFactory(){\n ResultSet rs = null;\r\n try {\r\n rs = conn.getResultSetF();\r\n ResultSetMetaData rsmetadata = rs.getMetaData();\r\n int column = rsmetadata.getColumnCount();\r\n // String[] factoryString = null;\r\n\r\n for(int i=1; i<=column; i++){\r\n data_raws.add(rsmetadata.getColumnName(i));\r\n }\r\n //dtm.setColumnIdentifiers(columns_name);\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ApplicationData.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return rs;\r\n }", "private boolean consultarCotizacionesParaFacturar(java.sql.Connection conn, int intCodSeg){\r\n boolean blnRes=false;\r\n java.sql.Statement stmLoc,stmLoc01;\r\n stbDocRelEmpRem = new StringBuffer();\r\n arlDocGenDat = new ArrayList();\r\n objZafGenOD = new GenOD.ZafGenOdPryTra() ;\r\n objModDatGenFac = new Librerias.ZafGenFacAut.ZafModDatGenFac(objParSis, jifCnt);\r\n objStkInv = new Librerias.ZafStkInv.ZafStkInv(objParSis);\r\n objCnfDoc = new Librerias.ZafCnfDoc.ZafCnfDoc(objParSis,null);\r\n objCfgSer.cargaDatosIpHostServicios(0, intCodSer);\r\n java.sql.ResultSet rstLoc,rstLoc01;\r\n String strMerIngEgr=\"\",strTipIngEgr=\"\";\r\n blnIsComSol = false;\r\n try{\r\n stmLoc=conn.createStatement();\r\n strSql=\"\";\r\n strSql+=\" SELECT a2.co_seg, a3.tx_corEle, \\n\";\r\n strSql+=\" a1.co_emp, a1.co_loc, a1.co_cot, a1.fe_cot, a1.co_cli, a1.co_ven, a1.tx_ate, a1.co_forpag, \\n\";\r\n strSql+=\" a1.nd_sub, a1.nd_poriva, a1.nd_valdes, a1.tx_obs1, a1.tx_obs2, a1.st_reg, a1.fe_ing, \\n\";\r\n strSql+=\" a1.fe_ultmod, a1.co_usring, a1.co_usrmod, a1.nd_tot, a1.ne_val, a1.nd_valiva, a1.tx_numped, \\n\";\r\n strSql+=\" a1.st_regrep, a1.tx_obssolaut, a1.tx_obsautsol, a1.st_aut, a1.tx_nomcli, a1.fe_procon, \\n\";\r\n strSql+=\" a1.co_locrelsoldevven, a1.co_tipdocrelsoldevven, a1.co_docrelsoldevven, \\n\";\r\n strSql+=\" a1.st_docconmersaldemdebfac, a1.fe_val, a1.co_tipcre, a1.tx_dirclifac, a1.tx_dircliguirem, \\n\";\r\n strSql+=\" a1.co_forret, a1.tx_vehret, a1.tx_choret, \\n\";\r\n strSql+=\" CASE WHEN a1.tx_momgenfac IS NULL THEN 'M' ELSE a1.tx_momgenfac END as tx_momgenfac, \\n\";\r\n strSql+=\" a1.nd_valComSol,a1.nd_subIvaCer,a1.nd_subIvaGra,a1.nd_porComSol,a1.st_solFacPar, a1.tx_tipCot \\n\";\r\n strSql+=\" FROM tbm_cabCotVen as a1 \\n\";\r\n strSql+=\" INNER JOIN tbm_cabSegMovInv as a2 ON (a1.co_emp=a2.co_empRelCabCotVen AND a1.co_loc=a2.co_locRelCabCotVen AND \\n\";\r\n strSql+=\" a1.co_cot=a2.co_cotRelCabCotVen) \\n\";\r\n strSql+=\" INNER JOIN tbm_usr as a3 ON (a1.co_usrIng=a3.co_usr) \\n\";\r\n strSql+=\" WHERE a2.co_seg=\"+intCodSeg+\" AND a2.co_empRelCabCotVen IS NOT NULL AND a1.st_reg!='F' \\n\"; /* LISTO PARA FACTURAR */\r\n strSql+=\" AND a1.st_autSolResInv IS NULL \";\r\n strSql+=\" ORDER BY a1.co_emp, a1.co_loc \\n\";\r\n System.out.println(\"consultarCotizacionesParaFacturar... \\n\" + strSql);\r\n rstLoc=stmLoc.executeQuery(strSql);\r\n while(rstLoc.next()){\r\n CodEmpGenFac = rstLoc.getInt(\"co_emp\");\r\n if(rstLoc.getInt(\"co_emp\")==2 && rstLoc.getInt(\"co_loc\")==4){\r\n blnIsComSol=true;\r\n }\r\n// dblPorComSol=objUti.redondear(rstLoc.getDouble(\"nd_porComSol\"), objParSis.getDecimalesMostrar());\r\n// dblBaseIva=objUti.redondear(rstLoc.getDouble(\"nd_subIvaGra\"), objParSis.getDecimalesMostrar());\r\n\r\n obtenerDatosFactura(conn, rstLoc.getInt(\"co_emp\"),rstLoc.getInt(\"co_loc\"),rstLoc.getInt(\"co_cot\"));\r\n objZafCtaCtb_dat = new ZafCtaCtb_dat(objParSis,rstLoc.getInt(\"co_emp\"),rstLoc.getInt(\"co_loc\"), intCodTipDocFacEle);\r\n cargarTipEmp(conn, rstLoc);\r\n Configurartabla();\r\n configurarTablaPago();\r\n refrescaDatos2(conn,rstLoc, rstLoc.getInt(\"co_emp\"), rstLoc.getInt(\"co_loc\"));\r\n CalculoPago(conn, rstLoc); // TOTALES CARGADO????? \r\n CalculoPago2(conn, rstLoc);\r\n// refrescaDatos2(conn,rstLoc, rstLoc.getInt(\"co_emp\"), rstLoc.getInt(\"co_loc\"));\r\n FormaRetencion(conn, rstLoc.getInt(\"co_emp\"));\r\n stmLoc01=conn.createStatement();\r\n strSql = \"SELECT st_meringegrfisbod, tx_natdoc FROM tbm_cabtipdoc WHERE co_emp=\" + rstLoc.getInt(\"co_emp\") + \" \"\r\n + \" and co_loc=\"+rstLoc.getInt(\"co_loc\")+\" and co_tipDoc=\" + intCodTipDocFacEle;\r\n rstLoc01 = stmLoc01.executeQuery(strSql);\r\n if (rstLoc01.next()) {\r\n strMerIngEgr = rstLoc01.getString(\"st_meringegrfisbod\");\r\n strTipIngEgr = rstLoc01.getString(\"tx_natdoc\");\r\n }\r\n rstLoc01.close();\r\n rstLoc01=null;\r\n stmLoc01.close();\r\n stmLoc01=null;\r\n //dblPorComSol=0.00,dblBaseIva=0.00;\r\n\r\n System.out.println(\"st_reg= \" + rstLoc.getString(\"st_reg\").toString());\r\n\r\n if(rstLoc.getString(\"st_reg\").equals(\"L\") && (rstLoc.getString(\"tx_momGenFac\").equals(\"F\") || rstLoc.getString(\"tx_momGenFac\").equals(\"M\") )){ // INMACONSA SE FACTURA POR AKI\r\n if(insertarCabFac(conn,rstLoc)){\r\n if (insertarDetFac(conn,rstLoc,intCodSeg)) {\r\n calculaPag(conn, rstLoc);\r\n if (insertarPagFac(conn,rstLoc, intCodTipDocFacEle, intCodDoc)) {\r\n if(insertarDiario(conn,rstLoc, intCodTipDocFacEle, intCodDoc)) {\r\n if (objInvItm._getExiItmSer(conn, rstLoc.getInt(\"co_emp\"),rstLoc.getInt(\"co_loc\"), intCodTipDocFacEle, intCodDoc)) {\r\n if(asignaNumeroFac(conn, rstLoc.getInt(\"co_emp\"),rstLoc.getInt(\"co_loc\"), intCodTipDocFacEle, intCodDoc, rstLoc.getInt(\"co_cot\") )){\r\n if(insertarTablaSeguimiento(conn,rstLoc,intCodTipDocFacEle,intCodDoc)){\r\n if(prepararEgreso(conn,rstLoc,rstLoc.getInt(\"co_emp\"),rstLoc.getInt(\"co_loc\"), intCodTipDocFacEle, intCodDoc) ){\r\n// if(objModDatGenFac.cuadraStockSegunMovimientos(conn, rstLoc.getInt(\"co_emp\"), rstLoc.getInt(\"co_loc\"), intCodTipDocFacEle, intCodDoc)){\r\n System.err.println(\"<----- antes costear ----->\");\r\n if(objUti.costearDocumento(jifCnt, objParSis, conn, rstLoc.getInt(\"co_emp\"), rstLoc.getInt(\"co_loc\"), intCodTipDocFacEle, intCodDoc)){\r\n System.err.println(\"<----- despues costear ----->\");\r\n if(revisarInvBodNegativos(conn, rstLoc.getInt(\"co_emp\"), rstLoc.getInt(\"co_loc\"), intCodTipDocFacEle, intCodDoc)){\r\n System.out.println(\"ANTES OD \");\r\n if(objZafGenOD.generarODLocal(conn, rstLoc.getInt(\"co_emp\"), rstLoc.getInt(\"co_loc\"), intCodTipDocFacEle, intCodDoc,true)){\r\n if(objDatItm.preLiberarItems(conn, rstLoc.getInt(\"co_emp\"), rstLoc.getInt(\"co_loc\"), rstLoc.getInt(\"co_cot\"))){\r\n blnRes=true;\r\n guardaDocumentosGenerado(rstLoc,intCodTipDocFacEle,intNumFacElec,intCodDoc,rstLoc.getString(\"tx_corEle\")); // PARA EL CORREO ELECTRONICO\r\n System.out.println(\"GENERO: \"+rstLoc.getInt(\"co_emp\")+\" - \"+rstLoc.getInt(\"co_loc\")+\" - \"+rstLoc.getInt(\"co_cot\")+\"FACTURA: \"+intCodTipDocFacEle+\"-\"+intCodDoc);\r\n }else{blnRes=false;}\r\n }else{blnRes=false;}\r\n }else{blnRes=false;}\r\n }else{System.out.println(\"costeo Error\"); blnRes=false; }\r\n// }else{ System.out.println(\"cuadraStockSegunMovimientos Error\"); blnRes = false;}\r\n }else{blnRes=false;}\r\n }else{blnRes=false;}\r\n }else{blnRes=false;}\r\n }else{blnRes=false;}\r\n }else{blnRes=false;}\r\n }else{blnRes=false;}\r\n }else{blnRes=false;}\r\n }else{blnRes=false;}\r\n\r\n if(blnRes==false){\r\n objCorEle.enviarCorreoMasivo(strCorEleTo,\"ERROR.... \",\"Revisar Seguimiento: \"+rstLoc.getInt(\"co_seg\")+\"cotizacion Emp:\"+rstLoc.getInt(\"co_emp\")+\" Loc:\"+rstLoc.getInt(\"co_loc\")+\" Cot:\" + rstLoc.getInt(\"co_cot\"));\r\n }\r\n }\r\n else if(rstLoc.getString(\"tx_momGenFac\").equals(\"P\")){\r\n// if(obtenerFacturaSeguimiento(conn,intCodSeg)){\r\n// if(actualizarDetFac(conn,rstLoc)){\r\n// if(prepararEgreso(conn,rstLoc,rstLoc.getInt(\"co_emp\"),rstLoc.getInt(\"co_loc\"), intCodTipDocFacEle, intCodDoc) ){\r\n// if(!objZafGenOD.validarODExs(conn, rstLoc.getInt(\"co_emp\"), rstLoc.getInt(\"co_loc\"), intCodTipDocFacEle, intCodDoc)){\r\n// if(objZafGenOD.generarNumODFacIni(conn, rstLoc.getInt(\"co_emp\"), rstLoc.getInt(\"co_loc\"), intCodTipDocFacEle, intCodDoc)){\r\n// if(revisarInvBodNegativos(conn, rstLoc.getInt(\"co_emp\"), rstLoc.getInt(\"co_loc\"), intCodTipDocFacEle, intCodDoc)){\r\n// blnRes=true;\r\n// }else{blnRes=false;}\r\n// }else{blnRes=false;}\r\n// }else{ blnRes=true; }\r\n// }\r\n// }\r\n// }\r\n blnRes=false;\r\n }\r\n else{\r\n objCorEle.enviarCorreoMasivo(strCorEleTo, \"FACTURA AUTOMATICA ESTADO INCORRECTO.... \",\"Revisar Seguimiento: \"+rstLoc.getInt(\"co_seg\"));\r\n }\r\n\r\n\r\n\r\n\r\n if(blnRes==false){\r\n System.out.println(\"FALLO!!! \"+rstLoc.getInt(\"co_emp\")+\" - \"+rstLoc.getInt(\"co_loc\")+\" - \"+rstLoc.getInt(\"co_cot\"));\r\n }\r\n objZafCtaCtb_dat = null;\r\n }\r\n if(blnRes){\r\n enviaCorreosElectronicos();\r\n// enviaImprimirOdLocal(conn);\r\n enviarPulsoFacturacionElectronica();\r\n System.err.println(\"GUARDA!!!! \");\r\n }\r\n else{\r\n System.err.println(\"ERROR!!!! \");\r\n }\r\n \r\n stmLoc.close();\r\n stmLoc=null;\r\n rstLoc.close();\r\n rstLoc=null;\r\n }\r\n catch (SQLException Evt) {\r\n blnRes = false;\r\n objUti.mostrarMsgErr_F1(jifCnt, Evt);\r\n } \r\n catch (Exception Evt) {\r\n blnRes = false;\r\n objUti.mostrarMsgErr_F1(jifCnt, Evt);\r\n }\r\n return blnRes;\r\n }", "protected ProductosPuntoVenta[] fetchMultiResults(ResultSet rs)\r\n throws SQLException {\r\n Collection<ProductosPuntoVenta> resultList = new ArrayList<ProductosPuntoVenta>();\r\n while (rs.next()) {\r\n ProductosPuntoVenta dto = new ProductosPuntoVenta();\r\n populateDto(dto, rs);\r\n resultList.add(dto);\r\n }\r\n ProductosPuntoVenta ret[] = new ProductosPuntoVenta[resultList.size()];\r\n resultList.toArray(ret);\r\n return ret;\r\n }", "private void readResultSet() throws IOException {\n\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t(new InputStreamReader(new FileInputStream(new File(\"./thrash/\" + fileName)), \"ISO-8859-1\")));\n\n\t\tString line = reader.readLine();\n\n\t\twhile (line != null) {\n\n\t\t\tString rate = line.split(\"rate=\")[1].trim();\n\t\t\tString label = line.split(\"[0-9]\\\\.[0-9]\")[0].trim();\n//\t\t\tString googleDescription = line.split(\"googleDescription=\")[1].split(\"score\")[0].trim();\n\t\t\tString score = line.split(\"score=\")[1].split(\"rate=\")[0].trim();\n\n\t\t\tSpatialObject obj = new SpatialObject(label, Double.parseDouble(rate), Double.parseDouble(score));\n//\t\t\tSystem.out.println(\"Label: \" + label);\n//\t\t\tSystem.out.println(\"Rate: \" + rate);\n//\t\t\tSystem.out.println(\"Score: \" + score);\n//\t\t\tSpatialObject idealObj = new SpatialObject(googleDescription, Double.parseDouble(rate), Double.parseDouble(rate));\n\t\t\tSpatialObject idealObj = new SpatialObject(label, Double.parseDouble(rate), Double.parseDouble(rate));\n\n\t\t\tresults.add(obj);\n\t\t\tidealResults.add(idealObj);\n\n\t\t\tline = reader.readLine();\n\t\t}\n\n\t\treader.close();\n\t}", "public DataSet<DataRow> getResult(ActionForm form, int first, int rows)\n\t\t\tthrows Exception {\n\t\tYonghuDataForm f = (YonghuDataForm) form;\n\t\tList<CommonModule> xiaoquList = service.getXiaoQuCodeAll();\n\t\tf.setXiaoquList(xiaoquList);\n\t\treturn serviceData.getResultDaiweixiu((YonghuDataForm) form, first, rows);\n\t}", "public List<ReporteRetencionesResumido> getRetencionSRIResumido(int mes, int anio, int idOrganizacion)\r\n/* 27: */ {\r\n/* 28: 58 */ String sql = \"SELECT new ReporteRetencionesResumido(f.fechaEmisionRetencion,f.fechaRegistro,f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero),\\tf.identificacionProveedor,c.descripcion,CASE WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE then (SUM(COALESCE(dfp.baseImponibleRetencion, 0)+COALESCE(dfp.baseImponibleTarifaCero, 0) +COALESCE(dfp.baseImponibleDiferenteCero, 0)+COALESCE(dfp.baseImponibleNoObjetoIva, 0))) else COALESCE(dfp.baseImponibleRetencion, 0) end,dfp.porcentajeRetencion,dfp.valorRetencion,\\tc.codigo,CASE WHEN c.tipoConceptoRetencion = :tipoConceptoIVA then 'IVA' WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE then 'FUENTE' WHEN c.tipoConceptoRetencion = :tipoConceptoISD then 'ISD' else '' end,f.numeroRetencion) FROM DetalleFacturaProveedorSRI dfp INNER JOIN dfp.facturaProveedorSRI f INNER JOIN dfp.conceptoRetencionSRI c WHERE MONTH(f.fechaRegistro) =:mes\\tAND YEAR(f.fechaRegistro) =:anio AND f.estado!=:estadoAnulado AND f.indicadorSaldoInicial!=true AND f.idOrganizacion = :idOrganizacion\\tGROUP BY c.codigo,f.numero,f.puntoEmision,\\tf.establecimiento, f.identificacionProveedor,\\tc.descripcion,dfp.baseImponibleRetencion,dfp.porcentajeRetencion,dfp.valorRetencion,f.fechaEmisionRetencion,f.fechaRegistro,f.fechaEmision,f.numeroRetencion, c.tipoConceptoRetencion ORDER BY c.tipoConceptoRetencion, c.codigo \";\r\n/* 29: */ \r\n/* 30: */ \r\n/* 31: */ \r\n/* 32: */ \r\n/* 33: */ \r\n/* 34: */ \r\n/* 35: */ \r\n/* 36: */ \r\n/* 37: */ \r\n/* 38: */ \r\n/* 39: */ \r\n/* 40: */ \r\n/* 41: */ \r\n/* 42: */ \r\n/* 43: */ \r\n/* 44: */ \r\n/* 45: 75 */ Query query = this.em.createQuery(sql);\r\n/* 46: 76 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 47: 77 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 48: 78 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 49: 79 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 50: 80 */ query.setParameter(\"tipoConceptoIVA\", TipoConceptoRetencion.IVA);\r\n/* 51: 81 */ query.setParameter(\"tipoConceptoFUENTE\", TipoConceptoRetencion.FUENTE);\r\n/* 52: 82 */ query.setParameter(\"tipoConceptoISD\", TipoConceptoRetencion.ISD);\r\n/* 53: 83 */ List<ReporteRetencionesResumido> lista = query.getResultList();\r\n/* 54: */ \r\n/* 55: 85 */ return lista;\r\n/* 56: */ }", "@Override\n\t\t\t\t\tpublic Tkfl mapRow(ResultSet result, int i)\n\t\t\t\t\t\t\tthrows SQLException {\n\t\t\t\t\t\tTkfl tkfl = new Tkfl();\n\t\t\t\t\t\ttkfl.setId(result.getInt(\"id_\"));\n\t\t\t\t\t\ttkfl.setParentId(result.getInt(\"parent_id\"));\n\t\t\t\t\t\ttkfl.setTkmc(result.getString(\"tkmc\"));\n\t\t\t\t\t\ttkfl.setMs(result.getString(\"ms\"));\n\t\t\t\t\t\treturn tkfl;\n\t\t\t\t\t}", "public ArrayList<AnuncioDTO> ObtenerAnuncios(){\n ArrayList<AnuncioDTO> ret=new ArrayList<AnuncioDTO>();\n\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"getAll.Anuncio\"));\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n int id=rs.getInt(1);\n TipoAnuncio tipoAnuncio=TipoAnuncio.valueOf(rs.getString(2));\n String titulo = rs.getString(3);\n String cuerpo = rs.getString(4);\n Date fechaPublicacion = new Date(rs.getDate(5).getTime());\n Date fechaFin=null;\n if(tipoAnuncio.equals(TipoAnuncio.Flash)){\n fechaFin= new Date(rs.getDate(6).getTime());\n }\n String emailPropietario = rs.getString(7);\n EstadoAnuncio estadoAnuncio = EstadoAnuncio.valueOf(rs.getString(8));\n \n ArrayList<String>temas=null;\n if(tipoAnuncio.equals(TipoAnuncio.Tematico)){\n temas=new ArrayList<String>();\n ArrayList<String>temasId = null;\n temasId=new ArrayList<String>(Arrays.asList(rs.getString(9).split(\",\")));\n InteresesDAO interesesDAO = new InteresesDAO(sqlPropertiesPath);\n Hashtable<Integer,String> intereses = interesesDAO.DevolverIntereses();\n for(String interes : temasId){\n temas.add(intereses.get(Integer.parseInt(interes)));\n }\n\n }\n ArrayList<String>destinatarios = ObtenerDestinatariosAnuncio(id);\n AnuncioDTO anuncioDTO=new AnuncioDTO(id, tipoAnuncio, titulo, cuerpo, fechaPublicacion, fechaFin, emailPropietario, estadoAnuncio, temas,destinatarios);\n\n ret.add(anuncioDTO);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return ret;\n }", "public ArrayList<Fichier> getFichierAll() throws SQLException {\n\t\tString query = SQLQueries.GET_FICHIER_ALL_QUERY;\n\t\tResultSet rs = null;\n\t\tArrayList<Fichier> fichiers = new ArrayList<Fichier>();\n\t\ttry {\n\t\t\tconnection = Connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\trs = statement.executeQuery(query);\n\t\t\twhile (rs.next()) {\n\t\t\t\tFichier fichier = new Fichier();\n\t\t\t\tfichier.setNom_fichier(rs.getString(\"nom_fichier\"));\n\t\t\t\tfichier.setDate_fichier(rs.getDate(\"date_fichier\"));\n\t\t\t\tfichier.setCommentaire(rs.getString(\"commentaire\"));\n\t\t\t\tfichier.setId_matiere(rs.getInt(\"id_matiere\"));\n\t\t\t\tfichier.setFichier(rs.getBytes(\"fichier\"));\n\t\t\t\tfichiers.add(fichier);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (statement != null)\n\t\t\t\tstatement.close();\n\t\t\tif (rs != null)\n\t\t\t\trs.close();\n\t\t\tconnection.close();\n\t\t}\n\t\treturn fichiers;\n\t}", "Iterator<TabularData> dataIterator();", "public ArrayList<RowsCards> selectAll(){\n String sql = \"SELECT Carta FROM Cardestates\";\n ArrayList<RowsCards> Cartas_enteras = new ArrayList<>();\n RowsCards row ;\n row = new RowsCards();\n\n ArrayList<String> cartas = new ArrayList<>();\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)){\n // loop through the result set\n\n int iterador = 1;\n while (rs.next()) {\n\n cartas.add(rs.getString(\"Carta\"));\n switch (iterador)\n {\n case 1:\n row.setC1(rs.getString(\"Carta\"));\n iterador++;\n // System.out.println(rs.getString(\"Carta\"));\n break;\n case 2:\n row.setC2(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 3:\n row.setC3(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 4:\n row.setC4(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 5:\n row.setC5(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 6:\n row.setC6(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 7:\n row.setC7(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 8:\n row.setC8(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 9:\n row.setC9(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 10:\n row.setC10(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 11:\n row.setC11(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 12:\n row.setC12(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 13:\n\n row.setC13(rs.getString(\"Carta\"));\n iterador = 1;\n Cartas_enteras.add(row);\n row = new RowsCards();\n break;\n }\n }\n\n } catch (SQLException | ClassNotFoundException e) {\n System.out.println(e.getMessage());\n }\n Cartas_enteras.add(row);\n\n return Cartas_enteras;\n }", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "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 void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }", "public RecordSetIFace getRecordSet(final int[] rows, final int column, final boolean returnAll)\n {\n RecordSet rs = new RecordSet();\n rs.initialize();\n\n // return if now rows are selected\n if (!returnAll && (rows == null || rows.length == 0))\n {\n return rs;\n }\n\n try\n {\n if (!resultSet.first())\n {\n log.error(\"Error doing resultSet.first\");\n return null;\n }\n\n if (rows == null)\n {\n do\n {\n rs.addItem(resultSet.getInt(column+1));\n } while (resultSet.next());\n\n return rs;\n\n }\n for (int i=0;i<rows.length;i++)\n {\n if (resultSet.absolute(rows[i]))\n {\n rs.addItem(resultSet.getInt(column+1));\n }\n }\n } catch (Exception ex)\n {\n edu.ku.brc.af.core.UsageTracker.incrHandledUsageCount();\n edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(ResultSetTableModelDirect.class, ex);\n log.error(ex);\n }\n return null;\n }", "public ArrayList<String> obtenerCantidadRemota(java.sql.Connection con, int CodEmp, int CodLoc,int CodTipDoc, int CodDoc){\r\n java.sql.Statement stmLoc; \r\n java.sql.ResultSet rstLoc;\r\n try{\r\n if(con!=null){\r\n arlDatIng = new ArrayList();\r\n stmLoc=con.createStatement();\r\n strSql=\"\";/* LOS INGRESOS AGRUPADOS POR ITEM */\r\n strSql+=\" SELECT a2.co_emp , a2.co_loc, a2.co_tipDoc, a2.co_doc,a8.co_bodGrp as co_bodIng, a7.co_bodEgr, \\n\";\r\n strSql+=\" a3.co_reg,a6.co_reg as coRegRel,a3.co_itm, a3.nd_can \\n\";\r\n strSql+=\" FROM tbm_cabMovInv as a2 /*EL INGRESO */ \\n\";\r\n strSql+=\" INNER JOIN tbm_detMovInv as a3 ON (a2.co_emp=a3.co_emp AND a2.co_loc=a3.co_loc AND \\n\";\r\n strSql+=\" a2.co_tipDoc=a3.co_tipDoc AND a2.co_doc=a3.co_doc) \\n\";\r\n strSql+=\" INNER JOIN tbr_detMovInv as a5 ON (a3.co_emp=a5.co_empRel AND a3.co_loc=a5.co_locRel AND a3.co_tipDoc=a5.co_tipDocRel \\n\";\r\n strSql+=\" AND a3.co_doc=a5.co_docRel AND a3.co_reg=a5.co_regRel) \\n\";\r\n strSql+=\" INNER JOIN tbm_detMovInv as a6 ON (a5.co_emp=a6.co_emp AND a5.co_loc=a6.co_loc AND a5.co_tipDoc=a6.co_tipDoc AND \\n\";\r\n strSql+=\" a5.co_doc=a6.co_doc AND a5.co_reg=a6.co_reg)/*LA FACTURA*/ \\n\";\r\n strSql+=\" LEFT OUTER JOIN ( \\n\";\r\n strSql+=\" SELECT a1.co_emp, a1.co_loc, a1.co_tipDoc, a1.co_doc,a4.co_bodGrp as co_bodEgr, a1.co_reg, \\n\";\r\n strSql+=\" a3.co_emp as co_empIng, a3.co_loc as co_locIng, a3.co_tipDoc as co_tipDocIng, \\n\";\r\n strSql+=\" a3.co_doc as co_docIng,a3.co_reg as co_regIng\\n\";\r\n strSql+=\" FROM tbm_detMovInv AS a1 \\n\";\r\n strSql+=\" INNER JOIN tbr_detMovInv AS a2 ON (a1.co_emp=a2.co_Emp AND a1.co_loc=a2.co_loc AND a1.co_tipDoc=a2.co_tipDoc AND \\n\";\r\n strSql+=\" a1.co_doc=a2.co_doc AND a1.co_reg=a2.co_reg) \\n\";\r\n strSql+=\" INNER JOIN (\t \\n\";\r\n strSql+=\" SELECT a3.co_emp , a3.co_loc, a3.co_tipDoc, a3.co_doc ,a3.co_reg \\n\";\r\n strSql+=\" FROM tbm_detMovInv as a3 \\n\";\r\n strSql+=\" INNER JOIN tbr_detMovInv as a5 ON (a3.co_emp=a5.co_empRel AND a3.co_loc=a5.co_locRel AND \\n\";\r\n strSql+=\" a3.co_tipDoc=a5.co_tipDocRel AND a3.co_doc=a5.co_docRel \\n\";\r\n strSql+=\" AND a3.co_reg=a5.co_regRel) \\n\";\r\n strSql+=\" WHERE a5.co_emp=\"+CodEmp+\" AND a5.co_loc=\"+CodLoc+\" AND a5.co_tipDoc=\"+CodTipDoc+\" AND a5.co_doc=\"+CodDoc+\" \\n\";\r\n strSql+=\" ) as a3 ON (a2.co_empRel=a3.co_emp AND a2.co_locRel=a3.co_loc AND a2.co_tipDocRel=a3.co_tipDoc AND \\n\";\r\n strSql+=\" a2.co_docRel=a3.co_doc AND a2.co_regRel=a3.co_reg) \\n\";\r\n strSql+=\" INNER JOIN tbr_bodEmpBodGrp AS a4 ON (a1.co_emp=a4.co_emp AND a1.co_bod=a4.co_bod AND a4.co_empGrp=\"+objParSis.getCodigoEmpresaGrupo()+\") \\n\";\r\n strSql+=\" WHERE NOT (a1.co_emp=\"+CodEmp+\" AND a1.co_loc=\"+CodLoc+\" AND a1.co_tipDoc=\"+CodTipDoc+\" AND a1.co_doc=\"+CodDoc+\" ) \\n\";\r\n strSql+=\" ) as a7 ON (a3.co_emp=a7.co_empIng AND a3.co_loc=a7.co_locIng AND a3.co_tipDoc=a7.co_tipDocIng AND \\n\";\r\n strSql+=\" a3.co_doc=a7.co_docIng AND a3.co_reg=a7.co_regIng) \\n\";\r\n strSql+=\" INNER JOIN tbr_bodEmpBodGrp AS a8 ON (a3.co_emp=a8.co_emp AND a3.co_bod=a8.co_bod AND a8.co_empGrp=\"+objParSis.getCodigoEmpresaGrupo()+\" )\\n\";\r\n strSql+=\" WHERE a6.co_emp=\"+CodEmp+\" AND a6.co_loc=\"+CodLoc+\" AND a6.co_tipDoc=\"+CodTipDoc+\" AND a6.co_doc=\"+CodDoc+\" \\n\";\r\n strSql+=\" AND a3.nd_can > 0 AND (a2.tx_tipMov='V' OR a2.tx_tipMov='I' OR a2.tx_tipMov='R') \\n\";\r\n strSql+=\" GROUP BY a6.co_reg, a2.co_emp , a2.co_loc, a2.co_tipDoc, a2.co_doc,a8.co_bodGrp,a7.co_bodEgr,a3.co_reg,a3.co_reg, a3.co_itm, a3.nd_can \\n\";\r\n strSql+=\" ORDER BY a6.co_reg \\n\"; // IMPORTANTE ORDENADO POR LOS REGISTROS DE LA FACTURA \r\n System.out.println(\"obtenerCantidadRemota:... \\n\" + strSql);\r\n rstLoc=stmLoc.executeQuery(strSql);\r\n while(rstLoc.next()){\r\n arlRegIng=new ArrayList();\r\n arlRegIng.add(INT_ARL_COD_EMP,rstLoc.getInt(\"co_emp\")); // (DATOS DEL INGRESO)\r\n arlRegIng.add(INT_ARL_COD_LOC,rstLoc.getInt(\"co_loc\"));\r\n arlRegIng.add(INT_ARL_COD_TIP_DOC,rstLoc.getInt(\"co_tipDoc\"));\r\n arlRegIng.add(INT_ARL_COD_DOC,rstLoc.getInt(\"co_doc\"));\r\n arlRegIng.add(INT_ARL_COD_REG,rstLoc.getInt(\"co_reg\"));\r\n arlRegIng.add(INT_ARL_COD_REG_REL,rstLoc.getInt(\"coRegRel\")); // RELACIONAL (LA FACTURA)\r\n arlRegIng.add(INT_ARL_COD_ITM,rstLoc.getInt(\"co_itm\"));\r\n arlRegIng.add(INT_ARL_CAN_ITM,rstLoc.getDouble(\"nd_can\"));\r\n arlRegIng.add(INT_ARL_BOD_ING,rstLoc.getInt(\"co_bodIng\")); /* JoséMario 12/Sep/2016 */\r\n arlRegIng.add(INT_ARL_BOD_EGR,rstLoc.getInt(\"co_bodEgr\")); /* JoséMario 12/Sep/2016 */\r\n arlRegIng.add(INT_ARL_CAN_UTI,0.00);\r\n arlDatIng.add(arlRegIng);\r\n }\r\n rstLoc.close();\r\n rstLoc=null;\r\n stmLoc.close();\r\n stmLoc=null;\r\n }\r\n }\r\n catch (java.sql.SQLException e){ \r\n objUti.mostrarMsgErr_F1(jifCnt, e);\r\n }\r\n catch (Exception e){ \r\n objUti.mostrarMsgErr_F1(jifCnt, e);\r\n }\r\n return arlDatIng;\r\n }", "public static List<Parte> partesTFF(String fechaIni, String fechaFin){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesTFF (?,?,?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n \n cs.setString(1, fechaIni);\n cs.setString(2, fechaFin);\n cs.registerOutParameter(3, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(3);\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 }", "@Override\n\tpublic Row next(){\n\t\treturn res;\n\t}", "public ArrayList<Empleado> Read() throws SQLException {\r\n ResultSet rs;\r\n /*Guardamos todos los datos de la tabla en un ArrayList*/\r\n ArrayList<Empleado> listado = new ArrayList<>();\r\n /*Sentencia SQL*/\r\n String sql = \"SELECT * FROM empleados\";\r\n PreparedStatement sentencia = conexion.prepareStatement(sql);\r\n /*Ejecutar sentencia*/\r\n sentencia.execute();\r\n rs = sentencia.getResultSet();\r\n /*Guardamos los valores de cada fila en su objeto*/\r\n while(rs.next()){\r\n Empleado emp = new Empleado(rs.getInt(\"emp_no\"), rs.getString(\"apellido\"), rs.getString(\"oficio\"), rs.getInt(\"dir\"), rs.getDate(\"fecha_alt\"), rs.getFloat(\"salario\"), rs.getFloat(\"comision\"), rs.getInt(\"dept_no\")); \r\n listado.add(emp);\r\n }\r\n return listado;\r\n }", "public ArrayList<Object[]> obtenerOfertas(String usuario2) {\n\t\tArrayList<Object[]> resultado = new ArrayList<>();\n\t\ttry {\n\t\t\tPreparedStatement sentencia = \n\t\t\t\tconexion.prepareStatement(\"select * from ofertas \"\n\t\t\t\t\t\t+ \"where establec = ?\");\n\t\t\t\n\t\t\tsentencia.setString(1, usuario2);\n\t\t\tResultSet r = sentencia.executeQuery();\n\t\t\twhile(r.next()) {\n\t\t\t\tObject[] o = new Object[5];\n\t\t\t\to[0] = r.getInt(1);\n\t\t\t\to[1] = r.getDate(2);\n\t\t\t\to[2] = r.getDate(3);\n\t\t\t\to[3] = r.getString(4);\n\t\t\t\to[4] = r.getString(5);\n\t\t\t\tresultado.add(o);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "public TreeSet<PrestamoFila> CargarDatos () {\n this.conexion.ConectarBD();\n \n String consulta = \"SELECT * FROM prestamos ORDER BY idprestamo\";\n this.rst = this.conexion.ConsultaBD(consulta);\n try {\n //Pasamos los datos recogidos de la BD al TreeSet\n while (this.rst.next()){\n PrestamoFila pf = new PrestamoFila(rst.getInt(\"IdPrestamo\"),rst.getInt(\"IdSocio\"),rst.getInt(\"IdLibro\"),rst.getDate(\"FechaInicio\"),rst.getDate(\"FechaFin\")); \n this.tPrestamos.add(pf);\n }\n } catch (SQLException e){\n throw new MisException(\"Error al cargar los datos del Prestamo.\\n\"+e.toString());\n \n }\n //Desconectamos de la BD\n this.conexion.DesconectarBD();\n return this.tPrestamos;\n }", "public FlujoDetalleDTO next() {\n/* */ try {\n/* 64 */ if (this.rs.next()) {\n/* 65 */ return leerRegistro();\n/* */ }\n/* */ }\n/* 68 */ catch (Exception e) {\n/* 69 */ e.printStackTrace();\n/* 70 */ Utilidades.writeError(\"FlujoDetalleDAO:next \", e);\n/* */ } \n/* 72 */ return null;\n/* */ }", "public ArrayList consultarTodo() {\n Cursor cursor = this.myDataBase.rawQuery(\"SELECT des_invfisico_tmp._id,des_invfisico_tmp.cod_ubicacion,des_invfisico_tmp.cod_referencia,des_invfisico_tmp.cod_plu,plu.descripcion FROM des_invfisico_tmp LEFT OUTER JOIN plu ON plu.cod_plu = des_invfisico_tmp.cod_plu \", null);\n ArrayList arrayList = new ArrayList();\n new ArrayList();\n if (cursor.moveToFirst()) {\n do {\n for (int i = 0; i <= 4; ++i) {\n if (cursor.isNull(i)) {\n arrayList.add(\"\");\n continue;\n }\n arrayList.add(cursor.getString(i));\n }\n } while (cursor.moveToNext());\n }\n\n return arrayList;\n }", "public static List<Parte> partesTFI(BigDecimal idT, String fechaIni, String fechaFin){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesTFI (?,?,?,?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n cs.setBigDecimal(1, idT);\n cs.setString(2, fechaIni);\n cs.setString(3, fechaFin);\n cs.registerOutParameter(4, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(4);\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 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 List<String> getRows();", "void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }", "private void consultarlistareportes() {\n db= con.getWritableDatabase();\n ReporteIncidente reporte= null;\n listarreportesinc =new ArrayList<ReporteIncidente>();\n Cursor cursor= db.rawQuery(\"select imagen1,asunto_reporte,estado_reporte,desc_reporte,cod_reporte from \"+ Utilitario.TABLE_REPORTE_INCIDENTE+\" where estado_reporte<>'Incompleto'\",null);\n\n while (cursor.moveToNext()){\n reporte= new ReporteIncidente();\n reporte.setImage1(cursor.getBlob(0));\n reporte.setAsunto(cursor.getString(1));\n reporte.setEstado(cursor.getString(2));\n reporte.setDescripcion(cursor.getString(3));\n reporte.setCodreporte(cursor.getInt(4));\n listarreportesinc.add(reporte);\n }\n //obtenerinformacion();\n db.close();\n }", "public List<Curso> recuperaTodosCursos(){\r\n Connection conexao = ConexaoComBD.conexao();\r\n //instrução sql\r\n String sql = \"SELECT * FROM curso;\";\r\n try {\r\n //statement de conexão\r\n PreparedStatement ps = conexao.prepareStatement(sql);\r\n //recebe a tabela de retorno do banco de dados em um formato java\r\n ResultSet rs = ps.executeQuery();\r\n //criar lista de retorno\r\n List<Curso> lista = new ArrayList<>();\r\n \r\n //tratar o retorno do banco\r\n \r\n while(rs.next()){\r\n //criar um objeto modelo do tipo do retorno \r\n Curso c = new Curso();\r\n c.setIdCurso(rs.getInt(1));\r\n c.setNome(rs.getString(2));\r\n c.setArea(rs.getString(3));\r\n c.setCargaHoraria(rs.getInt(5));\r\n c.setValorCurso(rs.getDouble(6));\r\n c.setValorMensal(rs.getDouble(7));\r\n c.setCod(rs.getString(8));\r\n lista.add(c);\r\n }\r\n //retornar lista preenchida \r\n return lista;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(CursoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //retorna null em caso de excessao\r\n return null;\r\n }", "public List<Funcionario> readAll() {\r\n\t\t\tConnection con = ConnectionFactory.getConnection();\r\n\t\t\tPreparedStatement stmt = null;\r\n\t\t\tResultSet rs = null;\r\n\r\n\t\t\tString sql = \" select * from funcionario\";\r\n\t\t\tList<Funcionario> funcionarios = new ArrayList<Funcionario>();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tstmt = con.prepareStatement(sql);\r\n\t\t\t\trs = stmt.executeQuery();\r\n\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tFuncionario func = new Funcionario();\r\n\t\t\t\t\tfunc.setCodigo(rs.getString(\"Codigo\"));\r\n\t\t\t\t\tfunc.setCargo(rs.getString(\"Cargo\"));\r\n\t\t\t\t\tfunc.setNome(rs.getString(\"Nome\"));\r\n\t\t\t\t\tfunc.setCpf(rs.getString(\"Cpf\"));\r\n\t\t\t\t\tfunc.setEndereco(rs.getString(\"Endereco\"));\r\n\t\t\t\t\tfunc.setCidade(rs.getString(\"Cidade\"));\r\n\t\t\t\t\tfunc.setEstado(rs.getString(\"Estado\"));\r\n\t\t\t\t\tfunc.setTelefone(rs.getString(\"Telefone\"));\r\n\t\t\t\t\tfunc.setEmail(rs.getString(\"Email\"));\r\n\r\n\r\n\t\t\t\t\tfuncionarios.add(func);\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\t\tcatch (SQLException e) { e.printStackTrace();\r\n\t\t\t\tSystem.out.println(\"Erro ao tentar ler tabela funcionario\");\r\n\t\t\t} finally {\r\n\t\t\t\tConnectionFactory.closeConnection(con, stmt);\r\n\t\t\t}\r\n\r\n\t\t\treturn funcionarios;\r\n\t\t}", "@Override\n public List<UfficioTecnico> getAll() throws SQLException {\n final Connection connection = connectionManager.getConnection();\n try {\n final PreparedStatement preparedStatement = connection\n .prepareStatement(SELECT_ALL);\n final ResultSet rs = preparedStatement.executeQuery();\n final List<UfficioTecnico> uffici = new ArrayList<UfficioTecnico>();\n while (rs.next()) {\n final UfficioTecnico uff = new UfficioTecnico();\n uff.setId(rs.getInt(\"Id\"));\n uff.setNome(rs.getString(\"nome\"));\n uff.setTel(rs.getString(\"tel\"));\n uff.setEmail(rs.getString(\"email\"));\n uff.setUbicazione(rs.getString(\"ubicazione\"));\n uffici.add(uff);\n }\n return uffici;\n } finally {\n connectionManager.freeConnection(connection);\n }\n }", "@Override\n\t\t\tpublic Tkfl mapRow(ResultSet result, int i) throws SQLException {\n\t\t\t\tTkfl tkfl = new Tkfl();\n\t\t\t\ttkfl.setId(result.getInt(\"id_\"));\n\t\t\t\ttkfl.setParentId(result.getInt(\"parent_id\"));\n\t\t\t\ttkfl.setTkmc(result.getString(\"tkmc\"));\n\t\t\t\ttkfl.setMs(result.getString(\"ms\"));\n\t\t\t\treturn tkfl;\n\t\t\t}", "public static ArrayList<com.besixplus.sii.objects.Cgg_jur_anticipo> selectAll(\n\t\tjava.sql.Connection inConnection,\n\t\tString inUserName\n\t){\n\t\tArrayList<com.besixplus.sii.objects.Cgg_jur_anticipo> outCgg_jur_anticipo = new ArrayList<com.besixplus.sii.objects.Cgg_jur_anticipo>();\n\t\ttry{\n\t\t\tCallableStatement stmSelect = inConnection.prepareCall(\"{ ? = call sii.F_CGG_JUR_ANTICIPO_SELECT_AS(?) }\");\n\t\t\tstmSelect.registerOutParameter(1, Types.OTHER);\n\t\t\tstmSelect.setString(2, inUserName);\n\t\t\tstmSelect.execute();\n\t\t\tResultSet results = (ResultSet) stmSelect.getObject(1);\n\t\t\twhile (results.next()) {\n\t\t\t\tcom.besixplus.sii.objects.Cgg_jur_anticipo tmpCgg_jur_anticipo = new com.besixplus.sii.objects.Cgg_jur_anticipo();\n\t\t\t\ttmpCgg_jur_anticipo.setCJAAC_CODIGO(results.getString(1));\n\t\t\t\ttmpCgg_jur_anticipo.setCJACU_CODIGO(results.getString(2));\n\t\t\t\ttmpCgg_jur_anticipo.setCJAAC_PORCENTAJE(results.getBigDecimal(3));\n\t\t\t\ttmpCgg_jur_anticipo.setCJAAC_OBSERVACION(results.getString(4));\n\t\t\t\ttmpCgg_jur_anticipo.setCJAAC_FECHA(results.getTimestamp(5));\n\t\t\t\ttmpCgg_jur_anticipo.setCJAAC_MONTO(results.getBigDecimal(6));\n\t\t\t\ttmpCgg_jur_anticipo.setCJAAC_VALOR_1(results.getString(7));\n\t\t\t\ttmpCgg_jur_anticipo.setCJAAC_ESTADO(results.getBoolean(8));\n\t\t\t\toutCgg_jur_anticipo.add(tmpCgg_jur_anticipo);\n\t\t\t}\n\t\t\tresults.close();\n\t\t\tstmSelect.close();\n\t\t}catch(SQLException e){\n\t\t\tcom.besixplus.sii.db.SQLErrorHandler.errorHandler(e);\n\t\t}\n\t\treturn outCgg_jur_anticipo;\n\t}", "protected void exibirMedicos(){\n System.out.println(\"--- MEDICOS CADASTRADOS ----\");\r\n String comando = \"select * from medico order by id\";\r\n ResultSet rs = cb.buscaDados(comando);\r\n try{\r\n while(rs.next()){\r\n int id = rs.getInt(\"id\");\r\n String nome = rs.getString(\"nome\");\r\n System.out.println(\"[\"+id+\"] \"+nome);\r\n }\r\n }\r\n catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n\tpublic Map<String, Object> readAll() {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate)\n\t\t\t\t.withCatalogName(\"PKG_ALM_CRUD_PRODUNIDADMED\")\n\t\t\t\t.withProcedureName(\"PA_MAT_PRODUNIDADMED_LIS\")\t\n\t\t\t\t.declareParameters(new SqlOutParameter(\"uni\", OracleTypes\n\t\t\t\t.CURSOR, new ColumnMapRowMapper()));\n\t\treturn simpleJdbcCall.execute();\n\t}", "public ArrayList<UsuarioVO> consultarPersona(int documento) {\r\n\t ArrayList< UsuarioVO> miUsuario = new ArrayList< UsuarioVO>();\r\n\t Conexion conex= new Conexion();\r\n\t \r\n\t try {\r\n\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM usuarios where cedula_usuario = ? \");\r\n\t consulta.setInt(1, documento);\r\n\t ResultSet res = consulta.executeQuery();\r\n\t \r\n\t if(res.next()){\r\n\t\tUsuarioVO persona= new UsuarioVO();\r\n\t persona.setCedula_usuario(Integer.parseInt(res.getString(\"cedula_usuario\")));\r\n\t persona.setEmail_usuario(res.getString(\"email_usuario\"));\r\n\t persona.setNombre_usuario(res.getString(\"nombre_usuario\"));\r\n\t persona.setPassword(res.getString(\"password\"));\r\n\t persona.setUsuario(res.getString(\"usuario\"));\r\n\t \r\n\t miUsuario.add(persona);\r\n\t }\r\n\t res.close();\r\n\t consulta.close();\r\n\t conex.desconectar();\r\n\t \r\n\t } catch (Exception e) {\r\n\t JOptionPane.showMessageDialog(null, \"Error en la Consulta del Usuario\\n\"+e);\r\n\t }\r\n\t return miUsuario;\r\n\t }", "public List<Object[]> getRetencionSRI(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden)\r\n/* 59: */ {\r\n/* 60:107 */ StringBuilder sql = new StringBuilder();\r\n/* 61: */ \r\n/* 62:109 */ sql.append(\" SELECT f.fechaEmisionRetencion, f.fechaRegistro, f.fechaEmision, \");\r\n/* 63:110 */ sql.append(\" CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), \");\r\n/* 64:111 */ sql.append(\" f.identificacionProveedor, c.descripcion, \");\r\n/* 65:112 */ sql.append(\" coalesce(CASE WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE THEN (SUM(COALESCE(dfp.baseImponibleRetencion, 0)+COALESCE(dfp.baseImponibleTarifaCero, 0) \");\r\n/* 66:113 */ sql.append(\" \\t+COALESCE(dfp.baseImponibleDiferenteCero, 0)+COALESCE(dfp.baseImponibleNoObjetoIva, 0))) ELSE COALESCE(dfp.baseImponibleRetencion, 0) END,0), \");\r\n/* 67:114 */ sql.append(\" coalesce(dfp.porcentajeRetencion, 0), coalesce(dfp.valorRetencion, 0), coalesce(c.codigo, 'NA'), \");\r\n/* 68:115 */ sql.append(\" coalesce(CASE WHEN c.tipoConceptoRetencion = :tipoConceptoIVA THEN 'IVA' WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE THEN 'FUENTE' WHEN c.tipoConceptoRetencion = :tipoConceptoISD THEN 'ISD' ELSE '' END,'NA'), \");\r\n/* 69:116 */ sql.append(\" CONCAT(f.establecimientoRetencion,'-',f.puntoEmisionRetencion,'-',f.numeroRetencion), \");\r\n/* 70:117 */ sql.append(\" f.baseImponibleTarifaCero, f.baseImponibleDiferenteCero, f.baseImponibleNoObjetoIva, f.nombreProveedor, f.montoIva, \");\r\n/* 71:118 */ sql.append(\" f.montoIce, ct.codigo, f.autorizacionRetencion, f.fechaRegistro, f.autorizacion, f.claveAcceso, f.estado,f.idFacturaProveedorSRI, fp.descripcion \");\r\n/* 72:119 */ sql.append(\" FROM DetalleFacturaProveedorSRI dfp \");\r\n/* 73:120 */ sql.append(\" RIGHT OUTER JOIN dfp.conceptoRetencionSRI c \");\r\n/* 74:121 */ sql.append(\" RIGHT OUTER JOIN dfp.facturaProveedorSRI f \");\r\n/* 75:122 */ sql.append(\" LEFT OUTER JOIN f.facturaProveedor fp \");\r\n/* 76:123 */ sql.append(\" LEFT JOIN f.creditoTributarioSRI ct \");\r\n/* 77:124 */ sql.append(\" WHERE MONTH(f.fechaRegistro) =:mes AND f.documentoModificado IS NULL \");\r\n/* 78:125 */ sql.append(\" AND YEAR(f.fechaRegistro) =:anio \");\r\n/* 79:126 */ sql.append(\" AND f.estado!=:estadoAnulado \");\r\n/* 80:127 */ sql.append(\" AND f.indicadorSaldoInicial!=true \");\r\n/* 81:128 */ sql.append(\" AND f.idOrganizacion = :idOrganizacion \");\r\n/* 82:129 */ if (sucursalFP != null) {\r\n/* 83:130 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 84: */ }\r\n/* 85:132 */ if (sucursalRetencion != null) {\r\n/* 86:133 */ sql.append(\" AND f.establecimientoRetencion = :sucursalRetencion \");\r\n/* 87: */ }\r\n/* 88:135 */ if (puntoVentaRetencion != null) {\r\n/* 89:136 */ sql.append(\" AND f.puntoEmisionRetencion = :puntoVentaRetencion \");\r\n/* 90: */ }\r\n/* 91:138 */ sql.append(\" GROUP BY f.idFacturaProveedorSRI, c.codigo, f.numero, f.puntoEmision, \");\r\n/* 92:139 */ sql.append(\" f.establecimiento, f.identificacionProveedor, \");\r\n/* 93:140 */ sql.append(\" c.descripcion, dfp.baseImponibleRetencion, dfp.porcentajeRetencion, dfp.valorRetencion, f.fechaEmisionRetencion, f.fechaRegistro, f.fechaEmision, f.numeroRetencion, \");\r\n/* 94:141 */ sql.append(\" f.baseImponibleTarifaCero, f.baseImponibleDiferenteCero, f.baseImponibleNoObjetoIva, f.nombreProveedor, f.montoIva, \");\r\n/* 95:142 */ sql.append(\" f.montoIce, ct.codigo, f.autorizacionRetencion, f.fechaRegistro, c.tipoConceptoRetencion, f.autorizacion, f.claveAcceso, f.estado, \");\r\n/* 96:143 */ sql.append(\" f.establecimientoRetencion, f.puntoEmisionRetencion, f.numeroRetencion, fp.descripcion \");\r\n/* 97:144 */ if ((orden != null) && (orden.equals(\"POR_RETENCION\"))) {\r\n/* 98:145 */ sql.append(\" ORDER BY f.establecimientoRetencion, f.puntoEmisionRetencion, f.numeroRetencion \");\r\n/* 99:146 */ } else if ((orden != null) && (orden.equals(\"POR_FACTURA\"))) {\r\n/* 100:147 */ sql.append(\" ORDER BY f.establecimiento, f.puntoEmision, f.numero \");\r\n/* 101:148 */ } else if ((orden != null) && (orden.equals(\"POR_CONCEPTO\"))) {\r\n/* 102:149 */ sql.append(\" ORDER BY c.descripcion \");\r\n/* 103: */ }\r\n/* 104:151 */ Query query = this.em.createQuery(sql.toString());\r\n/* 105:152 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 106:153 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 107:154 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 108:155 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 109:156 */ query.setParameter(\"tipoConceptoIVA\", TipoConceptoRetencion.IVA);\r\n/* 110:157 */ query.setParameter(\"tipoConceptoFUENTE\", TipoConceptoRetencion.FUENTE);\r\n/* 111:158 */ query.setParameter(\"tipoConceptoISD\", TipoConceptoRetencion.ISD);\r\n/* 112:159 */ if (sucursalFP != null) {\r\n/* 113:160 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 114: */ }\r\n/* 115:162 */ if (sucursalRetencion != null) {\r\n/* 116:163 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 117: */ }\r\n/* 118:165 */ if (puntoVentaRetencion != null) {\r\n/* 119:166 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 120: */ }\r\n/* 121:169 */ return query.getResultList();\r\n/* 122: */ }", "public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }", "public void getFkp() throws SQLException{\n \n ResultSet rset = dh.getPerson();\n \n fkp = new ArrayList<>();\n \n int i = 0;\n while(rset.next()){\n fkp.add(new Person(rset.getString(\"Nome\")));\n }\n }", "public ArrayList<String> consultar(){\n PreparedStatement ps = null;\n ResultSet rs = null;\n Connection con = getConexion();\n PlanDeEstudio plan = new PlanDeEstudio();\n ArrayList<String> planes = new ArrayList<>();\n \n String sql = \"SELECT * FROM plan_estudio\";\n \n try{\n ps = con.prepareStatement(sql);\n rs = ps.executeQuery();\n \n while (rs.next()) {\n plan.setiD(Integer.parseInt((rs.getString(\"id_plan_estudio\"))));\n planes.add(Integer.toString((plan.getiD())));\n }\n return planes;\n \n }catch (SQLException e){\n System.err.println(e);\n return planes;\n \n } finally {\n try {\n con.close();\n } catch (SQLException e){\n System.err.println(e);\n }\n }\n }" ]
[ "0.64510465", "0.6225996", "0.61702955", "0.6112729", "0.60964596", "0.60957247", "0.6092279", "0.608849", "0.60834754", "0.60819566", "0.606197", "0.6055422", "0.60278785", "0.598702", "0.5963767", "0.59562576", "0.5910028", "0.59010816", "0.58795834", "0.586672", "0.5857117", "0.58481187", "0.5822324", "0.58205193", "0.5809419", "0.58041114", "0.579776", "0.5795038", "0.5790036", "0.57882494", "0.57858974", "0.57745165", "0.5770043", "0.5768858", "0.5762989", "0.5761334", "0.5752742", "0.5742962", "0.57380074", "0.57377887", "0.5737572", "0.57301885", "0.57301134", "0.5705757", "0.5697635", "0.569752", "0.56919146", "0.56911296", "0.56807697", "0.56762975", "0.56710136", "0.56688887", "0.56540203", "0.5651847", "0.563008", "0.5625875", "0.56255096", "0.5616957", "0.5615634", "0.5614933", "0.5612479", "0.56121385", "0.5611308", "0.56108785", "0.5606222", "0.5595709", "0.5593986", "0.5591842", "0.5584487", "0.5583296", "0.5579379", "0.55781275", "0.55720204", "0.55718535", "0.5571322", "0.55691475", "0.55686086", "0.55634165", "0.5563074", "0.55554944", "0.55482835", "0.5544317", "0.5542036", "0.55416274", "0.5539921", "0.55384076", "0.5536129", "0.5536049", "0.5534712", "0.55314785", "0.55300635", "0.5527739", "0.5527191", "0.55262023", "0.5525704", "0.5519928", "0.5518935", "0.55155313", "0.5512916", "0.55115443", "0.55114526" ]
0.0
-1
Recupera multiples filas desde el result set especificado
protected ProductosPuntoVenta[] fetchMultiResults(ResultSet rs) throws SQLException { Collection<ProductosPuntoVenta> resultList = new ArrayList<ProductosPuntoVenta>(); while (rs.next()) { ProductosPuntoVenta dto = new ProductosPuntoVenta(); populateDto(dto, rs); resultList.add(dto); } ProductosPuntoVenta ret[] = new ProductosPuntoVenta[resultList.size()]; resultList.toArray(ret); return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Utente[] fetchMultiResults(ResultSet rs) throws SQLException\n\t{\n\t\tCollection resultList = new ArrayList();\n\t\twhile (rs.next()) {\n\t\t\tUtente dto = new Utente();\n\t\t\tpopulateDto( dto, rs);\n\t\t\tresultList.add( dto );\n\t\t}\n\t\t\n\t\tUtente ret[] = new Utente[ resultList.size() ];\n\t\tresultList.toArray( ret );\n\t\treturn ret;\n\t}", "protected VwStatsPerGame[] fetchMultiResults(ResultSet rs) throws SQLException\n\t{\n\t\tCollection resultList = new ArrayList();\n\t\twhile (rs.next()) {\n\t\t\tVwStatsPerGame dto = new VwStatsPerGame();\n\t\t\tpopulateDto( dto, rs);\n\t\t\tresultList.add( dto );\n\t\t}\n\t\t\n\t\tVwStatsPerGame ret[] = new VwStatsPerGame[ resultList.size() ];\n\t\tresultList.toArray( ret );\n\t\treturn ret;\n\t}", "public Object [][] getRubrosPresupuesto2(String presupuesto) throws SQLException \r\n {\n\r\n Statement stmt = con.createStatement();\r\n String strSQL = \"SELECT idrubro,nombre,saldo,tipo_pago FROM RUBROS WHERE IDPRESUPUESTO=\"+ presupuesto+\" ORDER BY TIPO_PAGO\";\r\n\r\n ResultSet rs = stmt.executeQuery(strSQL); \r\n \r\n String registro[];\r\n ArrayList arrayList = new ArrayList();\r\n\r\n int index=0;\r\n Utilities utils = new Utilities();\r\n while (rs.next())\r\n { \r\n registro = new String[5];\r\n registro [0] = rs.getString(\"IDRUBRO\");\r\n registro [1] = rs.getString(\"TIPO_PAGO\");\r\n registro [2] = rs.getString(\"NOMBRE\").trim();\r\n registro [3] = utils.priceWithDecimal(rs.getDouble(\"SALDO\")); \r\n arrayList.add(registro);\r\n \r\n index++;\r\n } \r\n \r\n Object[][] rowData = new Object[index][4]; \r\n int j=0;\r\n while (j<index)\r\n {\r\n arrayList.iterator().hasNext();\r\n String reg[] = (String[]) arrayList.get(j);\r\n rowData [j][0] = reg[0] ;\r\n rowData [j][1] = reg[1] ;\r\n rowData [j][2] = reg[2] ;\r\n rowData [j][3] = reg[3] ; \r\n j++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n \r\n return rowData; \r\n }", "protected Project[] fetchMultiResults(ResultSet rs) throws SQLException {\n\t\tCollection<Project> resultList = new ArrayList<Project>();\n\t\twhile (rs.next()){\n\t\t\tProject dto = new Project();\n\t\t\tpopulateDto(dto, rs);\n\t\t\tresultList.add(dto);\n\t\t}\n\n\t\tProject ret[] = new Project[resultList.size()];\n\t\tresultList.toArray(ret);\n\t\treturn ret;\n\t}", "public Object [][] getRubrosPresupuesto(String presupuesto) throws SQLException \r\n {\n\r\n Statement stmt = con.createStatement();\r\n String strSQL = \"SELECT * FROM RUBROS WHERE IDPRESUPUESTO=\"+ presupuesto+\" ORDER BY TIPO_PAGO\";\r\n\r\n ResultSet rs = stmt.executeQuery(strSQL); \r\n \r\n String registro[];\r\n ArrayList arrayList = new ArrayList();\r\n\r\n int index=0;\r\n Utilities utils = new Utilities();\r\n while (rs.next())\r\n { \r\n registro = new String[5];\r\n registro [0] = rs.getString(\"IDRUBRO\");\r\n registro [1] = rs.getString(\"TIPO_PAGO\");\r\n registro [2] = rs.getString(\"NOMBRE\").trim();\r\n registro [3] = utils.priceWithDecimal(rs.getDouble(\"MONTO\")); \r\n registro [4] = utils.priceWithDecimal(rs.getDouble(\"SALDO\")); \r\n arrayList.add(registro);\r\n \r\n index++;\r\n } \r\n \r\n Object[][] rowData = new Object[index][5]; \r\n int j=0;\r\n while (j<index)\r\n {\r\n arrayList.iterator().hasNext();\r\n String reg[] = (String[]) arrayList.get(j);\r\n rowData [j][0] = reg[0] ;\r\n rowData [j][1] = reg[1] ;\r\n rowData [j][2] = reg[2] ;\r\n rowData [j][3] = reg[3] ;\r\n rowData [j][4] = reg[4] ; \r\n j++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n \r\n return rowData; \r\n }", "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 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 List<Field> iterateThroughAllFields() {\n\n List<Field> listOfFields = new ArrayList<Field>(fields.length * fields.length);\n // TODO: n**m complexity\n for (int i = 0; i < this.fields.length; i++) {\n for (int j = 0; j < this.fields.length; j++) {\n listOfFields.add(this.fields[i][j]);\n }\n }\n return listOfFields;\n }", "protected ExitQuestionsMap[] fetchMultiResults(ResultSet rs) throws SQLException {\n\t\tCollection<ExitQuestionsMap> resultList = new ArrayList<ExitQuestionsMap>();\n\t\twhile (rs.next()){\n\t\t\tExitQuestionsMap dto = new ExitQuestionsMap();\n\t\t\tpopulateDto(dto, rs);\n\t\t\tresultList.add(dto);\n\t\t}\n\t\tExitQuestionsMap ret[] = new ExitQuestionsMap[resultList.size()];\n\t\tresultList.toArray(ret);\n\t\treturn ret;\n\t}", "int[][] multiple(int size) {\n\t\t size++; // наверняка пользователь захочет получить таблицу до того номера ВКЛЮЧИТЕЛЬНО, который укажет во входных параметрах\n\t\t int[][] mult = new int[size][size]; \n\t\t for (int i = 0; i < size; i++) {\n\t\t\t for (int j = 0; j < size; j++) {\n\t\t\t\t mult[i][j] = i * j;\n\t\t\t }\n\t\t }\n\t\t return mult;\n\t }", "public static List<Parte> partesTFF(String fechaIni, String fechaFin){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesTFF (?,?,?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n \n cs.setString(1, fechaIni);\n cs.setString(2, fechaFin);\n cs.registerOutParameter(3, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(3);\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<Aluguel> listarAlugueisPorFilme(Filme filme) throws Exception{\n \n StringBuilder sql = new StringBuilder();\n sql.append(\" SELECT a.id id, a.data_aluguel data_aluguel, a.data_devolucao data_devolucao, a.valor valor, c.nome nome FROM aluguel a \"); \n sql.append(\" INNER JOIN aluguel_filme af ON af.aluguel_id = a.id INNER JOIN filme f ON f.id = af.filme_id \") ;\n sql.append(\" INNER JOIN cliente c on c.id = a.cliente_id \") ;\n sql.append(\" where f.titulo like ? \");\n sql.append(\" GROUP BY a.id, a.data_aluguel, a.data_devolucao, a.valor, c.nome \");\n \n Connection connection = ConexaoUtil.getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(sql.toString());\n preparedStatement.setString(1, \"%\" + filme.getTitulo() + \"%\");\n ResultSet resultSet = preparedStatement.executeQuery();\n \n List<Aluguel> alugueis = new ArrayList<Aluguel>();\n while(resultSet.next()){\n Aluguel aluguel = new Aluguel();\n aluguel.setId(resultSet.getLong(\"id\"));\n aluguel.setDataAluguel(resultSet.getDate(\"data_aluguel\"));\n aluguel.setDataDevolucao(resultSet.getDate(\"data_devolucao\"));\n aluguel.setValor(resultSet.getDouble(\"valor\"));\n Cliente cliente = new Cliente();\n cliente.setNome(resultSet.getString(\"nome\"));\n aluguel.setCliente(cliente);\n alugueis.add(aluguel);\n }\n resultSet.close();\n preparedStatement.close();\n connection.close();\n return alugueis;\n }", "public interface MultiValueResult<T> extends Iterable<T> {\n\t/**\n\t * Returns the total number of results that matched the query before any\n\t * skipping or limiting is done.\n\t * \n\t * @return The total number of results that matched the query before any\n\t * skipping or limiting is done.\n\t */\n\tpublic int count();\n\t\n\t/**\n\t * Returns the total number of results that are being returned.\n\t * \n\t * @return The total number of results that are being returned.\n\t */\n\tpublic int size();\n}", "public ListaPartidas recuperarPartidas() throws SQLException {\n ListaPartidas listaPartidas = null;\n try {\n getConexion();\n String consulta = \"SELECT MANOS.id_mano, CARTAS.valor, CARTAS.palo, JUGADORES.nombre, PARTIDAS.id_partida \" +\n \"FROM MANOS \" +\n \"LEFT JOIN PARTIDAS ON PARTIDAS.id_mano = MANOS.id_mano \" +\n \"LEFT JOIN CARTAS ON CARTAS.id_carta = MANOS.id_carta \" +\n \"LEFT JOIN JUGADORES ON JUGADORES.id_jug = PARTIDAS.id_jug \" +\n \"ORDER BY PARTIDAS.id_mano\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n // Compruebo que se han devuelto datos\n if (registros.next()) {\n // Inicializo el contenedor que se devolverá\n listaPartidas = new ListaPartidas();\n // Declaro e inicializo los objetos que servirán de buffer para añadir datos a cada partida\n LinkedList<Jugador> listaJugadores = new LinkedList<Jugador>();\n LinkedList<Mano> resultado = new LinkedList<Mano>();\n Mano mano = new Mano();\n // Variable que sirve para controlar cuando hay una nueva partida\n int numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n // Variable que sirve para controlar cuando hay una nueva mano\n int numMano = registros.getInt(\"MANOS.id_mano\");\n // Devuelvo el cursor del ResultSet a su posición inicial\n registros.beforeFirst();\n // Bucle encargado de añadir datos a los contenedores\n while (registros.next()) {\n // Declaración de variables\n String palo = registros.getString(\"CARTAS.palo\");\n String valor = registros.getString(\"CARTAS.valor\");\n String nombre = registros.getString(\"JUGADORES.nombre\");\n // Se crea una carta con el palo y el valor devuelto por la consulta SQL\n Carta carta = new Carta(palo, valor);\n // Agrego la carta a la mano\n mano.agregarCarta(carta);\n // Agrego jugadores al contenedor de jugadores controlando si hay duplicados\n if (!listaJugadores.contains(nombre) || listaJugadores.isEmpty()) {\n Jugador jugador = new Jugador(nombre);\n listaJugadores.add(jugador);\n }\n // Cuando hay una nueva mano, la añado al contenedor resultados y creo una nueva Mano\n if (numMano != registros.getInt(\"MANOS.id_mano\") || registros.isLast()) {\n numMano = registros.getInt(\"MANOS.id_mano\");\n mano.setPropietario(nombre);\n resultado.add(mano);\n mano = new Mano();\n }\n // Cuando hay una nueva partida, guardo un objeto Partida en el contenedor de partidas\n if (numPartida != registros.getInt(\"PARTIDAS.id_partida\") || registros.isLast()) {\n numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n Partida partida = new Partida(numPartida, listaJugadores, resultado);\n listaPartidas.agregarPartida(partida);\n // Reinicio los buffers de datos\n listaJugadores = new LinkedList<Jugador>();\n resultado = new LinkedList<Mano>();\n }\n }\n }\n } finally {\n closeConexion();\n }\n return listaPartidas;\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 }", "@Override\n public Collection<resumenSemestre> resumenSemestre(int idCurso, int mesApertura, int mesCierre) throws Exception {\n Collection<resumenSemestre> retValue = new ArrayList();\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"select ma.nombremateria, p.idcuestionario as test, \"\n + \"round(avg(p.puntaje),2) as promedio, cue.fechainicio, MONTH(cue.fechacierre) as mes \"\n + \"from puntuaciones p, cuestionario cue, curso cu, materia ma \"\n + \"where cu.idcurso = ma.idcurso and ma.idmateria = cue.idmateria \"\n + \"and cue.idcuestionario = p.idcuestionario and cu.idcurso = ? \"\n + \"and MONTH(cue.fechacierre) >= ? AND MONTH(cue.fechacierre) <= ? and YEAR(cue.fechacierre) = YEAR(NOW())\"\n + \"GROUP by ma.nombremateria, MONTH(cue.fechacierre) ORDER BY ma.nombremateria\");\n pstmt.setInt(1, idCurso );\n pstmt.setInt(2, mesApertura);\n pstmt.setInt(3, mesCierre);\n rs = pstmt.executeQuery();\n while (rs.next()) { \n retValue.add(new resumenSemestre(rs.getString(\"nombremateria\"), rs.getInt(\"test\"), rs.getInt(\"promedio\"), rs.getInt(\"mes\")));\n }\n return retValue;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n\n\n }", "public ArrayList<ArrayList<Object>> getRowSet()\r\n {\r\n ArrayList<ArrayList<Object>> list = new ArrayList<>();\r\n try {\r\n int c = 0; \r\n while(c < rows)\r\n {\r\n rs.next();\r\n System.out.println(c);\r\n ArrayList<Object> obj = new ArrayList<>();\r\n int col = rs.getMetaData().getColumnCount();\r\n for(int i = 1; i < col; i++)\r\n {\r\n obj.add(rs.getObject(i));\r\n }\r\n list.add(obj);\r\n c++;\r\n }\r\n return list;\r\n \r\n } catch (SQLException ex) {\r\n return list;\r\n }\r\n }", "protected Opportunities[] fetchMultiResults(ResultSet rs) throws SQLException\r\n\t{\r\n\t\tCollection resultList = new ArrayList();\r\n\t\twhile (rs.next()) {\r\n\t\t\tOpportunities dto = new Opportunities();\r\n\t\t\tpopulateDto( dto, rs);\r\n\t\t\tresultList.add( dto );\r\n\t\t}\r\n\t\t\r\n\t\tOpportunities ret[] = new Opportunities[ resultList.size() ];\r\n\t\tresultList.toArray( ret );\r\n\t\treturn ret;\r\n\t}", "public List<Meta> obtTotalVentaXLineaProductos(Integer numPeri, Integer idPers) throws SQLException, Exception{\n \n CallableStatement statement = null;\n ResultSet rsConsulta = null;\n Connection cnConexion = null;\n List<Meta> lstResult = new ArrayList<>();\n \n try {\n \n cnConexion = ConexionBD.obtConexion();\n String strFiltro = \"\";\n \n if(idPers > 0 ){\n strFiltro += \" AND S1.ID_PERS = \" + idPers;\n }\n \n String sql = \"SELECT \" +\n \" S1.ID_PERS\\n\" +\n \" ,USU.COD_USUARIO\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END AS COD_STIPOPROD\\n\" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END AS DES_STIPOPROD\\n\" +\n \" ,SUM((T1.NUM_VALOR * T1.NUM_CANTIDAD) - (NVL(T1.NUM_MTODSCTO,0) * T1.NUM_CANTIDAD)) AS NUM_TOTALVENTA \\n\" +\n \" FROM SIC3DOCUPROD T1\\n\" +\n \" JOIN SIC1DOCU S1 ON T1.ID_DOCU = S1.ID_DOCU \\n\" +\n \" JOIN SIC1PROD T3 ON T3.ID_PROD = T1.ID_PROD \\n\" +\n \" JOIN VI_SICSTIPOPROD V2 ON V2.ID_STIPOPROD = T3.ID_STIPOPROD\\n\" +\n \" JOIN SIC1STIPODOCU T6 ON T6.ID_STIPODOCU = S1.ID_STIPODOCU\\n\" +\n \" JOIN SIC3DOCUESTA RELESTA ON RELESTA.ID_DOCU = S1.ID_DOCU\\n\" +\n \" AND TO_CHAR(RELESTA.FEC_HASTA,'DD/MM/YYYY') = '31/12/2400' \\n\" +\n \" JOIN VI_SICESTA ESTA ON ESTA.ID_ESTA = RELESTA.ID_ESTADOCU\\n\" +\n \" AND ((ESTA.COD_ESTA = 'VI_SICESTAFINALIZADO' AND T6.COD_STIPODOCU IN ('VI_SICFACTURA','VI_SICBOLETA','VI_SICSINDOCU')))\\n\" +\n \" JOIN SIC1USUARIO USU ON USU.ID_USUARIO = S1.ID_PERS\\n\" +\n \" WHERE S1.ID_SCLASEEVEN = 2 \" + \n \" AND TO_NUMBER(TO_CHAR(S1.FEC_DESDE,'YYYYMM')) = \" + numPeri + strFiltro +\n \" GROUP BY CASE WHEN COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VI_SICVINILCORTE' ELSE 'VI_SICPAPELTAPIZ' END \" +\n \" ,CASE WHEN V2.COD_STIPOPROD = 'VI_SICVINILCORTE' THEN 'VINIL CORTE' ELSE 'PAPEL TAPIZ' END \" +\n \" ,USU.COD_USUARIO \" +\n \" ,S1.ID_PERS\";\n \n \n \n statement = cnConexion.prepareCall( sql,\n ResultSet.TYPE_SCROLL_SENSITIVE,\n ResultSet.CONCUR_READ_ONLY,\n ResultSet.CLOSE_CURSORS_AT_COMMIT ); \n \n rsConsulta = statement.executeQuery(); \n \n while(rsConsulta.next()){\n\n Meta obj = new Meta();\n \n String codStipoprod = rsConsulta.getString(\"COD_STIPOPROD\");\n BigDecimal numTotalVentasMes = rsConsulta.getBigDecimal(\"NUM_TOTALVENTA\");\n \n BigDecimal numPorcAlcanzado;\n if(codStipoprod.equals(\"VI_SICVINILCORTE\")){\n obj.setDesMeta(\"% Logrado Meta(Vinil)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAVINIL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAVINIL));\n }\n else{\n obj.setDesMeta(\"% Logrado Meta(Papel)\");\n numPorcAlcanzado = new BigDecimal((numTotalVentasMes.doubleValue()/Constantes.CONS_METAMESTOTALVENTAPAPEL) * 100).setScale(2,BigDecimal.ROUND_HALF_UP);\n obj.setNumTotalventameta(new BigDecimal(Constantes.CONS_METAMESTOTALVENTAPAPEL));\n }\n \n Sic1pers objPers = new Sic1pers();\n objPers.setIdPers(rsConsulta.getBigDecimal(\"ID_PERS\"));\n objPers.setDesPers(rsConsulta.getString(\"COD_USUARIO\"));\n \n obj.setCodStipoprod(codStipoprod);\n obj.setDesStipoprod(rsConsulta.getString(\"DES_STIPOPROD\"));\n obj.setNumTotalventalogrado(numTotalVentasMes);\n obj.setNumPorclogrado(numPorcAlcanzado);\n obj.setSic1pers(objPers);\n \n lstResult.add(obj); \n }\n }catch(Exception ex){\n throw new Exception(ex.getMessage());\n }finally{\n if(statement != null)\n statement.close();\n if(rsConsulta != null)\n rsConsulta.close();\n if(cnConexion != null)\n cnConexion.close();\n }\n \n return lstResult;\n }", "public List<Multa> getListaMultaPorCliente(String id_cliente) throws SQLException {\n // Prepara conexão p/ receber o comando SQL\n String sql = \"SELECT multa.id_multa, multa.id_cliente, multa.descricao, multa.valor \"\n + \"FROM multa \"\n + \"INNER JOIN cliente \"\n + \"ON multa.id_cliente = cliente.id_cliente \"\n + \"WHERE multa.id_cliente = ?;\";\n PreparedStatement stmt = this.conexao.prepareStatement(sql);\n stmt.setString(1, id_cliente);\n\n // Recebe o resultado da consulta SQL\n ResultSet rs = stmt.executeQuery();\n\n List<Multa> lista = new ArrayList<>();\n\n // Enquanto existir registros, pega os valores do ReultSet e vai adicionando na lista\n while (rs.next()) {\n // A cada loop, é instanciado um novo objeto, p/ servir de ponte no envio de registros p/ a lista\n Multa m = new Multa();\n\n // \"c\" -> Registro novo - .setNome recebe o campo do banco de String \"nome\" \n m.setId_multa(Integer.valueOf(rs.getString(\"multa.id_multa\")));\n m.setId_cliente(Integer.valueOf(rs.getString(\"multa.id_cliente\")));\n m.setDescricao(rs.getString(\"multa.descricao\"));\n m.setValor(Float.valueOf(rs.getString(\"multa.valor\")));\n\n // Adiciona o registro na lista\n lista.add(m);\n }\n\n // Fecha a conexão com o BD\n rs.close();\n stmt.close();\n\n // Retorna a lista de registros, gerados pela consulta\n return lista;\n }", "public static List<Parte> partesTFI(BigDecimal idT, String fechaIni, String fechaFin){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesTFI (?,?,?,?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n cs.setBigDecimal(1, idT);\n cs.setString(2, fechaIni);\n cs.setString(3, fechaFin);\n cs.registerOutParameter(4, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(4);\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<Film> getFilms(int numberOfFilms);", "protected PaypalIpn[] fetchMultiResults(ResultSet rs) throws SQLException\r\n\t{\r\n\t\tCollection resultList = new ArrayList();\r\n\t\twhile (rs.next()) {\r\n\t\t\tPaypalIpn dto = new PaypalIpn();\r\n\t\t\tpopulateDto( dto, rs);\r\n\t\t\tresultList.add( dto );\r\n\t\t}\r\n\t\t\r\n\t\tPaypalIpn ret[] = new PaypalIpn[ resultList.size() ];\r\n\t\tresultList.toArray( ret );\r\n\t\treturn ret;\r\n\t}", "public Collection<FlujoDetalleDTO> cargarTodos(int codigoFlujo) {\n/* 138 */ Collection<FlujoDetalleDTO> resultados = new ArrayList<FlujoDetalleDTO>();\n/* */ try {\n/* 140 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" order by t.secuencia\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 178 */ boolean rtaDB = this.dat.parseSql(s);\n/* 179 */ if (!rtaDB) {\n/* 180 */ return resultados;\n/* */ }\n/* 182 */ this.rs = this.dat.getResultSet();\n/* 183 */ while (this.rs.next()) {\n/* 184 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 187 */ catch (Exception e) {\n/* 188 */ e.printStackTrace();\n/* 189 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarTodos \", e);\n/* */ } \n/* 191 */ return resultados;\n/* */ }", "public ArrayList<RowsCards> selectAll(){\n String sql = \"SELECT Carta FROM Cardestates\";\n ArrayList<RowsCards> Cartas_enteras = new ArrayList<>();\n RowsCards row ;\n row = new RowsCards();\n\n ArrayList<String> cartas = new ArrayList<>();\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)){\n // loop through the result set\n\n int iterador = 1;\n while (rs.next()) {\n\n cartas.add(rs.getString(\"Carta\"));\n switch (iterador)\n {\n case 1:\n row.setC1(rs.getString(\"Carta\"));\n iterador++;\n // System.out.println(rs.getString(\"Carta\"));\n break;\n case 2:\n row.setC2(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 3:\n row.setC3(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 4:\n row.setC4(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 5:\n row.setC5(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 6:\n row.setC6(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 7:\n row.setC7(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 8:\n row.setC8(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 9:\n row.setC9(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 10:\n row.setC10(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 11:\n row.setC11(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 12:\n row.setC12(rs.getString(\"Carta\"));\n iterador++;\n break;\n case 13:\n\n row.setC13(rs.getString(\"Carta\"));\n iterador = 1;\n Cartas_enteras.add(row);\n row = new RowsCards();\n break;\n }\n }\n\n } catch (SQLException | ClassNotFoundException e) {\n System.out.println(e.getMessage());\n }\n Cartas_enteras.add(row);\n\n return Cartas_enteras;\n }", "public void getAllCursosAvanzado() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT id_curso, nombre_curso, familia.nombre_familia as familia, id_profesor FROM curso \"\n + \"INNER JOIN familia ON curso.id_familia = familia.id_familia;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n \n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n String familia = rs.getString(\"familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n \n System.out.format(\"%d,%s,%s,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public ArrayList<Vector<Object>> recuperaTablaFacturas(String filtro) {\r\n\t\tArrayList<Vector<Object>> tableData = null;\r\n\t\tArrayList<Factura> lista = recuperaFacturaParaTabla(filtro);\r\n\t\ttableData = new ArrayList<>();\r\n\t\tfor (Factura factura : lista) {\r\n\t\t\tVector<Object> filaData = new Vector<>();\r\n\t\t\tfilaData.add(factura);\r\n\t\t\tfilaData.add(factura.getFecha());\r\n\t\t\tfilaData.add(factura.getCliente().toString());\r\n\t\t\tfilaData.add(factura.getImpTotal());\r\n\t\t\tfilaData.add(factura.isCobrada());\r\n\t\t\ttableData.add(filaData);\r\n\t\t}\r\n\t\treturn tableData;\r\n\t}", "public List<TblRetur>getAllDataRetur();", "private RecordSet getRecordSet(String arg[]){\n RecordSet datos = new RecordSet();\n datos.addColumn(\"CODIGO\");\n\t\tdatos.addColumn(\"VALOR\"); \n\n for(int j=0;j<arg.length;j++) { \n datos.addRow(new Object[] { arg[j], arg[j] }); \n }\n return datos;\n }", "public ArrayList<Factura> recuperaFacturaCompletaPorFiltro(String filtro) {\r\n\t\tString sql = \"\";\r\n\t\tsql += \"SELECT * FROM facturas WHERE \";\r\n\t\tsql += filtro;\r\n\t\tsql += \" ORDER BY facturas.numero\";\r\n\t\tSystem.out.println(sql);\r\n\t\tArrayList<Factura> lista = new ArrayList<>();\r\n\t\tConnection c = new Conexion().getConection();\r\n\t\tif (c != null) {\r\n\t\t\ttry {\r\n\t\t\t\t// Crea un ESTAMENTO (comando de ejecucion de un sql)\r\n\t\t\t\tStatement comando = c.createStatement();\r\n\t\t\t\tResultSet rs = comando.executeQuery(sql);\r\n\t\t\t\twhile (rs.next() == true) {\r\n\t\t\t\t\tint id = rs.getInt(\"id\");\r\n\t\t\t\t\tint clienteId = rs.getInt(\"clienteId\");\r\n\t\t\t\t\tString nombreCliente = rs.getString(\"nombreCliente\");\r\n\t\t\t\t\tint numero = rs.getInt(\"numero\");\r\n\t\t\t\t\tDate fecha = rs.getDate(\"fecha\");\r\n\t\t\t\t\tdouble porcDescuento = rs.getDouble(\"porcDescuento\");\r\n\t\t\t\t\tdouble porcRecargoEquivalencia = rs.getDouble(\"porcRecargoEquivalencia\");\r\n\t\t\t\t\tdouble impTotal = rs.getDouble(\"impTotal\");\r\n\t\t\t\t\tdouble impRecargo = rs.getDouble(\"impRecargo\");\r\n\t\t\t\t\tdouble impIva = rs.getDouble(\"impIva\");\r\n\t\t\t\t\tString dirCorreo = rs.getString(\"dirCorreo\");\r\n\t\t\t\t\tString dirFactura = rs.getString(\"dirFactura\");\r\n\t\t\t\t\tString dirEnvio = rs.getString(\"dirEnvio\");\r\n\t\t\t\t\tboolean cobrada = rs.getBoolean(\"cobrada\");\r\n\t\t\t\t\tArrayList<FacturaDetalle> detalles = new FacturasDetallesBDD().recuperaPorFacturaId(id);\r\n\t\t\t\t\tlista.add(new Factura(id, clienteId, nombreCliente, numero, fecha, porcDescuento, porcRecargoEquivalencia, impTotal, impRecargo, impIva, dirCorreo, dirFactura, dirEnvio, cobrada, detalles));\t\t\r\n\t\t\t\t}\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\t\ttry {\r\n\t\t\tc.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "public List<SpasaCRN> obtenerSpasaFiltros() {\n\n if (conectado) {\n try {\n String bool = \"false\";\n List<SpasaCRN> filtrosCRNs = new ArrayList();\n\n String Query = \"SELECT * FROM `spasa_filtros` WHERE anio = YEAR(NOW()) AND ciclo = CURRENT_CICLO() ;\";\n Logy.mi(\"Query: \" + Query);\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n while (resultSet.next()) {\n\n SpasaCRN crn = new SpasaCRN();\n SpasaMateria mat = new SpasaMateria();\n crn.setCodigoProf(resultSet.getString(\"usuario\")); //modificado ahora que se cambio in a String\n crn.setCrnCpr(resultSet.getString(\"crn\"));\n String mc = resultSet.getString(\"materia_cod\");\n if (mc != null && !mc.isEmpty() && !mc.equals(\"null\")) {\n crn.setMateriaRuta(mc);\n mat.setMateriaRuta(mc);\n }\n String m = resultSet.getString(\"materia_nom\");\n if (m != null && !m.isEmpty() && !m.equals(\"null\")) {\n mat.setNombreMat(m);\n }\n String d = resultSet.getString(\"departamento_nom\");\n if (d != null && !d.isEmpty() && !d.equals(\"null\")) {\n mat.setNombreDepto(d);\n }\n String dia = resultSet.getString(\"dia\");\n if (dia != null && !dia.isEmpty() && !dia.equals(\"null\")) {\n crn.setDiaHr(dia);\n }\n String h = resultSet.getString(\"hora\");\n if (h != null && !h.isEmpty() && !h.equals(\"null\")) {\n crn.setHiniHr(h);\n }\n crn.setMateria(mat);\n filtrosCRNs.add(crn);\n }\n\n return filtrosCRNs;\n\n } catch (SQLException ex) {\n Logy.me(\"No se pudo consultar tabla spasa_filtros : \" + ex.getMessage());\n return null;\n }\n } else {\n Logy.me(\"No se ha establecido previamente una conexion a la DB\");\n return null;\n }\n }", "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: */ }", "private Artista loadNext(ResultSet resultSet)\r\n\t\t\tthrows SQLException {\n\t\tint i = 1;\r\n\t\tLong codArtista = resultSet.getLong(i++);\t \r\n\t\tString nomeArtista = resultSet.getString(i++);\r\n\r\n\t\t// Rellena el objeto\r\n\t\tArtista a = new Artista();\r\n\t\ta.setCodArtista(codArtista);\r\n\t\ta.setNomeArtista(nomeArtista);\r\n\t\treturn a;\r\n\t}", "private<T> void addManyResults(T... results)\n {\n int i =0;\n for(T result : results)\n {\n this.add(\"morgen-main-result\"+i, new LazyDynamicPrimitive<>(result));\n i++;\n }\n\n results = null; // Prevents Heap pollution\n }", "private void MontarTabela(String where) {\n \n int linha = 0;\n int coluna = 0;\n \n String offset = String.valueOf(getPaginacao());\n \n while(linha < 10){\n while(coluna < 7){\n tbConFin.getModel().setValueAt(\"\", linha, coluna);\n coluna++;\n }\n linha++;\n coluna = 0;\n }\n \n linha = 0;\n \n String rd_id\n ,rd_codico\n ,rd_nome\n ,rd_receita_despesa\n ,rd_grupo\n ,rd_fixa\n ,rd_ativo;\n \n \n \n try{\n ResultSet rsConFin = cc.stm.executeQuery(\"select * from v_receitadespesa \"+where+\" order by rd_codico limit 10 offset \"+offset);\n \n while ( rsConFin.next() ) {\n rd_id = rsConFin.getString(\"RD_ID\");\n rd_codico = rsConFin.getString(\"rd_codico\");\n rd_nome = rsConFin.getString(\"rd_nome\");\n rd_receita_despesa = getRecDesp(rsConFin.getString(\"rd_receita_despesa\"));\n rd_grupo = getSimNao(rsConFin.getString(\"rd_grupo\"));\n rd_fixa = getSimNao(rsConFin.getString(\"rd_fixa\"));\n rd_ativo = getSimNao(rsConFin.getString(\"rd_ativo\"));\n \n tbConFin.getModel().setValueAt(rd_id, linha, 0);\n tbConFin.getModel().setValueAt(rd_codico, linha, 1);\n tbConFin.getModel().setValueAt(rd_nome, linha, 2);\n tbConFin.getModel().setValueAt(rd_receita_despesa, linha, 3);\n tbConFin.getModel().setValueAt(rd_grupo, linha, 4);\n tbConFin.getModel().setValueAt(rd_fixa, linha, 5);\n tbConFin.getModel().setValueAt(rd_ativo, linha, 6);\n \n linha++;\n }\n \n \n if(linha <= 10){\n setMensagem(\"A Busca retornou \"+linha+\" registros!\");\n }\n \n if(linha < 10){\n setFimConsulta(true);\n }else{\n setFimConsulta(false);\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(this, \"Erro ao Carregar informações de contas financeiras!\\n\"+e.getMessage());\n }\n \n }", "public static void getProduto(){\r\n try {\r\n PreparedStatement stmn = connection.prepareStatement(\"select id_produto, codigo, produto.descricao pd,preco, grupo.descricao gd from produto inner join grupo on grupo.id_grupo = produto.idgrupo order by codigo\");\r\n ResultSet result = stmn.executeQuery();\r\n\r\n System.out.println(\"id|codigo|descricao|preco|grupo\");\r\n while (result.next()){\r\n long id_produto = result.getLong(\"id_produto\");\r\n String codigo = result.getString(\"codigo\");\r\n String pd = result.getString(\"pd\");\r\n String preco = result.getString(\"preco\");\r\n String gd = result.getString(\"gd\");\r\n\r\n\r\n\r\n System.out.println(id_produto+\"\\t\"+codigo+\"\\t\"+pd+\"\\t\"+preco+\"\\t\"+gd);\r\n }\r\n\r\n }catch (Exception throwables){\r\n throwables.printStackTrace();\r\n }\r\n\r\n }", "public static String[][] leerPrestados() {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][11];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n //leolos registros y los guardo cada uno en un renglon de la matriz\n System.out.println(\"ResultSet: \" + result.getString(1));\n \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }", "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 }", "@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\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 void MostrarFacturas() {// METODO MOSTRAR FACTURAS\n conexionBD.getConnection();\n\n try {\n String SQL = \"SELECT * FROM facturacabecera fc, facturadetalle fd WHERE \"\n + \"fc.idFacturaCabecera = fd.FacturaCabecera_idFacturaCabecera\";\n Statement stmt = conexionBD.con.createStatement();\n ResultSet rs = stmt.executeQuery(SQL);\n\n while (rs.next()) {\n System.out.println(rs.getInt(\"idFacturaCabecera\") + \"|\" + rs.getDate(\"fecha\") + \"|\"\n + rs.getFloat(\"subtotal\") + \"|\" + rs.getFloat(\"iva\") + \"|\" + rs.getFloat(\"total\") + \"|\"\n + rs.getString(\"estado\") + \"|\" + rs.getString(\"descripcion\"));\n }\n rs.close();\n stmt.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public Collection<FasciaOrariaBean> doRetrieveAll() throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria\";\n ArrayList<FasciaOrariaBean> collection = new ArrayList<>();\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n System.out.println(\"DoRetriveAll\" + statement);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n collection.add(bean);\n }\n return collection;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n return collection;\n }", "public ArrayList<rubro> obtenerTodoslosRubros() {\n ArrayList<rubro> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement pr = conn.prepareStatement(\"select id_rubro , nombre, descripcion, estado, ruta \\n\"\n + \" from rubros \");\n\n ResultSet rs = pr.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n boolean estado = rs.getBoolean(4);\n String ruta = rs.getString(5);\n\n rubro r = new rubro(id, nombre, estado, descripcion, ruta);\n\n lista.add(r);\n }\n\n rs.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n\n }", "public void fetch(){ \n for(int i = 0; i < this.queries.size(); i++){\n fetch(i);\n }\n }", "public ArrayList<oferta> listadoOfertaxComercio(int idComercio) {\n ArrayList<oferta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\"select o.nombre, o.cantidad, o.precio , c.id_comercio, id_oferta, descripcion, fecha, o.ruta, o.estado\\n\"\n + \"from Comercios c \\n\"\n + \"join Ofertas o on c.id_comercio = o.id_comercio \\n\"\n + \"where c.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cantidad = rs.getInt(2);\n Float precio = rs.getFloat(3);\n int id = rs.getInt(4);\n int ido = rs.getInt(5);\n String descripcion = rs.getString(6);\n String fecha = rs.getString(7);\n String ruta = rs.getString(8);\n boolean estado = rs.getBoolean(9);\n\n rubro rf = new rubro(0, \"\", true, \"\", \"\");\n comercio c = new comercio(\"\", \"\", \"\", id, true, \"\", \"\", rf, \"\");\n oferta o = new oferta(ido, nombreO, cantidad, precio, c, estado, descripcion, fecha,ruta );\n\n lista.add(o);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public ArrayList<CFicheFrais> fetchTravailsMois(String matricule, int mois) {\r\n if (bdd.connecter() == true) {\r\n ArrayList<CFicheFrais> liste = new ArrayList();\r\n ResultSet rs = bdd.executerRequeteQuery(\"SELECT * FROM `fiche_frais` ,`inclure`, `type_frais` WHERE fiche_frais.FF_MOIS_FICHE_FRAIS=\"+mois+\" AND fiche_frais.VIS_MATRICULE_VISITEUR=\"+matricule+\" AND fiche_frais.FF_ID_FICHE_FRAIS=inclure.FF_ID_FICHE_FRAIS AND inclure.TF_CODE_TYPE_FRAIS=type_frais.TF_CODE_TYPE_FRAIS ;\");\r\n try {\r\n while (rs.next()) {\r\n CFicheFrais FicheFrais = convertir_RS_FicheFrais(rs);\r\n liste.add(FicheFrais);\r\n }\r\n } catch (SQLException ex) {\r\n }\r\n bdd.deconnecter();\r\n \r\n \r\n return liste;\r\n } else {\r\n System.out.println(\"Connexion KO\");\r\n }\r\n return null;\r\n }", "public ResultSet fetchSelectAllParkLots() {\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tTo create connection to the DataBase\r\n\t\t\t*/\r\n\t\t\tnew DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tStore the table data in ResultSet rs and then return it\r\n\t\t\t*/\r\n\t\t\trs = stmt.executeQuery(SELECT_ALL_PARKLOT_QUERY);\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch(ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\tcloseDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn rs;\r\n\t}", "private Status batchGet(\n String table, String key, Set<String> fields,\n Map<String, ByteIterator> result) {\n try {\n List<Pair<byte[], byte[]>> batchKeys = new ArrayList<>();\n List<byte[]> values = new ArrayList<>();\n byte[] hashKey = key.getBytes();\n for (byte[] sortKey : sortKeys) {\n batchKeys.add(Pair.of(hashKey, sortKey));\n }\n client.batchGet(table, batchKeys, values);\n if (!values.isEmpty()) {\n for (byte[] value : values) {\n fromJson(value, fields, result);\n }\n }\n return Status.OK;\n } catch (Exception e) {\n logger.error(\"Error batch reading value from table[\" + table + \"] with key: \" + key, e);\n return Status.ERROR;\n }\n }", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }", "public ArrayList<Comobox> fontesRendimentos()\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n @SuppressWarnings(\"UnusedAssignment\")\n ResultSet rs = null;\n sql=\"select * FROM VER_FONTEPAGAMENTO\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n cs = conexao.getCon().prepareCall(sql);\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"REALID\"), rs.getString(\"FONTE\")));\n } \n }\n rs.close();\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter fontes rendimentos \"+ex.getMessage());\n }\n }\n return al;\n }", "private List<T> singleRowResult( final Rows<R, C> result ) {\n\n if (logger.isTraceEnabled()) logger.trace( \"Only a single row has columns. Parsing directly\" );\n\n for ( R key : result.getKeys() ) {\n final ColumnList<C> columnList = result.getRow( key ).getColumns();\n\n final int size = columnList.size();\n\n if ( size > 0 ) {\n\n final List<T> results = new ArrayList<>(size);\n\n for(Column<C> column: columnList){\n results.add(columnParser.parseColumn( column ));\n }\n\n return results;\n\n\n }\n }\n\n //we didn't have any results, just return nothing\n return Collections.<T>emptyList();\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> getProdPainel(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "public void getAllCursos() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT * FROM curso;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n int familia = rs.getInt(\"id_familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n System.out.format(\"%d,%s,%d,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public ArrayList<Fila> listarFilas() throws IOException{\n\t\treturn dao.listarFilas();\n\t}", "public List<Medicine> findAllMedicines(Integer startResult, Integer maxRows);", "private List<Budget> listResults(ResultSet rs) throws SQLException{\n List<Budget> found = new ArrayList<Budget>();\n while (rs.next()){\n Budget x = new Budget();\n x.setDescription(rs.getString(\"bud_description\"));\n x.setCategory(rs.getString(\"bud_category\"));\n x.setBudgetAmount(rs.getDouble(\"bud_budgeted_amount\"));\n x.setActualAmount(rs.getDouble(\"bud_actual_amount\"));\n x.setId(rs.getInt(\"bud_key_id\"));\n }\n return found;\n }", "public ArrayList < Dataclass > getData() {\n ArrayList < Dataclass > dataList = new ArrayList < Dataclass > ();\n Connection connection = getConnection();\n String query = \"SELECT * FROM `przychodnia` \";\n if (option == 1) query = \"SELECT * FROM `lekarz` \";\n if (option == 2) query = \"SELECT * FROM `wizyta` \";\n if (option == 3) query = \"SELECT * FROM `badanie` \";\n Statement st;\n ResultSet rs;\n\n try {\n st = connection.createStatement();\n rs = st.executeQuery(query);\n Dataclass dc;\n while (rs.next()) {\n if (option == 1) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Imię\"), rs.getString(\"Nazwisko\"), rs.getString(\"Specjalizacja\"), rs.getInt(\"ID_Przychodni\"));\n else if (option == 2) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getString(\"Opis Badania\"), rs.getString(\"Imię i nazwisko pacjenta\"), rs.getInt(\"ID_Lekarza\"));\n else if (option == 3) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getBlob(\"Załącznik\"));\n else dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Nazwa\"), rs.getString(\"Adres\"), rs.getString(\"Miasto\"));\n dataList.add(dc);\n }\n } catch (Exception e) {\n System.err.print(e);\n }\n return dataList;\n }", "public ArrayList<Result> getResults(String userID, int limit){\n \t\tString query = \"select * from results where user = '\" + userID + \"'limit \" + limit;\n \t\tResultSet rs = getResult(query);\n \t\tArrayList<Result> results = new ArrayList<Result>();\n \t\ttry {\n \t\t\trs.beforeFirst();\n \t\t\twhile(rs.next()){\n \t\t\t\tresults.add(new Result(rs.getString(\"quiz\"), rs.getString(\"user\"), Integer.parseInt(rs.getString(\"time\")), Integer.parseInt(rs.getString(\"questions\")), Integer.parseInt(rs.getString(\"correct\")), rs.getString(\"date\")));\n \t\t\t}\n \t\t} catch (SQLException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\treturn results;\n \t}", "public ArrayList<Fichier> getFichierAll() throws SQLException {\n\t\tString query = SQLQueries.GET_FICHIER_ALL_QUERY;\n\t\tResultSet rs = null;\n\t\tArrayList<Fichier> fichiers = new ArrayList<Fichier>();\n\t\ttry {\n\t\t\tconnection = Connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\trs = statement.executeQuery(query);\n\t\t\twhile (rs.next()) {\n\t\t\t\tFichier fichier = new Fichier();\n\t\t\t\tfichier.setNom_fichier(rs.getString(\"nom_fichier\"));\n\t\t\t\tfichier.setDate_fichier(rs.getDate(\"date_fichier\"));\n\t\t\t\tfichier.setCommentaire(rs.getString(\"commentaire\"));\n\t\t\t\tfichier.setId_matiere(rs.getInt(\"id_matiere\"));\n\t\t\t\tfichier.setFichier(rs.getBytes(\"fichier\"));\n\t\t\t\tfichiers.add(fichier);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (statement != null)\n\t\t\t\tstatement.close();\n\t\t\tif (rs != null)\n\t\t\t\trs.close();\n\t\t\tconnection.close();\n\t\t}\n\t\treturn fichiers;\n\t}", "void processMultiValue(int numDocs, int[][] outGroupIds);", "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 ArrayList<ArrayList<Object>> getJoinedIntermediate(List<Table> tables) {\n\t\tArrayList<ArrayList<Object>> rtn = new ArrayList<ArrayList<Object>>(); \n\n\t\ttry {\n\t\t\tfor(int iterator = 0; iterator < tables.size(); iterator++) {\n\t\t\t\tTable table = tables.get(iterator);\n\t\t\t\tif(rtn.isEmpty()) {\t\t\t\t\t\n\t\t\t\t\tArrayList<Tuple> tuples = (ArrayList<Tuple>) table.getTuples();\n\t\t\t\t\tfor(Tuple tuple : tuples) {\n\t\t\t\t\t\tArrayList<Object> objectTuple = new ArrayList<Object>();\n\t\t\t\t\t\t\n\t\t\t\t\t\tField fields[] = tuple.getClass().getDeclaredFields();\n\t\t\t\t\t\tfor(int i = 0; i < fields.length; i++) {\n\t\t\t\t\t\t\tField field = fields[i];\n\t\t\t\t\t\t\tfield.setAccessible(true);\n\t\t\t\t\t\t\tobjectTuple.add(field.get(tuple));\n\t\t\t\t\t\t\tfield.setAccessible(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\trtn.add(objectTuple);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tint originalTableSize = rtn.size();\n\t\t\t\t\tArrayList<Tuple> tuples = (ArrayList<Tuple>) table.getTuples();\n\t\t\t\t\t\n\t\t\t\t\t// Copy existing tuples for join\n\t\t\t\t\tfor(int j = 0; j < tuples.size() - 1; j++)\n\t\t\t\t\t\tfor(int i = 0; i < originalTableSize; i++)\n\t\t\t\t\t\t\trtn.add(new ArrayList<Object>(rtn.get(i)));\n\t\t\t\t\t\n\t\t\t\t\t// Join\n\t\t\t\t\tfor(int j = 0; j < tuples.size(); j++) {\n\t\t\t\t\t\tTuple tuple = tuples.get(j);\n\t\t\t\t\t\tField fields[] = tuple.getClass().getDeclaredFields();\n\t\t\t\t\t\tfor(int i = 0; i < fields.length; i++) {\n\t\t\t\t\t\t\tField field = fields[i];\n\t\t\t\t\t\t\tfor(int iter = 0; iter < originalTableSize; iter++) {\n\t\t\t\t\t\t\t\tfield.setAccessible(true);\n\t\t\t\t\t\t\t\trtn.get(j * originalTableSize + iter).add(field.get(tuple));\n\t\t\t\t\t\t\t\tfield.setAccessible(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (MalformedURLException e)\t{\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t\n\t\treturn rtn;\n\t}", "private List<Product> getProductListFromRs(ResultSet productRs) throws SQLException {\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella COMPOSIZIONE e lo inseriamo in una\n\t\t * struttura associativa in cui la chiave è un codice prodotto (univoco) e\n\t\t * e il valore è la lista dei materiali di cui il prodotto è composto.\n\t\t */\n\t\tStatement compositionStm = null;\n\t\tResultSet compositionRs = null;\n\t\tMap<Integer,List<String>> materialsMap = new HashMap<Integer,List<String>>();\n\t\ttry{\n\t\t\tcompositionStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM COMPOSIZIONE;\";\n\t\t\tcompositionRs = compositionStm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(compositionRs.next()){\n\t\t\t\tInteger codiceProdotto = compositionRs.getInt(\"CODICEPRODOTTO\");\n\t\t\t\tif(materialsMap.containsKey(codiceProdotto)){\n\t\t\t\t\tmaterialsMap.get(codiceProdotto).add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tArrayList<String> newMaterialList = new ArrayList<String>();\n\t\t\t\t\tnewMaterialList.add(compositionRs.getString(\"MATERIALE\"));\n\t\t\t\t\tmaterialsMap.put(compositionRs.getInt(\"CODICEPRODOTTO\"), newMaterialList);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcompositionStm.close(); // Chiude anche il ResultSet compositionRs\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Produciamo la lista dei prodotti.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\twhile(productRs.next()){\n\t\t\tProduct p = new Product();\n\t\t\tp.setCode(productRs.getInt(\"CODICE\")); //AUTOBOXING\n\t\t\tp.setName(productRs.getString(\"NOMEPRODOTTO\"));\n\t\t\tp.setLine(productRs.getString(\"LINEA\"));\n\t\t\tp.setType(productRs.getString(\"TIPO\"));\n\t\t\tp.setImages(productRs.getString(\"IMMAGINI\"));\n\t\t\tp.setAvailableUnits(productRs.getInt(\"UNITADISPONIBILI\"));\n\t\t\t/*\n\t\t\t * getInt() returns:\n\t\t\t * the column value; if the value is SQL NULL, the value returned is 0\n\t\t\t */\n\t\t\tp.setMinInventory(productRs.getInt(\"SCORTAMINIMA\")); // 0 di default\n\t\t\tp.setPrice(productRs.getBigDecimal(\"PREZZOVENDITA\"));\n\t\t\tp.setCost(productRs.getBigDecimal(\"PREZZOACQUISTO\"));\n\t\t\t/*\n\t\t\t * SQLite non ha un tipo esplicito per le date. Il metodo getTimeStamp()\n\t\t\t * non riesce ad interprestare la data correttamente. Si utilizza\n\t\t\t * il metodo getString() anche se ci� non rappresenta la migliore pratica.\n\t\t\t */\n\t\t\tp.setInsertDate(LocalDateTime.parse(productRs.getString(\"DATAINSERIMENTO\")));\n\t\t\tp.setDescription(productRs.getString(\"DESCRIZIONE\"));\n\t\t\tp.setDeleted(productRs.getBoolean(\"ELIMINATO\"));\n\t\t\t\n\t\t\t// LocalDateTime.parse(null) or LocalDateTime.parse(\"\") would throw an exception\n\t\t\tif(productRs.getString(\"DATAELIMINAZIONE\") != null && !productRs.getString(\"DATAELIMINAZIONE\").equals(\"\")) {\n\t\t\t\tp.setDeletionDate(LocalDateTime.parse(productRs.getString(\"DATAELIMINAZIONE\")));\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Preleviamo dalla struttura dati associativa la lista dei materiali\n\t\t\t * di fabbricazione per il corrente prodotto e aggiorniamo il campo\n\t\t\t * relativo del bean \"Product\".\n\t\t\t */\n\t\t\ttry{\n\t\t\t\tp.setMaterials(materialsMap.get(productRs.getInt(\"CODICE\")));\n\t\t\t}\n\t\t\tcatch(ClassCastException cce){\n\t\t\t\tSystem.out.println(\"Map issue: key not comparable.\\n\");\n\t\t\t\tSystem.out.println(cce.getClass().getName() + \": \" + cce.getMessage());\n\t\t\t}\n\t\t\tcatch(NullPointerException npe){\n\t\t\t\tSystem.out.println(\"Map issue: invalid Key.\\n\");\n\t\t\t\tSystem.out.println(npe.getClass().getName() + \": \" + npe.getMessage());\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t * Aggiungiamo il prodotto alla lista.\n\t\t\t */\n\t\t\tproductList.add(p);\n\t\t}\n\t\t\n\t\treturn productList;\n\t}", "public Collection cargarDeObjetivo(int codigoCiclo, int codigoPlan, int objetivo, int periodo, String estado) {\n/* 121 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 123 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion as Nombretipomedicion, Est.Descripcion as Nombreestado, Um.Descripcion as Nombre_Unidad_Medida, SUM(CASE WHEN ac.NUMERO IS NOT NULL THEN 1 ELSE 0 END) acciones from Cal_Plan_Metas m left join Am_Acciones Ac on( m.Codigo_Ciclo = Ac.Codigo_Ciclo and m.Codigo_Plan = Ac.Codigo_Plan and m.Codigo_Meta = Ac.Codigo_Meta and Ac.Asociado = 'P'), \\t\\t Sis_Multivalores Tm, \\t\\t Sis_Multivalores Est, \\t\\t Sis_Multivalores Um where m.Tipo_Medicion = Tm.Valor and Tm.Tabla = 'CAL_TIPO_MEDICION' and m.Estado = Est.Valor and Est.Tabla = 'CAL_ESTADO_META' and m.Unidad_Medida = Um.Valor and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META' and m.codigo_ciclo=\" + codigoCiclo + \" and m.codigo_plan=\" + codigoPlan + \" and m.codigo_objetivo=\" + objetivo;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 180 */ if (estado.length() > 0) {\n/* 181 */ s = s + \" and m.estado='A'\";\n/* */ }\n/* */ \n/* 184 */ if (periodo == 1) {\n/* 185 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 187 */ else if (periodo == 2) {\n/* 188 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 190 */ else if (periodo == 3) {\n/* 191 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 193 */ else if (periodo == 4) {\n/* 194 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 196 */ else if (periodo == 5) {\n/* 197 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 199 */ else if (periodo == 6) {\n/* 200 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 202 */ else if (periodo == 7) {\n/* 203 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 205 */ else if (periodo == 8) {\n/* 206 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 208 */ else if (periodo == 9) {\n/* 209 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 211 */ else if (periodo == 10) {\n/* 212 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 214 */ else if (periodo == 11) {\n/* 215 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 217 */ else if (periodo == 12) {\n/* 218 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 221 */ s = s + \" GROUP BY m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion, Est.Descripcion, Um.Descripcion order by m.descripcion\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 259 */ boolean rtaDB = this.dat.parseSql(s);\n/* 260 */ if (!rtaDB) {\n/* 261 */ return resultados;\n/* */ }\n/* */ \n/* 264 */ this.rs = this.dat.getResultSet();\n/* 265 */ while (this.rs.next()) {\n/* 266 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 269 */ catch (Exception e) {\n/* 270 */ e.printStackTrace();\n/* 271 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 273 */ return resultados;\n/* */ }", "Iterator<TabularData> dataIterator();", "public List<Matricula> findAll(){\n\t\tString sql = \"select mat_cur_id, mat_alu_id, mat_data, cur_desc, alu_nome, alu_rg, alu_cpf from matricula \"\n\t\t\t\t+ \"inner join curso on mat_cur_id = cur_id \"\n\t\t\t\t+ \"inner join aluno on mat_alu_id = alu_id \";\n\t\tPreparedStatement stmt;\n\t\tResultSet res;\n\t\tList<Matricula> matriculas = new ArrayList<Matricula>();\n\t\t\n\t\ttry {\n\t\t\tstmt = this.connection.prepareStatement(sql);\n\t\t\tres = stmt.executeQuery();\n\t\t\twhile(res.next()){\n\t\t\t\tAluno aluno = new Aluno();\n\t\t\t\tCurso curso = new Curso();\n\t\t\t\t\n\t\t\t\tcurso.setId(res.getInt(1));\n\t\t\t\taluno.setId(res.getInt(2));\n\t\t\t\t\n\t\t\t\tcurso.setDescricao(res.getString(4));\n\t\t\t\t\n\t\t\t\taluno.setNome(res.getString(5));\n\t\t\t\taluno.setRg(res.getString(6));\n\t\t\t\taluno.setCpf(res.getInt(7));\n\t\t\t\t\n\t\t\t\tMatricula matricula = new Matricula();\n\t\t\t\t\n\t\t\t\tmatricula.setAluno(aluno);\n\t\t\t\tmatricula.setCurso(curso);\n\t\t\t\tmatricula.setDtMatricula(res.getTimestamp(3));\n\t\t\t\t\n\t\t\t\tmatriculas.add(matricula);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tthis.endConnection();\n\t\t}\n\t\t\n\t\treturn matriculas;\n\t}", "public ArrayList<CFicheFrais> fetchFichesFrais(String matricule) {\r\n if (bdd.connecter() == true) {\r\n ArrayList<CFicheFrais> liste = new ArrayList();\r\n ResultSet rs = bdd.executerRequeteQuery(\"SELECT * FROM `fiche_frais` WHERE fiche_frais.VIS_MATRICULE_VISITEUR=\"+ matricule +\" ;\");\r\n //ResultSet rs = bdd.executerRequeteQuery(\"SELECT * FROM `fiche_frais` ,`inclure`, `type_frais` WHERE fiche_frais.VIS_MATRICULE_VISITEUR=\"+ matricule +\" AND fiche_frais.FF_ID_FICHE_FRAIS=inclure.FF_ID_FICHE_FRAIS AND inclure.TF_CODE_TYPE_FRAIS=type_frais.TF_CODE_TYPE_FRAIS ;\");\r\n try {\r\n while (rs.next()) {\r\n CFicheFrais FicheFrais = convertir_RS_FicheFrais(rs);\r\n liste.add(FicheFrais);\r\n }\r\n } catch (SQLException ex) {\r\n }\r\n bdd.deconnecter();\r\n \r\n \r\n return liste;\r\n } else {\r\n System.out.println(\"Connexion KO\");\r\n }\r\n return null;\r\n }", "public static void getArrayListResult(ResultSet res) {\r\n try {\r\n while (res.next()) {\r\n ArrayList<String> x = new ArrayList<>();\r\n for (int i = 1; i <= 4; i++) {\r\n x.add(res.getString(i));\r\n }\r\n waitlist.add(x);\r\n }\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public FilialResponse fetchAllFilialFilial(Request request);", "static void getResults2(String root) throws IOException {\n\t\tint k = 1;\n\t\twhile (k <= 1) {\n\t\t\tint j = 1;\n\t\t\tString line;\n\t\t\tString multi = \"\";\n\t\t\tSystem.out.println(\"M\" + k);\n\n\t\t\twhile (j <= 10) {\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(new File(root\n\t\t\t\t\t\t+ \"M1/M1.1/Testbeds-\" + j + \"/Generated/PSL//test/Precision/multi.txt\")));\n\n\t\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t\tmulti += line;\n\t\t\t\t\tSystem.out.print(line + \",\");\n\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\n\");\n\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t}", "void expand(List<R> results);", "private ArrayList<Parametro> getParametros(int pregunta){\n ArrayList<Parametro> arrayListParametros = new ArrayList<>();\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql =\"SELECT p FROM ParametroInterrogante pi \"\n + \"JOIN pi.interrogante i \"\n + \"JOIN pi.parametro p \"\n + \"WHERE p.estado='a' AND i.estado='a' \"\n + \"AND i.idinterrogante = :pregunta\";\n\n Query query = em.createQuery(jpql);\n query.setParameter(\"pregunta\", pregunta);\n List<Parametro> list = query.getResultList();\n for(Parametro p : list){\n arrayListParametros.add(p);\n }\n\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n return arrayListParametros;\n }", "public int[][] chunkValues(ArrayList<ArrayList<ArrayList<String>>> listOfFID){\n\t\tint[] values = new int[listOfFID.size()];\n\t\tint[][] chunkMatrix = new int[values.length][2];\n\t\tfor(int i = 0; i < values.length; i++){\n\t\t\tint[] chunkInfo = chunkSize(listOfFID.get(i), values.length);\n\t\t\tchunkMatrix[i] = chunkInfo;\t\t\t\n\t\t}\t\n\t\treturn chunkMatrix;\n\t}", "List<F> getChunks();", "@Parameters\n // Método public static que devuelve un elemento iterable de array de objetos\n public static Iterable<Object[]> getData() {\n return Arrays.asList(new Object[][] {\n // Indicamos todas las pruebas {a, b, esperado}\n { 3, 1, 4 }, { 2, 3, 5 }, { 3, 3, 6 } });\n }", "public GetProductoSrvRow[] getRows() {\n\t\tGetProductoSrvRow[] rows = new GetProductoSrvRow[select.getRowCount()];\n\t\tfor (int i = 0; i <= select.getRowCount() - 1; i++) {\n\t\t\trows[i] = new GetProductoSrvRow(select, i + 1);\n\t\t};\n\t\treturn rows;\n\t}", "private synchronized void addResultToMultiList() {\n\t addObjectToMultiList(resultArrayList);\r\n\t }", "public static ArrayList<DayData> getAllData(List<List<String>> records) {\r\n ArrayList<DayData> dayDataL = new ArrayList<>(50);\r\n for (int i = 1; i < 51; i++) {\r\n\r\n dayDataL.add(getStockByNumber(records, i));\r\n //System.out.println(\"Added \" + i);\r\n //System.out.println(getUsedMemory());\r\n }\r\n\r\n return dayDataL;\r\n }", "public Collection cargarMasivo(int codigoCiclo, String proceso, String subproceso, int periodo) {\n/* 287 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 289 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, u.Descripcion Nombre_Area, Um.Descripcion as Nombre_Unidad_Medida, to_char(m.Codigo_Objetivo,'9999999999') ||' - ' || o.Descripcion Nombre_Objetivo, to_char(m.Codigo_Meta,'9999999999') ||' - ' || m.Descripcion Nombre_Meta, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, l.Valor_Logro, case when l.Valor_Logro is not null then 'A' else 'N' end Existe from Cal_Planes p, Cal_Plan_Objetivos o, Cal_Plan_Metas m left join Cal_Logros l on( m.Codigo_Ciclo = l.Codigo_Ciclo and m.Codigo_Plan = l.Codigo_Plan and m.Codigo_Meta = l.Codigo_Meta and m.Codigo_Objetivo = l.Codigo_Objetivo and \" + periodo + \" = l.Periodo),\" + \" Unidades_Dependencia u,\" + \" Sis_Multivalores Um\" + \" where p.Ciclo = o.Codigo_Ciclo\" + \" and p.Codigo_Plan = o.Codigo_Plan\" + \" and o.Codigo_Ciclo = m.Codigo_Ciclo\" + \" and o.Codigo_Plan = m.Codigo_Plan\" + \" and o.Codigo_Objetivo = m.Codigo_Objetivo\" + \" and p.Codigo_Area = u.Codigo\" + \" and m.Unidad_Medida = Um.Valor\" + \" and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META'\" + \" and o.Proceso = '\" + proceso + \"'\" + \" and o.Subproceso = '\" + subproceso + \"'\" + \" and p.Ciclo = \" + codigoCiclo + \" and m.Estado = 'A'\" + \" and o.Estado = 'A'\" + \" and o.Tipo_Objetivo in ('G', 'M')\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 333 */ if (periodo == 1) {\n/* 334 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 336 */ else if (periodo == 2) {\n/* 337 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 339 */ else if (periodo == 3) {\n/* 340 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 342 */ else if (periodo == 4) {\n/* 343 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 345 */ else if (periodo == 5) {\n/* 346 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 348 */ else if (periodo == 6) {\n/* 349 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 351 */ else if (periodo == 7) {\n/* 352 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 354 */ else if (periodo == 8) {\n/* 355 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 357 */ else if (periodo == 9) {\n/* 358 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 360 */ else if (periodo == 10) {\n/* 361 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 363 */ else if (periodo == 11) {\n/* 364 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 366 */ else if (periodo == 12) {\n/* 367 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 370 */ s = s + \" order by m.Codigo_Ciclo, m.Codigo_Objetivo, m.Codigo_Meta, u.Descripcion\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 377 */ boolean rtaDB = this.dat.parseSql(s);\n/* 378 */ if (!rtaDB) {\n/* 379 */ return resultados;\n/* */ }\n/* */ \n/* 382 */ this.rs = this.dat.getResultSet();\n/* 383 */ while (this.rs.next()) {\n/* 384 */ CalMetasDTO reg = new CalMetasDTO();\n/* 385 */ reg.setCodigoCiclo(codigoCiclo);\n/* 386 */ reg.setCodigoPlan(this.rs.getInt(\"codigo_plan\"));\n/* 387 */ reg.setCodigoMeta(this.rs.getInt(\"codigo_meta\"));\n/* 388 */ reg.setCodigoObjetivo(this.rs.getInt(\"codigo_objetivo\"));\n/* 389 */ reg.setNombreArea(this.rs.getString(\"Nombre_Area\"));\n/* 390 */ reg.setNombreMeta(this.rs.getString(\"Nombre_meta\"));\n/* 391 */ reg.setNombreObjetivo(this.rs.getString(\"Nombre_Objetivo\"));\n/* 392 */ reg.setUnidadMedida(this.rs.getString(\"unidad_medida\"));\n/* 393 */ reg.setValorMinimo(this.rs.getDouble(\"valor_minimo\"));\n/* 394 */ reg.setValorMaximo(this.rs.getDouble(\"valor_maximo\"));\n/* 395 */ reg.setValorLogro(this.rs.getDouble(\"Valor_Logro\"));\n/* 396 */ reg.setNombreUnidadMedida(this.rs.getString(\"nombre_unidad_medida\"));\n/* 397 */ reg.setEstado(this.rs.getString(\"existe\"));\n/* 398 */ resultados.add(reg);\n/* */ }\n/* */ \n/* 401 */ } catch (Exception e) {\n/* 402 */ e.printStackTrace();\n/* 403 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 405 */ return resultados;\n/* */ }", "public void setValues(GenOutBean datos, int numFilas, int pagActual) throws java.sql.SQLException {\r\n\t\tclearRS();\r\n\t\tthis.elemVS = new java.util.Properties();\r\n\t\tthis.nextElem = 0;\r\n\t\tthis.cantidadColumnas = datos.getColumnCount();\r\n\t\tthis.nombreColumnas = new String[this.cantidadColumnas + 1];\r\n\t\tthis.tiposDatos = new String[this.cantidadColumnas];\r\n\t\t// Se copian los nombres de las columnas originales.\r\n\t\tfor (int i = 0; i < this.cantidadColumnas; i++){\r\n\t\t\tthis.nombreColumnas[i + 1] = datos.nombreColumnas[i + 1];\r\n\t\t\tthis.tiposDatos[i] = datos.getTiposDatos()[i];\r\n\t\t}\r\n\t\tint indiceInicial = pagActual * numFilas + 1;\r\n\t\t// Se copian los datos.\r\n\t\tint indice = numFilas * (pagActual + 1);\r\n\t\tif (indice > datos.size())\r\n\t\t\tnumFilas = datos.size() - (numFilas * pagActual);\r\n\t\tObject fila[];\r\n\t\tfor (int i = indiceInicial; i < indiceInicial + numFilas; i++) {\r\n\t\t\tfila = new Object[this.cantidadColumnas + 1];\r\n\t\t\tfor (int j = 0; j < this.cantidadColumnas; j++)\r\n\t\t\t\tfila[j + 1] = datos.getObject(i, j + 1);\r\n\t\t\tthis.addElem(fila);\r\n\t\t}\r\n\t\t//\tjdbcResultSet.close();\r\n\t\tthis.beforeFirst();\r\n\t}", "public static void parseResultDB(ResultSet rs){\n\n String data[] = {};\n for (Row row : rs){\n if(row['fid'] && row['pid']){\n while (row['qte'] != 0 || row['qte'])\n data[int(row['fid'])] += row ['pid'];\n row['pid']--;\n }\n }\n return data;\n }", "@Override\n\tpublic ArrayList<ClienteFisico> listar() throws SQLException {\n\t\t\n\t\tArrayList<ClienteFisico> listar = new ArrayList<ClienteFisico>();\n\t\t\n\t\t\n\t\tfor(ClienteFisico c : this.set){\n\t\t\t\n\t\t\tlistar.add(c);\n\t\t}\n\t\n\t\t\n\t\treturn listar;\n\t}", "public void buscarDatos() throws Exception {\r\n\t\ttry {\r\n\t\t\tString codigo_empresa = empresa.getCodigo_empresa();\r\n\t\t\tString codigo_sucursal = sucursal.getCodigo_sucursal();\r\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue()\r\n\t\t\t\t\t.toString();\r\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\r\n\r\n\t\t\tMap<String, Object> parameters = new HashMap();\r\n\t\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\t\tparameters.put(\"parameter\", parameter);\r\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\r\n\r\n\t\t\tgetServiceLocator().getHis_partoService().setLimit(\r\n\t\t\t\t\t\"limit 25 offset 0\");\r\n\r\n\t\t\tList<His_parto> lista_datos = getServiceLocator()\r\n\t\t\t\t\t.getHis_partoService().listar(parameters);\r\n\t\t\trowsResultado.getChildren().clear();\r\n\r\n\t\t\tfor (His_parto his_parto : lista_datos) {\r\n\t\t\t\trowsResultado.appendChild(crearFilas(his_parto, this));\r\n\t\t\t}\r\n\r\n\t\t\tgridResultado.setVisible(true);\r\n\t\t\tgridResultado.setMold(\"paging\");\r\n\t\t\tgridResultado.setPageSize(20);\r\n\r\n\t\t\tgridResultado.applyProperties();\r\n\t\t\tgridResultado.invalidate();\r\n\t\t\tgridResultado.setVisible(true);\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t\tMessagebox.show(e.getMessage(), \"Mensaje de Error !!\",\r\n\t\t\t\t\tMessagebox.OK, Messagebox.ERROR);\r\n\t\t}\r\n\t}", "public static ArrayList <FichajeOperarios> obtenerFichajeOperarios(Date fecha) throws SQLException{\n Connection conexion=null;\n Connection conexion2=null;\n ResultSet resultSet;\n PreparedStatement statement;\n ArrayList <FichajeOperarios> FichajeOperarios=new ArrayList();\n Conexion con=new Conexion();\n\n //java.util.Date fecha = new Date();\n \n //para saber la fecha actual\n Date fechaActual = new Date();\n DateFormat formatoFecha = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n //System.out.println(formatoFecha.format(fechaActual));\n \n try {\n\n conexion = con.connecta();\n\n\n statement=conexion.prepareStatement(\"select codigo,nombre,HORA_ENTRADA,centro from \"\n + \" (SELECT op.codigo,op.nombre,F2.FECHA AS FECHA_ENTRADA,F2.HORA AS HORA_ENTRADA,F2.FECHA+f2.HORA AS FICHA_ENTRADA,centro.DESCRIP as CENTRO,\"\n + \" (select top(1) f22.fecha \"\n + \" from e001_fichajes2 as f22 where f22.OPERARIO=f2.OPERARIO and f22.tipo='S' and f22.recno>f2.recno order by f22.recno) AS FECHA_SALIDA,\"\n + \" (select top(1) f22.hora \"\n + \" from e001_fichajes2 as f22 \"\n + \" where f22.OPERARIO=f2.OPERARIO and f22.tipo='S' and f22.recno>f2.recno \"\n + \" order by f22.recno) AS HORA_SALIDA,\"\n + \" (select top(1) f22.fecha \"\n + \" from e001_fichajes2 as f22 \"\n + \" where f22.OPERARIO=f2.OPERARIO and f22.tipo='S' and f22.recno>f2.recno \"\n + \" order by f22.recno)+\"\n + \" (select top(1) f22.hora \"\n + \" from e001_fichajes2 as f22 \"\n + \" where f22.OPERARIO=f2.OPERARIO and f22.tipo='S' and f22.recno>f2.recno \"\n + \" order by f22.recno) as FICHA_SALIDA \"\n + \" FROM E001_OPERARIO as op left join e001_fichajes2 as f2 on op.codigo=f2.OPERARIO and f2.tipo='E' JOIN E001_centrost as centro on f2.CENTROTRAB=centro.CODIGO \"\n + \" WHERE F2.FECHA='\"+formatoFecha.format(fecha)+\"' and f2.HORA=(select max(hora) from e001_fichajes2 as f22 where f2.operario=f22.operario and f22.tipo='e' and f22.FECHA=f2.FECHA)) as a\"\n + \" where FICHA_SALIDA is null \"\n + \" ORDER BY codigo\");\n \n resultSet = statement.executeQuery();\n while (resultSet.next()) {\n FichajeOperarios fiop=new FichajeOperarios(); \n fiop.setCodigo(resultSet.getString(\"CODIGO\"));\n fiop.setNombre(resultSet.getString(\"NOMBRE\"));\n fiop.setHora_Entrada(resultSet.getString(\"HORA_ENTRADA\"));\n //fiop.setHora_Salida(resultSet.getString(\"HORA_SALIDA\"));\n fiop.setCentro(resultSet.getString(\"CENTRO\"));\n FichajeOperarios.add(fiop);\n }\n \n } catch (SQLException ex) {\n System.out.println(ex);\n \n }\n return FichajeOperarios;\n \n \n }", "public String[][] obtenerConsultasBusqueda(String nombre){\n //VARIABLES PARA ALMACENAR LOS DATOS DE LA BASE DE DATOS\n String[][] datos = new String[obtenerRegistrosBusqueda(nombre)][5];\n int i = 0;\n //SE INTENTA HACE LA CONEXION Y OBTENER LOS RSULTDOS\n try {\n //METODOS DE CONEXION\n Connection connect = getConnection();\n PreparedStatement ps;\n ResultSet res;\n \n //QUERY PARA OBTENER LOS VALORES\n ps = connect.prepareStatement(\"SELECT nombre, apellidos, incentivo, descuentos, total FROM personal INNER JOIN nomina ON personal.id = nomina.id WHERE nombre = ?\");\n ps.setString(1, nombre);\n res = ps.executeQuery();\n \n while (res.next()) {\n //SE ALMACENANAN LOS DATOS DE LA BASE DE DATOS EN EL ARREGLO\n datos[i][0] = res.getString(\"nombre\");\n datos[i][1] = res.getString(\"apellidos\");\n datos[i][2] = res.getString(\"incentivo\");\n datos[i][3] = res.getString(\"descuentos\");\n datos[i][4] = res.getString(\"total\");\n i++; \n }\n //SE CIERRA LA CONEXION Y SE RETORNAN LOS DATOS OBTENIDOS\n connect.close();\n return datos;\n }\n //EN CASO DE ERROR SE MUESTRA EL MENSAJE \n catch (Exception e) {\n System.out.println(\"error en resultado: \"+e);\n JOptionPane.showMessageDialog(null, \"Hubo un error:\"+e);\n return datos;\n }\n }", "@Override\n\tpublic List<String[]> partecipazioneUtentiAiGruppi() throws DAOException{\n\t\t\n\t\tList<String[]> risultato = null;\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet resultSet = null;\n\t\tString[] stringa = null;\n\t\t\n\t\ttry {\n\t\t\trisultato = new ArrayList<String[]>();\n\t\t\tconnection = DataSource.getInstance().getConnection();\n\t\t\tstatement = connection.prepareStatement(\"SELECT DISTINCT COUNT (ISCRIZIONE_GRUPPO.ID_UTENTE)*100/ATTIVITA.NUMERO_PARTECIPANTI AS PARTECIPAZIONE, ISCRIZIONE_GRUPPO.ID_GRUPPO, GRUPPO.DESCRIZIONE FROM GRUPPO INNER JOIN ISCRIZIONE_GRUPPO ON ISCRIZIONE_GRUPPO.ID_GRUPPO = GRUPPO.ID INNER JOIN ATTIVITA ON GRUPPO.ID_ATTIVITA = ATTIVITA.ID GROUP BY (ISCRIZIONE_GRUPPO.ID_UTENTE, ISCRIZIONE_GRUPPO.ID_GRUPPO, GRUPPO.ID_ATTIVITA, ATTIVITA.NUMERO_PARTECIPANTI, GRUPPO.DESCRIZIONE) ORDER BY PARTECIPAZIONE DESC\");\n\t\t\tresultSet = statement.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tstringa = new String[4];\n\t\t\t\tDouble perc = BigDecimal.valueOf(resultSet.getDouble(1)).setScale(2, RoundingMode.HALF_UP).doubleValue();\n\t\t\t\tstringa[0] = String.valueOf(resultSet.getLong(2));\n\t\t\t\tstringa[1] = resultSet.getString(3);\n\t\t\t\tstringa[2] = String.valueOf(perc);\n\t\t\t\tstringa[3] = String.valueOf(100-perc);\n\t\t\t\trisultato.add(stringa);\n\t\t\t}\n\t\t} catch (SQLException | DAOException e) {\n\t\t\tthrow new DAOException(\"ERRORE partecipazioneUtentiAiGruppi utenteAdmin\" + e.getMessage(), e);\n\t\t} finally {\n\t\t\tDataSource.getInstance().close(resultSet);\n\t\t\tDataSource.getInstance().close(statement);\n\t\t\tDataSource.getInstance().close(connection);\n\t\t}\n\t\treturn risultato;\n\t}", "protected void exibirMedicos(){\n System.out.println(\"--- MEDICOS CADASTRADOS ----\");\r\n String comando = \"select * from medico order by id\";\r\n ResultSet rs = cb.buscaDados(comando);\r\n try{\r\n while(rs.next()){\r\n int id = rs.getInt(\"id\");\r\n String nome = rs.getString(\"nome\");\r\n System.out.println(\"[\"+id+\"] \"+nome);\r\n }\r\n }\r\n catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "public List<Integer> getMulligans(Predicate<GameResult> filter) {\n return results.stream()\n .filter(filter)\n .map(GameResult::getMulligans)\n .distinct()\n .sorted()\n .collect(Collectors.toList());\n }", "@Override\n\t\t\tpublic List<Map<String, Object>> handle(ResultSet rs) throws SQLException {\n\t\t\t\tList<Map<String, Object>> list = new ArrayList<Map<String, Object>>();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\tmap.put(\"job\", rs.getString(1));\n\t\t\t\t\tmap.put(\"avg\", rs.getDouble(2));\n\t\t\t\t\tlist.add(map);\n\t\t\t\t}\n\n\t\t\t\treturn list;\n\t\t\t}", "@Override\r\n\tpublic ArrayList<ArrayList<Value>> getResults(Value[] quad) throws IOException {\n\t\treturn null;\r\n\t}", "ArrayList<Bet> takeBets(ResultSet set) throws SQLException;", "public ArrayList<Object[]> obtenerOfertas(String usuario2) {\n\t\tArrayList<Object[]> resultado = new ArrayList<>();\n\t\ttry {\n\t\t\tPreparedStatement sentencia = \n\t\t\t\tconexion.prepareStatement(\"select * from ofertas \"\n\t\t\t\t\t\t+ \"where establec = ?\");\n\t\t\t\n\t\t\tsentencia.setString(1, usuario2);\n\t\t\tResultSet r = sentencia.executeQuery();\n\t\t\twhile(r.next()) {\n\t\t\t\tObject[] o = new Object[5];\n\t\t\t\to[0] = r.getInt(1);\n\t\t\t\to[1] = r.getDate(2);\n\t\t\t\to[2] = r.getDate(3);\n\t\t\t\to[3] = r.getString(4);\n\t\t\t\to[4] = r.getString(5);\n\t\t\t\tresultado.add(o);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "@Override\n\tpublic ArrayList<VOFactura> getAllFacturas() {\n\t\t\n\t\tDBConnection con = null;\n\t\tStatement stm = null;\n\t\tString sql = null;\n\t\tResultSet res = null;\n\t\t\n\t\tVOFactura factura;\n\t\tArrayList<VOFactura> listaFacturas = new ArrayList<VOFactura>();\n\t\t\n\t\t try {\n\t\t\tcon = new DBConnection(\"root\",\"walkirias84\");\n\t\t\tstm = con.getConnection().createStatement();\n\t\t\tsql = \"SELECT * FROM factura fac ORDER BY fac.facnumero\";\n\t\t\tres = stm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(res.next()) {\n\t\t\t\tfactura = new VOFactura();\n\t\t\t\tfactura.setId(res.getInt(1));\n\t\t\t\tfactura.setNumero(res.getInt(2));\n\t\t\t\tfactura.setIdCliente(res.getInt(3));\n\t\t\t\tCalendar fecha = Calendar.getInstance();\n\t\t\t\tfecha.setTimeInMillis(res.getDate(4).getTime());\n\t\t\t\tfactura.setFecha(fecha);\n\t\t\t\tfactura.setValorNeto(res.getBigDecimal(5));\n\t\t\t\tfactura.setValorIva(res.getBigDecimal(6));\n\t\t\t\tfactura.setValorTotal(res.getBigDecimal(7));\n\t\t\t\t\n\t\t\t\tlistaFacturas.add(factura);\n\t\t\t}\n\t\t\t\n\t\t\treturn listaFacturas;\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(e);\n\t\t} finally {\n\t if (res != null) try { res.close(); } catch (SQLException logOrIgnore) {}\n\t if (stm != null) try { stm.close(); } catch (SQLException logOrIgnore) {}\n\t if (con != null) try { con.getConnection().close(); } catch (SQLException logOrIgnore) {}\n\t }\n\t\t\n\t\treturn null;\n\t}", "@Override\r\n\tpublic ArrayList<Object> getAllStu_result() {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tArrayList<Object> list = new ArrayList<Object>(); // 考卷集合\r\n\t\ttry {\r\n\t\t\tconn = DBHelper.getConnection();\r\n\t\t\tString sql = \"select * from stu_result order by stu_r_id desc;\"; // SQL语句\r\n\t\t\tstmt = conn.prepareStatement(sql);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tStu_result stu_r = new Stu_result();\r\n\t\t\t\tstu_r.setStu_r_id(rs.getInt(\"stu_r_id\"));\r\n\t\t\t\tstu_r.setSid(rs.getInt(\"sid\"));\r\n\t\t\t\tstu_r.setKj_id(rs.getInt(\"kj_id\"));\r\n\t\t\t\tstu_r.setStu_dxt_r(rs.getString(\"stu_dxt_r\"));\r\n\t\t\t\tstu_r.setStu_dxt_c(rs.getString(\"stu_dxt_c\"));\r\n\t\t\t\tstu_r.setStu_dxts_r(rs.getString(\"stu_dxts_r\"));\r\n\t\t\t\tstu_r.setStu_dxts_c(rs.getString(\"stu_dxts_c\"));\r\n\t\t\t\tstu_r.setStu_pdt_r(rs.getString(\"stu_pdt_r\"));\r\n\t\t\t\tstu_r.setStu_pdt_c(rs.getString(\"stu_pdt_c\"));\r\n\t\t\t\tlist.add(stu_r);// 把一个考试试卷加入集合\r\n\t\t\t}\r\n\t\t\treturn list; // 返回集合。\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\t// 释放数据集对象\r\n\t\t\tif (rs != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t\trs = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// 释放语句对象\r\n\t\t\tif (stmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t\tstmt = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void buscarDatos()throws Exception{\n\t\ttry {\n\t\t\tString parameter = lbxParameter.getSelectedItem().getValue().toString();\n\t\t\tString value = tbxValue.getValue().toUpperCase().trim();\n\n\t\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\t\tparameters.put(\"parameter\", parameter);\n\t\t\tparameters.put(\"value\", \"%\" + value + \"%\");\n\n\t\t\tif (admision != null) {\n\t\t\t\tparameters.put(\"identificacion\",\n\t\t\t\t\t\tadmision.getNro_identificacion());\n\t\t\t}\n\t\t\t\n\t\t\tgetServiceLocator().getFicha_epidemiologia_nnService().setLimit(\"limit 25 offset 0\");\n\t\t\t\n\t\t\tList<Ficha_epidemiologia_n13> lista_datos = getServiceLocator()\n\t\t\t\t\t.getFicha_epidemiologia_nnService().listar(\n\t\t\t\t\t\t\tFicha_epidemiologia_n13.class, parameters);\n\t\t\trowsResultado.getChildren().clear();\n\t\t\t\n\t\t\tfor (Ficha_epidemiologia_n13 ficha_epidemiologia_n13 : lista_datos) {\n\t\t\t\trowsResultado.appendChild(crearFilas(ficha_epidemiologia_n13, this));\n\t\t\t}\n\t\t\t\n\t\t\tgridResultado.setVisible(true);\n\t\t\tgridResultado.setMold(\"paging\");\n\t\t\tgridResultado.setPageSize(20);\n\t\t\t\n\t\t\tgridResultado.applyProperties();\n\t\t\tgridResultado.invalidate();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tMensajesUtil.mensajeError(e, \"\", this);\n\t\t}\n\t}", "public void getRequest() {\n\t\tint rowNum = 0, colNum = 0; // row and column counters start at 0\n\t\ttry {\n\t\t\tStatement myStmtCount = Connect.getDbConnect().createStatement(); // creates a statement\n\t\t\tResultSet rs = myStmtCount // creates a resultSet\n\t\t\t\t\t// counts how many elements there are in table 'furniture' with the matching\n\t\t\t\t\t// 'type'\n\t\t\t\t\t.executeQuery(\"SELECT COUNT(*) FROM \" + furniture + \" WHERE Type = '\" + type + \"'\");\n\n\t\t\twhile (rs.next()) {\n\t\t\t\t// used to count the number of rows that elements fill\n\t\t\t\trowNum = rs.getInt(1); // keeps track of the last element that belongs in specific furniture and type\n\t\t\t}\n\n\t\t\trs = myStmtCount.executeQuery(\n\t\t\t\t\t\"SELECT COUNT(*) FROM information_schema.columns WHERE table_name = '\" + furniture + \"'\");\n\t\t\twhile (rs.next()) {\n\t\t\t\t// used to count the number of colums that a specific row has\n\t\t\t\tcolNum = rs.getInt(1); // keeps track of the last element that belongs in specific row of type\n\t\t\t\t\t\t\t\t\t\t// 'furniture'\n\t\t\t}\n\n\t\t\tmyStmtCount.close(); // close statement\n\t\t\trs.close(); // close resultset\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace(); // catch an exception\n\t\t}\n\n\t\tthis.foundRequest = new String[rowNum][colNum]; // initializes double array foundRequest\n\t\tString query = \"SELECT * FROM \" + furniture + \" WHERE Type = \" + \"'\" + type + \"'\";\n\t\ttry {\n\t\t\tStatement myStmntNames = Connect.getDbConnect().createStatement();\n\t\t\t// selecting all rows with matching desired type from desired furniture table\n\t\t\tconnection.setResults(myStmntNames.executeQuery(query));\n\t\t\tint counter = 0;\n\t\t\twhile (Connect.getResults().next()) {// while there is a next row of \"type\"\n\t\t\t\tfor (int j = 0; j < colNum; j++) { // goes through each column\n\t\t\t\t\tthis.foundRequest[counter][j] = Connect.getResults().getString(j + 1);\n\t\t\t\t}\n\t\t\t\tcounter++;\n\t\t\t}\n\n\t\t\tmyStmntNames.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (this.foundRequest.length == 0) {\n\t\t\tsetOrderIsPossible(false); // setOrder is not possible if length of foundRequest is 0\n\t\t\treturn;\n\t\t}\n\n\t\tString[] outputRow = new String[colNum - 4];// countBoolean(foundRequest)];\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\t// call to method findCombinations\n\t\t\tfindCombinations(2, foundRequest.length, outputRow.length, foundRequest, outputRow);\n\t\t\tif (this.bestCombination != null) {\n\t\t\t\t// once a combination is found, checks if there are extra parts to be used in\n\t\t\t\t// furniture piece\n\t\t\t\tcheckExtraParts(); // call to checkExtraParts to see if there are spare elements\n\t\t\t\treset(foundRequest); // removes from foundRequest, resets bestCombination, updates orderedIDs\n\t\t\t} else {\n\t\t\t\tsetOrderIsPossible(false);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tfor (String val : orderedIDs) {\n\t\t\tremoveFromInventory(val); // removes val from database\n\t\t}\n\n\t\tif (this.hasExtra > 0) { // amount must be greater than one to use an extra\n\t\t\tint length = 0; // will count how many extras there are\n\t\t\tfor (String val : orderedIDs) {\n\t\t\t\tif (val.contains(\"Extra\")) {\n\t\t\t\t\tlength++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tString[] newOrdered = new String[orderedIDs.length]; // new array, same length as orderedIDs\n\t\t\tSystem.arraycopy(orderedIDs, 0, newOrdered, 0, orderedIDs.length); // copy orderedIDs to newOrdered\n\n\t\t\tif (length == 0) {\n\t\t\t\torderedIDs = new String[orderedIDs.length];\n\t\t\t} else if (length > 0) {\n\t\t\t\torderedIDs = new String[orderedIDs.length - hasExtra];\n\t\t\t}\n\n\t\t\tint i = 0;\n\t\t\tfor (String val : newOrdered) {\n\t\t\t\tif (!val.contains(\"Extra\")) { // copying all ids that are not the extra pieces\n\t\t\t\t\torderedIDs[i++] = val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tOrderForm.createFile(this.orderedIDs, this.totalPrice);\n\t\tsetOrderIsPossible(true);\n\t}", "private CompletableFuture<Iterator<T>> batch() {\n return batch.thenCompose(iterator -> {\n if (iterator != null && !iterator.hasNext()) {\n batch = fetch(iterator.position());\n return batch.thenApply(Function.identity());\n }\n return CompletableFuture.completedFuture(iterator);\n });\n }", "public static ResultSet selectAll(){\n String sql = \"SELECT Codigo, Nombre, PrecioC, PrecioV, Stock FROM articulo\";\n ResultSet rs = null;\n try{\n Connection conn = connect();\n Statement stmt = conn.createStatement();\n rs = stmt.executeQuery(sql);\n }\n catch(SQLException e) {\n System.out.println(\"Error. No se han podido sacar los productos de la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n return rs;\n }" ]
[ "0.64105374", "0.57708794", "0.5592718", "0.55762714", "0.55456054", "0.5466513", "0.54103", "0.5396998", "0.5382206", "0.5319134", "0.5316988", "0.5309509", "0.5297974", "0.52914935", "0.52884877", "0.52786565", "0.5276082", "0.5262634", "0.52598196", "0.52441967", "0.52374977", "0.52279013", "0.5227553", "0.5196006", "0.5194658", "0.51897573", "0.5179387", "0.5163187", "0.5125932", "0.51255023", "0.5107075", "0.51021653", "0.5101911", "0.50993764", "0.50982106", "0.5090496", "0.50875753", "0.50864106", "0.50810456", "0.5079993", "0.50689065", "0.50584894", "0.50514257", "0.5029463", "0.50278234", "0.5026239", "0.50102115", "0.50074464", "0.50058883", "0.50048864", "0.5000443", "0.49958098", "0.49860236", "0.4980334", "0.49784273", "0.49777716", "0.49769476", "0.49758917", "0.4967851", "0.49667805", "0.4959848", "0.4957553", "0.49570048", "0.49279723", "0.49272466", "0.4926813", "0.49258423", "0.492441", "0.4922107", "0.49100864", "0.48988852", "0.4893374", "0.48874384", "0.48864043", "0.48778382", "0.48670888", "0.48649827", "0.48632577", "0.4858963", "0.48589343", "0.48588836", "0.4857435", "0.4856922", "0.4848502", "0.4847896", "0.4847227", "0.48464084", "0.4843674", "0.48435313", "0.4839965", "0.48392278", "0.48385036", "0.48370168", "0.48337808", "0.48315597", "0.4831239", "0.48266485", "0.48261884", "0.4825453", "0.48252636" ]
0.61564523
1
Se encarga de poblar un DTO con datos de un ResultSet especificado
protected void populateDto(ProductosPuntoVenta dto, ResultSet rs) throws SQLException { dto.setIdPuntoVenta(new Integer(rs.getInt(COLUMN_ID_PDV))); dto.setIdProducto(new Integer(rs.getInt(COLUMN_ID_PRODUCTO))); dto.setCantidad(rs.getInt(COLUMN_CANTIDAD)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void populateDto(Utente dto, ResultSet rs) throws SQLException\n\t{\n\t\tdto.setUteId( rs.getLong( COLUMN_UTE_ID ) );\n\t\tdto.setUteCognome( rs.getString( COLUMN_UTE_COGNOME ) );\n\t\tdto.setUteNome( rs.getString( COLUMN_UTE_NOME ) );\n\t\tdto.setUteEmail( rs.getString( COLUMN_UTE_EMAIL ) );\n\t\tdto.setUtePassword( rs.getString( COLUMN_UTE_PASSWORD ) );\n\t\tdto.setUteLastLogin( rs.getDate(COLUMN_UTE_LAST_LOGIN ) );\n\t\tdto.setUteCellulare( rs.getString( COLUMN_UTE_CELLULARE ) );\n\t\tdto.setUteSesso( rs.getString( COLUMN_UTE_SESSO ) );\n\t\tdto.setUteDataNascita( rs.getDate(COLUMN_UTE_DATA_NASCITA ) );\n\t\tdto.setUteTitolo( rs.getLong( COLUMN_UTE_TITOLO ) );\n\t\tdto.setFkPaesi( rs.getLong( COLUMN_FK_PAESI ) );\n\t\tdto.setUteCartaNumero( rs.getString( COLUMN_UTE_CARTA_NUMERO ) );\n\t\tdto.setUteCartaTitolare( rs.getString( COLUMN_UTE_CARTA_TITOLARE ) );\n\t\tdto.setUteCartaScadMese( rs.getString( COLUMN_UTE_CARTA_SCAD_MESE ) );\n\t\tdto.setUteCartaScadAnno( rs.getString( COLUMN_UTE_CARTA_SCAD_ANNO ) );\n\t\tdto.setUteCartaUsaPerLav( rs.getString( COLUMN_UTE_CARTA_USA_PER_LAV ) );\n\t\tdto.setUteCartaUsaPerPremio( rs.getString( COLUMN_UTE_CARTA_USA_PER_PREMIO ) );\n\t\tdto.setUteTipologia( rs.getLong( COLUMN_UTE_TIPOLOGIA ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setUteTipologiaNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteIndirizzo( rs.getString( COLUMN_UTE_INDIRIZZO ) );\n\t\tdto.setFkComune( rs.getLong( COLUMN_FK_COMUNE ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setFkComuneNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteAzienda( rs.getString( COLUMN_UTE_AZIENDA ) );\n\t\tdto.setFkComuneAzienda( rs.getLong( COLUMN_FK_COMUNE_AZIENDA ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setFkComuneAziendaNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteTelefonoAzienda( rs.getString( COLUMN_UTE_TELEFONO_AZIENDA ) );\n\t\tdto.setUtePivaAzienda( rs.getString( COLUMN_UTE_PIVA_AZIENDA ) );\n\t\tdto.setUteFotoProfiloPath( rs.getString( COLUMN_UTE_FOTO_PROFILO_PATH ) );\n\t\tdto.setUtePagamentiOnline( rs.getString( COLUMN_UTE_PAGAMENTI_ONLINE ) );\n\t\tdto.setUteQuandoPagare( rs.getString( COLUMN_UTE_QUANDO_PAGARE ) );\n\t\tdto.setUteFumatore( rs.getString( COLUMN_UTE_FUMATORE ) );\n\t\tdto.setUtenteStelle( rs.getString( COLUMN_UTENTE_STELLE ) );\n\t\tdto.setUteCamereOspitiDisabili( rs.getString( COLUMN_UTE_CAMERE_OSPITI_DISABILI ) );\n\t\tdto.setUteRistorante( rs.getString( COLUMN_UTE_RISTORANTE ) );\n\t\tdto.setUteConnessioneInternet( rs.getString( COLUMN_UTE_CONNESSIONE_INTERNET ) );\n\t\tdto.setUteCameraNonfumatori( rs.getString( COLUMN_UTE_CAMERA_NONFUMATORI ) );\n\t\tdto.setUtePalestra( rs.getString( COLUMN_UTE_PALESTRA ) );\n\t\tdto.setUteCamereFamiliari( rs.getString( COLUMN_UTE_CAMERE_FAMILIARI ) );\n\t\tdto.setUteAnimali( rs.getString( COLUMN_UTE_ANIMALI ) );\n\t\tdto.setUteParcheggio( rs.getString( COLUMN_UTE_PARCHEGGIO ) );\n\t\tdto.setUteSpaBenessere( rs.getString( COLUMN_UTE_SPA_BENESSERE ) );\n\t\tdto.setUteWifi( rs.getString( COLUMN_UTE_WIFI ) );\n\t\tdto.setUtePiscinaCoperta( rs.getString( COLUMN_UTE_PISCINA_COPERTA ) );\n\t\tdto.setUteNavettaAeroportuale( rs.getString( COLUMN_UTE_NAVETTA_AEROPORTUALE ) );\n\t\tdto.setUteConnessioneWifiGratuita( rs.getString( COLUMN_UTE_CONNESSIONE_WIFI_GRATUITA ) );\n\t\tdto.setUteBar( rs.getString( COLUMN_UTE_BAR ) );\n\t\tdto.setUteDepositoBagagli( rs.getString( COLUMN_UTE_DEPOSITO_BAGAGLI ) );\n\t\tdto.setUteReception24ore( rs.getString( COLUMN_UTE_RECEPTION24ORE ) );\n\t\tdto.setUtePerChiPrenoti( rs.getString( COLUMN_UTE_PER_CHI_PRENOTI ) );\n\t\tdto.setFkPreferenzaValuta( rs.getLong( COLUMN_FK_PREFERENZA_VALUTA ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setFkPreferenzaValutaNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteCartaTipo( rs.getInt( COLUMN_UTE_CARTA_TIPO ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setUteCartaTipoNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteCap( rs.getString( COLUMN_UTE_CAP ) );\n\t\tdto.setUteCapAzienda( rs.getString( COLUMN_UTE_CAP_AZIENDA ) );\n\t}", "public UsuarioDTO conocerUsuario(String usuario) {\n UsuarioDTO u = null;\n Conexion c = new Conexion();\n ResultSet rs = null;\n PreparedStatement ps = null;\n String sql = \"SELECT * FROM usuario WHERE usuario.usuario = ?\";\n try {\n ps = c.getConexion().prepareStatement(sql);\n u = new UsuarioDTO();\n ps.setString(1, usuario);\n rs = ps.executeQuery();\n while (rs.next()) {\n u.setID(rs.getInt(1));\n u.setNombre(rs.getString(2));\n u.setApellido(rs.getString(3));\n u.setDescripcion(rs.getString(4));\n u.setTelefono(rs.getString(5));\n u.setDireccion(rs.getString(6));\n u.setUsuario(rs.getString(7));\n u.setEmail(rs.getString(8));\n u.setPassword(rs.getString(9));\n u.setFecha_Nacimiento(rs.getString(10));\n u.setFecha_Creacion(rs.getString(11));\n u.setSexo(rs.getString(12));\n u.setImagen(rs.getAsciiStream(13));\n }\n\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n } finally {\n try {\n ps.close();\n rs.close();\n c.cerrarConexion();\n } catch (Exception ex) {\n }\n }\n return u;\n }", "public Collection<FlujoDetalleDTO> cargarTodos(int codigoFlujo) {\n/* 138 */ Collection<FlujoDetalleDTO> resultados = new ArrayList<FlujoDetalleDTO>();\n/* */ try {\n/* 140 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" order by t.secuencia\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 178 */ boolean rtaDB = this.dat.parseSql(s);\n/* 179 */ if (!rtaDB) {\n/* 180 */ return resultados;\n/* */ }\n/* 182 */ this.rs = this.dat.getResultSet();\n/* 183 */ while (this.rs.next()) {\n/* 184 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 187 */ catch (Exception e) {\n/* 188 */ e.printStackTrace();\n/* 189 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarTodos \", e);\n/* */ } \n/* 191 */ return resultados;\n/* */ }", "public TransportDTO makeDTO(ResultSet RS) {\n TransportDTO output = null;\n Connection conn = Repository.getInstance().connect();\n OrderDAO OrderDAO = new OrderDAO();\n try {\n String date = RS.getString(2);\n int weight = RS.getInt(1);\n String driverID = RS.getString(5);\n String Truckplate = RS.getString(4);\n int transportID = RS.getInt(3);\n List<OrderDTO> Orders = new ArrayList<OrderDTO>();\n boolean wasDel = RS.getString(6).equals(\"true\");\n ResultSet contractsRS = getWithInt(\"TransportsOrders\", \"TransportID\", transportID,conn);\n while (contractsRS.next()) {\n int OrderID = contractsRS.getInt(1);\n Orders.add(OrderDAO.get(OrderID));\n }\n output = new TransportDTO(date, weight, driverID, Truckplate, Orders, wasDel, transportID);\n } catch (Exception e) {\n output = null;\n }\n finally{\n Repository.getInstance().closeConnection(conn);\n }\n return output;\n }", "@Override\r\n\t\tpublic List<Boimpl> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\t\tdata = new ArrayList<Boimpl>();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\t// | id | name | address | city | sallary | job | DEPARTMENT\r\n\r\n\t\t\t\tBoimpl obj = new Boimpl();\r\n\t\t\t\tobj.setId(rs.getInt(\"id\"));\r\n\t\t\t\tobj.setName(rs.getString(\"name\"));\r\n\t\t\t\tobj.setAddress(rs.getString(\"address\"));\r\n\t\t\t\tobj.setJob(rs.getString(\"job\"));\r\n\t\t\t\tobj.setSallary(rs.getFloat(\"sallary\"));\r\n\t\t\t\tobj.setDEPARTMENT(rs.getString(\"DEPARTMENT\"));\r\n\t\t\t\tobj.setCity(rs.getString(\"city\"));\r\n\t\t\t\tdata.add(obj);\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t}", "public CalMetasDTO leerRegistro() {\n/* */ try {\n/* 56 */ CalMetasDTO reg = new CalMetasDTO();\n/* 57 */ reg.setCodigoCiclo(this.rs.getInt(\"codigo_ciclo\"));\n/* 58 */ reg.setCodigoPlan(this.rs.getInt(\"codigo_plan\"));\n/* 59 */ reg.setCodigoMeta(this.rs.getInt(\"codigo_meta\"));\n/* 60 */ reg.setCodigoObjetivo(this.rs.getInt(\"codigo_objetivo\"));\n/* 61 */ reg.setDescripcion(this.rs.getString(\"descripcion\"));\n/* 62 */ reg.setJustificacion(this.rs.getString(\"justificacion\"));\n/* 63 */ reg.setValorMeta(this.rs.getDouble(\"valor_meta\"));\n/* 64 */ reg.setTipoMedicion(this.rs.getString(\"tipo_medicion\"));\n/* 65 */ reg.setFuenteDato(this.rs.getString(\"fuente_dato\"));\n/* 66 */ reg.setAplicaEn(this.rs.getString(\"aplica_en\"));\n/* 67 */ reg.setUnidadMedida(this.rs.getString(\"unidad_medida\"));\n/* 68 */ reg.setValorMinimo(this.rs.getDouble(\"valor_minimo\"));\n/* 69 */ reg.setValorMaximo(this.rs.getDouble(\"valor_maximo\"));\n/* 70 */ reg.setMes01(this.rs.getString(\"mes01\"));\n/* 71 */ reg.setMes02(this.rs.getString(\"mes02\"));\n/* 72 */ reg.setMes03(this.rs.getString(\"mes03\"));\n/* 73 */ reg.setMes04(this.rs.getString(\"mes04\"));\n/* 74 */ reg.setMes05(this.rs.getString(\"mes05\"));\n/* 75 */ reg.setMes06(this.rs.getString(\"mes06\"));\n/* 76 */ reg.setMes07(this.rs.getString(\"mes07\"));\n/* 77 */ reg.setMes08(this.rs.getString(\"mes08\"));\n/* 78 */ reg.setMes09(this.rs.getString(\"mes09\"));\n/* 79 */ reg.setMes10(this.rs.getString(\"mes10\"));\n/* 80 */ reg.setMes11(this.rs.getString(\"mes11\"));\n/* 81 */ reg.setMes12(this.rs.getString(\"mes12\"));\n/* 82 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 83 */ reg.setTipoGrafica(this.rs.getString(\"tipo_grafica\"));\n/* 84 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 85 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 86 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 87 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 88 */ reg.setNombreTipoMedicion(this.rs.getString(\"nombreTipoMedicion\"));\n/* 89 */ reg.setNombreEstado(this.rs.getString(\"nombreEstado\"));\n/* 90 */ reg.setNombreUnidadMedida(this.rs.getString(\"nombre_unidad_medida\"));\n/* */ \n/* */ try {\n/* 93 */ reg.setNumeroAcciones(this.rs.getInt(\"acciones\"));\n/* */ }\n/* 95 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 99 */ return reg;\n/* */ }\n/* 101 */ catch (Exception e) {\n/* 102 */ e.printStackTrace();\n/* 103 */ Utilidades.writeError(\"CalPlanMetasFactory:leerRegistro \", e);\n/* */ \n/* 105 */ return null;\n/* */ } \n/* */ }", "public ArrayList<DTOcomentarioRta> listadoComentarioxComercio(int idComercio) {\n ArrayList<DTOcomentarioRta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\" select co.id_comercio, c.id_comentario, c.nombreUsuario, c.descripcion, c.valoracion, c.fecha, co.nombre , r.descripcion, r.fecha, r.id_rta, co.id_rubro\\n\"\n + \" from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\"\n + \" left join Respuestas r on r.id_comentario = c.id_comentario\\n\"\n + \" where co.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(1);\n int idcomentario = rs.getInt(2);\n String nombreU = rs.getString(3);\n String descripC = rs.getString(4);\n int valoracion = rs.getInt(5);\n String fechaC = rs.getString(6);\n String nombrecomercio = rs.getString(7);\n String descripcionR = rs.getString(8);\n String fechaR = rs.getString(9);\n int idR = rs.getInt(10);\n int rubro = rs.getInt(11);\n\n rubro rf = new rubro(rubro, \"\", true, \"\", \"\");\n comercio come = new comercio(nombrecomercio, \"\", \"\", id, true, \"\", \"\", rf, \"\");\n Comentario c = new Comentario(idcomentario, descripC, valoracion, nombreU, fechaC, come);\n respuestas r = new respuestas(idR, descripcionR, c, fechaR);\n DTOcomentarioRta cr = new DTOcomentarioRta(c, r);\n\n lista.add(cr);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public AnuncioDTO ObtenerAnuncioID(int id){\n AnuncioDTO anuncioDTO=null;\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"getById.Anuncio\"));\n ps.setInt(1, id);\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n \n TipoAnuncio tipoAnuncio = TipoAnuncio.valueOf(rs.getString(2));\n String titulo = rs.getString(3);\n String cuerpo = rs.getString(4);\n Date fechaPublicacion = new Date(rs.getDate(5).getTime());\n Date fechaFin=null;\n if(tipoAnuncio.equals(TipoAnuncio.Flash)){\n fechaFin = new Date(rs.getDate(6).getTime());\n }\n String emailPropietario = rs.getString(7);\n EstadoAnuncio estadoAnuncio = EstadoAnuncio.valueOf(rs.getString(8));\n \n ArrayList<String>temas = null;\n if(tipoAnuncio.equals(TipoAnuncio.Tematico))\n temas=new ArrayList<String>(Arrays.asList(rs.getString(9).split(\",\")));\n\n ArrayList<String>destinatarios = ObtenerDestinatariosAnuncio(id);\n anuncioDTO= new AnuncioDTO(id, tipoAnuncio, titulo, cuerpo, fechaPublicacion, fechaFin, emailPropietario, estadoAnuncio, temas, destinatarios);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return anuncioDTO;\n }", "public FlujoDetalleDTO cargarRegistro(int codigoFlujo, int secuencia) {\n/* */ try {\n/* 201 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.enviar_hermana,t.enviar_si_hermana_cerrada,t.ind_cliente_inicial,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" and t.secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 243 */ boolean rtaDB = this.dat.parseSql(s);\n/* 244 */ if (!rtaDB) {\n/* 245 */ return null;\n/* */ }\n/* 247 */ this.rs = this.dat.getResultSet();\n/* 248 */ if (this.rs.next()) {\n/* 249 */ return leerRegistro();\n/* */ }\n/* */ }\n/* 252 */ catch (Exception e) {\n/* 253 */ e.printStackTrace();\n/* 254 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarFlujoDetalle\", e);\n/* */ } \n/* 256 */ return null;\n/* */ }", "public CalMetasDTO cargarRegistro(int codigoCiclo, int codigoPlan, int codigoMeta) {\n/* */ try {\n/* 416 */ String s = \"select m.*,\";\n/* 417 */ s = s + \"tm.descripcion as nombreTipoMedicion,\";\n/* 418 */ s = s + \"est.descripcion as nombreEstado,\";\n/* 419 */ s = s + \"Um.Descripcion as nombre_unidad_medida\";\n/* 420 */ s = s + \" from cal_plan_metas m,sis_multivalores tm,sis_multivalores est,Sis_Multivalores Um\";\n/* 421 */ s = s + \" where \";\n/* 422 */ s = s + \" m.tipo_medicion =tm.valor\";\n/* 423 */ s = s + \" and tm.tabla='CAL_TIPO_MEDICION'\";\n/* 424 */ s = s + \" and m.estado =est.valor\";\n/* 425 */ s = s + \" and est.tabla='CAL_ESTADO_META'\";\n/* 426 */ s = s + \" and m.Unidad_Medida = Um.Valor\";\n/* 427 */ s = s + \" and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META'\";\n/* 428 */ s = s + \" and m.codigo_ciclo=\" + codigoCiclo;\n/* 429 */ s = s + \" and m.codigo_plan=\" + codigoPlan;\n/* 430 */ s = s + \" and m.codigo_meta=\" + codigoMeta;\n/* 431 */ boolean rtaDB = this.dat.parseSql(s);\n/* 432 */ if (!rtaDB) {\n/* 433 */ return null;\n/* */ }\n/* */ \n/* 436 */ this.rs = this.dat.getResultSet();\n/* 437 */ if (this.rs.next()) {\n/* 438 */ return leerRegistro();\n/* */ }\n/* */ }\n/* 441 */ catch (Exception e) {\n/* 442 */ e.printStackTrace();\n/* 443 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarCalMetas \", e);\n/* */ } \n/* 445 */ return null;\n/* */ }", "protected void populateDto(Project dto, ResultSet rs) throws SQLException {\n\t\tdto.setId(rs.getInt(COLUMN_ID));\n\t\tdto.setOwnerId(rs.getInt(COLUMN_OWNER_ID));\n\t\tdto.setCreatorId(rs.getInt(COLUMN_CREATOR_ID));\n\t\tdto.setName(rs.getString(COLUMN_NAME));\n\t\tdto.setDescription(rs.getString(COLUMN_DESCRIPTION));\n\t\tdto.setCompanyId(rs.getInt(COLUMN_COMPANY_ID));\n\t\tif (rs.wasNull()){\n\t\t\tdto.setCompanyIdNull(true);\n\t\t}\n\n\t\tdto.setBillAddress(rs.getString(COLUMN_BILL_ADDRESS));\n\t\tdto.setBillCity(rs.getString(COLUMN_BILL_CITY));\n\t\tdto.setBillZipCode(rs.getInt(COLUMN_BILL_ZIP_CODE));\n\t\tif (rs.wasNull()){\n\t\t\tdto.setBillZipCodeNull(true);\n\t\t}\n\n\t\tdto.setBillState(rs.getString(COLUMN_BILL_STATE));\n\t\tdto.setBillCountry(rs.getString(COLUMN_BILL_COUNTRY));\n\t\tdto.setBillTelNum(rs.getString(COLUMN_BILL_TEL_NUM));\n\t\tdto.setBillFaxNum(rs.getString(COLUMN_BILL_FAX_NUM));\n\t\tdto.setIsEnable(rs.getString(COLUMN_IS_ENABLE));\n\t\tdto.setMessageBody(rs.getString(COLUMN_MESSAGE_BODY));\n\t\tdto.setEsrqmId(rs.getInt(COLUMN_ESRQM_ID));\n\t\tdto.setCreateDate(rs.getTimestamp(COLUMN_CREATE_DATE));\n\t\tdto.setLastModifiedBy(rs.getInt(COLUMN_LAST_MODIFIED_BY));\n\t\tdto.setLastModifiedOn(rs.getTimestamp(COLUMN_LAST_MODIFIED_ON));\n\t}", "public ProductoDTO buscarproducto(ProductoDTO c) {\r\n PreparedStatement ps;\r\n ResultSet res;\r\n ProductoDTO arrpdto = null;\r\n\r\n try {\r\n ps = conn.getConn().prepareStatement(SQL_READ);\r\n ps.setInt(1, c.getId());\r\n res = ps.executeQuery();\r\n while (res.next()) {\r\n\r\n arrpdto = 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 }\r\n return arrpdto;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProductoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n conn.cerrarconexion();\r\n }\r\n\r\n return null;\r\n }", "public FlujoDetalleDTO leerRegistro() {\n/* */ try {\n/* 82 */ FlujoDetalleDTO reg = new FlujoDetalleDTO();\n/* */ \n/* 84 */ reg.setCodigoFlujo(this.rs.getInt(\"codigo_flujo\"));\n/* 85 */ reg.setSecuencia(this.rs.getInt(\"secuencia\"));\n/* 86 */ reg.setServicioInicio(this.rs.getInt(\"servicio_inicio\"));\n/* 87 */ reg.setCodigoEstado(this.rs.getInt(\"codigo_estado\"));\n/* 88 */ reg.setServicioDestino(this.rs.getInt(\"servicio_destino\"));\n/* 89 */ reg.setNombreProcedimiento(this.rs.getString(\"nombre_procedimiento\"));\n/* 90 */ reg.setCorreoDestino(this.rs.getString(\"correo_destino\"));\n/* 91 */ reg.setEnviarSolicitud(this.rs.getString(\"enviar_solicitud\"));\n/* 92 */ reg.setMismoProveedor(this.rs.getString(\"ind_mismo_proveedor\"));\n/* 93 */ reg.setMismoCliente(this.rs.getString(\"ind_mismo_cliente\"));\n/* 94 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 95 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 96 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 97 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 98 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 99 */ reg.setNombreServicioInicio(this.rs.getString(\"nombre_servicio_inicio\"));\n/* 100 */ reg.setNombreCodigoEstado(this.rs.getString(\"nombre_codigo_estado\"));\n/* 101 */ reg.setNombreServicioDestino(this.rs.getString(\"nombre_servicio_destino\"));\n/* 102 */ reg.setNombreEstado(this.rs.getString(\"nombre_estado\"));\n/* 103 */ reg.setCaracteristica(this.rs.getInt(\"caracteristica\"));\n/* 104 */ reg.setCaracteristicaValor(this.rs.getInt(\"valor_caracteristica\"));\n/* 105 */ reg.setCaracteristicaCorreo(this.rs.getInt(\"caracteristica_correo\"));\n/* 106 */ reg.setNombreCaracteristica(this.rs.getString(\"nombre_caracteristica\"));\n/* 107 */ reg.setDescripcionValor(this.rs.getString(\"descripcion_valor\"));\n/* 108 */ reg.setMetodoSeleccionProveedor(this.rs.getString(\"metodo_seleccion_proveedor\"));\n/* 109 */ reg.setIndCorreoCliente(this.rs.getString(\"ind_correo_clientes\"));\n/* */ \n/* */ try {\n/* 112 */ reg.setEnviar_hermana(this.rs.getString(\"enviar_hermana\"));\n/* 113 */ reg.setEnviar_si_hermana_cerrada(this.rs.getString(\"enviar_si_hermana_cerrada\"));\n/* 114 */ reg.setInd_cliente_inicial(this.rs.getString(\"ind_cliente_inicial\"));\n/* */ \n/* */ \n/* */ }\n/* 118 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 122 */ return reg;\n/* */ }\n/* 124 */ catch (Exception e) {\n/* 125 */ e.printStackTrace();\n/* 126 */ Utilidades.writeError(\"FlujoDetalleDAO:leerRegistro \", e);\n/* */ \n/* 128 */ return null;\n/* */ } \n/* */ }", "private PhotoDTO setPhotoDto(ResultSet rs) {\r\n\r\n PhotoDTO photoDto = photoFactory.getPhotoDTO();\r\n try {\r\n photoDto.setPhotoId(rs.getInt(\"photo_id\"));\r\n photoDto.setPhoto(rs.getString(\"photo\"));\r\n photoDto.setFurniture(rs.getInt(\"furniture\"));\r\n } catch (SQLException e) {\r\n throw new FatalException(e.getMessage());\r\n }\r\n return photoDto;\r\n\r\n }", "private EstudianteActaGradoJdbcDto transformarResultSetADtoBuscarEstudianteXIndetificacionXCarreraXConvocatoria(ResultSet rs) throws SQLException{\n\t\tjava.sql.Date fecha = null;\n\t\tEstudianteActaGradoJdbcDto retorno = new EstudianteActaGradoJdbcDto();\n\t\t\n\t\tretorno.setPrsId(rs.getInt(JdbcConstantes.PRS_ID));\n\t\tretorno.setPrsTipoIdentificacion(rs.getInt(JdbcConstantes.PRS_TIPO_IDENTIFICACION));\n\t\tretorno.setPrsTipoIdentificacionSniese(rs.getInt(JdbcConstantes.PRS_TIPO_IDENTIFICACION_SNIESE));\n\t\tretorno.setPrsIdentificacion(rs.getString(JdbcConstantes.PRS_IDENTIFICACION));\n\t\tretorno.setPrsPrimerApellido(rs.getString(JdbcConstantes.PRS_PRIMER_APELLIDO));\n\t\tretorno.setPrsSegundoApellido(rs.getString(JdbcConstantes.PRS_SEGUNDO_APELLIDO));\n\t\tretorno.setPrsNombres(rs.getString(JdbcConstantes.PRS_NOMBRES));\n\t\tretorno.setPrsSexo(rs.getInt(JdbcConstantes.PRS_SEXO));\n\t\tretorno.setPrsSexoSniese(rs.getInt(JdbcConstantes.PRS_SEXO_SNIESE));\n\t\tretorno.setPrsMailPersonal(rs.getString(JdbcConstantes.PRS_MAIL_PERSONAL));\n\t\tretorno.setPrsMailInstitucional(rs.getString(JdbcConstantes.PRS_MAIL_INSTITUCIONAL));\n\t\tretorno.setPrsTelefono(rs.getString(JdbcConstantes.PRS_TELEFONO));\n\t\tretorno.setPrsEtnId(rs.getInt(JdbcConstantes.PRS_ETN_ID));\n\t\tretorno.setPrsUbcId(rs.getInt(JdbcConstantes.PRS_UBC_ID));\n\t\ttry {\n\t\t\tretorno.setPrsUbicacionFoto(rs.getString(JdbcConstantes.PRS_UBICACION_FOTO));\n\t\t} catch (Exception e) {\n\t\t}\n\t\tfecha = rs.getDate(JdbcConstantes.PRS_FECHA_NACIMIENTO);\n\t\tif(fecha != null ){\n\t\t\tretorno.setPrsFechaNacimiento(new Date(fecha.getTime()));\n\t\t}\n\t\t//**** CAMPOS DE ETNIA ****/\n\t\tretorno.setEtnId(rs.getInt(JdbcConstantes.ETN_ID));\n\t\tretorno.setEtnDescripcion(rs.getString(JdbcConstantes.ETN_DESCRIPCION));\n\t\tretorno.setEtnCodigoSniese(rs.getString(JdbcConstantes.ETN_CODIGO_SNIESE));\n\t\t\n\t\t//**** CAMPOS DE UBICACION NACIONALIDAD ****/\n\t\tretorno.setUbcId(rs.getInt(JdbcConstantes.UBC_ID));\n\t\tretorno.setUbcDescripcion(rs.getString(JdbcConstantes.UBC_DESCRIPCION));\n\t\tretorno.setUbcGentilicio(rs.getString(\"ubcNacionalidad\"+JdbcConstantes.UBC_GENTILICIO));\n\t\tretorno.setUbcCodSniese(rs.getString(JdbcConstantes.UBC_COD_SNIESE));\n\t\tretorno.setUbcJerarquia(rs.getInt(\"ubcNacionalidad\"+JdbcConstantes.UBC_JERARQUIA));\n\t\tretorno.setUbcPadre(rs.getInt(\"ubcNacionalidad\"+JdbcConstantes.UBC_PADRE));\n\t\t\n\t\t//**** CAMPOS DE FICHA_ESTUDIANTE ****/\n\t\tretorno.setFcesId(rs.getInt(JdbcConstantes.FCES_ID));\n\t\tretorno.setFcesFechaInicio(rs.getDate(JdbcConstantes.FCES_FECHA_INICIO_COHORTE));\n\t\tretorno.setFcesFechaEgresamiento(rs.getDate(JdbcConstantes.FCES_FECHA_FIN_COHORTE));\n\t\tretorno.setFcesFechaActaGrado(rs.getTimestamp(JdbcConstantes.FCES_FECHA_ACTA_GRADO));\n\t\tretorno.setFcesNumActaGrado(rs.getString(JdbcConstantes.FCES_NUM_ACTA_GRADO));\n\t\tretorno.setFcesFechaRefrendacion(rs.getDate(\"fces\"+JdbcConstantes.FCES_FECHA_REFRENDACION));\n\t\tretorno.setFcesNumRefrendacion(rs.getString(\"fces\"+JdbcConstantes.FCES_NUM_REFRENDACION));\n\t\tretorno.setFcesCrrEstudPrevios(rs.getString(\"fces\"+JdbcConstantes.FCES_CRR_ESTUD_PREVIOS));\n\t\t\n//\t\tretorno.setFcesTiempoEstudRec(rs.getInt(JdbcConstantes.FCES_TIEMPO_ESTUD_REC));\n\t\t\n\t\t\n//\t\tint aux = rs.getInt(JdbcConstantes.FCES_TIPO_DURAC_REC);\n\t\tif(rs.getInt(\"fces\"+JdbcConstantes.FCES_TIPO_DURAC_REC)==GeneralesConstantes.APP_ID_BASE){\n\t\t\tretorno.setFcesTipoDuracionRec(GeneralesConstantes.APP_ID_BASE);\n\t\t}else{\n\t\tretorno.setFcesTipoDuracionRec(rs.getInt(\"fces\"+JdbcConstantes.FCES_TIPO_DURAC_REC));\n\t\t}\n\t\t\n\t\t\n//\t\tint aux1 = rs.getInt(JdbcConstantes.FCES_TIEMPO_ESTUD_REC);\n\t\tif(rs.getInt(\"fces\"+JdbcConstantes.FCES_TIEMPO_ESTUD_REC)==GeneralesConstantes.APP_ID_BASE){\n\t\t\tretorno.setFcesTiempoEstudRecSt(\"\");\n\t\t}else{\n\t\tretorno.setFcesTiempoEstudRec(rs.getInt(\"fces\"+JdbcConstantes.FCES_TIEMPO_ESTUD_REC));\n\t\t}\n\t\t\n\t\t\n\t\tretorno.setFcesTipoColegio(rs.getInt(JdbcConstantes.FCES_TIPO_COLEGIO));\n\t\tretorno.setFcesTipoColegioSniese(rs.getString(JdbcConstantes.FCES_TIPO_COLEGIO_SNIESE));\n\t\tretorno.setFcesNotaPromAcumulado(rs.getBigDecimal(\"fces\"+JdbcConstantes.FCES_NOTA_PROM_ACUMULADO));\n\t\tretorno.setFcesNotaTrabTitulacion(rs.getBigDecimal(JdbcConstantes.FCES_NOTA_TRAB_TITULACION));\n\t\tretorno.setFcesLinkTesis(rs.getString(\"fces\"+JdbcConstantes.FCES_LINK_TESIS));\n\t\tretorno.setFcesRecEstuPrevios(rs.getInt(JdbcConstantes.FCES_REC_ESTUD_PREVIOS));\n\t\tretorno.setFcesRecEstuPreviosSniese(rs.getString(JdbcConstantes.FCES_REC_ESTUD_PREV_SNIESE));\n\t\tretorno.setFcesFechaCreacion(rs.getTimestamp(JdbcConstantes.FCES_FECHA_CREACION));\n\t\tretorno.setFcesHoraActaGrado(rs.getString(JdbcConstantes.FCES_HORA_ACTA_GRADO));\n\t\t\n\t\tretorno.setFcesTituloBachiller(rs.getString(JdbcConstantes.FCES_TITULO_BACHILLER));\n\t\t\n\t\t\n\t\t\n\t\t//**** CAMPOS DE FICHA_ESTUDIANTE UBICACION RESIDENCIA ****/\n\t\tretorno.setFcesUbcCantonResidencia(rs.getInt(\"fces\"+JdbcConstantes.FCES_UBC_CANTON_RESIDENCIA));\n\t\t//**** UBICACION CANTON ****//\n\t\tretorno.setUbcCantonId(rs.getInt(\"ubcCanton\"+JdbcConstantes.UBC_ID));\n\t\tretorno.setUbcCantonDescripcion(rs.getString(\"ubcCanton\"+JdbcConstantes.UBC_DESCRIPCION));\n//\t\tretorno.setUbcCantonGentilicio(rs.getString(\"ubcCanton\"+JdbcConstantes.UBC_GENTILICIO));\n\t\tretorno.setUbcCantonCodSniese(rs.getString(\"ubcCanton\"+JdbcConstantes.UBC_COD_SNIESE));\n//\t\tretorno.setUbcCantonJerarquia(rs.getInt(\"ubcCanton\"+JdbcConstantes.UBC_JERARQUIA));asd\n\t\tretorno.setUbcCantonPadre(rs.getInt(\"ubcCanton\"+JdbcConstantes.UBC_PADRE));\n\t\t\n\t\t//**** UBICACION PROVINCIA ****//\n\t\tretorno.setUbcProvId(rs.getInt(\"ubcProv\"+JdbcConstantes.UBC_ID));\n\t\tretorno.setUbcProvDescripcion(rs.getString(\"ubcProv\"+JdbcConstantes.UBC_DESCRIPCION));\n//\t\tretorno.setUbcProvGentilicio(rs.getString(\"ubcProv\"+JdbcConstantes.UBC_GENTILICIO));\n\t\tretorno.setUbcProvCodSniese(rs.getString(\"ubcProv\"+JdbcConstantes.UBC_COD_SNIESE));\n//\t\tretorno.setUbcProvJerarquia(rs.getInt(\"ubcProv\"+JdbcConstantes.UBC_JERARQUIA));\n\t\tretorno.setUbcProvPadre(rs.getInt(\"ubcProv\"+JdbcConstantes.UBC_PADRE));\n\n\t\t//**** UBICACION PAIS ****//\n\t\tretorno.setUbcPaisId(rs.getInt(\"ubcPais\"+JdbcConstantes.UBC_ID));\n\t\tretorno.setUbcPaisDescripcion(rs.getString(\"ubcPais\"+JdbcConstantes.UBC_DESCRIPCION));\n//\t\tretorno.setUbcPaisGentilicio(rs.getString(\"ubcPais\"+JdbcConstantes.UBC_GENTILICIO));\n\t\tretorno.setUbcPaisCodSniese(rs.getString(\"ubcPais\"+JdbcConstantes.UBC_COD_SNIESE));\n//\t\tretorno.setUbcPaisJerarquia(rs.getInt(\"ubcPais\"+JdbcConstantes.UBC_JERARQUIA));\n\t\tretorno.setUbcPaisPadre(rs.getInt(\"ubcPais\"+JdbcConstantes.UBC_PADRE));\n\n\t\tretorno.setFcesMcttcrId(rs.getInt(JdbcConstantes.FCES_MCCR_ID));\n\t\t//**** CAMPOS DE FICHA_ESTUDIANTE MECANISMO TITULACION CARRERA ****/\n\t\tretorno.setMcttcrId(rs.getInt(JdbcConstantes.MCCR_ID));\n\t\tretorno.setMcttcrEstado(rs.getInt(JdbcConstantes.MCCR_ESTADO));\n\t\tretorno.setMcttcrCrrId(rs.getInt(JdbcConstantes.MCCR_CRR_ID));\n\t\tretorno.setMcttcrMcttId(rs.getInt(JdbcConstantes.MCCR_MCTT_ID));\n\t\tretorno.setMcttcrPorcentaje(rs.getInt(JdbcConstantes.MCCR_PORCENTAJE));\n\t\t\n\t\t//**** CAMPOS DE FICHA_ESTUDIANTE MECANISMO TITULACION ****/\t\t\n\t\tretorno.setMcttId(rs.getInt(JdbcConstantes.MCTT_ID));\n\t\tretorno.setMcttCodigoSniese(rs.getString(JdbcConstantes.MCTT_CODIGO_SNIESE));\n\t\tretorno.setMcttDescripcion(rs.getString(JdbcConstantes.MCTT_DESCRIPCION));\n\t\tretorno.setMcttEstado(rs.getInt(JdbcConstantes.MCTT_ESTADO));\n\t\t\n\t\tretorno.setFcesInacIdInstEstPrevios(rs.getInt(JdbcConstantes.FCES_INAC_ID_INST_EST_PREVIOS));\t\t\n\t\t//**** CAMPOS DE FICHA_ESTUDIANTE INTITUCION ACADEMICA ****/\n\t\tretorno.setInacId(rs.getInt(JdbcConstantes.INAC_ID));\n\t\tretorno.setInacDescripcion(rs.getString(JdbcConstantes.INAC_DESCRIPCION));\n\t\tretorno.setInacCodigoSniese(rs.getString(JdbcConstantes.INAC_CODIGO_SNIESE));\n\t\tretorno.setInacNivel(rs.getInt(JdbcConstantes.INAC_NIVEL));\n\t\tretorno.setInacTipo(rs.getInt(JdbcConstantes.INAC_TIPO));\n\t\tretorno.setInacTipoSniese(rs.getString(JdbcConstantes.INAC_TIPO_SNIESE));\n\t\tretorno.setInacubcId(rs.getInt(JdbcConstantes.INAC_UBC_ID));\n\t\t\n\t\tretorno.setFcesPrsId(rs.getInt(JdbcConstantes.FCES_PRS_ID));\t\t\n\t\t//**** CAMPOS DE FICHA_ESTUDIANTE TRAMITE TITULO ****/\n\t\tretorno.setFcesTrttId(rs.getInt(JdbcConstantes.FCES_TRTT_ID));\n\t\tretorno.setTrttId(rs.getInt(JdbcConstantes.TRTT_ID));\n\t\tretorno.setTrttNumTramite(rs.getString(JdbcConstantes.TRTT_NUM_TRAMITE));\n\t\tretorno.setTrttEstadoProceso(rs.getInt(JdbcConstantes.TRTT_ESTADO_PROCESO));\n\t\tretorno.setTrttEstadoTramite(rs.getInt(JdbcConstantes.TRTT_ESTADO_TRAMITE));\n\t\tretorno.setTrttSubId(rs.getInt(JdbcConstantes.TRTT_SUB_ID));\n\t\tretorno.setTrttCarreraId(rs.getInt(JdbcConstantes.TRTT_CARRERA_ID));\n\t\tretorno.setTrttCnvId(rs.getInt(JdbcConstantes.TRTT_CNV_ID));\n\t\t\n\t\t//**** CAMPOS DE FICHA_ESTUDIANTE - TRAMITE_TITULO - CONVOCATORIA ****/\n\t\tretorno.setCnvId(rs.getInt(JdbcConstantes.CNV_ID));\n\t\tretorno.setCnvDescripcion(rs.getString(JdbcConstantes.CNV_DESCRIPCION));\n\t\tretorno.setCnvEstado(rs.getInt(JdbcConstantes.CNV_ESTADO));\n\t\tretorno.setCnvEstadoFase(rs.getInt(JdbcConstantes.CNV_ESTADO_FASE));\n\t\tretorno.setCnvFechaInicio(rs.getDate(JdbcConstantes.CNV_FECHA_INICIO));\n\t\tretorno.setCnvFechaFin(rs.getDate(JdbcConstantes.CNV_FECHA_FIN));\n\t\t\n\t\t//**** CAMPOS DE FICHA_ESTUDIANTE - TRAMITE_TITULO - CARRERA ****//\n\t\tretorno.setCrrId(rs.getInt(JdbcConstantes.CRR_ID));\n\t\tretorno.setCrrDescripcion(rs.getString(JdbcConstantes.CRR_DESCRIPCION));\n\t\tretorno.setCrrCodSniese(rs.getString(JdbcConstantes.CRR_COD_SNIESE));\n\t\tretorno.setCrrDetalle(rs.getString(JdbcConstantes.CRR_DETALLE));\n\t\tretorno.setCrrFclId(rs.getInt(JdbcConstantes.CRR_FCL_ID));\n\t\t\n\t\t//**** CAMPOS DE FICHA_ESTUDIANTE - TRAMITE_TITULO - CARRERA - FACULTAD ****//\n\t\tretorno.setFclId(rs.getInt(JdbcConstantes.FCL_ID));\n\t\tretorno.setFclDescripcion(rs.getString(JdbcConstantes.FCL_DESCRIPCION));\n\t\t\n\t\t//**** CAMPOS DE FICHA_ESTUDIANTE ****//\n//\t\tretorno.setFcesTituloBachillerId(rs.getInt(JdbcConstantes.TTL_ID));\n//\t\t//**** CAMPOS DE FICHA_ESTUDIANTE - TRAMITE_TITULO - CARRERA - FACULTAD ****//\n//\t\tretorno.setTtlId(rs.getInt(JdbcConstantes.TTL_ID));\n//\t\tretorno.setTtlDescripcion(rs.getString(JdbcConstantes.TTL_DESCRIPCION));\n//\t\tretorno.setTtlSexo(rs.getInt(JdbcConstantes.TTL_SEXO));\n//\t\tretorno.setTtlTipo(rs.getInt(JdbcConstantes.TTL_TIPO));\n//\t\tretorno.setTtlEstado(rs.getInt(JdbcConstantes.TTL_ESTADO));\n\t\t\n\t\t//**** CAMPOS DE FICHA_ESTUDIANTE ****//\n\t\tretorno.setFcesCncrId(rs.getInt(\"fces\"+JdbcConstantes.FCES_CNCR_ID));\n\t\t\n\t\t//CAMPOS DE ASENTAMIENTO NOTA\n\t\ttry {\n\t\t\tretorno.setAsnoPrmDfnOral(rs.getBigDecimal(JdbcConstantes.ASNO_PRM_DFN_ORAL));\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t\tretorno.setAsnoPrmDfnEscrito(rs.getBigDecimal(JdbcConstantes.ASNO_PRM_TRB_ESCRITO));\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t\tretorno.setAsnoTrabTitulacionFinal(rs.getBigDecimal(JdbcConstantes.ASNO_TRB_TITULACION_FINAL));\n\t\t} catch (Exception e) {\n\t\t}\n\t\treturn retorno;\n\t}", "public List<GoleadoresDTO> listarTodo(int idTorneo,Connection conexion) throws MiExcepcion {\n ArrayList<GoleadoresDTO> listarGoleadores = new ArrayList();\n\n try {\n String query = \"SELECT DISTINCT usuarios.primerNombre, \" +\n\" usuarios.primerApellido, tablagoleadores.numeroGoles, tablagoleadores.idEquipo, \"+ \n\" tablagoleadores.idTorneo,tablagoleadores.idJugador, \" +\n\" equipo.nombre \" +\n\" FROM tablagoleadores \" +\n\" INNER JOIN jugadoresporequipo \" +\n\" ON tablagoleadores.idJugador = jugadoresporequipo.codigoJugador \" +\n\" INNER JOIN usuarios \" +\n\" ON jugadoresporequipo.codigoJugador = usuarios.idUsuario \" +\n\" INNER JOIN equiposdeltorneo \" +\n\" ON tablagoleadores.idEquipo = equiposdeltorneo.equipoCodigo \" +\n\" INNER JOIN equipo \" +\n\" ON equiposdeltorneo.equipoCodigo = equipo.codigo \" +\n\" INNER JOIN torneo \" +\n\" ON tablagoleadores.idTorneo = torneo.idTorneo \" +\n\" WHERE tablagoleadores.idTorneo = ? \" +\n\" AND equiposdeltorneo.torneoIdTorneo=? \" +\n\" ORDER BY numeroGoles DESC\";\n statement = conexion.prepareStatement(query);\n statement.setInt(1, idTorneo);\n statement.setInt(2, idTorneo);\n rs = statement.executeQuery();\n //mientras que halla registros cree un nuevo dto y pasele la info\n while (rs.next()) {\n //crea un nuevo dto\n GoleadoresDTO gol = new GoleadoresDTO();\n UsuariosDTO usu = new UsuariosDTO();\n EquipoDTO equipo = new EquipoDTO();\n //le pasamos los datos que se encuentren\n gol.setNumeroGoles(rs.getInt(\"numeroGoles\"));\n gol.setIdEquipo(rs.getInt(\"idEquipo\"));\n gol.setIdTorneo(rs.getInt(\"idTorneo\"));\n gol.setIdJugador(rs.getLong(\"idJugador\"));\n usu.setPrimerNombre(rs.getString(\"primerNombre\"));\n usu.setPrimerApellido(rs.getString(\"primerApellido\"));\n gol.setUsu(usu);//paso el usuario al objeto \n equipo.setNombre(rs.getString(\"nombre\"));\n gol.setEquipo(equipo);\n //agregamos el objeto dto al arreglo\n listarGoleadores.add(gol);\n\n }\n } catch (SQLException sqlexception) {\n throw new MiExcepcion(\"Error listando goles\", sqlexception);\n\n } \n// finally {\n// try{\n// if (statement != null) {\n// statement.close(); \n// }\n// }catch (SQLException sqlexception) {\n// throw new MiExcepcion(\"Error listando goles\", sqlexception);\n//\n// }\n// }\n //devolvemos el arreglo\n return listarGoleadores;\n\n }", "public ArrayList<AnuncioDTO> ObtenerAnuncios(){\n ArrayList<AnuncioDTO> ret=new ArrayList<AnuncioDTO>();\n\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"getAll.Anuncio\"));\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n int id=rs.getInt(1);\n TipoAnuncio tipoAnuncio=TipoAnuncio.valueOf(rs.getString(2));\n String titulo = rs.getString(3);\n String cuerpo = rs.getString(4);\n Date fechaPublicacion = new Date(rs.getDate(5).getTime());\n Date fechaFin=null;\n if(tipoAnuncio.equals(TipoAnuncio.Flash)){\n fechaFin= new Date(rs.getDate(6).getTime());\n }\n String emailPropietario = rs.getString(7);\n EstadoAnuncio estadoAnuncio = EstadoAnuncio.valueOf(rs.getString(8));\n \n ArrayList<String>temas=null;\n if(tipoAnuncio.equals(TipoAnuncio.Tematico)){\n temas=new ArrayList<String>();\n ArrayList<String>temasId = null;\n temasId=new ArrayList<String>(Arrays.asList(rs.getString(9).split(\",\")));\n InteresesDAO interesesDAO = new InteresesDAO(sqlPropertiesPath);\n Hashtable<Integer,String> intereses = interesesDAO.DevolverIntereses();\n for(String interes : temasId){\n temas.add(intereses.get(Integer.parseInt(interes)));\n }\n\n }\n ArrayList<String>destinatarios = ObtenerDestinatariosAnuncio(id);\n AnuncioDTO anuncioDTO=new AnuncioDTO(id, tipoAnuncio, titulo, cuerpo, fechaPublicacion, fechaFin, emailPropietario, estadoAnuncio, temas,destinatarios);\n\n ret.add(anuncioDTO);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return ret;\n }", "public DTOSalida obtenerDescripcionesPlantillas(DTOBelcorp dto) throws MareException\n { \n UtilidadesLog.info(\"DAOGestionComisiones.obtenerDescripcionesPlantillas(DTOBelcorp dto): Entrada\");\n StringBuffer query = new StringBuffer();\n RecordSet rs = new RecordSet();\n DTOSalida dtos = new DTOSalida();\n \n BelcorpService bs = UtilidadesEJB.getBelcorpService(); \n UtilidadesLog.debug(\"UtilidadesEJB.getBelcorpService() .... [OK]\");\n query.append(\" SELECT A.OID_PLAN_COMI OID, B.VAL_I18N DESCRIPCION \");\n query.append(\" FROM COM_PLANT_COMIS A, V_GEN_I18N_SICC B \"); \n query.append(\" WHERE \");\n //query.append(\" A.ESTA_OID_ESTA = \" + ConstantesCOM.ESTADO_ACTIVO + \" AND \");\n query.append(\" A.CEST_OID_ESTA = \" + ConstantesCOM.ESTADO_ACTIVO + \" AND \");\n query.append(\" B.ATTR_ENTI = 'COM_PLANT_COMIS' AND \"); \n query.append(\" B.ATTR_NUM_ATRI = 1 AND \"); \n query.append(\" B.IDIO_OID_IDIO = \" + dto.getOidIdioma() + \" AND \");\n query.append(\" B.VAL_OID = A.OID_PLAN_COMI \");\n query.append(\" ORDER BY DESCRIPCION \"); \n UtilidadesLog.debug(query.toString()); \n try {\n rs = bs.dbService.executeStaticQuery(query.toString());\n if(rs != null)\n dtos.setResultado(rs);\n }catch (Exception e) {\n UtilidadesLog.error(e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n } \n UtilidadesLog.info(\"DAOGestionComisiones.obtenerDescripcionesPlantillas(DTOBelcorp dto): Salida\");\n return dtos; \n }", "private static DTOSalida getDTOSalida(String query) throws MareException { \n UtilidadesLog.info(\"DAOGestionComisiones.getDTOSalida(String query): Entrada\");\n RecordSet rs = new RecordSet();\n DTOSalida dtos = new DTOSalida();\n BelcorpService bs = UtilidadesEJB.getBelcorpService(); \n UtilidadesLog.debug(query); \n try {\n rs = bs.dbService.executeStaticQuery(query);\n if(rs != null)\n dtos.setResultado(rs);\n }catch (Exception e) {\n UtilidadesLog.error(e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n } \n UtilidadesLog.info(\"DAOGestionComisiones.getDTOSalida(String query): Salida\");\n return dtos; \n }", "public FececTipoPropuesta mapRow(ResultSet rs, int rowNum) throws SQLException {\n FececTipoPropuesta dto = new FececTipoPropuesta();\n\n dto.setIdTipoPropuesta(rs.getBigDecimal(COLUMN_ID_TIPO_PROPUESTA));\n dto.setDescripcion(rs.getString(COLUMN_DESCRIPCION));\n\n return dto;\n }", "public Antecedentes getData(long dni) {\n\n\t\t\tMapSqlParameterSource params = new MapSqlParameterSource();\n\t\t\tparams.addValue(\"dni\", dni);\n\t\t\t\n\n\t\t \n\t\t\ttry {\n\t\t\t\treturn jdbc.queryForObject(\"select * from antecedentes where dni = :dni \", params, new RowMapper<Antecedentes>() {\n\t\t\n\t\t\t\t\t\t\tpublic Antecedentes mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tAntecedentes antecedentes = new Antecedentes();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tantecedentes.setDni(rs.getBigDecimal(\"dni\"));\n\t\t\t\t\t\t\t\tantecedentes.setBecario(rs.getString(\"becario\"));\n\t\t\t\t\t\t\t\tantecedentes.setTesista_doctoral(rs.getString(\"tesista_doctoral\"));\n\t\t\t\t\t\t\t\tantecedentes.setTesista_maestria(rs.getString(\"tesista_maestria\"));\n\t\t\t\t\t\t\t\tantecedentes.setTesista_grado(rs.getString(\"tesista_grado\"));\n\t\t\t\t\t\t\t\tantecedentes.setInvestigadores(rs.getString(\"investigadores\"));\n\t\t\t\t\t\t\t\tantecedentes.setPasantes_id_y_facademica(rs.getString(\"pasantes_id_y_facademica\"));\n\t\t\t\t\t\t\t\tantecedentes.setPersonal_apoyo_id(rs.getString(\"personal_apoyo_id\"));\n\t\t\t\t\t\t\t\tantecedentes.setFinanciamiento_cientifico_tecnologico(rs.getString(\"financiamiento_cientifico_tecnologico\"));\n\t\t\t\t\t\t\t\tantecedentes.setActividades_divulgacion(rs.getString(\"actividades_divulgacion\"));\n\t\t\t\t\t\t\t\tantecedentes.setExtension_rural_industrial(rs.getString(\"extension_rural_industrial\"));\n\t\t\t\t\t\t\t\tantecedentes.setPrestacion_servicios_sociales(rs.getString(\"prestacion_servicios_sociales\"));\n\t\t\t\t\t\t\t\tantecedentes.setProduccion_divulgacion_artistica(rs.getString(\"produccion_divulgacion_artistica\"));\n\t\t\t\t\t\t\t\tantecedentes.setOtro_tipo_actividad(rs.getString(\"otro_tipo_actividad\"));\n\t\t\t\t\t\t\t\tantecedentes.setEvaluacion_personal(rs.getString(\"evaluacion_personal\"));\n\t\t\t\t\t\t\t\tantecedentes.setEvaluacion_programas(rs.getString(\"evaluacion_programas\"));\n\t\t\t\t\t\t\t\tantecedentes.setEvaluacion_institucional(rs.getString(\"evaluacion_institucional\"));\n\t\t\t\t\t\t\t\tantecedentes.setOtro_tipo_evaluacion(rs.getString(\"otro_tipo_evaluacion\"));\n\t\t\t\t\t\t\t\tantecedentes.setBecas(rs.getString(\"becas\"));\n\t\t\t\t\t\t\t\tantecedentes.setEstancias_pasantias(rs.getString(\"estancias_pasantias\"));\n\t\t\t\t\t\t\t\tantecedentes.setOperacion_mantenimiento(rs.getString(\"operacion_mantenimiento\"));\n\t\t\t\t\t\t\t\tantecedentes.setProduccion(rs.getString(\"produccion\"));\n\t\t\t\t\t\t\t\tantecedentes.setNormalizacion(rs.getString(\"normalizacion\"));\n\t\t\t\t\t\t\t\tantecedentes.setEjercicio_profesion_ambito_no_academico(rs.getString(\"ejercicio_profesion_ambito_no_academico\"));\n\t\t\t\t\t\t\t\tantecedentes.setOtra_actividad_cyt(rs.getString(\"otra_actividad_cyt\"));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\treturn antecedentes;\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t});\n\t\t\t}\n\t\t\t catch(EmptyResultDataAccessException erdae) {\n\t\t\t\t System.out.println(\"en antecedentesDAO devuelve null\");\n\t\t\t return null;\n\t\t\t }\n\t\t}", "public ArrayList < Dataclass > getData() {\n ArrayList < Dataclass > dataList = new ArrayList < Dataclass > ();\n Connection connection = getConnection();\n String query = \"SELECT * FROM `przychodnia` \";\n if (option == 1) query = \"SELECT * FROM `lekarz` \";\n if (option == 2) query = \"SELECT * FROM `wizyta` \";\n if (option == 3) query = \"SELECT * FROM `badanie` \";\n Statement st;\n ResultSet rs;\n\n try {\n st = connection.createStatement();\n rs = st.executeQuery(query);\n Dataclass dc;\n while (rs.next()) {\n if (option == 1) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Imię\"), rs.getString(\"Nazwisko\"), rs.getString(\"Specjalizacja\"), rs.getInt(\"ID_Przychodni\"));\n else if (option == 2) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getString(\"Opis Badania\"), rs.getString(\"Imię i nazwisko pacjenta\"), rs.getInt(\"ID_Lekarza\"));\n else if (option == 3) dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Data\"), rs.getBlob(\"Załącznik\"));\n else dc = new Dataclass(rs.getInt(\"ID\"), rs.getString(\"Nazwa\"), rs.getString(\"Adres\"), rs.getString(\"Miasto\"));\n dataList.add(dc);\n }\n } catch (Exception e) {\n System.err.print(e);\n }\n return dataList;\n }", "@Select({\n \"select\",\n \"id_soggetto, codice_fiscale, id_asr, cognome, nome, data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, telefono_recapito, data_nascita, id_soggetto_fk,\",\n \"asl_residenza, asl_domicilio, email, lat, lng, id_tipo_soggetto, utente_operazione, \",\n \"data_creazione, data_modifica, data_cancellazione, id_medico\",\n \"from soggetto_personale_scolastico\",\n \"where id_soggetto = #{idSoggetto,jdbcType=BIGINT}\"\n })\n @Results({\n @Result(column=\"id_soggetto\", property=\"idSoggetto\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"codice_fiscale\", property=\"codiceFiscale\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_asr\", property=\"idAsr\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"cognome\", property=\"cognome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"nome\", property=\"nome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita_str\", property=\"dataNascitaStr\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_residenza_istat\", property=\"comuneResidenzaIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_domicilio_istat\", property=\"comuneDomicilioIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"indirizzo_domicilio\", property=\"indirizzoDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"telefono_recapito\", property=\"telefonoRecapito\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita\", property=\"dataNascita\", jdbcType=JdbcType.DATE),\n @Result(column=\"asl_residenza\", property=\"aslResidenza\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"asl_domicilio\", property=\"aslDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"email\", property=\"email\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"lat\", property=\"lat\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"lng\", property=\"lng\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"id_tipo_soggetto\", property=\"idTipoSoggetto\", jdbcType=JdbcType.INTEGER),\n @Result(column = \"id_soggetto_fk\", property = \"idSoggettoFk\", jdbcType = JdbcType.BIGINT),\n @Result(column=\"utente_operazione\", property=\"utenteOperazione\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_creazione\", property=\"dataCreazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_modifica\", property=\"dataModifica\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_cancellazione\", property=\"dataCancellazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"id_medico\", property=\"idMedico\", jdbcType=JdbcType.BIGINT)\n })\n SoggettoPersonaleScolastico selectByPrimaryKey(Long idSoggetto);", "public ArrayList<ServicioDTO> consultarServicios(String columna, String informacion) throws Exception {\r\n ArrayList<ServicioDTO> dtos = new ArrayList<>();\r\n conn = Conexion.generarConexion();\r\n String sql = \"\";\r\n if (columna.equals(\"nom\")) \r\n sql = \" WHERE SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ? OR \"\r\n + \"SerNombre LIKE ?\";\r\n else if (columna.equals(\"cod\"))\r\n sql = \" WHERE SerCodigo = ? \";\r\n if (conn != null) {\r\n PreparedStatement stmt = conn.prepareStatement(\"SELECT SerCodigo, \"\r\n + \"SerNombre, SerCaracter, SerNotas, SerHabilitado \"\r\n + \"FROM tblservicio\" + sql);\r\n if (columna.equals(\"cod\")) {\r\n stmt.setString(1, informacion);\r\n } else if (columna.equals(\"nom\")) {\r\n stmt.setString(1, informacion);\r\n stmt.setString(2, \"%\" + informacion);\r\n stmt.setString(3, informacion + \"%\");\r\n stmt.setString(4, \"%\" + informacion + \"%\");\r\n }\r\n ResultSet rs = stmt.executeQuery();\r\n while (rs.next()) {\r\n ServicioDTO dto = new ServicioDTO();\r\n dto.setCodigo(rs.getInt(1));\r\n dto.setNombre(rs.getString(2));\r\n dto.setCaracter(rs.getString(3));\r\n dto.setNotas(rs.getString(4));\r\n String habilitado = rs.getString(5);\r\n if(habilitado.equals(\"si\"))\r\n dto.setHabilitado(true);\r\n else\r\n dto.setHabilitado(false);\r\n dtos.add(dto);\r\n }\r\n stmt.close();\r\n rs.close();\r\n conn.close();\r\n }\r\n return dtos;\r\n }", "@Select(\"SELECT id_patient, first_name, last_name, PESEL, id_address,\" +\n \" email, phone_number, id_firstcontact_doctor, password FROM patients;\")\n @Results({\n @Result(property = \"id\", column = \"id_patient\"),\n @Result(property = \"firstName\", column = \"first_name\"),\n @Result(property = \"lastName\", column = \"last_name\"),\n @Result(property = \"pesel\", column = \"PESEL\"),\n @Result(property = \"address\", column = \"id_address\",\n javaType = Address.class, one = @One(select = \"selectAddress\",\n fetchType = FetchType.EAGER)),\n @Result(property = \"email\", column = \"email\"),\n @Result(property = \"phoneNumber\", column = \"phone_number\"),\n @Result(property = \"password\", column = \"password\"),\n @Result(property = \"firstContactDoctor\", column = \"id_firstcontact_doctor\",\n javaType = Doctor.class, one = @One(select = \"selectFirstcontactDoctor\",\n fetchType = FetchType.EAGER))\n })\n List<Patient> getAllPatientsDataToTable();", "@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }", "@Transactional\n public void llenarTabla(ResultSet rs){\n if (rs==null) {\n System.out.println(\"el rs vino vacio\");\n }\n try {\n while (rs.next()) {\n //para cada fila de la consulta creo un pedido\n PedidoMaterial pedido = new PedidoMaterial();\n System.out.println(\"empezamos\");\n pedido.setId(rs.getInt(1));\n pedido.setNumeroPedido(rs.getInt(2));\n pedido.setNotaDeVenta(rs.getInt(3));\n pedido.setDescripProyecto(rs.getString(4));\n pedido.setCliente(rs.getString(5));\n pedido.setCantidadPedida(rs.getLong(6));\n pedido.setCantidadModificada(rs.getLong(7));\n Calendar fecha = Calendar.getInstance();\n fecha.setTime(rs.getDate(8));\n pedido.setUltimaActualizacionDespiece(fecha);\n pedido.setArticulo(rs.getString(9));\n pedido.setAriCod(rs.getString(10));\n pedido.setArea(rs.getString(11));\n pedido.setUnidadOrg(rs.getInt(12));\n pedido.setTarea(rs.getString(13));\n pedido.setCantidadAPD(rs.getLong(14));\n if (rs.getDate(15) != null) {\n fecha.setTime(rs.getDate(15));\n pedido.setFechaAsignacion(fecha); \n }\n pedido.setCantidadFinalP(rs.getLong(16));\n pedido.setCantidadRealU(rs.getLong(17));\n pedido.setTareaCod(rs.getInt(18));\n fecha.setTime(rs.getDate(19));\n pedido.setFechaUti(fecha);\n fecha.setTime(rs.getDate(20));\n pedido.setFechaFinUtili(fecha);\n \n guardarPedido(pedido);\n \n \n }\n } catch (SQLException ex) {\n \n System.out.println(ex.toString());\n }\n }", "T buidEntity(ResultSet rs) throws SQLException;", "@Select({\n \"select\",\n \"id_soggetto, codice_fiscale, id_asr, cognome, nome, data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, telefono_recapito, data_nascita, \",\n \"asl_residenza, asl_domicilio, email, lat, lng, id_tipo_soggetto, id_soggetto_fk, utente_operazione, \",\n \"data_creazione, data_modifica, data_cancellazione, id_medico\",\n \"from soggetto_personale_scolastico\"\n })\n @Results({\n @Result(column=\"id_soggetto\", property=\"idSoggetto\", jdbcType=JdbcType.BIGINT, id=true),\n @Result(column=\"codice_fiscale\", property=\"codiceFiscale\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_asr\", property=\"idAsr\", jdbcType=JdbcType.BIGINT),\n @Result(column=\"cognome\", property=\"cognome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"nome\", property=\"nome\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita_str\", property=\"dataNascitaStr\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_residenza_istat\", property=\"comuneResidenzaIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"comune_domicilio_istat\", property=\"comuneDomicilioIstat\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"indirizzo_domicilio\", property=\"indirizzoDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"telefono_recapito\", property=\"telefonoRecapito\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_nascita\", property=\"dataNascita\", jdbcType=JdbcType.DATE),\n @Result(column=\"asl_residenza\", property=\"aslResidenza\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"asl_domicilio\", property=\"aslDomicilio\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"email\", property=\"email\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"lat\", property=\"lat\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"lng\", property=\"lng\", jdbcType=JdbcType.NUMERIC),\n @Result(column=\"id_tipo_soggetto\", property=\"idTipoSoggetto\", jdbcType=JdbcType.INTEGER),\n @Result(column = \"id_soggetto_fk\", property = \"idSoggettoFk\", jdbcType = JdbcType.BIGINT),\n @Result(column=\"utente_operazione\", property=\"utenteOperazione\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"data_creazione\", property=\"dataCreazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_modifica\", property=\"dataModifica\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"data_cancellazione\", property=\"dataCancellazione\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"id_medico\", property=\"idMedico\", jdbcType=JdbcType.BIGINT)\n })\n List<SoggettoPersonaleScolastico> selectAll();", "public FececEmpleado mapRow(ResultSet rs, int rowNum) throws SQLException {\n FececEmpleado dto = new FececEmpleado();\n\n dto.setIdEmpleado(rs.getBigDecimal(COLUMN_ID_EMPLEADO));\n dto.setNombre(rs.getString(COLUMN_NOMBRE));\n dto.setRfc(rs.getString(COLUMN_RFC));\n dto.setCorreo(rs.getString(COLUMN_CORREO));\n dto.setIdEstatusEmpleado(rs.getBigDecimal(COLUMN_ID_ESTATUS_EMPLEADO));\n dto.setFechaCreacion(rs.getTimestamp(COLUMN_FECHA_CREACION));\n dto.setFechaBaja(rs.getTimestamp(COLUMN_FECHA_BAJA));\n\n return dto;\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 RecordSet obtenerResumen(DTOResumen dtoe) throws MareException{\n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerResumen(DTOResumen dtoe): Entrada\");\n \n RecordSet rs = new RecordSet();\n StringBuffer query = new StringBuffer();\n BelcorpService bs;\n try\n { bs = BelcorpService.getInstance();\n }\n catch(MareMiiServiceNotFoundException ex)\n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n } \n /*query.append(\" SELECT distinct p.IDPRINCIPAL AS OID,CONCAT(p.name,CONCAT(' ',CONCAT(pv.STRINGVALUE,CONCAT(' ',CONCAT(pv2.STRINGVALUE,CONCAT(' ',CONCAT(pv3.STRINGVALUE,CONCAT(' ',pv4.STRINGVALUE)))))))) NOMBRE, \");\n query.append(\" gen.VAL_I18N AS CANAL, \");\n query.append(\" sma.DES_MARC AS MARCA, \"); \n query.append(\" subvta.DES_SUBG_VENT AS SUBGERVENTA, \");\n query.append(\" gen2.VAL_I18N AS REGION, \");\n query.append(\" gen3.VAL_I18N AS ZONA, \");\n query.append(\" secc.DES_SECCI AS SECCION, \");\n query.append(\" gen5.VAL_I18N AS TERRITORIO \");\n query.append(\" FROM v_gen_i18n_sicc gen, \");\n query.append(\" v_gen_i18n_sicc gen2, \");\n query.append(\" v_gen_i18n_sicc gen3, \");\n query.append(\" v_gen_i18n_sicc gen5, \");\n query.append(\" seg_marca sma, \");\n query.append(\" zon_secci secc, \");\n query.append(\" cob_usuar_etapa_cobra_detal cdetal, \");\n query.append(\" zon_sub_geren_venta subvta, \");\n query.append(\" cob_usuar_etapa_cobra_cabec ccabe, \");\n query.append(\" cob_usuar_cobra usucob, \");\n query.append(\" own_mare.principals p, \");\n query.append(\" propertyvalues pv, \");\n query.append(\" propertyvalues pv2, \");\n query.append(\" propertyvalues pv3, \");\n query.append(\" propertyvalues pv4, \");\n query.append(\" own_mare.users u \");\n query.append(\" WHERE cdetal.zsgv_oid_subg_vent = subvta.oid_subg_vent \");\n query.append(\" AND ccabe.oid_usua_etap_cobr = cdetal.oid_usua_etap_cobr_deta \");\n query.append(\" AND secc.oid_secc(+) = cdetal.zscc_oid_secc \");\n query.append(\" AND sma.oid_marc = subvta.marc_oid_marc \");\n query.append(\" AND ccabe.usco_oid_usua_cobr = usucob.oid_usua_cobr \");\n query.append(\" AND gen.val_oid = subvta.cana_oid_cana \");\n query.append(\" AND gen.attr_enti = 'SEG_CANAL' \");\n query.append(\" AND gen.attr_num_atri = 1 \");\n query.append(\" AND gen.idio_oid_idio = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND pv.idproperty(+) = 2 \");\n query.append(\" AND pv.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv2.idproperty(+) = 3 \");\n query.append(\" AND pv2.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv3.idproperty = 5 \");\n query.append(\" AND pv3.idprincipal = p.idprincipal \");\n query.append(\" AND pv4.idproperty = 6 \");\n query.append(\" AND pv4.idprincipal = p.idprincipal \");\n query.append(\" AND gen2.val_oid(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen2.attr_enti(+) = 'ZON_REGIO' \");\n query.append(\" AND gen2.attr_num_atri(+) = 1 \");\n query.append(\" AND gen2.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen3.val_oid(+) = cdetal.zzon_oid_zona \");\n query.append(\" AND gen3.attr_enti(+) = 'ZON_ZONA' \");\n query.append(\" AND gen3.attr_num_atri(+) = 1 \");\n query.append(\" AND gen3.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND gen5.val_oid(+) = cdetal.terr_oid_terr \");\n query.append(\" AND gen5.attr_enti(+) = 'ZON_TERRI' \");\n query.append(\" AND gen5.attr_num_atri(+) = 1 \");\n query.append(\" AND gen5.idio_oid_idio(+) = '\" + dtoe.getOidIdioma() + \" ' \");\n query.append(\" AND u.iduser = p.idprincipal \");\n query.append(\" AND p.idprincipal = ccabe.usco_oid_usua_cobr \");\n */\n \n /*query.append(\" SELECT distinct p.IDPRINCIPAL AS OID, \");\n query.append(\" p.name AS USUARIO, \");\n */\n //Se le agega \"p.IDPRINCIPAL,\" segun BELC300017927 \n //query.append(\" SELECT distinct p.name AS USUARIO, \"); \n query.append(\" SELECT distinct p.IDPRINCIPAL, p.name AS USUARIO, \");\n query.append(\" CONCAT(p.name,CONCAT(' ',CONCAT(pv.STRINGVALUE,CONCAT(' ',CONCAT(pv2.STRINGVALUE,CONCAT(' ',CONCAT(pv3.STRINGVALUE,CONCAT(' ',pv4.STRINGVALUE)))))))) NOMBRE, \");\n query.append(\" sma.DES_MARC AS MARCA, \");\n query.append(\" gen.VAL_I18N AS CANAL, \"); \n query.append(\" subvta.DES_SUBG_VENT AS SUBGERVENTA, \");\n query.append(\" regio.DES_REGI AS REGION, \");\n query.append(\" zona.DES_ZONA AS ZONA, \"); \n \t query.append(\" secc.DES_SECCI AS SECCION, \"); \n query.append(\" terri.COD_TERR AS TERRITORIO \");\n query.append(\" FROM v_gen_i18n_sicc gen, \");\n query.append(\" SEG_CANAL canal, \");\n query.append(\" ZON_TERRI terri, \");\n query.append(\" ZON_ZONA zona, \");\n query.append(\" ZON_REGIO regio, \");\n query.append(\" seg_marca sma, \");\n query.append(\" zon_secci secc, \");\n query.append(\" cob_usuar_etapa_cobra_detal cdetal, \");\n query.append(\" zon_sub_geren_venta subvta, \");\n query.append(\" cob_usuar_etapa_cobra_cabec ccabe, \");\n query.append(\" cob_usuar_cobra usucob, \");\n query.append(\" principals p, \");\n query.append(\" propertyvalues pv, \");\n query.append(\" propertyvalues pv2, \");\n query.append(\" propertyvalues pv3, \");\n query.append(\" propertyvalues pv4, \");\n query.append(\" users u \");\n query.append(\" WHERE cdetal.zsgv_oid_subg_vent = subvta.oid_subg_vent \");\n query.append(\" AND ccabe.oid_usua_etap_cobr = cdetal.UECC_OID_USUA_ETAP_COBR \");\n query.append(\" AND secc.oid_secc(+) = cdetal.zscc_oid_secc \");\n query.append(\" AND sma.oid_marc = subvta.marc_oid_marc \");\n query.append(\" AND ccabe.usco_oid_usua_cobr = usucob.oid_usua_cobr \");\n query.append(\" AND gen.val_oid = subvta.cana_oid_cana \");\n query.append(\" AND gen.attr_enti = 'SEG_CANAL' \");\n query.append(\" AND gen.attr_num_atri = 1 \");\n query.append(\" AND gen.idio_oid_idio = '1' \");\n query.append(\" AND pv.idproperty(+) = 2 \");\n query.append(\" AND pv.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv2.idproperty(+) = 3 \");\n query.append(\" AND pv2.idprincipal(+) = p.idprincipal \");\n query.append(\" AND pv3.idproperty = 5 \");\n query.append(\" AND pv3.idprincipal = p.idprincipal \");\n query.append(\" AND pv4.idproperty = 6 \");\n query.append(\" AND pv4.idprincipal = p.idprincipal \t\t \");\n query.append(\" AND terri.OID_TERR = cdetal.terr_oid_terr\t\t \");\n query.append(\" AND zona.OID_ZONA = cdetal.zzon_oid_zona\t\t \");\n query.append(\" AND regio.OID_REGI = cdetal.ZORG_OID_REGI\t\t \");\n query.append(\" AND u.iduser = p.idprincipal \");\n query.append(\" AND p.idprincipal = usucob.USER_OID_USUA_COBR \");\n \n /* Validaciones */\n if( dtoe.getOidMarca()!= null ){\n query.append(\" AND subvta.MARC_OID_MARC = \" + dtoe.getOidMarca() );\n }\n if( dtoe.getOidCanal() != null){\n query.append(\" AND subvta.CANA_OID_CANA = \" + dtoe.getOidCanal() );\n }\n if( dtoe.getOidSGV() != null ){\n query.append(\" AND subvta.OID_SUBG_VENT = \" + dtoe.getOidSGV() );\n }\n if( dtoe.getOidRegion() != null ){\n query.append(\" AND cdetal.ZORG_OID_REGI = \" + dtoe.getOidRegion() ); \n }\n if( dtoe.getOidZona() != null ){\n query.append(\" AND cdetal.ZZON_OID_ZONA = \" + dtoe.getOidZona() ); \n }\n if( dtoe.getOidSeccion() != null ){\n query.append(\" AND cdetal.ZSCC_OID_SECC = \" + dtoe.getOidSeccion() );\n }\n if( dtoe.getOidTerritorio() != null ){\n query.append(\" AND cdetal.TERR_OID_TERR = \" + dtoe.getOidTerritorio() );\n }\n UtilidadesLog.debug(\"query \" + query.toString() );\n try \n { rs = bs.dbService.executeStaticQuery(query.toString());\n }\n catch (Exception ex) \n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n }\t\n \n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerResumen(DTOResumen dtoe): Salida\");\n \n return rs; \n }", "@Override\n\tprotected Object mapObj(ResultSet rs) throws SQLException {\n\t\tTbTravelerInfo tbTravelerInfo = new TbTravelerInfo() ;\n\t\ttbTravelerInfo.setId(rs.getInt(\"id\")) ;\n\t\ttbTravelerInfo.setIntBillId(rs.getInt(\"intBillId\")) ;\n\t\ttbTravelerInfo.setStrCountry(rs.getString(\"strCountry\")) ;\n\t\ttbTravelerInfo.setStrIndentyNumber(rs.getString(\"strIndentyNumber\")) ;\n\t\ttbTravelerInfo.setStrTravelerName(rs.getString(\"strTravelerName\")) ;\n\t\ttbTravelerInfo.setStrSex(rs.getString(\"strSex\")) ;\n\t\ttbTravelerInfo.setStrBirthday(rs.getString(\"strBirthday\")) ;\n\t\treturn tbTravelerInfo;\n\t}", "public AtendimentoJuridicoDTO toDTO(AtendimentoJuridicoEntity entity){\n\t\tAtendimentoJuridicoDTO dto = new AtendimentoJuridicoDTO();\n\t\tBeanUtils.copyProperties(entity, dto); \n\t\treturn dto ;\n\t}", "public List<Usuario> getAll(){\n String sql = \"SELECT * FROM usuarios \" +\n \" INNER JOIN ciudades ON ciudades.id = usuarios.id_ciudad\" +\n \" INNER JOIN provincias ON provincias.id = usuarios.id_provincia\" +\n \" INNER JOIN paises ON paises.id = usuarios.id_pais\";\n try {\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(sql);\n List<Usuario> usuarios = new ArrayList<Usuario>();\n while (rs.next()){\n Ciudad ciudad = new Ciudad(rs.getInt(\"ciudades.id\"),rs.getString(\"ciudades.nombre\"));\n\n Provincia provincia = new Provincia(rs.getInt(\"provincias.id\"),rs.getString(\"provincias.nombre\"));\n\n Pais pais = new Pais(rs.getInt(\"paises.id\"),rs.getString(\"paises.nombre\"));\n\n Usuario usuario = new Usuario(rs.getString(\"nombre\"),rs.getString(\"apellido\"),\n rs.getString(\"direccion\"), rs.getString(\"telefono\"),\n ciudad, provincia, pais, rs.getString(\"email\"),\n rs.getString(\"username\"), rs.getString(\"contrasena\"));\n usuario.setId(rs.getInt(\"usuarios.id\"));\n usuarios.add(usuario);\n }\n return usuarios;\n }catch (SQLException e){\n e.printStackTrace();\n }\n return null;\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 }", "protected void populateDto(Opportunities dto, ResultSet rs) throws SQLException\r\n\t{\r\n\t\tdto.setId( rs.getInt( COLUMN_ID ) );\r\n\t\tdto.setSupplierId( rs.getInt( COLUMN_SUPPLIER_ID ) );\r\n\t\tdto.setUniqueProducts( rs.getString( COLUMN_UNIQUE_PRODUCTS ) );\r\n\t\tdto.setPortfolio( rs.getString( COLUMN_PORTFOLIO ) );\r\n\t\tdto.setRecongnisation( rs.getString( COLUMN_RECONGNISATION ) );\r\n\t\tdto.setKeyWords( rs.getString( COLUMN_KEY_WORDS ) );\r\n\t\tdto.setDateCreation( rs.getTimestamp(COLUMN_DATE_CREATION ) );\r\n\t\tdto.setDateModification( rs.getTimestamp(COLUMN_DATE_MODIFICATION ) );\r\n\t\treset(dto);\r\n\t}", "public List<PersonaDTO> consultarPersonas() ;", "protected ProductosPuntoVenta fetchSingleResult(ResultSet rs)\r\n throws SQLException {\r\n if (rs.next()) {\r\n ProductosPuntoVenta dto = new ProductosPuntoVenta();\r\n populateDto(dto, rs);\r\n return dto;\r\n }\r\n else {\r\n return null;\r\n }\r\n\r\n }", "public Collection cargarDeObjetivo(int codigoCiclo, int codigoPlan, int objetivo, int periodo, String estado) {\n/* 121 */ Collection resultados = new ArrayList();\n/* */ try {\n/* 123 */ String s = \"select m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion as Nombretipomedicion, Est.Descripcion as Nombreestado, Um.Descripcion as Nombre_Unidad_Medida, SUM(CASE WHEN ac.NUMERO IS NOT NULL THEN 1 ELSE 0 END) acciones from Cal_Plan_Metas m left join Am_Acciones Ac on( m.Codigo_Ciclo = Ac.Codigo_Ciclo and m.Codigo_Plan = Ac.Codigo_Plan and m.Codigo_Meta = Ac.Codigo_Meta and Ac.Asociado = 'P'), \\t\\t Sis_Multivalores Tm, \\t\\t Sis_Multivalores Est, \\t\\t Sis_Multivalores Um where m.Tipo_Medicion = Tm.Valor and Tm.Tabla = 'CAL_TIPO_MEDICION' and m.Estado = Est.Valor and Est.Tabla = 'CAL_ESTADO_META' and m.Unidad_Medida = Um.Valor and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META' and m.codigo_ciclo=\" + codigoCiclo + \" and m.codigo_plan=\" + codigoPlan + \" and m.codigo_objetivo=\" + objetivo;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 180 */ if (estado.length() > 0) {\n/* 181 */ s = s + \" and m.estado='A'\";\n/* */ }\n/* */ \n/* 184 */ if (periodo == 1) {\n/* 185 */ s = s + \" and m.mes01='S'\";\n/* */ }\n/* 187 */ else if (periodo == 2) {\n/* 188 */ s = s + \" and m.mes02='S'\";\n/* */ }\n/* 190 */ else if (periodo == 3) {\n/* 191 */ s = s + \" and m.mes03='S'\";\n/* */ }\n/* 193 */ else if (periodo == 4) {\n/* 194 */ s = s + \" and m.mes04='S'\";\n/* */ }\n/* 196 */ else if (periodo == 5) {\n/* 197 */ s = s + \" and m.mes05='S'\";\n/* */ }\n/* 199 */ else if (periodo == 6) {\n/* 200 */ s = s + \" and m.mes06='S'\";\n/* */ }\n/* 202 */ else if (periodo == 7) {\n/* 203 */ s = s + \" and m.mes07='S'\";\n/* */ }\n/* 205 */ else if (periodo == 8) {\n/* 206 */ s = s + \" and m.mes08='S'\";\n/* */ }\n/* 208 */ else if (periodo == 9) {\n/* 209 */ s = s + \" and m.mes09='S'\";\n/* */ }\n/* 211 */ else if (periodo == 10) {\n/* 212 */ s = s + \" and m.mes10='S'\";\n/* */ }\n/* 214 */ else if (periodo == 11) {\n/* 215 */ s = s + \" and m.mes11='S'\";\n/* */ }\n/* 217 */ else if (periodo == 12) {\n/* 218 */ s = s + \" and m.mes12='S'\";\n/* */ } \n/* */ \n/* 221 */ s = s + \" GROUP BY m.Codigo_Ciclo, m.Codigo_Plan, m.Codigo_Meta, m.Codigo_Objetivo, m.Descripcion, m.Valor_Meta, m.Tipo_Medicion, m.Frecuencia_Medicion, m.Justificacion, m.Estado, m.Fecha_Insercion, m.Usuario_Insercion, m.Fecha_Modificacion, m.Usuario_Modificacion, m.Mes01, m.Mes02, m.Mes03, m.Mes04, m.Mes05, m.Mes06, m.Mes07, m.Mes08, m.Mes09, m.Mes10, m.Mes11, m.Mes12, m.Fuente_Dato, m.Aplica_En, m.Unidad_Medida, m.Valor_Minimo, m.Valor_Maximo, m.Tipo_Grafica, Tm.Descripcion, Est.Descripcion, Um.Descripcion order by m.descripcion\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 259 */ boolean rtaDB = this.dat.parseSql(s);\n/* 260 */ if (!rtaDB) {\n/* 261 */ return resultados;\n/* */ }\n/* */ \n/* 264 */ this.rs = this.dat.getResultSet();\n/* 265 */ while (this.rs.next()) {\n/* 266 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 269 */ catch (Exception e) {\n/* 270 */ e.printStackTrace();\n/* 271 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarTodos \", e);\n/* */ } \n/* 273 */ return resultados;\n/* */ }", "public ArrayList<oferta> listadoOfertaxComercio(int idComercio) {\n ArrayList<oferta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\"select o.nombre, o.cantidad, o.precio , c.id_comercio, id_oferta, descripcion, fecha, o.ruta, o.estado\\n\"\n + \"from Comercios c \\n\"\n + \"join Ofertas o on c.id_comercio = o.id_comercio \\n\"\n + \"where c.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cantidad = rs.getInt(2);\n Float precio = rs.getFloat(3);\n int id = rs.getInt(4);\n int ido = rs.getInt(5);\n String descripcion = rs.getString(6);\n String fecha = rs.getString(7);\n String ruta = rs.getString(8);\n boolean estado = rs.getBoolean(9);\n\n rubro rf = new rubro(0, \"\", true, \"\", \"\");\n comercio c = new comercio(\"\", \"\", \"\", id, true, \"\", \"\", rf, \"\");\n oferta o = new oferta(ido, nombreO, cantidad, precio, c, estado, descripcion, fecha,ruta );\n\n lista.add(o);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }", "public ArrayList<AnuncioDTO> ObtenerAnunciosUsuario(String email){\n ArrayList<AnuncioDTO> ret = new ArrayList<AnuncioDTO>();\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"getByEmailPropietario.Anuncio\"));\n ps.setString(1, email);\n ResultSet rs=ps.executeQuery();\n while(rs.next()){\n int id=rs.getInt(1);\n TipoAnuncio tipoAnuncio=TipoAnuncio.valueOf(rs.getString(2));\n String titulo = rs.getString(3);\n String cuerpo = rs.getString(4);\n Date fechaPublicacion = new Date(rs.getDate(5).getTime());\n Date fechaFin=null;\n if(tipoAnuncio.equals(TipoAnuncio.Flash)){\n fechaFin= new Date(rs.getDate(6).getTime());\n }\n String emailPropietario = rs.getString(7);\n EstadoAnuncio estadoAnuncio = EstadoAnuncio.valueOf(rs.getString(8));\n \n ArrayList<String>temas = null;\n if(tipoAnuncio.equals(TipoAnuncio.Tematico)){\n temas=new ArrayList<String>();\n ArrayList<String>temasId = null;\n temasId=new ArrayList<String>(Arrays.asList(rs.getString(9).split(\",\")));\n InteresesDAO interesesDAO = new InteresesDAO(sqlPropertiesPath);\n Hashtable<Integer,String> intereses = interesesDAO.DevolverIntereses();\n for(String interes : temasId){\n temas.add(intereses.get(Integer.parseInt(interes)));\n }\n }\n ArrayList<String> destinatarios= ObtenerDestinatariosAnuncio(id);\n AnuncioDTO anuncioDTO=new AnuncioDTO(id, tipoAnuncio, titulo, cuerpo, fechaPublicacion, fechaFin, emailPropietario, estadoAnuncio, temas,destinatarios);\n\n ret.add(anuncioDTO);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return ret;\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 }", "public List<ReporteRetencionesResumido> getRetencionSRIResumido(int mes, int anio, int idOrganizacion)\r\n/* 27: */ {\r\n/* 28: 58 */ String sql = \"SELECT new ReporteRetencionesResumido(f.fechaEmisionRetencion,f.fechaRegistro,f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero),\\tf.identificacionProveedor,c.descripcion,CASE WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE then (SUM(COALESCE(dfp.baseImponibleRetencion, 0)+COALESCE(dfp.baseImponibleTarifaCero, 0) +COALESCE(dfp.baseImponibleDiferenteCero, 0)+COALESCE(dfp.baseImponibleNoObjetoIva, 0))) else COALESCE(dfp.baseImponibleRetencion, 0) end,dfp.porcentajeRetencion,dfp.valorRetencion,\\tc.codigo,CASE WHEN c.tipoConceptoRetencion = :tipoConceptoIVA then 'IVA' WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE then 'FUENTE' WHEN c.tipoConceptoRetencion = :tipoConceptoISD then 'ISD' else '' end,f.numeroRetencion) FROM DetalleFacturaProveedorSRI dfp INNER JOIN dfp.facturaProveedorSRI f INNER JOIN dfp.conceptoRetencionSRI c WHERE MONTH(f.fechaRegistro) =:mes\\tAND YEAR(f.fechaRegistro) =:anio AND f.estado!=:estadoAnulado AND f.indicadorSaldoInicial!=true AND f.idOrganizacion = :idOrganizacion\\tGROUP BY c.codigo,f.numero,f.puntoEmision,\\tf.establecimiento, f.identificacionProveedor,\\tc.descripcion,dfp.baseImponibleRetencion,dfp.porcentajeRetencion,dfp.valorRetencion,f.fechaEmisionRetencion,f.fechaRegistro,f.fechaEmision,f.numeroRetencion, c.tipoConceptoRetencion ORDER BY c.tipoConceptoRetencion, c.codigo \";\r\n/* 29: */ \r\n/* 30: */ \r\n/* 31: */ \r\n/* 32: */ \r\n/* 33: */ \r\n/* 34: */ \r\n/* 35: */ \r\n/* 36: */ \r\n/* 37: */ \r\n/* 38: */ \r\n/* 39: */ \r\n/* 40: */ \r\n/* 41: */ \r\n/* 42: */ \r\n/* 43: */ \r\n/* 44: */ \r\n/* 45: 75 */ Query query = this.em.createQuery(sql);\r\n/* 46: 76 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 47: 77 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 48: 78 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 49: 79 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 50: 80 */ query.setParameter(\"tipoConceptoIVA\", TipoConceptoRetencion.IVA);\r\n/* 51: 81 */ query.setParameter(\"tipoConceptoFUENTE\", TipoConceptoRetencion.FUENTE);\r\n/* 52: 82 */ query.setParameter(\"tipoConceptoISD\", TipoConceptoRetencion.ISD);\r\n/* 53: 83 */ List<ReporteRetencionesResumido> lista = query.getResultList();\r\n/* 54: */ \r\n/* 55: 85 */ return lista;\r\n/* 56: */ }", "protected void populateDto(PaypalIpn dto, ResultSet rs) throws SQLException\r\n\t{\r\n\t\tdto.setPaypalIpnId( rs.getLong( COLUMN_PAYPAL_IPN_ID ) );\r\n\t\tdto.setResponse( rs.getString( COLUMN_RESPONSE ) );\r\n\t\tdto.setTxnId( rs.getString( COLUMN_TXN_ID ) );\r\n\t\tdto.setTxnType( rs.getString( COLUMN_TXN_TYPE ) );\r\n\t\tdto.setPaymentStatus( rs.getString( COLUMN_PAYMENT_STATUS ) );\r\n\t\tdto.setPaymentAmount( rs.getString( COLUMN_PAYMENT_AMOUNT ) );\r\n\t\tdto.setPayerEmail( rs.getString( COLUMN_PAYER_EMAIL ) );\r\n\t\tdto.setPaymentDate( rs.getTimestamp(COLUMN_PAYMENT_DATE ) );\r\n\t\tdto.setIpnDate( rs.getTimestamp(COLUMN_IPN_DATE ) );\r\n\t\tdto.setKeys( rs.getString( COLUMN_KEYS ) );\r\n\t\tdto.setVals( rs.getString( COLUMN_VALS ) );\r\n\t}", "Object getDados(long id);", "public List<MunicipioDTO> listaMunicipios() throws ClassNotFoundException, SQLException{\n\n\t\t// ativa conexão com BD\n\t\tConnection connection = ConexaoUtil.getInstance().getConnection();\n \n\t\tPreparedStatement statement = null;\n ResultSet rs = null;\n\n List<MunicipioDTO> municipios = new ArrayList<>();\n\n try {\n \t\n\t\t\tString sql = \"SELECT DISTINCT NOME FROM Municipio ORDER BY Nome\";\n\t\t\t// realiza uma ponte entre o java e o BD\n\t\t\tstatement = connection.prepareStatement(sql); \t\n \t\n //stmt = connection.prepareStatement(\"SELECT * FROM topicos\");\n rs = statement.executeQuery();\n\n while (rs.next()) {\n\n \tMunicipioDTO municipio = new MunicipioDTO();\n \t\t\n \t//recupera valores de acordo com as colunas do BD\n// \tmunicipio.setId(rs.getInt(\"Id\"));\n// \tmunicipio.setCodigo(rs.getInt(\"Codigo\"));\n \tmunicipio.setNome(rs.getString(\"Nome\"));\n// \tmunicipio.setUf(rs.getString(\"Uf\"));\n \t//adiciona o municipio na lista de municipios\n \tmunicipios.add(municipio);\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(MunicipioDAO.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n //ConnectionFactory.closeConnection(con, stmt, rs);\n \tstatement.close();\n }\n\n return municipios;\n\n }", "public List<Object> queryAll(String col_name, String dto) {\n\t\tDBCollection dbc = db.getCollection(col_name);\n DBCursor cur = dbc.find();\n List<Object> res = new ArrayList<Object>();\n try {\n \twhile (cur.hasNext()) {\n \t\tDBObject doc = cur.next();\n \t\ttry {\n \t\t\tres.add(Util.deserialize(doc, dto));\n \t\t} catch(InvocationTargetException ite) {\n \t\t\tite.printStackTrace();\n \t\t} \t\t\n \t\t//System.out.println(doc);\n }\n } catch(ClassNotFoundException cnfe) {\n \tcnfe.printStackTrace();\n } catch(InstantiationException ie) {\n \tie.printStackTrace();\n } catch(IllegalAccessException iae) {\n \tiae.printStackTrace();\n }\n return res;\n\t}", "public List<UsuarioDTO> consultarUsuarios();", "public List<UsuarioDTO> consultarUsuarios();", "public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }", "@Override\r\n\tpublic List<EmployeeBo> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\tList<EmployeeBo> lisbo= new ArrayList<EmployeeBo>();\r\n\t\tEmployeeBo bo=null;\r\n\t\twhile(rs.next())\r\n\t\t{\r\n\t\t\tbo=new EmployeeBo();\r\n\t\t\tbo.setEmpno(rs.getInt(1));\r\n\t\t\tbo.setEname(rs.getString(2));\r\n\t\t\tbo.setJob(rs.getString(3));\r\n\t\t\tbo.setSalary(rs.getInt(4));\r\n\t\t\tlisbo.add(bo);\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\t\r\n\t\t\r\n\t\t\r\n\t\treturn lisbo;\r\n\t}", "private Map<Long, List<ObligacionCoactivoDTO>> consultaObligacionesComparendo() {\n logger.debug(\"CoactivoEJB::consultaObligacionesComparendo()\");\n Map<Long, List<ObligacionCoactivoDTO>> obligacionesDeudor = new HashMap<>();\n StringBuilder consulta = new StringBuilder();\n consulta.append(\"SELECT \");\n consulta.append(\"p.id_cartera, \");\n consulta.append(\"ca.saldo_capital, \");\n consulta.append(\"ca.saldo_interes, \");\n consulta.append(\"p.numero_obligacion, \");\n consulta.append(\"p.id_deudor, \");\n consulta.append(\"p.fecha_obligacion, \");\n consulta.append(\"p.id_funcionario, \");\n consulta.append(\"p.id_cargue_coactivo, \");\n consulta.append(\"p.id_precoactivo \");\n consulta.append(\"FROM precoactivo p \");\n consulta.append(\"JOIN cartera ca on ca.id_cartera = p.id_cartera \");\n consulta.append(\"WHERE p.id_estado_precoactivo = :estadoAprobado \");\n consulta.append(\"AND p.codigo_tipo_obligacion = :tipoComparendo \");\n\n Query query = em.createNativeQuery(consulta.toString());\n query.setParameter(\"estadoAprobado\", EnumEstadoPrecoactivo.AUTORIZADO.getValue());\n query.setParameter(\"tipoComparendo\", EnumTipoObligacion.COMPARENDO.getValue());\n @SuppressWarnings({ \"unchecked\" })\n List<Object[]> lsObligacionesComparendos = Utilidades.safeList(query.getResultList());\n\n for (Object[] obligacionComparendo : lsObligacionesComparendos) {\n int i = 0;\n BigInteger idCartera = (BigInteger) obligacionComparendo[i++];\n BigDecimal saldoCapital = (BigDecimal) obligacionComparendo[i++];\n BigDecimal saldoInteres = (BigDecimal) obligacionComparendo[i++];\n String numObligacion = (String) obligacionComparendo[i++];\n Long idDeudor = ((BigInteger) obligacionComparendo[i++]).longValue();\n Date fechaObligacion = (Date) obligacionComparendo[i++];\n Integer idFuncionario = (Integer) obligacionComparendo[i++];\n Long idCargue = ((BigInteger) obligacionComparendo[i++]).longValue();\n Long idPrecoactivo = ((BigInteger) obligacionComparendo[i++]).longValue();\n\n CoactivoDTO coactivo = new CoactivoDTO();\n coactivo.setCargueCoactivo(new CargueCoactivoDTO(idCargue));\n coactivo.setFuncionario(new FuncionarioDTO(idFuncionario));\n coactivo.setPersona(new PersonaDTO(idDeudor));\n // Arma obligacion que va a entrar a coactivo\n ObligacionCoactivoDTO obligacion = new ObligacionCoactivoDTO();\n obligacion.setCodigoTipoObligacion(EnumTipoObligacion.COMPARENDO.getValue());\n obligacion.setCartera(new CarteraDTO(idCartera.longValue()));\n obligacion.setNumeroObligacion(numObligacion);\n obligacion.setCoactivo(coactivo);\n obligacion.setFechaObligacion(fechaObligacion);\n obligacion.setValorObligacion(saldoCapital);\n obligacion.setValorInteresMoratorios(saldoInteres);\n obligacion.setIdPrecoativo(idPrecoactivo);\n if (!obligacionesDeudor.containsKey(idDeudor)) {\n obligacionesDeudor.put(idDeudor, new ArrayList<ObligacionCoactivoDTO>());\n }\n obligacionesDeudor.get(idDeudor).add(obligacion);\n }\n return obligacionesDeudor;\n }", "private static Carta mapper(ResultSet rs) throws SQLException {\n\t\tCarta c = new Carta();\r\n\r\n\t\t// cogemos los valres de las columnas\r\n\t\tint colId = rs.getInt(\"id\");\r\n\t\tString colNombre = rs.getString(\"nombre\");\r\n\t\tString colNumero_id = rs.getString(\"numero_id\");\r\n\t\tString colColeccion = rs.getString(\"coleccion\");\r\n\t\tint colColeccionId = rs.getInt(\"id_coleccion\");\r\n\r\n\t\tString colTipo = rs.getString(\"tipo\");\r\n\t\tint colTipoId = rs.getInt(\"id_tipo\");\r\n\t\tString colGrado = rs.getString(\"grado\");\r\n\t\tint colGradoId = rs.getInt(\"id_grado\");\r\n\r\n\t\tint colCopias = rs.getInt(\"copias\");\r\n\r\n\t\tc.setId(colId);\r\n\t\tc.setNumero_id(colNumero_id);\r\n\t\tc.setNombre(colNombre);\r\n\t\tc.setCopias(colCopias);\r\n\r\n\t\tColeccion coleccion = new Coleccion();\r\n\t\tcoleccion.setId(colColeccionId);\r\n\t\tcoleccion.setNombre(colColeccion);\r\n\t\tc.setColeccion(coleccion);\r\n\r\n\t\tTipo tipo = new Tipo();\r\n\t\ttipo.setId(colTipoId);\r\n\t\ttipo.setNombre(colTipo);\r\n\t\tc.setTipo(tipo);\r\n\r\n\t\tGrado grado = new Grado();\r\n\t\tgrado.setId(colGradoId);\r\n\t\tgrado.setNombre(colGrado);\r\n\t\tc.setGrado(grado);\r\n\r\n\t\treturn c;\r\n\t}", "private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }", "public List<Usuarios> getUsuarios(){ //retorna una lista con todos los Usuarios en la database\n List<Usuarios> listaUsuarios = new ArrayList<Usuarios>();\n conexion = base.GetConnection();\n try{\n String consulta = \"select Cedula from usuarios\";\n PreparedStatement select = conexion.prepareStatement(consulta);\n boolean r = select.execute();\n if(r){\n ResultSet result = select.getResultSet();\n while(result.next()){\n Usuarios usuario = new Usuarios(result.getString(1));\n System.out.println(usuario);\n listaUsuarios.add(usuario);\n }\n result.close();\n }\n conexion.close();\n }catch(SQLException ex){\n System.out.println(ex.toString());\n }\n return listaUsuarios;\n}", "List<CapituloDTO> findAll();", "public PerfilVO buscarPerfilUsuario(long idUsuario) throws SQLException {\n\t\tlogger.debug(\"Inicia metodo - buscarPerfilUsuario\");\n\t\tCONSULTA_PERFIL_CANDIDATO = \"BUSCAR_PERFIL_USUARIO\";\n\t\tLong[] parametros = { idUsuario };\n\t\tCachedRowSet cachedRowSet = executeQuery(parametros);\n\n\t\tPerfilVO perfil = null;\n\t\ttry {\n\t\t\tif (cachedRowSet.next()) {\n\t\t\t\tperfil = new PerfilVO();\n\t\t\t\tperfil.setIdCandidato(cachedRowSet.getLong(1));\n\t\t\t\tperfil.setIdUsuario(idUsuario);\n\t\t\t\tperfil.setIdOficina(cachedRowSet.getLong(2));\n\t\t\t\tperfil.setCurp(cachedRowSet.getString(3));\n\t\t\t\tperfil.setNombre(cachedRowSet.getString(4));\n\t\t\t\tperfil.setApellido1(cachedRowSet.getString(5));\n\t\t\t\tperfil.setApellido2(cachedRowSet.getString(6));\n\t\t\t\tperfil.setIdGenero(cachedRowSet.getInt(7));\n\t\t\t\tperfil.setFechaNacimiento(cachedRowSet.getDate(8));\n\t\t\t\tperfil.setEdad(obtenEdad(cachedRowSet.getDate(8)));\n\t\t\t\tperfil.setIdEntidadNacimiento(cachedRowSet.getLong(9));\n\t\t\t\tperfil.setEntidadNacimiento(cachedRowSet.getString(10));\n\t\t\t\tperfil.setIdEstadoCivil(cachedRowSet.getLong(11));\n\t\t\t\tperfil.setIdTipoDiscapacidad(cachedRowSet.getLong(12));\n\t\t\t\tperfil.setConfidencialidad(cachedRowSet.getInt(13));\n\t\t\t\tperfil.setContactoCorreo(cachedRowSet.getInt(14));\n\t\t\t\tperfil.setContactoTelefono(cachedRowSet.getInt(15));\n\t\t\t\tperfil.setHoraContactoIni(cachedRowSet.getLong(16));\n\t\t\t\tperfil.setHoraContactoFin(cachedRowSet.getLong(17));\n\t\t\t\tperfil.setIdRecibeOferta(cachedRowSet.getInt(18));\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tperfil.setIdTrabaja(Utils.validarCandidatoEmpleadoActualmente(cachedRowSet.getInt(19)));\n\t\t\t\tperfil.setIdRazonBusqueda(Utils.validarCandidatoRazonBusqueda(perfil.getIdTrabaja(), cachedRowSet.getLong(20)));\n\t\t\t\tperfil.setInicioBusqueda(cachedRowSet.getDate(21));\n\t\t\t\tperfil.setCorreoElectronico(cachedRowSet.getString(22));\n\t\t\t\tperfil.setEstiloCV(cachedRowSet.getInt(23));\n\t\t\t\tperfil.setIdMedioPortal(cachedRowSet.getLong(24));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.error(e);\n\t\t\tthrow new SQLException(e);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.error(e);\n\t\t}\n\t\treturn perfil;\n\t}", "public static String buscarTodosLosLibros() throws Exception{ //BUSCARtODOS no lleva argumentos\r\n //primero: nos conectamos a oracle con la clase conxion\r\n \r\n Connection con=Conexion.conectarse(\"system\",\"system\");\r\n //segundo: generamos un statemenr de sql con la conexion anterior\r\n Statement st=con.createStatement();\r\n //3: llevamos a cabo la consulta select \r\n ResultSet res=st.executeQuery(\"select * from persona\"); //reset arreglo enmutado de java estructura de datos\r\n System.out.println(\"depues del select\");\r\n int indice=0;\r\n ArrayList<persona> personas=new ArrayList<persona>();\r\n while(res.next()){ //del primero hasta el ultimo prod que vea SI PONGO SECUENCIA NO ENTRA AL WHILE\r\n Integer id= res.getInt(1); \r\n String nombre=res.getString(2);\r\n String empresa=res.getString(3);\r\n Integer edad=res.getInt(4);\r\n String telefono=res.getString(5);\r\n \r\n ///llenamos el arrayList en cada vuelta\r\n personas.add(new persona(id,nombre,empresa,edad,telefono));\r\n \r\n System.out.println(\"estoy en el array list despues del select\");\r\n }\r\n \r\n //el paso final, transformamos a objeto json con jackson\r\n ObjectMapper maper=new ObjectMapper(); //mapeo a objeto jackson\r\n \r\n st.close();\r\n con.close();\r\n System.out.println(\"convirtiendo el json\");\r\n return maper.writeValueAsString(personas);\r\n \r\n }", "@Override\n public Collection<FasciaOrariaBean> doRetrieveAll() throws SQLException {\n Connection con = null;\n PreparedStatement statement = null;\n String sql = \"SELECT * FROM fasciaoraria\";\n ArrayList<FasciaOrariaBean> collection = new ArrayList<>();\n try {\n con = DriverManagerConnectionPool.getConnection();\n statement = con.prepareStatement(sql);\n System.out.println(\"DoRetriveAll\" + statement);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n FasciaOrariaBean bean = new FasciaOrariaBean();\n bean.setId(rs.getInt(\"id\"));\n bean.setFascia(rs.getString(\"fascia\"));\n collection.add(bean);\n }\n return collection;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n try {\n\n statement.close();\n DriverManagerConnectionPool.releaseConnection(con);\n\n } catch (SQLException e) {\n\n e.printStackTrace();\n }\n }\n return collection;\n }", "List<InvoiceDTO> fetchAll();", "public List<SpasaCRN> obtenerSpasaFiltros() {\n\n if (conectado) {\n try {\n String bool = \"false\";\n List<SpasaCRN> filtrosCRNs = new ArrayList();\n\n String Query = \"SELECT * FROM `spasa_filtros` WHERE anio = YEAR(NOW()) AND ciclo = CURRENT_CICLO() ;\";\n Logy.mi(\"Query: \" + Query);\n Statement st = Conexion.createStatement();\n ResultSet resultSet;\n resultSet = st.executeQuery(Query);\n while (resultSet.next()) {\n\n SpasaCRN crn = new SpasaCRN();\n SpasaMateria mat = new SpasaMateria();\n crn.setCodigoProf(resultSet.getString(\"usuario\")); //modificado ahora que se cambio in a String\n crn.setCrnCpr(resultSet.getString(\"crn\"));\n String mc = resultSet.getString(\"materia_cod\");\n if (mc != null && !mc.isEmpty() && !mc.equals(\"null\")) {\n crn.setMateriaRuta(mc);\n mat.setMateriaRuta(mc);\n }\n String m = resultSet.getString(\"materia_nom\");\n if (m != null && !m.isEmpty() && !m.equals(\"null\")) {\n mat.setNombreMat(m);\n }\n String d = resultSet.getString(\"departamento_nom\");\n if (d != null && !d.isEmpty() && !d.equals(\"null\")) {\n mat.setNombreDepto(d);\n }\n String dia = resultSet.getString(\"dia\");\n if (dia != null && !dia.isEmpty() && !dia.equals(\"null\")) {\n crn.setDiaHr(dia);\n }\n String h = resultSet.getString(\"hora\");\n if (h != null && !h.isEmpty() && !h.equals(\"null\")) {\n crn.setHiniHr(h);\n }\n crn.setMateria(mat);\n filtrosCRNs.add(crn);\n }\n\n return filtrosCRNs;\n\n } catch (SQLException ex) {\n Logy.me(\"No se pudo consultar tabla spasa_filtros : \" + ex.getMessage());\n return null;\n }\n } else {\n Logy.me(\"No se ha establecido previamente una conexion a la DB\");\n return null;\n }\n }", "private RespuestaVO extractRespuestaFromResultSet(ResultSet rs) throws SQLException {\n\t\tRespuestaVO respuesta = new RespuestaVO(\n\t\t\trs.getLong(\"idRespuesta\"),\n\t\t\trs.getLong(\"idPregunta\"),\n\t\t\trs.getString(\"enunciado\"),\n\t\t\trs.getBoolean(\"correcta\")\n\t\t);\n\t\treturn respuesta;\n\t}", "MVoucherDTO selectByPrimaryKey(String id);", "QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;", "DireccionDTO consultarDireccion(long idDireccion);", "public DTOSalida obtenerAccesosPlantilla(DTOOID dto) throws MareException\n { \n UtilidadesLog.info(\"DAOGestionComisiones.obtenerAccesosPlantilla(DTOOID dto): Entrada\"); \n StringBuffer query = new StringBuffer();\n RecordSet rs = new RecordSet(); \n DTOSalida dtos = new DTOSalida();\n BelcorpService bs = UtilidadesEJB.getBelcorpService(); \n query.append(\" SELECT DISTINCT A.ACCE_OID_ACCE OID, B.VAL_I18N DESCRIPCION \");\n query.append(\" FROM COM_PLANT_COMIS_ACCES A, V_GEN_I18N_SICC B, COM_PLANT_COMIS C \"); \n query.append(\" WHERE \");\n if(dto.getOid() != null) {\n query.append(\" A.PLCO_OID_PLAN_COMI = \" + dto.getOid() + \" AND \");\n }\n query.append(\" A.PLCO_OID_PLAN_COMI = C.OID_PLAN_COMI AND \"); \n query.append(\" C.CEST_OID_ESTA = \" + ConstantesCOM.ESTADO_ACTIVO + \" AND \"); \n \n query.append(\" B.ATTR_ENTI = 'SEG_ACCES' AND \"); \n query.append(\" B.ATTR_NUM_ATRI = 1 AND \");\n query.append(\" B.IDIO_OID_IDIO = \" + dto.getOidIdioma() + \" AND \");\n query.append(\" B.VAL_OID = A.ACCE_OID_ACCE \");\n query.append(\" ORDER BY DESCRIPCION \"); \n UtilidadesLog.debug(query.toString()); \n try {\n rs = bs.dbService.executeStaticQuery(query.toString());\n if(rs != null)\n dtos.setResultado(rs);\n }catch (Exception e) {\n UtilidadesLog.error(e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n } \n UtilidadesLog.info(\"DAOGestionComisiones.obtenerAccesosPlantilla(DTOOID dto): Salida\"); \n return dtos;\n }", "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: */ }", "private QueryResult mapResultSet(ResultSet rs) throws SQLException {\n QueryResult results = new QueryResult();\n\n ResultSetMetaData metadata = rs.getMetaData();\n\n int columnCount = metadata.getColumnCount();\n for (int i = 0; i < columnCount; i++) {\n results.addColumnName(metadata.getColumnLabel(i + 1), i);\n }\n\n List<QueryResultRow> rows = new ArrayList<QueryResultRow>();\n while (rs.next()) {\n Object[] columnValues = new Object[columnCount];\n for (int i = 1; i <= columnCount; i++) {\n columnValues[i - 1] = rs.getObject(i);\n\n }\n rows.add(new QueryResultRow(columnValues));\n }\n results.setRows(rows.toArray(new QueryResultRow[] {}));\n return results;\n }", "public Conserto buscarCodigo(int codigo) throws SQLException{\r\n Conserto conserto = null;\r\n conecta = FabricaConexao.conexaoBanco();\r\n sql = \"select * from conserto join carro on carchassi = concarchassi join modelo on oficodigo = conoficodigo where concodigo = ? \";\r\n pstm = conecta.prepareStatement(sql);\r\n pstm.setInt(1, codigo);\r\n rs = pstm.executeQuery();\r\n \r\n if(rs.next()){\r\n conserto = new Conserto();\r\n conserto.setCodigo(rs.getInt(\"concodigo\"));\r\n conserto.setDataEntrada(rs.getDate(\"condataentrada\"));\r\n conserto.setDataSaida(rs.getDate(\"condatasaida\"));\r\n \r\n //instanciando o carro\r\n Carro carro = new Carro();\r\n carro.setChassi(rs.getString(\"carchassi\"));\r\n carro.setPlaca(rs.getString(\"carplaca\"));\r\n carro.setAno(rs.getInt(\"carano\"));\r\n carro.setCor(rs.getString(\"carcor\"));\r\n carro.setStatus(rs.getInt(\"carstatus\"));\r\n conserto.setCarro(carro);\r\n \r\n //instanciando a oficina\r\n Oficina oficina = new Oficina();\r\n oficina.setCodigo(rs.getInt(\"oficodigo\"));\r\n oficina.setNome(rs.getString(\"ofinome\"));\r\n conserto.setOficina(oficina);\r\n }\r\n FabricaConexao.fecharConexao();\r\n \r\n return conserto;\r\n }", "public Object[][] Consulta(String Comsql) {\n Object Datos[][] = null;\n try {\n PreparedStatement pstm = con.prepareStatement(Comsql);\n /* declarando ResulSet que va a contener el resultado de la ejecucion del Query */\n ResultSet rs = pstm.executeQuery();\n /*se ubica en el ultimo registro, para saber cuantos ahi */\n rs.last();\n /*para saber el numero de filas y columnas del ResulSet */\n ResultSetMetaData rsmd = rs.getMetaData();\n /*aqui muestra la cantidad de filas y colmnas ahi */\n int numCols = rsmd.getColumnCount();\n int numFils = rs.getRow();\n /*cojemos nuestro objeto datos y le damos formato, eso es igual a numero de filas y numero de columnas */\n Datos = new Object[numFils][numCols];\n /* nos ubicamos antes de la primera fila */\n rs.beforeFirst();\n\n /*j= filas\n i= columnas\n */\n int j = 0;\n /*recorremos los datos del RS\n */\n while (rs.next()) {\n /*i siempre se inicializa en cero; la condicion va hasta que i sea menor que e numcol; y aumenta de 1 en 1 */\n for (int i = 0; i < numCols; i++) {\n /*aqui le asignamos valor a nuestro arreglo */\n Datos[j][i] = rs.getObject(i + 1);\n }\n j++;\n }\n pstm.close();\n rs.close();\n } catch (Exception e) {\n System.out.println(\"Error : \" + e.getMessage());\n }\n return Datos;\n }", "public ArrayList<LoteriaDto> listarLoteriaXNombre(String nombre) {\n\n ArrayList<LoteriaDto> lista = new ArrayList();\n Connection con =null;\n try {\n con=Recurso.Conexion.getPool().getDataSource().getConnection();\n String sql = \"SELECT codigo,nombre,dia,hora,minuto,ruta FROM loteria where nombre='\" + nombre + \"'\";\n PreparedStatement str;\n str = con.prepareStatement(sql);\n ResultSet rs = str.executeQuery();\n\n while (rs.next()) {\n LoteriaDto dto = new LoteriaDto();\n dto.setCodigo(rs.getInt(1));\n dto.setNombre(rs.getString(2));\n dto.setDia(rs.getInt(3));\n dto.setHora(rs.getInt(4));\n dto.setMinuto(rs.getInt(5));\n dto.setRuta(rs.getString(6));\n lista.add(dto);\n\n }\n str.close();\n rs.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }finally{\n if(con!=null){\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(GestorLoteria.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return lista;\n }\n\n }", "public UsuarioDTO consultarUsuario(String idUsuario);", "public PersonaDTO consultarPersona(Long idPersona) ;", "@Override\n\tpublic List<Persona> getPersona() throws SQLException {\n\t\tList<Persona> listaPersona1 = new ArrayList<Persona>();\n\t\t\n Single<List<DbRow>> rows = dbClient.execute(exec -> exec\n \t\t.createQuery(\"select * from persona;\").execute()).collectList();\n \n try {\n List<DbRow> listasPersonas = rows.get();\n \n if(!listasPersonas.isEmpty()) {\n \t\n \tfor(int i=0; i< listasPersonas.size(); i++) {\n \t\tPersona p = new Persona();\n \t\tp.setId((int)listasPersonas.get(i).column(\"id\").value());\n \t\tp.setNombre((String)listasPersonas.get(i).column(\"nombre\").value());\n \t\tp.setDireccion((String)listasPersonas.get(i).column(\"direccion\").value());\n \t\tp.setCorreo((String)listasPersonas.get(i).column(\"correo\").value()); \t\t\n \t\tlistaPersona1.add(p);\n \t}\n \t\n }\n // listasPersonas.forEach(System.out::println);\n \n } catch (InterruptedException e) {\n e.printStackTrace();\n return null;\n } catch (ExecutionException e) {\n e.printStackTrace();\n return null;\n }\n return listaPersona1;\n\t\t\n\t}", "public List<VentaDet> generar(Periodo mes){\n\t\tString sql=ReplicationUtils.resolveSQL(mes,\"ALMACE\",\"ALMFECHA\")+\" AND ALMTIPO=\\'FAC\\' ORDER BY ALMSUCUR,ALMNUMER,ALMSERIE\";\r\n\t\tVentasDetMapper mapper=new VentasDetMapper();\r\n\t\tmapper.setBeanClass(getBeanClass());\r\n\t\tmapper.setOrigen(\"ALMACE\");\r\n\t\tmapper.setPropertyColumnMap(getPropertyColumnMap());\r\n\t\tList<VentaDet> rows=getFactory().getJdbcTemplate(mes).query(sql,mapper);\r\n\t\tlogger.info(\"VentaDet obtenidas : \"+rows.size());\r\n\t\treturn rows;\r\n\t}", "@Override\n\tpublic UsersDto getData(String id) {\n\t\tUsersDto dto=session.selectOne(\"users.getData\",id);\n\t\treturn dto;\n\t}", "@Override\n public Jurusan mapRow(ResultSet rs, int rowNum) throws SQLException {\n Jurusan jurusan=new Jurusan();\n jurusan.setId(rs.getInt(\"id\"));\n jurusan.setNama(rs.getString(\"nama\"));\n jurusan.setIdFakultas(rs.getInt(\"idFakultas\"));\n\n\n Fakultas fakultas=new Fakultas();\n fakultas.setId(rs.getInt(\"idFakultas\"));\n fakultas.setNama(rs.getString(\"namaFakultas\"));\n jurusan.setFakultas(fakultas);\n return jurusan;\n }", "public Object[][]getDatos()\n {\n int registros=0;\n //obtener la cantidad de registros que hay en la tabla pacientes\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"SELECT count(1) as total FROM paciente\");//cuenta el total de registros de la tabla pacientes\n ResultSet res=pstm.executeQuery();\n res.next();\n registros = res.getInt(\"total\");\n res.close();\n }\n catch(SQLException e)\n {\n System.out.println(e); \n }\n \n Object[][] data=new String [registros][9];\n \n //realizamos la consulta sql y llenamos los datos del Object\n \n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"SELECT * FROM paciente ORDER BY IdPaciente\");\n ResultSet res=pstm.executeQuery();\n \n int i=0;\n \n while (res.next())\n {\n String estIdPaciente = res.getString(\"IdPaciente\");\n String estDNI = res.getString(\"DNI\");\n String estNombres = res.getString(\"nombres\");\n String estApellidos = res.getString(\"apellidos\");\n String estDireccion = res.getString(\"direccion\");\n String estUbig = res.getString(\"ubigeo\");\n \n String estTelefono1 = res.getString(\"telefono1\");\n String estTelefono2 = res.getString(\"telefono2\");\n String estFechaNac = res.getString(\"edad\"); \n \n data [i][0]=estIdPaciente;\n data [i][1]=estDNI;\n data [i][2]=estNombres;\n data [i][3]=estApellidos;\n data [i][4]=estDireccion;\n data [i][5]=estUbig;\n \n data [i][6]=estTelefono1;\n data [i][7]=estTelefono2;\n data [i][8]=estFechaNac;\n \n i++;//retorna el ciclo hasta finalizar\n \n }\n \n res.close();\n }\n catch(SQLException e)\n {\n System.out.println(e);\n }\n return data;\n }", "public PerfilVO buscarPerfil(long idCandidato) throws SQLException {\n\t\tlogger.debug(\"Inicia metodo - buscarPerfil\");\n\t\tCONSULTA_PERFIL_CANDIDATO = \"BUSCAR_PERFIL\";\n\t\tLong[] parametros = { idCandidato };\n\t\tCachedRowSet cachedRowSet = executeQuery(parametros);\n\n\t\tPerfilVO perfil = null;\n\t\ttry {\n\t\t\tif (cachedRowSet.next()) {\n\t\t\t\tperfil = new PerfilVO();\n\t\t\t\tperfil.setIdCandidato(idCandidato);\n\t\t\t\tint i = 0;\n\t\t\t\tperfil.setIdUsuario(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setIdOficina(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setCurp(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setNombre(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setApellido1(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setApellido2(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setIdGenero(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setFechaNacimiento(cachedRowSet.getDate(++i));\n\t\t\t\tperfil.setEdad(obtenEdad(perfil.getFechaNacimiento()));\t// Calcula edad con el campo fechaNacimiento\n\t\t\t\tperfil.setIdEntidadNacimiento(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setEntidadNacimiento(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setIdEstadoCivil(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setIdTipoDiscapacidad(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setConfidencialidad(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setContactoCorreo(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setContactoTelefono(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setHoraContactoIni(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setHoraContactoFin(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setIdRecibeOferta(cachedRowSet.getInt(++i));\n\t\t\t\t\n\t\t\t\tperfil.setIdTrabaja(Utils.validarCandidatoEmpleadoActualmente(cachedRowSet.getInt(++i)));\n\t\t\t\tperfil.setIdRazonBusqueda(Utils.validarCandidatoRazonBusqueda(perfil.getIdTrabaja(), cachedRowSet.getLong(++i)));\n\t\t\t\tperfil.setDescripcionOtroMotivoBusq(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setInicioBusqueda(cachedRowSet.getDate(++i));\n\t\t\t\tperfil.setCorreoElectronico(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setEstiloCV(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setIdMedioPortal(cachedRowSet.getLong(++i));\n\t\t\t\tperfil.setIdEstatusPPC(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setApoyoProspera(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setDiscapacidades(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setIdLicencia(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setFolioProspera(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setFolioIntegranteProspera(cachedRowSet.getString(++i));\n\t\t\t\tperfil.setDisponibilidadRadicarPais(cachedRowSet.getInt(++i));\n\t\t\t\tperfil.setUltimaActualizacion(cachedRowSet.getString(\"fUltAct\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.error(e);\n\t\t\tthrow new SQLException(e);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.error(e);\n\t\t}\n\t\treturn perfil;\n\t}", "public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }", "protected void populateDto(VwStatsPerGame dto, ResultSet rs) throws SQLException\n\t{\n\t\tdto.setPlayerId( rs.getInt( COLUMN_PLAYER_ID ) );\n\t\tdto.setTeamId( rs.getInt( COLUMN_TEAM_ID ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setTeamIdNull( true );\n\t\t}\n\t\t\n\t\tdto.setGameId( rs.getInt( COLUMN_GAME_ID ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setGameIdNull( true );\n\t\t}\n\t\t\n\t\tdto.setPlayerName( rs.getString( COLUMN_PLAYER_NAME ) );\n\t\tdto.setFirstLastname( rs.getString( COLUMN_FIRST_LASTNAME ) );\n\t\tdto.setSecondLastname( rs.getString( COLUMN_SECOND_LASTNAME ) );\n\t\tdto.setPlayerNumber( rs.getInt( COLUMN_PLAYER_NUMBER ) );\n\t\tdto.setPoints( rs.getInt( COLUMN_POINTS ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setPointsNull( true );\n\t\t}\n\t\t\n\t\tdto.setYellowCards( rs.getInt( COLUMN_YELLOW_CARDS ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setYellowCardsNull( true );\n\t\t}\n\t\t\n\t\tdto.setRedCards( rs.getInt( COLUMN_RED_CARDS ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setRedCardsNull( true );\n\t\t}\n\t\t\n\t}", "D mapToDTO(E entity);", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "public DTOSalida obtenerCanalesPlantillas(DTOBelcorp dto) throws MareException\n { \n UtilidadesLog.info(\"DAOGestionComisiones.obtenerCanalesPlantillas(DTOBelcorp dto): Entrada\");\n StringBuffer query = new StringBuffer();\n RecordSet rs = new RecordSet();\n DTOSalida dtos = new DTOSalida();\n BelcorpService bs = UtilidadesEJB.getBelcorpService(); \n query.append(\" SELECT DISTINCT A.CANA_OID_CANA OID, B.VAL_I18N DESCRIPCION \");\n query.append(\" FROM COM_PLANT_COMIS A, V_GEN_I18N_SICC B \"); \n query.append(\" WHERE \");\n query.append(\" A.CEST_OID_ESTA = \" + ConstantesCOM.ESTADO_ACTIVO + \" AND \"); \n query.append(\" B.ATTR_ENTI = 'SEG_CANAL' AND \"); \n query.append(\" B.ATTR_NUM_ATRI = 1 AND \"); \n query.append(\" B.IDIO_OID_IDIO = \" + dto.getOidIdioma() + \" AND \");\n query.append(\" B.VAL_OID = A.CANA_OID_CANA \");\n query.append(\" ORDER BY DESCRIPCION \"); \n UtilidadesLog.debug(query.toString()); \n try {\n rs = bs.dbService.executeStaticQuery(query.toString());\n if(rs != null)\n dtos.setResultado(rs);\n }catch (Exception e) {\n UtilidadesLog.error(e);\n throw new MareException(e, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n } \n UtilidadesLog.info(\"DAOGestionComisiones.obtenerCanalesPlantillas(DTOBelcorp dto): Salida\");\n return dtos;\n }", "@Override\r\n\tpublic TableDTO getDTO(Table entity) {\n\t\treturn null;\r\n\t}", "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 }", "public RecordSet obtenerTerritoriosporZonas(DTOBelcorp dtoIn) throws MareException {\n UtilidadesLog.info(\"DAOZON.obtenerTerritoriosporZonas(DTOBelcorp dtoIn): Entrada\");\n\n \n StringBuffer consulta = new StringBuffer();\n consulta.append(\" SELECT DISTINCT z.OID_ZONA, ta.terr_oid_terr, t.cod_terr \");\n consulta.append(\" FROM zon_terri t, zon_terri_admin ta, zon_regio r, \");\n consulta.append(\" zon_zona z, zon_sub_geren_venta sgv, zon_secci s \");\n consulta.append(\" WHERE sgv.pais_oid_pais = \" + dtoIn.getOidPais());\n consulta.append(\" AND r.zsgv_oid_subg_vent = sgv.oid_subg_vent \");\n consulta.append(\" AND r.oid_regi = z.zorg_oid_regi \");\n consulta.append(\" AND s.zzon_oid_zona = z.oid_zona \");\n consulta.append(\" AND s.oid_secc = ta.zscc_oid_secc \");\n consulta.append(\" AND t.oid_terr = ta.terr_oid_terr \");\n consulta.append(\" AND sgv.ind_acti = 1 \");\n consulta.append(\" AND sgv.ind_borr = 0 \");\n consulta.append(\" AND r.ind_acti = 1 \");\n consulta.append(\" AND r.ind_borr = 0 \");\n consulta.append(\" AND z.ind_acti = 1 \");\n consulta.append(\" AND z.ind_borr = 0 \");\n consulta.append(\" AND s.ind_acti = 1 \");\n consulta.append(\" AND s.ind_borr = 0 \");\n consulta.append(\" AND t.ind_borr = 0 \");\n consulta.append(\" AND ta.ind_borr = 0 \");\n consulta.append(\" ORDER BY t.cod_terr \");\n\n // Parametros de la consulta\n \n \n BelcorpService bs = UtilidadesEJB.getBelcorpService();\n RecordSet resultado = null;\n\n try {\n resultado = bs.dbService.executeStaticQuery(consulta.toString());\n } catch (Exception e) {\n codigoError = CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS;\n throw new MareException(e, UtilidadesError.armarCodigoError(codigoError));\n }\n\n UtilidadesLog.info(\"DAOZON.obtenerTerritoriosporZonas(DTOBelcorp dtoIn): Salida\");\n return resultado;\n }", "private ArrayList<Order> extractProductFromResultSet(ResultSet rs){\n ArrayList<Order> orderList = new ArrayList<>();\n\n try {\n Order order = new Order();\n ProdOrder ps;\n ProductDao pd;\n Product p;\n AddressDao ad;\n Address a;\n int i = 0;\n\n while (rs.next()){\n\n // creo inserisco dati ordine generale\n order = new Order();\n i++;\n order.setOrderID(rs.getInt(\"OrderID\"));\n order.setUserID(rs.getInt(\"UserID\"));\n order.setDate(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").parse(rs.getString(\"Date\")));\n //System.out.println(\"[ INFO ] Data: \" + order.getDate().toString());\n // creo prodotto con dati venditore\n pd = new ProductDaoImpl();\n p = pd.getProduct(rs.getInt(\"ProductID\"),rs.getInt(\"ShopID\"));\n //System.out.println(\"[ INFO ] Prodotto : \" + p.getProductName());\n\n // creo indirizzo spedizione\n ad = new AddressDaoImpl();\n a = ad.getAddress(rs.getInt(\"AddressID\"));\n\n // creo l'ordine del prodotto particolare e lo aggiungo alla lista dell'ordine generale\n ps = extractProdOrder(rs,p,a);\n\n // aggiungo l'ordine del prodotto al corrispettivo ordine generale\n order.getProductList().add(ps);\n //System.out.println(order.toString());\n // ciclo sugli elementi successivi dell'ordine (basta aggiungere gli progelem alla lista ordine)\n while (rs.next()){\n\n // se trovo un elemento che non appartiene più all'ordine corrente\n if (rs.getInt(\"OrderID\") != order.getOrderID()){\n // finalizzo l'ordine\n System.out.println(\"[ INFO ] Ordine \" + order.getOrderID() + \" aggiunto\");\n orderList.add(order);\n // torno all'elemento precedente (perchè poi nel while esterno ritorno avanti di uno e dichiaro un nuovo ordine)\n rs.previous();\n // esco dal while interno (ovvero non ho più prodotti relativi all'ordine corrente)\n break;\n }\n\n // creo prodotto con dati venditore\n pd = new ProductDaoImpl();\n p = pd.getProduct(rs.getInt(\"ProductID\"), rs.getInt(\"ShopID\"));\n //System.out.println(\"[ INFO ] Prodotto : \" + p.getProductName());\n\n // creo indirizzo spedizione\n ad = new AddressDaoImpl();\n a = ad.getAddress(rs.getInt(\"AddressID\"));\n\n // creo l'ordine del prodotto particolare e lo aggiungo alla lista dell'ordine generale\n ps = extractProdOrder(rs,p,a);\n\n // aggiungo l'ordine del prodotto al corrispettivo ordine generale\n order.getProductList().add(ps);\n }\n\n }\n if (i > 0){\n orderList.add(order);\n //System.out.println(\"[ INFO ] Ordine \" + order.getOrderID() + \" aggiunto\");\n }\n\n return orderList;\n } catch (SQLException | ParseException e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n public DycpCompensacionDTO encontrar(String numControl) throws SIATException {\n try {\n String query =\n \" SELECT C.*, S.*, TT.*, SI.*, PER.*, CON.*, IMP.*, CON.DESCRIPCION, PER.DESCRIPCION as DESCRIPCION_PERIODO, IMP.DESCRIPCION as DESCRIPCION_IMPUESTO \"\n + \"FROM DYCP_COMPENSACION C, DYCP_SERVICIO S, DYCC_TIPOTRAMITE TT, DYCT_SALDOICEP SI, \"\n + \"DYCC_PERIODO PER, DYCC_CONCEPTO CON, DYCC_IMPUESTO IMP \"\n + \"WHERE C.NUMCONTROL = S.NUMCONTROL \"\n + \"AND TT.IDTIPOTRAMITE = S.IDTIPOTRAMITE AND SI.IDSALDOICEP = C.IDSALDOICEPORIGEN \"\n + \"AND PER.IDPERIODO = SI.IDPERIODO AND CON.IDCONCEPTO = SI.IDCONCEPTO AND IMP.IDIMPUESTO = CON.IDIMPUESTO \" \n + \"AND C.NUMCONTROL = ? ORDER BY C.IDSALDOICEPDESTINO DESC\";\n TipoTramiteMapper mapperTipoTramite = new TipoTramiteMapper();\n DycpServicioMapper mapperServicio = new DycpServicioMapper();\n mapperServicio.setMapperTipoTramite(mapperTipoTramite);\n CompensacionMapper mapper = new CompensacionMapper();\n DyctSaldoIcepMapper mapperSaldoIcep = new DyctSaldoIcepMapper();\n PeriodoMapper mapperPeriodo = new PeriodoMapper();\n ConceptoMapper mapperConcepto = new ConceptoMapper();\n ImpuestoMapper mapperImpuesto = new ImpuestoMapper();\n mapperSaldoIcep.setMapperPeriodo(mapperPeriodo);\n mapperConcepto.setMapperImpuesto(mapperImpuesto);\n mapperSaldoIcep.setMapperConcepto(mapperConcepto);\n mapper.setMapperServicio(mapperServicio);\n mapper.setMapperSaldoIcepOrigen(mapperSaldoIcep);\n return jdbcTemplateDYC.queryForObject(query, new Object[] { numControl }, mapper);\n } catch (DataAccessException dae) {\n log.error(ConstantesDyC1.TEXTO_1_ERROR_DAO + dae.getMessage() + ConstantesDyC1.TEXTO_2_ERROR_DAO +\n SQLOracleDyC.CONSULTA_DYCP_COMPENSACION + ConstantesDyC1.TEXTO_3_ERROR_DAO + \"numcontrol\" + numControl +\n ConstantesDyC1.TEXTO_8_CAUSAS + dae.getCause());\n throw new SIATException(dae);\n }\n }", "public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Empresa\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tEmpresa entity = new Empresa();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,EmpresaDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Seguridad.Empresa.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t*/\r\n\t\t\t\t} else {\r\n\t\t\t\t\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseEmpresa(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }", "public void actualizarFiltrarEstadoRequisicion(Requisicion req) throws Exception{\n String carnet = req.getCarnetEmpleado();\n\n java.util.Date utilDate = req.getFechaNueva();\n java.sql.Date fechaConvertida = new java.sql.Date(utilDate.getTime()); \n\n List<Requisicion> requisicion = new ArrayList<>();\n \n Connection miConexion = null;\n Statement miStatement = null;\n ResultSet miResultset = null; \n\n \n //Establecer la conexion\n miConexion = origenDatos.getConexion();\n \n \n //Verificar si existe empleado\n String sqlEmpleado = \"Select CARNETEMPLEADO FROM EMPLEADO WHERE CARNETEMPLEADO = '\"+carnet+\"'\";\n miStatement = miConexion.createStatement();\n miResultset = miStatement.executeQuery(sqlEmpleado);\n \n if(miResultset.next()){\n \n String empleado = carnet;\n \n \n String sqlDepto = \"select d.NOMBREDEPARTAMENTO from departamento d \" + \n \"inner join catalagopuesto c on d.codigodepartamento = c.codigodepartamento \" + \n \"inner join empleado e on c.codigopuesto = e.codigopuesto where e.carnetempleado ='\"+carnet+\"'\";\n \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(sqlDepto);\n //Crear sentencia SQL y Statement\n miResultset.next();\n String nomdepto = miResultset.getString(\"NOMBREDEPARTAMENTO\");\n \n String miSQl = \"select r.NUMREQ, r.FECPEDIDOREQ, r.FECENTREGAREQ, r.AUTORIZADO, e.CARNETEMPLEADO, e.NOMBREEMPLEADO, e.APELLIDOEMPLEADO, d.NOMBREDEPARTAMENTO \" + \n \"from requisicion r inner join empleado e on r.carnetempleado =e.carnetempleado \" + \n \"inner join catalagopuesto c on e.codigopuesto =c.codigopuesto \" + \n \"inner join departamento d on c.codigodepartamento = d.codigodepartamento \" + \n \"where r.AUTORIZADO = 1 and d.NOMBREDEPARTAMENTO='\"+nomdepto+\"' and r.FECPEDIDOREQ >=TO_DATE('\"+fechaConvertida+\"', 'YYYY/MM/DD HH:MI:SS') order by r.FECPEDIDOREQ\";\n \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(miSQl);\n \n while(miResultset.next()){\n int numReq = miResultset.getInt(\"NUMREQ\");\n Date fechaPedido = miResultset.getDate(\"FECPEDIDOREQ\");\n Date fechaEntrega = miResultset.getDate(\"FECENTREGAREQ\"); \n String carnetEmpleado = miResultset.getString(\"CARNETEMPLEADO\");\n String nombreEmpleado = miResultset.getString(\"NOMBREEMPLEADO\"); \n String apellidoEmpleado = miResultset.getString(\"APELLIDOEMPLEADO\");\n String nombreDepartamento = miResultset.getString(\"NOMBREDEPARTAMENTO\"); \n\n //*************************ACTUALIZAR**************************\n Connection miConexion1 = null;\n PreparedStatement miStatement1 = null;\n \n //Obtener la conexion\n \n miConexion1 = origenDatos.getConexion();\n \n //Crear sentencia sql que inserte la requisicion a la base\n String misql = \"UPDATE requisicion SET autorizado = ? WHERE numreq = ?\";\n \n miStatement1 = miConexion1.prepareStatement(misql);\n \n //Establecer los parametros para insertar la requisicion \n if(\"aceptado\".equals(req.getEstadoAut())) {\n miStatement1.setInt(1, 0);\n }else{\n miStatement1.setInt(1, 1);\n } \n\n miStatement1.setInt(2, numReq);//se obtendra dentro del while\n \n //Ejecutar la instruccion sql\n miStatement1.execute(); \n //Requisicion temporal = new Requisicion(numReq, fechaPedido, fechaEntrega, carnetEmpleado, nombreEmpleado, apellidoEmpleado, nombreDepartamento);\n //requisicion.add(temporal);\n }\n \n }\n //return requisicion; \n }", "public PosicionDTO consultarInformacionSatelite(){\n logger.debug(\"MensajeService::PosicionDTO()\");\n PosicionDTO posicionDTO = new PosicionDTO();\n CoordenadasDTO posiciones = asignarCoordenadas();\n if(posiciones != null){\n posicionDTO.setCoordenadasDTO(posiciones);\n List<String[]> mensajeSatelites = obtenerMensajes(listaNave);\n String mensaje = organizarMensaje(mensajeSatelites);\n posicionDTO.setMensaje(mensaje);\n return posicionDTO;\n }\n return posicionDTO;\n }", "@Override\n public Collection<Curso> getAll() {\n Collection<Curso> retValue = new ArrayList();\n\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT c.idcurso, c.idprofesor, p.nombre as nombreprofesor,p.apellido as apellido, c.nombrecurso, c.claveprofesor,\\n\" +\n\" c.clavealumno from curso c, persona p\\n\" +\n\"where c.idprofesor = p.id\");\n \n\n rs = pstmt.executeQuery();\n\n while (rs.next()) {\n String nombre=\"\\\"\"+rs.getString(\"nombreprofesor\")+\" \"+rs.getString(\"apellido\")+\"\\\"\";\n retValue.add(new Curso(rs.getInt(\"idcurso\"), rs.getString(\"nombrecurso\"), rs.getInt(\"idprofesor\"), nombre,rs.getString(\"claveprofesor\"), rs.getString(\"clavealumno\")));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n }", "public abstract DTO toDTO(M model);", "public List<tipoDetalle> obtenerDetallesBD(){\n List<tipoDetalle> detalles=new ArrayList<>();\n try{\n //Obteniendo el ID del auto desde la activity de Mostrar_datos\n String idAuto;\n Bundle extras=getIntent().getExtras();\n if(extras!=null)\n {\n idAuto=extras.getString(\"id_auto\");\n Log.e(\"auto\",\"el auto id es= \"+idAuto);\n ResultSet rs = (ResultSet) TNT.mostrarDetalles(idAuto);\n while (rs.next()){\n detalles.add(new tipoDetalle(rs.getString(\"id\"), rs.getString(\"nombre\"), rs.getString(\"fecha_entrada\"), rs.getString(\"fecha_salida\"), rs.getString(\"fecha_terminacion\"), rs.getString(\"estado\"), rs.getString(\"descripcion\"), rs.getString(\"costo\")));\n }\n }\n }catch(SQLException e){\n Toast.makeText(getApplicationContext(),e.getMessage(),Toast.LENGTH_SHORT).show();\n }\n return detalles;\n }", "List<CarritoProductoResponseDTO> consultarCarritoCompras(String userName,TipoMoneda tipoMoneda);", "@Override\n\tpublic List<ExamenDTO> obtenerTodos() {\n\t\tList<ExamenDTO> examenes= new ArrayList<ExamenDTO>();\n\t\tdao.findAll().forEach(e -> examenes.add(Mapper.getDTOFromEntity(e)));\n\t\treturn examenes;\n\t}", "public GetUsuarioDTO convierteDTO(Integer id){\n Optional<Usuario> usuario = usuarioRepository.findById(id);\n return usuario.map(usuarioDTOConverter::convertToDTO).orElseThrow(()->new UsuarioNotFoundException(id));\n }", "@Override\n public List<DuLieuBaoCaoDTO> findAll() {\n log.debug(\"Request to get all DuLieuBaoCaos\");\n return duLieuBaoCaoRepository.findAll().stream()\n .map(duLieuBaoCaoMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }" ]
[ "0.6967713", "0.6672351", "0.6613871", "0.6608693", "0.6602357", "0.6547215", "0.6535449", "0.6509901", "0.6505981", "0.6443515", "0.6426558", "0.6390775", "0.6350513", "0.6336461", "0.6325201", "0.63045436", "0.6282379", "0.6275875", "0.6273302", "0.62431276", "0.6223335", "0.6217016", "0.62095153", "0.6164322", "0.61627567", "0.6162353", "0.61582637", "0.6157317", "0.6136052", "0.61134624", "0.6098122", "0.6093183", "0.607005", "0.60651463", "0.6052468", "0.6051235", "0.6033982", "0.60174656", "0.60161924", "0.601419", "0.6014098", "0.59956837", "0.59650904", "0.59639114", "0.5947816", "0.59417117", "0.59378916", "0.5930379", "0.59241134", "0.59241134", "0.59210247", "0.59198797", "0.59198684", "0.5911268", "0.5891287", "0.58825165", "0.5868015", "0.5860055", "0.5845528", "0.58436906", "0.58363837", "0.5834862", "0.58340734", "0.58321893", "0.5824104", "0.5819041", "0.58021003", "0.5792885", "0.57797426", "0.57734895", "0.5771965", "0.57676095", "0.5766688", "0.576278", "0.57598704", "0.5736026", "0.57024527", "0.56977844", "0.56961435", "0.56839174", "0.56817067", "0.5678569", "0.5672486", "0.5670263", "0.5663594", "0.5662782", "0.56580085", "0.56570274", "0.5656349", "0.5656239", "0.5655535", "0.56545335", "0.5650213", "0.56446177", "0.56424284", "0.56423056", "0.56396365", "0.5635652", "0.5634064", "0.56326026" ]
0.67887956
1
Restablece los atributos modificados en el DTO
protected void reset(ProductosPuntoVenta dto) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AtendimentoJuridicoDTO toDTO(AtendimentoJuridicoEntity entity){\n\t\tAtendimentoJuridicoDTO dto = new AtendimentoJuridicoDTO();\n\t\tBeanUtils.copyProperties(entity, dto); \n\t\treturn dto ;\n\t}", "Persona PersonaDTOToPersona(PersonaDTO personaDTO);", "PersonaDTO PersonaToPersonaDTO(Persona persona);", "private List<AtividadeOcorrenciaDTO> getAtividadesOcorrencias(Serializable idOcorrencia) {\n\n\t\tList<AtividadeOcorrencia> atvsOcs = ocorrenciaService.getAtividadesOcorrencias(idOcorrencia);\n\n\t\tList<AtividadeOcorrenciaDTO> lst = new ArrayList<AtividadeOcorrenciaDTO>();\n\t\tfor (AtividadeOcorrencia atvOc : atvsOcs) {\n\t\t\tAtividadeOcorrenciaDTO atividadeOcorrenciaREST = new AtividadeOcorrenciaDTO(atvOc.getId().toString(),\n\t\t\t\t\tatvOc.getId(), DataUtil.formataData(atvOc.getDataInicio()).toString(),\n\t\t\t\t\tatvOc.getDataFim().toString(), atvOc.getObservacao(), atvOc.getStatus().getNome(),\n\t\t\t\t\tatvOc.getNumeroItem().toString() + \" - \" + atvOc.getNome(), atvOc.getUsuarioResponsavel().getId().toString());\n\n\t\t\tlst.add(atividadeOcorrenciaREST);\n\t\t}\n\n\t\treturn lst;\n\t}", "private void setAllAttributesFromController() {\n obsoData.setSupplier(supplier);\n \n obsoData.setEndOfOrderDate(endOfOrderDate);\n obsoData.setObsolescenceDate(obsolescenceDate);\n \n obsoData.setEndOfSupportDate(endOfSupportDate);\n obsoData.setEndOfProductionDate(endOfProductionDate);\n \n obsoData.setCurrentAction(avlBean.findAttributeValueListById(\n ActionObso.class, actionId));\n obsoData.setMtbf(mtbf);\n \n obsoData.setStrategyKept(avlBean.findAttributeValueListById(\n Strategy.class,\n strategyId));\n obsoData.setContinuityDate(continuityDate);\n \n obsoData.setManufacturerStatus(avlBean.findAttributeValueListById(\n ManufacturerStatus.class, manufacturerStatusId));\n obsoData.setAirbusStatus(avlBean.findAttributeValueListById(\n AirbusStatus.class, airbusStatusId));\n \n obsoData.setLastObsolescenceUpdate(lastObsolescenceUpdate);\n obsoData.setConsultPeriod(avlBean.findAttributeValueListById(\n ConsultPeriod.class, consultPeriodId));\n \n obsoData.setPersonInCharge(personInCharge);\n obsoData.setCommentOnStrategy(comments);\n }", "public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}", "@Override\r\n public ViviendaEntity toEntity() {\r\n ViviendaEntity viviendaEntity = super.toEntity();\r\n if (contratos != null) {\r\n List<ContratoEntity> contratosEntity = new ArrayList<>();\r\n for (ContratoDTO dtoContrato : contratos) {\r\n contratosEntity.add(dtoContrato.toEntity());\r\n }\r\n viviendaEntity.setContratos(contratosEntity);\r\n }\r\n\r\n if (cuartos != null) {\r\n List<CuartoEntity> cuartoEntities = new ArrayList<>();\r\n for (CuartoDTO dto : cuartos) {\r\n cuartoEntities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setCuartos(cuartoEntities);\r\n }\r\n\r\n if (sitiosDeInteres != null) {\r\n List<SitioInteresEntity> entities = new ArrayList<>();\r\n for (SitioInteresDTO dto : sitiosDeInteres) {\r\n entities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setSitiosDeInteres(entities);\r\n }\r\n\r\n if (calificaciones != null) {\r\n List<CalificacionEntity> entities = new ArrayList<>();\r\n for (CalificacionDTO dto : calificaciones) {\r\n entities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setCalificaciones(entities);\r\n }\r\n\r\n if (serviciosOfrecidos != null) {\r\n viviendaEntity.setServiciosIncluidos(serviciosOfrecidos);\r\n }\r\n\r\n if (serviciosAdicionales != null) {\r\n List<ServicioAdicionalEntity> entities = new ArrayList<>();\r\n for (ServicioAdicionalDTO dto : serviciosAdicionales) {\r\n entities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setServiciosAdicionales(entities);\r\n }\r\n\r\n return viviendaEntity;\r\n }", "@Override\r\n public ExpedienteGSMDTO editarExpedienteOrdenServicio(ExpedienteGSMDTO expedienteDTO, String codigoTipoSupervisor, PersonalDTO personalDest, UsuarioDTO usuarioDTO) throws ExpedienteException {\r\n LOG.error(\"editarExpediente\");\r\n ExpedienteGSMDTO retorno= new ExpedienteGSMDTO();\r\n try {\r\n PghExpediente registro = crud.find(expedienteDTO.getIdExpediente(), PghExpediente.class);\r\n registro.setIdFlujoSiged(new PghFlujoSiged(expedienteDTO.getFlujoSiged().getIdFlujoSiged()));\r\n registro.setIdProceso(new PghProceso(expedienteDTO.getProceso().getIdProceso()));\r\n registro.setIdObligacionTipo(new PghObligacionTipo(expedienteDTO.getObligacionTipo().getIdObligacionTipo()));\r\n registro.setAsuntoSiged(expedienteDTO.getAsuntoSiged());\r\n registro.setIdUnidadSupervisada(new MdiUnidadSupervisada(expedienteDTO.getUnidadSupervisada().getIdUnidadSupervisada()));\r\n registro.setIdEmpresaSupervisada(new MdiEmpresaSupervisada(expedienteDTO.getEmpresaSupervisada().getIdEmpresaSupervisada()));\r\n registro.setDatosAuditoria(usuarioDTO);\r\n if(expedienteDTO.getObligacionSubTipo()!=null && expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()!=null){\r\n registro.setIdObligacionSubTipo(new PghObligacionSubTipo(expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()));\r\n }else{\r\n registro.setIdObligacionSubTipo(null);\r\n }\r\n crud.update(registro);\r\n retorno = ExpedienteGSMBuilder.toExpedienteDto(registro); \r\n \r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n \r\n String flagConfirmaTipoAsignacion=(!StringUtil.isEmpty(expedienteDTO.getFlagEvaluaTipoAsignacion())?Constantes.ESTADO_ACTIVO:null);\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.editarExpedienteOrdenServicio(expedienteDTO.getOrdenServicio().getIdOrdenServicio(), expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,flagConfirmaTipoAsignacion);\r\n \r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistoricoOS=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n HistoricoEstadoDTO historicoEstadoOS=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistoricoOS.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstadoOS:\"+historicoEstadoOS);\r\n \r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n \r\n }catch(Exception e){\r\n LOG.error(\"error en editarExpediente\",e);\r\n throw new ExpedienteException(e.getMessage(), e);\r\n }\r\n return retorno;\r\n }", "private void recogerDatos() {\n\t\ttry {\n\t\t\tusuSelecc.setId(etId.getText().toString());\n\t\t\tusuSelecc.setName(etNombre.getText().toString());\n\t\t\tusuSelecc.setFirstName(etPApellido.getText().toString());\n\t\t\tusuSelecc.setLastName(etSApellido.getText().toString());\n\t\t\tusuSelecc.setEmail(etCorreo.getText().toString());\n\t\t\tusuSelecc.setCustomFields(etAuth.getText().toString());\n\t\t} catch (Exception e) {\n\t\t\t// Auto-generated catch block\n\t\t\tmostrarException(e.getMessage());\n\t\t}\n\t}", "protected abstract void processDTO();", "public CambioComplementariosDTO() { }", "protected void populateDto(Utente dto, ResultSet rs) throws SQLException\n\t{\n\t\tdto.setUteId( rs.getLong( COLUMN_UTE_ID ) );\n\t\tdto.setUteCognome( rs.getString( COLUMN_UTE_COGNOME ) );\n\t\tdto.setUteNome( rs.getString( COLUMN_UTE_NOME ) );\n\t\tdto.setUteEmail( rs.getString( COLUMN_UTE_EMAIL ) );\n\t\tdto.setUtePassword( rs.getString( COLUMN_UTE_PASSWORD ) );\n\t\tdto.setUteLastLogin( rs.getDate(COLUMN_UTE_LAST_LOGIN ) );\n\t\tdto.setUteCellulare( rs.getString( COLUMN_UTE_CELLULARE ) );\n\t\tdto.setUteSesso( rs.getString( COLUMN_UTE_SESSO ) );\n\t\tdto.setUteDataNascita( rs.getDate(COLUMN_UTE_DATA_NASCITA ) );\n\t\tdto.setUteTitolo( rs.getLong( COLUMN_UTE_TITOLO ) );\n\t\tdto.setFkPaesi( rs.getLong( COLUMN_FK_PAESI ) );\n\t\tdto.setUteCartaNumero( rs.getString( COLUMN_UTE_CARTA_NUMERO ) );\n\t\tdto.setUteCartaTitolare( rs.getString( COLUMN_UTE_CARTA_TITOLARE ) );\n\t\tdto.setUteCartaScadMese( rs.getString( COLUMN_UTE_CARTA_SCAD_MESE ) );\n\t\tdto.setUteCartaScadAnno( rs.getString( COLUMN_UTE_CARTA_SCAD_ANNO ) );\n\t\tdto.setUteCartaUsaPerLav( rs.getString( COLUMN_UTE_CARTA_USA_PER_LAV ) );\n\t\tdto.setUteCartaUsaPerPremio( rs.getString( COLUMN_UTE_CARTA_USA_PER_PREMIO ) );\n\t\tdto.setUteTipologia( rs.getLong( COLUMN_UTE_TIPOLOGIA ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setUteTipologiaNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteIndirizzo( rs.getString( COLUMN_UTE_INDIRIZZO ) );\n\t\tdto.setFkComune( rs.getLong( COLUMN_FK_COMUNE ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setFkComuneNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteAzienda( rs.getString( COLUMN_UTE_AZIENDA ) );\n\t\tdto.setFkComuneAzienda( rs.getLong( COLUMN_FK_COMUNE_AZIENDA ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setFkComuneAziendaNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteTelefonoAzienda( rs.getString( COLUMN_UTE_TELEFONO_AZIENDA ) );\n\t\tdto.setUtePivaAzienda( rs.getString( COLUMN_UTE_PIVA_AZIENDA ) );\n\t\tdto.setUteFotoProfiloPath( rs.getString( COLUMN_UTE_FOTO_PROFILO_PATH ) );\n\t\tdto.setUtePagamentiOnline( rs.getString( COLUMN_UTE_PAGAMENTI_ONLINE ) );\n\t\tdto.setUteQuandoPagare( rs.getString( COLUMN_UTE_QUANDO_PAGARE ) );\n\t\tdto.setUteFumatore( rs.getString( COLUMN_UTE_FUMATORE ) );\n\t\tdto.setUtenteStelle( rs.getString( COLUMN_UTENTE_STELLE ) );\n\t\tdto.setUteCamereOspitiDisabili( rs.getString( COLUMN_UTE_CAMERE_OSPITI_DISABILI ) );\n\t\tdto.setUteRistorante( rs.getString( COLUMN_UTE_RISTORANTE ) );\n\t\tdto.setUteConnessioneInternet( rs.getString( COLUMN_UTE_CONNESSIONE_INTERNET ) );\n\t\tdto.setUteCameraNonfumatori( rs.getString( COLUMN_UTE_CAMERA_NONFUMATORI ) );\n\t\tdto.setUtePalestra( rs.getString( COLUMN_UTE_PALESTRA ) );\n\t\tdto.setUteCamereFamiliari( rs.getString( COLUMN_UTE_CAMERE_FAMILIARI ) );\n\t\tdto.setUteAnimali( rs.getString( COLUMN_UTE_ANIMALI ) );\n\t\tdto.setUteParcheggio( rs.getString( COLUMN_UTE_PARCHEGGIO ) );\n\t\tdto.setUteSpaBenessere( rs.getString( COLUMN_UTE_SPA_BENESSERE ) );\n\t\tdto.setUteWifi( rs.getString( COLUMN_UTE_WIFI ) );\n\t\tdto.setUtePiscinaCoperta( rs.getString( COLUMN_UTE_PISCINA_COPERTA ) );\n\t\tdto.setUteNavettaAeroportuale( rs.getString( COLUMN_UTE_NAVETTA_AEROPORTUALE ) );\n\t\tdto.setUteConnessioneWifiGratuita( rs.getString( COLUMN_UTE_CONNESSIONE_WIFI_GRATUITA ) );\n\t\tdto.setUteBar( rs.getString( COLUMN_UTE_BAR ) );\n\t\tdto.setUteDepositoBagagli( rs.getString( COLUMN_UTE_DEPOSITO_BAGAGLI ) );\n\t\tdto.setUteReception24ore( rs.getString( COLUMN_UTE_RECEPTION24ORE ) );\n\t\tdto.setUtePerChiPrenoti( rs.getString( COLUMN_UTE_PER_CHI_PRENOTI ) );\n\t\tdto.setFkPreferenzaValuta( rs.getLong( COLUMN_FK_PREFERENZA_VALUTA ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setFkPreferenzaValutaNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteCartaTipo( rs.getInt( COLUMN_UTE_CARTA_TIPO ) );\n\t\tif (rs.wasNull()) {\n\t\t\tdto.setUteCartaTipoNull( true );\n\t\t}\n\t\t\n\t\tdto.setUteCap( rs.getString( COLUMN_UTE_CAP ) );\n\t\tdto.setUteCapAzienda( rs.getString( COLUMN_UTE_CAP_AZIENDA ) );\n\t}", "protected void populateDto(Project dto, ResultSet rs) throws SQLException {\n\t\tdto.setId(rs.getInt(COLUMN_ID));\n\t\tdto.setOwnerId(rs.getInt(COLUMN_OWNER_ID));\n\t\tdto.setCreatorId(rs.getInt(COLUMN_CREATOR_ID));\n\t\tdto.setName(rs.getString(COLUMN_NAME));\n\t\tdto.setDescription(rs.getString(COLUMN_DESCRIPTION));\n\t\tdto.setCompanyId(rs.getInt(COLUMN_COMPANY_ID));\n\t\tif (rs.wasNull()){\n\t\t\tdto.setCompanyIdNull(true);\n\t\t}\n\n\t\tdto.setBillAddress(rs.getString(COLUMN_BILL_ADDRESS));\n\t\tdto.setBillCity(rs.getString(COLUMN_BILL_CITY));\n\t\tdto.setBillZipCode(rs.getInt(COLUMN_BILL_ZIP_CODE));\n\t\tif (rs.wasNull()){\n\t\t\tdto.setBillZipCodeNull(true);\n\t\t}\n\n\t\tdto.setBillState(rs.getString(COLUMN_BILL_STATE));\n\t\tdto.setBillCountry(rs.getString(COLUMN_BILL_COUNTRY));\n\t\tdto.setBillTelNum(rs.getString(COLUMN_BILL_TEL_NUM));\n\t\tdto.setBillFaxNum(rs.getString(COLUMN_BILL_FAX_NUM));\n\t\tdto.setIsEnable(rs.getString(COLUMN_IS_ENABLE));\n\t\tdto.setMessageBody(rs.getString(COLUMN_MESSAGE_BODY));\n\t\tdto.setEsrqmId(rs.getInt(COLUMN_ESRQM_ID));\n\t\tdto.setCreateDate(rs.getTimestamp(COLUMN_CREATE_DATE));\n\t\tdto.setLastModifiedBy(rs.getInt(COLUMN_LAST_MODIFIED_BY));\n\t\tdto.setLastModifiedOn(rs.getTimestamp(COLUMN_LAST_MODIFIED_ON));\n\t}", "@Override\n\tpublic ObraRecursoPersonaDTO updateObraRecursoPersona(\n\t\t\tObraRecursoPersonaDTO dto) {\n\t\treturn null;\n\t}", "boolean setDadosAlteracao(Object dados);", "@Override\n\tpublic boolean update(UsuarioDTO objUsuarioDTO) {\n\t\treturn false;\n\t}", "private void populateFields() {\n pedidos = pdao.listaTodos();\n cCliente = new HashSet();\n cEstado = new HashSet();\n cCidade = new HashSet();\n cFornecedor = new HashSet();\n\n for (int i = 0; i < pedidos.size(); i++) {\n cCliente.add(pedidos.get(i).getCliente().getNome());\n cEstado.add(pedidos.get(i).getCliente().getEstado());\n cCidade.add(pedidos.get(i).getCliente().getCidade());\n for (int j = 0; j < pedidos.get(i).getItens().size(); j++) {\n cFornecedor.add(pedidos.get(i).getItens().get(j).getProduto().getFornecedor().getNome());\n }\n }\n\n clientes = new ArrayList<>(cCliente);\n fornecedores = new ArrayList<>(cFornecedor);\n\n Iterator i = cCliente.iterator();\n while (i.hasNext()) {\n jCBCliente.addItem(i.next());\n }\n\n i = null;\n i = cEstado.iterator();\n while (i.hasNext()) {\n jCBEstado.addItem(i.next());\n }\n\n i = null;\n i = cCidade.iterator();\n while (i.hasNext()) {\n jCBCidade.addItem(i.next());\n }\n i = null;\n i = cFornecedor.iterator();\n while (i.hasNext()) {\n jCBFornecedor.addItem(i.next());\n }\n\n }", "@PUT\n @JWTTokenNeeded\n @Consumes({MediaType.APPLICATION_JSON})\n @Produces({MediaType.APPLICATION_JSON})\n public Response update(EscenarioDTO entidad) {\n logger.log(Level.INFO, \"entidad:{0}\", entidad);\n \n try {\n \tConciliacion entidadPadreJPA = null;\n if (entidad.getIdConciliacion() != null) {\n entidadPadreJPA = padreDAO.find(entidad.getIdConciliacion());\n if (entidadPadreJPA == null) {\n throw new DataNotFoundException(Response.Status.NOT_FOUND.getReasonPhrase() + entidad.getIdConciliacion());\n }\n }\n //Hallar La entidad actual para actualizarla\n Escenario entidadJPA = managerDAO.find(entidad.getId());\n if (entidadJPA != null) {\n entidadJPA.setFechaActualizacion(Date.from(Instant.now()));\n entidadJPA.setNombre(entidad.getNombre() != null ? entidad.getNombre() : entidadJPA.getNombre());\n entidadJPA.setImpacto(entidad.getImpacto() != null ? entidad.getImpacto() : entidadJPA.getImpacto());\n entidadJPA.setDescripcion(entidad.getDescripcion() != null ? entidad.getDescripcion() : entidadJPA.getDescripcion());\n \n Boolean actualizarConciliacion = false;\n entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n \n Conciliacion conciliacionpadreactual = null;\n \n \n if (entidadJPA.getConciliacion() != null && !Objects.equals(entidadJPA.getConciliacion().getId(), entidad.getIdConciliacion())){\n actualizarConciliacion = true;\n conciliacionpadreactual = padreDAO.find(entidadJPA.getConciliacion().getId());\n }\n //entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n managerDAO.edit(entidadJPA);\n if (actualizarConciliacion){\n if ((entidadPadreJPA != null)) {\n entidadPadreJPA.addEscenario(entidadJPA);\n padreDAO.edit(entidadPadreJPA);\n conciliacionpadreactual.removeEscenario(entidadJPA);\n padreDAO.edit(conciliacionpadreactual);\n }\n }\n LogAuditoria logAud = new LogAuditoria(this.modulo, Constantes.Acciones.EDITAR.name(), Date.from(Instant.now()), entidad.getUsername(), entidadJPA.toString());\n logAuditoriaDAO.create(logAud);\n \n ResponseWrapper wraper = new ResponseWrapper(true,I18N.getMessage(\"escenario.update\", entidad.getNombre()) ,entidadJPA.toDTO());\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }\n \n ResponseWrapper wraper = new ResponseWrapper(false,I18N.getMessage(\"escenario.notfound\", entidad.getNombre()));\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }catch (Exception e) {\n \tif(e.getCause() != null && (e.getCause() instanceof DataAlreadyExistException || e.getCause() instanceof DataNotFoundException)) {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, e.getCause().getMessage(), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}else {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, I18N.getMessage(\"general.readerror\"), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}\n }\n }", "@Override\r\n\tpublic String[] updateJsonProperties() {\n\t\treturn null;\r\n\t}", "public void ustaw(){\n\t driver.initialize(this);\n\t driver.edit(new DodajSerwisDTO());\n\t }", "public void modifica(DTOAcreditacionGafetes acreGafete) throws Exception ;", "protected void populateDto(ProductosPuntoVenta dto, ResultSet rs)\r\n throws SQLException {\r\n dto.setIdPuntoVenta(new Integer(rs.getInt(COLUMN_ID_PDV)));\r\n dto.setIdProducto(new Integer(rs.getInt(COLUMN_ID_PRODUCTO)));\r\n dto.setCantidad(rs.getInt(COLUMN_CANTIDAD));\r\n }", "@Override\n public void updateClassDescriptor(ClassDescriptor desc) {\n desc.getters = List.of();\n desc.setters = List.of();\n\n for (Iterator<Binding> iterator = desc.fields.iterator(); iterator.hasNext(); ) {\n Binding binding = iterator.next();\n \n if (!Modifier.isPublic(binding.field.getModifiers())) {\n iterator.remove();\n } else {\n Property property = getProperty(binding.annotations);\n if (property != null) {\n binding.fromNames = new String[]{property.name()};\n binding.toNames = new String[]{property.name()};\n } else {\n iterator.remove();\n }\n }\n }\n }", "public void updateNonDynamicFields() {\n\n\t}", "public List<ClienteDto> recuperaTodos(){\n\t\tList<ClienteDto> clientes = new ArrayList<ClienteDto>();\n\t\tclienteRepository.findAll().forEach(cliente -> clientes.add(ClienteDto.creaDto(cliente)));\n\t\treturn clientes;\n\t}", "public PersonaDTO(){}", "@Override\n\tpublic List<PermissionDto> getPermission() {\n\t\tList<PermissionDto> dto = permissionRepository.findAll().stream().map(permission -> {\n\t\t\tPermissionDto permissionDto = new PermissionDto();\n\t\t\tBeanUtils.copyProperties(permission, permissionDto);\n\t\t\treturn permissionDto;\n\t\t}).collect(Collectors.toList());\n\t\treturn dto;\n\t}", "@Override\n public CalificacionEntity toEntity() {\n CalificacionEntity calificacionEntity = super.toEntity();\n if (this.getHospedaje() != null) {\n calificacionEntity.setHospedaje(this.getHospedaje().toEntity());\n }\n return calificacionEntity;\n }", "public CambioComplementariosDTO(java.lang.String curpEmpleado,\n java.lang.String rfcEmpleado,\n java.lang.String primerApellido,\n java.lang.String segundoApellido,\n java.lang.String nombreEmpleado,\n java.lang.String clabeEmpleado,\n java.lang.String idBancoSar,\n java.util.Date ingresoGobFed, \n java.util.Date ingresoDependencia, \n java.util.Date terminoCargoSind, \n java.lang.String imssIssste, \n java.lang.String EMailOficial, \n java.lang.String EMailPersonal,\n java.lang.Integer idRusp, \n java.lang.String sistemaReparto, \n java.lang.String idTipoPago, \n java.lang.String idEdoCivil, \n java.lang.String idNacionalidad, \n java.lang.String idProfnCarrera, \n java.lang.Integer idNivelEscolar, \n java.lang.Integer idInstEducativa, \n java.lang.Integer idEspProtCivil, \n java.lang.Integer idInstProtcivil, \n java.util.Date fecNotDecPatr, \n java.util.Date fecIniDeclPatr, \n java.util.Date fecIngSpc, \n java.lang.String casoMuestra,\n java.lang.String discapacidad,\n java.lang.String estudiaSiNo,\n java.lang.String padreMadre,\n java.lang.String compatEmpleo,\n java.lang.String usuario,\n java.lang.Integer idInmuebleP,\n java.lang.String plazaTelOfc1,\n java.lang.String plazaExt1) { \n this.curpEmpleado = curpEmpleado;\n this.rfcEmpleado = rfcEmpleado;\n this.primerApellido = primerApellido;\n this.segundoApellido = segundoApellido;\n this.nombreEmpleado = nombreEmpleado;\n this.clabeEmpleado = clabeEmpleado;\n this.idBancoSar = idBancoSar;\n this.ingresoGobFed = ingresoGobFed;\n this.ingresoDependencia = ingresoDependencia;\n this.terminoCargoSind = terminoCargoSind;\n this.imssIssste = imssIssste;\n this.EMailOficial = EMailOficial;\n this.EMailPersonal = EMailPersonal;\n this.idRusp = idRusp;\n this.sistemaReparto = sistemaReparto;\n this.idTipoPago = idTipoPago;\n this.idEdoCivil = idEdoCivil;\n this.idNacionalidad = idNacionalidad;\n this.idProfnCarrera = idProfnCarrera;\n this.idNivelEscolar = idNivelEscolar;\n this.idInstEducativa = idInstEducativa;\n this.idEspProtCivil = idEspProtCivil;\n this.idInstProtcivil = idInstProtcivil;\n this.fecNotDecPatr = fecNotDecPatr;\n this.fecIniDeclPatr = fecIniDeclPatr;\n this.fecIngSpc = fecIngSpc;\n this.casoMuestra = casoMuestra;\n this.discapacidad = discapacidad;\n this.estudiaSiNo = estudiaSiNo;\n this.padreMadre = padreMadre;\n this.compatEmpleo = compatEmpleo;\n this.usuario = usuario;\n this.idInmuebleP = idInmuebleP;\n this.plazaTelOfc1 = plazaTelOfc1;\n this.plazaExt1 = plazaExt1;\n }", "@Mapper(componentModel = \"cdi\")\npublic interface ArchivoMapper {\n\n ArchivoDTO toDTO(Archivo source);\n List<ArchivoDTO> toDTOList(List<Archivo> sourceList);\n\n void updateFromDTO(ArchivoDTO source, @MappingTarget Archivo target);\n}", "List<D> getAllNonDeletedDto();", "public void resetIsModified() {\n MTBTypesKey_is_modified = false;\n type_is_modified = false;\n description_is_modified = false;\n tableName_is_modified = false;\n columnName_is_modified = false;\n createUser_is_modified = false;\n createDate_is_modified = false;\n updateUser_is_modified = false;\n updateDate_is_modified = false;\n }", "private void modifyEntityFromModifyEmployeeDto(ModifyEmployeeDto modifyEmployeeDto, Employee originalEmployee){\n\t\toriginalEmployee.setId(modifyEmployeeDto.id);\n\n\t\tif(modifyEmployeeDto.children != null)\n\t\t\toriginalEmployee.setChildren(modifyEmployeeDto.children);\n\n\t\tif(modifyEmployeeDto.isJustMarried != null)\n\t\t\toriginalEmployee.setJustMarried(modifyEmployeeDto.isJustMarried);\n\n\t\tif(modifyEmployeeDto.isSingleParent != null)\n\t\t\toriginalEmployee.setSingleParent(modifyEmployeeDto.isSingleParent);\n\t}", "private IngredienteDTO converteIngredienteEntityEmDTO(final IngredienteEntity ingredienteEntity) {\n\n IngredienteDTO ingredienteDTO = new IngredienteDTO();\n\n ingredienteDTO.setCodigoIngrediente(ingredienteEntity.getCodigoIngrediente());\n ingredienteDTO.setNomeIngrediente(ingredienteEntity.getNomeIngrediente());\n ingredienteDTO.setValorIngrediente(ingredienteDTO.getValorIngrediente());\n\n return ingredienteDTO;\n }", "@Override\n protected void updateProperties() {\n }", "AccountDTO coverAccountToEmpDTO(Account account);", "D update(D dto);", "protected void reset(Opportunities dto)\r\n\t{\r\n\t\tdto.setIdModified( false );\r\n\t\tdto.setSupplierIdModified( false );\r\n\t\tdto.setUniqueProductsModified( false );\r\n\t\tdto.setPortfolioModified( false );\r\n\t\tdto.setRecongnisationModified( false );\r\n\t\tdto.setKeyWordsModified( false );\r\n\t\tdto.setDateCreationModified( false );\r\n\t\tdto.setDateModificationModified( false );\r\n\t}", "private void reWriteField(HttpServletRequest request) {\n\t\t// Reesccribir campos\n\t\trequest.setAttribute(\"importe\", importe);\n\t\trequest.setAttribute(\"concepto\", concepto);\n\t\trequest.setAttribute(\"coche\", c);\n\t}", "@Test\n\tpublic void modificar() {\n\t\tGestionarComicPOJO gestionarComicPOJO = new GestionarComicPOJO();\n\t\tgestionarComicPOJO.agregarComicDTOLista(gestionarComicPOJO.crearComicDTO(\"1\", \"Dragon Ball Yamcha\",\n\t\t\t\t\"Planeta Comic\", TematicaEnum.AVENTURAS.name(), \"Manga Shonen\", 144, new BigDecimal(2100),\n\t\t\t\t\"Dragon Garow Lee\", Boolean.FALSE, LocalDate.now(), EstadoEnum.ACTIVO.name(), 20l));\n\t\tgestionarComicPOJO.agregarComicDTOLista(gestionarComicPOJO.crearComicDTO(\"2\", \"Captain America Corps 1-5 USA\",\n\t\t\t\t\"Panini Comics\", TematicaEnum.FANTASTICO.name(), \"BIBLIOTECA MARVEL\", 128, new BigDecimal(5000),\n\t\t\t\t\"Phillippe Briones, Roger Stern\", Boolean.FALSE, LocalDate.now(), EstadoEnum.ACTIVO.name(), 5l));\n\t\tgestionarComicPOJO.agregarComicDTOLista(gestionarComicPOJO.crearComicDTO(\"3\",\n\t\t\t\t\"The Spectacular Spider-Man v2 USA\", \"Panini Comics\", TematicaEnum.FANTASTICO.name(), \"MARVEL COMICS\",\n\t\t\t\t208, new BigDecimal(6225), \"Straczynski,Deodato Jr.,Barnes,Eaton\", Boolean.TRUE, LocalDate.now(),\n\t\t\t\tEstadoEnum.INACTIVO.name(), 0l));\n\n\t\tgestionarComicPOJO.modificarComicDTO(\"2\", \"Captain America\");\n\t\tAssert.assertEquals(gestionarComicPOJO.getListaComics().get(1).getNombre(), \"Captain America\");\n\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n\tpublic void updateCreator(CreatorDTO creator) {\n\t\t\n\t}", "public AtendimentoJuridicoEntity toEntity(AtendimentoJuridicoDTO dto){\n\t\tAtendimentoJuridicoEntity entity = new AtendimentoJuridicoEntity();\n\t\tBeanUtils.copyProperties(dto, entity);\n\t\treturn entity;\n\t}", "public DTO(DTO other) {\n if (other.isSetDatas()) {\n Map<String,String> __this__datas = new HashMap<String,String>(other.datas);\n this.datas = __this__datas;\n }\n }", "public void crearPersona(PersonaDTO personaDTO);", "StudentDTO toStudentDTO(Student student);", "@Override\r\n\tpublic AbstractDto mapToDto() {\n\t\treturn null;\r\n\t}", "public abstract DTO toDTO(M model);", "private static void collectReadableProperties(Map<String, PojoProperty> map,\n Class<?> cls) {\n for (final Method m : cls.getDeclaredMethods()) {\n //if (isStaticOrPrivate(m)) continue;\n if (isStatic(m.getModifiers())) continue;\n if (1 != m.getParameterTypes().length)// get=0,set=1\n continue;\n Class<?> returnType = m.getReturnType();\n if (returnType == Object.class || returnType.getName().equals(\"groovy.lang.MetaClass\")) {\n continue;\n }\n Class<?> propType = m.getParameterTypes()[0];\n if (returnType == Void.TYPE && propType.getName().equals(\"groovy.lang.MetaClass\")) {\n continue;\n }\n\n String name = m.getName();\n String propName = null;\n String originalPropName = null;\n boolean isBool = false;\n if (name.startsWith(\"set\") && name.length() > 3) {\n originalPropName = name.substring(3);\n propName = decapitalize(originalPropName, true);\n if (propType == Boolean.TYPE) {\n isBool = true;\n }\n }\n if (propName == null) continue;\n\n String getMethodName = (isBool ? \"is\" : \"get\") + originalPropName;\n try {\n Field field;\n try {\n field = cls.getDeclaredField(propName);\n } catch (NoSuchFieldException e) {\n propName = decapitalize(originalPropName, false);\n field = cls.getDeclaredField(propName);\n }\n if (map.containsKey(propName))\n continue;\n\n m.setAccessible(true);\n Method getMethod;\n getMethod = cls.getDeclaredMethod(getMethodName);\n getMethod.setAccessible(true);\n\n PojoProperty rp = new PojoProperty(propName, propType);\n rp.setGetMethod(getMethod);\n rp.setSetMethod(m);\n rp.setField(field);\n map.put(propName, rp);\n } catch (NoSuchMethodException | NoSuchFieldException e) {\n //e.printStackTrace();\n logger.warn(String.format(\"实体方法:%s 或 字段:%s 不存在\", getMethodName, propName));\n }\n }\n\n for (final Field m : cls.getDeclaredFields()) {\n //if (isStaticOrPrivate(m)) continue;\n if(isStatic(m.getModifiers())) continue;\n String propName = m.getName();\n if (map.containsKey(propName)) continue;\n Class<?> returnType = m.getType();\n m.setAccessible(true);\n PojoProperty rp = new PojoProperty(propName, returnType);\n rp.setField(m);\n map.put(propName, rp);\n }\n }", "@Override\n\tpublic void modify(UserDTO dto) {\n\t\tdao.modify(dto);\n\t}", "@Override\n\tpublic void update(Object dto) throws Exception {\n\t\tpropertyConfigMapper.updateByPrimaryKeySelective(dto);\n\t}", "public void setModified();", "List<PersonaDTO> PersonaListToPersonaDTOList(List<Persona> personaList);", "public UMarkerSetDTO(String name, String comm, String user, java.sql.Date updated) {\n this.name = name;\n this.comm = comm;\n this.user = user;\n this.updated = updated;\n }", "private void setAdditions(DataRelationModelDto dto, List<DataRelationModelAdditionDto> additionDtos) {\n\t\tList<String> additionalDpdNameList = new ArrayList<>();\n\t\tfor (DataRelationModelAdditionDto additionDto : additionDtos) {\n\t\t\tadditionalDpdNameList.add(additionDto.getAdditionalDpd().getDpdName());\n\t\t}\n\t\tdto.setAdditionalDpdNameList(additionalDpdNameList);\n\n\t}", "@Test\n public void updateComentarioTest(){\n ComentarioEntity entity = data.get(0);\n PodamFactory factory = new PodamFactoryImpl();\n ComentarioEntity newEntity = factory.manufacturePojo(ComentarioEntity.class);\n newEntity.setId(entity.getId());\n comentarioPersistence.update(newEntity);\n \n ComentarioEntity respuesta = em.find(ComentarioEntity.class,entity.getId());\n \n Assert.assertEquals(respuesta.getNombreUsuario(), newEntity.getNombreUsuario());\n \n \n }", "@Override\n protected void onConvertTransfer(Persona_tiene_Existencia values, DataSetEvent e) throws SQLException, UnsupportedOperationException\n {\n if (e.getDML() == insertProcedure)\n {\n e.setInt(1, values.getIdPersona());//\"vid_persona\"\n e.setInt(2, values.getEntrada());//\"ventrada\"\n e.setInt(3, values.getIdUbicacion());//\"vid_ubicacion\"\n e.setFloat(4, values.getExistencia());//\"vexistencia\"\n }\n\n else if (e.getDML() == updateProcedure)\n {\n e.setInt(1, values.getLinea_Viejo());//\"vlinea_old\"\n e.setInt(2, values.getIdPersona_Viejo());//\"vid_persona_old\"\n e.setInt(3, values.getIdPersona());//\"vid_persona_new\"\n e.setInt(4, values.getEntrada());//\"ventrada\"\n e.setInt(5, values.getIdUbicacion());//\"vid_ubicacion\"\n e.setFloat(6, values.getExistencia());//\"vexistencia\"\n }\n }", "public TcUnidadEdoDTO() {\n }", "public List<PersonaDTO> consultarPersonas() ;", "public ViviendaDTO(ViviendaEntity entity, String condicion)\r\n {\r\n if (entity!=null){\r\n this.idVivienda=entity.getIdVivienda();\r\n this.ciudad=entity.getCiudad();\r\n this.descripcion=entity.getDescripcion();\r\n this.direccion=entity.getDireccion();\r\n this.capacidad=entity.getCapacidad();\r\n this.valorDiario=entity.getValorDiario();\r\n this.imagen=entity.getImagen();\r\n }\r\n }", "public void desmarcarTodos() {\r\n\t\tfor (int i = 0; i < listaPlantaCargoDto.size(); i++) {\r\n\t\t\tPlantaCargoDetDTO p = new PlantaCargoDetDTO();\r\n\t\t\tp = listaPlantaCargoDto.get(i);\r\n\t\t\tp.setReservar(false);\r\n\t\t\tlistaPlantaCargoDto.set(i, p);\r\n\t\t}\r\n\t\tcantReservados = 0;\r\n\t}", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "private static void copyColumns(Object o1, Object o2, JpaClassInfo classInfo, PropertyFilter propertyFilter) {\n\t\tfor (String property : classInfo.getColumns()) {\n\t\t\tif (propertyFilter.test(o1, property)) {\n\t\t\t\tObject value = JpaIntrospector.getProperty(o1, property);\n\t\t\t\tJpaIntrospector.setProperty(o2, property, value);\n\t\t\t}\n\t\t}\n\t}", "public CuentaEntity toEntity() {\r\n CuentaEntity cuentaE = super.toEntity();\r\n if (this.tarjeta != null) {\r\n if (!this.tarjeta.isEmpty()) {\r\n List<TarjetaEntity> tarjetasEntity = new ArrayList<>();\r\n for (TarjetaDTO dtoTarjeta : tarjeta) {\r\n tarjetasEntity.add(dtoTarjeta.toEntity());\r\n }\r\n cuentaE.setTarjeta(tarjetasEntity);\r\n }\r\n }\r\n if (this.ordenPagos != null) {\r\n if (!this.ordenPagos.isEmpty()) {\r\n List<OrdenPagoEntity> ordenesEntity = new ArrayList<>();\r\n for (OrdenPagoDTO dtoOrdenPago : ordenPagos) {\r\n ordenesEntity.add(dtoOrdenPago.toEntity());\r\n }\r\n cuentaE.setOrdenPagos(ordenesEntity);\r\n }\r\n }\r\n \r\n if (this.estudiante != null) {\r\n System.out.println(\"---------------------------------------------------343434343\");\r\n EstudianteEntity es = estudiante.toEntity();\r\n cuentaE.setEstudiante(es);\r\n System.out.println(es.getDocumento());\r\n System.out.println(cuentaE.getEstudiante());\r\n System.out.println(cuentaE.getEstudiante().getDocumento());\r\n }\r\n\r\n return cuentaE;\r\n }", "@Override\n\tpublic Izdavac convert(IzdavacDTO dto) {\n\t\tIzdavac izdavac=new Izdavac();\n\t\tif(dto.getId()!=null) {\n\t\t\tizdavac=izdavacService.findOne(dto.getId());\n\t\t\tif(izdavac==null) {\n\t\t\t\tthrow new IllegalStateException(\"greska izdavacDTO\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tizdavac.setAdresa(dto.getAdresa());\n\t\tizdavac.setId(dto.getId());\n\t\tizdavac.setNaziv(dto.getNaziv());\n\t\tizdavac.setTelefon(dto.getTelefon());\n\t\t\n\t\treturn izdavac;\n\t}", "public ViviendaDTO(ViviendaEntity entity){\r\n if (entity!=null){\r\n this.idVivienda=entity.getIdVivienda();\r\n this.anfitrion=new AnfitrionBasicDTO(entity.getAnfitrion());\r\n this.ciudad=entity.getCiudad();\r\n this.descripcion=entity.getDescripcion();\r\n this.direccion=entity.getDireccion();\r\n this.capacidad=entity.getCapacidad();\r\n this.valorDiario=entity.getValorDiario();\r\n this.imagen=entity.getImagen();\r\n this.numeroHabitaciones=entity.getHabitaciones().size();\r\n }\r\n }", "@Override\r\n\tpublic void update(Cidade obj) {\n\r\n\t}", "private void modificarPersona(PersonaDTO persona, Set<TelefonoDTO> telefonos, Set<DireccionDTO> direcciones,\n\t\t\tSet<CorreoElectronicoDTO> correos) throws CustomValidationException, CustomErrorException, Exception {\n\t\t//Recuperamos la persona\n\t\t//Verificamos cambio de DNI\n\t\tif (persona.getIdPersona() == null) {throw new CustomErrorException(CustomErrorException.ID_INEXISTENTE_PARA_MODIFICAR,this.getClass().getSimpleName());}\n\t\t\n\t\tPersonaDTO personaPersistente = obtenerPersona(persona.getIdPersona());\n\t\tif (!personaPersistente.getNroDni().equals(persona.getNroDni())) {\n\t\t\tif (gPersona.existePersonaPorDNI(persona.getNroDni())) {\n\t\t\t\tthrow new CustomValidationException(CustomValidationException.DNI_REPETIDO);\n\t\t\t};\n\t\t}\n\t\t\n\t\tSet<TelefonoDTO> nuevosTelefonos = new HashSet<TelefonoDTO>();\n\t\teliminarBorrados(telefonos,personaPersistente.getTelefonos());\n\t\tnuevosTelefonos.addAll(agregarNuevos(telefonos));\n\t\t//vuelvo a setear la lista en persona\n\t\tpersona.setTelefonos(null);\n\t\tSet <TelefonoDTO> telefonosPersona = new HashSet<TelefonoDTO>();\n\t\ttelefonosPersona.addAll(nuevosTelefonos);\n\t\tpersona.setTelefonos(telefonosPersona);\n\t\t\n\t\tSet<DireccionDTO> nuevasDirecciones = new HashSet<DireccionDTO>();\n\t\teliminarBorrados(direcciones, personaPersistente.getDirecciones());\n\t\tnuevasDirecciones.addAll(agregarNuevos(direcciones));\n\t\tpersona.setDirecciones(null);\n\t\tSet<DireccionDTO> direccionesPersona = new HashSet<DireccionDTO>();\n\t\tdireccionesPersona.addAll(nuevasDirecciones);\n\t\tpersona.setDirecciones(direccionesPersona); \n\t\t\n\t\tSet<CorreoElectronicoDTO> nuevosCorreos = new HashSet<CorreoElectronicoDTO>();\n\t\teliminarBorrados(correos, personaPersistente.getCorreos());\n\t\tnuevosCorreos.addAll(agregarNuevos(correos));\n\t\t//vuelvo a setear la lista en persona\n\t\tpersona.setCorreos(null);\n\t\tSet<CorreoElectronicoDTO> correosPersona = new HashSet<CorreoElectronicoDTO>();\n\t\tcorreosPersona.addAll(nuevosCorreos);\n\t\tpersona.setCorreos(correosPersona); \n\t\t\n\t\t// Llamo a modify para cerrar la operación;\n\t\tfor (TelefonoDTO t: telefonos) {\n\t\t\tt.setIdTelefono(modificarTelefono(Converter.toEntity(t))); \n\t\t}\n\t\t\n\t\tfor (DireccionDTO d: direcciones) {\n\t\t\td.setIdDireccion(modificarDireccion(Converter.toEntity(d)));\n\t\t}\n\t\t\n\t\tfor (CorreoElectronicoDTO c: correos) {\n\t\t\tc.setIdCorreoElectronico(modificarCorreoElectronico(Converter.toEntity(c)));\n\t\t}\n\t\t\n\t\tgPersona.modify(Converter.toEntity(persona));\n\t\t\n\t}", "@RequestMapping(value = \"/empregado/alterar/{empregadoId}\" , method = RequestMethod.PUT)\n\tpublic ResponseEntity<EmpregadoDto> alterar(@RequestBody EmpregadoDto dto,\n\t\t\t@PathVariable Integer idEmpregado){\n\t\tEmpregadoDto empregadoDto = repoEmp.findOne(idEmpregado);\n\t\tif(empregadoDto != null) {\n\t\t\tempregadoDto.setDepartamentoId(dto.getDepartamentoId());\n\t\t\tempregadoDto.setNome(dto.getNome());\n\t\t\tempregadoDto.setCpf(dto.getCpf());\n\t\t\tempregadoDto.setSexo(dto.getSexo());\n\t\t\tempregadoDto.setCargo(dto.getCargo());\n\t\t\tempregadoDto.setSalario(dto.getSalario());\n\t\t\tempregadoDto.setComissao(dto.getComissao());\n\t\t\tempregadoDto.setTipoContratacao(dto.getTipoContratacao());\n\t\t\n\t\t\tif(repoEmp.save(empregadoDto).getDepartamentoId().equals(idEmpregado)) {\n\t\t\t\treturn ResponseEntity.ok().build();\n\t\t\t}else {\n\t\t\t\treturn ResponseEntity.badRequest().build();\n\t\t\t}\n\t\t}\n\t\treturn ResponseEntity.ok().build();\n\t}", "@Test\n public void updateVisitaTest() {\n VisitaEntity entity = data.get(0);\n PodamFactory factory = new PodamFactoryImpl();\n VisitaEntity newEntity = factory.manufacturePojo(VisitaEntity.class);\n newEntity.setId(entity.getId());\n\n VisitaPersistence.update(newEntity);\n\n VisitaEntity resp = em.find(VisitaEntity.class, entity.getId());\n\n Assert.assertEquals(newEntity.getId(), resp.getId());\n Assert.assertArrayEquals(newEntity.getFotos().toArray(), resp.getFotos().toArray());\n Assert.assertEquals(newEntity.getOferta(), resp.getOferta());\n Assert.assertEquals(newEntity.getUsuario(), resp.getUsuario());\n Assert.assertEquals(newEntity.getComentario(), resp.getComentario());\n Assert.assertEquals(newEntity.getCalificacion(), resp.getCalificacion());\n }", "public void setOriginalServiceData (Timestamp OriginalServiceData);", "public abstract T convertToEntity(D dto);", "@Override\n public void updateProperties() {\n // unneeded\n }", "public CalMetasDTO leerRegistro() {\n/* */ try {\n/* 56 */ CalMetasDTO reg = new CalMetasDTO();\n/* 57 */ reg.setCodigoCiclo(this.rs.getInt(\"codigo_ciclo\"));\n/* 58 */ reg.setCodigoPlan(this.rs.getInt(\"codigo_plan\"));\n/* 59 */ reg.setCodigoMeta(this.rs.getInt(\"codigo_meta\"));\n/* 60 */ reg.setCodigoObjetivo(this.rs.getInt(\"codigo_objetivo\"));\n/* 61 */ reg.setDescripcion(this.rs.getString(\"descripcion\"));\n/* 62 */ reg.setJustificacion(this.rs.getString(\"justificacion\"));\n/* 63 */ reg.setValorMeta(this.rs.getDouble(\"valor_meta\"));\n/* 64 */ reg.setTipoMedicion(this.rs.getString(\"tipo_medicion\"));\n/* 65 */ reg.setFuenteDato(this.rs.getString(\"fuente_dato\"));\n/* 66 */ reg.setAplicaEn(this.rs.getString(\"aplica_en\"));\n/* 67 */ reg.setUnidadMedida(this.rs.getString(\"unidad_medida\"));\n/* 68 */ reg.setValorMinimo(this.rs.getDouble(\"valor_minimo\"));\n/* 69 */ reg.setValorMaximo(this.rs.getDouble(\"valor_maximo\"));\n/* 70 */ reg.setMes01(this.rs.getString(\"mes01\"));\n/* 71 */ reg.setMes02(this.rs.getString(\"mes02\"));\n/* 72 */ reg.setMes03(this.rs.getString(\"mes03\"));\n/* 73 */ reg.setMes04(this.rs.getString(\"mes04\"));\n/* 74 */ reg.setMes05(this.rs.getString(\"mes05\"));\n/* 75 */ reg.setMes06(this.rs.getString(\"mes06\"));\n/* 76 */ reg.setMes07(this.rs.getString(\"mes07\"));\n/* 77 */ reg.setMes08(this.rs.getString(\"mes08\"));\n/* 78 */ reg.setMes09(this.rs.getString(\"mes09\"));\n/* 79 */ reg.setMes10(this.rs.getString(\"mes10\"));\n/* 80 */ reg.setMes11(this.rs.getString(\"mes11\"));\n/* 81 */ reg.setMes12(this.rs.getString(\"mes12\"));\n/* 82 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 83 */ reg.setTipoGrafica(this.rs.getString(\"tipo_grafica\"));\n/* 84 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 85 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 86 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 87 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 88 */ reg.setNombreTipoMedicion(this.rs.getString(\"nombreTipoMedicion\"));\n/* 89 */ reg.setNombreEstado(this.rs.getString(\"nombreEstado\"));\n/* 90 */ reg.setNombreUnidadMedida(this.rs.getString(\"nombre_unidad_medida\"));\n/* */ \n/* */ try {\n/* 93 */ reg.setNumeroAcciones(this.rs.getInt(\"acciones\"));\n/* */ }\n/* 95 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 99 */ return reg;\n/* */ }\n/* 101 */ catch (Exception e) {\n/* 102 */ e.printStackTrace();\n/* 103 */ Utilidades.writeError(\"CalPlanMetasFactory:leerRegistro \", e);\n/* */ \n/* 105 */ return null;\n/* */ } \n/* */ }", "protected void populateDto(Opportunities dto, ResultSet rs) throws SQLException\r\n\t{\r\n\t\tdto.setId( rs.getInt( COLUMN_ID ) );\r\n\t\tdto.setSupplierId( rs.getInt( COLUMN_SUPPLIER_ID ) );\r\n\t\tdto.setUniqueProducts( rs.getString( COLUMN_UNIQUE_PRODUCTS ) );\r\n\t\tdto.setPortfolio( rs.getString( COLUMN_PORTFOLIO ) );\r\n\t\tdto.setRecongnisation( rs.getString( COLUMN_RECONGNISATION ) );\r\n\t\tdto.setKeyWords( rs.getString( COLUMN_KEY_WORDS ) );\r\n\t\tdto.setDateCreation( rs.getTimestamp(COLUMN_DATE_CREATION ) );\r\n\t\tdto.setDateModification( rs.getTimestamp(COLUMN_DATE_MODIFICATION ) );\r\n\t\treset(dto);\r\n\t}", "public interface IReglaUtilDTO {\n\n\t/**\n\t * To business.\n\t * \n\t * @param reglaDTO\n\t * the regla dto\n\t * @return the regla\n\t * @throws TransferObjectException\n\t * the transfer object exception\n\t */\n\tRegla toBusiness(ReglaDTO reglaDTO) throws TransferObjectException;\n\n\t/**\n\t * To rest.\n\t * \n\t * @param regla\n\t * the regla\n\t * @return the regla dto\n\t * @throws TransferObjectException\n\t * the transfer object exception\n\t */\n\tReglaDTO toRest(Regla regla) throws TransferObjectException;\n\n\t/**\n\t * To rest info.\n\t * \n\t * @param regla\n\t * the regla\n\t * @return the regla dto\n\t * @throws TransferObjectException\n\t * the transfer object exception\n\t */\n\tReglaDTO toRestInfo(Regla regla) throws TransferObjectException;\n}", "public HojaDeVidaDTO getHojaDeVida() {return hojaDeVida;}", "private void findFields() {\n for(Class<?> clazz=getObject().getClass();clazz != null; clazz=clazz.getSuperclass()) {\r\n\r\n Field[] fields=clazz.getDeclaredFields();\r\n for(Field field:fields) {\r\n ManagedAttribute attr=field.getAnnotation(ManagedAttribute.class);\r\n Property prop=field.getAnnotation(Property.class);\r\n boolean expose_prop=prop != null && prop.exposeAsManagedAttribute();\r\n boolean expose=attr != null || expose_prop;\r\n\r\n if(expose) {\r\n String fieldName = Util.attributeNameToMethodName(field.getName());\r\n String descr=attr != null? attr.description() : prop.description();\r\n boolean writable=attr != null? attr.writable() : prop.writable();\r\n\r\n MBeanAttributeInfo info=new MBeanAttributeInfo(fieldName,\r\n field.getType().getCanonicalName(),\r\n descr,\r\n true,\r\n !Modifier.isFinal(field.getModifiers()) && writable,\r\n false);\r\n\r\n atts.put(fieldName, new FieldAttributeEntry(info, field));\r\n }\r\n }\r\n }\r\n }", "private void llenarEntidadConLosDatosDeLosControles() {\n clienteActual.setNombre(txtNombre.getText());\n clienteActual.setApellido(txtApellido.getText());\n clienteActual.setDui(txtDui.getText());\n //clienteActual.setNumero(txtNumero.getText());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n }", "AccountDTO toDTO(Account account);", "private void copyDtoToEntity(UserDTO dto, User entity) {\n\t\tentity.setFullName(dto.getFullName());\n\t\tentity.setEmail(dto.getEmail());\n\t\tentity.setCpf(dto.getCpf());\n\t\tentity.setBirthDate(dto.getBirthDate());\n\t}", "@Override\r\n /* OSINE791 - RSIS1 - Inicio */\r\n //public ExpedienteDTO asignarOrdenServicio(ExpedienteDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n public ExpedienteGSMDTO asignarOrdenServicio(ExpedienteGSMDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO,String sigla) throws ExpedienteException{\r\n LOG.error(\"asignarOrdenServicio\");\r\n ExpedienteGSMDTO retorno=expedienteDTO;\r\n try{\r\n //cambiarEstado expediente \r\n \tExpedienteGSMDTO expedCambioEstado=cambiarEstadoProceso(expedienteDTO.getIdExpediente(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getEstadoProceso().getIdEstadoProceso(),null,usuarioDTO);\r\n LOG.info(\"expedCambioEstado:\"+expedCambioEstado);\r\n //update expediente\r\n PghExpediente registroDAO = crud.find(expedienteDTO.getIdExpediente(), PghExpediente.class);\r\n registroDAO.setDatosAuditoria(usuarioDTO);\r\n if(expedienteDTO.getTramite()!=null){\r\n registroDAO.setIdTramite(new PghTramite(expedienteDTO.getTramite().getIdTramite()));\r\n }else if(expedienteDTO.getProceso()!=null){\r\n registroDAO.setIdProceso(new PghProceso(expedienteDTO.getProceso().getIdProceso()));\r\n }\r\n if(expedienteDTO.getObligacionTipo()!=null){\r\n registroDAO.setIdObligacionTipo(new PghObligacionTipo(expedienteDTO.getObligacionTipo().getIdObligacionTipo()));\r\n }\r\n if(expedienteDTO.getObligacionSubTipo()!=null && expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()!=null){\r\n registroDAO.setIdObligacionSubTipo(new PghObligacionSubTipo(expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()));\r\n }\r\n registroDAO.setIdUnidadSupervisada(new MdiUnidadSupervisada(expedienteDTO.getUnidadSupervisada().getIdUnidadSupervisada()));\r\n crud.update(registroDAO);\r\n //inserta ordenServicio\r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.registrar(expedienteDTO.getIdExpediente(), \r\n expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), expedienteDTO.getOrdenServicio().getEstadoProceso().getIdEstadoProceso(), \r\n /* OSINE791 - RSIS1 - Inicio */\r\n //codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO);\r\n codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,sigla);\r\n /* OSINE791 - RSIS1 - Fin */\r\n LOG.info(\"OrdenServicioDTO:\"+OrdenServicioDTO.getNumeroOrdenServicio());\r\n //busca idPersonalDest\r\n PersonalDTO personalDest=null;\r\n List<PersonalDTO> listPersonalDest=null;\r\n if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)){\r\n listPersonalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null));\r\n }else if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)){\r\n listPersonalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa()));\r\n }\r\n if(listPersonalDest==null || listPersonalDest.isEmpty() || listPersonalDest.get(0).getIdPersonal()==null){\r\n throw new ExpedienteException(\"La Empresa Supervisora no tiene un Personal asignado\",null);\r\n }else{\r\n personalDest=listPersonalDest.get(0);\r\n }\r\n //inserta historico Orden Servicio\r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistorico=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstado=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistorico.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstado:\"+historicoEstado);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(registroDAO);\r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n }catch(Exception e){\r\n LOG.error(\"error en asignarOrdenServicio\",e);\r\n ExpedienteException ex = new ExpedienteException(e.getMessage(), e);\r\n throw ex;\r\n }\r\n return retorno;\r\n }", "public DDetRetContrArtEscenicsAttTO(java.lang.Integer ideFormato, java.lang.Byte numVersionFormato, java.lang.String numEvento, java.lang.String nomEspectaculo, java.lang.Integer codMunicipioEspectaculo, java.lang.Integer codDepartamentoEspectaculo, Integer fecRealizacion, java.lang.Long idePersonaRutProductor, java.lang.String valDireccionProductor, java.lang.Integer codMunicipioProductor, java.lang.Integer codDepartamentoProductor, java.lang.Long numTelefonoProductor, String valLugarEvento, java.lang.Integer numTotBoletasVendidas, java.math.BigDecimal valTotBoletasVendidas, BigDecimal valServDistComerBoleteria, java.lang.Integer numTotBolPrecIgSup3uvt, java.math.BigDecimal valTotBolPrecIgSup3uvt, java.lang.Integer numTotDerAsPreIgSup3uvt, java.math.BigDecimal valTotDerAsPreIgSup3uvt, java.lang.Integer numBoletasRetencionExceso, java.math.BigDecimal valBoletasRetencionExceso, Long ideUsuarioCambio, Timestamp fecCambio) {\n\t\tsetIdeFormato(ideFormato);\n\t\tsetNumVersionFormato(numVersionFormato);\n\t\tsetNumEvento(numEvento);\n\t\tsetNomEspectaculo(nomEspectaculo);\n\t\tsetCodMunicipioEspectaculo(codMunicipioEspectaculo);\n\t\tsetCodDepartamentoEspectaculo(codDepartamentoEspectaculo);\n\t\tsetFecRealizacion(fecRealizacion);\n\t\tsetIdePersonaRutProductor(idePersonaRutProductor);\n\t\tsetValDireccionProductor(valDireccionProductor);\n\t\tsetCodMunicipioProductor(codMunicipioProductor);\n\t\tsetCodDepartamentoProductor(codDepartamentoProductor);\n\t\tsetNumTelefonoProductor(numTelefonoProductor);\n\t\tsetValLugarEvento(valLugarEvento);\n\t\tsetNumTotBoletasVendidas(numTotBoletasVendidas);\n\t\tsetValTotBoletasVendidas(valTotBoletasVendidas);\n\t\tsetValServDistComerBoleteria(valServDistComerBoleteria);\n\t\tsetNumTotBolPrecIgSup3uvt(numTotBolPrecIgSup3uvt);\n\t\tsetValTotBolPrecIgSup3uvt(valTotBolPrecIgSup3uvt);\n\t\tsetNumTotDerAsPreIgSup3uvt(numTotDerAsPreIgSup3uvt);\n\t\tsetValTotDerAsPreIgSup3uvt(valTotDerAsPreIgSup3uvt);\n\t\tsetNumBoletasRetencionExceso(numBoletasRetencionExceso);\n\t\tsetValBoletasRetencionExceso(valBoletasRetencionExceso);\n\t\tsetIdeUsuarioCambio(ideUsuarioCambio);\n\t\tsetFecCambio(fecCambio);\n\t}", "protected void reflectUpdateDatetimeToDto(Member entity, MemberDto dto) {\r\n dto.setUpdateDatetime(extractUpdateDatetimeFromEntity(entity));\r\n }", "private static void diff(\n final AbstractAttributableTO updated,\n final AbstractAttributableTO original,\n final AbstractAttributableMod result,\n final boolean incremental) {\n if (updated.getKey() != original.getKey()) {\n throw new IllegalArgumentException(\"AttributableTO's id must be the same\");\n }\n result.setKey(updated.getKey());\n\n // 2. attributes\n Map<String, AttrTO> updatedAttrs = new HashMap<>(updated.getPlainAttrMap());\n Map<String, AttrTO> originalAttrs = new HashMap<>(original.getPlainAttrMap());\n\n Set<String> originalAttrNames = new HashSet<>(originalAttrs.keySet());\n originalAttrNames.removeAll(updatedAttrs.keySet());\n\n if (!incremental) {\n result.getPlainAttrsToRemove().clear();\n result.getPlainAttrsToRemove().addAll(originalAttrNames);\n }\n\n Set<String> emptyUpdatedAttrs = new HashSet<>();\n for (Map.Entry<String, AttrTO> entry : updatedAttrs.entrySet()) {\n if (entry.getValue().getValues() == null || entry.getValue().getValues().isEmpty()) {\n\n emptyUpdatedAttrs.add(entry.getKey());\n }\n }\n for (String emptyUpdatedAttr : emptyUpdatedAttrs) {\n updatedAttrs.remove(emptyUpdatedAttr);\n result.getPlainAttrsToRemove().add(emptyUpdatedAttr);\n }\n\n populate(updatedAttrs, originalAttrs, result);\n\n // 3. derived attributes\n updatedAttrs = updated.getDerAttrMap();\n originalAttrs = original.getDerAttrMap();\n\n originalAttrNames = new HashSet<>(originalAttrs.keySet());\n originalAttrNames.removeAll(updatedAttrs.keySet());\n\n if (!incremental) {\n result.getDerAttrsToRemove().clear();\n result.getDerAttrsToRemove().addAll(originalAttrNames);\n }\n\n Set<String> updatedAttrNames = new HashSet<>(updatedAttrs.keySet());\n updatedAttrNames.removeAll(originalAttrs.keySet());\n result.getDerAttrsToAdd().clear();\n result.getDerAttrsToAdd().addAll(updatedAttrNames);\n\n // 4. virtual attributes\n updatedAttrs = updated.getVirAttrMap();\n originalAttrs = original.getVirAttrMap();\n\n originalAttrNames = new HashSet<>(originalAttrs.keySet());\n originalAttrNames.removeAll(updatedAttrs.keySet());\n\n if (!incremental) {\n result.getVirAttrsToRemove().clear();\n result.getVirAttrsToRemove().addAll(originalAttrNames);\n }\n\n populate(updatedAttrs, originalAttrs, result, true);\n\n // 5. resources\n if (original instanceof AbstractSubjectTO && updated instanceof AbstractSubjectTO\n && result instanceof AbstractSubjectMod) {\n\n Set<String> updatedRes = new HashSet<>(((AbstractSubjectTO) updated).getResources());\n Set<String> originalRes = new HashSet<>(((AbstractSubjectTO) original).getResources());\n\n updatedRes.removeAll(originalRes);\n ((AbstractSubjectMod) result).getResourcesToAdd().clear();\n ((AbstractSubjectMod) result).getResourcesToAdd().addAll(updatedRes);\n\n originalRes.removeAll(((AbstractSubjectTO) updated).getResources());\n\n if (!incremental) {\n ((AbstractSubjectMod) result).getResourcesToRemove().clear();\n ((AbstractSubjectMod) result).getResourcesToRemove().addAll(originalRes);\n }\n }\n }", "protected Map<String, Updatable> getUpdatables() {\n\t\treturn myUpdatables;\n\t}", "public DDetRetContrArtEscenicsAttTO() { }", "@PutMapping(\"/my_projects/{id}/write_off\")\n public ResponseEntity<ProjectDtoExtendedForUser> writeOff(@PathVariable long id, @RequestBody WriteOffDto writeOffDto){\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n String currentUserName = authentication.getName();\n User currentUser = userService.findByEmail(currentUserName).orElseThrow(\n () -> {throw new MyNotFoundException(\"User not found\");}\n );\n\n ProjectDtoExtendedForUser projectDtoExtendedForUser = new ProjectDtoExtendedForUser();\n\n Project project = projectService.findById(id).get();\n\n if (!project.getStatus().equals(\"ACTIVE\")){\n projectDtoExtendedForUser.setName(\"Проект неактивен, часы списать нельзя\");\n projectDtoExtendedForUser.setId(-1);\n return ResponseEntity.ok(projectDtoExtendedForUser);\n }\n\n UsersOnProjects usersOnProjects = usersOnProjectsService.findByUsersOnProjectsPK(new UsersOnProjectsPK(currentUser, project));\n\n usersOnProjects.setWeek_work_time(usersOnProjects.getWeek_work_time() + writeOffDto.getHours());\n\n usersOnProjects = usersOnProjectsService.updateInfo(usersOnProjects);\n\n projectDtoExtendedForUser.setId(project.getId());\n projectDtoExtendedForUser.setName(project.getName());\n projectDtoExtendedForUser.setCompany_name(project.getCompany().getName());\n projectDtoExtendedForUser.setCEO_username(project.getCompany().getCEO().getUsername());\n projectDtoExtendedForUser.setCEO_email(project.getCompany().getCEO().getEmail());\n projectDtoExtendedForUser.setStart_date(project.getStart_date());\n projectDtoExtendedForUser.setStatus(project.getStatus());\n projectDtoExtendedForUser.setPosition(usersOnProjects.getPosition().getName());\n projectDtoExtendedForUser.setBase_salary(usersOnProjects.getBase_salary());\n projectDtoExtendedForUser.setRate(usersOnProjects.getRate());\n projectDtoExtendedForUser.setWeek_work_time(usersOnProjects.getWeek_work_time());\n\n return ResponseEntity.ok(projectDtoExtendedForUser);\n }", "D mapToDTO(E entity);", "public ViviendaDetailDTO(ViviendaEntity viviendaEntity) {\r\n super(viviendaEntity);\r\n if (viviendaEntity != null) {\r\n\r\n if (viviendaEntity.getContratos() != null) {\r\n contratos = new ArrayList<>();\r\n for (ContratoEntity entityContrato : viviendaEntity.getContratos()){\r\n contratos.add(new ContratoDTO(entityContrato));\r\n }\r\n }\r\n\r\n if (viviendaEntity.getCuartos() != null) {\r\n cuartos = new ArrayList<>();\r\n for(CuartoEntity entityCuarto : viviendaEntity.getCuartos()){\r\n cuartos.add(new CuartoDTO(entityCuarto));\r\n }\r\n }\r\n\r\n if (viviendaEntity.getSitiosDeInteres() != null){\r\n sitiosDeInteres = new ArrayList<>();\r\n for(SitioInteresEntity sitioEntity : viviendaEntity.getSitiosDeInteres()){\r\n sitiosDeInteres.add(new SitioInteresDTO(sitioEntity));\r\n }\r\n }\r\n\r\n if(viviendaEntity.getCalificaciones() != null ){\r\n calificaciones = new ArrayList<>();\r\n for(CalificacionEntity calificacionEntity : viviendaEntity.getCalificaciones()){\r\n calificaciones.add(new CalificacionDTO(calificacionEntity));\r\n }\r\n }\r\n\r\n if(viviendaEntity.getServiciosAdicionales() != null){\r\n serviciosAdicionales = new ArrayList<>();\r\n for (ServicioAdicionalEntity servicioEntity : viviendaEntity.getServiciosAdicionales()){\r\n serviciosAdicionales.add(new ServicioAdicionalDTO(servicioEntity));\r\n }\r\n }\r\n\r\n if(viviendaEntity.getServiciosIncluidos() != null){\r\n serviciosOfrecidos = new ArrayList<>();\r\n for (String servicio : viviendaEntity.getServiciosIncluidos()){\r\n serviciosOfrecidos.add(servicio);\r\n }\r\n }\r\n }\r\n }", "@Mapper(componentModel = \"spring\", uses = {TipoDocumentoMapper.class, GeneroMapper.class, AseguradoraMapper.class, GrupoEtnicoMapper.class, RegimenMapper.class, MunicipioMapper.class, TipoResidenciaMapper.class})\npublic interface PacienteMapper extends EntityMapper<PacienteDTO, Paciente> {\n\n @Mapping(source = \"tipoDocumento.id\", target = \"tipoDocumentoId\")\n @Mapping(source = \"tipoDocumento.nombre\", target = \"tipoDocumentoNombre\")\n @Mapping(source = \"genero.id\", target = \"generoId\")\n @Mapping(source = \"genero.nombre\", target = \"generoNombre\")\n @Mapping(source = \"aseguradora.id\", target = \"aseguradoraId\")\n @Mapping(source = \"aseguradora.nombre\", target = \"aseguradoraNombre\")\n @Mapping(source = \"grupoEtnico.id\", target = \"grupoEtnicoId\")\n @Mapping(source = \"grupoEtnico.nombre\", target = \"grupoEtnicoNombre\")\n @Mapping(source = \"regimen.id\", target = \"regimenId\")\n @Mapping(source = \"regimen.nombre\", target = \"regimenNombre\")\n @Mapping(source = \"municipio.id\", target = \"municipioId\")\n @Mapping(source = \"municipio.nombre\", target = \"municipioNombre\")\n @Mapping(source = \"tipoResidencia.id\", target = \"tipoResidenciaId\")\n @Mapping(source = \"tipoResidencia.nombre\", target = \"tipoResidenciaNombre\")\n PacienteDTO toDto(Paciente paciente);\n\n @Mapping(target = \"aplicacions\", ignore = true)\n @Mapping(target = \"acudientes\", ignore = true)\n @Mapping(source = \"tipoDocumentoId\", target = \"tipoDocumento\")\n @Mapping(source = \"generoId\", target = \"genero\")\n @Mapping(source = \"aseguradoraId\", target = \"aseguradora\")\n @Mapping(source = \"grupoEtnicoId\", target = \"grupoEtnico\")\n @Mapping(source = \"regimenId\", target = \"regimen\")\n @Mapping(source = \"municipioId\", target = \"municipio\")\n @Mapping(source = \"tipoResidenciaId\", target = \"tipoResidencia\")\n Paciente toEntity(PacienteDTO pacienteDTO);\n\n default Paciente fromId(Long id) {\n if (id == null) {\n return null;\n }\n Paciente paciente = new Paciente();\n paciente.setId(id);\n return paciente;\n }\n}", "@Override\n\tpublic void alterar(Parcela entidade) {\n\n\t}", "ExerciseDTO convertToExerciseDTO(Exercise exercise);", "public EstructuraContratosDatDTO nuevoDatos() {\n\t\treturn consultaProsperaService.nuevosDatos();\n\t}", "@Override\n\tpublic void update(Unidade obj) {\n\n\t}", "public void crearCompraComic(CompraComicDTO compraComicDTO);", "public CoordinadorEntity toEntity(){\n \n CoordinadorEntity entity = new CoordinadorEntity(); \n entity.setId_coordinador(this.id_coodinador);\n entity.setNombres(this.nombres);\n entity.setApellidos(this.apellidos);\n entity.setGenero(this.genero);\n entity.setEmail(this.email);\n entity.setTipoDocumento(tipo_documento_id);\n entity.setNro_documento(this.nro_documento);\n \n return entity;\n }", "public ProductoDTO(){\r\n\t\t\r\n\t}", "public void update(DatiBancariPk pk, DatiBancari dto) throws DatiBancariDaoException;", "public void updateByEntity(Paciente paciente) {\n\t\n}", "public List<ContratoDTO> getContratos() {\r\n return contratos;\r\n }" ]
[ "0.60298175", "0.58258104", "0.57800394", "0.56177396", "0.56108534", "0.560377", "0.55775154", "0.55596197", "0.55396914", "0.55270505", "0.5515101", "0.54915434", "0.5449007", "0.5423799", "0.54131526", "0.5404855", "0.53929836", "0.5370279", "0.5338217", "0.5315976", "0.52994615", "0.5293344", "0.52870756", "0.5281735", "0.526721", "0.52596754", "0.52545226", "0.5242684", "0.52390045", "0.5233215", "0.5227312", "0.52266085", "0.52257246", "0.5222197", "0.52204823", "0.5219542", "0.52093184", "0.5204101", "0.51999485", "0.51924235", "0.51909995", "0.51832527", "0.5181943", "0.5178498", "0.5178414", "0.51735723", "0.51706135", "0.5168963", "0.5163984", "0.5150119", "0.51493144", "0.51391447", "0.5132561", "0.5132278", "0.51292104", "0.5128081", "0.5124059", "0.5123212", "0.51209927", "0.5118577", "0.5115168", "0.51136583", "0.5112336", "0.5110881", "0.51054305", "0.5101123", "0.5100007", "0.5095282", "0.50908554", "0.50902987", "0.50808126", "0.507322", "0.5072252", "0.5071335", "0.5066093", "0.50638276", "0.5063776", "0.5057779", "0.505582", "0.505312", "0.5051972", "0.5049755", "0.50495064", "0.50470513", "0.50454044", "0.5041637", "0.50412214", "0.5040694", "0.50366026", "0.5030974", "0.5029285", "0.50269085", "0.50259095", "0.5022733", "0.5020537", "0.50121", "0.5011935", "0.50112337", "0.5009873", "0.50029016", "0.50028664" ]
0.0
-1
Metodo que retorna el nombre de la tabla de BD
public String getTableName() { return IDaoConstants.TABLE_PROD_PTOS_VTA; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TableName name();", "public String getNomTable();", "@Override\n\tpublic String getTableName(int arg0) throws SQLException {\n\t\treturn tMeta[0].tableName();\n\t}", "String getTableName();", "public String getDBTableName()\n\t{\n\t\treturn this.getClass().getSimpleName();\n\t}", "@Override\n\tpublic String getTableName() {\n\t\tString sql=\"dip_dataurl\";\n\t\treturn sql;\n\t}", "public String getName(){\n\t\t\treturn tableName;\n\t\t}", "String tableName2Name(String name);", "@Override\n\tpublic String getTableName() {\n\t\treturn \"DMDB.GY_DM_ZJLX\";\n\t}", "public String getName() {\n return tableName;\n }", "public String getTablename() {\n return tablename;\n }", "@Override\r\n\tpublic String getTableName(String[] sql) {\n\t\treturn sql[2];\r\n\t}", "@Override\n\tprotected String getTableName() {\n\t\treturn super.getTableName();\n\t}", "public String getTableName() {\n return getTableName(false, false, false, false);\n }", "protected String getTableName()\n {\n return immutableGetTableName();\n }", "String pvTableName();", "public String getTableName() throws DatabaseSchemaException {\n return Database.getTableName(clazz);\n }", "public abstract String getDatabaseTableName(String entityName);", "String getTableName(String name);", "@Override\n\tpublic String getTableName() { \n\t\treturn tableName;\n\t}", "public String getTableDbName() { return \"t_trxtypes\"; }", "String pvIDTableName();", "public final String getTableName() {\n\t\treturn wTableName;\n\t}", "@Override\n protected String getColNamesQuery(String tableName) {\n return \"SELECT t.* FROM \" + escapeTableName(tableName) + \" AS t LIMIT 1\";\n }", "public String getTableName() {\n\t\treturn this.getTableName(this.currentClass());\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getTableName() {\n\t\treturn null;\r\n\t}", "@Override\n\t\tpublic String getTableName() {\n\t\t\treturn null;\n\t\t}", "public String getDbTable() {return dbTable;}", "public String getTableName() \n\t{\n\t return tableName ;\n\t}", "public String getTableDbName() {\r\n return \"t_testplans\";\r\n }", "public String getTranslatedTableName()\n {\n return DBProvider.translateTableName(this.getUntranslatedTableName());\n }", "public String getDistinctTableName() {\n return getTableName(false, false, true, false);\n }", "private static String makeTableBaseName(int number) {\n return \"bi_\" + Integer.toString(number);\n }", "String getBaseTable();", "private String getTableName(Class<?> clz) {\n\t\tif (clz.isAnnotationPresent(TableName.class)) {\n\t\t\treturn ((TableName) clz.getAnnotation(TableName.class)).value();\n\t\t}\n\t\treturn clz.getSimpleName();\n\t}", "public String table() {\n return tableName;\n }", "public String table() {\n return tableName;\n }", "public String getName() {\n return ctTableColumn.getName();\n }", "@Override\r\n\tprotected String getTable() {\n\t\treturn TABLE;\r\n\t}", "@Basic( optional = false )\r\n\t@Column( name = \"table_name\", nullable = false, length = 50 )\r\n\tpublic String getTableName() {\r\n\t\treturn this.tableName;\r\n\t\t\r\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getTableName() {\n\t\treturn null;\n\t}", "public String getTableName() {\r\n\t\treturn this.tableMetaDataContext.getTableName();\r\n\t}", "public String getTableName() {\n return tableName; \n }", "public String getTableDbName() {\r\n return \"t_package\";\r\n }", "@Override\n public String getTableName() {\n return getFreeTextDocTablename(conf);\n }", "protected int getTableCondtion()\n\t\t{\n\t\t\treturn Condtion ;\n\t\t}", "public String getTableNameString() {\n return tableName;\n }", "protected String getTableColumn()\n\t\t{\n\t\t\treturn Column ;\n\t\t}", "public String getNombreTabla() {\r\n\t\treturn nombreTabla;\r\n\t}", "private void createGetTableName(){\n //---------------------------------------------------------------------------\n buffer.append(\" /**\\n\");\n buffer.append(\" * <code>getTableName</code>\\n\");\n buffer.append(\" * <p>\\n\");\n buffer.append(\" * This method return the current tablename.\\n\");\n buffer.append(\" * </p>\\n\");\n buffer.append(\" * @author Booker Northington II\\n\");\n buffer.append(\" * @version 1.0\\n\");\n buffer.append(\" * @since 1.3\\n\");\n buffer.append(\" * @return tableName <code>String</code> the name \");\n buffer.append(\"of this table.\\n\");\n buffer.append(\" */\\n\");\n buffer.append(spacer);\n buffer.append(\" public String getTableName(){\\n\");\n buffer.append(spacer);\n buffer.append(\" return tableName;\\n\");\n buffer.append(\" }//getTableName() ENDS\\n\\n\");\n }", "public String getTableName() {\n return tableName;\n }", "public String getTableName() {\n return tableName;\n }", "public String getTableName() {\n return this.tableName;\n }", "int getTableID() {\r\n return table_id;\r\n }", "private String getTableName() {\n return this.tableName;\n }", "public String getTable()\n {\n return table;\n }", "@Override\r\n\tpublic String getDataBaseName(String[] sql) {\n\t\treturn UsedDataBase.getUsedDataBase();\r\n\t}", "public String getTableName() {\n return tableName;\n }", "public String getTableName() {\n return tableName;\n }", "protected String getDatabasePkColumnName() {\n return this.pkColumn == null ? getPlan().getDocIdField() : this.pkColumn;\n }", "java.lang.String getHeaderTableId();", "public String getTableName() {\n return this.tableName;\n }", "public String getTableName() {\n return this.tableName;\n }", "public abstract String getPrimaryKey(String tableName);", "public String getFullName()\n {\n String schema = db.getSchema();\n return (schema!=null) ? schema+\".\"+name : name;\n }", "public String getTableDbName() {\r\n return \"t_phase\";\r\n }", "public String getPrimaryKeyColumnName(String tableName) throws SQLException {\n\t\tString primaryKeyColumnName = null;\n\t\tDatabaseMetaData meta = con.getMetaData();\n\n\t\t// The Oracle database stores its table names as Upper-Case,\n\t\t// if you pass a table name in lowercase characters, it will not work.\n\t\t// MySQL database does not care if table name is uppercase/lowercase.\n\n\t\trs = meta.getPrimaryKeys(null, null, tableName);\n\t\twhile (rs.next()) {\n\t\t\tprimaryKeyColumnName = rs.getString(\"COLUMN_NAME\");\n\t\t\tSystem.out.println(\"getPrimaryKeys(): columnName=\" + primaryKeyColumnName);\n\t\t}\n\t\treturn primaryKeyColumnName;\n\t}", "public abstract byte getTableId();", "public String getTableName() {\r\n\t\treturn tableName;\r\n\t}", "public String getTipoSqlite(AtributoEntidade atributo) {\n\t\tString saida = getTipoSqliteSinc(atributo);\n\t\tif (atributo.getChave()) {\n\t\t\tsaida += \" PRIMARY KEY\";\n\t\t}\n\t\treturn saida;\n\t}", "private String getEntitiesTableName()\n {\n\tString prefix = PropertyLookup.getTableNamePrefix();\n\tString separator = PropertyLookup.getTableNameSeparator();\n\tString suffix = PropertyLookup.getEntitiesTableNameSuffix();\n\n\treturn prefix + separator + catalogId + separator + suffix;\n }", "String getColumnName();", "public static String tableName() {\r\n return \"TB_UPP_CHECK_STORE_DIVERGENCE\";\r\n }", "public String getDrivingTableName();", "protected final String immutableGetTableName()\n {\n return m__strTableName;\n }", "public String getTable() {\n return table;\n }", "public String getGroupTable() {\n return dbTable.getGroupTable();\n }", "@Override\n public String getName() {\n return columnInfo.getName();\n }", "@Override\n\tpublic String getTableName(int col) throws SQLException {\n\n\t\tif (col <= width && col >= 1) {\n\n\t\t\tcol--;\n\n\t\t\treturn this.tableName;\n\n\t\t} else\n\t\t\tthrow new SQLException(\"column requested out of table bounds\");\n\n\t}", "public String databaseName();", "TableId table();", "public String getTableName() {\n if (tableName == null) {\n tableName = Strings.tableize(ActiveRecords.findActiveRecordBaseName(getClass()));\n }\n return tableName;\n }", "@Override\n\tpublic long getTableId() {\n\t\treturn _expandoColumn.getTableId();\n\t}", "public String getName() { return _sqlName; }", "java.lang.String getDatabaseName();", "java.lang.String getDatabaseName();", "java.lang.String getDatabaseName();", "java.lang.String getDatabaseName();", "public String getMapTableName() {\n return getTableName(false, false, false, true);\n }", "public String getTable() {\n return table;\n }", "String pvUUIDTableName();", "@Override\n\tpublic String getTableName() {\n\t\treturn TICKETCHARGE.TABLE;\n\t}", "public String getTableName() {\n return (String) getAttributeInternal(TABLENAME);\n }", "String getSQLTypeName() throws SQLException;", "Table getTable();", "static String getTableName(Configuration conf) {\n String layout = conf.get(MRUtils.TABLE_LAYOUT_PROP,\n RdfCloudTripleStoreConstants.TABLE_LAYOUT.SPO.toString());\n String prefix = conf.get(MRUtils.TABLE_PREFIX_PROPERTY,\n RdfCloudTripleStoreConstants.TBL_PRFX_DEF);\n return RdfCloudTripleStoreUtils.layoutPrefixToTable(\n RdfCloudTripleStoreConstants.TABLE_LAYOUT.valueOf(layout), prefix);\n }", "String getTabela();", "public String getTableName(Class<?> aClass) {\n\t\tString result = aClass.getSimpleName();\n\t\tif (this.hasAnnotation(aClass, Table.class)) {\n\t\t\tTable anno = (Table) this.getAnnotation(aClass, Table.class);\n\t\t\tif (anno.name() != null && !anno.name().isEmpty())\n\t\t\t\tresult = anno.name();\n\t\t}\n\t\treturn result;\n\t}" ]
[ "0.7715556", "0.76697403", "0.71987414", "0.7184753", "0.71422225", "0.69809735", "0.69371706", "0.6918903", "0.68984413", "0.68901104", "0.6886645", "0.679685", "0.67585933", "0.6757526", "0.67288876", "0.67177707", "0.6689993", "0.66678417", "0.6646462", "0.6605498", "0.65874404", "0.65652215", "0.6550036", "0.65461487", "0.65316695", "0.65255964", "0.65255964", "0.65246505", "0.6522742", "0.6497774", "0.6494074", "0.64861244", "0.6482211", "0.6461537", "0.64539826", "0.64364195", "0.64339274", "0.64339274", "0.64326173", "0.6428733", "0.6414859", "0.6414282", "0.6414282", "0.6411874", "0.64074856", "0.6404723", "0.64013976", "0.6397947", "0.6394591", "0.6386415", "0.63708085", "0.6365864", "0.6362877", "0.6362877", "0.63296616", "0.6321148", "0.63116616", "0.6299155", "0.6294294", "0.62761176", "0.62761176", "0.62759984", "0.62708855", "0.62680984", "0.62680984", "0.62468266", "0.62422925", "0.6231282", "0.6219156", "0.6187804", "0.61860526", "0.61629987", "0.6158759", "0.6146933", "0.6145823", "0.6144375", "0.6136857", "0.6133594", "0.6117313", "0.6114406", "0.61121905", "0.6106119", "0.61045456", "0.60993505", "0.6092318", "0.60842794", "0.6079128", "0.6079128", "0.6079128", "0.6079128", "0.6074163", "0.6071614", "0.6068626", "0.605259", "0.6042604", "0.6041934", "0.6039227", "0.60344326", "0.6033968", "0.60327435" ]
0.6366604
51
Instantiates a new Rmi server.
public RMIServer() { System.setProperty("java.security.policy", "AllPermission.policy"); this.config = RMIConfiguration.getInstance(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static RoMServer createServer() throws IOException, Exception {\r\n \t\t// Ip and Port out of config\r\n \t\tIConfig cfg = ConfigurationFactory.getConfig();\r\n \r\n \t\treturn RoMServer.createServer(cfg.getIp(), cfg.getPort());\r\n \t}", "private void initRMI() throws RemoteException {\n log.info(\"Registering with RMI\");\n Registry registry = LocateRegistry.getRegistry();\n registry.rebind(address, this);\n }", "public void initRMI() {\n\t\ttry {\n\t\t\t//creo RMI handler\n\t\t\tGossip_RMI_handler handler = new Gossip_RMI_handler(data);\n\t\t\t//esporto l'interfaccia\n\t\t\tGossip_RMI_server_interface stub = (Gossip_RMI_server_interface)UnicastRemoteObject.exportObject(handler, 0);\n\t\t\tLocateRegistry.createRegistry(Gossip_config.RMI_PORT);\n\t\t\tRegistry r = LocateRegistry.getRegistry(Gossip_config.RMI_PORT);\n\t\t\tr.rebind(Gossip_config.RMI_NAME, stub);\n\t\t\t\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws RemoteException {\n\t\tServidorRMI server = new ServidorRMI();\n\t}", "public static void main(String[] args) throws NotBoundException, ClassNotFoundException, SQLException {\n\t\ttry {\n\t\t\tRegistry registry = LocateRegistry.createRegistry(1099);\n\t\t\tregistry.rebind(\"server\", (RMIServerInterface) new RMIServer());\n\t\t\tSystem.out.println(\"Rmi Server Running...\");\n\t\t} catch (AccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public RMIClient() {\n if(ipAdress == null){\n ipAdress = \"127.0.0.1\";\n }\n try {\n loginRegistry = LocateRegistry.getRegistry(ipAdress, 421);\n mainScreenRegistry = LocateRegistry.getRegistry(ipAdress, 422);\n } catch (RemoteException ex) {\n StageController.getInstance().popup(\"Server connection\", false, \"server connection failed.\");\n Logger.getLogger(RMIClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n if (loginRegistry != null) {\n try {\n loginProvider = (ILoginProvider) loginRegistry.lookup(\"loginProvider\");\n } catch (RemoteException | NotBoundException ex) {\n StageController.getInstance().popup(\"Server connection\", false, \"server connection failed.\");\n Logger.getLogger(RMIClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n if (mainScreenRegistry != null) {\n try {\n mainScreenProvider = (IMainScreenProvider) mainScreenRegistry.lookup(\"mainScreenProvider\");\n } catch (RemoteException | NotBoundException ex) {\n StageController.getInstance().popup(\"Server connection\", false, \"server connection failed.\");\n Logger.getLogger(RMIClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public Server() {\n\t\tinit(new Config());\n\t}", "public static RRCPServer getInstance() {\n if (instance == null) {\n instance = new RRCPServer();\n }\n return instance;\n }", "public static void main(String args[])\r\n {\n System.setSecurityManager(new RMISecurityManager());\r\n\r\n try\r\n {\r\n // Create ResultRMIImpl\r\n ResultRMIImpl myResult = new ResultRMIImpl(\"//Binita/myResultRMI\");\r\n System.out.println(\"ResultRMI Server ready.\");\r\n } \r\n catch (Exception e)\r\n { \r\n System.out.println(\"Exception: \" + e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "public Server() {}", "private void startServer() throws RemoteException, AlreadyBoundException{\n\t\ttry{\n\t\t\tInsuranceImplementation impl = new InsuranceImplementation();\n\t\t\timpl.setIPAddress(ipHospital.getText());\n\t\t\timpl.setPortNumebr(Integer.parseInt(portHospital.getText()));\n\t\t\t\n\t\t\tRegistry registry = LocateRegistry.createRegistry(Integer.parseInt(portInsurance.getText()));\n\t\t\tregistry.bind(Constants.RMI_ID, impl); \n\t\t\t\n\t\t\tlogMessage(\"Insurance Server Started\");\n\t\t\t\n\t\t} catch (Exception exp)\n\t\t{\n\t\t\tlogMessage(\"ObjID already in use.\\nPlease kill the process running at port 5002\");\n\t\t\texp.printStackTrace();\n\t\t} \n\t\t\n\t}", "private void initiateServerInstance(Socket newSocket){\n KVCommunicationModule com = createCommunicationModule(newSocket);\n KVServerInstance instance = createServerInstance(com, master);\n aliveInstances.add(instance);\n Thread aliveinstancethread = new Thread(instance);\n aliveinstancethread.start();\n aliveinstancethreads.add(aliveinstancethread);\n }", "public SyncServer() throws RemoteException\r\n\t{\r\n\t\ttry {\r\n\t\t\tinit(SYNC);\r\n\t\t} catch (Exception e) {\r\n\t\t\tDebug.ErrorMessage(\"SyncServer initialization error\",\"Exception\" + e);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\n\t\tString registryHost;\n\t\tint registryPort;\n\t\tString localIP = \"127.0.1.1\";\n\t\ttry {\n\t\t\tlocalIP = Inet4Address.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(args.length == 2) {\n\t\t\tregistryHost = args[0];\n\t\t\tregistryPort = Integer.parseInt(args[1]);\n\t\t} else if (args.length == 3) {\n\t\t\tregistryHost = args[0];\n\t\t\tregistryPort = Integer.parseInt(args[1]);\n\t\t\tlocalIP = args[2];\n\t\t} else {\n\t\t\tSystem.out.print(\"Usage: java RMIserver <Registry host> <Registry port> [ServerIP]\");\n\t\t\treturn;\t\t\t\n\t\t}\n\t\tRMIserver myserver = new RMIserver(localIP);\n\n\t\tRegistry registry;\n\t\tregistry = LocateRegistry.getRegistry(registryHost, registryPort);\n\n\t\twhile (true) {\n\t\t\tSystem.out.print(myserver.getPrompt());\n\t\t\tString cmdl = System.console().readLine();\n\t\t\tString cmdargs[] = cmdl.split(\" \");\n\t\t\tif (cmdargs[0].equals(\"register\")) {\n\t\t\t\tString class_name = cmdargs[1];\n\t\t\t\tString class_stub_name = cmdargs[1] + \"_stub\";\n\t\t\t\t// start a new thread to handle this particular server\n\t\t\t\t// object\n\t\t\t\tRunnable job = new ServerHandler(registry, class_name,\n\t\t\t\t\t\tclass_stub_name, localIP);\n\t\t\t\tThread t = new Thread(job);\n\t\t\t\tt.start();\n\t\t\t} else if (cmdargs[0].equals(\"exit\")) {\n\t\t\t\tSystem.out.println(\"Server Exisiting...\");\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tmyserver.printUsage();\n\t\t\t}\n\t\t}\n\t}", "public ServerService(){\n\t\tlogger.info(\"Initilizing the ServerService\");\n\t\tservers.put(1001, new Server(1001, \"Test Server1\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1002, new Server(1002, \"Test Server2\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1003, new Server(1003, \"Test Server3\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1004, new Server(1004, \"Test Server4\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tlogger.info(\"Initilizing the ServerService Done\");\n\t}", "public RentRPCServer() {\n\t\tsuper(null, null);\n\t\t// mocking purpose\n\t}", "public static void main(String args[]) {\n try {\n LocateRegistry.createRegistry(80);\n OperacoesImpl obj = new OperacoesImpl();\n Naming.rebind(\"ServerRMI\", obj);\n System.out.println(\"Server RMI pronto.\");\n } catch (Exception e) {\n System.out.println(\"Server erro\" + e.getMessage());\n }\n }", "public static void main(String args[]) {\n try {\n //Cria HelloImpl\n //Runtime.getRuntime().exec(\"rmiregistry 1010\");\n //Registry registry = LocateRegistry.getRegistry(2001);\n \tSystem.setProperty(\"java.rmi.server.hostname\",\"192.168.0.30\");\n Registry registry = LocateRegistry.createRegistry(2001);\n Implementation obj = new Implementation();\n registry.bind(\"HelloServer\", obj);\n System.out.println(\"Hello Server pronto.\");\n } catch (Exception e) {\n System.out.println(\"HelloServer erro \" + e.getMessage());\n }\n }", "public ClientMain() throws RemoteException, MalformedURLException, NotBoundException\r\n\t{\r\n\t\t//server = (IServer) Naming.lookup(\"rmi://10.152.206.74:1099/bankingServer\");\r\n\t\tserver = (IServer) Naming.lookup(\"rmi://localhost:1099/bankingServer\");\r\n\r\n\t\tmodel = new BankModel();\r\n\r\n\t\tSystem.out.println(\"Client running\");\r\n\t}", "public Server() {\n\t\t\n\t\ttry {\n\t\t\tss= new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace(); // Default\n\t\t}\n\t}", "public Server(){\n\t\ttry {\n\t\t\t// initialize the server socket with the specified port\n\t\t\tsetServerSocket(new ServerSocket(PORT));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO Exception while creating a server\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public PuppetIdracServerDevice() { }", "public static RoMServer createServer(InetAddress serverIpAddress, int serverPort) throws IOException, Exception {\r\n \t\tLogger.logMessage(\"Starting Server...\");\r\n \t\tRoMServer server = new RoMServer(serverIpAddress, serverPort);\r\n \r\n \t\tserver.initServer();\r\n \t\tserver.beginAcceptClients();\r\n \r\n \t\treturn server;\r\n \t}", "private void startServer() {\n\t\ttry {\n//\t\t\tserver = new Server();\n//\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}", "private PSStartServerFactory() {\n if(instance == null)\n instance = new PSStartServerFactory();\n }", "public static void setupRMI(final boolean localHostOnly) {\n if (System.getProperty(SERVER_HOSTNAME) == null) {\n System.setProperty(SERVER_HOSTNAME, getLoopbackAddress());\n }\n // do not use HTTP tunnelling\n System.setProperty(\"java.rmi.server.disableHttp\", \"true\");\n\n if (RMISocketFactory.getSocketFactory() != null) return;\n try {\n RMISocketFactory.setSocketFactory(new RMISocketFactory() {\n final InetAddress loopbackAddress = InetAddress.getByName(getListenAddress(localHostOnly));\n\n @Override\n public Socket createSocket(String host, int port) throws IOException {\n Socket socket = new Socket(host, port);\n socket.setKeepAlive(true);\n return socket;\n }\n\n @Override\n public ServerSocket createServerSocket(int port) throws IOException {\n return new ServerSocket(port, 0, loopbackAddress);\n }\n });\n }\n catch (IOException e) {\n throw new AssertionError(e);\n }\n }", "public void init(){\n\t\tmultiplexingClientServer = new MultiplexingClientServer(selectorCreator);\n\t}", "private static void startServer(){\n try{\n MMServer server=new MMServer(50000);\n }catch (IOException ioe){\n System.exit(0);\n }\n \n }", "private RMIRegistrator() {\n\t// nothing\n }", "public OOXXServer(){\n\t\ttry\n\t\t{\n\t\t\tserver = new ServerSocket(port);\n\t\t\t\n\t\t}\n\t\tcatch(java.io.IOException e)\n\t\t{\n\t\t}\n\t}", "public static void main(String[] args) {\n\n try {\n\n Registry registry = LocateRegistry.createRegistry( 1888);\n registry.rebind(\"YStudentServerImpl\", new YStudentServerImpl());\n\n\n }\n catch (Exception ex){\n System.err.println(\"YStudentServerImpl exeption\");\n ex.printStackTrace();\n }\n\n\n }", "public static RoMServer createServer(int serverPort) throws IOException, Exception {\r\n \t\treturn RoMServer.createServer(InetAddress.getLocalHost(), serverPort);\r\n \t}", "public static IdServer getInstance() {\n\t\tif (server == null) {\n\t\t\tserver = new IdServer();\n\t\t}\n\t\treturn server;\n\t}", "private StripesPMI() {}", "public ServerDef() {}", "public Server() throws Exception {\r\n\t}", "private static void createServer(final IChordNode node, int localPort)\n throws Exception {\n LocateRegistry.createRegistry(localPort);\n Naming.rebind(\n String.format(\"//localhost:%d/%s\", localPort, CHORDNODE),\n node\n );\n System.out.printf(\n \"New server started on localhost:%d with ID %d%n\",\n localPort, node.getID()\n );\n\n // Make nodes leave cleanly if the JVM is terminated\n Runtime.getRuntime().addShutdownHook( new Thread() {\n public void run() {\n try {\n node.leave();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n } );\n\n\n // Continuously print network information, keeping server alive\n while (true) {\n System.out.printf(\"### %4d ####%n\", node.getID());\n System.out.println( node.ringToString() );\n System.out.println();\n Thread.sleep(3000);\n }\n }", "public void startClient() throws RemoteException {\n\t\t\n\t\t// object to be passed to server\n\t\tString[] details = { name, dob, country, clientServiceName, hostName };\n\n\t\t// creating server stub \n\t\ttry {\n\t\t\tNaming.rebind(\"rmi://\" + hostName + \"/\" + clientServiceName, this);\n\t\t\tIServer = (IChatServer) Naming.lookup(\"rmi://\" + hostName + \"/\" + serviceName);\n\t\t} catch (ConnectException e) {\n\t\t\tJOptionPane.showMessageDialog(chatGUI.frame, \"The server seems to be unavailable\\nPlease try later\",\n\t\t\t\t\t\"Connection problem\", JOptionPane.ERROR_MESSAGE);\n\t\t\tconnectionProblem = true;\n\t\t\te.printStackTrace();\n\t\t} catch (NotBoundException | MalformedURLException me) {\n\t\t\tconnectionProblem = true;\n\t\t\tme.printStackTrace();\n\t\t}\n\t\t// if no problem sends details object to the server to be processed\n\t\tif (!connectionProblem) {\n\t\t\tIServer.initiateRegister(details);\n\n\t\t}\n\t\t// print this if it was able to reach this point\n\t\tSystem.out.println(\"Client Listen RMI Server is running...\\n\");\n\t}", "protected Server() {\n super(\"Ublu Server\");\n }", "public MorpionServerImpl() throws RemoteException {\r\n\t\tmorpionClients = new HashMap<String, MorpionClientInterface>();\r\n\t}", "public LoyaltyRMIServerImpl(Properties props)\n throws RemoteException {\n super(props);\n setImpl();\n init();\n }", "public Server() {\n\t\tsession = new WelcomeSession();\n\t\tmPort = DEFAULT_PORT;\n\t\texecutor = Executors.newCachedThreadPool();\n\t}", "private Main startJndiServer() throws Exception {\n\t\tNamingServer namingServer = new NamingServer();\n\t\tNamingContext.setLocal(namingServer);\n\t\tMain namingMain = new Main();\n\t\tnamingMain.setInstallGlobalService(true);\n\t\tnamingMain.setPort( -1 );\n\t\tnamingMain.start();\n\t\treturn namingMain;\n\t}", "private Server() {\r\n\r\n\t\t// Make sure that all exceptions are written to the log\r\n\t\tThread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler());\r\n\r\n\t\tnew Thread() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Find all controllers and initialize them\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tReflections reflections = new Reflections(\"net.yourhome.server\");\r\n\t\t\t\tSet<Class<? extends IController>> controllerClasses = reflections.getSubTypesOf(IController.class);\r\n\r\n\t\t\t\tfor (final Class<? extends IController> controllerClass : controllerClasses) {\r\n\t\t\t\t\tif (!Modifier.isAbstract(controllerClass.getModifiers())) {\r\n\t\t\t\t\t\tnew Thread() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\tMethod factoryMethod;\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tfactoryMethod = controllerClass.getDeclaredMethod(\"getInstance\");\r\n\t\t\t\t\t\t\t\t\tIController controllerObject = (IController) factoryMethod.invoke(null, null);\r\n\t\t\t\t\t\t\t\t\tServer.this.controllers.put(controllerObject.getIdentifier(), controllerObject);\r\n\t\t\t\t\t\t\t\t\tSettingsManager.readSettings(controllerObject);\r\n\t\t\t\t\t\t\t\t\tcontrollerObject.init();\r\n\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\tServer.log.error(\"Could not instantiate \" + controllerClass.getName() + \" because getInstance is missing\", e);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}.start();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\r\n\t}", "public Server() {\n initComponents();\n }", "public Server() {\n initComponents();\n }", "public RegistryImpl(String host, int port) throws RemoteException\n {\n Skeleton skeleton = new Skeleton(this, host, port, 0);\n skeleton.start();\n }", "public RegistryImpl(int port) throws RemoteException\n {\n Skeleton skeleton = new Skeleton(this, \"127.0.0.1\", port, 0);\n skeleton.start();\n }", "@Override\n\tpublic SwimConnection createInstance() {\n\t\tSwimConnection connection = null;\n\t\t\n\t\tif (this.hasSpecification()) {\n\t\t\tif (this.getSpecification().getId().equals(Specification.CONNECTION_SWIM_SIMULATED_ID)) {\n\t\t\t\tSimulatedSwimConnectionProperties properties = (SimulatedSwimConnectionProperties) this.getSpecification().getProperties();\n\t\t\t\tconnection = new SimulatedSwimConnection(\n\t\t\t\t\t\tproperties.getResourceDirectory(),\n\t\t\t\t\t\tDuration.ofMillis(properties.getUpdatePeriod()),\n\t\t\t\t\t\tproperties.getUpdateProbability(),\n\t\t\t\t\t\tproperties.getUpdateQuantity());\n\t\t\t\tif (properties.getSubscribesAIXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.AIXM);\n\t\t\t\tif (properties.getSubscribesFIXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.FIXM);\n\t\t\t\tif (properties.getSubscribesWXXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.WXXM);\n\t\t\t\tif (properties.getSubscribesIWXXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.IWXXM);\n\t\t\t\tif (properties.getSubscribesAMXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.AMXM);\n\t\t\t} else if (this.getSpecification().getId().equals(Specification.CONNECTION_SWIM_LIVE_ID)) {\n\t\t\t\tLiveSwimConnectionProperties properties = (LiveSwimConnectionProperties) this.getSpecification().getProperties();\n\t\t\t\tconnection = new LiveSwimConnection();\n\t\t\t\t// TODO: set properties for live SWIM connection\n\t\t\t\tif (properties.getSubscribesAIXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.AIXM);\n\t\t\t\tif (properties.getSubscribesFIXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.FIXM);\n\t\t\t\tif (properties.getSubscribesWXXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.WXXM);\n\t\t\t\tif (properties.getSubscribesIWXXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.IWXXM);\n\t\t\t\tif (properties.getSubscribesAMXM())\n\t\t\t\t\tconnection.subscribe(SwimProtocol.AMXM);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn connection;\n\t}", "public void run() {\n\t try{\n \t\tRegistry registry = LocateRegistry.createRegistry(1099);\n \t\tTestUnitImpl testUnit = new TestUnitImpl();\n \t\tProxyMonitoringUnit proxyUnit= new ProxyMonitoringUnit();\n\t registry.rebind(\"TestingUnit\", testUnit);\n\t registry.rebind(\"ProxyUnit\", proxyUnit);\n\t System.out.println(\"server.RMI Server is ready.\");\n \t}catch(RemoteException e){\n \t\te.printStackTrace();\n \t}\n \t\n }", "RemoteActuator createRemoteActuator();", "public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }", "private void startServer() {\n mBluetoothGattServer = mBluetoothManager.openGattServer(this, mGattServerCallback);\n if (mBluetoothGattServer == null) {\n Log.w(TAG, \"Unable to create GATT server\");\n return;\n }\n\n mBluetoothGattServer.addService(TimeProfile.createTimeService());\n\n // Initialize the local UI\n updateLocalUi(System.currentTimeMillis());\n mBluetoothGattServer.addService(SecurityProfile.createSecurityService());\n //mBluetoothGattServer.addService(ConfigurationProfile.createConfigurationService());\n\n }", "public void startServer() {\n server.start();\n }", "@Override\n protected HotRodServer createHotRodServer() {\n HotRodServerConfigurationBuilder serverBuilder = new HotRodServerConfigurationBuilder();\n serverBuilder.adminOperationsHandler(new EmbeddedServerAdminOperationHandler());\n\n return HotRodClientTestingUtil.startHotRodServer(cacheManager, serverBuilder);\n }", "public Client() {\n initComponents();\n \n Server server = new Server();\n server.start();\n \n }", "public Srv() {\n super(Epc.NAMESPACE, \"srv\");\n }", "public InitialValuesConnectionCenter() \n\t{\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IOException ServerConnectionCenter.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ServerConnecter() {\r\n\r\n\t}", "public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }", "public static void main(String[] args) {\n\t\t//System.setSecurityManager(new RMISecurityManager());\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Server is starting...\");\n\t\t\n\t\ttry {\n\t\t\tServer server = new Server(sPort);\n\t\t\tserver.start();\n\t\t\tSystem.out.println(\"Press Enter to exit.\") ;\n\t\t\t\n\t\t\tin.nextLine() ;\n\t\t\t\n\t\t\t//Naming.rebind(Utilities.SERVER_NAME, gc);\n\t\t\tSystem.out.println(\"Server is started\");\n\t\t} catch (RemoteException | UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tin.close(); \n\t}", "public Cinit(String server_ip) {\n this.server_ip=server_ip;\n start();\n }", "public ServerA(){}", "public Server() {\n\t\tthis.currentMode = Mode.TEST; // TODO: implement\n\t}", "private void initJMX() throws Exception{\n\t\tMap env = new HashMap<String, Object>();\r\n\t\tenv.put(Context.INITIAL_CONTEXT_FACTORY,\"com.sun.jndi.rmi.registry.RegistryContextFactory\");\r\n\t\tenv.put(RMIConnectorServer.JNDI_REBIND_ATTRIBUTE, \"true\");\r\n\t\tJMXServiceURL url = new JMXServiceURL(\"service:jmx:rmi:///jndi/rmi://127.0.0.1:1099/server\");\r\n\t\tObjectName objectName=ObjectName.getInstance(\"test:name=test\");\r\n\t\tManagementFactory.getPlatformMBeanServer().registerMBean(MBeanHandler.createJMXMBean(new AdminAgent(),objectName), objectName);\r\n\t\t\r\n\t\tRegion region=CacheFactory.getAnyInstance().getRegion(\"/CHECK\");\t\r\n\t\tObjectName regionObjectName=ObjectName.getInstance(\"region:name=region\");\r\n\t\tManagementFactory.getPlatformMBeanServer().registerMBean(MBeanHandler.createJMXMBean(new RegionAgent(region),regionObjectName), regionObjectName);\r\n\t\tJMXConnectorServer connectorServer = JMXConnectorServerFactory\r\n\t\t.newJMXConnectorServer(url, env, ManagementFactory.getPlatformMBeanServer());\r\n connectorServer.start();\r\n\t\t\r\n//\t\tMBeanHandler.createJMXMBean(new AdminAgent(), ObjectNameFactory.resolveFromClass(AdminAgent.class));\r\n//\t\tjmxserver.registerMBean(new AdminAgent(), ObjectNameFactory.resolveFromClass(AdminAgent.class));\r\n\t\tSystem.out.println(\"JMX connection is established on: service:jmx:rmi:///jndi/rmi://127.0.0.1:1099/server\");\r\n\t\t\r\n\t}", "public void startServer(PWModelDetails pwModelDetails) {\n try {\n List<ServerSap> serverSaps = null;\n try {\n serverSaps = ServerSap.getSapsFromSclFile(pwModelDetails.getSclFileName());\n } catch (SclParseException e) {\n logger.info(\"Error parsing SCL/ICD file: \" + e.getMessage());\n e.printStackTrace();\n return;\n }\n serverSap = serverSaps.get(0);\n serverSap.setPort(pwModelDetails.getPortNumber());\n\n InetAddress address = null;\n try {\n ipAddress = pwModelDetails.getIpAddress();\n address = InetAddress.getByName(ipAddress);\n } catch (UnknownHostException e) {\n logger.info(\"Unknown host: \" + ipAddress);\n logger.info(\"Proxy will run with the defualt IP as define in the SCL file.\");\n logger.info(\"Unknown host \" + ipAddress);\n return;\n }\n if (address != null) {\n serverSap.setBindAddress(address);\n }\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n if (serverSap != null) {\n serverSap.stop();\n }\n logger.info(\"Server was stopped\");\n }\n });\n ServerModel serverModel = serverSap.getModelCopy();\n// create a SampleServer instance that can be passed as a callback object to startListening() and\n// SmartPowerIEDServer sampleServer = new SmartPowerIEDServer();\n SoftGridIEDServer sampleServer = this;\n// Open MUC initialization\n List<BasicDataAttribute> branchCircuitBreakerVals = new ArrayList<BasicDataAttribute>(3);\n for (String reference : iedRefFcHashMap.keySet()) {\n BasicDataAttribute field = (BasicDataAttribute) serverModel.findModelNode(reference, iedRefFcHashMap.get(reference));\n if (field == null) {\n logger.info(\">>>>>> Error in obtaining SCL reference object = \" + reference);\n }\n branchCircuitBreakerVals.add(field);\n }\n// Power World Device Initialization\n ParameterGenerator parameterGenerator = new ParameterGenerator();\n parameterGenerator.setSclKeyToPWKeyMap(pwModelDetails.getSclToPWMapping());\n parameterGenerator.setKeyParameters(pwModelDetails.getKeyArray());\n parameterGenerator.setValueParameters(pwModelDetails.getDataFieldArray());\n parameterGenerator.setPersistedValues(pwModelDetails.getValueArray());\n parameterGenerator.setDeviceObjectName(pwModelDetails.getDeviceName());\n if (controlAPI == null) {\n controlAPI = IedControlerFactory.getPWComBridgeIterface();\n synchronized (controlAPI) {\n if (!controlAPI.isCaseOpened()) {\n controlAPI.openCase();\n }\n }\n }\n parameterGenerator.setControlAPI(controlAPI);\n// load power world data\n serverSap.startListening(sampleServer, parameterGenerator);\n try {\n serverSap.setValues(branchCircuitBreakerVals);\n } catch (Exception e) {\n logger.info(\"pwModelDetails.getModelNodeReference() = \" + pwModelDetails.getModelNodeReference());\n e.printStackTrace();\n }\n\n String[][] paramPack = parameterGenerator.getParamPack();\n type = IEDUtils.getIEDType(parameterGenerator.getDeviceObjectName());\n id = ++IED_COUNT;\n StringBuffer sb = new StringBuffer();\n String logDataSeperator = \":\";\n boolean loged = false;\n logEvent(\"IED : \" + type.name() + \" : \" + id + \" is Started...!\");\n String[] elements = null;\n while (true) {\n synchronized (this) {\n try {\n Thread.sleep(PW_INTERROGATION_INTERVAL);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n elements = parameterGenerator.loadDataValues(paramPack);\n if (elements == null) {\n if(type.name().equals(\"BUS\"))\n {\n System.out.println(\"BUS\");\n }\n continue;\n }\n sb.append(\"Type:\").append(type.name());\n for (int i = 0; i < branchCircuitBreakerVals.size(); i++) {\n BasicDataAttribute modelNodes = branchCircuitBreakerVals.get(i);\n if (modelNodes != null && elements.length > i) {\n String pwKeyName = null;\n for (String sclKey : parameterGenerator.getSclKeyToPWKeyMap().keySet()) {\n if (modelNodes.getReference().toString().endsWith(sclKey)) {\n pwKeyName = sclKey;\n }\n }\n if (pwKeyName == null) {\n continue;\n }\n for (int j = 0; j < paramPack[0].length; j++) {\n if (!loged) {\n sb.append(logDataSeperator).append(paramPack[0][j]).append(logDataSeperator).append(elements[j]);\n }\n if (parameterGenerator.getSclKeyToPWKeyMap().get(pwKeyName).equals(paramPack[0][j])) {\n if (modelNodes instanceof BdaDoubleBitPos) {\n byte[] status = new byte[1];\n if (elements[j].equalsIgnoreCase(\"open\")) {\n status[0] = 0;\n } else {\n status[0] = 1;\n }\n ((BdaDoubleBitPos) modelNodes).setValue(status);\n } else if (modelNodes instanceof BdaVisibleString) {\n ((BdaVisibleString) modelNodes).setValue(elements[j]);\n } else if (modelNodes instanceof BdaFloat32) {\n ((BdaFloat32) modelNodes).setFloat(Float.parseFloat(elements[j]));\n }\n }\n }\n loged = true;\n }\n }\n serverStarted = true;\n// synchronized (logger) {\n// if (ConfigUtil.MANUAL_EXPERIMENT_MODE) {\n // if this string is not printed in the log file,\n logger.info(sb.toString());\n// }\n// }\n sb = new StringBuffer(\"\");\n loged = false;\n serverSap.setValues(branchCircuitBreakerVals);\n if (serverStoped) {\n serverStarted = false;\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void conectServer() {\n\n\t}", "public Server(boolean enableTerminal, String networkIP, int tcpPort, int rmiPort, String multicastIP, int multicastPort) throws RemoteException\n\t{\t\t\n\t\tthis.serverIP = networkIP;\n\t\t\n\t\t//setup terminal\n\t\tterminal = new Terminal(this);\n\t\t\n\t\tprintTerminal(\"SystemY 2014 Server \" + version + \" - Created by: Thomas Huybrechts, Quinten Van Hasselt, Arthur Janssens, Dries Blontrock\");\n\t\tprintTerminalInfo(\"Server starting...\");\n\t\t\n\t\tnodeManager = new NodeManager();\n\t\tfileManager = new FileSystemManager();\n\t\tfailureManager = new FailureManager(this);\n\t\t\n\t\t//setup networkinterface\n\t\tnetworkinterface = new Networkinterface(networkIP, rmiPort, tcpPort, tcpPort, multicastIP, multicastPort);\n\t\t\n\t\t//setup node lifecycle services\n\t\tdiscoveryManager = new DiscoveryManager(networkinterface.getMulticastObserver(), this);\n\t\t\n\t\t//start networkinterface\n\t\tif(startupProcedure())\n\t\t{\n\t\t\tprintTerminalInfo(\"Server ready.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprintTerminalError(\"Server not fully operational, resolve the issue and reboot the server.\");\n\t\t}\n\t\t\n\t\tif(enableTerminal)\n\t\t{\n\t\t\tactivateTerminal();\n\t\t}\n\t}", "public synchronized static RMIClient getInstance() {\n if (instance == null) {\n instance = new RMIClient();\n }\n\n return instance;\n }", "private static void startServer() {\n new Thread() {\n public void run() {\n Server server = new Server();\n server.startUDP();\n }\n }.start();\n }", "public Server() throws IOException {\n try {\n this.serverSocket = new ServerSocket(this.port,100, InetAddress.getByName(host));\n } catch (UnknownHostException e) {\n System.out.println(\"Erreur lors de la construction du serveur (Hôte inconnu) - Server Constructor Error\");\n e.printStackTrace();\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "public static void initializeServer() {\n\t\tServer.initializeServerGUI();\n\t}", "static private Server createServer(String args[]) throws Exception {\n if (args.length < 1) {\n usage();\n }\n\n int port = PORT;\n int backlog = BACKLOG;\n boolean secure = SECURE;\n\n for (int i = 1; i < args.length; i++) {\n if (args[i].equals(\"-port\")) {\n checkArgs(i, args.length);\n port = Integer.valueOf(args[++i]);\n } else if (args[i].equals(\"-backlog\")) {\n checkArgs(i, args.length);\n backlog = Integer.valueOf(args[++i]);\n } else if (args[i].equals(\"-secure\")) {\n secure = true;\n } else {\n usage();\n }\n }\n\n Server server = null;\n\n if (args[0].equals(\"B1\")) {\n server = new B1(port, backlog, secure);\n } else if (args[0].equals(\"BN\")) {\n server = new BN(port, backlog, secure);\n } else if (args[0].equals(\"BP\")) {\n server = new BP(port, backlog, secure);\n } else if (args[0].equals(\"N1\")) {\n server = new N1(port, backlog, secure);\n } else if (args[0].equals(\"N2\")) {\n server = new N2(port, backlog, secure);\n }\n\n return server;\n }", "public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }", "public static void main(String[] args) {\n Servidor s = new Servidor();\n try{\n VoteSystem channel = (VoteSystem) UnicastRemoteObject.exportObject(s, 0);\n Registry register = LocateRegistry.createRegistry(1099);\n register.bind(\"VoteSystem\", channel);\n ServerGUI sgui= new ServerGUI();\n ServerThread st = new ServerThread(sgui);\n st.setDaemon(true);\n st.start();\n sgui.setVisible(true);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "synchronized public void start() throws IOException, InterruptedException {\n createInstanceFromConfig(true);\n }", "public void startJMXService() throws ServerException {\n\n //File path for the jmx config file.\n String filePath = CarbonUtils.getEtcCarbonConfigDirPath() + File.separator + \"jmx.xml\";\n boolean startJMXServer = false;\n\n File jmxConfigFile = new File(filePath);\n\n //Check whether jmx.xml file exists\n if (jmxConfigFile.exists()) {\n //Read jmx.xml file.\n parseJMXConfigXML(filePath);\n startJMXServer = jmxProperties.isStartServer();\n if (!startJMXServer) {\n return;\n }\n }\n\n int rmiRegistryPort = jmxProperties.getRmiRegistryPort();\n if (rmiRegistryPort == -1) {\n throw new RuntimeException(\"RMIRegistry port has not been properly defined in the \" +\n \"jmx.xml or carbon.xml files\");\n }\n MBeanServer mbs = ManagementFactory.getMBeanServer();\n String jmxURL;\n try {\n try {\n rmiRegistry = LocateRegistry.createRegistry(rmiRegistryPort);\n } catch (Throwable ignored) {\n log.error(\"Could not create the RMI local registry\", ignored);\n }\n\n String hostName;\n //If 'startRMIServer' element in jmx.xml file set to true and 'HostName' element\n // value that file is not null.\n if (startJMXServer && jmxProperties.getHostName() != null) {\n hostName = jmxProperties.getHostName();//Set hostname value from jmx.xml file.\n } else { //Else\n hostName = NetworkUtils.getLocalHostname();\n }\n // Create an RMI connector and start it\n int rmiServerPort = jmxProperties.getRmiServerPort();\n if (rmiServerPort != -1) {\n jmxURL = \"service:jmx:rmi://\" + hostName + \":\" +\n rmiServerPort + \"/jndi/rmi://\" + hostName + \":\" +\n rmiRegistryPort + \"/jmxrmi\";\n\n } else {\n jmxURL = \"service:jmx:rmi:///jndi/rmi://\" +\n hostName + \":\" + rmiRegistryPort + \"/jmxrmi\";\n }\n JMXServiceURL url = new JMXServiceURL(jmxURL);\n\n // Security credentials are included in the env Map\n HashMap<String, CarbonJMXAuthenticator> env =\n new HashMap<String, CarbonJMXAuthenticator>();\n env.put(JMXConnectorServer.AUTHENTICATOR, new CarbonJMXAuthenticator());\n jmxConnectorServer =\n JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);\n jmxConnectorServer.start();\n log.info(\"JMX Service URL : \" + jmxURL);\n } catch (Exception e) {\n String msg = \"Could not initialize RMI server\";\n log.error(msg, e);\n }\n }", "private Server()\n\t{\n\t}", "public Server createServer(Server server){\n\t\tlogger.info(\"Creating the Server with the given details\");\n\t\tint id = servers.size()+1+1000;\n\t\tlogger.info(\"The Server id is \"+id);\n\t\tserver.setServerId(id);\n\t\tserver.setServerStatus(ServerStatus.BUILDING);\n\t\tServerBuilder serverBuilder = new ServerBuilder(\"\"+id, server);\n\t\tserverBuilder.start();\n\t\tservers.put(id, server);\n\t\treturn server;\n\t}", "public void start() {\n\t\trmiUtils.startRMI(IRMI_Defs.CLASS_SERVER_PORT_CLIENT);\n\n\t\ttry {\n\t\t\tview.setRemoteHost(rmiUtils.getLocalAddress()); //TODO Is this stored somewhere?\n\t\t\tuser = new User(\"default\", rmiUtils.getLocalAddress(), this);\n\t\t\tview.append(\"Create User \" + user.getName() + \"\\n\");\n\n\t\t\tregistry = rmiUtils.getLocalRegistry();\n\t\t\tIUser stub = (IUser) UnicastRemoteObject.exportObject(user, IUser.BOUND_PORT);\n\t\t\tview.append(\"Found registry: \" + registry + \"\\n\");\n\n\t\t\tregistry.rebind(IUser.BOUND_NAME, stub);\n\t\t\tview.append(\"IUser bound to \" + IUser.BOUND_NAME + \"\\n\");\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error getting local address: \" + e);\n\t\t}\n\t}", "private ServerSocket setUpServer(){\n ServerSocket serverSocket = null;\n try{\n serverSocket = new ServerSocket(SERVER_PORT);\n\n }\n catch (IOException ioe){\n throw new RuntimeException(ioe.getMessage());\n }\n return serverSocket;\n }", "public Server() throws IOException\n {\n socket = new ServerSocket(port);\n }", "public static void main(String[] args) {\n System.out.println(\"Begin Server...\");\n\n\n\n try {\n Remote r = Naming.lookup(\"UniversalRegistry\");\n IUniversalRegistry iur = (IUniversalRegistry)r;\n\n //on ajoute des voitures dans le registre universel\n Voiture v1 = new Voiture(1);\n iur.bind(\"v1\",v1);\n Voiture v2 = new Voiture(2);\n iur.bind(\"v2\",v2);\n\n\n //On ajoute des voitures electrique dans le registre universel\n VoitureElectrique ve = new VoitureElectrique(4,0);\n iur.bind(\"ve\",ve);\n VoitureElectrique ve1 = new VoitureElectrique(4,1);\n iur.bind(\"ve1\",ve1);\n\n VoitureElectrique ve3 = new VoitureElectrique(4,1);\n iur.bind(\"ve3\",ve3);\n\n ClassTest classTest = new ClassTest();\n iur.bind(\"cl\",classTest);\n\n\n }\n\n catch(Exception e){\n e.printStackTrace();\n }\n\n\n\n }", "public static void main ( String args [] )\n {\n // Variable deceleration\n String hostname = \"localhost\" ; // Default host to use\n \n // Override the default values for hostname if passed through command line.\n if ( args [0].length () != 0 ) { hostname = args [0] ; }\n \n try\n {\n // Set the system property for \"java.rmi.server.hostname\".\n System.setProperty ( \"java.rmi.server.hostname\", hostname ) ;\n \n // Initialize the interface to access all the remote functions.\n HelloServerImplementation registerObject = new HelloServerImplementation () ;\n\n // Declare registry variable\n Registry registry ;\n \n // This try catch is to make sure that the registry is created\n try \n {\n // Try to get the remote object Registry for the local host on the default registry port of 1099.\n registry = LocateRegistry.getRegistry() ;\n registry.list() ; // Fetch the names bounded to the registry\n }\n // Catch the exception where communication with the registry fails and create the registry.\n catch ( RemoteException e ) \n {\n // Create the registry on the default rmi port 1099\n System.out.println ( \"RMI registry cannot be located at port \" + Registry.REGISTRY_PORT ) ;\n registry = LocateRegistry.createRegistry ( Registry.REGISTRY_PORT ) ;\n System.out.println ( \"RMI registry created at port \" + Registry.REGISTRY_PORT ) ;\n }\n \n // Once the registry is successfully created, rebind the HelloServerInterface to the remote reference created above.\n registry.rebind ( \"HelloServerInterface\", registerObject ) ;\n System.out.println ( \"Callback Server ready.\" ) ;\n }\n // Catch the exception and provide the necessary information to the user. \n catch ( Exception e ) { System.out.println ( \"Exception: \" + e.getMessage () ) ; e.printStackTrace () ; }\n }", "public static void main(String[] args) throws MalformedObjectNameException, InstanceAlreadyExistsException,\n\t\t\tMBeanRegistrationException, NotCompliantMBeanException {\n\t\tMBeanServer server = ManagementFactory.getPlatformMBeanServer();\n\t\tObjectName myJmxName = new ObjectName(\"jmxBean:name=myJmx\");\n\t\tserver.registerMBean(new MyJmx(), myJmxName);\n// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tLocateRegistry.createRegistry(9999);\n\t\t\tJMXServiceURL url = new JMXServiceURL(\"service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi\");\n\t\t\tJMXConnectorServer jcs = JMXConnectorServerFactory.newJMXConnectorServer(url, null, server);\n\t\t\tSystem.out.println(\"begin rmi start\");\n\t\t\tjcs.start();\n\t\t\tSystem.out.println(\"rmi start\");\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Server() {\n try {\n welcomeSocket = new ServerSocket(PORT);\n System.out.println(\"Server listening on \" + PORT);\n } catch (IOException e) {\n System.out.println(\"Error creating welcome socket. Is this socket available?\");\n }\n }", "@Override\r\n public void init() throws ServletException {\r\n try {\r\n s_server =\r\n Server.getInstance(new File(Constants.FEDORA_HOME), false);\r\n s_management =\r\n (Management) s_server\r\n .getModule(\"fedora.server.management.Management\");\r\n if (s_management == null) {\r\n throw new ServletException(\"Unable to get Management module from server.\");\r\n }\r\n } catch (InitializationException ie) {\r\n throw new ServletException(\"Unable to get Fedora Server instance.\"\r\n + ie.getMessage());\r\n }\r\n }", "public Server() {\r\n this(0);\r\n hashtable = new Hashtable<String,String>();\r\n }", "public void init(ServletConfig conf) throws ServletException {\n super.init(conf);\n \n MBeanServer mBeanServer = null;\n\n Registry reg=null;\n \n // TODO: use config to get the registry port, url, pass, user\n\n \n try {\n if( reg==null )\n reg=LocateRegistry.createRegistry(1099);\n } catch( Throwable t ) {\n log(\"Can't start registry - it may be already started: \" + t);\n }\n \n try {\n mBeanServer = null;\n if (MBeanServerFactory.findMBeanServer(null).size() > 0) {\n mBeanServer =\n (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);\n } else {\n mBeanServer = MBeanServerFactory.createMBeanServer();\n }\n } catch( Throwable t ) {\n log(\"Can't get the mbean server \" + t);\n return;\n }\n \n try {\n JMXServiceURL address = new JMXServiceURL(\"service:jmx:rmi://rmiHost/jndi/rmi://localhost:1099/jndiPath\");\n cntorServer = \n JMXConnectorServerFactory.newJMXConnectorServer(address, null, mBeanServer);\n cntorServer.start();\n } catch (Throwable e) {\n log(\"Can't register jmx connector \", e);\n }\n }", "@Override\n public void create() {\n setScreen(new ServerScreen(\n new RemoteGame(),\n new SocketIoGameServer(HOST, PORT)\n ));\n }", "public MyModel() {\n mazeGeneratingServer = new Server(5400, 1000, new ServerStrategyGenerateMaze());\n solveSearchProblemServer = new Server(5401, 1000, new ServerStrategySolveSearchProblem());\n //Raise the servers\n }", "public Server() throws IOException{\n\t\tsuper();\n\t\tthis.serversocket = new java.net.ServerSocket(DEFAULTPORT);\n\t\tif (DEBUG){\n\t\t\tSystem.out.println(\"Server socket created:\" + this.serversocket.getLocalPort());\n\t\t\tclient_list.add(String.valueOf(this.serversocket.getLocalPort()));\n\t\t}\n\t}", "private static void spawnInstance(){\n\t\tString instanceType = null;\n\t\tString imageId = null; \n\t\tint numInstances = 0;\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Name of key to use?\");\n\t\tkeyname = in.next();\n\t\t\n\t\tSystem.out.println(\"Instance type? (use d for default: t2.micro)\");\n\t\tinstanceType = in.next();\n\t\t\n\t\tif(instanceType.equals(\"d\")){\n\t\t\tinstanceType = INSTANCE_TYPE;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Image id? (use d for default: ami-b5a7ea85, Amazon Linux AMI)\");\n\t\timageId = in.next();\n\t\t\n\t\tif(imageId.equals(\"d\")){\n\t\t\timageId = IMAGE_ID; \n\t\t}\n\t\t\n\t\tSystem.out.println(\"Number of instances?\");\n\t\tnumInstances = in.nextInt();\n\n\t\tin.close();\n\t\n\t\tRunInstancesRequest req = new RunInstancesRequest();\n\t\t\n\t String group = GROUP;\n\t \n\t req.withImageId(imageId)\n\t .withInstanceType(instanceType)\n\t .withMinCount(numInstances)\n\t .withMaxCount(numInstances)\n\t .withKeyName(keyname)\n\t .withSecurityGroups(group);\n\t \n\t RunInstancesResult reqRes = ec2.runInstances(req);\n\t Reservation res = reqRes.getReservation();\n\t System.out.println(\"Reservation number is \" + res.getReservationId());\n\t try {\n \t\tSystem.out.println(\"Just a moment while the instance is spun up...\");\n\t\t\tTimeUnit.SECONDS.sleep(10);\n\t\t} catch (InterruptedException e) {\n\t\t\tSystem.out.println(\"Instantiation failed!\");\n\t\t}\n \t\tString ip = listLiveInstances();\n \t\tSystem.out.println(\"\");\n \t\tSystem.out.println(\"Connect with 'ssh -i \" + keyname + \".pem ec2-user@\" + ip +\"'\");\n \t\tSystem.out.println(\"If connection fails, run with -l option and check status.\");\n \t\tSystem.exit(0);\n\t}", "private void init() {\n System.out.println(\"Binding to RMIRegistry...\");\n String theName = getConfigManager().getString(\"REMOTE_NAME\");\n if (null != theName) {\n bind(theName, this);\n } else {\n LoggingServices.getCurrent().logMsg(getClass().getName(), \"init()\"\n , \"Could not find name to bind to in registry.\"\n , \"Make sure loyalty.cfg contains a RMIREGISTRY entry.\", LoggingServices.MAJOR);\n }\n }", "public void start() throws RemoteException, AlreadyBoundException\n {\n start(DEFAULT_PORT);\n }", "public void registerWithServer();", "public ServerRetriever() throws IOException {\n\t\t//Try to get the registry\n\t\ttry {\n\t\t\tthis.registry = LocateRegistry.getRegistry(IP, PORT);\n\t\t\tSystem.out.println(\"Registry lookup succesfull\");\n\t\t} catch (RemoteException re) {\n\t\t\tSystem.out.println(\"GameServer: RemoteException: \" + re.getMessage());\n\t\t\tthis.registry = null;\n\t\t}\n\n\t\tif (this.registry != null) {\n\t\t\ttry {\n\t\t\t\tthis.serverList = (IServerList) this.registry.lookup(BINDINGNAME);\n\t\t\t} catch (RemoteException re) {\n\t\t\t\tSystem.out.println(\"GameServer: RemoteException: \" + re.getMessage());\n\t\t\t\tthis.serverList = null;\n\t\t\t} catch (NotBoundException nbe) {\n\t\t\t\tSystem.out.println(\"GameServer: NotBoundException: \" + nbe.getMessage());\n\t\t\t\tthis.serverList = null;\n\t\t\t}\n\t\t}\n\t}", "public static KitchenServer getInstance() {\r\n if (instance == null) {\r\n instance = new KitchenServer();\r\n }\r\n return instance;\r\n }", "public Server() throws IOException {\n System.out.println(\"\\t Server Started \\n\");\n }", "public static MCP tryCreateAndStartMCPWithPort(int portNumber)\n\t{\n\t\t\n\t\tSystem.out.println(\"Trying to create server using port \" + portNumber);\n\t\tMCP mcp = new MCP(portNumber);\n\t\t\n\t\ttry {\n\t\t\tif(SHOW_DEBUG_LOGGING)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Trying to start server\");\n\t\t\t}\n\t\t\tmcp.start();\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\t\n\t\t\tSystem.out.println(\"Caught Exception\");\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tif(mcp.getListeningPort() <= 0)\n\t\t{\t\n\t\t\t//port was in use, using a random one\n\t\t\tif(SHOW_DEBUG_LOGGING)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Port must have been unavailable \");\n\t\t\t\tSystem.out.println(\"Trying to create server random port \");\n\t\t\t}\n\t\t\tmcp = new MCP(0);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif(SHOW_DEBUG_LOGGING)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Trying to start server\");\n\t\t\t\t}\n\t\t\t\tmcp.start();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn mcp;\n\t\t\n\t}" ]
[ "0.65004975", "0.6407508", "0.6385838", "0.6369732", "0.63107175", "0.62806416", "0.61307555", "0.61226726", "0.6101669", "0.60929555", "0.6080608", "0.60273445", "0.60227644", "0.60214835", "0.6019157", "0.5930346", "0.5863026", "0.5852159", "0.5825059", "0.5791614", "0.578339", "0.5780959", "0.57800364", "0.5775655", "0.57634157", "0.5754317", "0.575037", "0.5740619", "0.57321244", "0.5711724", "0.57071173", "0.570264", "0.56996083", "0.5694348", "0.5693732", "0.5687311", "0.5671335", "0.56684256", "0.5665585", "0.5655087", "0.56477267", "0.5641582", "0.56415313", "0.5638665", "0.5627411", "0.5627411", "0.56078786", "0.55950564", "0.5593895", "0.5582256", "0.5576743", "0.55698514", "0.55567926", "0.55451405", "0.55413216", "0.5528568", "0.5523175", "0.54898775", "0.54896444", "0.54872614", "0.5484142", "0.5467181", "0.54670125", "0.54558474", "0.54322094", "0.5428298", "0.5422312", "0.5416353", "0.54070425", "0.54002166", "0.53992087", "0.5390669", "0.53895473", "0.5389531", "0.5383963", "0.5376984", "0.536894", "0.5364573", "0.5359037", "0.53584677", "0.5348846", "0.5346326", "0.53426605", "0.5339446", "0.5336605", "0.53332067", "0.53256905", "0.53179175", "0.5316406", "0.5313992", "0.530754", "0.5303067", "0.5297656", "0.5285075", "0.52788734", "0.52775204", "0.5266335", "0.52646685", "0.52583814", "0.525337" ]
0.67706656
0
declara el contenido de la clase principal
public static void main(String[] args) { //declara una variable (valor) de tipo int int i; //introduce estructura interativa o repetitiva (for), a la variable i le da un valor de 10, la condicion es que el valor de la variable i tiene que ser mayor que 0, cada vez que se ejecute la instruccion for al valor de la variable i se le resta un uno for(i=10; i>0;i--) //muestra en pantalla la frase y el valor de la variable i System.out.println(i + " "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void consulterClassement() {\n\t\t\n\t}", "public contrustor(){\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private TMCourse() {\n\t}", "public ControladorCoche() {\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "private ControleurAcceuil(){ }", "private UsineJoueur() {}", "Petunia() {\r\n\t\t}", "public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }", "public CianetoClass() {\r\n this.cianetoMethods = new Hashtable<String, Object>();\r\n this.cianetoAttributes = new Hashtable<String, Object>();\r\n }", "public Clade() {}", "public OOP_207(){\n\n }", "public Alojamiento() {\r\n\t}", "public Propiedad(){\n\t}", "public Sistema(){\r\n\t\t\r\n\t}", "public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public Carrinho() {\n\t\tsuper();\n\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "private stendhal() {\n\t}", "protected Asignatura()\r\n\t{}", "ConjuntoTDA claves();", "public void inizializza() {\n\n /* invoca il metodo sovrascritto della superclasse */\n super.inizializza();\n\n }", "public Caso_de_uso () {\n }", "protected FanisamBato(){\n\t}", "public Final_parametre() {\r\n\t}", "public Addwritingcenter() {\n\t\n}", "private DittaAutonoleggio(){\n \n }", "public Exercicio(){\n \n }", "public Curso() {\r\n }", "public ControladorPrueba() {\r\n }", "public prueba()\r\n {\r\n }", "public AntrianPasien() {\r\n\r\n }", "public ControllerProtagonista() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "public Prestamo() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public SlanjePoruke() {\n }", "public Salle() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public DarAyudaAcceso() {\r\n }", "public Empfänger() {\t\t\t\t\t// std. Konstruktor\r\n\t\t}", "public Carrera(){\n }", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public CTematicaBienestar() {\r\n\t}", "@Override\n public void memoria() {\n \n }", "private NfkjBasic()\n\t\t{\n\t\t\t\n\t\t}", "public Livro() {\n\n\t}", "public EnsembleLettre() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void inicializar();", "public Odontologo() {\n }", "public PSRelation()\n {\n }", "public Unidadmedida() {\r\n\t}", "@Override\n\tpublic void iniciar() {\n\t\t\n\t}", "public ObjectClassDefinitionImpl() {\n\t\t// empty\n\t}", "public FiltroRaEncerramentoComando() {\r\n }", "public Pengenalan(){ //Constructor (Nama harus sama dengan Class)\n System.out.println(\"\\nConstructor : \");\n System.out.println(\"Dibutuhkan untuk pemanggilan saat diimport oleh Class lain atau Class sendiri\");\n methode();\n int men = menthos();\n System.out.println(\"Nilai yang didapat dari method menthos : \"+men);\n }", "public Methods() { // ini adalah sebuah construktor kosong tidak ada parameternya\n System.out.println(\"Ini adalah Sebuah construktor \");\n }", "public Doc_estado() {\n }", "private MakeACaptain() {\n }", "public void crearClase() {\r\n\t\tsetClase(3);\r\n\t\tsetTipoAtaque(3);\r\n\t\tsetArmadura(15);\r\n\t\tsetModopelea(0);\r\n\t}", "public Oveja() {\r\n this.nombreOveja = \"Oveja\";\r\n }", "public SgaexpedbultoImpl()\n {\n }", "public StudentChoresAMImpl() {\n }", "public CrearQuedadaVista() {\n }", "public EntradaClase(String n, Token t) {\r\n\t\tnombre= n;\r\n\t\therencia=null;\r\n\t\ttoken=t;\r\n\t\tconsolidado= hayCtor= false;\r\n\t\tentradaVar= new HashMap<String,EntradaVarInst>();\r\n\t\tentradaMetodo= new HashMap<String,EntradaMetodo>();\r\n\t\tentradaCtor= new HashMap<String, EntradaCtor>();\r\n\t\tmetodosDyn= new ArrayList<EntradaMetodo>();\r\n\t\tmaximoOffsetMetodo= 0;\r\n\t\tmaximoOffsetVarInst= 1; \t\t\t\t//la 0 es para la VT\r\n\t\t\r\n\t\t//listaAsigInline= new ArrayList<NodoAsignacion>();\r\n\t}", "public MPaciente() {\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public Cgg_jur_anticipo(){}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public HolaMundo() {\n \n System.out.println( \"Hola mundo\" );\n }", "public Propuestas() {}", "public Supercar() {\r\n\t\t\r\n\t}", "public void Ordenamiento() {\n\n\t}", "public PantallaPrincipal() {\n gestor= new Gestor();\n initComponents();\n inicializarTablaCarreras();\n inicializarTablaCorredorTotales();\n inicializarTablaCorredor();\n mostrarCarreras();\n mostrarCorredoresTotales();\n \n \n }", "public void init(){\n \n }", "private RepositorioOrdemServicoHBM() {\n\n\t}", "@Override\r\n\tpublic void makerear() {\n\t\t\r\n\t}", "private ObiWanKenobi(){\n }", "public MendInformation() {\r\n \tinitComponents();\r\n }", "public TebakNusantara()\n {\n }", "public Coche() {\n super();\n }", "private Parser() {\n objetos = new ListaEnlazada();\n }", "public mainData() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public envio() {\r\n }", "public VotacaoSegundoDia() {\n\n\t}", "public Inicio()\n { \n super(600, 400, 1);\n prepararInicio();\n\n }", "public Tmio1Sitio() {\r\n\t}", "public Pasien() {\r\n }", "private MApi() {}", "public JanelaPrincipal() {\n initComponents();\n }", "public Composante() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public TelaPrincipal() {\n initComponents();\n Consultorio.Instance().efetuaBalanco(false);\n setSize(1029,764);\n }", "public Classe() {\r\n }", "private QuadradoPerfeito() {\n }", "public void limpiarCampos() {\n\t\ttema = new Tema();\n\t\ttemaSeleccionado = new Tema();\n\t\tmultimedia = new Multimedia();\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void init() {\n \n }", "public Funcionario() {\r\n\t\t\r\n\t}", "public JanelaPrincipal() {\r\n\t\tsuper(\"Musical Memory\");\r\n\r\n\t\tinitialize();\r\n\t\t//this.setLocationByPlatform(true);\r\n\t\tthis.setVisible(true);\r\n\t\tthis.addKeyListener(this);\r\n\r\n\t}" ]
[ "0.71807617", "0.6717578", "0.6640542", "0.6608316", "0.651851", "0.64730555", "0.64608455", "0.6443035", "0.6434242", "0.64315134", "0.6404936", "0.6393193", "0.63649803", "0.6350816", "0.63411295", "0.63389057", "0.6322169", "0.6318453", "0.6308367", "0.6259219", "0.62543607", "0.62368387", "0.62356174", "0.62292844", "0.6215618", "0.6210665", "0.6201114", "0.6197704", "0.61971146", "0.61962354", "0.6179393", "0.6162366", "0.61600924", "0.61550176", "0.61514604", "0.6147047", "0.61358535", "0.6114496", "0.6110799", "0.61030436", "0.6078465", "0.6075392", "0.6068236", "0.60665894", "0.6059965", "0.60564834", "0.6056338", "0.6056067", "0.60543185", "0.6044137", "0.60441184", "0.6023921", "0.60228306", "0.60191953", "0.6015733", "0.6014203", "0.6012907", "0.600915", "0.60088676", "0.6005201", "0.6003598", "0.6003367", "0.59996045", "0.59967285", "0.5996441", "0.59908986", "0.59890306", "0.5978342", "0.59739673", "0.5972997", "0.5971955", "0.59705275", "0.5964851", "0.5959251", "0.59573334", "0.59544194", "0.5949352", "0.59479254", "0.5941848", "0.59409285", "0.5939863", "0.5939349", "0.59357536", "0.59354484", "0.5933964", "0.59329844", "0.5929159", "0.592616", "0.5926153", "0.59260774", "0.5919037", "0.5918024", "0.591732", "0.591579", "0.59130484", "0.59110713", "0.5909884", "0.59084785", "0.5907995", "0.5906707", "0.590566" ]
0.0
-1
Initialize the Vuforia localization engine.
void initVuforia() { //Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine. VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(); parameters.vuforiaLicenseKey = VUFORIA_KEY; parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK; // Instantiate the Vuforia engine vuforia = ClassFactory.getInstance().createVuforia(parameters); // Loading trackables is not necessary for the Tensor Flow Object Detection engine. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initVuforia() {\n\t\t/*\n\t\t * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n\t\t */\n\t\tVuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n\t\tparameters.vuforiaLicenseKey = VUFORIA_KEY;\n\t\tparameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n\n\t\t// Instantiate the Vuforia engine\n\t\tvuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n\t\t// Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n\t}", "private void initVuforia() {\n /*\n * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n */\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n }", "public void initVuforia() {\n /*\n * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n */\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the TensorFlow Object Detection engine.\n }", "public void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = CameraDirection.FRONT;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n }", "private void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraName = hardwareMap.get(WebcamName.class, \"Webcam\");\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n }", "private void initVuforia() {\n\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = CameraDirection.BACK;\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n }", "private void initVuforia() {\n /*\n * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n */\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraName = hardwareMap.get(WebcamName.class, \"Webcam 1\");\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the TensorFlow Object Detection engine.\n }", "void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.FRONT;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n\n if (ClassFactory.getInstance().canCreateTFObjectDetector()) {\n initTfod();\n tensorFlowSafetyNotInitialized = false;\n } else {\n tensorFlowSafetyNotInitialized = true;\n }\n }", "private void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n //initialize either phone or webcam depending on field set during object initialization\n if(device == Device.Phone){\n parameters.cameraDirection = CameraDirection.BACK;\n }else{\n parameters.cameraName = hwMap.get(WebcamName.class, \"Webcam\");\n\n }\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n }", "public void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = CAMERA_CHOICE;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n\n if (ClassFactory.getInstance().canCreateTFObjectDetector()) {\n initTfod();\n } else {\n telemetry.addData(\"Sorry!\", \"This device is not compatible with TFOD\");\n }\n }", "public void initVuforia(HardwareMap ahwMap) {\n\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.FRONT;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n vuforiaLoaded = true;\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n }", "public void initialize()\n {\n Locale locale = Locale.getDefault();\n var rb = ResourceBundle.getBundle(\"translation\",locale);\n\n customerPerCountryLabel.setText(rb.getString(\"CustomersPerCountry\"));\n backButton.setText(rb.getString(\"Back\"));\n\n\n }", "private void initVuforia(int cameraMonitorViewId) {\n VuforiaLocalizer.Parameters parameters1 = new VuforiaLocalizer.Parameters(cameraMonitorViewId);\n // VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n parameters1.vuforiaLicenseKey = VUFORIA_KEY;\n parameters1.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n // Instantiate the Vuforia engine 1\n vuforia = ClassFactory.getInstance().createVuforia(parameters1);\n }", "public Localizer() {\n processor = new ComponentProcessor();\n }", "private void init() {\n\t\t\n\t\tPropertiesManager propertiesManager = PropertiesManager.getInstance();\n\t\tFile localeDirectory = new File(propertiesManager.getProperty(\"locale.directory\", LOCALE_DIRECTORY));\n\n\t\tlocales = new ArrayList<Locale>();\n\n\t\ttry {\n\t\t\t\n\t\t\tClassUtils.addClassPathFile(localeDirectory);\n\t\t\t\n\t\t\t// Находим все доступные локали\n\t\t\tlocales = findAvailableLocales(localeDirectory);\n\n\t\t} catch(Exception ignore) {}\n\n\t\tfallbackLocale = Locale.ENGLISH;\n\t\tcontrol = new Control();\n\n\t\tif(!locales.contains(Locale.ENGLISH)) {\n\t\t\tlocales.add(0, fallbackLocale);\n\t\t}\n\n\t\tdefaultLocale = locales.get(locales.indexOf(Locale.ENGLISH));\n\t\t\n\t\tString language = propertiesManager.getProperty(\"locale.language\", \"\");\n\t\tString country = propertiesManager.getProperty(\"locale.country\", \"\");\n\t\tString variant = propertiesManager.getProperty(\"locale.variant\", \"\");\n\t\t\n\t\tLocale locale = new Locale(language, country, variant);\n\t\t\n\t\tif(locales.contains(locale)) {\n\t\t\tlocale = locales.get(locales.indexOf(locale));\n\t\t} else {\n\t\t\tlocale = defaultLocale;\n\t\t}\n\n\t\tsetLocale(locale);\n\t\t\n\t\tif(FontEditor.DEBUG) {\n\t\t\t\n\t\t\tfor(Locale l : locales) {\n\t\t\t\tSystem.out.println(\"locale found -> \" + l.getDisplayLanguage(Locale.ENGLISH));\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Total locale(s) found: \" + locales.size());\n\t\t\tSystem.out.println();\n\t\t}\n//System.out.println(\">>> \" + getValue(\"shitd\"));\n\t}", "private void initialize() {\n \t\tfor (Module module : UserType.getCurrentUserType().getModules()) {\n \t\t\tif (module.getModuleClass() != null) {\n \t\t\t\tregisterModule(module);\n \t\t\t}\n \t\t}\n \t\tif (GeneralPreferences.getLanguage() != null && GeneralPreferences.getLanguage().equals(Language.FRENCH)) {\n \t\t\tLocale.setDefault(Locale.FRANCE);\n \t\t} else {\n \t\t\tLocale.setDefault(Locale.US);\n \t\t}\n \t\tFlexoHelp.configure(GeneralPreferences.getLanguage() != null ? GeneralPreferences.getLanguage().getIdentifier() : \"ENGLISH\",\n \t\t\t\tUserType.getCurrentUserType().getIdentifier());\n \t}", "private void initVuforia(CameraController controller) {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n\n if(controller == CameraController.WEBCAM)\n parameters.cameraName = hardwareMap.get(WebcamName.class, \"WebcamFront\");\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n Vuforia.setFrameFormat(PIXEL_FORMAT.RGB565, true); //enables RGB565 format for the image\n vuforia.setFrameQueueCapacity(1); //tells VuforiaLocalizer to only store one frame at a time\n\n VuforiaLocalizer.CloseableFrame frame = null;\n\n try {\n frame = vuforia.getFrameQueue().take(); //takes the frame at the head of the queue\n imgWidth = frame.getImage(0).getWidth();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n // Loading trackables is not necessary for the TensorFlow Object Detection engine.\n }", "public void initVuforiaNavigation() {\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(cameraMonitorViewId);\n\n // VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = CAMERA_CHOICE;\n\n // Make sure extended tracking is disabled for this example.\n parameters.useExtendedTracking = false;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Load the data sets for the trackable objects. These particular data\n // sets are stored in the 'assets' part of our application.\n targetsUltimateGoal = this.vuforia.loadTrackablesFromAsset(\"UltimateGoal\");\n VuforiaTrackable blueTowerGoalTarget = targetsUltimateGoal.get(0);\n blueTowerGoalTarget.setName(\"Blue Tower Goal Target\");\n VuforiaTrackable redTowerGoalTarget = targetsUltimateGoal.get(1);\n redTowerGoalTarget.setName(\"Red Tower Goal Target\");\n VuforiaTrackable redAllianceTarget = targetsUltimateGoal.get(2);\n redAllianceTarget.setName(\"Red Alliance Target\");\n VuforiaTrackable blueAllianceTarget = targetsUltimateGoal.get(3);\n blueAllianceTarget.setName(\"Blue Alliance Target\");\n VuforiaTrackable frontWallTarget = targetsUltimateGoal.get(4);\n frontWallTarget.setName(\"Front Wall Target\");\n\n // For convenience, gather together all the trackable objects in one easily-iterable collection */\n allTrackables = new ArrayList<VuforiaTrackable>();\n allTrackables.addAll(targetsUltimateGoal);\n\n /**\n * In order for localization to work, we need to tell the system where each target is on the field, and\n * where the phone resides on the robot. These specifications are in the form of <em>transformation matrices.</em>\n * Transformation matrices are a central, important concept in the math here involved in localization.\n * See <a href=\"https://en.wikipedia.org/wiki/Transformation_matrix\">Transformation Matrix</a>\n * for detailed information. Commonly, you'll encounter transformation matrices as instances\n * of the {@link OpenGLMatrix} class.\n *\n * If you are standing in the Red Alliance Station looking towards the center of the field,\n * - The X axis runs from your left to the right. (positive from the center to the right)\n * - The Y axis runs from the Red Alliance Station towards the other side of the field\n * where the Blue Alliance Station is. (Positive is from the center, towards the BlueAlliance station)\n * - The Z axis runs from the floor, upwards towards the ceiling. (Positive is above the floor)\n *\n * Before being transformed, each target image is conceptually located at the origin of the field's\n * coordinate system (the center of the field), facing up.\n */\n\n //Set the position of the perimeter targets with relation to origin (center of field)\n redAllianceTarget.setLocation(OpenGLMatrix\n .translation(0, -halfField, mmTargetHeight)\n .multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0, 180)));\n\n blueAllianceTarget.setLocation(OpenGLMatrix\n .translation(0, halfField, mmTargetHeight)\n .multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0, 0)));\n frontWallTarget.setLocation(OpenGLMatrix\n .translation(-halfField, 0, mmTargetHeight)\n .multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0 , 90)));\n\n // The tower goal targets are located a quarter field length from the ends of the back perimeter wall.\n blueTowerGoalTarget.setLocation(OpenGLMatrix\n .translation(halfField, quadField, mmTargetHeight)\n .multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0 , -90)));\n redTowerGoalTarget.setLocation(OpenGLMatrix\n .translation(halfField, -quadField, mmTargetHeight)\n .multiplied(Orientation.getRotationMatrix(EXTRINSIC, XYZ, DEGREES, 90, 0, -90)));\n\n //\n // Create a transformation matrix describing where the phone is on the robot.\n //\n // NOTE !!!! It's very important that you turn OFF your phone's Auto-Screen-Rotation option.\n // Lock it into Portrait for these numbers to work.\n //\n // Info: The coordinate frame for the robot looks the same as the field.\n // The robot's \"forward\" direction is facing out along X axis, with the LEFT side facing out along the Y axis.\n // Z is UP on the robot. This equates to a bearing angle of Zero degrees.\n //\n // The phone starts out lying flat, with the screen facing Up and with the physical top of the phone\n // pointing to the LEFT side of the Robot.\n // The two examples below assume that the camera is facing forward out the front of the robot.\n\n // We need to rotate the camera around it's long axis to bring the correct camera forward.\n if (CAMERA_CHOICE == BACK) {\n phoneYRotate = -90;\n } else {\n phoneYRotate = 90;\n }\n\n // Rotate the phone vertical about the X axis if it's in portrait mode\n if (PHONE_IS_PORTRAIT) {\n phoneXRotate = 90 ;\n }\n\n // Next, translate the camera lens to where it is on the robot.\n // In this example, it is centered (left to right), but forward of the middle of the robot, and above ground level.\n final float CAMERA_FORWARD_DISPLACEMENT = 7.0f * mmPerInch; // eg: Camera is 7 Inches in front of robot center\n final float CAMERA_VERTICAL_DISPLACEMENT = 6.0f * mmPerInch; // eg: Camera is 6 Inches above ground\n final float CAMERA_LEFT_DISPLACEMENT = -4.0f * mmPerInch; // eg: Camera is 4 inches to the RIGHT the robot's center line\n\n OpenGLMatrix robotFromCamera = OpenGLMatrix\n .translation(CAMERA_FORWARD_DISPLACEMENT, CAMERA_LEFT_DISPLACEMENT, CAMERA_VERTICAL_DISPLACEMENT)\n .multiplied(Orientation.getRotationMatrix(EXTRINSIC, YZX, DEGREES, phoneYRotate, phoneZRotate, phoneXRotate));\n\n /** Let all the trackable listeners know where the phone is. */\n for (VuforiaTrackable trackable : allTrackables) {\n ((VuforiaTrackableDefaultListener) trackable.getListener()).setPhoneInformation(robotFromCamera, parameters.cameraDirection);\n }\n targetsUltimateGoal.activate();\n }", "public void setupVuforia() {\n parameters = new VuforiaLocalizer.Parameters(); // To remove the camera view from the screen, remove the R.id.cameraMonitorViewId\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.FRONT;\n parameters.useExtendedTracking = false;\n vuforiaLocalizer = ClassFactory.createVuforiaLocalizer(parameters);\n\n // These are the vision targets that we want to use\n // The string needs to be the name of the appropriate .xml file in the assets folder\n visionTargets = vuforiaLocalizer.loadTrackablesFromAsset(\"FTC_2016-17\");\n Vuforia.setHint(HINT.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 4);\n\n // Setup the target to be tracked\n\n vuforiaWheels = visionTargets.get(0);\n vuforiaWheels.setName(\"wheels\"); // wheels - blue 1\n\n vuforiaTools = visionTargets.get(1);\n vuforiaTools.setName(\"tools\"); // Tools = red 2\n\n vuforiaLegos = visionTargets.get(2);\n vuforiaLegos.setName(\"legos\"); // legos - blue 2\n\n vuforiaGears = visionTargets.get(3);\n vuforiaGears.setName(\"gears\"); // Gears - red 1\n\n if (teamColor == \"blue\") {\n target = vuforiaWheels;\n } else {\n target = vuforiaGears;\n }\n\n target.setLocation(createMatrix(0, 500, 0, 90, 0, 90));\n\n // Set phone location on robot - not set\n phoneLocation = createMatrix(0, 225, 0, 90, 0, 0);\n\n // Setup listener and inform it of phone information\n listener = (VuforiaTrackableDefaultListener) target.getListener();\n listener.setPhoneInformation(phoneLocation, parameters.cameraDirection);\n }", "public static void init(){\n velocityEngine = new VelocityEngine();\n Properties velocityProperties = new Properties();\n velocityProperties.put(\"resource.loader\", \"class\");\n velocityProperties.put(\"class.resource.loader.class\",\n \"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader\");\n velocityProperties.put(\"class.resource.loader\", \"/WEB-INF/classes/\");\n velocityEngine.init(velocityProperties);\n }", "private void init() {\n if (!isInitiated) {\n //Voices use by freeTTS, we define where they are, currently in the java en_us.jar\n //add the package\n addToSystemesPropetites(this.configurator.getLocation());\n\n // The VoiceManager manages all the voices for FreeTTS.\n voiceManager = VoiceManager.getInstance();\n\n this.defaultVoice = voiceManager.getVoice(this.configurator.getName());\n\n configureVoice(this.defaultVoice);\n\n // Allocates the resources for the voice.\n this.defaultVoice.allocate();\n isInitiated = true;\n }\n }", "private void initVariables() {\n ivBack.setVisibility(View.VISIBLE);\n tvTitle.setVisibility(View.VISIBLE);\n tvTitle.setText(getString(R.string.change_language));\n\n gifProgress.setImageResource(R.drawable.shopholic_loader);\n progressBar.setVisibility(View.GONE);\n String currentLang = AppSharedPreference.getInstance().getString(this, AppSharedPreference.PREF_KEY.CURRENT_LANGUAGE);\n setLanguage(currentLang);\n }", "@PostConstruct\n public void init()\n throws RedbackServiceException\n {\n getI18nProperties( \"en\" );\n getI18nProperties( \"fr\" );\n }", "protected void initialize()\n {\n uiFactory.configureUIComponent(this, UI_PREFIX);\n\n initializeFields();\n initializeLabels();\n initLayout();\n }", "@Override\n public void initialize(UimaContext context) throws ResourceInitializationException {\n super.initialize(context);\n // call init method to perform check of UIMA parameters and general init of other parameters\n this.init(this.newsQueries, this.wikiQueries, this.numOfQueries, this.queryLanguages);\n\n try {\n this.generateQueries();\n } catch (UIMAException | IOException e) {\n e.printStackTrace();\n }\n\n this.isInitializedForUima = true;\n }", "public LocalizationFragment() {\n }", "private void initialize() {\n\t\tdisenioVentana();\n\n\t\tdisenioMenu();\n\n\t\tdisenio_Cuerpo();\n\n\t}", "private void initLanguage() {\n try {\n Resources resources = getApplicationContext().getResources();\n DisplayMetrics displayMetrics = resources.getDisplayMetrics();\n Configuration configuration = resources.getConfiguration();\n Locale locale = new Locale(\"es\", \"ES\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\n configuration.setLocale(locale);\n } else {\n //noinspection deprecation\n configuration.locale = locale;\n }\n resources.updateConfiguration(configuration, displayMetrics);\n } catch (Throwable throwable) {\n Log.d(TAG, \"Couldn't apply ES language.\", throwable);\n }\n }", "public void initialize()\n {\n \t// Luodaan manager-luokat\n EffectManager.getInstance();\n MessageManager.getInstance();\n CameraManager.getInstance();\n\n // Luodaan pelitilan eri osat\n backgroundManager = new BackgroundManager(wrapper);\n \tweaponManager = new WeaponManager();\n hud = new Hud(context, weaponManager);\n touchManager = new TouchManager(dm, surfaceView, context, hud, weaponManager);\n gameMode = new GameMode(gameActivity, this, dm, context, hud, weaponManager);\n \n // Järjestellään Wrapperin listat uudelleen\n wrapper.sortDrawables();\n wrapper.generateAiGroups();\n \n // Merkitään kaikki ladatuiksi\n allLoaded = true;\n }", "@Override\n public void initEngine() {\n \n }", "@Override\n public void initEngine() {\n \n }", "@Override\n public void init() {\n telemetry.addData(\">\", \"Initializing...\");\n telemetry.update();\n\n // Sensors\n gyro = new Gyro(hardwareMap, \"gyro\");\n if (!gyro.isAvailable()) {\n telemetry.log().add(\"ERROR: Unable to initalize gyro\");\n }\n\n // Drive motors\n tank = new WheelMotorConfigs().init(hardwareMap, telemetry);\n tank.stop();\n\n // Vuforia\n vuforia = new VuforiaFTC(VuforiaConfigs.AssetName, VuforiaConfigs.TargetCount,\n VuforiaConfigs.Field(), VuforiaConfigs.Bot());\n vuforia.init();\n\n // Wait for the game to begin\n telemetry.addData(\">\", \"Ready for game start\");\n telemetry.update();\n }", "@Override\r\n\tprotected void initVentajas() {\n\r\n\t}", "public DefaultLocalesManager() {\r\n\t}", "@Override\n public void init(Properties properties) {\n super.init(properties);\n String categoriesFilePath = properties.getProperty(\"categoriesFilePath\", \"\");\n String gemetFilePath = properties.getProperty(\"gemetFilePath\", \"\");\n String lang = properties.getProperty(\"lang\", \"\");\n\n for (Locale l: Locale.getAvailableLocales()) {\n if (l.getLanguage().equalsIgnoreCase(lang)) {\n locale = l;\n break;\n }\n }\n\n ContextInitializer initializer = new ContextInitializer(ontCtx,\n categoriesFilePath, gemetFilePath);\n initializer.initialize();\n\n }", "private LocaleManager() {\n\t\t\n\t\tinit();\n\t}", "private void ini_Translations()\r\n\t{\r\n\t\tLogger.DEBUG(\"ini_Translations\");\r\n\t\tnew Translation(\"data\", FileType.Internal);\r\n\t\ttry\r\n\t\t{\r\n\t\t\tTranslation.LoadTranslation(\"data/lang/en-GB/strings.ini\");\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override public void initialize(URL url, ResourceBundle rb) {\n\n //Se instancian las utilerías que se van a ocupar\n animar = new Animaciones();\n alerta = new Alertas();\n //Se anima la ventana al inicializarse\n animar.animarDesvanecer(anchorPaneLogin, 1.5f);\n //Se instancia el DAO\n usDAO = new usuarioDAOImpl();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n universe = SpaceTrader.getInstance().getUniverse();\n player = SpaceTrader.getInstance().getPlayer();\n travelable = player.getTravelable(universe);\n solarSystemLocations = new HashMap<>();\n sunImages = new HashMap<>();\n \n for (SunType star : (ArrayList<SunType>) SunType.getList(SunType.class)) {\n if (star.usesImage()) {\n sunImages.put(star.getName(), new Image(star.getImage()));\n }\n }\n \n //adds listener for the zoom slider\n zoomSlider.valueProperty().addListener(new ChangeListener<Number>() {\n @Override\n public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {\n zoom = (float) zoomSlider.getValue();\n dragFinished = true;\n drawUniverse();\n }\n \n });\n \n// playerInfo.setText(player.getName()\n// + \"\\nPilot Skill: \" + player.getPilotSkill()\n// + \"\\nFighter Skill: \" + player.getFighterSkill()\n// + \"\\nTrader Skill: \" + player.getTraderSkill()\n// + \"\\nEngineer Skill: \" + player.getEngineerSkill()\n// + \"\\nInvestor Skill: \" + player.getInvestorSkill());\n \n playerInfo.setText(player.getName());\n playerInfo1.setText(\"Pilot: \" + player.getPilotSkill());\n playerInfo2.setText(\"Fighter: \" + player.getFighterSkill());\n playerInfo3.setText(\"Trader: \" + player.getTraderSkill());\n playerInfo4.setText(\"Engineer: \" + player.getEngineerSkill());\n playerInfo5.setText(\"Investor: \" + player.getInvestorSkill());\n // gets graphic object and draws universe to begin\n g = gameCanvas.getGraphicsContext2D();\n g.setFill(Color.WHITE);\n \n SaveGame.save(player.getName() + \".sav\", player, universe);\n \n drawUniverse();\n }", "public VPacientes() {\n initComponents();\n inicializar();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) { \n loadNouveaux();\n loadTerrains(); \n \n }", "public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n if (Usuario.getUsuarioActual() == null) {\n usuarioLabel.setText(\"Invitado\");\n iniciarCerrarSesion.setText(\"Iniciar sesión\");\n } else {\n usuarioLabel.setText(Usuario.getUsuarioActual().toString());\n iniciarCerrarSesion.setText(\"Cerrar sesión\");\n }\n agregarBotones();\n\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n //Carga Los componentes de la tapPersonal\r\n lanzaPersonal();\r\n }", "public void init() {\n try {\n java.net.URL codeBase = getCodeBase();\n codeBaseString = codeBase.toString();\n } catch (Exception e) {\n // probably running as an application, try the application\n // code base\n codeBaseString = \"file:./\";\n }\n\n if (colorMode == USE_COLOR) {\n objColor = red;\n } else {\n objColor = white;\n }\n\n Container contentPane = getContentPane();\n\n contentPane.setLayout(new BorderLayout());\n\n GraphicsConfiguration config = SimpleUniverse\n .getPreferredConfiguration();\n\n canvas = new Canvas3D(config);\n\n u = new SimpleUniverse(canvas);\n\n if (isApplication) {\n offScreenCanvas = new OffScreenCanvas3D(config, true);\n // set the size of the off-screen canvas based on a scale\n // of the on-screen size\n Screen3D sOn = canvas.getScreen3D();\n Screen3D sOff = offScreenCanvas.getScreen3D();\n Dimension dim = sOn.getSize();\n dim.width *= OFF_SCREEN_SCALE;\n dim.height *= OFF_SCREEN_SCALE;\n sOff.setSize(dim);\n sOff.setPhysicalScreenWidth(sOn.getPhysicalScreenWidth()\n * OFF_SCREEN_SCALE);\n sOff.setPhysicalScreenHeight(sOn.getPhysicalScreenHeight()\n * OFF_SCREEN_SCALE);\n\n // attach the offscreen canvas to the view\n u.getViewer().getView().addCanvas3D(offScreenCanvas);\n\n }\n contentPane.add(\"Center\", canvas);\n\n // setup the env nodes and their GUI elements\n setupLights();\n setupBackgrounds();\n setupFogs();\n setupSounds();\n\n // Create a simple scene and attach it to the virtual universe\n BranchGroup scene = createSceneGraph();\n\n // set up sound\n u.getViewer().createAudioDevice();\n\n // get the view\n view = u.getViewer().getView();\n\n // Get the viewing platform\n ViewingPlatform viewingPlatform = u.getViewingPlatform();\n\n // Move the viewing platform back to enclose the -4 -> 4 range\n double viewRadius = 4.0; // want to be able to see circle\n // of viewRadius size around origin\n // get the field of view\n double fov = u.getViewer().getView().getFieldOfView();\n\n // calc view distance to make circle view in fov\n float viewDistance = (float) (viewRadius / Math.tan(fov / 2.0));\n tmpVector.set(0.0f, 0.0f, viewDistance);// setup offset\n tmpTrans.set(tmpVector); // set trans to translate\n // move the view platform\n viewingPlatform.getViewPlatformTransform().setTransform(tmpTrans);\n\n // add an orbit behavior to move the viewing platform\n OrbitBehavior orbit = new OrbitBehavior(canvas, OrbitBehavior.STOP_ZOOM);\n orbit.setSchedulingBounds(infiniteBounds);\n viewingPlatform.setViewPlatformBehavior(orbit);\n\n u.addBranchGraph(scene);\n\n contentPane.add(\"East\", guiPanel());\n }", "private void initValets(){\n //valet in charge of getting movie database data\n mMovieValet = new MovieValet(this);\n //request favorite movie list from database\n mMovieValet.requestMovies(PosterHelper.NAME_ID_FAVORITE);\n\n //valet in charge of getting poster refresh database data\n mRefreshValet = new RefreshValet(this);\n }", "public void initialize(VideoUiView uiView) {\n this.uiView = uiView;\n mediaLoader = new MediaLoader(getContext());\n\n // Configure OpenGL.\n renderer = new Renderer(uiView, mediaLoader);\n setEGLContextClientVersion(2);\n setRenderer(renderer);\n setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);\n\n // Configure sensors and touch.\n sensorManager = (SensorManager) getContext().getSystemService(Context.SENSOR_SERVICE);\n // TYPE_GAME_ROTATION_VECTOR is the easiest sensor since it handles all the complex math for\n // fusion. It's used instead of TYPE_ROTATION_VECTOR since the latter uses the mangetometer on\n // devices. When used indoors, the magnetometer can take some time to settle depending on the\n // device and amount of metal in the environment.\n orientationSensor = sensorManager.getDefaultSensor(Sensor.TYPE_GAME_ROTATION_VECTOR);\n phoneOrientationListener = new PhoneOrientationListener();\n\n touchTracker = new TouchTracker(renderer);\n setOnTouchListener(touchTracker);\n }", "@Override\n public void initialize(URL location, ResourceBundle resources) {\n log.trace(LogMessages.MSG_CTRL_INITIALIZATION);\n this.languageBundle.setValue(resources);\n initPanes();\n initListeners();\n log.trace(LogMessages.MSG_CTRL_INITIALIZED);\n\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n iniciar();\n }", "public void initialize() {\n // TODO\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n sistema = new SistemaAleMC();\n }", "void initializeUIComponents(View v);", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n Label headerLabel = (Label) SessionProvider.getGlobalSessionsMap()\n .get(\"header_form_persiapan\");\n headerLabel.setText(\"FORM ATUR NOMOR & TANGGAL SURAT PEMINJAMAN\");\n headerLabel.setLayoutX(120);\n nomorBerkasService = ServiceFactory.getNomorBerkasService();\n addFromFXML();\n populateData();\n associateDataWithColumn();\n AturNomorTanggalSuratPeminjamanTable.setItems(dataCollection);\n }", "public void initialize(URL location, ResourceBundle resources) {\n\n }", "public static void init()\n\t{\n\t\t\n\t\tu.creerGalaxie(\"VoieLactee\", \"spirale\", 0);\n\t\tu.creerEtoile(\"Soleil\", 0, 'F', u.getGalaxie(\"VoieLactee\")); //1\n\t\tu.creerObjetFroid(\"Terre\", 150000 , 13000 , 365 , u.getObjet(1)); //2\n\n\t\tu.creerObjetFroid(\"Lune\", 200 , 5000 , 30 , u.getObjet(2)); //3\n\n\t\tu.creerObjetFroid(\"Mars\", 200000 , 11000 , 750 , u.getObjet(1)); //4\n\n\t\tu.creerObjetFroid(\"Phobos\", 150 , 500 , 40 , u.getObjet(4)); //5\n\n\t\tu.creerObjetFroid(\"Pluton\", 1200000 , 4000 , 900 , u.getObjet(1)); //6\n\n\t\tu.creerEtoile(\"Sirius\", 2, 'B', u.getGalaxie(\"VoieLactee\")); //7\n\n\t\tu.creerObjetFroid(\"BIG-1\", 1000 , 50000 , 333 , u.getObjet(7)); //8\n\n\t\tu.creerGalaxie(\"M31\", \"lenticulaire\", 900000);\n\t\tu.creerEtoile(\"XS67\", 8, 'F', u.getGalaxie(\"M31\")); //9\n\t\tu.creerObjetFroid(\"XP88\", 160000 , 40000 , 400 , u.getObjet(9)); //10\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n tampil();\n // TODO\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n System.out.println(\"Formulario inicializado\");\n armarListaCheck();\n armarGrupoEstado();\n cargarCmbColores();\n }", "public void GameInit() {\n ufot = new ArrayList();\n kuti = new Kuti();\n pelaaja = new Pelaaja();\n ufokuti = new UfoKuti();\n ufokuti.setVisible(false);\n kuti.setVisible(false);\n grafiikka = new Grafiikka(this);\n grafiikka.asetaKuvaRajahdykselle();\n grafiikka.asetaKuvaPelaajalle(grafiikka.pelaajaIcon(pelaaja), pelaaja);\n asetaUfotRiveihin();\n ufokutiInit();\n }", "public static void init() {\r\n load();\r\n registerEventListener();\r\n }", "public void init()\r\n\t{\r\n\t\tStaticAppletData.setCodeBase(getCodeBase().toString()); // set the code base\r\n\t\tStaticAppletData.setCodeBaseURL(getCodeBase()); // set the code base URL\r\n\t\t\r\n\t\tloadLoginUI(); // load the login UI first\r\n\t\t//loadRoomViewerUI();\r\n\t}", "public void initialize(URL location, ResourceBundle resources) {\t\n\t}", "private LocalizationProvider() {\r\n\t\tthis.language = DEFAULT_LANGUAGE;\r\n\t\tthis.bundle = ResourceBundle.getBundle(\"hr.fer.zemris.java.hw11.jnotepadapp.local.languages\",\r\n\t\t\t\tLocale.forLanguageTag(language));\r\n\t}", "@BeforeClass\n public static void initGlobal()\n {\n Locale.setDefault(Locale.ENGLISH);\n\n ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n validator = factory.getValidator();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n \tObservableList<String> mes = \n \t FXCollections.observableArrayList(\n \t \"1\", \"2\", \"3\", \"4\",\n \t \"5\", \"6\", \"7\", \"8\",\n \t \"9\", \"10\", \"11\", \"12\");\n \t\n \tList<String> list = new ArrayList<String>();\n \t\n \tfor(int i = 2000; i <= 2020; i++){\n \t\tlist.add(Integer.toString(i));\n \t}\n \t\n \tObservableList<String> ano = FXCollections.observableArrayList(list);\n \t\n \tmesInicial.setItems(mes);\n \t\n \tmesFinal.setItems(mes);\n \t\n \tanoInicial.setItems(ano);\n \t\n \tanoFinal.setItems(ano);\n \t\n \tlocacaoBusca.setItems(Locacao.getListaLocacao());\n \t\n \tfuncionarioBusca.setItems(Funcionario.getListaFuncionario());\n \t\n \testadoBusca.setItems(Funcionario.getListaEstado());\n \t\n \tcategoriaBusca.setItems(CategoriaFornecimento.getListaCategoria());\n \t\n myStage = Main.getMyStage();\n }", "public static void init() {\n\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n\r\n //Access statistics Service to retrive values\r\n accounts.setText(\"1352\");\r\n rentals.setText(\"645\");\r\n visits.setText(\"1045\");\r\n conversions.setText(\"79%\");\r\n billedDays.setText(\"2047\");\r\n monthIncome.setText(\"$60,548\");\r\n totalIncome.setText(\"$535,256\");\r\n\r\n createAreaChart();\r\n createPieChart();\r\n createTable();\r\n\r\n }", "public void setLang() {\n new LanguageManager() {\n @Override\n public void engLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_eng);\n mSaleTitle = getString(R.string.converter_sale_eng);\n mPurchaseTitle = getString(R.string.converter_purchase_eng);\n mCountTitle = getString(R.string.converter_count_of_currencies_eng);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_eng));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleEng());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_eng);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_eng);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_eng);\n mToastFailure = getString(R.string.converter_toast_failure_eng);\n mTitle = getResources().getString(R.string.drawer_item_converter_eng);\n mMessage = getString(R.string.dialog_template_text_eng);\n mTitleButtonOne = getString(R.string.dialog_template_edit_eng);\n mTitleButtonTwo = getString(R.string.dialog_template_create_eng);\n mToastEdited = getString(R.string.converter_toast_template_edit_eng);\n mToastCreated = getString(R.string.converter_toast_template_create_eng);\n mMessageFinal = getString(R.string.converter_final_dialog_text_eng);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_eng);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_eng);\n }\n\n @Override\n public void ukrLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_ukr);\n mSaleTitle = getString(R.string.converter_sale_ukr);\n mPurchaseTitle = getString(R.string.converter_purchase_ukr);\n mCountTitle = getString(R.string.converter_count_of_currencies_ukr);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_ukr));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleUkr());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_ukr);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_ukr);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_ukr);\n mToastFailure = getString(R.string.converter_toast_failure_ukr);\n mTitle = getResources().getString(R.string.drawer_item_converter_ukr);\n mMessage = getString(R.string.dialog_template_text_ukr);\n mTitleButtonOne = getString(R.string.dialog_template_edit_ukr);\n mTitleButtonTwo = getString(R.string.dialog_template_create_ukr);\n mToastEdited = getString(R.string.converter_toast_template_edit_ukr);\n mToastCreated = getString(R.string.converter_toast_template_create_ukr);\n mMessageFinal = getString(R.string.converter_final_dialog_text_ukr);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_ukr);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_ukr);\n }\n\n @Override\n public void rusLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_rus);\n mSaleTitle = getString(R.string.converter_sale_rus);\n mPurchaseTitle = getString(R.string.converter_purchase_rus);\n mCountTitle = getString(R.string.converter_count_of_currencies_rus);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_rus));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleRus());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_rus);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_rus);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_rus);\n mToastFailure = getString(R.string.converter_toast_failure_rus);\n mTitle = getResources().getString(R.string.drawer_item_converter_rus);\n mMessage = getString(R.string.dialog_template_text_rus);\n mTitleButtonOne = getString(R.string.dialog_template_edit_rus);\n mTitleButtonTwo = getString(R.string.dialog_template_create_rus);\n mToastEdited = getString(R.string.converter_toast_template_edit_rus);\n mToastCreated = getString(R.string.converter_toast_template_create_rus);\n mMessageFinal = getString(R.string.converter_final_dialog_text_rus);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_rus);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_rus);\n }\n };\n getDataForActionDialog();\n setData();\n }", "public static void init(UtilsUsingPlugin utilsUsingPlugin) {\n\t\tif(code == null) initCode();\n\t\t\n\t\t//notify if we have Unknown Version!\n\t\tif(code.getVersion() == MCVersion.unknown) {\n\t\t\tutilsUsingPlugin.log(\n\t\t\t\t\t\"Could not load Vollotile Code for: \" \n\t\t\t\t\t+ utilsUsingPlugin.getName()\n\t\t\t\t);\n\t\t}\n\t}", "public Ventana_Central() {\n initComponents();\n setup();\n }", "public static void initialize() {\n\n GUIResources.addResourcesFromClasspath();\n _initialize();\n\n }", "private void initData() {\n Resources resources = context.getResources();\n settingTitles = resources.getStringArray(R.array.setting_array);\n selectAccent = resources.getStringArray(R.array.accent_array);\n selectAccentDisplay = resources.getStringArray(R.array.accent_display_array);\n selectSpeaker = resources.getStringArray(R.array.speaker_array);\n selectSpeakerDisplay = resources.getStringArray(R.array.speaker_display_array);\n\n positive = resources.getString(R.string.positive);\n negative = resources.getString(R.string.negative);\n answerUnKnown = resources.getString(R.string.unknown);\n answerCalling = resources.getString(R.string.calling);\n answerOpen = resources.getString(R.string.opening);\n answerFound = resources.getString(R.string.founded);\n answerNotFound = resources.getString(R.string.not_found);\n\n String systemLanguage = Util.getSystemLanguage(context).toLowerCase();\n if (systemLanguage.equalsIgnoreCase(\"zh_cn\")) {\n isEnglishEnvironment = false;\n }\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n labelJugador.setText(\"Jugador: \" + PartidaController.nombreJugador);\n labelPuntos.setText(\"Puntos: \" + PartidaController.puntosJ);\n labelPuntosO.setText(\"Puntos Oponente: \" + PartidaController.puntosC);\n pilas.setText(\"Pilas robadas: \" + PartidaController.pilasRobadas);\n if(PartidaController.diferencia > 0){\n ganador.setText(\"Ganador: \" + PartidaController.nombreJugador);\n \n }\n else if (PartidaController.diferencia == 0){\n ganador.setText(\"Ganador: Es un empate !\");\n \n }\n else{\n ganador.setText(\"Ganador: CPU\" );\n }\n }", "public static void init() {\n }", "public static void init() {\n }", "public VueLieu() {\n initComponents();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n fillIVACb();\n addChangeListenerIvaCb();\n fillPaymentCb();\n fillClientsCbAndDispatcherCb();\n fillDriversCb();\n fillTravelTypeCb();\n fillTreasuryStateCb();\n setValidators();\n }", "public void init() {\n \n }", "void localizationChaneged();", "public static void init() {}", "protected void initialize () {\r\n if (initCommand!=null) matlabEng.engEvalString (id,initCommand);\r\n }", "@Override\n\tpublic void init() {\n\t\tif (myScreensContainer.getUserData() != null) {\n\t\t\tWebEngine webEngine = show_problem.getEngine();\n\t\t\twebEngine.load((String) myScreensContainer.getUserData());\n\t\t}\n\t}", "public void initializeMenuBarLocalization() {\n\t\tmenuSettings.setText(bundle.getString(\"mVSettings\"));\n\t\tmenuItemPreferences.setText(bundle.getString(\"mVPreferences\"));\n\t\tuserSettings.setText(bundle.getString(\"mVUsersettings\"));\n\t\tloginoption.setText(bundle.getString(\"mVLogin\"));\n\t\tmenuHelp.setText(bundle.getString(\"mVHelp\"));\n\t\tmenuItemAbout.setText(bundle.getString(\"mVAbout\"));\n\t\tmenuItemUserguide.setText(bundle.getString(\"mVUserguide\"));\n\t\tmenuLanguage.setText(bundle.getString(\"mVLanguage\"));\n\t}", "public void init() {\n log.info(\"initialization\");\n }", "@PostConstruct\n public void initialization() {\n init();\n //setQuestionEditMode(true); //need to initialize question fields\n //addCurrentQuestionsToView(); //initialize view of questions\n //setQuestionEditMode(false);\n }", "public void initialize() {\n // empty for now\n }", "public void initialize(URL location, ResourceBundle resources) {\r\n\r\n\t}", "@FXML\n private void initialize() {\n \tassert getMainMenu() != null : \"fx:id=\\\"mainMenu\\\" was not injected: check your FXML file 'RootLayout.fxml'.\";\n \tmessages = Messages.getMessages();\n \tMenu settingsMenu = new Menu(messages.getString(\"menu_settings\"));\n \tMenu menuLanguage = new Menu(messages.getString(\"menu_language\"));\n \t\n \tfinal ToggleGroup groupLanguage = new ToggleGroup();\n \tfinal Entry<String, Locale>[] languages = new Entry [] {\n \t\t\tnew SimpleEntry<String, Locale>(\"English\", Messages.enLocale),\n \t\t\tnew SimpleEntry<String, Locale>(\"Slovak\", Messages.skLocale)\n \t};\n \tfor (Entry<String, Locale> language : languages) {\n \t RadioMenuItem itemEffect = new RadioMenuItem(language.getKey());\n \t itemEffect.setSelected((language.getValue()).equals(messages.getLocale()));\n \t itemEffect.setOnAction(handleLanguage(language.getValue()));\n \t itemEffect.setToggleGroup(groupLanguage);\n \t menuLanguage.getItems().add(itemEffect);\n \t}\n \t\n \tsettingsMenu.getItems().add(menuLanguage);\n \tsettingsMenu.getItems().add(new SeparatorMenuItem());\n \t\n \tMenuItem aboutItem = new MenuItem(messages.getString(\"menu_about\"));\n \taboutItem.setOnAction(handleAbout());\n\n \tsettingsMenu.getItems().add(aboutItem);\n \tgetMainMenu().getMenus().add(settingsMenu);\n \n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n initViews();\r\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n LOGGER.info(\"initialize(URL url, ResourceBundle rb)\");\r\n try {\r\n // SaeDialog.showSuccess(\"Bienvenido, Vengador Mas Fuerte!!!\");\r\n initMenu(LoginController.getUsuario());\r\n } catch (Exception e) {\r\n SaeDialog.showException(e);\r\n }\r\n }", "public void startUp() {\n\t\t/* Language of App */\n\t\t\n\t\t/* Init Icons */\n\t\tPaintShop.initIcons(display);\n\t\t/* Init all components */\n\t\tinitComponents();\n\t\t\n\t\t\n\t}", "public AbstractLocalizationProvider() {\r\n\t\tsuper();\r\n\t\tthis.listeners = new ArrayList<>();\r\n\t}", "@Override\n protected void init() {\n viewModel.setNavigator(this);\n setUp();\n subscribeToLiveData();\n\n setUpNotificationUi();\n setUpNotification();\n\n setUpAds();\n\n viewModel.start(getCurrentVersionOfApp());\n }", "private void initialiseController() \r\n {\r\n defaultVectors();\r\n if(grantsByPIForm == null) \r\n {\r\n grantsByPIForm = new GrantsByPIForm(); //(Component) parent,modal);\r\n }\r\n grantsByPIForm.descriptionLabel.setText(UnitName);\r\n grantsByPIForm.descriptionLabel.setFont(new Font(\"SansSerif\",Font.BOLD,14));\r\n queryEngine = QueryEngine.getInstance();\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n registerComponents();\r\n try {\r\n setFormData(null);\r\n }\r\n catch(Exception e) {\r\n e.printStackTrace(System.out);\r\n }\r\n }", "@Override\n\tpublic void onInitialize() {\n\t\titemregistry.registeritems();\n\t\tentityregister.registerEntityAttribute();\n\t\tSystem.out.println(\"Project Azure: Starting up...\");\n\n\t}", "protected void initialize() {\r\n\r\n Robot.pneumatics.pneuOpen();\r\n }", "protected ICUResourceBundle(){}", "private void initializeEngine() {\n try {\n mRtcEngine = RtcEngine.create(getBaseContext(), getString(R.string.agora_app_id), mRtcEventHandler);\n } catch (Exception e) {\n Log.e(\"VIDEO.CALL\", Log.getStackTraceString(e));\n throw new RuntimeException(\"NEED to check rtc sdk init fatal error\\n\" + Log.getStackTraceString(e));\n }\n }", "public void init() {\r\n resources = new Vector<ResourcesElement>();\r\n informations = new Vector<InformationElement>();\r\n output = null;\r\n spec = DEFAULT_SPEC;\r\n version = null;\r\n codeBase = null;\r\n href = null;\r\n allPermissions = false;\r\n j2eePermissions = false;\r\n isComponent = false;\r\n applicationDesc = null;\r\n appletDesc = null;\r\n installerDesc = null;\r\n }", "static void init() {}", "public void initialize() {\n }" ]
[ "0.7862772", "0.77622664", "0.76864237", "0.7680576", "0.7631798", "0.7528408", "0.7504295", "0.74666", "0.7440823", "0.73611605", "0.69607705", "0.6637696", "0.66255546", "0.6528858", "0.65168697", "0.6357723", "0.6338443", "0.6321127", "0.62756985", "0.627008", "0.6055512", "0.60404384", "0.60069585", "0.5987393", "0.5917611", "0.59083533", "0.5906853", "0.5870357", "0.5868874", "0.58528274", "0.58528274", "0.58508307", "0.58373076", "0.5792692", "0.5785755", "0.57840514", "0.5783575", "0.5739923", "0.57257915", "0.5705292", "0.5704848", "0.56922424", "0.56735325", "0.56672424", "0.56662595", "0.5662594", "0.5659562", "0.56358904", "0.56319696", "0.56281376", "0.56267077", "0.5626128", "0.5612026", "0.56066346", "0.55973727", "0.5588559", "0.55764604", "0.5567256", "0.55639917", "0.5561642", "0.55606645", "0.5557085", "0.5553308", "0.55420136", "0.55402416", "0.55358994", "0.55328643", "0.5532424", "0.55312693", "0.5530123", "0.5522233", "0.5514938", "0.551371", "0.551371", "0.5511529", "0.5506828", "0.5506195", "0.55042875", "0.5503653", "0.54957706", "0.5495558", "0.5494551", "0.54914534", "0.5484887", "0.5480992", "0.54804885", "0.54803604", "0.54778355", "0.54770094", "0.5474597", "0.54737073", "0.54707026", "0.54703224", "0.5468815", "0.54642504", "0.5460557", "0.54593194", "0.54565394", "0.5452577", "0.54430646" ]
0.77021605
2
Initialize the Tensor Flow Object Detection engine.
void initTfod() { int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier( "tfodMonitorViewId", "id", hardwareMap.appContext.getPackageName()); TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId); tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia); tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifierObject = ObjectClassifier.create(context.getAssets(), TYPE_MODEL, LABEL_TYPE, INPUT_SIZE_TYPE);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }", "private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifier = TensorFlowImageClassifier.create(\n getAssets(),\n MODEL_PATH,\n LABEL_PATH,\n INPUT_SIZE,\n QUANT);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }", "private void initTensorFlowAndLoadModel() {\n executor.execute(new Runnable() {\n @Override\n public void run() {\n try {\n classifier = TensorFlowImageClassifier.create(\n getAssets(),\n MODEL_FILE,\n LABEL_FILE,\n INPUT_SIZE,\n IMAGE_MEAN,\n IMAGE_STD,\n INPUT_NAME,\n OUTPUT_NAME);\n } catch (final Exception e) {\n throw new RuntimeException(\"Error initializing TensorFlow!\", e);\n }\n }\n });\n }", "public static void init() {\n if (!initialized) {\n try {\n System.loadLibrary(\"tensorflowlite_test_jni\");\n } catch (UnsatisfiedLinkError e) {\n System.loadLibrary(\"tensorflowlite_stable_test_jni\");\n }\n initTfLiteForTest();\n initialized = true;\n }\n }", "public void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minResultConfidence = 0.8f;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_QUAD_ELEMENT, LABEL_SINGLE_ELEMENT);\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL);\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minResultConfidence = 0.8f;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_FIRST_ELEMENT, LABEL_SECOND_ELEMENT);\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minimumConfidence = 0.67;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_FIRST_ELEMENT, LABEL_SECOND_ELEMENT);\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minimumConfidence = 0.8;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_FIRST_ELEMENT, LABEL_SECOND_ELEMENT);\n }", "void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.FRONT;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n\n if (ClassFactory.getInstance().canCreateTFObjectDetector()) {\n initTfod();\n tensorFlowSafetyNotInitialized = false;\n } else {\n tensorFlowSafetyNotInitialized = true;\n }\n }", "private void initTfod() {\n\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\",\n \"id\",\n hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minimumConfidence = TFOD_CONFIDENCE; //Added by J.Tu on 2019-04-24 00:23\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n //tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL);\n\n }", "public void initTfod() {\n\t\tint tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n\t\t\t\t\"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n\t\tTFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters((tfodMonitorViewId));\n\t\ttfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n\t\ttfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL);\n\t}", "void init(@NotNull final AIEngine engine);", "@Override\n public void init() {\n runtime.reset();\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n }", "public void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = CAMERA_CHOICE;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n\n if (ClassFactory.getInstance().canCreateTFObjectDetector()) {\n initTfod();\n } else {\n telemetry.addData(\"Sorry!\", \"This device is not compatible with TFOD\");\n }\n }", "@Override\n public void init() {\n telemetry.addData(\">\", \"Initializing...\");\n telemetry.update();\n\n // Sensors\n gyro = new Gyro(hardwareMap, \"gyro\");\n if (!gyro.isAvailable()) {\n telemetry.log().add(\"ERROR: Unable to initalize gyro\");\n }\n\n // Drive motors\n tank = new WheelMotorConfigs().init(hardwareMap, telemetry);\n tank.stop();\n\n // Vuforia\n vuforia = new VuforiaFTC(VuforiaConfigs.AssetName, VuforiaConfigs.TargetCount,\n VuforiaConfigs.Field(), VuforiaConfigs.Bot());\n vuforia.init();\n\n // Wait for the game to begin\n telemetry.addData(\">\", \"Ready for game start\");\n telemetry.update();\n }", "@Override\n public void initEngine() {\n \n }", "@Override\n public void initEngine() {\n \n }", "void initVuforia() {\n\n //Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n }", "public void initVuforia() {\n /*\n * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n */\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the TensorFlow Object Detection engine.\n }", "protected void initialize() {\n\t\trequires(simpleVision);\r\n\t}", "public void init(final Context context) {\n AssetManager assetManager = context.getAssets();\n\n// //if(tracker==null)\n// tracker = new MultiBoxTracker(this);\n\n cropSize = TF_OD_API_INPUT_SIZE;\n if (MODE == DetectorMode.YOLO) {\n detector =\n TensorFlowYoloDetector.create(\n assetManager,\n YOLO_MODEL_FILE,\n YOLO_INPUT_SIZE,\n YOLO_INPUT_NAME,\n YOLO_OUTPUT_NAMES,\n YOLO_BLOCK_SIZE);\n cropSize = YOLO_INPUT_SIZE;\n minConfidence = MINIMUM_CONFIDENCE_YOLO;\n } else if (MODE == DetectorMode.MULTIBOX) {\n detector =\n TensorFlowMultiBoxDetector.create(\n assetManager,\n MB_MODEL_FILE,\n MB_LOCATION_FILE,\n MB_IMAGE_MEAN,\n MB_IMAGE_STD,\n MB_INPUT_NAME,\n MB_OUTPUT_LOCATIONS_NAME,\n MB_OUTPUT_SCORES_NAME);\n cropSize = MB_INPUT_SIZE;\n minConfidence = MINIMUM_CONFIDENCE_MULTIBOX;\n } else {\n try {\n detector = TensorFlowObjectDetectionAPIModel.create(\n assetManager, TF_OD_API_MODEL_FILE, TF_OD_API_LABELS_FILE, TF_OD_API_INPUT_SIZE);\n cropSize = TF_OD_API_INPUT_SIZE;\n minConfidence = MINIMUM_CONFIDENCE_TF_OD_API;\n } catch (final IOException e) {\n e.printStackTrace();\n }\n }\n\n// croppedBitmap = Bitmap.createBitmap(cropSize, cropSize, Bitmap.Config.ARGB_8888);\n }", "private void initializeEngine() {\n try {\n mRtcEngine = RtcEngine.create(getBaseContext(), getString(R.string.agora_app_id), mRtcEventHandler);\n } catch (Exception e) {\n Log.e(\"VIDEO.CALL\", Log.getStackTraceString(e));\n throw new RuntimeException(\"NEED to check rtc sdk init fatal error\\n\" + Log.getStackTraceString(e));\n }\n }", "private void initVuforia() {\n /*\n * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n */\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraName = hardwareMap.get(WebcamName.class, \"Webcam 1\");\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the TensorFlow Object Detection engine.\n }", "private void initializeEngine() {\n engine.setDecayDelay(emotionalAgent.decayTimeMillis());\n\n // Get decay steps parameter from ADF if exists and set decay steps in engine\n engine.setDecaySteps(emotionalAgent.decayStepsToMin());\n\n // Set engine initialized\n engine.setInitialized(true);\n }", "@Override\n public void init() {\n robot.init(hardwareMap);\n telemetry.addData(\"Status\", \"Initialized\");\n }", "@Override\n public void init() {\n\n robot.init(hardwareMap);\n\n // Tell the driver that initialization is complete.\n\n telemetry.addData(\"Robot Mode:\", \"Initialized\");\n telemetry.update();\n }", "public void initClassificationModule(KinectInterface kinectModule, MovementFoundInterface engineModule);", "public void initVuforia() {\n\t\t/*\n\t\t * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n\t\t */\n\t\tVuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n\t\tparameters.vuforiaLicenseKey = VUFORIA_KEY;\n\t\tparameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n\n\t\t// Instantiate the Vuforia engine\n\t\tvuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n\t\t// Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n\t}", "private void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n //initialize either phone or webcam depending on field set during object initialization\n if(device == Device.Phone){\n parameters.cameraDirection = CameraDirection.BACK;\n }else{\n parameters.cameraName = hwMap.get(WebcamName.class, \"Webcam\");\n\n }\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n }", "@Override\n public void init() {\n tol = new TeleOpLibrary();\n tol.init(this);\n telemetry.addLine(\"Initializing complete.\");\n telemetry.update();\n }", "public void initVuforia() {\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = CameraDirection.FRONT;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n }", "@Override\n public void initialize() {\n\n drivetrain = Drivetrain.getInstance();\n \n \n\n }", "private void initVuforia() {\n /*\n * Configure Vuforia by creating a Parameter object, and passing it to the Vuforia engine.\n */\n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = VuforiaLocalizer.CameraDirection.BACK;\n\n // Instantiate the Vuforia engine\n vuforia = ClassFactory.getInstance().createVuforia(parameters);\n\n // Loading trackables is not necessary for the Tensor Flow Object Detection engine.\n }", "@Override\n public void init() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Initialized\"); //\n }", "public void initialize(FrancRuntime runtime) {\n\t\tthis.nodeID = runtime.getNodeID();\n\t\tthis.mp = runtime.getMessagePool();\t\t\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized Interative TeleOp Mode\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.dcMotor.get(\"leftDrive\");\n rightDrive = hardwareMap.dcMotor.get(\"rightDrive\");\n armMotor = hardwareMap.dcMotor.get(\"armMotor\");\n\n leftGrab = hardwareMap.servo.get(\"leftGrab\");\n rightGrab = hardwareMap.servo.get(\"rightGrab\");\n colorArm = hardwareMap.servo.get(\"colorArm\");\n leftTop = hardwareMap.servo.get(\"leftTop\");\n rightTop = hardwareMap.servo.get(\"rightTop\");\n\n /*\n left and right drive = motion of robot\n armMotor = motion of arm (lifting the grippers)\n extendingArm = motion of slider (used for dropping the fake person)\n left and right grab = grippers to get the blocks\n */\n\n }", "@Override\n public void robotInit() {\n\toi = new OI();\n\tgameData = new GameData();\n\tcubeVision.start();\n\n\tinitializeDashboard();\n }", "public void robotInit() {\n RobotMap.init();\n driveTrain = new DriveTrain();\n oi = new OI();\n flippy = new Flipper();\n flappy = new Flapper();\n autonomousCommand = new AutoFlip();\n \n OI.init();\n CommandBase.init();\n autoChooser = new SendableChooser();\n autoChooser.addDefault(\"Flap Left\", new AutoFlip());\n SmartDashboard.putData(\"Autonomous_Mode\", autoChooser); \n }", "@Override\r\n public void init() {\r\n /* Initialize the hardware variables.\r\n * The init() method of the hardware class does all the work here\r\n */\r\n robot.init(hardwareMap);\r\n\r\n // Send telemetry message to signify robot waiting;\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n //ColorSensor colorSensor;\n //colorSensor = hardwareMap.get(ColorSensor.class, \"Sensor_Color\");\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n robot.FL.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.FL.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }", "public void robotInit() {\n RobotMap.init();\n driveWithJoystick = new DriveTrain();\n \n oi = new OI();\n }", "private void initialize() {\n\t\tinitializeModel();\n\t\tinitializeBoundary();\n\t\tinitializeController();\n\t}", "private void init() throws LWJGLException {\n gameLogic.init(window);\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n robot.leftDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n // Possibly add a delay\n robot.leftDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "@Override\n public void runOpMode() {\n frontLeftWheel = hardwareMap.dcMotor.get(\"frontLeft\");\n backRightWheel = hardwareMap.dcMotor.get(\"backRight\");\n frontRightWheel = hardwareMap.dcMotor.get(\"frontRight\");\n backLeftWheel = hardwareMap.dcMotor.get(\"backLeft\");\n\n //telemetry sends data to robot controller\n telemetry.addData(\"Output\", \"hardwareMapped\");\n\n // The TFObjectDetector uses the camera frames from the VuforiaLocalizer, so we create that\n // first.\n initVuforia();\n\n if (ClassFactory.getInstance().canCreateTFObjectDetector()) {\n initTfod();\n } else {\n telemetry.addData(\"Sorry!\", \"This device is not compatible with TFOD\");\n }\n\n /**\n * Activate TensorFlow Object Detection before we wait for the start command.\n * Do it here so that the Camera Stream window will have the TensorFlow annotations visible.\n **/\n if (tfod != null) {\n tfod.activate();\n }\n\n /** Wait for the game to begin */\n telemetry.addData(\">\", \"Press Play to start op mode\");\n telemetry.update();\n waitForStart();\n\n if (opModeIsActive()) {\n while (opModeIsActive()) {\n if (tfod != null) {\n // getUpdatedRecognitions() will return null if no new information is available since\n // the last time that call was made\n List<Recognition> updatedRecognitions = tfod.getUpdatedRecognitions();\n if(updatedRecognitions == null) {\n frontLeftWheel.setPower(0);\n frontRightWheel.setPower(0);\n backLeftWheel.setPower(0);\n backRightWheel.setPower(0);\n } else if (updatedRecognitions != null) {\n telemetry.addData(\"# Object Detected\", updatedRecognitions.size());\n // step through the list of recognitions and display boundary info.\n int i = 0;\n\n\n for (Recognition recognition : updatedRecognitions) {\n float imageHeight = recognition.getImageHeight();\n float blockHeight = recognition.getHeight();\n\n //-----------------------\n// stoneCX = (recognition.getRight() + recognition.getLeft())/2;//get center X of stone\n// screenCX = recognition.getImageWidth()/2; // get center X of the Image\n// telemetry.addData(\"screenCX\", screenCX);\n// telemetry.addData(\"stoneCX\", stoneCX);\n// telemetry.addData(\"width\", recognition.getImageWidth());\n //------------------------\n\n telemetry.addData(\"blockHeight\", blockHeight);\n telemetry.addData(\"imageHeight\", imageHeight);\n telemetry.addData(String.format(\"label (%d)\", i), recognition.getLabel());\n telemetry.addData(String.format(\" left,top (%d)\", i), \"%.03f , %.03f\", recognition.getLeft(), recognition.getTop());\n telemetry.addData(String.format(\" right,bottom (%d)\", i), \"%.03f , %.03f\", recognition.getRight(), recognition.getBottom());\n\n\n if(hasStrafed == false) {\n float midpoint = (recognition.getLeft() + recognition.getRight()) /2;\n float multiplier ;\n if(midpoint > 500) {\n multiplier = -(((int)midpoint - 500) / 100) - 1;\n log = \"Adjusting Right\";\n sleep(200);\n } else if(midpoint < 300) {\n multiplier = 1 + ((500 - midpoint) / 100);\n log = \"Adjusting Left\";\n sleep(200);\n } else {\n multiplier = 0;\n log = \"In acceptable range\";\n hasStrafed = true;\n }\n frontLeftWheel.setPower(-0.1 * multiplier);\n backLeftWheel.setPower(0.1 * multiplier);\n frontRightWheel.setPower(-0.1 * multiplier);\n backRightWheel.setPower(0.1 * multiplier);\n } else {\n if( blockHeight/ imageHeight < .5) {\n frontLeftWheel.setPower(-.3);\n backLeftWheel.setPower(.3);\n frontRightWheel.setPower(.3);\n backRightWheel.setPower(-.3);\n telemetry.addData(\"detecting stuff\", true);\n } else {\n frontLeftWheel.setPower(0);\n backLeftWheel.setPower(0);\n frontRightWheel.setPower(0);\n backRightWheel.setPower(0);\n telemetry.addData(\"detecting stuff\", false);\n }\n }\n\n telemetry.addData(\"Angle to unit\", recognition.estimateAngleToObject(AngleUnit.DEGREES));\n telemetry.addData(\"Log\", log);\n\n }\n telemetry.update();\n }\n\n }\n }\n }\n if (tfod != null) {\n tfod.shutdown();\n }\n }", "private void setup() {\n\t\tpopulateEntitiesLists();\n\t\t// rayHandler.setCombinedMatrix(batch.getProjectionMatrix());\n\t\tambientColor = Color.CLEAR;\n\t\tsetAmbientAlpha(.3f);\n\t\tfpsLogger = new FPSLogger();\n\t\tdynamicEntities = new ArrayList<DynamicEntity>();\n\t\tfont.getData().setScale(DEBUG_FONT_SCALE);\n\t}", "private void testInitializeEngine() {\r\n\t\r\n\t\t/*\tInitialization of variables\t*/\r\n\t\tPointerByReference phEngine = new PointerByReference();\r\n\t\tint nScale = 16;\r\n\t\tint nMaxFace = 10;\r\n\t\tPointer pWorkMem = C_Library.INSTANCE.malloc(WORKBUF_SIZE);\r\n\t\t\r\n\t\t/*\tInitialization of engine\t*/\r\n\t\tNativeLong nRet = AFD_FSDK_Library.INSTANCE.AFD_FSDK_InitialFaceEngine(\r\n\t\t\t\tAPPID, SDKKey, pWorkMem, WORKBUF_SIZE, phEngine, \r\n\t\t\t\t_AFD_FSDK_OrientPriority.AFD_FSDK_OPF_0_HIGHER_EXT, nScale, nMaxFace\r\n\t\t);\r\n\t\t\r\n\t\t/*\tEngine assignment\t*/\r\n\t\tthis.phEngineFD = phEngine;\r\n\t\t\r\n\t\t/*\tPrint information\t*/\r\n\t\tSystem.out.println(\"Result of initialization of engine: \" + nRet.longValue());\r\n\t\tSystem.out.println(phEngine);\r\n\t\tSystem.out.println(phEngine.getPointer());\r\n\t\tSystem.out.println(phEngine.getValue());\r\n\t}", "@Override\n public void initialize() {\n drivetrain.enable();\n }", "protected void initialize() {\r\n x = 0;\r\n y = 0;\r\n driveTrain.reInit();\r\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 initialize() {\r\n\r\n Robot.pneumatics.pneuOpen();\r\n }", "public void init(GameEngine engine) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException {\n\t\tif(this.engine != null) {\n\t\t\tthrow new IllegalStateException(\"The world has already been initialised.\");\n\t\t} else {\n\t\t\tthis.engine = engine;\n\t\t\tthis.eventManager = new EventManager(engine);\n\t\t\tthis.tickManager = new TickManager();\n\t\t\tthis.registerGlobalEvents();\n\t\t\tthis.loadConfiguration();\n\t\t}\n\t}", "@Override\r\n protected void initialize() {\r\n // initialize for computing deltaT\r\n mPreviousTime = System.currentTimeMillis(); \r\n // the controllers don't use position data\r\n // but they do need Yaw Data, which can come from\r\n // either the IMU or the Position Tracker. We\r\n // initialize both so we can change our minds\r\n // in the drivetrain code later on, depending\r\n // upon the relative performance of the two approaches.\r\n Robot.drivetrain.resetGyro();\r\n \tRobot.drivetrain.resetEncodersAndStats(); \r\n \tRobot.drivetrain.resetPosition(true);\r\n \tRobot.drivetrain.setInitialOrientationDegCCW(mStartOrientationDegCCW); \r\n double dist = Robot.visionSubSys.getDistFt() ;\r\n double bearing = Robot.visionSubSys.getBearingDegCW() ;\r\n double orient = Robot.drivetrain.getOrientDegCCW() ; \t\r\n mDistController.start(dist,bearing);\r\n mBearingController.start(dist,bearing,orient);\r\n \r\n Robot.logger.appendLog(\"CmdDualPidFollowVision Init\");\r\n \tRobot.drivetrain.setLoggingOn();\r\n }", "public void init() {\n // Define and Initialize Motors (note: need to use reference to actual OpMode).\n leftDrive = myOpMode.hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = myOpMode.hardwareMap.get(DcMotor.class, \"right_drive\");\n armMotor = myOpMode.hardwareMap.get(DcMotor.class, \"arm\");\n\n // To drive forward, most robots need the motor on one side to be reversed, because the axles point in opposite directions.\n // Pushing the left stick forward MUST make robot go forward. So adjust these two lines based on your first test drive.\n // Note: The settings here assume direct drive on left and right wheels. Gear Reduction or 90 Deg drives may require direction flips\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n // If there are encoders connected, switch to RUN_USING_ENCODER mode for greater accuracy\n // leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // Define and initialize ALL installed servos.\n leftHand = myOpMode.hardwareMap.get(Servo.class, \"left_hand\");\n rightHand = myOpMode.hardwareMap.get(Servo.class, \"right_hand\");\n leftHand.setPosition(MID_SERVO);\n rightHand.setPosition(MID_SERVO);\n\n myOpMode.telemetry.addData(\">\", \"Hardware Initialized\");\n myOpMode.telemetry.update();\n }", "private void createTrackingPipeline() throws ConfigurationException\n {\n fgDetector = new HSVFGDetector();\n // fgDetector = new DifferenceFGDetector();\n\n blobDetector = opencv_legacy.cvCreateBlobDetectorSimple();\n // blobTracker = opencv_legacy.cvCreateBlobTrackerCCMSPF();\n blobTracker = opencv_legacy.cvCreateBlobTrackerCC();\n trackerPostProcessor = opencv_legacy.cvCreateModuleBlobTrackPostProcKalman();\n trackerFrameCount = 0;\n blobs.Clear();\n badFramesForBlob.clear();\n }", "public CommandLineFSRecognizer() {\n init();\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 void robotInit() {\n RobotMap.init();\n initDashboardInput();\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n driveTrain = new DriveTrain();\n power = new Power();\n arm = new Arm();\n sensors = new Sensors();\n ballGrabberSubsystem = new BallGrabberSubsystem();\n winch = new Winch();\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n\n // instantiate the command used for the autonomous period\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n arcadeDrive = new ArcadeDrive();\n\n readPreferences();\n }", "public void robotInit() {\n\t\tmyRobot = new RobotDrive(0,1);\n\t\tteleop = new Teleop(myRobot);\n\t\tauto = new AutonomousDrive(myRobot);\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 void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\tteleopCommand = new TeleopCommand();\n }", "@Override\n protected void initialize(){\n drivetrain.clearOldMotionProfiles();\n drivetrain.zeroEncoders();\n try{\n drivetrain.loadMotionProfile(name, isInverted);\n } catch (IOException e) {\n done = true;\n }\n drivetrain.startMotionProfile(name);\n }", "protected void initialize() {\n //drivetrain.initGyro();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n cameraControl = new CameraControl();\n cameraControl.Initialize(this,(FrameLayout) findViewById(R.id.camera_frame_layout));\n\n tensorFlowModel = new TensorFlowModel();\n tensorFlowModel.InitializeAsync(getAssets());\n\n animationsControl = new Animations(this);\n\n\n }", "@Override public void init() {\n drive = MecanumDrive.standard(hardwareMap); // Comment this line if you, for some reason, don't need to use the drive motors\n\n // Uncomment the next three lines if you need to use the gyroscope\n // gyro = IMUGyro.standard(hardwareMap);\n // gyro.initialize();\n // gyro.calibrate();\n\n // Uncomment the next two lines if you need to use the vision system\n // vision = new Vision(hardwareMap);\n // vision.init();\n\n // Uncomment the next line if you have a servo\n // myServo = hardwareMap.get(Servo.class, \"myServo\");\n\n /** Place any code that should run when INIT is pressed here. **/\n }", "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public void EngineInit() {\n TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[] {};\n }\n\n public void checkClientTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n }\n\n public void checkServerTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n }\n } };\n\n try {\n\n\n //取得SSL的SSLContext实例\n SSLContext sslContext = SSLContext.getInstance(\"TLS\");\n sslContext.init(null,trustAllCerts,new java.security.SecureRandom());\n sslEngine = sslContext.createSSLEngine();\n sslEngine.setUseClientMode(true);\n\n } catch(NoSuchAlgorithmException e) {\n } catch(KeyManagementException e) {\n }\n SSLSession session = sslEngine.getSession();\n int appBufferMax = session.getApplicationBufferSize();\n int netBufferMax = session.getPacketBufferSize();\n Log.i(\"123\", \"EngineInit: appBufferMax:\"+appBufferMax + \"netBufferMax:\"+netBufferMax);\n ByteBuffer mTunSSRAppData = ByteBuffer.allocate(appBufferMax);\n ByteBuffer mTunSSRWrapData = ByteBuffer.allocate(netBufferMax);\n ByteBuffer peerAppData = ByteBuffer.allocate(appBufferMax);\n ByteBuffer peerNetData = ByteBuffer.allocate(netBufferMax);\n }", "private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}", "protected void init()\r\n\t{\n\t\tif (ConfigManager.getInstance().getIsCrossClassify() && WekaTool.dataStageOn)\r\n\t\t{\r\n\t\t\t//System.out.println(\"in init for data stage\");\r\n\t\t\tsrcDirUrl = ConfigManager.getInstance().getTrainPath();\r\n\t\t\tdestDirUrl = ConfigManager.getInstance().getTrainPath() +\r\n\t\t\t File.separator + \"output\";\r\n\t\t\t//System.out.println(\"srcDirUrl = \" + srcDirUrl);\r\n\t\t\t//System.out.println(\"destDirUrl = \" + destDirUrl);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//System.out.println(\"here, good\");\r\n\t\t\tsrcDirUrl = getSrcDirUrl();\r\n\t\t\tdestDirUrl = getDestDirUrl();\r\n\t\t}\r\n\t\tdatalibSVMUrl = getLibSVMDirUrl();\r\n\t\ttry {\r\n\t\t\tsrcDir = Utils.getDir(srcDirUrl);\r\n\t\t\tdestDir = Utils.getDir(destDirUrl);\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t}\r\n\t}", "@Override\n public void init() {\n robot.init(hardwareMap, telemetry, false);\n //robot.resetServo();\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"Status\", \"Initialized\");\n // robot.FL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.FR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }", "public void initialize() {\n // empty for now\n }", "@Override\n public void robotInit() {\n robot = RobotSoftware.getInstance();\n CameraServer.getInstance().startAutomaticCapture(0);\n CameraServer.getInstance().startAutomaticCapture(1);\n watcher = new Watcher(robot.leftDistanceStream.getWatchable(\"left dist\"),\n robot.rightDistanceStream.getWatchable(\"right dist\"));\n watcher.outputToDashboard();\n robot.runCompressor.set(false);\n teleop = new TeleopMain(robot);\n toggleCompressor = true;\n teleop.init();\n }", "public void init() {\n Thread run = new Thread(new Run());\n run.start();\n }", "public void init() {\n log.info(\"initialization\");\n }", "protected void initialize() {\n \tRobot.driveTrain.driveMotionMagic(distanceToTravel);\n }", "public void initialize() {\n\t\t//start the processor thread\n\t\t//logger.debug(processorName+\" starting processor thread\");\n\t\tprocessorThread.start();\n\t\t\n\t\t//logger.debug(processorName+\" initialized\");\n\t}", "@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n public void initializeGraph() {\n checkpointPrefix = Tensors.create((getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath() + \"final_model.ckpt\").toString());\n checkpointDir = getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath();\n graph = new Graph();\n sess = new Session(graph);\n InputStream inputStream;\n try {\n inputStream = getAssets().open(\"final_graph_hdd.pb\");\n byte[] buffer = new byte[inputStream.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n graphDef = output.toByteArray();\n } catch (IOException e) {\n e.printStackTrace();\n }\n graph.importGraphDef(graphDef);\n try {\n sess.runner().feed(\"save/Const\", checkpointPrefix).addTarget(\"save/restore_all\").run();\n Toast.makeText(this, \"Checkpoint Found and Loaded!\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e) {\n sess.runner().addTarget(\"init\").run();\n Log.i(\"Checkpoint: \", \"Graph Initialized\");\n }\n }", "@Override\n protected void initialize()\n {\n mPIDController.setSetpoint(mDrivetrain.getIMUHeading().getDegrees());\n\n // Actually start the controller\n mPIDController.enable();\n\n Logger.info(\"DriveStraightDrivetrain initialized\");\n }", "static void initRuntimeConstructors(ITermFactory tf) {\n CFGNode.initializeConstructor(tf);\n ICFGNode.Kind.initializeConstructor(tf);\n Set.initializeConstructor(tf);\n Map.initializeConstructor(tf);\n EmptyMapOrSet.initializeConstructor(tf);\n Name.initializeConstructor(tf);\n FullSetLattice.ISetImplementation.initializeConstructor(tf);\n TermIndex.initializeConstructor(tf);\n }", "public void initialize(InfoflowManager manager);", "public void initialize() {\n // TODO\n }", "public void init() {\n\t\tif (!Rengine.versionCheck()) {\n\t\t System.err.println(\"** Version mismatch - Java files don't match library version.\");\n\t\t System.exit(1);\n\t\t}\n\t\t\n\t\tString[] args = {\"--vanilla\"};\n\t\tre = new Rengine(args, false, new TextConsole());\n\t\t\n\t\t// the engine creates R is a new thread, so we should wait until it's ready\n if (!re.waitForR()) {\n System.out.println(\"Cannot load R\");\n return;\n }\n\t\t\n\t}", "protected void initialize() {\n drivebase.engageOmni();\n }", "public void initialize(){\n\t\tDrawingBotV3.logger.entering(\"FX Controller\", \"initialize\");\n\n initToolbar();\n initViewport();\n initPlottingControls();\n initProgressBar();\n initDrawingAreaPane();\n initPreProcessingPane();\n\t\tinitConnectionPortPane();\n initPFMControls();\n initPenSettingsPane();\n\n\n viewportStackPane.setOnMousePressed(DrawingBotV3.INSTANCE::mousePressedJavaFX);\n viewportStackPane.setOnMouseDragged(DrawingBotV3.INSTANCE::mouseDraggedJavaFX);\n\n viewportScrollPane.setHvalue(0.5);\n viewportScrollPane.setVvalue(0.5);\n\n initSeparateStages();\n\n DrawingBotV3.INSTANCE.currentFilters.addListener((ListChangeListener<ObservableImageFilter>) c -> DrawingBotV3.INSTANCE.onImageFiltersChanged());\n DrawingBotV3.logger.exiting(\"FX Controller\", \"initialize\");\n }", "public static void init() {\n if (initialized) {\n return;\n }\n initialized = true;\n DebugOptions.DEV_ROOT_PATH = \"engine/src/main/resources/\";\n GL20 mockGL = new MockGL();\n Gdx.gl = mockGL;\n Gdx.gl20 = mockGL;\n\n ServiceRegistry serviceRegistry = new ServiceRegistry();\n serviceRegistry\n .with(FacadeModuleConfig.class)\n .lifetime(Lifetime.Singleton)\n .use(TestModuleConfig::new);\n serviceRegistry\n .with(ModulePathScanner.class)\n .lifetime(Lifetime.Singleton);\n\n final HeadlessApplication application = new HeadlessApplication(new SolApplication(100, serviceRegistry), new HeadlessApplicationConfiguration());\n game = ((SolApplication) application.getApplicationListener()).getGame();\n }", "public void robotInit() {\n // North.registerCommand(\"setSetpoint\", (params) -> ??, [\"Setpoint\"]);\n // North.registerCondition(\"atSetpoint\", elevator::atSetpoint);\n\n //NOTE: init(name, size, logic provider, drive & nav)\n North.init(/*NorthUtils.readText(\"name.txt\")*/ \"lawn chair\", 24/12, 24/12, drive);\n North.default_drive_controller = HoldController.I;\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n }", "private void initialize() {\n\n // \n // 1) Driver to run Seed Tracker.\n //\n if (!strategyResource.startsWith(\"/\")) {\n strategyResource = \"/org/hps/recon/tracking/strategies/\" + strategyResource;\n }\n List<SeedStrategy> sFinallist = StrategyXMLUtils.getStrategyListFromInputStream(this.getClass().getResourceAsStream(strategyResource));\n StraightTracker stFinal = new StraightTracker(sFinallist, this._useHPSMaterialManager, this.includeMS);\n// stFinal.setApplySectorBinning(_applySectorBinning);\n stFinal.setUseDefaultXPlane(false);\n stFinal.setDebug(this.debug);\n stFinal.setIterativeConfirmed(_iterativeConfirmed);\n stFinal.setMaterialManagerTransform(CoordinateTransformations.getTransform());\n stFinal.setInputCollectionName(stInputCollectionName);\n stFinal.setTrkCollectionName(trackCollectionName);\n stFinal.setBField(bfield);\n stFinal.setTrackFittingAlgorithm(new StraightTrackAxialFitter());\n if (debug) {\n stFinal.setDiagnostics(new SeedTrackerDiagnostics());\n }\n // stFinal.setSectorParams(false); //this doesn't actually seem to do anything\n stFinal.setSectorParams(1, 10000);\n add(stFinal);\n//\n// if (rmsTimeCut > 0) {\n// stFinal.setTrackCheck(new HitTimeTrackCheck(rmsTimeCut));\n// }\n }", "public void robotInit() {\r\n CommandBase.init();\r\n OI.init();\r\n System.out.println(\"ROBOT READY!\");\r\n }", "protected void initialize() {\n \t_finalTickTargetLeft = _ticksToTravel + Robot.driveTrain.getEncoderLeft();\n \t_finalTickTargetRight = _ticksToTravel + Robot.driveTrain.getEncoderRight();\n \t\n }", "protected void initialize() {\n Robot.m_drivetrain.resetPath();\n Robot.m_drivetrain.addPoint(0, 0);\n Robot.m_drivetrain.addPoint(3, 0);\n Robot.m_drivetrain.generatePath();\n \n\t}", "public void robotInit()\n\t{\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\t// autonomousCommand = new Driver();\n\t}", "public void initialize() {\n\t\tdrivetrain.resetGyro();\n\t\tdrivetrain.setAngleTarget(getTargetAngle());\n\t\tLog.debug(this.getClass().toString()+ \".initialize called drivetrain.setAngleTarget(\" + getTargetAngle() + \")\");\n\t\t\n\n\t}", "protected void initialize() {\n\t\tRobot.sender_.setSendData(vision);\n\n\t\tinitHeading = Robot.drivetrain.getGyroHeading();\n\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartDepth)) {\n\t\t\tinitDistance = Robot.depth_.get_distance() * Drivetrain.kEncoderTicksPerInch;\n\t\t}\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartCubeSearch)) {\n\t\t\tinitDistance = Robot.cube_.get_distance() * Drivetrain.kEncoderTicksPerInch;\n\t\t}\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.StartRFT)) {\n\t\t\tinitDistance = Robot.rft_.get_distance() * Drivetrain.kEncoderTicksPerInch;\n\t\t}\t\n\t\tif(vision.equalsIgnoreCase(SocketVisionSender.PlatformBlueSearch) || vision.equalsIgnoreCase(SocketVisionSender.PlatformRedSearch)) {\n\t\t\tinitDistance = Robot.platform_.get_distance();\n\t\t}\n\t}", "public void robotInit() {\n\t\toi = OI.getInstance();\r\n\t\t\r\n\t\t// instantiate the command used for the autonomous and teleop period\r\n\t\treadings = new D_SensorReadings();\r\n\t\t// Start pushing values to the SD.\r\n\t\treadings.start();\r\n\t\t//Gets the single instances of driver and operator, from OI. \r\n\t\tdriver = oi.getDriver();\r\n\t\toperator = oi.getOperator();\r\n\r\n\t\t//Sets our default auto to NoAuto, if the remainder of our code doesn't seem to work. \r\n\t\tauto = new G_NoAuto();\r\n\t\t\r\n\t\t//Sets our teleop commandGroup to T_TeleopGroup, which contains Kaj,ELevator, Intake, and Crossbow Commands. \r\n\t\tteleop = new T_TeleopGroup();\r\n\t\t\r\n\t}", "@Override\n public void init() throws Exception {\n // On Mac OS X Chromium engine must be initialized in non-UI thread.\n if (Environment.isMac()) {\n BrowserCore.initialize();\n }\n }", "private void loadInterpreter() throws IOException {\n tflite = new Interpreter(loadModelFile(activity));\n\n labelList = loadLabelList(activity);\n // the image as ByteBuffer\n imgData = ByteBuffer.allocateDirect((int)(4 *\n parameter.get(\"dimBatchSize\") *\n parameter.get(\"tensorImageWidth\") *\n parameter.get(\"tensorImageHeight\") *\n parameter.get(\"dimPixelSize\")));\n imgData.order(ByteOrder.nativeOrder());\n labelProbArray = new float[1][labelList.size()];\n filterLabelProbArray = new float[Math.round(parameter.get(\"filterStages\"))][labelList.size()];\n }", "@Override\n public void init() {\n swerveDebug(500, \"SwerveAutoTEST::init\", \"STARTing init for TETS\");\n\n // Run initialization of other parts of the class\n // Note that the class will connect to all of our motors and servos\n super.init();\n\n crater = Boolean.TRUE;\n\n\n // Robot and autonomous settings are read in from files in the core class init()\n // Report the autonomous settings\n showAutonomousGoals();\n\n swerveLog( \"X S6\", ourSwerve.getOrientLog());\n\n swerveDebug(500, \"SwerveAutoTEST::init\", \"DONE\");\n }", "public void init() {\n\t\twindow.init();\n\t\t\n\t\t//OBJModel test = new OBJModel(\"monkey.obj\");\n\t\t//IndexedModel model = test.toIndexedModel();\n\t\t//Model test2 = new Model(OBJLoader.loadMesh(\"monkey.obj\"));\n\t\t\n\t}" ]
[ "0.7420496", "0.7051041", "0.7013778", "0.6714255", "0.66958374", "0.6670549", "0.66630876", "0.66620404", "0.6658837", "0.6601241", "0.6590903", "0.6590097", "0.6433824", "0.63152564", "0.6314169", "0.6296023", "0.627128", "0.627128", "0.62075007", "0.6202267", "0.61795384", "0.6179363", "0.61752135", "0.6175142", "0.61646396", "0.6104813", "0.60807407", "0.6072862", "0.60499734", "0.60370076", "0.6035261", "0.60275155", "0.60235304", "0.60120636", "0.5975066", "0.5951476", "0.59128815", "0.5906306", "0.5903622", "0.59003985", "0.58812773", "0.5876112", "0.5871909", "0.5844444", "0.58224434", "0.57668144", "0.57539946", "0.5745992", "0.5741156", "0.57321686", "0.572707", "0.5724816", "0.571873", "0.5714037", "0.5703192", "0.5698559", "0.56967884", "0.5692201", "0.5689867", "0.5676124", "0.56723785", "0.5672164", "0.56710404", "0.5663153", "0.5655679", "0.56380814", "0.5636211", "0.5624372", "0.56159425", "0.559991", "0.55775267", "0.5572069", "0.5569901", "0.55667764", "0.5543742", "0.5528963", "0.55186146", "0.55171937", "0.55155605", "0.55066913", "0.5502147", "0.5501883", "0.55011004", "0.5500498", "0.54972404", "0.54941964", "0.54886115", "0.5485098", "0.54828817", "0.54635733", "0.5461854", "0.54518604", "0.5450504", "0.54496413", "0.5439267", "0.54391474", "0.54379386", "0.5437111", "0.5434849", "0.5413534" ]
0.66824496
5
array with all the hours
public static void main(String[] args) { int[][] employeeArray = { {2,4,3,4,5,8,8}, {7,3,4,3,3,4,4}, {3,3,4,3,3,2,2}, {9,3,4,7,3,4,1}, {3,5,4,3,6,3,8}, {3,4,4,6,3,4,4}, {3,7,4,8,3,8,4}, {6,3,5,9,2,7,9}}; //create a new single array to hold all the sums int[] hoursArray = new int[8]; //loop to add all the elements of the columns for(int i = 0; i < employeeArray.length; i++) for(int j = 0; j < employeeArray[i].length; j++) hoursArray[i] += employeeArray[i][j]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[] getHours() {\n return hours;\n }", "public int[] getHours() {\n int[] hoursArray = {this.hours, this.overtimeHours};\n return hoursArray;\n }", "private void loadHours(){\n int hours = 0;\n int minutes = 0;\n for(int i=0; i<24;i++){\n for(int j=0; j<4;j++){\n this.hoursOfTheDay.add(String.format(\"%02d\",hours)+\":\"+ String.format(\"%02d\",minutes));\n minutes+=15;\n }\n hours++;\n minutes = 0;\n }\n }", "public String getHours();", "public String[] getHora()\r\n\t{\r\n\t\treturn this.reloj.getFormatTime();\r\n\t}", "public List<Integer> getByHour() {\n\t\treturn byHour;\n\t}", "public double getHours() {\r\n return hours;\r\n }", "public double getHours() {\r\n return hours;\r\n }", "public double getHours(){\n return hours;\n }", "public int getIntervalHours();", "public static String[] generateWorkingHours(int openTime, int closeTime, int minuteStep) {\n\n if (openTime > closeTime)\n return null;\n\n int digitCount = Util.getDigitsCount(openTime);\n\n if (digitCount == 1 || digitCount == 2)\n openTime *= 100;\n if (digitCount == 3)\n openTime *= 10;\n\n digitCount = Util.getDigitsCount(closeTime);\n if (digitCount == 1 || digitCount == 2)\n closeTime *= 100;\n if (digitCount == 3)\n closeTime *= 10;\n\n\n List<String> list = new ArrayList<>();\n\n int counterHour = openTime / 100;\n int counterMin = openTime % 100;\n int stopHour = closeTime / 100;\n int stopMin = closeTime % 100;\n\n while (counterHour <= stopHour){\n\n if (counterMin >= 60){\n counterMin = 0;\n counterHour += 1;\n }\n\n list.add(String.format(\"%02d\", counterHour) + \":\" + String.format(\"%02d\", counterMin));\n\n if (counterHour >= stopHour && counterMin >= stopMin)\n break;\n\n counterMin += minuteStep;\n }\n\n return list.toArray(new String[list.size()]);\n }", "public void setHours(int[] hours) {\n if (hours == null)\n hours = new int[] {};\n this.hours = hours;\n }", "public NSArray hoursWorked() {\n\t\tNSArray hoursWorked;\n\t\tNSDictionary resolutionBindings = new NSDictionary(new Object[] {bugId()}, new Object[] { \"bugId\",});\n\n\t\tEOFetchSpecification fs = EOFetchSpecification.fetchSpecificationNamed( \"hoursWorked\", \"BugsActivity\").fetchSpecificationWithQualifierBindings( resolutionBindings );\n\t\tfs.setRefreshesRefetchedObjects(true);\n\t\thoursWorked = (NSArray)editingContext().objectsWithFetchSpecification(fs);\n\t\t//System.out.println(\"\\tItem.hoursWorked() count - \" + hoursWorked.count());\n\n\t\treturn hoursWorked;\n\n }", "private String getHours() {\n StringBuilder hoursSB = new StringBuilder();\n\n if (hours > 0) {\n hoursSB.append(hours);\n } else {\n hoursSB.append(\"0\");\n }\n\n return hoursSB.toString();\n }", "public ArrayList<String> StringArrayListTimeCheck() {\n String temp = null;\n ArrayList<String> newStringList = new ArrayList();\n Calendar cal = Calendar.getInstance();\n for (int i = 0; i < 11; i++) {\n cal.add(Calendar.HOUR, 2);\n SimpleDateFormat sdf = new SimpleDateFormat(\"ha\");\n temp = sdf.format(cal.getTime()).toLowerCase();\n newStringList.add(temp);\n\n }\n return newStringList;\n\n }", "public int getHours() {\n return this.hours;\n }", "public int getHour() \n { \n return hour; \n }", "private Object[][] MakeTableTime(int interval) {\n\t\tint hours = 0;\n\t\tint minutes = 0;\n\t\tArrayList<Object[]> timeSlots = new ArrayList<Object[]>();\n\t\tfor (minutes = 0; hours < 24; minutes = minutes + interval) {\n\t\t\tif (minutes >= 60) {\n\t\t\t\thours++;\n\t\t\t\tminutes = minutes - 60;\n\t\t\t}\n\t\t\tObject[] timeSlot = new Object[] { String.format(\"%02d\", hours) + \" : \" + String.format(\"%02d\", minutes) };\n\t\t\ttimeSlots.add(timeSlot);\n\t\t}\n\n\t\treturn (Object[][]) timeSlots.toArray(new Object[timeSlots.size()][]);\n\t}", "public int getHour() { return this.hour; }", "public ArrayList<DailyHours> getDayList()\r\n\t{\r\n\t\treturn new ArrayList<DailyHours>(dailyHourLog);\r\n\t}", "public List<TimeInformation> getAllEmployeesTimeInformation() {\r\n\t\tList<TimeInformation> employeeTimeInformation = repository.findAll();\r\n\t\tif(employeeTimeInformation.size() > 0) {\r\n\t\t\treturn employeeTimeInformation;\r\n\t\t} else {\r\n\t\t\treturn new ArrayList<TimeInformation>();\r\n\t\t}\r\n\t}", "public int getHour()\n {\n return hour;\n }", "public int getHours(){\n return (int) totalSeconds/3600;\n }", "@RequestMapping(value = \"/project-hours\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<ProjectHour> getAllProjectHours() {\n log.debug(\"REST request to get all ProjectHours\");\n return projectHourService.findAll();\n }", "private int[] parseHours(String str) {\n try {\n return enumerate(str, 0, 23);\n } catch (IllegalArgumentException e) {\n throw new IllegalArgumentException(\"Error parsing hours: \" + e.getMessage());\n }\n }", "protected double[] getTimes() {\n String vname = getTimeVarName(); //original time variable name\n double[] values = getValues(vname);\n return values;\n }", "Integer getHour();", "private int getHours() {\n //-----------------------------------------------------------\n //Preconditions: none.\n //Postconditions: returns the value for the data field hours.\n //-----------------------------------------------------------\n\n return this.hours;\n\n }", "public int getHour(){\n return hour;\n }", "public ThreeHourPeriod[] getThreeHourArray() {\n\t\treturn threeHourArray;\n\t}", "public static void main(String[] args) throws ParseException {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm\");\n Date date = dateFormat.parse(\"2020-07-22 11:40\");\n long time = date.getTime();\n System.out.println(time);\n\n int[] arr = new int[]{};\n }", "public final native int getHours() /*-{\n return this.getHours();\n }-*/;", "public List<BigDecimal> getHourlyAverage() {\r\n\t\tif (hourlyAverage == null)\r\n\t\t\thourlyAverage = new ArrayList<BigDecimal>();\r\n\t\tint minuteInterval = loadForecast.getMinuteInterval();\r\n\r\n\t\tif (minuteInterval == 0 || intervals == null || intervals.size() == 0)\r\n\t\t\treturn hourlyAverage;\r\n\t\t/*\r\n\t\t * \r\n\t\t */\r\n\t\tBigDecimal total = new BigDecimal(\"0\");\r\n\t\tBigDecimal average = new BigDecimal(\"0\");\r\n\t\tInteger intervalsPerHour = 60 / minuteInterval;\r\n\t\tfor (int i = 0; i < intervals.size(); i++) {\r\n\t\t\tLoadForecastInterval interval = intervals.get(i);\r\n\t\t\ttotal = total.add(interval.getValue());\r\n\t\t\tif (i == 0 || i % intervalsPerHour == 0) {\r\n\t\t\t\taverage = total.divide(new BigDecimal(intervalsPerHour));\r\n\t\t\t\thourlyAverage.add(average);\r\n\t\t\t\ttotal = new BigDecimal(\"0\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn hourlyAverage;\r\n\t}", "public void printHourlyCounts()\n {\n System.out.println(\"Hr: Count\");\n for(int hour = 0; hour < hourCounts.length; hour++) {\n System.out.println(hour + \": \" + hourCounts[hour]);\n }\n }", "@Override\n\tpublic HourRegistration getHours(Long person_id, LocalDate date) {\n\t\treturn null;\n \t}", "public int getHours() {\r\n return FormatUtils.uint8ToInt(mHours);\r\n }", "public Integer getHour() {\n return hour;\n }", "Integer getStartHour();", "public List<LocalDateTime> getAllTimes() {\n\t\tList<LocalDateTime> allTimes = new ArrayList<LocalDateTime>();\n\t\tallTimes.add(shiftStartTime);\n\t\tallTimes.add(bedtime);\n\t\tallTimes.add(shiftEndTime);\n\t\treturn allTimes;\n\t}", "public org.landxml.schema.landXML11.TimingDocument.Timing[] getTimingArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(TIMING$2, targetList);\r\n org.landxml.schema.landXML11.TimingDocument.Timing[] result = new org.landxml.schema.landXML11.TimingDocument.Timing[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public WorkHours() {\n //default if not yet initialised\n this._startingHour=0.00;\n this._endingHour=0.00;\n }", "public java.lang.Object[] getTimeLimitAsArray();", "java.lang.String getBusinesshours();", "public TimeEntry[] getTimeEntryArray(SpentOn spentOn)\n throws RedmineException\n {\n return getTimeEntryArray(ID_ANY,ID_ANY,spentOn);\n }", "public static String[] validateHours(String hours) {\n\tString[] hourString=new String[2];\r\n\tStringTokenizer st=new StringTokenizer(hours,\"-\");\r\n\ttry{\r\n\t\thourString[0]=st.nextToken();\r\n\t\thourString[1]=st.nextToken();\r\n\t}\r\n\tcatch(Exception e){\r\n\t\tSystem.out.println(\"Hours are not proper:\");\r\n\t\thourString[0]=null;\r\n\t\treturn hourString;\r\n\t}\r\n\tboolean validHour=validInteger(hourString[0]);\r\n\tif(!validHour || hourString[0].length()!=4){\r\n\t\tSystem.out.println(\"Invalid Start Time\");\r\n\t\thourString[0]=null;\r\n\t\treturn hourString;\r\n\t}\r\n\tvalidHour=validInteger(hourString[1]);\r\n\tif(!validHour || hourString[1].length()!=4){\r\n\t\tSystem.out.println(\"Invalid End Time Time\");\r\n\t\thourString[0]=null;\r\n\t\treturn hourString;\r\n\t}\r\n\tString time=hourString[0].substring(0, 2)+\":\"+hourString[0].substring(2, 4);\r\n\thourString[0]=time;\r\n\tSystem.out.println(\"Start Time : \"+time);\r\n\ttime=null;\r\n\ttime=hourString[1].substring(0, 2)+\":\"+hourString[1].substring(2, 4);\r\n\thourString[1]=time;\r\n\treturn hourString;\r\n}", "public int[] getMinutes() {\n return minutes;\n }", "public double getPreferredConsecutiveHours();", "public String displayHours() {\n String hrs=day+\" Hours: \" +getStartHours()+ \" to \"+get_endingHour();\n return hrs;\n }", "public ArrayList getDayArray() {\r\n return dayArray; \r\n }", "public String getWorkinghours() {\n int seconds = workinghours % 60;\n int minutes = (workinghours / 60) % 60;\n int hours = (workinghours / 60) / 60;\n String secs;\n String mins;\n String hourse;\n\n if (seconds < 10) {\n secs = \":0\" + seconds;\n } else {\n secs = \":\" + seconds;\n }\n if (minutes < 10) {\n mins = \":0\" + minutes;\n } else {\n mins = \":\" + minutes;\n }\n if (hours < 10) {\n hourse = \"0\" + hours;\n } else {\n hourse = \"\" + hours;\n }\n return hourse + mins + secs;\n }", "@Override\r\n\tpublic Map<String, double[]> getHallAttendance() {\n\t\tMap<String, double[]> result = new HashMap<String, double[]>();\r\n\t\tdouble[] hall1 = new double[7];\r\n\t\tdouble[] hall2 = new double[7];\r\n\t\tdouble[] hall3 = new double[7];\r\n\t\tDate date = DateUtil.getCurrentDate();\r\n\t\tCinemaCondition cinemaCondition = cinemaConditionDao.getByDate(date);\r\n\t\tif (cinemaCondition!=null) {\r\n\t\t\thall1[0] = (double)cinemaCondition.getHall1UsedCount()/cinemaCondition.getHall1()*100;\r\n\t\t\thall2[0] = (double)cinemaCondition.getHall2UsedCount()/cinemaCondition.getHall2()*100;\r\n\t\t\thall3[0] = (double)cinemaCondition.getHall3UsedCount()/cinemaCondition.getHall3()*100;\t\t\r\n\t\t}\r\n\r\n\t\tfor(int i=0;i<6;i++){\r\n\t\t\tdate = DateUtil.getDayBefore(date);\r\n\t\t\tcinemaCondition = cinemaConditionDao.getByDate(date);\r\n\t\t\tif (cinemaCondition!=null) {\r\n\t\t\t\thall1[i+1] = (double)cinemaCondition.getHall1UsedCount()/cinemaCondition.getHall1()*100;\r\n\t\t\t\thall2[i+1] = (double)cinemaCondition.getHall2UsedCount()/cinemaCondition.getHall2()*100;\r\n\t\t\t\thall3[i+1] = (double)cinemaCondition.getHall3UsedCount()/cinemaCondition.getHall3()*100;\r\n\t\t\t}\r\n\t\t}\r\n\t\tresult.put(\"一号影厅\", hall1);\r\n\t\tresult.put(\"二号影厅\", hall2);\r\n\t\tresult.put(\"三号影厅\", hall3);\r\n\t\t\r\n\t\treturn result;\r\n\t}", "@Override\n public Long getRunningTimeInHours() {\n return null;\n }", "public ArrayList<Booking> getBookings(int time,String date){\n ArrayList<Booking>Hours=new ArrayList<>();\n for(int i=0;i<Schedule.size();++i){\n Booking temp=Schedule.get(i); \n String Day=temp.getDate();\n int Datevalue=Integer.parseInt(Day.substring(8,10));\n int Value=Integer.parseInt(date);\n if(time<10) {\n if (temp.getTime().substring(0, 2).equals(\"0\"+time) && Datevalue==Value){\n Hours.add(temp);\n }\n }\n else{\n if (temp.getTime().substring(0, 2).equals(\"\"+time) && Datevalue==Value){\n Hours.add(temp);\n }\n }\n }\n return Hours;\n }", "public int getLogHour(int index)\n {\n return m_Log.get(index).getHour();\n }", "public ArrayList<HashMap<String, String>> getParsedItems(){\r\n try{\r\n JSONObject jsonObject = new JSONObject(parseJSON());\r\n JSONArray jsonArray1 = jsonObject.getJSONArray(\"monday\");\r\n parsedOpeninghoursArrayList = parseJSONArray(jsonArray1, \"Monday\");\r\n JSONArray jsonArray2 = jsonObject.getJSONArray(\"tuesday\");\r\n parsedOpeninghoursArrayList = (parseJSONArray(jsonArray2, \"Tuesday\"));\r\n JSONArray jsonArray3 = jsonObject.getJSONArray(\"wednesday\");\r\n parsedOpeninghoursArrayList = parseJSONArray(jsonArray3, \"Wednesday\");\r\n JSONArray jsonArray4 = jsonObject.getJSONArray(\"thursday\");\r\n parsedOpeninghoursArrayList = parseJSONArray(jsonArray4,\"Thursday\");\r\n JSONArray jsonArray5 = jsonObject.getJSONArray(\"friday\");\r\n parsedOpeninghoursArrayList = parseJSONArray(jsonArray5, \"Friday\");\r\n JSONArray jsonArray6 = jsonObject.getJSONArray(\"saturday\");\r\n parsedOpeninghoursArrayList = parseJSONArray(jsonArray6, \"Saturday\");\r\n JSONArray jsonArray7 = jsonObject.getJSONArray(\"sunday\");\r\n parsedOpeninghoursArrayList = parseJSONArray(jsonArray7, \"Sunday\");\r\n }catch (JSONException e){\r\n e.printStackTrace();\r\n Log.e(TAG, \"Json parsing error: \" + e.getMessage());\r\n }\r\n return parsedOpeninghoursArrayList;\r\n }", "public static int [] vibCalc(int hour, int minute){\r\n// Log.i(\"HOUR\",String.valueOf(hour));\r\n// Log.i(\"MINUTE\",String.valueOf(minute));\r\n\r\n int [] vibCount = new int [3];\r\n vibCount[0] = hour;\r\n\r\n //int hourNum = hour;\r\n int minuteLong = minute / 10;\r\n vibCount[1] = minuteLong;\r\n int minuteShort = minute % 10;\r\n vibCount[2] = minuteShort;\r\n\r\n return vibCount;\r\n }", "@Override\n public String getSavingsHours() {\n\n final String savingsHrs = getElement(getDriver(), By.className(SAVINGS_HOURS), TINY_TIMEOUT)\n .getText();\n setLogString(\"Savings Hours:\" + savingsHrs, true, CustomLogLevel.HIGH);\n return savingsHrs.substring(savingsHrs.indexOf(\"(\") + 1, savingsHrs.indexOf(\"h\"));\n }", "public Hai[] getHais() {\n\t\treturn m_hais;\n\t}", "public int[] getHR(int trackid)\n {\n String hrcompoststring;\n\n Cursor res = db.rawQuery( \"select BULKHR from TRACKDATA where TRACKID=\"+trackid+\"\", null );\n int id[] = new int[res.getCount()];\n res.moveToFirst();\n hrcompoststring= res.getString(res.getColumnIndex(\"BULKHR\"));\n String[] hrcompost=hrcompoststring.split(\";\");\n int[] hrlist = new int[hrcompost.length];\n int j = 0;\n for (int i = 0; i < hrcompost.length; i++) {\n String hrlist_sub[]= hrcompost[i].split(\",\");\n\n if(i == 0) {\n hrlist[j] = Integer.parseInt(hrlist_sub[1]);\n }\n else\n {\n int previous=hrlist[j-1];\n\n int diff=Integer.parseInt(hrlist_sub[1]);\n hrlist[j] = previous+diff;\n }\n j++;\n\n }\n res.close();\n\n return hrlist;\n }", "public Integer getHour() {\n\t\treturn hour;\n\t}", "public List<SwipeDetailResult> calEmpWorkHours(List<SwipeDetails> list) {\n\t\tint count = 0;\n\t\tMap<String, List<SwipeDetails>> map = splitListByDate(list);\n\t\tList<SwipeDetailResult> resultList = new ArrayList<SwipeDetailResult>();\n\t\tList<String> keyList = new ArrayList<>();\n\t\t// Map<String, List<SwipeDetails>> cloneMap = map;\n\t\tfor (Map.Entry<String, List<SwipeDetails>> entry : map.entrySet()) {\n\t\t\t// keyList.add(entry.getKey());\n\t\t\tif ((count < map.size() - 1) || map.size() == 1) {\n\n\t\t\t\tSwipeDetailResult reult = findStartEndTimeings(map, keyList);\n\t\t\t\t// cloneMap.remove(entry.getKey());\n\t\t\t\tcount++;\n\t\t\t\tresultList.add(reult);\n\t\t\t\t// break;\n\t\t\t}\n\t\t}\n\n\t\treturn resultList;\n\t}", "public TreeSet<ApplianceTimedEvent> getUsageHours() {\n\n return usageHours;\n }", "public String getCurrentHours() {\n\t\t\t\t// DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\n\t\t\t\t// need to change after the date format is decided\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public java.lang.Object getEstimatedHours() {\n return estimatedHours;\n }", "public void analyzeHourlyData()\n {\n while(reader.hasNext()) {\n LogEntry entry = reader.next();\n int hour = entry.getHour();\n hourCounts[hour]++;\n }\n }", "public double totalHours(){\n return (this._startingHour - this._endingHour);\n }", "public int getTotalHours() {\r\n int totalHours = 0;\r\n // For each day of the week\r\n for (int d = 0; d < 5; d++) {\r\n int sectionStart = 0;\r\n // Find first hour that != 0\r\n for (int h = 0; h < 13; h++) {\r\n if (weekData[d][h] != 0) {\r\n sectionStart = h;\r\n break;\r\n }\r\n }\r\n // Iterate in reverse to find the last hour that != 0\r\n for (int h = 12; h >= 0; h--) {\r\n if (weekData[d][h] != 0) {\r\n // Add the difference to the total\r\n totalHours += h-sectionStart+1;\r\n break;\r\n }\r\n }\r\n }\r\n return totalHours;\r\n }", "public int getHour() {\n\t\treturn hour;\n\t}", "public int getHour() {\n\t\treturn hour;\n\t}", "static int getHour(byte[] bytes) {\n if (HOUR_POS < bytes.length * 8) {\n return readBits(bytes, HOUR_POS, HOUR_BITS);\n }\n return 0;\n }", "Integer getEndHour();", "public String getWorkHours() {\r\n\t\treturn workHours;\r\n\t}", "public ArrayList<Time> getTimes() {\n\t\treturn times;\n\t}", "private void generatePopularHours() {\r\n double h = Math.random() * 10;\r\n String hrs = ((int)h) + \"\";\r\n }", "public void workingHours(String monitoringText) {\r\n Path filePath = Paths.get(monitoringText);\r\n String[] lines = ReadFromFile.readFile(filePath.toAbsolutePath().toString());\r\n for (String line : lines) {\r\n String[] line1 = line.split(\"\\t\");\r\n if (line1[0].equals(registerNumber)) {\r\n workingHours.add(Integer.parseInt(line1[1]));\r\n workingHours.add(Integer.parseInt(line1[2]));\r\n workingHours.add(Integer.parseInt(line1[3]));\r\n workingHours.add(Integer.parseInt(line1[4]));\r\n }\r\n }\r\n }", "public double getHour() {\n\t\treturn this.hour;\n\t}", "public int[] VerifierPlagesHorairesTournee() {\r\n\t\tint nbLivraisons = getListeLivraison().size();\r\n\t\tint[] tableauPlageHoraire = new int[nbLivraisons]; // initialiser taille\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// a nombre de liv\r\n\r\n\t\tfor (int i = 0; i < nbLivraisons; i++) {\r\n\t\t\tint valeurPH = VerifierPlagesHorairesUneLiv(getListeLivraison().get(i));\r\n\t\t\ttableauPlageHoraire[i] = valeurPH;\r\n\t\t}\r\n\r\n\t\treturn tableauPlageHoraire;\r\n\t}", "public Integer[][] getAll() {\r\n return weekData;\r\n }", "public HoursList() {\n // Required empty public constructor\n }", "public String getOperatingHours() {\n return mOperatingHours;\n }", "@Override\n public int hashCode() {\n int result = 17;\n result = 31 * result + (isPM ? 1 : 0);\n result = 31 * result + minute;\n result = 31 * result + hour;\n return result;\n }", "public int getHour() {\n return hour; // returns the appointment's hour in military time\n }", "public final flipsParser.hour_return hour() throws RecognitionException {\n flipsParser.hour_return retval = new flipsParser.hour_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token char_literal374=null;\n Token string_literal375=null;\n Token string_literal376=null;\n Token string_literal377=null;\n Token string_literal378=null;\n\n CommonTree char_literal374_tree=null;\n CommonTree string_literal375_tree=null;\n CommonTree string_literal376_tree=null;\n CommonTree string_literal377_tree=null;\n CommonTree string_literal378_tree=null;\n RewriteRuleTokenStream stream_250=new RewriteRuleTokenStream(adaptor,\"token 250\");\n RewriteRuleTokenStream stream_251=new RewriteRuleTokenStream(adaptor,\"token 251\");\n RewriteRuleTokenStream stream_252=new RewriteRuleTokenStream(adaptor,\"token 252\");\n RewriteRuleTokenStream stream_249=new RewriteRuleTokenStream(adaptor,\"token 249\");\n RewriteRuleTokenStream stream_253=new RewriteRuleTokenStream(adaptor,\"token 253\");\n\n try {\n // flips.g:559:2: ( ( 'h' | 'hr' | 'hrs' | 'hour' | 'hours' ) -> HOUR )\n // flips.g:559:4: ( 'h' | 'hr' | 'hrs' | 'hour' | 'hours' )\n {\n // flips.g:559:4: ( 'h' | 'hr' | 'hrs' | 'hour' | 'hours' )\n int alt143=5;\n switch ( input.LA(1) ) {\n case 249:\n {\n alt143=1;\n }\n break;\n case 250:\n {\n alt143=2;\n }\n break;\n case 251:\n {\n alt143=3;\n }\n break;\n case 252:\n {\n alt143=4;\n }\n break;\n case 253:\n {\n alt143=5;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 143, 0, input);\n\n throw nvae;\n }\n\n switch (alt143) {\n case 1 :\n // flips.g:559:5: 'h'\n {\n char_literal374=(Token)match(input,249,FOLLOW_249_in_hour3249); \n stream_249.add(char_literal374);\n\n\n }\n break;\n case 2 :\n // flips.g:559:9: 'hr'\n {\n string_literal375=(Token)match(input,250,FOLLOW_250_in_hour3251); \n stream_250.add(string_literal375);\n\n\n }\n break;\n case 3 :\n // flips.g:559:14: 'hrs'\n {\n string_literal376=(Token)match(input,251,FOLLOW_251_in_hour3253); \n stream_251.add(string_literal376);\n\n\n }\n break;\n case 4 :\n // flips.g:559:20: 'hour'\n {\n string_literal377=(Token)match(input,252,FOLLOW_252_in_hour3255); \n stream_252.add(string_literal377);\n\n\n }\n break;\n case 5 :\n // flips.g:559:27: 'hours'\n {\n string_literal378=(Token)match(input,253,FOLLOW_253_in_hour3257); \n stream_253.add(string_literal378);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: \n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 560:2: -> HOUR\n {\n adaptor.addChild(root_0, (CommonTree)adaptor.create(HOUR, \"HOUR\"));\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public SpinnerNumberModel getHoursModel() {\n\treturn this.hoursModel;\n }", "public void setHours(int x, double h) {\r\n hours[x] = h;\r\n }", "public static String[] retornaDias(String time){\n String[] split = time.split(\"T\");\n dataAux = split[0];\n split = split[1].split(\"Z\");\n data = dataAux.split(\"-\");\n return data;\n }", "public Map<String, List<TimePeriodModel>> getAllTimePeriods();", "@Override\n\tpublic List<TimeInit> getAllTimeInit() {\n\t\treturn timeInitDao.getAllTimeInit();\n\t}", "@Override\n\tpublic List getTime() {\n\t\treturn null;\n\t}", "float hour() {\n switch (this) {\n case NORTH_4M:\n case NORTH_16M:\n case SOUTH_4M:\n case SOUTH_16M:\n return 0f;\n case WILTSHIRE_4M:\n case WILTSHIRE_16M:\n /*\n * At 10h33m, Orion is about to set in the west and the\n * Pointers of the Big Dipper are near the meridian.\n */\n return 10.55f;\n }\n throw new IllegalStateException();\n }", "public ArrayList<LinkedList<Inhabitant>> allinhabDeparture() {\n ArrayList<LinkedList<Inhabitant>> allinhabDeparture =new ArrayList<LinkedList<Inhabitant>>(288);\n LinkedList<Inhabitant> temp;\n\n for(int i=0;i<287;i++) {\n temp=new LinkedList<Inhabitant>();\n allinhabDeparture.add(i, temp);\n }\n Iterator it = this.boardBuilding.housePopulation.iterator();\n while (it.hasNext()) {\n Inhabitant curin = (Inhabitant)it.next();\n int h=curin.getworkingHour();\n int m=curin.getworkingMinute();\n int t=60*h+m;\n int q=(int)t/5;\n allinhabDeparture.get(q).add(curin);\n }\n return allinhabDeparture;\n }", "public ArrayList<TimeLineEvent> getTimeLineEvents() {\n\t\treturn info;\n\t}", "public HourlyDetail() {\n\t\tthis.numberOfShiftBeginning = 0;\n\t\tthis.numberOfShiftEnding = 0;\n\t\tthis.costPerHour = 0;\n\t}", "private ArrayList<int[][]> getTimes(String name, ArrayList<String> subNames) {\n ArrayList<int[][]> subTimes = new ArrayList<>();\n for (String sub : subNames) {\n int[] startTime = obtainTimeSafely(name, sub, \"start?\");\n int[] endTime = obtainTimeSafely(name, sub, \"end?\");\n int[] days = obtainDaysSafely(name, sub);\n subTimes.add(new int[][]{startTime, endTime, days});\n }\n return subTimes;\n }", "@Override\r\n\tpublic int[] getDayPeople() {\n\t\tint[] result = new int[7];\r\n\t\tDate date = DateUtil.getCurrentDate();\r\n\t\tresult[0] = cinemaConditionDao.getDayCount(date);\r\n\t\tfor(int i=0;i<6;i++){\r\n\t\t\tdate = DateUtil.getDayBefore(date);\r\n\t\t\tresult[i+1] = cinemaConditionDao.getDayCount(date);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public String toString() {\n return hour+\" \"+minute;\r\n }", "public List<Integer> getByMinute() {\n\t\treturn byMinute;\n\t}", "protected void runEachHour() {\n \n }", "public int getHour() {\n\t\treturn this.hour;\n\t}", "private Double[] getDayValue24(DayEM dayEm) {\n\n\t Double[] dayValues = new Double[24];\n\n\t /* OPF-610 정규화 관련 처리로 인한 주석\n\t dayValues[0] = (dayEm.getValue_00() == null ? 0 : dayEm.getValue_00());\n\t dayValues[1] = (dayEm.getValue_01() == null ? 0 : dayEm.getValue_01());\n\t dayValues[2] = (dayEm.getValue_02() == null ? 0 : dayEm.getValue_02());\n\t dayValues[3] = (dayEm.getValue_03() == null ? 0 : dayEm.getValue_03());\n\t dayValues[4] = (dayEm.getValue_04() == null ? 0 : dayEm.getValue_04());\n\t dayValues[5] = (dayEm.getValue_05() == null ? 0 : dayEm.getValue_05());\n\t dayValues[6] = (dayEm.getValue_06() == null ? 0 : dayEm.getValue_06());\n\t dayValues[7] = (dayEm.getValue_07() == null ? 0 : dayEm.getValue_07());\n\t dayValues[8] = (dayEm.getValue_08() == null ? 0 : dayEm.getValue_08());\n\t dayValues[9] = (dayEm.getValue_09() == null ? 0 : dayEm.getValue_09());\n\t dayValues[10] = (dayEm.getValue_10() == null ? 0 : dayEm.getValue_10());\n\t dayValues[11] = (dayEm.getValue_11() == null ? 0 : dayEm.getValue_11());\n\t dayValues[12] = (dayEm.getValue_12() == null ? 0 : dayEm.getValue_12());\n\t dayValues[13] = (dayEm.getValue_13() == null ? 0 : dayEm.getValue_13());\n\t dayValues[14] = (dayEm.getValue_14() == null ? 0 : dayEm.getValue_14());\n\t dayValues[15] = (dayEm.getValue_15() == null ? 0 : dayEm.getValue_15());\n\t dayValues[16] = (dayEm.getValue_16() == null ? 0 : dayEm.getValue_16());\n\t dayValues[17] = (dayEm.getValue_17() == null ? 0 : dayEm.getValue_17());\n\t dayValues[18] = (dayEm.getValue_18() == null ? 0 : dayEm.getValue_18());\n\t dayValues[19] = (dayEm.getValue_19() == null ? 0 : dayEm.getValue_19());\n\t dayValues[20] = (dayEm.getValue_20() == null ? 0 : dayEm.getValue_20());\n\t dayValues[21] = (dayEm.getValue_21() == null ? 0 : dayEm.getValue_21());\n\t dayValues[22] = (dayEm.getValue_22() == null ? 0 : dayEm.getValue_22());\n\t dayValues[23] = (dayEm.getValue_23() == null ? 0 : dayEm.getValue_23());\n\t\t\t*/\n\t \n\t return dayValues;\n\t }", "public int[] getDataMsgPerDay() {\n\t\tint[] result = new int[24];\n\t\tint it = 0;\n\t\tfor (LocalTime hour = LocalTime.now().with(LocalTime.MIN); hour\n\t\t\t\t.isBefore(LocalTime.now().with(LocalTime.MAX).minusHours(1)); hour = hour.plusHours(1)) {\n\t\t\tLocalTime hourOfDay = hour;\n\t\t\tcontador = 0;\n\t\t\tcurrentUser.getContacts().forEach(contact -> {\n\t\t\t\tcontador += contact.getMessages().stream()\n\t\t\t\t\t\t.filter(m -> (m.getTime().toLocalTime().getHour() == hourOfDay.getHour())\n\t\t\t\t\t\t\t\t&& (m.getSpeaker() == currentUser.getId()))\n\t\t\t\t\t\t.count();\n\t\t\t});\n\t\t\tresult[it] = contador;\n\t\t\tit++;\n\t\t}\n\t\treturn result;\n\t}" ]
[ "0.7909942", "0.78785855", "0.6969097", "0.6758778", "0.67227626", "0.66185373", "0.6552335", "0.6552335", "0.63705194", "0.63459295", "0.62921786", "0.6236457", "0.6172643", "0.6158271", "0.61441636", "0.61402273", "0.6075288", "0.6001241", "0.5982791", "0.5959605", "0.5958237", "0.5933669", "0.5928791", "0.59148824", "0.5897743", "0.58936507", "0.58828205", "0.58807945", "0.58766913", "0.5871772", "0.58632326", "0.58482826", "0.5846712", "0.58098596", "0.57752764", "0.57742625", "0.5764485", "0.5749596", "0.5699836", "0.56991506", "0.56988436", "0.5696211", "0.5691488", "0.56893754", "0.5681553", "0.5672221", "0.56622595", "0.56571835", "0.56490326", "0.5635177", "0.5628777", "0.56237423", "0.5614895", "0.5612702", "0.5606188", "0.5602805", "0.55958444", "0.55887645", "0.55792415", "0.5576969", "0.55679446", "0.55606353", "0.5539514", "0.55388486", "0.5524728", "0.54896206", "0.54886854", "0.5485916", "0.5485916", "0.54829127", "0.54824716", "0.5458054", "0.5442832", "0.54152167", "0.54089296", "0.53851116", "0.5382333", "0.5370325", "0.5370014", "0.5367538", "0.53665864", "0.53648245", "0.5362875", "0.5343838", "0.5340876", "0.53380996", "0.5330915", "0.5328539", "0.53241855", "0.532383", "0.531815", "0.5313407", "0.53111947", "0.53071004", "0.53035736", "0.52985895", "0.5296867", "0.52963173", "0.5295784", "0.5293649", "0.52931136" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7904536", "0.78052336", "0.7766536", "0.7727363", "0.76318616", "0.7621916", "0.7584545", "0.7530609", "0.74878335", "0.74571276", "0.74571276", "0.7438656", "0.7422694", "0.7403604", "0.73918706", "0.7387049", "0.7379379", "0.73706305", "0.7362634", "0.7356091", "0.7345742", "0.7341655", "0.7330208", "0.73284286", "0.7325726", "0.7319205", "0.731691", "0.73137385", "0.7304247", "0.7304247", "0.73017776", "0.7298307", "0.72933966", "0.7286999", "0.7283511", "0.72811604", "0.72787315", "0.7259994", "0.7259994", "0.7259994", "0.72595567", "0.72595537", "0.72501904", "0.7224887", "0.7219672", "0.7217532", "0.72043973", "0.72010916", "0.7199519", "0.71928704", "0.71855384", "0.7177209", "0.71689284", "0.7167426", "0.715412", "0.71537405", "0.7135554", "0.7134872", "0.7134872", "0.7129713", "0.7129041", "0.71240187", "0.7123551", "0.7123167", "0.71221936", "0.71173894", "0.71173894", "0.71173894", "0.71173894", "0.71170884", "0.7116871", "0.7116271", "0.7114722", "0.7112311", "0.7109584", "0.7108896", "0.7105745", "0.70993924", "0.70979136", "0.7095834", "0.70936936", "0.70936936", "0.70863414", "0.7083095", "0.7081166", "0.70801973", "0.7073687", "0.7068324", "0.7061727", "0.7060408", "0.7060199", "0.7051346", "0.70376796", "0.70376796", "0.7035851", "0.70354784", "0.70354784", "0.7032029", "0.70307976", "0.70294225", "0.70193213" ]
0.0
-1
constructor for damage, heal
public DeckAbility(int amount, Destination destination, Choice choice, AbilityTarget target, AbilityType type) { this.calculation = new Calculation(); this.calculation.setTarget(Calculation.CountTarget.NULL); this.calculation.setOperator(Calculation.Operator.NULL); this.amount = amount; this.destination = destination; this.choice = choice; this.target = target; this.type = type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void heal(Heros h);", "public Shot(int damage) {\n\t\tthis.damage = damage;\n\t}", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "public EmergencyTreatment(int heal) {\n super(heal);\n }", "public Wand() {\n damage = 5;\n damageType = \"Magic\";\n }", "public Sheep()\n {\n super(\"Sheep\",3,2,0); \n \n // tagline = \"Whatever\";\n maxHealth = 5;\n currentHealth = maxHealth;\n equip(new Cloth());\n equip(new SheepClaws());\n \n \n \n engaged = false;\n aggression = 1;\n special = 0;\n hostileRange = 2;\n }", "public Potion()\r\n\t{\r\n\t\tsuper(\"Potion\");\r\n\t\thealthRecovery = 30;\r\n\t}", "public Charmander(World w)\n {\n //TODO (48): Add a third parameter of Fire to this super line\n super(700, 1);\n getImage().scale(150, 100);\n w.addObject( getHealthBar() , 300, w.getHeight() - 50 );\n }", "Hero()\n\t{\n\t\t\n\t\tsuper(152,500,97,124);\n\t\tlife = 3;\n\t\tdoubleFire = 0;\n\t\t\n\t}", "public void heal1()\r\n {\r\n this.health = 700;\r\n Story.healText1();\r\n }", "public void heal2()\r\n {\r\n this.health = 900;\r\n Story.healText2();\r\n }", "public void heal3()\r\n {\r\n this.health = 1200;\r\n Story.healText3();\r\n }", "public Mage() {\r\n\thp = 75;\r\n\tstrength = 50;\r\n\tdefense = 30;\r\n\tattack = .4;\r\n\tcrit=.3;\r\n\tevade=0;\r\n }", "@Override\n\tpublic void damage(float f) {\n\t\t\n\t}", "public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}", "@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}", "public StarAbilityHeal() {\n\t\t\n\t\tthis.setMaxLevel(4);\n\t\tthis.setEffectable(Effectable.Heal);\n\t\t\n\t}", "public Weapon()\n {\n name = \"None\";\n speed = 2;\n damage = 1;\n range = 1;\n }", "public PureHeal(Player p) {\n\t\tsuper(\"Pure Heal\", p);\n\t}", "public Weapon(String name, int weaponDamage) \n\t{\n\t\tsuper(name);\n\t\tif(weaponDamage > 0) \n\t\t{\n\t\t\tthis.weaponDamage = weaponDamage;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tthis.weaponDamage = 1;\n\t\t}\n\t}", "public HealthyObject(String name, String des, int u, int p)\n \n {\n // initialisation des variables d'instance\n super(name, des, u);\n pointsHealthy = p;\n }", "public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }", "public Mage (double h, double d, double a, double p, double c)\r\n\t{\r\n\t\thealth = h;\r\n\t\tdmg = d;\r\n\t\tnumber++;\r\n\t\taggro = a;\r\n\t\tpRange = p;\r\n\t\tcrit = c;\r\n\t}", "public EndGameAttackPotion() {\n super(\"SuperAttackPotion\", Main.END_GAME_ATTACK_POTION_AMP, Main.END_GAME_ATTACK_POTION);\n }", "public int giveDamage();", "public Attack(String name, int baseDamage, String description, EnergyCost energyCost, IEffect effect) {\n super(name,description,energyCost, effect);\n this.baseDamage = baseDamage;\n\n }", "public DwarfEnemy()\r\n\t{\r\n\t\tdamagePower = GameStatics.Enemies.Dwarf.damagePower;\r\n\t\tspeed = GameStatics.Enemies.Dwarf.speed;\r\n\t\thp = GameStatics.Enemies.Dwarf.initHp;\r\n\t}", "public void makeHero()\r\n { \r\n maxHealth = 100;\r\n health = maxHealth;\r\n }", "public SoldierEnemy(int health) {\n super(health);\n }", "private Weapon() {\n\t\t\tname = \"\";\n\t\t\tdamage = 0;\n\t\t\tcrippleDamage = 0;\n\t\t\tflavors = new HashMap<>();\n\t\t}", "public PotionEffect(PotionEffect paramwq)\r\n/* 35: */ {\r\n/* 36: 44 */ this.id = paramwq.id;\r\n/* 37: 45 */ this.duration = paramwq.duration;\r\n/* 38: 46 */ this.amplifier = paramwq.amplifier;\r\n/* 39: 47 */ this.ambient = paramwq.ambient;\r\n/* 40: 48 */ this.showParticles = paramwq.showParticles;\r\n/* 41: */ }", "void takeDamage(HeroDamage enemy1, HeroDamage enemy2);", "public Melee(ScrGame game, Player player){\n super();\n this.game = game;\n this.player = player;\n isPlayer = true;\n\n nSpray = 0;\n nShotsPerFire = 1;\n nAmmo = 1;\n nAmmoMax = nAmmo;\n }", "@Override\n\tpublic void heal(Hero... target) {\n\t\tsuper.heal(target);\n\t}", "public Hobbit(int x, int y, int health, int damage) {\n\t\tsuper(x, y);\n\t\tthis.health = health;\n\t\tthis.damage = damage;\n\t\tmaxCooldown = cooldown = GameConstants.HOBBIT_COOLDOWN;\n\t\trewardMana = GameConstants.HOBBIT_REWARD;\n\t\ttryLoad(new File(\"resources/images/hobbit_16p.png\"));\n\t}", "public WallAnt()\n {\n health = 4;\n cost = 4;\n }", "public Obrim(int strength, int armor, int hp){\n\t\tsuper(strength,armor, hp);\n\t}", "private void takeDamage(int damage){ health -= damage;}", "@Override\n\tpublic void takeDamage(double damage) {\n\n\t}", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "public Weapon(WeaponType type, int level) {\n \tthis.effects = new ArrayList<>();\n this.type = type;\n this.level = level;\n this.effects.add(new AttackEffect(getWeaponDamage(), getWeaponSpeed(), getWeaponRange(), Target.SELF));\n }", "public void takeDamage(int damage);", "public IronArmour()\n {\n name = \"iron armour\";\n hitpoints = 10;\n damageBlocked = 5;\n }", "public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }", "public SandAttack() {\n super(6, \"Sand Attack\", SkillDescription.SAND_ATTACK, 15, Pokemon.Type.GROUND, 100);\n effects.add(new AccuracyEffect(SecondaryEffect.Target.ENEMY, 1,\n SecondaryEffect.StatDirection.DECREASE));\n }", "public Orc(int health, int damage, String damageInfo, String name) {\n super(health, damage, damageInfo, name);\n }", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "public SniperEnemy()\n { \n scoreBoost = 15;\n moneyBoost = 300;\n healthPoints = 500; \n fireRate = 45; \n movementCounter = 20;\n movementMod = 20;\n }", "public Weapon(String name, int price, Level minLevel, double damage, int numHands) {\n super(name, price, minLevel);\n\n // Validate input\n Validations.nonNegative(damage, \"damage\");\n Validations.nonNegative(numHands, \"numHands\");\n\n // Weapon specific attributes\n this.damage = damage;\n this.numHands = numHands;\n }", "public AbilityEffect() {\n\t\tsuper();\n\t}", "public Blocks(int h)\n {\n health=h;\n worth=h;\n setImage(colors[health-1]);\n }", "public Unit (int hp, int str, int mag, int def, int x, int y) {\n this.stats = new Stats(hp, str, mag, def);\n this.position = new Position(x, y);\n }", "@Override\r\n\tpublic void heal() {\n\t\tSystem.out.println(\"Paladin \" + super.getName() + \" heals for 50 points.\");\r\n\t\tsuper.setHitPoints(super.getHitPoints() + 50);\r\n\t}", "public Character(int startingHealth, int damageValue)\n {\n currentHealth = startingHealth;\n attackDamage = damageValue;\n }", "public interface Damage {\n}", "public Unit (int hp, int str, int mag, int def, Position p) {\n this.stats = new Stats(hp, str, mag, def);\n this.position = p;\n }", "public Weapon(String n, int spd, int dmg, int rng)\n {\n name = n;\n speed = spd;\n damage = dmg;\n range = rng;\n }", "public Creature(String name, String description, int hp, int dmg) {\r\n\t\tthis.name = name;\r\n\t\tthis.description = description;\r\n\t\tthis.hp = hp;\r\n\t\tthis.dmg = dmg;\r\n//\t\tthis.room = null;\r\n\t}", "public Rogue() {\r\n\t\tsuper();\r\n\t\tthis.name =\"Rogue\";\r\n\t\tthis.attackPower = 50;\r\n\t\tthis.maxHP = 35;\r\n\t\tthis.hp = this.maxHP;\r\n\t}", "@Override\n public void hp(){\n HP=50*nivel;\n }", "public Skill(String skillName, double skillDamage, int skillManaCost, double skillHeal){\n name = skillName;\n damage = skillDamage;\n manaCost = skillManaCost;\n heal = skillHeal;\n//sets up skills to return as their name.\n }", "public Weapon(HashMap<?, ?> hashMap) {\n\t\t// these attributes must be set\n\t\tsetName((String) hashMap.get(\"name\"));\n\t\tsetType((String) hashMap.get(\"type\"));\n\t\tsetRange(new Range((HashMap<?, ?>) hashMap.get(\"range\")));\n\n\t\t// dmg multiplicator default: 1.0\n\n\t\t// default ist -1\n\t\tsetSpeed(hashMap.containsKey(\"speed\") ? Integer\n\t\t\t\t.parseInt((String) hashMap.get(\"speed\")) : -1);\n\n\t\t// default false - no area damage\n\t\tsetArea(hashMap.containsKey(\"area\") ? Boolean\n\t\t\t\t.parseBoolean((String) hashMap.get(\"area\")) : false);\n\n\t\t// default breakthrough 0\n\t\tsetBreakthrough(hashMap.containsKey(\"breakthrough\") ? Integer\n\t\t\t\t.parseInt((String) hashMap.get(\"breakthrough\")) : 0);\n\n\t\t// only_rare default false\n\t\tsetOnly_rare(hashMap.containsKey(\"only_rare\") ? Boolean\n\t\t\t\t.parseBoolean((String) hashMap.get(\"only_rare\")) : false);\n\n\t\t// boss_drop default false\n\t\tsetBoss_drop(hashMap.containsKey(\"boss_drop\") ? Boolean\n\t\t\t\t.parseBoolean((String) hashMap.get(\"boss_drop\")) : false);\n\n\t\tdmg = (float) (hashMap.containsKey(\"dmg\") ? Float.parseFloat((String) hashMap\n\t\t\t\t.get(\"dmg\")) : 1.0F);\n\t\t\n\t\t//sets random Count at creation\n\t\tRandom randomGenerator = new Random();\n\t\tsetCount(randomGenerator.nextInt(79) + 21);\n\t\tif (type.equals(WeaponType.melee.toString()))\n\t\t\tsetCount(1);\n\t}", "public float getHungerDamage();", "public Shrub() {\n\t_hitPts = 100;\n\t_strength = 50;\n\t_defense = 40;\n\t_attack = .4;\n }", "private void selfHeal() {\n\t\t\n\t\t//IF the Droid is carrying an item...\n\t\tif (this.getItemCarried() != null){\n\t\t\t\n\t\t\t//If the item is an oil can...\n\t\t\tif (this.getItemCarried().getShortDescription() == \"an oil can\" ) {\n\t\t\t\n\t\t\t\t//If the Droids health is LOWER than half...\n\t\t\t\tif((this.getInitialHP()/2) > this.getHitpoints()) {\n\t\t\t\t\tsay(this.getShortDescription() + \" is at or below half HP. \"\n\t\t\t\t\t\t\t+ \" Healing itself...\");\n\t\t\t\t\t\n\t\t\t\t\t//Implementing a new HealDroid method (Droid heals on itself)\n\t\t\t\t\t//public HealDroid(SWEntityInterface theTarget, MessageRenderer m) {\n\t\t\t\t\tHealDroid droidHeal = new HealDroid(this, messageRenderer);\n\t\t\t\t\t\n\t\t\t\t\tscheduler.schedule(droidHeal, this, 1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "public Lunge() {\n super(SkillFactory.LUNGE, \"Lunge\", SkillDescription.lunge, 15, Pokemon.Type.BUG,\n SkillCategory.PHYSICAL, 100, 80, 1, 1.0);\n secondaryEffects.add(new AttackEffect(SecondaryEffect.Target.ENEMY, 1,\n SecondaryEffect.StatDirection.DECREASE));\n makesPhysicalContact = true;\n }", "public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }", "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "public void heal(float health) {\r\n \t\tthis.health += health;\r\n \t\tif(health > maxHealth) {\r\n \t\t\thealth = maxHealth;\r\n \t\t}\r\n \t}", "public void setHungerDamage(float hunger);", "public Tower(int price, double damage, double range, double x, double y,\n\t\t\tdouble angle, int cooldown, Image[] imgs){\n\t\tthis.price = price;\n\t\tthis.damage = damage;\n\t\tthis.range = range;\n\t\tthis.imgs = imgs;\n\t\tthis.image = 0;\n\t\tthis.img = imgs[image];\n\t\tthis.temp = new ArrayList<Movable>();\n\t\tthis.initCooldown = cooldown;\n\t\tthis.cooldown = 0;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.angle = angle;\n\t\tthis.level = 0;\n\t}", "public ShotgunWeapon() {\n description = \" Weapon: Shotgun has\";\n }", "public Weapon(Weapon weapon) \n\t{\n\t\tsuper(weapon.getName());\n\t\tweaponDamage = weapon.getWeaponDamage();\n\t}", "public void damage(Hero other) {\n this.weapon.knockBack(other, this.state, this.dir);\n }", "public Skill(Player player){\n this.player = player;\n this.name = player.name;\n this.intellect = player.intellect;\n this.defense = player.defense;\n this.attack = player.attack;\n this.weapon = player.weapon;\n this.armor = player.armor;\n this.defense = player.defense;\n\n }", "public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }", "public MagineerStrike() {\n super(ID, NAME, IMG, COST, DESCRIPTION, TYPE, COLOR, RARITY, TARGET);\n artistNames.add(\"Jake Berry\");\n flavorText = \"There is a reason that spears are one of the oldest weapons known to man. \" +\n \"You may not be a swordfighter, but at the very least you /will/ learn to use a spear.\";\n\n MagineerMod.logger.info(\"ID: \"+ID);\n MagineerMod.logger.info(\"cardStrings: \"+cardStrings);\n MagineerMod.logger.info(CardCrawlGame.languagePack);\n MagineerMod.logger.info(\"CardCrawlGame.languagePack: \"+CardCrawlGame.languagePack);\n\n\n // Aside from baseDamage/MagicNumber/Block there's also a few more.\n // Just type this.base and let intelliJ auto complete for you, or, go read up AbstractCard\n\n baseDamage = DAMAGE;\n\n this.tags.add(BaseModCardTags.BASIC_STRIKE); //Tag your strike, defend and form (Shadow form, demon form, echo form, etc.) cards so that they function correctly.\n this.tags.add(CardTags.STRIKE);\n\n cardArtLayers512.add(new RenderImageLayer(TextureLoader.getTexture(cardArt512+portraitFilename)));\n cardArtLayers1024.add(new RenderImageLayer(TextureLoader.getTexture(cardArt1024+portraitFilename)));\n\n actionList.add(new DamageDescAction(this));\n\n updateDescription();\n }", "public Hit() {\n }", "private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }", "void takeDamage(int points) {\n this.health -= points;\n }", "public Water_Hero(RefLinks refLink, float x, float y)\r\n {\r\n ///Apel al constructorului clasei de baza\r\n super(refLink, x,y, Character.DEFAULT_CREATURE_WIDTH, Character.DEFAULT_CREATURE_HEIGHT);\r\n\r\n ///Seteaza imaginea de start a eroului\r\n image = Assets.heroLeft;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea implicita(normala)\r\n normalBounds.x = 16;\r\n normalBounds.y = 16;\r\n normalBounds.width = 16;\r\n normalBounds.height = 32;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea de atac\r\n attackBounds.x = 10;\r\n attackBounds.y = 10;\r\n attackBounds.width = 38;\r\n attackBounds.height = 38;\r\n\r\n jumpingTimer = new Timer();\r\n\r\n lista_dinamic_element = new ArrayList<CollisionItem>();\r\n\r\n lista_static_element = new ArrayList<CollisionItem>();\r\n list_fire = new ArrayList<CollisionItem>();\r\n }", "public Weapon() {\n this(Weapon.defaultName, 0, new Level(0), 0, 0);\n }", "public Player(int h, int aF, int d, int lvl){\n\t\tthis.Health=h;\n\t\tthis.AttackForce=aF;\n\t\tthis.Defense=d;\n\t\tthis.Level=lvl;\n\t}", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "public ComboStrike() {\n\t\tattackCds1 = new Array<Float>();\n\t\tinit();\n\t\n\t}", "public EnemyGunBullet1() {\n super(DAMAGE, SPEED);\n setEnemyBullet(true);\n setShootSound(\"enemyShot.wav\");\n try {\n image = ImageIO.read(new File(\"res/images/tanks/bullets/enemyBullet1.png\"));\n }\n catch (IOException e) { }\n }", "public Level1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(560, 560, 1); \n prepare();\n gfs_level1 = new GreenfootSound(\"main.wav\");\n\n }", "public PenetratingShot() {\n super(ID, 1, CardType.ATTACK, CardRarity.COMMON, CardTarget.ENEMY);\n baseDamage = 10;\n }", "Sorcerer (String cName){\n name = cName;\n hp = 20;\n mana = 100; \n strength = 2;\n vitality = 4;\n energy = 10;\n }", "public int healHero(int i) {\n int heal;\n switch (i) {\n case 1:\n heal = rand.nextInt(4) + 1;\n HP.replenish(heal);\n return heal;\n case 2:\n heal = rand.nextInt(5) + 2;\n HP.replenish(heal);\n return heal;\n case 3:\n heal = rand.nextInt(6) + 3;\n HP.replenish(heal);\n return heal;\n case 4:\n heal = rand.nextInt(9) + 5;\n HP.replenish(heal);\n return heal;\n case 5: // healing hero to full\n HP.replenish(100);\n default:\n return 0;\n }\n }", "public void setDamage(double d) {\n damage = d;\n }", "public Orc(double attackStrength, double health) {\n\t\tsuper(attackStrength, health);\n\t\tthis.attackStrength = attackStrength;\n\t\tthis.health = health;\n\t}", "@Test\n public void useEffect() {\n \t//should normally run useItem method, but for testing it is not needed here.\n \tHealthEffect bombEff = (HealthEffect) bomb.getEffect().get(0);\n \tbombEff.applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP - 700);\n \tSpecial heal = new Special(SpecialType.HEALTHBLESS);\n \theal.getEffect().get(0).applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP);\n }", "public void setHealth(double h){\n health = h;\n }", "public Pokemon(int hp){\r\n this.hp = hp;\r\n }", "public Unit(String name, int calories, String side) {\n super(name);\n this.side = side;\n setStrength(calories);\n setTagged(false);\n bandanas = 1;\n // profile = new Profile();\n setInJail(false);\n column = -1;\n row = -1;\n challenges = 0;\n challengesWon = 0;\n rewards = new ArrayList<Reward>();\n }", "PlayingSquare giveDamage(int damage);" ]
[ "0.7026844", "0.698304", "0.68532354", "0.6852793", "0.68091184", "0.6808023", "0.67953515", "0.6781271", "0.67805886", "0.67598635", "0.67346597", "0.66630584", "0.66408676", "0.6635463", "0.66076374", "0.65796125", "0.65791905", "0.6568037", "0.6537938", "0.65169805", "0.64966416", "0.6487837", "0.6462017", "0.64342445", "0.6423682", "0.6419381", "0.6417263", "0.64097375", "0.63532406", "0.63439286", "0.6331255", "0.6330698", "0.6327802", "0.63276136", "0.631588", "0.6306988", "0.6263885", "0.62552345", "0.62469286", "0.624688", "0.6244807", "0.6239218", "0.6230372", "0.6215389", "0.6212844", "0.62091756", "0.6178124", "0.6163269", "0.6161643", "0.6144807", "0.6135096", "0.61326724", "0.6116014", "0.6102101", "0.61015475", "0.60993016", "0.60974646", "0.6087035", "0.60861003", "0.6085284", "0.6076162", "0.60760146", "0.6066617", "0.60641885", "0.6060627", "0.6044166", "0.60365105", "0.6036468", "0.60337526", "0.6029148", "0.6010719", "0.60031706", "0.5999027", "0.5994836", "0.59946644", "0.5987747", "0.5986303", "0.5961284", "0.5953382", "0.5935238", "0.59202164", "0.59117484", "0.59104216", "0.5909815", "0.5909815", "0.5909815", "0.5909815", "0.5909815", "0.59067595", "0.59047323", "0.59039646", "0.5900605", "0.5897324", "0.58842653", "0.587125", "0.5870477", "0.5869997", "0.58647317", "0.5849256", "0.5845902", "0.5842875" ]
0.0
-1
constructor for damage, heal
public DeckAbility(int amount, Destination destination, Choice choice, AbilityTarget target, AbilityType type, Ability subAbility) { this.calculation = new Calculation(); this.calculation.setTarget(Calculation.CountTarget.NULL); this.calculation.setOperator(Calculation.Operator.NULL); this.amount = amount; this.destination = destination; this.choice = choice; this.target = target; this.type = type; this.subAbility = subAbility; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void heal(Heros h);", "public Shot(int damage) {\n\t\tthis.damage = damage;\n\t}", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "public EmergencyTreatment(int heal) {\n super(heal);\n }", "public Wand() {\n damage = 5;\n damageType = \"Magic\";\n }", "public Sheep()\n {\n super(\"Sheep\",3,2,0); \n \n // tagline = \"Whatever\";\n maxHealth = 5;\n currentHealth = maxHealth;\n equip(new Cloth());\n equip(new SheepClaws());\n \n \n \n engaged = false;\n aggression = 1;\n special = 0;\n hostileRange = 2;\n }", "public Potion()\r\n\t{\r\n\t\tsuper(\"Potion\");\r\n\t\thealthRecovery = 30;\r\n\t}", "public Charmander(World w)\n {\n //TODO (48): Add a third parameter of Fire to this super line\n super(700, 1);\n getImage().scale(150, 100);\n w.addObject( getHealthBar() , 300, w.getHeight() - 50 );\n }", "Hero()\n\t{\n\t\t\n\t\tsuper(152,500,97,124);\n\t\tlife = 3;\n\t\tdoubleFire = 0;\n\t\t\n\t}", "public void heal1()\r\n {\r\n this.health = 700;\r\n Story.healText1();\r\n }", "public void heal2()\r\n {\r\n this.health = 900;\r\n Story.healText2();\r\n }", "public void heal3()\r\n {\r\n this.health = 1200;\r\n Story.healText3();\r\n }", "public Mage() {\r\n\thp = 75;\r\n\tstrength = 50;\r\n\tdefense = 30;\r\n\tattack = .4;\r\n\tcrit=.3;\r\n\tevade=0;\r\n }", "@Override\n\tpublic void damage(float f) {\n\t\t\n\t}", "public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}", "public StarAbilityHeal() {\n\t\t\n\t\tthis.setMaxLevel(4);\n\t\tthis.setEffectable(Effectable.Heal);\n\t\t\n\t}", "@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}", "public Weapon()\n {\n name = \"None\";\n speed = 2;\n damage = 1;\n range = 1;\n }", "public PureHeal(Player p) {\n\t\tsuper(\"Pure Heal\", p);\n\t}", "public Weapon(String name, int weaponDamage) \n\t{\n\t\tsuper(name);\n\t\tif(weaponDamage > 0) \n\t\t{\n\t\t\tthis.weaponDamage = weaponDamage;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tthis.weaponDamage = 1;\n\t\t}\n\t}", "public HealthyObject(String name, String des, int u, int p)\n \n {\n // initialisation des variables d'instance\n super(name, des, u);\n pointsHealthy = p;\n }", "public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }", "public Mage (double h, double d, double a, double p, double c)\r\n\t{\r\n\t\thealth = h;\r\n\t\tdmg = d;\r\n\t\tnumber++;\r\n\t\taggro = a;\r\n\t\tpRange = p;\r\n\t\tcrit = c;\r\n\t}", "public EndGameAttackPotion() {\n super(\"SuperAttackPotion\", Main.END_GAME_ATTACK_POTION_AMP, Main.END_GAME_ATTACK_POTION);\n }", "public int giveDamage();", "public Attack(String name, int baseDamage, String description, EnergyCost energyCost, IEffect effect) {\n super(name,description,energyCost, effect);\n this.baseDamage = baseDamage;\n\n }", "public DwarfEnemy()\r\n\t{\r\n\t\tdamagePower = GameStatics.Enemies.Dwarf.damagePower;\r\n\t\tspeed = GameStatics.Enemies.Dwarf.speed;\r\n\t\thp = GameStatics.Enemies.Dwarf.initHp;\r\n\t}", "public void makeHero()\r\n { \r\n maxHealth = 100;\r\n health = maxHealth;\r\n }", "public SoldierEnemy(int health) {\n super(health);\n }", "private Weapon() {\n\t\t\tname = \"\";\n\t\t\tdamage = 0;\n\t\t\tcrippleDamage = 0;\n\t\t\tflavors = new HashMap<>();\n\t\t}", "void takeDamage(HeroDamage enemy1, HeroDamage enemy2);", "public PotionEffect(PotionEffect paramwq)\r\n/* 35: */ {\r\n/* 36: 44 */ this.id = paramwq.id;\r\n/* 37: 45 */ this.duration = paramwq.duration;\r\n/* 38: 46 */ this.amplifier = paramwq.amplifier;\r\n/* 39: 47 */ this.ambient = paramwq.ambient;\r\n/* 40: 48 */ this.showParticles = paramwq.showParticles;\r\n/* 41: */ }", "@Override\n\tpublic void heal(Hero... target) {\n\t\tsuper.heal(target);\n\t}", "public Melee(ScrGame game, Player player){\n super();\n this.game = game;\n this.player = player;\n isPlayer = true;\n\n nSpray = 0;\n nShotsPerFire = 1;\n nAmmo = 1;\n nAmmoMax = nAmmo;\n }", "public Hobbit(int x, int y, int health, int damage) {\n\t\tsuper(x, y);\n\t\tthis.health = health;\n\t\tthis.damage = damage;\n\t\tmaxCooldown = cooldown = GameConstants.HOBBIT_COOLDOWN;\n\t\trewardMana = GameConstants.HOBBIT_REWARD;\n\t\ttryLoad(new File(\"resources/images/hobbit_16p.png\"));\n\t}", "public WallAnt()\n {\n health = 4;\n cost = 4;\n }", "public Obrim(int strength, int armor, int hp){\n\t\tsuper(strength,armor, hp);\n\t}", "private void takeDamage(int damage){ health -= damage;}", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "@Override\n\tpublic void takeDamage(double damage) {\n\n\t}", "public Weapon(WeaponType type, int level) {\n \tthis.effects = new ArrayList<>();\n this.type = type;\n this.level = level;\n this.effects.add(new AttackEffect(getWeaponDamage(), getWeaponSpeed(), getWeaponRange(), Target.SELF));\n }", "public void takeDamage(int damage);", "public IronArmour()\n {\n name = \"iron armour\";\n hitpoints = 10;\n damageBlocked = 5;\n }", "public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }", "public SandAttack() {\n super(6, \"Sand Attack\", SkillDescription.SAND_ATTACK, 15, Pokemon.Type.GROUND, 100);\n effects.add(new AccuracyEffect(SecondaryEffect.Target.ENEMY, 1,\n SecondaryEffect.StatDirection.DECREASE));\n }", "public Orc(int health, int damage, String damageInfo, String name) {\n super(health, damage, damageInfo, name);\n }", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "public SniperEnemy()\n { \n scoreBoost = 15;\n moneyBoost = 300;\n healthPoints = 500; \n fireRate = 45; \n movementCounter = 20;\n movementMod = 20;\n }", "public Weapon(String name, int price, Level minLevel, double damage, int numHands) {\n super(name, price, minLevel);\n\n // Validate input\n Validations.nonNegative(damage, \"damage\");\n Validations.nonNegative(numHands, \"numHands\");\n\n // Weapon specific attributes\n this.damage = damage;\n this.numHands = numHands;\n }", "public AbilityEffect() {\n\t\tsuper();\n\t}", "public Blocks(int h)\n {\n health=h;\n worth=h;\n setImage(colors[health-1]);\n }", "public Unit (int hp, int str, int mag, int def, int x, int y) {\n this.stats = new Stats(hp, str, mag, def);\n this.position = new Position(x, y);\n }", "@Override\r\n\tpublic void heal() {\n\t\tSystem.out.println(\"Paladin \" + super.getName() + \" heals for 50 points.\");\r\n\t\tsuper.setHitPoints(super.getHitPoints() + 50);\r\n\t}", "public interface Damage {\n}", "public Character(int startingHealth, int damageValue)\n {\n currentHealth = startingHealth;\n attackDamage = damageValue;\n }", "public Unit (int hp, int str, int mag, int def, Position p) {\n this.stats = new Stats(hp, str, mag, def);\n this.position = p;\n }", "public Weapon(String n, int spd, int dmg, int rng)\n {\n name = n;\n speed = spd;\n damage = dmg;\n range = rng;\n }", "public Creature(String name, String description, int hp, int dmg) {\r\n\t\tthis.name = name;\r\n\t\tthis.description = description;\r\n\t\tthis.hp = hp;\r\n\t\tthis.dmg = dmg;\r\n//\t\tthis.room = null;\r\n\t}", "public Rogue() {\r\n\t\tsuper();\r\n\t\tthis.name =\"Rogue\";\r\n\t\tthis.attackPower = 50;\r\n\t\tthis.maxHP = 35;\r\n\t\tthis.hp = this.maxHP;\r\n\t}", "@Override\n public void hp(){\n HP=50*nivel;\n }", "public Skill(String skillName, double skillDamage, int skillManaCost, double skillHeal){\n name = skillName;\n damage = skillDamage;\n manaCost = skillManaCost;\n heal = skillHeal;\n//sets up skills to return as their name.\n }", "public Weapon(HashMap<?, ?> hashMap) {\n\t\t// these attributes must be set\n\t\tsetName((String) hashMap.get(\"name\"));\n\t\tsetType((String) hashMap.get(\"type\"));\n\t\tsetRange(new Range((HashMap<?, ?>) hashMap.get(\"range\")));\n\n\t\t// dmg multiplicator default: 1.0\n\n\t\t// default ist -1\n\t\tsetSpeed(hashMap.containsKey(\"speed\") ? Integer\n\t\t\t\t.parseInt((String) hashMap.get(\"speed\")) : -1);\n\n\t\t// default false - no area damage\n\t\tsetArea(hashMap.containsKey(\"area\") ? Boolean\n\t\t\t\t.parseBoolean((String) hashMap.get(\"area\")) : false);\n\n\t\t// default breakthrough 0\n\t\tsetBreakthrough(hashMap.containsKey(\"breakthrough\") ? Integer\n\t\t\t\t.parseInt((String) hashMap.get(\"breakthrough\")) : 0);\n\n\t\t// only_rare default false\n\t\tsetOnly_rare(hashMap.containsKey(\"only_rare\") ? Boolean\n\t\t\t\t.parseBoolean((String) hashMap.get(\"only_rare\")) : false);\n\n\t\t// boss_drop default false\n\t\tsetBoss_drop(hashMap.containsKey(\"boss_drop\") ? Boolean\n\t\t\t\t.parseBoolean((String) hashMap.get(\"boss_drop\")) : false);\n\n\t\tdmg = (float) (hashMap.containsKey(\"dmg\") ? Float.parseFloat((String) hashMap\n\t\t\t\t.get(\"dmg\")) : 1.0F);\n\t\t\n\t\t//sets random Count at creation\n\t\tRandom randomGenerator = new Random();\n\t\tsetCount(randomGenerator.nextInt(79) + 21);\n\t\tif (type.equals(WeaponType.melee.toString()))\n\t\t\tsetCount(1);\n\t}", "public float getHungerDamage();", "public Shrub() {\n\t_hitPts = 100;\n\t_strength = 50;\n\t_defense = 40;\n\t_attack = .4;\n }", "private void selfHeal() {\n\t\t\n\t\t//IF the Droid is carrying an item...\n\t\tif (this.getItemCarried() != null){\n\t\t\t\n\t\t\t//If the item is an oil can...\n\t\t\tif (this.getItemCarried().getShortDescription() == \"an oil can\" ) {\n\t\t\t\n\t\t\t\t//If the Droids health is LOWER than half...\n\t\t\t\tif((this.getInitialHP()/2) > this.getHitpoints()) {\n\t\t\t\t\tsay(this.getShortDescription() + \" is at or below half HP. \"\n\t\t\t\t\t\t\t+ \" Healing itself...\");\n\t\t\t\t\t\n\t\t\t\t\t//Implementing a new HealDroid method (Droid heals on itself)\n\t\t\t\t\t//public HealDroid(SWEntityInterface theTarget, MessageRenderer m) {\n\t\t\t\t\tHealDroid droidHeal = new HealDroid(this, messageRenderer);\n\t\t\t\t\t\n\t\t\t\t\tscheduler.schedule(droidHeal, this, 1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "public Lunge() {\n super(SkillFactory.LUNGE, \"Lunge\", SkillDescription.lunge, 15, Pokemon.Type.BUG,\n SkillCategory.PHYSICAL, 100, 80, 1, 1.0);\n secondaryEffects.add(new AttackEffect(SecondaryEffect.Target.ENEMY, 1,\n SecondaryEffect.StatDirection.DECREASE));\n makesPhysicalContact = true;\n }", "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }", "public void heal(float health) {\r\n \t\tthis.health += health;\r\n \t\tif(health > maxHealth) {\r\n \t\t\thealth = maxHealth;\r\n \t\t}\r\n \t}", "public void setHungerDamage(float hunger);", "public Tower(int price, double damage, double range, double x, double y,\n\t\t\tdouble angle, int cooldown, Image[] imgs){\n\t\tthis.price = price;\n\t\tthis.damage = damage;\n\t\tthis.range = range;\n\t\tthis.imgs = imgs;\n\t\tthis.image = 0;\n\t\tthis.img = imgs[image];\n\t\tthis.temp = new ArrayList<Movable>();\n\t\tthis.initCooldown = cooldown;\n\t\tthis.cooldown = 0;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.angle = angle;\n\t\tthis.level = 0;\n\t}", "public ShotgunWeapon() {\n description = \" Weapon: Shotgun has\";\n }", "public Weapon(Weapon weapon) \n\t{\n\t\tsuper(weapon.getName());\n\t\tweaponDamage = weapon.getWeaponDamage();\n\t}", "public void damage(Hero other) {\n this.weapon.knockBack(other, this.state, this.dir);\n }", "public Skill(Player player){\n this.player = player;\n this.name = player.name;\n this.intellect = player.intellect;\n this.defense = player.defense;\n this.attack = player.attack;\n this.weapon = player.weapon;\n this.armor = player.armor;\n this.defense = player.defense;\n\n }", "public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }", "public MagineerStrike() {\n super(ID, NAME, IMG, COST, DESCRIPTION, TYPE, COLOR, RARITY, TARGET);\n artistNames.add(\"Jake Berry\");\n flavorText = \"There is a reason that spears are one of the oldest weapons known to man. \" +\n \"You may not be a swordfighter, but at the very least you /will/ learn to use a spear.\";\n\n MagineerMod.logger.info(\"ID: \"+ID);\n MagineerMod.logger.info(\"cardStrings: \"+cardStrings);\n MagineerMod.logger.info(CardCrawlGame.languagePack);\n MagineerMod.logger.info(\"CardCrawlGame.languagePack: \"+CardCrawlGame.languagePack);\n\n\n // Aside from baseDamage/MagicNumber/Block there's also a few more.\n // Just type this.base and let intelliJ auto complete for you, or, go read up AbstractCard\n\n baseDamage = DAMAGE;\n\n this.tags.add(BaseModCardTags.BASIC_STRIKE); //Tag your strike, defend and form (Shadow form, demon form, echo form, etc.) cards so that they function correctly.\n this.tags.add(CardTags.STRIKE);\n\n cardArtLayers512.add(new RenderImageLayer(TextureLoader.getTexture(cardArt512+portraitFilename)));\n cardArtLayers1024.add(new RenderImageLayer(TextureLoader.getTexture(cardArt1024+portraitFilename)));\n\n actionList.add(new DamageDescAction(this));\n\n updateDescription();\n }", "public Hit() {\n }", "private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }", "void takeDamage(int points) {\n this.health -= points;\n }", "public Water_Hero(RefLinks refLink, float x, float y)\r\n {\r\n ///Apel al constructorului clasei de baza\r\n super(refLink, x,y, Character.DEFAULT_CREATURE_WIDTH, Character.DEFAULT_CREATURE_HEIGHT);\r\n\r\n ///Seteaza imaginea de start a eroului\r\n image = Assets.heroLeft;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea implicita(normala)\r\n normalBounds.x = 16;\r\n normalBounds.y = 16;\r\n normalBounds.width = 16;\r\n normalBounds.height = 32;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea de atac\r\n attackBounds.x = 10;\r\n attackBounds.y = 10;\r\n attackBounds.width = 38;\r\n attackBounds.height = 38;\r\n\r\n jumpingTimer = new Timer();\r\n\r\n lista_dinamic_element = new ArrayList<CollisionItem>();\r\n\r\n lista_static_element = new ArrayList<CollisionItem>();\r\n list_fire = new ArrayList<CollisionItem>();\r\n }", "public Weapon() {\n this(Weapon.defaultName, 0, new Level(0), 0, 0);\n }", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "public Player(int h, int aF, int d, int lvl){\n\t\tthis.Health=h;\n\t\tthis.AttackForce=aF;\n\t\tthis.Defense=d;\n\t\tthis.Level=lvl;\n\t}", "public ComboStrike() {\n\t\tattackCds1 = new Array<Float>();\n\t\tinit();\n\t\n\t}", "public EnemyGunBullet1() {\n super(DAMAGE, SPEED);\n setEnemyBullet(true);\n setShootSound(\"enemyShot.wav\");\n try {\n image = ImageIO.read(new File(\"res/images/tanks/bullets/enemyBullet1.png\"));\n }\n catch (IOException e) { }\n }", "public Level1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(560, 560, 1); \n prepare();\n gfs_level1 = new GreenfootSound(\"main.wav\");\n\n }", "public PenetratingShot() {\n super(ID, 1, CardType.ATTACK, CardRarity.COMMON, CardTarget.ENEMY);\n baseDamage = 10;\n }", "Sorcerer (String cName){\n name = cName;\n hp = 20;\n mana = 100; \n strength = 2;\n vitality = 4;\n energy = 10;\n }", "public int healHero(int i) {\n int heal;\n switch (i) {\n case 1:\n heal = rand.nextInt(4) + 1;\n HP.replenish(heal);\n return heal;\n case 2:\n heal = rand.nextInt(5) + 2;\n HP.replenish(heal);\n return heal;\n case 3:\n heal = rand.nextInt(6) + 3;\n HP.replenish(heal);\n return heal;\n case 4:\n heal = rand.nextInt(9) + 5;\n HP.replenish(heal);\n return heal;\n case 5: // healing hero to full\n HP.replenish(100);\n default:\n return 0;\n }\n }", "public void setDamage(double d) {\n damage = d;\n }", "@Test\n public void useEffect() {\n \t//should normally run useItem method, but for testing it is not needed here.\n \tHealthEffect bombEff = (HealthEffect) bomb.getEffect().get(0);\n \tbombEff.applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP - 700);\n \tSpecial heal = new Special(SpecialType.HEALTHBLESS);\n \theal.getEffect().get(0).applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP);\n }", "public Orc(double attackStrength, double health) {\n\t\tsuper(attackStrength, health);\n\t\tthis.attackStrength = attackStrength;\n\t\tthis.health = health;\n\t}", "public void setHealth(double h){\n health = h;\n }", "public Pokemon(int hp){\r\n this.hp = hp;\r\n }", "public Unit(String name, int calories, String side) {\n super(name);\n this.side = side;\n setStrength(calories);\n setTagged(false);\n bandanas = 1;\n // profile = new Profile();\n setInJail(false);\n column = -1;\n row = -1;\n challenges = 0;\n challengesWon = 0;\n rewards = new ArrayList<Reward>();\n }", "PlayingSquare giveDamage(int damage);" ]
[ "0.7026965", "0.69835943", "0.6854427", "0.685091", "0.68098474", "0.6808459", "0.6795735", "0.6781047", "0.6780518", "0.6760644", "0.6735662", "0.6663899", "0.66413504", "0.6636432", "0.6609126", "0.6581141", "0.658054", "0.65687037", "0.65372527", "0.6517781", "0.64968395", "0.648912", "0.64617544", "0.6435067", "0.6425632", "0.64212483", "0.64174217", "0.6411628", "0.63535553", "0.63442576", "0.63326544", "0.63314193", "0.6328009", "0.6327833", "0.63161105", "0.63061285", "0.62640554", "0.6256643", "0.6247636", "0.62475616", "0.6246865", "0.62410265", "0.62313676", "0.62161505", "0.6213372", "0.6209611", "0.61789316", "0.61640185", "0.61623514", "0.6145678", "0.6134878", "0.6133529", "0.61175555", "0.61032665", "0.6103038", "0.60997117", "0.6098063", "0.6086928", "0.60869247", "0.6086341", "0.60763717", "0.60758966", "0.60673255", "0.606437", "0.6060483", "0.604527", "0.60377216", "0.60375714", "0.60341", "0.60297877", "0.6011121", "0.6003976", "0.59990704", "0.5997177", "0.5996186", "0.5988101", "0.5986984", "0.5961406", "0.5955733", "0.5937135", "0.592034", "0.5912051", "0.59116846", "0.59116846", "0.59116846", "0.59116846", "0.59116846", "0.5910594", "0.5907419", "0.59053314", "0.5903542", "0.590155", "0.5897753", "0.5885858", "0.5872739", "0.58725274", "0.58706063", "0.5865373", "0.58492196", "0.5846427", "0.5844592" ]
0.0
-1
constructor for damage, heal
public DeckAbility(Calculation calculation, Destination destination, AbilityTarget target, AbilityType type) { this.amount = 0; this.calculation = calculation; this.destination = destination; this.target = target; this.type = type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void heal(Heros h);", "public Shot(int damage) {\n\t\tthis.damage = damage;\n\t}", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "public EmergencyTreatment(int heal) {\n super(heal);\n }", "public Wand() {\n damage = 5;\n damageType = \"Magic\";\n }", "public Sheep()\n {\n super(\"Sheep\",3,2,0); \n \n // tagline = \"Whatever\";\n maxHealth = 5;\n currentHealth = maxHealth;\n equip(new Cloth());\n equip(new SheepClaws());\n \n \n \n engaged = false;\n aggression = 1;\n special = 0;\n hostileRange = 2;\n }", "public Potion()\r\n\t{\r\n\t\tsuper(\"Potion\");\r\n\t\thealthRecovery = 30;\r\n\t}", "public Charmander(World w)\n {\n //TODO (48): Add a third parameter of Fire to this super line\n super(700, 1);\n getImage().scale(150, 100);\n w.addObject( getHealthBar() , 300, w.getHeight() - 50 );\n }", "Hero()\n\t{\n\t\t\n\t\tsuper(152,500,97,124);\n\t\tlife = 3;\n\t\tdoubleFire = 0;\n\t\t\n\t}", "public void heal1()\r\n {\r\n this.health = 700;\r\n Story.healText1();\r\n }", "public void heal2()\r\n {\r\n this.health = 900;\r\n Story.healText2();\r\n }", "public void heal3()\r\n {\r\n this.health = 1200;\r\n Story.healText3();\r\n }", "public Mage() {\r\n\thp = 75;\r\n\tstrength = 50;\r\n\tdefense = 30;\r\n\tattack = .4;\r\n\tcrit=.3;\r\n\tevade=0;\r\n }", "@Override\n\tpublic void damage(float f) {\n\t\t\n\t}", "public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}", "@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}", "public StarAbilityHeal() {\n\t\t\n\t\tthis.setMaxLevel(4);\n\t\tthis.setEffectable(Effectable.Heal);\n\t\t\n\t}", "public Weapon()\n {\n name = \"None\";\n speed = 2;\n damage = 1;\n range = 1;\n }", "public PureHeal(Player p) {\n\t\tsuper(\"Pure Heal\", p);\n\t}", "public Weapon(String name, int weaponDamage) \n\t{\n\t\tsuper(name);\n\t\tif(weaponDamage > 0) \n\t\t{\n\t\t\tthis.weaponDamage = weaponDamage;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tthis.weaponDamage = 1;\n\t\t}\n\t}", "public HealthyObject(String name, String des, int u, int p)\n \n {\n // initialisation des variables d'instance\n super(name, des, u);\n pointsHealthy = p;\n }", "public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }", "public Mage (double h, double d, double a, double p, double c)\r\n\t{\r\n\t\thealth = h;\r\n\t\tdmg = d;\r\n\t\tnumber++;\r\n\t\taggro = a;\r\n\t\tpRange = p;\r\n\t\tcrit = c;\r\n\t}", "public EndGameAttackPotion() {\n super(\"SuperAttackPotion\", Main.END_GAME_ATTACK_POTION_AMP, Main.END_GAME_ATTACK_POTION);\n }", "public int giveDamage();", "public Attack(String name, int baseDamage, String description, EnergyCost energyCost, IEffect effect) {\n super(name,description,energyCost, effect);\n this.baseDamage = baseDamage;\n\n }", "public DwarfEnemy()\r\n\t{\r\n\t\tdamagePower = GameStatics.Enemies.Dwarf.damagePower;\r\n\t\tspeed = GameStatics.Enemies.Dwarf.speed;\r\n\t\thp = GameStatics.Enemies.Dwarf.initHp;\r\n\t}", "public void makeHero()\r\n { \r\n maxHealth = 100;\r\n health = maxHealth;\r\n }", "public SoldierEnemy(int health) {\n super(health);\n }", "private Weapon() {\n\t\t\tname = \"\";\n\t\t\tdamage = 0;\n\t\t\tcrippleDamage = 0;\n\t\t\tflavors = new HashMap<>();\n\t\t}", "void takeDamage(HeroDamage enemy1, HeroDamage enemy2);", "public PotionEffect(PotionEffect paramwq)\r\n/* 35: */ {\r\n/* 36: 44 */ this.id = paramwq.id;\r\n/* 37: 45 */ this.duration = paramwq.duration;\r\n/* 38: 46 */ this.amplifier = paramwq.amplifier;\r\n/* 39: 47 */ this.ambient = paramwq.ambient;\r\n/* 40: 48 */ this.showParticles = paramwq.showParticles;\r\n/* 41: */ }", "public Melee(ScrGame game, Player player){\n super();\n this.game = game;\n this.player = player;\n isPlayer = true;\n\n nSpray = 0;\n nShotsPerFire = 1;\n nAmmo = 1;\n nAmmoMax = nAmmo;\n }", "@Override\n\tpublic void heal(Hero... target) {\n\t\tsuper.heal(target);\n\t}", "public Hobbit(int x, int y, int health, int damage) {\n\t\tsuper(x, y);\n\t\tthis.health = health;\n\t\tthis.damage = damage;\n\t\tmaxCooldown = cooldown = GameConstants.HOBBIT_COOLDOWN;\n\t\trewardMana = GameConstants.HOBBIT_REWARD;\n\t\ttryLoad(new File(\"resources/images/hobbit_16p.png\"));\n\t}", "public WallAnt()\n {\n health = 4;\n cost = 4;\n }", "public Obrim(int strength, int armor, int hp){\n\t\tsuper(strength,armor, hp);\n\t}", "private void takeDamage(int damage){ health -= damage;}", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "@Override\n\tpublic void takeDamage(double damage) {\n\n\t}", "public Weapon(WeaponType type, int level) {\n \tthis.effects = new ArrayList<>();\n this.type = type;\n this.level = level;\n this.effects.add(new AttackEffect(getWeaponDamage(), getWeaponSpeed(), getWeaponRange(), Target.SELF));\n }", "public void takeDamage(int damage);", "public IronArmour()\n {\n name = \"iron armour\";\n hitpoints = 10;\n damageBlocked = 5;\n }", "public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }", "public SandAttack() {\n super(6, \"Sand Attack\", SkillDescription.SAND_ATTACK, 15, Pokemon.Type.GROUND, 100);\n effects.add(new AccuracyEffect(SecondaryEffect.Target.ENEMY, 1,\n SecondaryEffect.StatDirection.DECREASE));\n }", "public Orc(int health, int damage, String damageInfo, String name) {\n super(health, damage, damageInfo, name);\n }", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "public SniperEnemy()\n { \n scoreBoost = 15;\n moneyBoost = 300;\n healthPoints = 500; \n fireRate = 45; \n movementCounter = 20;\n movementMod = 20;\n }", "public Weapon(String name, int price, Level minLevel, double damage, int numHands) {\n super(name, price, minLevel);\n\n // Validate input\n Validations.nonNegative(damage, \"damage\");\n Validations.nonNegative(numHands, \"numHands\");\n\n // Weapon specific attributes\n this.damage = damage;\n this.numHands = numHands;\n }", "public AbilityEffect() {\n\t\tsuper();\n\t}", "public Blocks(int h)\n {\n health=h;\n worth=h;\n setImage(colors[health-1]);\n }", "public Unit (int hp, int str, int mag, int def, int x, int y) {\n this.stats = new Stats(hp, str, mag, def);\n this.position = new Position(x, y);\n }", "@Override\r\n\tpublic void heal() {\n\t\tSystem.out.println(\"Paladin \" + super.getName() + \" heals for 50 points.\");\r\n\t\tsuper.setHitPoints(super.getHitPoints() + 50);\r\n\t}", "public Character(int startingHealth, int damageValue)\n {\n currentHealth = startingHealth;\n attackDamage = damageValue;\n }", "public interface Damage {\n}", "public Unit (int hp, int str, int mag, int def, Position p) {\n this.stats = new Stats(hp, str, mag, def);\n this.position = p;\n }", "public Weapon(String n, int spd, int dmg, int rng)\n {\n name = n;\n speed = spd;\n damage = dmg;\n range = rng;\n }", "public Creature(String name, String description, int hp, int dmg) {\r\n\t\tthis.name = name;\r\n\t\tthis.description = description;\r\n\t\tthis.hp = hp;\r\n\t\tthis.dmg = dmg;\r\n//\t\tthis.room = null;\r\n\t}", "public Rogue() {\r\n\t\tsuper();\r\n\t\tthis.name =\"Rogue\";\r\n\t\tthis.attackPower = 50;\r\n\t\tthis.maxHP = 35;\r\n\t\tthis.hp = this.maxHP;\r\n\t}", "@Override\n public void hp(){\n HP=50*nivel;\n }", "public Skill(String skillName, double skillDamage, int skillManaCost, double skillHeal){\n name = skillName;\n damage = skillDamage;\n manaCost = skillManaCost;\n heal = skillHeal;\n//sets up skills to return as their name.\n }", "public Weapon(HashMap<?, ?> hashMap) {\n\t\t// these attributes must be set\n\t\tsetName((String) hashMap.get(\"name\"));\n\t\tsetType((String) hashMap.get(\"type\"));\n\t\tsetRange(new Range((HashMap<?, ?>) hashMap.get(\"range\")));\n\n\t\t// dmg multiplicator default: 1.0\n\n\t\t// default ist -1\n\t\tsetSpeed(hashMap.containsKey(\"speed\") ? Integer\n\t\t\t\t.parseInt((String) hashMap.get(\"speed\")) : -1);\n\n\t\t// default false - no area damage\n\t\tsetArea(hashMap.containsKey(\"area\") ? Boolean\n\t\t\t\t.parseBoolean((String) hashMap.get(\"area\")) : false);\n\n\t\t// default breakthrough 0\n\t\tsetBreakthrough(hashMap.containsKey(\"breakthrough\") ? Integer\n\t\t\t\t.parseInt((String) hashMap.get(\"breakthrough\")) : 0);\n\n\t\t// only_rare default false\n\t\tsetOnly_rare(hashMap.containsKey(\"only_rare\") ? Boolean\n\t\t\t\t.parseBoolean((String) hashMap.get(\"only_rare\")) : false);\n\n\t\t// boss_drop default false\n\t\tsetBoss_drop(hashMap.containsKey(\"boss_drop\") ? Boolean\n\t\t\t\t.parseBoolean((String) hashMap.get(\"boss_drop\")) : false);\n\n\t\tdmg = (float) (hashMap.containsKey(\"dmg\") ? Float.parseFloat((String) hashMap\n\t\t\t\t.get(\"dmg\")) : 1.0F);\n\t\t\n\t\t//sets random Count at creation\n\t\tRandom randomGenerator = new Random();\n\t\tsetCount(randomGenerator.nextInt(79) + 21);\n\t\tif (type.equals(WeaponType.melee.toString()))\n\t\t\tsetCount(1);\n\t}", "public float getHungerDamage();", "public Shrub() {\n\t_hitPts = 100;\n\t_strength = 50;\n\t_defense = 40;\n\t_attack = .4;\n }", "private void selfHeal() {\n\t\t\n\t\t//IF the Droid is carrying an item...\n\t\tif (this.getItemCarried() != null){\n\t\t\t\n\t\t\t//If the item is an oil can...\n\t\t\tif (this.getItemCarried().getShortDescription() == \"an oil can\" ) {\n\t\t\t\n\t\t\t\t//If the Droids health is LOWER than half...\n\t\t\t\tif((this.getInitialHP()/2) > this.getHitpoints()) {\n\t\t\t\t\tsay(this.getShortDescription() + \" is at or below half HP. \"\n\t\t\t\t\t\t\t+ \" Healing itself...\");\n\t\t\t\t\t\n\t\t\t\t\t//Implementing a new HealDroid method (Droid heals on itself)\n\t\t\t\t\t//public HealDroid(SWEntityInterface theTarget, MessageRenderer m) {\n\t\t\t\t\tHealDroid droidHeal = new HealDroid(this, messageRenderer);\n\t\t\t\t\t\n\t\t\t\t\tscheduler.schedule(droidHeal, this, 1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "public Lunge() {\n super(SkillFactory.LUNGE, \"Lunge\", SkillDescription.lunge, 15, Pokemon.Type.BUG,\n SkillCategory.PHYSICAL, 100, 80, 1, 1.0);\n secondaryEffects.add(new AttackEffect(SecondaryEffect.Target.ENEMY, 1,\n SecondaryEffect.StatDirection.DECREASE));\n makesPhysicalContact = true;\n }", "public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }", "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "public void heal(float health) {\r\n \t\tthis.health += health;\r\n \t\tif(health > maxHealth) {\r\n \t\t\thealth = maxHealth;\r\n \t\t}\r\n \t}", "public void setHungerDamage(float hunger);", "public Tower(int price, double damage, double range, double x, double y,\n\t\t\tdouble angle, int cooldown, Image[] imgs){\n\t\tthis.price = price;\n\t\tthis.damage = damage;\n\t\tthis.range = range;\n\t\tthis.imgs = imgs;\n\t\tthis.image = 0;\n\t\tthis.img = imgs[image];\n\t\tthis.temp = new ArrayList<Movable>();\n\t\tthis.initCooldown = cooldown;\n\t\tthis.cooldown = 0;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.angle = angle;\n\t\tthis.level = 0;\n\t}", "public ShotgunWeapon() {\n description = \" Weapon: Shotgun has\";\n }", "public Weapon(Weapon weapon) \n\t{\n\t\tsuper(weapon.getName());\n\t\tweaponDamage = weapon.getWeaponDamage();\n\t}", "public void damage(Hero other) {\n this.weapon.knockBack(other, this.state, this.dir);\n }", "public Skill(Player player){\n this.player = player;\n this.name = player.name;\n this.intellect = player.intellect;\n this.defense = player.defense;\n this.attack = player.attack;\n this.weapon = player.weapon;\n this.armor = player.armor;\n this.defense = player.defense;\n\n }", "public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }", "public MagineerStrike() {\n super(ID, NAME, IMG, COST, DESCRIPTION, TYPE, COLOR, RARITY, TARGET);\n artistNames.add(\"Jake Berry\");\n flavorText = \"There is a reason that spears are one of the oldest weapons known to man. \" +\n \"You may not be a swordfighter, but at the very least you /will/ learn to use a spear.\";\n\n MagineerMod.logger.info(\"ID: \"+ID);\n MagineerMod.logger.info(\"cardStrings: \"+cardStrings);\n MagineerMod.logger.info(CardCrawlGame.languagePack);\n MagineerMod.logger.info(\"CardCrawlGame.languagePack: \"+CardCrawlGame.languagePack);\n\n\n // Aside from baseDamage/MagicNumber/Block there's also a few more.\n // Just type this.base and let intelliJ auto complete for you, or, go read up AbstractCard\n\n baseDamage = DAMAGE;\n\n this.tags.add(BaseModCardTags.BASIC_STRIKE); //Tag your strike, defend and form (Shadow form, demon form, echo form, etc.) cards so that they function correctly.\n this.tags.add(CardTags.STRIKE);\n\n cardArtLayers512.add(new RenderImageLayer(TextureLoader.getTexture(cardArt512+portraitFilename)));\n cardArtLayers1024.add(new RenderImageLayer(TextureLoader.getTexture(cardArt1024+portraitFilename)));\n\n actionList.add(new DamageDescAction(this));\n\n updateDescription();\n }", "public Hit() {\n }", "private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }", "void takeDamage(int points) {\n this.health -= points;\n }", "public Water_Hero(RefLinks refLink, float x, float y)\r\n {\r\n ///Apel al constructorului clasei de baza\r\n super(refLink, x,y, Character.DEFAULT_CREATURE_WIDTH, Character.DEFAULT_CREATURE_HEIGHT);\r\n\r\n ///Seteaza imaginea de start a eroului\r\n image = Assets.heroLeft;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea implicita(normala)\r\n normalBounds.x = 16;\r\n normalBounds.y = 16;\r\n normalBounds.width = 16;\r\n normalBounds.height = 32;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea de atac\r\n attackBounds.x = 10;\r\n attackBounds.y = 10;\r\n attackBounds.width = 38;\r\n attackBounds.height = 38;\r\n\r\n jumpingTimer = new Timer();\r\n\r\n lista_dinamic_element = new ArrayList<CollisionItem>();\r\n\r\n lista_static_element = new ArrayList<CollisionItem>();\r\n list_fire = new ArrayList<CollisionItem>();\r\n }", "public Weapon() {\n this(Weapon.defaultName, 0, new Level(0), 0, 0);\n }", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "public Player(int h, int aF, int d, int lvl){\n\t\tthis.Health=h;\n\t\tthis.AttackForce=aF;\n\t\tthis.Defense=d;\n\t\tthis.Level=lvl;\n\t}", "public ComboStrike() {\n\t\tattackCds1 = new Array<Float>();\n\t\tinit();\n\t\n\t}", "public EnemyGunBullet1() {\n super(DAMAGE, SPEED);\n setEnemyBullet(true);\n setShootSound(\"enemyShot.wav\");\n try {\n image = ImageIO.read(new File(\"res/images/tanks/bullets/enemyBullet1.png\"));\n }\n catch (IOException e) { }\n }", "public Level1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(560, 560, 1); \n prepare();\n gfs_level1 = new GreenfootSound(\"main.wav\");\n\n }", "public PenetratingShot() {\n super(ID, 1, CardType.ATTACK, CardRarity.COMMON, CardTarget.ENEMY);\n baseDamage = 10;\n }", "Sorcerer (String cName){\n name = cName;\n hp = 20;\n mana = 100; \n strength = 2;\n vitality = 4;\n energy = 10;\n }", "public int healHero(int i) {\n int heal;\n switch (i) {\n case 1:\n heal = rand.nextInt(4) + 1;\n HP.replenish(heal);\n return heal;\n case 2:\n heal = rand.nextInt(5) + 2;\n HP.replenish(heal);\n return heal;\n case 3:\n heal = rand.nextInt(6) + 3;\n HP.replenish(heal);\n return heal;\n case 4:\n heal = rand.nextInt(9) + 5;\n HP.replenish(heal);\n return heal;\n case 5: // healing hero to full\n HP.replenish(100);\n default:\n return 0;\n }\n }", "public void setDamage(double d) {\n damage = d;\n }", "@Test\n public void useEffect() {\n \t//should normally run useItem method, but for testing it is not needed here.\n \tHealthEffect bombEff = (HealthEffect) bomb.getEffect().get(0);\n \tbombEff.applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP - 700);\n \tSpecial heal = new Special(SpecialType.HEALTHBLESS);\n \theal.getEffect().get(0).applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP);\n }", "public Orc(double attackStrength, double health) {\n\t\tsuper(attackStrength, health);\n\t\tthis.attackStrength = attackStrength;\n\t\tthis.health = health;\n\t}", "public void setHealth(double h){\n health = h;\n }", "public Pokemon(int hp){\r\n this.hp = hp;\r\n }", "public Unit(String name, int calories, String side) {\n super(name);\n this.side = side;\n setStrength(calories);\n setTagged(false);\n bandanas = 1;\n // profile = new Profile();\n setInJail(false);\n column = -1;\n row = -1;\n challenges = 0;\n challengesWon = 0;\n rewards = new ArrayList<Reward>();\n }", "PlayingSquare giveDamage(int damage);" ]
[ "0.7026899", "0.69840604", "0.68542373", "0.68512464", "0.68103105", "0.6808338", "0.6796157", "0.67808944", "0.67806476", "0.67604613", "0.6735073", "0.6663826", "0.66409063", "0.66365653", "0.66087735", "0.6580887", "0.65798765", "0.6569172", "0.65363824", "0.65179724", "0.64966536", "0.64892036", "0.6462176", "0.6434567", "0.64258564", "0.6420638", "0.64166987", "0.64121747", "0.6353475", "0.6344061", "0.6332569", "0.6331019", "0.6327703", "0.6327452", "0.63164985", "0.63063365", "0.62632483", "0.6257041", "0.6248457", "0.6247959", "0.62468296", "0.6241479", "0.6231357", "0.6216204", "0.62127113", "0.62106144", "0.617924", "0.61642826", "0.6161851", "0.6145202", "0.61356425", "0.6132901", "0.6116993", "0.610349", "0.610345", "0.6099301", "0.6098694", "0.60876304", "0.6086933", "0.60866785", "0.6075569", "0.60755014", "0.60680544", "0.6064106", "0.60596496", "0.6044728", "0.60380524", "0.6037205", "0.6034306", "0.6030319", "0.60110843", "0.6003477", "0.59987897", "0.5996134", "0.5995643", "0.5988586", "0.5985288", "0.5961668", "0.5955749", "0.5936698", "0.59202576", "0.5911936", "0.5911798", "0.5911798", "0.5911798", "0.5911798", "0.5911798", "0.5910641", "0.5905889", "0.5905194", "0.5903529", "0.5901078", "0.5897653", "0.5886022", "0.58724797", "0.5871961", "0.5870689", "0.5866134", "0.5849872", "0.58457315", "0.5844164" ]
0.0
-1
constructor for damage, heal
public DeckAbility(Calculation calculation, Destination destination, AbilityTarget target, AbilityType type, Ability subAbility) { this.amount = 0; this.calculation = calculation; this.destination = destination; this.target = target; this.type = type; this.subAbility = subAbility; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void heal(Heros h);", "public Shot(int damage) {\n\t\tthis.damage = damage;\n\t}", "public void heal(int healAmount){\r\n health+= healAmount;\r\n }", "public EmergencyTreatment(int heal) {\n super(heal);\n }", "public Wand() {\n damage = 5;\n damageType = \"Magic\";\n }", "public Sheep()\n {\n super(\"Sheep\",3,2,0); \n \n // tagline = \"Whatever\";\n maxHealth = 5;\n currentHealth = maxHealth;\n equip(new Cloth());\n equip(new SheepClaws());\n \n \n \n engaged = false;\n aggression = 1;\n special = 0;\n hostileRange = 2;\n }", "public Potion()\r\n\t{\r\n\t\tsuper(\"Potion\");\r\n\t\thealthRecovery = 30;\r\n\t}", "public Charmander(World w)\n {\n //TODO (48): Add a third parameter of Fire to this super line\n super(700, 1);\n getImage().scale(150, 100);\n w.addObject( getHealthBar() , 300, w.getHeight() - 50 );\n }", "Hero()\n\t{\n\t\t\n\t\tsuper(152,500,97,124);\n\t\tlife = 3;\n\t\tdoubleFire = 0;\n\t\t\n\t}", "public void heal1()\r\n {\r\n this.health = 700;\r\n Story.healText1();\r\n }", "public void heal2()\r\n {\r\n this.health = 900;\r\n Story.healText2();\r\n }", "public void heal3()\r\n {\r\n this.health = 1200;\r\n Story.healText3();\r\n }", "public Mage() {\r\n\thp = 75;\r\n\tstrength = 50;\r\n\tdefense = 30;\r\n\tattack = .4;\r\n\tcrit=.3;\r\n\tevade=0;\r\n }", "@Override\n\tpublic void damage(float f) {\n\t\t\n\t}", "public void heal(){\n\t\thp += potion.getHpBoost();\n\t\tif(hp > max_hp)hp = max_hp;\n\t}", "public StarAbilityHeal() {\n\t\t\n\t\tthis.setMaxLevel(4);\n\t\tthis.setEffectable(Effectable.Heal);\n\t\t\n\t}", "@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}", "public Weapon()\n {\n name = \"None\";\n speed = 2;\n damage = 1;\n range = 1;\n }", "public PureHeal(Player p) {\n\t\tsuper(\"Pure Heal\", p);\n\t}", "public Weapon(String name, int weaponDamage) \n\t{\n\t\tsuper(name);\n\t\tif(weaponDamage > 0) \n\t\t{\n\t\t\tthis.weaponDamage = weaponDamage;\n\t\t}\n\t\telse \n\t\t{\n\t\t\tthis.weaponDamage = 1;\n\t\t}\n\t}", "public HealthyObject(String name, String des, int u, int p)\n \n {\n // initialisation des variables d'instance\n super(name, des, u);\n pointsHealthy = p;\n }", "public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }", "public Mage (double h, double d, double a, double p, double c)\r\n\t{\r\n\t\thealth = h;\r\n\t\tdmg = d;\r\n\t\tnumber++;\r\n\t\taggro = a;\r\n\t\tpRange = p;\r\n\t\tcrit = c;\r\n\t}", "public EndGameAttackPotion() {\n super(\"SuperAttackPotion\", Main.END_GAME_ATTACK_POTION_AMP, Main.END_GAME_ATTACK_POTION);\n }", "public int giveDamage();", "public Attack(String name, int baseDamage, String description, EnergyCost energyCost, IEffect effect) {\n super(name,description,energyCost, effect);\n this.baseDamage = baseDamage;\n\n }", "public DwarfEnemy()\r\n\t{\r\n\t\tdamagePower = GameStatics.Enemies.Dwarf.damagePower;\r\n\t\tspeed = GameStatics.Enemies.Dwarf.speed;\r\n\t\thp = GameStatics.Enemies.Dwarf.initHp;\r\n\t}", "public void makeHero()\r\n { \r\n maxHealth = 100;\r\n health = maxHealth;\r\n }", "public SoldierEnemy(int health) {\n super(health);\n }", "private Weapon() {\n\t\t\tname = \"\";\n\t\t\tdamage = 0;\n\t\t\tcrippleDamage = 0;\n\t\t\tflavors = new HashMap<>();\n\t\t}", "void takeDamage(HeroDamage enemy1, HeroDamage enemy2);", "public PotionEffect(PotionEffect paramwq)\r\n/* 35: */ {\r\n/* 36: 44 */ this.id = paramwq.id;\r\n/* 37: 45 */ this.duration = paramwq.duration;\r\n/* 38: 46 */ this.amplifier = paramwq.amplifier;\r\n/* 39: 47 */ this.ambient = paramwq.ambient;\r\n/* 40: 48 */ this.showParticles = paramwq.showParticles;\r\n/* 41: */ }", "@Override\n\tpublic void heal(Hero... target) {\n\t\tsuper.heal(target);\n\t}", "public Melee(ScrGame game, Player player){\n super();\n this.game = game;\n this.player = player;\n isPlayer = true;\n\n nSpray = 0;\n nShotsPerFire = 1;\n nAmmo = 1;\n nAmmoMax = nAmmo;\n }", "public Hobbit(int x, int y, int health, int damage) {\n\t\tsuper(x, y);\n\t\tthis.health = health;\n\t\tthis.damage = damage;\n\t\tmaxCooldown = cooldown = GameConstants.HOBBIT_COOLDOWN;\n\t\trewardMana = GameConstants.HOBBIT_REWARD;\n\t\ttryLoad(new File(\"resources/images/hobbit_16p.png\"));\n\t}", "public WallAnt()\n {\n health = 4;\n cost = 4;\n }", "public Obrim(int strength, int armor, int hp){\n\t\tsuper(strength,armor, hp);\n\t}", "private void takeDamage(int damage){ health -= damage;}", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "@Override\n\tpublic void takeDamage(double damage) {\n\n\t}", "public Weapon(WeaponType type, int level) {\n \tthis.effects = new ArrayList<>();\n this.type = type;\n this.level = level;\n this.effects.add(new AttackEffect(getWeaponDamage(), getWeaponSpeed(), getWeaponRange(), Target.SELF));\n }", "public void takeDamage(int damage);", "public IronArmour()\n {\n name = \"iron armour\";\n hitpoints = 10;\n damageBlocked = 5;\n }", "public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }", "public SandAttack() {\n super(6, \"Sand Attack\", SkillDescription.SAND_ATTACK, 15, Pokemon.Type.GROUND, 100);\n effects.add(new AccuracyEffect(SecondaryEffect.Target.ENEMY, 1,\n SecondaryEffect.StatDirection.DECREASE));\n }", "public Orc(int health, int damage, String damageInfo, String name) {\n super(health, damage, damageInfo, name);\n }", "public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }", "public SniperEnemy()\n { \n scoreBoost = 15;\n moneyBoost = 300;\n healthPoints = 500; \n fireRate = 45; \n movementCounter = 20;\n movementMod = 20;\n }", "public Weapon(String name, int price, Level minLevel, double damage, int numHands) {\n super(name, price, minLevel);\n\n // Validate input\n Validations.nonNegative(damage, \"damage\");\n Validations.nonNegative(numHands, \"numHands\");\n\n // Weapon specific attributes\n this.damage = damage;\n this.numHands = numHands;\n }", "public AbilityEffect() {\n\t\tsuper();\n\t}", "public Blocks(int h)\n {\n health=h;\n worth=h;\n setImage(colors[health-1]);\n }", "public Unit (int hp, int str, int mag, int def, int x, int y) {\n this.stats = new Stats(hp, str, mag, def);\n this.position = new Position(x, y);\n }", "@Override\r\n\tpublic void heal() {\n\t\tSystem.out.println(\"Paladin \" + super.getName() + \" heals for 50 points.\");\r\n\t\tsuper.setHitPoints(super.getHitPoints() + 50);\r\n\t}", "public interface Damage {\n}", "public Character(int startingHealth, int damageValue)\n {\n currentHealth = startingHealth;\n attackDamage = damageValue;\n }", "public Unit (int hp, int str, int mag, int def, Position p) {\n this.stats = new Stats(hp, str, mag, def);\n this.position = p;\n }", "public Weapon(String n, int spd, int dmg, int rng)\n {\n name = n;\n speed = spd;\n damage = dmg;\n range = rng;\n }", "public Creature(String name, String description, int hp, int dmg) {\r\n\t\tthis.name = name;\r\n\t\tthis.description = description;\r\n\t\tthis.hp = hp;\r\n\t\tthis.dmg = dmg;\r\n//\t\tthis.room = null;\r\n\t}", "public Rogue() {\r\n\t\tsuper();\r\n\t\tthis.name =\"Rogue\";\r\n\t\tthis.attackPower = 50;\r\n\t\tthis.maxHP = 35;\r\n\t\tthis.hp = this.maxHP;\r\n\t}", "@Override\n public void hp(){\n HP=50*nivel;\n }", "public Skill(String skillName, double skillDamage, int skillManaCost, double skillHeal){\n name = skillName;\n damage = skillDamage;\n manaCost = skillManaCost;\n heal = skillHeal;\n//sets up skills to return as their name.\n }", "public Weapon(HashMap<?, ?> hashMap) {\n\t\t// these attributes must be set\n\t\tsetName((String) hashMap.get(\"name\"));\n\t\tsetType((String) hashMap.get(\"type\"));\n\t\tsetRange(new Range((HashMap<?, ?>) hashMap.get(\"range\")));\n\n\t\t// dmg multiplicator default: 1.0\n\n\t\t// default ist -1\n\t\tsetSpeed(hashMap.containsKey(\"speed\") ? Integer\n\t\t\t\t.parseInt((String) hashMap.get(\"speed\")) : -1);\n\n\t\t// default false - no area damage\n\t\tsetArea(hashMap.containsKey(\"area\") ? Boolean\n\t\t\t\t.parseBoolean((String) hashMap.get(\"area\")) : false);\n\n\t\t// default breakthrough 0\n\t\tsetBreakthrough(hashMap.containsKey(\"breakthrough\") ? Integer\n\t\t\t\t.parseInt((String) hashMap.get(\"breakthrough\")) : 0);\n\n\t\t// only_rare default false\n\t\tsetOnly_rare(hashMap.containsKey(\"only_rare\") ? Boolean\n\t\t\t\t.parseBoolean((String) hashMap.get(\"only_rare\")) : false);\n\n\t\t// boss_drop default false\n\t\tsetBoss_drop(hashMap.containsKey(\"boss_drop\") ? Boolean\n\t\t\t\t.parseBoolean((String) hashMap.get(\"boss_drop\")) : false);\n\n\t\tdmg = (float) (hashMap.containsKey(\"dmg\") ? Float.parseFloat((String) hashMap\n\t\t\t\t.get(\"dmg\")) : 1.0F);\n\t\t\n\t\t//sets random Count at creation\n\t\tRandom randomGenerator = new Random();\n\t\tsetCount(randomGenerator.nextInt(79) + 21);\n\t\tif (type.equals(WeaponType.melee.toString()))\n\t\t\tsetCount(1);\n\t}", "public float getHungerDamage();", "public Shrub() {\n\t_hitPts = 100;\n\t_strength = 50;\n\t_defense = 40;\n\t_attack = .4;\n }", "private void selfHeal() {\n\t\t\n\t\t//IF the Droid is carrying an item...\n\t\tif (this.getItemCarried() != null){\n\t\t\t\n\t\t\t//If the item is an oil can...\n\t\t\tif (this.getItemCarried().getShortDescription() == \"an oil can\" ) {\n\t\t\t\n\t\t\t\t//If the Droids health is LOWER than half...\n\t\t\t\tif((this.getInitialHP()/2) > this.getHitpoints()) {\n\t\t\t\t\tsay(this.getShortDescription() + \" is at or below half HP. \"\n\t\t\t\t\t\t\t+ \" Healing itself...\");\n\t\t\t\t\t\n\t\t\t\t\t//Implementing a new HealDroid method (Droid heals on itself)\n\t\t\t\t\t//public HealDroid(SWEntityInterface theTarget, MessageRenderer m) {\n\t\t\t\t\tHealDroid droidHeal = new HealDroid(this, messageRenderer);\n\t\t\t\t\t\n\t\t\t\t\tscheduler.schedule(droidHeal, this, 1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "public Lunge() {\n super(SkillFactory.LUNGE, \"Lunge\", SkillDescription.lunge, 15, Pokemon.Type.BUG,\n SkillCategory.PHYSICAL, 100, 80, 1, 1.0);\n secondaryEffects.add(new AttackEffect(SecondaryEffect.Target.ENEMY, 1,\n SecondaryEffect.StatDirection.DECREASE));\n makesPhysicalContact = true;\n }", "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }", "public void heal(float health) {\r\n \t\tthis.health += health;\r\n \t\tif(health > maxHealth) {\r\n \t\t\thealth = maxHealth;\r\n \t\t}\r\n \t}", "public void setHungerDamage(float hunger);", "public Tower(int price, double damage, double range, double x, double y,\n\t\t\tdouble angle, int cooldown, Image[] imgs){\n\t\tthis.price = price;\n\t\tthis.damage = damage;\n\t\tthis.range = range;\n\t\tthis.imgs = imgs;\n\t\tthis.image = 0;\n\t\tthis.img = imgs[image];\n\t\tthis.temp = new ArrayList<Movable>();\n\t\tthis.initCooldown = cooldown;\n\t\tthis.cooldown = 0;\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.angle = angle;\n\t\tthis.level = 0;\n\t}", "public ShotgunWeapon() {\n description = \" Weapon: Shotgun has\";\n }", "public Weapon(Weapon weapon) \n\t{\n\t\tsuper(weapon.getName());\n\t\tweaponDamage = weapon.getWeaponDamage();\n\t}", "public void damage(Hero other) {\n this.weapon.knockBack(other, this.state, this.dir);\n }", "public Skill(Player player){\n this.player = player;\n this.name = player.name;\n this.intellect = player.intellect;\n this.defense = player.defense;\n this.attack = player.attack;\n this.weapon = player.weapon;\n this.armor = player.armor;\n this.defense = player.defense;\n\n }", "public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }", "public MagineerStrike() {\n super(ID, NAME, IMG, COST, DESCRIPTION, TYPE, COLOR, RARITY, TARGET);\n artistNames.add(\"Jake Berry\");\n flavorText = \"There is a reason that spears are one of the oldest weapons known to man. \" +\n \"You may not be a swordfighter, but at the very least you /will/ learn to use a spear.\";\n\n MagineerMod.logger.info(\"ID: \"+ID);\n MagineerMod.logger.info(\"cardStrings: \"+cardStrings);\n MagineerMod.logger.info(CardCrawlGame.languagePack);\n MagineerMod.logger.info(\"CardCrawlGame.languagePack: \"+CardCrawlGame.languagePack);\n\n\n // Aside from baseDamage/MagicNumber/Block there's also a few more.\n // Just type this.base and let intelliJ auto complete for you, or, go read up AbstractCard\n\n baseDamage = DAMAGE;\n\n this.tags.add(BaseModCardTags.BASIC_STRIKE); //Tag your strike, defend and form (Shadow form, demon form, echo form, etc.) cards so that they function correctly.\n this.tags.add(CardTags.STRIKE);\n\n cardArtLayers512.add(new RenderImageLayer(TextureLoader.getTexture(cardArt512+portraitFilename)));\n cardArtLayers1024.add(new RenderImageLayer(TextureLoader.getTexture(cardArt1024+portraitFilename)));\n\n actionList.add(new DamageDescAction(this));\n\n updateDescription();\n }", "public Hit() {\n }", "private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }", "void takeDamage(int points) {\n this.health -= points;\n }", "public Water_Hero(RefLinks refLink, float x, float y)\r\n {\r\n ///Apel al constructorului clasei de baza\r\n super(refLink, x,y, Character.DEFAULT_CREATURE_WIDTH, Character.DEFAULT_CREATURE_HEIGHT);\r\n\r\n ///Seteaza imaginea de start a eroului\r\n image = Assets.heroLeft;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea implicita(normala)\r\n normalBounds.x = 16;\r\n normalBounds.y = 16;\r\n normalBounds.width = 16;\r\n normalBounds.height = 32;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea de atac\r\n attackBounds.x = 10;\r\n attackBounds.y = 10;\r\n attackBounds.width = 38;\r\n attackBounds.height = 38;\r\n\r\n jumpingTimer = new Timer();\r\n\r\n lista_dinamic_element = new ArrayList<CollisionItem>();\r\n\r\n lista_static_element = new ArrayList<CollisionItem>();\r\n list_fire = new ArrayList<CollisionItem>();\r\n }", "public Weapon() {\n this(Weapon.defaultName, 0, new Level(0), 0, 0);\n }", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "public Player(int h, int aF, int d, int lvl){\n\t\tthis.Health=h;\n\t\tthis.AttackForce=aF;\n\t\tthis.Defense=d;\n\t\tthis.Level=lvl;\n\t}", "public ComboStrike() {\n\t\tattackCds1 = new Array<Float>();\n\t\tinit();\n\t\n\t}", "public EnemyGunBullet1() {\n super(DAMAGE, SPEED);\n setEnemyBullet(true);\n setShootSound(\"enemyShot.wav\");\n try {\n image = ImageIO.read(new File(\"res/images/tanks/bullets/enemyBullet1.png\"));\n }\n catch (IOException e) { }\n }", "public Level1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(560, 560, 1); \n prepare();\n gfs_level1 = new GreenfootSound(\"main.wav\");\n\n }", "public PenetratingShot() {\n super(ID, 1, CardType.ATTACK, CardRarity.COMMON, CardTarget.ENEMY);\n baseDamage = 10;\n }", "Sorcerer (String cName){\n name = cName;\n hp = 20;\n mana = 100; \n strength = 2;\n vitality = 4;\n energy = 10;\n }", "public int healHero(int i) {\n int heal;\n switch (i) {\n case 1:\n heal = rand.nextInt(4) + 1;\n HP.replenish(heal);\n return heal;\n case 2:\n heal = rand.nextInt(5) + 2;\n HP.replenish(heal);\n return heal;\n case 3:\n heal = rand.nextInt(6) + 3;\n HP.replenish(heal);\n return heal;\n case 4:\n heal = rand.nextInt(9) + 5;\n HP.replenish(heal);\n return heal;\n case 5: // healing hero to full\n HP.replenish(100);\n default:\n return 0;\n }\n }", "public void setDamage(double d) {\n damage = d;\n }", "@Test\n public void useEffect() {\n \t//should normally run useItem method, but for testing it is not needed here.\n \tHealthEffect bombEff = (HealthEffect) bomb.getEffect().get(0);\n \tbombEff.applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP - 700);\n \tSpecial heal = new Special(SpecialType.HEALTHBLESS);\n \theal.getEffect().get(0).applyEffect(com);\n \tAssert.assertTrue(com.getHealth() == baseHP);\n }", "public Orc(double attackStrength, double health) {\n\t\tsuper(attackStrength, health);\n\t\tthis.attackStrength = attackStrength;\n\t\tthis.health = health;\n\t}", "public void setHealth(double h){\n health = h;\n }", "public Pokemon(int hp){\r\n this.hp = hp;\r\n }", "public Unit(String name, int calories, String side) {\n super(name);\n this.side = side;\n setStrength(calories);\n setTagged(false);\n bandanas = 1;\n // profile = new Profile();\n setInJail(false);\n column = -1;\n row = -1;\n challenges = 0;\n challengesWon = 0;\n rewards = new ArrayList<Reward>();\n }", "PlayingSquare giveDamage(int damage);" ]
[ "0.7026965", "0.69835943", "0.6854427", "0.685091", "0.68098474", "0.6808459", "0.6795735", "0.6781047", "0.6780518", "0.6760644", "0.6735662", "0.6663899", "0.66413504", "0.6636432", "0.6609126", "0.6581141", "0.658054", "0.65687037", "0.65372527", "0.6517781", "0.64968395", "0.648912", "0.64617544", "0.6435067", "0.6425632", "0.64212483", "0.64174217", "0.6411628", "0.63535553", "0.63442576", "0.63326544", "0.63314193", "0.6328009", "0.6327833", "0.63161105", "0.63061285", "0.62640554", "0.6256643", "0.6247636", "0.62475616", "0.6246865", "0.62410265", "0.62313676", "0.62161505", "0.6213372", "0.6209611", "0.61789316", "0.61640185", "0.61623514", "0.6145678", "0.6134878", "0.6133529", "0.61175555", "0.61032665", "0.6103038", "0.60997117", "0.6098063", "0.6086928", "0.60869247", "0.6086341", "0.60763717", "0.60758966", "0.60673255", "0.606437", "0.6060483", "0.604527", "0.60377216", "0.60375714", "0.60341", "0.60297877", "0.6011121", "0.6003976", "0.59990704", "0.5997177", "0.5996186", "0.5988101", "0.5986984", "0.5961406", "0.5955733", "0.5937135", "0.592034", "0.5912051", "0.59116846", "0.59116846", "0.59116846", "0.59116846", "0.59116846", "0.5910594", "0.5907419", "0.59053314", "0.5903542", "0.590155", "0.5897753", "0.5885858", "0.5872739", "0.58725274", "0.58706063", "0.5865373", "0.58492196", "0.5846427", "0.5844592" ]
0.0
-1
This method blocks until the tests complete and returns true if all tests completed successfully
public CrashTestStatus.TestResult testResult() { try { final Duration testTimeout = mDuration.plus(MAX_TEST_DELAY_BEFORE_HANG); boolean completed = mTestStatus.waitForCompletion(testTimeout.toMillis(), TimeUnit.MILLISECONDS); if (!completed) { Log.w(getTag(), String.format("Test didn't complete within %s. Returning HANG", testTimeout)); return CrashTestStatus.TestResult.HANG; } return mTestStatus.result(); } catch (InterruptedException e) { Log.w(getTag(), "Interrupted while waiting for test completion. Returning HANG"); return CrashTestStatus.TestResult.HANG; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isAllTestsRun() {\n Collection<TestPackage> pkgs = getTestPackages();\n for (TestPackage pkg : pkgs) {\n if (!pkg.isAllTestsRun()) {\n return false;\n }\n }\n return true;\n }", "private static boolean basicTest() {\r\n\t\t// use ExecutorService to manage threads\r\n\t\tExecutorService executor = Executors.newFixedThreadPool(1);\r\n\t\t\r\n\t\t// send all rquests sequentially\r\n\t\tlogger.finest(\"sending requests sequentially\");\r\n\t\tfor (URL url : urlList) { \r\n\t\t\tHttpClient client = new HttpClient(url);\r\n\t\t\texecutor.execute(client);\r\n\t\t}\r\n\t\t\r\n\t\t// wait for test to finish\r\n\t\tlogger.fine(\"waiting for requests to complete...\");\r\n\t\texecutor.shutdown(); \r\n\t\twhile (!executor.isTerminated())\r\n\t\t\tThread.yield(); // return the control to system\r\n\t\tlogger.fine(\"all requests completed\");\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private boolean runTests(SurefireTestSuite suite) throws MojoExecutionException {\n \n try {\n\n Properties status = new Properties();\n int totalTests = suite.getNumTests();\n\n List<Reporter> reports = new ArrayList<Reporter>();\n reports.add(new XMLReporter(reportsDirectory, trimStackTrace));\n reports.add(new BriefFileReporter(reportsDirectory, trimStackTrace));\n reports.add(new BriefConsoleReporter(trimStackTrace));\n ReporterManager reporterManager = new ReporterManager(reports);\n reporterManager.initResultsFromProperties(status);\n\n reporterManager.runStarting(totalTests);\n\n if (totalTests == 0) {\n reporterManager.writeMessage(\"There are no tests to run.\");\n } else {\n suite.execute(reporterManager, null);\n }\n\n reporterManager.runCompleted();\n reporterManager.updateResultsProperties(status);\n \n return reporterManager.getNumErrors() == 0 && reporterManager.getNumFailures() == 0;\n \n } catch (ReporterException e) {\n throw new MojoExecutionException(e.getMessage(), e);\n } catch (TestSetFailedException e) {\n throw new MojoExecutionException(e.getMessage(), e);\n }\n \n }", "protected void testsCompleted() {\n\t\tjavaCallback();\n\n\t\tfor (TestOutcome outcome : getTestOutcomeCollection()) {\n\t\t\tgetLog().debug(\"outcome: \" + outcome.toConciseString());\n\t\t}\n\n\t\tgetLog().info(\n\t\t\t\t\"All tests completed for submission \"\n\t\t\t\t\t\t+ projectSubmission.getSubmissionPK()\n\t\t\t\t\t\t+ \" for test setup \"\n\t\t\t\t\t\t+ projectSubmission.getTestSetupPK() + \": \"\n\t\t\t\t\t\t+ getTestOutcomeCollection().getAllOutcomes().size()\n\t\t\t\t\t\t+ \" outcomes recorded, \"\n\t\t\t\t\t\t+ getTestOutcomeCollection().getNumPassedOverall()\n\t\t\t\t\t\t+ \" passed, \"\n\t\t\t\t\t\t+ getTestOutcomeCollection().getNumFailedOverall()\n\t\t\t\t\t\t+ \" failed\");\n\t}", "public final boolean isDone() {\n\t\tboolean result = true;\n\t\tfor (String mdl : executors.keySet()) {\n\t\t\tSubstructureExecutorI exe = executors.get(mdl);\n\t\t\tresult = result && exe.stepIsDone();\n\t\t}\n\t\t// final int matlabWait = 200;\n\t\t// try {\n\t\t// log.debug(\"Waiting to return\");\n\t\t// Thread.sleep(matlabWait);\n\t\t// } catch (InterruptedException e) {\n\t\t// log.debug(\"HEY who woke me up?\");\n\t\t// }\n\t\treturn result;\n\t}", "@Test\n void isComplete() {\n }", "@Override\r\n\tpublic void onFinish(ISuite suite) {\n\t\tMap<String, ISuiteResult> results = suite.getResults();\r\n\t\tIterator<ISuiteResult> itestresults = results.values().iterator();\r\n\t\tSystem.out.println(\":::Cases passed::::::\"+itestresults.next().getTestContext().getPassedTests().size());\r\n\t}", "void done(boolean allSucceeded);", "public static boolean runAllTests() {\r\n\r\n return testLinkedCart() && testAlphabetListConstructorIsEmpty()\r\n && testAlphabetListConstructorBadInput() && testAlphabetListAddBadInput1()&&\r\n testAlphabetListAddBadInput2()&&testAlphabetListAddBadInput2()&&\r\n testAlphabetListAdd() && testAlphabetListRemove();\r\n }", "@Override\n public void done() {\n if (mDoneCalled) {\n return;\n }\n mDoneCalled = true;\n for (ITestInvocationListener listener : mListeners) {\n for (Entry<TestDescription, String> test : mTestResultCache.entrySet()) {\n listener.testStarted(test.getKey());\n if (SKIPPED_ENTRY.equals(test.getValue())) {\n listener.testIgnored(test.getKey());\n } else if (FAILED_ENTRY.equals(test.getValue())) {\n listener.testFailed(\n test.getKey(), mTestTraceCache.getOrDefault(test.getKey(), \"\"));\n } else if (test.getValue() != null) {\n // Report all unexpected test result as failed tests,\n // so they are not missed.\n listener.testFailed(test.getKey(), test.getValue());\n }\n listener.testEnded(test.getKey(), new HashMap<String, Metric>());\n }\n // If we have not seen any tests start, report a failure.\n // If this happens, there are presumably no test results,\n // so this must be outside the previous loop.\n if (!mSeenOneTestRunStart) {\n listener.testRunFailed(\n String.format(\n \"test did not report any run:\\n%s\",\n String.join(\"\\n\", mTrackLogsBeforeRunStart)));\n } else if (mNumTestsStarted > mNumTestsEnded) {\n listener.testRunFailed(\n String.format(\n \"Test run incomplete. Started %d tests, finished %d\",\n mNumTestsStarted, mNumTestsEnded));\n }\n }\n }", "protected boolean isAllJobsFinished() {\r\n \tIterator<Progress> jobsIterator = JobManager.iterator();\r\n \twhile (jobsIterator.hasNext()) {\r\n \t\tProgress job = jobsIterator.next();\r\n\t\t\tif (!job.isFinished()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n }", "public boolean runTests(CadseTest... cadseTest) {\n\t\tthis.cadseTests = cadseTest;\n\n\t\tthis.testCount = cadseTest.length;\n\t\tfor (CadseTest ct : cadseTest) {\n\t\t\tct.setCadseTestPlatform(this);\n\t\t}\n\t\tfor (CadseTest ct : cadseTest) {\n\t\t\tct.init();\n\t\t}\n\t\tif (compileAll()) {\n\t\t\tmessageTestSuiteResults();\n\t\t\treturn true;\n\t\t}\n\t\tfor (CadseTest ct : cadseTest) {\n\t\t\ttry {\n\t\t\t\tif (!ct.runTest()) {\n\t\t\t\t\tthis.testPassed++;\n\t\t\t\t\tct.status = 0;\n\t\t\t\t} else {\n\t\t\t\t\tthis.testFailed++;\n\t\t\t\t\tct.status = 1;\n\t\t\t\t}\n\t\t\t} catch (Throwable e) {\n\t\t\t\tSystem.out.println(\"TEST Exception \" + ct.getName());\n\t\t\t\te.printStackTrace();\n\t\t\t\tthis.testFailed++;\n\t\t\t\tct.status = 1;\n\t\t\t}\n\t\t\tmessageTestSuiteResults();\n\t\t}\n\t\tfinishTest();\n\n\t\treturn testPassed != testCount;\n\t}", "@Override\n\tpublic boolean done() {\n\t\tfor(Task t : details.getPendingTasks()){\n\t\t\tif(!t.isComplete())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean doTestsPass()\r\n {\r\n return minimalSteps(\"ABCDABCE\") == 8 && minimalSteps(\"ABCABCE\") == 5;\r\n }", "boolean hasFinished();", "private boolean needToExit(TestSuite suite){\n for (int i = 0; i < suite.testCount(); i++) {\n Test test = suite.testAt(i);\n if (test instanceof J2meTestCase) {\n if (((J2meTestCase)test).isExitAfterExecution()) {\n return true;\n } \n } else if (test instanceof TestSuite) {\n if (needToExit((TestSuite)test)) {\n return true;\n }\n }\n }\n return false;\n }", "public static boolean performTests()\n\t{\n\t\treturn basicBinaryStrTests() && advancedBinaryStrTests() && basicBinaryTests() && advancedBinaryTests();\n\t}", "private void waitFor(String serviceName, int parallelRuns) {\r\n\t\tfor (int i = 0; mockDbAccessor.getServiceCompletedContextStore(serviceName).size() < parallelRuns; i++) {\r\n\t\t\tif (i>=10000000) \r\n\t\t\t\tassertEquals(parallelRuns, mockDbAccessor.getServiceCompletedContextStore(serviceName).size());\r\n\t\t}\r\n\t}", "public Status waitUntilFinished();", "public void waitForFinish() {\n for(Future future : futures){\n try {\n future.get();\n } catch (InterruptedException | ExecutionException e) {\n LOGGER.error(\"ERROR\",e);\n }\n }\n }", "public static boolean wasSuccessful() {\n Result result = org.junit.runner.JUnitCore.runClasses(SimpleTest.class);\r\n return result.wasSuccessful();\r\n }", "static void completeTests(Container c, int seconds) throws InterruptedException {\n log.log(true, \"Waiting \" + seconds + \" seconds with \" + nTesters.intValue() + \" testers.\");\n long stop = System.currentTimeMillis() + (seconds * 1000);\n while (System.currentTimeMillis() < stop) {\n Thread.sleep(100);\n }\n // Stop the testers.\n testing = false;\n // Wait some more.\n while (nTesters.intValue() > 0) {\n Thread.sleep(100);\n }\n\n }", "public void finishTest() {\r\n\t\tlatch.countDown();\r\n\t}", "protected boolean isFinished() {\r\n if (state == STATE_SUCCESS) {\r\n // Success\r\n return true;\r\n }\r\n if (state == STATE_FAILURE) {\r\n // Failure\r\n return true;\r\n }\r\n return false;\r\n }", "@Test\n void displayCompletedTasks() {\n }", "protected boolean isFinished() {\n \t// wait for a time out\n return false;\n }", "boolean execute() throws InterruptedException {\r\n TptApiAccess tptApiAccess = new TptApiAccess(launcher, logger, exePaths,\r\n Utils.parseCommandLine(arguments), tptPort, tptBindingName, tptStartupWaitTime);\r\n boolean success = true;\r\n // We delete the JUnit results before iterating over the jenkinsConfigs\r\n if (workspace == null) {\r\n logger.error(\"No workspace available\");\r\n return false;\r\n }\r\n removeJUnitData(workspace);\r\n try {\r\n for (JenkinsConfiguration ec : executionConfigs) {\r\n success &= executeOneConfig(ec, tptApiAccess);\r\n }\r\n } finally {\r\n logger.info(\"Close open TPT project on master and slaves.\");\r\n if (!CleanUpTask.cleanUp(build, logger)) {\r\n logger.error(\"Could not close all open TPT files. \"\r\n + \"There is no guarantee next run will be be done with correct file version.\");\r\n success = false;\r\n }\r\n }\r\n return success;\r\n }", "boolean experimentCompleted();", "@Test\n public void testIsInWaitList() {\n }", "public void runTests() throws Exception {\n\t\tArrayList<KaidaComposer> als = getCrossOverPermutationTest();\r\n//\t\tArrayList<KaidaComposer> als = getMutationProbabilityTests();\r\n\t\t\r\n\t\tsynchronized (results) {\r\n\t\t\tresults.clear();\r\n\t\t\tfor (KaidaComposer al : als) {\r\n\t\t\t\tresults.add(new TestRunGenerationStatistics(nrOfContests,nrOfGenerations,al.getLabel(),al));\t\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tsetProgress(0f);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tfor (int runs = 0; runs < nrOfContests; runs++) {\r\n\t\t\t//run the test n times\r\n\t\t\t\r\n\t\t\t\tSystem.out.println(\"\\nContest Nr. \" + runs + \" started\");\r\n\t\t\t\tTimer t = new Timer(\"Contest Nr. \" + runs);\r\n\t\t\t\tt.start();\r\n\t\t\t\t\r\n\t\t\t\tfor (KaidaComposer algorithm : als) {\r\n\t\t\t\t\talgorithm.restartOrTakeOver();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor (int g = 0; g < nrOfGenerations; g++) {\r\n\t\t\t\t\t//do one evolution step\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (KaidaComposer algorithm : als) {\r\n\t\t\t\t\t\tif (algorithm.isCycleCompleted()) {\r\n\t\t\t\t\t\t\talgorithm.startNextCycle();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\talgorithm.doOneEvolutionCycle();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tt.stopAndPrint();\r\n\t\t\t\tt.start(\"Adding to results\");\r\n\t\t\t\tsynchronized (results) {\r\n\t\t\t\t\tfor (int z=0; z < als.size(); z++) {\r\n\t\t\t\t\t\tresults.get(z).addTestRun(als.get(z).getGenerations().getRange(0,nrOfGenerations));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tt.stopAndPrint();\r\n\t\t\t\tt.start(\"Calculating statistics\");\r\n\t\t\t\tsynchronized (results) {\r\n\t\t\t\t\tfor (int z=0; z < als.size(); z++) {\r\n\t\t\t\t\t\tresults.get(z).calculateStats();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tt.stopAndPrint();\r\n\t\t\t\t\r\n\t\t\t\tsetProgress((double)runs/(double)(nrOfContests-1));\r\n\t\t\t\t\r\n\t\t\t\tif (pause!=0) {\r\n\t\t\t\t\tsleep(pause);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (isPleasePause()) break;\r\n\t\t\t}\r\n\t\t\tsynchronized (results) {\r\n\t\t\t\tfor (int z=0; z < als.size(); z++) { //als.size()\r\n\t\t\t\t\tresults.get(z).calculateStats();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsetProgress(1.0f);\r\n\t\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t//fail(\"al threw some Exception\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t}", "public final boolean isFinished() {\n \t\tfor (StoppingCondition condition : stoppingConditions) {\n \t\t\tif (condition.isCompleted()) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}", "@Override\n public boolean isDone() {\n // boolean result = true;\n // try {\n // result = !evaluateCondition();\n // } catch (Exception e) {\n // logger.error(e.getMessage(), e);\n // }\n // setDone(true);\n // return result;\n // setDone(false);\n return false;\n }", "boolean isSetupDone();", "@Override\n\tprotected boolean isFinished() {\n\t\treturn done; \n\t}", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "protected boolean isFinished() {\n return true;\n }", "@Override\n\tpublic boolean done() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n return count > maxCount;\n }", "public boolean executeStudentTests() {\n\t\treturn this.executeStudentTests;\n\t}", "protected boolean isFinished()\n\t{\n\t\treturn true;\n\t}", "@And(\"^I wait for page to load completely$\")\n\tpublic void waitForCompleteLoading(){\n\t\tString result=selenium.synchronize();\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\n\t\treturn true;\n\t}", "protected boolean isFinished() {\r\n \tif (i >= 1 || i <= 1){\r\n \treturn true;\r\n \t}\r\n\t\treturn false;\r\n }", "void completed(TestResult tr);", "public boolean isDone() { return true; }", "boolean isFinished();", "public void onTestSuccess(ITestResult result) {\n\t\tlogger.info(\"Test case Done\");\n\t}", "@Test\n public void testNextWaiting() {\n }", "public boolean isFinished();", "void testFinished() {\n currentThreads.decrementAndGet();\n thread.interrupt();\n }", "Boolean isFinished();", "@Override\n protected boolean isFinished() {\n //calculate distances traveled on X and Y axes by averaging encoder values\n double xAvg = (double)(Robot.driveTrain.getFREncoder() + Robot.driveTrain.getBLEncoder()) / 2.0;\n double yAvg = (double)(Robot.driveTrain.getFLEncoder() + Robot.driveTrain.getBREncoder()) / 2.0;\n \n //some checks to see if the robot is within 100 encoder counts of the target\n boolean finishedX = (Math.abs(xDist - xAvg) < 100);\n boolean finishedY = (Math.abs(yDist - yAvg) < 100);\n\n //finished if X and Y are within 100 counts or if the command times out\n return ((finishedX && finishedY) || isTimedOut());\n }", "public boolean isFinished(){\n return true;\n }", "public boolean wasSuccessful() {\n return this.failureCount() == 0 && this.errorCount() == 0;\n }", "protected boolean isFinished(){\r\n return true;\r\n }", "public boolean finished() {\n\t\t\n\t\tfor ( int i = 0; i <this.num; i++) {\n\t\t\tif (this.car[i]!=null) {\n\t\t\t\tif (this.car[i].checkFinished()==false) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean isCompleted();", "@Override\n\tpublic void onTestSuccess(ITestResult result) {\n\t\tthread.get().log(Status.PASS, \"Pass\");\n\t}", "void endTests() {\n\t\tthis.progressBar.setProgress(1.0);\n\t\tthis.percent.setText(\"Done\");\n\t}", "public void allFinished() {\n\t}", "protected boolean isFinished() {\n \t//ends \n \treturn isTimedOut();\n }", "@Override\n public boolean isFinished() {\n return isDone;\n }", "@Override\n public boolean isFinished() {\n return isDone;\n }", "public boolean isDone();", "public boolean isDone();", "protected boolean isFinished() {\r\n\t\t \tboolean ans = false;\r\n\t\t \treturn ans;\r\n\t\t }", "public void checkFinish()\t{\n\t\tif(readCompareResult() == true)\t{\n\t\t\tfinished = true;\n\t\t}\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tprotected boolean isFinished() {\n\t\treturn true;\r\n\t}", "boolean isDone();", "@Override\n public boolean isFinished() {\n return complete;\n }", "protected boolean isFinished() {\n\n \tif(weAreDoneSenor == true) {\n\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n \t\n }", "boolean hasIsSuccess();", "public boolean hasFailures() {\n return this.hasFailures;\n }", "boolean isFinished() {\n return includedInLastStep() && (end == elementList.size() - 1);\n }", "@Override\n\tpublic boolean isFinished() {\n\t\treturn true;\n\t}", "boolean completed();", "public boolean isFinished() {\n return true;\n }", "private void waitUntilAllThreadsAreFinished() {\n int index = 1;\n\n while (true) {\n while (index <= noThread) {\n if (carry[index] == -1) {\n index = 1;\n } else {\n index++;\n }\n }\n break;\n }\n }", "public boolean isComplete() {\n return addedFrontWork.size() == 0 && addedBackWork.size() == 0 && sawAllDone.get();\n }", "private static boolean parallelTest() {\r\n\t\t// create a thread for each URL\r\n\t\tint threadPoolSize = urlList.size();\r\n\t\tlogger.finest(\"thread pool size = \" + threadPoolSize);\r\n\r\n\t\t//\r\n\t\t// open a background TCP connection\r\n\t\t// send parallel HTTP requests\r\n\t\t//\r\n\t\ttry (Socket backgroundSocket = new Socket(serverName, serverPort)) {\r\n\t\t\t// open IO sterams for background connection\r\n\t\t\tbackgroundSocket.getOutputStream();\r\n\t\t\tbackgroundSocket.getInputStream();\r\n\t\t\tlogger.info(\"background TCP connection opened\");\r\n\t\t\t\r\n\t\t\t// use ExecutorService to manage threads\r\n\t\t\tExecutorService executor = Executors.newFixedThreadPool(threadPoolSize);\r\n\t\t\t\r\n\t\t\t// send all rquests in parallel\r\n\t\t\tlogger.fine(\"sending parallel requests\");\r\n\t\t\tfor (URL url : urlList) { \r\n\t\t\t\tHttpClient client = new HttpClient(url);\r\n\t\t\t\texecutor.execute(client);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// wait for test to finish\r\n\t\t\tlogger.fine(\"waiting for requests to complete...\");\r\n\t\t\texecutor.shutdown(); \r\n\t\t\twhile (!executor.isTerminated())\r\n\t\t\t\tThread.yield(); // return the control to system\r\n\t\t\tlogger.fine(\"all requests completed\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.info(\"failed to open background TCP connection: \" + e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "boolean isComplete();", "boolean isComplete();", "@Override\n public boolean isFinished() {\n return true;\n }", "public static boolean doTestsPass()\r\n {\r\n\r\n boolean result = true;\r\n result = result && FindMin(new int[]{3,4,5,6,1,2}) == 1;\r\n result = result && FindMin(new int[]{2,1}) == 1;\r\n result = result && FindMin(new int[]{1}) == 1;\r\n\r\n try {\r\n FindMin(null);\r\n result = false;\r\n }\r\n catch(Exception e)\r\n {\r\n result = result && true;\r\n }\r\n\r\n if(result)\r\n {\r\n System.out.println(\"All tests pass\\n\");\r\n }\r\n else\r\n {\r\n System.out.println(\"There are test failures\\n\");\r\n }\r\n return result;\r\n }", "@Override\r\n\tpublic boolean results()\r\n\t{\r\n\t\treturn this.results(this.getRobot());\r\n\t}", "protected boolean isFinished() {\n return isTimedOut();\n }", "protected boolean isFinished() {\n\t\treturn isTimedOut();\n\t}", "@Test\n\tpublic void testIsOperationFinished_2()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tString aOperationID = \"\";\n\n\t\tboolean result = fixture.isOperationFinished(aOperationID);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "public boolean hasPassed()\n {\n return status == Status.PASSED || status == Status.SKIPPED;\n }", "@Test\n\tpublic void testIsOperationFinished_1()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tString aOperationID = \"\";\n\n\t\tboolean result = fixture.isOperationFinished(aOperationID);\n\n\t\t// add additional test code here\n\t\tassertTrue(result);\n\t}", "protected boolean isFinished() {\r\n return isTimedOut();\r\n }", "protected boolean isFinished()\n\t{\n\t\treturn false;\n\t}", "TestClassExecutionResult assertTestsExecuted(TestCase... testCases);", "private void runAllTests(){\n System.out.println(\"------ RUNNING TESTS ------\\n\");\n testAdd(); // call tests for add(int element)\n testGet(); // tests if the values were inserted correctly\n testSize(); // call tests for size()\n testRemove(); // call tests for remove(int index)\n testAddAtIndex(); // call tests for add(int index, int element)\n\n // This code below will test that the program can read the file\n // and store the values into an array. This array will then be sorted\n // by the insertionSort and it should write the sorted data back into the file\n\n testReadFile(); // call tests for readFile(String filename)\n testInsertionSort(); // call tests for insertionSort()\n testSaveFile(); // call tests for saveFile(String filename)\n System.out.println(\"\\n----- TESTING COMPLETE ----- \");\n }" ]
[ "0.7130816", "0.70446706", "0.6844897", "0.68248385", "0.6712966", "0.669581", "0.6617144", "0.6559182", "0.64990675", "0.6457154", "0.64469403", "0.64388204", "0.64287037", "0.6372279", "0.63591826", "0.62851626", "0.62733436", "0.6205568", "0.6204536", "0.6188372", "0.6183418", "0.61604124", "0.615448", "0.61521375", "0.6144385", "0.6135307", "0.61250967", "0.61210126", "0.60779905", "0.6073027", "0.606385", "0.6043556", "0.6023849", "0.6020224", "0.6017624", "0.6017624", "0.6017624", "0.6017624", "0.6017624", "0.6017624", "0.5993894", "0.59881574", "0.5987501", "0.5978264", "0.5952754", "0.593461", "0.593461", "0.593461", "0.59331125", "0.5931897", "0.59270316", "0.59229386", "0.59222674", "0.5922082", "0.5920978", "0.5904498", "0.589237", "0.5875205", "0.58750725", "0.5872616", "0.5870722", "0.5869644", "0.5865523", "0.58637375", "0.5863008", "0.5862101", "0.58588237", "0.58533466", "0.58533466", "0.58407605", "0.58407605", "0.58307916", "0.5822462", "0.58120596", "0.58120596", "0.58112484", "0.58106214", "0.58089757", "0.58026195", "0.5801501", "0.58001536", "0.57850516", "0.5780709", "0.57747555", "0.57735264", "0.5771944", "0.57666194", "0.57626855", "0.57626855", "0.5753943", "0.5751859", "0.5750573", "0.574559", "0.57372266", "0.573638", "0.57332313", "0.57326007", "0.57300305", "0.572547", "0.5724308", "0.57227176" ]
0.0
-1
Constructs a new ObjectPathElement.
public ObjectPathElement(Class<?> objectType, String fieldName) { this.objectType = objectType; this.fieldName = fieldName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ObjectElement createObjectElement();", "public PathElementIF createElement(String name);", "public final XPath constructPath(){\r\n \tif(path == null){\r\n \t\tpath = new XPath(getPathArray());\r\n \t}\r\n\t\treturn path;\r\n }", "Object create(Element element) throws IOException, SAXException, ParserConfigurationException;", "Element() {\n\t}", "DomainElement createDomainElement();", "public GenericElement() {\n\t}", "public XmlElement() {\n }", "RESTElement createRESTElement();", "public static final XMLPath createRoot() {\r\n return new XMLPath();\r\n }", "public PathBuilder() {\n\t\tthis( null, true );\n\t}", "public PathExpressionIF createPathExpression();", "public DPropertyElement() {\n super(null, null);\n }", "protected abstract M createNewElement();", "Element createElement();", "public XMLElement() {\n this(new Properties(), false, true, true);\n }", "public BaseElement() {\n }", "public abstract Object create(ElementMapping elementMapping, ReadContext context);", "E createDefaultElement();", "public GongDomObject(Element object) throws InvalidTagException {\r\n super(object);\r\n }", "BElement createBElement();", "ElementDefinition createElementDefinition();", "public RelationshipElement ()\n\t{\n\t\tthis(null, null);\n\t}", "@Override\n\tpublic Element newInstance() {\n\t\treturn null;\n\t}", "Object create(String uri) throws IOException, SAXException, ParserConfigurationException;", "@Test(expected=NullPointerException.class)\n\tpublic void constructPathTest1(){ \n\t\tNodeList n=xmlDocument.getElementsByTagName(null);\n\t\tManipulator.constructPath(n.item(0));\n\t}", "public Expression(Object ob) {\r\n\t\tthis();\r\n\t\taddElement(ob);\r\n\t}", "DataElement createDataElement();", "public AbstractElement() {\n }", "public String createObjectElement(String indent, String elementName, String id, String name) {\r\n StringBuilder sbuf = new StringBuilder(indent);\r\n sbuf.append(\"<\\\" id=\\\"\").append(id).append(\"\\\" \");\r\n sbuf.append(\"name=\\\"\").append(name).append(\"\\\" />\");\r\n return sbuf.toString();\r\n }", "public StringDt getPathElement() { \n\t\tif (myPath == null) {\n\t\t\tmyPath = new StringDt();\n\t\t}\n\t\treturn myPath;\n\t}", "@Test(expected=NullPointerException.class)\n\tpublic void constructPathTest2(){ \n\t\tNodeList n=xmlDocument.getElementsByTagName(\"c\");\n\t\tManipulator.constructPath(n.item(0));\n\t}", "public LinkElement() { }", "public Path(\n XRISegment... components\n ){\n \tthis(components.length, components);\n }", "public GongDomObject() throws ParserConfigurationException {\r\n super();\r\n \r\n // Remove the previous anchor\r\n Document document = getDocument();\r\n document.removeChild(document.getDocumentElement());\r\n \r\n // Create the default anchor element\r\n anchor = document.createElementNS(XmlConstants.NAMESPACE_URI, getTag().toString());\r\n document.appendChild(anchor);\r\n }", "public SVGModel() {\n \t\telementToModel = new HashMap<SVGElement, SVGElementModel>();\n \t\ttagNameToTagCount = new HashMap<String, Integer>();\n \t\tgrid = new Grid();\n \t}", "private OMElement createElement(String str) throws XMLStreamException {\n InputStream in = new ByteArrayInputStream(str.getBytes());\n return new StAXOMBuilder(in).getDocumentElement();\n }", "IFMLNamedElement createIFMLNamedElement();", "@org.junit.Test\n public void constrCompelemDoc1() {\n final XQuery query = new XQuery(\n \"element elem {., .}\",\n ctx);\n try {\n query.context(node(file(\"prod/CompAttrConstructor/DupNode.xml\")));\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertSerialization(\"<elem><root><child1><a>text</a><!--comment--><?pi content?></child1><child2><a>text</a><!--comment--><?pi content?></child2></root><root><child1><a>text</a><!--comment--><?pi content?></child1><child2><a>text</a><!--comment--><?pi content?></child2></root></elem>\", false)\n );\n }", "public interface PathExpressionFactoryIF {\n /**\n * INTERNAL: Create a new, empty path expression.\n * \n * @return a newly created path expression\n */\n public PathExpressionIF createPathExpression();\n\n /**\n * INTERNAL: Create a new Variable.\n * \n * @param decl the declaration for the variable.\n * @return a new variable.\n */\n public VariableIF createVariable(VariableDecl decl);\n\n /**\n * INTERNAL: Create a new Topic literal.\n * \n * @param type the type how a topic literal is specified.\n * @param id the identifier for this topic.\n * @return a new topic literal.\n */\n public PathElementIF createTopic(String type, String id);\n\n /**\n * INTERNAL: Create a new path expression element based on the given name.\n * \n * @param name the type of path element to be created.\n * @return a new path expression element.\n */\n public PathElementIF createElement(String name);\n}", "private GraphObject instantiateGraphObject( String tagname ) {\n// Global.info( \"Instantiating object of type \" + tagname );\n if ( CharGerXMLTagNameToClassName.isEmpty() ) {\n loadCharGerKeyWordToClassTable();\n }\n String t = CharGerXMLTagNameToClassName.getProperty( tagname, \"DUMMY\" );\n if ( t.equals( \"DUMMY\" ) ) {\n return null;\n }\n\n GraphObject go = null;\n Class objClass = null;\n try {\n objClass = Class.forName( \"charger.obj.\" + t );\n go = (GraphObject)objClass.newInstance();\n } catch ( ClassNotFoundException ex ) {\n Global.error( \"Parsing an illegal object tag \" + tagname );\n } catch ( InstantiationException ex ) {\n Global.error( \"Parsing an illegal object tag \" + tagname );\n } catch ( IllegalAccessException ex ) {\n Global.error( \"Parsing an illegal object tag \" + tagname );\n }\n\n return go;\n }", "public Path(\n String[] components\n ){\n \tthis(components.length, XRISegment.valueOf(components));\n }", "public WebElement() {}", "public Element(String name) {\n\t\tsetName(name);\n\t}", "public static Element serialize( SerializationPosition state) {\n Element doc = state.doc;\n DefaultMutableTreeNode treeNode = state.currPos;\n \n Object value = treeNode.getUserObject();\n Element parentElement = null; \n \n parentElement = doc.getOwnerDocument().createElement(\"directory\");\n\n \n // Apply properties to root element...\n Attr attrName = doc.getOwnerDocument().createAttribute(\"name\");\n attrName.setNodeValue(state.currPos.toString());\n parentElement.getAttributes().setNamedItem(attrName);\n \n return parentElement;\n }", "OurIfcElement createOurIfcElement();", "public AntObject add(String name)\n\t\t\tthrows TablesawException\n\t\t{\n\t\tAntObject ret = new AntObject(name);\n\t\tret.setAntProject(m_project);\n\t\t\n\t\ttry\n\t\t\t{\n\t\t\tIntrospectionHelper.Creator creator = m_intHelper.getElementCreator(\n\t\t\t\t\tm_project, \"\", m_antObject, name, null);\n\t\t\t\t\t\n\t\t\tret.setAntObject(creator.create());\n\t\t\tcreator.store();\n\t\t\tret.init();\n\t\t\t}\n\t\tcatch (IllegalArgumentException iae)\n\t\t\t{\n\t\t\tthrow new TablesawException(iae);\n\t\t\t}\n\t\tcatch (Exception e)\n\t\t\t{\n\t\t\tthrow new TablesawException(\"Error setting element '\"+name+\"' on '\"+m_elementName+\"'\", e);\n\t\t\t}\n\t\t\t\n\t\treturn (ret);\n\t\t}", "public XMLElement(String fullName)\n/* */ {\n/* 101 */ this(fullName, null, null, -1);\n/* */ }", "protected SVGOMFETurbulenceElement() {\n\t}", "public Element(Element element) {\n\t\tElement src = element.clone();\n\n\t\tthis.attributes = src.attributes;\n\t\tthis.name = src.name;\n\t\tthis.defxmlns = src.defxmlns;\n\t\tthis.xmlns = src.xmlns;\n\t\tthis.children = src.children;\n\t}", "public SiacTCronopElem() {\n\t}", "public DcObjectPart() {\n super(DcModules._OBJECTPART);\n }", "public SimpleGeometricObject() {\r\n this.dateCreated = new java.util.Date();\r\n }", "public CwmDimensionedObject createCwmDimensionedObject();", "private Element getRequestElement(String operationName) {\n\t\tDocument doc = documentBuilder.newDocument();\r\n\t\tdoc.setDocumentURI(NAMESPACE_URI);\r\n\t\t// Create the root element\r\n\t\tElement requestElement = doc.createElementNS(NAMESPACE_URI,\r\n\t\t\t\toperationName);\r\n\t\t// Element requestElement = doc.createElement(operationName);\r\n\t\tdoc.appendChild(requestElement);\r\n\t\t// Return it\r\n\t\treturn requestElement;\r\n\t}", "@Override\n\tprotected Node newNode() {\n\t\treturn new SVGOMFETurbulenceElement();\n\t}", "public Path() {\n this.fieldPath = new ArrayList<IField>()/*empty*/;\n }", "public WModelObject getElementObject()\n\t{\n\t\tWModelObject elementObject = null;\n\n\t\ttry\n\t\t{\n\t\t\t//Class objClass = Class.forName(m_elementObjectClassName);\n\t\t\t//elementObject = (WModelObject)objClass.newInstance();\n\t\t\t//elementObject.setParent(this);\n\t\t\t//return elementObject;\n\n\t\t\tClass modelObjectClass = Class.forName(m_elementObjectClassName);\n\t\t\tClass[] parameterClass = {Class.forName(\"java.lang.String\"), Class.forName(\"java.lang.String\")};\n\t\t\tConstructor constructor = modelObjectClass.getConstructor(parameterClass);\n\t\t\tObject[] parameterObj = {\"\", getImplTypeName()}; //the first parameter is blank to indicate no driver\n\t\t\t\t\t\t\t\t\t //provided this model object\n\t\t\telementObject = (WModelObject)constructor.newInstance(parameterObj);\n\t\t\telementObject.setParent(this);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (NoSuchMethodException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Cannot load element object class for WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (InvocationTargetException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Cannot load element object class for WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (ClassNotFoundException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Cannot load element object class for WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (InstantiationException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Cannot instantiate element object in WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (IllegalAccessException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Illegal access when instantiating element object in WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t}", "private Doc(String documentElementName) {\n e = d.createElement(documentElementName);\n d.appendChild(e);\n }", "public Triple createPath(Expression subject, Atom predicate, Expression object, Expression exp){\t\t\r\n\t\tTriple t = Triple.create(subject, predicate, object);\r\n\t\t// property path or xpath\r\n\t\tVariable var = t.getVariable();\r\n\t\tif (var == null){\r\n\t\t\tvar = new Variable(SYSVAR + nbd++);\r\n\t\t\tvar.setBlankNode(true);\r\n\t\t\tt.setVariable(var);\r\n\t\t}\r\n\t\tif (exp.getName().equals(Term.XPATH)){\r\n\t\t\tt.setRegex(exp);\r\n\t\t\treturn t;\r\n\t\t}\r\n\r\n\t\tvar.setPath(true);\r\n\t\tString mode = \"\";\r\n\t\tboolean isDistinct = false, \r\n\t\t\t\tisShort = false;\r\n\r\n\t\twhile (true){\r\n\t\t\tif (exp.isFunction()){\r\n\r\n\t\t\t\tif (exp.getName().equals(DISTINCT)){\r\n\t\t\t\t\texp = exp.getArg(0);\r\n\t\t\t\t\t//mode += DISTINCT;\r\n\t\t\t\t\tisDistinct = true;\r\n\t\t\t\t}\r\n\t\t\t\telse if (exp.getName().equals(SSHORT)){\r\n\t\t\t\t\texp = exp.getArg(0);\r\n\t\t\t\t\tmode += \"s\";\r\n\t\t\t\t\tisShort = true;\r\n\t\t\t\t}\r\n\t\t\t\telse if (exp.getName().equals(SSHORTALL) || exp.getName().equals(SHORT)){\r\n\t\t\t\t\texp = exp.getArg(0);\r\n\t\t\t\t\tmode += \"sa\";\r\n\t\t\t\t\tisShort = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse break;\r\n\t\t\t}\r\n\t\t\telse break;\r\n\t\t}\r\n\r\n\r\n\t\texp.setDistinct(isDistinct);\r\n\t\texp.setShort(isShort);\r\n\t\tt.setRegex(exp);\r\n\t\tt.setMode(mode);\r\n\r\n\t\treturn t;\r\n\r\n\t}", "@Override\n @Deprecated\n public Object clone(\n ) { \n return new Path(this);\n }", "@org.junit.Test\n public void constrCompelemNested2() {\n final XQuery query = new XQuery(\n \"element elem {}\",\n ctx);\n try {\n query.context(node(file(\"prod/CompAttrConstructor/DupNode.xml\")));\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertSerialization(\"<elem/>\", false)\n );\n }", "public XMLElement(String fullName, String namespace, String systemID, int lineNr)\n/* */ {\n/* 144 */ this.attributes = new Vector();\n/* 145 */ this.children = new Vector(8);\n/* 146 */ this.fullName = fullName;\n/* 147 */ if (namespace == null) {\n/* 148 */ this.name = fullName;\n/* */ } else {\n/* 150 */ int index = fullName.indexOf(':');\n/* 151 */ if (index >= 0) {\n/* 152 */ this.name = fullName.substring(index + 1);\n/* */ } else {\n/* 154 */ this.name = fullName;\n/* */ }\n/* */ }\n/* 157 */ this.namespace = namespace;\n/* 158 */ this.content = null;\n/* 159 */ this.line = lineNr;\n/* 160 */ this.systemID = systemID;\n/* 161 */ this.parent = null;\n/* */ }", "Node(String e){\r\n this.element = e;\r\n }", "OBJECT createOBJECT();", "private Path(\n\t\tint size,\n\t\tXRISegment... components\n ) {\n \tthis(\n \t\tsize == 0 ? null : size == 1 ? ROOT : new Path(size - 1, components),\n \t\tsize == 0 ? null : components[size - 1]\n \t);\n }", "protected XMLElement createAnotherElement() {\n return new XMLElement(this.conversionTable,\n this.skipLeadingWhitespace,\n false,\n this.ignoreCase);\n }", "public GeometricObject() {\n dateCreated = new java.util.Date();\n }", "private SankeyElementOptionsFactory(String elementKeyAsString) {\n\t\t\tsuper(elementKeyAsString);\n\t\t}", "ViewElement createViewElement();", "public AntObject add(String name, Object value)\n\t\t\tthrows TablesawException\n\t\t{\n\t\tAntObject ret = new AntObject(name);\n\t\tret.setAntProject(m_project);\n\t\tret.setAntObject(value);\n\t\tret.init();\n\t\ttry\n\t\t\t{\n\t\t\tMethod m = m_intHelper.getElementMethod(name);\n\t\t\t//System.out.println(m.toString());\n\t\t\tm.invoke(m_antObject, value);\n\t\t\t}\n\t\tcatch (IllegalArgumentException iae)\n\t\t\t{\n\t\t\tthrow new TablesawException(iae);\n\t\t\t}\n\t\tcatch (Exception e)\n\t\t\t{\n\t\t\tthrow new TablesawException(\"Error setting element '\"+name+\"' on '\"+m_elementName+\"'\", e);\n\t\t\t}\n\t\t\t\n\t\treturn (ret);\n\t\t}", "private Element createXmlElementForObject(ObjectExtValue object, Document xmlDocument, Constraint constraint) {\n\t\tElement element = xmlDocument.createElement(XML_OBJECT);\n\t\t\n\t\tArrayList<NameValuePair> pairs = new ArrayList<NameValuePair>();\n\t\tfor (Iterator<Map.Entry<Value,Value>> iter = ((EntrySet) object.entrySet()).iterator(); iter.hasNext(); ) {\n\t\t\tMap.Entry<Value, Value> pair = iter.next();\n\t\t\tpairs.add(new NameValuePair(pair.getKey(), pair.getValue()));\n\t\t}\n\t\t\t\n\t\tCollections.sort(pairs, SortNameValuePairByName.inst);\n\t\t\n\t\tfor (NameValuePair pair : pairs) {\n\t\t\tElement childElement = createXmlElementForNameValuePair(pair.getName(), pair.getValue(), xmlDocument, constraint);\n\t\t\tif (childElement != null)\n\t\t\t\telement.appendChild(childElement);\n\t\t}\n\n\t\treturn (element.hasChildNodes() ? element : null);\n\t}", "BElementStructure createBElementStructure();", "private void buildObject(Element current) {\n\t\tList<Element> children = current.getChildren();\n\t\tIterator<Element> iterator = children.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElement child = iterator.next();\n\t\t\tString category = child.getAttributeValue(\"description\");\n\t\t\tString reference = child.getAttributeValue(\"reference\");\n\n\t\t\tEplusObject ob = new EplusObject(category, reference);\n\t\t\tprocessFields(child, ob);\n\t\t\tobjects.add(ob);\n\t\t}\n\t}", "@FactoryFunc\r\n\t@Function Element createElement(String tagName);", "public BeanPath(BeanPathElement beanPathElement) {\n addBeanPathElement(beanPathElement);\n }", "ProductUnit() {\n _elements = new Element[0];\n }", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "public StringDt getXpathElement() { \n\t\tif (myXpath == null) {\n\t\t\tmyXpath = new StringDt();\n\t\t}\n\t\treturn myXpath;\n\t}", "public BasicElementList() {\n\t}", "public static Expression buildFromDOM( Element element ) throws FilterConstructionException {\n\n // check if root element's name is a known expression\n String name = element.getLocalName();\n int id = ExpressionDefines.getIdByName( name );\n Expression expression = null;\n\n switch (id) {\n case ExpressionDefines.EXPRESSION: {\n break;\n }\n case ExpressionDefines.PROPERTYNAME: {\n expression = PropertyName.buildFromDOM( element );\n break;\n }\n case ExpressionDefines.LITERAL: {\n expression = Literal.buildFromDOM( element );\n break;\n }\n case ExpressionDefines.FUNCTION: {\n expression = Function.buildFromDOM( element );\n break;\n }\n case ExpressionDefines.ADD:\n case ExpressionDefines.SUB:\n case ExpressionDefines.MUL:\n case ExpressionDefines.DIV: {\n expression = ArithmeticExpression.buildFromDOM( element );\n break;\n }\n default: {\n throw new FilterConstructionException( \"Unknown expression '\"\n + name + \"'!\" );\n }\n }\n return expression;\n }", "public static Element newRootElement()\n {\n Element element = null;\n \n try\n {\n javax.xml.parsers.DocumentBuilderFactory factory =\n javax.xml.parsers.DocumentBuilderFactory.newInstance();\n \n javax.xml.parsers.DocumentBuilder builder =\n factory.newDocumentBuilder();\n \n Document document = builder.newDocument();\n Element holder = document.createElement(\"root\");\n document.appendChild(holder);\n element = document.getDocumentElement();\n }\n catch(Exception ex) { ex.printStackTrace(); }\n \n return element;\n }", "public void testConstructor() throws Exception {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject object2 = createObject(\"object:ob2\", TYPE_NUMBER);\r\n ConfigurationObject object3 = createObject(\"something\", TYPE_OBJECT);\r\n\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n ConfigurationObject params2 = new DefaultConfigurationObject(\"params\");\r\n\r\n params1.addChild(createParamReference(1, \"object:ob2\"));\r\n params1.addChild(createParamReference(2, \"something\"));\r\n\r\n params2.addChild(createParamReference(1, \"something\"));\r\n\r\n object1.addChild(params1);\r\n object2.addChild(params2);\r\n\r\n root.addChild(object3);\r\n root.addChild(object1);\r\n root.addChild(object2);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification objectSpecification1 = specificationFactory.getObjectSpecification(\r\n \"object\", \"ob1\");\r\n\r\n assertEquals(\"SpecType should be complex.\", ObjectSpecification.COMPLEX_SPECIFICATION,\r\n objectSpecification1.getSpecType());\r\n\r\n Object[] params = objectSpecification1.getParameters();\r\n ObjectSpecification param1 = (ObjectSpecification) params[0];\r\n ObjectSpecification param2 = (ObjectSpecification) params[1];\r\n\r\n assertEquals(\"Object 'ob1' should have 2 params.\", 2, params.length);\r\n assertTrue(\"SpecType of params should be complex.\", param1.getSpecType().equals(\r\n ObjectSpecification.COMPLEX_SPECIFICATION)\r\n && param2.getSpecType().equals(ObjectSpecification.COMPLEX_SPECIFICATION));\r\n assertEquals(\"Element should be object:ob2.\", specificationFactory.getObjectSpecification(\r\n \"object\", \"ob2\"), param1);\r\n assertEquals(\"Element should be something.\", specificationFactory.getObjectSpecification(\r\n \"something\", null), param2);\r\n\r\n params = param1.getParameters();\r\n param1 = (ObjectSpecification) params[0];\r\n assertEquals(\"Object 'ob2' should have 1 param.\", 1, params.length);\r\n assertEquals(\"SpecType of param should be complex.\",\r\n ObjectSpecification.COMPLEX_SPECIFICATION, param1.getSpecType());\r\n assertEquals(\"Element should be something.\", specificationFactory.getObjectSpecification(\r\n \"something\", null), param1);\r\n }", "public Element createElement(String namespaceURI, String qualifiedName,\n Attributes attributes, Element parent);", "public org.ccsds.moims.mo.mal.structures.Element createElement()\n {\n return new BasicUpdate();\n }", "CollectionReferenceElement createCollectionReferenceElement();", "public PathAdapter() {\n }", "public WalkerDocument newDocument() { return newDocument((IOptions)null); }", "public XObject(){\r\n }", "public ElementoInicial() {\r\n\t\tsuper();\r\n\t}", "public Elemento crearElementos(String contenido) {\n\t\tTitulo unTitulo = new Titulo();\n\t\tSubTitulo unSubTitulo = new SubTitulo();\n\t\tImagen unaImagen = new Imagen();\n\t\tSeccion unaSeccion = new Seccion();\n\t\tLista unaLista = new Lista();\n\t\tTextoPlano textoPlano = new TextoPlano();\n\n\t\t// Se agregan los elementos a la cadena\n\t\tthis.setSiguiente(unTitulo);\n\t\tunTitulo.setSiguiente(unSubTitulo);\n\t\tunSubTitulo.setSiguiente(unaImagen);\n\t\tunaImagen.setSiguiente(unaSeccion);\n\t\tunaSeccion.setSiguiente(unaLista);\n\t\tunaLista.setSiguiente(textoPlano);\n\n\t\tElemento elemento = this.siguiente.crearElemento(contenido);\n\n\t\treturn elemento;\n\t}", "public ElementObjectSupport(ContainerI c, Element element) {\r\n\t\tthis(c, null, element);\r\n\t}", "public IPrivateTestCompView.IContextElement createAndAddContextElement() {\r\n return (IPrivateTestCompView.IContextElement)createAndAddElement();\r\n }", "public ObjectFactory() {\n super(grammarInfo);\n }", "Object build();", "ElementImage createElementImage();", "private Shape createPath(final Geometry geom) {\n return new LiteShape(geom, true, maxDistance);\n }", "public View create(Element elem) {\n return null;\n }", "public static JsonObjectBuilder object() {\n return new JsonObjectBuilder();\n }", "HTMLElement createHTMLElement();" ]
[ "0.70850277", "0.6739133", "0.6542059", "0.59092754", "0.58173156", "0.5778355", "0.57508177", "0.5708249", "0.57044274", "0.5671522", "0.56586754", "0.5582411", "0.55078936", "0.5497245", "0.5463118", "0.5437476", "0.5434621", "0.5434275", "0.5404782", "0.53799206", "0.537473", "0.5322241", "0.5295588", "0.5288171", "0.5288136", "0.5285742", "0.5272447", "0.52709115", "0.5261163", "0.52527446", "0.52440774", "0.5234745", "0.52229226", "0.5222785", "0.5215962", "0.5164321", "0.51495403", "0.5126753", "0.5121264", "0.51100165", "0.50918067", "0.5087906", "0.50799364", "0.5074088", "0.5057119", "0.50266665", "0.50146633", "0.49969068", "0.49952352", "0.4979658", "0.49737415", "0.4969987", "0.4965409", "0.4959754", "0.4959519", "0.49534154", "0.49520636", "0.49484238", "0.49475804", "0.49446252", "0.4936103", "0.49342135", "0.49340045", "0.49299634", "0.4928466", "0.49265152", "0.4923025", "0.49173418", "0.49154103", "0.4912398", "0.4911933", "0.4911065", "0.49077275", "0.49013042", "0.48930266", "0.4892588", "0.48747298", "0.48648295", "0.48604804", "0.48554182", "0.48514047", "0.48422965", "0.4826817", "0.48261124", "0.4821986", "0.482166", "0.4820447", "0.4816901", "0.48123378", "0.4811923", "0.4808965", "0.48072752", "0.48009193", "0.47954643", "0.4793287", "0.47915158", "0.47870934", "0.478646", "0.47857824", "0.47819582" ]
0.5305145
22
Returns the object type.
public Class<?> getObjectType() { return objectType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tpublic Class getObjectType()\n\t{\n\t\tObject obj = getObject();\n\t\tif (obj == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn obj.getClass();\n\t}", "public ObjType getType () {\n\t\tif (type == null) {\n\t\t\ttype = Virtue.getInstance().getConfigProvider().getObjTypes().list(id);\n\t\t}\n\t\treturn type;\n\t}", "@Override\n public Class<?> getObjectType() {\n return this.type;\n }", "public String getType() {\n return (String) getObject(\"type\");\n }", "public String objectTypeName()\r\n {\r\n return mObjectTypeName;\r\n }", "public Object getType()\r\n {\r\n\treturn type;\r\n }", "public Type<O> getObjectType()\n\t{\n\t\treturn this.getSettings().getObjectType();\n\t}", "public short getObjtype() {\n\treturn objtype;\n}", "public String getType() {\r\n return this.getClass().getName();\r\n }", "public Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "public String getObjectTypeId();", "public Byte getObjectType() {\n return objectType;\n }", "public Class getType();", "public Class getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "public final String getType() {\n return this.getClass().getName();\n }", "type getType();", "public java.lang.String getSobjectType() {\r\n return sobjectType;\r\n }", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public final String getObjectType() {\n\n\t\tif (JsUtils.getNativePropertyString(this, \"beanName\") == null) return \"JavaScriptObject\";\n\t\treturn JsUtils.getNativePropertyString(this, \"beanName\");\n\n\t}", "public ModelObjectType getType() {\n return type;\n }", "@Override\n\tpublic Type getType() {\n\t\treturn heldObj.getType();\n\t}", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();" ]
[ "0.81239474", "0.80536014", "0.7633121", "0.7552473", "0.75394803", "0.7488839", "0.74309444", "0.7391088", "0.7362361", "0.7338078", "0.732524", "0.732524", "0.732524", "0.732524", "0.732524", "0.732524", "0.732524", "0.732524", "0.732524", "0.732524", "0.732524", "0.73240423", "0.7305274", "0.730366", "0.7282985", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72762924", "0.72479624", "0.72443247", "0.7234792", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.72181535", "0.720591", "0.720591", "0.720591", "0.720591", "0.720591", "0.720591", "0.720591", "0.720591", "0.720591", "0.720591", "0.720591", "0.720591", "0.720591", "0.71940595", "0.71633613", "0.7160293", "0.7119934", "0.7119934", "0.7119934", "0.7119934", "0.7119934", "0.7119934", "0.7119934", "0.7119934", "0.7119934", "0.7119934", "0.7119934" ]
0.7764438
2
Returns the name of the field of the object type.
public String getFieldName() { return fieldName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getName(){\n return field.getName();\n }", "public String getFieldName(Class<?> type, String fieldName);", "String getFieldName();", "public String getFieldName();", "protected String get_object_name() {\n\t\treturn this.fieldname;\n\t}", "public String getFieldName() {\n int index = getFieldIndex();\n if (index == 0)\n return null;\n\n ComplexEntry entry = (ComplexEntry) getPool().getEntry(index);\n String name = entry.getNameAndTypeEntry().getNameEntry().getValue();\n if (name.length() == 0)\n return null;\n return name;\n }", "public String getTypeName() {\n\t\t\t\tif (_type.equals(TYPE_OBJECT)) {\n\t\t\t\t\treturn StringUtils.capitalize(_name);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn _type;\n\t\t\t}", "public String getFieldTypeName() {\n int index = getFieldIndex();\n if (index == 0)\n return null;\n\n ComplexEntry entry = (ComplexEntry) getPool().getEntry(index);\n String name = getProject().getNameCache().getExternalForm(entry.\n getNameAndTypeEntry().getDescriptorEntry().getValue(), false);\n if (name.length() == 0)\n return null;\n return name;\n }", "String getJavaFieldName();", "public String getFieldName() {\n return TF_Field_Name;\n }", "public String getFieldName()\n {\n return m_strFieldName;\n }", "public java.lang.String getFieldName() {\n return fieldName;\n }", "public String getName() {\n return type.toString();\n }", "@Override\n public String name() {\n return fieldName;\n }", "public String getFieldName() {\r\n return this.strFieldName;\r\n }", "public String getTypeName() {\r\n return typeId.getSQLTypeName();\r\n }", "public String getTypeName() {\n return type.name();\n }", "public String getFieldName() {\n return m_fieldName;\n }", "@Override\n\tpublic String getFieldName()\n\t{\n\t\treturn fieldName;\n\t}", "public String getFieldName() {\n return fieldName;\n }", "default String getTypeName() {\n JdlFieldEnum type = getType();\n return switch (type) {\n case ENUM -> getEnumEntityName()\n .orElseThrow(() -> new IllegalStateException(\"An enum field must have its enum entity name set\"));\n default -> ((\"UUID\".equals(type.name())) ? type.name() : type.toCamelUpper());\n };\n }", "public String getFieldname(){\n\t\treturn sFeldname;\n\t}", "public String getFieldName() {\n return this.fieldName;\n }", "public String getFieldName()\n\t{\n\t\treturn fieldName;\n\t}", "protected String getFieldName(java.lang.reflect.Field fld){\r\n\t\treturn _getFieldName(fld,true);\r\n\t}", "public String getName() {\n return (String) mProperties.get(FIELD_NAME);\n }", "public String getDTypeName() {\n return DTYPE.getName(this.dtype);\n }", "public String getTypeName() {\n Class type = getType();\n if (type == null)\n return null;\n return type.getName();\n }", "public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }", "public java.lang.String getFieldType() {\n return fieldType;\n }", "PropertyName getName();", "public String get_fieldname() throws Exception {\n\t\treturn this.fieldname;\n\t}", "@Override\n public String getName() {\n return type.getName();\n }", "public String getField() {\n return field;\n }", "public String objectTypeName()\r\n {\r\n return mObjectTypeName;\r\n }", "public String getNameField() {\n if (nameField == null || Constants.EMPTY_STRING.equals(nameField)) {\n final JSONArray dataFields = rawData.optJSONArray(Constants.FIELDS_FIELD);\n if (dataFields != null) {\n for (int i = 0; i < dataFields.length(); i++) {\n final JSONObject field = dataFields.optJSONObject(i);\n if (field != null) {\n boolean nameFieldPresent = field.optBoolean(Constants.NAMEFIELD_FIELD);\n if (nameFieldPresent) {\n nameField = field.optString(Constants.NAME_FIELD);\n }\n }\n }\n }\n }\n return nameField;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getTypeName();", "public final String gettypeName() {\n\t\treturn this.typeNameField;\n\t}", "public String getTypeName();", "public String getTypeName();", "public String getField()\n {\n return field;\n }", "public String toString()\n\t{\n\t\treturn fieldname;\n\t}", "public String field() {\n\t\treturn \"_\"+methodBase();\n\t}", "public String ofType() {\n\t\t return name;\n\t}", "Object getObjectField();", "String getField();", "default String lambdaFieldName(T bean) {\n SerializedLambda serializedLambda = serialized();\n if (MethodHandleInfo.REF_invokeVirtual != serializedLambda.getImplMethodKind()) {\n throw new RuntimeException(\"unsupported lambda impl method kind \" + serializedLambda.getImplMethodKind()\n + \". Only work for [Class::Method] struct's lambda\");\n }\n String getter = serializedLambda.getImplMethodName();\n String fieldName = getter;\n if (getter.startsWith(\"get\")) {\n fieldName = Introspector.decapitalize(getter.substring(3));\n } else if (getter.startsWith(\"is\")) {\n String guessFieldName = Introspector.decapitalize(getter.substring(2));\n if (null == bean) {\n fieldName = guessFieldName;\n } else {\n try {\n bean.getClass().getDeclaredField(getter);\n fieldName = getter;\n } catch (NoSuchFieldException e) {\n // ignore substring when the field name is \"isXxx\"\n fieldName = guessFieldName;\n }\n }\n }\n return fieldName;\n }", "public String getNameForReflection() {\n return this.mNameForReflection;\n }", "public java.lang.String getFieldDBType() {\n return fieldDBType;\n }", "public String getName() {\n if (clazz != null) {\n if (clazz.isArray()) {\n return arrayName(clazz);\n }\n return clazz.getName();\n }\n if (elementType != null) {\n return elementType.getName();\n }\n return name;\n }", "java.lang.String getField1335();", "public String getFieldDeclarerName() {\n int index = getFieldIndex();\n if (index == 0)\n return null;\n\n ComplexEntry entry = (ComplexEntry) getPool().getEntry(index);\n String name = getProject().getNameCache().getExternalForm(entry.\n getClassEntry().getNameEntry().getValue(), false);\n if (name.length() == 0)\n return null;\n return name;\n }", "public QName getFieldElementType() {\n return fieldElementType;\n }", "public String getFieldType()\n {\n return m_strFieldType;\n }", "String getPropertyName();", "public String getTypeName() {\n return typeName;\n }", "public String getTypeName() {\n return typeName;\n }", "public String getTypeName() {\n return typeName;\n }", "public String getTypeName() {\n return typeName;\n }", "java.lang.String getField1610();", "public String getPropertyName();", "public String getTypeName() {\n \treturn typeName;\n }", "protected String _getFieldName(java.lang.reflect.Field fld, boolean rich){\r\n\t\tString name=fld.getName();\r\n\t\tif (fld.isAnnotationPresent(IndexKey.class)) {\r\n\t\t\tif (rich) name=INDEX_+name;\r\n\t\t} \r\n\t\telse\r\n\t\tif (fld.isAnnotationPresent(NumIndex.class)) {\r\n\t\t\tif (rich) name=NUMINDEX_+name;\r\n\t\t} \r\n\t\telse\r\n\t\tif (fld.isAnnotationPresent(FullBody.class)) {\r\n\t\t\tif (rich) name=FULLBODY_+name;\r\n\t\t} \r\n\t\telse\r\n\t\tif (fld.isAnnotationPresent(CategoryKey.class)) {\r\n\t\t\tif (rich) name=CATEGORY_+name;\r\n\t\t} \r\n\t\telse \r\n\t\tif (fld.isAnnotationPresent(FullText.class)) {\r\n\t\t\tif (rich) name=FULLTEXT_+name;\r\n\t\t} \r\n\t\telse \r\n\t\tif (fld.isAnnotationPresent(DateIndex.class)) {\r\n\t\t\tif (rich) name=DATEINDEX_+name;\r\n\t\t} \r\n\t\telse \r\n\t\tif (fld.isAnnotationPresent(TimestampIndex.class)) {\r\n\t\t\tif (rich) name=TIMESTAMP_+name;\r\n\t\t}\r\n\t\treturn name;\r\n\t}", "public String getTypeName()\n {\n return this.typeName;\n }", "public String getFieldType()\n\t{\n\t\treturn fieldType;\n\t}", "public String getTypeName() {\r\n\t\treturn typeName;\r\n\t}", "String getBoxedTypeNameString() {\n return type.getBoxedTypeNameString();\n }", "public String getFieldName(int nFieldIndex) {\n\treturn null;\n}", "java.lang.String getField1542();", "public String getDisplayName() {\n return typeElement.getQualifiedName().toString();\n }", "public java.lang.String getTypeName()\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(TYPENAME$6);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getTypeName() {\n\t\t\treturn this.TypeName;\n\t\t}", "public String getTypeName() {\n\t\t\treturn this.TypeName;\n\t\t}", "public String getFieldName() { return databaseFieldName; }", "java.lang.String getField1334();", "java.lang.String getField1031();", "java.lang.String getField1337();", "java.lang.String getField1742();", "public String getTypeName() {\n return this.typeName;\n }", "public String typeName() {\n return typeName;\n }", "@Basic @Immutable\n\t public String getTypeName() {\n\t\t return typeName;\n\t }", "public String getName() {\n/* */ return this.field_176894_i;\n/* */ }", "java.lang.String getField1588();", "public String getTypeName() {\n\t\treturn this.typeName;\n\t}", "java.lang.String getField1336();", "public String getModel_type_name() {\r\n\t\treturn model_type_name;\r\n\t}", "public String getCurrentFieldName () {\n String currentField = getCurrentElement(ElementKind.FIELD);\n if (currentField == null) return \"\";\n else return currentField;\n //return getSelectedIdentifier ();\n }", "java.lang.String getField1527();", "java.lang.String getField1339();", "java.lang.String getField1015();", "java.lang.String getField1005();", "public String getIdTypeName() {\n\t\treturn this.getIdType(this.currentClass()).getSimpleName();\n\t}", "public String typeName() {\n return this.typeName;\n }", "java.lang.String getField1589();", "java.lang.String getField1792();", "java.lang.String getField1646();", "java.lang.String getField1034();", "java.lang.String getField1025();" ]
[ "0.7915164", "0.75986284", "0.7540756", "0.7453381", "0.74151605", "0.74041325", "0.7313657", "0.73088187", "0.72103894", "0.71659935", "0.7071994", "0.7045329", "0.7009798", "0.69975007", "0.69819796", "0.6965611", "0.6946556", "0.6943359", "0.69365627", "0.6933703", "0.69097745", "0.6905764", "0.6891084", "0.68854994", "0.68663317", "0.68636084", "0.68619746", "0.68366176", "0.673372", "0.67137665", "0.6710167", "0.66596323", "0.665688", "0.6610117", "0.6570348", "0.6555028", "0.65516305", "0.65399903", "0.6539664", "0.6539664", "0.6535065", "0.6534613", "0.6517311", "0.65012896", "0.64959383", "0.64929163", "0.6488925", "0.64628536", "0.6437742", "0.6437102", "0.6421622", "0.64094985", "0.6397046", "0.6385866", "0.6383997", "0.63654524", "0.63654524", "0.63654524", "0.63654524", "0.6362936", "0.63552904", "0.6354445", "0.63512385", "0.6350408", "0.63476884", "0.6340805", "0.6339267", "0.63383603", "0.6337959", "0.6336297", "0.63351333", "0.6334395", "0.6334395", "0.63299227", "0.6324974", "0.63223165", "0.6320589", "0.631708", "0.6316144", "0.6309443", "0.6304794", "0.6303678", "0.6301891", "0.62812084", "0.62791485", "0.6275896", "0.6275078", "0.6272485", "0.62714654", "0.6271255", "0.6270828", "0.6269214", "0.6267938", "0.6262813", "0.62534034", "0.6252261", "0.62483644", "0.62470955" ]
0.6943633
19
Reads data from an external file and parses it, then stores it into a Hashtable that is returned to the client code.
protected synchronized Hashtable getMappingsFromFile() throws Exception { InputStream path = null; path = getClass().getResourceAsStream("../../../config/mappings.txt"); System.out.println("Path is - " + path); BufferedReader reader = new BufferedReader(new InputStreamReader(path)); /* StringBuilder sb = new StringBuilder(); String line1 = null; while ((line1 = reader.readLine()) != null) { sb.append(line1 + "\n"); } */ //System.out.println("String is - " + sb.toString()); /* File f = new File("src/edu/ucsd/crbs/incf/components/services/emage/mappings.txt"); System.out.println("Mapping - " + f.getAbsolutePath()); */ /*if(sb.toString().trim().equals("") || sb.toString() == null ) { System.err.println("bisel.ReadMappings cannot find mapping file"); System.exit(1); }*/ Hashtable mappings = new Hashtable(17, new Float(1.25).floatValue()); //BufferedReader br = new BufferedReader(new FileReader(f)); String line = reader.readLine(); while(line != null) { StringTokenizer st = new StringTokenizer(line, "*"); String aba = st.nextToken(); String emap = st.nextToken(); mappings.put(aba, emap); line = reader.readLine(); } reader.close(); return mappings; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void readTable() {\r\n\r\n try ( BufferedReader b = new BufferedReader(new FileReader(\"Hashdata.txt\"))) {\r\n\r\n String line;\r\n ArrayList<String> arr = new ArrayList<>();\r\n while ((line = b.readLine()) != null) {\r\n\r\n arr.add(line);\r\n }\r\n\r\n for (String str : arr) {\r\n this.load(str);\r\n }\r\n this.print();\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Unable to read file\");\r\n }\r\n\r\n this.userInterface();\r\n\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic synchronized Hashtable<Object,Object> loadTable() \n\t{\n\t\tHashtable<Object,Object> ht = null ;\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(tableFile);\n\t\t\t\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\t// Unchecked cast\n\t\t\thtRecords = (Hashtable<Object,Object>) ois.readObject();\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// throw new DatabaseException(\"Cannot load : FileNotFoundException\",e);\n\t\t htRecords = new Hashtable<Object,Object>(); // Void Hashtable\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"Cannot load : IOException\",e);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Cannot load : ClassNotFoundException\",e);\n\t\t}\n\t\treturn ht ;\n\t}", "protected void loadDataFromFile() throws IOException {\n \t\tInputStream is = null;\n \n \t\ttry {\n \t\t\tis = new BufferedInputStream(new GZIPInputStream(\n \t\t\t\t\tnew FileInputStream(this.dataFile)));\n \n \t\t\tint dataOffset = 0;\n \t\t\tByteArrayOutputStream os = new ByteArrayOutputStream();\n \n \t\t\twhile (true) {\n \t\t\t\tint b = is.read();\n \n \t\t\t\tif (b == 0) {\n \t\t\t\t\t// field separator reached.\n \t\t\t\t\tif (this.componentId == null) {\n \t\t\t\t\t\tbyte[] encoded = os.toByteArray();\n \t\t\t\t\t\tdataOffset += encoded.length;\n \t\t\t\t\t\tdataOffset += 1; // include the separator field\n \t\t\t\t\t\tcomponentId = new String(URLEncoding.decode(encoded),\n \t\t\t\t\t\t\t\t\"UTF-8\");\n \t\t\t\t\t} else if (this.query == null) {\n \t\t\t\t\t\tbyte[] encoded = os.toByteArray();\n \t\t\t\t\t\tdataOffset += encoded.length;\n \t\t\t\t\t\tdataOffset += 1; // include the separator field\n \n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tString queryXml = new String(URLEncoding\n \t\t\t\t\t\t\t\t\t.decode(encoded), \"UTF-8\");\n \n \t\t\t\t\t\t\t// parse the query.\n \t\t\t\t\t\t\tSAXReader reader = new SAXReader();\n \t\t\t\t\t\t\tElement root = reader.read(\n \t\t\t\t\t\t\t\t\tnew StringReader(queryXml))\n \t\t\t\t\t\t\t\t\t.getRootElement();\n \t\t\t\t\t\t\tthis.query = root.getText();\n \t\t\t\t\t\t} catch (Exception e) {\n \t\t\t\t\t\t\tthrow new IOException(\n \t\t\t\t\t\t\t\t\t\"Cannot unmarshall cached query.\");\n \t\t\t\t\t\t}\n \t\t\t\t\t} else if (this.optionalParams == null) {\n \t\t\t\t\t\tbyte[] encoded = os.toByteArray();\n \t\t\t\t\t\tdataOffset += encoded.length;\n \t\t\t\t\t\tdataOffset += 1; // include the separator field\n \n \t\t\t\t\t\tif (encoded.length > 0) {\n \t\t\t\t\t\t\tMap optionalParams = new HashMap();\n \t\t\t\t\t\t\tString urlEncoded = new String(URLEncoding\n \t\t\t\t\t\t\t\t\t.decode(encoded), \"UTF-8\");\n \t\t\t\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(\n\t\t\t\t\t\t\t\t\turlEncoded, \"&\", false);\n \n \t\t\t\t\t\t\twhile (tokenizer.hasMoreTokens()) {\n String param = tokenizer.nextToken();\n\t\t\t\t\t\t\t\tString key = param.substring(0, param.indexOf('='));\n\t\t\t\t\t\t\t\tString value = param.substring(param.indexOf('=')+1);\n \t\t\t\t\t\t\t\toptionalParams.put(key, value);\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tthis.optionalParams = optionalParams;\n \t\t\t\t\t\t} else {\n \t\t\t\t\t\t\tthis.optionalParams = null;\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\tthis.dataOffset = dataOffset;\n \t\t\t\t\t\treturn;\n \t\t\t\t\t}\n \n \t\t\t\t\tos.reset();\n \t\t\t\t} else if (b == -1) {\n \t\t\t\t\tthrow new IOException(\"Premature end of cached file.\");\n \t\t\t\t} else {\n \t\t\t\t\tos.write(b);\n \t\t\t\t}\n \t\t\t}\n \t\t} finally {\n \t\t\tif (is != null) {\n \t\t\t\ttry {\n \t\t\t\t\tis.close();\n \t\t\t\t} catch (IOException e) {\n \t\t\t\t\tlog.error(\"Cannot close input cache file: \"\n \t\t\t\t\t\t\t+ this.dataFile.getAbsolutePath());\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "static void loadDictionary() throws IOException {\r\n URL oracle = new URL(urlEndPoint);\r\n BufferedReader br = new BufferedReader(new InputStreamReader(oracle.openStream()));\r\n\r\n String st;\r\n while ((st = br.readLine()) != null) {\r\n localDictionary.add(st);\r\n }\r\n }", "private HashMap<String, SubsetElement> LoadFile(String fileName) {\n final HashMap<String, SubsetElement> tempMap = new HashMap<String, SubsetElement>();\r\n try {\r\n final Scanner input = new Scanner(new File(fileName));\r\n String line = input.nextLine();\r\n final String[] headers = line.split(\"\\t\");\r\n\r\n Integer i = 1;\r\n while (input.hasNext()) {\r\n line = input.nextLine();\r\n final String[] values = line.split(\"\\t\");\r\n // if(values.length!=headers.length){\r\n // System.out.println(\"Missing values in data row \"+ i);\r\n // break;\r\n // }\r\n\r\n final SubsetElement element = new SubsetElement(headers,\r\n values, this.subsetIdName, this.conceptIdName);\r\n tempMap.put(element.getHash(), element);\r\n i++;\r\n }\r\n input.close();\r\n\r\n } catch (final FileNotFoundException e) {\r\n System.err.println(\"Unable to open and parse file \" + fileName);\r\n e.printStackTrace();\r\n }\r\n\r\n return tempMap;\r\n }", "public Map<String, List<String>> processIncidenceFile(String fileName) throws AggregateFileInitializationException {\n \t\t\tFile file = new File(fileName);\n \t\t\tHashMap<String, List<String>> data = new HashMap<String,List<String>>();\n \t\t\t\n \t\t\ttry {\n \t\t String record; \n \t\t String header;\n \t\t int recCount = 0;\n \t\t List<String> headerElements = new ArrayList<String>();\n \t\t FileInputStream fis = new FileInputStream(file); \n \t\t BufferedReader d = new BufferedReader(new InputStreamReader(fis));\n \t\t \n \t\t //\n \t\t // Read the file header\n \t\t //\n \t\t if ( (header=d.readLine()) != null ) { \n \t\t \t\n \t\t\t StringTokenizer st = new StringTokenizer(header );\n \t\t\t \n \t\t\t while (st.hasMoreTokens()) {\n \t\t\t \t String val = st.nextToken(\",\");\n \t\t\t \t headerElements.add(val.trim());\n \t\t\t }\n \t\t } // read the header\n \t\t /////////////////////\n \t\t \n \t\t // set up the empty lists\n \t\t int numColumns = headerElements.size();\n \t\t for (int i = 0; i < numColumns; i ++) {\n \t\t \tString key = headerElements.get(i);\n \t\t \tdata.put(key, new ArrayList<String>());\n \t\t }\n \t\t \n \t\t // Here we check the type of the data file\n \t\t // by checking the header elements\n \t\t \n \t\t \n \t\t \n \t\t \n \t //////////////////////\n \t // Read the data\n \t //\n \t while ( (record=d.readLine()) != null ) { \n \t recCount++; \n \t \n \t StringTokenizer st = new StringTokenizer(record );\n \t int tcount = 0;\n \t\t\t\t\twhile (st.hasMoreTokens()) {\n \t\t\t\t\t\tString val = st.nextToken(\",\");\n \t\t\t\t\t\tString key = headerElements.get(tcount);\n \t\t\t\t\t\t(data.get(key)).add(val.trim());\n \t\t\t\t\t\ttcount ++;\n \t\t\t\t\t}\n \t\t\t\t} // while file has data\n \t } catch (IOException e) { \n \t // catch io errors from FileInputStream or readLine()\n \t \t Activator.logError(\" IOException error!\", e);\n \t \t throw new AggregateFileInitializationException(e);\n \t }\n \t return data;\n \t\t }", "public void readFiles() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open BufferedReader to open connection to tipslocation URL and read file\n\t\t\tBufferedReader reader1 = new BufferedReader(new InputStreamReader(tipsLocation.openStream()));\n\t\t\t\n\t\t\t// Create local variable to parse through the file\n\t String tip;\n\t \n\t // While there are lines in the file to read, add lines to tips ArrayList\n\t while ((tip = reader1.readLine()) != null) {\n\t tips.add(tip);\n\t }\n\t \n\t // Close the BufferedReader\n\t reader1.close();\n\t \n\t \n\t // Open BufferedReader to open connection to factsLocation URL and read file\n\t BufferedReader reader2 = new BufferedReader(new InputStreamReader(factsLocation.openStream()));\n\t \n\t // Create local variable to parse through the file\n\t String fact;\n\t \n\t // While there are lines in the file to read: parses the int that represents\n\t // the t-cell count that is associated with the line, and add line and int to \n\t // tCellFacts hashmap\n\t while ((fact = reader2.readLine()) != null) {\n\t \t\n\t \tint tCellCount = Integer.parseInt(fact);\n\t \tfact = reader2.readLine();\n\t \t\n\t tCellFacts.put(tCellCount, fact);\n\t }\n\t \n\t // Close the second BufferedReader\n\t reader2.close();\n\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"Error loading files\"); e.printStackTrace();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n\t/**\n\t * Read data and store\n\t * @param data\n\t * \t\t\t\tThe map to store data read from ser file\n\t * @return Map<String, T>\n\t * \t\t\ta map of data that has all the ser file data\n\t * @throws ClassNotFoundException\n\t * @throws IOException\n\t */\n\tprotected Map<String, T> readFromFile(Map<String, T> data) throws ClassNotFoundException, IOException {\n\t\t\n\t\tInputStream file = new FileInputStream(filePath);\n\t\tInputStream buffer = new BufferedInputStream(file);\n\t\tObjectInput input = new ObjectInputStream(buffer);\n\n\t\t//deserialize the Map\n\t\tdata = (HashMap<String, T>) input.readObject();\n\t\tinput.close();\n\t\treturn data;\n\t}", "public static Map<String, String> stringToHashtable(String file) {\r\n if (file == null) {\r\n return null;\r\n }\r\n\r\n String sansComments = eraseComments(file);\r\n int pos = 0, count = sansComments.length();\r\n Map<String, String> retval = new HashMap<String, String>();\r\n\r\n // Split the file, line by line, into key/value pairs\r\n while (pos < count) {\r\n int eol = offsetToEOL(sansComments, pos);\r\n int next = offsetToNextLine(sansComments, pos);\r\n if (eol > 0) {\r\n String line = sansComments.substring(pos, pos + eol);\r\n StringTokenizer st = new StringTokenizer(line, \"=\");\r\n String key = st.nextToken();\r\n String value = \"\";\r\n if (st.hasMoreTokens()) {\r\n value = st.nextToken();\r\n }\r\n\r\n // Place scalar values in the hashtable directly\r\n // otherwise break comma separated ones into Vectors.\r\n // If they can be, items are inserted as Doubles, failing\r\n // that, as Strings.\r\n // int comma = value.indexOf(\",\");\r\n // if (comma == -1) {\r\n // try {\r\n // retval.put(key, new Double(value));\r\n // } catch (NumberFormatException nfe) {\r\n retval.put(key, value);\r\n // } // endtry\r\n // } else {\r\n // Vector<Comparable> v = new Vector<Comparable>();\r\n // StringTokenizer values = new StringTokenizer(value, \",\");\r\n // while (values.hasMoreTokens()) {\r\n // String s = values.nextToken();\r\n // try {\r\n // v.addElement(new Double(s));\r\n // } catch (NumberFormatException nfe) {\r\n // v.addElement(s.trim());\r\n // } // endtry\r\n // } // endwhile\r\n // retval.put(key, v);\r\n // } // endif\r\n } // endif\r\n pos += next;\r\n } // endwhile\r\n\r\n return retval;\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void readFromFile() throws IOException, ClassNotFoundException {\n\t\ttry {\n\t\t\tInputStream file = new FileInputStream(pathName);\n\n\t\t\tInputStream buffer = new BufferedInputStream(file);\n\n\t\t\tObjectInput input = new ObjectInputStream(buffer);\n\n\t\t\ttagToImg = (Map<String, HashSet<String>>) input.readObject();\n\n\t\t\tinput.close();\n\t\t\tfile.close();\n\t\t} catch (EOFException e) {\n\t\t\ttagToImg = new HashMap<String, HashSet<String>>();\n\t\t} catch (InvalidClassException e) {\n\t\t\tSystem.out.println(\"file doesnt match the type\");\n\t\t}\n\t}", "private void readData() {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(fileName)))) {\n String line;\n while ((line = br.readLine()) != null) {\n String[] parts = line.split(\",\");\n int zip = Integer.parseInt(parts[0]);\n String name = parts[1];\n\n zipMap.put(zip, name);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "static Map<Integer, Map<String, Object>> readTxt(BufferedReader in) throws IOException {\n\t\t\n\t\t// reads the key names (column names) and stores them\n\t\tString colString = in.readLine();\n\t\tString[] col = colString.split(\"\\t\");\n\n\t\t//instantiates the object being returned so we can add in objects\n\t\tMap<Integer, Map<String, Object>> dict = new HashMap<Integer, Map<String, Object>>();\n\t\t\n\t\t//loops while there is still more data to read\n\t\twhile (in.ready()) {\n\t\t\t\n\t\t\t//pulls the next line and splits it apart by the delimiter\n\t\t\tString valString = in.readLine();\n\t\t\tString[] val = valString.split(\"\\t\");\n\t\t\t\n\t\t\t//instantiates the object to be put in the list\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\n\t\t\t//loops per amount of columns\n\t\t\tfor (int i = 0; i < col.length; i++) {\n\t\t\t\t\n\t\t\t\t//instantiates to be put into the map and checks if it is a numeric data type\n\t\t\t\tObject value = val[i];\n\t\t\t\tif (isDouble((String) value)) {\n\t\t\t\t\tvalue = Double.parseDouble((String) value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//puts the object into the map\n\t\t\t\tmap.put(col[i], value);\n\t\t\t\t\n\t\t\t}\t//end for\n\n\t\t\t//since map.get(\"StudentID\") is a double, we cast it to an int so we can have a Integer Key for the outside map\n\t\t\tint i = ((Double) map.get(\"StudentID\")).intValue();\n\t\t\t\n\t\t\t//puts the map into the outside container\n\t\t\tdict.put(i, map);\n\t\t\t\n\t\t}\t//end while\n\n\t\t//closes the BufferedReader\n\t\tin.close();\n\n\t\t//returns our data structure\n\t\treturn dict;\n\t}", "public abstract void readFromFile(String key, String value);", "public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n public HashMap<String, List<String>> load() throws IOException, ParseException {\n HashMap<String, List<String>> grammarMap = new HashMap();\n JSONParser jsonParser = new JSONParser();\n try (FileReader reader = new FileReader(filePath)) {\n JSONObject grammar = (JSONObject) jsonParser.parse(reader);\n List<String> keys = new ArrayList<>(grammar.keySet());\n keys.removeAll(Arrays.asList(\"grammarTitle\", \"grammarDesc\"));\n for (String definition : keys) {\n JSONArray production = (JSONArray) grammar.get(definition);\n grammarMap.put(definition.toLowerCase(), production);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return grammarMap;\n }", "private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic LinkedHashMap<String, ExplicitRoutingTable> read(String file) {\r\n\t\tLinkedHashMap<String, ExplicitRoutingTable> result = null;\r\n\t\ttry {\r\n\t\t\tFileInputStream fis = new FileInputStream(file);\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\r\n\t\t\tresult = (LinkedHashMap<String, ExplicitRoutingTable>) ois\r\n\t\t\t\t\t.readObject();\r\n\t\t\tois.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private void readFromFile(String path) throws ClassNotFoundException {\n\t\ttry {\n\t\t\tInputStream file = new FileInputStream(path);\n\t\t\tInputStream buffer = new BufferedInputStream(file);\n\t\t\tObjectInput input = new ObjectInputStream(buffer);\n\n\t\t\ttagList = (HashMap<String, Integer>) input.readObject();\n\t\t\tinput.close();\n\t\t} catch (IOException ex) {\n\t\t\tSystem.out.println(\"Cannot read from input.\");\n\t\t}\n\t}", "public static HashMap<String, IRI> processCSVGoTHash(String path) throws FileNotFoundException {\n BufferedReader in = null;\n in = new java.io.BufferedReader(new java.io.FileReader(path));\n String currentLine;\n int lineN = 0;\n String value=\"\";\n String term=\"\";\n HashMap<String, IRI> got = new HashMap<String, IRI>();\n try {\n while ((currentLine = in.readLine()) != null) {\n if (lineN == 0) {\n lineN++; //get rid of the headers\n } else {\n //process each vocab\n String[] info = currentLine.split(\";\");\n if(info.length==2) {\n value = info[0];\n term = info[1];\n }\n got.put(value, IRI.create(term));\n\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return got ;\n }", "public interface ReaderFromFile {\n\t\n\tpublic List<Data> readDataFromFile (String filename);\n}", "private void createParseTable() {\n parseTableHeader = new HashMap<String, Integer>();\n parseTable = new ArrayList<ArrayList<String>>();\n pHeader = new ArrayList<String>();\n\n String inputLine = null;\n int fileLine = 1;\n int headerCount = 0;\n\n try {\n FileReader reader = new FileReader(parseTableFile);\n BufferedReader bufferedReader = new BufferedReader(reader);\n\n while((inputLine = bufferedReader.readLine()) != null) {\n\n // removes all leading and trailing whitespaces and leading tabs\n String line = inputLine.trim().replaceFirst(\"\\\\t\", \"\");\n\n // these are header rows for terminals and variables\n if(fileLine == 1 || fileLine == 40) {\n String[] cells = line.replaceFirst(\"&\", \"\").split(\"&\");\n for(String cell : cells) {\n// System.out.println(cell);\n if(!parseTableHeader.containsKey(cell) && cell != \"\") {\n parseTableHeader.put(cell, headerCount);\n// System.out.println(headerCount);\n pHeader.add(cell);\n headerCount++;\n }\n }\n }\n else {\n String[] parsedRow = line.split(\"&\",-1);\n // get actual SLR parse table's row number\n int row = Integer.parseInt(parsedRow[0]);\n\n// System.out.println(\"Parsing row number \\t\\t\" + row);\n\n // create a new Array that excludes the row number column\n String[] tempRow = Arrays.copyOfRange(parsedRow, 1, parsedRow.length);\n // remove null / empty entries from Array\n replaceBlanks(tempRow);\n // convert to ArrayList for easier handling\n ArrayList<String> cells = new ArrayList<>(Arrays.asList(tempRow));\n\n// System.out.print(\"Parsed row content \\t\\t\");\n// printArrayList(cells);\n// System.out.println();\n\n // add above ArrayList to the table at the correct row number.\n // because there's two parts to the parse table's row, only\n // add right away if we haven't added anything before\n // otherwise combine the previous entry with this one to create\n // complete entry for this row\n try {\n ArrayList<String> current = parseTable.get(row);\n\n// System.out.print(\"Contents of row \" + row + \"\\t\\t\");\n// printArrayList(current);\n// System.out.println();\n\n // temporary ArrayList to hold previous entry and new entry\n ArrayList<String> temp = new ArrayList<String>();\n temp.addAll(current);\n temp.addAll(cells);\n\n// System.out.print(\"New combined row \\t\\t\");\n// printArrayList(temp);\n// System.out.println();\n\n // add combined ArrayList to the parse table\n parseTable.set(row, temp);\n } catch (IndexOutOfBoundsException e) {\n parseTable.add(row, cells);\n }\n\n// System.out.print(\"Final row \\t\\t\\t\\t\");\n// printArrayList(parseTable.get(row));\n// System.out.println();\n// System.out.println();\n\n }\n\n fileLine++;\n\n }\n if(printPTABLE == \"Y\") {\n printTable();\n }\n bufferedReader.close();\n\n } catch(FileNotFoundException e) {\n System.out.println(\n parseTableFile + \" not found\"\n );\n } catch(IOException e) {\n System.out.println(\n \"Error reading file \" + parseTableFile\n );\n }\n\n }", "public HashMap readFile(String filePath, HashMap source){\n\t\tArrayList<String> temp1 = new ArrayList<String>();\n\t\tArrayList<String> temp2 = new ArrayList<String>();\n\t\tBufferedReader br = null;\n\t\t\n\t\ttry {\n\t\t\tString sCurrentLine;\n\t\t\t\n\t\t\t// \"Users/Jasmine/Documents/Eclipse/CacheDictionary/src/english.txt\"\n\t\t\tbr = new BufferedReader(new FileReader(filePath)); \n\t\t\t\n\t\t\t//str.matches(\".*\\\\d+.*\"); ==> string that contains numbers\n\t\t\t//.matches(\"[a-zA-Z]+\"); ==> string that only contains letter\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * if the source file itself is not one word per line, we need to split the string\n\t\t\t\t * only letter(not single) will be stored in the array\n\t\t\t\t */\n\t\t\t\t//\n\t\t\t\tif(sCurrentLine.matches(\".*([ \\t]).*\")){ //check if the current line is a single word or not\n\t\t\t\t\ttemp1.add(sCurrentLine);\n\t\t\t\t}\n\t\t\t\telse if(sCurrentLine.matches(\"[a-zA-Z]+\") && sCurrentLine.length()>1){\n\t\t\t\t\ttemp2.add(sCurrentLine);\n\t\t\t\t}\n\t\t\t}// end of while loop\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null)br.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif(!temp1.isEmpty()){\n\t\t\tfor(int i = 0; i< temp1.size(); i++){\n\t\t\t\tString thisLine[] = temp1.get(i).split(\" \");\n\t\t\t\t//for each word in this line\n\t\t\t\tfor(int j = 0; j < thisLine.length; j++){\n\t\t\t\t\t//if it is a valid word\n\t\t\t\t\tif(thisLine[j].matches(\"[a-zA-Z]+\") && thisLine[j].length()>1 ){\n\t\t\t\t\t\tif( source.get(thisLine[j]) == null){\n\t\t\t\t\t\t\tsource.put(thisLine[j].toLowerCase(),thisLine[j].toLowerCase());\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t} // end of if current word i valid\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t} // end of temp1\n\t\t\n\t\tif(!temp2.isEmpty()){\n\t\t\tfor(int i = 0; i< temp2.size(); i++){\n\t\t\t\tif(temp2.get(i).matches(\"[a-zA-Z]+\") && temp2.get(i).length()>1){\n\t\t\t\t\tif(source.get(temp2.get(i)) == null){\n\t\t\t\t\t\tsource.put(temp2.get(i).toLowerCase(),temp2.get(i).toLowerCase());\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t} \n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn source;\n\t}", "private void read(String filename) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(filename));\n\t\t\n\t\t//a variable that will increase by one each time another element is added to the array\n\t\t//to ensure array size is correct\n\t\tint numStation = 0;\n\t\t\n\t\t//ignores first 6 lines\n\t\tfor(int i = 0; i < 3; ++i){\n\t\t\tbr.readLine();\n\t\t}\n\t\t\n\t\t//sets String equal readline\n\t\tString lineOfData = br.readLine();\n\n\t\twhile(lineOfData != null)\n\t\t{\n\t\t\tString station = new String();\n\t\t\tstation = lineOfData.substring(10,14);\n\t\t\tMesoAsciiCal asciiAverage = new MesoAsciiCal(new MesoStation(station));\n\t\t\tint asciiAvg = asciiAverage.calAverage();\t\t\n\n\t\t\tHashMap<String, Integer> asciiVal = new HashMap<String, Integer>();\n\t\t\t//put the keys and values into the hashmap\n\t\t\tasciiVal.put(station, asciiAvg);\n\t\t\t//get ascii interger avg value\n\t\t\tInteger avg = asciiVal.get(station);\n\t\t\t\n\t\t\thashmap.put(station,avg);\n\t\t\t\n\t\t\tlineOfData = br.readLine();\n\t\t\t\n\t\t}\n\t\t\n\t\tbr.close();\n\t}", "public void analysisAndImport(File uploadedFile)\n {\n Map<String, Map<String, String>> map = new HashMap<String, Map<String, String>>();\n\n try\n {\n String[] keyArr = null;\n String key = null;\n String strKey = null;\n String strValue = null;\n InputStream is;\n is = new FileInputStream(uploadedFile);\n BufferedReader bf = new BufferedReader(new InputStreamReader(is));\n Properties prop = new Properties();\n prop.load(bf);\n Enumeration enum1 = prop.propertyNames();\n while (enum1.hasMoreElements())\n {\n // The key profile\n strKey = (String) enum1.nextElement();\n key = strKey.substring(0, strKey.lastIndexOf('.'));\n keyArr = strKey.split(\"\\\\.\");\n // Value in the properties file\n strValue = prop.getProperty(strKey);\n Set<String> keySet = map.keySet();\n if (keySet.contains(key))\n {\n Map<String, String> valueMap = map.get(key);\n Set<String> valueKey = valueMap.keySet();\n if (!valueKey.contains(keyArr[2]))\n {\n valueMap.put(keyArr[2], strValue);\n }\n }\n else\n {\n Map<String, String> valueMap = new HashMap<String, String>();\n valueMap.put(keyArr[2], strValue);\n map.put(key, valueMap);\n }\n }\n // Data analysis\n analysisData(map);\n }\n catch (Exception e)\n {\n logger.error(\"Failed to parse the file\", e);\n }\n }", "private static Hashtable<String, TruthInfo> ReadTruth(String path) {\n Hashtable<String, TruthInfo> oTruth = new Hashtable<String, TruthInfo>();\n \n FileReader fr = null;\n BufferedReader bf = null;\n \n try {\n fr = new FileReader(path);\n bf = new BufferedReader(fr);\n String sCadena = \"\";\n\n while ((sCadena = bf.readLine())!=null)\n {\n String []data = sCadena.split(\":::\");\n if (data.length==3) {\n String sAuthorId = data[0];\n if (!oTruth.containsKey(sAuthorId)) {\n TruthInfo info = new TruthInfo();\n info.country = data[1];\n info.gender = data[2];\n oTruth.put(sAuthorId, info);\n }\n }\n }\n } catch (Exception ex) {\n System.out.println(ex.toString());\n } finally {\n if (bf!=null) { try { bf.close(); } catch (Exception ignored) {} }\n if (fr!=null) { try { fr.close(); } catch (Exception ignored) {} }\n }\n \n return oTruth;\n }", "public Hashtable<Integer, Hashtable<String, Obs>> read_obs_data(String srcPath) {\n\n\t\t/**\n\t\t * Hashtable<UserID, Hashtable<Week Day, Observation Sequence>> obstable\n\t\t */\n\t\tHashtable<Integer, Hashtable<String, Obs>> obstable = new Hashtable<>();\n\n\t\tSimpleDateFormat parserSDF = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tSimpleDateFormat dayFormat = new SimpleDateFormat(\"yyyy-MM-dd_EEEE\");\n\t\tint cnt = 0;\n\t\tBufferedReader reader;\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(srcPath));\n\n\t\t\tString line;\n\t\t\tString id = null;\n\t\t\tString nextID;\n\t\t\tint nextDay = -1;\n\t\t\tString time = null;\n\t\t\tint curDay = -1;\n\t\t\tString curDate = \"\", date = \"\";\n\t\t\tString siteID;\n\t\t\tStringBuilder obsr = new StringBuilder();\n\t\t\tStringBuilder tObsr = new StringBuilder();\n\n\t\t\t/**\n\t\t\t * Data must be sorted by the user ID Data set Arrana=ged as the\n\t\t\t * following ID Time Site ID\n\t\t\t */\n\t\t\tHashtable<String, Obs> userObs = null;\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString lineSplit[] = line.split(\",\");\n\n\t\t\t\tnextID = lineSplit[0].trim();\n\t\t\t\t// if (Integer.parseInt(nextID) == 4) {\n\t\t\t\t// break;\n\t\t\t\t// }\n\t\t\t\ttry {\n\t\t\t\t\tDate nextDate = parserSDF.parse(lineSplit[1]);\n\t\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\t\tcal.setTime(nextDate);\n\t\t\t\t\tnextDay = cal.get(Calendar.DAY_OF_MONTH);\n\n\t\t\t\t\tdate = dayFormat.format(cal.getTime());\n\n\t\t\t\t\ttime = cal.get(Calendar.HOUR_OF_DAY) + \":\" + cal.get(Calendar.MINUTE) + \":\"\n\t\t\t\t\t\t\t+ cal.get(Calendar.SECOND);\n\n\t\t\t\t} catch (ParseException ex) {\n\t\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t\t}\n\n\t\t\t\tif (id == null) {\n\t\t\t\t\tuserObs = new Hashtable<>();\n\t\t\t\t\tid = nextID;\n\t\t\t\t\tcurDay = nextDay;\n\t\t\t\t\tcurDate = date;\n\t\t\t\t}\n\t\t\t\tsiteID = lineSplit[2].trim();\n\t\t\t\tint site = Integer.parseInt(siteID);\n\n\t\t\t\t/**\n\t\t\t\t * If the Date changed insert date delimiter.\n\t\t\t\t */\n\t\t\t\tif (curDay != nextDay) {\n\t\t\t\t\t// System.out.println(\"date changed\");\n\t\t\t\t\t// if (obsr != null) {\n\t\t\t\t\t// obsr.append(dlm);\n\t\t\t\t\t//\n\t\t\t\t\t// }\n\n\t\t\t\t\t// if (obsr == null) {\n\t\t\t\t\t// obsr = new StringBuilder(RLM);\n\t\t\t\t\t// }\n\t\t\t\t\tif (obsr.length() != 0) {\n\t\t\t\t\t\t// cnt++;\n\t\t\t\t\t\t// System.out.println(obsr.toString());\n\t\t\t\t\t\t// System.out.println(tObsr.toString());\n\t\t\t\t\t\t// if (cnt == 100) {\n\t\t\t\t\t\t// System.exit(0);\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tuserObs.put(curDate, new Obs(obsr.toString(), tObsr.toString()));\n\t\t\t\t\t\tobsr = new StringBuilder();\n\t\t\t\t\t\ttObsr = new StringBuilder();\n\t\t\t\t\t}\n\t\t\t\t\tcurDay = nextDay;\n\t\t\t\t\tcurDate = date;\n\t\t\t\t\t// if (site >= stower && site <= etower) {\n\t\t\t\t\t// obsr = new StringBuilder(siteID);\n\t\t\t\t\t// } else {\n\t\t\t\t\t// obsr = new StringBuilder(RLM);\n\t\t\t\t\t// }\n\t\t\t\t\t// continue;\n\t\t\t\t}\n\n\t\t\t\tif (obsr.length() == 0) {\n\t\t\t\t\tobsr.append(siteID);\n\t\t\t\t\ttObsr.append(time);\n\t\t\t\t} else if (obsr.length() != 0 && id.equals(nextID)) {\n\t\t\t\t\tobsr.append(CLM);\n\t\t\t\t\ttObsr.append(CLM);\n\n\t\t\t\t\tobsr.append(siteID);\n\t\t\t\t\ttObsr.append(time);\n\n\t\t\t\t} else {\n\t\t\t\t\t/**\n\t\t\t\t\t * User changed write the XL file Data Change the user ID ,\n\t\t\t\t\t * and record site with the new user\n\t\t\t\t\t */\n\t\t\t\t\tif (!userObs.isEmpty()) {\n\n\t\t\t\t\t\tobstable.put(Integer.parseInt(id), userObs);\n\t\t\t\t\t\tuserObs = new Hashtable<>();\n\t\t\t\t\t}\n\t\t\t\t\tid = nextID;\n\t\t\t\t\tobsr = new StringBuilder();\n\t\t\t\t\ttObsr = new StringBuilder();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// System.out.println(\"File saved!\");\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t\treturn obstable;\n\t}", "@Override\r\n public Map getData(String fileName) {\r\n Map<String, Integer> map = new HashMap<>();\r\n \r\n File file = new File(fileName);\r\n \r\n try (BufferedReader bufferedReader =\r\n new BufferedReader(new FileReader(file))) {\r\n \r\n String line;\r\n while ((line = bufferedReader.readLine()) != null) {\r\n \r\n //if the word have already been in the map,\r\n //increases the number of occurances,\r\n //otherwise sets this number to 1\r\n //and puts a new value to the map\r\n String[] words = line.split(\" \");\r\n for (String word : words) {\r\n Integer value = map.get(word);\r\n if (value == null) {\r\n value = 1;\r\n } else {\r\n value++;\r\n }\r\n map.put(word, value);\r\n }\r\n }\r\n } catch(IOException e) {\r\n System.out.println(e.getMessage());\r\n return null;\r\n }\r\n \r\n return map;\r\n }", "private void load(Path fileName) throws IOException {\n try(BufferedReader reader = Files.newBufferedReader(fileName)) {\n String line = \"\";\n\n // Matches lines with the format:\n // key=value\n // where the key is any sequence of lowercase letters. (a to z)\n // where value may be any letters from a to z (case insensitive) 0 to 9 or the letters '-' and '.'.\n Pattern validLine = Pattern.compile(\"^(?<key>[a-z]+)=(?<value>[a-zA-Z0-9-.]+)$\");\n\n // Read the file line by line\n while((line = reader.readLine()) != null) {\n if(line.startsWith(\";\")) { // Ignore lines that start with ;\n continue;\n }\n\n // Remove any whitespace\n line = line.trim();\n\n // Continue if our line is empty\n if(\"\".equals(line)) {\n continue;\n }\n\n Matcher matcher = validLine.matcher(line);\n\n if(!matcher.matches() || matcher.groupCount() != 2) {\n System.err.println(\"Unable to parse line: \" + line);\n continue;\n }\n\n String key = matcher.group(\"key\");\n String value = matcher.group(\"value\");\n\n map.put(key, value);\n }\n }\n }", "private void loadData () {\n try {\n File f = new File(\"arpabet.txt\");\n BufferedReader br = new BufferedReader(new FileReader(f));\n vowels = new HashMap<String, String>();\n consonants = new HashMap<String, String>();\n phonemes = new ArrayList<String>();\n String[] data = new String[3];\n for (String line; (line = br.readLine()) != null; ) {\n if (line.startsWith(\";\")) {\n continue;\n }\n data = line.split(\",\");\n phonemes.add(data[0]);\n if (data[1].compareTo(\"v\") == 0) {\n vowels.put(data[0], data[2]);\n } else {\n consonants.put(data[0], data[2]);\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private Data readFromFileData() {//Context context) {\n try {\n FileInputStream fileInputStream = openFileInput(fileNameData);\n ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);\n Data.userData = (Data) objectInputStream.readObject();\n objectInputStream.close();\n fileInputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return Data.userData;\n }", "public static HashMap<String,Company> javaHash(File dataFile) \n\t{\n\t\ttry\n\t\t{\n\t\t HashMap<String, Company> hmap = new HashMap<String, Company>();\n\t\t \n\t\t\tCSVReader reader = new CSVReader(new FileReader(dataFile));\n\t\t String [] nextLine;\n\t\t while ((nextLine = reader.readNext()) != null) \n\t\t {\n\t\t \tString currentCompany = nextLine[7];\n\t\t\t\tString complaintId = nextLine[17];\n\t\t\t\tCompany retrievedCompany = hmap.get(currentCompany);\n\t\t\t\tif(retrievedCompany == null)\n\t\t\t\t{\n\t\t\t\t\tCompany companyHolder = new Company(currentCompany, complaintId);\n\t\t\t\t\thmap.put(currentCompany, companyHolder);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tretrievedCompany.addId(complaintId);\n\t\t\t\t}\n\t\t }return hmap;\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"File not found, please enter correct file\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Error\");\n\t\t\tSystem.exit(0);\n\t\t} return null;\n\t}", "public static Dictionary readInDictionary(String fileName) {\r\n Dictionary d = new Dictionary();\r\n Scanner fileScanner;\r\n\r\n try {\r\n // use a FileInputStream to ensure correct reading end-of-file\r\n fileScanner = new Scanner(new FileInputStream(\"data\" + File.separator +fileName));\r\n\r\n while (fileScanner.hasNextLine()) {\r\n String nextLine = fileScanner.nextLine();\r\n // System.out.println(\"nextLine: \" + nextLine); uncomment if you want to see what is read in\r\n DictionaryData data = new DictionaryData(nextLine);\r\n\r\n // TODO: call insert() here to insert the data object into the dictionary!\r\n d.insert(data.word.toUpperCase(),data);\r\n }\r\n\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"could not find the file \" +fileName+ \"in the data directory!\");\r\n return null;\r\n }\r\n\r\n return d;\r\n }", "private static void init()\n {\n try\n {\n ObjectInputStream ois = \n new ObjectInputStream(new FileInputStream(lexFile));\n lexDB = (HashMap)ois.readObject();\n ois.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"File not found: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } catch (IOException e) {\n System.err.println(\"IO Exception: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } catch (ClassNotFoundException e) {\n System.err.println(\"Class Not Found Exception: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } // catch\n }", "@Override\n protected void read(){\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(getPath()));) {\n\n String frequencyString;\n\n String frequencyFileFormat = \"([a-z]\\\\s\\\\d+\\\\.\\\\d+)\";\n Pattern pattern = Pattern.compile(frequencyFileFormat);\n Matcher matcher;\n\n String[] frequency;\n\n // Read in each line of the frequencies file\n while ((frequencyString = bufferedReader.readLine()) != null) {\n // Match the frequency format to a individual frequency\n matcher = pattern.matcher(frequencyString);\n if(matcher.find()){\n\n // Split the string into the character and its frequency\n frequency = matcher.group(1).split(\" \");\n\n // Add the string and its corresponding frequency to the frequencies hash map\n frequencies.put(frequency[0], Double.parseDouble(frequency[1]));\n \n }\n }\n\n // Only set to true if it successfully reads the whole file\n setFileRead();\n }\n catch(FileNotFoundException e){\n e.printStackTrace();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "public static Hashtable read(DataInputStream dis) throws IOException {\r\n\t\t\r\n\t\tbyte len = dis.readByte();\r\n\t\t/*if(len == 0)\r\n\t\t\treturn null;*/\r\n\t\t\r\n\t\tHashtable stringHashtable = new Hashtable();\r\n\r\n\t\tfor(byte i=0; i<len; i++ )\r\n\t\t\tstringHashtable.put(dis.readUTF(), dis.readUTF());\r\n\t\t\r\n\t\treturn stringHashtable;\r\n\t}", "public void readFile(String fileName)\r\n {\n String key = new String();\r\n String value = new String();\r\n\r\n boolean readInfo = false;\r\n String out =\"\";\r\n String infoTag = \"\";\r\n String infoTagContent = \"\";\r\n\r\n try{\r\n System.out.println(\"Readig file \"+fileName+\" ...\");\r\n BufferedReader filereader = new BufferedReader(new FileReader(fileName));\r\n\r\n String line = new String();\r\n line = filereader.readLine();\r\n\r\n while(line != null){\r\n infoTag = \"\";\r\n infoTagContent = \"\";\r\n\r\n if((line.indexOf(\"=\") != -1) && (line.indexOf(\"#\") == -1))\r\n {\r\n key = line.substring(0, line.indexOf(\"=\"));\r\n value = line.substring(line.indexOf(\"=\")+1);\r\n\r\n key = key.trim();\r\n value = value.trim();\r\n\r\n if(key.equals(\"PREFIX\")){\r\n this.tagPrefix = value;\r\n } else {\r\n value = tagPrefix+\".\"+value;\r\n tagHash.put(key, value);\r\n }\r\n\r\n readInfo = false;\r\n infoHash.put(key, out);\r\n out = \"\";\r\n }\r\n\r\n\r\n if((line.indexOf(\"#\") == 0) && (line.indexOf(\"@\") != -1) && (line.indexOf(\"=\") != -1))\r\n {\r\n readInfo = true;\r\n infoTag = line.substring(line.indexOf(\"@\"), line.indexOf(\"=\"));\r\n infoTag.trim();\r\n infoTagContent = line.substring(line.indexOf(\"=\")+1);\r\n if(infoTagContent.trim().length() > 0) infoTagContent = infoTagContent+NL;\r\n out = out+infoTag+\": \"+NL+infoTagContent;\r\n }else if((line.indexOf(\"#\") == 0) && readInfo){\r\n // alreadey reading a tagInfo, means NL between entries\r\n out = out+line.substring(line.indexOf(\"#\")+1)+NL;\r\n }\r\n\r\n line = filereader.readLine();\r\n }\r\n\r\n filereader.close();\r\n\r\n //System.out.println(tagHash);\r\n\r\n }catch (Exception e){\r\n System.out.println(\"Exception in readFile: \"+e);\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n public static void load() {\n\n System.out.print(\"Loading team data from file...\");\n\n try {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n\n FileInputStream fil = new FileInputStream(team_fil);\n ObjectInputStream in = new ObjectInputStream(fil);\n\n team_list = (ConcurrentHashMap<Integer, Team>) in.readObject();\n cleanTeams();\n\n fil.close();\n in.close();\n\n //Gå gjennom alle lagene og registrer medlemmene i team_members.\n Iterator<Team> lag = team_list.values().iterator();\n\n while (lag.hasNext()) {\n\n Team laget = lag.next();\n\n Iterator<TeamMember> medlemmer = laget.getTeamMembers();\n while (medlemmer.hasNext()) {\n registerMember(medlemmer.next().getCharacterID(), laget.getTeamID());\n }\n\n }\n\n System.out.println(\"OK! \" + team_list.size() + \" teams loaded.\");\n\n } catch (Exception e) {\n System.out.println(\"Error loading team data from file.\");\n }\n\n }", "@Override\n public void load(String keyWord, String fileName){\n FileReader loadDetails;\n String record;\n try{\n loadDetails=new FileReader(fileName);\n BufferedReader bin=new BufferedReader(loadDetails);\n while (((record=bin.readLine()) != null)){\n if ((record).contentEquals(keyWord)){\n setUsername(record);\n setPassword(bin.readLine());\n setFirstname(bin.readLine());\n setLastname(bin.readLine());\n setDoB((Date)DMY.parse(bin.readLine()));\n setContactNumber(bin.readLine());\n setEmail(bin.readLine());\n setSalary(Float.valueOf(bin.readLine()));\n setPositionStatus(bin.readLine());\n homeAddress.load(bin);\n }//end if\n }//end while\n bin.close();\n }//end try\n catch (IOException ioe){}//end catch\n catch (ParseException ex) {\n Logger.getLogger(Product.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private static void fillTableFromFile(HashTable table) {\n Scanner in;\n try {\n in = new Scanner(new FileInputStream(\"File.txt\"));\n } catch (FileNotFoundException e) {\n System.out.println(\"File 'File.txt' not found\");\n return;\n }\n while (in.hasNext()) {\n table.add(in.next());\n }\n }", "private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }", "public static HighScoresTable loadFromFile(File filename) {\n HighScoresTable newScoresTable = new HighScoresTable(4);\n ObjectInputStream inputStream = null;\n try {\n inputStream = new ObjectInputStream(new FileInputStream(filename));\n List<ScoreInfo> scoreFromFile = (List<ScoreInfo>) inputStream.readObject();\n if (scoreFromFile != null) {\n //scoreFromFile.clear();\n newScoresTable.scoreInfoList.addAll(scoreFromFile);\n }\n } catch (FileNotFoundException e) { // Can't find file to open\n System.err.println(\"Unable to find file: \" + filename);\n //return scoresTable;\n } catch (ClassNotFoundException e) { // The class in the stream is unknown to the JVM\n System.err.println(\"Unable to find class for object in file: \" + filename);\n //return scoresTable;\n } catch (IOException e) { // Some other problem\n System.err.println(\"Failed reading object\");\n e.printStackTrace(System.err);\n //return scoresTable;\n } finally {\n try {\n if (inputStream != null) {\n inputStream.close();\n }\n } catch (IOException e) {\n System.err.println(\"Failed closing file: \" + filename);\n }\n }\n return newScoresTable;\n\n\n }", "public void readTheFile() {\n \t\terrorMap.clear();\n \n \t\tBufferedReader br;\n \t\tString nextLine;\n \t\tString[] header = null;\n \t\tArrayList<String> lines = new ArrayList<String>();\n \t\ttry {\n \t\t\tlogger.debug(\"{} loading file: {} \", getName(), RobotNX100Controller.class.getResource(\"motoman_error_code.txt\").getPath());\n \n \t\t\tbr = new BufferedReader(new FileReader(RobotNX100Controller.class.getResource(\"motoman_error_code.txt\").getPath()));\n \t\t\twhile (((nextLine = br.readLine()) != null) && (nextLine.length() > 0)) {\n \t\t\t\tif (nextLine.startsWith(\"Code\")) {\n \t\t\t\t\theader = nextLine.split(\"[, \\t][, \\t]*\");\n \t\t\t\t} else if (!nextLine.startsWith(\"#\"))\n \t\t\t\t\tlines.add(nextLine);\n \t\t\t}\n \t\t\tbr.close();\n \t\t} catch (FileNotFoundException fnfe) {\n \t\t\t// we do not want to interrupt processing because error map file not set.\n \t\t\tlogger.warn(\"Can not find the Error Message file {} for {}. Only Error code will be reported.\",\n \t\t\t\t\tgetErrorCodeFilename(), getName());\n \t\t\tlogger.warn(\"caused by \" + fnfe.getMessage(), fnfe);\n \t\t\tbr = null;\n \t\t\treturn;\n \t\t} catch (IOException ioe) {\n \t\t\t// we do not want to interrupt processing because error map file not set.\n \t\t\tlogger.warn(\"Can not find the Error Message file {} for {}. Only Error code will be reported.\",\n \t\t\t\t\tgetErrorCodeFilename(), getName());\n \t\t\tlogger.error(\"caused by \" + ioe.getMessage(), ioe);\n \t\t\tbr = null;\n \t\t\treturn;\n \t\t}\n \n \t\tnumberOfRows = lines.size();\n \t\tlogger.debug(\"the file contained \" + numberOfRows + \" lines\");\n \t\tint nColumns = new StringTokenizer(lines.get(0), \"\\t\").countTokens();\n \t\tlogger.debug(\"each line should contain \" + nColumns + \" numbers\");\n \t\tkeys = new ArrayList<String>();\n \t\tif (header != null) {\n \t\t\tfor (int i = 1; i < nColumns; i++) {\n \t\t\t\terrorMap.put(header[0], header[i]);\n \t\t\t}\n \t\t\tkeys.add(header[0]);\n \t\t}\n \n \t\tfor (int i = 0; i < numberOfRows; i++) {\n \t\t\tnextLine = lines.get(i);\n \t\t\tString[] thisLine = nextLine.split(\"[\\t][\\t]*\");\n \t\t\tfor (int j = 0; j < thisLine.length; j++)\n \t\t\t\terrorMap.put(thisLine[0], thisLine[j]);\n \t\t\tkeys.add(thisLine[0]);\n \t\t}\n \t}", "private void readDataFromUserLog(HashMap<String,TransactionData> hmap , String filename){\n\t\t\n\t\tBufferedReader reader = null;\n\t\t\n\t\ttry{\n\t\t\treader = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tString transaction = line.split(\",\")[1];\n\t\t\t/*\tString transactionKey = (transaction.length() > keyLength ) ?\n\t\t\t\t\t\ttransaction.substring(0,keyLength):\n\t\t\t\t\t\t\ttransaction;*/\n\t\t\t\tString transactionKey = formTransactionKey(transaction);\n\t\t\t\tdouble amount = Double.parseDouble(line.split(\",\")[2]);\n\t\t\t\tif(hmap.containsKey(transactionKey)){\n\t\t\t\t\tTransactionData d = hmap.get(transactionKey);\n\t\t\t\t\td.addAnotherOccurence(amount);\n\t\t\t\t\thmap.put(transactionKey,d );\n\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tchar type = identifyTheTransactions(transaction);\n\t\t\t\t\tTransactionData d =new TransactionData(transaction,amount,type);\n\t\t\t\t\thmap.put(transactionKey,d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Sorry!! File : \"+ filename +\" required for processing!!!\");\n\t\t\tSystem.out.println(\"\\n\\nPlease try again !!!\");\n\t\t\tSystem.exit(1);\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void loadDataMap() throws IOException {\n\t\tDaySleepDurationMap.getInstance().clear();\n\n\t\t// List of entries\n\t\tList<SleepEntry> entries = new ArrayList<SleepEntry>();\n\t\t\n\t\t// Get CSV file\n\t\tBufferedReader br = new BufferedReader(new FileReader(new File(DATA_LOCATION)));\n\t\tString line = \"\";\n\n\t\t// Ignore the first line (CSV header)\n\t\tbr.readLine();\n\n\t\twhile (((line = br.readLine()) != null)){\n\t\t\t// Convert the line from CSV to a SleepEntry\n\t\t\tSleepEntry se = SleepEntry.parseFromCSV(line);\n\t\t\t// Add it to the entry list\n\t\t\tentries.add(se);\n\t\t}\n\t\t\n\t\tfor (SleepEntry se : entries){\n\t\t\t// Add data from list to the map\n\t\t\tDaySleepDurationMap.getInstance().addToDay(se.getEffectiveDate(), se.getDuration());\n\t\t}\n\t\t\n\n\t\tbr.close();\n\t\t\n\t}", "public abstract T readDataFile(String fileLine);", "public void readUsers() {\n try {\n FileInputStream fileIn = new FileInputStream(\"temp/users.ser\");\n ObjectInputStream in = new ObjectInputStream(fileIn);\n users = (HashMap<String, User>) in.readObject();\n in.close();\n fileIn.close();\n } catch (IOException e) {\n users = new HashMap<>();\n } catch (ClassNotFoundException c) {\n System.out.println(\"Class HashMap not found\");\n c.printStackTrace();\n return;\n }\n\n }", "public static Hashtable<String, String> loadDataFromXml(String filePath, String splitKey, String splitValue)\n\t\t\tthrows Exception {\n\n\t\tdataTable = new Hashtable<>();\n\t\tDocument xmlDocument = initializeXML(filePath);\n\n\t\tif (xmlDocument != null) {\n\t\t\tNodeList locatorNodes = xmlDocument.getElementsByTagName(splitKey);\n\n\t\t\tfor (int i = 0; i < locatorNodes.getLength(); i++) {\n\t\t\t\tobject = (Element) locatorNodes.item(i);\n\t\t\t\tif (object.getAttribute(\"name\").equalsIgnoreCase(splitValue)) {\n\t\t\t\t\tNodeList propertyList = object.getElementsByTagName(\"data\");\n\t\t\t\t\tfor (int j = 0; j < propertyList.getLength(); j++) {\n\t\t\t\t\t\tobject = (Element) propertyList.item(j);\n\n\t\t\t\t\t\tdataTable.put(object.getAttribute(\"key\").toUpperCase(), object.getAttribute(\"value\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dataTable;\n\t}", "public void read(String fileName)\n\t{\n\t\tString line = \"\";\n\t\tint headCount = 0;\n\t\tEmployee helperEmployee;\n\t\t\n\t\ttry\n\t\t{\n\t\t\t//FileReader is in charge of reading text files\n\t\t\tFileReader fileReader = new FileReader(fileName);\n\t\t\t\n\t\t\t//Wrapping FileReader in BufferedReader\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\t\t\n\t\t\t//Continue reading until we reach end of file\n\t\t\twhile( (line = bufferedReader.readLine()) != null)\n\t\t\t{\n\t\t\t\tString[] lineString = line.split(\",\");\n\t\t\t\t//Get the header information and arrange it just once, then read the rest of the information\n\t\t\t\tif(headCount == 0)\n\t\t\t\t{\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\thelperEmployee = new Employee();\n\t\t\t\t\thelperEmployee.setEmployeeName(lineString[0] + \"\" + lineString[1]); \n\t\t\t\t\thelperEmployee.setEmployeeNumber(Integer.parseInt(lineString[2]));\n\t\t\t\t\thelperEmployee.setEmployeeState(lineString[3]);\n\t\t\t\t\thelperEmployee.setEmployeeZipCode(Integer.parseInt(lineString[4]));\n\t\t\t\t\thelperEmployee.setEmployeeAge(Integer.parseInt(lineString[6]));\n\t\t\t\t\tadd(helperEmployee);\n\t\t\t\t}\n\t\n\t\t\t\t//Keep track of number of employees\n\t\t\t\theadCount++;\n\t\t\t}\n\t\t\t\n\t\t\t//Close file as good practice\n\t\t\tbufferedReader.close();\n\t\t}\n\t\tcatch(FileNotFoundException ex)\n\t\t{\n\t\t\tSystem.out.println(\"Unable to open the file named '\" + fileName + \"'\");\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tSystem.out.println(\"Error when reading the file \" + fileName + \"'\");\n\t\t}\n\t}", "private void reloadData() throws IOException\n {\n /* Reload data from file, if it is modified after last scan */\n long mtime = loader.getModificationTime();\n if (mtime < lastKnownMtime) {\n return;\n }\n lastKnownMtime = mtime;\n\n InputStream in = loader.getInputStream();\n BufferedReader bin = new BufferedReader(new InputStreamReader(in));\n cache.clear();\n String line;\n while ((line = bin.readLine()) != null) {\n try {\n Map<String, Object> tuple = reader.readValue(line);\n updateLookupCache(tuple);\n } catch (JsonProcessingException parseExp) {\n logger.info(\"Unable to parse line {}\", line);\n }\n }\n IOUtils.closeQuietly(bin);\n IOUtils.closeQuietly(in);\n }", "public UserInfo readData()\n\t{\n\t\t\n\t\tIterator<UserInfo> itr= iterator();\n\t\tUserInfo info;\n\t\tSystem.out.println(\"file has been read!\");\n\t\twhile(itr.hasNext()) {\n\t\t\t\n\t\t\tinfo= itr.next();\n\t\t\tif( info.getUrl().equalsIgnoreCase(file)) {\n\t\t\t\t\n\t\t\t\treturn info;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public List<Double> processFile() throws AggregateFileInitializationException {\n \t\t \n \t\tint maxTime = 0;\n \t\tHashMap<String, List<Double>> data = new HashMap<String,List<Double>>();\n \t\ttry {\n \t String record; \n \t String header;\n \t int recCount = 0;\n \t List<String> headerElements = new ArrayList<String>();\n \t FileInputStream fis = new FileInputStream(scenarioData); \n \t BufferedReader d = new BufferedReader(new InputStreamReader(fis));\n \t \n \t //\n \t // Read the file header\n \t //\n \t if ( (header=d.readLine()) != null ) { \n \t \t\n \t\t StringTokenizer st = new StringTokenizer(header );\n \t\t \n \t\t while (st.hasMoreTokens()) {\n \t\t \t String val = st.nextToken(\",\");\n \t\t \t headerElements.add(val.trim());\n \t\t }\n \t } // read the header\n \t /////////////////////\n \t \n \t // set up the empty lists\n \t int numColumns = headerElements.size();\n \t for (int i = 0; i < numColumns; i ++) {\n \t \tString key = headerElements.get(i);\n \t \t if(validate(key)) {\n \t \t\tdata.put(key, new ArrayList<Double>());\n \t\t }\n \t \t\n \t }\n \t \n \t // Here we check the type of the data file\n \t // by checking the header elements\n \t \n \t \n \t \n \t //////////////////////\n // Read the data\n //\n while ( (record=d.readLine()) != null ) { \n recCount++; \n \n StringTokenizer st = new StringTokenizer(record );\n int tcount = 0;\n \t\t\t\twhile (st.hasMoreTokens()) {\n \t\t\t\t\tString val = st.nextToken(\",\");\n \t\t\t\t\tString key = headerElements.get(tcount);\n \t\t\t\t\tif(validate(key)) {\n \t\t\t\t\t\tidSet.add(key);\n \t\t\t\t\t\tList<Double> dataList = data.get(key);\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tDouble dVal = new Double(val.trim());\n \t\t\t\t\t\t\tdataList.add(dVal);\n \t\t\t\t\t\t\tif (dataList.size() >= maxTime) maxTime = dataList.size();\n \t\t\t\t\t\t\tdata.put(key,dataList);\n \t\t\t\t\t\t} catch(NumberFormatException nfe) {\n \t\t\t\t\t\t\tdata.remove(key);\n \t\t\t\t\t\t\tidSet.remove(key);\n \t\t\t\t\t\t\tActivator.logInformation(\"Not a valid number (\"+val+\") ... Removing key \"+key, null);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\t\t\t\n \t\t\t\t\ttcount ++;\n \t\t\t\t}\n \t\t\t} // while file has data\n } catch (IOException e) { \n // catch io errors from FileInputStream or readLine()\n \t Activator.logError(\" IOException error!\", e);\n \t throw new AggregateFileInitializationException(e);\n }\n \n List<Double> aggregate = new ArrayList<Double>();\n for (int i = 0; i < maxTime; i ++) {\n \t aggregate.add(i, new Double(0.0));\n }\n // loop over all location ids\n Iterator<String> iter = idSet.iterator();\n while((iter!=null)&&(iter.hasNext())) {\n \t String key = iter.next();\n \t List<Double> dataList = data.get(key);\n \t for (int i = 0; i < maxTime; i ++) {\n \t\t double val = aggregate.get(i).doubleValue();\n \t\t val += dataList.get(i).doubleValue();\n \t aggregate.set(i,new Double(val));\n }\n }\n \n return aggregate;\n \t }", "public void readData(String infile) throws Exception {\r\n\t\t//A scanner object to read the input file line by line\r\n\t\tScanner in = new Scanner(new FileReader(infile));\r\n\t\t\r\n\t\t//Instantiate the bid HashMap to store the bid information\r\n\t\tbids = new HashMap<Integer, Bids>();\r\n\t\t\r\n\t\t//Associate the number of lots and number of bids with the respective variables\r\n\t\tnumberOfLots = in.nextInt();\r\n\t\tnumberOfBids = in.nextInt();\r\n\t\t\r\n\t\t\r\n\t\t//Move the cursor to the next line in the input file.\r\n\t\tin.nextLine();\r\n\t\t\r\n\t\t//All of the bids that is specified by the variable \"numberOfBids\" in the input file is looked at and added to the HashMap\r\n\t\tfor(int i = 0; i < numberOfBids; i++) {\r\n\t\t\tbids.put(in.nextInt(), new Bids(in.nextInt(), in.nextInt(), in.nextInt()));\r\n\r\n\t\t}\r\n\t}", "private void loadData() {\n\t\tlogger.trace(\"loadData() is called\");\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"server-info.dat\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tjokeFile = (String ) in.readObject();\n\t\t\tkkServerPort = (int) in.readObject();\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tjokeFile = \"kk-jokes.txt\";\n\t\t\tkkServerPort = 5555;\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.err.println(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t\tlogger.info(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t}\t\n\t}", "public static void loadLDATopics(String filename, HashMap<Integer, String> hashtable) throws Exception {\n\n\t\tBigFile file = new BigFile(filename);\n\t\tint i=0;\n\t\t\n\t\tfor (String line : file) {\n\t\t\thashtable.put(i, line);\n\t\t\ti++;\n\t\t}\n\t}", "public static void load(Context context) throws IOException {\n // read the file\n String raw = File.readFile(\"vaccine.txt\", context);\n\n // clear the map and load contents of file into the map\n map.clear();\n for (String line : raw.split(\"\\n\")) {\n if (line.equals(\"\")) {\n continue;\n }\n String[] data = line.split(\",\");\n if (data[0].equals(\"\") || data.length != 3) {\n continue;\n }\n map.put(data[0], Boolean.getBoolean(data[1]));\n dateMap.put(data[0], data[2]);\n }\n }", "public static Dictionary[] getDictionarys(double load) throws IOException {\n Dictionary[] hashTables = new Dictionary[3]; //3 hashtables\n\n LPHashtable LP = new LPHashtable(getSize(load));\n LP.performanceTest = true;\n FileUtil.load(LP, \"lexicon.txt\");\n\n QPHashtable QP = new QPHashtable(getSize(load));\n QP.performanceTest = true;\n try {\n FileUtil.load(QP, \"lexicon.txt\");\n\n } catch (IndexOutOfBoundsException e) {\n QP = null; //If Quadratic probing failes then put null value in place of QP hashtable\n }\n\n\n SCHashtable SC = new SCHashtable(getSize(load));\n FileUtil.load(SC, \"lexicon.txt\");\n\n hashTables[0] = LP;\n hashTables[1] = QP;\n hashTables[2] = SC;\n\n // System.out.println(\"The load factor here is \" + ((QPHashtable) hashTables[1]).loadFactor());\n\n\n return hashTables;\n }", "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 readFromFile() {\n\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void readMapFromFile() {\r\n\t\ttry {\r\n\t\t\tType type = new TypeToken<HashMap<String, Country>>() {}.getType();\r\n\t\t\tthis.daoMap = (HashMap<String, Country>) gson.fromJson(new FileReader(path), type);\r\n\t\t} catch (JsonSyntaxException | JsonIOException | FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "private void readFileAndStoreData_(String fileName) {\n In in = new In(fileName);\n int numberOfTeams = in.readInt();\n int teamNumber = 0;\n while (!in.isEmpty()) {\n assignTeam_(in, teamNumber);\n assignTeamInfo_(in, numberOfTeams, teamNumber);\n teamNumber++;\n }\n }", "public void readData() throws FileNotFoundException {\n this.plane = readPlaneDimensions();\n this.groupBookingsList = readBookingsList();\n }", "private void Load( String szFileName )\n throws FileNotFoundException, NullPointerException, AppException\n {\n FileInputStream fs = null;\n File f = null;\n long nFileSize;\n \n f = new File( szFileName );\n if( !f.exists() || !f.canRead() )\n throw new FileNotFoundException( \"File \" + f.getPath() );\n\n try\n {\n nFileSize = f.length();\n fs = new FileInputStream( f );\n\n CharsetDecoder utf8Decoder = Charset.forName( \"UTF-8\" ).newDecoder();\n byte[] Data = null;\n\n // Read user name length and user name in UTF8\n if( nFileSize < 2 )\n throw new AppException( \"Bad file \" + f.getPath() );\n int nLength = (fs.read() << 8) | fs.read();\n nFileSize -= 2;\n if( nFileSize < nLength )\n throw new AppException( \"Bad file \" + f.getPath() );\n nFileSize -= nLength;\n Data = new byte[nLength];\n fs.read( Data );\n m_UserName = utf8Decoder.decode( ByteBuffer.wrap( Data ) ).toString();\n\n // Read user unique ID\n if( nFileSize < 16 )\n throw new AppException( \"Bad file \" + f.getPath() );\n nFileSize -= 16;\n m_Key = new byte[16];\n fs.read( m_Key );\n\n // Read template length and template data\n if( nFileSize < 2 )\n throw new AppException( \"Bad file \" + f.getPath() );\n nLength = (fs.read() << 8) | fs.read();\n nFileSize -= 2;\n if( nFileSize != nLength )\n throw new AppException( \"Bad file \" + f.getPath() );\n m_Template = new byte[nLength];\n fs.read( m_Template );\n fs.close();\n }\n catch( SecurityException e )\n {\n if( f == null )\n throw new AppException( \"Denies read access to the file \" + f.getPath() );\n else {\n throw new AppException( \"Denies read access to the file \" + szFileName );\n }\n }\n catch( IOException e)\n {\n if( f == null )\n throw new AppException( \"Bad file \" + f.getPath() );\n else\n throw new AppException( \"Bad file \" + szFileName );\n }\n }", "public HashMap<String,String> readMapFile(String filename) throws IOException {\n\t\tHashMap<String,String> valueMap = new HashMap<String,String>();\t\t\n List<String> cols = new ArrayList<String>(); \n\t\t\n try{\n \t buf = new BufferedReader(new FileReader(filename)); \n\t String strRead; \n\t while ((strRead=buf.readLine())!=null) {\n\t \tcols = Arrays.asList(strRead.split(\"\\t\")); \t\n\t \tif(cols.size() != 2)\n\t \t\tcontinue; \t\n\t \tvalueMap.put(cols.get(0),cols.get(1)); \t\n\t \t }\n\t } catch(IOException e){\n\t e.printStackTrace();\n\t } finally {\n\t \tbuf.close(); \n\t }\n\t\t\t\n\t\treturn valueMap;\n\t}", "public void readEquipment() {\n try {\n FileInputStream fileIn = new FileInputStream(\"temp/equipment.ser\");\n ObjectInputStream in = new ObjectInputStream(fileIn);\n equipment = (HashMap<String, Equipment>) in.readObject();\n in.close();\n fileIn.close();\n } catch (IOException e) {\n equipment = new HashMap<>();\n } catch (ClassNotFoundException c) {\n System.out.println(\"Class HashMap not found\");\n c.printStackTrace();\n return;\n }\n }", "public void readIDs() {\n try {\n FileInputStream fileIn = new FileInputStream(\"temp/ids.ser\");\n ObjectInputStream in = new ObjectInputStream(fileIn);\n ids = (HashMap<String, Member>) in.readObject();\n in.close();\n fileIn.close();\n } catch (IOException e) {\n ids = new HashMap<>();\n } catch (ClassNotFoundException c) {\n System.out.println(\"Class HashMap not found\");\n c.printStackTrace();\n return;\n }\n\n }", "public void loadHours(String fileName)\r\n\t{\r\n\t\t//try block to try and open the file\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//declare local variables that will be assigned to the employee. These will be converted after split. \r\n\t\t\tString empID = \"\";\r\n\t\t\tString dailyHours = \"\";\r\n\t\t\tString day = \"\";\r\n\t\t\t//scan for the file \r\n\t\t\tScanner infile = new Scanner(new FileInputStream(fileName));\r\n\t\t\t\r\n\t\t\t//while loop if there is a next line\r\n\t\t\twhile(infile.hasNext())\r\n\t\t\t{\r\n\t\t\t\t//declare the line that was pulled as a single string \r\n\t\t\t\tString line = infile.nextLine();\r\n\t\t\t\t\r\n\t\t\t\t//break the line up by the delimiter (,)\r\n\t\t\t\tString fields[] = line.split(\",\");\r\n\t\t\t\t\r\n\t\t\t\t//assign the first field to day, 2nd to employeeID, and 3rd to dailyHours\r\n\t\t\t\tday = fields[0];\r\n\t\t\t\tempID = fields[1];\r\n\t\t\t\tdailyHours = fields[2];\r\n\t\t\t\t\r\n\t\t\t\t//cycle the Employee arrayList and see which employee ID matches the added ID\r\n\t\t\t\tfor (Employee employee : empList)\r\n\t\t\t\t{\r\n\t\t\t\t\t//selection structure checking if the empID matches the Employee list ID\r\n\t\t\t\t\tif(employee.getEmpoyeeId().equalsIgnoreCase(empID))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//add the hours to the employee object (convert dailyHours to a Double)\r\n\t\t\t\t\t\temployee.addHours(Double.parseDouble(dailyHours));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//now that the hours have been added to that individual employee, the hours need to be added to the date in the \r\n\t\t\t\t\t\t//DailyHours class by calling findEntryByDate\r\n\t\t\t\t\t\taddToDailyReport(day, Double.parseDouble(dailyHours), employee.getSalary());\r\n\t\t\t\t\t}//end employee ID found\r\n\t\t\t\t\t\r\n\t\t\t\t\t//else not found so set to null\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\temployee = null;\r\n\t\t\t\t\t}//end not found \r\n\t\t\t\t}//end for loop cycling the empList\t\r\n\t\t\t}//end the file has no more lines\r\n\t\t}//end try block\r\n\t\t\r\n\t\t//catch block incase try fails for OPENING THE FILE\r\n\t\tcatch(IOException ex)\r\n\t\t{\r\n\t\t\t//call ex object and display message\r\n\t\t\tex.printStackTrace();\r\n\t\t}//end of catch block\t\r\n\t}", "Map<String, String> Read_File(XmlPullParser xmlPullParser, List<Tags_To_Read> tags, String account_Name) throws NullPointerException, XML_Reader_Exception;", "public void getUserData()\n\t{\n\t\tint count; //Loop counter\n\t\tString pathname = filename;\n\t\t\n\t\tString div = \",\"; //Used to divide info.\n\t\tString [] userArray; //To hold divided info.\n\t\t\n\t\ttry {\n FileReader reader = new FileReader(pathname);\n BufferedReader bufferedReader = new BufferedReader(reader);\n \n String line;\n \n //While getting each line of the data file, BUT stops when USER data found.\n //Loop through each line and determine which user data to choose.\n while ((line = bufferedReader.readLine()) != null) {\n // System.out.println(\"User Data in file: \" + line);\n \n System.out.println(\"Checking User name in line of data ...\");\n \n //This divides the info in the data file into an array.\n userArray = line.split(div); \n \n \n if (User.equals(userArray[0]))\n \t{\n \t\tSystem.out.println(\"User Found: \" + User);\n \t\tuser_line = line;\n \t\t//Assigning data to class variables.\n \t\tUserPassword = userArray[1].trim(); //Assigning the password.\n \t\tDevice_ID = Integer.parseInt(userArray[2].trim()); //Assigning device ID.\n \t\tisLost = (Integer.parseInt(userArray[3].trim()) == 0) ? false : true;\n \t\t\n \t\t//This reads out information.\n \t\tfor (count = 0; count < userArray.length; count++)\n {\n \t\t\tSystem.out.println(\"INFO: \" + userArray[count]);\n }\n \t\tbreak;\n \t}\n System.out.println(\"========================================\");\n }\n reader.close();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static Vector<MyData> getData(File actualFile){\n\t\tVector<MyData> data = new Vector<MyData>();\n\t\ttry {\n\t\t\tObjectInputStream in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(actualFile)));\n\t\t\tdata = (Vector<MyData>)in.readObject();\n\t\t\tin.close();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\treturn data;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn data;\n\t}", "public static void loadFileHash(String path) throws IOException{\n\t\t\n\t\tHashMap<String, List<String>> map = new HashMap<String, List<String>>();\n BufferedReader in = new BufferedReader(new FileReader(path));\n String line = \"\";\n while ((line = in.readLine()) != null) {\n String parts[] = line.split(\":\");\n List<String> docIdLen = new ArrayList<String>();\n docIdLen.add(parts[1]);\n docIdLen.add(parts[2]);\n map.put(parts[0], docIdLen);\n }\n in.close();\n \n printDocHash(map);\n\t}", "public static void readObject() {\r\n try {\r\n if (new File(FILE).exists()) {\r\n LoggingService.getInstance().serverLog(\"Reading cron table.\");\r\n ChunkedCharBuffer buf = new ChunkedCharBuffer();\r\n buf.append(new InputStreamReader(new FileInputStream(FILE)));\r\n String contents = buf.toString();\r\n String[] lines = contents.split(\"[\\n\\r]+\");\r\n for (String line : lines) {\r\n String[] splitLine = line.split(\"\\\\|\");\r\n int index = 0;\r\n scheduleJob(\r\n new CronJob(\r\n splitLine[index++], //identifier\r\n Long.valueOf(splitLine[index++]), //interval\r\n new Date(Long.valueOf(splitLine[index++]).longValue()), //start time\r\n splitLine[index++], //command string\r\n splitLine[index++], //user\r\n splitLine[index++] //user service\r\n )\r\n );\r\n }\r\n } else {\r\n LoggingService.getInstance().serverLog(\"No cron table\");\r\n }\r\n } catch (Exception e) {\r\n LoggingService.getInstance().serverLog(\"Error reading cron table: \" + e);\r\n }\r\n }", "public void loadObjectData(String datafile) {\n\t\tProperties databaseAddData = new Properties();\n\t\ttry {\n\t\t\tdatabaseAddData.load(new FileInputStream(langFile));\n\t\t} catch (Exception e) {}\n\t\t//put values from the properties file into hashmap\n\t\tthis.properties.put(\"PROPERTY\", databaseAddData.getProperty(\"PROPERTY\"));\n\t}", "public static void read(String fname){\r\n\t\t\t\r\n\t\t\tString line = \"\";\r\n\t\t\ttry {\r\n\t // FileReader reads text files in the default encoding.\r\n\t FileReader fileReader = new FileReader(fname);\r\n\t \r\n\t // Always wrap FileReader in BufferedReader.\r\n\t BufferedReader bufferedReader = new BufferedReader(fileReader);\r\n\t header=bufferedReader.readLine();\r\n\t \r\n\t data = new ArrayList<alldata>();\r\n\r\n\t while((line = bufferedReader.readLine()) != null) {\r\n\t \t\r\n\t //parse line and divide data by comma\r\n\t \r\n\t \t\r\n\t \tString[] lineStr = line.split(\",\");\r\n\t \t\r\n\t //create object row into which data from each line is stored and then added to array list\t\r\n\t \t\r\n\t if(lineStr.length >0) {\r\n\t \talldata row = new alldata();\r\n\t \trow.Name = lineStr[0]+ \",\" + lineStr[1];\r\n\t \trow.Num = lineStr[2];\r\n\t \trow.State = lineStr[3];\r\n\t \trow.Zip = lineStr[4];\r\n\t \trow.Age = Integer.parseInt(lineStr[6]);\r\n\t \trow.Sex = lineStr[7];\r\n\t \t\r\n\t \tdata.add(row);\r\n\t }\r\n\t \r\n\t \r\n\t } \r\n\t bufferedReader.close(); // Always close files. \r\n\t }catch(FileNotFoundException ex) {\r\n\t System.out.println(\"Unable to open file '\" + fname + \"'\"); \r\n\t }catch(IOException ex) {\r\n\t System.out.println(\"Error reading file '\" + fname + \"'\"); \r\n\t }\r\n\t\t\tSystem.out.println(\"Finish reading data from file \"+ fname);\r\n\t\t}", "public void load() {\n\t\n\t\tdataTable = new HashMap();\n\t\t\n\t\tArrayList musicArrayList = null;\n\t\tStringTokenizer st = null;\n\n\t\tMusicRecording myRecording;\n\t\tString line = \"\";\n\n\t\tString artist, title;\n\t\tString category, imageName;\n\t\tint numberOfTracks;\n\t\tint basePrice;\n\t\tdouble price;\n\n\t\tTrack[] trackList;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tlog(\"Loading File: \" + FILE_NAME + \"...\");\n\t\t\tBufferedReader inputFromFile = new BufferedReader(new FileReader(FILE_NAME));\n\t\t\t\n\t\t\t// read until end-of-file\n\t\t\twhile ( (line = inputFromFile.readLine()) != null ) {\t\t\t\n\t\t\t\n\t\t\t\t// create a tokenizer for a comma delimited line\n\t\t\t\tst = new StringTokenizer(line, \",\");\n\t\t\n\t\t\t\t// Parse the info line to read following items formatted as\n\t\t\t\t// - the artist, title, category, imageName, number of tracks\n\t\t\t\t//\n\t\t\t\tartist = st.nextToken().trim();\n\t\t\t\ttitle = st.nextToken().trim();\n\t\t\t\tcategory = st.nextToken().trim();\n\t\t\t\timageName = st.nextToken().trim();\n\t\t\t\tnumberOfTracks = Integer.parseInt(st.nextToken().trim());\n\t\t\t\t\t\t\n\t\t\t\t// read all of the tracks in\n\t\t\t\ttrackList = readTracks(inputFromFile, numberOfTracks);\n\n\t\t\t\t// select a random price between 9.99 and 15.99\n\t\t\t\tbasePrice = 9 + (int) (Math.random() * 7);\n\t\t\t\tprice = basePrice + .99;\n\n\t\t\t\t// create the music recording\n\t\t\t\tmyRecording = new MusicRecording(artist, trackList, title, \n\t\t\t\t\t\t\t\t\t\t\t\t price, category, imageName);\n\n\t\t\t\t// check to see if we have information on this category\n\t\t\t\tif (dataTable.containsKey(category)) {\n\t\t\t\t\n\t\t\t\t\t// get the list of recordings for this category\n\t\t\t\t\tmusicArrayList = (ArrayList) dataTable.get(category); \t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\n\t\t\t\t\t// this is a new category. simply add the category\n\t\t\t\t\t// to our dataTable\n\t\t\t\t\tmusicArrayList = new ArrayList();\n\t\t\t\t\tdataTable.put(category, musicArrayList);\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// add the recording\n\t\t\t\tmusicArrayList.add(myRecording);\n\t\t\t\t\n\t\t\t\t// move ahead and consume the line separator\n\t\t\t\tline = inputFromFile.readLine();\n\t\t\t}\n\n\t\t\tinputFromFile.close();\n\t\t\tlog(\"File loaded successfully!\");\n\t\t\tlog(\"READY!\\n\");\n\n\t\t}\n\t\tcatch (FileNotFoundException exc) {\n\t\t\tlog(\"Could not find the file \\\"\" + FILE_NAME + \"\\\".\");\n\t\t\tlog(\"Make sure it is in the current directory.\");\n\t\t\tlog(\"========>>> PLEASE CONTACT THE INSTRUCTOR.\\n\\n\\n\");\n\t\t\tlog(exc);\n\t\t\t\n\t\t}\n\t\tcatch (IOException exc) {\n\t\t\tlog(\"IO error occurred while reading file: \" + FILE_NAME);\n\t\t\tlog(\"========>>> PLEASE CONTACT THE INSTRUCTOR.\\n\\n\\n\");\n\t\t\tlog(exc);\n\n\t\t}\n\t\n\t}", "private static HashMap<String, String> buildHashMap() {\n HashMap<String, String> capitals;\n Scanner fileReader;\n String states;\n \n capitals = new HashMap<>();\n \n // Load the file\n try {\n fileReader = new Scanner(\n new BufferedReader(\n new FileReader(FILEPATH)\n )\n );\n } catch(FileNotFoundException ex) {\n System.out.println(FILEPATH + \" not found\");\n System.exit(-1);\n return null;\n }\n \n // Unmarchal the data\n System.out.println(\"=====\\nHERE ARE THE STATES:\");\n states = \"\";\n while (fileReader.hasNextLine()) {\n String currentLine, state, capital;\n String[] data;\n \n currentLine = fileReader.nextLine();\n data = currentLine.split(\"::\");\n if (data.length != 2) {\n System.out.println(\"Invalid file format\");\n System.exit(-1);\n return null;\n }\n \n state = data[0];\n capital = data[1];\n capitals.put(state, capital);\n states += state + \" \";\n }\n System.out.println(states);\n \n return capitals;\n }", "public static void readFile() {\n\t\tbufferedReader = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"/home/bridgeit/Desktop/number.txt\");\n\t\t\tbufferedReader = new BufferedReader(fileReader);\n\n\t\t\tString line;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tString[] strings = line.split(\" \");\n\t\t\t\tfor (String integers : strings) {\n\t\t\t\t\thl.add(Integer.parseInt(integers));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File Not Found...\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tbufferedReader.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void loadEmployees(String fileName)\r\n\t{\r\n\t\t//try block to attempt to open the file\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//declare local variables for the file name and data fields within the employeelist text file\r\n\t\t\t//these will all be Strings when pulled from the file, and then converted to the proper data type when they are assigned to the Employee objects\r\n\t\t\tString empID = \"\";\r\n\t\t\tString empLastName = \"\";\r\n\t\t\tString empFirstName = \"\";\r\n\t\t\tString empType = \"\";\t\r\n\t\t\tString empSalary = \"\"; //will convert to double\r\n\t\t\t\r\n\t\t\t//scan for file\r\n\t\t\tScanner infile = new Scanner(new FileInputStream(fileName));\r\n\t\t\t\r\n\t\t\t//while loop searching file records\r\n\t\t\twhile(infile.hasNext())\r\n\t\t\t{\r\n\t\t\t\t//split the field into segments with the comma (,) being the delimiter (employee ID, Last Name, First Name, employee type, and employee salary)\r\n\t\t\t\tString line = infile.nextLine();\r\n\t\t\t\tString[] fields = line.split(\",\");\r\n\t\t\t\tempID = fields[0];\r\n\t\t\t\tempLastName = fields[1];\r\n\t\t\t\tempFirstName = fields[2];\r\n\t\t\t\tempType = fields[3];\r\n\t\t\t\tempSalary = fields[4];\r\n\t\t\t\t\r\n\t\t\t\t//create a selection structure that creates the type of employee based on the empType\r\n\t\t\t\tif(empType.equalsIgnoreCase(\"H\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create an HourlyEmployee and convert empSalary to a double\r\n\t\t\t\t\tHourlyEmployee hourlyEmp = new HourlyEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add hourlyEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(hourlyEmp);\r\n\t\t\t\t}//end create hourly employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create an exempt employee for E\r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"E\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create an exempt employee (salary) and convert the empSalary to a double\r\n\t\t\t\t\tExemptEmployee salaryEmp = new ExemptEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add salaryEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(salaryEmp);\r\n\t\t\t\t}//end create exempt (salary) employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create a contractor \r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"C\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create a contract employee and convert the empSalary to a double\r\n\t\t\t\t\tContractEmployee contractEmp = new ContractEmployee(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add contractEmp to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(contractEmp);\r\n\t\t\t\t}//end create contractor employee\r\n\t\t\t\t\r\n\t\t\t\t//else if create a day laborer\r\n\t\t\t\telse if(empType.equalsIgnoreCase(\"d\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t//create a day laborer and convert the empSalary to a double\r\n\t\t\t\t\tDayLaborer laborer = new DayLaborer(empID, empLastName, empFirstName, Double.parseDouble(empSalary));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//add laborer to the Employee ArrayList empList\r\n\t\t\t\t\tempList.add(laborer);\r\n\t\t\t\t}//end create day laborer employee\r\n\t\t\t\t\r\n\t\t\t\t//else ignore the employee (looking at you Greyworm!)\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//save the employee type and id to return as an error\r\n\t\t\t\t\tempTypeError = empType;\r\n\t\t\t\t\tempIDError = empID;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//ignore the employee \r\n\t\t\t\t\tempType = null;\r\n\t\t\t\t}//end ignore X employee\r\n\t\t\t}//end while loop cycling the records in the employeelist\r\n\t\t\t\r\n\t\t\t//close infile when done\r\n\t\t\tinfile.close();\r\n\t\t}//end of try block opening employeelist.txt file\r\n\t\t\r\n\t\t//catch block if file not found\r\n\t\tcatch(IOException ex)\r\n\t\t{\r\n\t\t\t//call ex object and display message\r\n\t\t\tex.printStackTrace();\r\n\t\t}//end of catch for file not found\r\n\t}", "void readFromFile(String file)\n {\n try\n {\n employees.clear();\n FileReader inputFile = new FileReader(fileName);\n BufferedReader input = new BufferedReader(inputFile);\n String line = input.readLine();\n \n while(line != null)\n {\n Employee worker = new Employee();\n StringTokenizer stringParser = new StringTokenizer(line, \",\");\n while(stringParser.hasMoreElements())\n {\n worker.setName(stringParser.nextElement().toString());\n worker.setHours(Integer.parseInt(stringParser.nextElement().toString()));\n worker.setRate(Float.parseFloat(stringParser.nextElement().toString()));\n }\n employees.add(worker);\n line = input.readLine();\n }\n inputFile.close();\n }\n catch(FileNotFoundException e)\n {\n e.getStackTrace();\n }\n catch(IOException e)\n {\n e.getStackTrace();\n }\n }", "public void loadPersonalityCard(HashMap<Integer, PersonalityCard> PersonalityCard_HASH){\r\n PersonalityCardFactory personalityCardFactory = new PersonalityCardFactory();\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"PersonalityCard.csv\"));\r\n \r\n while (scanner.hasNextLine()) {\r\n String line = scanner.nextLine();\r\n \r\n if(PersonalityCard_HASH.size() == 0){\r\n line = scanner.nextLine();\r\n }\r\n \r\n PersonalityCard personalityCard = personalityCardFactory.getPersonalityCard(line);\r\n \r\n PersonalityCard_HASH.put(personalityCard.getId(), personalityCard);\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadPersonalityCard\");\r\n }\r\n \r\n }", "public void readFile(String configFileName){\n\t\tBufferedReader readLine_br = null;\r\n\t\tFileReader readLine_fr = null;\r\n\t\tString line;\r\n\t\tString searchLink = \"LINK:\";\r\n\t\tString searchNetwork = \"NETWORK:\";\r\n\t\tString selfHop = \"0.0.0.0:0\";\r\n\t\tint selfCost = 0;\r\n\t\troutingTableClass routingTableObject = new routingTableClass();\r\n\t\t\t\t\r\n\t\ttry{\r\n\t\t\treadLine_fr = new FileReader(configFileName);\r\n\t\t\treadLine_br = new BufferedReader(readLine_fr);\r\n\t\t\t\r\n\t\t\t// reading line by line\r\n\t\t\twhile((line = readLine_br.readLine()) != null){\r\n\t\t\t\t\r\n\t\t\t\t// making an array of the input\r\n\t\t\t\tString[] ipArray_1 = line.split(\" \");\r\n\t\t\t\t\r\n\t\t\t\t// for LINKS\r\n\t\t\t\tif(ipArray_1[0].equals(searchLink))\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] ipArray = {ipArray_1[0],ipArray_1[1],ipArray_1[2]};\r\n\t\t\t\t\t//segregating the IP's and the Port Numbers\r\n\t\t\t\t\tString ip_1 = ipArray[1].split(\":\")[0];\r\n\t\t\t\t\tint port_1 = Integer.parseInt(ipArray[1].split(\":\")[1]);\r\n\t\t\t\t\tString ip_2 = ipArray[2].split(\":\")[0];\r\n\t\t\t\t\tint port_2 = Integer.parseInt(ipArray[2].split(\":\")[1]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//making objects for receiving and sending\r\n\t\t\t\t\tRunnable senderObject = new Sender(ip_2,port_2, port_1, routingTableObject);\r\n\t\t\t\t\tRunnable receiverObject = new Receiver(ip_1, port_1,ip_2,port_2,routingTableObject);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// making Receiver and Sender Thread\r\n\t\t\t\t\tThread receiverThread = new Thread(receiverObject);\r\n\t\t\t\t\tThread senderThread = new Thread(senderObject);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//starting the sending and receiving Threads\r\n\t\t\t\t\tsenderThread.start();\r\n\t\t\t\t\treceiverThread.start();\r\n\t\t\t\t}\r\n\t\t\t\t// for NETWORKS\r\n\t\t\t\telse if(ipArray_1[0].equals(searchNetwork))\r\n\t\t\t\t{\r\n\t\t\t\t\tString[] ipArray = {ipArray_1[0],ipArray_1[1]};\r\n\t\t\t\t\tArrayList addEntry = new ArrayList();\r\n\t\t\t\t\taddEntry.add(ipArray[1]);\r\n\t\t\t\t\taddEntry.add(selfHop);\r\n\t\t\t\t\taddEntry.add(selfCost);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t// making entry in the routing table\r\n\t\t\t\t\tsynchronized (routingTableObject) {\r\n\t\t\t\t\t\troutingTableObject.routingTable.add(addEntry);\r\n\t\t\t\t\t\troutingTableObject.printTable();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IOException exc){\r\n\t\t\texc.printStackTrace();\r\n\t\t}\r\n\t}", "private static void load(String filename, Stats stats) throws IOException {\n System.out.println(\"Analysing file: \" + filename);\n getConsole().println(\"Analysing file: \" + filename.substring(0, Integer.min(filename.length(), 60)) + (filename.length() > 60 ? \"...\" : \"\"));\n\n String line;\n long numOfKeys = 0,\n actualKey = 0,\n actualLineNumber = 0,\n startFileTime = System.nanoTime();\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n while ((line = reader.readLine()) != null) {\n String[] tuple = line.split(\":\", 2);\n if (tuple.length == 2 && tuple[0].equals(\"PRIV\")) {\n numOfKeys++;\n }\n }\n } catch (FileNotFoundException ex) {\n System.err.println(\"File '\" + filename + \"' not found\");\n return;\n }\n\n try (BufferedReader reader = new BufferedReader(new FileReader(filename))) {\n lastStatusMessageTime = System.nanoTime();\n Params params = null;\n while ((line = reader.readLine()) != null) {\n actualLineNumber++;\n String[] tuple = line.split(\";\", 2);\n if (tuple[0].equals(\"CPLC.ICSerialNumber\")) {\n stats.changeCard(tuple[1]);\n }\n\n tuple = line.split(\":\", 2);\n if (tuple.length != 2) {\n continue;\n }\n String value = tuple[1].replaceAll(\"\\\\s\", \"\");\n switch (tuple[0]) {\n case \"PUBL\":\n if (params != null) {\n throw new WrongKeyException(\"Loading public key on line \" + actualLineNumber + \" while another public key is loaded\");\n }\n params = Params.readPublicKeyFromTlv(value);\n break;\n case \"PRIV\":\n if (params == null) {\n throw new WrongKeyException(\"Loading private key on line \" + actualLineNumber + \" while public key not loaded\");\n }\n params.readPrivateKeyFromTlv(value);\n break;\n default:\n if (tuple[0].charAt(0) == '#') {\n if (params == null) {\n throw new WrongKeyException(\"Loading time on line \" + actualLineNumber + \" while public key not loaded\");\n }\n\n int time = (int) (Double.parseDouble(tuple[1]) * 1000.0);\n params.setTime(time);\n stats.process(params);\n\n params = null;\n actualKey++;\n showProgress(actualKey, numOfKeys, startFileTime);\n }\n }\n }\n } catch (FileNotFoundException ex) {\n System.err.println(\"File '\" + filename + \"' not found\");\n } catch (WrongKeyException ex) {\n System.err.println(\"File '\" + filename + \"' is in wrong format.\\n\" + ex.getMessage());\n } finally {\n consoleDoneLine();\n }\n }", "public static Hashtable<String, Hashtable<String, String>> loadDataFromXml(String filePath, String splitKey)\n\t\t\tthrows Exception {\n\t\tmasterTable = new Hashtable<>();\n\t\tElement parentNode;\n\t\tElement childNode;\n\n\t\tif (xmlDocument != null) {\n\t\t\tNodeList locatorNodes = xmlDocument.getElementsByTagName(splitKey);\n\n\t\t\tfor (int i = 0; i < locatorNodes.getLength(); i++) {\n\t\t\t\tparentNode = (Element) locatorNodes.item(i);\n\t\t\t\tchildTable = new Hashtable<>();\n\n\t\t\t\tNodeList propertyList = object.getElementsByTagName(\"data\");\n\t\t\t\tfor (int j = 0; j < propertyList.getLength(); j++) {\n\t\t\t\t\tchildNode = (Element) propertyList.item(j);\n\n\t\t\t\t\tchildTable.put(object.getAttribute(\"key\"), object.getAttribute(\"value\"));\n\n\t\t\t\t}\n\t\t\t\tmasterTable.put(parentNode.getAttribute(\"name\"), childTable);\n\t\t\t}\n\t\t}\n\t\treturn masterTable;\n\t}", "public static List<Map<String, String>> loadData(String filename) throws IOException {\n\t\tList<Map<String, String>> data = new ArrayList<>();\n\t\tPath dataFile = Paths.get(filename);\n\t\t\n\t\t// Files.readAllLines only accepts Path and returns a List\n\t\t// it reads the whole file in one shot\n\t\tList<String> linesList = Files.readAllLines(dataFile);\n\t\t// header row to attributes array\n\t\tString[] attributes = linesList.get(0).split(\",\");\n\t\t\n\t\t// process data rows\n\t\tfor (int i = 1; i < linesList.size(); i++) {\n\t\t\tString[] values = linesList.get(i).split(\",\");\n\t\t\tif (values.length == 0 && values[0].length() == 0) break;\n\t\t\t// create a map for each row\n\t\t\tMap<String, String> row = new HashMap<>();\n\t\t\t//fill the row\n\t\t\tfor (int j = 0; j < attributes.length; j++)\n\t\t\t\trow.put(attributes[j], values[j]);\n\t\t\tdata.add(row);\t\t// add data to row\n\t\t}\t\n\n\t\t// do the same with a Stream, but use the iterator of the stream\n\t\t// instead of dealing with it directly\n\t\tStream<String> linesStream = Files.lines(dataFile);\n\t\tIterator<String> it = linesStream.iterator();\n\t\tattributes = it.next().split(\",\");\n\t\twhile (it.hasNext()) {\n\t\t\tString[] values = it.next().split(\",\");\n\t\t\tif (values.length > 0 && values[0].length() > 0) {\n\t\t\t\tMap<String, String> row = new HashMap<>();\n\t\t\t\tfor (int i = 0; i < attributes.length; i++)\n\t\t\t\t\trow.put(attributes[i], values[i]);\n\t\t\t\t// data.add(row);\n\t\t\t}\n\t\t}\n\t\tlinesStream.close();\n\n\t\treturn data;\n\t}", "public void input(File inputFile){\n instantiateTable();\n try{\n String line = \"\";\n //method to scan certain words between 2 delimiting characters, usually blank lines or white spaces or tabs.\n Scanner read = new Scanner(inputFile).useDelimiter(\"\\\\W+|\\\\n|\\\\r|\\\\t|, \");\n //while there is a next word, keeps reading the file \n while (read.hasNext()){\n line = read.next().toLowerCase();\n LLNodeHash words = new LLNodeHash(line, 1, null);\n add(words);\n }\n read.close();\n }\n catch (FileNotFoundException e){\n System.out.print(\"Not found\");\n e.printStackTrace();\n }\n System.out.println(hashTable.length);\n System.out.println(space());\n System.out.println(loadFactor);\n System.out.println(collisionLength());\n print();\n }", "static Map<String, String> readPasswdFile (File pwdFile) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new FileReader(pwdFile));\n\t\tHashtable users = new Hashtable();\n\t\tString l = r.readLine();\n\t\twhile (l != null) {\n\t\t\tint hash = l.indexOf('#');\n\t\t\tif (hash != -1)\n\t\t\t\tl = l.substring(0, hash);\n\t\t\tl = l.trim();\n\t\t\tif (l.length() != 0) {\n\t\t\t\tStringTokenizer t = new StringTokenizer(l, \":\");\n\t\t\t\tString user = t.nextToken();\n\t\t\t\tString password = t.nextToken();\n\t\t\t\tusers.put(user, password);\n\t\t\t}\n\t\t\tl = r.readLine();\n\t\t}\n\t\tr.close();\n\t\treturn users;\n\t}", "public void loadHackerFile(HackerFile hf) {\n \n resetVariables();\n \n // should I load the description, etc from the HF? Should I even save it in the HF? I don't see any reason.\n this.name = hf.getName();\n\n HashMap content = hf.getContent();\n \n // <specialAttribute1><name><value><short_desc><long_desc>\n HashMap special1 = hf.getSpecial(1);\n HashMap special2 = hf.getSpecial(2);\n \n String a1 = (String)special1.get(\"name\");\n\t\tString v1 = (String)special1.get(\"value\");\n\t\tif(v1.equals(\"\")){\n\t\t\tv1 = \"0\";\n\t\t}\n float value = (new Float(\"\" + v1)).floatValue();\n if (a1.equals(\"emptyPettyCash()fail\")) {\n this.pettyCashFailPct = value;\n } else if (a1.equals(\"emptyPettyCash()reduce\")) {\n this.pettyCashReducePct = 1.0f-value;\n } else if (a1.equals(\"stealFile()fail\")) {\n this.stealFileFailPct = value;\n } else if (a1.equals(\"changeDailyPay()fail\")) {\n this.dailyPayChangeFailPct = value;\n } else if (a1.equals(\"changeDailyPay()reduce\")) {\n this.dailyPayChangeReducePct = 1.0f-value;\n } else if (a1.equals(\"installScript()fail\")) {\n this.installScriptFailPct = value;\n }\n \n String a2 = (String)special2.get(\"name\");\n\t\tString v2 = (String)special2.get(\"value\");\n\t\tif(v2.equals(\"\")){\n\t\t\tv2 = \"0\";\n\t\t}\n value = (new Float(\"\" + v2)).floatValue();\n if (a2.equals(\"emptyPettyCash()fail\")) {\n this.pettyCashFailPct = value;\n } else if (a2.equals(\"emptyPettyCash()reduce\")) {\n this.pettyCashReducePct = value;\n } else if (a2.equals(\"stealFile()fail\")) {\n this.stealFileFailPct = value;\n } else if (a2.equals(\"changeDailyPay()fail\")) {\n this.dailyPayChangeFailPct = value;\n } else if (a2.equals(\"changeDailyPay()reduce\")) {\n this.dailyPayChangeReducePct = value;\n } else if (a2.equals(\"installScript()fail\")) {\n this.installScriptFailPct = value;\n }\n \n // damage modifiers for this specific firewall\n this.bankDamageModifier = (new Float(\"\" + content.get(\"bank_damage_modifier\")).floatValue());\n this.redirectDamageModifier = (new Float(\"\" + content.get(\"redirect_damage_modifier\")).floatValue());\n this.attackDamageModifier = (new Float(\"\" + content.get(\"attack_damage_modifier\")).floatValue());\n this.ftpDamageModifier = (new Float(\"\" + content.get(\"ftp_damage_modifier\")).floatValue());\n this.httpDamageModifier = (new Float(\"\" + content.get(\"http_damage_modifier\")).floatValue());\n \n // attack back value for this firewall\n\t\tif(content.get(\"attack_damage\") == null){\n\t\t\tcontent.put(\"attack_damage\",\"0\");\n\t\t}\n this.attackDamage = (new Float(\"\" + content.get(\"attack_damage\"))).floatValue(); // how much attack damage does this firewall do back\n\t\t\n this.equipLevel = (int)(float)(new Float(\"\" + content.get(\"equip_level\"))).floatValue();\n this.cpuCost = hf.getCPUCost();\n\t\tif(name.equals(\"\")){\n\t\t\tname = (String)content.get(\"name\");\n\t\t}\n this.hackerFile = hf;\n }", "@Nullable\n private static Map<Integer, String> readNwsoSubCenter(String path) {\n Map<Integer, String> result = new HashMap<>();\n\n try (InputStream is = GribResourceReader.getInputStream(path);\n BufferedReader br = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) {\n while (true) {\n String line = br.readLine();\n if (line == null) {\n break;\n }\n if ((line.isEmpty()) || line.startsWith(\"#\")) {\n continue;\n }\n\n StringBuilder lineb = new StringBuilder(line);\n StringUtil2.removeAll(lineb, \"'+,/\");\n String[] flds = lineb.toString().split(\"[:]\");\n\n int val = Integer.parseInt(flds[0].trim()); // must have a number\n String name = flds[1].trim() + \": \" + flds[2].trim();\n\n result.put(val, name);\n }\n return Collections.unmodifiableMap(result); // all at once - thread safe\n\n } catch (IOException ioError) {\n logger.warn(\"An error occurred in Grib1Tables while trying to open the table \" + path + \" : \" + ioError);\n return null;\n }\n }", "private Hashtable loadFromDoc() {\n\tHashtable tab = new Hashtable();\n\n\tNodeList tree = stateDoc.getDocumentElement().getChildNodes();\n\tfor (int i = 0; tree != null && i < tree.getLength(); i++) {\n\t NamedNodeMap attr = tree.item(i).getAttributes();\n\t if (attr != null) {\n\t\tString name = attr.getNamedItem(\"name\").getNodeValue();\n\t\ttab.put(name, new WeatherUnit(attr));\n\t }\n\t}\n\treturn tab;\n }", "private static void populateDataStructures(\r\n final String filename,\r\n final Map<String, List<String>> sessionsFromCustomer,\r\n Map<String, List<View>> viewsFromSessions,\r\n Map<String, List<Buy>> buysFromSessions\r\n\r\n /* add parameters as needed */\r\n )\r\n throws FileNotFoundException\r\n {\r\n try (Scanner input = new Scanner(new File(filename)))\r\n {\r\n processFile(input, sessionsFromCustomer,\r\n viewsFromSessions, buysFromSessions\r\n /* add arguments as needed */ );\r\n }\r\n }", "public SymbolTable(File symbolDataFile) throws FileNotFoundException\n {\n symbolPairs = new ArrayIndexList<SymbolPair>();\n Scanner fileScan = new Scanner(symbolDataFile);\n String[] splitLine;\n while (fileScan.hasNextLine())\n {\n /* http://stackoverflow.com/questions/5067942/what-is-the-best-way-to-extract-the-first-word-from-a-string-in-java\n First word = ticker symbol, rest of line = company name\n */\n splitLine = fileScan.nextLine().split(\" \", 2);\n symbolPairs.add(symbolPairs.size(), (new SymbolPair(splitLine[0], splitLine[1].trim())));\n }\n }", "private void loadData() {\n try {\n URL source = new URL(CSV_URL);\n URLConnection connect = source.openConnection();\n BufferedReader f = new BufferedReader(new InputStreamReader(connect.getInputStream()));\n\n header = f.readLine().split(\",\");\n // Replace third header with Difficulty Rating\n header[3] = \"Difficulty\";\n\n String line;\n while((line = f.readLine()) != null) {\n String[] row = line.split(\",\");\n // Section: 0, 1, 2, 3 for now, 3 will be WCC\n\n int problemNumber = Integer.parseInt(row[0]);\n int section;\n int year;\n String exam = row[1];\n String answer = row[2];\n\n if(row.length > 3) {\n answer += \"~\" + row[3];\n }\n\n if(exam.matches(\"USNCO .*\")) {\n exam = exam.substring(6);\n year = Integer.parseInt(exam.substring(1, 5));\n if(exam.charAt(0) == 'N') {\n section = 1;\n }\n else {\n section = 0;\n }\n }\n else {\n year = Integer.parseInt(exam.substring(4, 8));\n section = 3;\n }\n\n int id = year*240 + problemNumber*4 + section;\n data.put(id, answer);\n }\n }\n catch (Exception e) {\n // Solution given by StackOverflow: https://stackoverflow.com/questions/1149703/\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n e.printStackTrace(pw);\n String sStackTrace = sw.toString().substring(0, 800); // stack trace as a string\n\n // Send error messages to me\n instance.retrieveUserById(CREATOR).queue(\n user -> user.openPrivateChannel().queue(\n channel -> channel.sendMessage(sStackTrace).queue()));\n\n }\n }", "@Override\n public void loadDataFromFile(File file) {\n Gson gson = new Gson();\n try {\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n IndividualCustomer customer =\n gson.fromJson(scanner.nextLine(),IndividualCustomer.class);\n customerList.add(customer);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "private void parseFile(String fileName) {\n Set<String> inputs = new HashSet<String>();\n Set<String> outputs = new HashSet<String>();\n double[] qos = new double[4];\n\n Properties p = new Properties(inputs, outputs, qos);\n\n try {\n Scanner scan = new Scanner(new File(fileName));\n while(scan.hasNext()) {\n\t\t\t\tString name = scan.next();\n\t\t\t\tString inputBlock = scan.next();\n\t\t\t\tString outputBlock = scan.next();\n\n\t\t\t\tqos[TIME] = scan.nextDouble();\n\t\t\t\tqos[COST] = scan.nextDouble();\n\t\t\t\tqos[AVAILABILITY] = scan.nextDouble()/100;\n\t\t\t\tqos[RELIABILITY] = scan.nextDouble()/100;\n\t\t\t\t// Throw the other two away;\n\t\t\t\tscan.nextDouble();\n\t\t\t\tscan.nextDouble();\n\n\t\t\t\tfor (String s :inputBlock.split(\",\"))\n\t\t\t\t\tinputs.add(s);\n\t\t\t\tfor (String s :outputBlock.split(\",\"))\n\t\t\t\toutputs.add(s);\n\n p = new Properties(inputs, outputs, qos);\n\n ServiceNode ws = new ServiceNode(name, p);\n serviceMap.put(name, ws);\n inputs = new HashSet<String>();\n outputs = new HashSet<String>();\n qos = new double[4];\n }\n scan.close();\n }\n catch(IOException ioe) {\n System.out.println(\"File parsing failed...\");\n }\n\t\tnumServices = serviceMap.size();\n }", "protected abstract void loadData();", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n InputStreamReader isr = new InputStreamReader(fis);\n BufferedReader reader = new BufferedReader(isr);\n Gson gson = new Gson();\n Type listFeelingType = new TypeToken<ArrayList<Feeling>>(){}.getType();\n recordedFeelings.clear();\n ArrayList<Feeling> tmp = gson.fromJson(reader, listFeelingType);\n recordedFeelings.addAll(tmp);\n fis.close();\n\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n recordedFeelings = new ArrayList<Feeling>();\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public static HighScoresTable loadFromFile(File filename) {\n try {\n FileInputStream fis = new FileInputStream(filename);\n ObjectInputStream ois = new ObjectInputStream(fis);\n HighScoresTable table = (HighScoresTable) ois.readObject();\n ois.close();\n return table;\n } catch (Exception e) { //filename was not found - return empty table.\n return new HighScoresTable(HighScoresTable.DEFAULT_CAPACITY);\n }\n }", "public void parseHeader()\n {\n\n Hashtable table = new Hashtable();\n String[] lines = Utilities.splitString(header, \"\\r\\n\"); //Break everything into lines\n String[] line1 = Utilities.splitString(header, \" \"); //Break the 1st header line Ex: GET / HTTP/1.1\n method = line1[0].trim();\n file = line1[1].trim();\n Utilities.debugLine(\"WebServer.parseHeader(): \" + lines[0], DEBUG);\n\n //For the remainder of the headers, parse the requestFields.\n for (int i = 1; i < lines.length - 1; i++)\n {\n String[] tempLine = Utilities.splitStringOnce(lines[i], \":\");\n table.put(tempLine[0].trim(), tempLine[1].trim());\n }\n headerFields = table;\n }", "public static HashMap<String,String> read_json_file(String filepath){\n HashMap<String,String> map = new HashMap<String,String>();\n try{\n BufferedReader bufferedReader = new BufferedReader(new FileReader(filepath));\n Gson gson = new Gson();\n Object json = gson.fromJson(bufferedReader, Object.class);\n map = new Gson().fromJson(\n json.toString(), new TypeToken<HashMap<String, String>>() {}.getType()\n );\n } catch (FileNotFoundException e ) {\n e.printStackTrace();\n }\n return map;\n }", "@Override\n\tpublic void load(Reader reader)\n\t{\n\t\tString os = System.getProperty(\"os.name\", \"?\").toLowerCase();\n\t\tif (os.startsWith(\"linux\"))\n\t\t\tos = \"linux\";\n\t\telse if (os.startsWith(\"windows\"))\n\t\t\tos = \"windows\";\n\t\telse if (os.startsWith(\"sun\"))\n\t\t\tos = \"sun\";\n\t\telse if (os.startsWith(\"mac\"))\n\t\t\tos = \"mac\";\n\t\t\n\t\t\n\t\tString line, key, value;\n\t\tint i,j;\n\t\tScanner input = new Scanner(reader);\n\t\twhile (input.hasNext())\n\t\t{\n\t\t\tline = getNextLine(input);\n\t\t\tif (line.length() > 0)\n\t\t\t{\n\t\t\t\twhile (line.endsWith(\" \\\\\") || line.endsWith(\"\\t\\\\\"))\n\t\t\t\t\tline = line.substring(0, line.length()-1) + getNextLine(input);\n\t\t\t\t\n\t\t\t\t// find index of the first occurrence of either '=' or ':'\n\t\t\t\ti=line.indexOf('=');\n\t\t\t\tj=line.indexOf(':');\n\t\t\t\tif (j >= 0 && j < i)\n\t\t\t\t\ti = j;\n\t\t\t\t\n\t\t\t\t// split line into key and value substrings.\n\t\t\t\t// Note: key must have at least one character.\n\t\t\t\tif (i > 0)\n\t\t\t\t{\n\t\t\t\t\tkey = line.substring(0, i).trim();\n\t\t\t\t\t\n\t\t\t\t\tboolean skip = false;\n\t\t\t\t\tfor (String op : new String[] {\"linux\", \"windows\", \"sun\", \"mac\"})\n\t\t\t\t\t{\n\t\t\t\t\t\tif (key.startsWith(\"<\"+op+\">\"))\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\tif (os.equals(op))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tkey = key.substring((\"<\"+op+\">\").length()).trim();\n\t\t\t\t\t\t\t\tskip = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\tskip = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (skip)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tvalue = line.substring(i+1).trim();\n\t\t\t\t\n\t\t\t\t\t// The following two if statements provide backward compatibility for old GMP property files\n\t\t\t\t\t// that added double '\\' characters in file names and directory names. As soon as all of \n\t\t\t\t\t// our property files no longer contain double backslash characters, we should get rid of this.\n\t\t\t\t\t// if value starts with 4 backslash characters, eg., \\\\\\\\fig2\\\\GMPSys\\\\filename\n\t\t\t\t\t// then replace all double backslashes with single backslashes, eg., \\\\fig2\\GMPSys\\filename\n\t\t\t\t\tif (value.startsWith(\"\\\\\\\\\\\\\\\\\"))\n\t\t\t\t\t{\n\t\t\t\t\t\ti=value.indexOf(\"\\\\\\\\\");\n\t\t\t\t\t\twhile (i >= 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvalue = value.substring(0,i)+value.substring(i+1);\n\t\t\t\t\t\t\ti=value.indexOf(\"\\\\\\\\\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue = \"\\\\\"+value;\n\t\t\t\t\t}\n\n\t\t\t\t\t// if value starts with a character followed by \":\\\\\", eg., c:\\\\GMPSys\\\\filename\n\t\t\t\t\t// then replace all double backslashes with single backslashes, eg., c:\\GMPSys\\filename\n\t\t\t\t\tif (value.length() >= 4 && value.charAt(1)==':' && value.charAt(2) == '\\\\' && value.charAt(3) == '\\\\')\n\t\t\t\t\t{\n\t\t\t\t\t\ti=value.indexOf(\"\\\\\\\\\");\n\t\t\t\t\t\twhile (i >= 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvalue = value.substring(0,i)+value.substring(i+1);\n\t\t\t\t\t\t\ti=value.indexOf(\"\\\\\\\\\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tsetProperty(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (getProperty(\"includePropertyFile\") != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tFile includeFile = getFile(\"includePropertyFile\");\n\t\t\t\tremove(\"includePropertyFile\");\n\t\t\t\tload(new FileReader(includeFile));\n\t\t\t} \n\t\t\tcatch (PropertiesPlusException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t} \n\t\t\tcatch (FileNotFoundException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;" ]
[ "0.65144855", "0.6214035", "0.613155", "0.59441733", "0.59216595", "0.58917624", "0.5783801", "0.57372534", "0.560504", "0.55815226", "0.5578071", "0.55683154", "0.5567419", "0.5533261", "0.55262715", "0.55257565", "0.54905504", "0.5465484", "0.54613316", "0.5429225", "0.5417982", "0.541073", "0.540927", "0.54081225", "0.5406531", "0.5406379", "0.5404607", "0.53941315", "0.5373179", "0.53678936", "0.53619397", "0.5356821", "0.535571", "0.53510535", "0.53421587", "0.53231865", "0.53021204", "0.530103", "0.52799004", "0.52438337", "0.52426904", "0.52380353", "0.52309114", "0.5227457", "0.52235574", "0.5207564", "0.5205045", "0.52021205", "0.51957965", "0.5195129", "0.519041", "0.5188814", "0.5186475", "0.5176656", "0.5170727", "0.51630336", "0.5151819", "0.51495105", "0.51486367", "0.5147092", "0.51417834", "0.5140666", "0.5126118", "0.5119814", "0.51191443", "0.5115973", "0.5112628", "0.5103264", "0.50969994", "0.5093578", "0.5090745", "0.50841606", "0.50810504", "0.507881", "0.507192", "0.5068745", "0.5063981", "0.5062667", "0.50558734", "0.5054481", "0.50534236", "0.50479424", "0.50427604", "0.50411767", "0.5038452", "0.50373447", "0.5036123", "0.5035986", "0.50348204", "0.50319934", "0.5030907", "0.5027548", "0.502706", "0.5027019", "0.50240433", "0.50192875", "0.5017369", "0.5009803", "0.50061107", "0.5006107" ]
0.60592186
3
Simply used for testing purposes.
public static void main(String[] args) { ReadMappings rs = new ReadMappings(); try { Hashtable result = rs.getMappingsFromFile(); Enumeration en = result.elements(); while(en.hasMoreElements()) { System.out.println(en.nextElement()); } System.out.println("Pons:"+result.get("Pons")); System.out.println("Hypothalamus:"+result.get("Hypothalamus")); System.out.println("Medulla:"+result.get("Medulla")); } catch(Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void test() {\n\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private test5() {\r\n\t\r\n\t}", "private stendhal() {\n\t}", "private ProtomakEngineTestHelper() {\r\n\t}", "@Override\n @Before\n public void setUp() throws IOException {\n }", "@Before\n\t public void setUp() {\n\t }", "@Override\n public void test() {\n \n }", "private Mocks() { }", "private Util() { }", "private JacobUtils() {}", "@Override\n public void setUp() throws Exception {}", "@Override\n\tpublic void test() {\n\t\t\n\t}", "private ReportGenerationUtil() {\n\t\t\n\t}", "@Before\n\tpublic void setUp() {\n\t}", "public static void dummyTest(){}", "public static void dummyTest(){}", "protected TestBench() {}", "@Override\n public void setUp() {\n }", "@Test\n public void testGetProductInfo() throws Exception {\n }", "@Override\r\n protected void setUp() {\r\n // nothing yet\r\n }", "@Test\r\n\tpublic void testSanity() {\n\t}", "@Before\n public void setUp () {\n }", "@Override\n public void runTest() {\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\t\n\t}", "@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t}", "@Before\r\n\tpublic void setUp() {\n\t}", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "public final void mo51373a() {\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private DataClayMockObject() {\n\n\t}", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() throws Exception {\n }", "@Before\n public void setUp() throws Exception {\n }", "@Before public void setUp() { }", "public void testGetInsDyn() {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp() throws Exception {\n\n }", "public void testSetBasedata() {\n }", "public void setUp() {\n\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t//This method is unused. \r\n\t}", "@Override\n protected void tearDown() {\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Test\n public void testDAM30203001() {\n testDAM30102001();\n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "private Mth()\n\t{\n\t\tthrow new AssertionError();\n\t}", "@Test\n\tpublic void testEvilPuzzleGeneration() {\n\t}", "@Test\r\n\tpublic void contents() throws Exception {\n\t}", "public void testWriteOrders() throws Exception {\n }", "@Before\n public void setup() {\n }", "@Override\r\n\tpublic void setUp() {\n\r\n\t}", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Before\n public void setUp() throws Exception {\n\n }", "@Override\n protected void setup() {\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "@Before\r\n\tpublic void setup() {\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 }", "@Test\n\tpublic void testDoGeneration() {\n\t}", "private StressTestHelper() {\n // Empty constructor.\n }", "@Test\n public void testAddACopy() {\n }", "private OMUtil() { }", "@Before\n public void setup() {\n }" ]
[ "0.6836261", "0.6834178", "0.65601784", "0.65419614", "0.6471129", "0.62967956", "0.61696255", "0.6149734", "0.6136101", "0.6096188", "0.60900915", "0.6089806", "0.6048072", "0.60188144", "0.6012925", "0.6010661", "0.6010661", "0.60105556", "0.59909004", "0.59810084", "0.5976196", "0.59755063", "0.5958152", "0.5949141", "0.59342057", "0.5919882", "0.59094477", "0.59045", "0.59045", "0.59045", "0.59045", "0.59045", "0.5900417", "0.5899212", "0.5899212", "0.5899212", "0.5899212", "0.58991146", "0.58916503", "0.5889189", "0.5889189", "0.5882776", "0.58817196", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58803666", "0.58665115", "0.58638376", "0.58559066", "0.5853076", "0.5852081", "0.5847466", "0.5847466", "0.5844254", "0.58304715", "0.58304715", "0.58304715", "0.58304715", "0.58300006", "0.58229387", "0.5812875", "0.5812875", "0.58117926", "0.5811015", "0.581019", "0.58079714", "0.5807746", "0.5805934", "0.5801358", "0.5799804", "0.57979774", "0.57960683", "0.5795377", "0.5795377", "0.579096", "0.57878536", "0.57878536", "0.57878536", "0.57878536", "0.57878536", "0.57878536", "0.5786848", "0.5786525", "0.57846814", "0.57831365", "0.57805055" ]
0.0
-1
TODO Autogenerated method stub
@Override JPanel publishPanel() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
METHODES// SETTER & GETTTER///
public int getLargeur() { return largeur; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setdat()\n {\n }", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "public abstract void setMontant(Double unMontant);", "private void setData() {\n\n }", "@Override\r\n\t\tpublic void set(E arg0) {\n\r\n\t\t}", "@Override\n\tpublic void setMontant(double s) {\n\t\t\n\t}", "public abstract void set(M newValue);", "public void set(double d);", "@Override\n\tpublic void set(T e) {\n\t\t\n\t}", "@Override\n\tpublic void set() {\n\t\tSystem.out.println(\"A==========set\");\n\t}", "@Override\n\tpublic void setData() {\n\n\t}", "double sety(double y) {\nreturn this.y;\n }", "public void setX(int x) { this.x=x; }", "public abstract void setNodes();", "public abstract void setDataToElementXY();", "public void set(float signal);", "public void setMontoDescuento(double param){\n \n this.localMontoDescuento=param;\n \n\n }", "public void setMontoEstimado(double param){\n \n this.localMontoEstimado=param;\n \n\n }", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "public void setMontoSolicitado(double param){\n \n this.localMontoSolicitado=param;\n \n\n }", "public String setter() {\n\t\treturn prefix(\"set\");\n\t}", "public abstract double set\r\n ( DataID dID // input\r\n , double value // input\r\n );", "public void dataWasSet();", "public Thermometer(Person person){\r\n super(person);\r\n temperature = new MeasureUnit(\"Celsius\",\"º C\", 1);\r\n }", "@Override\n public void setX(int x) {\n this.x=x;\n }", "public void setData(E d)\n {\n data = d;\n }", "public abstract void set(DataType x, DataType y, DataType z);", "public void setMontoFacturadoSinDescuento(double param){\n \n this.localMontoFacturadoSinDescuento=param;\n \n\n }", "protected abstract Set method_1559();", "public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }", "public void setMethode(int m) {\r\n\t\tthis.methode = m;\r\n\t}", "public abstract void set( int i, int j, double value ) throws JWaveException;", "public void mutate() {\n \t//POEY comment: for initialise() -> jasmine.gp.nodes.ercs\n //such as CustomRangeIntegerERC.java, PercentageERC.java, BoolERC.java \n \tsetValue(initialise());\n }", "public void setValue(E value)\n {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public void set(double val);", "void setX(double x){\r\n\t\tthis.x=x;\r\n\t}", "public void setNewValues(){\n questionT = qMean.getText();\n phoneT = pMean.getText();\n doorT = dMean.getText();\n time = simTime.getText();\n simulation.setTime(time);\n simulation.setD(doorT);\n simulation.setP(phoneT);\n simulation.setQ(questionT);\n }", "@Override\n\tpublic void setDMO(DmcObject dmo) {\n\t\t\n\t}", "public void setPrice(double price){this.price=price;}", "public void setMontoCatalogoEstimado(double param){\n \n this.localMontoCatalogoEstimado=param;\n \n\n }", "public void setMes(int mes);", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "public MbCoordDpto() {\r\n \r\n }", "private void setUserData(){\n }", "public EntityDataParticle() {\n\t\tm_speed=0.5f;\n\t\tm_rotation=0;\n\t\tm_duration=0.5f;\n\t\tm_type=0;\n\t}", "public void setMontoFacturado(double param){\n \n this.localMontoFacturado=param;\n \n\n }", "private void set(){\n resetBuffer();\n }", "public void setMesSeleccionado(Mes mesSeleccionado)\r\n/* 177: */ {\r\n/* 178:221 */ this.mesSeleccionado = mesSeleccionado;\r\n/* 179: */ }", "public void setX(int x);", "public abstract void setPoint(Point p);", "protected abstract void setValue(Entity e,FloatTrait t,float value);", "public void setMontoPedidoRechazado(double param){\n \n this.localMontoPedidoRechazado=param;\n \n\n }", "public void setEjercicio(Ejercicio ejercicio)\r\n/* 150: */ {\r\n/* 151:193 */ this.ejercicio = ejercicio;\r\n/* 152: */ }", "void setParameters() {\n\t\t\n\t}", "public void setWalkSpeed(int n)\n{\n walkSpeed = n;\n}", "public void setEmpresa(Empresa empresa)\r\n/* 89: */ {\r\n/* 90:141 */ this.empresa = empresa;\r\n/* 91: */ }", "public void setData(E data)\n {\n this.data = data;\n }", "public void setValue(T value) {\n/* 134 */ this.value = value;\n/* */ }", "public void setMoTa(String moTa);", "public void setTime(){\r\n \r\n }", "public Var_Act_Data(Action_Type type, Variable v1, Variable v2, int set_value) {\r\n super(type);\r\n var1 = v1;\r\n var2 = v2;\r\n set_val = set_value;\r\n }", "public void setElement(E e){\r\n\t\trotulo = e;\r\n\t}", "public void setNumero(int numero)\r\n/* 195: */ {\r\n/* 196:206 */ this.numero = numero;\r\n/* 197: */ }", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public float obtenMotor(){\r\n return this.motor;\r\n }", "public void setValorCalculo(ValoresCalculo valorCalculo)\r\n/* 93: */ {\r\n/* 94:111 */ this.valorCalculo = valorCalculo;\r\n/* 95: */ }", "String setValue();", "protected void\nsetTranspTypeElt( int type) \n\n{\n coinstate.transptype = type;\n}", "public Object setPosition(double aDouble)\r\n/* */ {\r\n\t\t\t \tlogger.info(count++ + \" About to setPosition : \" + \"Agent\");\r\n/* 59 */ \tthis.position = aDouble;\r\n/* 60 */ \treturn this;\r\n/* */ }", "public abstract void setSpeed(int sp);", "public Momentum() {\r\n m1 = m2 = v1 = v2 = p1 = p2 = comx = cv = 0.0;\r\n xp1 = 0.0;\r\n xp2 = 900.0;\r\n m1 = 2.0;\r\n m2 = 1.0;\r\n v1 = 1.0;\r\n v2 = -1.0;\r\n\r\n //m1 = m2 = 1.0;\r\n //v1 = 2.0;\r\n //v2 = -4.0;\r\n d = dc = 8.0;\r\n }", "public void setFlete(double param){\n \n this.localFlete=param;\n \n\n }", "public void setData(E data){\n\t\t\tthis.data = data;\n\t\t}", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "public void setEmpleado(Empleado empleado)\r\n/* 188: */ {\r\n/* 189:347 */ this.empleado = empleado;\r\n/* 190: */ }", "@Override\r\n\tpublic void setData(E data) {\n\t\tthis.data=data;\r\n\t}", "public MetalNode(int date1){\n date = date1;\n }", "public MMTMeasurement(){\n }", "public AbstractEstProxy(Est dto) {\n super(dto);\n\n // Setter arrays\n readObjectSetters = new java.util.concurrent.CopyOnWriteArrayList<com.poesys.db.dto.ISet>();\n }", "@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}", "public void setMyExp(MyExp me);", "public void setEnergy (double energy) {\n\t this.energy = energy;\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void set() {\r\n\t\tage = 19;\r\n\t\tname = \"ΎΛ·»\";\r\n\t\theight = 161;\r\n\t\tsetWeight(50);\r\n\t\tSystem.out.println(getWeight());\r\n\t}", "public void readAndSetData(){\n//\t\tentityMember = entitySelection.getItemAt(entitySelection.getSelectedIndex());\n\t\t\n\t\tzValue = 0.0f;\n\t\t//read in z value\n\t\ttry{\n\t\t\tzValue = Float.valueOf(zPosInput.getText());\n\t\t}catch(Exception e){\n\t\t\tSystem.err.println(\"Could not read z input value - setting to 0!\");\n\t\t\tzValue = 0.0f;\n\t\t}\n\t\t//Z coord, check water, then terrain, if neither then use absolute\n\t\tif(offsetFromWaterMenuItem.isSelected()){\n\t\t\taboveWater = true;\n\t\t\taboveTerrain = false;\n\t\t}else if(offsetFromTerrainMenuItem.isSelected()){\n\t\t\taboveTerrain = true;\n\t\t\taboveWater = false;\n\t\t}else{\n\t\t\taboveWater = false;\n\t\t\taboveTerrain = false;\n\t\t}\n\t\t\n\t\ttry{\n\t\t\trotX = Float.valueOf(rotXField.getText());\n\t\t\trotY = Float.valueOf(rotYField.getText());\n\t\t\trotZ = Float.valueOf(rotZField.getText());\n\t\t\tscale = Float.valueOf(scaleField.getText());\n\t\t}catch(Exception e){\n\t\t\tSystem.err.println(\"Could not read rotations or scale input value - setting values to standard\");\n\t\t\trotX = 0.0f;\n\t\t\trotY = 0.0f;\n\t\t\trotZ = 0.0f;\n\t\t\tscale = 1.0f;\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void setNodeInfo(String path, Object obj) {\n\t\treentrantReadWriteLock.readLock().lock();\n\t\ttry {\n\t\t\tzookeeper.setData(path, SomeUtil.getByte(obj),\n\t\t\t\t\t-1);\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"更新跟节点数据异常!\", e);\n\t\t} finally {\n\t\t\treentrantReadWriteLock.readLock().unlock();\n\t\t}\n\t}", "public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }", "public void setMensaje(String mensaje)\r\n/* 638: */ {\r\n/* 639:714 */ this.mensaje = mensaje;\r\n/* 640: */ }", "@Test\r\n public void testSetMicentro() {\r\n System.out.println(\"setMicentro\");\r\n CentroEcu_Observado micentro = new CentroEcu_Observado();\r\n micentro.setCiudad(\"Loja\");\r\n Servicio_CentroEcu instance = new Servicio_CentroEcu();\r\n instance.setMicentro(micentro);\r\n assertEquals(instance.getMicentro().ciudad, \"Loja\");\r\n }", "void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}", "@Override\n\tprotected void setValue(String name, TipiValue tv) {\n\t}", "@SuppressWarnings(\"unused\")\n CADNemaMotor () {\n // Set typical initial values, which user can edit before saving\n type = \"1\";\n }", "void set(T t);", "public void Metodo1(String valor1){\r\n\r\n }", "public void setEnergy(double energy) { this.energy = energy; }", "public void setMach(float Mach);", "public void get() {\n }", "public MMAge(){\n\t\t\n\t}", "@Override\r\n\tpublic void member() {\n\t\t\r\n\t}", "void setDatty(Datty newDatty);" ]
[ "0.67687386", "0.6191561", "0.6082002", "0.6061932", "0.6048977", "0.59957397", "0.59734356", "0.59321284", "0.58415425", "0.5826945", "0.5739926", "0.57215756", "0.5720708", "0.5719254", "0.57185346", "0.5653009", "0.56504", "0.56495154", "0.56171465", "0.56105083", "0.56022376", "0.55955404", "0.5592559", "0.555108", "0.5545294", "0.5541125", "0.5525858", "0.5518285", "0.5501708", "0.5501032", "0.5496498", "0.5481582", "0.5470391", "0.54698044", "0.54576296", "0.5449884", "0.54393893", "0.54320675", "0.5431809", "0.542641", "0.54258007", "0.54198295", "0.5415752", "0.54081273", "0.54037446", "0.5396449", "0.5386768", "0.5386565", "0.53832227", "0.5378897", "0.53610843", "0.5360899", "0.5359275", "0.5348752", "0.53381985", "0.5336676", "0.5334072", "0.5330725", "0.53283876", "0.5327153", "0.53258944", "0.5318269", "0.53172386", "0.5310896", "0.5309818", "0.53050226", "0.5299712", "0.52894694", "0.5288728", "0.52831244", "0.528226", "0.52787274", "0.5278322", "0.52771753", "0.52768004", "0.5266548", "0.52647656", "0.5260117", "0.5255425", "0.5246074", "0.5245434", "0.524333", "0.5242765", "0.5240309", "0.5237301", "0.5237147", "0.52160925", "0.52143663", "0.52129114", "0.52115095", "0.5210796", "0.5202886", "0.51930666", "0.51930046", "0.5190892", "0.51900774", "0.51890594", "0.51850086", "0.5179611", "0.5178831", "0.51779544" ]
0.0
-1
Methode zum erzeugen eines neuen Objekts des Frames und starte dies im neuen Thread.
public static void spielstart() { Thread thread = new Thread() { @Override public void run() { gameboard = new GameFrame(); } }; thread.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FrameJogo() {\n initComponents();\n createBufferStrategy(2);\n Thread t = new Thread(this);\n t.start();\n }", "@Override\n public void run() {\n Frame parentFrame = getParentFrame(IFrameSource.FULL_CONTEXT);\n if (parentFrame != null) {\n getFrameList().gotoFrame(parentFrame);\n }\n }", "void doFrame() throws PlayerDebugException\n\t{\n\t\tint num = 0; // frame 0 by default \n\t\ttry\n\t\t{\n\t\t\tif (hasMoreTokens())\n\t\t\t\tnum = nextIntToken();\n\n\t\t\tpropertyPut(DISPLAY_FRAME_NUMBER, num);\n\n\t\t\tdumpFrame(num);\n\t\t\tsetListingToFrame(num);\n\t\t}\n\t\tcatch(NumberFormatException nfe)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"token\", m_currentToken); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"notANumber\", args)); //$NON-NLS-1$\n\t\t}\n catch(ArrayIndexOutOfBoundsException aie)\n {\n \tMap<String, Object> args = new HashMap<String, Object>();\n \targs.put(\"frameNumber\", Integer.toString(num)); //$NON-NLS-1$\n err(getLocalizationManager().getLocalizedTextString(\"frameDoesNotExist\", args)); //$NON-NLS-1$\n }\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noActiveSession\")); //$NON-NLS-1$\n\t\t}\n\t}", "@Override\r\n public void run() {\r\n Fecha f = new Fecha();\r\n fecha=f;\r\n Thread ct = Thread.currentThread();\r\n while(ct==h1){\r\n this.JL_Fecha.setText(fecha.getFecha());\r\n this.JL_Hora.setText(fecha.getHora());\r\n\r\n this.JL_Fecha_Admin.setText(fecha.getFecha());\r\n this.JL_Hora_Admin.setText(fecha.getHora());\r\n\r\n this.JL_Fecha_Admin1.setText(fecha.getFecha());\r\n this.JL_Hora_Admin1.setText(fecha.getHora());\r\n }\r\n }", "@Override\n\tpublic void run() {\n\t\tfor(int i = 0 ; i < 5; i++) {\n\t\t\tSystem.out.println(getName());\n\t\t\t//currentThread(); //Thread 객체 참조를 리턴\n\t\t\t\n\t\t}\n\t}", "@Override\r\n\tpublic void run()\r\n\t{\r\n\t\tSystem.out.println(\"Hilos.\"+this.getName()+\": ˇYa he llegado!\");\r\n\t\t\r\n\t\ttry {Thread.sleep(300);\t} \r\n\t\tcatch (InterruptedException e) \r\n\t\t{/* //TODO Auto-generated catch block*/\te.printStackTrace();}\r\n\t\t\t\t/* <----[ ****** ]---->*/\r\n\t\tSystem.out.println(\"MiHilo.\"+Thread.currentThread().getName()+\": ˇYa me voy!\");\r\n\t}", "@Override\n public void threadStarted() {\n }", "private void go() {\n\n new Thread(this).start();\n }", "@Override\n public void run(){\n System.out.println(\"we are in thread : \" + this.getName());\n }", "@Override\n public void run() {\n try {\n while (true) {\n frame.updateState();\n Thread.sleep(1000);\n }\n } catch (Exception e) {\n // e.printStackTrace();\n }\n }", "public Frame1() {\n initComponents();\n setBounds(300,250,450,350);\n p1.setBackground(new Color(100,100,240));\n setResizable(false);\n Thread t=new Thread(this);\nt.start();\n }", "@Override\n public void run (){\n System.out.println(\"soy \" +Thread.currentThread().getName());\n Recurso.uso();\n try {\n Thread.sleep( 2000 );\n } catch (InterruptedException e) {\n };\n }", "@Override\n\tpublic void run() {\n\t\tSystem.out.println(\"Thread 클래스를 상속\");\n\t}", "public static void changeFrame() {\r\n\t\t\r\n\t}", "public JanelaThread() {\n initComponents();\n }", "@Override\n\tpublic void onMessageBackgroundThread(Object arg0) {\n\t\t\n\t}", "void start() {\n\tsleepThread = new Thread(this);\n\tsleepThread.start();\n }", "public MainFrame5(){\r\n inint();\r\n }", "public final void run() {\n AppMethodBeat.i(10961);\n synchronized (e.class) {\n try {\n if (e.hoH != null) {\n }\n } finally {\n while (true) {\n }\n AppMethodBeat.o(10961);\n }\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"ok, here is \" + Thread.currentThread().getName() + \" \" + \"thread, i'll do something here..\");\n\t\t\t}", "@WorkerThread\n public abstract void zzaso();", "public void start(){\n hiloAux = new Thread(this);\n hiloAux.start();\n }", "public void thread() {\n\t\tnew Thread(first).start();\n\t\trest.thread();\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tisAlive = false;\r\n\t\t\t}", "Frame getFrame();", "private void frameProcessed(){\n if(DEBUG) Log.d(TAG, \"Frame Processed\");\n synchronized (mWaitFrame) {\n mWaitFrame.notifyAll();\n }\n }", "TumbleweedThread(JumpCanvas canvas) throws Exception {\n myTumbleweeds = canvas.getTumbleweeds();\n }", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "public void doWork() {\n Thread thread = new Thread( hva != null ? hva : this);\n thread.start();\n }", "public void run()\r\n\t{\r\n\t\tthis.mainFrame.setVisible(true);\r\n\t}", "@Override\n public void ejecutarFrame() {\n //INICIAMOS EL HILO\n try{\n Thread.sleep(250);\n }\n catch (InterruptedException ie){\n ie.printStackTrace();\n }\n\n //VAMOS CAMBIANDO EL COLOR DE LAS LETRAS DE LA PANTALLA DE INICIO\n colorLetra = colorLetra == Color.WHITE ? Color.LIGHT_GRAY : Color.WHITE;\n }", "public void ativaThread() {\n\t\t\n\t\tmDialog = ProgressDialog.show(this, \"Buslocation\",\n\t\t\t\t\"Buscando coordenadas...\", false, false);\n\t\tmHandler = new Handler();\n\t\tmThread = new MinhaThread(1);\n\t\tmThread.start();\n\t}", "public final void mo9498b() {\n if (this.f1954f != null) {\n mo9499c();\n }\n this.f1955g = true;\n this.f1954f = new Thread(this);\n this.f1954f.start();\n }", "@Override\r\n public void run() {\n try {\r\n if (eventDispatcherThread != null) {\r\n final Class<?> edtClass = Class.forName(\"java.awt.EventDispatchThread\");\r\n final Method method = edtClass.getDeclaredMethod(\"stopDispatching\");\r\n method.setAccessible(true);\r\n method.invoke(eventDispatcherThread);\r\n }\r\n }\r\n catch (final Exception e) {\r\n throw new RuntimeException(e);\r\n }\r\n }", "private Frame getCurrentFrame() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\tfor (int i=1; i<0;i++) {\r\n\t\t\ttry {\r\n\t\t\t\tcurrentThread();\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tSystem.out.println(currentThread());\r\n\t\t\t}catch(Exception e) {}\r\n\t\t}\r\n\t}", "@Override\n public void run(){\n\n Thread.currentThread().interrupt();\n }", "public frame() {\r\n\t\tframeOwner = 0;\r\n\t\tassignedProcess = 0;\r\n\t\tpageNumber = 0;\r\n\t}", "public void run() {\n // System.out.println(\"bsid\\tiid\\tid\\tmethod name\");\n\n while (true) {\n // get interaction\n Hashtable<Integer, ArrayList<Request>> interaction = father\n .getInteraction();\n\n if (interaction == null) {\n break;\n }\n\n // execute interaction\n executeInteraction(interaction);\n if (reqIndex >= maxNoOfRequests)\n break;\n }\n\n // System.out.println(\"Thread \" + threadId + \" is ending\");\n father.replayFinished();\n }", "public void run() {\n try {\n Thread.sleep(10000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n mainThread.interrupt();\n }", "public void go() { // Thread stuff.\n current = 0;\n// final SwingWorker worker = new SwingWorker() {\n// public Object construct() {\n Render render = null;\n// try {\n render = new Render();\n /*} catch (Exception e) {\n System.out.println(\"Thread Error!\");\n e.printStackTrace();\n }\n if (render == null) {\n return null;\n } else {\n return render;\n }\n }\n };\n worker.start();*/\n }", "@Override\n public void co() {\n Object object;\n int n;\n object = this.mw;\n // MONITORENTER : object\n this.tV = gi.submit(this.tU);\n // MONITOREXIT : object\n try {\n object = this.tV.get(60000, TimeUnit.MILLISECONDS);\n n = -2;\n }\n catch (TimeoutException var2_2) {\n gs.W(\"Timed out waiting for native ad.\");\n n = 2;\n object = null;\n }\n catch (ExecutionException var2_3) {\n n = 0;\n object = null;\n }\n catch (InterruptedException var2_4) {\n object = null;\n n = -1;\n }\n catch (CancellationException var2_5) {\n object = null;\n n = -1;\n }\n if (object == null) {\n object = this.r(n);\n }\n gr.wC.post(new Runnable((fz)object){\n final /* synthetic */ fz ts;\n\n @Override\n public void run() {\n fn.this.tm.a(this.ts);\n }\n });\n }", "public void work() throws InterruptedException {\r\n LOGGER.info(\"Putting planes into the sky.\");\r\n for (planesCame = 1; planesCame <= planesToCome; planesCame++) {\r\n new Thread(new Plane(planesCame, this)).start();\r\n Thread.sleep(500);\r\n } \r\n }", "private void esperarPorFatherThread() {\n\t\ttry {\n\t\t\tThread.sleep(50000);\n\t\t} catch (InterruptedException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "public void setThread(Thread t);", "private void startThread()\n {\n if (workerThread == null || !workerThread.isLooping())\n {\n workerThread = new LiveViewThread(this);\n workerThread.start();\n }\n }", "public void run()\r\n\t{\r\n\t\t\r\n\t}", "public void restartThreads()\n\t{\n\t\tdisplayRefresher = new Thread(gamePanel);\n\t\tmotionThread = new Thread(ship);\n\t\tlabelRefresher = new Thread(buttonPanel);\n\t\ttimer = new Timer();\n\t\ttimerThread = new Thread(timer);\n\n\t\tdisplayRefresher.start();\n\t\tmotionThread.start();\n\t\ttimerThread.start();\n\t\tlabelRefresher.start();\n\t}", "public void start() {\n\t\tcurrentFrameIndex = 0;\n\t}", "public void ThreadStart()\r\n\t{\r\n\t\tthread_running=true;\r\n\t\tNewBallTheard.start();\r\n\t}", "public void onFrameRefresh(ym iba) {}", "@Override\n\tpublic void run() {\n\t\tSystem.err.println(\"Test:\"+Thread.currentThread());\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "void startThread();", "public void run() {\r\n\t\t// overwrite in a subclass.\r\n\t}", "@Override\r\n public void run() {\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 }", "public static void main(String args[])\n {\n try {\n StartingFrame.iter();\n }\n catch (Exception e)\n {\n\n }\n Main object=new Main();\n\n }", "public void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void run() {\n Thread ct = Thread.currentThread();\n while (ct == h1) {\n calcula();\n lblHora.setText(hora + \":\" + minutos + \":\" + segundos + \":\" + ampm);\n try {\n Thread.sleep(1000);\n } catch (Exception e) {\n System.out.println(e);\n }\n }\n }", "@Override\n public void run() {\n System.out.println(ANSI_BLUE + \"Hello from \" + currentThread().getName());\n\n // Put this thread to sleep for 3 seconds to allow other threads to be run.\n try {\n // Thread.sleep(5000);\n Thread.sleep(5000);\n }\n\n // This exception will be thrown if another thread woke us up.\n // A thread can be interrupted hence the reason why we have this block of code.\n // For example, an INTERRUPT COULD END THE EXECUTION OF THIS THREAD.\n // There are 2 ways for a thread to know it is being interrupted:\n // 1. Catch the interrupted exception\n // 2. It should call the interrupted method priodically to check whether it is being interruoted.\n catch (InterruptedException e){\n System.out.println(ANSI_BLUE + \"Another thread woke me up\");\n\n // The AnotherThread instance will be terminated as soon as it is interrupted (thanks to the 'return' statement).\n return;\n }\n\n // This will tell us when 3 seconds has elapsed.\n System.out.println(ANSI_BLUE + \"Three seconds has passed and now I'm awake\");\n }", "public void run()\r\n\t{\r\n\ttry\r\n\t{\r\n\r\n\t\tfor(int i=1;i<=5;i++)\r\n\t\t{\r\n\t\tThread t=Thread.currentThread();\r\n\t\tString s=t.getName();\r\n\t\tSystem.out.println(s+\" \"+i);\r\n\t\tThread.sleep(1000); //throw InterruptedException(); \r\n\t\t}\r\n\t}\r\n\r\n\t\t\r\n\t\tcatch(InterruptedException ie)\r\n\t\t{ie.printStackTrace();}\r\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "public void run()\n\t\t\t\t{\n\t\t\t\t\tNotHelloWorldFrame frame = new NotHelloWorldFrame();\n\t\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\t\tframe.setVisible(true);\n\t\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "public void run() {\n\t\t\t\ttry {\r\n\t\t\t\t\tWindo frame = new Windo();\r\n\t\t\t\t\tframe.setVisible(true);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "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 }", "@SuppressWarnings(\"unchecked\")\n public void run(){\n Thread ct = Thread.currentThread();\n while(ct == h1) { \n calcula();\n horaMenu = hora + \":\" + minutos + \":\" + segundos + \" \"+ampm;\n jLabel23.setText(hora + \":\" + minutos + \":\" + segundos + \" \"+ampm);\n try {\n Thread.sleep(1000);\n }catch(InterruptedException e) {}\n }\n}", "public void run(){\n\t}", "protected void run() {\r\n\t\t//\r\n\t}", "public void run() {\n\t\t\r\n\t}", "public void run() {\n\t\t\r\n\t}", "public Thread getThread();", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tnew Thread(new Runnable() {\r\n\t\t @Override\r\n\t\t\tpublic void run() {\r\n\t\t \tEmdeonBotFrame frame = new EmdeonBotFrame();\r\n\t\t }\r\n\t\t}).start();\r\n\t}", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "public void run(){\n System.out.println(\"Thread class extends \" + getName());\n }", "@Override\n public void run() {\n threadLocalTest.setName(Thread.currentThread().getName());\n System.out.println(Thread.currentThread().getName() + \":\" + threadLocalTest.getName());\n }", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "public static void run(){\n EventQueue.invokeLater(new Runnable() {\n public void run() {\n try {\n PlanHomeCoach frame = new PlanHomeCoach();\n frame.init();\n Dimension screenSize =Toolkit.getDefaultToolkit().getScreenSize();\n frame.setLocation(screenSize.width/2-400/2,screenSize.height/2-700/2);\n frame.setResizable(false);\n frame.setVisible(true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }", "public Frame getFrame()\n {\n return this;\n }", "public FrameResponsableMachine()\n {\n initComponents();\n }", "static final int countStackFrames(Thread thread)\n {\n VMThread vt = thread.vmThread;\n if (vt == null)\n throw new IllegalThreadStateException();\n return vt.countStackFrames();\n }", "protected HFrame(){\n\t\tinit();\n\t}", "public static void main(String[] args) {\n\t\n System.out.println(ANSI_Black+\"Hello from Main thread\");\n\tThread extendThread = new ThreadExtendsExample();\n\textendThread.setName(\"ThreadByExtends1~\");\n\textendThread.start();\n\t\n\t//java.lang.IllegalThreadStateException, same thread cannot be started again\n\t//extendThread.start();\n\tThread extendThread2 = new ThreadExtendsExample();\n\textendThread2.setName(\"ThreadByExtends2~\");\n\textendThread2.start();\n\t\n\t\n\t\n\tThreadImplExample implThread = new ThreadImplExample();\n\timplThread.run();\n\t\n\t\n\tThread runnableThread = new Thread(new ThreadImplExample());\n\trunnableThread.start();\n\t\n\t\n\t\n\tSystem.out.println(ANSI_Black+\"Hello Again from Main thread\");\n\t\n}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"Thread working\");\n\t\t\t}", "public void start ()\n {\n Thread th = new Thread (this);\n // start this thread\n th.start ();\n\n }", "public void run() {\n\t\t\t\t\t\t}", "@Override\n public void actionPerformed(final ActionEvent e)\n {\n new Thread(new Runnable()\n {\n @Override\n public void run()\n {\n\n SwingUtilities.invokeLater(new Runnable()\n {\n @Override\n public void run()\n {\n frame.blockGUI();\n navigate(e);\n frame.releaseGUI();\n }\n });\n }\n }).start();\n }", "@Override\n public void run()\n {\n super.run();\n }" ]
[ "0.6577779", "0.6456857", "0.5861818", "0.58551204", "0.5841084", "0.5834168", "0.5824392", "0.5814905", "0.5799407", "0.57708883", "0.5760001", "0.57368153", "0.57197666", "0.57020384", "0.5688069", "0.5687711", "0.567924", "0.567244", "0.5672429", "0.56598556", "0.56390566", "0.5614175", "0.55775887", "0.5568561", "0.5567488", "0.55582315", "0.55574805", "0.5550857", "0.5548681", "0.55385435", "0.5508851", "0.5502526", "0.54928285", "0.5488442", "0.5487021", "0.5482092", "0.5480598", "0.54789793", "0.5474767", "0.5473", "0.54660594", "0.5464846", "0.54595417", "0.5453488", "0.54533887", "0.54455435", "0.54438895", "0.5442826", "0.5433741", "0.54321396", "0.54275817", "0.54216725", "0.5421148", "0.542023", "0.54175425", "0.5415625", "0.5414548", "0.54138094", "0.54086375", "0.54061395", "0.540508", "0.540508", "0.5402647", "0.53855026", "0.53855026", "0.53841096", "0.53661233", "0.5365854", "0.5351611", "0.5349475", "0.53479797", "0.5347913", "0.5347913", "0.5347161", "0.5344994", "0.5344693", "0.5344693", "0.5344693", "0.5344691", "0.5344407", "0.53406477", "0.53406477", "0.53406477", "0.53406477", "0.53406477", "0.53406477", "0.53406477", "0.53406477", "0.53406477", "0.5339934", "0.5339137", "0.5333231", "0.53328496", "0.5332782", "0.53321004", "0.5327474", "0.53265893", "0.53196573", "0.5317965", "0.53128946" ]
0.59957224
2
/ renamed from: a
void m70531a(Throwable th) { try { this.f61096d.call(th); } catch (Throwable th2) { this.f61095c.unsubscribe(); } this.f61095c.unsubscribe(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.6249595", "0.6242955", "0.61393225", "0.6117684", "0.61140615", "0.60893875", "0.6046927", "0.60248226", "0.60201806", "0.59753186", "0.5947817", "0.5912414", "0.5883872", "0.5878469", "0.587005", "0.58678955", "0.58651674", "0.5857262", "0.58311176", "0.58279663", "0.58274275", "0.5794977", "0.57889086", "0.57837564", "0.5775938", "0.57696944", "0.57688814", "0.5752557", "0.5690739", "0.5678386", "0.567034", "0.56661606", "0.56595623", "0.56588095", "0.56576085", "0.5654566", "0.56445956", "0.56401736", "0.5638699", "0.56305", "0.56179273", "0.56157446", "0.5607045", "0.5605239", "0.5600648", "0.5595156", "0.55912733", "0.5590759", "0.5573802", "0.5556659", "0.55545336", "0.5550466", "0.5549409", "0.5544484", "0.55377364", "0.55291194", "0.55285007", "0.55267704", "0.5525843", "0.5522067", "0.5520236", "0.55098593", "0.5507351", "0.5488173", "0.54860324", "0.54823226", "0.5481975", "0.5481588", "0.5480086", "0.5478032", "0.54676044", "0.5463578", "0.54506475", "0.54438734", "0.5440832", "0.5440053", "0.5432095", "0.5422814", "0.5421934", "0.54180306", "0.5403851", "0.5400144", "0.5400042", "0.5394655", "0.53891194", "0.5388751", "0.53749055", "0.53691155", "0.53590924", "0.5356525", "0.5355397", "0.535498", "0.5354871", "0.535003", "0.5341249", "0.5326222", "0.53232485", "0.53197914", "0.5316941", "0.5311645", "0.5298656" ]
0.0
-1
Returns the data as an observable list of movies
public ObservableList<Movie> getFilmData() { return ser.movieData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Movie> getMovies();", "public List<Movie> getMovies() {\n return movies;\n }", "public static ArrayList<Movie> getMoviesList(){\n\t\treturn movieInfo;\n\t}", "public List<Movie> getMovieData() {\n return movieData;\n }", "public ArrayList<Movie> getMovies() {\n return movies;\n }", "public Observable<UsMovieBean> getMovieData() {\n return this.movieModel.getMovieData()\n .filter(usMovieBean -> usMovieBean != null)\n .compose(RxUtil.applyIOToMainThreadSchedulers());\n }", "public List<Movie> getMovies(){\r\n if(person == null){\r\n return new ArrayList();\r\n }\r\n \r\n return new ArrayList(person.getMovies().values());\r\n }", "@Override\n\tpublic List<MovieBean> listOfMovies() {\n\n\t\treturn dao.listOfMovies();\n\t}", "public ArrayList<String> getMovies(){\n\t\tArrayList<String> movies = new ArrayList<String>();\n\t\tString sql = \"SELECT * FROM movies\";\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tps = conn.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tmovies.add(rs.getString(\"name\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tps.close();\n\t\t\t} catch (SQLException 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\treturn movies;\t\n\t}", "private static void listMovies(){\n\n\t\ttry{\n\t\t\tURL url = new URL(\"http://localhost:8080/listMovies\");\n\t\t\tString rawJSONList = getHTTPResponse(url);\n\t\t\tJSONArray JSONList = new JSONArray(rawJSONList);\n\t\t\tStringBuilder list = new StringBuilder();\n\t\t\t\n\t\t\tfor (int i=0 ; i<JSONList.length() ; i++){\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tJSONObject temp = JSONList.getJSONObject(i);\n\t\t\t\tsb.append(temp.getInt(\"id\"));\n\t\t\t\tsb.append(\". \");\n\t\t\t\tsb.append(temp.getString(\"name\"));\n\t\t\t\tsb.append(\"\\n\");\n\t\t\t\t\n\t\t\t\tlist.append(sb.toString());\n\t\t\t}\n\t\t\tSystem.out.println(list.toString());\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t\t\n\t}", "@Override\n public MovieListing getMovies() {\n // inventory.whatsAvailable()\n // inventory.whatIsUnavailable();\n return movieRepo.getMovies();\n }", "public List<Movie> getAllMovies() {\n SQLiteDatabase database = this.getWritableDatabase();\n List<Movie> movieList = new ArrayList<>();\n String selectQuery = \" SELECT * FROM \" + MoviesEntry.TABLE_NAME;\n Cursor cursor = database.rawQuery(selectQuery, null);\n\n if (cursor.moveToFirst()) {\n do {\n Movie movie = getMovieFromCursor(cursor);\n movieList.add(movie);\n } while (cursor.moveToNext());\n }\n database.close();\n\n return movieList;\n }", "public static ArrayList<MovieInfoObject> getMoviesToDisplay() {\n return mMovies;\n }", "public ArrayList<String> getMovies() {\n ArrayList<String> movies = new ArrayList<String>();\n\n try {\n // Prepare a new SQL Query & Set a timeout\n Statement statement = connection.createStatement();\n statement.setQueryTimeout(30);\n\n // The Query\n String query = \"SELECT *\" + \"\\n\" +\n \"FROM member\";\n\n // Get Result\n ResultSet results = statement.executeQuery(query);\n\n // Process all of the results\n // The \"results\" variable is similar to an array\n // We can iterate through all of the database query results\n while (results.next()) {\n // We can lookup a column of the a single record in the\n // result using the column name\n // BUT, we must be careful of the column type!\n // int id = results.getInt(\"mvnumb\");\n String movieName = results.getString(\"email\");\n // int year = results.getInt(\"yrmde\");\n // String type = results.getString(\"mvtype\");\n\n // For now we will just store the movieName and ignore the id\n movies.add(movieName);\n // members.add();\n }\n\n // Close the statement because we are done with it\n statement.close();\n } catch (SQLException e) {\n // If there is an error, lets just print the error\n System.err.println(e.getMessage());\n }\n\n // Finally we return all of the movies\n return movies;\n }", "public static ArrayList<Movie> getMovieList() {\n\t\treturn movieList;\n\t}", "public LiveData<List<Movie>> fetchMovies(String option) {\n return Api.fetchMovies(option);\n }", "private List<MovieDetails> movieList() {\n List<MovieDetails> movieDetailsList = new ArrayList<>();\n movieDetailsList.add(new MovieDetails(1, \"Movie One\", \"Movie One Description\"));\n movieDetailsList.add(new MovieDetails(2, \"Movie Two\", \"Movie Two Description\"));\n movieDetailsList.add(new MovieDetails(2, \"Movie Two - 1 \", \"Movie Two Description - 1 \"));\n\n return movieDetailsList;\n }", "@Override\n\tpublic List<Movie> getAllMovies() {\n\t\treturn movieRepository.getAllMovies();\n\t}", "Collection<MoviesTitles> getMoviesTitles();", "public ArrayList<Movie> getMovieList() {\n\t\treturn movieList;\n\t}", "@Override\n public void getMovieContentData() {\n Cursor movieCursor = queryMovieData();\n\n ArrayList<MovieData> movieData = new ArrayList<>();\n\n if(movieCursor != null) {\n //do stuff\n while(movieCursor.moveToNext()) {\n MovieData movie = new MovieData();\n movie.setName(movieCursor.getString(movieCursor.getColumnIndex(MovieUriContract.MovieEntry.COLUMN_NAME)));\n movie.setDate(movieCursor.getString(movieCursor.getColumnIndex(MovieUriContract.MovieEntry.COLUMN_RELEASE_DATE)));\n movie.setGenreId(movieCursor.getInt(movieCursor.getColumnIndex(MovieUriContract.MovieEntry.COLUMN_GENRE)));\n }\n movieCursor.close();\n }\n\n //query genre data next, using the GenreId in Movie Data\n for (MovieData movie : movieData) {\n Cursor genreCursor = queryGenreData(movie.getGenreId());\n\n if(genreCursor != null) {\n //do stuff\n if (genreCursor.moveToFirst()) {\n movie.setGenre(movieCursor.getString(movieCursor.getColumnIndex(MovieUriContract.GenreEntry.COLUMN_NAME)));\n }\n genreCursor.close();\n }\n }\n\n view.updateMovieDataView(movieData);\n }", "@Override\n\tpublic List<Movie> findAllMovie() {\n\t\treturn repository.findAllMovie();\n\t}", "private void getMovies(String category) {\n if (category == NetworkUtils.FAVORITES) {\n setupViewModel();\n return;\n }\n subscription = MovieClient.getInstance()\n .getMovies(category)\n // scheduler where the Observable will do the work\n .subscribeOn(Schedulers.io())\n // scheduler which a subscriber will observe this Observable\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Observer<Movie.MovieResult>() {\n @Override\n public void onCompleted() {\n Log.d(TAG, \"In Completed\");\n }\n\n @Override\n public void onError(Throwable e) {\n e.printStackTrace();\n // cast to retrofit2.HttpException to get the response code\n if (e instanceof HttpException) {\n int code = ((retrofit2.HttpException)e).code();\n }\n Log.d(TAG, \"In Error\");\n }\n\n @Override\n public void onNext(Movie.MovieResult movieResults) {\n Log.d(TAG, \"OnNext\");\n Log.d(TAG, \"movie results are: \" + movieResults);\n mMovieAdapter.setMovieData(movieResults.getResults());\n if (scrollState != null) {\n mMoviesRecyclerView.getLayoutManager().onRestoreInstanceState(scrollState);\n }\n }\n });\n }", "List<Movie> getMovie(String movieId);", "public static ArrayList<String> getOpeningMovies() throws IOException {\n\t\tString sURL = \"http://api.rottentomatoes.com/api/public/v1.0/lists/movies/opening.json?apikey=\" + API_KEY; //just a string\n\n\t\t// Connect to the URL using java's native library\n\t\tURL url = new URL(sURL);\n\t\tHttpURLConnection request = (HttpURLConnection) url.openConnection();\n\t\trequest.connect();\n\n\t\t// Convert to a JSON object to print data\n\t\tJsonParser jp = new JsonParser(); //from gson\n\t\tJsonElement root = jp.parse(new InputStreamReader((InputStream) request.getContent())); //Convert the input stream to a json element\n\t\tJsonObject rootobj = root.getAsJsonObject(); //May be an array, may be an object. \n\t\tJsonArray arr = rootobj.get(\"movies\").getAsJsonArray();\n\t\tArrayList<String> moviesList = new ArrayList<String>();\n\t\tfor (JsonElement movie : arr) {\n\t\t\tString id = movie.getAsJsonObject().get(\"id\").getAsString();\n\t\t\tString title = movie.getAsJsonObject().get(\"title\").getAsString();\n\t\t\tmoviesList.add(id);\n\t\t\tmovieMap.put(id, title);\n\t\t}\n\n\t\treturn moviesList;\n\t}", "public ResponseEntity<List<Movie>> getAllMovies() {\n List<Movie> movies = movieRepository.findAll();\n return new ResponseEntity<>(movies, HttpStatus.OK);\n }", "@GetMapping(\"/movies\")\n public List<Movie> getAllMovies() {\n movies = new ArrayList<Movie>();\n movies.add(new Movie(1,\"The Godfather\",\"Crime/Thriller\"));\n movies.add(new Movie(2,\"Star Wars\",\"Sci-Fi\"));\n movies.add(new Movie(3,\"The Mask\",\"Comedy\"));\n movies.add(new Movie(4,\"Die Hard\",\"Action\"));\n movies.add(new Movie(5,\"The Exorcist\",\"Horror\"));\n movies.add(new Movie(6,\"The Silence of the Lambs\",\"Drama\"));\n\n return movies;\n }", "public List<Movie> theaters() {\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/lists/movies/in_theaters.json?\"\n + \"apikey=yedukp76ffytfuy24zsqk7f5\";\n apicall(url);\n\n Gson gson = new Gson();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n System.out.println(url);\n return movieData;\n }", "private void loadMoviesData()\n {\n showMoviesDataView();\n new FetchMovieData(this, new FetchMovieDataCompleteListener()).execute(MOVIE_DB_URL_POPULAR+API_Key);\n\n }", "public interface MoviesListingInteractor {\n Observable<List<Movie>> fetchMovies();\n}", "private void getAllFavorite(){\n\n\n MainViewModel viewModel = ViewModelProviders.of(this).get(MainViewModel.class);\n viewModel.getFavorite().observe(this, new Observer<List<FavoriteEntry>>() {\n @Override\n public void onChanged(@Nullable List<FavoriteEntry> imageEntries) {\n List<Movie> movies = new ArrayList<>();\n for (FavoriteEntry entry : imageEntries){\n Movie movie = new Movie();\n movie.setId(entry.getMovieid());\n movie.setOverview(entry.getOverview());\n movie.setOriginalTitle(entry.getTitle());\n movie.setPosterPath(entry.getPosterpath());\n movie.setVoteAverage(entry.getUserrating());\n movie.setReleaseDate(entry.getReleasedate());\n movies.add(movie);\n }\n\n adapter.setMovies(movies);\n }\n });\n }", "public List<Movie> dVD() {\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/lists/dvds/new_releases.json?\"\n + \"apikey=yedukp76ffytfuy24zsqk7f5\";\n apicall(url);\n Gson gson = new Gson();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n System.out.println(url);\n return movieData;\n }", "@GetMapping(\"/\")\n\tpublic List<Movie> getListMovie(){\n\t\tList<Movie> list = repo.findAll();\n\t\t\n\t\treturn list;\n\t}", "@GetMapping\n\tpublic ResponseEntity<List<Movie>> fetchAllMovies(){\n\t\treturn new ResponseEntity<List<Movie>>(movieService.listAllMovies(), HttpStatus.OK);\n\t}", "@Override\n public List<Movie> getAllMovie() {\n return movieRepository.findAll();}", "@Override\r\n\tpublic ArrayList<String> allMovies()\r\n\t{\r\n\t\tArrayList<String> sortedMovieTitles = new ArrayList<String>();\r\n\t\t\r\n\t\tsortedMovieTitles = movieTitles;\r\n\t\t\r\n\t\tCollections.sort(movieTitles);\r\n\t\t\r\n\t\treturn sortedMovieTitles;\r\n\t}", "public List<String> getMovieList(){\n Set<String> movieList= new HashSet<String>();\n List<MovieListing> showtimes= ListingManager.getShowtimes();\n for(int i=0;i<history.size();i++){\n CustomerTransaction curr= history.get(i);\n for(int j=0;j<showtimes.size(); j++){\n MovieListing show = showtimes.get(j);\n if (show.sameListing(curr.getListingID())){\n movieList.add(show.getTitle());\n\n }\n }\n }\n return new ArrayList<>(movieList);\n }", "@Override\n public Array<Movie> toArray() {return (Array<Movie>)this.movies;}", "@Nullable\n MoviePage getMovies();", "public interface ListInteractor {\n\n Observable<List<Movie>> getListOfMostPopularMovies();\n\n Observable<List<Movie>> getListOfHighestRatedMovies();\n\n Observable<List<Movie>> getListOfUpcomingMovies();\n\n Observable<List<Movie>> getListOfSearchedMovies(String searchQuery);\n\n Observable<List<Genre>> getListOfAllMovieGenres();\n\n\n Observable<List<TvShow>> getListOfMostPopularTvShows();\n\n Observable<List<TvShow>> getListOfHighestRatedTvShows();\n\n Observable<List<TvShow>> getListOfSearchedTvShows(String searchQuery);\n\n Observable<List<Genre>> getListOfAllTvGenres();\n}", "public List<String> getMovies(String n)\n\t{\n\t\tList<String> movies_of_the_actor = new ArrayList<String>();\n\t\t//look through the movie list and check if actor n is present\n\t\tIterator<Movie> itr = list_of_movies.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tMovie temp_movie = itr.next();\n\t\t\tif(temp_movie.getCast().contains(n))\n\t\t\t//if yes add the movie title to the list\n\t\t\t{\n\t\t\t\tmovies_of_the_actor.add(temp_movie.getTitle());\n\t\t\t}\t\t\n\t\t}\t\t\n\t\t//return the list\n\t\treturn movies_of_the_actor;\n\t}", "List<Movie> getAllMovies(String name, String director, String movieId);", "public List<Movie> getMovie(String name){\n return _movieRepo.getMovie(name);\n }", "private ArrayList<MovieItem> getFavoriteMovies(){\n //get list of favorite movies from buffer\n ArrayList<MovieItem> movies = mMovieStaff.getMovies(PosterHelper.NAME_ID_FAVORITE);\n\n //check if favorite movie list has changed\n if(mFavoriteChanged){\n //list has changed, show new movie list\n showMovieList(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n\n //return movie list\n return movies;\n }", "public Cursor getAllMovies() {\n //Seleccionamos todas las filas de la tabla Movie\n return database.rawQuery(\n \"select * from \" + MOVIE_TABLE_NAME, null);\n }", "void receivedDataSuccess(List<Data.Movie> data) ;", "private void getMovies() {\n\n database = FirebaseDatabase.getInstance();\n reference = database.getReference().child(userId).child(\"movies\");\n reference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n movieList.clear();\n baseMovieList.clear();\n i = (int) dataSnapshot.getChildrenCount();\n for (final DataSnapshot child : dataSnapshot.getChildren())\n {\n String id = child.getKey();\n Client Client = new Client();\n Service apiService =\n Client.getClient().create(Service.class);\n Call<Movie> call;\n call = apiService.getDetails(id, BuildConfig.THE_MOVIE_DB_API_TOKEN);\n\n call.enqueue(new Callback<Movie>() {\n @Override\n public void onResponse(Call<Movie> call, Response<Movie> response) {\n Movie info;\n info = response.body();\n if(child.child(\"watched\").getValue().equals(\"true\"))\n info.setWatched(true);\n\n baseMovieList.add(info);\n\n i = i -1;\n if(i <= 0) {\n pd.dismiss();\n progressBar();\n sort();\n }\n }\n\n @Override\n public void onFailure(Call<Movie> call, Throwable t) {\n Toast.makeText(MyWatchlist.this, \"Error Fetching Data!\", Toast.LENGTH_SHORT).show();\n }\n } );\n\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }", "private Movie getMovie() {\n Gson gson = new Gson();\n return gson.fromJson(result, Movie.class);\n }", "public static List<Movie> extractMoviesData(String stringUrl) {\n String jsonResponse = fetchResponse(stringUrl);\n if (jsonResponse == null) {\n return null;\n }\n List<Movie> movies = new ArrayList<>();\n try {\n JSONObject baseJsonResponse = new JSONObject(jsonResponse);\n JSONArray resultsJSONArray = baseJsonResponse.getJSONArray(RESULTS_KEY);\n for (int i = 0; i < resultsJSONArray.length(); i++) {\n JSONObject currentMovie = resultsJSONArray.getJSONObject(i);\n String originalTitle = currentMovie.optString(ORIGINAL_TITLE_KEY);\n String posterPath = currentMovie.optString(POSTER_PATH_KEY);\n String overview = currentMovie.optString(OVERVIEW_KEY);\n double userRating = currentMovie.getDouble(VOTE_AVERAGE_KEY);\n String releaseDate = currentMovie.optString(RELEASE_DATE_KEY);\n int movieId = currentMovie.optInt(MOVIE_ID_KEY);\n Movie movie = new Movie(originalTitle, posterPath, overview, userRating, releaseDate, movieId);\n movies.add(movie);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return movies;\n }", "private void ObserveAnyChange(){\n movieListViewModel.getMovies().observe(getViewLifecycleOwner(), new Observer<List<MovieModel>>() {\n @Override\n public void onChanged(List<MovieModel> movieModels) {\n\n if (movieModels != null){\n for (MovieModel movieModel: movieModels){\n // get data in Log\n Log.v(TAG, \" onChanged: \"+ movieModel.getTitle());\n movieRecyclerAdapter.setmMovieModels(movieModels);\n }\n }\n\n }\n });\n }", "private void loadMovies() {\n try {\n SharedPreferences prefs = getActivity().getSharedPreferences(\n PREFS_NAME, 0);\n if (prefs.contains(SP_FEED)) {\n\n JSONObject jsonObject = new JSONObject(prefs.getString(SP_FEED,\n \"\"));\n\n JSONArray jsonMovieArray;\n jsonMovieArray = (JSONArray) ((JSONObject) jsonObject\n .get(\"feed\")).get(\"entry\");\n\n if (jsonMovieArray != null) {\n int len = jsonMovieArray.length();\n for (int i = 0; i < len; i++) {\n JSONObject jsonMovie = (JSONObject) jsonMovieArray\n .get(i);\n mList.add(new Movie(jsonMovie));\n }\n }\n }\n\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n // Update adapter\n mArrayAdapter.notifyDataSetChanged();\n }", "public List<Movie> search() {\n keyword = URLEncoder.encode(keyword);\n String url = \"http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=yedukp76ffytfuy24zsqk7f5&q=\"\n + keyword + \"&page_limit=20\";\n apicall(url);\n System.out.println(url);\n System.out.println(data);\n GsonBuilder builder = new GsonBuilder();\n Gson gson = builder.create();\n MovieResponse response = gson.fromJson(data, MovieResponse.class);\n List<Movie> movies = response.getMovies();\n movieData = movies;\n return movieData;\n }", "Collection<MovieEarned> moviesEarned();", "private List<String> getMovieNames() {\n List<String> movieNames = new ArrayList<>();\n for (Movie movie: this.movies) {\n movieNames.add(movie.getName());\n }\n return movieNames;\n }", "public void onMoviesReceive(ObservableList<Movie> movieList) {\n\n // Set table's data source\n movieTable.setItems(movieList);\n\n // Initialize columns\n titleColumn.setCellValueFactory(new PropertyValueFactory<>(\"movieTitle\"));\n yearColumn.setCellValueFactory(new PropertyValueFactory<>(\"releaseDate\"));\n\n // Hide progress indicator\n resultsProgressIndicator.setVisible(false);\n\n Platform.runLater(() -> {\n\n setLblStatus(\"Search results fetched successfully.\");\n });\n }", "@NonNull\n private static MoviesViewModel obtainViewModelMovies(AppCompatActivity activity) {\n ViewModelFactory factory = ViewModelFactory.getInstance(activity.getApplication());\n\n return ViewModelProviders.of(activity, factory).get(MoviesViewModel.class);\n }", "private static ArrayList<String> getMovies(String filename) throws IOException {\n\t\tBufferedReader filereader = new BufferedReader(new FileReader(filename));\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tString line;\n\t\twhile ((line = filereader.readLine()) != null) {\n\t\t\tlines.add(line);\n\t\t}\n\t\t\n\t\tfilereader.close();\n\t\treturn lines;\n\t}", "public void setMovies(List<Movies> mvoies)\n {\n for ( Movies movie: mvoies)\n {\n if (!mMovies.contains(movie))\n {\n mMovies.add(movie);\n moviesRViewAdapter.notifyItemInserted(mMovies.indexOf(movie));\n }\n }\n }", "private static void showMovies(ArrayList<String> movies) {\n\t\tfor (String movie : movies) {\n\t\t\tSystem.out.println(movie);\n\t\t}\t\t\n\t}", "public Observable<CnMovieBean> getMovieData(String type, int start) {\n return this.movieModel.getMovieData(type, start)\n .filter(cnMovieBean -> cnMovieBean != null)\n .compose(RxUtil.applyIOToMainThreadSchedulers());\n }", "public List<MovieDetails> getAllFavoriteMovies() {\n SQLiteDatabase database = this.getWritableDatabase();\n List<MovieDetails> movieDetailses = new ArrayList<>();\n List<Integer> favoritesMovieId = new ArrayList<>();\n String selectQuery = \"SELECT * FROM \" + FavoriteMoviesEntry.TABLE_NAME;\n Cursor cursor = database.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()) {\n do {\n int id = getIdFromCursor(cursor);\n String selectFavoriteMovieQuery = \"SELECT * FROM \" + MoviesDetailsEntry.TABLE_NAME + \"WHERE \" + MoviesDetailsEntry._ID + \"= \" + id;\n Cursor movieCursor = database.rawQuery(selectFavoriteMovieQuery, null);\n if (movieCursor.moveToFirst()) {\n do {\n MovieDetails movieDetails = getMovieDetailsFromCursor(movieCursor);\n movieDetailses.add(movieDetails);\n } while (movieCursor.moveToNext());\n }\n } while (cursor.moveToNext());\n }\n database.close();\n\n return movieDetailses;\n }", "public Movies getMovie () {\r\n\t\treturn movie;\r\n\t}", "public void showMovies() {\n System.out.println(\"Mina filmer:\");\n for (int i = 0; i < myMovies.size(); i++) {\n System.out.println(\"\\n\" + (i + 1) + \". \" + myMovies.get(i).getTitle() +\n \"\\nRegissör: \" + myMovies.get(i).getDirector() + \" | \" +\n \"Genre: \" + myMovies.get(i).getGenre() + \" | \" +\n \"År: \" + myMovies.get(i).getYear() + \" | \" +\n \"Längd: \" + myMovies.get(i).getDuration() + \" min | \" +\n \"Betyg: \" + myMovies.get(i).getRating());\n }\n }", "@Override\n\tpublic List<Object> getMovie(JSONObject param) {\n\t\tString type = StringUtil.ToString(param.getString(\"type\"));\n\t\tString tip = StringUtil.ToString(param.getString(\"tip\"));\n\t\tint number = Integer.parseInt(param.getString(\"number\"));\n\t\t\n\t\tMap<String, Object> message = new HashMap<String, Object>();\n\t\tList<Object> result = new ArrayList<Object>();\n\t\t\n\t\tmessage.put(\"recommand\", type);\n\t\tmessage.put(\"number\", number);\n\t\tif(!tip.equals(\"\")){\n\t\t System.out.println(tip);\n\t\t\tmessage.put(\"tip\", tip);\n\t\t}\n\t\t\n\t\tList<Object> movie = (List<Object>) this.queryForList(\"Movie.selectByCondition\",message);\n\t\t\n\t\treturn movie;\n\t}", "public static ArrayList<Movie> getMoviesFromJson(String filename){\n ArrayList<Movie> movies = getJsonArray(filename);\n if (movies == null){\n return new ArrayList<>();\n }\n return movies;\n\n }", "public List<Object[]> getMovieByTheaterId(long ID){\n\t\treturn theMoviewRepository.getMovieByTheateID(ID);\n\t}", "@Override\n\tpublic List<MovieModel> getTimeMovieData() {\n\t\treturn sqlSessionTemplate.selectList(\"reserve.timeMovieData\");\n\t}", "@GetMapping(\"/movies\")\n @Timed\n public List<Movie> getAllMovies() {\n log.debug(\"REST request to get all Movies\");\n List<Movie> movies = movieRepository.findAll();\n return movies;\n }", "private String getStoredMovieCollectionList(ArrayList<Movie> movies)\n {\n StringBuilder linesOfMovieDetails = new StringBuilder();\n \n for (int line = 0; line < (movies.size() - 1); line++)\n {\n linesOfMovieDetails.append(movies.get(line).getTitle() + \",\" + movies.get(line).getDirector() + \",\" + movies.get(line).getActor1() + \",\" \n + movies.get(line).getActor2() + \",\" + movies.get(line).getActor3() + \",\" + movies.get(line).getRating() + \";\");\n }\n \n return linesOfMovieDetails.toString();\n }", "@Override\n public List<Movie> loadInBackground() {\n MovieDataExtractor movieDataExtractor = new MovieDataExtractor(getContext());\n List<Movie> movies = movieDataExtractor.extractFeatureFromJson();\n moviesList = movies;\n return moviesList;\n }", "public static JSONArray getJSONArray(List<Movie> movies) {\n JSONArray result = new JSONArray();\n try {\n for (Movie movie : movies) {\n result.put(movie.toJSONObject());\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }", "@GET\r\n\t@Produces(MediaType.TEXT_HTML)\r\n\tpublic String getMoviesHTML() {\r\n\t\tListMovies movies = new ListMovies();\r\n\t\tmovies.addAll(TodoDao.instance.getMovies().values());\r\n\t\treturn \"\" + movies;\r\n\t}", "@Override\n public void onResponse(JSONArray response) {\n List<Movie> tmp = new ArrayList<>();\n for (int i = 0; i < response.length(); i++) {\n try {\n JSONObject mov = response.getJSONObject(i);\n// Toast.makeText(MainActivity.this, mov.toString(), Toast.LENGTH_LONG).show();\n tmp.add(new Movie(mov.getString(\"title\"), \"15_12_2018\", mov.getString(\"Image\")));\n Toast.makeText(MainActivity.this, \"added!\", Toast.LENGTH_SHORT).show();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n// tmp.add(new MovieInfo(\"Harry Potter and test\", \"15_12_2018\", Arrays.asList(\"13:00\",\"16:00\",\"18:00\",\"21:00\",\"22:00\",\"23:00\")));\n populateMovieList(tmp, \"15_12_2018\"); //TODO: REMOVE\n }", "private void marshallMovies() throws MovieDAOException {\n List<DVD> dvds = service.getMovieList();\n\n // marshall list of movies\n service.marshallMovies(dvds);\n }", "private List<Observable<Word>> createObservables(){\n\t\tList<Observable<Word>> observables = new ArrayList<>();\n\t\tobservables.add(wordService.getSubject());\n\t\tobservables.add(wordService.getVerb());\n\t\tobservables.add(wordService.getArticle());\n\t\tobservables.add(wordService.getAdjective());\n\t\tobservables.add(wordService.getNoun());\n\t\treturn observables;\n\t}", "@Override\n\tpublic List<MovieNews> getMovieNews() {\n\t\treturn this.moviesNews;\n\t}", "@Override\n public int getItemCount() {\n return movies.size();\n }", "@Override\n public int getItemCount() {\n return movies.size();\n }", "@Override\n public int getItemCount() {\n return movies.size();\n }", "@Override\n public int getItemCount() {\n return movies.size();\n }", "@Override\n\tpublic int getCount() {\n\t\treturn movies.size();\n\t}", "@Override\n\tpublic List<ShowTime> getShowTimes() {\n\t\treturn moviesListed;\n\t}", "public Movie getMovie() {\n return movie;\n }", "public ArrayList<Film> getFilms(){\r\n\t\treturn (ArrayList<Film>)this.cinema_film_list.clone();\r\n\t}", "public Movie getMovie() { return movie; }", "public static ArrayList<Movie> getArrayListFromJSON(JSONArray lstMovies){\n ArrayList<Movie> lista = null;\n try {\n if(lstMovies!=null && lstMovies.length() > 0 ){\n lista = new ArrayList<Movie>();\n }\n for (int i = 0; i < lstMovies.length(); i++) {\n JSONObject json_data = lstMovies.getJSONObject(i);\n Movie movie = new Movie();\n\n movie.setId(json_data.getInt(ID));\n movie.setTitulo(json_data.getString(TITLE));\n movie.setSinopsis(json_data.getString(OVERVIEW));\n movie.setImage(json_data.getString(POSTER_PATH));\n\n lista.add(movie);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return lista;\n }", "private void fetchMovieDetails() {\n Stream.of(movieListings).forEach(movieListing -> {\n Picasso.with(MoviesApplication.getApp()).load(movieListing.getPosterUrl()).fetch();\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieDetails(movieListing.getId()).enqueue(movieDetailCallback);\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieVideos(movieListing.getId()).enqueue(movieVideoCallback);\n MoviesApplication.getApp().getApiManager().getEndpoints().getMovieReviews(movieListing.getId()).enqueue(movieReviewCallback);\n });\n }", "public Movie getMovie() {\n return mv;\n }", "public Movie getMovie() {\n return this.movie;\n }", "public ArrayList<Movie> getMoviesByDirector(String director){\n String query = \"SELECT id, title, year, rtAudienceScore, rtPictureURL, \"\n + \"imdbPictureURL FROM movies, movie_directors \"\n + \"WHERE id=movieID AND directorName LIKE '%\" + director + \"%' \"\n + \"GROUP BY title \"\n + \"ORDER BY year, title\";\n ResultSet rs = null;\n ArrayList<Movie> movieList = new ArrayList<Movie>();\n try{\n con = ConnectionFactory.getConnection();\n stmt = con.createStatement();\n rs = stmt.executeQuery(query);\n while(rs.next()){\n int id = rs.getInt(\"id\");\n String movie_title = rs.getString(\"title\").trim();\n int year = rs.getInt(\"year\");\n int rtAudienceScore = rs.getInt(\"rtAudienceScore\");\n String rtPictureURL = rs.getString(\"rtPictureURL\").trim();\n String imdbPictureURL = rs.getString(\"imdbPictureURL\").trim();\n movieList.add(new Movie(id, movie_title,year,imdbPictureURL,\n rtPictureURL,rtAudienceScore));\n }\n con.close();\n stmt.close();\n rs.close();\n }\n catch(SQLException e){\n e.printStackTrace();\n }\n return movieList;\n }", "@Test\n\tpublic void getAllMovies() throws Exception {\n\t\tfinal ImmutableList<Movie> movies = ImmutableList.of(this.movie);\n\t\twhen(DAO.findAll()).thenReturn(movies);\n\n\t\tfinal Map<String, Object> paramMap = new HashMap<String, Object>();\n\t\tfinal RPCMessage req = new RPCMessage(MovieRPCServer.GET_ACTION, paramMap, null);\n\n\t\tfinal String response = this.RESOURCE.getValue(req.toString());\n\n\t\tfinal RPCMessage responseObj = RPCMessage.fromString(response);\n\t\tassertThat(responseObj).isNotNull();\n\t\tassertThat(responseObj.getObj()).isEqualTo(MovieBusterUtils.serializeMovieList(movies));\n\n\t\tverify(DAO).findAll();\n\t\tassertThat(MovieBusterUtils.movieFromStringArray(responseObj.getObj())).containsAll(movies);\n\t}", "@Override\n public void onResponse(Call<List<Movie>> call, Response<List<Movie>> response) {\n List<Movie> gotFromRetrofit = response.body();\n if(gotFromRetrofit!=null){\n for(Movie movie : gotFromRetrofit) {\n movies.add(movie);\n }\n }\n recyclerViewAdapter.notifyDataSetChanged();\n }", "public ObservableList<String> getAllGenres(){\n return allGenres;\n }", "private void showCachedMovieList() {\n String cacheData = AppPrefs.getInstance(this).getCacheData();\n showMovieList(new Gson().fromJson(cacheData, MovieResponse.class));\n }", "public MutableLiveData<Movie> getMovieDetails(Movie movie) {\n final MutableLiveData<Movie> movieDetails = new MutableLiveData<>();\n Api.ApiInterface api = Api.getApi();\n String movieId = String.valueOf(movie.getId());\n String apiKey = Api.getApiKey();\n\n sAppExecutors.networkIO().execute(() -> {\n try {\n movie.setReviews(api.fetchReviews(movieId, apiKey).execute().body().getReviews());\n movie.setVideos(api.fetchVideos(movieId, apiKey).execute().body().getVideos());\n movieDetails.postValue(movie);\n } catch (IOException e) {\n movieDetails.postValue(null);\n e.printStackTrace();\n }\n });\n return movieDetails;\n }", "public ArrayList<Movie> getSorted(){\n\t\tTreeSet<Movie> treeSet = new TreeSet<Movie>(this);\n\t\tArrayList<Movie> movies = new ArrayList<Movie>(treeSet);\n\t\treturn movies;\n\t\t\n\t}", "public ArrayList<MovieDescription> getMovieDescriptions()\r\n/* 157: */ {\r\n/* 158:155 */ return this.movieDescriptions;\r\n/* 159: */ }", "public void fetchFavoritedMovies() {\n favoritesSelected = true;\n Cursor cursor =\n getActivity().getContentResolver().query(MovieContract.FavoriteMovieEntry.CONTENT_URI,\n null,\n null,\n null,\n null);\n ArrayList<MovieModel> movieModels = new ArrayList<>();\n if (cursor != null) {\n while (cursor.moveToNext()) {\n MovieModel movieModel = new MovieModel(getActivity(), cursor);\n // Get the trailers and reviews\n String movieId = cursor.getString(cursor.getColumnIndex(MovieContract.FavoriteMovieEntry._ID));\n Cursor trailerCursor =\n getActivity().getContentResolver().query(MovieContract.TrailerEntry.CONTENT_URI,\n null,\n MovieContract.TrailerEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n Cursor reviewCursor =\n getActivity().getContentResolver().query(MovieContract.ReviewEntry.CONTENT_URI,\n null,\n MovieContract.ReviewEntry.COLUMN_MOVIE_KEY + \" = ?\",\n new String[]{movieId},\n null);\n ArrayList<MovieTrailerModel> movieTrailerModels = new ArrayList<>();\n ArrayList<MovieReviewModel> movieReviewModels = new ArrayList<>();\n if (trailerCursor != null) {\n while (trailerCursor.moveToNext()) {\n movieTrailerModels.add(new MovieTrailerModel(getActivity(), trailerCursor));\n }\n trailerCursor.close();\n }\n if (reviewCursor != null) {\n while (reviewCursor.moveToNext()) {\n movieReviewModels.add(new MovieReviewModel(getActivity(), reviewCursor));\n }\n reviewCursor.close();\n }\n movieModel.setReviews(movieReviewModels);\n movieModel.setTrailers(movieTrailerModels);\n movieModels.add(movieModel);\n }\n cursor.close();\n }\n movieGridAdapter.setMovieModels(movieModels);\n }", "public void updateData(List<Movie> movies) {\n mMovies = movies;\n notifyDataSetChanged();\n }", "public MediaList getMediaList() {\n \n MediaList mediaList = mediaPlayerFactory.newMediaList();\n for (int i = 0; i < this.moviesByGenre.size(); i++) {\n mediaList.addMedia(this.moviesByGenre.get(i).path, \n formatRtspStream(this.genre),\n \":no-sout-rtp-sap\",\n \":no-sout-standard-sap\",\n \":sout-all\",\n \":sout-keep\",\n \":ttl=128\");\n }\n\n return mediaList;\n }" ]
[ "0.7461437", "0.7381245", "0.7362752", "0.73375475", "0.7301253", "0.7218934", "0.70596504", "0.6974775", "0.6962309", "0.6937565", "0.69099337", "0.6904208", "0.6851721", "0.67976797", "0.6774226", "0.67608184", "0.67209345", "0.66802377", "0.663426", "0.65864354", "0.65563357", "0.6545119", "0.65194523", "0.64817953", "0.647844", "0.647221", "0.6460898", "0.64506155", "0.64254606", "0.64128804", "0.64119035", "0.6411544", "0.64081556", "0.6405395", "0.63996243", "0.6397438", "0.63925254", "0.63886744", "0.632021", "0.631749", "0.6299003", "0.6290155", "0.6280392", "0.6266598", "0.62615865", "0.6246035", "0.6242236", "0.6239706", "0.6197283", "0.61825633", "0.61754465", "0.61395526", "0.613334", "0.60943234", "0.6086394", "0.6066379", "0.60517937", "0.60273236", "0.5994076", "0.5988803", "0.59747314", "0.5974721", "0.59629613", "0.59455675", "0.5938511", "0.5937711", "0.5924405", "0.59206617", "0.5920439", "0.59161675", "0.58958465", "0.5894004", "0.58939224", "0.5892371", "0.5887107", "0.5870575", "0.58681566", "0.58681566", "0.58681566", "0.58681566", "0.584925", "0.58264726", "0.5825733", "0.5823465", "0.5823254", "0.5790544", "0.5780157", "0.5778269", "0.57767844", "0.5768601", "0.5757362", "0.573931", "0.5733217", "0.5719962", "0.5714138", "0.5706478", "0.5700707", "0.56942564", "0.56905013", "0.56852454" ]
0.7772544
0
Initializes the root layout.
public void initRootLayout() { try { // Load root layout from fxml file. FXMLLoader loader = new FXMLLoader(); loader.setLocation(FilmApp.class.getResource("view/RootLayout.fxml")); rootLayout = (BorderPane) loader.load(); // Show the scene containing the root layout. Scene scene = new Scene(rootLayout); primaryStage.setScene(scene); primaryStage.show(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initRootLayout() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_MAIN));\r\n\r\n try {\r\n rootLayout = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_MAIN, ex);\r\n\r\n return;\r\n }\r\n\r\n Scene scene = new Scene(rootLayout);\r\n scene.getStylesheets().add(STYLESHEET_DEFAULT);\r\n\r\n mainStage.setScene(scene);\r\n mainStage.setTitle(\"Business eValuator\");\r\n mainStage.setResizable(true);\r\n mainStage.centerOnScreen();\r\n mainStage.setHeight(900);\r\n mainStage.show();\r\n }", "public void initRootLayout() {\r\n try {\r\n // Load root layout from fxml file.\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"/view/rootlayout.fxml\"));\r\n rootLayout = (BorderPane) loader.load();\r\n \r\n // Show the scene containing the root layout.\r\n scene = new Scene(rootLayout);\r\n primaryStage.setScene(scene);\r\n primaryStage.show();\r\n \r\n controller = loader.getController();\r\n controller.setMainApp(this);\r\n \r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApp.class.getResource(\"RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load();\n\n // Show the scene containing the root layout.\n Scene scene = new Scene(rootLayout);\n primaryStage.setScene(scene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n URL url = TwitterFX.class.getClassLoader().getResource(\"twitterfx.fxml\");\n loader.setLocation(url);\n rootLayout = (AnchorPane) loader.load();\n buildLayout();\n // Show the scene containing the root layout.\n Scene scene = new Scene(rootLayout, 600,400);\n primaryStage.setScene(scene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void initRootLayout() {\n try {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApplication.class.getResource(\"view/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load();\n Scene scene = new Scene(rootLayout);\n primaryStage.setScene(scene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n \t}\n }", "public void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Pepoview.class.getResource(\"MainWindow.fxml\"));\n rootLayout = (SplitPane) loader.load(); \n \n // Show the scene containing the root layout.\n Scene scene = new Scene(rootLayout);\n primaryStage.setScene(scene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void initRoot() {\n root = new VBox(10);\n root.setAlignment(Pos.CENTER);\n root.setPadding(new Insets(10));\n root.setPrefWidth(300);\n root.setPrefHeight(150);\n }", "public void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApp.class.getResource(\"view/RootLayout.fxml\"));\n rootLayout = loader.load();\n\n // Show the scene containing the root layout.\n Scene scene = new Scene(rootLayout);\n primaryStage.setScene(scene);\n\n // Give the controller access to the main app.\n RootLayoutController controller = loader.getController();\n controller.setMainApp(this);\n\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Try to load last opened job file.\n File file = getJobFilePath();\n if (file != null) {\n loadJobDataFromFile(file);\n }\n }", "public void initMainLayout() {\n\t\ttry {\n\t\t\t// Load root layout from fxml file.\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApp.class.getResource(\"view/MainLayout.fxml\"));\n\t\t\trootLayout = (BorderPane) loader.load();\n\n\t\t\t// Show the scene containing the root layout.\n\t\t\tScene scene = new Scene(rootLayout);\n\t\t\tprimaryStage.setScene(scene);\n\t\t\tprimaryStage.show();\n\n\t\t\tMainLayoutController mainLayoutController = loader.getController();\n\t\t\tmainLayoutController.setMainApp(this);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t\n\t\t}\n\t}", "private void init() {\n if (root == null) {\n root = buildRoot();\n }\n }", "public RootLayoutController(){}", "public RootLayoutController() {\n }", "public void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n //loader.setLocation(RestApplication.class.getResource(\"views/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load(getClass().getResourceAsStream(\"/views/RootLayout.fxml\"));\n Scene scene = new Scene(rootLayout);\n Image img = new Image(\"file:resources/img/logo.png\");\n Stage mainStage = new Stage();\n this.stage = mainStage;\n mainStage.setScene(scene);\n mainStage.initStyle(StageStyle.DECORATED); \n mainStage.setTitle(\"..: tallyMED :: Home :..\");\n mainStage.getIcons().add(img);\n mainStage.setMaximized(true);\n loginStage.close();\n mainStage.setOnHidden(event -> Platform.exit());\n mainStage.show();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void initRootLayout(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load();\n\n Scene scene = new Scene(rootLayout);\n \n primaryStage.setScene(scene);\n \n RootLayoutController controller = loader.getController();\n controller.setGame(this);\n \n primaryStage.show(); \n showCreateNewPlayer();\n }catch(IOException e){\n }\n }", "private void initialize() {\n\t\troot = new Group();\n\t\tgetProperties();\n\t\tsetScene();\n\t\tsetStage();\n\t\tsetGUIComponents();\n\t}", "public void init() {\n setLayout(new BorderLayout());\n }", "private void initializeLayout(Stage primaryStage) throws IOException {\r\n baseLayout = FXMLLoader.load(getClass().getResource(\"/presentation/view/RootLayout.fxml\"));\r\n Scene scene = new Scene(baseLayout);\r\n primaryStage.setScene(scene);\r\n primaryStage.setResizable(true);\r\n primaryStage.show();\r\n }", "public MainView() {\r\n\t\tinitialize();\r\n\t}", "private void initialize() {\n\t\tthis.setBounds(100, 100, 950, 740);\n\t\tthis.setLayout(null);\n\n\t\n\t}", "private void initBaseLayout()\n {\n add(viewPaneWrapper, BorderLayout.CENTER);\n \n currentLayoutView = VIEW_PANE;\n currentSearchView = SEARCH_PANE_VIEW;\n showMainView(VIEW_PANE);\n showSearchView(currentSearchView);\n }", "public void mostrarRootLayout() {\n try {\n // Load root layout from fxml file.\n // Carrega o layout raíz do arquivo FXML \"RootLayout\"\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(LivrariaPrincipal.class.getResource(\"view/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load();\n\n // Show the scene containing the root layout.\n // Mostra a cena que contém o layour raíz\n Scene scene = new Scene(rootLayout);\n primaryStage.setScene(scene);\n\n // Dá acesso do controlador para o aplicativo principal\n RootLayoutController controller = loader.getController();\n controller.setMainApp(this);\n\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void initialize() {\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\tthis.setBounds(new Rectangle(0, 0, 393, 177));\r\n\t\tthis.add(getBasePanel(), BorderLayout.CENTER);\r\n\r\n\t}", "public void initRootLayout(Stage primaryStage) {\n this.primaryStage = primaryStage;\n setAuthorisationScene();\n }", "private void initialize() {\r\n\t\t// this.setSize(271, 295);\r\n\t\tthis.setSize(495, 392);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(ResourceBundle.getBundle(\"Etiquetas\").getString(\"MainTitle\"));\r\n\t}", "private void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApp.class.getResource(VIEW_ROOT_LAYOUT_FXML));\n rootLayout = loader.load();\n\n mApplicationCompositionRoot = new ApplicationCompositionRoot(this, rootLayout);\n\n //grab your root here\n rootLayout.setOnMousePressed(event -> {\n xOffset = event.getSceneX();\n yOffset = event.getSceneY();\n });\n\n //move around here\n rootLayout.setOnMouseDragged(event -> {\n mPrimaryStage.setX(event.getScreenX() - xOffset);\n mPrimaryStage.setY(event.getScreenY() - yOffset);\n });\n\n // Show the scene containing the root layout.\n Scene scene = new Scene(rootLayout);\n mPrimaryStage.setScene(scene);\n mPrimaryStage.show();\n\n //Give the controller access to the main app.\n RootLayout controller = loader.getController();\n controller.setMainApp(this);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}", "private void initialize() {\r\n\t\tthis.setSize(392, 496);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"Informações\");\r\n\t}", "protected void initView(View rootView) {\n\n }", "private void init() {\n setLayout(new BorderLayout());\n setBackground(ProgramPresets.COLOR_BACKGROUND);\n add(getTitlePanel(), BorderLayout.NORTH);\n add(getTextPanel(), BorderLayout.CENTER);\n add(getLinkPanel(), BorderLayout.SOUTH);\n }", "public testLayout() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public Layout() {\n super(\"Chitrashala\");\n initComponents();\n }", "private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}", "public mainLayoutController() {\n\t }", "private void initialize() {\n\t\tthis.setSize(500, 400);\n\t\tthis.setContentPane(getJContentPane());\n\t\t\n\t\tthis.setTitle(\"Login\");\n\t}", "public Layout() {\n }", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "private void initialize() {\n\t\tthis.setSize(211, 449);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setTitle(\"JFrame\");\n\t}", "public void init()\n {\n buildUI(getContentPane());\n }", "private void initialize() {\n layout = new HorizontalLayout();\n\n workspaceTabs = new TabSheet();\n\n WorkspacePanel panel = new WorkspacePanel(\"Workspace 1\");\n workspaceTabs.addTab(panel).setCaption(\"Workspace 1\");\n DropHandler dropHandler = searchMenu.createDropHandler(panel.getBaseLayout());\n panel.setDropHandler(dropHandler);\n\n layout.addComponent(workspaceTabs);\n\n setContent(layout);\n }", "private void initializeLayout(){\n String title = mStrInfo;\n String subtitle = mClientItem.clientName;\n mHomeToolbar.setGymRatToolbarTitle(title, subtitle);\n\n //initialize maids\n initializeMaid();\n\n //initialize bottom navigation\n initializeBottomNavigation();\n }", "private void init() {\n setBackground(LIGHT_GRAY);\n Box layout = new Box(BoxLayout.Y_AXIS);\n\n jump = createButton(\"Jump\", null);\n exit = createButton(\"Exit!\", null);\n fly = createButton(\"Fly\", null);\n Jfloat = createButton(\"Float\", null);\n layout.add(Box.createRigidArea(new Dimension(0, 150)));\n layout.add(jump);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(Jfloat);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(fly);\n layout.add(Box.createRigidArea(new Dimension(0, 25)));\n layout.add(exit);\n add(layout);\n }", "private void initialize() {\n this.setSize(300, 200);\n this.setContentPane(getJContentPane());\n this.pack();\n }", "public MainView() {\n initComponents();\n \n }", "private void initialize() {\r\n\t\tthis.setSize(530, 329);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t}", "public void init() {\n\t\tsetSize(500,300);\n\t}", "private void initialize() {\r\n this.setSize(new Dimension(666, 723));\r\n this.setContentPane(getJPanel());\r\n\t\t\t\r\n\t}", "private void init() {\n\t\n\t\tthis.setSize(DEFAULT_W, DEFAULT_H);\n\t\tthis.setLocation(DEFAULT_X, DEFAULT_X);\n\t\tthis.setTitle(DEFAULT_TITLE);\n\n\t}", "private void initialize() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setSize(300, 200);\n\t\tthis.add(getJScrollPane(), java.awt.BorderLayout.CENTER);\n\t}", "private void initialize() {\r\n\t\tthis.setSize(300, 200);\r\n\t\tthis.setTitle(\"Error\");\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public void initialize() {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(548, 372));\n this.add(getTitlePane(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 3, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getXpertIvyPane(), new com.ulcjava.base.application.GridBagConstraints(0, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getLicensePane(), new com.ulcjava.base.application.GridBagConstraints(0, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getDatabasePane(), new com.ulcjava.base.application.GridBagConstraints(0, 3, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n this.add(getJavaPane(), new com.ulcjava.base.application.GridBagConstraints(0, 4, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }", "void initLayout() {\n\t\t/* Randomize the number of rows and columns */\n\t\tNUM = Helper.randomizeNumRowsCols();\n\n\t\t/* Remove all the children of the gridContainer. It will be added again */\n\t\tpiecesGrid.removeAllViews();\n\t\t\n\t\t/* Dynamically calculate the screen positions and sizes of the individual pieces\n\t * Store the starting (x,y) of all the pieces in pieceViewLocations */\n\t\tpieceViewLocations = InitDisplay.initialize(getScreenDimensions(), getRootLayoutPadding());\n\t\t\n\t\t/* Create an array of ImageViews to store the individual piece images */\n\t\tcreatePieceViews();\n\t\t\n\t\t/* Add listeners to the ImageViews that were created above */\n\t\taddImageViewListeners();\n\t}", "private void init() {\r\n\r\n createGUI();\r\n\r\n setSize(new Dimension(600, 600));\r\n setTitle(\"Grid - Regular Grid Renderer\");\r\n }", "private void init() {\n refreshLayout = new TurbolinksSwipeRefreshLayout(getContext(), null);\n addView(refreshLayout, 0);\n }", "private void initialize() {\r\n\r\n\t\tserverNode = new TreeParent(\"Servers\", \"Servers\", \"AA\", this);\r\n\t\tserverNode.setImageKey(\"System.gif\");\r\n\r\n\t\tnewServerNode = new TreeParent(\"NewServerWizard\", \"New Server\", \"AA\", this);\r\n\t\tnewServerNode.setImageKey(\"ApplicationFilter.gif\");\r\n\t\tnewServerNode.setExpandable(false);\r\n\t\tserverNode.addChild(newServerNode);\r\n\t\tnewServerNode.addChild(new TreeObject(\"Dummy\"));\r\n\t\r\n\t\tloadServers(serverNode);\r\n\r\n\t\tpreferenceNode = new TreeParent(\"Systems\", \"Preferences\", \"BB\", this);\r\n\t\tpreferenceNode.setImageKey(\"preference_page.gif\");\r\n\t\tpreferenceNode.addChild(new TreeObject(\"Dummy\"));\r\n\r\n\t\tinvisibleRoot = new TreeParent(\"\", \"InvisibleRoot\", \"AA\", this);\r\n\t\tinvisibleRoot.addChild(serverNode);\r\n\t\tinvisibleRoot.addChild(preferenceNode);\r\n\r\n\t}", "private void initialize() {\n this.setSize(495, 276);\n this.setTitle(\"Translate Frost\");\n this.setContentPane(getJContentPane());\n }", "private void initPane() {\n\t\tContainer localContainer = getContentPane();\n\t\tlocalContainer.setLayout(new BorderLayout());\n\t\t\n\t\tsplitpane_left_top.setBorder(BorderFactory.createTitledBorder(\"Training Data\"));\n\t\tsplitpane_left_bottom.setBorder(BorderFactory.createTitledBorder(\"Tree View\"));\n\t\tsplitpane_left.setDividerLocation(400);\n\t\tsplitpane_left.setLastDividerLocation(0);\n\t\tsplitpane_left.setOneTouchExpandable(true);\n\t\tsplitpane_right.setBorder(BorderFactory.createTitledBorder(\"Classifer Output\"));\n\t\tsplitpane_main.setDividerLocation(500);\n\t\tsplitpane_main.setLastDividerLocation(0);\n\t\tsplitpane_main.setOneTouchExpandable(true);\n\t\tlocalContainer.add(splitpane_main, \"Center\");\n\t\tlocalContainer.add(statusPanel,BorderLayout.SOUTH);\n\t}", "private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }", "private void initialize() {\r\n\t\tthis.setSize(378, 283);\r\n\t\tthis.setJMenuBar(getMenubar());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JAVIER\");\r\n\t}", "private void initialize() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setBounds(new Rectangle(0, 0, 780, 530));\n\t\tthis.add(getJPanel_table(), BorderLayout.CENTER);\n\t\tthis.add(getJPanel_button(), BorderLayout.EAST);\n\t}", "private void initialize() {\r\n\t\tthis.setSize(497, 316);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tthis.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t}", "private void initialize() {\n\t\tthis.setSize(629, 270);\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setPreferredSize(new Dimension(629, 270));\n\t\tthis.setMinimumSize(new Dimension(629, 270));\n\t\tthis.setMaximumSize(new Dimension(629, 270));\n\t\tthis.add(getJSplitPane2(), BorderLayout.CENTER);\n\t}", "private void initialize() {\r\n\t\tthis.setSize(311, 153);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tsetCancelButton( btnCancel );\r\n\t}", "public void InitLayout() {\n SetBackground(R.drawable.can_dfqc_ac_bg);\n this.mTvA = AddText(121, 173, 203, 25);\n this.mTvP = AddText(121, 212, KeyDef.RKEY_RADIO_6S, 25);\n this.mTvMode = AddText(121, Can.CAN_FLAT_RZC, 203, 25);\n this.mTvC = AddText(121, 295, 139, 25);\n this.mTvWind = AddText(121, KeyDef.RKEY_AVIN, 53, 25);\n initValue();\n }", "private void init() {\n initView();\n setListener();\n }", "protected void clearRootLayout() {\n this.rootLayout.setVisible(false);\n this.rootLayout.removeAllComponents();\n removeStyleName(\"done\");\n }", "private void initUI() {\n\t\tthis.horizontalLayout = new XdevHorizontalLayout();\n\t\tthis.gridLayout = new XdevGridLayout();\n\t\tthis.button = new XdevButton();\n\t\tthis.button2 = new XdevButton();\n\t\tthis.label = new XdevLabel();\n\n\t\tthis.button.setCaption(\"go to HashdemoView\");\n\t\tthis.button2.setCaption(\"go to CommonView\");\n\t\tthis.label.setValue(\"Go into code tab to view comments\");\n\n\t\tthis.gridLayout.setColumns(2);\n\t\tthis.gridLayout.setRows(2);\n\t\tthis.button.setWidth(200, Unit.PIXELS);\n\t\tthis.button.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button, 0, 0);\n\t\tthis.button2.setWidth(200, Unit.PIXELS);\n\t\tthis.button2.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.button2, 1, 0);\n\t\tthis.label.setWidth(100, Unit.PERCENTAGE);\n\t\tthis.label.setHeight(-1, Unit.PIXELS);\n\t\tthis.gridLayout.addComponent(this.label, 0, 1, 1, 1);\n\t\tthis.gridLayout.setComponentAlignment(this.label, Alignment.TOP_CENTER);\n\t\tthis.gridLayout.setSizeUndefined();\n\t\tthis.horizontalLayout.addComponent(this.gridLayout);\n\t\tthis.horizontalLayout.setComponentAlignment(this.gridLayout, Alignment.MIDDLE_CENTER);\n\t\tthis.horizontalLayout.setExpandRatio(this.gridLayout, 10.0F);\n\t\tthis.horizontalLayout.setSizeFull();\n\t\tthis.setContent(this.horizontalLayout);\n\t\tthis.setSizeFull();\n\n\t\tthis.button.addClickListener(event -> this.button_buttonClick(event));\n\t\tthis.button2.addClickListener(event -> this.button2_buttonClick(event));\n\t}", "private void setupLayout()\n {\n Container contentPane;\n\n setSize(300, 300); \n\n contentPane = getContentPane();\n\n // Layout this PINPadWindow\n }", "public MainView() {\n initComponents();\n }", "public MainView() {\n initComponents();\n }", "public MainContentPane() {\r\n\t\tsuper();\r\n\r\n\t\t// Add design-time configured components.\r\n\t\tinitComponents();\r\n\t}", "private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(300, 200);\n this.setPreferredSize(new java.awt.Dimension(450, 116));\n this.add(getListPanel(), java.awt.BorderLayout.CENTER);\n this.add(getButtonPanel(), java.awt.BorderLayout.SOUTH);\n }", "private void initLayoutReferences() {\n // Initializing views\n initViews();\n // Initializing mapView element\n initMap();\n }", "@FXML // This method is called by the FXMLLoader when initialization is complete\n\tvoid initialize() {\n\t\tassert btnOK != null : \"fx:id=\\\"btnOK\\\" was not injected: check your FXML file 'Layout1.fxml'.\";\n\t\tassert imgInsper != null : \"fx:id=\\\"imgInsper\\\" was not injected: check your FXML file 'Layout1.fxml'.\";\n\n\t\tfh = new FileHandler();\n\t\ttrigger = new Trigger();\n\t\ttgrHandler = new TriggerHandler();\n\n\t}", "public void setupLayout() {\n // left empty for subclass to override\n }", "private void initializeGrid() {\n // 50 pixel first row for banner\n addPercentRows(root, 5);\n // second row takes up 100% of the remaining space\n addPercentRows(root, 95);\n // One column at 100% width\n addPercentColumns(root, 100);\n\n Label title = new Label(\"Mission Control\");\n title.setFont(new Font(\"Arial\", 22));\n title.setTextFill(Color.WHITE);\n\n GridPane contentGrid = new GridPane();\n // Only need one row as content will fill the entire vertical space\n addPercentRows(contentGrid, 100);\n\n // Need three columns, 1/6 column for nav, 2/3 for main content, 1/6 for warnings\n double sidePanelPercent = (1d / 6d) * 100d;\n double centerPanelPercent = (2d / 3d) * 100d;\n addPercentColumns(contentGrid, sidePanelPercent, centerPanelPercent, sidePanelPercent);\n\n\n addNodeToGrid(title, root, 0, 0, Pos.CENTER, Colours.PRIMARY_COLOUR, Insets.EMPTY);\n // NOTE:: This assumes that it is the only child added to root by this point to set ID.\n // If this is changed DynamicGuiTests will break.\n root.getChildren().get(0).setId(\"pnBanner\");\n\n addNodeToGrid(contentGrid, root, 1, 0);\n\n setupCenterPanel(contentGrid);\n setupRightHandSidePanel(contentGrid);\n setupLeftHandSidePanel(contentGrid);\n\n // Assert they are created - mainly to bypass Spot bugs issues.\n assert this.navigationView != null;\n assert this.graphView != null;\n assert this.informationView != null;\n }", "private void initialize() {\r\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\r\n\t\tgridBagConstraints.anchor = GridBagConstraints.NORTHWEST;\r\n\t\tgridBagConstraints.weightx = 1.0D;\r\n\t\tgridBagConstraints.weighty = 1.0D;\r\n\t\tgridBagConstraints.fill = GridBagConstraints.BOTH;\r\n\t\tthis.setLayout(new GridBagLayout());\r\n\t\tthis.setBorder(BorderFactory.createLineBorder(Color.gray, 1));\r\n\t\tthis.add(getJTree(), gridBagConstraints);\r\n\t}", "private void setUpFrame() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new BorderLayout());\n rootPanel.setBackground(Color.darkGray);\n }", "protected void initialize()\n {\n uiFactory.configureUIComponent(this, UI_PREFIX);\n\n initializeFields();\n initializeLabels();\n initLayout();\n }", "public RootTreePanel() {\n\t\tsuper();\n\t\tTreeNode.setCentered(false);\n\t}", "private void initialiseUI()\n { \n // The actual data go in this component.\n String defaultRootElement = \"icr:regionSetData\";\n JPanel contentPanel = initialiseContentPanel(defaultRootElement);\n pane = new JScrollPane(contentPanel);\n \n panelLayout = new GroupLayout(this);\n\t\tthis.setLayout(panelLayout);\n\t\tthis.setBackground(DAOConstants.BG_COLOUR);\n\n\t\tpanelLayout.setAutoCreateContainerGaps(true);\n\n panelLayout.setHorizontalGroup(\n\t\t\tpanelLayout.createParallelGroup()\n\t\t\t.addComponent(pane, 10, 520, 540)\n );\n\n panelLayout.setVerticalGroup(\n\t\t\tpanelLayout.createSequentialGroup()\n .addComponent(pane, 10, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)\n );\n }", "private void initialize() {\n\t\tthis.setLayout(new BorderLayout());\n\t\tthis.setSize(300,200);\n\t\tthis.add(getJPanel(), java.awt.BorderLayout.CENTER);\n\t\tthis.add(getJPanel1(), java.awt.BorderLayout.SOUTH);\n\t}", "public void initialize() throws IOException {\n\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"RootLayout.fxml\"));\n\t\tmyRoot = (BorderPane) loader.load();\n\t\tMenuBarController myController = loader.<MenuBarController>getController();\n\t\tmyController.setModel(myPlayerModel);\n\t\tmyController.setKeyboard();\n\t\tinitializeGUIComponents();\n\t}", "private void init() {\n\t\tinitDesign();\n\t\tinitHandlers();\n\t}", "private void initialize() {\n\t\tthis.setExtendedState(Frame.MAXIMIZED_BOTH);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setResizable(true);\n\t\tthis.screenDimensions = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tthis.getContentPane().setLayout(new BorderLayout());\n\t\t// Initialize SubComponents and GUI Commands\n\t\tthis.initializeSplitPane();\n\t\tthis.initializeExplorer();\n\t\tthis.initializeConsole();\n\t\tthis.initializeMenuBar();\n\t\tthis.pack();\n\t\tthis.hydraExplorer.refreshExplorer();\n\t}", "private void initialize() {\n this.setSize(253, 175);\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n this.setContentPane(getJContentPane());\n this.setTitle(\"Breuken vereenvoudigen\");\n }", "public void init()\n\t\t{\n\t\t\t//Makes Lists\n\t\t\tmakeLists();\n\n\t\t\t//layout for GUI\n\t\t\tGridLayout layout = new GridLayout(2,4, 5 ,5);\n\t\t\tsetLayout(layout);\n\n\t\t\t//add panels to window\n\t\t\tadd(Panel_1);\n\t\t\tadd(Panel_2);\n\t\t\tadd(Panel_3);\n\t\t\tadd(Panel_4);\n\n\t\t\t//create buttons\n\t\t\tCalculateButton = new JButton(\"Calculate\");\n\t\t ExitButton = new JButton(\"Exit\");\n\n\t\t\t//connect event handlers to buttons\n\t\t CalculateButton.addActionListener(new ButtonListener());\n\t\t ExitButton.addActionListener(new ButtonListener());\n\n\t\t\t//add buttons to window\n\t\t add(CalculateButton);\n\t\t add(ExitButton);\n\n\t\t //make window visible\n\t\t\tsetVisible(true);\n\t\t}", "private void initView() {\n\n LayoutInflater inflater = getLayoutInflater();\n final int screenWidth = MyUtils.getScreenMetrics(this).widthPixels;\n final int screenHeight = MyUtils.getScreenMetrics(this).heightPixels;\n for (int i = 0; i < 3; i++) {\n ViewGroup layout = (ViewGroup) inflater.inflate(\n R.layout.content_layout, myHorizontal, false);\n layout.getLayoutParams().width = screenWidth;\n TextView textView = (TextView) layout.findViewById(R.id.title);\n textView.setText(\"page \" + (i + 1));\n layout.setBackgroundColor(Color.rgb(255 / (i + 1), 255 / (i + 1), 0));\n createList(layout);\n myHorizontal.addView(layout);\n }\n }", "public MenuBarController(RootLayout rootLayout) {\n this.root = rootLayout;\n\n init();\n }", "private void initialize() {\r\n\t\tthis.setSize(733, 427);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"jProxyChecker\");\r\n\t}", "private void initialize() {\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(810, 600);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\t\tthis.setModal(true);\n\t\tthis.setResizable(false);\n\t\tthis.setName(\"FramePrincipalLR\");\n\t\tthis.setTitle(\"CR - Lista de Regalos\");\n\t\tthis.setLocale(new java.util.Locale(\"es\", \"VE\", \"\"));\n\t\tthis.setUndecorated(false);\n\t}", "private void setUpMainContainer() {\n mainDrawerLayout = new DrawerLayout(this);\n mainDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);\n setContentView(mainDrawerLayout);\n }", "private void initComponents() {\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n }", "private void initUI() {\r\n\t\tthis.verticalLayout = new XdevVerticalLayout();\r\n\t\tthis.verticalLayout2 = new XdevVerticalLayout();\r\n\t\r\n\t\tthis.setSpacing(false);\r\n\t\tthis.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout.setSpacing(false);\r\n\t\tthis.verticalLayout.setMargin(new MarginInfo(false));\r\n\t\tthis.verticalLayout2.setMargin(new MarginInfo(false));\r\n\t\r\n\t\tthis.verticalLayout2.setSizeFull();\r\n\t\tthis.verticalLayout.addComponent(this.verticalLayout2);\r\n\t\tthis.verticalLayout.setComponentAlignment(this.verticalLayout2, Alignment.MIDDLE_CENTER);\r\n\t\tthis.verticalLayout.setExpandRatio(this.verticalLayout2, 20.0F);\r\n\t\tthis.verticalLayout.setSizeFull();\r\n\t\tthis.addComponent(this.verticalLayout);\r\n\t\tthis.setComponentAlignment(this.verticalLayout, Alignment.MIDDLE_CENTER);\r\n\t\tthis.setExpandRatio(this.verticalLayout, 10.0F);\r\n\t\tthis.setSizeFull();\r\n\t\r\n\t\tthis.addContextClickListener(event -> this.this_contextClick(event));\r\n\t}", "@FXML\n void initialize() {\n setupAppState();\n\n try {\n setupTreeViewButtons();\n } catch (IOException e) {\n Helpers.alertErrorExit(\"Couldn't load a TreeView button image!\");\n }\n\n setupEditor();\n setupNoteTree();\n }", "protected abstract void initViews();", "public void init() {\r\n\r\n\t\tJLabel lbl = new JLabel(\"Hello World\");\r\n\t\tadd(lbl);\r\n\r\n\t}", "private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n \n //TRANSITION COMPONENTS\n initTransitionComponents();\n \n //SEARCH PANE COMPONENTS\n initSearchComponents();\n \n //RESULTS PANE COMPONENTS\n initResultComponents();\n \n // CRAWLER CONTROLS\n initCrawlerControlsComponents();\n \n // KEYWORD BAR\n initKeywordBarComponents();\n \n //WORKER CONTROLS\n initWorkerComponents();\n \n //URL COMPONENTS\n initURLMenuComponents();\n\n //BASE LAYOUT COMPONENTS\n initBaseLayout();\n }", "public void initialize() {\r\n setLayout(new BorderLayout());\r\n add(BorderLayout.CENTER, tabbedPane);\r\n for (Iterator it = widgets.iterator(); it.hasNext();) {\r\n SlotWidget widget = (SlotWidget) it.next();\r\n widget.initialize();\r\n }\r\n }", "public abstract void initViews();" ]
[ "0.8155224", "0.8012828", "0.80020714", "0.78650045", "0.78557146", "0.76235336", "0.7415659", "0.73508984", "0.7305256", "0.71595323", "0.7091849", "0.7071485", "0.7000932", "0.69892776", "0.6939908", "0.6912992", "0.6884789", "0.6882516", "0.670973", "0.667487", "0.6628149", "0.6624521", "0.6609675", "0.6594358", "0.65899223", "0.65634334", "0.654439", "0.651809", "0.6516286", "0.6497489", "0.64951533", "0.6484968", "0.6471175", "0.64558816", "0.6444022", "0.6403366", "0.64016974", "0.63899094", "0.6387063", "0.6355251", "0.6353455", "0.63507473", "0.6334836", "0.632569", "0.63061786", "0.6286527", "0.62806827", "0.6265033", "0.62578136", "0.6255833", "0.6235292", "0.6224432", "0.6222972", "0.621546", "0.62131006", "0.6206119", "0.62036425", "0.6198219", "0.618956", "0.617876", "0.61756325", "0.617518", "0.6161594", "0.6151013", "0.6146772", "0.6119812", "0.6116565", "0.60961914", "0.6091478", "0.6091478", "0.6081406", "0.60813725", "0.6077646", "0.6077406", "0.6072977", "0.60694814", "0.6060814", "0.60541886", "0.6030432", "0.60271436", "0.6026271", "0.6021982", "0.6020819", "0.60200363", "0.60196024", "0.6013293", "0.6011226", "0.6000389", "0.59973437", "0.59920114", "0.59826964", "0.5980637", "0.5973887", "0.59721476", "0.5971619", "0.59688973", "0.5968777", "0.5955578", "0.5944774", "0.5944677" ]
0.80208606
1
Shows the film overview inside the root layout.
public void showFilmOverview() { try { // Load film overview. FXMLLoader loader = new FXMLLoader(); loader.setLocation(FilmApp.class.getResource("view/FilmOverview.fxml")); AnchorPane filmOverview = (AnchorPane) loader.load(); // Set film overview into the center of root layout. rootLayout.setCenter(filmOverview); // Give the controller access to the FilmApp. FilmOverviewController controller = loader.getController(); controller.setFilmApp(this); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showMovies() {\n System.out.println(\"Mina filmer:\");\n for (int i = 0; i < myMovies.size(); i++) {\n System.out.println(\"\\n\" + (i + 1) + \". \" + myMovies.get(i).getTitle() +\n \"\\nRegissör: \" + myMovies.get(i).getDirector() + \" | \" +\n \"Genre: \" + myMovies.get(i).getGenre() + \" | \" +\n \"År: \" + myMovies.get(i).getYear() + \" | \" +\n \"Längd: \" + myMovies.get(i).getDuration() + \" min | \" +\n \"Betyg: \" + myMovies.get(i).getRating());\n }\n }", "public void showPersonOverview() {\n try {\n // Load the fxml file and set into the center of the main layout\n FXMLLoader loader = new FXMLLoader(MainApp.class.getResource(\"view/PersonOverview.fxml\"));\n AnchorPane overviewPage = (AnchorPane) loader.load();\n rootLayout.setCenter(overviewPage);\n \n //give controller access into the main app \n PersonOverviewController controller = loader.getController();\n controller.setMainApp(this);\n\n } catch (IOException e) {\n // Exception gets thrown if the fxml file could not be loaded\n e.printStackTrace();\n }\n }", "public void showPersonOverview() {\r\n\t try {\r\n\t // Load person overview.\r\n\t FXMLLoader loader = new FXMLLoader();\r\n\t loader.setLocation(MainApp.class.getResource(\"view/ClienteOverview.fxml\"));\r\n\t AnchorPane clienteOverview = (AnchorPane) loader.load();\r\n\r\n\t // Set person overview into the center of root layout.\r\n\t rootLayout.setCenter(clienteOverview);\r\n\r\n\t // Give the controller access to the main app.\r\n\t ClienteOverviewController controller = loader.getController();\r\n\t controller.setMainApp(this);\r\n\r\n\t } catch (IOException e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t}", "private void displayOneFilm(Movie film)\n {\n String head = film.getTitle();\n String director = film.getDirector();\n String actor1 = film.getActor1();\n String actor2 = film.getActor2();\n String actor3 = film.getActor3();\n int rating = film.getRating();\n \n System.out.println(\"\\n\\t\\t **::::::::::::::::::::::::::MOVIE DETAILS::::::::::::::::::::::::::::**\");\n System.out.println();\n System.out.println(\"\\t\\t\\t Movies' Title : \" + head);\n System.out.println(\"\\t\\t\\t Movies' Director : \" + director);\n \n if (actor2.length() == 0)\n System.out.println(\"\\t\\t\\t Movies' Actors : \" + actor1);\n else\n if (actor3.length() == 0)\n System.out.println(\"\\t\\t\\t Movies' Actors : \" + actor1 + \", \" + actor2);\n else\n if (actor3.length() != 0)\n System.out.println(\"\\t\\t\\t Movies' Actors : \" + actor1 + \", \" + actor2 + \", \" + actor3);\n\n System.out.println(\"\\t\\t\\t Movies' Rating : \" + rating);\n System.out.println(\"\\t\\t **:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::**\");\n }", "private void showMovieDetails() {\n\n if (movie != null) {\n\n // Display movie title, year, and overview into corresponding labels\n if (movie.getReleaseDate().equals(\"\")) {\n\n lblTitle.setText(movie.getMovieTitle());\n lblOverview.setText(movie.getMovieOverview());\n } else {\n\n lblTitle.setText(String.format(\"%s (%s)\", movie.getMovieTitle(), movie.getReleaseDate()));\n lblOverview.setText(movie.getMovieOverview());\n }\n\n // Display movie media into an image view\n downloadPoster();\n }\n }", "private void showMovies() {\n mDisplayErrorTV.setVisibility(View.INVISIBLE);\n mDisplayMoviesRV.setVisibility(View.VISIBLE);\n }", "public void displayAll() {\n\t\tSystem.out.println(\"Title \"+this.getTitle());\n\t\tSystem.out.println(\"Artist \"+this.getArtist());\n\t\tSystem.out.println(\"Genre \"+this.genre);\n\t}", "public ArrayList<Film> displayAllFilms() {\n return filmEdit.displayAllFilms();\n }", "private void showMovieDataView() {\n // hide the error message display\n mErrorMessageDisplay.setVisibility(View.INVISIBLE);\n // show the list of movies\n mMoviesRecyclerView.setVisibility(View.VISIBLE);\n }", "public void showJobOverview() {\n try {\n // Load job overview.\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApp.class.getResource(\"view/JobOverview.fxml\"));\n HBox jobOverview = loader.load();\n\n // Set job overview into the center of root layout.\n rootLayout.setCenter(jobOverview);\n\n // Give the controller access to the main app.\n JobOverviewController controller = loader.getController();\n controller.setMainApp(this);\n\n controller.print(\"* Hello! v1.00 * \\n\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void display()\n {\n //Displaying the posts\n newsFeed.show();\n \n }", "@FXML\r\n private void handleOverview() throws SQLException, IOException{\r\n Parent home_page_parent = FXMLLoader.load(getClass().getResource(\"overview.fxml\"));\r\n Scene home_page_scene = new Scene(home_page_parent);\r\n Stage app_stage = (Stage) ((Node) Overview).getScene().getWindow();\r\n app_stage.setScene(home_page_scene);\r\n app_stage.show();\r\n \r\n \r\n }", "public void displayMovie(ArrayList<Movie> movies)\n {\n int index = 1;\n System.out.println(\"\\n\\t\\t **::::::::::::::::::::::::::MOVIES LIST::::::::::::::::::::::::::::**\");\n \n for(Movie film : movies)\n {\n String head = film.getTitle();\n String director = film.getDirector();\n String actor1 = film.getActor1();\n String actor2 = film.getActor2();\n String actor3 = film.getActor3();\n int rating = film.getRating();\n \n System.out.println(\"\\t\\t\\t Movie number : [\" + index +\"]\");\n System.out.println();\n System.out.println(\"\\t\\t\\t Movies' Title : \" + head);\n System.out.println(\"\\t\\t\\t Movies' Director : \" + director);\n \n if (actor2.length() == 0)\n System.out.println(\"\\t\\t\\t Movies' Actors : \" + actor1);\n else\n if (actor3.length() == 0)\n System.out.println(\"\\t\\t\\t Movies' Actors : \" + actor1 + \", \" + actor2);\n else\n if (actor3.length() != 0)\n System.out.println(\"\\t\\t\\t Movies' Actors : \" + actor1 + \", \" + actor2 + \", \" + actor3);\n\n System.out.println(\"\\t\\t\\t Movies' Rating : \" + rating);\n System.out.println(\"\\t\\t **:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::**\");\n index = index + 1;\n }\n }", "@GetMapping(\"/listFilms\")\r\n public ModelAndView listFilms() {\r\n LOG.debug(\"listFilms\");\r\n ModelAndView mav = new ModelAndView(LIST_FILMS_VIEW);\r\n mav.addObject(\"films\", filmService.getFilms());\r\n mav.addObject(\"top\", new TopPilot());\r\n return mav;\r\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.movie_list);\n }", "public Result index() {\n Logger.info(\"render top page\");\n return ok(index.render());\n }", "private void showFilmDetails(FilmItem filmItem) {\n if (filmItem != null) {\n // Fill the labels with info from the film object.\n \tString englishName = (filmItem.getEnglishName() == null || filmItem.getEnglishName().isEmpty()) ? \"\" : \" (\" + filmItem.getEnglishName() + \")\";\n nameLabel.setText(filmItem.getName() + englishName);\n yearLabel.setText(filmItem.getYear());\n genreLabel.setText(filmItem.getGenre());\n commentLabel.setText(filmItem.getComment());\n haveViewedLabel.setText(filmItem.getHaveViewed() ? \"Просмотрен\" : \"\");\n if (filmItem.getImageLocation() != null && !filmItem.getImageLocation().isEmpty()) {\n\t\t\t\t//Image img = new Image(\"file://\" + filmItem.getImageLocation());\n \tImage img = new Image(filmItem.getImageLocation());\n\t\t\t\tfilmImageView.setImage(img);\n\t\t\t} else {\n\t\t\t\tfilmImageView.setImage(null);\n\t\t\t}\n } else {\n // Film is null, remove all the text.\n \tnameLabel.setText(\"\");\n yearLabel.setText(\"\");\n genreLabel.setText(\"\");\n commentLabel.setText(\"\");\n haveViewedLabel.setText(\"\");\n filmImageView.setImage(null);\n }\n }", "public void showPersonOverview() {\n try {\n // Load person overview.\n FXMLLoader loader = new FXMLLoader();\n //URL url=getClass().getResource(\"/fxml/Focustab.fxml\");\n loader.setLocation(MainApp.class.getResource(\"/fxml/Focustab.fxml\"));\n // Pane focusPane = (Pane)FXMLLoader.load(getClass().getResource(\"/fxml/Focustab.fxml\"));\n Pane focusPane=(Pane)loader.load();\n FocusPaneController controller = loader.getController();\n controller.setMainApp(this);\n Scene myScene = new Scene(focusPane);\n primaryStage.setScene(myScene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private JPanel createFilmPanel() {\n\t\tJPanel filmPanel = new JPanel();\n\t\tfilmPanel.setLayout(new BorderLayout());\n\t\tfilmPanel.setBorder(new EmptyBorder(10, 10, 10, 10));\n\t\t\n\t\tJPanel filmTitlePanel = new JPanel();\n\t\tfilmTitlePanel.setLayout(new BorderLayout());\n\t\tJLabel films = new JLabel(\"Films\");\n\t\tfilmTitlePanel.add(films, BorderLayout.WEST);\n\t\tfilmComboBox = new JComboBox(filmCBContent);\n\t\tfilmComboBox.setName(\"filmComboBox\");\n\t\tfilmTitlePanel.add(filmComboBox, BorderLayout.EAST);\n\t\tfilmPanel.add(filmTitlePanel, BorderLayout.NORTH);\n\n\t\tfilmContents = new JPanel();\n\t\tfilmContents.setLayout(new FlowLayout());\n\t\tfilmPanel.add(filmContents, BorderLayout.CENTER);\n\t\tfilmPanel.add(createJScrollPane(filmContents), BorderLayout.CENTER);\n\n\t\treturn filmPanel;\n\t}", "private void overview(Document doc) {\n\n Element overview = doc.selectFirst(\"section#overview\");\n\n String xml = space(1) + \"<overview>\";\n String yaml = space(1) + \"overview: \";\n boolean indexFirst = true;\n\n if(!overview.select(\"p\").isEmpty()) {\n String description = overview.selectFirst(\"p\").text();\n\n xml += space(1) + \"<description>\" + fixInvalidXML(description, true) + \"</description>\";\n\n yaml += space(2) + \"description: \" + fixInvalidXML(description, false);\n }\n\n Elements sub_overviews = overview.select(\"h3\");\n\n for (Element sub_overview: sub_overviews) {\n\n xml += space(1) + \"<sub_overview>\";\n xml += space(1) + \"<name>\" + fixInvalidXML(sub_overview.text(), true) + \"</name>\";\n\n if(indexFirst) {\n yaml += space(2) + \"sub_overview: \";\n indexFirst = false;\n }\n\n if(sub_overviews.size() > 1)\n yaml += space(3) + \"- \";\n\n yaml += space(4) + \"name: \" + fixInvalidXML(sub_overview.text(), false);\n\n if(!overview.select(sub_overview.cssSelector() + \" + div\").isEmpty()) {\n String description = overview.select(sub_overview.cssSelector() + \" + div\").text();\n\n xml += space(1) + \"<description>\" + fixInvalidXML(description, true) + \"</description>\";\n\n yaml += space(4) + \"description: \" + fixInvalidXML(description, false).replace(\"\\n\", \" \");\n }\n\n xml += space(1) + \"</sub_overview>\";;\n }\n\n xml += space(1) + \"</overview>\";\n UseFile.writeFile(xmlFile, xml);\n UseFile.writeFile(yamlFile, yaml);\n }", "@RequestMapping(method = RequestMethod.GET)\n public ModelAndView home() {\n page = new ModelAndView();\n page.setViewName(\"Statistique\");\n page.addObject(\"resources\", resourceService.listMainMenu());\n page.addObject(\"proms\", articleService.getFiveLastProms());\n page.addObject(\"mostPlayedClasses\", statsService.listXMostPlayedClasses(5));\n page.addObject(\"mostPlayedRaces\", statsService.listXMostPlayedRaces(5));\n page.addObject(\"mostPlayedSpecializations\", statsService.listXMostPlayedSpecialization(5));\n page.addObject(\"usersWithoutAvatar\", statsService.listUsersWithoutAvatar());\n page.addObject(\"mostActiveUsers\", statsService.listMostActiveUsers(5));\n if (user != null)\n page.addObject(\"userResources\", resourceService.listUserResources(user.getGroup().getId()));\n return page;\n }", "private void setupView() {\n refresh();\n if (isEmpty(movies)) {\n // Ok. so we have no movies. THat means one of two things. Either\n // we're trying to download the movies, or we tried and failed to\n // download them. In the former case just wait. We'll get a\n // notification when they're done. In the latter case, let the user\n // know.\n if (!isNullOrEmpty(getService().getUserAddress()) && getService().getDataProviderState() == DataProvider.State.Finished) {\n showNoInformationFoundDialog();\n }\n } else {\n setupMovieGrid();\n }\n }", "public void show() {\r\n\t\tshowMembers();\r\n\t\tshowFacilities();\r\n\t}", "public static void index() {\n\t\tList<models.Todo> todos = models.Todo.findAllSorted();\t\n\t\trender(todos);\n\t}", "public void mostrarRootLayout() {\n try {\n // Load root layout from fxml file.\n // Carrega o layout raíz do arquivo FXML \"RootLayout\"\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(LivrariaPrincipal.class.getResource(\"view/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load();\n\n // Show the scene containing the root layout.\n // Mostra a cena que contém o layour raíz\n Scene scene = new Scene(rootLayout);\n primaryStage.setScene(scene);\n\n // Dá acesso do controlador para o aplicativo principal\n RootLayoutController controller = loader.getController();\n controller.setMainApp(this);\n\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override protected void startup() {\n show(new FrontView());\n //show(new RestaurantManagementView(this));\n }", "@GET\r\n\t@Produces(MediaType.TEXT_HTML)\r\n\tpublic String getMoviesHTML() {\r\n\t\tListMovies movies = new ListMovies();\r\n\t\tmovies.addAll(TodoDao.instance.getMovies().values());\r\n\t\treturn \"\" + movies;\r\n\t}", "public ShowView() {\n\t\tsuper(null);\n\t\tcreateActions();\n\t\taddToolBar(SWT.FLAT | SWT.WRAP);\n\t\taddMenuBar();\n\t\taddStatusLine();\n\t}", "private void showMovies(){\n errorTextView.setVisibility(View.INVISIBLE);\n errorButton.setVisibility(View.INVISIBLE);\n errorButton.setEnabled(true);\n recyclerView.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.INVISIBLE);\n noFavoriteMoviesTextView.setVisibility(View.INVISIBLE);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fg_movie, null);\n }", "public void showMainPage() {\r\n\t\tmainFrame.showPage(mainPage.getClass().getCanonicalName());\r\n\t}", "void showAll();", "void showTodoView();", "private void displayMovieUI(final MovieObject movie) {\n releaseDateTV = findViewById(R.id.release_date_tv);\n releaseDateTV.setText(movie.getReleaseDate());\n\n ratingTV = findViewById(R.id.rating_value_detail_tv);\n ratingTV.setText(valueOf(movie.getRating()));\n\n overviewTV = findViewById(R.id.overview_tv);\n overviewTV.setText(movie.getOverview());\n\n voteCountTV = findViewById(R.id.vote_count);\n voteCountTV.setText(valueOf(movie.getVoteCount()));\n\n ratingBar = findViewById(R.id.rating_bar);\n ratingBar.setRating((float) movie.getRating());\n }", "public void showMovieInfo(MovieItem movie){\n //get houseKeeper in charge of displaying movie item info\n DetailKeeper keeper = (DetailKeeper)mKeeperStaff.getHouseKeeper(DetailHelper.NAME_ID);\n //update View with movie item data\n keeper.updateDetails(movie);\n }", "public void printMovieInfo() {\n println(\"Title : \" + this.movie.getTitle());\n println(\"Showing Status: \" + this.movie.getShowingStatus().toString());\n println(\"Content Rating: \" + this.movie.getContentRating().toString());\n println(\"Runtime : \" + this.movie.getRuntime() + \" minutes\");\n println(\"Director : \" + this.movie.getDirector());\n print(\"Cast : \");\n StringBuilder s = new StringBuilder();\n for (String r : movie.getCasts()) {\n s.append(r + \"; \");\n }\n println(s.toString());\n println(\"Language : \" + this.movie.getLanguage());\n println(\"Opening : \" + this.movie.getFormattedDate());\n\n print(\"Synopsis : \");\n println(this.movie.getSynopsis(), 16);\n\n if(movie.getRatingTimes() != 0 ){\n print(\"Overall Rating :\");\n printStars(movie.getOverAllRating());\n } else {\n println(\"Overall Rating: N/A\");\n }\n if (movie.getRatingTimes() != 0){\n for (Review r : movie.getReview()) {\n print(\"Review : \");\n println(r.getComment(), 16);\n print(\"Rating : \");\n printStars(r.getRating());\n }\n }\n }", "private void showMovieDataView() {\n /* First, make sure the error is invisible */\n mErrorMessageDisplay.setVisibility(View.INVISIBLE);\n /* Then, make sure the weather data is visible */\n mRecyclerView.setVisibility(View.VISIBLE);\n }", "private void showMoviesDataView()\n {\n mErrorMessageDisplay.setVisibility(View.INVISIBLE);\n mGridView.setVisibility(View.VISIBLE);\n }", "private void showReviews() {\n reviewsList = (LinearLayout) rootView.findViewById(R.id.reviews_list);\n LayoutInflater inflater = getActivity().getLayoutInflater();\n for (Review review : reviews) {\n View reviewView = inflater.inflate(R.layout.list_item_review, container, false);\n\n TextView reviewAuthor = (TextView) reviewView.findViewById(R.id.review_author);\n reviewAuthor.setText(review.getAuthor());\n\n TextView reviewContent = (TextView) reviewView.findViewById(R.id.review_content);\n reviewContent.setText(review.getContent());\n\n reviewsList.addView(reviewView);\n }\n }", "private static void showMovieDetails(){\n\t\t\n\t\ttry{\n\t\t\tURL url = new URL(\"http://localhost:8080/getSize\");\n\t\t\tString listSize = getHTTPResponse(url);\n\t\t\tint size = Integer.parseInt(listSize);\n\t\t\t\n\t\t\tif (size==0)\n\t\t\t\tSystem.out.println(\"There are no movies on the list\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"Select movie id 1-\"+size);\n\t\t\t\n\t\t\tint choice = Integer.parseInt(scanner.next());\n\t\t\t\n\t\t\turl = new URL(\"http://localhost:8080/getMovieDetails?id=\"+choice);\n\t\t\tString rawJSONObject = getHTTPResponse(url);\n\t\t\tJSONObject movieDetails = new JSONObject(rawJSONObject);\n\t\t\tStringBuilder details = new StringBuilder();\n\t\t\t\n\t\t\tdetails.append(\"ID: \");\n\t\t\tdetails.append(movieDetails.getInt(\"id\"));\n\t\t\tdetails.append(\"\\n\");\n\t\t\tdetails.append(\"Name: \");\n\t\t\tdetails.append(movieDetails.getString(\"name\"));\n\t\t\tdetails.append(\"\\n\");\n\t\t\tdetails.append(\"Year: \");\n\t\t\tdetails.append(movieDetails.getInt(\"year\"));\n\t\t\tdetails.append(\"\\n\");\n\t\t\tdetails.append(\"Directed by: \");\n\t\t\tdetails.append(movieDetails.getString(\"director\"));\n\t\t\tdetails.append(\"\\n\");\n\t\t\tdetails.append(\"Country: \");\n\t\t\tdetails.append(movieDetails.getString(\"country\"));\n\t\t\tdetails.append(\"\\n\");\n\t\t\t\n\t\t\tSystem.out.println(details.toString());\t\t\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"Error - wrong input or service down\");\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic void start(Stage primaryStage) {\r\n\t\tthis.primaryStage=primaryStage;\r\n\t\tthis.primaryStage.setTitle(\"AmwayWinston\");\r\n\t\t\r\n\t\tinitRootLayout();\r\n\t\t\r\n\t\tshowPersonOverview();\r\n\t\t\r\n\t}", "@FXML\n public void showAllBooks() {\n LibrarySystem.setScene(new AllBookListInReaderPage(\n reader, readerlist, booklist, booklist));\n }", "private void showMovieList(MovieResponse movieResponse) {\n setToolbarText(R.string.title_activity_list);\n showFavouriteIcon(true);\n buildList(movieResponse);\n }", "public void initRootLayout() {\r\n try {\r\n // Load root layout from fxml file.\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(FilmApp.class.getResource(\"view/RootLayout.fxml\"));\r\n rootLayout = (BorderPane) loader.load();\r\n\r\n // Show the scene containing the root layout.\r\n Scene scene = new Scene(rootLayout);\r\n primaryStage.setScene(scene);\r\n primaryStage.show();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void createContents() {\n\t\tshlEditionRussie = new Shell(getParent(), getStyle());\n\t\tshlEditionRussie.setSize(470, 262);\n\t\tshlEditionRussie.setText(\"Edition r\\u00E9ussie\");\n\t\t\n\t\tLabel lblLeFilm = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblLeFilm.setBounds(153, 68, 36, 15);\n\t\tlblLeFilm.setText(\"Le film\");\n\t\t\n\t\tLabel lblXx = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblXx.setBounds(195, 68, 21, 15);\n\t\tlblXx.setText(\"\" + getViewModel());\n\t\t\n\t\tLabel lblABient = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblABient.setText(\"a bien \\u00E9t\\u00E9 modifi\\u00E9\");\n\t\tlblABient.setBounds(222, 68, 100, 15);\n\t\t\n\t\tButton btnRevenirLa = new Button(shlEditionRussie, SWT.NONE);\n\t\tbtnRevenirLa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tm_Infrastructure.runController(shlEditionRussie, ListMoviesController.class);\n\t\t\t}\n\t\t});\n\t\tbtnRevenirLa.setBounds(153, 105, 149, 25);\n\t\tbtnRevenirLa.setText(\"Revenir \\u00E0 la liste des films\");\n\n\t}", "public void viewUser(ActionEvent actionEvent) throws IOException {\n Parent root = FXMLLoader.load(getClass().getResource(\"/sample/view/platoStatistics.fxml\"));\n Scene pageTwoScene = new Scene(root);\n Main.allStage.setScene(pageTwoScene);\n Main.allStage.show();\n\n }", "public void printAll() {\r\n\t\t\t\t\r\n\t\tSystem.out.println(\"################\");\r\n\t\tSystem.out.println(\"Filename:\" +getFileName());\r\n\t\tSystem.out.println(\"Creation Date:\" +getCreationDate());\r\n\t\tSystem.out.println(\"Genre:\" +getGenre());\r\n\t\tSystem.out.println(\"Month:\" +getMonth());\r\n\t\tSystem.out.println(\"Plot:\" +getPlot());\r\n\t\tSystem.out.println(\"New Folder Name:\" + getNewFolder());\r\n\t\tSystem.out.println(\"New Thumbnail File Name:\" +getNewThumbnailName());\r\n\t\tSystem.out.println(\"New File Name:\" +getNewFilename());\r\n\t\tSystem.out.println(\"Season:\" +getSeason());\r\n\t\tSystem.out.println(\"Episode:\" +getEpisode());\r\n\t\tSystem.out.println(\"Selected:\" +getSelectEdit());\r\n\t\tSystem.out.println(\"Title:\" +getTitle());\r\n\t\tSystem.out.println(\"Year:\" +getYear());\r\n\t\tSystem.out.println(\"Remarks:\" +getRemarks());\r\n\t\tSystem.out.println(\"################\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public FilmOverviewController() {\n }", "public void viewAll() {\n click(viewAllLink);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_main, container, false);\n recyclerView = v.findViewById(R.id.rv_movie);\n recyclerView.setLayoutManager(new GridLayoutManager(getContext(), 2));\n if (!movieList.isEmpty() && savedInstanceState!=null){\n adapter = new MovieAdapter(MainFragment.this, movieList);\n recyclerView.setAdapter(adapter);\n }\n realm = Realm.getDefaultInstance();\n return v;\n }", "private void showTrailers() {\n trailersList = (LinearLayout) rootView.findViewById(R.id.trailers_list);\n LayoutInflater inflater = getActivity().getLayoutInflater();\n for (final Trailer trailer : trailers) {\n View trailerView = inflater.inflate(R.layout.list_item_trailer, container, false);\n\n ImageView playButton = (ImageView) trailerView.findViewById(R.id.play_button);\n playButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Uri youTubeUri = Uri.parse(BASE_TRAILER_URL.concat(trailer.getKey()));\n Intent trailerIntent = new Intent(Intent.ACTION_VIEW, youTubeUri);\n startActivity(trailerIntent);\n }\n });\n\n TextView trailerName = (TextView) trailerView.findViewById(R.id.trailer_name);\n trailerName.setText(trailer.getName());\n\n trailersList.addView(trailerView);\n }\n }", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"SlideMain Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }", "private static void createTopStoriesPage(XMLTree xml, SimpleWriter out)\n {\n \tout.println(\"<!DOCTYPE html>\");\n \tout.println(\"<html>\");\n \tout.println(\"<head>\");\n \tout.println(\"<title>\" + xml.attributeValue(\"title\") + \"</title>\");\n \tout.println(\"</head>\");\n \tout.println(\"<h1>\" + xml.attributeValue(\"title\") + \"</h1>\");\n \tout.println(\"<ul>\");\n \t\n \t// for each child (each feed) create the file, process the feed, and display the list item)\n \tfor(int i = 0; i < xml.numberOfChildren(); i++)\n \t{\n \t\tSimpleWriter newOut = new SimpleWriter1L(\"src/\" + xml.child(i).attributeValue(\"file\"));\n \t\tprocessFeed(xml.child(i).attributeValue(\"url\"), xml.child(i).attributeValue(\"file\"), newOut);\n \t\tout.println(\"<li><a href=\\\"\" + xml.child(i).attributeValue(\"file\") + \"\\\">\" + xml.child(i).attributeValue(\"name\") + \"</a></li>\");\n \t\tnewOut.close();\n \t}\n \t\n \tout.println(\"</ul>\");\n \tout.println(\"</html>\");\n }", "public static void showMainView() throws IOException {\n //Load the MainView.\n Main.FxmlLoader(MAIN_VIEW_PATH);\n //Display the view to the user.\n primaryStage.show();\n }", "private void showAll() {\n getAll();\n //show persons\n MainActivity.instance().displayPersonsRunnable = new DisplayPersonsRunnable(MainActivity.instance());\n this.thread = new Thread(MainActivity.instance().displayPersonsRunnable);\n this.thread.start();\n }", "public static void main(String[] args) {\n Connection conn = null;\r\n try {\r\n Class.forName(\"org.postgresql.Driver\");\r\n conn = DriverManager.getConnection(\"jdbc:postgresql://csce-315-db.engr.tamu.edu/csce315904_3db\",\r\n \"csce315904_3user\", \"group3pass\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.err.println(e.getClass().getName()+\": \"+e.getMessage());\r\n JOptionPane.showMessageDialog(null,\"Failed to open database\");\r\n System.exit(0);\r\n }\r\n final Connection finalconn = conn;\r\n JOptionPane.showMessageDialog(null,\"Opened database successfully\");\r\n\r\n // main GUI\r\n final JFrame f = new JFrame(\"Viewer GUI\");\r\n\r\n // grab list of movies via queries\r\n String trending_Movies[] = get_Movie(conn, \"trending\", args[0]);\r\n String directors_Movies[] = get_Movie(conn, \"directors\", args[0]);\r\n String actors_Movies[] = get_Movie(conn, \"actors\", args[0]);\r\n String viewers_choice[] = get_Movie(conn, \"viewers_choice\", args[0]);\r\n String viewers_beware[] = get_Movie(conn, \"viewers_beware\", args[0]);\r\n\r\n // scroll panes with corresponding panels\r\n JScrollPane jScrollPane1 = new JScrollPane();\r\n JPanel panel1 = new JPanel();\r\n JScrollPane jScrollPane2 = new JScrollPane();\r\n JPanel panel2 = new JPanel();\r\n JScrollPane jScrollPane3 = new JScrollPane();\r\n JPanel panel3 = new JPanel();\r\n JScrollPane jScrollPane4 = new JScrollPane();\r\n JPanel panel4 = new JPanel();\r\n JScrollPane jScrollPane11 = new JScrollPane();\r\n JPanel panel11 = new JPanel();\r\n \r\n // containers\r\n JScrollPane jScrollPane6 = new JScrollPane();\r\n JScrollPane jScrollPane7 = new JScrollPane();\r\n JScrollPane jScrollPane8 = new JScrollPane();\r\n JScrollPane jScrollPane9 = new JScrollPane();\r\n JScrollPane jScrollPane10 = new JScrollPane();\r\n JScrollPane jScrollPane12 = new JScrollPane();\r\n\r\n // add movies to each panel\r\n panel1 = AddMoviesToPanels(trending_Movies, panel1);\r\n panel2 = AddMoviesToPanels(directors_Movies, panel2);\r\n panel3 = AddMoviesToPanels(actors_Movies, panel3);\r\n panel4 = AddMoviesToPanels(viewers_choice, panel4);\r\n panel11 = AddMoviesToPanels(viewers_beware, panel11);\r\n\r\n // set pref size for panels\r\n panel1.setPreferredSize(new Dimension(2050, 100));\r\n panel2.setPreferredSize(new Dimension(2050, 100));\r\n panel3.setPreferredSize(new Dimension(2050, 100));\r\n panel4.setPreferredSize(new Dimension(2050, 100));\r\n panel11.setPreferredSize(new Dimension(2050, 100));\r\n\r\n jScrollPane1.setPreferredSize(new Dimension(1000, 300));\r\n jScrollPane2.setPreferredSize(new Dimension(1000, 300));\r\n jScrollPane3.setPreferredSize(new Dimension(1000, 300));\r\n jScrollPane4.setPreferredSize(new Dimension(1000, 300));\r\n jScrollPane11.setPreferredSize(new Dimension(1000, 300));\r\n\r\n\r\n // headers\r\n JPanel p1 = new JPanel();\r\n JPanel p2 = new JPanel();\r\n JPanel p3 = new JPanel();\r\n JPanel p4 = new JPanel();\r\n JPanel p6 = new JPanel();\r\n\r\n p1.setLayout(new FlowLayout()); \r\n p1.add(new JLabel(\"Trending Movies\"));\r\n\r\n p2.setLayout(new FlowLayout()); \r\n p2.add(new JLabel(\"Movies By Directors You Like\"));\r\n\r\n p3.setLayout(new FlowLayout()); \r\n p3.add(new JLabel(\"Movies Starring Actors You Like\"));\r\n\r\n p4.setLayout(new FlowLayout()); \r\n p4.add(new JLabel(\"Viewer's Choice - revisit movies you really liked\"));\r\n\r\n p6.setLayout(new FlowLayout()); \r\n p6.add(new JLabel(\"Viewers Beware\"));\r\n \r\n // viewport stuff\r\n jScrollPane1.setViewportView(panel1);\r\n jScrollPane2.setViewportView(panel2);\r\n jScrollPane3.setViewportView(panel3);\r\n jScrollPane4.setViewportView(panel4);\r\n jScrollPane11.setViewportView(panel11);\r\n\r\n jScrollPane6.setViewportView(p1);\r\n jScrollPane7.setViewportView(p2);\r\n jScrollPane8.setViewportView(p3);\r\n jScrollPane9.setViewportView(p4);\r\n jScrollPane12.setViewportView(p6);\r\n\r\n\r\n // map everything out\r\n JPanel tempPanel = new JPanel();\r\n GroupLayout layout = new GroupLayout(tempPanel);\r\n\r\n layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\r\n .addComponent(p1)\r\n .addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\r\n .addComponent(p2)\r\n .addComponent(jScrollPane2, GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\r\n .addComponent(p3)\r\n .addComponent(jScrollPane3, GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\r\n .addComponent(p4)\r\n .addComponent(jScrollPane4, GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\r\n .addComponent(p6)\r\n .addComponent(jScrollPane11, GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE));\r\n\r\n layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(p1,25,25,25)\r\n .addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 128, GroupLayout.PREFERRED_SIZE)\r\n .addComponent(p2,25,25,25)\r\n .addComponent(jScrollPane2, GroupLayout.PREFERRED_SIZE, 128, GroupLayout.PREFERRED_SIZE)\r\n .addComponent(p3,25,25,25)\r\n .addComponent(jScrollPane3, GroupLayout.PREFERRED_SIZE, 128, GroupLayout.PREFERRED_SIZE)\r\n .addComponent(p4,25,25,25)\r\n .addComponent(jScrollPane4, GroupLayout.PREFERRED_SIZE, 128, GroupLayout.PREFERRED_SIZE)\r\n .addComponent(p6,25,25,25)\r\n .addComponent(jScrollPane11, GroupLayout.PREFERRED_SIZE, 128, GroupLayout.PREFERRED_SIZE)));\r\n\r\n tempPanel.setLayout(layout);\r\n \r\n // Menu Bar\r\n JMenuBar menuBar = new JMenuBar();\r\n\r\n JMenu user_ID = new JMenu(\"User ID\");\r\n user_ID.add(new JMenuItem(args[0]));\r\n menuBar.add(user_ID);\r\n\r\n JMenu watch_History = new JMenu(\"Watch History\");\r\n menuBar.add(watch_History);\r\n\r\n JMenuItem interval1 = new JMenuItem(\"Within last year\");\r\n JMenuItem interval2 = new JMenuItem(\"Within last two years\");\r\n JMenuItem interval3 = new JMenuItem(\"All time\");\r\n\r\n // listen to clicks and bring up corresponding screens\r\n interval1.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n JDialog jd = new JDialog(new JFrame());\r\n jd.setBounds(500, 300, 400, 300);\r\n String res= \"Within the last year \\n\\n\";\r\n JTextArea txt = new JTextArea(res);\r\n String[] temp = get_Movie(finalconn, \"recent 1 year\", args[0]);\r\n for (String a : temp)\r\n {\r\n res = a;\r\n txt.setText(txt.getText() + \"\\n\");\r\n txt.setText(txt.getText() + res);\r\n }\r\n jd.add(txt);\r\n jd.setVisible(true);\r\n }\r\n\r\n });\r\n interval2.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n JDialog jd = new JDialog(new JFrame());\r\n jd.setBounds(500, 300, 400, 300);\r\n String res= \"Within the last two years \\n\\n\";\r\n JTextArea txt = new JTextArea(res);\r\n String[] temp = get_Movie(finalconn, \"recent 2 year\", args[0]);\r\n for (String a : temp)\r\n {\r\n res = a;\r\n txt.setText(txt.getText() + \"\\n\");\r\n txt.setText(txt.getText() + res);\r\n }\r\n jd.add(txt);\r\n jd.setVisible(true);\r\n }\r\n\r\n });\r\n interval3.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n JDialog jd = new JDialog(new JFrame());\r\n jd.setBounds(500, 300, 400, 300);\r\n String res= \"All-time \\n\\n\";\r\n JTextArea txt = new JTextArea(res);\r\n String[] temp = get_Movie(finalconn, \"all\", args[0]);\r\n for (String a : temp)\r\n {\r\n res = a;\r\n txt.setText(txt.getText() + \"\\n\");\r\n txt.setText(txt.getText() + res);\r\n }\r\n jd.add(txt);\r\n jd.setVisible(true);\r\n }\r\n\r\n });\r\n watch_History.add(interval1);\r\n watch_History.add(interval2);\r\n watch_History.add(interval3);\r\n \r\n\r\n f.setContentPane(tempPanel);\r\n f.setJMenuBar(menuBar);\r\n f.setSize(1000, 1000);\r\n f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n f.setVisible(true); \r\n }", "public void displayHome() {\n\t\tclearBackStack();\n\t\tselectItemById(KestrelWeatherDrawerFactory.MAP_OVERVIEW, getLeftDrawerList());\n\t}", "@Override\r\n public void DisplayAlbumName(String name) {\r\n this.setTitle(name + \" - Photo Viewer\");\r\n }", "public interface MainView extends BaseView{\n\n void addMoreMoviesToTheList(List<MovieInfoModel> movieInfoModelList);\n void showMovieList(List<MovieInfoModel> movieInfoModelList);\n void resetPageNumberToDefault();\n void showNoMovieInfo();\n\n}", "public void onShowMain(ActionEvent event) {\n try {\n Stage stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n Parent scene = FXMLLoader.load(getClass().getResource(\"/App/View/MainScreenView.fxml\"));\n stage.setTitle(\"Customer Schedule\");\n stage.setScene(new Scene(scene));\n stage.show();\n }\n catch (Exception e){\n System.out.println(e.getMessage());\n }\n }", "@FXML\n public void viewFrontPage() throws IOException {\n System.out.println(\"viewing Front page\");\n Parent windowFrontPage;\n windowFrontPage = FXMLLoader.load(getClass().getResource(\"FrontPage.fxml\"));\n Stage mainStage = Gui.parentWindow;\n mainStage.getScene().setRoot(windowFrontPage);\n }", "@FXML\n public void viewAll(ActionEvent event) throws IOException {\n ViewDatabaseGUI viewDatabase = new ViewDatabaseGUI();\n viewDatabase.start(new Stage());\n }", "public void showFavorites() {\n System.out.println(\"Mina favoriter: \" + myFavorites.size());\n for (int i = 0; i < myFavorites.size(); i++) {\n System.out.println(\"\\n\" + (i + 1) + \". \" + myFavorites.get(i).getTitle() +\n \"\\nRegissör: \" + myFavorites.get(i).getDirector() + \" | \" +\n \"Genre: \" + myFavorites.get(i).getGenre() + \" | \" +\n \"År: \" + myFavorites.get(i).getYear() + \" | \" +\n \"Längd: \" + myFavorites.get(i).getDuration() + \" min | \" +\n \"Betyg: \" + myFavorites.get(i).getRating());\n }\n }", "void showOverview() {\n\t\tif (!isShown) {\n\t\t\tisShown = true;\n\t\t\tConfigurationMenu.overviewBox.add(mainBox);\n\t\t} else {\n\t\t\tisShown = false;\n\t\t\tConfigurationMenu.overviewBox.remove(mainBox);\n\t\t}\n\t}", "@GetMapping(\"/listAllMovies\")\n public String showAllMovies(Model model) {\n\n Iterable<Movie> movielist = movieRepo.findAll();\n\n model.addAttribute(\"allmovies\", movielist);\n return \"listAllMovies\";\n }", "@RequestMapping(\"/\")\n public ModelAndView index() {\n ModelAndView mav = new ModelAndView(\"index\");\n mav.addObject(\"userInfo\", new UserInfo());\n\n User user = (User) session.getAttribute(\"loginUser\");\n if (user != null) {\n List<Content> contents = contentService.showAll(user.getUserId());\n mav.addObject(\"contentList\", new ContentList(contents));\n }\n\n return mav;\n }", "public StudentHomepage() { \n\t\tsetLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));\n\t\tsetPreferredSize(new Dimension(800,600));\n\t\tfillContentPane();\n\t}", "private void showMovieContent(View rootView, int movieId) {\n // For showing the movie content quickly,\n // some data are fetched from the intent object directly instead of being retrieved from server\n ((TextView) rootView.findViewById(R.id.tvMovieOverview)).setText(mMovie.getOverview());\n ((TextView) rootView.findViewById(R.id.tvYear)).setText(mMovie.getReleaseDate());\n ((TextView) rootView.findViewById(R.id.tvVoteAverage)).setText(String.valueOf(mMovie.getVoteAverage() + \"/10\"));\n\n BitmapImageViewTarget biv = new BitmapImageViewTarget((ImageView) rootView.findViewById(R.id.ivMovieThumbnail)) {\n @Override\n protected void setResource(Bitmap resource) {\n RoundedBitmapDrawable circularBitmapDrawable =\n RoundedBitmapDrawableFactory.create(getContext().getResources(), resource);\n circularBitmapDrawable.setCornerRadius(25);\n view.setImageDrawable(circularBitmapDrawable);\n }\n };\n Glide.with(getActivity()).load(mMovie.getPosterPath()).asBitmap().fitCenter()\n .into(biv);\n try {\n // Construct the URL for the query\n Uri.Builder uriBuilder = new Uri.Builder();\n uriBuilder.scheme(\"http\")\n .authority(\"api.themoviedb.org\")\n .appendPath(\"3\")\n .appendPath(\"movie\")\n .appendPath(String.valueOf(movieId))\n .appendQueryParameter(\"api_key\", BuildConfig.THE_MOVIE_DB_API_KEY);\n\n Log.i(LOG_TAG, uriBuilder.build().toString());\n\n URL url = new URL(uriBuilder.build().toString());\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.addRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setDoInput(true);\n new FetchMoiveTask().execute(urlConnection);\n }catch ( IOException e ){\n Log.e(LOG_TAG,\"error\", e);\n }\n }", "public void display() {\n\t\ttry{\n\t\t\tload();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"error\");\n\t\t}\n\t\tfor (ModelObserver mo : controllers){\n\t\t\tmo.init();\n\t\t}\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_movie_details, container, false);\n\n\n movieTitle = (TextView) view.findViewById(R.id.detail_movie_title);\n movieReleaseYear = (TextView) view.findViewById(R.id.detail_movie_year);\n movieLength = (TextView) view.findViewById(R.id.detail_movie_length);\n movieRating = (TextView) view.findViewById(R.id.detail_movie_rating);\n moviePoster = (ImageView) view.findViewById(R.id.detail_movie_poster);\n movieOverview = (TextView) view.findViewById(R.id.detail_movie_overview);\n\n\n\n\n\n\n return view;\n }", "public static void index() {\r\n render();\r\n }", "public void showPage(){\n\t\tflexTable.setWidget(0, 0, lblNome);\n\t flexTable.setWidget(0, 1, nomePratoBox);\n\t flexTable.setWidget(0, 2, pesquisarButton);\n\t\t\n\t initWidget(flexTable);\n\t \n\t\tRootPanel formRootPanel = RootPanel.get(\"loginContainer\");\n\t\tformRootPanel.add(this);\n\t}", "@Override\r\n public void showMovieDetails(MovieEntry movie) {\n Fragment fragment = new DetailsFragment();\r\n Bundle args = new Bundle();\r\n args.putParcelable(DetailsFragment.MOVIE_ARG_POSITION, movie);\r\n fragment.setArguments(args);\r\n\r\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\r\n if(!twoPane) {\r\n transaction.replace(R.id.master_fragment, fragment, DetailsFragment.FRAGMENT_TAG);\r\n if(screenSize == Configuration.SCREENLAYOUT_SIZE_NORMAL) {\r\n transaction.addToBackStack(null);\r\n }\r\n } else {\r\n transaction.replace(R.id.details_fragment, fragment, DetailsFragment.FRAGMENT_TAG);\r\n }\r\n\r\n transaction.commit();\r\n }", "@Override\r\n\tpublic void index() {\n\t\trender(\"index.jsp\");\r\n\t}", "public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}", "public FilmWindow(int billboard) {\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 731, 588);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(new Color(64, 224, 208));\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\n\t\tlblFilmImage.setHorizontalAlignment(SwingConstants.CENTER);\n\n\t\tJButton btnExit = new JButton(\"SALIR\");\n\t\tbtnExit.setFont(new Font(\"Tahoma\", Font.BOLD, 10));\n\t\tbtnExit.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\n\t\tJButton btnShowCinemas = new JButton(\"MOSTRAR CINES\");\n\t\tbtnShowCinemas.setFont(new Font(\"Tahoma\", Font.BOLD, 10));\n\n\t\tJLabel lblDsc = new JLabel(\"Descripción:\");\n\t\tlblDsc.setHorizontalAlignment(SwingConstants.CENTER);\n\n\t\tfinal JComboBox<String> comboBoxFilm = new JComboBox<String>();\n\n\t\ttransformFilms(billFilms, films);\n\t\tfor (Film film : films) {\n\t\t\tfilmName = film.getName();\n\t\t\tcomboBoxFilm.addItem(filmName);\n\t\t}\n\n\t\t// ESTO ESTA PARA QUE LA PRIMERA PELI QUE SALGA SEA LA SELECCIONADA EN LA\n\t\t// ANTERIOR VENTANA\n\t\tcomboBoxFilm.setSelectedItem(films.get(billboard));\n\n\t\tfilm = films.get(billboard);\n\t\tageFilm = film.getAgeRestriction();\n\t\tfilmName = film.getName();\n\t\turlFilm = film.getUrl();\n\t\tdescFilm = film.getDescription();\n\t\ttrailerFilm = film.getTrailer();\n\t\tImage image = null;\n\t\ttry {\n\t\t\tURL url = new URL(urlFilm);\n\t\t\timage = ImageIO.read(url);\n\t\t\tImageIcon myImg = new ImageIcon(url);\n\t\t\timage = myImg.getImage();\n\n\t\t\tint width = myImg.getIconWidth() / 7 * 2;\n\t\t\tint height = myImg.getIconHeight() / 7 * 2;\n\n\t\t\tImage newImg = image.getScaledInstance(width, height, Image.SCALE_SMOOTH);\n\t\t\tImageIcon resizeImg = new ImageIcon(newImg);\n\t\t\tlblFilmImage.setIcon(resizeImg);\n\t\t\ttextPaneDescription.setText(descFilm);\n\t\t\t// textFieldFilmName.setText(filmName); //NOSE PORQUE NO FUNCIONA\n\t\t} catch (IOException e7) {\n\t\t}\n\n\t\tfilmAgeRestImage();\n\t\t// AQUI TERMINA EL METODO Y EMPIEZA EL DEL COMBOBOX\n\n\t\tcomboBoxFilm.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tnuevasPeliculas(comboBoxFilm);\n\t\t\t}\n\t\t});\n\n\t\ttextFieldFilmName = new JTextField();\n\t\ttextFieldFilmName.setEditable(false);\n\t\ttextFieldFilmName.setBackground(new Color(64, 224, 208));\n\t\ttextFieldFilmName.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttextFieldFilmName.setFont(new Font(\"Imprint MT Shadow\", Font.PLAIN, 52));\n\t\ttextFieldFilmName.setColumns(10);\n\n\t\ttextPaneDescription.setBackground(new Color(64, 224, 208));\n\n\t\tJButton btnBuyTickets = new JButton(\"COMPRAR ENTRADAS\");\n\t\tbtnBuyTickets.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tOrderWindow ow = new OrderWindow(film);\n\t\t\t\tUserResource ur = new UserResource();\n\t\t\t\tow.SetUserName(ur.getUser(lblUserName.getText()));\n\t\t\t\tow.setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\n\t\tJButton btnTrailer = new JButton(\"TRAILER\");\n\t\tbtnTrailer.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\ttry {\n\t\t\t\t\tDesktop.getDesktop().browse(new URL(trailerFilm).toURI());\n\t\t\t\t} catch (IOException | URISyntaxException e1) {\n\t\t\t\t\tlogger.log(Level.WARNING, \"ERROR\", e1);\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tGroupLayout gl_contentPane = new GroupLayout(contentPane);\n\t\tgl_contentPane.setHorizontalGroup(\n\t\t\tgl_contentPane.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(65)\n\t\t\t\t\t\t\t.addComponent(textFieldFilmName, GroupLayout.PREFERRED_SIZE, 302, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(168)\n\t\t\t\t\t\t\t.addComponent(lblFilmImage))\n\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(55)\n\t\t\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addComponent(comboBoxFilm, GroupLayout.PREFERRED_SIZE, 269, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t.addGap(360)\n\t\t\t\t\t\t\t\t\t.addComponent(lblRecommendedAge, GroupLayout.PREFERRED_SIZE, 148, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t.addComponent(lblDsc, GroupLayout.PREFERRED_SIZE, 102, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t.addComponent(btnExit, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t.addComponent(btnShowCinemas)\n\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t\t\t\t.addComponent(btnBuyTickets)\n\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t.addComponent(btnTrailer))\n\t\t\t\t\t\t\t\t\t\t.addComponent(textPaneDescription, GroupLayout.PREFERRED_SIZE, 392, GroupLayout.PREFERRED_SIZE))))))\n\t\t\t\t\t.addGap(11))\n\t\t);\n\t\tgl_contentPane.setVerticalGroup(\n\t\t\tgl_contentPane.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(comboBoxFilm, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addComponent(textFieldFilmName, GroupLayout.PREFERRED_SIZE, 59, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addComponent(lblRecommendedAge, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(lblFilmImage, GroupLayout.PREFERRED_SIZE, 325, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(lblDsc, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textPaneDescription, GroupLayout.PREFERRED_SIZE, 66, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(2)\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(btnExit, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(btnShowCinemas, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(btnBuyTickets, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(btnTrailer, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tcontentPane.setLayout(gl_contentPane);\n\t}", "public void showInfo() {\n System.out.println(\"Showtime ID \" + showtimeID + \", Movie title: \" + movieTitle + \", Datetime: \" + dateTime.get(Calendar.YEAR) + \" \" + (dateTime.get(Calendar.MONTH) + 1) + \" \" + dateTime.get(Calendar.DATE) + \" \" + dateTime.get(Calendar.HOUR_OF_DAY) + \" \" + dateTime.get(Calendar.MINUTE));\n }", "public Moviewindow(MovieDatabase db)\n\t{\n\t\t\n\t\tsuper();\n\n\t\t//set the model to display in this view.\n\t\tthis.database = db; \n\n\t\t//manually set the layout of components\n\t\tthis.setLayout(null);\n\n\t\t//now create the components and set their attributes.\n\t\tthis.movieList = new JList<Movie>();\n\t\tthis.movieList.setFont(new Font(\"Arail\", Font.PLAIN,20));\n\t\t//display the movie list in a scroll pane\n\t\tthis.movieList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\tthis.movieScrollPane = new JScrollPane(this.movieList,\n\t\t\t\tJScrollPane.VERTICAL_SCROLLBAR_ALWAYS,\n\t\t\t\tJScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n\t\t\n\t\t\n\t\t//place the scroll pane on the panel\n\t\t\n\t\tmovieScrollPane.setLocation(10, 400);\n\t\tmovieScrollPane.setSize(700,200);\n\t\tmovieScrollPane.setFont(new Font(\"Arail\", Font.PLAIN,20));\n\t\tadd(movieScrollPane);\n\n\t\t//create the add button and add to panel\n\t\tthis.addButton = new JButton(\"add\");\t\t\n\t\taddButton.setLocation(100,630);\n\t\taddButton.setSize(100, 30);\n\t\taddButton.setFont(new Font(\"Arial\",Font.PLAIN,20));\n\t\tadd(addButton);\n\n\t\t//create the remove button\n\t\tthis.removeButton = new JButton(\"remove\");\t\t\n\t\tremoveButton.setLocation(350,630);\n\t\tremoveButton.setSize(100, 30);\n\t\tremoveButton.setFont(new Font(\"Arial\",Font.PLAIN,20));\n\t\tadd(removeButton);\n\t\t\n\t\t//create the save button\n\t\tthis.saveButton = new JButton(\"Save\");\n\t\tsaveButton.setLocation(650,630);\n\t\tsaveButton.setSize(100,30);\n\t\tsaveButton.setFont(new Font(\"Arial\", Font.PLAIN,20));\n\t\tadd(saveButton);\n\n\t\t//title label text\n\t\tthis.titleLabel = new JLabel(\"Title\");\n\t\ttitleLabel.setLocation(100, 20);\n\t\ttitleLabel.setSize(100, 30);\n\t\ttitleLabel.setFont(new Font(\"Arial\",Font.PLAIN,20));\n\t\tadd(titleLabel);\n\n\t\t//input field for title\n\t\tthis.titleInput = new JTextField();\n\t\ttitleInput.setLocation(250, 20);\n\t\ttitleInput.setSize(400, 30);\n\t\ttitleInput.setFont(new Font(\"Arial\",Font.PLAIN,20));\n\t\tadd(titleInput);\n\n\n\t\t//director label text\n\t\tthis.directorLabel = new JLabel(\"Director\");\n\t\tdirectorLabel.setLocation(100,20+40);\n\t\tdirectorLabel.setSize(100, 30);\n\t\tdirectorLabel.setFont(new Font(\"Arial\",Font.PLAIN,20));\n\t\tadd(directorLabel);\n\n\t\t//input field for director\n\t\tthis.directorInput = new JTextField();\n\t\tdirectorInput.setLocation(250, 20+40);\n\t\tdirectorInput.setSize(400, 30);\n\t\tdirectorInput.setFont(new Font(\"Arial\",Font.PLAIN,20));\n\t\tadd(directorInput);\n\t\t\n\t\t//genre label text\n\t\tthis.genreLabel = new JLabel(\"Genre\");\n\t\tgenreLabel.setLocation(100,20+40+40);\n\t\tgenreLabel.setSize(100, 30);\n\t\tgenreLabel.setFont(new Font(\"Arial\",Font.PLAIN,20));\n\t\tadd(genreLabel);\n\t\t\n\t\t//input field for genre\n\t\tthis.genreInput = new JTextField();\n\t\tgenreInput.setLocation(250,20+40+40);\n\t\tgenreInput.setSize(400,30);\n\t\tgenreInput.setFont(new Font(\"Arial\", Font.PLAIN,20));\n\t\tadd(genreInput);\n\t\t\n\t\t//castlist label text\n\t\tthis.castLabel = new JLabel(\"Cast List\");\n\t\tcastLabel.setLocation(100, 20+80+40);\n\t\tcastLabel.setSize(200,30);\n\t\tcastLabel.setFont(new Font(\"Arial\", Font.PLAIN,20));\n\t\tadd(castLabel);\n\t\t\n\t\t//input field for castlist\n\t\tthis.castInput = new JTextField();\n\t\tcastInput.setLocation(250,20+80+40);\n\t\tcastInput.setSize(400, 30);\n\t\tcastInput.setFont(new Font(\"Arial\", Font.PLAIN,20));\n\t\tadd(castInput);\n\t\t\n\t\t//metasore label text\n\t\tthis.metascoreLabel = new JLabel(\"Metascore\");\n\t\tmetascoreLabel.setLocation(100,20+80+80);\n\t\tmetascoreLabel.setSize(200,30);\n\t\tmetascoreLabel.setFont(new Font(\"Arial\", Font.PLAIN,20));\n\t\tadd(metascoreLabel);\n\t\t\n\t\t//input field for metascore\n\t\tthis.metascoreInput = new JTextField();\n\t\tmetascoreInput.setLocation(250, 20+80+80);\n\t\tmetascoreInput.setSize(200,30);\n\t\tmetascoreInput.setFont(new Font(\"Arail\", Font.PLAIN,20));\n\t\tadd(metascoreInput);\n\t\t\n\t\t//releasedate lable text\n\t\tthis.releaseDateLabel = new JLabel(\"Release Date\");\n\t\treleaseDateLabel.setLocation(100, 20+80+80+40);\n\t\treleaseDateLabel.setSize(250,30);\n\t\treleaseDateLabel.setFont(new Font(\"Arail\", Font.PLAIN,20));\n\t\tadd(releaseDateLabel);\n\t\t\n\t\t\n\t\t//input Field For releasedate\n\t\tthis.releaseDateInput = new JTextField();\n\t\treleaseDateInput.setLocation(250,20 +80+80+40);\n\t\treleaseDateInput.setSize(200,30);\n\t\treleaseDateInput.setFont(new Font(\"Arail\", Font.PLAIN,20));\n\t\tadd(releaseDateInput);\n\t\t\n\t\n\t\t//call the update method\n\t\tthis.update();\n\t}", "public void displayMainScreen(ActionEvent event) throws IOException {\n Parent parent = FXMLLoader.load(getClass().getResource(\"/View_Controller/MainScreen.fxml\"));\n Scene targetScene = new Scene(parent);\n\n Stage window = (Stage) ((Button) event.getSource()).getScene().getWindow();\n window.setScene(targetScene);\n window.show();\n }", "public void showAnimalList() {\n\t\tshowAnimalList(Calendar.getInstance().getTime());\n\t}", "@Override\n public void onResponse(Call<MovieList> call, Response<MovieList> response) {\n MovieList movieList = response.body();\n List<MovieItem> listMovieItem = movieList.results;\n adapter.setDataFilm(new ArrayList<MovieItem>(listMovieItem));\n\n getSupportActionBar().setTitle(\"Upcoming\");\n\n //progressBar.setVisibility(View.GONE);\n recyclerView.setVisibility(View.VISIBLE);\n }", "@Override\n\tpublic int getCount() {\n\t\treturn movies.size();\n\t}", "private void displayConfigurationScreen() {\n\t\tsetContentView(R.layout.activity_configure);\n\n\t\t// Set up the action bar.\n\t\tfinal ActionBar actionBar = getActionBar();\n\t\tactionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);\n\n\t\t// Create the adapter that will return a fragment for each of the three\n\t\t// primary sections of the app.\n\t\tmSectionsPagerAdapter = new SectionsPagerAdapter(\n\t\t\t\tgetSupportFragmentManager());\n\n\t\t// Set up the ViewPager with the sections adapter.\n\t\tmViewPager = (ViewPager) findViewById(R.id.pager);\n\t\tmViewPager.setAdapter(mSectionsPagerAdapter);\n\n\t\t// When swiping between different sections, select the corresponding\n\t\t// tab. We can also use ActionBar.Tab#select() to do this if we have\n\t\t// a reference to the Tab.\n\t\tmViewPager\n\t\t\t\t.setOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onPageSelected(int position) {\n\t\t\t\t\t\tactionBar.setSelectedNavigationItem(position);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t// For each of the sections in the app, add a tab to the action bar.\n\t\tfor (int i = 0; i < mSectionsPagerAdapter.getCount(); i++) {\n\t\t\t// Create a tab with text corresponding to the page title defined by\n\t\t\t// the adapter. Also specify this Activity object, which implements\n\t\t\t// the TabListener interface, as the callback (listener) for when\n\t\t\t// this tab is selected.\n\t\t\tactionBar.addTab(actionBar.newTab()\n\t\t\t\t\t.setText(mSectionsPagerAdapter.getPageTitle(i))\n\t\t\t\t\t.setTabListener(this));\n\t\t}\n\t}", "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}", "public void showContent() {\n\n mapView.setVisibility(View.VISIBLE);\n loadingLayout.setVisibility(View.GONE);\n errorLayout.setVisibility(View.GONE);\n\n }", "public FilmController(){\r\n // Create a new ArrayList which will store ALL the films the cinema can show\r\n this.cinema_film_list = new ArrayList<Film>();\r\n this.film_database_controller = new FilmDatabaseController();\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_popular_movies, container, false);\n }", "public Result index() {\n return ok(views.html.index.render());\n }", "public Result index() {\n return ok(views.html.index.render());\n }", "public Result index() {\n return ok(views.html.index.render());\n }", "public ArrayList<Showing> getAllShowings() {\n return filmDisplay.getAllShowings();\n }", "public ScoutingApp(){\n\t\tteamPanel.add(teamsListPanel);\n\t\t\n\t\tmatchPanel.add(matchesListPanel);\n\t\t\n\t\tadd(teamPanel, BorderLayout.WEST);\n\t\tadd(matchPanel, BorderLayout.EAST);\n\t\t\n\t\tsetTitle(\"Scouting Application\");\n\t\tsetSize(1000, 600);\n\t\tsetLocationRelativeTo(null);\n\t\t//setExtendedState(MAXIMIZED_BOTH);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tsetVisible(true);\n\t}", "public void View()\n\t{\n\t\tDefaultPieDataset pieDataset = new DefaultPieDataset();\n\t\t\n\t\tfor(String key : result.keySet())\n\t\t{\n\t\t\tpieDataset.setValue(key, Double.parseDouble(result.get(key).toString()));\n\t\t}\n\t\t\n\t\tJFreeChart chart = ChartFactory.createPieChart(title, pieDataset, true, true, true);\n\t\t\n\t\tChartFrame frame = new ChartFrame(\"Pie Chart\", chart);\n\t\t\n\t\tframe.setVisible(true);\n\t\tframe.setSize(450,500);\n\t}", "public static Result index() {\n return ok(index.render(\"Welcome to the UW-La Crosse Eco Warehouse.\"));\n }", "public ViewMain()\n\t{\n\t\tview = new View();\n\t\t\n\t\tcolors = new Color[20][10];\n\t\tfor(int i=0; i < 20; ++i)\n\t\t\tfor(int j=0; j < 10; ++j)\n\t\t\t\tcolors[i][j] = Color.DARK_GRAY;\n\t\t\n\t\tpanel = new BoardGamePanel(colors);\n\t\tpanel.setVisible(true);\n\t\t\n\t\tgameInfo = new GameInfo();\n\t\t\n\t\tactionListenner();\n\t\t\n\t}", "public void showHomeScreen() {\n try {\n FXMLLoader loader1 = new FXMLLoader();\n loader1.setLocation(MainApplication.class.getResource(\"view/HomeScreen.fxml\"));\n AnchorPane anchorPane = (AnchorPane) loader1.load();\n rootLayout.setCenter(anchorPane);\n HomeScreenController controller = loader1.getController();\n controller.setMainApp(this);\n } catch (IOException e) {\n \t\te.printStackTrace();\n \t }\n }", "public Result index() {\n\t\treturn ok(views.html.index.render());\n\t}", "public void showStory() {\r\n\t\tGameEngine.getInstance().getCommandProcessor().clearScreen();\r\n\t\tprintln(\"\");\r\n\t\tprintln(RenderUtil.getWelcomeMessage());\r\n\t\ttry {\r\n\t\t\tfor (String outputString : GamePlayUtil.GAME_STORY) {\r\n\t\t\t\tThread.sleep(1000);\r\n\t\t\t\tRenderUtil.println(\"\\t\" + outputString);\r\n\t\t\t}\r\n\t\t\tThread.sleep(2000);\r\n\t\t} catch (Exception e) {\r\n\t\t\tprintln(\"Problem Occured...\");\r\n\t\t}\r\n\t}", "@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 }", "public void addToFilmContents(JLabel image, String year, String definition, String name) {\n\t\tJPanel individualFilmPanel = createIndividualPanel(image, name,year + \" - \" + definition);\n\t\tfilmContents.add(individualFilmPanel);\n\t}" ]
[ "0.6649841", "0.66427356", "0.64821583", "0.6393634", "0.61676586", "0.6021703", "0.5966659", "0.5885005", "0.58413106", "0.57947564", "0.57853264", "0.5770693", "0.57086873", "0.55901986", "0.5581003", "0.55771077", "0.5575622", "0.5535741", "0.54493403", "0.5444394", "0.5436803", "0.541974", "0.54081523", "0.53845346", "0.5347315", "0.5342809", "0.53252506", "0.53239447", "0.53093654", "0.529231", "0.52695704", "0.52665645", "0.52602893", "0.5259238", "0.5249404", "0.5237314", "0.52357346", "0.52355444", "0.52161217", "0.520567", "0.5199779", "0.5192296", "0.51921713", "0.51891416", "0.51856315", "0.51794934", "0.51764494", "0.517599", "0.5137515", "0.51153344", "0.5110798", "0.51035905", "0.5100997", "0.5096969", "0.5085292", "0.5084543", "0.5083299", "0.508286", "0.5073449", "0.5063307", "0.5057773", "0.5054566", "0.5054366", "0.5042022", "0.50373554", "0.50358856", "0.5035753", "0.503523", "0.50319916", "0.5028771", "0.50275713", "0.5025822", "0.5017896", "0.5016828", "0.5015723", "0.50147706", "0.5000632", "0.49985126", "0.49916184", "0.4987964", "0.4987449", "0.49799043", "0.49745044", "0.49706528", "0.49695942", "0.4964323", "0.49643025", "0.49636355", "0.49636355", "0.49636355", "0.49602592", "0.49577558", "0.4951982", "0.49495962", "0.4948266", "0.4943997", "0.49431968", "0.4943087", "0.49422896", "0.49382898" ]
0.79441625
0
Creates new stage Set the movie into the controller show the dialog and wait until the user closes it
public boolean showFilmEditDialog(Movie movie) { try { // Load the fxml file and create a new stage for the popup dialog. FXMLLoader loader = new FXMLLoader(); loader.setLocation(FilmApp.class.getResource("view/FilmEditDialog.fxml")); AnchorPane page = (AnchorPane) loader.load(); // Create the dialog Stage. Stage dialogStage = new Stage(); dialogStage.setTitle("Edit movie"); dialogStage.initModality(Modality.WINDOW_MODAL); dialogStage.initOwner(primaryStage); Scene scene = new Scene(page); dialogStage.setScene(scene); // Set the movie into the controller. this.controller = loader.getController(); controller.setDialogStage(dialogStage); controller.setMovie(movie); // Show the dialog and wait until the user closes it dialogStage.showAndWait(); return controller.isOkClicked(); } catch (IOException e) { e.printStackTrace(); System.out.println("je ot tu"); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CreateUAV(){\n createStage = new Stage();\n createStage.setTitle(\"UAV Setup\");\n createStage.initModality(Modality.APPLICATION_MODAL);\n setupOverwriteDialog();\n }", "private void setStage() {\n\t\tstage = new Stage();\n\t\tstage.setScene(myScene);\n\t\tstage.setTitle(title);\n\t\tstage.show();\n\t\tstage.setResizable(false);\n//\t\tstage.setOnCloseRequest(e -> {\n//\t\t\te.consume();\n//\t\t});\n\t}", "private void showCreateNewPlayer(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/CreateNewPlayer.fxml\"));\n AnchorPane janela = (AnchorPane) loader.load();\n \n Stage createNewPlayerStage = new Stage();\n createNewPlayerStage.setTitle(\"Create new player\");\n createNewPlayerStage.initModality(Modality.WINDOW_MODAL);\n createNewPlayerStage.initOwner(primaryStage);\n Scene scene = new Scene(janela);\n createNewPlayerStage.setScene(scene);\n \n CreateNewPlayerController controller = loader.getController();\n controller.setGame(this);\n controller.setCreateNewPlayerStage(createNewPlayerStage); \n \n createNewPlayerStage.showAndWait();\n }catch(IOException e){\n }\n }", "public void delete_stage() {\r\n\t\tSelectStageDialog s = new SelectStageDialog(this,true);\r\n\t\ts.setAlwaysOnTop(true);\r\n\t\ts.setLocationRelativeTo(null);\r\n\t\ts.setVisible(true);\r\n\t}", "public void waitDialog(String title) {\n Stage dialog = new Stage();\n Parent root = null;\n try {\n root = FXMLLoader.load(Objects.requireNonNull(getClass().getClassLoader().getResource(\"wait.fxml\")));\n Scene s1 = new Scene(root);\n dialog.setScene(s1);\n dialog.getIcons().add(new Image(\"images/cm_boardgame.png\"));\n overlayedStage = dialog;\n overlayedStage.initOwner(thisStage);\n overlayedStage.initModality(Modality.APPLICATION_MODAL);\n overlayedStage.setTitle(title);\n overlayedStage.initStyle(StageStyle.UNDECORATED);\n overlayedStage.setResizable(false);\n dialog.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void rename_stage() {\r\n\t\tSelectStageDialog s = new SelectStageDialog(this,false);\r\n\t\ts.setAlwaysOnTop(true);\r\n\t\ts.setLocationRelativeTo(null);\r\n\t\ts.setVisible(true);\r\n\t}", "public void popAddEntity()throws IOException {\n final Stage dialog = new Stage();\n dialog.setTitle(\"Agregar entidad\");\n \n Parent root = FXMLLoader.load(getClass().getResource(\"/view/PopAddEntity.fxml\"));\n \n Scene xscene = new Scene(root);\n \n dialog.setResizable(false);\n dialog.initModality(Modality.APPLICATION_MODAL);\n dialog.initOwner((Stage) root.getScene().getWindow());\n //dialog.resizableProperty().setValue(Boolean.FALSE);\n \n dialog.setScene(xscene);\n dialog.showAndWait();\n dialog.setResizable(false);\n dialog.close();\n\n }", "public void popAddHeritage()throws IOException {\n final Stage dialog = new Stage();\n dialog.setTitle(\"Agregar herencia\");\n \n Parent root = FXMLLoader.load(getClass().getResource(\"/view/PopAddHeritage.fxml\"));\n \n Scene xscene = new Scene(root);\n \n dialog.setResizable(false);\n dialog.initModality(Modality.APPLICATION_MODAL);\n dialog.initOwner((Stage) root.getScene().getWindow());\n \n dialog.setScene(xscene);\n dialog.showAndWait();\n dialog.setResizable(false);\n dialog.resizableProperty().setValue(Boolean.FALSE);\n dialog.close(); \n \n }", "public void openSaveSelection() {\n\t\ttry {\n\t\t\tFXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/SaveSelectionView.fxml\"));\n\t\t\tfxmlLoader.setResources(bundle);\n\t\t\tParent root1 = (Parent) fxmlLoader.load();\n\t\t\tStage stage = new Stage();\n\t\t\tSaveSelectionController ssc = fxmlLoader.getController();\n\t\t\tssc.setMainController(this);\n\t\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\t\t\t// stage.initStyle(StageStyle.UNDECORATED);\n\t\t\tstage.setTitle(bundle.getString(\"sSHeaderLabel\"));\n\t\t\tstage.setScene(new Scene(root1));\n\t\t\tstage.show();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@FXML\r\n public void ventas(ActionEvent e) throws IOException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/Ventas/FormVentas.fxml\"));\r\n Parent root1 = (Parent) fxmlLoader.load();\r\n Stage stage = new Stage();\r\n stage.setScene(new Scene(root1));\r\n stage.setTitle(\"MEVECOM <>\");\r\n stage.setResizable(false);\r\n stage.show();\r\n //Cerrar ventana actual\r\n Stage actual = (Stage) btnSalir.getScene().getWindow();\r\n actual.close();\r\n }", "public void newGame() throws IOException {\n label.getScene().getWindow().hide();\n\n Stage newStage = new Stage();\n Parent root = FXMLLoader.load(getClass().getResource(\"playerName.fxml\"));\n newStage.setTitle(\"Enter Players\");\n newStage.setScene(new Scene(root));\n newStage.show();\n }", "@FXML\r\n private void crearSolicitud() {\r\n try {\r\n //Carga la vista de crear solicitud rma\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/CrearSolicitud.fxml\"));\r\n BorderPane vistaCrear = (BorderPane) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitud RMA\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaCrear);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorCrearSolicitud controlador = loader.getController();\r\n controlador.setDialog(dialogo, primerStage);\r\n\r\n //Carga el numero de Referencia\r\n int numReferencia = DAORma.crearReferencia();\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void display() {\n Stage messageStage = new Stage();\n messageStage.initModality(Modality.APPLICATION_MODAL);\n messageStage.setTitle(title);\n messageStage.setMinWidth(350);\n messageStage.setMinHeight(200);\n\n Label messageLabel = new Label();\n messageLabel.setText(message);\n Button closeButton = new Button(\"OK\");\n closeButton.setOnAction(e -> messageStage.close());\n\n VBox vBox = new VBox(10);\n vBox.getChildren().addAll(messageLabel, closeButton);\n vBox.setAlignment(Pos.CENTER);\n\n Scene scene = new Scene(vBox);\n messageStage.setScene(scene);\n messageStage.showAndWait();\n }", "@FXML\n public void clicAceptar() {\n Stage stage= new Stage();\n stage = (Stage) botonAceptar.getScene().getWindow();\n stage.close();\n }", "private void generateScreen(String form,String text) throws IOException {\r\n \r\n MainScreenController.formName = text;\r\n Stage stage = new Stage();\r\n Parent root = FXMLLoader.load(getClass().getResource(form));\r\n stage.setScene(new Scene(root));\r\n stage.initModality(Modality.APPLICATION_MODAL);\r\n stage.initOwner(partAddBtn.getScene().getWindow());\r\n stage.showAndWait();\r\n \r\n }", "private void initStage() {\n stage = new Stage();\n stage.setTitle(\"Attentions\");\n stage.setScene(new Scene(root));\n stage.sizeToScene();\n }", "public void Stage(ActionEvent actionEvent) {\n this.stage = (Stage) ((Node) actionEvent.getSource()).getScene().getWindow();\n this.Scene();\n }", "public void showModalWindow() {\n Stage dialog = new Stage();\n dialog.initOwner(stage);\n dialog.initModality(Modality.WINDOW_MODAL); \n dialog.showAndWait();\n }", "void createStage(Stage stage){\n\t\tstage.setHeight(background.getHeight()+25);//displays full image (1)\r\n\t\tstage.setWidth(background.getWidth());\r\n\t\tshowBackground.setFitWidth(stage.getWidth());\r\n\t\tshowBackground.setFitHeight(stage.getHeight()-23);//displays full image (1)\r\n\t\r\n\t\tstage.setAlwaysOnTop(true);\r\n\t\tstage.setResizable(false);\r\n\t\t\r\n\t\t//launches first window in center of screen. \r\n\t\tstage.centerOnScreen();\r\n\t\tstage.setScene(mainScene);\r\n\t\tstage.setTitle(\"Don't Play Games in Class\");\r\n\t\t//supposed to prevent window from being moved\r\n\t\t\r\n\t\t//removes minimize, maximize and close buttons\r\n\t\t//unused because replacing the \r\n\t\t//stage.initStyle(StageStyle.UNDECORATED);\r\n\t\t\r\n\t\t//removes minimize and maximize button\r\n\t\tstage.initStyle(StageStyle.UTILITY);\r\n\t\t\r\n\t\t//replaces the closed window in the center of the screen.\r\n\t\tRespawn launch = new Respawn();\r\n\t\tstage.setOnCloseRequest(launch);\r\n\t}", "@FXML\n private void onNewTransfer() {\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getClassLoader().getResource\n (\"main/resources/view/edit-stock-transfer.fxml\"));\n Stage stage = new Stage();\n stage.setScene(new Scene(loader.load()));\n stage.setResizable(false);\n stage.initModality(Modality.WINDOW_MODAL);\n stage.initOwner(container.getScene().getWindow());\n\n EditStockTransferController controller = loader.getController();\n controller.setStage(stage);\n\n stage.showAndWait();\n getData();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void add_stage() {\r\n\t\tif (this.controller.getSelectedCatagory() == null)\r\n\t\t\treturn;\r\n\t\tString name = JOptionPane.showInputDialog(this,\r\n\t \t\"Choose a name for the stage\",\r\n\t \"Name Stage\", 1);\r\n\t if (name == null) {\r\n\t \treturn;\r\n\t }\r\n\t // If the stage cannot be added, inform the user\r\n\t\tif (!controller.addStage(name)) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A Stage with that name already exists\");\r\n\t\t}\r\n\t}", "@FXML\r\n public void inventario(ActionEvent e) throws IOException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/Inventario/Inventario.fxml\"));\r\n Parent root1 = (Parent) fxmlLoader.load();\r\n Stage stage = new Stage();\r\n stage.setScene(new Scene(root1));\r\n stage.setTitle(\"MEVECOM <>\");\r\n stage.setResizable(false);\r\n stage.show();\r\n //Cerrar ventana actual\r\n Stage actual = (Stage) btnSalir.getScene().getWindow();\r\n actual.close();\r\n }", "@Override\n public void vittoria() {\n Platform.runLater(() -> {\n /*Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Hai vinto\");\n alert.setHeaderText(\"Fine della partita\");\n alert.showAndWait();*/\n Parent root = null;\n Stage dialog = new Stage();\n try {\n root = FXMLLoader.load(Objects.requireNonNull(getClass().getClassLoader().getResource(\"winner.fxml\")));\n Scene s = new Scene(root);\n dialog.setScene(s);\n dialog.setTitle(\"Vittoria!\");\n dialog.getIcons().add(new Image(\"images/cm_boardgame.png\"));\n overlayedStage = dialog;\n overlayedStage.initOwner(thisStage);\n overlayedStage.initModality(Modality.APPLICATION_MODAL);\n overlayedStage.setResizable(false);\n overlayedStage.showAndWait();\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.exit(0);\n });\n try {\n handlerClient.getServer().close();\n } catch (IOException e) {\n System.out.println();\n }\n }", "@FXML\n public void New_List(ActionEvent actionEvent) {\n\n //Here we are going to open a window to create a list.\n //Working!!\n try {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"NewTodolist.fxml\"));\n Parent root1 = (Parent) fxmlLoader.load();\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.initStyle(StageStyle.UNDECORATED);\n stage.setTitle(\"New List\");\n stage.setScene(new Scene(root1));\n stage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@FXML\n private void handleSaveBtn(ActionEvent event)\n {\n String title;\n int duration;\n String filepath;\n String genre;\n String artist;\n try\n {\n \n title = txtTitleInput.getText();\n duration = sm.getDurationInSec();\n filepath = txtFile.getText();\n if (comboCategoryBox.getSelectionModel().getSelectedItem().equals(\"Other\")) {\n genre = txtOtherCategory.getText();\n } else {\n genre = comboCategoryBox.getSelectionModel().getSelectedItem();\n }\n artist = txtArtistInput.getText();\n sm.createSong(title, duration, artist, genre, filepath);\n \n\n Stage stage = (Stage) ((Node) ((EventObject) event).getSource()).getScene().getWindow();\n stage.close();\n } catch (MTBllException ex)\n {\n displayError(ex);\n }\n\n }", "private void initWindow(){\n final Stage dialog = new Stage();\n s = dialog;\n\n int buttonWidth = 120;\n VBox controlls = new VBox();\n controlls.setSpacing(10);\n controlls.setPadding(new Insets(10));\n Button showStartPoints = new Button(\"Show Start\");\n showStartPoints.setPrefWidth(buttonWidth);\n\n showStartPoints.setOnAction(a-> {\n drawAgentStartPositions(agentList);\n }\n );\n\n Button start = new Button(\"Start\");\n start.setPrefWidth(120);\n\n start.setOnAction(a-> {\n agBlink.invokeBlink();\n //after that, is inited after action (added in constructor and calls playaction\n });\n\n Button stop = new Button(\"Stop\");\n\n stop.setOnAction(a-> {\n\n execEndAction(execOnEnd.getText());\n\n if (rmp !=null) rmp.stop();\n if (timer!= null && pto != null) {\n pto.stop();\n }\n\n });\n stop.setPrefWidth(buttonWidth);\n\n Button clear = new Button(\"Clear\");\n\n clear.setOnAction(a-> {\n\n if (rmp !=null) rmp.stop();\n smFront.clear();\n if (timer!= null && pto != null) {\n pto.stop();\n pto.reset();\n }\n\n });\n clear.setPrefWidth(buttonWidth);\n\n\n ChoiceBox<SolverProcess> solutionBox = new ChoiceBox<>();\n solutionBox.setPrefWidth(buttonWidth);\n solverChoices = solutionBox;\n ObservableList<SolverProcess> sol = FXCollections.observableArrayList();\n solverOptions = sol;\n SolverProcess dummySp = SolverProcess.getDummyProcess();\n\n solutionBox.setItems(sol);\n sol.add(dummySp);\n sol.addAll(pm.getSolverProcessNotErrorList());\n\n //hook to select files\n solutionBox.getSelectionModel().selectedItemProperty().addListener((obs, oldSelection, newSelection) -> {\n logger.debug(\"selection changed\");\n if (newSelection != null ) {\n SolverProcess sp = (SolverProcess) newSelection;\n if (sp != null ){\n agBlink.reinitBlink(sp.agentStartBlinkNumber,sp.getSolution().getAglist());\n }\n }\n });\n\n\n\n Button showTimer = new Button(\"Timer\");\n\n showTimer.setOnAction(a-> {\n showTimerWindow();\n\n });\n showTimer.setPrefWidth(buttonWidth);\n\n execOnStart = new TextField();\n Label execOnStartLbl = new Label(Consts.textExecOnStart);\n execOnEnd = new TextField();\n Label execOnEndLbl = new Label(Consts.textExecOnEnd);\n stopBeforeCall = new CheckBox();\n stopBeforeCall.setText(Consts.callStopBeforeStart);\n\n\n\n controlls.getChildren().add(showStartPoints);\n controlls.getChildren().add(start);\n VBox cb = new VBox();\n\n cb.getChildren().add(new Label(\"Solution to play:\"));\n cb.getChildren().addAll(solutionBox);\n controlls.getChildren().add(cb);\n //controlls.getChildren().add(start)\n controlls.getChildren().addAll(stop);;\n controlls.getChildren().add(clear);\n controlls.getChildren().add(showTimer);\n\n VBox vbox2 = new VBox();\n vbox2.getChildren().addAll(execOnStartLbl,execOnStart,execOnEndLbl,execOnEnd,stopBeforeCall);\n\n controlls.getChildren().addAll(vbox2);\n\n dialog.setTitle(\"Real Map Controll\");\n\n\n\n Scene scene = new Scene(controlls,180,350);\n\n s.setOnCloseRequest((WindowEvent event1) -> {\n if (DataStore.rmm != null) {\n DataStore.rmm.clearControllPane();;\n DataStore.rmc = null;\n }\n if (pto != null) {\n pto.stop();\n pto = null;\n }\n\n if (endTask != null) { endTask.interrupt(); }\n if (startTask != null) { startTask.interrupt();}\n });\n\n dialog.setScene(scene);\n s.show();\n }", "@FXML\n private void newSong(ActionEvent event) {\n Parent root; \n try{\n root = FXMLLoader.load(getClass().getResource(\"/mytunes/gui/view/NewSong.fxml\"));\n Stage stage = new Stage();\n \n stage.setTitle(\"New Song\");\n stage.setScene(new Scene(root, 550,450));\n stage.show();\n stage.setOnHiding(new EventHandler<WindowEvent>() {\n @Override\n public void handle(WindowEvent event) {\n bllfacade.reloadSongs();\n init();\n }\n });\n } catch (IOException ex) {\n Logger.getLogger(AppController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@FXML\r\n public void proveedores(ActionEvent e) throws IOException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/Proveedores/FormProveedores.fxml\"));\r\n Parent root1 = (Parent) fxmlLoader.load();\r\n Stage stage = new Stage();\r\n stage.setScene(new Scene(root1));\r\n stage.setTitle(\"MEVECOM <>\");\r\n stage.setResizable(false);\r\n stage.show();\r\n //Cerrar ventana actual\r\n Stage actual = (Stage) btnSalir.getScene().getWindow();\r\n actual.close();\r\n }", "public void openPatternSelect() {\n timeline.pause();\n startButton.setText(\"Start\");\n isRunning = false;\n\n //Creates a new stage with modality WINDOW_MODAL and loads it.\n patternSelectStage = new Stage();\n patternSelectStage.initModality(Modality.WINDOW_MODAL);\n patternSelectStage.initOwner(canvasArea.getScene().getWindow());\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/view/PatternSelect.fxml\"));\n try {\n //Tries to load the fxml and sets the patternPickerController from that.\n Parent root = fxmlLoader.load();\n PatternSelectController patternPickerController = fxmlLoader.getController();\n patternPickerController.setFileHandler(fileHandler);\n\n //Opens and waits\n patternSelectStage.setTitle(\"GameOfLife\");\n patternSelectStage.setScene(new Scene(root, 600, 400));\n patternSelectStage.showAndWait();\n\n //Resets and redraws when the window is closed.\n isMovable = true;\n canvasDrawer.resetOffset(board, canvasArea);\n draw();\n canvasArea.requestFocus();\n setFocusTraversable(false);\n }catch (IOException ioe){\n //Shows a warning should the loading of the FXML fail.\n PopUpAlerts.ioAlertFXML();\n }\n }", "@FXML\r\n public void compras(ActionEvent e) throws IOException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/Compras/FormCompras.fxml\"));\r\n Parent root1 = (Parent) fxmlLoader.load();\r\n Stage stage = new Stage();\r\n stage.setScene(new Scene(root1));\r\n stage.setTitle(\"MEVECOM <>\");\r\n stage.setResizable(false);\r\n stage.show();\r\n //Cerrar ventana actual\r\n Stage actual = (Stage) btnSalir.getScene().getWindow();\r\n actual.close();\r\n }", "public void showDialogWindow(Stage primaryStage, VBox vbox, String title, Button done) {\n // Create layout\n BorderPane layout = new BorderPane();\n layout.setCenter(vbox);\n\n // Show Modal Dialog Window\n Scene inputScene = new Scene(layout, 350, 250);\n final Stage userInputs = new Stage();\n userInputs.initModality(Modality.APPLICATION_MODAL);\n userInputs.initOwner(primaryStage);\n userInputs.setScene(inputScene);\n userInputs.setTitle(title);\n userInputs.show();\n\n // Add functionality to upload button\n done.setOnAction(e -> userInputs.close());\n }", "public void handleBegin(){\n\t\tStage getstage = (Stage) beginButton.getScene().getWindow();\n\t\tParent root;\n\t\ttry {\n\t\t\troot = FXMLLoader.load(getClass().getResource(\"GameBoard.fxml\"));\n\t\t\tScene scene = new Scene(root,800,600);\n\t\t\tscene.getStylesheets().add(getClass().getResource(\"GameBoard.css\").toExternalForm());\n\t\t\tgetstage.setScene(scene);\n\t\t\tgetstage.sizeToScene();\n\t\t\tgetstage.show();\n\t\t\t// TODO Add background task to send to server and wait for other person to press begin\n\t\t} catch (IOException e) {\n\t\t\tlog.log(Level.FINE, \"Error in begin\", e);\n\t\t}\t\n\t}", "@Override\r\n\tpublic void start(Stage stage) throws Exception {\r\n\t\t\r\n\t\tthis.stage = stage;\r\n\t\t\r\n\t\tstage.setTitle(windowName);\r\n\r\n\t\tPlatform.setImplicitExit(false);\r\n\r\n\t\tFXMLLoader loader = new FXMLLoader();\r\n\r\n\t\tloader.setClassLoader(this.getClass().getClassLoader());\r\n\t\t\r\n\t\tParent box = loader.load(new ByteArrayInputStream(fxml.getBytes()));\r\n\t\t\r\n\t\tcontroller = loader.getController();\r\n\t\t\r\n\t\tcontroller.setGUI(this);\r\n\r\n\t\tscene = new Scene(box);\r\n\t\t\r\n\t\tscene.setFill(Color.TRANSPARENT);\r\n\r\n\t\tif (this.customTitleBar)\r\n\t\t\tstage.initStyle(StageStyle.UNDECORATED);\r\n\t\t\r\n\t\tif (this.css != null)\r\n\t\t\tscene.getStylesheets().add(this.css.toExternalForm());\r\n\t\tstage.setScene(scene);\r\n\t\t\r\n\t\tstage.setResizable(false);\r\n\r\n\t\tstage.setOnCloseRequest(new EventHandler<WindowEvent>() {\r\n\r\n\t @Override\r\n\t public void handle(WindowEvent event) {\r\n\t Platform.runLater(new Runnable() {\r\n\r\n\t @Override\r\n\t public void run() {\r\n\t endScript();\r\n\t }\r\n\t });\r\n\t }\r\n\t });\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void handle(ActionEvent arg0) {\n\n\t\t\t\t \n\t\t\t\t try {\n\t\t\t\t\t\t\tnew Main().start(new Stage());\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t\n\t\t\n\n\t\t\t\tprimaryStage.close();\n\t\t\t}", "public static void show() {\n\t\tcadastrados = new DaoPagadores();\n\t\t\n\t\tstagePrimary = new Stage();\n\t\tstagePrimary.initModality(Modality.WINDOW_MODAL);\n\t\tstagePrimary.setTitle(\"Mostra Pagadores\");\n\t\tstagePrimary.setMinWidth(900);\n\t\tstagePrimary.setMaxWidth(900);\n\t\tstagePrimary.setMaxHeight(900);\n\t\t\n\t\t// ---------------------- Linha 1\n\t\ttbvPagadoresAtivos = new TableView<Pagadores>();\n\t\tdadosPagadores = cadastrados.carregaPagadores();\n\t\ttbvPagadoresAtivos = tablePagadoresAtivos(dadosPagadores);\n\t\ttbvPagadoresAtivos.getSelectionModel().selectedItemProperty().addListener((v, oldValue, newValue) -> tbvPagadoresAtivos_Change());\n\t\t\n\t\tpaneLinha1 = new HBox(tbvPagadoresAtivos);\n\t\tpaneLinha1.setPrefHeight(400);\n\t\tpaneLinha1.setPrefWidth(850);\n\t\tpaneLinha1.setPadding(new Insets(30,0,0,30));\n \n\t\t// ----------------------- Linha 2\n\t\tlblFonte = new Label(\"Fonte Pagadora : \");\n\t\tlblFonte.setFont(Font.font(\"Arial\", 16));\n\t\tlblFonte.setPrefWidth(150);\n\t\t\n\t\tlblPagFonte = new Label(\"\");\n\t\tlblPagFonte.setFont(Font.font(\"Arial\", 16));\n\t\tpaneLinha2 = new HBox(lblFonte,lblPagFonte);\n\t\tpaneLinha2.setPadding(new Insets(30, 0, 50, 30));\n\t\t\n\t\t// -------------------------\n\t\tgrupo = Ini.loadProps(\"CentroReceb\", \"RecCen\"); // passar esta linha para baixo\n\t\t\n\t\tpanePrimary = new VBox(paneLinha1, paneLinha2);\n\t\tscenePrimary = new Scene(panePrimary);\n\t\tstagePrimary.setScene(scenePrimary);\n\t\tstagePrimary.showAndWait();\n\t}", "public void launch(String stage) {\n\t\tnew JFXPanel();\n\t\tresult = new FutureTask(new Callable(){\n \n @Override\n public Object call() throws Exception {\n StagedProduction prod=(StagedProduction)Class.forName(stage).getConstructor().newInstance();\n return (prod.produce());\n }\n \n \n });\n Platform.runLater(result);\n\t}", "private void onNew() {\r\n\t\tnewPark.setOnAction(e -> {\r\n\t\t\tif (inAction.booleanValue() == false) {\r\n\t\t\t\tinAction = true;\r\n\t\t\t\tVBox vbox = new VBox();\r\n\t\t\t\tLabel popLabel = new Label(\"This will delete your current work. Do you want to save?\");\r\n\t\t\t\tdoIt = new Button(\"Proceed\");\r\n\t\t\t\tpopLabel.setFont(Font.font(\"Calibri\",20));\r\n\t\t\t\t\r\n\t\t\t\tvbox.getChildren().addAll(popLabel, doIt);\r\n\t\t\t\tvbox.setAlignment(Pos.CENTER);\r\n\t\t\t\tvbox.setSpacing(20);\r\n\t\r\n\t\t\t\tStage popStage = new Stage();\r\n\t\t\t\tpopStage.setAlwaysOnTop(true);\r\n\t\t\t\tpopStage.setTitle(\"WARNING\");\r\n\t\t\t\tScene popScene = new Scene(vbox, 500, 100);\r\n\t\t\t\tpopStage.setScene(popScene);\r\n\t\t\t\tpopStage.showAndWait();\r\n\t\t\t\tinAction = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void displayCreateProfile() throws Exception{\r\n System.out.println(\"Username And Login Match\");\r\n currentStage.hide();\r\n Stage primaryStage = new Stage();\r\n System.out.println(\"Step 1\");\r\n Parent root = FXMLLoader.load(getClass().getResource(\"view/CreateProfile.fxml\"));\r\n System.out.println(\"step 2\");\r\n primaryStage.setTitle(\"Main Menu\");\r\n System.out.println(\"Step 3\");\r\n primaryStage.setScene(new Scene(root, 600, 900));\r\n primaryStage.show();\r\n }", "public void openNewWindow(boolean setResizable, String stageName, String fxmlName) throws IOException {\r\n Stage stage = new Stage();\r\n // create a new window using FirstLaw gui\r\n try {\r\n Parent root = FXMLLoader.load(getClass().getResource(fxmlName));\r\n Scene scene = new Scene(root);\r\n stage.setScene(scene);\r\n // temp fixed min size of the stage\r\n stage.setMinWidth((1276 * 500)/ 716);\r\n stage.setMinHeight(500);\r\n //stage.setMaximized(true);\r\n stage.setResizable(setResizable);\r\n stage.initModality(Modality.APPLICATION_MODAL); // prevent from using the main windows\r\n stage.setTitle(stageName);\r\n stage.show();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "@FXML\r\n private void mostrarSolicitudes() {\r\n try {\r\n //Carga la vista \r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(Principal.class.getResource(\"/vista/MostrarRma.fxml\"));\r\n VBox vistaMostrar = (VBox) loader.load();\r\n\r\n //Crea un dialogo para mostrar la vista\r\n Stage dialogo = new Stage();\r\n dialogo.setTitle(\"Solicitudes enviadas\");\r\n dialogo.initModality(Modality.WINDOW_MODAL);\r\n dialogo.initOwner(primerStage);\r\n Scene escena = new Scene(vistaMostrar);\r\n dialogo.setScene(escena);\r\n\r\n //Annadir controlador y datos\r\n ControladorMostrarRma controlador = loader.getController();\r\n controlador.setDialogs(primerStage, dialogo);\r\n\r\n //Modifica el dialogo para que no se pueda cambiar el tamaño y lo muestra\r\n dialogo.setResizable(false);\r\n dialogo.showAndWait();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n public void show(final Stage primaryStage) {\n this.stage = primaryStage;\n\n view = viewProvider.get();\n\n nations = game\n .getHumanPlayer()\n .getNations()\n .stream()\n .sorted()\n .collect(Collectors.toList());\n\n deploymentViewModel.init();\n\n getAndBindViewModel();\n\n deploymentViewModel.setModel();\n\n view.show(stage, game.getScenario());\n\n markAllAirfields();\n\n registerCallbacks();\n registerTabChange();\n selectFirstTab();\n\n view.finish();\n\n view.getContinueButton().setOnAction(event -> continueButton());\n view.getBackButton().setOnAction(event -> backButton());\n }", "@Override\n public void handle(ActionEvent t) \n {stage.setScene(GenerateReport(stage));}", "public void start(Stage selectionStage) {\n Button Stage1Btn = new Button();\n Stage1Btn.setText(\"Stage 1\");\n Stage1Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage1Btn.setPrefSize(150,150);\n Stage1Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage1 gs1= new GameStage1();\n Stage gameStage = new Stage();\n gs1.start(gameStage);\n }\n });\n \n //Create button link to Stage 2\n Button Stage2Btn = new Button();\n Stage2Btn.setText(\"Stage 2\");\n Stage2Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage2Btn.setPrefSize(150,150);\n Stage2Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage2 gs2= new GameStage2();\n Stage gameStage2 = new Stage();\n gs2.start(gameStage2);\n }\n });\n \n //Create button link to Stage 3\n Button Stage3Btn = new Button();\n Stage3Btn.setText(\"Stage 3\");\n Stage3Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage3Btn.setPrefSize(150,150);\n Stage3Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage3 gs3= new GameStage3();\n Stage gameStage3 = new Stage();\n gs3.start(gameStage3);\n }\n });\n \n //Create button link to Stage 4\n Button Stage4Btn = new Button();\n Stage4Btn.setText(\"Stage 4\");\n Stage4Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage4Btn.setPrefSize(150,150);\n Stage4Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage4 gs4= new GameStage4();\n Stage gameStage4 = new Stage();\n gs4.start(gameStage4);\n }\n });\n \n //Create button link to Stage 5\n Button Stage5Btn = new Button();\n Stage5Btn.setText(\"Stage 5\");\n Stage5Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage5Btn.setPrefSize(150,150);\n Stage5Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage5 gs5= new GameStage5();\n Stage gameStage5 = new Stage();\n gs5.start(gameStage5);\n }\n });\n //Create a HBox to insert multiple button and arrange them horizontally\n HBox mainBtn = new HBox();\n mainBtn.setPadding(new Insets(15, 12, 15, 12));\n mainBtn.setSpacing(10);\n mainBtn.setAlignment(Pos.CENTER);\n \n //Create Main Menu button\n Button MainMenuBtn = new Button();\n MainMenuBtn.setText(\"Main Menu\");\n MainMenuBtn.setFont(Font.font(\"Lucida Console\",ITALIC ,40));\n MainMenuBtn.setPrefSize(300,80);\n MainMenuBtn.setOnAction((ActionEvent ae) -> {\n\n //Create a confirmation dialog\n Alert MainMenuAlert = new Alert(Alert.AlertType.CONFIRMATION);\n MainMenuAlert.initStyle(StageStyle.UTILITY);\n MainMenuAlert.setTitle(\"Confirmation\");\n MainMenuAlert.setHeaderText(\"Do you want to back to Main Menu?\");\n MainMenuAlert.setContentText(\"Click OK to confirm\");\n\n Optional<ButtonType> result = MainMenuAlert.showAndWait();\n if (result.get() == ButtonType.OK){\n selectionStage.close();\n MainScreenStage mss = new MainScreenStage();\n mss.start(selectionStage);\n// if user chose OK this window will closed and Main Interface will opened\n } \n });\n\n //Create button to close program\n Button QuitBtn = new Button();\n QuitBtn.setText(\"Quit Game\");\n QuitBtn.setFont(Font.font(\"Lucida Console\",ITALIC ,40));\n QuitBtn.setPrefSize(300,80);\n QuitBtn.setOnAction((ActionEvent ae) -> {\n\n //Create a confirmation dialog\n Alert QuitAlert = new Alert(Alert.AlertType.CONFIRMATION);\n QuitAlert.initStyle(StageStyle.UTILITY);\n QuitAlert.setTitle(\"Confirmation\");\n QuitAlert.setHeaderText(\"Do you want to quit game?\");\n QuitAlert.setContentText(\"Click OK to confirm\");\n\n Optional<ButtonType> result = QuitAlert.showAndWait();\n if (result.get() == ButtonType.OK){\n Platform.exit();// ... user chose OK\n } else {\n // ... user chose CANCEL or closed the dialog\n }\n\n });\n //Create HBox to add button\n HBox selectionBtns = new HBox();\n selectionBtns.setSpacing(10);\n selectionBtns.setAlignment(Pos.CENTER);\n selectionBtns.getChildren().addAll(Stage1Btn, Stage2Btn, Stage3Btn, Stage4Btn, Stage5Btn);\n mainBtn.getChildren().addAll(MainMenuBtn,QuitBtn);\n \n BorderPane root = new BorderPane();\n root.setCenter(selectionBtns);\n root.setBottom(mainBtn);\n \n Scene scene = new Scene(root, 1200, 800);\n \n selectionStage.setTitle(\"Shapes\");\n selectionStage.setScene(scene);\n selectionStage.show();\n }", "public void start(Stage stage) {\n\t\t// set up network dialog from stage\n\t\tthis.networkDialog = new NetworkDialog(stage,this.controller,this);\n\t\t// set to single player by default\n\t\tthis.networkGame = false;\n\t\t\n\t\t// create board: with 7 columns, 6 rows:\n\t\tgame.setPrefColumns(cols);\n\t\tgame.setPrefRows(rows);\n\t\t// make sure our window has a fixed size, so we can find relative position of things:\n\t\tgame.setMinWidth(width);\n\t\tgame.setMaxWidth(width);\n\t\tgame.setMinHeight(height);\n\t\tgame.setMaxHeight(height);\n\t\t// make sure all the nodes have 8px of padding\n\t\tgame.setPadding(new Insets(8));\n\t\tgame.setHgap(8);\n\t\tgame.setVgap(8);\n\t\t\n\t\t// Creates board display and adds board circles\n\t\tBackgroundFill f = new BackgroundFill(Color.BLUE, null, null);\n\t\tBackground b = new Background(f);\n\t\tgame.setBackground(b);\n\t\tfor (int i = 0; i<rows*cols; i++) {\n\t\t\tCircle circle = new Circle();\n\t\t\tcircle.setRadius(20);\n\t\t\tcircle.setFill(Color.WHITE);\n\t\t\tgame.getChildren().add(circle);\n\t\t}\n\t\t\n\t\t// AUTO-LOAD LAST SAVE\n\t\tFile starter = new File(\"Saves/save_game.dat\");\n\t\tif(starter.exists()) {\n\t\t\tcontroller.open(starter);\n\t\t}\n\t\t\n\t\t// CREATE MENU\n\t\tfileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\".dat\",\"*.dat\"));\n\t\tMenuBar menuBar = new MenuBar();\n\t\tMenu file = new Menu(\"File\");\n\t\t\n\t\t// SAVE\n\t\tMenuItem save = new MenuItem(\"Save\");\n\t\tsave.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tfileChooser.setTitle(\"Save\");\n\t\t\t\tfileChooser.setInitialDirectory(new File(\"Saves\"));\n\t\t\t\tFile saveFile = fileChooser.showSaveDialog(null);\n\t\t\t\tif(saveFile != null) {\n\t\t\t\t\tcontroller.save(saveFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t// NEW GAME\n\t\tMenuItem newGame = new MenuItem(\"New Game\");\n\t\tnewGame.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tgameFinished = false;\n\t\t\t\t// Goes back to regular non-networking game\n\t\t\t\tcontroller = new SingleController(game,controller.newGame());\n\t\t\t}\n\t\t});\n\t\t\n\t\t// LOAD GAME\n\t\tMenuItem loadGame = new MenuItem(\"Load Game\");\n\t\tloadGame.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tfileChooser.setTitle(\"Open\");\n\t\t\t\tfileChooser.setInitialDirectory(new File(\"Saves\"));\n\t\t\t\tFile openFile = fileChooser.showOpenDialog(null);\n\t\t\t\tif(openFile != null) {\n\t\t\t\t\tcontroller.open(openFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t// NETWORKED GAME\n\t\tMenuItem networkedGame = new MenuItem(\"Networked Game\");\n\t\tnetworkedGame.setOnAction(p -> {\n\t\t\tthis.networkDialog.show();\n\t\t});\n\t\t\n\t\t// COMPILE & ADD MENU BAR\n\t\tfile.getItems().addAll(newGame,loadGame,save, networkedGame);\n\t\tmenuBar.getMenus().add(file);\n\t\t\n\t\tVBox vbox = new VBox();\n\t\tvbox.getChildren().addAll(menuBar,game);\n\t\t\n\t\t// AUTO SAVE (IF GAME HAS NOT BEEN COMPLETED\n\t\tstage.setOnCloseRequest(new EventHandler<WindowEvent>() {\n\t\t\tpublic void handle(WindowEvent w) {\n\t\t\t\tif(!gameFinished) {\n\t\t\t\t\tFile saveFile = new File(\"Saves/save_game.dat\");\n\t\t\t\t\tcontroller.save(saveFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Displays GUI\n\t\tstage.setScene(new Scene(vbox));\n\t\tstage.show();\n\t}", "@FXML\n\tvoid startPgm(ActionEvent event) throws IOException {\n\t\tAnchorPane loader = (AnchorPane)FXMLLoader.load(getClass().getResource(\"/application/view/CardType2.fxml\"));\n\t\tStage stage = (Stage) startBtn.getScene().getWindow();\n\t\tScene scene = new Scene(loader,500,300);\n\t\tstage.setScene(scene);\n\t}", "@FXML\n private void handleCancel(ActionEvent event) throws IOException {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"add city.fxml\"));\n Stage stage = (Stage) fdId.getScene().getWindow(); \n Parent root = loader.load(); \n Scene scene = new Scene(root);\n stage.setScene(scene);\n stage.show();\n }", "@FXML\n private void newPlaylist(ActionEvent event){\n Parent root;\n try{\n root = FXMLLoader.load(getClass().getResource(\"/mytunes/gui/view/NewPlaylist.fxml\"));\n Stage stage = new Stage();\n \n stage.setTitle(\"New/Edit Playlist\");\n stage.setScene(new Scene(root, 350,250));\n stage.show();\n stage.setOnHiding(new EventHandler<WindowEvent>() {\n @Override\n public void handle(WindowEvent event) {\n bllfacade.reloadPlaylists();\n init();\n }\n });\n }catch(IOException e){e.printStackTrace();}\n }", "public void btn_newEntry() throws IOException, SQLException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"NewEntry.fxml\"));\n Parent parent = fxmlLoader.load();\n NewEntryController newEntryController = fxmlLoader.<NewEntryController>getController();\n newEntryController.setPresenter(presenter);\n newEntryController.fillComboBox();\n this.stageNewEntry = new Stage();\n stageNewEntry.setTitle(bundle.getString(\"entryNew.title\"));\n stageNewEntry.setScene(new Scene(parent, 400, 400));\n stageNewEntry.setAlwaysOnTop(true);\n stageNewEntry.setResizable(false);\n stageNewEntry.initModality(Modality.APPLICATION_MODAL);\n stageNewEntry.getIcons().add(new Image(String.valueOf(this.getClass().getResource(\"images/logo.png\"))));\n stageNewEntry.show();\n }", "public void onShowMain(ActionEvent event) {\n try {\n Stage stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n Parent scene = FXMLLoader.load(getClass().getResource(\"/App/View/MainScreenView.fxml\"));\n stage.setTitle(\"Customer Schedule\");\n stage.setScene(new Scene(scene));\n stage.show();\n }\n catch (Exception e){\n System.out.println(e.getMessage());\n }\n }", "public void initAndShowStage(Parent root) {\n Scene scene = new Scene(root);\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.setScene(scene);\n stage.setTitle(\"Ayuda para la Gestion de Usuarios\");\n stage.setResizable(false);\n stage.setMinWidth(800);\n stage.setMinHeight(600);\n stage.setOnShowing(this::handleWindowShowing);\n stage.show();\n }", "private void start (final Stage stage) throws IOException{\n Parent pa = FXMLLoader.load(getClass().getResource(\"/toeicapp/EditQuestion.fxml\"));\n Scene scene = new Scene(pa);\n scene.setFill(Color.TRANSPARENT);\n stage.setTitle(\"Cập nhật Câu hỏi\"); \n stage.setScene(scene);\n stage.show();\n }", "public void setNewScene() {\n switch (game.getCurrentRoomId()) {\n case 14:\n WizardOfTreldan.setFinishScene();\n break;\n\n }\n }", "public void start(Stage stage) {\r\n\t\tJavaFXGui gui = this;\r\n\t\t\r\n\t\t// Create Border\r\n\t\tBorderPane border = new BorderPane();\r\n\t\t\r\n\t\t// Setup Border\r\n\t\tborder.setMinSize(1000, 800); \r\n\t\t\r\n\t\t// Add Border Sections\r\n\t\tborder.setTop(simulationHeader());\r\n\t\tborder.setLeft(simulationOptions());\r\n\t\tborder.setBottom(simulationGraphs());\r\n \r\n \t// Create Scene\r\n \tScene scene = new Scene(border); \r\n \r\n \t// Setup Stage\r\n \tstage.setTitle(\"Smart Car Parking Allocation\"); \r\n \tstage.setScene(scene);\r\n \tstage.show(); \r\n \t\r\n \t// On click of GO, start simulation\r\n \tgo.setOnAction(new EventHandler() {\r\n\t\t\tpublic void handle(Event arg0) {\t\t\r\n\t\t\t\t// If the simulation isn't running\r\n\t\t\t\tif (running == false) {\r\n\t\t\t\t\t// Check if the inputs are valid\r\n\t\t\t\t\tboolean valid = validateForm();\r\n\t\t\t\t\t\r\n\t\t\t\t\t// If the inputs are valid\r\n\t\t\t\t\tif (valid) {\r\n\t\t\t\t\t\t// Hide any showing error message\r\n\t\t\t\t\t\tsetErrorMessage(\"\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Set running to true to prevent multiple launches\r\n\t\t\t\t\t\trunning = true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Add the display to the UI\r\n\t\t\t\t\t\tborder.setCenter(simulationDisplay());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Create object of simulation options to be passed to agents\r\n\t\t\t\t\t\tObject[] setup = getOptions(gui);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Try to create a new parent carpark agent\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tagent = container.createNewAgent(\"Carpark\", \"CarparkAgent\", setup);\r\n\t\t\t\t\t\t\tagent.start();\r\n\t\t\t\t\t\t} catch (StaleProxyException e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\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});\r\n \t\r\n \t// On click of END, close simulation\r\n \tend.setOnAction(new EventHandler() {\r\n\t\t\tpublic void handle(Event arg0) {\r\n\t\t\t\t// If simulation is running\r\n\t\t\t\tif (running == true) {\r\n\t\t\t\t\t// Set running to false\r\n\t\t\t\t\trunning = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// End the simulation\r\n\t\t\t\t\t// Adapted from: https://stackoverflow.com/a/25038465\r\n\t\t\t\t\t// Accessed: 27/08/2020\r\n\t\t\t\t\tStage stage = (Stage) end.getScene().getWindow();\r\n\t\t\t\t stage.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t});\r\n\t}", "public void showAddCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/AddCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage dialogStage = new Stage();\n\t\t\tdialogStage.setTitle(\"Add Customer\");\n\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tdialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tdialogStage.setScene(scene);\n\t\t\tAddCustomerDialogController controller = loader.getController();\n\t\t\tcontroller.setDialogStage(dialogStage);\n\t\t\tdialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "public static void Display(AnalysisController pController, String pstrTitle) {\n \n Stage stgAboutMeerkatDialog = new Stage();\n stgAboutMeerkatDialog.initModality(Modality.APPLICATION_MODAL);\n \n //Label lblAboutMeerkat = new Label(strAboutMeerkat);\n \n String aboutMeerkat = \"Meerkat is a social network analysis tool developed at AMII, Department of Computing Science, University of Alberta, \"\n + \"under the leadership of Dr. Osmar Zaïane.\";\n \n String meerkatURL = \"https://www.amii.ca/meerkat\";\n \n Hyperlink link = new Hyperlink(meerkatURL);\n link.setBorder(Border.EMPTY);\n link.setPadding(new Insets(0, 0, 0, 0));\n link.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent e) {\n try{\n if( Desktop.isDesktopSupported() )\n {\n new Thread(() -> {\n try {\n Desktop.getDesktop().browse( new URI( meerkatURL ) );\n } catch (Exception et) {\n System.out.println(\"Exception in hyperlink click in AboutMeerkat:Disply()\");\n }\n }).start();\n }\n stgAboutMeerkatDialog.close();\n }catch(Exception exp){\n System.out.println(\"Exception in hyperlink click in AboutMeerkat:Disply()\");\n }\n }\n });\n \n \n \n String meerkatEmail = \"meerkat@cs.ualberta.ca \";\n\n String details = \"For more details please visit us online at: \";\n String emailDetails = \" or email us at: meerkat@cs.ualberta.ca\";\n \n String meerkatVersion = \"Meerkat Version: \"+MeerkatSoftwareValidator.getMeerkatVersion();\n String meerkatReleaseDate = \"Version Release Date: 2018 February 02\";\n\n String meerkatcurrentDevs = \"Current Developers : Sankalp Prabhakar, Talat Iqbal Syed\";\n \n String meerkatPastDevs = \"Past and Present Team Members (alphabetically): Abhimanyu Panwar, Ali Yadollahi, Afra Abnar, Amin Travelsi, Eric Verbeek, Farzad Sangi, Justin Fagnan, \\n\" +\n \"Jiyang Chen, Matt Gallivan, Mansoureh Takaffoli, Reihaneh Rabbany, Sankalp Prabhakar, Shiva Zamani Gharaghooshi, \"\n + \"Talat Iqbal Syed, Xiaoxiao Li.\";\n\n \n VBox labels = new VBox();\n Label label1 = new Label(aboutMeerkat);\n Label label2 = new Label(details);\n Label label3 = new Label(emailDetails);\n \n HBox hbox = new HBox();\n hbox.getChildren().addAll(label2, link, label3);\n \n Label version = new Label(meerkatVersion);\n Label releaseDate = new Label(meerkatReleaseDate);\n Label currDevs = new Label(meerkatcurrentDevs);\n Label pastDevs = new Label(meerkatPastDevs);\n \n labels.getChildren().addAll(label1,hbox,version,releaseDate,currDevs,pastDevs);\n labels.setPadding(new Insets(5, 10, 5, 10));\n labels.setSpacing(10);\n \n // Build a VBox\n Button btnOK = new Button(LangConfig.GENERAL_OK);\n VBox vboxRows = new VBox(5);\n vboxRows.setPadding(new Insets(5,10,5,10)); \n vboxRows.getChildren().addAll(labels, btnOK);\n vboxRows.setAlignment(Pos.CENTER);\n \n Scene scnAboutMeerkatDialog = new Scene(vboxRows);\n scnAboutMeerkatDialog.addEventFilter(KeyEvent.KEY_PRESSED, (KeyEvent evt) -> {\n if (evt.getCode().equals(KeyCode.ESCAPE)) {\n stgAboutMeerkatDialog.close();\n pController.updateStatusBar(false, StatusMsgsConfig.WINDOW_CLOSED);\n }\n });\n \n //stgAboutMeerkatDialog.initModality(Modality.WINDOW_MODAL);\n stgAboutMeerkatDialog.setTitle(pstrTitle); \n stgAboutMeerkatDialog.setResizable(false);\n \n \n // Events \n btnOK.setOnAction((ActionEvent e) -> {\n // Close the dialog box\n stgAboutMeerkatDialog.close();\n \n // Update the Status bar\n pController.updateStatusBar(false, StatusMsgsConfig.ABOUT_CLOSED);\n });\n \n stgAboutMeerkatDialog.setScene(scnAboutMeerkatDialog);\n stgAboutMeerkatDialog.show();\n \n // Update the status bar\n pController.updateStatusBar(true, StatusMsgsConfig.ABOUT_SHOW);\n }", "@FXML\r\n void onActionAddAppointment(ActionEvent event) throws IOException {\r\n\r\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/AddAppointment.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n\r\n }", "@Override\n\tpublic void start(Stage window) throws Exception {\n\t\twindow = new Stage();\n\n //Block events to other windows\n window.initModality(Modality.APPLICATION_MODAL);\n window.setTitle(title);\n window.setMinWidth(200);\n window.setMinHeight(100);\n window.setAlwaysOnTop(true);\n\n Label label = new Label();\n label.setText(message);\n Button closeButton = new Button(\"OK\");\n //closeButton.setOnAction(e -> window.close());\n\n VBox layout = new VBox(10);\n layout.getChildren().addAll(label, closeButton);\n layout.setAlignment(Pos.CENTER);\n\n //Display window and wait for it to be closed before returning\n Scene scene = new Scene(layout);\n window.setScene(scene);\n window.showAndWait();\n\t}", "@FXML\n final void btnNewGamePress() {\n new Thread(() -> sceneHandler.setActiveScene(GameScene.GAME_TYPE_SELECT)).start();\n }", "@FXML\r\n\tvoid openCreateUser(ActionEvent event) {\r\n\t\tParent root = null;\r\n\t\tnewWindow = new Stage();\r\n\t\ttry {\r\n\t\t\troot = FXMLLoader.load(getClass().getResource(\"3.1-AddISUsersScreen.fxml\"));\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tISUsers = new Scene(root);\r\n\t\tnewWindow.setTitle(\"Create IS User\");\r\n\t\tnewWindow.setScene(ISUsers);\r\n\t\tnewWindow.setResizable(false);\r\n\t\tnewWindow.initOwner((Stage) ((Node) event.getSource()).getScene().getWindow());\r\n\t\tnewWindow.initModality(Modality.WINDOW_MODAL);\r\n\t\tnewWindow.show();\r\n\t}", "@Override\n public void start (Stage stage) throws IOException {\n init.start(stage);\n myScene = view.makeScene(50,50);\n stage.setScene(myScene);\n stage.show();\n }", "@FXML\r\n void onActionAddCustomer(ActionEvent event) throws IOException {\r\n\r\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/AddCustomer.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n\r\n\r\n }", "@FXML\n void OnActionShowAddCustomerScreen(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/AddCustomer.fxml\"));\n stage.setTitle(\"Add Customer\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "@Override\n\tpublic void start(Stage primaryStage) throws IOException{\n\t\tstage = new Stage();\n\n\t\tstage.setScene(ClientEntranceController.getEntranceScene());\n\t\tstage.setTitle(\"Archive\");\n\t\tstage.show();\n\t\t\n\t\t\n\t\tstage.setOnCloseRequest(new EventHandler<WindowEvent>() {\n\t\t\tpublic void handle(WindowEvent we) {\n\t\t\t\tPlatform.exit();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void start( Stage primaryStage ) throws Exception {\n primaryStage.setTitle(\"Battleship\");\n primaryStage.setScene(createScene());\n primaryStage.show();\n }", "public void openLoadSelection() {\n\t\ttry {\n\t\t\tFXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/LoadSelectionView.fxml\"));\n\t\t\tfxmlLoader.setResources(bundle);\n\t\t\tParent root1 = (Parent) fxmlLoader.load();\n\t\t\tStage stage = new Stage();\n\t\t\tLoadSelectionController lsc = fxmlLoader.getController();\n\t\t\tlsc.setMainController(this);\n\t\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\t\t\t// stage.initStyle(StageStyle.UNDECORATED);\n\t\t\tstage.setTitle(bundle.getString(\"lSTitle\"));\n\t\t\tstage.setScene(new Scene(root1));\n\t\t\tstage.show();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void backToStartScene(ActionEvent event) throws IOException {\r\n Parent startView = FXMLLoader.load(Main.class.getResource(\"fxml/StartScene.fxml\"));\r\n Scene startViewScene = new Scene(startView);\r\n\r\n // This line gets the Stage information (no Stage is passed in)\r\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\r\n\r\n window.setScene(startViewScene);\r\n window.show();\r\n }", "public void startButton(ActionEvent event) throws Exception {\r\n Stage stage = (Stage) closeButton.getScene().getWindow();\r\n //closes the media player\r\n mp.dispose();\r\n String fxFrame = \"gameScreen.fxml\";\r\n MakingGame newGame = new MakingGame();\r\n newGame.start(stage, fxFrame);\r\n }", "public void setWaitScene()\n {\n printOut(printerMaker.printTitle());\n printOut(cliToolsManager.sceneInitializer(width));\n printOut(printerMaker.waitingForPlayersScene());\n printOut(cliToolsManager.sceneEnder(width));\n }", "@Override\n public void chooseCards(ArrayList<God> gods) {\n System.out.println(\"Scelta della carta size: \" + gods.size());\n Platform.runLater(() -> {\n userName.setText(getName());\n overlayedStage.close();\n System.out.println(\"Scelta della carta\");\n Stage dialog = new Stage();\n dialog.setTitle(\"Scelta Carte Divinità\");\n dialog.getIcons().add(new Image(\"images/cm_boardgame.png\"));\n Parent root;\n FXMLLoader loader = null;\n CardChoice cc = null;\n try {\n switch (gods.size()) {\n case 1:\n loader = new FXMLLoader(Objects.requireNonNull(getClass().getClassLoader().getResource(\"chooseCard1pl.fxml\")));\n cc = new ChooseCard1pl(gods);\n cc.setStage(dialog);\n loader.setController(cc);\n break;\n case 2:\n loader = new FXMLLoader(Objects.requireNonNull(getClass().getClassLoader().getResource(\"chooseCard2pl.fxml\")));\n cc = new ChooseCard2pl(gods);\n cc.setStage(dialog);\n loader.setController(cc);\n break;\n case 3:\n loader = new FXMLLoader(Objects.requireNonNull(getClass().getClassLoader().getResource(\"chooseCard3pl.fxml\")));\n cc = new ChooseCard3pl(gods);\n cc.setStage(dialog);\n loader.setController(cc);\n break;\n default:\n return;\n }\n root = loader.load();\n Scene s = new Scene(root);\n dialog.setResizable(false);\n dialog.setScene(s);\n dialog.initOwner(thisStage);\n dialog.initModality(Modality.APPLICATION_MODAL);\n dialog.initStyle(StageStyle.UNDECORATED);\n //dialog.setOnCloseRequest(event -> returnNumber(numberPlayersController));\n dialog.showAndWait();\n handlerClient.setCard(cc.getChoosed());\n setGod(cc.getChoosed());\n } catch (IOException e) {\n e.printStackTrace();\n }\n God g = getGod();\n System.out.println(g.getDescription());\n buttonPl1.setTooltip(new Tooltip(\n g.getName() + \"\\n\" +\n g.getDescription()));\n Image i = new Image(\"images/GodCards/\" + g.getName() + \".png\", 172, 109, true, false);\n firstPl.setImage(i);\n });\n }", "@FXML\r\n public void onActionAddPartScreen(ActionEvent actionEvent) throws IOException {\r\n Parent root = FXMLLoader.load(getClass().getResource(\"/View_Controller/addPartInhouse.fxml\"));\r\n Stage stage = (Stage) ((Button) actionEvent.getSource()).getScene().getWindow();\r\n Scene scene = new Scene(root, 800, 470);\r\n stage.setTitle(\"Add In-house Part\");\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "@FXML\n private void callCourseSelectPage(ActionEvent e) {\n\n CourseSelectPage.selectForRecordMode= false;\n\n Pageloader loader = new Pageloader();\n Parent root = loader.getPage(\"GUIcourseSelectPage\");\n Stage stage = new Stage();\n stage.setTitle(\"Add record for student\");\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.setScene(new Scene(root));\n stage.showAndWait();\n }", "public void editorButtonClick() {\n timeline.pause();\n\n //Creates a new Stage and loader. Sets Modality to WINDOW_MODAL.\n editorStage = new Stage();\n editorStage.initModality(Modality.WINDOW_MODAL);\n editorStage.initOwner(canvasArea.getScene().getWindow());\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/Editor.fxml\"));\n\n //Produces a warning to the user if the board size is larger than what the editor window can draw\n if (board.getWidth() > 1200 || board.getHeight() > 1200) {\n PopUpAlerts.editorSizeAlert();\n }\n\n try {\n //Tries to load the fxml and sets editorController from that.\n Parent root = loader.load();\n editorController = loader.getController();\n\n //Finalizes any loaded patterns\n board.finalizeBoard();\n board.discardPattern();\n setFocusTraversable(true);\n\n //Re-sizes the board quadratically to fit within the editor.\n if (board.getHeight() > board.getWidth() && board instanceof DynamicBoard) {\n ((DynamicBoard) board).expandWidthRight(board.getHeight() - board.getWidth());\n } else if (board.getWidth() > board.getHeight() && board instanceof DynamicBoard) {\n ((DynamicBoard) board).expandHeightDown(board.getWidth() - board.getHeight());\n }\n\n //Assigns the current Board and GameOfLife to the editor\n editorController.setExportBoard(board);\n editorController.setGameOfLife(gOL);\n\n //Draws the initial boards on the canvases\n editorController.drawEditorBoard();\n editorController.drawStrip();\n\n editorStage.setTitle(\"GameOfLife\");\n editorStage.setScene(new Scene(root, 800, 600));\n editorStage.showAndWait();\n\n //Resets the offsets and redraws the board when the editor closes.\n canvasDrawer.resetOffset(board, canvasArea);\n draw();\n ruleLabel.setText(gOL.getRuleString().toUpperCase());\n\n } catch (IOException ioe){\n //Shows a warning should the loading of the FXML fail.\n PopUpAlerts.ioAlertFXML();\n }\n }", "@FXML\n void addNewCustomer(ActionEvent event) throws IOException {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/view/AddCustomer.fxml\"));\n loader.load();\n\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n Parent scene = loader.getRoot();\n stage.setScene(new Scene(scene));\n stage.show();\n }", "private void showSinglePartStage(TorrentFile file) throws IOException {\n /*\n https://stackoverflow.com/questions/17850191/why-am-i-getting-java-lang-illegalstateexception-not-on-fx-application-thread\n Avoid throwing IllegalStateException by running from a non-JavaFX thread.\n */\n AtomicReference<Stage> secondStage = new AtomicReference<>();\n Platform.runLater(\n () -> secondStage.set(new Stage())\n );\n\n // loads the fxml file for this window\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"../fxml/UI_stream_singlepart_page.fxml\"));\n Parent root = loader.load();\n\n // sets the default stream background\n root.setStyle(\"-fx-background-image: url('/images/stream_LightModeUI_background.png'); -fx-background-repeat: no-repeat; -fx-background-size: 1215 765\");\n UI_Controller_singlepart_page c = loader.getController();\n\n // initialises fxml controller with Torrent-file\n c.initData(file);\n\n c.setStage(secondStage.get());\n secondStage.get().setTitle(\"stream\");\n secondStage.get().getIcons().add(new Image(\"/images/streamAppIcon_blue.PNG\"));\n secondStage.get().setScene(new Scene(root, 800, 300));\n secondStage.get().setResizable(false);\n\n c.setParentStage(secondStage.get());\n\n /*\n https://stackoverflow.com/questions/43647368/how-can-i-get-make-my-program-wait-until-javafx-window-has-been-closed-before-co\n */\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.getButtonTypes().setAll(ButtonType.YES, ButtonType.NO);\n alert.setContentText(\"Would you like to enter another number?\");\n alert.setOnHidden(e -> {\n if (alert.getResult() == ButtonType.YES) {\n secondStage.get().show();\n }\n });\n secondStage.get().setOnHidden(e -> alert.show());\n\n secondStage.get().show();\n }", "@Override\n public void start(Stage primaryStage) throws Exception {\n\n stage = primaryStage;\n stage.setOnCloseRequest(e -> exitProgram());\n Parent root;\n\n// if (!ManagerAccount.isThereAChiefManager()) {\n// root = FXMLLoader.load(new File((RegisterManager.FXML_PATH)).toURI().toURL());\n//\n// FXMLLoader loginPageLoader = new FXMLLoader(new File(LoginSignUpPage.FXML_PATH).toURI().toURL());\n// loginPageLoader.load();\n// //LoginSignUpPage.mediaPlayer.play();\n//\n// stage.setTitle(RegisterManager.TITLE);\n// sceneTrace.add(RegisterManager.FXML_PATH);\n// } else {\n\n\n //this scope\n String response = DataRequestBuilder.buildProgramStartModeRequest();\n if (response.equals(\"1\")) {\n root = FXMLLoader.load(new File(RegisterManager.FXML_PATH).toURI().toURL());\n stage.setTitle(RegisterManager.TITLE);\n sceneTrace.add(RegisterManager.FXML_PATH);\n } else {\n root = FXMLLoader.load(new File(MainMenuController.FXML_PATH).toURI().toURL());\n stage.setTitle(MainMenuController.TITLE);\n sceneTrace.add(MainMenuController.FXML_PATH);\n }\n\n\n// root = FXMLLoader.load(new File(ChatPageController.FXML_PATH).toURI().toURL());\n// stage.setTitle(RegisterManager.TITLE);\n// sceneTrace.add(RegisterManager.FXML_PATH);\n\n //audioClip.play();\n // }\n\n titleTrace.add(stage.getTitle());\n\n Scene scene = new Scene(root);\n stage.setScene(scene);\n primaryStage.show();\n }", "@FXML\r\n public void cliente(ActionEvent e) throws IOException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/Clientes/FormClientes.fxml\"));\r\n Parent root1 = (Parent) fxmlLoader.load();\r\n Stage stage = new Stage();\r\n stage.setScene(new Scene(root1));\r\n stage.setTitle(\"MEVECOM <>\");\r\n stage.setResizable(false);\r\n stage.show();\r\n //Cerrar ventana actual\r\n Stage actual = (Stage) btnSalir.getScene().getWindow();\r\n actual.close();\r\n }", "@FXML\r\n void onActionSchedule(ActionEvent event) throws IOException {\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 }", "@Override\n public void dispose() {\n stage.dispose();\n }", "@Override\n public void dispose() {\n stage.dispose();\n }", "@FXML\r\n void visitationReport(ActionEvent event) {\r\n \tParent root ;\r\n try {\r\n \t root = FXMLLoader.load(getClass().getResource(ClientConstants.Screens.DEPARTMENT_VISITATION_REPORT.toString()));\r\n Stage stage = new Stage();\r\n stage.setTitle(\"department manager visitation report\");\r\n stage.setScene(new Scene(root,707, 893));\r\n stage.show();\r\n\t} catch(Exception e) {\r\n\t\te.printStackTrace();\r\n\t}\r\n }", "@Override\n public void setNumeroGiocatori() {\n Platform.runLater(() -> {\n overlayedStage.close();\n Stage dialog = new Stage();\n Parent root;\n try {\n FXMLLoader loader = new FXMLLoader(Objects.requireNonNull(getClass().getClassLoader().getResource(\"numberPlayers.fxml\")));\n NumberPlayers numberPlayersController = new NumberPlayers(dialog);\n loader.setController(numberPlayersController);\n root = loader.load();\n Scene s = new Scene(root);\n dialog.setTitle(\"Numero Giocatori\");\n dialog.getIcons().add(new Image(\"images/cm_boardgame.png\"));\n dialog.setResizable(false);\n dialog.setScene(s);\n dialog.initOwner(thisStage);\n dialog.initModality(Modality.APPLICATION_MODAL);\n dialog.initStyle(StageStyle.UNDECORATED);\n //dialog.setOnCloseRequest(event -> returnNumber(numberPlayersController));\n dialog.showAndWait();\n handlerClient.setPartecipanti(numberPlayersController.getPlayers());\n waitDialog(\"Attendi...\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n }", "@Override\n public void start(Stage primaryStage) throws Exception {\n Rectangle2D screenBounds = Screen.getPrimary().getBounds();\n SCREEN_WIDTH = screenBounds.getWidth();\n SCREEN_HEIGHT = screenBounds.getHeight();\n // Obtain the scales\n SCREEN_WIDTH_SCALE = SCREEN_WIDTH / DEFAULT_SCREEN_WIDTH;\n SCREEN_HEIGHT_SCALE = SCREEN_HEIGHT / DEFAULT_SCREEN_HEIGHT;\n COMBINED_SCALE = (SCREEN_WIDTH_SCALE + SCREEN_HEIGHT_SCALE) / 2;\n\n // Create the stage which has set stage style transparent\n final Stage stage = new Stage(StageStyle.TRANSPARENT);\n // Create the root node of scene\n Group rootGroup = new Group();\n\n // Create scene with the width, height and color\n Scene scene = new Scene(rootGroup, SCREEN_WIDTH, SCREEN_HEIGHT, Color.TRANSPARENT);\n scene.setCursor(Cursor.NONE);\n stage.setScene(scene);\n stage.centerOnScreen();\n stage.setFullScreen(true);\n stage.show();\n\n // Press F/f to toggle full screen\n // Press Q/q to terminate the application\n rootGroup.setOnKeyPressed(keyEvent -> {\n if (keyEvent.getCode() != null) {\n switch (keyEvent.getCode()) {\n case F:\n stage.setFullScreen(!stage.isFullScreen());\n break;\n case Q:\n Platform.exit();\n System.exit(0);\n default:\n break;\n }\n }\n });\n\n // Create the background with desired size\n Rectangle dragger = new Rectangle(SCREEN_WIDTH, SCREEN_HEIGHT);\n dragger.setFill(Color.BLACK);\n // Create the UI and everything\n Building building = new Building(\n BuildingConfig.newConfig(BuildingConfig.SCENARIO_RESIDENCE_I));\n\n // Add all nodes to main root group\n rootGroup.getChildren().addAll(dragger, building);\n rootGroup.requestFocus();\n }", "public void start(Stage stage) {\r\n // Setting our primaryStage variable to the stage given to us by init()\r\n primaryStage = stage;\r\n // Retrieving the primary scene (the first thing we want the user to see)\r\n Scene primaryScene = getPrimaryScene();\r\n // Setting the title of the stage, basically what the window says on the top left\r\n primaryStage.setTitle(\"SeinfeldMemeCycler\");\r\n // Setting the scene\r\n primaryStage.setScene(primaryScene);\r\n // Displaying the stage\r\n primaryStage.show();\r\n }", "public void nextStage() {\n\t\tcurrentStage.setActive(false);\n\t\tcurrentStageNumber++;\n\t\tchildren.add(currentStage = new Stage(this, StageLocations.mesta2, currentStageNumber));\n\t}", "public void showInputCategoryCreateDialog() {\r\n FXMLLoader loader = fxmlLoaderService.getLoader(getClass().getResource(FXML_INPUT_CATEGORY_CREATE_DIALOG));\r\n\r\n Parent page;\r\n\r\n try {\r\n page = loader.load();\r\n } catch (IOException ex) {\r\n logger.warn(\"Failed to load: \" + FXML_INPUT_CATEGORY_CREATE_DIALOG, ex);\r\n\r\n return;\r\n }\r\n\r\n // set the stage\r\n Stage stage = new Stage();\r\n stage.setTitle(\"Create Input Category\");\r\n stage.initModality(Modality.APPLICATION_MODAL);\r\n stage.centerOnScreen();\r\n stage.initOwner(mainStage);\r\n\r\n Scene scene = new Scene(page);\r\n scene.getStylesheets().add(getClass().getResource(STYLESHEET_DEFAULT).toExternalForm());\r\n\r\n stage.setScene(scene);\r\n\r\n // Set the item into the controller.\r\n InputCategoryCreateDialogController controller = loader.getController();\r\n controller.setStage(stage);\r\n\r\n stage.showAndWait();\r\n }", "public DraftKit_GUI(Stage initPrimaryStage) {\n primaryStage = initPrimaryStage;\n }", "public void createModalWindow(float cameraX, float cameraY) {\r\n\t\tcamera.position.x = cameraX;\r\n\t\tcamera.position.y = cameraY;\r\n\t\tcamera.update();\r\n\r\n//\t\tpauseMenuStage = new Stage(new ScreenViewport(camera));\r\n\t\tpauseMenu = new Table();\r\n\t\tpauseMenu.setBackground(blueRectangle);\r\n\t\tpauseMenu.setFillParent(true);\r\n\r\n\r\n//\t\tcreate sliders\r\n\t\tSlider.SliderStyle sliderStyle = new Slider.SliderStyle(blueSlider, blueKnob);\r\n\t\tsliderMusic = new Slider(0,1,0.01f,false,sliderStyle);\r\n\t\tsliderSound = new Slider(0,1,0.01f,false,sliderStyle);\r\n\t\tmusicIcon = new Image(blueMusicNote);\r\n\t\tsoundIcon = new Image(blueSound);\r\n\t\tsliderMusic.setValue(volume);\r\n\r\n\r\n\t\texitButton = new Button(blueExit);\r\n\t\tresumeButton = new Button(blueResume);\r\n\t\trestartButton = new Button(blueRestart);\r\n\t\tunderline = new Image(blueUnderline);\r\n\r\n\t\tpauseMenu.add(musicIcon).height(100).width(100);\r\n\t\tpauseMenu.add(sliderMusic).colspan(3).height(150).width(500).padRight(150);\r\n\t\tpauseMenu.row();\r\n\t\tpauseMenu.add(soundIcon).height(100).width(100);\r\n\t\tpauseMenu.add(sliderSound).colspan(3).height(100).width(500).padRight(150);\r\n\t\tsliderSound.setDisabled(true);\r\n\t\tpauseMenu.row();\r\n\t\tpauseMenu.add(exitButton).space(PAUSE_MENU_BUTTON_SPACE).size(150,70).padLeft(110).padTop(50);\r\n\t\tpauseMenu.add(restartButton).space(PAUSE_MENU_BUTTON_SPACE).size(200,70).padTop(50).padLeft(20);\r\n\t\tpauseMenu.add(resumeButton).space(PAUSE_MENU_BUTTON_SPACE).size(200,80).padRight(110).padTop(50);\r\n\t\tpauseMenu.row();\r\n\t\tpauseMenu.add(underline);\r\n\t\tunderline.setVisible(false);\r\n\r\n//\t\tadding listeners\r\n\t\texitButton.addListener(new ClickListener() {\r\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\r\n\t\t\t\texitClicked = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tresumeButton.addListener(new ClickListener() {\r\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\r\n\t\t\t\tresumeClicked = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trestartButton.addListener(new ClickListener() {\r\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\r\n\t\t\t\trestartClicked = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tsliderMusic.addListener(new ChangeListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\r\n\t\t\t\tif (movementController.isHoldingHands()){\r\n\t\t\t\t\tMusicController.getInstance().setVolume(volume, \"combinedTrack\");\r\n\t\t\t\t}\r\n\t\t\t\telse if (movementController.getAvatar()==somni){\r\n\t\t\t\t\tMusicController.getInstance().setVolume(volume, \"somniTrack\");\r\n\t\t\t\t}\r\n\t\t\t\telse if (movementController.getAvatar()==phobia){\r\n\t\t\t\t\tMusicController.getInstance().setVolume(volume, \"phobiaTrack\");\r\n\t\t\t\t}\r\n\t\t\t\tMusicController.getInstance().setVolume(volume);\r\n\t\t\t\tvolume = sliderMusic.getValue();\r\n\r\n\t\t\t\tGDXRoot.setPreferences(GDXRoot.getPreferences().putFloat(\"volume\", volume));\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n//\t\tpauseMenu.setPosition(camera.position.x- canvas.getWidth()/PAUSE_MENU_POSITION_SCALE , camera.position.y-canvas.getHeight()/PAUSE_MENU_POSITION_SCALE );\r\n\t\tpauseMenuStage.addActor(pauseMenu);\r\n\t\tpauseMenu.validate();\r\n\t\tpauseMenu.setTransform(true);\r\n\t\tpauseMenu.setScale(PAUSE_MENU_SCALE);\r\n\t\tunderline.setZIndex(0);\r\n\t\tunderline.setVisible(false);\r\n\r\n\t}", "public void createNewGame(Stage menuStage) {\n\t\t\n\t\tthis.menuStage = menuStage;\n\t\tthis.menuStage.hide();\n\t\tview = new GameView(inputs[1]);\n\t\ttry {\n\t\tview.show();\n\t\tgame = new Game(getNames(), inputs[0]);\n\t\tturned = false;\n\t\tview.initialisePlayerViews(nameList);\n\t\tcreateKeyListeners();\n\t\tcreateGameLoop();\n\t\t}catch (IndexOutOfBoundsException ex){\n\t\t\tthrow new GameException(\"User cancelled game\");\n\t\t}\n\t}", "@FXML \r\n public void cancelButtonAction() throws IOException{\r\n Parent loader = FXMLLoader.load(getClass().getResource(\"mainScreen.fxml\"));\r\n Scene scene = new Scene(loader);\r\n Stage window = (Stage) modPartCancel.getScene().getWindow();\r\n window.setScene(scene);\r\n window.show();\r\n }", "public void act_newPerson(ActionEvent actionEvent) {\n try {\n Parent root = FXMLLoader.load(getClass().getClassLoader().getResource(\"newPersonGUI.fxml\"));\n Stage stage = new Stage();\n stage.setTitle(\"New Person\");\n stage.setScene(new Scene(root, 400, 300));\n stage.setResizable(false);\n stage.show();\n stage.setOnHiding(new EventHandler<WindowEvent>() {\n @Override\n public void handle(WindowEvent event) {\n event.consume();\n fillCombobox();\n }\n });\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@FXML\r\n void cancellationReport(ActionEvent event) {\r\n\t\tParent root ;\r\n try {\r\n \t root = FXMLLoader.load(getClass().getResource(ClientConstants.Screens.DEPARTMENT_CANCELLATION_REPORT.toString()));\r\n Stage stage = new Stage();\r\n stage.setTitle(\"department manager cancellation report\");\r\n stage.setScene(new Scene(root,753, 579));\r\n stage.show();\r\n\t} catch(Exception e) {\r\n\t\te.printStackTrace();\r\n\t}\r\n }", "public void SubmitHandle(ActionEvent event) {\r\n\t\ttry {\r\n\t\t\tFileChooser fileChooser = new FileChooser();\r\n\t //Set extension filter\r\n\t FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter(\"DOCX files (*.docx)\", \"*.docx\");\r\n\t fileChooser.getExtensionFilters().add(extFilter);\r\n\t Stage primaryStage = new Stage();\r\n\t File file = fileChooser.showOpenDialog(primaryStage);\r\n\t conn.SendRequest(new String[] {file.getAbsolutePath(),exam.getExamID()}, 23);\r\n\t\t\t\r\n\t ((Node)event.getSource()).getScene().getWindow().hide(); //hiding primary window\r\n\t primaryStage = new Stage();\r\n\t \t\tAnchorPane root = (AnchorPane) FXMLLoader.load(StudentController.class.getResource(\"/GUI/studentPage.fxml\"));\r\n\r\n\t \t\tScene scene = new Scene(root);\r\n\t \t\tscene.getStylesheets().add(getClass().getResource(\"/GUI/allStyleSheet.css\").toExternalForm());\r\n\r\n\t \t\tprimaryStage.setScene(scene);\t\t\r\n\t \t\tprimaryStage.initStyle(StageStyle.UNDECORATED);\r\n\r\n\t \t\tprimaryStage.show();\r\n\t\t}catch(Exception e) {}\r\n\t}", "@Override\n public void start(Stage primaryStage) {\n try {\n stage = primaryStage;\n stage.setTitle(\"Indie Airways\");\n stage.setMinWidth(WINDOW_WIDTH);\n stage.setMinHeight(WINDOW_HEIGHT);\n gotoLogin();\n //gotoMenu();\n primaryStage.show(); \n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "@FXML\n void OnActionAddAppointment(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/AddAppointment.fxml\"));\n stage.setTitle(\"Add Appointment\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "@Override\n public void sconfitta(String winner) {\n Platform.runLater(() -> {\n /*Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Hai perso\");\n alert.setHeaderText(\"Ha vinto \" + winner + \"\\nFine della partita\");\n alert.showAndWait();*/\n Parent root = null;\n Stage dialog = new Stage();\n try {\n root = FXMLLoader.load(Objects.requireNonNull(getClass().getClassLoader().getResource(\"loser.fxml\")));\n Scene s = new Scene(root);\n dialog.setScene(s);\n dialog.setTitle(\"Sconfitta!\");\n dialog.getIcons().add(new Image(\"images/cm_boardgame.png\"));\n overlayedStage = dialog;\n overlayedStage.initOwner(thisStage);\n overlayedStage.initModality(Modality.APPLICATION_MODAL);\n overlayedStage.setResizable(false);\n overlayedStage.showAndWait();\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.exit(0);\n });\n try {\n handlerClient.getServer().close();\n } catch (IOException e) {\n System.out.println();\n }\n }", "@FXML\r\n void onActionDisplayMainScreen(ActionEvent event) throws IOException {\r\n\r\n //EXCEPTION SET 2 REQUIREMENT\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Confirmation Dialog\");\r\n alert.setHeaderText(\"Changes not Saved\");\r\n alert.setContentText(\"Would you like to continue?\");\r\n\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK){\r\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"MainScreen.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }\r\n }", "public void display() {\n Stage window = new Stage();\n\n window.initModality(Modality.APPLICATION_MODAL);\n window.setTitle(\"Error\");\n window.getIcons().add(new Image(\"userinterface/error.png\"));\n\n Label errorLabel = buildLabel();\n Button closeButton = buildButton(window);\n ImageView imageView = buildImageView();\n\n AnchorPane layout = new AnchorPane();\n layout.setPrefSize(400, 400);\n layout.getChildren().addAll(errorLabel, closeButton, imageView);\n\n Scene scene = new Scene(layout);\n\n window.setScene(scene);\n window.setResizable(false);\n window.show();\n }", "public void setStage(Stage currentStage)\n\t{\n\t\tthis.thisStage = currentStage;\n\t\tthisStage.setOnCloseRequest(new EventHandler<WindowEvent>() {\n\t\t\tpublic void handle(WindowEvent t) {\n\t\t\t\t//Platform.exit();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/sample.fxml\"));\n Parent root = loader.load();\n primaryStage.setTitle(\"Tower Defence\");\n s = new Scene(root, 600, 480);\n primaryStage.setScene(s);\n primaryStage.show();\n MyController appController = (MyController)loader.getController();\n appController.createArena(); \t\t\n\t}", "public void launchProcWindow() {\n\t\t\n\t\ttry {\n\t\t\tdbProcRoot = new ProcController(this);\n\t\t\tScene scene = new Scene(dbProcRoot.getRootView(), 640, 480);\n\t\t\tmainStage.setScene(scene);\n\t\t} catch(IOException e ) {\n\t\t\tsendConnectionError(e.toString(), true);\n\t\t}\n\t}" ]
[ "0.7337787", "0.71505797", "0.71049994", "0.692287", "0.67538226", "0.67490995", "0.65495634", "0.64626104", "0.6447771", "0.64301264", "0.6421696", "0.64050853", "0.6394241", "0.63874006", "0.6377061", "0.6376978", "0.63452905", "0.63397413", "0.63382167", "0.6269905", "0.62644124", "0.62627745", "0.6235559", "0.62258023", "0.62128294", "0.620586", "0.6178336", "0.6169237", "0.6167271", "0.6165882", "0.61657715", "0.61600554", "0.61558604", "0.61547333", "0.61237955", "0.61201596", "0.6113731", "0.6098174", "0.6097661", "0.6095861", "0.6095428", "0.6093129", "0.60928565", "0.6089444", "0.6081205", "0.6077433", "0.6068455", "0.6064559", "0.60582376", "0.60471433", "0.6044091", "0.6043599", "0.6025256", "0.6006808", "0.59895587", "0.5988122", "0.5983496", "0.59797585", "0.59739405", "0.5963657", "0.59491694", "0.5946149", "0.59442997", "0.59408844", "0.5940249", "0.59397715", "0.5939518", "0.5938313", "0.5937821", "0.5931715", "0.592451", "0.59224313", "0.5918567", "0.591738", "0.5914064", "0.590745", "0.5905411", "0.5896149", "0.5896149", "0.58860654", "0.58807117", "0.58795893", "0.5873158", "0.58728874", "0.58676696", "0.5863185", "0.5858827", "0.5858538", "0.5857243", "0.58387935", "0.58381426", "0.5827287", "0.5826792", "0.5819785", "0.5809195", "0.5806389", "0.58061796", "0.5803855", "0.5802773", "0.58017945" ]
0.6720351
6
Returns the main stage.
public static Stage getPrimaryStage() { return primaryStage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Stage getMainStage() {\n return mainStage;\n }", "String getStage();", "public static Stage getMainStage(){\r\n return mainStage;\r\n }", "public static Stage getPrimaryStage()\n {\n return Main.primaryStage;\n }", "@Override\n\tpublic java.lang.String getStage() {\n\t\treturn _scienceApp.getStage();\n\t}", "public int getCurrentStage() {\n return currentStage;\n }", "public static Stage getPrimaryStage() {\n return pStage;\n }", "public static Stage getPrimarystage() {\n return primarystage;\n }", "public String getCurrentStage() {\n return getProperty(Property.CURRENT_STAGE);\n }", "public Stage getStage() {\n return stage;\n }", "public Stage returnStage() {\n\t\t\treturn stage;\n\t\t}", "public Stage getStage() {\n return stage;\n }", "public Stage getStage() {\n return stage;\n }", "public Stage getStage() {\n return stage;\n }", "public Stage getPrimaryStage() {\n return primaryStage;\n }", "public Stage getPrimaryStage() {\n return primaryStage;\n }", "public Stage getPrimaryStage() {\n return primaryStage;\n }", "public Stage getPrimaryStage() {\n return primaryStage;\n }", "public Stage getPrimaryStage() {\n return primaryStage;\n }", "public Stage getPrimaryStage() {\n return primaryStage;\n }", "public Stage getPrimaryStage() {\n return primaryStage;\n }", "public Stage getPrimaryStage() {\r\n return primaryStage;\r\n }", "final Stage getLocalStage() {\n\t\t// retrnamos la etapa actual\n\t\treturn this.localStage;\n\t}", "public static Stage getPrimaryStage() {\n\n return _primaryStage;\n }", "public Stage getPrimaryStage() {\n\t\treturn primaryStage;\n\t}", "public Stage retrieveStage()\n {\n return gameStage;\n }", "String getStageName();", "public String getStageName() {\n return stageName;\n }", "public ProcessingStage getStage();", "@java.lang.Override\n public int getStageValue() {\n return stage_;\n }", "String getStageClass();", "public Stage getStage() {\n com.guidebee.game.engine.scene.Stage stage = internalGroup.getStage();\n if (stage != null) {\n return (Stage) stage.getUserObject();\n }\n\n return null;\n }", "@java.lang.Override\n public int getStageValue() {\n return stage_;\n }", "public Integer getStageNumber() {\n return stageNumber;\n }", "public TypeOffreDTO getStage(){\n\t\tstage = null;\n\t\tList<TypeOffreDTO> l = getNomenclatureDomainService().getTypesOffre();\n\t\tfor(TypeOffreDTO t : l){\n\t\t\tif(t.getCodeCtrl().equalsIgnoreCase(DonneesStatic.TYPE_OFFRE_CODE_CTRL_STAGE)){\n\t\t\t\tstage=t;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn stage;\n\t}", "public String getStageDescription() {\n return stageDescription;\n }", "public WorkspaceStage getWorkspaceStage() {\n return workspaceStage;\n }", "public BigDecimal getSTAGE() {\r\n return STAGE;\r\n }", "java.lang.String getExecutionStageName();", "public String returnStageOfLife(){\n\t\treturn (String) stageofLifeBox.getSelectedItem();//Return the stage of life options\n\t}", "java.lang.String getStageId();", "public Stage getWindow() {\n return primaryStage;\n }", "private void evaluateStage(){\n switch (currentStage){\n case EGG: if (getLifetime() >= ModelSettings.brood_lifetime_egg)\n currentStage = LARVAE;\n break;\n case LARVAE: if (getLifetime() >= ModelSettings.brood_lifetime_larvae)\n currentStage = PUPAE;\n break;\n case PUPAE: if (getLifetime() >= ModelSettings.brood_lifetime_pupae)\n System.out.println(\"This pupae is now an adult!\");\n //TODO trigger manager\n break;\n }\n }", "public StagePosition makeStagePosition();", "public void setStage(int stage) {\r\n\t\tthis.stage = stage;\r\n\t}", "@java.lang.Override\n public com.google.iam.admin.v1.Role.RoleLaunchStage getStage() {\n com.google.iam.admin.v1.Role.RoleLaunchStage result =\n com.google.iam.admin.v1.Role.RoleLaunchStage.forNumber(stage_);\n return result == null ? com.google.iam.admin.v1.Role.RoleLaunchStage.UNRECOGNIZED : result;\n }", "public boolean getStage()\n {\n return atQuestionStage;\n }", "@java.lang.Override\n public com.google.iam.admin.v1.Role.RoleLaunchStage getStage() {\n com.google.iam.admin.v1.Role.RoleLaunchStage result =\n com.google.iam.admin.v1.Role.RoleLaunchStage.forNumber(stage_);\n return result == null ? com.google.iam.admin.v1.Role.RoleLaunchStage.UNRECOGNIZED : result;\n }", "public String getMain() {\n\t\treturn main;\n\t}", "public abstract Stage getNextStage(int score);", "public static String stageName(Stage s){\n return s.name();\n }", "public void start(Stage mainStage) {\n\t\t\n\t}", "public void start(Stage mainStage) {\r\n\t\t\r\n\t}", "public Scene getMainMenuScene() {\n return scene;\n }", "@Override\r\n\tpublic void setStage(int stage) {\n\r\n\t}", "public static IStage getStage(String stageName)\n {\n return stageQueues_.get(stageName);\n }", "public Scene retrieveScene()\n {\n return gameStage.getScene();\n }", "@Override\n public final void start(final Stage primaryStage) {\n Scene scene = new Scene(getPane(), PANE_WIDTH, PANE_HEIGHT);\n primaryStage.setTitle(\"Tic-Tak-Toe\"); // Set the stage title.\n primaryStage.setScene(scene); // Place the scene in the stage.\n primaryStage.show(); // Display the stage.\n }", "@Override // Override the start method in the Application class\r\n /**\r\n * Start method for layout building\r\n */\r\n public void start(Stage primaryStage)\r\n {\n Scene scene = new Scene(pane, 370, 200);\r\n primaryStage.setTitle(\"Sales Conversion\"); // Set the stage title\r\n primaryStage.setScene(scene); // Place the scene in the stage\r\n primaryStage.show(); // Display the stage\r\n }", "public void start(Stage mainStage) throws IOException { \r\n\r\n\t}", "@Override\n public void start(Stage stage){\n // set the stage\n this.stage = stage;\n\n // set the scenes\n mainScene();\n inputScene();\n\n // set the stage attributes\n stage.setTitle(\"Maze solver\");\n stage.setWidth(VisualMaze.DISPLAY_WIDTH);\n stage.setHeight(VisualMaze.DISPLAY_HEIGHT + 200);\n stage.setScene(main);\n\n // display the app\n stage.show();\n }", "@Override\n public void start(Stage primaryStage) throws IOException {\n Main.primaryStage = primaryStage;\n Main.primaryStage.setTitle(\"American Travel Bucketlist\");\n\n //Call the extension of the FXMLLoader for the MainView.\n showMainView();\n }", "public AvailabilityStage availabilityStage() {\n return this.availabilityStage;\n }", "public void createMainStage(){\n mainStage = new Stage();\n BorderPane mainPageBp = new BorderPane();\n \n String headerTextMain = \"Main menu\";\n setBorderPaneTop(mainPageBp, headerTextMain, mainStage);\n setBorderPaneCenterMain(mainPageBp);\n setBorderPaneBottomMain(mainPageBp);\n \n Scene sceneMain = new Scene(mainPageBp,Constants.SCENEWIDTH, Constants.SCENEHEIGHT);\n sceneMain.getStylesheets().add(\"/styles/aitBank.css\");// add connection to stylesheet per scene\n mainStage.setTitle(bankName);\n mainStage.setScene(sceneMain);\n }", "void start(Stage primaryStage);", "@Override\n public void start(final Stage stage) {\n\tLabel label = new Label(\" The key to making programs fast\\n\" +\n\t\t\t\" is to make them do practically nothing.\\n\" +\n\t\t\t\" -- Mike Haertel\");\t\n\tCircle circle = new Circle(160, 120, 30);\n\tPolygon polygon = new Polygon(160, 120, 200, 220, 120, 220);\n\tGroup group = new Group(label, circle, polygon);\n Scene scene = new Scene(group,320,240);\n stage.setScene(scene);\n\tstage.setTitle(\"CS 400: The Key\");\n stage.show();\n }", "@Override\n\tpublic void setStage(java.lang.String stage) {\n\t\t_scienceApp.setStage(stage);\n\t}", "public void start(Stage stage) {\r\n // Setting our primaryStage variable to the stage given to us by init()\r\n primaryStage = stage;\r\n // Retrieving the primary scene (the first thing we want the user to see)\r\n Scene primaryScene = getPrimaryScene();\r\n // Setting the title of the stage, basically what the window says on the top left\r\n primaryStage.setTitle(\"SeinfeldMemeCycler\");\r\n // Setting the scene\r\n primaryStage.setScene(primaryScene);\r\n // Displaying the stage\r\n primaryStage.show();\r\n }", "int getDefenseStatStage();", "public Scene getCurrentScene()\r\n\t{\r\n\t\treturn _CurrentScene;\r\n\t}", "public T getMain() {\n\t\treturn this.main;\n\t}", "private void startStageOne() {\n\t\tCollections.addAll(this.starterDigits, 1, 28, 22, 48, 44, 60, 58, 64,\n\t\t\t\t52, 55, 34, 39, 8, 15);\n\t\tCollections.addAll(this.starterButtons, button00, button01, button07,\n\t\t\t\tbutton12, button16, button23, button25, button34, button52,\n\t\t\t\tbutton55, button61, button66, button70, button77);\n\t\tthis.initializeStarterButtons();\n\t}", "@Override\n public void start( Stage primaryStage ) throws Exception {\n primaryStage.setTitle(\"Battleship\");\n primaryStage.setScene(createScene());\n primaryStage.show();\n }", "public void setPrimaryStage(Stage s) {\n primaryStage = s;\n }", "@Override \n public void start(Stage stage) throws Exception {\n \tBeanContext.getStage(\"a\").show();\n }", "public void start (Stage primaryStage) throws Exception{\r\n\t\t\r\n\t\tfrogScenemanager scenemanager = new frogScenemanager(primaryStage);\r\n\t\tscenemanager.startMainMenu();\r\n\t}", "com.google.protobuf.ByteString getStageIdBytes();", "@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tStackPane pane = new StackPane();\n\t\tScene scene = new Scene(pane);\n\t\tfirstLevel();\n\t\tpane.getChildren().add(mRoot);\n\t\tstage.setScene(scene);\n\t\t\n\t\t\n\t}", "@Override\n public void start(Stage stage) throws IOException {\n try {\n FXMLLoader fxmlLoader = new FXMLLoader(MainScreen.class.getResource(\"MainScreen.fxml\"));\n\n\n Parent root = fxmlLoader.load();\n MainScreen mainScreen = fxmlLoader.getController();\n Scene scene = new Scene(root);\n\n stage.setTitle(\"Inventory Management System\");\n stage.setScene(scene);\n stage.show();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }", "public Collection<String> get_stages() {\r\n\t\t// Get all available stages\r\n\t\tFunctionalGroup g = controller.getSelectedFunctionalGroup();\r\n\t\tif (g != null) {\r\n\t\t\tCollection<String> stages = g.getStageNames();\r\n\t\t\tArrayList<String> stage_names = new ArrayList<String>();\r\n\t\t\tfor (String s : stages) {\r\n\t\t\t\tstage_names.add(s);\r\n\t\t\t}\r\n\t\t\t// Alphabetise them\r\n\t\t\tCollections.sort(stage_names);\r\n\t\t\treturn stage_names;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public int getNumberOfStages() {\r\n\t\treturn stages.length;\r\n\t}", "public void setStageName(String stageName) {\n this.stageName = stageName;\n }", "public ModelScene getStartPoint() {\r\n\t\treturn scenes.get(startPoint);\r\n\t}", "private void setPrimaryStage(Stage pStage) {\n GUI.pStage = pStage;\n }", "public void setStage(Stage stage) {\r\n this.stage = stage;\r\n }", "public void setStage(Stage stage) {\n this.stage = stage;\n }", "public void setStage(Stage stage) {\n this.stage = stage;\n }", "public void nextStage() {\n\t\tcurrentStage.setActive(false);\n\t\tcurrentStageNumber++;\n\t\tchildren.add(currentStage = new Stage(this, StageLocations.mesta2, currentStageNumber));\n\t}", "@Override\n\tpublic void buildStageByStyle(Stage stage, BaseController root) {\n\t\t\n\t}", "public void setStage(){\n if(id < 3)\n stage = 1;\n if(id >= 3 && id < 6)\n stage = 2;\n if(id >= 6 && id < 9)\n stage = 3;\n if(id >= 9)\n stage = 4;\n }", "@Override\r\n public void start(Stage primaryStage) {\n VFlow flow = FlowFactory.newFlow();\r\n\r\n // make it visible\r\n flow.setVisible(true);\r\n\r\n // create two nodes:\r\n // one leaf node and one subflow which is returned by createNodes\r\n createFlow(flow, 3, 6);\r\n\r\n // show the main stage/window\r\n showFlow(flow, primaryStage, \"VWorkflows Tutorial 05: View 1\");\r\n }", "Object getMaterializationStage(Object groupID) throws Exception;", "public void onShowMain(ActionEvent event) {\n try {\n Stage stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n Parent scene = FXMLLoader.load(getClass().getResource(\"/App/View/MainScreenView.fxml\"));\n stage.setTitle(\"Customer Schedule\");\n stage.setScene(new Scene(scene));\n stage.show();\n }\n catch (Exception e){\n System.out.println(e.getMessage());\n }\n }", "public void setStage(Stage stage) {\n\t\tthis.stage = stage;\n\t}", "public final EObject entryRuleGroupStage() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleGroupStage = null;\r\n\r\n\r\n try {\r\n // InternalEsportDsl.g:1462:51: (iv_ruleGroupStage= ruleGroupStage EOF )\r\n // InternalEsportDsl.g:1463:2: iv_ruleGroupStage= ruleGroupStage EOF\r\n {\r\n newCompositeNode(grammarAccess.getGroupStageRule()); \r\n pushFollow(FOLLOW_1);\r\n iv_ruleGroupStage=ruleGroupStage();\r\n\r\n state._fsp--;\r\n\r\n current =iv_ruleGroupStage; \r\n match(input,EOF,FOLLOW_2); \r\n\r\n }\r\n\r\n }\r\n\r\n catch (RecognitionException re) {\r\n recover(input,re);\r\n appendSkippedTokens();\r\n }\r\n finally {\r\n }\r\n return current;\r\n }", "@Override\n public void start(Stage primaryStage) {\n try {\n stage = primaryStage;\n stage.setTitle(\"Indie Airways\");\n stage.setMinWidth(WINDOW_WIDTH);\n stage.setMinHeight(WINDOW_HEIGHT);\n gotoLogin();\n //gotoMenu();\n primaryStage.show(); \n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tMain.stg = stage;\n\t\tParent root = FXMLLoader.load(getClass().getResource(\"/stylesheets/MainMenu.fxml\"));\n\t\tstage.setTitle(BowmanConstants.GAME_TITLE);\n\t\tstage.setScene(new Scene(root, BowmanConstants.MENU_WIDTH, BowmanConstants.MENU_HEIGHT));\n\t\tstage.show();\n\t\tinit_settings();\n\t}", "@Override\n public void start (Stage primaryStage) {\n Group root = new Group();\n Scene scene = new Scene(root, AppConstants.STAGE_WIDTH, AppConstants.STAGE_HEIGHT);\n ModulePopulator = new ModuleCreationHelper(root, scene, primaryStage);\n view = new View();\n scene.setFill(AppConstants.BACKGROUND_COLOR);\n // scene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n view.init(root, ModulePopulator);\n ModulePopulator.setView(view);\n ModulePopulator.createMainPageModules();\n view.initRunner(root, ModulePopulator);\n primaryStage.setTitle(\"SLogo!\");\n primaryStage.setScene(scene);\n primaryStage.show();\n\n System.out.println(\"App Has Started!\");\n }", "public void start(Stage selectionStage) {\n Button Stage1Btn = new Button();\n Stage1Btn.setText(\"Stage 1\");\n Stage1Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage1Btn.setPrefSize(150,150);\n Stage1Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage1 gs1= new GameStage1();\n Stage gameStage = new Stage();\n gs1.start(gameStage);\n }\n });\n \n //Create button link to Stage 2\n Button Stage2Btn = new Button();\n Stage2Btn.setText(\"Stage 2\");\n Stage2Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage2Btn.setPrefSize(150,150);\n Stage2Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage2 gs2= new GameStage2();\n Stage gameStage2 = new Stage();\n gs2.start(gameStage2);\n }\n });\n \n //Create button link to Stage 3\n Button Stage3Btn = new Button();\n Stage3Btn.setText(\"Stage 3\");\n Stage3Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage3Btn.setPrefSize(150,150);\n Stage3Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage3 gs3= new GameStage3();\n Stage gameStage3 = new Stage();\n gs3.start(gameStage3);\n }\n });\n \n //Create button link to Stage 4\n Button Stage4Btn = new Button();\n Stage4Btn.setText(\"Stage 4\");\n Stage4Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage4Btn.setPrefSize(150,150);\n Stage4Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage4 gs4= new GameStage4();\n Stage gameStage4 = new Stage();\n gs4.start(gameStage4);\n }\n });\n \n //Create button link to Stage 5\n Button Stage5Btn = new Button();\n Stage5Btn.setText(\"Stage 5\");\n Stage5Btn.setFont(Font.font(\"Lucida Console\",ITALIC ,25));\n Stage5Btn.setPrefSize(150,150);\n Stage5Btn.setOnAction(new EventHandler<ActionEvent>() {\n \n @Override\n public void handle(ActionEvent event) {\n selectionStage.close();\n GameStage5 gs5= new GameStage5();\n Stage gameStage5 = new Stage();\n gs5.start(gameStage5);\n }\n });\n //Create a HBox to insert multiple button and arrange them horizontally\n HBox mainBtn = new HBox();\n mainBtn.setPadding(new Insets(15, 12, 15, 12));\n mainBtn.setSpacing(10);\n mainBtn.setAlignment(Pos.CENTER);\n \n //Create Main Menu button\n Button MainMenuBtn = new Button();\n MainMenuBtn.setText(\"Main Menu\");\n MainMenuBtn.setFont(Font.font(\"Lucida Console\",ITALIC ,40));\n MainMenuBtn.setPrefSize(300,80);\n MainMenuBtn.setOnAction((ActionEvent ae) -> {\n\n //Create a confirmation dialog\n Alert MainMenuAlert = new Alert(Alert.AlertType.CONFIRMATION);\n MainMenuAlert.initStyle(StageStyle.UTILITY);\n MainMenuAlert.setTitle(\"Confirmation\");\n MainMenuAlert.setHeaderText(\"Do you want to back to Main Menu?\");\n MainMenuAlert.setContentText(\"Click OK to confirm\");\n\n Optional<ButtonType> result = MainMenuAlert.showAndWait();\n if (result.get() == ButtonType.OK){\n selectionStage.close();\n MainScreenStage mss = new MainScreenStage();\n mss.start(selectionStage);\n// if user chose OK this window will closed and Main Interface will opened\n } \n });\n\n //Create button to close program\n Button QuitBtn = new Button();\n QuitBtn.setText(\"Quit Game\");\n QuitBtn.setFont(Font.font(\"Lucida Console\",ITALIC ,40));\n QuitBtn.setPrefSize(300,80);\n QuitBtn.setOnAction((ActionEvent ae) -> {\n\n //Create a confirmation dialog\n Alert QuitAlert = new Alert(Alert.AlertType.CONFIRMATION);\n QuitAlert.initStyle(StageStyle.UTILITY);\n QuitAlert.setTitle(\"Confirmation\");\n QuitAlert.setHeaderText(\"Do you want to quit game?\");\n QuitAlert.setContentText(\"Click OK to confirm\");\n\n Optional<ButtonType> result = QuitAlert.showAndWait();\n if (result.get() == ButtonType.OK){\n Platform.exit();// ... user chose OK\n } else {\n // ... user chose CANCEL or closed the dialog\n }\n\n });\n //Create HBox to add button\n HBox selectionBtns = new HBox();\n selectionBtns.setSpacing(10);\n selectionBtns.setAlignment(Pos.CENTER);\n selectionBtns.getChildren().addAll(Stage1Btn, Stage2Btn, Stage3Btn, Stage4Btn, Stage5Btn);\n mainBtn.getChildren().addAll(MainMenuBtn,QuitBtn);\n \n BorderPane root = new BorderPane();\n root.setCenter(selectionBtns);\n root.setBottom(mainBtn);\n \n Scene scene = new Scene(root, 1200, 800);\n \n selectionStage.setTitle(\"Shapes\");\n selectionStage.setScene(scene);\n selectionStage.show();\n }" ]
[ "0.8080446", "0.7996165", "0.7922653", "0.7838635", "0.77958125", "0.77662057", "0.7757318", "0.7655074", "0.76437825", "0.7525303", "0.7523813", "0.75173116", "0.75173116", "0.75173116", "0.75050616", "0.75050616", "0.75050616", "0.75050616", "0.75050616", "0.75050616", "0.75050616", "0.7493669", "0.7472586", "0.74619114", "0.7350271", "0.72669524", "0.7054311", "0.7044343", "0.7041249", "0.6866859", "0.6854761", "0.68340176", "0.68085", "0.6781757", "0.6732465", "0.66709507", "0.64450574", "0.64054716", "0.63576216", "0.6341046", "0.63290465", "0.62808955", "0.6242877", "0.6174279", "0.6165807", "0.6134396", "0.6092401", "0.60840327", "0.6076138", "0.6037803", "0.6021016", "0.5916128", "0.5899935", "0.5888308", "0.587885", "0.58733624", "0.58667403", "0.58413464", "0.58253783", "0.58144546", "0.5808203", "0.5806519", "0.5801207", "0.5779861", "0.5765226", "0.57647353", "0.57619154", "0.5761604", "0.5751131", "0.5748891", "0.5725156", "0.5718034", "0.5710947", "0.56934005", "0.56801873", "0.5668007", "0.5642698", "0.56410146", "0.5640567", "0.5627295", "0.5626133", "0.56119245", "0.56084496", "0.55980337", "0.5596467", "0.5593302", "0.5593302", "0.5584947", "0.55839545", "0.5583919", "0.5577341", "0.5575869", "0.55657864", "0.555773", "0.5543063", "0.5534446", "0.5521919", "0.55194974", "0.55161214" ]
0.76144445
9
TODO Autogenerated method stub
@Override public long getTime() { return this.time; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public double getLat() { return this.lat; }
{ "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 double getLon() { return this.lon; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public double getAlt() { return this.alt; }
{ "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 double getSpeed() { return this.speed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1