query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
start Spring application context to get Spring beans
public static void main(String[] args) { try (AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class)) { StudentDao studentDao = ctx.getBean(StudentDao.class); Student student = new Student("Lea", "lea@mail"); studentDao.saveStudent(student); System.out.println(student + " saved"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void init() throws Exception {\r\n context = SpringApplication.run(getClass(), savedArgs);\r\n context.getAutowireCapableBeanFactory().autowireBean(this);\r\n }", "public void initContext() {\n\t\tClassLoader originalContextClassLoader =\n\t\t\t\tThread.currentThread().getContextClassLoader();\n\t\tThread.currentThread().setContextClassLoader(MY_CLASS_LOADER);\n\t\t//this.setClassLoader(MY_CLASS_LOADER);\n\n\t\tcontext = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\tsetParent(context);\n\n\n\t\t// reset the original CL, to try to prevent crashing with\n\t\t// other Java AI implementations\n\t\tThread.currentThread().setContextClassLoader(originalContextClassLoader);\n\t}", "private SpringApplicationContext() {}", "protected void initSpring() {\n\t\tgetComponentInstantiationListeners().add(new SpringComponentInjector(this));\n\t}", "public static void main(String[] args) {\n ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);\n }", "public void initApplicationContext()\r\n/* 32: */ throws BeansException\r\n/* 33: */ {\r\n/* 34:103 */ super.initApplicationContext();\r\n/* 35:104 */ registerHandlers(this.urlMap);\r\n/* 36: */ }", "public static void main(String[] args) {\n \n ApplicationContext context =\n new ClassPathXmlApplicationContext(\"spring-beans.xml\");\n \n \n Dependant dependant = context.getBean(\"dependant\", Dependant.class);\n \n }", "public static void main(String[] args) {\n ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);\n//\n// SpeakerService service = context.getBean(\"speakerService\", SpeakerService.class);\n//\n// System.out.println(service);\n//\n// System.out.println(service.findAll().get(0).getFirstName());\n//\n /*\n * In case of Singleton\n * This will not instantiate new object of SpeakerService because it is singleton\n * Same reference will be returned\n * */\n// SpeakerService service2 = context.getBean(\"speakerService\", SpeakerService.class);\n// System.out.println(service2);\n\n // XML Configuration\n// ApplicationContext context = new ClassPathXmlApplicationContext(\"ApplicationContext.xml\");\n// SpeakerService service2 = context.getBean(\"speakerService\", SpeakerService.class);\n// System.out.println(service2);\n }", "protected void init() { \n ServletContext servletContext = getServletContext();\n applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);\n\n String names[] = applicationContext.getBeanDefinitionNames();\n\n for (String name : names) {\n System.out.println(\"name:\" + name);\n }\n }", "private SpringApplicationContextProvider() {\r\n\t}", "public static void main(String[] args) {\n ConfigurableApplicationContext ctx = SpringApplication\n .run(ApplicationStart.class, args);\n }", "@Test\n\tpublic void testContextShouldInitalizeChildContexts() {\n\t\tassertThat(Foo.getInstanceCount()).isEqualTo(1);\n\t\tApplicationContext ctx = springClientFactory.getContext(\"testspec\");\n\n\t\tassertThat(Foo.getInstanceCount()).isEqualTo(1);\n\t\tFoo foo = ctx.getBean(\"foo\", Foo.class);\n\t\tassertThat(foo).isNotNull();\n\t}", "public static void main(String[] args) {\n\n ApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext_work.xml\");\n SqlSessionFactory c = context.getBean(\"C\", SqlSessionFactory.class);\n System.out.println(c);\n\n\n }", "public static void main(String[] args) {\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\tSystem.out.println(\"context loaded\");\n\t\t// Sim sim = (Sim) context.getBean(\"sim\");\n\t\t/**\n\t\t * Avoid above type casting\n\t\t */\n\t\tSim sim = context.getBean(\"sim\", Sim.class);\n\t\tsim.calling();\n\t\tsim.data();\n\t}", "public void configureContextInitializationComponents(AppConfiguration appConfig,\n\t SpringBeansXMLBuilder builder);", "public Object lookup()\r\n {\n if (applicationInstance != null)\r\n return applicationInstance;\r\n\r\n ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(flex.messaging.FlexContext.getServletConfig().getServletContext());\r\n if (appContext == null)\r\n {\r\n if (Log.isError())\r\n Log.getLogger(\"Configuration\").error(\r\n \"SpringFactory - not able to look up the WebApplicationContext for Spring. Check your web.xml to ensure Spring is installed properly in this web application.\");\r\n return null;\r\n }\r\n String beanName = getSource();\r\n\r\n try\r\n {\r\n Object inst;\r\n if (appContext.isSingleton(beanName))\r\n {\r\n if (Log.isDebug())\r\n Log.getLogger(\"Configuration\").debug(\r\n \"SpringFactory creating singleton component with spring id: \" + beanName + \" for destination: \" + getId());\r\n // We have a singleton instance but no one has initialized it yet.\r\n // We need to sync to prevent two threads from potentially initializing\r\n // the instance at the same time and to ensure we only return\r\n // initialized instances.\r\n synchronized (this)\r\n {\r\n // Someone else got to this before us\r\n if (applicationInstance != null)\r\n return applicationInstance;\r\n inst = appContext.getBean(beanName);\r\n if (inst instanceof FlexConfigurable)\r\n ((FlexConfigurable) inst).initialize(getId(), getProperties());\r\n applicationInstance = inst;\r\n }\r\n }\r\n else\r\n {\r\n if (Log.isDebug())\r\n Log.getLogger(\"Configuration\").debug(\r\n \"SpringFactory creating non-singleton component with spring id: \" + beanName + \" for destination: \" + getId());\r\n inst = appContext.getBean(beanName);\r\n if (inst instanceof FlexConfigurable)\r\n ((FlexConfigurable) inst).initialize(getId(), getProperties());\r\n }\r\n return inst;\r\n }\r\n catch (NoSuchBeanDefinitionException nexc)\r\n {\r\n ServiceException e = new ServiceException();\r\n String msg = \"Spring service named '\" + beanName + \"' does not exist.\";\r\n e.setMessage(msg);\r\n e.setRootCause(nexc);\r\n e.setDetails(msg);\r\n e.setCode(\"Server.Processing\");\r\n throw e;\r\n }\r\n catch (BeansException bexc)\r\n {\r\n ServiceException e = new ServiceException();\r\n String msg = \"Unable to create Spring service named '\" + beanName + \"' \";\r\n e.setMessage(msg);\r\n e.setRootCause(bexc);\r\n e.setDetails(msg);\r\n e.setCode(\"Server.Processing\");\r\n throw e;\r\n }\r\n }", "SpringLoader getSpringLoader();", "public static void main(String[] args) {\n\t\tApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);\r\n\t\t \r\n\t\tIMensaje mensaje = context.getBean(\"miBean\", Mensaje.class);\r\n\t\t\r\n\t\tmensaje.printHelloWorld(\"prueba Spring\");\r\n\t\t\r\n\t\t((AnnotationConfigApplicationContext) context).close();\r\n\t}", "public Context getApplicationContext();", "public static void main(String[] args) {\n ApplicationContext ctx=new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n HelloWord h=(HelloWord) ctx.getBean(\"helloWord\");\n h.sayHello();\n Car car=(Car) ctx.getBean(\"car\");\n System.out.println(car);\n Person person=(Person) ctx.getBean(\"person\");\n System.out.println(person);\n\t}", "private AnnotationConfigWebApplicationContext getGlobalApplicationContext() {\r\n\t\tAnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext();\r\n\t\t//rootContext.register(ApplicationConfig.class);\r\n\t\trootContext.register(new Class[] {ApplicationConfig.class});\r\n\t\treturn rootContext;\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tApplicationContext context = new AnnotationConfigApplicationContext(JavaConfig.class);\n\nStudent s1 = context.getBean(\"s1\", Student.class);\n\nSystem.out.println(s1);\n\n\n\t}", "@Override\n public void onStartup(ServletContext container) {\n AnnotationConfigWebApplicationContext rootContext =\n new AnnotationConfigWebApplicationContext();\n rootContext.register(ApplicationConfig.class);\n rootContext.setConfigLocation(\"example.spring\");\n\n // Manage the lifecycle of the root application context\n container.addListener(new ContextLoaderListener(rootContext));\n container.addListener(new RequestContextListener());\n\n // The following line is required to avoid having jersey-spring3 registering it's own Spring root context.\n container.setInitParameter(\"contextConfigLocation\", \"\");\n\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Sample Spring Application!!\");\n\t\t\n\t\t//EmployeeService employeeService = new EmployeeServiceImpl();\n ApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\t\t\n\t\t\n\t\tEmployeeService employeeService = applicationContext.getBean(\"employeeService\", EmployeeService.class);\n\t\tSystem.out.println(employeeService.getAllEmployee().get(0).getName());\n\t}", "public static void main(String[] args){\n\t\tAnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(MyConfig.class);\n\t\t//applicationContext.addApplicationListener(new MyApplicationStartListener());\n\t\tapplicationContext.setParent(new ClassPathXmlApplicationContext(\"WEB-INF/application-context.xml\"));\n\t\tapplicationContext.start();\n\t\t\n\t\tHelloWorld helloWorld = (HelloWorld) applicationContext.getBean(\"helloWorld\");\n\t\thelloWorld.sayHello();\n\t\t\n\t\t/*BookJdbcTemplate bookJdbcTemplate = new BookJdbcTemplate();\n\t\tJdbcTemplate jdbcTemplate = (JdbcTemplate) applicationContext.getBean(\"jdbcTemplate\");\n\t\tbookJdbcTemplate.setJdbcTemplate(jdbcTemplate);\n\t\tSystem.out.println(\"Total pages are: \" + bookJdbcTemplate.getTotalPages((long)11));\n\t\tlogger.debug(\"Total pages are: \" + bookJdbcTemplate.getTotalPages((long)11));*/\n\t}", "public static void main(String[] args) {\n ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(ANNOTATE_XML);\n\n // ask container for the Bean that is ready to use\n Car car = appContext.getBean(\"dmc12autowire\", Car.class);\n car.go();\n\n System.out.println(car.getClass().getName());\n\n appContext.close();\n }", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"spring-test.xml\");\n\t\tSystem.out.println(context.getBean(\"test\"));\n\t\tSystem.out.println(context.getBean(MyConfig.class));\n\t\t//context.close();\n\t}", "@Before\n public void setUp() {\n this.context = new AnnotationConfigApplicationContext(\"com.fxyh.spring.config\");\n// this.context = new ClassPathXmlApplicationContext(\"classpath*:applicationContext-bean.xml\");\n this.user = this.context.getBean(User.class);\n this.user2 = this.context.getBean(User.class);\n this.department = this.context.getBean(Department.class);\n this.userService = (UserService) this.context.getBean(\"userService\");\n }", "@Test\n public void testOrders(){\n ClassPathXmlApplicationContext context=\n new ClassPathXmlApplicationContext(\"bean4.xml\");\n Orders orders = context.getBean(\"orders\", Orders.class);\n System.out.println(\"第四步 得到bean实例\");\n System.out.println(orders);\n// orders.initMethod();\n context.close();\n }", "@Before\n public void init() throws IOException {\n ApplicationContext context = new ClassPathXmlApplicationContext(\"config/applicationContext.xml\");\n //this.test();\n bookMapper = context.getBean(BookMapper.class);\n }", "public static void main(String[] args) \r\n\t{\n\t\tString s = \"resources/spring.xml\";\r\nApplicationContext ac = new ClassPathXmlApplicationContext(s);\r\nCar c=(Car)ac.getBean(\"c\");\r\nc.printCarDetails();\r\n\t}", "public static void main(String[] args) {\n\n SpringApplication.run(Application.class, args);\n // AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();\n }", "@BeforeClass\n\tpublic static void init() {\n\t\tcontext = new AnnotationConfigApplicationContext();\n\t\tcontext.scan(\"com.shuler.shoppingbackend\");\n\t\tcontext.refresh();\n\t\tcategoryDAO = (CategoryDAO) context.getBean(\"categoryDAO\");\n\t}", "public static void main(String[] args) {\n\t\tApplicationContext container = new ClassPathXmlApplicationContext(\"context.xml\");\n\t\tSystem.out.println(\"container created\");\n\n\t\t//Animal dog = container.getBean(\"animal\", Animal.class);\n\t\t//System.out.println(dog);\n\n\t}", "@Override\n protected void configure() {\n bind(ApplicationContext.class).toInstance(ctxt);\n }", "public static void main(String[] args) {\n\t\tGenericXmlApplicationContext ctx = new GenericXmlApplicationContext(\"Echo.xml\");\r\n\t\t\r\n\t\tEchobean bean = ctx.getBean(\"aaa\", Echobean.class);\r\n\t\t \r\n\t\tOneService one = bean.getOne();\r\n\t\tTwoService two = bean.getTwo(); \r\n\t\t \r\n\t\tone.one();\r\n\t\ttwo.two();\r\n\t}", "public static ApplicationContext getInstance() {\r\n\t\tsynchronized (SpringApplicationContextProvider.class) {\r\n\t\tif (applicationContext == null) {\r\n\t\t\tapplicationContext = new ClassPathXmlApplicationContext(\r\n\t\t\t\t\tnew String[] { \"META-INF/app-context.xml\" });\r\n\t\t}\r\n\t\t}\r\n\t\treturn (ApplicationContext) applicationContext;\r\n\t}", "ApplicationContext getAppCtx();", "public static void main(String[] args) {\n ApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"META-INF/dependency-injection-context.xml\");\n\n // 依赖来源一:自定义的bean\n UserRepository userRepository = applicationContext.getBean(UserRepository.class);\n// System.out.println(userRepository.getUsers());\n // 依赖来源二:内建依赖依 赖注入的方式获取BeanFactory\n System.out.println(userRepository.getBeanFactory());\n // 依赖查找的方式获取BeanFactory(报错)\n// System.out.println(beanFactory.getBean(BeanFactory.class));\n // 结果说明依赖注入可以注入容器内建的依赖,且依赖注入和依赖查找两者Bean的来源不一致\n\n System.out.println(userRepository.getObjectFactory().getObject());\n System.out.println(userRepository.getObjectFactory().getObject() == applicationContext);\n\n // 依赖来源三:容器内建Bean(spring内部初始化的bean)\n Environment environment = applicationContext.getBean(Environment.class);\n System.out.println(environment);\n }", "@Component(modules = ApplicationModule.class)\npublic interface ApplicationComponent {\n\n Context getApplication();\n}", "public static void main( String[] args )\n {\n \tApplicationContext context=new FileSystemXmlApplicationContext(\"beans.xml\");\n \tTraveller traveller=(Traveller)context.getBean(\"traveller\"); //SPRING CONTAINER\n \tSystem.out.println(traveller.getTravelDetails());\n\n }", "public static void main(final String... args) {\n\t\tAbstractApplicationContext context =\n\t new ClassPathXmlApplicationContext(\"classpath:META-INF/spring//*-context.xml\");\n\t final ExampleService service = context.getBean(ExampleService.class);\n\t System.out.println(\"endpoint:\" + service.getEndPoint());\n\t logger.info(\"endpoint:\" + service.getEndPoint());\n\t}", "@Override\r\n\tpublic void setApplicationContext(ApplicationContext applicationContext)\r\n\t\t\tthrows BeansException {\n\t\tcontext = (WebApplicationContext) applicationContext;\r\n\t}", "@Override\n protected SpringApplicationBuilder configure(SpringApplicationBuilder application){\n return application.sources(StartUpApplication.class);\n }", "public ApplicationContext getApplicationContext() {\n return applicationContext;\n }", "@Override\n public void init() {\n String[] args = this.getParameters().getRaw().toArray(new String[0]);\n // We run Spring context initialization at the time of JavaFX initialization:\n springContext = SpringApplication.run(MainApp.class, args);\n }", "public ApplicationContext getApplicationContext()\n {\n return this.applicationContext;\n }", "public static void main( String[] args )\n {\n ApplicationContext bean = new ClassPathXmlApplicationContext(\"beans.xml\");\n Movie movie = (Movie) bean.getBean(\"movie1\");\n System.out.println(movie);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"spring aop\");\n\t\t\n\t\tApplicationContext ac = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\t\n\t\tAppService app = (AppService) ac.getBean(\"appService\");\n\t\t\n\t\tapp.playComedyShow();\n\t\tapp.playConcert();\n\t\tapp.runAmusementPark();\n\t}", "private static BeanFactory getBeanFactory() {\n\t\tBeanFactory factory = new ClassPathXmlApplicationContext(\"withauto/beans.xml\");\n\t\treturn factory;\n\t}", "public static void main(String[] args) {\r\nApplicationContext context=new ClassPathXmlApplicationContext(\"/beans.xml\");\t\t\r\n\tServlet s=(Servlet)context.getBean(\"servletRef\");\r\n\ts.serviceMethod();\r\n\t}", "@Override\n\tpublic void init() throws ServletException {\n\t\tsuper.init();\n\t\t\n\t\tApplicationContext applicationContext=new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\t\tmservice= (MemberService) applicationContext.getBean(\"memberservice\");\n\t\tbservice=(BookService) applicationContext.getBean(\"bookservice\");\n\t\toservice=(OrderService) applicationContext.getBean(\"orderservice\");\n\t\t\n\t}", "public static void main(String[] args) {\n ApplicationContext context = new ClassPathXmlApplicationContext(\"classpath:data.xml\");\n\n Employee emp1 = context.getBean(\"employee1\", Employee.class);\n\n System.out.println(\"Employee Details \" + emp1);\n\n }", "public static void main(String[] args) {\n\t\tApplicationContext context = SpringApplication.run(SpringbootIn10StepsApplication.class, args);\n\t\t//**SpringApplication.run(...)**\n\t\t//Used to run a Spring Context. Also, \"run\" returns an ApplicationContext.\n\n\n\t\tfor (String name : context.getBeanDefinitionNames()) {\n\t\t\tSystem.out.println(name);\n\t\t}\t// We can see from this that the auto-configuration wires in 120+ beans!!\n\t}", "@Override\r\n\tpublic void setApplicationContext(ApplicationContext applicationContext) throws BeansException {\n\t\t\r\n\t}", "public static void main(String[] args) {\n ApplicationContext context =new ClassPathXmlApplicationContext(\"spring.xml\");\n\t \n\t\tService ser= context.getBean(Service.class);\n\t\tSystem.out.println(ser.getAccountID());\n\t}", "public static ApplicationContext getApplicationContext() {\n return appContext;\n }", "public static void main(String[] args) {\r\n\tAnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(SwimConfig.class);\r\n\tCoach myCoach=context.getBean(\"swimCoach\",Coach.class);\r\n\tSystem.out.println(myCoach.getDailyFortune());\r\n\tSystem.out.println(myCoach.getDailyWorkOut());\r\n\tcontext.close();\r\n\r\n}", "public static void main(String[] args) {\n AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();\n ctx.register(ApplicationConfig.class);\n ctx.register(ApplicationContext.class);\n ctx.register(PersistenceContext.class);\n ctx.register(ProductionContext.class);\n ctx.register(SwaggerConfig.class);\n\n SpringApplication.run(Application.class);\n }", "private static CamelContext configureCamelContext(ApplicationContext context) throws Exception {\n //normal way of getting camel context but i have it defined in camelSpringApplicationContext.xml\n // CamelContext camel = new DefaultCamelContext();\n // CamelContext camel = new SpringCamelContext(context);\n CamelContext camel = (CamelContext) context.getBean(\"myCamelContext\");\n // shows up in jmx with this context name instead of camel-1\n camel.setNameStrategy(new DefaultCamelContextNameStrategy(\"steves_camel_driver\"));\n // camel.setTracing(true); // set in camelSpringApplicationContext.xml\n camel.addStartupListener(new StartupListener() {\n @Override\n public void onCamelContextStarted(CamelContext context, boolean alreadyStarted) throws Exception {\n LOG.info(\"Seeing when startup strategy is called. CamelContext=\" + context);\n }\n });\n\n return camel;\n }", "public static void main(String[] args) {\n ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext(\"config.xml\");\n // ctx.start();\n Database d =ctx.getBean(\"mysql\",Database.class);\n System.out.println(\"name --->\" + d.getName() + \" port-->\" + d.getPort());\n d.connect();\n // d.getInteger();\n // d.throwException();\n // d.checkdata(\"richa\");\n // d.getIntdata(200);\n // Dummy dummy = ctx.getBean(\"dummy\", Dummy.class);\n // dummy.display();\n // ctx.stop();\n /* Dummytest dummytest=ctx.getBean(\"dummyTest\",Dummytest.class);\nSystem.out.print(dummytest);\n PersonalisedService personalisedService=ctx.getBean(\"personalisedService\",PersonalisedService.class);\n System.out.println(personalisedService);\n System.out.println(personalisedService.employee.getCity());\n*/\n\n }", "public static void main(String[] args) {\n\n System.out.println(\"开始初始化容器\");\n ApplicationContext ac = new ClassPathXmlApplicationContext(\"classpath:dispatcher-servlet.xml\");\n\n System.out.println(\"xml加载完毕\");\n Person person1 = (Person) ac.getBean(\"person1\");\n System.out.println(person1);\n System.out.println(\"关闭容器\");\n ((ClassPathXmlApplicationContext)ac).close();\n\n }", "public static void main(String[] args) {\nApplicationContext context=new ClassPathXmlApplicationContext(\"spring.xml\");\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\tCoach coach2=(Coach)context.getBean(\"myCCoach\");\r\n\r\n\t\r\n\tSystem.out.println(coach2);\r\n\t((ClassPathXmlApplicationContext)context).close();\r\n\t\r\n\t\r\n\tSystem.out.println(coach2.getDailyFortune());\r\n\t\r\n\t}", "protected Spring() {}", "public void setApplicationContext(ApplicationContext context) throws BeansException {\n appContext = context;\n }", "public static void main(String[] args) {\n BeanFactory beanFactory = new ClassPathXmlApplicationContext(\"/com/bridgelabz/Spring/bean.xml\"); \n /* beans are loaded as soon as bean factory instance is created but \n * the beans are created only when getBean() method is called.\n * getBean: Return an instance, which may be shared*/\n GreetingMessage obj = (GreetingMessage) beanFactory.getBean(\"greetingMessage\"); \n String message = obj.getMessage();\n System.out.println(message);\n }", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext contexto= new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\t \r\n\t\tdirectorEmpleado Juan=contexto.getBean(\"miEmpleado\",directorEmpleado.class);\r\n\t\tSystem.out.println(Juan.getTareas());\r\n\t\tSystem.out.println(Juan.getInforme());\r\n\t\tSystem.out.println(Juan.getEmail());\r\n\t\tSystem.out.println(Juan.getNombreEmpresa());\r\n\t\t\r\n\t\t/*secretarioEmpleado Maria=contexto.getBean(\"miSecretarioEmpleado\",secretarioEmpleado.class);\r\n\t\tSystem.out.println(Maria.getTareas());\r\n\t\tSystem.out.println(Maria.getInforme());\r\n\t\tSystem.out.println(\"Email= \"+Maria.getEmail());\r\n\t\tSystem.out.println(\"Nombre Empresa= \"+Maria.getNombreEmpresa());*/\r\n\t\t\r\n\t\tcontexto.close();\r\n\t}", "public static void main(String[] args) {\n\t\tApplicationContext ac = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\t//System.out.println(ac.getBean(\"user\"));\r\n\t\t//User user = ac.getBean(User.class);\r\n\t\tString[] beanNames = ac.getBeanNamesForType(User.class);\r\n\t\t//System.out.println(user);\r\n\t\tfor (String string : beanNames) {\r\n\t\t\tSystem.out.println(string);\r\n\t\t\t\r\n\t\t}\r\n\t\tUser user = (User) ac.getBean(\"hkk.spring.javaBeans.User#0\");\r\n\t\tUser user2 = (User) ac.getBean(\"user\");\r\n\t\tUser user3 = (User) ac.getBean(\"user\");\r\n\t\tSystem.out.println(user3==user2);\r\n\t}", "public static void main(String[] args){\n ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n /*\n Check to see if the file exists\n File file = new File(\"src/main/java/applicationContext.xml\");\n System.out.println(file.exists());\n \n */\n \n //retrieve bean from spring container\n Coach theCoach = context.getBean(\"myCoach\", Coach.class);\n //call methods on the bean\n System.out.println(theCoach.getDailyWorkout());\n //close the context\n \n context.close();\n \n /*Note: PUT THE FILE IN THE RESOURCES FOLDER, OR ELSE YOU'LL GET A FILE NOT FOUND ERROR*/\n }", "@Override\n\tpublic void setApplicationContext(ApplicationContext applicationContext) throws BeansException {\n\t\t\n\t}", "public static void main(String[] args) {\n ApplicationContext ctx = new ClassPathXmlApplicationContext(\"beans-cp.xml\");\n \n SpringJdbc springJdbc=ctx.getBean(SpringJdbc.class);\n springJdbc.actionMethod();\n \n //Lectura de Bean \n //OrganizationDao organizationDao = (OrganizationDao) ctx.getBean(\"organizationDao\");\n \n ((ClassPathXmlApplicationContext) ctx).close();\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tApplicationContext factory = new AnnotationConfigApplicationContext(AppConfig.class);\n\t\tSamsung s8 = factory.getBean(Samsung.class);\n\t\ts8.config();\n\n\t}", "public static void main(String[] args) {\n\t\tApplicationContext context = new AnnotationConfigApplicationContext(Config.class);\n\t\t\n\t\tStudentService studentService = (StudentService) context.getBean(\"concreteStudentService\");\n\t\tstudentService.viewStudent();\n\t\t\n\t\tstudentService = (StudentService) context.getBean(\"concreteStudentService\");\n\t\tstudentService.viewStudent();\n\t\t\n\t\tstudentService = (StudentService) context.getBean(\"consoleStudentService\");\n\t\tstudentService.viewStudent();\n\t\t\n\n\t\t((ConfigurableApplicationContext)context).close();\n\t}", "public static void main(String[] args) {\n ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"beans.xml\");\n Person person = context.getBean(\"person\", Person.class);\n System.out.println(person.getName());\n System.out.println(person.getMessage());\n System.out.println(\"Shutting down...\");\n context.close();\n }", "public static void main(String[] args) {\n\n ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{\"applicationContext.xml\",\"application.xml\"});\n\n Student student = (Student) context.getBean(\"student\");\n\n\n// ClassPathResource resource = new ClassPathResource(\"applicationContext.xml\");\n// XmlBeanFactory beanFactory = new XmlBeanFactory(resource);\n// Student student = (Student) beanFactory.getBean(\"student\");\n//\n// //资源\n// ClassPathResource resource = new ClassPathResource(\"applicationContext.xml\");\n// //容器\n// DefaultListableBeanFactory factory = new DefaultListableBeanFactory();\n// //BeanDefinition读取器,通过回调配置给容器\n// XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(factory);\n// //读取配置\n// reader.loadBeanDefinitions(resource);\n\n// Student student = (Student) factory.getBean(\"student\");\n// System.out.println(student);\n }", "public static void main(String args[]) {\r\n\t\tApplicationContext appContext=new ClassPathXmlApplicationContext(\"beans.xml\");\r\n\t\tEmployeeBean emp1=(EmployeeBean) appContext.getBean(\"Employee\");\r\n\t\tSystem.out.println(emp1.getName());\r\n\t}", "public static void main(String[] args) {\n\t\tAnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConfigClass.class);\n\t\t//Bean1 b1 = (Bean1) context.getBean(\"Bean1\");\n\t\tBean2 b2 = context.getBean(Bean2.class);\n\t\tb2.getProp1();\n\t\t\n\t}", "public static ApplicationContext getApplicationContext() {\r\n\t\treturn applicationContext;\r\n\t}", "public static void main(String[] args) {\n\t\tApplicationContext context =\n\t\t\t new ClassPathXmlApplicationContext(new String[] {\"services.xml\"});\n\t\t\tHelloBean xmlBean = (HelloBean)context.getBean(\"xmlHelloID\");\n\t\t\tSystem.out.println(xmlBean.getMsg() + \" called \" + xmlBean.getCount() + \" times.\");\n\t\t\t\n\t\t//\tAnnotation example\n\t\t\tApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class);\n\t\t\t HelloBean annotationBean = ctx.getBean(HelloBean.class);\n\t\t\t System.out.println(annotationBean.getMsg() + \" called \" + annotationBean.getCount() + \" times.\");\n\t}", "public static void main(String[] args) {\n ApplicationContext context =\n new ClassPathXmlApplicationContext(\"beans.xml\");\n\n BeanFactory factory = context;\n Main main = (Main) factory.getBean(\"calcbean\");\n\n main.execute();\n }", "public static void main(String[] args) {\n\n SpringApplication app = new SpringApplication(Main.class);\n app.run(args);\n// SpringApplication.run(Main.class);\n }", "@Test\n @DisplayName(\"Spring Container and songleton\")\n void springContainer(){\n\n ApplicationContext ac = new AnnotationConfigApplicationContext(AppConfig.class);\n\n //1. access: create object when gets called\n MemberService memberService1 = ac.getBean(\"memberService\", MemberService.class);\n\n //2 access: create object whenever gets called\n MemberService memberService2 = ac.getBean(\"memberService\", MemberService.class);\n\n //check the references\n System.out.println(\"memberService1 = \" + memberService1);\n System.out.println(\"memberService2 = \" + memberService2);\n\n //memberService1 !== memberService2\n Assertions.assertThat(memberService1).isSameAs(memberService2);\n\n //as you could see all the objects are created everytime we request for it when calling allConfig.memberService()\n }", "public static void main(String[] args) {\n\t\tConfigurableApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\t\t\n\t\tConnector connector = applicationContext.getBean(\"connector\",Connector.class);\n\t\tconnector.connectToDB();\n\t\tconnector.getDatabaseInfo();\n\t\tapplicationContext.close();\n\t}", "public static void main(String[] args) {\n\t \tApplicationContext context = new ClassPathXmlApplicationContext(\"withAutowireT.xml\"); \r\n\t \r\n\t \t//we get human object\r\n\t HumanT human=(HumanT)context.getBean(\"human\"); \r\n\t human.startPumping(); \r\n\t }", "public static void main(String args[]) {\n\r\n\t\r\n\tApplicationContext ac = new ClassPathXmlApplicationContext(\"com/springcore/annotations/anootationconfig.xml\");\r\n\t \r\n Employee emp = ac.getBean(\"myemployee\", Employee.class);\r\n System.out.println(emp.toString());\r\n\t}", "public void startIt() {\r\n\r\n\t\tfinal Weld weld = new Weld();\r\n\t\ttry (WeldContainer container = weld.initialize()) {\r\n\t\t\tfinal WeldInstance<ResearchCDIBean> instance = container.select(ResearchCDIBean.class);\r\n\t\t\tfinal ResearchCDIBean researchCDIBean = instance.get();\r\n\t\t\t/*\r\n\t\t\t * run in container\r\n\t\t\t */\r\n\t\t\tresearchCDIBean.process();\r\n\t\t}\r\n\t}", "public static Context getApplicationContext() { return mApplicationContext; }", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext(\"contextApplicationXML.xml\");\n\n\t\t//retrieve bean from spring container\n\t\tCoach coach=context.getBean(\"myCoach\", Coach.class);\n\t\tSystem.out.println(coach.getWorkout());\n\t\t\n\t\t//close the context \n\t\tcontext.close();\n\t}", "public static void main(String[] args) throws Exception {\n\t\tConfigurableApplicationContext c = SpringApplication.run(WebParserRestApplication.class, args); \n\t}", "public static void main(String args[]){\n ApplicationContext context=new ClassPathXmlApplicationContext(\"bean.xml\");\n Movie movie=context.getBean(\"movie\", Movie.class);\n movie.movieDisplay();\n\n BeanFactory beanfactory=new XmlBeanFactory(new ClassPathResource(\"bean.xml\"));\n //getBean() returns instance\n Movie movie1=beanfactory.getBean(\"movie\", Movie.class);\n movie1.movieDisplay();\n\n DefaultListableBeanFactory defaultListableBeanFactory=new DefaultListableBeanFactory();\n BeanDefinitionRegistry beanDefinitionRegistry=new GenericApplicationContext(defaultListableBeanFactory);\n BeanDefinitionReader beanDefintionReader=new XmlBeanDefinitionReader(beanDefinitionRegistry);\n beanDefintionReader.loadBeanDefinitions(\"bean.xml\");\n Movie movie2=defaultListableBeanFactory.getBean(\"movie\",Movie.class);\n movie2.movieDisplay();\n }", "public static void main(String[] args) {\n\t\tResource resource = new ClassPathResource(\"config/p51.xml\");\n\t\tBeanFactory factory = new XmlBeanFactory(resource);\n\t\t\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"config/p51.xml\");\n\t\t//context.getBean()....\n\t\t\n\t\t\n\t\tGreetingService greetingService =(GreetingService)factory.getBean(\"greeting\");\n\t\tSystem.out.println(greetingService.sayHello(\"아무거나 \"));\n\t\tGreetingService greetingService2 =(GreetingService)factory.getBean(\"greeting2\");\n\t\tSystem.out.println(greetingService2.sayHello(\"아무거나 \"));\n\n\t}", "public void setApplicationContext(ApplicationContext applicationContext)\n/* */ throws BeansException\n/* */ {\n/* 106 */ applicationContext = applicationContext;\n/* */ }", "public static void main(String args[])\n {\n ClassPathXmlApplicationContext context = new\n ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\n // retrieve bean from spring container\n Coach theCoach = context.getBean(\"myCoach\",Coach.class);\n\n// call methods on the bean\n System.out.println(theCoach.getDailyWorkout());\n\n// lest call our new method for fortunes\n System.out.println(theCoach.getDailyFortune());\n\n// close the context\n context.close();\n\n\n }", "public void setApplicationContext(ApplicationContext context) throws BeansException {\r\n CONTEXT = context;\r\n }", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"com/example/lifecycle/appCxt.xml\");\n\t\t\n\t\t\tHelloWorld world = (HelloWorld) context.getBean(\"hello\");\n\t\t\tworld.sayHello();\n\t\t\t\n\t\t\tAccountService accountService = context.getBean(\"accountService\",AccountService.class);\n\t\t\taccountService.openAccount();\n\t\t\taccountService.deposit();\n\t\t\t\n\t\t\tLibraryService libraryService = context.getBean(\"libraryService\",LibraryService.class);\n\t\t\tlibraryService.listBooks();\n\t\t\tlibraryService.issueBook();\n\t\t\t\n\t\t//IOC Container is stopped\n\t\tcontext.destroy();\n\t\tcontext.close();\n\t\t\n\t\t\n\t}", "@BeforeClass\n\tpublic static void prepare() {\n\t\t final ApplicationContext ctx = new\n\t\t ClassPathXmlApplicationContext(\"file:src/main/webapp/WEB-INF/employee-servlet.xml\");\n\t\temployeeDAO = ctx.getBean(\"employeeDAO\", EmployeeDAO.class);\n\t}", "@Override\n\tpublic void setApplicationContext(ApplicationContext applicationContext) throws BeansException {\n\t\tcontext=applicationContext;\n\t}", "@Override\n protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {\n return application.sources(DemowebosApplication.class);\n }", "public static void main(String[] args) {\n ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContextPart2.xml\");\n // get bean from the application context\n Coach theCoach = context.getBean(\"myCoach\", Coach.class);\n // call the method from the beans\n System.out.println(theCoach.getDailyWorkout());\n System.out.println(theCoach.getFortune());\n\n // close the application context\n context.close();\n\n }", "public static void main(String[] args) {\n\tApplicationContext ctx = SpringApplication.run(AppOne.class, args);\t\n\tSystem.out.println(\"Requesting A bean from the container...\");\n\tA a1 = (A) ctx.getBean(\"a\");\n\tSystem.out.println(\"printing first a object...\");\n\tSystem.out.println(a1);\n\tSystem.out.println(\"Requesting another A bean from the container...\");\n\tA a2 = (A) ctx.getBean(\"a\");\n\tSystem.out.println(\"printing second a object...\");\n\tSystem.out.println(a2);\n\t}", "public static void main(String[] args) {\n ApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"bean.xml\");\n SingletonComponent singletonComponent = applicationContext.getBean(SingletonComponent.class);\n singletonComponent.setComponentProperty(\"Hello\");\n System.out.println(singletonComponent.getComponentProperty());\n\n SingletonComponent singletonComponent2 = applicationContext.getBean(SingletonComponent.class);\n System.out.println(singletonComponent2.getComponentProperty());\n\n\n PrototypeComponent prototypeComponent = applicationContext.getBean(PrototypeComponent.class);\n prototypeComponent.setComponentProperty(\"Hello\");\n System.out.println(prototypeComponent.getComponentProperty());\n\n PrototypeComponent prototypeComponent2 = applicationContext.getBean(PrototypeComponent.class);\n prototypeComponent2.setComponentProperty(\"Hello2\");\n System.out.println(prototypeComponent2.getComponentProperty());\n\n\n ComplexComponent bean = applicationContext.getBean(ComplexComponent.class);\n System.out.println(applicationContext.getBean(AutowiredComponent.class));\n bean.printAutoWiredComponent();\n\n\n System.out.println(applicationContext.getBean(AutowiredPrototypeComponent.class));\n bean.printAutoWiredPrototypeComponent();\n\n\n }" ]
[ "0.6934633", "0.6625967", "0.6573517", "0.64313036", "0.6376689", "0.6334133", "0.6318622", "0.63101757", "0.630705", "0.62916327", "0.62374884", "0.6154356", "0.61519665", "0.613117", "0.612155", "0.61003155", "0.60717994", "0.6060621", "0.6059178", "0.6020233", "0.6016349", "0.599306", "0.5981424", "0.5980978", "0.5974723", "0.5970367", "0.5969292", "0.5959941", "0.595878", "0.5936851", "0.5936274", "0.59266603", "0.59239835", "0.5872844", "0.58613145", "0.5828915", "0.5820235", "0.5805446", "0.5805222", "0.57984143", "0.57896733", "0.5787916", "0.5785769", "0.5782122", "0.57793546", "0.5778909", "0.5771112", "0.57545555", "0.57444227", "0.5739343", "0.57300144", "0.57067686", "0.56932086", "0.56857103", "0.56840503", "0.56806844", "0.56778544", "0.5672113", "0.56637233", "0.56620294", "0.5657017", "0.5654412", "0.5654331", "0.5653891", "0.5646078", "0.56421345", "0.5635543", "0.56327015", "0.56300014", "0.56247526", "0.56222147", "0.5619142", "0.55948246", "0.5579351", "0.5576458", "0.5573045", "0.55706084", "0.55637217", "0.5553922", "0.5552876", "0.55505013", "0.5549989", "0.5547455", "0.5532187", "0.5530253", "0.55297464", "0.55242974", "0.5522364", "0.5521136", "0.5515243", "0.5510508", "0.5507791", "0.5505465", "0.55029595", "0.54983544", "0.54929113", "0.54923856", "0.5483592", "0.5480956", "0.5477758", "0.54775167" ]
0.0
-1
Created by pk on 6/25/2015.
public interface PrimaryBankService { @GET("/user/bank") void getPrimaryBankDetail(Callback<List<BankDetail>> callback); @POST("/user/bank") void createPrimaryBankDetail(@Body List<BankDetail> bankDetail, Callback<List<BankDetail>> callback); @POST("/user/netBankingperfios") void uploadPerfiosTransactionStatus(@Body PerfiosService.TransactionStatusResponse perfiosTransactionResponse, Callback<PerfiosTransactionResponse> callback); @POST("/user/netBankingperfios") PerfiosTransactionResponse uploadPerfiosTransactionStatus(@Body PerfiosService.TransactionStatusResponse perfiosTransactionResponse); //@PUT("/user/bank") //void updatePrimaryBankDetail(@Body BankDetail bankDetail, Callback<BankDetail> callback); public static class PerfiosTransactionResponse{ private String message; public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } } public static class BankDetail{ @SerializedName(value = "name") private String bankName; @SerializedName(value = "account_no") private String accountNumber; private boolean isPrimary = false; private boolean userStatementPresent = false; public boolean isUserStatementPresent() { return userStatementPresent; } public void setUserStatementPresent(boolean userStatementPresent) { this.userStatementPresent = userStatementPresent; } public String getBankName() { return bankName; } public void setBankName(String bankName) { this.bankName = bankName; } public String getAccountNumber() { return accountNumber; } public String getAccountNumberLast4Digits() { if(accountNumber!= null && accountNumber.length()>4) { return accountNumber.substring(accountNumber.length()-4); } return accountNumber; } public void setAccountNumber(String accountNumber) { this.accountNumber = accountNumber; } public boolean isPrimary() { return isPrimary; } public void setIsPrimary(boolean isPrimary) { this.isPrimary = isPrimary; } @Override public boolean equals(Object obj) { if(obj != null && obj instanceof BankDetail) { BankDetail second = (BankDetail)obj; return this.bankName.equals(second.getBankName()) && this.getAccountNumberLast4Digits().equals(second.getAccountNumberLast4Digits()); } return false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n public Date getCreated()\n {\n return null;\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo4359a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "public final void mo91715d() {\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 }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n public int getID() {\n return 7;\n }", "public void mo12930a() {\n }", "public Pitonyak_09_02() {\r\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "protected void mo6255a() {\n }", "@Override\r\n\tpublic Date getCreated_date() {\n\t\treturn super.getCreated_date();\r\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void m50366E() {\n }", "public void mo1531a() {\n }", "@Override\n public void memoria() {\n \n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo55254a() {\n }", "@Override\n\tpublic void initDate() {\n\n\t}", "@Override\n\tpublic int getID() {\n\t\treturn 1;\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo12628c() {\n }", "public void mo9848a() {\n }", "@Override\n public int getOrder() {\n return 0;\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private TMCourse() {\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "public Date getDateCreated(){return DATE_CREATED;}", "@Override\n public void init() {\n\n }", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}", "public void mo21779D() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public static void listing5_14() {\n }", "public void mo3749d() {\n }", "@Override\n public int getOrder() {\n return 4;\n }", "public void mo21878t() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "public void mo21877s() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void mo3376r() {\n }", "private void kk12() {\n\n\t}", "CreationData creationData();", "@Override\r\n\tpublic void create() {\n\r\n\t}", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void billGenerate() {\n\t\t\r\n\t}", "public void create() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void save() {\n \n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void save()\n {\n \n }", "Constructor() {\r\n\t\t \r\n\t }" ]
[ "0.5965331", "0.59023786", "0.58667403", "0.5862105", "0.58352697", "0.57915306", "0.5768916", "0.575801", "0.5744109", "0.5735181", "0.57345945", "0.57345945", "0.5708316", "0.5705422", "0.5685065", "0.56337094", "0.5618871", "0.5587906", "0.55406225", "0.553835", "0.55213416", "0.5520615", "0.5520615", "0.5520615", "0.5520615", "0.5520615", "0.5520615", "0.5520615", "0.55202156", "0.55057645", "0.55001605", "0.5491099", "0.54879326", "0.5485312", "0.5474918", "0.5456937", "0.54534024", "0.54534024", "0.54302305", "0.54284436", "0.54279864", "0.54258853", "0.5425632", "0.5424398", "0.54188657", "0.5411824", "0.5407425", "0.53949463", "0.5392501", "0.539164", "0.5390108", "0.5380089", "0.5378682", "0.5378547", "0.5374609", "0.5374386", "0.5370203", "0.5367773", "0.53645813", "0.5360155", "0.5338749", "0.5338334", "0.5338277", "0.5337157", "0.5334642", "0.53346133", "0.53267306", "0.532668", "0.53191495", "0.5315073", "0.53111017", "0.531056", "0.5310538", "0.53102434", "0.53074723", "0.53074723", "0.53074723", "0.53074723", "0.53074723", "0.53018165", "0.530051", "0.5295873", "0.52954286", "0.52950794", "0.52924395", "0.5283945", "0.5283117", "0.52815914", "0.52770156", "0.52754796", "0.52751714", "0.5271106", "0.52696574", "0.5265826", "0.5254013", "0.5252619", "0.525242", "0.5251988", "0.52491426", "0.52467513", "0.5246071" ]
0.0
-1
Test of getEntityManager method, of class DaftarPengguna.
@Test public void testGetEntityManager() { System.out.println("getEntityManager"); DaftarPengguna instance = new DaftarPengguna(); EntityManager expResult = null; EntityManager result = instance.getEntityManager(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n @Test(groups = {\"Entity Manager access\"})\n public void testEntityManager00() throws Exception {\n super.testEntityManager00();\n }", "static EntityManager getEntityManager(){\n return ENTITY_MANAGER_FACTORY.createEntityManager();\n }", "abstract E getEntityManager();", "protected abstract EntityManager getEntityManager();", "EntityManager createEntityManager();", "@Override\n protected EntityManager getEntityManager() {\n return em;\n }", "@Override\n\tprotected EntityManager getEntityManager() {\n\t return em;\n\t}", "@Override\r\n public void testGettingEntityManager() { debug(\"overriddenTestGettingEntityManager - noop\"); }", "@Override\n public EntityManager getEntityManager() {\n return entityManager;\n }", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn em;\n\t}", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn em;\n\t}", "@Override\n\tpublic EntityManager getEntityManager() {\n\t return em;\n\t}", "protected EntityManager getEntityManager() {\n return emf.createEntityManager();\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\tydelseService.setEntityManager(entityManager);\n\t}", "private EntityManagerProvider(){}", "public EntityManager getEntityManager() {\r\n return entityManager;\r\n }", "protected EntityManager getEntityManager() {\n return em;\n }", "@BeforeClass\n public static void initTestFixture() throws Exception {\n entityManagerFactory = Persistence.createEntityManagerFactory(\"test\");\n entityManager = entityManagerFactory.createEntityManager();\n }", "public abstract void setEntityManager(EntityManager em);", "@Override\n\tprotected EntityManager getEntityManager() {\n\t\treturn null;\n\t}", "public EntityManager getEntityManager() {\n return this.em;\n }", "protected EntityManager getEntityManager() {\n return this.entityManager;\n }", "@Override\r\n\tpublic EntityManager getEntityManger() {\n\t\treturn em;\r\n\t}", "public EntityManager getEntityManager() {\n return getFactory().createEntityManager();\n }", "EMInitializer() {\r\n try {\r\n emf = Persistence.createEntityManagerFactory(\"pl.polsl_MatchStatist\"\r\n + \"icsWeb_war_4.0-SNAPSHOTPU\");\r\n em = emf.createEntityManager();\r\n } catch (Exception e) {\r\n em = null;\r\n emf = null;\r\n }\r\n\r\n }", "protected abstract EntityManagerFactory getEntityManagerFactory();", "@Test\n public void testGetEmf() {\n System.out.println(\"getEmf\");\n DaftarPengguna instance = new DaftarPengguna();\n EntityManagerFactory expResult = null;\n EntityManagerFactory result = instance.getEmf();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}", "public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}", "public EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}", "@Test\n public void createQuejaEntityTest() {\n PodamFactory factory = new PodamFactoryImpl();\n QuejaEntity newEntity = factory.manufacturePojo(QuejaEntity.class);\n QuejaEntity result = quejaPersistence.create(newEntity);\n\n Assert.assertNotNull(result);\n QuejaEntity entity = em.find(QuejaEntity.class, result.getId());\n Assert.assertNotNull(entity);\n Assert.assertEquals(newEntity.getName(), entity.getName());\n}", "public final static EntityManager getEntityManager() {\r\n\t\treturn entityManager;\r\n\t}", "private AdminEntity() {\n \tsuper();\n\n this.emf = Persistence.createEntityManagerFactory(\"entityManager\");\n\tthis.em = this.emf.createEntityManager();\n\tthis.tx = this.em.getTransaction();\n }", "@BeforeClass\r\n public static void initTextFixture(){\r\n entityManagerFactory = Persistence.createEntityManagerFactory(\"itmd4515PU\");\r\n }", "public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "public EntityManager getEntityManager() {\n\t\treturn entityManager;\n\t}", "@Before\n\tpublic void init()\n\t{\n\t\tEntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"persistenceUnit\");\n\t\tEntityManager entityManager = entityManagerFactory.createEntityManager();\n\t\tcacheManager = new CacheManagerDefaultImpl();\n\t\t((CacheManagerDefaultImpl) cacheManager).setEntityManager(entityManager);\n\t}", "public static EntityManager getEntityManager() {\n EntityManager em = tl.get();\n return em;\n }", "public interface EntityManagerCreator {\n EntityManager createEntityManager();\n}", "public EntityManager getEntityManager() {\n\t\treturn this.entityManager;\n\t}", "public interface IEntityManagerFactory {\r\n\r\n\t/**\r\n\t * Called when entity manager factory will help to create DAO objects.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tEntityManager createEntityManager();\r\n}", "@Override\n\t@PersistenceContext(unitName=\"PU-POC\")\t\n\tpublic void setEntityManager(EntityManager entityManager) {\n\t\tsuper.setEntityManager(entityManager);\n\t}", "public void setEntityManager(EntityManager em) {\n this.em = em;\n }", "@BeforeEach\n void init() {\n\n EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"pu\");\n employeeDao = new EmployeeDao(entityManagerFactory);\n\n\n }", "public interface AnutaEntityManager {\n\n /**\n * Saves entity in database\n * @param entity the entity to be saved\n * @param <T> the type if target entity\n * @return saved entity\n */\n public <T> T save(T entity);\n\n /**\n * Loads the entity from data source using entity's id\n * @param entityClass the target entity class\n * @param id the id of entity lo load\n * @param <T> the type if target entity\n * @return Java object, representing the entity if object was found and null otherwise\n */\n public <T> T find(Class<T> entityClass, String id);\n\n\n /**\n * Loads entity without loading all inner collections\n * @param id the id of the entity\n * @return loaded entity, if exists and null otherwise\n */\n public <T> T getPlainEntity(Class<T> entityClass, String id);\n\n /**\n * Updates entity in database\n * @param <T> the type if target entity\n * @return updated entity\n */\n public <T> T update(T entity);\n\n /**\n * Deletes entity from database\n * @param entity the entity to be deleted\n * @param <T> the type if target entity\n * @return true if was removed and false otherwise\n */\n public <T> boolean delete(T entity);\n\n /**\n * Deletes entity from database\n * @param entityClass the class of entity to be deleted\n * @param id the id of entity to be removed\n * @param <T> the type if target entity\n * @return true if was removed and false otherwise\n */\n public <T> boolean delete(Class<T> entityClass, String id);\n\n /**\n * Finds all entities of the given type\n * @param <T> the type if target entity\n * @return list of found entities or empty list if nothing was found\n */\n public <T> List<T> findAll(Class<T> entityClass);\n\n /**\n * Finds all entities of the given type\n * @param <T> the type if target entity\n * @return list of found entities or empty list if nothing was found\n */\n public <T> List<T> findByQuery(AnutaQuery<T> query);\n\n /**\n * Saves all entities into database\n * @param <T> the type if target entity\n * @return collection of saved entities\n */\n public <T> Collection<T> saveAll(Collection<T> entities);\n\n /**\n * Updates all entities in database\n * @param <T> the type if target entity\n * @return collection of updated entities\n */\n public <T> Collection<T> updateAll(Collection<T> entities);\n\n /**\n * Deletes all entities in database\n * @param <T> the type if target entity\n * @return collection of updated entities\n */\n public <T> boolean deleteAll(Collection<T> entities);\n\n /**\n * Deletes all entities in database\n * @param ids collection of ids for entities to be deleted\n * @param <T> the type if target entity\n * @return collection of updated entities\n */\n public <T> boolean deleteAll(Class<T> entityClass, Collection<String> ids);\n\n /**\n * @return the instance of {@link AnutaQueryBuilder} which can be used to build query\n */\n public <T> AnutaQueryBuilder<T> getQueryBuilder(Class<T> cls);\n\n /**\n * Queries data from DB and coverts data from cursor to Java entity.\n * @param query the query to select objects\n * @param <T> type of target entity\n * @return an instance of {@link AnutaEntityCursor} which can be used to iterate objects from database\n */\n public <T> AnutaEntityCursor<T> getEntityCursor(AnutaQuery<T> query);\n\n /**\n * Executes query and returns true if query was executed successfully and false otherwise\n * @param query the query to be executed\n * @return {@code true} if query was executed successfully and {@code false} otherwise\n */\n public <T> boolean executeQuery(AnutaQuery<T> query);\n\n /**\n * Initializes all related collections and entities\n * @param entity the entity to be initialized\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> T initialize(T entity);\n\n /**\n * Initializes all related collections and entities up to the given level\n * @param entity the entity to be initialized\n * @param level the level of initialization (greater then 0 or one of the following)\n * <ul>\n * <li>{@link DatabaseAccessSession#LEVEL_ENTITY_ONLY} - to load plain entity</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ALL} - to load entity and all dependent collections</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ANNOTATION_BASED} - to load entity and collections will be loaded accorging to annotation config</li>\n * </ul>\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> T initialize(T entity, int level);\n\n /**\n * Initializes all related collections and entities for the given collection of entities\n * @param entities the collection of entities to be initialized\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> Collection<T> initialize(Collection<T> entities);\n\n /**\n * Initializes all related collections and entities up to the given level\n * @param entities the collection of entities to be initialized\n * @param level the level of initialization (greater then 0 or one of the following)\n * <ul>\n * <li>{@link DatabaseAccessSession#LEVEL_ENTITY_ONLY} - to load plain entity</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ALL} - to load entity and all dependent collections</li>\n * <li>{@link DatabaseAccessSession#LEVEL_ANNOTATION_BASED} - to load entity and collections will be loaded accorging to annotation config</li>\n * </ul>\n * @return initialized entity. WARNING! The reference of returned object will differ from passed at params\n */\n public <T> Collection<T> initialize(Collection<T> entities, int level);\n}", "@Override\n\tpublic EntityManagerFactory getEntityManagerFactory() {\n\t\treturn null;\n\t}", "private boolean testPersistenceManager (final PersistenceManager pm){\n\t\ttry {\n\t\t\tfinal Iterator it = pm.getExtent(Project.class, true).iterator();\n\t\t} catch (Exception e){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "DAOClienteJPA(EntityManager entity) {\r\n this.entity = entity;\r\n }", "@Test\n\tpublic void contextUp() {\n\t\tassertNotNull(entityManager());\n\t}", "public void setupEntities() {\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\ttry {\n\t\t\temf = Persistence.createEntityManagerFactory(\"DistribSubastaCoreEM\");\n\t\t dao.setEm(emf.createEntityManager());\n\t\t dao.getEm().setFlushMode(FlushModeType.COMMIT);\n\t\t dao.getEm().getEntityManagerFactory().getCache().evictAll();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t}", "@Test\n public void getEmpleadoTest() {\n EmpleadoEntity entity = data.get(0);\n EmpleadoEntity resultEntity = empleadoLogic.getEmpleado(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNombreEmpleado(), resultEntity.getNombreEmpleado());\n Assert.assertEquals(entity.getNombreUsuario(), resultEntity.getNombreUsuario());\n }", "protected FullTextEntityManager getFullTextEntityManager() {\n\t if (ftem == null) {\n\t ftem = Search.getFullTextEntityManager(getEntityManager());\n\t try {\n\t\t\t\t/* Como o banco de dados é resetado a cada vez que\n\t\t\t\t * a aplicação inicializa (banco em memória), é preciso reconstruir\n\t\t\t\t * os índices de busca utilizados pelo hibernate-search.*/\n\t\t\t\tftem.createIndexer().startAndWait();\n\t\t\t} catch (InterruptedException e) {//TODO: tratar exceção\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t }\n\t return ftem;\n\t}", "public interface EntityManager {\r\n public <T> T findById(Class<T> entityClass, Long id);\r\n public <T> Long getNextIdVal(String tableName, String columnIdName);\r\n public <T> Object insert(T entity);\r\n public <T> List<T> findAll(Class<T> entityClass);\r\n public <T> T update(T entity);\r\n public void delete(Object entity);\r\n public <T> List<T> findByParamsClass(Class<T> entityClass, Map<String, Object> params);\r\n}", "@PersistenceContext\n public void setEntityManager(EntityManager em) {\n this.em = em;\n }", "@PersistenceContext\n public void setEntityManager(EntityManager em) {\n this.em = em;\n }", "@PersistenceContext\n public void setEntityManager(EntityManager em) {\n this.em = em;\n }", "@Test\r\n public void testFind() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n MonitoriaEntity nuevaEntity = persistence.find(entity.getId());\r\n Assert.assertNotNull(nuevaEntity);\r\n Assert.assertEquals(entity.getId(), nuevaEntity.getId());\r\n Assert.assertEquals(entity.getIdMonitor(), nuevaEntity.getIdMonitor());\r\n Assert.assertEquals(entity.getTipo(), nuevaEntity.getTipo());\r\n \r\n }", "public EntityManager getEm() {\n\t\treturn em;\n\t}", "private static void init(){\n entityManager = HibernateUtil.getEntityManager();\n transaction = entityManager.getTransaction();\n }", "public EntityManager getEM() {\n\t\treturn this.entity;\n\t}", "public void setEntityManager(AV3DEntityManager entityManager) {\n\t}", "public void setEntityManager(EntityManager em) {\n\t\tthis.em = em;\n\t}", "@Before\n public void setUp() {\n\n EntityManager em = emf.createEntityManager();\n try {\n em.getTransaction().begin();\n //Delete all, since some future test cases might add/change data\n em.createQuery(\"delete from Car\").executeUpdate();\n //Add our test data\n Car e1 = new Car(\"Volvo\");\n Car e2 = new Car(\"WW\");\n em.persist(e1);\n em.persist(e2);\n em.getTransaction().commit();\n } finally {\n em.close();\n }\n }", "private static void init() {\n\t\tif (factory == null) {\n\t\t\tfactory = Persistence.createEntityManagerFactory(\"hibernatePersistenceUnit\");\n\t\t}\n\t\tif (em == null) {\n\t\t\tem = factory.createEntityManager();\n\t\t}\n\t}", "@Test\r\n public void testExistingEmf() {\r\n debug(\"testExistingEmf\");\r\n this.emf = initialEmf; \r\n super.testGettingEntityManager();\r\n super.testPersisting();\r\n super.testFinding();\r\n super.testQuerying();\r\n super.testGettingMetamodel();\r\n this.emf = null; \r\n }", "@Test\n public void getQuejaTest() {\n QuejaEntity entity = data.get(0);\n QuejaEntity newEntity = quejaPersistence.find(dataServicio.get(0).getId(), entity.getId());\n Assert.assertNotNull(newEntity);\n Assert.assertEquals(entity.getName(), newEntity.getName());\n }", "@PersistenceContext\r\n public void setEntityManager(EntityManager em) {\r\n this.em = em;\r\n }", "@BeforeClass\n\tpublic static void setUpBeforeClass() throws Exception {\n\t\temf = Persistence.createEntityManagerFactory(\"si-database\");\n\t}", "public void test_GetContest_Failure1_EntityManagerClosed()\r\n throws Exception {\r\n initContext();\r\n\r\n EntityManager em = (EntityManager) context.lookup(\"contestManager\");\r\n em.close();\r\n\r\n try {\r\n beanUnderTest.getContest(1000);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "private EntityManager getEM() {\n\t\tif (emf == null || !emf.isOpen())\n\t\t\temf = Persistence.createEntityManagerFactory(PUnit);\n\t\tEntityManager em = threadLocal.get();\n\t\tif (em == null || !em.isOpen()) {\n\t\t\tem = emf.createEntityManager();\n\t\t\tthreadLocal.set(em);\n\t\t}\n\t\treturn em;\n\t}", "public static void main(String[] args) {\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"hello\"); // 1. 문제 없이 실행이 되었다면(엔티티 매니저 팩토리는 하나만 생성하고 App 전체에서 공유한다.)\n\t\t\n\t\tEntityManager em = emf.createEntityManager(); // 2. entityManager를 EntityManagerFactory에서 꺼내온다(쉽게 생각해서 DB의 connection 객체를 꺼내왔다고 보면 된다.). -> 엔티티 매니저는 서로 다른 쓰레드간에 공유해서 사용하면 안된다 특정 쓰레드에서 사용했다면 사용하고 버려야 한다.\n\t\t\n\t\tEntityTransaction tx = em.getTransaction(); // 3. 2번에서 얻어온 DB connection 객체에서 트랜잭션 하나를 얻어 온다.\n\t\t// 여기는 데이터 처리하는 곳(시작)\n\t\ttx.begin(); // 4. 트랜잭션 시작. -> jpa는 트랜잭션 안에서 작업을 해야 제대로 작동한다 트랜잭션으로 안 묶어주면 안된다(핵심).\n\t\ttry { \t\t\t\n\t\t\t\n\t\t\ttx.commit(); // 5. 정상적으로 오류없이 여기까지 왔다면 트랜잭션 커밋 .\n\t\t\t\n\t\t} catch(Exception e) { // 6. 수행 도중 오류가 있다면 트랜잭션 롤백.\n\t\t\ttx.rollback(); \n\t\t} finally { // 7. 5번을 정상적으로 수행했다면 em 객체 close\n\t\t\tem.close(); \n\t\t}\n\t\t// 여기는 데이터 처리하는 곳(끝)\n\t\temf.close(); // 8. try-catch문을 정상으로 빠져나왔따면 emf 객체 close\n\t}", "private void run(AuthordDao dao, EntityManager entityManager) {\n Author een = new Author(\"Bakker\");\n dao.save(een);\n Author twee = new Author(\"Smit\");\n dao.save(twee);\n Author drie = new Author(\"Meijer\");\n dao.save(drie);\n Author vier = new Author(\"Mulder\");\n dao.save(vier);\n Author vijf = new Author(\"de Boer\");\n dao.save(vijf);\n Author zes = new Author(\"Pieters\");\n dao.save(zes);\n\n /////////////////////////////////////////// --> delete author 2\n dao.delete(twee);\n\n /////////////////////////////////////////// --> update naam author 1\n dao.updateName(1, \"Hendriks\");\n dao.save(een);\n\n ////////////////////////////////////////// --> try setters\n drie.setHasDebuted(Boolean.TRUE);\n vijf.setHasDebuted(Boolean.TRUE);\n zes.setHasDebuted(Boolean.TRUE);\n dao.update(drie);\n dao.update(vijf);\n dao.update(zes);\n\n /////////////////////////////////////////// --> find by lastname\n log(dao.findBy(\"Meijer\"));\n\n /////////////////////////////////////////// --> enum\n een.setGenre(Genre.FICTION);\n dao.save(een);\n\n drie.setGenre(Genre.CHILDREN);\n dao.save(drie);\n\n vier.setGenre(Genre.BIOGRAPHY);\n dao.save(vier);\n\n vijf.setGenre(Genre.ROMANCE);\n dao.save(vijf);\n\n zes.setGenre(Genre.FICTION);\n dao.save(zes);\n\n ///////////////////////////////////////////////// --> unidirectional\n Publisher theBestPublisher = new Publisher(\"the Best Publisher\");\n Publisher eenAnderePublisher = new Publisher(\"een Andere Publisher\");\n Publisher deLaaststePublisher = new Publisher(\"de Laatste Publisher\");\n\n Dao<Publisher> publisherDao = new Dao<>(entityManager);\n publisherDao.save(theBestPublisher);\n publisherDao.save(eenAnderePublisher);\n publisherDao.save(deLaaststePublisher);\n\n een.setSignedBy(theBestPublisher);\n drie.setSignedBy(deLaaststePublisher);\n vier.setSignedBy(eenAnderePublisher);\n vijf.setSignedBy(theBestPublisher);\n zes.setSignedBy(deLaaststePublisher);\n\n dao.update(een);\n dao.update(drie);\n dao.update(vier);\n dao.update(vijf);\n dao.update(zes);\n\n List<Author> soft = dao.findByPublisher(\"best\");\n soft.forEach(this::log);\n\n ////////////////////////////////////////////////// --> bidirectional\n Dao assistantDao = new Dao(entityManager);\n\n Assistant assistant1 = new Assistant(\"Assistent 1\");\n Assistant assistant2 = new Assistant(\"Assistent 2\");\n Assistant assistant3 = new Assistant(\"Assistent 3\");\n assistantDao.save(assistant1);\n assistantDao.save(assistant2);\n assistantDao.save(assistant3);\n\n een.setAssistant(assistant3);\n drie.setAssistant(assistant2);\n vier.setAssistant(assistant2);\n vijf.setAssistant(assistant1);\n zes.setAssistant(assistant1);\n\n dao.update(een);\n dao.update(drie);\n dao.update(vier);\n dao.update(vijf);\n dao.update(zes);\n\n ////////////////////////////////////////////////// --> test one-to-many (Book testen)\n\n }", "@Test\n public void testGetComponenteById() {\n System.out.println(\"getComponenteById\");\n query = mock(Query.class);\n String nativeQuery = \"Componente.findByIdComponente\";\n Componente expected = new Componente();\n when(this.em.createNativeQuery(nativeQuery)).thenReturn(query);\n when(cDao.getComponenteById(anyInt())).thenReturn(expected);\n Componente result = cDao.getComponenteById(anyInt());\n assertThat(result, is(expected));\n }", "@BeforeEach\n public void setUp() {\n EntityManager em = emf.createEntityManager();\n try {\n em.getTransaction().begin();\n em.createQuery(\"DELETE from Role\").executeUpdate();\n em.createQuery(\"DELETE from Post\").executeUpdate();\n em.persist(new Role(\"user\"));\n em.getTransaction().commit();\n em.getTransaction().begin();\n em.createQuery(\"DELETE from User\").executeUpdate();\n em.persist(new User(\"Some txt\", \"More text\"));\n user = new User(\"aaa\", \"bbb\");\n em.persist(user);\n em.getTransaction().commit();\n } finally {\n em.close();\n }\n }", "public void setEntityManager(EntityManager entityManager) {\n\t\tthis.entityManager = entityManager;\n\t}", "public void setEntityManager(EntityManager entityManager) {\n\t\tthis.entityManager = entityManager;\n\t}", "@PersistenceContext\r\n\tpublic void setEntityManager(EntityManager em) {\r\n\t\tthis.em = em;\r\n\t}", "@Before\n\tpublic void setup(){\n\t\ttarget = new MakeDaoImpl();\n\t\tmockEm = mock(EntityManager.class);\n\t\ttarget.setEm(mockEm);\n\t}", "@Bean\n @Scope(SCOPE_PROTOTYPE)\n EntityManager entityManagerProvider(EntityManagerFactory emf) {\n EntityManagerHolder holder = (EntityManagerHolder) getResource(emf);\n if (holder == null) {\n return emf.createEntityManager();\n }\n return holder.getEntityManager();\n }", "@Test\n void createTest() {\n Admin anAdmin = new Admin();\n anAdmin.setEmail(\"[email protected]\");\n anAdmin.setName(\"Giovanni\");\n anAdmin.setSurname(\"Gialli\");\n anAdmin.setPassword(\"Ciao1234.\");\n Admin created = adminJpa.create(anAdmin);\n assertEquals(\"[email protected]\", created.getEmail());\n try {\n entityManager = factor.createEntityManager();\n entityManager.getTransaction().begin();\n entityManager.remove(entityManager.merge(anAdmin));\n entityManager.getTransaction().commit();\n } finally {\n entityManager.close();\n }\n }", "@BeforeClass\n public static void before() {\n final EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"testpersistence\");\n jpa = new StandaloneJpaDao(factory.createEntityManager());\n handler = new QuotePaymentHandler(jpa);\n }", "@PersistenceContext(unitName=\"microrest-persistence\")\n public void setPersistenceContext(EntityManager em)\n {\n this.em = em;\n }", "public void setEntityManager(final EntityManager em) {\n this.em = em;\n }", "public static void main(String[] args) {\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"persistence-unit\");\n\n\t}", "@Test\r\n public void testCreateUsuario() throws Exception \r\n {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n UsuarioEntity buscado = usuarioLogic.createUsuario(entity);\r\n Assert.assertNotNull(buscado);\r\n \r\n buscado = em.find(UsuarioEntity.class, entity.getId());\r\n Assert.assertEquals(entity, buscado);\r\n }", "public void setEm(EntityManager em) {\n\t\tthis.entity = em;\n\t}", "@BeforeEach\n public void setUp() {\n EntityManager em = emf.createEntityManager();\n try {\n em.getTransaction().begin();\n em.createNamedQuery(\"Cars.deleteAllCars\").executeUpdate();\n em.persist(c1);\n em.persist(c2); \n em.getTransaction().commit();\n } finally {\n em.close();\n }\n }", "public static void main(String[] args)\r\n\t{\n\t\tEntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"Test\");\r\n\t\tEntityManager entityManager =entityManagerFactory.createEntityManager();\r\n\t \r\n\r\n\t\t//Movie m = entityManager.find(Movie.class, 100);\r\n\t\tMovie m = entityManager.getReference(Movie.class, 100);\r\n\t\t\r\n\t\t//Movie m1 = entityManager.getReference(Movie.class, 99);\r\n\t\tSystem.out.println(m.getClass());\r\n\t\t\r\n\t\tSystem.out.println(m.getMid());\r\n\t\tSystem.out.println(m.getMname());\r\n\t\tSystem.out.println(m.getRating());\r\n\t\t\r\n\t\tentityManager.close();\r\n\t}", "@Test\n public void testFindById() {\n// String findById = EntityManagerImpl.\n// EntityUtils.getTableName(Department.class);\n assertEquals(\"Table name should be departments!\", \"departments\", tableName);\n }", "@Before\r\n public void initTestMethod(){\r\n entityManager = entityManagerFactory.createEntityManager();\r\n entityTransaction = entityManager.getTransaction();\r\n \r\n entityTransaction.begin();\r\n Post post = new Post();\r\n post.setUserId(1l);\r\n post.setCreatedAt(new GregorianCalendar(2015,5,7).getTime());\r\n post.setDescription(\"PEOPLE ARE BAD AT TAKING OVER FROM AUTONOMOUS CARS.\");\r\n post.setLikes(5);\r\n \r\n assertNotNull(\"User object is initialized.\", post);\r\n assertSame(\"User ID is same\", 1l, post.getUserId());\r\n entityManager.persist(post);\r\n entityTransaction.commit(); \r\n\r\n \r\n \r\n }", "@Test\n public void testGetHospedaje() {\n HospedajeEntity hospedaje = new HospedajeEntity();\n hospedaje.setId(new Long(23));\n HospedajeLugarEntity hospedajeL = new HospedajeLugarEntity();\n hospedajeL.setHospedaje(hospedaje);\n Assert.assertTrue(hospedajeL.getHospedaje().getId().equals(hospedaje.getId()));\n }", "protected abstract void createDatabaseData(EntityManager entityManager);", "public EntityManagerFactory newEMFactory() {\n emFactory = Persistence.createEntityManagerFactory(\"Exercici1-JPA\");\n return emFactory;\n }", "@BeforeEach\n public void setUp() {\n EntityManager em = emf.createEntityManager();\n\n try {\n em.getTransaction().begin();\n em.createQuery(\"DELETE FROM Book\").executeUpdate();\n em.createNamedQuery(\"RenameMe.deleteAllRows\").executeUpdate();\n em.persist(b1 = new Book(\"12312\", \"harry potter\", \"Gwenyth paltrow\", \"egmont\", \"1999\"));\n em.persist(b2 = new Book(\"8347\", \"harry potter2\", \"Gwenyth paltrow\", \"egmont\", \"1998\"));\n em.persist(b3 = new Book(\"1231\", \"harry potter3\", \"Gwenyth paltrow\", \"egmont\", \"1997\"));\n\n em.getTransaction().commit();\n } finally {\n em.close();\n }\n }", "@Test\n public void testTagAdd() {\n try {\n String tagToLook = \"testTagAdd\";\n String entryText = \"testTagAdd:entry\";\n TypedQuery<Tag> query = em.createNamedQuery(\"Tag.find\", Tag.class);\n query.setParameter(\"name\", tagToLook);\n List<Tag> resultList = query.getResultList();\n Assert.assertEquals(resultList.size(), 0);\n\n Tag tag = new Tag();\n tag.name = tagToLook;\n em.getTransaction().begin();\n em.persist(tag);\n em.getTransaction().commit();\n\n Entry e1 = new Entry();\n e1.text = entryText + \"1\";\n Entry e2 = new Entry();\n e2.text = entryText + \"2\";\n List<Tag> resultList1 = query.getResultList();\n Assert.assertEquals(resultList1.size(), 1);\n Tag dbTag = resultList1.get(0);\n Assert.assertEquals(tag.id, dbTag.id);\n\n dbTag.entries = new ArrayList();\n dbTag.entries.add(e1);\n dbTag.entries.add(e2);\n\n em.getTransaction().begin();\n em.persist(e1);\n em.persist(e2);\n em.persist(dbTag);\n em.getTransaction().commit();\n\n dbTag = query.getSingleResult();\n Assert.assertEquals(dbTag.entries.size(), 2);\n\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail();\n }\n }", "@BeforeClass\n\tpublic static void init() {\n\t\ttry {\n\t\t\tif (emf == null) {\n\t\t\t\temf = Persistence.createEntityManagerFactory(\"application\");\n\t\t\t\tif (em == null) {\n\t\t\t\t\tem = loadConfiguration(emf);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}" ]
[ "0.75082976", "0.7470054", "0.7427566", "0.7417883", "0.7395659", "0.71346724", "0.7121002", "0.70463103", "0.70449996", "0.70432085", "0.7038272", "0.7038272", "0.6949046", "0.6919966", "0.68546575", "0.6706053", "0.6691688", "0.6691623", "0.66688466", "0.66356254", "0.6624187", "0.65975434", "0.6548184", "0.65404826", "0.653644", "0.65195245", "0.65193766", "0.6494943", "0.64647347", "0.64647347", "0.64647347", "0.6450495", "0.64481574", "0.63917226", "0.6385384", "0.63794464", "0.63794464", "0.63794464", "0.63794464", "0.63602227", "0.63600194", "0.63024205", "0.62743175", "0.6192047", "0.6158403", "0.6124016", "0.60963756", "0.60850006", "0.6082924", "0.6065559", "0.60542023", "0.60381347", "0.6024369", "0.6021052", "0.6012771", "0.6009688", "0.5990758", "0.5944566", "0.5944566", "0.5944566", "0.594448", "0.5932255", "0.59266394", "0.5921101", "0.5911525", "0.59110236", "0.58977544", "0.58954203", "0.5892966", "0.58847624", "0.5884511", "0.5868617", "0.58625495", "0.5857434", "0.5849651", "0.5837649", "0.5817389", "0.57796896", "0.57777864", "0.57777864", "0.5769574", "0.5766117", "0.5742523", "0.57264215", "0.5719105", "0.57156485", "0.56929624", "0.56883645", "0.56844276", "0.5679625", "0.5670946", "0.5667552", "0.56593007", "0.5654486", "0.56541675", "0.5652596", "0.563829", "0.56288964", "0.56287867", "0.56197435" ]
0.8375987
0
Test of check method, of class DaftarPengguna.
@Test public void testCheck() { System.out.println("check"); String email = ""; String password = ""; DaftarPengguna instance = new DaftarPengguna(); boolean expResult = false; boolean result = instance.check(email, password); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void check();", "void check();", "public void testCheck()\r\n {\n DataUtil.check(9, \"This is a test!\");\r\n }", "boolean checkVerification();", "void checkValid();", "void check() throws YangException;", "@Test\n public void testCheckId() {\n System.out.println(\"checkId\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n boolean expResult = false;\n boolean result = instance.checkId(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Override\n\tpublic void check() {\n\t\t\n\t}", "@Override\n\tpublic void check() {\n\t\t\n\t}", "@Test\n public void testGetPengguna() {\n System.out.println(\"getPengguna\");\n String email = \"\";\n String password = \"\";\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.getPengguna(email, password);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testCheckEmail() {\n System.out.println(\"checkEmail\");\n String email = \"\";\n DaftarPengguna instance = new DaftarPengguna();\n boolean expResult = false;\n boolean result = instance.checkEmail(email);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testFindPengguna() {\n System.out.println(\"findPengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.findPengguna(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void TestLegalCorrectInputCheck(){\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,1)\n ,true , \" check horisontal \"\n );\n\n //legal : check vertical spelling\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,1)\n ,true , \" check vertical \"\n );\n\n //legal : place a 5 ship horisontal at 1,1\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,1)\n ,true , \" legal : place a 5 ship horisontal at 1,1 \"\n );\n\n // legal : place a 5 ship horisontal at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,10)\n ,true ,\" legal : place a 5 ship horisontal at 1,10 \"\n );\n\n // legal : place a 5 ship vertical at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,1)\n ,true , \" legal : place a 5 ship vertical at 1,10 \"\n );\n\n // legal : place a 5 ship vertical at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,10,1)\n ,true ,\"000 legal : place a 5 ship vertical at 1,10 \"\n );\n\n // legal : place a 5 ship horisontal at 6,1\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,6,1)\n ,true , \" legal : place a 5 ship horisontal at 6,1 \"\n );\n\n // legal : place a 5 ship vertical at 1,6\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,6)\n ,true ,\"000 legal : place a 5 ship vertical at 10,6 \"\n );\n\n }", "public void doChecking() {\n \tdoCheckingDump();\n \tdoCheckingMatl();\n }", "public void checkData2019() {\n\n }", "@Test\n public void checkValidityTest1() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n assert (g.checkValidity(g.getDeck()));\n }", "@Test\n public void TestIlegalCorrectInputCheck(){\n Assert.assertEquals(player.CorrectInputCheck(\"horisonaz\",5,1,1)\n ,false , \" check horisontal spelling\"\n );\n\n //illegal : check vertical\n Assert.assertEquals(player.CorrectInputCheck(\"verticles\",5,1,1)\n ,false , \" check vertical spelling\"\n );\n\n //illegal : place a 5 ship horisontal at 0,1 outside of the grid\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,0,1)\n ,false,\" illegal : place a 5 ship horisontal at 0,1 outside of the grid \"\n );\n\n // illegal : place a 5 ship horisontal at 1,0 outside of the grid\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,1,0)\n ,false, \" illegal : place a 5 ship horisontal at 1,0 outside of the grid \"\n );\n\n // illegal : place a 5 ship horisontal at 7,1 ship is to big it goes outside the grid\n Assert.assertEquals(player.CorrectInputCheck(\"horisontal\",5,7,1)\n ,false , \" illegal : place a 5 ship horisontal at 7,1 outside of the grid \"\n );\n\n // illegal : place a 5 ship horisontal at 1,10\n Assert.assertEquals(player.CorrectInputCheck(\"vertical\",5,1,7)\n ,false , \" illegal : place a 5 ship horisontal at 1,7 outside of the grid \"\n );\n\n\n }", "@Test\n public void testGetPenggunas_0args() {\n System.out.println(\"getPenggunas\");\n DaftarPengguna instance = new DaftarPengguna();\n List expResult = null;\n List result = instance.getPenggunas();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void checkData(){\n\n }", "@Override\n\tpublic void check() throws Exception {\n\t}", "public static void verify() {\n\n\t\t\t\n\t\t\t\n\t\t\n\t}", "public abstract String check() throws Exception;", "@Test\n public void testCheckPositive() {\n Helper.checkPositive(1, \"obj\", \"method\", LogManager.getLog());\n }", "private void check(final VProgram program) {\n\t}", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkTest() {\n\t\tboolean flag = oTest.checkTest();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "private static void check(boolean bedingung, String msg) throws IllegalArgumentException\n {\n if (!bedingung)\n throw new IllegalArgumentException(msg);\n }", "@Test\n public void testVerifyNome() {\n System.out.println(\"verifyNome\");\n boolean expResult = true;\n boolean result = uv.verifyNome(u);\n assertEquals(expResult, result);\n }", "@Test\n \tpublic void testCheckingAccusation() {\n \t\t//Set answer\n \t\tSolution answer = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tSolution guess = new Solution(\"Colonel Mustard\", \"Knife\", \"Library\");\n \t\tgame.setAnswer(answer);\n \t\t//Check correct accusation\n \t\t//correct if it contains the correct person, weapon and room\n \t\tAssert.assertTrue(game.checkAccusation(guess));\n \t\t//Check false accusation\n \t\t//not correct if the room is wrong, or if the person is wrong, if the weapon is wrong, or if all three are wrong\n \t\t//wrong room\n \t\tguess = new Solution(\"Colonel Mustard\", \"Knife\", \"Billiards Room\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong weapon\n \t\tguess = new Solution(\"Colonel Mustard\", \"Lead Pipe\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t\t//wrong person\n \t\tguess = new Solution(\"Ms. Peacock\", \"Knife\", \"Library\");\n \t\tAssert.assertFalse(game.checkAccusation(guess));\n \t}", "boolean hasCorrect();", "public abstract boolean verifyInput();", "@Test\n\tvoid testCheckString1() {\n\t\tassertTrue(DataChecker.checkString(\"Test\"));\n\t}", "public boolean verify();", "@Test\n public void testIsApellido_Paterno() {\n System.out.println(\"isApellido_Paterno\");\n String AP = \"ulfric\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Paterno(AP);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "abstract boolean check(Env env);", "abstract protected boolean checkMethod();", "public void check()\n {\n typeDec.check();\n }", "boolean checkValidity();", "public abstract boolean verify();", "@Test\n\tpublic void check() {\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Unit Test Begins\");\n\t\t\t// Generate Random Log file\n\t\t\tUnitTestLogGenerator.generateRandomLogs();\n\t\t\t// Generate Cmd String\n\t\t\tString cmd = ClientClass.generateCommand(IpAddress, \"seth\", \"v\",\n\t\t\t\t\ttrue);\n\t\t\t// Run Local Grep;\n\t\t\tlocalGrep(cmd);\n\t\t\t// Connecting to Server\n\t\t\tConnectorService connectorService = new ConnectorService();\n\t\t\tconnectorService.connect(IpAddress, cmd);\n\t\t\tInputStream FirstFileStream = new FileInputStream(\n\t\t\t\t\t\"/tmp/localoutput_unitTest.txt\");\n\t\t\tInputStream SecondFileStream = new FileInputStream(\n\t\t\t\t\t\"/tmp/output_main.txt\");\n\t\t\tSystem.out.println(\"Comparing the two outputs...\");\n\t\t\tboolean result = fileComparison(FirstFileStream, SecondFileStream);\n\t\t\tAssert.assertTrue(result);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n public void testIsApellido_Materno() {\n System.out.println(\"isApellido_Materno\");\n String AM = \"Proud\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Materno(AM);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n\n }", "@Test\n public void testGetPenggunas_Long() {\n System.out.println(\"getPenggunas\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n List expResult = null;\n List result = instance.getPenggunas(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "protected abstract boolean checkInput();", "@Test\r\n public void testAvlPuu() {\r\n AvlPuu puu = new AvlPuu();\r\n assertEquals(puu.laskeSolmut(), 0);\r\n }", "void printCheck();", "@Test\n\tpublic void execute() throws Exception {\n\t\tassertTrue(argumentAnalyzer.getFlags().contains(Context.CHECK.getSyntax()));\n\t}", "public abstract void check(Manager manager);", "@Test\n public void testCheckForXssAttack1(){\n\n Assert.assertFalse(xssValidator.checkForXssAttack(WRONG_DATA));\n }", "public void checkGame() {\n\n\t}", "public static void verify() {\n intended(toPackage(PelconnerMainActivity.class.getName() + \".vladast\"));\n }", "public void checkParameters() {\n }", "@Test\n public void matchCorrect() {\n }", "public boolean checkInput();", "public void checkAnswer() {\n }", "@Test\r\n public void testNamaSupplierSudahAda() throws RemoteException, NotBoundException{\n f = new Form_Data_Supplier_Tambah(); \r\n f.setNama(\"PT HOLI PHARMACEUTICAL INDUST\"); \r\n boolean output = f.cekNamaSupplierSudahAda(); \r\n boolean target = true;\r\n assertEquals(target, output);\r\n }", "@Test\n public void testHealthy() {\n checker.checkHealth();\n\n assertThat(checker.isHealthy(), is(true));\n }", "@Test\n\tvoid testPokerStatusAlVerificarUnaManoQuePoseePokerRetornaPoker() {\n\t\t\n\t\tcarta5=new Carta(\"A\",\"D\") ;//Setup junto con las cartas declaradas anteriormente\n\t\t\n\t\tassertEquals(\"Poker\",pokerStatus.verificar(carta1,carta2,carta3,carta4,carta5));//verify\n\t}", "@Test\n public void ensureCanAddAllergenUnit() {\n\n System.out.println(\"Ensure Can add an Allergen Unit Test\");\n\n Allergen allergen = new Allergen(\"al5\", \"allergen 5\");\n\n assertTrue(profile_unit.addAllergen(allergen));\n }", "@Override\r\n\tpublic void checkAnswer() {\n\t\t\r\n\t}", "@Test\n public void testCheckForXssAttack2(){\n\n Assert.assertTrue(xssValidator.checkForXssAttack(RIGHT_DATA));\n }", "@Test\n\tvoid test() {\n\t\t\n\t\tuserInput ui = new userInput();\n\t\t\n\t\tboolean test0 = ui.isValidChildcareType(0);\n\t\tboolean test1 = ui.isValidChildcareType(1);\n\t\tboolean test2 = ui.isValidChildcareType(2);\n\t\tboolean test3 = ui.isValidChildcareType(3);\n\t\tboolean test4 = ui.isValidChildcareType(4);\n\t\tboolean test5 = ui.isValidChildcareType(5);\n\t\tboolean test6 = ui.isValidChildcareType(-1);\n\t\t\n\t\tassertEquals(test0, false);\n\t\tassertEquals(test1, true);\n\t\tassertEquals(test2, true);\n\t\tassertEquals(test3, true);\n\t\tassertEquals(test4, true);\n\t\tassertEquals(test5, false);\n\t\tassertEquals(test6, false);\n\t}", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkAp() {\n\t\tboolean flag = oTest.checkAp();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "@Test\n public void testIsValidFullName() {\n System.out.println(\"isValidFullName\");\n String fullName = \"Aliki Manou\";\n boolean expResult = true;\n boolean result = ValidVariables.isValidFullName(fullName);\n assertEquals(expResult, result);\n }", "@Test\n public void testCheckPrimeNormal_1() {\n assertTrue(checkerNumber.checkPrime(7));\n }", "boolean hasPass();", "boolean hasPass();", "@Test\r\n\tpublic void testIsValidPasswordSuccessful()\r\n\t{\r\n\t\tassertTrue(PasswordCheckerUtility.isValidPassword(\"#SuperMan1\"));\r\n\t}", "@Test\r\n public void testOnkoSama() {\r\n System.out.println(\"onkoSama\");\r\n Pala toinenpala = null;\r\n Pala instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.onkoSama(toinenpala);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void testGolden() throws Throwable {\n verifyGolden(this, getData());\n }", "@Test\n public void testIsValidTap() {\n setUpCorrect();\n assertTrue(boardManager.isValidTap(11));\n assertTrue(boardManager.isValidTap(14));\n assertFalse(boardManager.isValidTap(10));\n }", "public static void main(String[] args) {\n\t\tOblong testOblong = new Oblong(8,8);\n\t\t\n\t\t/* declare an object of an anonymus class\n\t\t * that checks that an oblong's length and height\n\t\t * are greater than zero\n\t\t */\n\t\tCheckable checkableObject1 = new Checkable() {\n\t\t\t@Override\n\t\t\tpublic boolean check() {\n\t\t\t\treturn testOblong.getLength() > 0 && testOblong.getHeight() > 0;\n\t\t\t}\n\t\t};\n\t\t\n\t\t/* declare an object of an anonymous class that checks that an\n\t\t * oblongś length and height ar not equal\n\t\t */\n\t\tCheckable checkableObject2 = new Checkable() {\n\t\t\t@Override\n\t\t\tpublic boolean check() {\n\t\t\t\treturn testOblong.getLength() != testOblong.getHeight();\n\t\t\t}\n\t\t};\n\t\t\n\t\t// this checks that the sides are greater than zero\n\t\tSystem.out.println(\"checkableObject1 is \" + checkValidity(checkableObject1));\n\t\t// this checks that the length and height are not equal\n\t\tSystem.out.println(\"checkableObject2 is \" + checkValidity(checkableObject2));\n\n\t}", "public void verifyBugerList()\n\t{\n\t\t\n\t}", "@Test\r\n public void testVerificaPossibilidade0() {\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Test\n public void testAddPengguna() {\n System.out.println(\"addPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.addPengguna(pengguna);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void checkBook2() throws Exception {\n SmartPlayer x = new SmartPlayer(0,0);\n boolean gotBook = x.checkBook();\n assertTrue(!gotBook);\n }", "@Override\n\tpublic void checkeoDeBateria() {\n\n\t}", "@Test\n public void checkBook() throws Exception {\n SmartPlayer x = new SmartPlayer(0,0);\n x.setCards(3,4);\n boolean gotBook = x.checkBook();\n assertTrue(gotBook);\n }", "static void executeTest() {\n int[] param1 = { // Checkpoint 1\n 12, 11, 10, -1, -15,};\n boolean[] expect = { // Checkpoint 2\n true, false,true, false, true,}; \n System.out.printf(\"課題番号:%s, 学籍番号:%s, 氏名:%s\\n\",\n question, gakuban, yourname);\n int passed = 0;\n for (int i = 0; i < param1.length; i++) {\n String info1 = \"\", info2 = \"\";\n Exception ex = null;\n boolean returned = false; //3\n try {\n returned = isDivable(param1[i]); //4\n if (expect[i] == (returned)) { //5\n info1 = \"OK\";\n passed++;\n } else {\n info1 = \"NG\";\n info2 = String.format(\" <= SHOULD BE %s\", expect[i]);\n }\n } catch (Exception e) {\n info1 = \"NG\";\n info2 = \"EXCEPTION!!\";\n ex = e;\n } finally {\n String line = String.format(\"*** Test#%d %s %s(%s) => \",\n i + 1, info1, method, param1[i]);\n if (ex == null) {\n System.out.println(line + returned + info2);\n } else {\n System.out.println(line + info2);\n ex.printStackTrace();\n return;\n }\n }\n }\n System.out.printf(\"Summary: %s,%s,%s,%d/%d\\n\",\n question, gakuban, yourname, passed, param1.length);\n }", "@Override\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "public void check(){\n check1();\n check2();\n check3();\n check4();\n check5();\n check6();\n\t}", "boolean hasAlreadCheckCard();", "@Test\r\n public void testContains() {\r\n System.out.println(\"contains\");\r\n Solmu solmu = null;\r\n Pala instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.contains(solmu);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n\tpublic void testIsPatientEligible() {\r\n\t\tAssert.assertTrue(oic.isPatientEligible(\"1\"));\r\n\t\tAssert.assertFalse(oic.isPatientEligible(\"2\"));\r\n\t\t\r\n\t\tAssert.assertFalse(oic.isPatientEligible(\"ab\"));\r\n\t\tAssert.assertFalse(oic.isPatientEligible(\"1.2\"));\r\n\t\t\r\n\t\tAssert.assertFalse(oic.isPatientEligible(\"510\"));\r\n\t}", "@Test\r\n public void testCheckUIS() {\r\n System.out.println(\"checkUIS\");\r\n String word = \"\";\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n boolean expResult = false;\r\n boolean result = instance.checkUIS(word);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "private CheckUtil(){ }", "@Test\n public void checkFuelEnough() {\n Game.getInstance().getPlayer().setSolarSystems(SolarSystems.SOMEBI);\n Game.getInstance().getPlayer().setFuel(SolarSystems.SOMEBI.getDistance(SolarSystems.ADDAM) + 1);\n assertTrue(SolarSystems.SOMEBI.canTravel(SolarSystems.ADDAM));\n }", "abstract void checkWhetherVariable(SyntaxUnit use);", "@Test\n public void checkValidityTest2() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n List<Card> deck = g.getDeck();\n deck.set(32, new Card(Card.number.four, Card.suit.club));\n assert (!g.checkValidity(deck));\n }", "@Override\r\n\tprotected void doVerify() {\n\t\t\r\n\t}", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkAbout() {\n\t\tboolean flag = oTest.checkAbout();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "public boolean checkVaild() throws IOException;", "@Test\r\n public void testVerificaPossibilidade3() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "@Test\n\tpublic void forInputChecker() {\n\t\tchar charTest = 'c';\n\t\tboolean result = false;\n\t\ttry {\n\t\t\tresult = object1.inputChecker(charTest);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tboolean ExpectedResult = true;\n\t\tassertEquals(ExpectedResult, result);\n\n\t}", "@Test\n public void testHasSugarmanLost() {\n System.out.println(\"hasSugarmanLost\");\n Sugarman instance = new Sugarman();\n instance.changeSugarLevel(-100);\n boolean expResult = true;\n boolean result = instance.hasSugarmanLost();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\n public void practicaTDDPasswordValidarMayusculas() {\n boolean respuesta = ValidadorPassword.validar(\"AA\");\n Assert.assertFalse(respuesta);\n }", "public void verify() {\n lblTheDatabaseNameIsEmpty();\n lblDatabaseName();\n lblUserName();\n lblPassword();\n lblDatabaseLocation();\n txtPassword();\n txtUserName();\n txtDatabaseLocation();\n btSettings();\n txtDatabaseName();\n btCancel();\n btOK();\n }", "public void testDomainCheck() {\n\t\tEPPDomainCheckCmd theCommand;\n\t\tEPPEncodeDecodeStats commandStats;\n\n\t\tEPPCodecTst.printStart(\"testDomainCheck\");\n\n\t\t// Check three domains\n\t\tVector domains = new Vector();\n\t\tdomains.addElement(\"example.com\");\n\t\tdomains.addElement(\"example.net\");\n\t\tdomains.addElement(\"example.org\");\n\n\t\ttheCommand = new EPPDomainCheckCmd(\"ABC-12345\", domains);\n\n\t\t// Add the Fee Check Extension\n\t\tEPPFeeCheck theCheckExt = new EPPFeeCheck();\n\t\ttheCheckExt.addDomain(new EPPFeeDomain(\"example.com\", \"USD\",\n\t\t\t\tnew EPPFeeCommand(\"create\", EPPFeeCommand.PHASE_SUNRISE),\n\t\t\t\tnew EPPFeePeriod(1)));\n\t\ttheCheckExt.addDomain(new EPPFeeDomain(\"example.net\", \"EUR\",\n\t\t\t\tnew EPPFeeCommand(\"create\", EPPFeeCommand.PHASE_CLAIMS,\n\t\t\t\t\t\tEPPFeeCommand.PHASE_LANDRUSH), new EPPFeePeriod(2)));\n\t\ttheCheckExt.addDomain(new EPPFeeDomain(\"example.org\", \"EUR\",\n\t\t\t\tnew EPPFeeCommand(\"transfer\"), null));\n\t\ttheCheckExt.addDomain(new EPPFeeDomain(\"example.xyz\",\n\t\t\t\tnew EPPFeeCommand(\"restore\")));\n\n\t\ttheCommand.addExtension(theCheckExt);\n\n\t\tcommandStats = EPPCodecTst.testEncodeDecode(theCommand);\n\t\tSystem.out.println(commandStats);\n\n\t\t// Domain Check Responses\n\t\tEPPDomainCheckResp theResponse;\n\t\tEPPEncodeDecodeStats responseStats;\n\n\t\t// Response for a single domain name\n\t\tEPPTransId respTransId = new EPPTransId(theCommand.getTransId(),\n\t\t\t\t\"54321-XYZ\");\n\n\t\ttheResponse = new EPPDomainCheckResp(respTransId,\n\t\t\t\tnew EPPDomainCheckResult(\"example1.com\", true));\n\n\t\ttheResponse.setResult(EPPResult.SUCCESS);\n\n\t\t// Add the Fee Check Data Extension\n\t\tEPPFeeChkData theChkDataExt = new EPPFeeChkData();\n\t\tEPPFeeDomainResult theFeeResult;\n\n\t\t// example.com result\n\t\ttheFeeResult = new EPPFeeDomainResult(\"example.com\", \"USD\",\n\t\t\t\tnew EPPFeeCommand(\"create\", EPPFeeCommand.PHASE_SUNRISE));\n\t\ttheFeeResult.addFee(new EPPFeeValue(new BigDecimal(\"5.00\"),\n\t\t\t\t\"Application Fee\", false, null, EPPFeeValue.APPLIED_IMMEDIATE));\n\t\ttheFeeResult.addFee(new EPPFeeValue(new BigDecimal(\"5.00\"),\n\t\t\t\t\"Registration Fee\", true, \"P5D\", null));\n\t\ttheFeeResult.setPeriod(new EPPFeePeriod(1));\n\t\ttheChkDataExt.addCheckResult(theFeeResult);\n\n\t\t// example.net result\n\t\ttheFeeResult = new EPPFeeDomainResult(\"example.net\", \"EUR\",\n\t\t\t\tnew EPPFeeCommand(\"create\", EPPFeeCommand.PHASE_CLAIMS,\n\t\t\t\t\t\tEPPFeeCommand.PHASE_LANDRUSH), new EPPFeePeriod(2),\n\t\t\t\tnew EPPFeeValue(new BigDecimal(\"5.00\")));\n\t\ttheChkDataExt.addCheckResult(theFeeResult);\n\n\t\t// example.org result\n\t\ttheFeeResult = new EPPFeeDomainResult(\"example.org\", \"EUR\",\n\t\t\t\tnew EPPFeeCommand(\"transfer\"));\n\t\ttheFeeResult.addFee(new EPPFeeValue(new BigDecimal(\"2.50\"),\n\t\t\t\t\"Transfer Fee\", false, null, null));\n\t\ttheFeeResult.addFee(new EPPFeeValue(new BigDecimal(\"10.00\"),\n\t\t\t\t\"Renewal Fee\", true, \"P5D\", null));\n\t\ttheFeeResult.setPeriod(new EPPFeePeriod(2));\n\t\ttheChkDataExt.addCheckResult(theFeeResult);\n\n\t\t// example.xyz result\n\t\ttheFeeResult = new EPPFeeDomainResult(\"example.xyz\", \"GDB\",\n\t\t\t\tnew EPPFeeCommand(\"restore\"));\n\t\ttheFeeResult.addFee(new EPPFeeValue(new BigDecimal(\"25.00\"),\n\t\t\t\t\"Restore Fee\", false, null, EPPFeeValue.APPLIED_IMMEDIATE));\n\t\ttheFeeResult.setClassification(\"premium-tier1\");\n\t\ttheChkDataExt.addCheckResult(theFeeResult);\n\n\t\ttheResponse.addExtension(theChkDataExt);\n\n\t\tresponseStats = EPPCodecTst.testEncodeDecode(theResponse);\n\t\tSystem.out.println(responseStats);\n\n\t\tEPPCodecTst.printEnd(\"testDomainCheck\");\n\t}", "@Override\n\t@NotDbField\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "@Override\n\t@NotDbField\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "@Override\n\t@NotDbField\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "@Test\n public void testStoreAlreadyExistsInDatabaseCheck() {\n window.textBox(\"storeNameTFld\").setText(\"store1\");\n window.textBox(\"numOfSeatsTFld\").setText(\"155\");\n window.textBox(\"storeAddressTFld\").setText(\"storeAddress1\");\n window.textBox(\"storeCityTFld\").setText(\"city\");\n window.textBox(\"storePhoneTFld\").setText(\"123123\");\n window.textBox(\"emailTFld\").setText(\"hlias.karasyahoo.gr\");\n window.textBox(\"fromOpenHoursTFld\").setText(\"18:00\");\n window.textBox(\"toOpenHoursTFld\").setText(\"23:00\"); \n window.checkBox(\"mondayCBx\").check();\n window.button(\"addStoreBtn\").click();\n window.optionPane().requireInformationMessage().requireMessage(\"Store already exists in the database!\");\n window.optionPane().okButton().click();\n window.optionPane().okButton().click();\n }" ]
[ "0.72860336", "0.72860336", "0.717165", "0.7024172", "0.6817995", "0.67498904", "0.6733168", "0.67255133", "0.67255133", "0.671507", "0.66148496", "0.64939344", "0.6462127", "0.64602935", "0.63966835", "0.6395255", "0.63736147", "0.6349854", "0.6345546", "0.6318983", "0.6308122", "0.63071537", "0.6280886", "0.62607193", "0.6257906", "0.62497133", "0.6235457", "0.62103665", "0.6202596", "0.6195738", "0.61655176", "0.6131291", "0.612329", "0.6103603", "0.6098715", "0.60878575", "0.6062105", "0.6058943", "0.60176957", "0.6005361", "0.597629", "0.5975241", "0.5970439", "0.5962213", "0.59532976", "0.5944143", "0.59430784", "0.59365207", "0.5926774", "0.592508", "0.5923639", "0.59230715", "0.59212494", "0.5911356", "0.58982813", "0.5891968", "0.58801866", "0.58730555", "0.586967", "0.58681685", "0.58580106", "0.585106", "0.584012", "0.5835076", "0.5835076", "0.5801786", "0.5789979", "0.5785738", "0.57857203", "0.5784187", "0.5784009", "0.577997", "0.57790333", "0.57721674", "0.576866", "0.5765583", "0.5763776", "0.57530576", "0.5747663", "0.57454836", "0.57409906", "0.5739124", "0.57290643", "0.57205695", "0.571922", "0.571857", "0.57048184", "0.5702903", "0.5698019", "0.5696201", "0.5694597", "0.5690313", "0.56901044", "0.56869084", "0.5684333", "0.56816506", "0.5674679", "0.5674679", "0.5674679", "0.5665987" ]
0.776967
0
Test of checkId method, of class DaftarPengguna.
@Test public void testCheckId() { System.out.println("checkId"); Long id = null; DaftarPengguna instance = new DaftarPengguna(); boolean expResult = false; boolean result = instance.checkId(id); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testGetId() {\r\n\t\tassertEquals(1, breaku1.getId());\r\n\t\tassertEquals(2, externu1.getId());\r\n\t\tassertEquals(3, meetingu1.getId());\r\n\t\tassertEquals(4, teachu1.getId());\r\n\t}", "public abstract boolean isValidID(long ID);", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic int idcheck(String loginId) {\n\t\treturn dao.idcheck(loginId);\r\n\t}", "@Override\n public boolean checkExistId(int id) throws Exception {\n Connection con = null;\n ResultSet rs = null;\n PreparedStatement ps = null;\n try {\n String query = \"select id from digital where id like ?\";\n con = getConnection();\n ps = con.prepareCall(query);\n ps.setString(1, \"%\" + id + \"%\");\n rs = ps.executeQuery();\n int count = 0;\n while (rs.next()) {\n count = rs.getInt(1);\n }\n return count != 0;\n } catch (Exception e) {\n throw e;\n } finally {\n // close ResultSet, PrepareStatement, Connection\n closeResultSet(rs);\n closePrepareStateMent(ps);\n closeConnection(con);\n }\n }", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasID();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean hasId();", "boolean existeId(Long id);", "@Test\n public void testIncorrectId(){\n UserRegisterKYC idTooLong = new UserRegisterKYC(\"hello\",\"S12345678B\",\"26/02/1995\",\"738583\");\n int requestResponse = idTooLong.sendRegisterRequest();\n assertEquals(400, requestResponse);\n\n UserRegisterKYC nonAlphanumId = new UserRegisterKYC(\"hello\",\"S12345!8B\",\"26/02/1995\",\"738583\");\n requestResponse = nonAlphanumId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC invalidPrefixId = new UserRegisterKYC(\"hello\",\"A\"+validId3.substring(1),\"26/02/1995\",\"738583\");\n requestResponse = invalidPrefixId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC alphaInMiddleId = new UserRegisterKYC(\"hello\",\"S1234A68B\",\"26/02/1995\",\"738583\");\n requestResponse = alphaInMiddleId.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC idTooShort = new UserRegisterKYC(\"hello\",\"S123678B\",\"26/02/1995\",\"738583\");\n requestResponse = idTooShort.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n UserRegisterKYC invalidChecksum = new UserRegisterKYC(\"hello\",\"S1234578B\",\"26/02/1995\",\"738583\");\n requestResponse = invalidChecksum.sendRegisterRequest();\n assertEquals(400,requestResponse);\n\n }", "boolean hasFromId();", "@Test\n\tpublic void testProfessorId(){\n\t\tlong id = 42;\n\t\ttestProfessor.setId(id);\n\t\tAssert.assertEquals(Long.valueOf(42), testProfessor.getId());\n\t}", "boolean hasUnitId();", "private boolean checkId() {\n int sum = 0;\n int id;\n\n try\n {\n id = Integer.parseInt(ID.getText().toString());\n }\n catch (Exception e)\n {\n return false;\n }\n\n if (id >= 1000000000)\n return false;\n\n for (int i = 1; id > 0; i = (i % 2) + 1) {\n int digit = (id % 10) * i;\n sum += digit / 10 + digit % 10;\n\n id=id/10;\n }\n\n if (sum % 10 != 0)\n return false;\n\n return true;\n }", "@Test void testGetId() {\r\n\t\tassertEquals(email1.getId(),email4.getId());\r\n\t\tassertNotEquals(email1.getId(),email3.getId());\r\n\t}", "@Test\n\tpublic void test() {\n\t\tlong firstID = UIDGen.getInstance().getNextId();\n\t\tint n = 100;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tUIDGen.getInstance().getNextId();\n\t\t}\n\t\tlong currentID = UIDGen.getInstance().getNextId();\n\t\tassertEquals(currentID, firstID + n + 1);\n\n\t\t// expect a IDInvalidException exception for using and\n\t\t// external id that has already been used\n\t\tlong exteranlId = currentID;\n\t\tThrowable caught = null;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tcaught = t;\n\t\t}\n\t\tassertNotNull(caught);\n\t\tassertSame(IDInvalidException.class, caught.getClass());\n\n\t\t// push an external id that is not used and expect no exception\n\t\texteranlId = currentID + 2;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tfail();\n\t\t}\n\n\t\t// expect an exception as we put the same id again\n\t\texteranlId = currentID;\n\t\tcaught = null;\n\t\ttry {\n\t\t\tUIDGen.getInstance().considerExternalId(exteranlId);\n\t\t} catch (Throwable t) {\n\t\t\tcaught = t;\n\t\t}\n\t\tassertNotNull(caught);\n\t\tassertSame(IDInvalidException.class, caught.getClass());\n\n\t\t// must skip currentID + 2 as it was defined as an external id\n\t\tassertEquals(UIDGen.getInstance().getNextId(), currentID + 1);\n\t\tassertEquals(UIDGen.getInstance().getNextId(), currentID + 3);\n\t}", "static boolean verifyID(String id)\r\n\t{\r\n\t\tfor(int i = 0; i < id.length(); i++)\r\n\t\t{\r\n\t\t\tchar c = id.charAt(i);\r\n\t\t\tif((c <= 'Z' && c >= 'A') || (c >= 'a' && c <= 'z')) //isAlpha\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse if(c >= '0' && c <= '9' || c == '_' || c == '-') //is digit or _ or -\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse if(c == ' ')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn id.length() > 0;\r\n\t}", "boolean hasPlayerId();", "@Test\n public void idTest() {\n // TODO: test id\n }", "@Test\n public void idTest() {\n // TODO: test id\n }", "public static boolean verifyId(long id) {\n \n boolean isTrue = true;\n \n if(id >= MINIMUM_ID_NUMBER && id <= MAXIMUM_ID_NUMBER) {\n return isTrue;\n } else {\n isTrue = false;\n \n return isTrue;\n } \n }", "@Test\n public void testIdDoesNotExist() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // generate ID not assigned to any transaction in the shop\n int nonExistentId = generateId(shop.getCreditsAndDebits(null, null).stream()\n .map(BalanceOperation::getBalanceId)\n .collect(Collectors.toList()));\n\n // if ID does not exist -1 is returned\n assertEquals(-1, shop.receiveCashPayment(nonExistentId, 10), 0.001);\n }", "@Test\r\n public void testGetId() {\r\n System.out.println(\"getId\");\r\n \r\n int expResult = 0;\r\n int result = instance.getId();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }", "@Test\r\n\tpublic void testSetGetIdValid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setId(idValid);\r\n\t\tassertEquals(idValid, doctor.getId());\r\n\t}", "private void validateId(String id) {\n if (!id.matches(\"[0-9]+\")) {\n throw new IllegalArgumentException(\"Invaild Tweet Id\");\n }\n return;\n }", "@Test\n\t void testUserId() {\n\t\tLong expected=1L;\n\t\tLong actual=user.getId();\n\t\tassertEquals(expected, actual);\n\t}", "public boolean checkId(String id){\r\n\t\treturn motorCycleDao.checkId(id);\r\n\t}", "@Test\r\n public void testCheckFillerID() {\r\n System.out.println(\"checkFillerID - Have existing record\");\r\n String id = \"Filler A\";\r\n boolean result = KnowledgeSystemBeanInterface.checkFillerID(id);\r\n assertTrue(result);\r\n System.out.println(\"testCheckFillerID ---------------------------------------------------- Done\");\r\n // TODO review the generated test code and remove the default call to fail.\r\n\r\n }", "@Test\n\tpublic void getIdTest() {\n\t}", "void checkNotFound(Integer id);", "public abstract boolean verifyIdAnswers(String firstName, String lastName, String address, String city, String state, String zip, String ssn, String yob);", "@Test\n public void testCheckIDPass() {\n System.out.println(\"checkIDPass\");\n School instance = new School();\n\n users.get(\"admin\").setIsActive(true);\n users.get(\"admin2\").setIsActive(false);\n instance.setUsers(users);\n\n assertEquals(users.get(\"admin\"), instance.checkIDPass(\"admin\",\n users.get(\"admin\").getPassword().toCharArray()));\n System.out.println(\"PASS with active user\");\n\n assertEquals(new String(), instance.checkIDPass(users.get(\"admin2\").getId(),\n users.get(\"admin2\").getPassword().toCharArray()));\n System.out.println(\"PASS with inactive user\");\n\n assertNull(instance.checkIDPass(users.get(\"admin\").getId(), \"Lamasia2**\".toCharArray()));\n System.out.println(\"PASS with wrong password\");\n\n assertNull(instance.checkIDPass(\"admin1\", users.get(\"admin\").getPassword().toCharArray()));\n System.out.println(\"PASS with wrong ID\");\n\n System.out.println(\"PASS ALL\");\n }", "boolean isSetID();", "public void testGetId_Default_Accuracy() {\r\n assertEquals(\"The id value should be got properly.\", -1, auditDetail.getId());\r\n }", "boolean hasPokerId();", "@Override\r\n\tpublic void testInvalidId() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.testInvalidId();\r\n\t\t}\r\n\t}", "public void testStringID() {\n String testID = generator.generatePrefixedIdentifier(\"test\");\n assertNotNull(testID);\n assertTrue(testID.matches(\"test\" + ID_REGEX));\n }", "@Override\n\tpublic int idCheck(String id) {\n\t\treturn sqlSession.selectOne(NS+\".idCheck\", id);\n\t}", "@Test\n public void testDAM31901001() {\n // in this case, there are different querirs used to generate the ids.\n // the database id is specified in the selectKey element\n testDAM30602001();\n }", "@Test\n\tpublic void testGetID() {\n\t}", "private static int validateId(Artist[] painterObject, int arrayCount) {\n\t\tboolean flag = true;\n\t\tSystem.out.println(\"Enter painter id:\");\n\t\tint id = AllValidationChecks.positiveIntegerCheck();\n\t\tfor (int i = 0; i < arrayCount; i++) {\n\t\t\tif (id == painterObject[i].getId()) {\n\t\t\t\tflag = false;\n\t\t\t}\n\t\t}\n\t\tif (flag) {\n\t\t\treturn id;\n\t\t} else {\n\t\t\tSystem.out.println(\"id already exists\");\n\t\t\treturn validateId(painterObject, arrayCount);\n\t\t}\n\t}", "public void testGetId(){\n exp = new Experiment(\"10\");\n assertEquals(\"getId does not work\", \"10\", exp.getId());\n }", "@Test\n public void testGetId() {\n System.out.println(\"getId\");\n Reserva instance = new Reserva();\n Long expResult = null;\n Long result = instance.getId();\n assertEquals(expResult, result);\n \n }", "@Test\r\n\tpublic void Test_ID() {\r\n\t\tResponse resp = given().\r\n\t\t\t\tparam(\"nasa_id\", \"PIA12235\").\r\n\t\t\t\twhen().\r\n\t\t\t\tget(endpoint);\r\n\t\t\t\tSystem.out.println(resp.getStatusCode());\r\n\t\t\t\tAssert.assertEquals(resp.getStatusCode(), 200);\r\n\t}", "@Test\r\n public void testGetId() {\r\n System.out.println(\"getId\");\r\n Integrante instance = new Integrante();\r\n Long expResult = null;\r\n Long result = instance.getId();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testgetandsetId() {\n session.setId(22);\n // Now check if the id actually is 22.\n assertEquals(22, session.getId());\n }", "@Test\r\n\tpublic void testSetGetIdInvalid() {\r\n\t\tDoctor doctor = new Doctor();\r\n\t\tdoctor.setId(idInvalid);\r\n\t\tassertEquals(idInvalid, doctor.getId());\r\n\r\n\t}", "private boolean CheckID(String id) {\n\t\tif ((!id.matches(\"([0-9])+\") || id.length() != 9) && (!id.matches(\"S([0-9])+\") || id.length() != 10)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "boolean existePorId(Long id);", "@Test\n public void identifierTest() {\n assertEquals(\"ident1\", authResponse.getIdentifier());\n }", "boolean isSetId();", "@Test(timeout = 4000)\n public void test192() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n errorPage0.del();\n Component component0 = errorPage0.id(\"O=V>!a<w512kq\");\n assertFalse(component0._isGeneratedId());\n }", "@Test\n public void testGetId() {\n System.out.println(\"Animal.getId\");\n assertEquals(252, animal1.getId());\n assertEquals(165, animal2.getId());\n }", "static void checkId(final long id, final String paramName) {\r\n if (id <= 0) {\r\n throw new IllegalArgumentException(\"The '\" + paramName\r\n + \"' should be above 0.\");\r\n }\r\n }", "static boolean verifyIDRelaxed(String id)\r\n\t{\r\n\t\tfor(int i = 0; i < id.length(); i++)\r\n\t\t{\r\n\t\t\tchar c = id.charAt(i);\r\n\t\t\tif(Character.isLetterOrDigit(c)) //isAlpha\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse if(c == ' ' || c == '_' || c == '-')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn id.length() > 0;\r\n\t}", "public boolean validateID() {\n\t\tif (this.id == null || this.id.length() < 1)\n\t\t\treturn false;\n\t\ttry {\n\t\t\tInteger.parseInt(this.id);\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public void testNumberID() {\n String testID = generator.generatePrefixedIdentifier(\"123\");\n assertNotNull(testID);\n assertTrue(testID.matches(\"_123\" + ID_REGEX));\n }", "public void testGetId_Accuracy() {\r\n int id = 1;\r\n UnitTestHelper.setPrivateField(AuditDetail.class, auditDetail, \"id\", new Integer(id));\r\n assertEquals(\"The id value should be got properly.\", id, auditDetail.getId());\r\n }", "@Test\r\n public void testSetId() {\r\n System.out.println(\"setId\");\r\n int lId = 0;\r\n \r\n instance.setId(lId);\r\n assertEquals(lId, instance.getId());\r\n \r\n }", "public boolean checkDating(int id);", "public void testNullID() {\n String testID = generator.generatePrefixedIdentifier(null);\n assertNotNull(testID);\n assertTrue(testID.matches(ID_REGEX));\n }", "@Test\n\tpublic void test() {\n\t\tString r1 = CGroup.createRandomId();\n\t\tassertTrue(r1.matches(\"[0-9]+\"));\n\t\t\n\t\tString r2 = CGroup.createRandomId();\n\t\tassertFalse(r1.equals(r2));\n\t}", "@Test\n public void testGetId() {\n System.out.println(\"getId\");\n DTO_Ride instance = dtoRide;\n long expResult = 1L;\n long result = instance.getId();\n assertEquals(expResult, result);\n }", "@Test\n public void testGetId_edificio() {\n System.out.println(\"getId_edificio\");\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n int expResult = 1;\n int result = instance.getId_edificio();\n assertEquals(expResult, result);\n \n }", "boolean hasLetterId();" ]
[ "0.72414446", "0.71386844", "0.7014833", "0.69559234", "0.69442225", "0.6924869", "0.6924869", "0.6924869", "0.6924869", "0.6924869", "0.6924869", "0.6924869", "0.6924869", "0.6924869", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.69246054", "0.6818021", "0.6799655", "0.67216945", "0.6684908", "0.6658015", "0.6652564", "0.66053855", "0.65915936", "0.65855676", "0.65639013", "0.65497214", "0.65497214", "0.65260303", "0.6517104", "0.6498733", "0.648463", "0.6475046", "0.64736664", "0.64675677", "0.646426", "0.645009", "0.64370847", "0.6435732", "0.6425656", "0.64251965", "0.6417315", "0.63913214", "0.6354879", "0.635072", "0.6331708", "0.63312167", "0.6326919", "0.6319434", "0.62920964", "0.62896305", "0.62844545", "0.62832856", "0.62700325", "0.6268888", "0.62687993", "0.626709", "0.62574905", "0.62526447", "0.625094", "0.62433684", "0.6240533", "0.62297684", "0.6222661", "0.6197036", "0.6180858", "0.61562353", "0.61550015", "0.6154027", "0.6149554", "0.6147179", "0.61212856", "0.61115104" ]
0.80387396
0
Test of checkEmail method, of class DaftarPengguna.
@Test public void testCheckEmail() { System.out.println("checkEmail"); String email = ""; DaftarPengguna instance = new DaftarPengguna(); boolean expResult = false; boolean result = instance.checkEmail(email); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\t\tvoid givenEmail_CheckForValidationForEmail_RetrunTrue() {\n\t\t\tboolean result = ValidateUserDetails.validateEmails(\"[email protected]\");\n\t\t\tAssertions.assertTrue(result);\n\t\t}", "protected void validateEmail(){\n\n //Creating Boolean Value And checking More Accurate Email Validator Added\n\n Boolean email = Pattern.matches(\"^[A-Za-z]+([.+-]?[a-z A-z0-9]+)?@[a-zA-z0-9]{1,6}\\\\.[a-zA-Z]{2,6},?([.][a-zA-z+,]{2,6})?$\",getEmail());\n System.out.println(emailResult(email));\n }", "@Test\n public void testIsEmail() {\n System.out.println(\"isEmail\");\n String em = \"[email protected]\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isEmail(em);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n\t\tvoid givenEmail_CheckForValidationForEmail_RetrunFalse() {\n\t\t\tboolean result =ValidateUserDetails.validateEmails(\"abc.xyz@bl\");\n\t\t\tAssertions.assertFalse(result);\n\t\t}", "@Test\n\t void testEmail() {\n\t\tString expected=\"[email protected]\";\n\t\tString actual=user.getEmail();\n\t\tassertEquals(expected, actual);\n\t}", "@Test\n public void testIsValidEmailAddress() {\n System.out.println(\"isValidEmailAddress\");\n String email = \"hg5\";\n boolean expResult = false;\n boolean result = ValidVariables.isValidEmailAddress(email);\n assertEquals(expResult, result);\n }", "@Test\n //@Disabled\n public void testValidateEmail() {\n assertTrue(RegExprMain.validateEmail(\"[email protected]\"));\n assertTrue(RegExprMain.validateEmail(\"[email protected]\"));\n assertTrue(RegExprMain.validateEmail(\"[email protected]\"));\n assertTrue(RegExprMain.validateEmail(\"[email protected]\"));\n assertFalse(RegExprMain.validateEmail(\"[email protected]\"));\n assertFalse(RegExprMain.validateEmail(\"luna@gmail\"));\n assertFalse(RegExprMain.validateEmail(\"[email protected]\"));\n assertFalse(RegExprMain.validateEmail(\"lubo.xaviluna@gmai_l.com\"));\n assertTrue(RegExprMain.validateEmail(\"luna#[email protected]\"));\n assertTrue(RegExprMain.validateEmail(\"[email protected]\"));\n \n \n\n }", "@Test(priority=1)\n\tpublic void testEmailValidity() {\n\t\tsignup.clearAllFields();\n\t\tsignup.enterId(\"123@abc\");\n\t\tsignup.clickSubmit();\n\t\tList<String> errors = signup.getErrors();\n\t\tAssert.assertTrue(TestHelper.isStringPresent(errors, \"Please enter a valid email address in the format [email protected].\"));\n\t}", "@Test\n public void emailTest() {\n // TODO: test email\n }", "@Test\n public void emailTest() {\n // TODO: test email\n }", "@Test\r\n\tpublic void TC_08_verify_Existing_Email_Address() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details with valid email address already taken\r\n\t\t\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", confirmPassword);\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\t\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding already registered\r\n\t\t//email address is displayed\r\n\t\terrMsg = Page_Registration.getMandatoryFieldErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"Username already taken.\");\r\n\r\n\t}", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "boolean hasEmail();", "@Test\r\n public void testEmailAnomalies() {\r\n Assert.assertEquals(emailValidator.isValid(\"[email protected]\", constraintValidatorContext), false);\r\n Assert.assertEquals(emailValidator.isValid(\"aa@testcom\", constraintValidatorContext), false);\r\n\r\n }", "@Test\n public void test_IsEmailValid(){\n UserRegistration obj = new UserRegistration();\n boolean result = obj.checkEmailValidation(\"[email protected]\");\n assertThat(result, is(true));\n }", "private boolean isEmailValid(String email) {\n return true;\r\n }", "boolean validateEmail(String email) {\n\t\treturn true;\n\n\t}", "void validate(String email);", "private void emailExistCheck() {\n usernameFromEmail(email.getText().toString());\n }", "@Test\n public void Email_WhenValid_ShouldReturnTrue(){\n RegexTest valid = new RegexTest();\n boolean result = valid.Email(\"[email protected]\");\n Assert.assertEquals(true,result);\n }", "Boolean checkEmailAlready(String email);", "@Test\n public void test_isNotValidEmail(){\n UserRegistration obj = new UserRegistration();\n boolean result = obj.checkEmailValidation(\"robert.com\");\n assertThat(result, is(false));\n }", "@Test\n\tpublic void validEmailIdIsTested() throws InValidEmailException {\n\t\tString emailId = \"[email protected]\";\n\t\tboolean isValidMail = EmailValidatorUtil.isValidEmailId(emailId, \"InValid EmailId Format\");\n\t\tassertTrue(isValidMail);\n\t}", "@Test\n public void emailVerifiedTest() {\n // TODO: test emailVerified\n }", "@Test\r\n\tpublic void TC_07_verify_Invalid_Email_Address_format() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details with invalid email address format\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", InvalidEmail);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", confirmPassword);\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\t\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding invalid email address\r\n\t\t//format is displayed\r\n\t\t\r\n\t\terrMsg = Page_Registration.getMandatoryFieldErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"The email address is invalid.\");\r\n\r\n\t}", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean checkEmail() throws IOException {\n String email = getEmail.getText();\n \n if(email.contains(\"@\")) { \n UserDatabase db = new UserDatabase();\n \n if(db.emailExists(email)) {\n errorMessage.setText(\"This email address has already been registered.\");\n return false;\n }\n \n return true;\n }\n else {\n errorMessage.setText(\"Please enter a valid email. This email will be \"+\n \"used for verification and account retrieval.\");\n return false;\n }\n }", "private boolean isValidEmail(final String theEmail) {\n return theEmail.contains(\"@\");\n }", "boolean isEmailRequired();", "boolean checkEmailExistsForClient(String email) throws RuntimeException;", "@Test\n\tpublic void verifySuccessMessageUponSubmittingValidEmailInForgetPasswordPage() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\tsendKeys(forgotPasswordPageObj.forgotPasswordEmailInputField, testUserPL);\n\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordRecoveryButton);\n\t\twaitTill(2000);\n\t Assert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordSuccessMessage), \"We've sent you an email with a link to reset your password. You may close this tab and check your email.\", \"Success message is not displaying upon submitting the forget password page with valid ceredentials\");\n\t}", "private boolean verificaEmail(String cadena) {\n if (validate.esVacio(cadena)) {\n setErrorEmail(getMsjVacio());\n return false;\n }\n if (!validate.esEmailValido(cadena)) {\n setErrorEmail(getMsjEmailInvalido());\n return false;\n }\n setErrorEmail(null);\n return true;\n }", "@Test\n public void testGetByMail() throws Exception {\n System.out.println(\"getByMail\");\n Connection con = ConnexionMySQL.newConnexion();\n Inscription result = Inscription.getByMail(con, \"[email protected]\");\n assertEquals(\"[email protected]\", result.getMail());\n }", "@Test\n public void isEmailNotValidTest(){\n String email = \"ciao ij\";\n ReportSettingsPresenter.isEmailValid(email);\n\n Assert.assertEquals(false, matcher.matches());\n }", "@Test\n\tpublic void emailExistsAuth() {\n\t\tassertTrue(service.emailExists(\"[email protected]\"));\n\t}", "@Test\n public void testBasicValid() {\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"admin@mailserver1\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"user%[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n }", "@Test\n public void testCantRegisterInvalidEmail() {\n enterValuesAndClick(\"\", \"invalidemail\", \"123456\", \"123456\");\n checkErrors(nameRequiredError, emailInvalidError, pwdNoError, pwdRepeatNoError);\n }", "@Test\n\tpublic void testValidateUsernameEmail() {\n\n\t\tassertTrue(ValidationUtil.validate(\"[email protected]\", Validate.username_valid));\n\t\tassertTrue(ValidationUtil.validate(\"[email protected]\", Validate.username_valid));\n\t\tassertTrue(ValidationUtil.validate(\"[email protected]\", Validate.username_valid));\n\t\tassertTrue(ValidationUtil.validate(\"[email protected]\", Validate.username_valid));\n\n\t\tassertFalse(ValidationUtil.validate(\"test4\", Validate.username_valid));\n\t\tassertFalse(ValidationUtil.validate(\"@com\", Validate.username_valid));\n\t\tassertFalse(ValidationUtil.validate(\"com@\", Validate.username_valid));\n\t}", "@Test\n\tpublic void inValidEmailIdIsTested() {\n\t\ttry {\n\t\t\tString emailId = \"divyagmail.com\";\n\t\t\tboolean isValidMail = EmailValidatorUtil.isValidEmailId(emailId, \"InValid EmailID Format\");\n\t\t\tassertFalse(isValidMail);\n\t\t} catch (Exception e) {\n\t\t\tassertEquals(\"InValid EmailID Format\", e.getMessage());\n\n\t\t}\n\t}", "@Test\n public void testCheck() {\n System.out.println(\"check\");\n String email = \"\";\n String password = \"\";\n DaftarPengguna instance = new DaftarPengguna();\n boolean expResult = false;\n boolean result = instance.check(email, password);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Override\r\n\tpublic int inviteEmailCheck(String useremail, int projectno) {\n\t\treturn pDao.inviteEmailCheck(useremail, projectno);\r\n\t}", "boolean hasUserEmail();", "@When(\"A user enters a valid email address$\")\n public void check_valid_email(DataTable email) throws Throwable {\n List<List<String>> email_addresses = email.raw();\n for (List<String> element : email_addresses) {\n for (String ea : element) {\n home.submit_email(ea);\n }\n }\n }", "@Test\n public void testGetEmail() {\n System.out.println(\"getEmail Test (Passing value)\");\n String expResult = \"[email protected]\";\n String result = user.getEmail();\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertEquals(expResult, result);\n }", "@Override\n\tpublic boolean emailisValid(String email) \n\t{\n\t\treturn false;\n\t}", "private void validationEmail(String email) throws FormValidationException {\n\t\tif (email != null) {\n\t\t\tif (!email.matches(\"([^.@]+)(\\\\.[^.@]+)*@([^.@]+\\\\.)+([^.@]+)\")) {\n\t\t\t\tSystem.out.println(\"Merci de saisir une adresse mail valide.\");\n\n\t\t\t\tthrow new FormValidationException(\n\t\t\t\t\t\t\"Merci de saisir une adresse mail valide.\");\n\t\t\t\t// } else if ( groupDao.trouver( email ) != null ) {\n\t\t\t\t// System.out.println(\"Cette adresse email est déjà utilisée, merci d'en choisir une autre.\");\n\t\t\t\t// throw new FormValidationException(\n\t\t\t\t// \"Cette adresse email est déjà utilisée, merci d'en choisir une autre.\"\n\t\t\t\t// );\n\t\t\t}\n\t\t}\n\t}", "public String checkEmail() {\n String email = \"\"; // Create email\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n email = checkEmpty(\"Email\"); // Call method to check input of email\n // Pattern for email\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\" + \"[a-zA-Z0-9_+&*-]+)*@\"\n + \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" + \"A-Z]{2,7}$\";\n boolean isContinue = true; // Condition loop\n\n while (isContinue) {\n // If pattern not match, the print out error\n if (!Pattern.matches(emailRegex, email)) {\n System.out.println(\"Your email invalid!\");\n System.out.print(\"Try another email: \");\n email = checkEmpty(\"Email\");\n } else {\n isContinue = false;\n }\n }\n\n boolean isExist = false; // Check exist email\n for (Account acc : accounts) {\n if (email.equals(acc.getEmail())) {\n // Check email if exist print out error\n System.out.println(\"This email has already existed!\");\n System.out.print(\"Try another email: \");\n isExist = true;\n }\n }\n\n // If email not exist then return email\n if (!isExist) {\n return email;\n }\n }\n return email; // Return email\n }", "public static boolean checkEmail(String email) {\r\n\t\tboolean result = false;\r\n\t\tif (check(email) && email.matches(CommandParameter.REG_EXP_EMAIL)) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override\r\n\tpublic int emailcheck(String email) {\n\t\treturn dao.idcheck(email);\r\n\t}", "@Test\n public void loginWithWrongEmail(){\n String randomLog=random.getNewRandomName()+\"_auto\";\n String randomPassword=random.getNewRandomName();\n Assert.assertEquals(createUserChecking.creationChecking(randomLog,randomPassword),\"APPLICATION ERROR #1200\");\n log.info(\"login \"+randomLog+\" and email \"+randomPassword+\" were typed\");\n }", "@Test\n public void emailToCheckTest(){\n when(DatabaseInitializer.getEmail(appDatabase)).thenReturn(string);\n when(ContextCompat.getColor(view.getContext(), num)).thenReturn(num);\n\n reportSettingsPresenter.emailtoSet(button, editText);\n\n\n verify(editText, Mockito.times(1)).setClickable(true);\n verify(editText, Mockito.times(1)).setEnabled(true);\n verify(editText, Mockito.times(1)).setTextColor(num);\n\n verify(button, Mockito.times(1)).setOnClickListener(any(View.OnClickListener.class));\n\n\n verify(databaseInitializer,Mockito.times(1));\n DatabaseInitializer.setEmail(appDatabase, string);\n }", "@Test\n\t\tvoid givenEmail_CheckForValidationForMobile_RetrunTrue() {\n\t\t\tboolean result = ValidateUserDetails.validateMobile(\"98 9808229348\");\n\t\t\tAssertions.assertTrue(result);\n\t\t}", "private void validationEmail(String email) throws Exception {\r\n\t\tif (email != null && email.trim().length() != 0) {\r\n\t\t\tif (!email.matches(\"([^.@]+)(\\\\.[^.@]+)*@([^.@]+\\\\.)+([^.@]+)\")) {\r\n\t\t\t\tthrow new Exception(\"Merci de saisir une adresse mail valide.\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Exception(\"Merci de saisir une adresse mail.\");\r\n\t\t}\r\n\t}", "static void emailValidation(String email) throws Exception {\n Pattern pattern_email = Pattern.compile(\"^[a-z0-9._-]+@[a-z0-9._-]{2,}\\\\.[a-z]{2,4}$\");\n if (email != null) {\n if (!pattern_email.matcher(email).find()) {\n throw new Exception(\"The value is not a valid email address\");\n }\n } else {\n throw new Exception(\"The email is required\");\n }\n }", "private boolean isEmailValid(String email) {\n return email.equals(\"[email protected]\");\n }", "private void validateEmail() {\n myEmailValidator.processResult(\n myEmailValidator.apply(myBinding.editResetEmail.getText().toString().trim()),\n this::verifyAuthWithServer,\n result -> myBinding.editResetEmail.setError(\"Please enter a valid Email address.\"));\n }", "public void emailFieldTest() {\r\n\t\tif(Step.Wait.forElementVisible(QuoteForm_ComponentObject.emailFieldLocator, \"Email input field\", 5)) {\r\n\t\t\tStep.Action.typeText(QuoteForm_ComponentObject.emailFieldLocator, \"Email input field\", \"[email protected]\");\r\n\t\t}\r\n\t}", "private void emailValidation( String email ) throws Exception {\r\n if ( email != null && !email.matches( \"([^.@]+)(\\\\.[^.@]+)*@([^.@]+\\\\.)+([^.@]+)\" ) ) {\r\n throw new Exception( \"Merci de saisir une adresse courriel valide.\" );\r\n }\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "boolean isEmailExist(String email);", "public void validateMailAlerts() {\n System.out.println(\"Validating Mail Alerts\");\n boolean mailPasstoCheck = false, mailPassccCheck = false, mailFailtoCheck = false, mailFailccCheck = false;\n\n if (!mailpassto.getText().isEmpty()) {\n\n String[] emailAdd = mailpassto.getText().split(\",\");\n\n for (String email : emailAdd) {\n if (VALID_EMAIL_ADDRESS_REGEX.matcher(email).find()) {\n mailPasstoCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Invalid Email address: \" + email + \".\\n\");\n }\n }\n\n } else {\n execptionData.append((++exceptionCount) + \". To Email address for passed test cases should not be empty.\\n\");\n\n }\n if (!mailpasscc.getText().isEmpty()) {\n String[] emailAdd = mailpasscc.getText().split(\",\");\n\n for (String email : emailAdd) {\n if (VALID_EMAIL_ADDRESS_REGEX.matcher(email).find()) {\n mailPassccCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Invalid Email address: \" + email + \".\\n\");\n }\n }\n\n } else {\n execptionData.append((++exceptionCount) + \". CC Email address for passed test cases should not be empty.\\n\");\n\n }\n if (!mailfailto.getText().isEmpty()) {\n String[] emailAdd = mailfailto.getText().split(\",\");\n\n for (String email : emailAdd) {\n if (VALID_EMAIL_ADDRESS_REGEX.matcher(email).find()) {\n mailFailtoCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Invalid Email address: \" + email + \".\\n\");\n }\n }\n\n } else {\n execptionData.append((++exceptionCount) + \". To Email address for failed test cases should not be empty.\\n\");\n\n }\n if (!mailfailcc.getText().isEmpty()) {\n String[] emailAdd = mailfailcc.getText().split(\",\");\n\n for (String email : emailAdd) {\n if (VALID_EMAIL_ADDRESS_REGEX.matcher(email).find()) {\n mailFailccCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Invalid Email address: \" + email + \".\\n\");\n }\n }\n } else {\n execptionData.append((++exceptionCount) + \".CC Email address for failed test cases should not be empty.\\n\");\n\n }\n\n if (mailPasstoCheck == true && mailPassccCheck == true && mailFailccCheck == true && mailFailtoCheck == true) {\n /*try {\n Properties connectionProperties = new Properties();\n String socketFactory_class = \"javax.net.ssl.SSLSocketFactory\"; //SSL Factory Class\n String mail_smtp_auth = \"true\";\n connectionProperties.put(\"mail.smtp.port\", port);\n connectionProperties.put(\"mail.smtp.socketFactory.port\", socketProperty);\n connectionProperties.put(\"mail.smtp.host\", hostSmtp.getText());\n connectionProperties.put(\"mail.smtp.socketFactory.class\", socketFactory_class);\n connectionProperties.put(\"mail.smtp.auth\", mail_smtp_auth);\n connectionProperties.put(\"mail.smtp.socketFactory.fallback\", \"false\");\n connectionProperties.put(\"mail.smtp.starttls.enable\", \"true\");\n Mail mail = new Mail(\"\");\n mail.createSession(fromMail.getText(), password.getText(), connectionProperties);\n mail.sendEmail(fromMail.getText(), mailpassto.getText(), mailpasscc.getText(), \"Test Mail from FACT\", \"Hi, This is the Test Mail for the FACT Tool\", \"\");\n mail.sendEmail(fromMail.getText(), mailfailto.getText(), mailfailcc.getText(), \"Test Mail from FACT\", \"Hi, This is the Test Mail for the FACT Tool\", \"\");*/\n mailAlertsCheck = true;\n /* } catch (IOException ex) {\n Logger.getLogger(ConfigFile.class.getName()).log(Level.SEVERE, null, ex);\n mailAlertsCheck = false;\n new ExceptionUI(ex);\n } catch (MessagingException ex) {\n Logger.getLogger(ConfigFile.class.getName()).log(Level.SEVERE, null, ex);\n mailAlertsCheck = false;\n new ExceptionUI(ex);\n }*/\n } else {\n mailAlertsCheck = false;\n mailPasstoCheck = false;\n mailPassccCheck = false;\n mailFailtoCheck = false;\n mailFailccCheck = false;\n }\n\n }", "@Test\n public void _1passwordEmailTest() {\n // TODO: test _1passwordEmail\n }", "void test1() {\n\t\tapp = new App();\n\t\t\n\t\tassertEquals(app.signin(\"[email protected]\", \"pass\"),true);\n\t\tMail[] mails = (Mail[])app.listEmails(1);\n\t\tfor(int i=0; i<mails.length; i++) {\n\t\t\tif(mails[i] == null)\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tString text = (mails[i]).getBodyText();\n\t\t\tassertEquals(text.equals( (String)bodyText.get(i) ), true);\n\t\t}\n\t\t\n\t\t\n\t}", "@Test\r\n public void testGetEmail() {\r\n System.out.println(\"getEmail\");\r\n Integrante instance = new Integrante();\r\n String expResult = \"\";\r\n String result = instance.getEmail();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "private boolean comprobar_email() {\n\t\tString mail = email.getText().toString();\n\n\t\tif (mail.matches(\".*@.*\\\\.upv.es\")) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void validateEmail() {\n mEmailValidator.processResult(\n mEmailValidator.apply(binding.registerEmail.getText().toString().trim()),\n this::validatePasswordsMatch,\n result -> binding.registerEmail.setError(\"Please enter a valid Email address.\"));\n }", "boolean isValidEmail(String email){\n boolean ValidEmail = !email.isEmpty() && Patterns.EMAIL_ADDRESS.matcher(email).matches();\n if(!ValidEmail){\n userEmail.setError(\"please fill this field correctly\");\n return false;\n }\n return true;\n }", "private void checkEmail(UserResource target, Errors errors) {\n final String proc = PACKAGE_NAME + \".checkEmail.\";\n final String userId = target.getId();\n final String email = target.getEmail();\n int found = 0;\n boolean doValidation = false;\n\n logger.debug(\"Entering: \" + proc + \"10\");\n\n final boolean isUpdating = apiUpdating(userId);\n logger.debug(proc + \"20\");\n\n if (isUpdating) {\n final UserEntry user = userRepository.findOne(userId);\n logger.debug(proc + \"30\");\n\n if (!user.getEmail()\n .equals(email)) {\n logger.debug(proc + \"40\");\n\n found = userRepository.updateEmail(email, userId);\n if (found > 0) {\n errors.rejectValue(\"email\", \"user.email.duplicate\");\n }\n else {\n doValidation = true;\n }\n }\n }\n else {\n logger.debug(proc + \"50\");\n\n found = userRepository.uniqueEmail(email);\n if (found > 0) {\n errors.rejectValue(\"email\", \"user.email.duplicate\");\n }\n else {\n doValidation = true;\n }\n }\n\n if (doValidation) {\n logger.debug(proc + \"60\");\n\n final laxstats.web.validators.Validator emailValidator = EmailValidator.getInstance();\n if (!emailValidator.isValid(email)) {\n errors.rejectValue(\"email\", \"user.email.invalidEmail\");\n }\n }\n logger.debug(\"Leaving: \" + proc + \"70\");\n }", "public String checkEmail(String email) {\n\t\t//TODO check passed in email and return it if correct, or an error message if no email exists\n\t\treturn email;\n\t}", "@Test(dependsOnMethods = {\"register\"})\n void confirmEmailAddressByCaptcha() {\n common.findWebElementByXpath(\"//*[@id=\\\"content\\\"]/fieldset/label/div\").click();\n\n //Click on Send captcha button\n common.timeoutSeconds(2);\n common.findWebElementById(\"send-captcha-button\").click();\n\n //No magic code is set\n common.verifyStatusMessage(\"Det uppstod ett problem med verifieringen av att du är en människa. \" +\n \"Var god försök igen.\");\n }", "@Test\n public void testFindByEmail() throws Exception {\n }", "@Test\r\n\tpublic void TC_05_verify_email_Mandatory_Field() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details except email address\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", \"\");\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", confirmPassword);\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding email address\r\n\t\t// is displayed\r\n\t\terrMsg = Page_Registration.getMandatoryFieldErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"Please enter a value for Email\");\r\n\r\n\t}", "@Test\n\t@DatabaseSetup(type = DatabaseOperation.CLEAN_INSERT, value = {DATASET_USUARIOS}, connection = \"dataSource\")\n\t@DatabaseTearDown(DATASET_CENARIO_LIMPO)\n\tpublic void testVerificaEmailJaCadastradoMustPass(){\n\t\tUsuario usuario = new Usuario();\n\t\t\n\t\tusuario.setNome(\"Eduardo\");\n\t\tList<Usuario> usuarios = usuarioService.find(usuario);\n\t\tAssert.assertEquals(usuarios.size(), 1);\n\t\tAssert.assertEquals(usuarios.get(0).getNome(), \"Eduardo Ayres\");\n\t\t\n\t\tusuario = new Usuario();\n\t\tusuario.setEmail(\"eduardo@\");\n\t\tusuarios = usuarioService.find(usuario);\n\t\tAssert.assertEquals(usuarios.size(), 1);\n\t}", "@Test\n public void emailDoesNotExistTest() {\n driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n String actualResult = forgetPasswordPO\n .setEmail(\"[email protected]\")\n .clickSubmitLoginBTN()\n .getEmailAlertMessage();\n\n Assert.assertEquals(\"The user does not exist by this email: [email protected]\", actualResult);\n }", "public boolean isEmailCorrect() {\n return (CustomerModel.emailTest(emailTextField.getText()));\n }", "public static boolean checkEmail (String email) throws IllegalArgumentException{\n check = Pattern.compile(\"^[a-zA-Z0-9]+(?:\\\\+*-*.[a-zA-Z0-9]+)*@[a-zA-Z0-9]+(?:\\\\.[a-zA-Z0-9]{2,}+)*$\").matcher(email).matches();\n if (check) {\n return true;\n } else {\n throw new IllegalArgumentException(\"Enter a valid Email Address\");\n }\n }", "boolean emailExistant(String email, int id) throws BusinessException;", "private boolean CheckEmail() {\n\t\tString email = Email_textBox.getText();\n\n\t\t// if field is empty\n\t\tif (email.equals(\"\")) {\n\t\t\tif (!Email_textBox.getStyleClass().contains(\"error\"))\n\t\t\t\tEmail_textBox.getStyleClass().add(\"error\");\n\t\t\tEmailNote.setText(\"* Enter Email\");\n\t\t\treturn false;\n\t\t}\n\n\t\tString emailFormat = \"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\\\.[a-zA-Z0-9-]+)+$\";\n\n\t\t// if field is not in wanted format\n\t\tif (!email.matches(emailFormat)) {\n\t\t\tif (!Email_textBox.getStyleClass().contains(\"error\"))\n\t\t\t\tEmail_textBox.getStyleClass().add(\"error\");\n\t\t\tEmailNote.setText(\"* Wrong Format\");\n\t\t\treturn false;\n\t\t}\n\n\t\tEmail_textBox.getStyleClass().remove(\"error\");\n\t\tEmailNote.setText(\"*\");\n\t\treturn true;\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void ValidateAdduserEmailidField() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Email address Field validations and its appropriate error message\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUserCreation()\n\t\t.validateEmailidField(userProfile);\t\t\t\t \t \t\t\t\t\t\t\n\t}", "public void testSendEmail2()\n throws Exception\n {\n Gitana gitana = new Gitana();\n\n // authenticate\n Platform platform = gitana.authenticate(\"admin\", \"admin\");\n\n // create a domain and a principal\n Domain domain = platform.createDomain();\n DomainUser user = domain.createUser(\"test-\" + System.currentTimeMillis(), TestConstants.TEST_PASSWORD);\n user.setEmail(\"[email protected]\");\n user.update();\n\n // create an application\n Application application = platform.createApplication();\n\n // create an email provider\n EmailProvider emailProvider = application.createEmailProvider(\n JSONBuilder.start(EmailProvider.FIELD_HOST).is(\"smtp.gmail.com\")\n .and(EmailProvider.FIELD_USERNAME).is(\"[email protected]\")\n .and(EmailProvider.FIELD_PASSWORD).is(\"buildt@st11\")\n .and(EmailProvider.FIELD_SMTP_ENABLED).is(true)\n .and(EmailProvider.FIELD_SMTP_IS_SECURE).is(true)\n .and(EmailProvider.FIELD_SMTP_REQUIRES_AUTH).is(true)\n .and(EmailProvider.FIELD_SMTP_STARTTLS_ENABLED).is(true)\n .get()\n );\n\n // create an email\n Email email = application.createEmail(\n JSONBuilder.start(Email.FIELD_BODY).is(\"Here is a test body\")\n .and(Email.FIELD_FROM).is(\"[email protected]\")\n .get()\n );\n email.setToDomainUser(user);\n email.update();\n\n // send the email\n emailProvider.send(email);\n\n // check to ensure was marked as sent, along with some data\n email.reload();\n assertTrue(email.getSent());\n assertNotNull(email.dateSent());\n assertNotNull(email.getSentBy()); \n }", "@Test\n public void EmptyEmailTest() {\n driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n String actualResult = forgetPasswordPO\n .setEmail(\"\")\n .clickImagePanel()\n .getEmailAlertMessage();\n\n Assert.assertEquals(\"Email is required\", actualResult);\n }", "private boolean check_email_available(String email) {\n // Search the database for this email address\n User test = UserDB.search(email);\n // If the email doesn't exist user will be null so return true\n return test == null;\n }", "@Test\n public void testCantRegisterValidEmailEmptyPassword() {\n enterValuesAndClick(\"\", \"[email protected]\", \"\", \"\");\n checkErrors(nameRequiredError, emailNoError, pwdRequiredError, pwdRepeatRequiredError);\n }", "public boolean isValidNewEmail(TextInputLayout tiEmail, EditText etEmail) {\n boolean result = isValidEmail(tiEmail, etEmail);\n\n if (result) {\n String email = etEmail.getText().toString().trim();\n UserRepository userRepository = new UserRepository(c.getApplicationContext());\n if (userRepository.getUserByEmail(email) != null) {\n tiEmail.setError(c.getString(R.string.emailExist));\n result = false;\n } else {\n tiEmail.setError(null);\n result = true;\n }\n }\n\n return result;\n }", "@Test\n\tpublic void emailNotExistsAuth() {\n\t\tassertFalse(service.emailExists(\"[email protected]\"));\n\t}", "private boolean isValidEmail(TextInputLayout tiEmail, EditText etEmail) {\n String email = etEmail.getText().toString().trim();\n boolean result = false;\n\n if (email.length() == 0)\n tiEmail.setError(c.getString(R.string.required));\n else {\n Pattern emailPattern = Patterns.EMAIL_ADDRESS;\n if (!emailPattern.matcher(email).matches())\n tiEmail.setError(c.getString(R.string.invalid));\n else {\n tiEmail.setError(null);\n result = true;\n }\n }\n\n return result;\n }", "private boolean isEmailValid(String email){\n return email.contains(\"@\");\n }", "@Test\r\n public void testSetEmail() {\r\n\r\n }", "@Test\n public void loginWithEmptyEmail(){\n String rand=random.getNewRandomName()+\"_auto\";\n Assert.assertEquals(createUserChecking.creationChecking(rand,\"\"),\"APPLICATION ERROR #1200\");\n log.info(\"Empty email and login \"+ rand+\" were typed\");\n }", "@Test\r\n public void getEmailTest()\r\n {\r\n Assert.assertEquals(stub.getEmail(), EMAIL);\r\n }", "public static void main(String[] args) {\n\n\t\tString emailID = \"[email protected]\";\n\t\tboolean isValidEmailID = true;\n\n\t\t//get index(position) value of '@' and '.'\n\t\tint at_index = emailID.indexOf('@');\n\t\tint dot_index = emailID.indexOf('.');\n\t\t\t\t\n\t\t// Check all rules one by one, if any one of the rule is not satisfied then it returns false immediately,\n\t\t// it returns true only after all the rules are satisfied\n\t\tisValidEmailID = (at_index < 0 || dot_index < 0) ? false\n\t\t\t\t: (at_index != emailID.lastIndexOf('@') || dot_index != emailID.lastIndexOf('.')) ? false\n\t\t\t\t\t\t: (emailID.substring(at_index + 1, dot_index).length() != 4) ? false\n\t\t\t\t\t\t\t\t: (emailID.substring(0, at_index).length() < 3) ? false\n\t\t\t\t\t\t\t\t\t\t: (emailID.toLowerCase().endsWith(\".com\") == false) ? false : true;\n\t\t\n\t\tSystem.out.println(\"Email ID : \" + emailID);\n\t\t\n\t\t\t\t\t\t\n\t\tif (isValidEmailID) {\n\t\t\tSystem.out.println(\"Email Validation Result : True (ie given maild is in vaild format)\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Email Validation Result : False (ie given maild is not in vaild format)\");\n\t\t}\n\n\t}" ]
[ "0.8003629", "0.7602659", "0.7466549", "0.7461784", "0.73674697", "0.73608124", "0.7351599", "0.72470516", "0.7186244", "0.7186244", "0.7154207", "0.71531713", "0.71531713", "0.71531713", "0.71531713", "0.71531713", "0.7133865", "0.7119303", "0.70912015", "0.70812213", "0.70805824", "0.69939053", "0.69913113", "0.69701225", "0.6965393", "0.6962984", "0.69181955", "0.6896232", "0.6886821", "0.6886821", "0.6886821", "0.6886821", "0.6878585", "0.6869508", "0.68627065", "0.6834781", "0.6794639", "0.6778333", "0.6774981", "0.6764946", "0.6761245", "0.6757535", "0.6756544", "0.67520285", "0.6728286", "0.6722899", "0.67216617", "0.6717811", "0.67110044", "0.6702749", "0.66929305", "0.6685621", "0.6678302", "0.66689974", "0.66582936", "0.6645651", "0.6641743", "0.66337085", "0.66292065", "0.66040945", "0.6599172", "0.6589757", "0.6586554", "0.6581608", "0.6581206", "0.6581206", "0.6581206", "0.6581206", "0.6575304", "0.65741295", "0.65714926", "0.6561166", "0.65567344", "0.6551291", "0.6549079", "0.6548407", "0.654748", "0.65465605", "0.65462947", "0.65392596", "0.65376276", "0.6530322", "0.65214616", "0.6503899", "0.65030134", "0.6498719", "0.64950883", "0.64901", "0.6489653", "0.64759004", "0.64735264", "0.6466824", "0.6465866", "0.64655626", "0.6452927", "0.6450219", "0.6445005", "0.64312017", "0.643104", "0.6430667" ]
0.80714595
0
Test of getPengguna method, of class DaftarPengguna.
@Test public void testGetPengguna() { System.out.println("getPengguna"); String email = ""; String password = ""; DaftarPengguna instance = new DaftarPengguna(); Pengguna expResult = null; Pengguna result = instance.getPengguna(email, password); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testFindPengguna() {\n System.out.println(\"findPengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.findPengguna(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetPenggunas_0args() {\n System.out.println(\"getPenggunas\");\n DaftarPengguna instance = new DaftarPengguna();\n List expResult = null;\n List result = instance.getPenggunas();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetPenggunas_Long() {\n System.out.println(\"getPenggunas\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n List expResult = null;\n List result = instance.getPenggunas(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testAddPengguna() {\n System.out.println(\"addPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.addPengguna(pengguna);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEditPengguna() {\n System.out.println(\"editPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.editPengguna(pengguna);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testDeletePengguna() throws Exception {\n System.out.println(\"deletePengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.deletePengguna(id);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "Lingua getLingua();", "@Test\n public void testGetTamano() {\n System.out.println(\"getTamano\");\n Huffman instance = null;\n int expResult = 0;\n int result = instance.getTamano();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "public void testTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(); \n\n\t\tshowData_skpp(data,\"penerbit\",\"jumlah_surat\");\n\t}", "@Test\r\n public void testAvlPuu() {\r\n AvlPuu puu = new AvlPuu();\r\n assertEquals(puu.laskeSolmut(), 0);\r\n }", "@Test\n public void getTarjetaPrepagoTest()\n {\n TarjetaPrepagoEntity entity = data.get(0);\n TarjetaPrepagoEntity resultEntity = tarjetaPrepagoLogic.getTarjetaPrepago(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNumTarjetaPrepago(), resultEntity.getNumTarjetaPrepago());\n Assert.assertEquals(entity.getSaldo(), resultEntity.getSaldo(), 0.001);\n Assert.assertEquals(entity.getPuntos(), resultEntity.getPuntos(),0.001);\n }", "@Test\r\n public void getSalaTest() \r\n {\r\n SalaEntity entity = data.get(0);\r\n SalaEntity resultEntity = salaLogic.getSala(data.get(0).getId());\r\n Assert.assertNotNull(resultEntity);\r\n Assert.assertEquals(entity.getId(), resultEntity.getId());\r\n Assert.assertEquals(resultEntity.getNumero(), entity.getNumero());\r\n }", "@Test\r\n public void testYhdista() {\r\n System.out.println(\"yhdista\");\r\n Pala toinenpala = null;\r\n Palahajautustaulu taulu = null;\r\n Pala instance = null;\r\n instance.yhdista(toinenpala, taulu);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testIsApellido_Paterno() {\n System.out.println(\"isApellido_Paterno\");\n String AP = \"ulfric\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Paterno(AP);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\r\n public void testGetFakturaId() {\r\n System.out.println(\"getFakturaId\");\r\n Faktura instance = new Faktura();\r\n Short expResult = null;\r\n Short result = instance.getFakturaId();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testPartido2() throws Exception { \r\n P2.fijarEquipos(\"Barça\",\"Depor\"); \r\n P2.comenzar(); \r\n P2.tantoLocal();\r\n P2.terminar(); \r\n assertEquals(\"Barça\",P2.ganador());\r\n }", "@Test\r\n public void testOnkoSama() {\r\n System.out.println(\"onkoSama\");\r\n Pala toinenpala = null;\r\n Pala instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.onkoSama(toinenpala);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public int getPapeles(int avenida, int calle);", "@Test\r\n public void testLisaakaari() {\r\n System.out.println(\"lisaakaari\");\r\n Kaari kaari = null;\r\n Pala instance = null;\r\n instance.lisaakaari(kaari);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testCheck() {\n System.out.println(\"check\");\n String email = \"\";\n String password = \"\";\n DaftarPengguna instance = new DaftarPengguna();\n boolean expResult = false;\n boolean result = instance.check(email, password);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetEmf() {\n System.out.println(\"getEmf\");\n DaftarPengguna instance = new DaftarPengguna();\n EntityManagerFactory expResult = null;\n EntityManagerFactory result = instance.getEmf();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testPartido3() throws Exception {\r\n P3.fijarEquipos(\"Barça\",\"Depor\"); \r\n P3.comenzar(); \r\n P3.tantoVisitante();\r\n P3.terminar(); \r\n assertEquals(\"Depor\",P3.ganador());\r\n }", "public void testAltaVehiculo(){\r\n\t}", "@Test\n public void testGetVaarin() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n k.tarkistaVastaus(\"vaarav vastaus\");\n k.tarkistaVastaus(\"trololololoo\");\n int virheita = k.getVaarin();\n\n assertEquals(\"Väärin menneiden tarkistusten lasku ei toimi\", 2, virheita);\n }", "@Test \r\n\t\r\n\tpublic void ataqueDeMagoSinMagia(){\r\n\t\tPersonaje perso=new Humano();\r\n\t\tEspecialidad mago=new Hechicero();\r\n\t\tperso.setCasta(mago);\r\n\t\tperso.bonificacionDeCasta();\r\n\t\t\r\n\t\tPersonaje enemigo=new Orco();\r\n\t\tEspecialidad guerrero=new Guerrero();\r\n\t\tenemigo.setCasta(guerrero);\r\n\t\tenemigo.bonificacionDeCasta();\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(44,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t//ataque normal\r\n\t\tperso.atacar(enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t// utilizar hechizo\r\n\t\tperso.getCasta().getHechicero().agregarHechizo(\"Engorgio\", new Engorgio());\r\n\t\tperso.getCasta().getHechicero().hechizar(\"Engorgio\",enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(20,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t}", "@Test\n public void yksiVasemmalle() {\n char[][] kartta = Labyrintti.lueLabyrintti(\"src/main/resources/labyrinttiTestiVasen.txt\");\n assertFalse(kartta == null);\n Labyrintti labyrintti = new Labyrintti(kartta);\n RatkaisuLeveyshaulla ratkaisuSyvyyshaulla = new RatkaisuLeveyshaulla(labyrintti);\n String ratkaisu = ratkaisuSyvyyshaulla.ratkaisu();\n assertTrue(Tarkistaja.tarkista(ratkaisu, labyrintti));\n }", "public void testTumPencereleriKapat() {\n System.out.println(\"tumPencereleriKapat\");\n Yakalayici instance = new Yakalayici();\n instance.tumPencereleriKapat();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testGetSamochod() {\r\n System.out.println(\"getSamochod\");\r\n Faktura instance = new Faktura();\r\n Samochod expResult = null;\r\n Samochod result = instance.getSamochod();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void getPerroTest() {\n \n PerroEntity entity = Perrodata.get(0);\n PerroEntity resultEntity = perroLogic.getPerro(entity.getId());\n Assert.assertNotNull(resultEntity);\n \n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getIdPerro(), resultEntity.getIdPerro());\n Assert.assertEquals(entity.getNombre(), resultEntity.getNombre());\n Assert.assertEquals(entity.getEdad(), resultEntity.getEdad());\n Assert.assertEquals(entity.getRaza(), resultEntity.getRaza());\n }", "@Test\r\n\tpublic void testIntialation()\r\n\t{\r\n\t\tPokemon pk = new Vulpix(\"Vulpix\", 100);\r\n\t\r\n\t\tassertEquals(\"Vulpix\", pk.getName());\r\n\t\tassertEquals(100, pk.getMaxLfPts());\r\n\t\tassertEquals(100, pk.getCurrentLifePts());\r\n\t\tassertEquals(100, pk.getCurrentLifePts());\r\n\t\tassertEquals(\"Fire\", pk.getType().getType());\r\n\t}", "@Test\n public void testMediaPesada() {\n System.out.println(\"mediaPesada\");\n int[] energia = null;\n int linhas = 0;\n double nAlpha = 0;\n Double[] expResult = null;\n Double[] resultArray = null;\n double[] result = ProjetoV1.mediaPesada(energia, linhas, nAlpha);\n if (result != null) {\n resultArray = ArrayUtils.converterParaArrayDouble(result);\n }\n\n assertArrayEquals(expResult, resultArray);\n\n }", "@Test\n public void tilimaksuKutsuuTilisiirtoaOikeillaParametreilla() {\n when(this.varasto.saldo(1)).thenReturn(10);\n when(this.varasto.haeTuote(1)).thenReturn(new Tuote(1, \"maito\", 5));\n \n this.kauppa.aloitaAsiointi();\n this.kauppa.lisaaKoriin(1);\n this.kauppa.tilimaksu(\"johannes\", \"12345\");\n verify(this.pankki).tilisiirto(eq(\"johannes\"), anyInt(), eq(\"12345\"), anyString(), eq(5));\n \n }", "@Test\n\tpublic void testPotencia() {\n\t\tdouble resultado=Producto.potencia(4, 2);\n\t\tdouble esperado=16.0;\n\t\t\n\t\tassertEquals(esperado,resultado);\n\t}", "@Test\r\n public void testGetProteinPerHundredGrams()\r\n {\r\n System.out.println(\"getProteinPerHundredGrams\");\r\n FoodBean instance = new FoodBean(5, \"Beans on toast\", \r\n Date.valueOf(\"2014-04-01\"), Time.valueOf(\"10:00:00\"), \r\n 100, 120, 5, 7, 500, 0, 3);\r\n double expResult = 100;\r\n double result = instance.getProteinPerHundredGrams();\r\n assertEquals(expResult, result, 0.0);\r\n }", "@Test\r\n public void testGetPracownik() {\r\n System.out.println(\"getPracownik\");\r\n Faktura instance = new Faktura();\r\n Pracownik expResult = null;\r\n Pracownik result = instance.getPracownik();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void avsResultTest() {\n assertEquals(\"G\", authResponse.getAvsResult());\n }", "String getVorlesungKennung();", "@Test\r\n public void testSamaPuu() {\r\n AvlPuu puu = new AvlPuu();\r\n Noodi noodi = new Noodi(0,0);\r\n noodi.setMatkaJaljella(10);\r\n noodi.setTehtyMatka(0);\r\n PuuSolmu solmu = new PuuSolmu(noodi);\r\n puu.insert(noodi);\r\n Noodi noodi2 = new Noodi(1,0);\r\n noodi2.setMatkaJaljella(9);\r\n noodi2.setTehtyMatka(noodi);\r\n PuuSolmu solmu2 = new PuuSolmu(noodi2);\r\n puu.insert(noodi2);\r\n \r\n AvlPuu puu2 = new AvlPuu();\r\n puu2.insert(noodi);\r\n puu2.insert(noodi2);\r\n assertTrue(puu.SamaPuu(puu2));\r\n\r\n }", "@Test\n public void testEnchantedChangedWithSongOfTheDryads() {\n // Enchantment Creature — Horror\n // 0/0\n // Bestow {2}{B}{B}\n // Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.\n addCard(Zone.HAND, playerA, \"Nighthowler\");\n addCard(Zone.BATTLEFIELD, playerA, \"Swamp\", 4);\n addCard(Zone.BATTLEFIELD, playerA, \"Silvercoat Lion\"); // {1}{W} 2/2 creature\n\n addCard(Zone.GRAVEYARD, playerA, \"Pillarfield Ox\");\n addCard(Zone.GRAVEYARD, playerB, \"Pillarfield Ox\");\n\n // Enchant permanent\n // Enchanted permanent is a colorless Forest land.\n addCard(Zone.BATTLEFIELD, playerB, \"Forest\", 3);\n addCard(Zone.HAND, playerB, \"Song of the Dryads\"); // Enchantment Aura {2}{G}\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Nighthowler using bestow\", \"Silvercoat Lion\");\n\n castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, \"Song of the Dryads\", \"Silvercoat Lion\");\n\n setStrictChooseMode(true);\n setStopAt(2, PhaseStep.BEGIN_COMBAT);\n execute();\n\n assertPermanentCount(playerB, \"Song of the Dryads\", 1);\n\n ManaOptions options = playerA.getAvailableManaTest(currentGame);\n Assert.assertEquals(\"Player should be able to create 1 green mana\", \"{G}\", options.getAtIndex(0).toString());\n\n assertPermanentCount(playerA, \"Nighthowler\", 1);\n assertPowerToughness(playerA, \"Nighthowler\", 2, 2);\n assertType(\"Nighthowler\", CardType.CREATURE, true);\n assertType(\"Nighthowler\", CardType.ENCHANTMENT, true);\n\n Permanent nighthowler = getPermanent(\"Nighthowler\");\n Assert.assertFalse(\"The unattached Nighthowler may not have the aura subtype.\", nighthowler.hasSubtype(SubType.AURA, currentGame));\n }", "@Test\n public void testGetVastaus() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n String vastaus = k.getVastaus();\n assertEquals(\"getVastaus ei toimi odoitetusti\", \"vastine\", vastaus);\n }", "@Test\n\t\tpublic void testGet() {\n\t\t\tChObject cho = repoTest.get(\"68268301\");\n\t\t\tassertEquals(\"68268301\", cho.getId());\n\t\t\tassertEquals(\"Gift of Vlisco\", cho.getCreditline());\n\t\t\tassertEquals(\"2011\", cho.getDate());\n\t\t\tassertEquals(\"Women's high-heeled shoes. Printed in indigo, emerald green, lime green, and yellow on a white ground.\", cho.getDescription());\n\t\t\tassertEquals(null, cho.getGallery_text());\n\t\t\t//assertEquals(\"Medium: 100% cotton Technique: wax-resist printed on plain weave\", cho.getMedium());\n\t\t\tassertEquals(\"cotton\",cho.getMedium());\n\t\t\tassertEquals(\"Textile (Netherlands), 2011\", cho.getTitle());\n\t\t}", "@Test\n public void testAlunPainotus() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n String kysymys = k.alunPainotus(true);\n\n\n assertEquals(\"AlunPainoitus ei toimi\", \"sana\", kysymys);\n }", "@Test\n public void testGetYhteensa() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n k.tarkistaVastaus(\"vaarav vastaus\");\n k.tarkistaVastaus(\"trololololoo\");\n int virheita = k.getYhteensa();\n\n assertEquals(\"Sanan tarkastus ei toimi\", 2, virheita);\n }", "@Test\n\tpublic void testDarApellido()\n\t{\n\t\tassertEquals(\"El apellido esperado es Romero.\", \"Romero\", paciente.darApellido());\n\t}", "public void testBidu(){\n\t}", "@Test\n public void testAvaaRuutu() {\n int x = 0;\n int y = 0;\n Peli pjeli = new Peli(new Alue(3, 0));\n pjeli.avaaRuutu(x, y);\n ArrayList[] lista = pjeli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isAvattu());\n assertEquals(false, pjeli.isLahetetty());\n }", "@Test\n\tpublic void searchForProductLandsOnCorrectProduct() {\n\t}", "@Test\r\n public void testGetSugarPerHundredGrams()\r\n {\r\n System.out.println(\"getSugarPerHundredGrams\");\r\n FoodBean instance = new FoodBean(5, \"Beans on toast\", \r\n Date.valueOf(\"2014-04-01\"), Time.valueOf(\"10:00:00\"), \r\n 100, 120, 5, 7, 500, 0, 3);\r\n double expResult = 0.0;\r\n double result = instance.getSugarPerHundredGrams();\r\n assertEquals(expResult, result, 0.0);\r\n }", "@Test\n public void testIsApellido_Materno() {\n System.out.println(\"isApellido_Materno\");\n String AM = \"Proud\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Materno(AM);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n\n }", "@Test\r\n public void testGetSaltPerHundredGrams()\r\n {\r\n System.out.println(\"getSaltPerHundredGrams\");\r\n FoodBean instance = new FoodBean(5, \"Beans on toast\", \r\n Date.valueOf(\"2014-04-01\"), Time.valueOf(\"10:00:00\"), \r\n 100, 120, 5, 7, 500, 0, 3);\r\n double expResult = 3.0;\r\n double result = instance.getSaltPerHundredGrams();\r\n assertEquals(expResult, result, 0.0);\r\n }", "@Test\n public void testGetTabla() {\n System.out.println(\"getTabla\");\n Huffman instance = null;\n byte[][] expResult = null;\n byte[][] result = instance.getTabla();\n \n // TODO review the generated test code and remove the default call to fail.\n \n }", "public void testNamaPNSYangSkepnyaDiterbitkanOlehPresiden(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getNamaPNSYangSkepnyaDiterbitkanOlehPresiden(); \n\n\t\tshowData(data,\"nip\",\"nama\",\"tanggal_lahir\",\"tanggal_berhenti\",\"pangkat\",\"masa_kerja\",\"penerbit\");\n\t}", "@Test\n public void testLukitseRuutu() {\n System.out.println(\"lukitseRuutu\");\n int x = 0;\n int y = 0;\n Peli peli = new Peli(new Alue(3, 1));\n peli.lukitseRuutu(x, y);\n ArrayList[] lista = peli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isLukittu());\n }", "@Test\n void doEffectPlasmaGun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"plasma gun\");\n Weapon w17 = new Weapon(\"plasma gun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w17);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w17.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n p.setPlayerPosition(Board.getSpawnpoint(2));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(6));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && p.getPlayerPosition() == Board.getSquare(6));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(1));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && p.getPlayerPosition() == Board.getSquare(1));\n\n p.setPlayerPosition(Board.getSpawnpoint(2));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(6));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"opt1\", \"base\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && p.getPlayerPosition() == Board.getSquare(6));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSpawnpoint('b'));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"base\", \"opt2\", \"opt1\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && p.getPlayerPosition() == Board.getSpawnpoint('b'));\n }", "@Test\n public void testDajMeteoPrognoze() throws Exception {\n System.out.println(\"dajMeteoPrognoze\");\n int id = 0;\n String adresa = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n MeteoPrognoza[] expResult = null;\n MeteoPrognoza[] result = instance.dajMeteoPrognoze(id, adresa);\n assertArrayEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n }", "@Ignore\n @Test\n public void testDajLokaciju() throws Exception {\n System.out.println(\"dajLokaciju\");\n String adresa = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n Lokacija expResult = null;\n Lokacija result = instance.dajLokaciju(adresa);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n void doEffectcyberblade(){\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"cyberblade\");\n Weapon w20 = new Weapon(\"cyberblade\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w20);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w20.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt2\", \"opt1\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n }", "@Test\n\tpublic void testPotencia1() {\n\t\tdouble resultado=Producto.potencia(4, 0);\n\t\tdouble esperado=1.0;\n\t\t\n\t\tassertEquals(esperado,resultado);\n\t}", "@Test\n public void testCheckId() {\n System.out.println(\"checkId\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n boolean expResult = false;\n boolean result = instance.checkId(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void testGetBehandelingNaam(){\n\t\tString expResult = \"Hamstring\";\n\t\tassertTrue(expResult == Behandelcode.getBehandelingNaam());\n\t}", "@Test\n public void testVaticanReport() {\n Game game = new Game(2);\n FaithTrack faith = game.getPlayers().get(0).getFaithTrack();\n faith.increasePos(5);\n assertTrue(faith.isVatican());\n faith.vaticanReport(1);\n assertEquals(faith.getBonusPoints()[0], 2);\n faith.increasePos(5);\n faith.vaticanReport(2);\n assertEquals(faith.getBonusPoints()[0], 2);\n }", "@Test\n public void testJatka() {\n System.out.println(\"jatka\");\n Peli peli = new Peli(new Alue(3, 1));\n peli.jatka();\n assertEquals(peli.isHavio(), false);\n assertEquals(peli.getMenetykset(), 1);\n\n }", "@Test\n public void testUsersRealUnitcodeBestGuess() {\n String unitCode = userMappingDao.getUsersRealUnitcodeBestGuess(\"username2\", tenancy);\n\n assertEquals(\"incorrect unitcode found with best guess\", \"unitcode2\", unitCode);\n }", "@Test\n public void testArreglarCadena() {\n System.out.println(\"arreglarCadena\");\n String cadena = \"\";\n String expResult = \"\";\n String result = utilsHill.arreglarCadena(cadena);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testLaskeSolmut() {\r\n AvlPuu puu = new AvlPuu();\r\n Noodi noodi = new Noodi(0,0);\r\n noodi.setMatkaJaljella(10);\r\n noodi.setTehtyMatka(0);\r\n PuuSolmu solmu = new PuuSolmu(noodi);\r\n puu.insert(noodi);\r\n Noodi noodi2 = new Noodi(1,0);\r\n noodi2.setMatkaJaljella(9);\r\n noodi2.setTehtyMatka(noodi);\r\n PuuSolmu solmu2 = new PuuSolmu(noodi2);\r\n puu.insert(noodi2);\r\n assertEquals(puu.laskeSolmut(), 2);\r\n }", "@Ignore\n @Test\n public void testPostaviKorisnickePodatke() throws Exception {\n System.out.println(\"postaviKorisnickePodatke\");\n String apiKey = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n instance.postaviKorisnickePodatke(apiKey);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testLisaasolmu() {\r\n System.out.println(\"lisaasolmu\");\r\n Solmu solmu = null;\r\n Pala instance = null;\r\n instance.lisaasolmu(solmu);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testGetQuant_livros_locados() {\n System.out.println(\"getQuant_livros_locados\");\n Usuario instance = null;\n int expResult = 0;\n int result = instance.getQuant_livros_locados();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testGetOrigen() {\r\n String expResult = \"origenprueba\";\r\n articuloPrueba.setOrigen(expResult);\r\n String result = articuloPrueba.getOrigen();\r\n assertEquals(expResult, result);\r\n }", "@Test\r\n public void testGetMaterial() {\r\n String expResult = \"Materialprueba\";\r\n articuloPrueba.setMaterial(expResult);\r\n String result = articuloPrueba.getMaterial();\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void testSetLugarNac() {\n System.out.println(\"setLugarNac\");\n String lugarNac = \"\";\n Paciente instance = new Paciente();\n instance.setLugarNac(lugarNac);\n \n }", "public Vector<MakhlukHidup> get_daftar();", "@Test\n void doEffectpowerglove() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"power glove\");\n Weapon w10 = new Weapon(\"power glove\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w10);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w10.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(p.getPlayerPosition() == Board.getSquare(1) && victim.getPb().countDamages() == 1 && victim.getPb().getMarkedDamages('b') == 2);\n\n p.setPlayerPosition(Board.getSquare(0));\n s.add(Board.getSquare(1));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n players.clear();\n players.add(victim);\n s.add(Board.getSpawnpoint('b'));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSpawnpoint('b'));\n players.add(victim2);\n try{\n p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect(\"alt\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(p.getPlayerPosition() == Board.getSpawnpoint('b') && victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 2);\n\n p.setPlayerPosition(Board.getSquare(0));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(1));\n s.add(Board.getSpawnpoint('b'));\n try{\n p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect(\"alt\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { System.out.println(\"ERROR\");}\n\n assertTrue(p.getPlayerPosition() == Board.getSpawnpoint('b') && victim.getPb().countDamages() == 2);\n }", "@Test\n public void testUsersRealNhsNoBestGuess() {\n String unitCode = userMappingDao.getUsersRealNhsNoBestGuess(\"username2\", tenancy);\n\n assertEquals(\"incorrect nhsno found with best guess\", \"nhsno2\", unitCode);\n }", "public String getPoruka() {\r\n\t\t//2.greska \"poruka\"\r\n\treturn poruka;\r\n\t}", "public RetanguloTest() {\n retangulo = new Retangulo();\n }", "@Test\n public void bateauAtPasDansGrille() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n Bateaux b = j.bateauAt(new Place(\"Z84897\"), g);\n\n assertNull(\"Il n'y a pas de bateau ici\", b);\n }", "@Test\r\n public void testGetPrimeiroNome() {\r\n System.out.println(\"getPrimeiroNome\");\r\n Integrante instance = new Integrante();\r\n String expResult = \"\";\r\n String result = instance.getPrimeiroNome();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void testCihazdanPaketleriYakala() {\n System.out.println(\"cihazdanPaketleriYakala\");\n Yakalayici instance = new Yakalayici();\n instance.cihazdanPaketleriYakala();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetDistancia() {\n HospedajeLugarEntity hospedajeT = data.get(0);\n HospedajeLugarEntity hospedaje = new HospedajeLugarEntity();\n hospedaje.setDistancia(hospedajeT.getDistancia());\n Assert.assertTrue(hospedajeT.getDistancia().equals(hospedaje.getDistancia()));\n }", "@Test\n public void testKatsokoko() {\n \n assertEquals(50, testi.ruudunkoko);\n }", "public void testDosyadanPaketleriYukle() {\n System.out.println(\"dosyadanPaketleriYukle\");\n Yakalayici instance = new Yakalayici();\n instance.dosyadanPaketleriYukle();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void test() {\n\t\tSystem.out.println(\"Displaying Available Languages\");\n\t\tSystem.out.println(\"------------------------------\");\n\t\tLanguageList.displayAvailableLanguage();\n\t}", "VectorArray getPhsAHar();", "@Test\n public void testConsultarPelaChave() throws Exception {\n System.out.println(\"consultarPelaChave\");\n String chave = \"\";\n ConfiguracaoTransferencia result = instance.consultarPelaChave(chave);\n assertNotNull(result);\n }", "public static void caso12(){\n\n FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso1.owl\",\"file:resources/caso1.repository\",fm);\n\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"pan\");\n\t\tif(map==null){\n\t\t\tSystem.out.println(\"El map es null\");\n\t\t}\n\t}", "public String apavada_prakruti_bhava(String X_anta, String X_adi)\n {\n\n Log.info(\"*******ENTERED AAPAVADA NIYAMA 3**********\");\n String anta = EncodingUtil.convertSLPToUniformItrans(X_anta); // anta\n // is\n // ITRANS\n // equivalent\n String adi = EncodingUtil.convertSLPToUniformItrans(X_adi); // adi is\n // ITRANS\n // equivalent\n\n String return_me = \"UNAPPLICABLE\";\n // 249\n if (VowelUtil.isPlutanta(X_anta) && X_adi.equals(\"iti\"))\n {// checked:29-6\n\n return_me = prakruti_bhava(X_anta, X_adi) + \", \" + utsarga_sandhi(X_anta, X_adi) + \"**\";\n ;\n /*\n * sandhi_notes = usg1 + sandhi_notes + \"\\nRegular Sandhis which\n * were being blocked by \" + \"pluta-pragRRihyA-aci-nityam(6.1.121)\n * are allowed by \" + \" 'apluta-vadupasthite' (6.2.125)\" + \"\\n\" +\n * usg2 ;\n * \n * sandhi_notes+= Prkr + apavada + depend + sutra +\n * \"pluta-pragRRihyA aci nityam' (6.1.121)\" + \"\\nCondition: Only if\n * String 1 is a Vedic Usage(Arsha-prayoga)\";\n * \n * //This note below goes after the Notes returned fropm\n * utsarga_sandhi above String cond1 = \"\\nRegular Sandhis which were\n * being blocked by \" + \"'pluta-pragRRihyA-aci-nityam'(6.1.121) are\n * allowed by \" + \" 'apluta-vadupasthite' (6.2.125)\";\n * vowel_notes.append_condition(cond1); ;\n */\n // We have to remove vriddhi_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.121\");\n comments.setSutraPath(\"pluta-pragRRihyA aci nityam\");\n comments.setSutraProc(\"Prakruti Bhava\");\n comments.setSource(Comments.sutra);\n String cond1 = \"pluta-ending word or a pragRRihya followed by any Vowel result in Prakruti bhava sandhi.\\n\" + \"<pluta-ending> || pragRRihya + vowel = prakruti bhava.\";\n comments.setConditions(cond1);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.2.125\");\n comments.setSutraPath(\"apluta-vadupasthite\");\n comments.setSutraProc(\"utsargic Sandhis Unblocked\");\n comments.setSource(Comments.sutra);\n String cond2 = depend + \"According to 6.1.121 plutantas followed by Vowels result in prakruti-bhaava\\n\" + \"However if the word 'iti' used is non-Vedic, then regular sandhis block 6.1.121.\";\n\n comments.setConditions(cond2);\n\n }\n\n // 250\n else if ((X_anta.endsWith(\"I3\") || X_anta.endsWith(\"i3\")) && VowelUtil.isAjadi(X_adi))\n // was making mistake of using vowel.is_Vowel(X_adi) */ )\n {// checked:29-6\n Log.info(\"came in 250\");\n return_me = utsarga_sandhi(X_anta, X_adi); // fixed error above:\n // was sending ITRANS\n // values rather than\n // SLP\n /*\n * sandhi_notes += apavada + sutra + \"'I3 cAkravarmaNasya'\n * (6.1.126)\" + \"Blocks 'pluta-pragRRihyA aci nityam' (6.1.121)\";\n */\n // vowel_notes.start_adding_notes();\n // vowel_notes.set_sutra_num(\"6.1.126\") ;\n // vowel_notes.setSutraPath(\"I3 cAkravarmaNasya\") ;\n // vowel_notes.set_sutra_proc(\"para-rupa ekadesh\");\n // vowel_notes.set_source(tippani.sutra) ;\n String cond1 = \"According to chaakravarman pluta 'i' should be trated as non-plutanta.\\n\" + \"Given in Panini Sutra 'I3 cAkravarmaNasya' (6.1.126). This sutra allows General Sandhis to operate by blocking\" + \"'pluta-pragRRihyA aci nityam' (6.1.121)\";\n comments.append_condition(cond1);\n\n }\n // prakrutibhava starts\n // 233-239 Vedic Usages\n // 243 : error (now fixed) shivA# isAgacha printing as sh-kaar ha-kaar\n // ikaar etc should be shakaar ikaar\n // **********ELSE IF****************//\n else if ((VowelUtil.isPlutanta(X_anta) || this.pragrhya == true) && VowelUtil.isAjadi(X_adi))\n // was making mistake of using Vowel.is_Vowel(X_adi) */ )\n {// checked:29-6\n Log.info(\"came in 243\");\n return_me = prakruti_bhava(X_anta, X_adi); // fixed error above:\n // was sending ITRANS\n // values rather than\n // SLP\n // sandhi_notes = Prkr + sutra + \"pluta-pragRRihyA aci nityam'\n // (6.1.121)\";\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.121\");\n comments.setSutraPath(\"pluta-pragRRihyA aci nityam\");\n comments.setSutraProc(\"prakruti bhava\");\n comments.setSource(Comments.sutra);\n String cond1 = \"pragRRihyas or plutantas followed by any vowel result in NO SANDHI which is prakruti bhava\"; // Fill\n // Later\n comments.setConditions(cond1);\n\n }\n // **********END OF ELSE IF****************//\n\n // **********ELSE IF****************//\n else if (anta.equals(\"go\") && adi.equals(\"indra\")) // Avan~Na Adesh\n {// checked:29-6\n String avang_adesh = EncodingUtil.convertSLPToUniformItrans(\"gava\"); // transform\n // ITRANS\n // gava\n // to\n // SLP\n return_me = guna_sandhi(avang_adesh, X_adi);\n // We have to remove guna_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.120\");\n comments.setSutraPath(\"indre ca\");\n comments.setSutraProc(\"ava~nga Adesha followed by Guna Sandhi\");\n comments.setSource(Comments.sutra);\n String cond1 = \"Blocks Prakruti Bhava, and Ayadi Sandhi.\\n go + indra = go + ava~N + indra = gava + indra = gavendra.\"; // Fill\n // Later\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 241 242 Vik.\n // **********ELSE IF****************//\n else if (anta.equals(\"go\") && VowelUtil.isAjadi(X_adi))\n {// checked:29-6\n\n return_me = utsarga_sandhi(X_anta, X_adi); //\n String avang_adesh = EncodingUtil.convertSLPToUniformItrans(\"gava\"); // transform\n // ITRANS\n // gava\n // to\n // SLP\n return_me += \", \" + utsarga_sandhi(avang_adesh, X_adi);\n\n // We have to remove utsarga_sandhi default notes\n // this is done by\n comments.decrementPointer();\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.119\");\n comments.setSutraPath(\"ava~N sphoTayanasya\");\n comments.setSutraProc(\"ava~nga Adesha followed by Regular Vowel Sandhis\");\n comments.setSource(Comments.sutra);\n String cond1 = padanta + \"View Only Supported by Sphotaayana Acharya.\\n\" + \"padanta 'go' + Vowel gets an avana~N-adesh resulting in gava + Vowel.\"; // Fill\n // Later...filled\n comments.setConditions(cond1);\n\n if (X_adi.startsWith(\"a\"))\n {\n return_me += \", \" + prakruti_bhava(X_anta, X_adi);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.118\");\n comments.setSutraPath(\"sarvatra vibhaaSaa goH\");\n comments.setSutraProc(\"Optional Prakruti Bhava for 'go'(cow)implying words ending in 'e' or 'o'.\");\n comments.setSource(Comments.sutra);\n String cond2 = \"Padanta Dependency. Prakruti bhava if 'go' is followed by any other Phoneme.\"; // Fill\n // Later\n comments.setConditions(cond2);\n\n return_me += \", \" + purva_rupa(X_anta, X_adi);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.105\");\n comments.setSutraPath(\"e~NaH padAntAdati\");\n comments.setSutraProc(\"purva-rupa ekadesh\");\n comments.setSource(Comments.sutra);\n String cond3 = padanta + \"If a padanta word ending in either 'e' or 'o' is followed by an 'a' purva-rupa ekadesh takes place\" + \"\\npadanta <e~N> 'e/o' + 'a' = purva-rupa ekadesha. Blocks Ayadi Sandhi\";\n comments.setConditions(cond3);\n\n }\n }\n // **********END OF ELSE IF****************//\n\n // 243\n\n // 244\n\n // 246 -250 , 253-260\n\n Log.info(\"return_me == \" + return_me);\n Log.info(\"*******EXITED AAPAVADA NIYAMA3s**********\");\n\n return return_me; // apavada rules formulated by Panini\n }", "public TestAbestiakniveltres(String Wording,String Correct){\r\n wording=Wording;\r\n correct=Correct;\r\n\r\n }", "public static void main(String [] args) {\n Guru guru = new Guru();\n\n guru.id = 1;\n guru.nik = \"18630958\";\n guru.nama = \"Rizka Oktaviyani\";\n guru.nilai = 3.6;\n guru.alamat = \"Banjarbaru\";\n guru.tampilData();\n\n Guru guru1 = new Guru(2,\"18630011\", \"Ananda\", 3.1, \"Banjarbaru\");\n guru1.tampilDataDenganGaris( \"---------------------------\");\n\n\n double hasilReturnValue = guru.getNilai();\n System.out.println(\"Hasil return value : \" + hasilReturnValue);\n\n// guru.tampilDataDenganGaris(\"===========================\");\n// guru.tampilDataDenganGaris(\"***************************\");\n// guru.hitungLuasPersegiPanjang(5,3);\n// guru.hitungLuasPersegiPanjang(7,3);\n// guru.hitungLuasPersegiPanjang(8,4);\n// guru.hitungLuasPersegiPanjang(9,2);\n }", "@Test\r\n\tpublic void testGetPeliBalorazioak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 4);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.5);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 3);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 2);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 3.5);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 4);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 5);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\r\n\t}", "public void testGet() {\n System.out.println(\"get\");\n String key = \"\";\n int modo= 0;\n ObjectTempSwapWizard instance = new ObjectTempSwapWizard(modo);\n Object expResult = null;\n Object result = instance.get(key);\n assertEquals(expResult, result);\n }", "public void testTampilkanJumlahSKPP_PNSberdasarkanKodePangkat(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getTampilkanJumlahSKPP_PNSberdasarkanKodePangkat(); \n\n\t\tshowData(data,\"kode_pangkat\",\"jumlah_pns\");\n\t}", "@Test\r\n public void testGetApellido() {\r\n System.out.println(\"getApellido\");\r\n Usuario instance = new Usuario();\r\n String expResult = null;\r\n String result = instance.getApellido();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n public void testToevoegen_Album() {\n System.out.println(\"toevoegen album\");\n Album album = new Album(\"Album\", 2020, nummers);\n instance.toevoegen(album);\n ArrayList<Nummer> expResult = nummers;\n ArrayList<Nummer> result = instance.getAlbumNummers();\n assertEquals(expResult, result);\n }", "public String getNo_hp_pelanggan(){\r\n \r\n return no_hp_pelanggan;\r\n }", "@Test\n\tpublic void testGetAantalSessies(){\n\t\tint expResult = 2;\n\t\tassertEquals(expResult, instance.getAantalSessies());\n\t}", "@Test\n\tpublic void test() {\n\t\tOptional<File> file = fileService.getFileById(\"5d2ed73ce4fb3c2d98feb1b2\");\n\t\tSystem.err.println(file.get().getContent().getData());\n\t\tString res = baiduFaceService.searchFaceOfByte(file.get().getContent().getData(), \"xiaoyou_001\", null);\n\t\tSystem.err.println(res);\n\t\tJSONObject resJson = JSONObject.parseObject(res);\n\t\tJSONObject result = resJson.getJSONObject(\"result\");\n\t\tSystem.err.println(result == null);\n\t}", "@Test\n public void testHasTemperaturaVariation() {\n System.out.println(\"hasTemperaturaVariation\");\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n boolean expResult = true;\n instance.setHasTemperaturaVariation(expResult);\n boolean result = instance.hasTemperaturaVariation();\n assertEquals(expResult, result);\n }", "protected void testVoodoo()\n\t{\n\t\tArrayTemperature at = new ArrayTemperature();\n\t\tint adu;\n\t\tdouble calc_temperature;\n\n//diddly\t\tArrayTemperature.set_algorithm(\"nonlinear\");\n\t\tadu = at.calculate_adu(temperature);\n\t\tSystem.out.println(this.getClass().getName()+\":Voodoo adu = \"+adu);\n//\t\tadu = 0xc60;// 0xc60 is what ccd_text returns.\n//\t\tcalc_temperature = at.calculate_temperature(adu); \n//\t\tSystem.out.println(this.getClass().getName()+\":Voodoo:adu = \"+adu+\", calculated temperature = \"+\n//\t\t\tcalc_temperature);\n\n\t}", "public void testbusquedaAvanzada() {\n// \ttry{\n\t \t//indexarODEs();\n\t\t\tDocumentosVO respuesta =null;//this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"agregatodos identificador:es-ma_20071119_1_9115305\", \"\"));\n\t\t\t/*\t\tObject [ ] value = { null } ;\n\t\t\tPropertyDescriptor[] beanPDs = Introspector.getBeanInfo(ParamAvanzadoVO.class).getPropertyDescriptors();\n\t\t\tString autor=autor\n\t\t\tcampo_ambito=ambito\n\t\t\tcampo_contexto=contexto\n\t\t\tcampo_descripcion=description\n\t\t\tcampo_edad=edad\n\t\t\tcampo_fechaPublicacion=fechaPublicacion\n\t\t\tcampo_formato=formato\n\t\t\tcampo_idiomaBusqueda=idioma\n\t\t\tcampo_nivelEducativo=nivelesEducativos\n\t\t\tcampo_palabrasClave=keyword\n\t\t\tcampo_procesoCognitivo=procesosCognitivos\n\t\t\tcampo_recurso=tipoRecurso\n\t\t\tcampo_secuencia=conSinSecuencia\n\t\t\tcampo_titulo=title\n\t\t\tcampo_valoracion=valoracion\n\t\t\tfor (int j = 0; j < beanPDs.length; j++) {\n\t\t\t\tif(props.getProperty(\"campo_\"+beanPDs[j].getName())!=null){\n\t\t\t\t\tvalue[0]=\"valor a cargar\";\n\t\t\t\t\tsetPropValue(Class.forName(ParamAvanzadoVO.class.getName()).newInstance(), beanPDs[j],value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t*/\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\tcomprobarRespuesta(respuesta.getResultados()[0]);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pruebatitulo\", \"\"));\n//\t\t\tSystem.err.println(\"aparar\");\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"nivel*\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"nived*\"));\n//\t\t\tassertNull(respuesta.getResultados());\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"nivel\"));\n//\t\t\tassertNotNull(respuesta.getResultados());\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"\", \"nivel\"));\n//\t\t\tassertNull(respuesta.getResultados());\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"}f2e_-i3299(--5\"));\n//\t\t\tassertNull(respuesta.getResultados());\n\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"verso estrofa\", \"universal pepito\",\"\"));\n//\t\t\tassertNull(respuesta.getResultados());\n\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"descwildcard\", \"ambito0\",\"\"));\n//\t\t\tassertEquals(respuesta.getSugerencias().length, 1);\n//\t\t\t\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"desc*\", \"\",\"\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 2);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"keywordAvanzado\", \"ambito0\",\"descripcion\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"keywordAvanzado\", \"ambito0\",\"descripcion compuesta\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"keywordAvanzado\", \"ambito0\",\"descripcion pru*\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"descwild*\", \"\",\"\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n// \t}catch(Exception e){\n//\t\t \tlogger.error(\"ERROR: fallo en test buscador-->\",e);\n//\t\t\tthrow new RuntimeException(e);\n// \t}finally{\n// \t\teliminarODE(new String [] { \"asdf\",\"hjkl\"});\n// \t}\n\t\t\tassertNull(respuesta);\n }" ]
[ "0.7354943", "0.72192585", "0.7051877", "0.6490479", "0.6262923", "0.6095349", "0.60694176", "0.60105455", "0.5889058", "0.58180326", "0.5804662", "0.5777771", "0.57128906", "0.5702114", "0.5694434", "0.5667144", "0.56517357", "0.5648709", "0.5634263", "0.559794", "0.55899596", "0.5589411", "0.5584779", "0.5569828", "0.5567494", "0.5543517", "0.5530421", "0.55251867", "0.5522633", "0.5518381", "0.5503255", "0.54818475", "0.54616106", "0.54615843", "0.545418", "0.54391754", "0.5437423", "0.54370886", "0.54328954", "0.5428179", "0.5421593", "0.5408651", "0.540717", "0.5405385", "0.54010105", "0.5397789", "0.5388269", "0.53878826", "0.5386357", "0.53803337", "0.5365628", "0.5360575", "0.53524196", "0.53519976", "0.5349379", "0.53405523", "0.5336927", "0.5335088", "0.5331435", "0.5324894", "0.5313815", "0.53118765", "0.5309017", "0.53009784", "0.529294", "0.52928615", "0.5291924", "0.52915746", "0.5277645", "0.52753794", "0.5269306", "0.52688205", "0.5255448", "0.5253923", "0.525188", "0.52510965", "0.5247947", "0.52426475", "0.5227644", "0.5225745", "0.5223698", "0.5222325", "0.5221409", "0.521864", "0.52170074", "0.5216512", "0.5214059", "0.5213216", "0.51973945", "0.51959926", "0.5193482", "0.51900154", "0.5189291", "0.5188077", "0.518497", "0.5184577", "0.51774883", "0.5173566", "0.5172615", "0.5171994" ]
0.794127
0
Test of findPengguna method, of class DaftarPengguna.
@Test public void testFindPengguna() { System.out.println("findPengguna"); Long id = null; DaftarPengguna instance = new DaftarPengguna(); Pengguna expResult = null; Pengguna result = instance.findPengguna(id); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetPengguna() {\n System.out.println(\"getPengguna\");\n String email = \"\";\n String password = \"\";\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.getPengguna(email, password);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetPenggunas_Long() {\n System.out.println(\"getPenggunas\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n List expResult = null;\n List result = instance.getPenggunas(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetPenggunas_0args() {\n System.out.println(\"getPenggunas\");\n DaftarPengguna instance = new DaftarPengguna();\n List expResult = null;\n List result = instance.getPenggunas();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void searchForProductLandsOnCorrectProduct() {\n\t}", "@Test\n public void searchFindsPlayer() {\n Player jari = stats.search(\"Kurri\");\n assertEquals(jari.getName(), \"Kurri\");\n\n }", "@Test\n public void sucheSaeleBezT() throws Exception {\n System.out.println(\"sucheSaele nach Bezeichnung\");\n bezeichnung = \"Halle 1\";\n typ = \"\";\n plaetzeMin = null;\n ort = null;\n SaalDAO dao=DAOFactory.getSaalDAO();\n query = \"bezeichnung like '%\" + bezeichnung + \"%' \";\n explist = dao.find(query);\n System.out.println(query);\n List<Saal> result = SaalHelper.sucheSaele(bezeichnung, typ, plaetzeMin, ort);\n assertEquals(explist, result);\n \n }", "@Test\n public void testEditPengguna() {\n System.out.println(\"editPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.editPengguna(pengguna);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testAddPengguna() {\n System.out.println(\"addPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.addPengguna(pengguna);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testLookup() {\r\n AvlPuu puu = new AvlPuu();\r\n Noodi noodi = new Noodi(0,0);\r\n noodi.setMatkaJaljella(10);\r\n noodi.setTehtyMatka(0);\r\n PuuSolmu solmu = new PuuSolmu(noodi);\r\n puu.insert(noodi);\r\n assertTrue(puu.lookup(noodi)); \r\n }", "@Test\r\n public void testContains() {\r\n System.out.println(\"contains\");\r\n Solmu solmu = null;\r\n Pala instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.contains(solmu);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testDeletePengguna() throws Exception {\n System.out.println(\"deletePengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.deletePengguna(id);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n @Ignore\r\n public void testFindPaciente() {\r\n System.out.println(\"findPaciente\");\r\n String termo = \"\";\r\n EnfermeiroDaoImpl instance = new EnfermeiroDaoImpl();\r\n List<Enfermeiro> expResult = null;\r\n List<Enfermeiro> result = instance.findPaciente(termo);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testSamaPuu() {\r\n AvlPuu puu = new AvlPuu();\r\n Noodi noodi = new Noodi(0,0);\r\n noodi.setMatkaJaljella(10);\r\n noodi.setTehtyMatka(0);\r\n PuuSolmu solmu = new PuuSolmu(noodi);\r\n puu.insert(noodi);\r\n Noodi noodi2 = new Noodi(1,0);\r\n noodi2.setMatkaJaljella(9);\r\n noodi2.setTehtyMatka(noodi);\r\n PuuSolmu solmu2 = new PuuSolmu(noodi2);\r\n puu.insert(noodi2);\r\n \r\n AvlPuu puu2 = new AvlPuu();\r\n puu2.insert(noodi);\r\n puu2.insert(noodi2);\r\n assertTrue(puu.SamaPuu(puu2));\r\n\r\n }", "@Test\r\n public void testSearch() throws Exception {\r\n System.out.println(\"rechNom\");\r\n Bureau obj1 = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n Bureau obj2 = new Bureau(0,\"Test2\",\"000000001\",\"\");\r\n String nomrech = \"Test\";\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n obj1=instance.create(obj1);\r\n obj2=instance.create(obj2);\r\n \r\n \r\n String result = instance.search(nomrech);\r\n if(result.contains(obj1.getSigle())) fail(\"record introuvable \"+obj1);\r\n if(result.contains(obj2.getSigle())) fail(\"record introuvable \"+obj2);\r\n instance.delete(obj1);\r\n instance.delete(obj2);\r\n }", "@Test\r\n public void testLaskeSolmut() {\r\n AvlPuu puu = new AvlPuu();\r\n Noodi noodi = new Noodi(0,0);\r\n noodi.setMatkaJaljella(10);\r\n noodi.setTehtyMatka(0);\r\n PuuSolmu solmu = new PuuSolmu(noodi);\r\n puu.insert(noodi);\r\n Noodi noodi2 = new Noodi(1,0);\r\n noodi2.setMatkaJaljella(9);\r\n noodi2.setTehtyMatka(noodi);\r\n PuuSolmu solmu2 = new PuuSolmu(noodi2);\r\n puu.insert(noodi2);\r\n assertEquals(puu.laskeSolmut(), 2);\r\n }", "public void runTestSearch() throws TorqueException {\r\n\t}", "public void localizarExibirProdutoCodigo(Prateleira prat){\n Produto mockup = new Produto();\r\n \r\n //pede o codigo para porcuara\r\n int Codigo = Integer.parseInt(JOptionPane.showInputDialog(null,\"Forneca o codigo do produto a ser procurado\" ));\r\n \r\n \r\n //ordena a prateleira\r\n Collections.sort(prat.getPrateleira());\r\n //seta o valor do codigo no auxiliar\r\n mockup.setCodigo(Codigo);\r\n \r\n //faz uma busca binaria no arraylist usando o auxiliar como parametro\r\n int resultado = Collections.binarySearch(prat.getPrateleira() ,mockup);\r\n \r\n //caso não encontre um\r\n if(resultado<0) \r\n //exibe essa mensagem\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" nao encontrado\");\r\n //caso encontre\r\n else {\r\n //mostrar o produto encontrado\r\n VisualizarProduto vp = new VisualizarProduto();\r\n vp.ver((Produto) prat.get(resultado));\r\n }\r\n }", "@Test\n public void testExistenceTestuJedneOsoby() {\n osBeznyMuz = new Osoba(120, 150, Barva.MODRA);\n testJedneOsoby(osBeznyMuz, 120, 150, 70, 140, Barva.MODRA);\n }", "@Test\n public void testUsersRealUnitcodeBestGuess() {\n String unitCode = userMappingDao.getUsersRealUnitcodeBestGuess(\"username2\", tenancy);\n\n assertEquals(\"incorrect unitcode found with best guess\", \"unitcode2\", unitCode);\n }", "@Test\r\n public void testAvlPuu() {\r\n AvlPuu puu = new AvlPuu();\r\n assertEquals(puu.laskeSolmut(), 0);\r\n }", "public int getPapeles(int avenida, int calle);", "public void testFindByKeyword() {\n }", "@Override\n protected void search() {\n \n obtainProblem();\n if (prioritizedHeroes.length > maxCreatures){\n frame.recieveProgressString(\"Too many prioritized creatures\");\n return;\n }\n bestComboPermu();\n if (searching){\n frame.recieveDone();\n searching = false;\n }\n }", "@Test\r\n public void getSalaTest() \r\n {\r\n SalaEntity entity = data.get(0);\r\n SalaEntity resultEntity = salaLogic.getSala(data.get(0).getId());\r\n Assert.assertNotNull(resultEntity);\r\n Assert.assertEquals(entity.getId(), resultEntity.getId());\r\n Assert.assertEquals(resultEntity.getNumero(), entity.getNumero());\r\n }", "@Test\n void searchProduct() {\n List<DummyProduct> L1= store.SearchProduct(\"computer\",null,-1,-1);\n assertTrue(L1.get(0).getProductName().equals(\"computer\"));\n\n List<DummyProduct> L2= store.SearchProduct(null,\"Technology\",-1,-1);\n assertTrue(L2.get(0).getCategory().equals(\"Technology\")&&L2.get(1).getCategory().equals(\"Technology\"));\n\n List<DummyProduct> L3= store.SearchProduct(null,null,0,50);\n assertTrue(L3.get(0).getProductName().equals(\"MakeUp\"));\n\n List<DummyProduct> L4= store.SearchProduct(null,\"Fun\",0,50);\n assertTrue(L4.isEmpty());\n }", "@Test \r\n\t\r\n\tpublic void ataqueDeMagoSinMagia(){\r\n\t\tPersonaje perso=new Humano();\r\n\t\tEspecialidad mago=new Hechicero();\r\n\t\tperso.setCasta(mago);\r\n\t\tperso.bonificacionDeCasta();\r\n\t\t\r\n\t\tPersonaje enemigo=new Orco();\r\n\t\tEspecialidad guerrero=new Guerrero();\r\n\t\tenemigo.setCasta(guerrero);\r\n\t\tenemigo.bonificacionDeCasta();\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(44,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t//ataque normal\r\n\t\tperso.atacar(enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t// utilizar hechizo\r\n\t\tperso.getCasta().getHechicero().agregarHechizo(\"Engorgio\", new Engorgio());\r\n\t\tperso.getCasta().getHechicero().hechizar(\"Engorgio\",enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(20,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t}", "@Test\r\n public void testLisaakaari() {\r\n System.out.println(\"lisaakaari\");\r\n Kaari kaari = null;\r\n Pala instance = null;\r\n instance.lisaakaari(kaari);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testLisaasolmu() {\r\n System.out.println(\"lisaasolmu\");\r\n Solmu solmu = null;\r\n Pala instance = null;\r\n instance.lisaasolmu(solmu);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n \tpublic void testMakingSuggestion() {\n \t\t//make computer player, set location, and update seen\n \t\tComputerPlayer player = new ComputerPlayer();\n \t\tjava.awt.Point location = new java.awt.Point(9,19);\n \t\tplayer.setLocation(location);\n \t\tplayer.setCurrentRoom('D');\n \t\tCard mustardCard = new Card(\"Colonel Mustard\", Card.cardType.PERSON);\n \t\tCard knifeCard = new Card (\"Knife\", Card.cardType.WEAPON);\n \t\tCard libraryCard = new Card(\"Library\", Card.cardType.ROOM);\n \t\tplayer.updateSeen(mustardCard);\n \t\tplayer.updateSeen(knifeCard);\n \t\tplayer.updateSeen(libraryCard);\n \t\t\n \t\t//make suggestion and test\n \t\tfor(int i = 0; i < 100; i++) {\n \t\t\tSolution guess = player.createSuggestion();\n \t\t\tAssert.assertEquals(\"Dining Room\", guess.getRoom());\n \t\t\tCard guessPerson = new Card(guess.getPerson(), Card.cardType.PERSON);\n \t\t\tAssert.assertFalse(player.seen.contains(guessPerson));\n \t\t\tCard guessWeapon = new Card(guess.getWeapon(), Card.cardType.WEAPON);\n \t\t\tAssert.assertFalse(player.seen.contains(guessWeapon));\n \t\t}\n \t}", "@Test\n public void testUsersRealNhsNoBestGuess() {\n String unitCode = userMappingDao.getUsersRealNhsNoBestGuess(\"username2\", tenancy);\n\n assertEquals(\"incorrect nhsno found with best guess\", \"nhsno2\", unitCode);\n }", "@Test\n public void testCheckId() {\n System.out.println(\"checkId\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n boolean expResult = false;\n boolean result = instance.checkId(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testOnkoSama() {\r\n System.out.println(\"onkoSama\");\r\n Pala toinenpala = null;\r\n Pala instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.onkoSama(toinenpala);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void testFindByCatalogo() {\n }", "@Test\n\tpublic void testFindBy() throws PaaSApplicationException {\n\t\tList<String> members = getMembers();\n\n\t\tGroup expected = new Group();\n\t\texpected.setGid(1);\n\t\texpected.setName(\"tstdaemon\");\n\t\texpected.setMembers(members);\n\n\t\tGroup actual = repo.findBy(1);\n\t\tAssertions.assertEquals(expected, actual, \"Find group by Id\");\n\t}", "@Test\n public void testIsApellido_Paterno() {\n System.out.println(\"isApellido_Paterno\");\n String AP = \"ulfric\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Paterno(AP);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n\tpublic void testSearchBasedOnRequest4() {\n\t\tsearchBasedOnRequestSetup();\n\t\t\n\t\tList<Suggestion> sugg = dm.searchBasedOnRequest(\"Flavorful\", null, true);\n\t\tassertTrue(sugg.size() == 0);\n\t}", "public void search() {\r\n\t\tfloat dist = getDistance(permutationPrev);\r\n\t\tfloat delta = 0;\r\n\t\tfloat prob = 0;\r\n\r\n\t\tboolean accept = false;\r\n\r\n\t\tRandom rand = new Random();\r\n\r\n\t\twhile ((temperature > minTemperature) || (nIter > 0)) {\r\n\t\t\tdisturbPermut(permutationPrev);\r\n\t\t\tdelta = getDistance(permutation) - dist;\r\n\r\n\t\t\tprob = (float) Math.exp(-delta / temperature);\r\n\t\t\taccept = ((delta < 0) || (delta * (prob - rand.nextFloat()) >= 0));\r\n\r\n\t\t\tif (accept) {\r\n\t\t\t\tacceptPermution(permutation);\r\n\t\t\t\tdist = delta + dist;\r\n\t\t\t}\r\n\r\n\t\t\ttemperature *= cBoltzman;\r\n\t\t\tnIter--;\r\n\r\n\t\t\ttrace.add(dist);\r\n\t\t}\r\n\t\tshortestDist = dist;\r\n\t}", "public void testFindByTitulo() {\n }", "@Test\n\tvoid searchTest() {\n\t}", "@Test\n public void testGetVaarin() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n k.tarkistaVastaus(\"vaarav vastaus\");\n k.tarkistaVastaus(\"trololololoo\");\n int virheita = k.getVaarin();\n\n assertEquals(\"Väärin menneiden tarkistusten lasku ei toimi\", 2, virheita);\n }", "@Test\n public void testFindSpecificPassenger() {\n System.out.println(\"findSpecificPassenger\");\n Passenger p = new Passenger();\n PassengerHandler instance = new PassengerHandler();\n ArrayList<Passenger> expResult = new ArrayList();\n p.setPassengerID(3); \n expResult.add(p);\n ArrayList<Passenger> result = instance.findSpecificPassenger(p);\n assertEquals(expResult, result);\n \n }", "private void searchFunction() {\n\t\t\r\n\t}", "@Ignore\n @Test\n public void testDajLokaciju() throws Exception {\n System.out.println(\"dajLokaciju\");\n String adresa = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n Lokacija expResult = null;\n Lokacija result = instance.dajLokaciju(adresa);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testSearch() throws Exception {\n LocalLandCharge localLandChargeOne = TestUtils.buildLocalLandCharge();\n localLandChargeOne.getItem().setChargeCreationDate(new Date(1));\n\n LocalLandCharge localLandChargeTwo = TestUtils.buildLocalLandCharge();\n localLandChargeTwo.getItem().setChargeCreationDate(new Date(3));\n\n LocalLandCharge localLandChargeThree = TestUtils.buildLocalLandCharge();\n localLandChargeThree.getItem().setChargeCreationDate(new Date(2));\n\n LocalLandCharge lightObstructionNotice = TestUtils.buildLONCharge();\n localLandChargeTwo.getItem().setChargeCreationDate(new Date(4));\n\n testGenerate(Lists.newArrayList(localLandChargeOne, localLandChargeTwo, localLandChargeThree,\n lightObstructionNotice));\n }", "@Test\n public void getQuejaTest() {\n QuejaEntity entity = data.get(0);\n QuejaEntity newEntity = quejaPersistence.find(dataServicio.get(0).getId(), entity.getId());\n Assert.assertNotNull(newEntity);\n Assert.assertEquals(entity.getName(), newEntity.getName());\n }", "@Test\n public void testAlunPainotus() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n String kysymys = k.alunPainotus(true);\n\n\n assertEquals(\"AlunPainoitus ei toimi\", \"sana\", kysymys);\n }", "@Test\r\n public void testYhdista() {\r\n System.out.println(\"yhdista\");\r\n Pala toinenpala = null;\r\n Palahajautustaulu taulu = null;\r\n Pala instance = null;\r\n instance.yhdista(toinenpala, taulu);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testGetEmf() {\n System.out.println(\"getEmf\");\n DaftarPengguna instance = new DaftarPengguna();\n EntityManagerFactory expResult = null;\n EntityManagerFactory result = instance.getEmf();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testVaticanReport() {\n Game game = new Game(2);\n FaithTrack faith = game.getPlayers().get(0).getFaithTrack();\n faith.increasePos(5);\n assertTrue(faith.isVatican());\n faith.vaticanReport(1);\n assertEquals(faith.getBonusPoints()[0], 2);\n faith.increasePos(5);\n faith.vaticanReport(2);\n assertEquals(faith.getBonusPoints()[0], 2);\n }", "@Test\n public void testFindProduct() {\n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n \n assertTrue(instance.findProduct(\"Galletas\"));\n }", "public void testFind() {\r\n assertNull(tree.find(\"apple\"));\r\n tree.insert(\"apple\");\r\n tree.insert(\"act\");\r\n tree.insert(\"bagel\");\r\n assertEquals(\"act\", tree.find(\"act\"));\r\n assertEquals(\"apple\", tree.find(\"apple\"));\r\n assertEquals(\"bagel\", tree.find(\"bagel\"));\r\n }", "@Test\n public void testLukitseRuutu() {\n System.out.println(\"lukitseRuutu\");\n int x = 0;\n int y = 0;\n Peli peli = new Peli(new Alue(3, 1));\n peli.lukitseRuutu(x, y);\n ArrayList[] lista = peli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isLukittu());\n }", "public List<Ve> searchVe(String maSearch);", "private int FindGold() {\n VuforiaLocalizer vuforia;\n\n /**\n * {@link #tfod} is the variable we will use to store our instance of the Tensor Flow Object\n * Detection engine.\n */\n TFObjectDetector tfod;\n \n VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters();\n\n parameters.vuforiaLicenseKey = VUFORIA_KEY;\n parameters.cameraDirection = 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 \n\n /**\n * Initialize the Tensor Flow Object Detection engine.\n */\n if (ClassFactory.getInstance().canCreateTFObjectDetector()) {\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 tfod.activate();\n } else {\n telemetry.addData(\"Sorry!\", \"This device is not compatible with TFOD\");\n return 3;\n }\n\n int Npos1=0;\n int Npos2=0;\n int Npos3=0;\n int NposSilver1=0;\n int NposSilver2=0;\n int NposSilver3=0;\n double t_start = getRuntime();\n\n\n while (opModeIsActive()) {\n \n if( (getRuntime() - t_start ) > 3.5) break;\n if (Npos1 >=5 || Npos2>=5 || Npos3>=5)break;\n if (NposSilver1>=5 && NposSilver2>=5)break;\n if (NposSilver2>=5 && NposSilver3>=5)break;\n if (NposSilver1>=5 && NposSilver3>=5)break;\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 //telemetry.addData(\"# Object Detected\", updatedRecognitions.size());\n //if (updatedRecognitions.size() == 3) {\n int goldMineralX = -1;\n int silverMineralX = -1;\n for (Recognition recognition : updatedRecognitions) {\n if (recognition.getLabel().equals(LABEL_GOLD_MINERAL)) {\n goldMineralX = (int) recognition.getLeft();\n telemetry.addData(\"gold position\", goldMineralX);\n if(goldMineralX<300) {\n Npos1++;\n telemetry.addData(\"loc\", 1);\n }else if(goldMineralX<800){\n Npos2++;\n telemetry.addData(\"loc\", 2);\n }else{\n Npos3++;\n telemetry.addData(\"loc\", 3);\n }\n } \n \n if (recognition.getLabel().equals(LABEL_SILVER_MINERAL)) {\n silverMineralX = (int) recognition.getLeft();\n telemetry.addData(\"silver position\", silverMineralX);\n if(silverMineralX<300) {\n NposSilver1++;\n telemetry.addData(\"loc\", 1);\n }else if(silverMineralX<300){\n NposSilver2++;\n telemetry.addData(\"loc\", 2);\n }else{\n NposSilver3++;\n telemetry.addData(\"loc\", 3);\n }\n } \n }\n telemetry.update();\n }\n }\n }\n\n\n if (tfod != null) {\n tfod.shutdown();\n }\n \n \n \n telemetry.addData(\"\", 2);\n \n if (Npos1>=5)return 1;\n if (Npos2>=5)return 2;\n if (Npos3>=5)return 3;\n if (NposSilver1>=5 && NposSilver2>=5)return 3;\n if (NposSilver2>=5 && NposSilver3>=5)return 1; \n if (NposSilver1>=5 && NposSilver3>=5)return 2;\n\n return 3;\n }", "@Test\r\n public void testPartido2() throws Exception { \r\n P2.fijarEquipos(\"Barça\",\"Depor\"); \r\n P2.comenzar(); \r\n P2.tantoLocal();\r\n P2.terminar(); \r\n assertEquals(\"Barça\",P2.ganador());\r\n }", "public void testbusquedaSimple() {\n// \t try{\n//\t\t\t\tindexarODEs();\n//\t\t\t\tDocumentosVO respuesta =this.servicio.busquedaSimple(generarParametrosBusquedaSimple(\"key*Avanzad?\"));\n//\t\t\t\tassertNotNull(respuesta.getResultados());\n//\t\t\t\tcomprobarRespuesta(respuesta.getResultados()[0]);\n//\t\t\t\trespuesta =this.servicio.busquedaSimple(generarParametrosBusquedaSimple(\"}f2e_-i3299(--5\"));\n//\t\t\t\tassertNull(respuesta.getResultados());\n//\t\t\t\tassertEquals(respuesta.getSugerencias().length,0);\n// \t }catch(Exception e){\n// \t\t \tlogger.error(\"ERROR: fallo en test buscador-->\",e);\n// \t\t\tthrow new RuntimeException(e);\n// \t }finally{\n// \t\teliminarODE(new String [] { \"asdf\",\"hjkl\"});\n// \t }\n \t String prueba = null; \n \t\tassertNull(prueba);\n }", "static void searchProductDB() {\n\n int productID = Validate.readInt(ASK_PRODUCTID); // store product ID of user entry\n\n\n productDB.findProduct(productID); // use user entry as parameter for the findProduct method and if found will print details of product\n\n }", "@Test\n public void yksiVasemmalle() {\n char[][] kartta = Labyrintti.lueLabyrintti(\"src/main/resources/labyrinttiTestiVasen.txt\");\n assertFalse(kartta == null);\n Labyrintti labyrintti = new Labyrintti(kartta);\n RatkaisuLeveyshaulla ratkaisuSyvyyshaulla = new RatkaisuLeveyshaulla(labyrintti);\n String ratkaisu = ratkaisuSyvyyshaulla.ratkaisu();\n assertTrue(Tarkistaja.tarkista(ratkaisu, labyrintti));\n }", "@Test\n public void getTarjetasPrepagoTest() {\n List<TarjetaPrepagoEntity> list = tarjetaPrepagoLogic.getTarjetasPrepago();\n Assert.assertEquals(data.size(), list.size());\n for (TarjetaPrepagoEntity entity : list) {\n boolean found = false;\n for (TarjetaPrepagoEntity storedEntity : data) {\n if (entity.getId().equals(storedEntity.getId())) {\n found = true;\n }\n }\n Assert.assertTrue(found);\n }\n }", "@Override\r\n\tpublic int locsearch(FoodshopVO vo) {\n\t\treturn 0;\r\n\t}", "public static int search (String searching)\n {\n ListAlbum listAlbum = new ListAlbum(true, false, false);\n AlbumXmlFile.readAllAlbumsFromDataBase(listAlbum, true);\n Iterator albumIterator = listAlbum.iterator();\n Album actualAlbum;\n int actualAlbumIndex=0;\n while (albumIterator.hasNext())\n {\n \n actualAlbum = (Album) albumIterator.next();\n \n if (actualAlbum.getName().equals(searching))\n {\n JSoundsMainWindowViewController.showAlbumResults(true, false, false, actualAlbum);\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n return 1;\n }\n else if (actualAlbum.getArtist().getName().equals(searching))\n {\n JSoundsMainWindowViewController.showAlbumResults(true, false, false, actualAlbum);\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n return 1;\n }\n actualAlbum.getSongs();\n Iterator songsIterator = actualAlbum.getSongs().iterator();\n int actualSongIndex = 0;\n\n while (songsIterator.hasNext())\n {\n /* Se añade el número de la canción al modelo de la lista */\n Song song = (Song) songsIterator.next();\n if (song.getName().equals(searching))\n {\n JSoundsMainWindowViewController.showSongResults(true, false, false, actualAlbum,song,actualSongIndex);\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n indexFromSearchedSong=actualSongIndex;\n if (alreadyPlaying)\n {\n JSoundsMainWindowViewController.stopSong();\n alreadyPlaying=false;\n dontInitPlayer=true;\n }\n //playListSongs(true);\n return 1;\n }\n actualSongIndex++;\n }\n actualAlbumIndex++;\n }\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Not Found :( \");\n return 0;\n }", "void search();", "void search();", "@Test\n\tpublic void testSearchBasedOnRequest2() {\n\t\tsearchBasedOnRequestSetup();\n\t\t\n\t\tPreference prefs = prefManager.getUserPreference();\n\t\tprefs.setThreshold(10000);\n\t\t\n\t\tList<Suggestion> sugg = dm.searchBasedOnRequest(\"lokeyanhao\", prefs, true);\n\t\tassertTrue(sugg.size() > 0);\n\t\tassertTrue(sugg.get(0).getType() == Suggestion.ENTITY);\n\t}", "@Test\n\tpublic void testSearchWholeProgramPascal() throws Exception {\n\t\tdialog = getDialog();\n\t\tContainer container = dialog.getComponent();\n\n\t\t// turn on pascal\n\t\tJCheckBox cb = (JCheckBox) findButton(container, \"Pascal Strings\");\n\t\tcb.setSelected(true);\n\n\t\t// turn off null Terminate box\n\t\tcb = (JCheckBox) findButton(container, \"Require Null Termination\");\n\t\tcb.setSelected(false);\n\n\t\tStringTableProvider provider = performSearch();\n\t\tStringTableModel model = (StringTableModel) getInstanceField(\"stringModel\", provider);\n\t\tGhidraTable table = (GhidraTable) getInstanceField(\"table\", provider);\n\t\ttoggleDefinedStateButtons(provider, false, true, false, false);\n\t\twaitForTableModel(model);\n\t\tsetAutoLabelCheckbox(provider, true);\n\n\t\t// test the results size and the first entry and the last unicode and last string entry\n\t\t// they are in the list in a different order than they are in the dialog\n\t\t// the dialog shows them in address order\n\t\t// the array list has all the regular strings first and then all the unicode - each set in address order\n\n\t\t// first entry\n\t\tassertEquals(\"00404f10\", getModelValue(model, 0, addressColumnIndex).toString());\n\n\t\t// last entry\n\t\tassertEquals(\"00405e00\",\n\t\t\tgetModelValue(model, model.getRowCount() - 1, addressColumnIndex).toString());\n\n\t\t// check the table entries in some of the rows to make sure they are\n\t\t// populated correctly\n\n\t\t// row [0] should be Pascal Unicode\n\t\tassertEquals(null, getModelValue(model, 0, labelColumnIndex));\n\t\tCodeUnitTableCellData data =\n\t\t\t(CodeUnitTableCellData) getModelValue(model, 0, previewColumnIndex);\n\t\tassertEquals(\"?? 0Ah\", data.getDisplayString());\n\t\tassertEquals(\"u\\\"\\\\rString9\\\\n\\\\r\\\"\", getModelValue(model, 0, asciiColumnIndex));\n\n\t\tString stringData = (String) getModelValue(model, 0, isWordColumnIndex);\n\t\tassertEquals(\"true\", stringData);\n\n\t\t// row [2] should be Pascal 255\n\t\tint row = findRow(model, addr(0x404fde));\n\t\tassertEquals(\"00404fde\", getModelValue(model, row, addressColumnIndex).toString());\n\t\tassertEquals(null, getModelValue(model, row, labelColumnIndex));\n\t\tdata = (CodeUnitTableCellData) getModelValue(model, row, previewColumnIndex);\n\t\tassertEquals(\"?? 0Ah\", data.getDisplayString());\n\t\tassertEquals(\"\\\"\\\\rString6\\\\n\\\\r\\\"\", getModelValue(model, row, asciiColumnIndex));\n\n\t\tstringData = (String) getModelValue(model, row, isWordColumnIndex);\n\t\tassertEquals(\"true\", stringData);\n\n\t\t// row [5] should be Pascal\n\t\trow = findRow(model, addr(0x405d91));\n\t\tassertEquals(\"00405d91\", getModelValue(model, row, addressColumnIndex).toString());\n\t\tassertEquals(null, getModelValue(model, row, labelColumnIndex));\n\n\t\tdata = (CodeUnitTableCellData) getModelValue(model, row, previewColumnIndex);\n\t\tassertEquals(\"?? 07h\", data.getDisplayString());\n\t\tassertEquals(\"\\\"p2Test1\\\"\", getModelValue(model, row, asciiColumnIndex));\n\n\t\tstringData = (String) getModelValue(model, row, isWordColumnIndex);\n\t\tassertEquals(\"false\", stringData);\n\n\t\t//********************************************************\n\t\t//***********TEST SELECTING ROW IN TABLE*******************\n\t\t// ********* test that selecting a row does the following:\n\t\t//**********************************************************\n\t\tselectRow(table, 0);\n\n\t\t// test that the row is really selected\n\t\tint[] ts = table.getSelectedRows();\n\t\tassertEquals(1, ts.length);\n\t\tassertEquals(0, ts[0]);\n\n\t\t// is the make string button enabled (should be)\n\t\tJButton makeStringButton = (JButton) findButton(provider.getComponent(), \"Make String\");\n\t\tassertTrue(makeStringButton.isEnabled());\n\n\t\t// is the make ascii button enabled\n\t\tJButton makeAsciiButton = (JButton) findButton(provider.getComponent(), \"Make Char Array\");\n\t\tassertTrue(makeAsciiButton.isEnabled());\n\n\t\tDockingAction makeStringAction =\n\t\t\t(DockingAction) getInstanceField(\"makeStringAction\", provider);\n\n\t\ttoggleDefinedStateButtons(provider, true, true, false, false);\n\t\twaitForTableModel(model);\n\t\tint selectedRow = table.getSelectedRow();\n\n\t\tperformAction(makeStringAction, model);\n\n\t\t// test that the string was actually made correctly\n\t\tData d = listing.getDataAt(addr(0x404f10));\n\t\tDataType dt = d.getBaseDataType();\n\t\tassertTrue(dt instanceof PascalUnicodeDataType);\n\n\t\t// test that the string len is correct to get the end of chars\n\t\tassertEquals(22, d.getLength());\n\n\t\t// test that the label was made\n\t\tSymbol sym = program.getSymbolTable().getPrimarySymbol(addr(0x404f10));\n\t\tassertEquals(\"pu__String9\", sym.getName());\n\n\t\tAddressBasedLocation location =\n\t\t\t(AddressBasedLocation) getModelValue(model, selectedRow, addressColumnIndex);\n\t\tAddress address = location.getAddress();\n\t\tif (address.getOffset() != 0x404f10) {\n\t\t\tTableSortState tableSortState = model.getTableSortState();\n\t\t\tMsg.debug(this, \"sort state = \" + tableSortState); // should be address column\n\t\t\tList<FoundString> modelData = model.getModelData();\n\t\t\tMsg.debug(this,\n\t\t\t\t\"selected model row address is \" + address.getOffset() + \" expected \" + 0x404f10);\n\t\t\tfor (int i = 0; i < modelData.size(); i++) {\n\t\t\t\tMsg.debug(this,\n\t\t\t\t\t\"row \" + i + \" addr = \" + getModelValue(model, i, addressColumnIndex));\n\t\t\t}\n\t\t\tAssert.fail();\n\t\t}\n\n\t\t// test that the table was updated with the label and preview\n\t\tassertEquals(\"pu__String9\", getModelValue(model, selectedRow, labelColumnIndex).toString());\n\n\t\tdata = (CodeUnitTableCellData) getModelValue(model, selectedRow, previewColumnIndex);\n\t\tassertEquals(\"p_unicode u\\\"\\\\rString9\\\\n\\\\r\\\"\", data.getDisplayString());\n\n\t\tstringData = (String) getModelValue(model, selectedRow, isWordColumnIndex);\n\t\tassertEquals(\"true\", stringData);\n\n\t\t// test that the String Type is correct\n\t\tassertEquals(\"PascalUnicode\",\n\t\t\tgetModelValue(model, selectedRow, stringTypeColumnIndex).toString());\n\n\t\t// check that the selected row in the table moves to the next row\n\t\tts = table.getSelectedRows();\n\t\tassertEquals(1, ts.length);\n\t\tassertEquals(selectedRow + 1, ts[0]);\n\n\t\t// Test Pascal 255\n\t\t// select the fourth row\n\t\tselectRows(table, addr(0x0405d80));\n\t\tselectedRow = table.getSelectedRow();\n\t\tperformAction(makeStringAction, model);\n\n\t\t// test that the pascal 255 string was actually made correctly\n\t\td = listing.getDataAt(addr(0x405d80));\n\t\tdt = d.getBaseDataType();\n\t\tassertTrue(dt instanceof PascalString255DataType);\n\n\t\t// test that the string len is correct to get the end of chars\n\t\tassertEquals(6, d.getLength());\n\n\t\t// test that the label was made\n\t\tsym = program.getSymbolTable().getPrimarySymbol(addr(0x405d80));\n\t\tassertEquals(\"p_Test1\", sym.getName());\n\n\t\t// test that the table was updated with the label and preview\n\t\tassertEquals(\"p_Test1\", getModelValue(model, selectedRow, labelColumnIndex).toString());\n\n\t\tdata = (CodeUnitTableCellData) getModelValue(model, selectedRow, previewColumnIndex);\n\t\tassertEquals(\"p_string255 \\\"Test1\\\"\", data.getDisplayString());\n\n\t\tstringData = (String) getModelValue(model, selectedRow, isWordColumnIndex);\n\t\tassertEquals(\"true\", stringData);\n\n\t\t// test that the String Type is correct\n\t\tassertEquals(\"PascalString255\",\n\t\t\tgetModelValue(model, selectedRow, stringTypeColumnIndex).toString());\n\n\t\t// Test Pascal\n\t\t// select the sixth row\n\t\tselectRows(table, addr(0x405d91));\n\t\tselectedRow = table.getSelectedRow();\n\t\tperformAction(makeStringAction, model);\n\n\t\t// test the dialog message once the run is finished\n\t\t// test that the pascal string was actually made correctly\n\t\td = listing.getDataAt(addr(0x405d91));\n\t\tdt = d.getBaseDataType();\n\t\tassertTrue(dt instanceof PascalStringDataType);\n\n\t\t// test that the string len is correct to get the end of chars\n\t\tassertEquals(9, d.getLength());\n\n\t\t// test that the label was made\n\t\tsym = program.getSymbolTable().getPrimarySymbol(addr(0x405d91));\n\t\tassertEquals(\"p_p2Test1\", sym.getName());\n\n\t\t// test that the table was updated with the label and preview\n\t\tassertEquals(\"p_p2Test1\", getModelValue(model, selectedRow, labelColumnIndex).toString());\n\n\t\tdata = (CodeUnitTableCellData) getModelValue(model, selectedRow, previewColumnIndex);\n\t\tassertEquals(\"p_string \\\"p2Test1\\\"\", data.getDisplayString());\n\n\t\tstringData = (String) getModelValue(model, selectedRow, isWordColumnIndex);\n\t\tassertEquals(\"false\", stringData);\n\n\t\t// test that the String Type is correct\n\t\tassertEquals(\"PascalString\",\n\t\t\tgetModelValue(model, selectedRow, stringTypeColumnIndex).toString());\n\n\t}", "@Test\n public void test6FindByHeadquarters() {\n System.out.println(\"Prueba de Headquarters en metodo findByHeadquarters\");\n HeadquartersDAO dao = HeadquartersFactory.create(Headquarters.class);\n List<Headquarters> lista = dao.findByHeadquarters(\"SENA SEDE BARRIO COLOMBIA\");\n assertTrue(!lista.isEmpty());\n for (Headquarters headquarters : lista) {\n assertEquals(headquarters.getNameHeadquarters(),\"SENA SEDE BARRIO COLOMBIA\");\n }\n }", "@Test\r\n\tpublic void testGetPeliBalorazioak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 4);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.5);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 3);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 2);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 3.5);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 4);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 5);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\r\n\t}", "@Test\n public void tilimaksuKutsuuTilisiirtoaOikeillaParametreilla() {\n when(this.varasto.saldo(1)).thenReturn(10);\n when(this.varasto.haeTuote(1)).thenReturn(new Tuote(1, \"maito\", 5));\n \n this.kauppa.aloitaAsiointi();\n this.kauppa.lisaaKoriin(1);\n this.kauppa.tilimaksu(\"johannes\", \"12345\");\n verify(this.pankki).tilisiirto(eq(\"johannes\"), anyInt(), eq(\"12345\"), anyString(), eq(5));\n \n }", "@Test\n public void clueFromCodenameShouldReturnSaidCodename()\n {\n String codename = DatabaseHelper.getRandomCodename();\n String[] clues = DatabaseHelper.getCluesForCodename(codename);\n int errors = 0;\n\n for (int i = 0; i < clues.length; i++)\n {\n int index = Arrays.binarySearch(DatabaseHelper.getCodenamesForClue(clues[i]), codename);\n if (!(index >= 0))\n {\n errors++;\n }\n\n }\n\n assertEquals(0, errors);\n }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th sponsor institut of a techn report.uas\");\n assertEquals(\"th spons institut of a techn report.ua\", string0);\n }", "@Test\n\tpublic void testSearchBasedOnRequest1() {\n\t\tsearchBasedOnRequestSetup();\n\t\t\n\t\tPreference prefs = prefManager.getUserPreference();\n\t\tprefs.setThreshold(10000);\n\t\t\n\t\tList<Suggestion> sugg = dm.searchBasedOnRequest(\"Flavorful\", prefs, true);\n\t\tassertTrue(sugg.size() > 0);\n\t\tassertTrue(sugg.get(0).getType() == Suggestion.SENTENCE);\n\t}", "public static boolean testPokemomGetSet() {\r\n Pokemon inst = new Pokemon(\"name\", \"type1\", \"type2\", 2, 3, 4, 5, 6, 7, 8, false, false);\r\n if (!Objects.equals(inst.getName(), \"name\") || !Objects.equals(inst.getType1(), \"type1\")\r\n || !Objects.equals(inst.getType2(), \"type2\") || !Objects.equals(inst.getHp(), 2)\r\n || !Objects.equals(inst.getAttack(), 3) || !Objects.equals(inst.getDefense(), 4)\r\n || !Objects.equals(inst.getSpAttack(), 5) || !Objects.equals(inst.getSpDefense(), 6)\r\n || !Objects.equals(inst.getSpeed(), 7) || !Objects.equals(inst.getTotal(), 8)\r\n || !Objects.equals(inst.isLegendary(), false) || !Objects\r\n .equals(inst.getFavorite(), false)) {\r\n return false;\r\n }\r\n inst.setName(\"sName\");\r\n inst.setType1(\"ttype1\");\r\n inst.setType2(\"ttype2\");\r\n inst.setHp(11);\r\n inst.setAttack(10);\r\n inst.setDefense(33);\r\n inst.setSpAttack(44);\r\n inst.setSpDefense(41);\r\n inst.setSpeed(1);\r\n inst.setTotal(222);\r\n inst.setLegendary(true);\r\n inst.setFavorite(true);\r\n if (!Objects.equals(inst.getName(), \"sName\") || !Objects.equals(inst.getType1(), \"ttype1\")\r\n || !Objects.equals(inst.getType2(), \"ttype2\") || !Objects.equals(inst.getHp(), 11)\r\n || !Objects.equals(inst.getAttack(), 10) || !Objects.equals(inst.getDefense(), 33)\r\n || !Objects.equals(inst.getSpAttack(), 44) || !Objects.equals(inst.getSpDefense(), 41)\r\n || !Objects.equals(inst.getSpeed(), 1) || !Objects.equals(inst.getTotal(), 222)\r\n || !Objects.equals(inst.isLegendary(), true) || !Objects\r\n .equals(inst.getFavorite(), true)) {\r\n return false;\r\n }\r\n return true;\r\n }", "private static PohonAVL seimbangkanKembaliKanan(PohonAVL p) {\n //...\n // Write your codes in here\n }", "@Test(timeout = 4000)\n public void test44() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"kg7xar/<p=?\");\n assertEquals(\"kg7xar/<p=?\", string0);\n }", "@Test\n public void test_distanceLinaireSurX_distanceLinaireSurX_ParcourOptimum_Pour_4villes() {\n\n Pays pays = new Pays(4);\n\n int positionY = (int) (Math.random() * 50);\n\n pays.setPositionVille(0, new Point(2, positionY));\n pays.setPositionVille(1, new Point(3, positionY));\n pays.setPositionVille(2, new Point(4, positionY));\n pays.setPositionVille(3, new Point(5, positionY));\n\n brutForceV3.recherche(pays, 0);\n\n assertEquals(\"0>1>2>3>0\", brutForceV3.getParcours().getVillesEmprunté());\n assertEquals(brutForceV3.getParcours().getDistance(),\n parcoursVilles(pays, brutForceV3.getParcours().getVillesEmprunté(),\">\"));\n\n }", "@Test\r\n public void testBuscarUsuarios() {\r\n System.out.println(\"BuscarUsuarios\");\r\n Usuario pusuario = new Usuario(); \r\n pusuario.setUsuario(\"MSantiago\");\r\n \r\n BLUsuario instance = new BLUsuario();\r\n \r\n Usuario result = instance.BuscarUsuarios(pusuario); \r\n if(result == null) fail(\"La busqueda no ha retornado resultado.\");\r\n else\r\n {\r\n assertEquals(pusuario.getUsuario(),result.getUsuario());\r\n System.out.println(\"Se encontró el usuario.\");\r\n }\r\n\r\n \r\n }", "@Test\n\tpublic void testDarApellido()\n\t{\n\t\tassertEquals(\"El apellido esperado es Romero.\", \"Romero\", paciente.darApellido());\n\t}", "@Test\n public void testConsultarPelaChave() throws Exception {\n System.out.println(\"consultarPelaChave\");\n String chave = \"\";\n ConfiguracaoTransferencia result = instance.consultarPelaChave(chave);\n assertNotNull(result);\n }", "abstract public void search();", "@Test\n public void testAvaaRuutu() {\n int x = 0;\n int y = 0;\n Peli pjeli = new Peli(new Alue(3, 0));\n pjeli.avaaRuutu(x, y);\n ArrayList[] lista = pjeli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isAvattu());\n assertEquals(false, pjeli.isLahetetty());\n }", "public void okFind()\n {\n ASPManager mgr = getASPManager();\n\n trans.clear();\n q = trans.addQuery(headblk);\n q.addWhereCondition(\"WO_NO<(SELECT Number_Serie_API.Get_Last_Wo_Number FROM DUAL) AND CONTRACT IN(SELECT User_Allowed_Site_API.Authorized(CONTRACT) FROM DUAL)\");\n q.addWhereCondition(\"CONNECTION_TYPE_DB = 'EQUIPMENT'\");\n q.includeMeta(\"ALL\");\n\n // nimhlk - Begin\n if (mgr.dataTransfered())\n {\n ASPBuffer retBuffer = mgr.getTransferedData();\n if (retBuffer.itemExists(\"WO_NO\"))\n {\n String ret_wo_no = retBuffer.getValue(\"WO_NO\");\n q.addWhereCondition(\"WO_NO = ?\");\n q.addParameter(\"WO_NO\",ret_wo_no);\n }\n else\n q.addOrCondition(mgr.getTransferedData());\n }\n // nimhlk - End\n\n mgr.querySubmit(trans,headblk);\n\n if (headset.countRows() == 0)\n {\n mgr.showAlert(mgr.translate(\"PCMWACTIVESEPARATENODATA: No data found.\"));\n headset.clear();\n }\n if (headset.countRows() == 1)\n {\n lay.setLayoutMode(lay.SINGLE_LAYOUT);\n }\n mgr.createSearchURL(headblk);\n }", "public void findHouse() {\n\t\tSystem.out.println(\"找房子\");\n\t}", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"dex\");\n assertEquals(\"dic\", string0);\n }", "@Test\n public void getPerrosTest() {\n List<PerroEntity> list = perroLogic.getPerros();\n Assert.assertEquals(Perrodata.size(), list.size());\n for (PerroEntity entity : list) {\n boolean found = false;\n for (PerroEntity storedEntity : Perrodata) {\n if (entity.getId().equals(storedEntity.getId())) {\n found = true;\n }\n }\n Assert.assertTrue(found);\n }\n }", "@Test(timeout = 4000)\n public void test71() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"appearex\");\n assertEquals(\"appearec\", string0);\n }", "public void search() {\r\n \t\r\n }", "@Test\n public void getPerroTest() {\n \n PerroEntity entity = Perrodata.get(0);\n PerroEntity resultEntity = perroLogic.getPerro(entity.getId());\n Assert.assertNotNull(resultEntity);\n \n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getIdPerro(), resultEntity.getIdPerro());\n Assert.assertEquals(entity.getNombre(), resultEntity.getNombre());\n Assert.assertEquals(entity.getEdad(), resultEntity.getEdad());\n Assert.assertEquals(entity.getRaza(), resultEntity.getRaza());\n }", "@Test\n public void testCheck() {\n System.out.println(\"check\");\n String email = \"\";\n String password = \"\";\n DaftarPengguna instance = new DaftarPengguna();\n boolean expResult = false;\n boolean result = instance.check(email, password);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test27() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stem(\"fulul\");\n assertEquals(\"full\", string0);\n }", "@Test\r\n public void testRecherche() {\r\n System.out.println(\"recherche\");\r\n String nom = \"stat\";\r\n \r\n String expResult = \"stat\";\r\n Station result = Station.recherche(nom);\r\n assertEquals(expResult, result.getName());\r\n }", "@Test\r\n public void testPartido3() throws Exception {\r\n P3.fijarEquipos(\"Barça\",\"Depor\"); \r\n P3.comenzar(); \r\n P3.tantoVisitante();\r\n P3.terminar(); \r\n assertEquals(\"Depor\",P3.ganador());\r\n }", "public VotoPregunta findVoto(Usuario user, Pregunta pregunta);", "@Test\r\n public void testSearchPeople() throws MovieDbException {\r\n LOG.info(\"searchPeople\");\r\n String personName = \"Bruce Willis\";\r\n boolean includeAdult = false;\r\n List<Person> result = tmdb.searchPeople(personName, includeAdult, 0);\r\n assertTrue(\"Couldn't find the person\", result.size() > 0);\r\n }", "public Integer solo_guardarPaPersona(PaPersona paPersona) throws Exception;", "public void testTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(); \n\n\t\tshowData_skpp(data,\"penerbit\",\"jumlah_surat\");\n\t}", "public void search(IndexShort < O > index, short range, short k)\n throws Exception {\n // assertEquals(index.aDB.count(), index.bDB.count());\n // assertEquals(index.aDB.count(), index.bDB.count());\n // index.stats();\n index.resetStats();\n // it is time to Search\n int querySize = 1000; // amount of elements to read from the query\n String re = null;\n logger.info(\"Matching begins...\");\n File query = new File(testProperties.getProperty(\"test.query.input\"));\n File dbFolder = new File(testProperties.getProperty(\"test.db.path\"));\n BufferedReader r = new BufferedReader(new FileReader(query));\n List < OBPriorityQueueShort < O >> result = new LinkedList < OBPriorityQueueShort < O >>();\n re = r.readLine();\n int i = 0;\n long realIndex = index.databaseSize();\n\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n OBPriorityQueueShort < O > x = new OBPriorityQueueShort < O >(\n k);\n if (i % 100 == 0) {\n logger.info(\"Matching \" + i);\n }\n\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n if(i == 279){\n System.out.println(\"hey\");\n }\n index.searchOB(s, range, x);\n result.add(x);\n i++;\n }\n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n \n logger.info(index.getStats().toString());\n \n int maxQuery = i;\n // logger.info(\"Matching ends... Stats follow:\");\n // index.stats();\n\n // now we compare the results we got with the sequential search\n Iterator < OBPriorityQueueShort < O >> it = result.iterator();\n r.close();\n r = new BufferedReader(new FileReader(query));\n re = r.readLine();\n i = 0;\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n if (i % 300 == 0) {\n logger.info(\"Matching \" + i + \" of \" + maxQuery);\n }\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n OBPriorityQueueShort < O > x2 = new OBPriorityQueueShort < O >(\n k);\n searchSequential(realIndex, s, x2, index, range);\n OBPriorityQueueShort < O > x1 = it.next();\n //assertEquals(\"Error in query line: \" + i + \" slice: \"\n // + line, x2, x1); \n \n assertEquals(\"Error in query line: \" + i + \" \" + index.debug(s) + \"\\n slice: \"\n + line + \" \" + debug(x2,index ) + \"\\n\" + debug(x1,index), x2, x1);\n\n i++;\n }\n \n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n r.close();\n logger.info(\"Finished matching validation.\");\n assertFalse(it.hasNext());\n }", "public static boolean testGuset() {\n // Reset the guest index\n Guest.resetNextGuestIndex();\n // Create two new guests, one is with a dietary restriction\n Guest shihan = new Guest();\n Guest cheng = new Guest(\"no milk\");\n\n // Check the guest's information\n if (!shihan.toString().equals(\"#1\")) {\n System.out.println(\"Return value is \" + shihan.toString());\n return false;\n }\n // Check if the dietary restriction implement\n if (cheng.hasDietaryRestriction() != true) {\n return false;\n }\n if (!cheng.toString().equals(\"#2(no milk)\")) {\n System.out.println(\"Return value is \" + cheng.toString());\n return false;\n }\n // Reset the guest index again\n Guest.resetNextGuestIndex();\n // Create two new guests again, the index should be 1 and 2\n Guest ruoxi = new Guest();\n Guest shen = new Guest(\"no cookie\");\n // Check the new guests' information with new indices\n if (!ruoxi.toString().equals(\"#1\")) {\n System.out.println(\"Return value is \" + ruoxi.toString());\n return false;\n }\n if (!shen.toString().equals(\"#2(no cookie)\")) {\n System.out.println(\"Return value is \" + shen.toString());\n return false;\n }\n // Reset the guest index for next time or other classes' call\n Guest.resetNextGuestIndex();\n // No bug, return true\n return true;\n }", "@Test\n\tpublic void testSearch_7()\n\t\tthrows Exception {\n\t\tDLLocalServiceImpl fixture = new DLLocalServiceImpl();\n\t\tfixture.groupLocalService = new GroupLocalServiceWrapper(new GroupLocalServiceImpl());\n\t\tfixture.hook = new CMISHook();\n\t\tfixture.dlFolderService = new DLFolderServiceWrapper(new DLFolderServiceImpl());\n\t\tlong companyId = 1L;\n\t\tString portletId = \"\";\n\t\tlong groupId = 1L;\n\t\tlong userId = 1L;\n\t\tlong[] repositoryIds = new long[] {};\n\t\tString keywords = \"\";\n\t\tint start = 1;\n\t\tint end = 1;\n\n\t\tHits result = fixture.search(companyId, portletId, groupId, userId, repositoryIds, keywords, start, end);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: com.liferay.documentlibrary.service.impl.DLLocalServiceImpl\n\t\t// at java.net.URLClassLoader.findClass(Unknown Source)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Unknown Source)\n\t\tassertNotNull(result);\n\t}", "void compareSearch();", "@Ignore\n\tpublic void searchForDriversByTALPlate_FuncTest(){ \n\t\tList<DriverSearchVO> drivers = driverService.searchDriver(null, null, null, null, null, null, null, talPlate, false, null, null, null);\t\n\t\tlong driversCnt = driverService.searchDriverCount(null, null, null, null, null, null, null, talPlate, false, null);\n\t\t\n\t\t// we get back results of the same length as the list returned\n\t\tassertEquals(drivers.size(), driversCnt);\n\t\t\n\t\t// the list is greater than 0\n\t\tassertTrue(driversCnt > 0);\t\t\t\n\t}" ]
[ "0.6739627", "0.6228521", "0.6126883", "0.61093163", "0.60827696", "0.6071257", "0.593561", "0.5930823", "0.58517915", "0.58167917", "0.5770966", "0.57577384", "0.57008886", "0.5643012", "0.5603206", "0.5587149", "0.55550224", "0.5536269", "0.5470902", "0.54379225", "0.5435413", "0.54347295", "0.5432315", "0.5418139", "0.540851", "0.5407443", "0.539635", "0.53939676", "0.5381976", "0.5346659", "0.53453416", "0.53294253", "0.5316961", "0.5299248", "0.5291898", "0.52853626", "0.5283062", "0.52750325", "0.52699834", "0.5269541", "0.5263647", "0.5261843", "0.52404124", "0.52366173", "0.5231082", "0.5228817", "0.5221748", "0.52035546", "0.520007", "0.51950943", "0.5188911", "0.517497", "0.51705337", "0.5161911", "0.5152065", "0.51485896", "0.51444143", "0.51437366", "0.513988", "0.51359755", "0.513518", "0.5133892", "0.5133892", "0.51336807", "0.51320386", "0.5130844", "0.5125227", "0.51238763", "0.5123202", "0.51199466", "0.5116615", "0.5116182", "0.51107234", "0.5108849", "0.51015943", "0.50995064", "0.50956154", "0.508878", "0.50855446", "0.5085361", "0.5073427", "0.50685865", "0.5062386", "0.5059913", "0.50590074", "0.5056954", "0.50516677", "0.5046986", "0.5045751", "0.5045335", "0.50337374", "0.50307846", "0.50301087", "0.5029858", "0.50293696", "0.5026783", "0.5025631", "0.5023507", "0.50191075", "0.5019105" ]
0.7835701
0
Test of getPenggunas method, of class DaftarPengguna.
@Test public void testGetPenggunas_Long() { System.out.println("getPenggunas"); Long id = null; DaftarPengguna instance = new DaftarPengguna(); List expResult = null; List result = instance.getPenggunas(id); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetPenggunas_0args() {\n System.out.println(\"getPenggunas\");\n DaftarPengguna instance = new DaftarPengguna();\n List expResult = null;\n List result = instance.getPenggunas();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetPengguna() {\n System.out.println(\"getPengguna\");\n String email = \"\";\n String password = \"\";\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.getPengguna(email, password);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testFindPengguna() {\n System.out.println(\"findPengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.findPengguna(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testAddPengguna() {\n System.out.println(\"addPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.addPengguna(pengguna);\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 testTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(); \n\n\t\tshowData_skpp(data,\"penerbit\",\"jumlah_surat\");\n\t}", "@Test \r\n\t\r\n\tpublic void ataqueDeMagoSinMagia(){\r\n\t\tPersonaje perso=new Humano();\r\n\t\tEspecialidad mago=new Hechicero();\r\n\t\tperso.setCasta(mago);\r\n\t\tperso.bonificacionDeCasta();\r\n\t\t\r\n\t\tPersonaje enemigo=new Orco();\r\n\t\tEspecialidad guerrero=new Guerrero();\r\n\t\tenemigo.setCasta(guerrero);\r\n\t\tenemigo.bonificacionDeCasta();\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(44,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t//ataque normal\r\n\t\tperso.atacar(enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t// utilizar hechizo\r\n\t\tperso.getCasta().getHechicero().agregarHechizo(\"Engorgio\", new Engorgio());\r\n\t\tperso.getCasta().getHechicero().hechizar(\"Engorgio\",enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(20,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t}", "@Test\n public void getTarjetaPrepagoTest()\n {\n TarjetaPrepagoEntity entity = data.get(0);\n TarjetaPrepagoEntity resultEntity = tarjetaPrepagoLogic.getTarjetaPrepago(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNumTarjetaPrepago(), resultEntity.getNumTarjetaPrepago());\n Assert.assertEquals(entity.getSaldo(), resultEntity.getSaldo(), 0.001);\n Assert.assertEquals(entity.getPuntos(), resultEntity.getPuntos(),0.001);\n }", "@Test\r\n public void testPartido2() throws Exception { \r\n P2.fijarEquipos(\"Barça\",\"Depor\"); \r\n P2.comenzar(); \r\n P2.tantoLocal();\r\n P2.terminar(); \r\n assertEquals(\"Barça\",P2.ganador());\r\n }", "@Test\n public void testMediaPesada() {\n System.out.println(\"mediaPesada\");\n int[] energia = null;\n int linhas = 0;\n double nAlpha = 0;\n Double[] expResult = null;\n Double[] resultArray = null;\n double[] result = ProjetoV1.mediaPesada(energia, linhas, nAlpha);\n if (result != null) {\n resultArray = ArrayUtils.converterParaArrayDouble(result);\n }\n\n assertArrayEquals(expResult, resultArray);\n\n }", "@Test\r\n public void testPartido3() throws Exception {\r\n P3.fijarEquipos(\"Barça\",\"Depor\"); \r\n P3.comenzar(); \r\n P3.tantoVisitante();\r\n P3.terminar(); \r\n assertEquals(\"Depor\",P3.ganador());\r\n }", "@Test\n void doEffectPlasmaGun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"plasma gun\");\n Weapon w17 = new Weapon(\"plasma gun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w17);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w17.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n p.setPlayerPosition(Board.getSpawnpoint(2));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(6));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && p.getPlayerPosition() == Board.getSquare(6));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(1));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && p.getPlayerPosition() == Board.getSquare(1));\n\n p.setPlayerPosition(Board.getSpawnpoint(2));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(6));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"opt1\", \"base\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && p.getPlayerPosition() == Board.getSquare(6));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSpawnpoint('b'));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"base\", \"opt2\", \"opt1\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && p.getPlayerPosition() == Board.getSpawnpoint('b'));\n }", "@Test\r\n public void testAngabenInArraySpeichern() {\r\n System.out.println(\"angabenInArraySpeichern\");\r\n Texteinlesen instance = new Texteinlesen();\r\n instance.angabenInArraySpeichern();\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testEditPengguna() {\n System.out.println(\"editPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.editPengguna(pengguna);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testDeletePengguna() throws Exception {\n System.out.println(\"deletePengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.deletePengguna(id);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n void doEffectcyberblade(){\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"cyberblade\");\n Weapon w20 = new Weapon(\"cyberblade\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w20);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w20.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt2\", \"opt1\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n }", "@Test\r\n\tpublic void testShootHit() {\n\t\t\r\n\t\tLoginResponse respLoginPepe = service.login(\"pepe\", \"123456\");\r\n\t\tassertEquals(LoginStateEnum.OK,respLoginPepe.getState());\r\n\t\t\r\n\t\tLoginResponse respLoginJuan = service.login(\"juan\", \"123456\");\r\n\t\tassertEquals(LoginStateEnum.OK,respLoginJuan.getState());\r\n\t\t\r\n\t\t// pepe pide usuarios disponibles\r\n\t\t\r\n\t\tGetUsersResponse usersResponse = service.getAvailableUsers(respLoginPepe.getToken());\r\n\t\tList<String> users = usersResponse.getUsers();\r\n\t\tassertNotNull(users);\r\n\t\tassertEquals(1,users.size());\r\n\t\t\r\n\t\t// pepe le declara la guerra a juan (por lo tanto tendrá derecho al primer disparo)\r\n\t\tDeclareWarResponse warResp = service.declareWar(respLoginPepe.getToken(), \"juan\");\r\n\t\tString warToken=warResp.getWarToken();\r\n\t\tSystem.out.println(warToken);\r\n\t\tassertNotNull(warToken);\r\n\t\t\r\n\t\t// Juan recibe invitación a pelear de Pepe\r\n\t\tNotificationResponse warDeclaredResp = service.getNotification(respLoginJuan.getToken());\r\n\t\tList<NotificationDto> nots= warDeclaredResp.getNotifications();\r\n\t\tassertNotNull(nots);\r\n\t\tassertTrue(nots.size()>0);\r\n\t\tNotificationDto not = nots.get(0);\r\n\t\tassertNotNull(not.getWarToken());\r\n\t\tassertEquals(NotificationTypeEnum.DECLARED_WAR,not.getNotificationType());\r\n\t\tassertEquals(\"pepe\",not.getSenderNick());\r\n\t\t\r\n\t\t// Juan acepta el reto.\r\n\t\tAcceptDeclaredWarResponse declaredWarResponse = service.acceptDeclaredWar(respLoginJuan.getToken(), not.getWarToken());\r\n\t\tassertEquals(MessageStateEnum.OK, declaredWarResponse.getState());\r\n\t\t\r\n\t\t// Pepe recibe la notificación que Juan le aceptó el reto\r\n\t\tNotificationResponse juanAceptaRetoNotif = service.getNotification(respLoginPepe.getToken());\r\n\t\tnots= juanAceptaRetoNotif.getNotifications();\r\n\t\tassertNotNull(nots);\r\n\t\tassertTrue(nots.size()>0);\r\n\t\tnot = nots.get(0);\r\n\t\tassertNotNull(not.getWarToken());\r\n\t\tassertEquals(NotificationTypeEnum.ACCEPTED_WAR,not.getNotificationType());\r\n\t\tassertEquals(\"juan\",not.getSenderNick());\r\n\t\t\r\n\t\t// Pepe Valida su flota\r\n\t\tValidateFleetResponse validateFleetResponse = service.validateFleet(respLoginPepe.getToken(), not.getWarToken(), fleet);\r\n\t\tassertEquals(MessageStateEnum.OK, validateFleetResponse.getState());\t\t\r\n\t\t\r\n\t\t// Juan valida la flota\r\n\t\t\r\n\t\tvalidateFleetResponse = service.validateFleet(respLoginJuan.getToken(), not.getWarToken(), fleet);\r\n\t\tassertEquals(MessageStateEnum.OK, validateFleetResponse.getState());\r\n\t\t\r\n\t\t// Pepe recibe la notificación para primer disparo\r\n\t\tNotificationResponse primerDisparoNotif = service.getNotification(respLoginPepe.getToken());\r\n\t\tnots= primerDisparoNotif.getNotifications();\r\n\t\tassertNotNull(nots);\r\n\t\tassertTrue(nots.size()>0);\r\n\t\tnot = nots.get(0);\r\n\t\tassertNotNull(not.getWarToken());\r\n\t\tassertEquals(NotificationTypeEnum.TURN_TO_SHOOT,not.getNotificationType());\r\n\t\t\r\n\t\t\r\n\t\t//finalmente Dispara\r\n\t\t\r\n\t\tShootResponse shootResp = service.shoot(respLoginPepe.getToken(), not.getWarToken(), \"1\", \"d\");\r\n\t\t// tocado, vuelve a disparar\r\n\t\tassertEquals(ShootEnum.HIT, shootResp.getShootResult());\r\n\r\n\t\t// disparo\r\n\t\t\r\n\t\tshootResp = service.shoot(respLoginPepe.getToken(), not.getWarToken(), \"2\", \"d\");\r\n\t\t// tocado\r\n\t\tassertEquals(ShootEnum.HIT, shootResp.getShootResult());\r\n\r\n\t\tshootResp = service.shoot(respLoginPepe.getToken(), not.getWarToken(), \"3\", \"d\");\r\n\r\n\t\t// hundido\r\n\t\tassertEquals(ShootEnum.HIT_SUNK, shootResp.getShootResult());\r\n\r\n\t\tshootResp = service.shoot(respLoginPepe.getToken(), not.getWarToken(), \"0\", \"d\");\r\n\r\n\t\t// agua\r\n\t\tassertEquals(ShootEnum.WATER, shootResp.getShootResult());\r\n\r\n\t\t\r\n\t\t// Juan quiere conocer los disparos de Pepe\r\n\t\t\r\n\t\tShootNotificationResponse shootNotifResp = service.getShootNotification(respLoginJuan.getToken());\r\n\t\tList<Shoot> shoots = shootNotifResp.getShoots();\r\n\t\tassertNotNull(shoots);\r\n\t\tassertEquals(4, shoots.size());\r\n\t\tShoot shoot1 = shoots.get(0), shoot2= shoots.get(1), shoot3 = shoots.get(2),shoot4 = shoots.get(3);\r\n\t\tassertEquals(\"1\", shoot1.getX());\r\n\t\tassertEquals(\"d\", shoot1.getY());\r\n\t\tassertEquals(\"2\", shoot2.getX());\r\n\t\tassertEquals(\"d\", shoot2.getY());\r\n\t\tassertEquals(\"3\", shoot3.getX());\r\n\t\tassertEquals(\"d\", shoot3.getY());\r\n\t\tassertEquals(\"0\", shoot4.getX());\r\n\t\tassertEquals(\"d\", shoot4.getY());\r\n\t\t\r\n\t\t// Juan se arrepiente. (si no hago esto no me deja desloguear)\r\n\t\t\r\n\t\tRetireOfWarResponse retireOfWarResponse = service.retireOfWar(respLoginJuan.getToken());\r\n\t\tassertEquals(MessageStateEnum.OK, retireOfWarResponse.getState());\r\n\t\t\r\n\t\tLogoutResponse respLogoutPepe = service.logout(respLoginPepe.getToken());\r\n\t\tassertEquals(MessageStateEnum.OK,respLogoutPepe.getState());\r\n\t\t\r\n\t\tLogoutResponse respLogoutJuan = service.logout(respLoginJuan.getToken());\r\n\t\tassertEquals(MessageStateEnum.OK,respLogoutJuan.getState());\r\n\t\t\r\n\t}", "@Test\n public void testIsApellido_Paterno() {\n System.out.println(\"isApellido_Paterno\");\n String AP = \"ulfric\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Paterno(AP);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n\tpublic void testDarApellido()\n\t{\n\t\tassertEquals(\"El apellido esperado es Romero.\", \"Romero\", paciente.darApellido());\n\t}", "@Test\n public void getPerroTest() {\n \n PerroEntity entity = Perrodata.get(0);\n PerroEntity resultEntity = perroLogic.getPerro(entity.getId());\n Assert.assertNotNull(resultEntity);\n \n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getIdPerro(), resultEntity.getIdPerro());\n Assert.assertEquals(entity.getNombre(), resultEntity.getNombre());\n Assert.assertEquals(entity.getEdad(), resultEntity.getEdad());\n Assert.assertEquals(entity.getRaza(), resultEntity.getRaza());\n }", "@Test\n\t@Transactional(value = TransactionMode.ROLLBACK)\n\t@UsingDataSet({ \"persona.json\", \"registro.json\", \"administrador.json\", \"cuenta.json\", \"empleado.json\",\n\t\t\t\"familia.json\", \"genero.json\", \"recolector.json\", \"planta.json\" })\n\tpublic void listarPlantasPorGeneroFromEmpleadoTest() {\n\t\tTypedQuery<Planta> query = entityManager.createNamedQuery(Planta.LISTAR_PLANTAS_POR_GENERO, Planta.class);\n\t\tquery.setParameter(\"genero\", \"carnivoras\");\n\t\tList<Planta> listaPlantas = query.getResultList();\n\n\t\tAssert.assertEquals(listaPlantas.size(), 2);\n\t}", "@Test\r\n\tpublic void testGetPeliBalorazioak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 4);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.5);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 3);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 2);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 3.5);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 4);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 5);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\r\n\t}", "@Test\n public void testEnchantedChangedWithSongOfTheDryads() {\n // Enchantment Creature — Horror\n // 0/0\n // Bestow {2}{B}{B}\n // Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.\n addCard(Zone.HAND, playerA, \"Nighthowler\");\n addCard(Zone.BATTLEFIELD, playerA, \"Swamp\", 4);\n addCard(Zone.BATTLEFIELD, playerA, \"Silvercoat Lion\"); // {1}{W} 2/2 creature\n\n addCard(Zone.GRAVEYARD, playerA, \"Pillarfield Ox\");\n addCard(Zone.GRAVEYARD, playerB, \"Pillarfield Ox\");\n\n // Enchant permanent\n // Enchanted permanent is a colorless Forest land.\n addCard(Zone.BATTLEFIELD, playerB, \"Forest\", 3);\n addCard(Zone.HAND, playerB, \"Song of the Dryads\"); // Enchantment Aura {2}{G}\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Nighthowler using bestow\", \"Silvercoat Lion\");\n\n castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, \"Song of the Dryads\", \"Silvercoat Lion\");\n\n setStrictChooseMode(true);\n setStopAt(2, PhaseStep.BEGIN_COMBAT);\n execute();\n\n assertPermanentCount(playerB, \"Song of the Dryads\", 1);\n\n ManaOptions options = playerA.getAvailableManaTest(currentGame);\n Assert.assertEquals(\"Player should be able to create 1 green mana\", \"{G}\", options.getAtIndex(0).toString());\n\n assertPermanentCount(playerA, \"Nighthowler\", 1);\n assertPowerToughness(playerA, \"Nighthowler\", 2, 2);\n assertType(\"Nighthowler\", CardType.CREATURE, true);\n assertType(\"Nighthowler\", CardType.ENCHANTMENT, true);\n\n Permanent nighthowler = getPermanent(\"Nighthowler\");\n Assert.assertFalse(\"The unattached Nighthowler may not have the aura subtype.\", nighthowler.hasSubtype(SubType.AURA, currentGame));\n }", "@Test\n\t@Transactional(value = TransactionMode.ROLLBACK)\n\t@UsingDataSet({ \"persona.json\", \"registro.json\", \"administrador.json\", \"cuenta.json\", \"empleado.json\",\n\t\t\t\"familia.json\", \"genero.json\", \"recolector.json\", \"planta.json\" })\n\tpublic void listarPlantasAprovadasFromEmpleadoTest() {\n\t\tTypedQuery<Planta> query = entityManager.createNamedQuery(Planta.LISTAR_PLANTAS_POR_APROVACION, Planta.class);\n\t\tquery.setParameter(\"aprovacion\", 1);\n\t\tList<Planta> listaPlantas = query.getResultList();\n\n\t\tAssert.assertEquals(listaPlantas.size(), 2);\n\t}", "public int getPapeles(int avenida, int calle);", "@Test\n public void testDajMeteoPrognoze() throws Exception {\n System.out.println(\"dajMeteoPrognoze\");\n int id = 0;\n String adresa = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n MeteoPrognoza[] expResult = null;\n MeteoPrognoza[] result = instance.dajMeteoPrognoze(id, adresa);\n assertArrayEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n }", "Lingua getLingua();", "@Test\n void doEffectpowerglove() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"power glove\");\n Weapon w10 = new Weapon(\"power glove\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w10);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w10.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(p.getPlayerPosition() == Board.getSquare(1) && victim.getPb().countDamages() == 1 && victim.getPb().getMarkedDamages('b') == 2);\n\n p.setPlayerPosition(Board.getSquare(0));\n s.add(Board.getSquare(1));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n players.clear();\n players.add(victim);\n s.add(Board.getSpawnpoint('b'));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSpawnpoint('b'));\n players.add(victim2);\n try{\n p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect(\"alt\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(p.getPlayerPosition() == Board.getSpawnpoint('b') && victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 2);\n\n p.setPlayerPosition(Board.getSquare(0));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(1));\n s.add(Board.getSpawnpoint('b'));\n try{\n p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect(\"alt\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { System.out.println(\"ERROR\");}\n\n assertTrue(p.getPlayerPosition() == Board.getSpawnpoint('b') && victim.getPb().countDamages() == 2);\n }", "@Test\r\n public void testPartido1() throws Exception {\r\n /* \r\n * En el estado EN_ESPERA\r\n */\r\n assertEquals( \"Ubicación: Camp Nou\" \r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido está en espera, aún no se han concretado los equipos\"\r\n , P1.datos());\r\n /* \r\n * En el estado NO_JUGADO\r\n */\r\n P1.fijarEquipos(\"Barça\",\"Depor\"); \r\n assertEquals( \"Ubicación: Camp Nou\"\r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido aún no se ha jugado\"\r\n + \"\\nEquipo local: Barça\"\r\n + \"\\nEquipo visitante: Depor\" \r\n , P1.datos()\r\n );\r\n /* \r\n * En el estado EN_JUEGO\r\n */\r\n P1.comenzar(); \r\n P1.tantoLocal();\r\n P1.tantoVisitante();\r\n assertEquals( \"Ubicación: Camp Nou\"\r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido está en juego\"\r\n + \"\\nEquipo local: Barça\"\r\n + \"\\nTantos locales: 1\"\r\n + \"\\nEquipo visitante: Depor\"\r\n + \"\\nTantos visitantes: 1\"\r\n , P1.datos()\r\n );\r\n /* \r\n * En el estado FINALIZADO\r\n */\r\n P1.terminar(); \r\n assertEquals( \"Ubicación: Camp Nou\"\r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido ha finalizado\"\r\n + \"\\nEquipo local: Barça\"\r\n + \"\\nTantos locales: 1\"\r\n + \"\\nEquipo visitante: Depor\"\r\n + \"\\nTantos visitantes: 1\"\r\n , P1.datos()\r\n );\r\n assertEquals(\"Empate\",P1.ganador());\r\n }", "@Test\n public void bateauAtPasDansGrille() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n Bateaux b = j.bateauAt(new Place(\"Z84897\"), g);\n\n assertNull(\"Il n'y a pas de bateau ici\", b);\n }", "public void testNamaPNSYangSkepnyaDiterbitkanOlehPresiden(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getNamaPNSYangSkepnyaDiterbitkanOlehPresiden(); \n\n\t\tshowData(data,\"nip\",\"nama\",\"tanggal_lahir\",\"tanggal_berhenti\",\"pangkat\",\"masa_kerja\",\"penerbit\");\n\t}", "public void testGetPhases_SomeNotExist() throws Exception {\n Phase[] phases = persistence.getPhases(new long[] {34534, 5, 144351});\n\n // verify the results\n assertEquals(\"Element 0 should be null.\", null, phases[0]);\n assertEquals(\"Element 2 should be null.\", null, phases[2]);\n assertEquals(\"Element 2 should be retrieved.\", 5, phases[1].getId());\n }", "@Test\n public void testAlunPainotus() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n String kysymys = k.alunPainotus(true);\n\n\n assertEquals(\"AlunPainoitus ei toimi\", \"sana\", kysymys);\n }", "@Test\n public void testGetYhteensa() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n k.tarkistaVastaus(\"vaarav vastaus\");\n k.tarkistaVastaus(\"trololololoo\");\n int virheita = k.getYhteensa();\n\n assertEquals(\"Sanan tarkastus ei toimi\", 2, virheita);\n }", "@Test\r\n\tpublic void testAttacks()\r\n\t{\r\n\t\tPokemon pk = new Vulpix(\"Vulpix\", 100);\r\n\t\tassertEquals(\"Vulpix\", pk.getName());\r\n\t\tCommand[] attacks = pk.getAttacks();\r\n\t\tassertEquals(\"FireSpin\", attacks[0].getAttackName());\r\n\t\tassertEquals(\"Ember\", attacks[1].getAttackName());\r\n\t\tassertEquals(\"Flamethrower\", attacks[2].getAttackName());\r\n\t\tassertEquals(\"Inferno\", attacks[3].getAttackName());\r\n\t}", "@Test\r\n @Ignore\r\n public void testGetPlantoes() {\r\n System.out.println(\"getPlantoes\");\r\n EnfermeiroDaoImpl instance = new EnfermeiroDaoImpl();\r\n List<Enfermeiro> expResult = null;\r\n List<Enfermeiro> result = instance.getPlantoes();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n\t@Transactional(value = TransactionMode.ROLLBACK)\n\t@UsingDataSet({ \"persona.json\", \"registro.json\", \"administrador.json\", \"cuenta.json\", \"empleado.json\",\n\t\t\t\"familia.json\", \"genero.json\", \"recolector.json\", \"planta.json\" })\n\tpublic void listarPlantasPorFamiliaFromEmpleadoTest() {\n\t\tTypedQuery<Planta> query = entityManager.createNamedQuery(Planta.LISTAR_PLANTAS_POR_FAMILIA, Planta.class);\n\t\tquery.setParameter(\"familia\", \"telepiatos\");\n\t\tList<Planta> listaPlantas = query.getResultList();\n\n\t\tAssert.assertEquals(listaPlantas.size(), 3);\n\t}", "@Test\n public void testAvaaRuutu() {\n int x = 0;\n int y = 0;\n Peli pjeli = new Peli(new Alue(3, 0));\n pjeli.avaaRuutu(x, y);\n ArrayList[] lista = pjeli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isAvattu());\n assertEquals(false, pjeli.isLahetetty());\n }", "@Test\n void doEffectmachinegun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"machine gun\");\n Weapon w14 = new Weapon(\"machine gun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w14);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w14.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia1\");\n victim2.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia2\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim2);\n players.add(victim);\n try {\n p.getPh().getWeaponDeck().getWeapon(w14.getName()).doEffect(\"base\", \"opt1\", null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) {\n System.out.println(\"ERROR\");\n }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1);\n\n players.clear();\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n players.add(victim);\n players.add(victim2);\n players.add(victim);\n players.add(victim3);\n try {\n p.getPh().getWeaponDeck().getWeapon(w14.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1);\n }", "@Test\n public void test4() {\n userFury.login(\"23ab\");\n assertTrue(userFury.getLoggedIn());\n\n userFury.buy(secondMusicTitle);\n ArrayList<MusicTitle> actualList = userFury.getTitlesBought();\n assertTrue(actualList.isEmpty());\n }", "@Test\n\tpublic void testDarNombre()\n\t{\n\t\tassertEquals(\"El nombre esperado es Germán.\", \"Germán\", paciente.darNombre());\n\t}", "public static void pesquisarTest() {\n\t\t\n\t\tlistaProfissional = profissionalDAO.lista();\n\n\t\t//user.setReceitas(new ArrayList<Receita>());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Entrou PEsquisar ====\");\n\t\tSystem.out.println(listaProfissional);\n\n\t}", "@Test\n public void testobtenerViajes() throws Exception {\n List<ViajeEntidad> viajes = getListaViajesEntidad();\n given(viajeServicio.consultarViajes()).willReturn(viajes);\n given(usuarioServicio.usuarioPorCorreo(getUsuarioEntidad().getPkCorreo())).willReturn(Optional.of(getUsuarioEntidad()));\n\n List<ViajeEntidadTemporal> viajesRetorno = viajesControlador.obtenerViajes();\n assertNotNull(viajesRetorno);\n assertEquals(viajesRetorno.size(), 3);\n }", "@Test\n\tvoid testgetAllPlants() {\n\t\tList<Plant> plantlist = service.getAllPlant();\n\t\tboolean result = true;\n\t\tif (plantlist.isEmpty()) {\n\t\t\tresult = false;\n\t\t}\n\t\tassertTrue(result);\n\t}", "@Test\n\tpublic void test02_CheckDisplayInvitationGadget(){\n\t\tinfo(\"prepare data\");\n\t\t/*Step Number: 1\n\t\t *Step Name: Check display gadget\n\t\t *Step Description: \n\t\t\t- Login as userA\n\t\t\t- Open intranet home\n\t\t\t- Check Invitation gadget\n\t\t *Input Data: \n\n\t\t *Expected Outcome: \n\t\t\t- A maximum number of displayed requests is 4\n\t\t\t-The oldest request will appear at the bottom while the newest will appear on the top\n\t\t\t- For user request, the gadget displays the profile picture of the user, his name and if available, his title.\n\t\t\t- For Spaces request, the gadget displays the space icon, the name, privacy status which is private or public, and the number of members in the space.\n\t\t\t- The title of the gadget will show the total number of requests received which is 4*/ \n\t\tinfo(\"Create datatest\");\n\t\tString space1=txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString space2=txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString space3=txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username3 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password3 = username3;\n\t\tString email3= username3 + mailSuffixData.getMailSuffixRandom();\n\n\t\t/*Create data test*/\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\t\taddUserPage.addUser(username3, password3, email3, username3, username3);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tinfo(\"Sign in with username1 account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\t\thp.goToMySpaces();\n\t\tspaceMg.addNewSpaceSimple(space1,space1);\n\t\tspaceHome.goToSpaceSettingTab();\n\t\tsetMag.inviteUser(DATA_USER1,false,\"\");\n\n\t\tinfo(\"Sign in with username2 account\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\t\thp.goToMySpaces();\n\t\tspaceMg.addNewSpaceSimple(space2,space2);\n\t\tspaceHome.goToSpaceSettingTab();\n\t\tsetMag.inviteUser(DATA_USER1,false,\"\");\n\n\t\tinfo(\"Sign in with username3 account\");\n\t\tmagAc.signIn(username3, password3);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\t\thp.goToMySpaces();\n\t\tspaceMg.addNewSpaceSimple(space3,space3);\n\t\tspaceHome.goToSpaceSettingTab();\n\t\tsetMag.inviteUser(DATA_USER1,false,\"\");\n\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tinfo(\"Verify that the maximum number of displayed requests is 4\");\n\t\tinfo(\"Verify that for user request, the portlet will displayes the profile picture of the user, his name\");\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username3));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\twaitForAndGetElement(hp.ELEMENT_INVITAITONS_SPACE_ICON.replace(\"${name}\",space3));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITAITONS_SPACE_ICON.replace(\"${name}\",space2));\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITAITONS_SPACE_ICON.replace(\"${name}\",space1));\n\n\t\tinfo(\"Verify that for space request, the gadget displays the space icon, the name, privacy status which is private or public, and the number of members in the space.\");\n\t\twaitForAndGetElement(hp.ELEMENT_INVITAITONS_SPACE_STATUS_MEMBERS.replace(\"${name}\",space3).replace(\"${statusMember}\",\"Private Space - 1 Members\"));\n\n\t\tinfo(\"Verify that The title of the gadget will show the total number of requests received which is 5\");\n\t\twaitForAndGetElement(By.xpath(hp.ELEMENT_INVITATIONS_NUMBER.replace(\"${number}\", \"6\")),2000,0);\n\n\t\tinfo(\"Delete DATA for the last test\");\n\t\tinfo(\"Signin with james account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToMySpaces();\n\t\tspaceMg.deleteSpace(space1, false);\n\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToMySpaces();\n\t\tspaceMg.deleteSpace(space2, false);\n\n\t\tmagAc.signIn(username3, password3);\n\t\thp.goToMySpaces();\n\t\tspaceMg.deleteSpace(space3, false);\n\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t\tuserAndGroup.deleteUser(username3);\n\t}", "@Test\r\n public void testYhdista() {\r\n System.out.println(\"yhdista\");\r\n Pala toinenpala = null;\r\n Palahajautustaulu taulu = null;\r\n Pala instance = null;\r\n instance.yhdista(toinenpala, taulu);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n\tvoid testGetAllByName() {\n\t\tList<Plant> plant = service.getAllByName(\"Tulsi\");\n\t\tString name = plant.get(0).getName();\n\t\tassertEquals(\"Tulsi\", name);\n\t}", "@Test(priority = 14)\n\tpublic void testTranslationsLists_From_Translation_0_10_OnAlQuranPage() throws Exception {\n\t\tSystem.out.println(\"<------Testing Translations Lists From_Translation_1_10 On Al-Quran Page------->\\n\");\n\t\ttestTranslations_chunk_Wise(0, 10);\n\t}", "List<Plaza> consultarPlazas();", "@Test\r\n public void testGetMovieAlternativeTitles() throws MovieDbException {\r\n LOG.info(\"getMovieAlternativeTitles\");\r\n String country = \"\";\r\n List<AlternativeTitle> results = tmdb.getMovieAlternativeTitles(ID_MOVIE_BLADE_RUNNER, country);\r\n assertTrue(\"No alternative titles found\", results.size() > 0);\r\n \r\n country = \"US\";\r\n results = tmdb.getMovieAlternativeTitles(ID_MOVIE_BLADE_RUNNER, country);\r\n assertTrue(\"No alternative titles found\", results.size() > 0);\r\n \r\n }", "@Test\r\n public void getSalaTest() \r\n {\r\n SalaEntity entity = data.get(0);\r\n SalaEntity resultEntity = salaLogic.getSala(data.get(0).getId());\r\n Assert.assertNotNull(resultEntity);\r\n Assert.assertEquals(entity.getId(), resultEntity.getId());\r\n Assert.assertEquals(resultEntity.getNumero(), entity.getNumero());\r\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n TechnicalInformation technicalInformation0 = lovinsStemmer0.getTechnicalInformation();\n assertFalse(technicalInformation0.hasAdditional());\n }", "public void testbusquedaAvanzada() {\n// \ttry{\n\t \t//indexarODEs();\n\t\t\tDocumentosVO respuesta =null;//this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"agregatodos identificador:es-ma_20071119_1_9115305\", \"\"));\n\t\t\t/*\t\tObject [ ] value = { null } ;\n\t\t\tPropertyDescriptor[] beanPDs = Introspector.getBeanInfo(ParamAvanzadoVO.class).getPropertyDescriptors();\n\t\t\tString autor=autor\n\t\t\tcampo_ambito=ambito\n\t\t\tcampo_contexto=contexto\n\t\t\tcampo_descripcion=description\n\t\t\tcampo_edad=edad\n\t\t\tcampo_fechaPublicacion=fechaPublicacion\n\t\t\tcampo_formato=formato\n\t\t\tcampo_idiomaBusqueda=idioma\n\t\t\tcampo_nivelEducativo=nivelesEducativos\n\t\t\tcampo_palabrasClave=keyword\n\t\t\tcampo_procesoCognitivo=procesosCognitivos\n\t\t\tcampo_recurso=tipoRecurso\n\t\t\tcampo_secuencia=conSinSecuencia\n\t\t\tcampo_titulo=title\n\t\t\tcampo_valoracion=valoracion\n\t\t\tfor (int j = 0; j < beanPDs.length; j++) {\n\t\t\t\tif(props.getProperty(\"campo_\"+beanPDs[j].getName())!=null){\n\t\t\t\t\tvalue[0]=\"valor a cargar\";\n\t\t\t\t\tsetPropValue(Class.forName(ParamAvanzadoVO.class.getName()).newInstance(), beanPDs[j],value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t*/\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\tcomprobarRespuesta(respuesta.getResultados()[0]);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pruebatitulo\", \"\"));\n//\t\t\tSystem.err.println(\"aparar\");\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"nivel*\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"nived*\"));\n//\t\t\tassertNull(respuesta.getResultados());\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"nivel\"));\n//\t\t\tassertNotNull(respuesta.getResultados());\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"\", \"nivel\"));\n//\t\t\tassertNull(respuesta.getResultados());\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"}f2e_-i3299(--5\"));\n//\t\t\tassertNull(respuesta.getResultados());\n\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"verso estrofa\", \"universal pepito\",\"\"));\n//\t\t\tassertNull(respuesta.getResultados());\n\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"descwildcard\", \"ambito0\",\"\"));\n//\t\t\tassertEquals(respuesta.getSugerencias().length, 1);\n//\t\t\t\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"desc*\", \"\",\"\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 2);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"keywordAvanzado\", \"ambito0\",\"descripcion\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"keywordAvanzado\", \"ambito0\",\"descripcion compuesta\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"keywordAvanzado\", \"ambito0\",\"descripcion pru*\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"descwild*\", \"\",\"\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n// \t}catch(Exception e){\n//\t\t \tlogger.error(\"ERROR: fallo en test buscador-->\",e);\n//\t\t\tthrow new RuntimeException(e);\n// \t}finally{\n// \t\teliminarODE(new String [] { \"asdf\",\"hjkl\"});\n// \t}\n\t\t\tassertNull(respuesta);\n }", "@Test\n void doEffectshotgun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"shotgun\");\n Weapon w9 = new Weapon(\"shotgun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w9);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w9.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(0));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try{\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && victim.getPlayerPosition() == Board.getSquare(0));\n\n s.add(Board.getSquare(1));\n try{\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"base\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 6 && victim.getPlayerPosition() == Board.getSquare(1));\n\n s.clear();\n s.add(Board.getSpawnpoint('b'));\n try {\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"base\", null, null, p, players, s); //A choice of yours is yours\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n players.clear();\n players.add(victim);\n s.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n players.clear();\n players.add(victim);\n s.clear();\n try{\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"alt\", null, null, p, players, null); //A choice of yours is wrong\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n }", "@Test\n\tpublic void test() {\n\t\tSystem.out.println(\"Displaying Available Languages\");\n\t\tSystem.out.println(\"------------------------------\");\n\t\tLanguageList.displayAvailableLanguage();\n\t}", "@Test\n void grab() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n Square s = new Square(0, 4, false, true, false, true, false, 'b');\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(s);\n p.getPh().getPowerupDeck().getPowerups().clear();\n p.setTurn(true);\n AmmoTile a = new AmmoTile();\n PowerupDeck pud = new PowerupDeck();\n int[] cubes = new int[3];\n cubes[0] = 2;\n cubes[2] = 1;\n char[] c1 = {'b', 'b', 'b'};\n char[] c2 = {'r', 'r', 'r'};\n char[] c3 = {'y', 'y', 'y'};\n p.getPb().payAmmo(c1);\n p.getPb().payAmmo(c2);\n p.getPb().payAmmo(c3);\n a.setCubes(cubes);\n a.setPowerup(false);\n s.setAmmo(a);\n try{\n p.grab(p.getPlayerPosition(), pud);\n }catch (WrongSquareException e){}\n }", "@Test\n public void yksiVasemmalle() {\n char[][] kartta = Labyrintti.lueLabyrintti(\"src/main/resources/labyrinttiTestiVasen.txt\");\n assertFalse(kartta == null);\n Labyrintti labyrintti = new Labyrintti(kartta);\n RatkaisuLeveyshaulla ratkaisuSyvyyshaulla = new RatkaisuLeveyshaulla(labyrintti);\n String ratkaisu = ratkaisuSyvyyshaulla.ratkaisu();\n assertTrue(Tarkistaja.tarkista(ratkaisu, labyrintti));\n }", "@Test\n void doEffectrailgun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"railgun\");\n Weapon w11 = new Weapon(\"railgun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w11);\n p.setPlayerPosition(Board.getSpawnpoint('r'));\n p.getPh().drawWeapon(wd, w11.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 2);\n }", "@Test\n\tpublic void testGetLista() throws Exception {\n\t\tSystem.out.println(\"getLista\");\n\t\tso.execute(entity);\n\t\tList<IGeneralEntity> expResult = ((TakeTrucksOperation) so).getLista();\n\t\tList<IGeneralEntity> result = so.db.vratiSve(entity);\n\n\t\tassertEquals(expResult.size(), result.size());\n\t}", "@Test\n public void testLukitseRuutu() {\n System.out.println(\"lukitseRuutu\");\n int x = 0;\n int y = 0;\n Peli peli = new Peli(new Alue(3, 1));\n peli.lukitseRuutu(x, y);\n ArrayList[] lista = peli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isLukittu());\n }", "public void testAltaVehiculo(){\r\n\t}", "@Test\r\n public void testAvlPuu() {\r\n AvlPuu puu = new AvlPuu();\r\n assertEquals(puu.laskeSolmut(), 0);\r\n }", "@Test\n void doEffectthor() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"t.h.o.r.\");\n Weapon w15 = new Weapon(\"t.h.o.r.\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w15);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w15.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim2);\n try {\n p.getPh().getWeaponDeck().getWeapon(w15.getName()).doEffect(\"base\", \"opt1\", null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n players.add(victim2);\n players.add(victim3);\n try {\n p.getPh().getWeaponDeck().getWeapon(w15.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 2);\n }", "@Test\n public void testGetVastaus() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n String vastaus = k.getVastaus();\n assertEquals(\"getVastaus ei toimi odoitetusti\", \"vastine\", vastaus);\n }", "private void getPTs(){\n mPyTs = estudioAdapter.getListaPesoyTallasSinEnviar();\n //ca.close();\n }", "@Test\n public void testGetTamano() {\n System.out.println(\"getTamano\");\n Huffman instance = null;\n int expResult = 0;\n int result = instance.getTamano();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n void doEffectvortexcannon() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"vortex cannon\");\n Weapon w16 = new Weapon(\"vortex cannon\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w16);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w16.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSquare(10));\n try{\n p.getPh().getWeaponDeck().getWeapon(w16.getName()).doEffect(\"base\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim.getPlayerPosition() == Board.getSquare(10));\n\n players.clear();\n s.clear();\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSquare(9));\n players.add(victim);\n players.add(victim2);\n players.add(victim3);\n s.add(Board.getSquare(10));\n try {\n p.getPh().getWeaponDeck().getWeapon(w16.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim.getPlayerPosition() == Board.getSquare(10) && victim2.getPlayerPosition() == Board.getSquare(10) && victim2.getPb().countDamages() == 1 && victim3.getPlayerPosition()==Board.getSquare(10) && victim3.getPb().countDamages()==1);\n }", "@Test\n public void testGetAllPharmacies() throws Exception {\n System.out.println(\"getAllPharmacies\");\n\n ManagePharmaciesController instance = new ManagePharmaciesController();\n LinkedList<PharmacyDTO> expResult= new LinkedList<>();\n LinkedList<PharmacyDTO> result = instance.getAllPharmacies();\n expResult.add(getPharmacyDTOTest(\"a\"));\n expResult.add(getPharmacyDTOTest(\"b\"));\n expResult.add(getPharmacyDTOTest(\"c\"));\n\n LinkedList<Pharmacy> resultDB = new LinkedList<>();\n resultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"a\")));\n resultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"b\")));\n resultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"c\")));\n PharmacyDB db = Mockito.mock(PharmacyDB.class);\n PharmaDeliveriesApp.getInstance().getPharmacyService().setPharmacyDB(db);\n when(db.getAllPharmacies()).thenReturn(resultDB);\n result = instance.getAllPharmacies();\n Assertions.assertEquals(result.size(), expResult.size());\n Assertions.assertEquals(result.get(0).getName(), expResult.get(0).getName());\n Assertions.assertEquals(result.get(1).getName(), expResult.get(1).getName());\n Assertions.assertEquals(result.get(2).getName(), expResult.get(2).getName());\n \n// int i = 0;\n// for(PharmacyDTO p : result){\n// Assertions.assertEquals(p.getName(), expResult.get(i).getName());\n// i++;\n// }\n \n when(db.getAllPharmacies()).thenReturn(null);\n Assertions.assertNull(instance.getAllPharmacies());\n }", "@Test\n public void testGetPharmaciesByAdministrator() throws Exception {\n System.out.println(\"getPharmaciesByAdministrator\");\n \n //Logout test\n ManagePharmaciesController instance = new ManagePharmaciesController();\n// PharmaDeliveriesApp.getInstance().doLogout();\n// LinkedList<PharmacyDTO> exp = null;\n// LinkedList<PharmacyDTO> result = instance.getPharmaciesByAdministrator();\n// Assertions.assertEquals(exp, result);\n// PharmaDeliveriesApp.getInstance().doLogin(\"[email protected]\", \"adminteste\");\n \n //Value test\n PharmacyDB db = Mockito.mock(PharmacyDB.class);\n PharmaDeliveriesApp.getInstance().getPharmacyService().setPharmacyDB(db);\n \n LinkedList<Pharmacy> inputsDB = new LinkedList<>();\n inputsDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"testeA\")));\n inputsDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"testeB\")));\n \n LinkedList<Pharmacy> expResultDB = new LinkedList<>();\n expResultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"testeA\")));\n expResultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"testeB\")));\n \n LinkedList<Pharmacy> inputsCobtroller = new LinkedList<>();\n inputsCobtroller.add(convertPharmacyDTO(getPharmacyDTOTest(\"testeA\")));\n inputsCobtroller.add(convertPharmacyDTO(getPharmacyDTOTest(\"testeB\")));\n \n LinkedList<PharmacyDTO> expResult = new LinkedList<>();\n expResult.add(getPharmacyDTOTest(\"testeA\"));\n expResult.add(getPharmacyDTOTest(\"testeB\"));\n \n when(db.getPharmaciesByAdministrator(any(User.class))).thenReturn(expResultDB);\n Assertions.assertEquals(instance.getPharmaciesByAdministrator().size(), expResult.size());\n \n when(db.getPharmaciesByAdministrator(any(User.class))).thenReturn(null);\n Assertions.assertNull(instance.getPharmaciesByAdministrator());\n \n }", "@Test\n void doEffecttractorbeam() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"tractor beam\");\n Weapon w2 = new Weapon(\"tractor beam\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.getWeapons().add(w2);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w2.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSpawnpoint('b'));\n try {\n p.getPh().getWeaponDeck().getWeapon(w2.getName()).doEffect(\"base\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n assertTrue(players.get(0).getPb().countDamages() == 1 && players.get(0).getPlayerPosition() == Board.getSpawnpoint('b'));\n\n players.get(0).setPlayerPosition(Board.getSquare(1));\n s.clear();\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w2.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(players.get(0).getPb().countDamages() == 4 && players.get(0).getPlayerPosition() == p.getPlayerPosition());\n }", "public void testTumPencereleriKapat() {\n System.out.println(\"tumPencereleriKapat\");\n Yakalayici instance = new Yakalayici();\n instance.tumPencereleriKapat();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private static String testSayHello(Greeter greeter)\n {\n return greeter.sayHello();\n }", "@Test\n public void testGetVaarin() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n k.tarkistaVastaus(\"vaarav vastaus\");\n k.tarkistaVastaus(\"trololololoo\");\n int virheita = k.getVaarin();\n\n assertEquals(\"Väärin menneiden tarkistusten lasku ei toimi\", 2, virheita);\n }", "@Test\r\n @Ignore\r\n public void testGetPlantoesDia() {\r\n System.out.println(\"getPlantoesDia\");\r\n Date dataDesejada = null;\r\n EnfermeiroDaoImpl instance = new EnfermeiroDaoImpl();\r\n List<Enfermeiro> expResult = null;\r\n List<Enfermeiro> result = instance.getPlantoesDia(dataDesejada);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n\tpublic void testGetPeliBalorazioNormalizatuak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == -2.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.25);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.75);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 1.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t\r\n\t\t// Normalizazioa Zsore erabiliz egiten dugu\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Zscore());\r\n\t\t\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.0000\");\r\n\t\t\r\n\t\t// p1 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"1,2247\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"-1,6398\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"-1,2247\"));\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",1491\"));\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",4472\"));\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"1,0435\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Batezbestekoa());\r\n\t\t\r\n\t}", "@Test\r\n\tpublic void testPelikulaBaloratuDutenErabiltzaileenZerrenda() {\n\t\tArrayList<Integer> zer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p1.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p2.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 4);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertTrue(zer.contains(e4.getId()));\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p3.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p4.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e4.getId()));\r\n\t\t\r\n\t}", "public static List<String> getAttackerFromEngland() throws URISyntaxException, IOException {\n HttpClient httpClient = HttpClientBuilder.create().build();\n URIBuilder uriBuilder = new URIBuilder();\n //http://api.football-data.org/v2/teams/\n uriBuilder.setScheme(\"http\").setHost(\"api.football-data.org\").setPath(\"v2/teams/66\");\n HttpGet httpGet = new HttpGet(uriBuilder.build());\n httpGet.setHeader(\"X-Auth-Token\",\"7cf82ca9d95e498793ac0d3179e1ec9f\");\n httpGet.setHeader(\"Accept\",\"application/json\");\n HttpResponse response = httpClient.execute(httpGet);\n ObjectMapper objectMapper = new ObjectMapper();\n Team66Pojo team66Pojo =objectMapper.readValue(response.getEntity().getContent(),Team66Pojo.class);\n List<Squad> squad = team66Pojo.getSquad();\n List<String> attackerName= new ArrayList<>();\n for (int i = 0; i <squad.size() ; i++) {\n try {\n if(squad.get(i).getPosition().equals(\"Attacker\")&&squad.get(i).getNationality().equals(\"England\")){\n\n attackerName.add(squad.get(i).getName());\n }\n }catch (NullPointerException e){\n\n\n }\n }\n return attackerName;\n }", "@Test\n public void tilimaksuKutsuuTilisiirtoaOikeillaParametreilla() {\n when(this.varasto.saldo(1)).thenReturn(10);\n when(this.varasto.haeTuote(1)).thenReturn(new Tuote(1, \"maito\", 5));\n \n this.kauppa.aloitaAsiointi();\n this.kauppa.lisaaKoriin(1);\n this.kauppa.tilimaksu(\"johannes\", \"12345\");\n verify(this.pankki).tilisiirto(eq(\"johannes\"), anyInt(), eq(\"12345\"), anyString(), eq(5));\n \n }", "@Test\n public void publicadorPreguntaEnPublicacionAPostulante() {\n Mensaje mp = new Mensaje();\n mp.setPublicacionId(7);\n mp.setPregunta(\"Tenes jardin?\");\n mp.setUsuarioPreguntaId(usuario.getId());\n mp.setUsuarioRespuestaId(3);\n mp.guardarPregunta(usuario.getToken());\n assertTrue(mp.getId() > 0);\n\n }", "@Test\r\n public void elCerdoNoSePuedeAtender() {\n }", "@Test\n\tpublic void testResultadosEsperados() {\n\t\t\n\t\t\n\t\t\n\t\tbicicleta.darPedalada(utilidadesCiclista.getCadencia(), 75);\n\t\t\n\t\t\n\t\t//se comprueba que la velocidad sea la esperada\n\t\t\n\t\tdouble velocidadesperada = utilidadesBicicleta.velocidadDeBici(0, utilidadesCiclista.getCadencia(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t65, bicicleta.getRadiorueda(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\t\n\t\tassertEquals(\"Error: La velocidad de la bicicleta no es la correcta\", velocidadesperada, bicicleta.getVelocidad(), 2);\n\t\t\n\t\t\n\t\t//se comprueba que el espacio de la pedalada sea el esperado\n\t\t\n\t\tdouble espaciodelapedaladaesperado = utilidadesBicicleta.espacioDePedalada(bicicleta.getRadiorueda(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\tassertEquals(\"Error: El espacio recorrido de la bicicleta no es el correcta\", espaciodelapedaladaesperado, utilidadesBicicleta.espacioDePedalada(bicicleta.getRadiorueda(),\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\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()],\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\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]\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\t\t\t\t\t\t\t\t), 0);\n\t\t\n\t\t\n\t\t//se comprueba que la relacion de transmision sea la esperada\n\t\t\n\t\tdouble relaciondeetransmisionesperado = utilidadesBicicleta.relacionDeTransmision(bicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\tassertEquals(\"Error: El espacio recorrido de la bicicleta no es el correcta\", relaciondeetransmisionesperado, utilidadesBicicleta.relacionDeTransmision(bicicleta.getPlatos()[bicicleta.getPlatoactual()],\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\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]\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\t\t\t\t\t\t\t\t\t\t), 0);\n\t\t\n\t\t\n\t\t//se comprueba que el recorrido lineal sea el esperado\n\t\t\n\t\tdouble recorridoLinealDeLaRuedaesperado = utilidadesBicicleta.recorridoLinealDeLaRueda(bicicleta.getRadiorueda());\n\t\t\n\t\tassertEquals(\"Error: El espacio recorrido de la bicicleta no es el correcta\", recorridoLinealDeLaRuedaesperado, utilidadesBicicleta.recorridoLinealDeLaRueda(bicicleta.getRadiorueda()), 0);\n\t\t\n\t\t\n\t\t\n\t\t//Se comprueban las variables despues de frenar\n\t\t\n\t\tbicicleta.frenar();\n\t\t\n\t\t//se comprueba que la velocidad halla decrementado como esperamos despues de frenar\n\t\t\n\t\tdouble velocidadfrenado = utilidadesBicicleta.velocidadDeBici(0, 1, 65, bicicleta.getRadiorueda(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\tvelocidadfrenado = -(velocidadfrenado *0.2);\n\t\t\n\t\tdouble velocidadesperadafrenando = UtilidadesNumericas.redondear(velocidadesperada + velocidadfrenado,1);\n\n\t\tassertEquals(\"Error: La velocidad de frenado de la bicicleta no es la correcta\", velocidadesperadafrenando, UtilidadesNumericas.redondear(bicicleta.getVelocidad(),1),2);\n\t\t\n\t\t\n\t\t\n\t\t//Se comprueban que los piñones se incremente y decrementen correctamente\n\t\t\n\t\tint incrementarpinhonesperado = bicicleta.getPinhonactual() +1;\n\t\t\n\t\tbicicleta.incrementarPinhon();\n\t\t\n\t\tassertEquals(\"Error: El incremento de piñon de la bicicleta no es la correcta\", incrementarpinhonesperado, bicicleta.getPinhonactual(), 0);\n\t\t\n\t\tint decrementarpinhonesperado = bicicleta.getPinhonactual() -1;\n\t\t\t\n\t\tbicicleta.decrementarPinhon();\n\t\t\n\t\tassertEquals(\"Error: El decremento de piñon de la bicicleta no es la correcta\", decrementarpinhonesperado, bicicleta.getPinhonactual(), 0);\n\t\t\n\t\t\n\t\t\n\t\t//Se comprueban que los platos se incremente y decrementen correctamente\n\t\t\n\t\tint incrementarplatoesperado = bicicleta.getPlatoactual() +1;\n\t\t\n\t\tbicicleta.incrementarPlato();\n\t\t\n\t\tassertEquals(\"Error: El incremento del plato de la bicicleta no es la correcta\", incrementarplatoesperado, bicicleta.getPlatoactual(), 2);\n\t\t\n\t\tint decrementarplatoesperado = bicicleta.getPlatoactual() -1;\n\t\t\n\t\tbicicleta.decrementarPlato();\n\t\t\n\t\tassertEquals(\"Error: El decremento de piñon de la bicicleta no es la correcta\", decrementarplatoesperado, bicicleta.getPlatoactual(), 0);\n\t}", "@Test\r\n public void testWortUeberpruefen() {\r\n System.out.println(\"wortUeberpruefen\");\r\n String eingabewort = \"\";\r\n Turingband t = null;\r\n Texteinlesen instance = new Texteinlesen();\r\n instance.wortUeberpruefen(eingabewort, t);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void apiKundenViewGetAllGetTest() throws ApiException {\n List<CmplxKunden> response = api.apiKundenViewGetAllGet();\n\n // TODO: test validations\n }", "public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\n }", "public void testOnLanguagesObtained() throws JSONException, NoSuchFieldException, IllegalAccessException, InterruptedException {\n assertFalse(\"There should be no dictionaries in sharedPrefs\", SharedPrefs.contains(\"dicts\"));\n Field privateField = SplashActivity.class.getDeclaredField(\"localizedValues\");\n privateField.setAccessible(true);\n LocalizedValues localizedValues = (LocalizedValues) privateField.get(getActivity());\n\n\n getActivity().onDictionariesObtained(dictMocks);\n getActivity().onLanguagesObtained(langMocks);\n\n while(localizedValues.getStatus() != AsyncTask.Status.FINISHED){\n //Wait\n }\n\n BiMap<String,String> languages = SharedPrefs.getStringBiMap(\"languages\");\n\n assertEquals(\"Should be equal\", \"sanskrít\", languages.get(\"SANSKRIT\"));\n\n }", "@Test\n public void testFindAllPassengers() {\n System.out.println(\"findAllPassengers\");\n PassengerHandler instance = new PassengerHandler();\n ArrayList<Passenger> expResult = new ArrayList();\n for(int i = 1; i < 24; i++){\n Passenger p = new Passenger();\n p.setPassengerID(i);\n p.setForename(\"Rob\");\n p.setSurname(\"Smith\");\n p.setDOB(new Date(2018-02-20));\n p.setNationality(\"USA\");\n p.setPassportNumber(i);\n expResult.add(p);\n }\n \n ArrayList<Passenger> result = instance.findAllPassengers();\n assertEquals(expResult, result);\n }", "@Test\r\n public void testFGetFreelancers() {\r\n System.out.println(\"getFreelancers\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> expResult = new ArrayList<>();\r\n List<Usuario> result = instance.getFreelancers();\r\n \r\n assertEquals(expResult, result);\r\n }", "@Ignore\n @Test\n public void testPostaviKorisnickePodatke() throws Exception {\n System.out.println(\"postaviKorisnickePodatke\");\n String apiKey = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n instance.postaviKorisnickePodatke(apiKey);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void avsResultTest() {\n assertEquals(\"G\", authResponse.getAvsResult());\n }", "@Test\n void pay() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"machine gun\");\n Weapon w = new Weapon(\"t.h.o.r.\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n int[] ammo = {3, 3, 3};\n p.getPb().grabAmmo(ammo);\n w.pay(\"base\", p);\n\n assertTrue(p.getPb().getAmmo('b')==3 && p.getPb().getAmmo('r')==3 && p.getPb().getAmmo('y')==3);\n\n }", "@Test\n public void getTarjetasPrepagoTest() {\n List<TarjetaPrepagoEntity> list = tarjetaPrepagoLogic.getTarjetasPrepago();\n Assert.assertEquals(data.size(), list.size());\n for (TarjetaPrepagoEntity entity : list) {\n boolean found = false;\n for (TarjetaPrepagoEntity storedEntity : data) {\n if (entity.getId().equals(storedEntity.getId())) {\n found = true;\n }\n }\n Assert.assertTrue(found);\n }\n }", "@Test\n public void testGetDistancia() {\n HospedajeLugarEntity hospedajeT = data.get(0);\n HospedajeLugarEntity hospedaje = new HospedajeLugarEntity();\n hospedaje.setDistancia(hospedajeT.getDistancia());\n Assert.assertTrue(hospedajeT.getDistancia().equals(hospedaje.getDistancia()));\n }", "protected ArrayList<Integer> bepaalTrioSpelers(Groep groep) {\r\n ArrayList<Integer> trio = new ArrayList<>();\r\n if (groep.getSpelers().size() == 3) {\r\n \t// 3 spelers, dus maak gelijk trio\r\n trio.add(groep.getSpelers().get(0).getId());\r\n trio.add(groep.getSpelers().get(1).getId());\r\n trio.add(groep.getSpelers().get(2).getId());\r\n return trio;\r\n }\r\n int spelerID = 0;\r\n try {\r\n spelerID = IJCController.c().getBeginpuntTrio(groep.getSpelers().size());\r\n }\r\n catch (Exception e) {\r\n \tlogger.log(Level.WARNING, \"Problem with spelersID. No int.\");\r\n }\r\n int minDelta = 1;\r\n int plusDelta = 1;\r\n int ignore = 0;\r\n boolean doorzoeken = true;\r\n while (doorzoeken) {\r\n Speler s1 = groep.getSpelerByID(spelerID);\r\n Speler s2 = groep.getSpelerByID(spelerID - minDelta);\r\n Speler s3 = groep.getSpelerByID(spelerID + plusDelta);\r\n if (isGoedTrio(s1, s2, s3, ignore)) {\r\n trio.add(s1.getId());\r\n trio.add(s2.getId());\r\n trio.add(s3.getId());\r\n return trio;\r\n } else {\r\n if ((s2 == null) || (s3 == null)) {\r\n if (ignore > 4) {\r\n doorzoeken = false;\r\n }\r\n ignore += 1;\r\n minDelta = 1;\r\n plusDelta = 1;\r\n } else {\r\n if (minDelta > plusDelta) {\r\n plusDelta++;\r\n } else {\r\n minDelta++;\r\n }\r\n }\r\n }\r\n }\r\n return trio;\r\n }", "@Test\n public void shouldGetLoveAll() {\n \n String expResult = \"Love - ALL \" ;\n String result = scoreService.get(nadale, federer) ;\n assertThat( expResult, is(result) ) ;\n }", "@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearPeliculasTest() {\r\n\r\n\t\tpd.crearPeliculas();\r\n\t\tpd.pm.deletePersistent(pd.filmA);\r\n\t\tpd.pm.deletePersistent(pd.filmB);\r\n\t\tpd.pm.deletePersistent(pd.filmC);\r\n\t\tpd.pm.deletePersistent(pd.filmD);\r\n\r\n\t}", "@Test\n public void apiKundenViewGetInaktiveGetTest() throws ApiException {\n List<CmplxKunden> response = api.apiKundenViewGetInaktiveGet();\n\n // TODO: test validations\n }", "@Test\n public void sucheSaeleBezT() throws Exception {\n System.out.println(\"sucheSaele nach Bezeichnung\");\n bezeichnung = \"Halle 1\";\n typ = \"\";\n plaetzeMin = null;\n ort = null;\n SaalDAO dao=DAOFactory.getSaalDAO();\n query = \"bezeichnung like '%\" + bezeichnung + \"%' \";\n explist = dao.find(query);\n System.out.println(query);\n List<Saal> result = SaalHelper.sucheSaele(bezeichnung, typ, plaetzeMin, ort);\n assertEquals(explist, result);\n \n }", "@Test\n public void testIsApellido_Materno() {\n System.out.println(\"isApellido_Materno\");\n String AM = \"Proud\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Materno(AM);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n\n }", "@Test\n public void testGetPagamentos() {\n }", "@Test\r\n public void testLisaakaari() {\r\n System.out.println(\"lisaakaari\");\r\n Kaari kaari = null;\r\n Pala instance = null;\r\n instance.lisaakaari(kaari);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Ignore\n @Test\n public void testDajLokaciju() throws Exception {\n System.out.println(\"dajLokaciju\");\n String adresa = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n Lokacija expResult = null;\n Lokacija result = instance.dajLokaciju(adresa);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }" ]
[ "0.75115424", "0.7233977", "0.65107286", "0.5935509", "0.5834023", "0.5805562", "0.5779429", "0.57169497", "0.5662601", "0.55961025", "0.559516", "0.55741835", "0.55473995", "0.5531899", "0.5513477", "0.5505774", "0.54967356", "0.5466267", "0.5462762", "0.5430873", "0.54143244", "0.5414064", "0.54139566", "0.5411075", "0.5402896", "0.5398551", "0.53844935", "0.5372754", "0.53678447", "0.53547865", "0.5352257", "0.534982", "0.53461695", "0.5344333", "0.53348047", "0.53249925", "0.53230643", "0.5319364", "0.5308952", "0.53073263", "0.5296524", "0.52935034", "0.52922976", "0.5290865", "0.5289925", "0.52891964", "0.52831084", "0.52826256", "0.5280372", "0.5279993", "0.5278883", "0.52777314", "0.5271969", "0.52677965", "0.52559584", "0.52550864", "0.5241362", "0.52368534", "0.5233679", "0.52240556", "0.5219872", "0.5219017", "0.5212926", "0.52125114", "0.52044636", "0.5197988", "0.5194558", "0.51884514", "0.5184172", "0.518379", "0.51822895", "0.5178315", "0.5177895", "0.5175262", "0.517282", "0.5172807", "0.51698726", "0.51666063", "0.51639783", "0.5156869", "0.5154366", "0.5151568", "0.51463145", "0.51409924", "0.51395315", "0.51338726", "0.51332116", "0.5132156", "0.5129886", "0.5129487", "0.5123918", "0.5123195", "0.51230127", "0.51065224", "0.51002467", "0.5097212", "0.5096532", "0.5095546", "0.509488", "0.50920755" ]
0.7017544
2
Test of getPenggunas method, of class DaftarPengguna.
@Test public void testGetPenggunas_0args() { System.out.println("getPenggunas"); DaftarPengguna instance = new DaftarPengguna(); List expResult = null; List result = instance.getPenggunas(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetPengguna() {\n System.out.println(\"getPengguna\");\n String email = \"\";\n String password = \"\";\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.getPengguna(email, password);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetPenggunas_Long() {\n System.out.println(\"getPenggunas\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n List expResult = null;\n List result = instance.getPenggunas(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testFindPengguna() {\n System.out.println(\"findPengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.findPengguna(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testAddPengguna() {\n System.out.println(\"addPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.addPengguna(pengguna);\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 testTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(); \n\n\t\tshowData_skpp(data,\"penerbit\",\"jumlah_surat\");\n\t}", "@Test \r\n\t\r\n\tpublic void ataqueDeMagoSinMagia(){\r\n\t\tPersonaje perso=new Humano();\r\n\t\tEspecialidad mago=new Hechicero();\r\n\t\tperso.setCasta(mago);\r\n\t\tperso.bonificacionDeCasta();\r\n\t\t\r\n\t\tPersonaje enemigo=new Orco();\r\n\t\tEspecialidad guerrero=new Guerrero();\r\n\t\tenemigo.setCasta(guerrero);\r\n\t\tenemigo.bonificacionDeCasta();\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(44,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t//ataque normal\r\n\t\tperso.atacar(enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t// utilizar hechizo\r\n\t\tperso.getCasta().getHechicero().agregarHechizo(\"Engorgio\", new Engorgio());\r\n\t\tperso.getCasta().getHechicero().hechizar(\"Engorgio\",enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(20,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t}", "@Test\n public void getTarjetaPrepagoTest()\n {\n TarjetaPrepagoEntity entity = data.get(0);\n TarjetaPrepagoEntity resultEntity = tarjetaPrepagoLogic.getTarjetaPrepago(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNumTarjetaPrepago(), resultEntity.getNumTarjetaPrepago());\n Assert.assertEquals(entity.getSaldo(), resultEntity.getSaldo(), 0.001);\n Assert.assertEquals(entity.getPuntos(), resultEntity.getPuntos(),0.001);\n }", "@Test\r\n public void testPartido2() throws Exception { \r\n P2.fijarEquipos(\"Barça\",\"Depor\"); \r\n P2.comenzar(); \r\n P2.tantoLocal();\r\n P2.terminar(); \r\n assertEquals(\"Barça\",P2.ganador());\r\n }", "@Test\n public void testMediaPesada() {\n System.out.println(\"mediaPesada\");\n int[] energia = null;\n int linhas = 0;\n double nAlpha = 0;\n Double[] expResult = null;\n Double[] resultArray = null;\n double[] result = ProjetoV1.mediaPesada(energia, linhas, nAlpha);\n if (result != null) {\n resultArray = ArrayUtils.converterParaArrayDouble(result);\n }\n\n assertArrayEquals(expResult, resultArray);\n\n }", "@Test\r\n public void testPartido3() throws Exception {\r\n P3.fijarEquipos(\"Barça\",\"Depor\"); \r\n P3.comenzar(); \r\n P3.tantoVisitante();\r\n P3.terminar(); \r\n assertEquals(\"Depor\",P3.ganador());\r\n }", "@Test\n void doEffectPlasmaGun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"plasma gun\");\n Weapon w17 = new Weapon(\"plasma gun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w17);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w17.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n p.setPlayerPosition(Board.getSpawnpoint(2));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(6));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && p.getPlayerPosition() == Board.getSquare(6));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(1));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && p.getPlayerPosition() == Board.getSquare(1));\n\n p.setPlayerPosition(Board.getSpawnpoint(2));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(6));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"opt1\", \"base\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && p.getPlayerPosition() == Board.getSquare(6));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSpawnpoint('b'));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"base\", \"opt2\", \"opt1\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && p.getPlayerPosition() == Board.getSpawnpoint('b'));\n }", "@Test\r\n public void testAngabenInArraySpeichern() {\r\n System.out.println(\"angabenInArraySpeichern\");\r\n Texteinlesen instance = new Texteinlesen();\r\n instance.angabenInArraySpeichern();\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testEditPengguna() {\n System.out.println(\"editPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.editPengguna(pengguna);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testDeletePengguna() throws Exception {\n System.out.println(\"deletePengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.deletePengguna(id);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n void doEffectcyberblade(){\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"cyberblade\");\n Weapon w20 = new Weapon(\"cyberblade\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w20);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w20.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt2\", \"opt1\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n }", "@Test\r\n\tpublic void testShootHit() {\n\t\t\r\n\t\tLoginResponse respLoginPepe = service.login(\"pepe\", \"123456\");\r\n\t\tassertEquals(LoginStateEnum.OK,respLoginPepe.getState());\r\n\t\t\r\n\t\tLoginResponse respLoginJuan = service.login(\"juan\", \"123456\");\r\n\t\tassertEquals(LoginStateEnum.OK,respLoginJuan.getState());\r\n\t\t\r\n\t\t// pepe pide usuarios disponibles\r\n\t\t\r\n\t\tGetUsersResponse usersResponse = service.getAvailableUsers(respLoginPepe.getToken());\r\n\t\tList<String> users = usersResponse.getUsers();\r\n\t\tassertNotNull(users);\r\n\t\tassertEquals(1,users.size());\r\n\t\t\r\n\t\t// pepe le declara la guerra a juan (por lo tanto tendrá derecho al primer disparo)\r\n\t\tDeclareWarResponse warResp = service.declareWar(respLoginPepe.getToken(), \"juan\");\r\n\t\tString warToken=warResp.getWarToken();\r\n\t\tSystem.out.println(warToken);\r\n\t\tassertNotNull(warToken);\r\n\t\t\r\n\t\t// Juan recibe invitación a pelear de Pepe\r\n\t\tNotificationResponse warDeclaredResp = service.getNotification(respLoginJuan.getToken());\r\n\t\tList<NotificationDto> nots= warDeclaredResp.getNotifications();\r\n\t\tassertNotNull(nots);\r\n\t\tassertTrue(nots.size()>0);\r\n\t\tNotificationDto not = nots.get(0);\r\n\t\tassertNotNull(not.getWarToken());\r\n\t\tassertEquals(NotificationTypeEnum.DECLARED_WAR,not.getNotificationType());\r\n\t\tassertEquals(\"pepe\",not.getSenderNick());\r\n\t\t\r\n\t\t// Juan acepta el reto.\r\n\t\tAcceptDeclaredWarResponse declaredWarResponse = service.acceptDeclaredWar(respLoginJuan.getToken(), not.getWarToken());\r\n\t\tassertEquals(MessageStateEnum.OK, declaredWarResponse.getState());\r\n\t\t\r\n\t\t// Pepe recibe la notificación que Juan le aceptó el reto\r\n\t\tNotificationResponse juanAceptaRetoNotif = service.getNotification(respLoginPepe.getToken());\r\n\t\tnots= juanAceptaRetoNotif.getNotifications();\r\n\t\tassertNotNull(nots);\r\n\t\tassertTrue(nots.size()>0);\r\n\t\tnot = nots.get(0);\r\n\t\tassertNotNull(not.getWarToken());\r\n\t\tassertEquals(NotificationTypeEnum.ACCEPTED_WAR,not.getNotificationType());\r\n\t\tassertEquals(\"juan\",not.getSenderNick());\r\n\t\t\r\n\t\t// Pepe Valida su flota\r\n\t\tValidateFleetResponse validateFleetResponse = service.validateFleet(respLoginPepe.getToken(), not.getWarToken(), fleet);\r\n\t\tassertEquals(MessageStateEnum.OK, validateFleetResponse.getState());\t\t\r\n\t\t\r\n\t\t// Juan valida la flota\r\n\t\t\r\n\t\tvalidateFleetResponse = service.validateFleet(respLoginJuan.getToken(), not.getWarToken(), fleet);\r\n\t\tassertEquals(MessageStateEnum.OK, validateFleetResponse.getState());\r\n\t\t\r\n\t\t// Pepe recibe la notificación para primer disparo\r\n\t\tNotificationResponse primerDisparoNotif = service.getNotification(respLoginPepe.getToken());\r\n\t\tnots= primerDisparoNotif.getNotifications();\r\n\t\tassertNotNull(nots);\r\n\t\tassertTrue(nots.size()>0);\r\n\t\tnot = nots.get(0);\r\n\t\tassertNotNull(not.getWarToken());\r\n\t\tassertEquals(NotificationTypeEnum.TURN_TO_SHOOT,not.getNotificationType());\r\n\t\t\r\n\t\t\r\n\t\t//finalmente Dispara\r\n\t\t\r\n\t\tShootResponse shootResp = service.shoot(respLoginPepe.getToken(), not.getWarToken(), \"1\", \"d\");\r\n\t\t// tocado, vuelve a disparar\r\n\t\tassertEquals(ShootEnum.HIT, shootResp.getShootResult());\r\n\r\n\t\t// disparo\r\n\t\t\r\n\t\tshootResp = service.shoot(respLoginPepe.getToken(), not.getWarToken(), \"2\", \"d\");\r\n\t\t// tocado\r\n\t\tassertEquals(ShootEnum.HIT, shootResp.getShootResult());\r\n\r\n\t\tshootResp = service.shoot(respLoginPepe.getToken(), not.getWarToken(), \"3\", \"d\");\r\n\r\n\t\t// hundido\r\n\t\tassertEquals(ShootEnum.HIT_SUNK, shootResp.getShootResult());\r\n\r\n\t\tshootResp = service.shoot(respLoginPepe.getToken(), not.getWarToken(), \"0\", \"d\");\r\n\r\n\t\t// agua\r\n\t\tassertEquals(ShootEnum.WATER, shootResp.getShootResult());\r\n\r\n\t\t\r\n\t\t// Juan quiere conocer los disparos de Pepe\r\n\t\t\r\n\t\tShootNotificationResponse shootNotifResp = service.getShootNotification(respLoginJuan.getToken());\r\n\t\tList<Shoot> shoots = shootNotifResp.getShoots();\r\n\t\tassertNotNull(shoots);\r\n\t\tassertEquals(4, shoots.size());\r\n\t\tShoot shoot1 = shoots.get(0), shoot2= shoots.get(1), shoot3 = shoots.get(2),shoot4 = shoots.get(3);\r\n\t\tassertEquals(\"1\", shoot1.getX());\r\n\t\tassertEquals(\"d\", shoot1.getY());\r\n\t\tassertEquals(\"2\", shoot2.getX());\r\n\t\tassertEquals(\"d\", shoot2.getY());\r\n\t\tassertEquals(\"3\", shoot3.getX());\r\n\t\tassertEquals(\"d\", shoot3.getY());\r\n\t\tassertEquals(\"0\", shoot4.getX());\r\n\t\tassertEquals(\"d\", shoot4.getY());\r\n\t\t\r\n\t\t// Juan se arrepiente. (si no hago esto no me deja desloguear)\r\n\t\t\r\n\t\tRetireOfWarResponse retireOfWarResponse = service.retireOfWar(respLoginJuan.getToken());\r\n\t\tassertEquals(MessageStateEnum.OK, retireOfWarResponse.getState());\r\n\t\t\r\n\t\tLogoutResponse respLogoutPepe = service.logout(respLoginPepe.getToken());\r\n\t\tassertEquals(MessageStateEnum.OK,respLogoutPepe.getState());\r\n\t\t\r\n\t\tLogoutResponse respLogoutJuan = service.logout(respLoginJuan.getToken());\r\n\t\tassertEquals(MessageStateEnum.OK,respLogoutJuan.getState());\r\n\t\t\r\n\t}", "@Test\n public void testIsApellido_Paterno() {\n System.out.println(\"isApellido_Paterno\");\n String AP = \"ulfric\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Paterno(AP);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n\tpublic void testDarApellido()\n\t{\n\t\tassertEquals(\"El apellido esperado es Romero.\", \"Romero\", paciente.darApellido());\n\t}", "@Test\n public void getPerroTest() {\n \n PerroEntity entity = Perrodata.get(0);\n PerroEntity resultEntity = perroLogic.getPerro(entity.getId());\n Assert.assertNotNull(resultEntity);\n \n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getIdPerro(), resultEntity.getIdPerro());\n Assert.assertEquals(entity.getNombre(), resultEntity.getNombre());\n Assert.assertEquals(entity.getEdad(), resultEntity.getEdad());\n Assert.assertEquals(entity.getRaza(), resultEntity.getRaza());\n }", "@Test\n\t@Transactional(value = TransactionMode.ROLLBACK)\n\t@UsingDataSet({ \"persona.json\", \"registro.json\", \"administrador.json\", \"cuenta.json\", \"empleado.json\",\n\t\t\t\"familia.json\", \"genero.json\", \"recolector.json\", \"planta.json\" })\n\tpublic void listarPlantasPorGeneroFromEmpleadoTest() {\n\t\tTypedQuery<Planta> query = entityManager.createNamedQuery(Planta.LISTAR_PLANTAS_POR_GENERO, Planta.class);\n\t\tquery.setParameter(\"genero\", \"carnivoras\");\n\t\tList<Planta> listaPlantas = query.getResultList();\n\n\t\tAssert.assertEquals(listaPlantas.size(), 2);\n\t}", "@Test\r\n\tpublic void testGetPeliBalorazioak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 4);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.5);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 3);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 2);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 3.5);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 4);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazioak itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 3.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 5);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\r\n\t}", "@Test\n public void testEnchantedChangedWithSongOfTheDryads() {\n // Enchantment Creature — Horror\n // 0/0\n // Bestow {2}{B}{B}\n // Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.\n addCard(Zone.HAND, playerA, \"Nighthowler\");\n addCard(Zone.BATTLEFIELD, playerA, \"Swamp\", 4);\n addCard(Zone.BATTLEFIELD, playerA, \"Silvercoat Lion\"); // {1}{W} 2/2 creature\n\n addCard(Zone.GRAVEYARD, playerA, \"Pillarfield Ox\");\n addCard(Zone.GRAVEYARD, playerB, \"Pillarfield Ox\");\n\n // Enchant permanent\n // Enchanted permanent is a colorless Forest land.\n addCard(Zone.BATTLEFIELD, playerB, \"Forest\", 3);\n addCard(Zone.HAND, playerB, \"Song of the Dryads\"); // Enchantment Aura {2}{G}\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Nighthowler using bestow\", \"Silvercoat Lion\");\n\n castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, \"Song of the Dryads\", \"Silvercoat Lion\");\n\n setStrictChooseMode(true);\n setStopAt(2, PhaseStep.BEGIN_COMBAT);\n execute();\n\n assertPermanentCount(playerB, \"Song of the Dryads\", 1);\n\n ManaOptions options = playerA.getAvailableManaTest(currentGame);\n Assert.assertEquals(\"Player should be able to create 1 green mana\", \"{G}\", options.getAtIndex(0).toString());\n\n assertPermanentCount(playerA, \"Nighthowler\", 1);\n assertPowerToughness(playerA, \"Nighthowler\", 2, 2);\n assertType(\"Nighthowler\", CardType.CREATURE, true);\n assertType(\"Nighthowler\", CardType.ENCHANTMENT, true);\n\n Permanent nighthowler = getPermanent(\"Nighthowler\");\n Assert.assertFalse(\"The unattached Nighthowler may not have the aura subtype.\", nighthowler.hasSubtype(SubType.AURA, currentGame));\n }", "@Test\n\t@Transactional(value = TransactionMode.ROLLBACK)\n\t@UsingDataSet({ \"persona.json\", \"registro.json\", \"administrador.json\", \"cuenta.json\", \"empleado.json\",\n\t\t\t\"familia.json\", \"genero.json\", \"recolector.json\", \"planta.json\" })\n\tpublic void listarPlantasAprovadasFromEmpleadoTest() {\n\t\tTypedQuery<Planta> query = entityManager.createNamedQuery(Planta.LISTAR_PLANTAS_POR_APROVACION, Planta.class);\n\t\tquery.setParameter(\"aprovacion\", 1);\n\t\tList<Planta> listaPlantas = query.getResultList();\n\n\t\tAssert.assertEquals(listaPlantas.size(), 2);\n\t}", "public int getPapeles(int avenida, int calle);", "@Test\n public void testDajMeteoPrognoze() throws Exception {\n System.out.println(\"dajMeteoPrognoze\");\n int id = 0;\n String adresa = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n MeteoPrognoza[] expResult = null;\n MeteoPrognoza[] result = instance.dajMeteoPrognoze(id, adresa);\n assertArrayEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n }", "Lingua getLingua();", "@Test\n void doEffectpowerglove() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"power glove\");\n Weapon w10 = new Weapon(\"power glove\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w10);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w10.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(p.getPlayerPosition() == Board.getSquare(1) && victim.getPb().countDamages() == 1 && victim.getPb().getMarkedDamages('b') == 2);\n\n p.setPlayerPosition(Board.getSquare(0));\n s.add(Board.getSquare(1));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n players.clear();\n players.add(victim);\n s.add(Board.getSpawnpoint('b'));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSpawnpoint('b'));\n players.add(victim2);\n try{\n p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect(\"alt\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(p.getPlayerPosition() == Board.getSpawnpoint('b') && victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 2);\n\n p.setPlayerPosition(Board.getSquare(0));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(1));\n s.add(Board.getSpawnpoint('b'));\n try{\n p.getPh().getWeaponDeck().getWeapon(w10.getName()).doEffect(\"alt\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { System.out.println(\"ERROR\");}\n\n assertTrue(p.getPlayerPosition() == Board.getSpawnpoint('b') && victim.getPb().countDamages() == 2);\n }", "@Test\r\n public void testPartido1() throws Exception {\r\n /* \r\n * En el estado EN_ESPERA\r\n */\r\n assertEquals( \"Ubicación: Camp Nou\" \r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido está en espera, aún no se han concretado los equipos\"\r\n , P1.datos());\r\n /* \r\n * En el estado NO_JUGADO\r\n */\r\n P1.fijarEquipos(\"Barça\",\"Depor\"); \r\n assertEquals( \"Ubicación: Camp Nou\"\r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido aún no se ha jugado\"\r\n + \"\\nEquipo local: Barça\"\r\n + \"\\nEquipo visitante: Depor\" \r\n , P1.datos()\r\n );\r\n /* \r\n * En el estado EN_JUEGO\r\n */\r\n P1.comenzar(); \r\n P1.tantoLocal();\r\n P1.tantoVisitante();\r\n assertEquals( \"Ubicación: Camp Nou\"\r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido está en juego\"\r\n + \"\\nEquipo local: Barça\"\r\n + \"\\nTantos locales: 1\"\r\n + \"\\nEquipo visitante: Depor\"\r\n + \"\\nTantos visitantes: 1\"\r\n , P1.datos()\r\n );\r\n /* \r\n * En el estado FINALIZADO\r\n */\r\n P1.terminar(); \r\n assertEquals( \"Ubicación: Camp Nou\"\r\n + \"\\nFecha: 2010-04-28\"\r\n + \"\\nEl partido ha finalizado\"\r\n + \"\\nEquipo local: Barça\"\r\n + \"\\nTantos locales: 1\"\r\n + \"\\nEquipo visitante: Depor\"\r\n + \"\\nTantos visitantes: 1\"\r\n , P1.datos()\r\n );\r\n assertEquals(\"Empate\",P1.ganador());\r\n }", "@Test\n public void bateauAtPasDansGrille() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n Bateaux b = j.bateauAt(new Place(\"Z84897\"), g);\n\n assertNull(\"Il n'y a pas de bateau ici\", b);\n }", "public void testNamaPNSYangSkepnyaDiterbitkanOlehPresiden(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getNamaPNSYangSkepnyaDiterbitkanOlehPresiden(); \n\n\t\tshowData(data,\"nip\",\"nama\",\"tanggal_lahir\",\"tanggal_berhenti\",\"pangkat\",\"masa_kerja\",\"penerbit\");\n\t}", "public void testGetPhases_SomeNotExist() throws Exception {\n Phase[] phases = persistence.getPhases(new long[] {34534, 5, 144351});\n\n // verify the results\n assertEquals(\"Element 0 should be null.\", null, phases[0]);\n assertEquals(\"Element 2 should be null.\", null, phases[2]);\n assertEquals(\"Element 2 should be retrieved.\", 5, phases[1].getId());\n }", "@Test\n public void testAlunPainotus() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n String kysymys = k.alunPainotus(true);\n\n\n assertEquals(\"AlunPainoitus ei toimi\", \"sana\", kysymys);\n }", "@Test\n public void testGetYhteensa() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n k.tarkistaVastaus(\"vaarav vastaus\");\n k.tarkistaVastaus(\"trololololoo\");\n int virheita = k.getYhteensa();\n\n assertEquals(\"Sanan tarkastus ei toimi\", 2, virheita);\n }", "@Test\r\n\tpublic void testAttacks()\r\n\t{\r\n\t\tPokemon pk = new Vulpix(\"Vulpix\", 100);\r\n\t\tassertEquals(\"Vulpix\", pk.getName());\r\n\t\tCommand[] attacks = pk.getAttacks();\r\n\t\tassertEquals(\"FireSpin\", attacks[0].getAttackName());\r\n\t\tassertEquals(\"Ember\", attacks[1].getAttackName());\r\n\t\tassertEquals(\"Flamethrower\", attacks[2].getAttackName());\r\n\t\tassertEquals(\"Inferno\", attacks[3].getAttackName());\r\n\t}", "@Test\r\n @Ignore\r\n public void testGetPlantoes() {\r\n System.out.println(\"getPlantoes\");\r\n EnfermeiroDaoImpl instance = new EnfermeiroDaoImpl();\r\n List<Enfermeiro> expResult = null;\r\n List<Enfermeiro> result = instance.getPlantoes();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n\t@Transactional(value = TransactionMode.ROLLBACK)\n\t@UsingDataSet({ \"persona.json\", \"registro.json\", \"administrador.json\", \"cuenta.json\", \"empleado.json\",\n\t\t\t\"familia.json\", \"genero.json\", \"recolector.json\", \"planta.json\" })\n\tpublic void listarPlantasPorFamiliaFromEmpleadoTest() {\n\t\tTypedQuery<Planta> query = entityManager.createNamedQuery(Planta.LISTAR_PLANTAS_POR_FAMILIA, Planta.class);\n\t\tquery.setParameter(\"familia\", \"telepiatos\");\n\t\tList<Planta> listaPlantas = query.getResultList();\n\n\t\tAssert.assertEquals(listaPlantas.size(), 3);\n\t}", "@Test\n public void testAvaaRuutu() {\n int x = 0;\n int y = 0;\n Peli pjeli = new Peli(new Alue(3, 0));\n pjeli.avaaRuutu(x, y);\n ArrayList[] lista = pjeli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isAvattu());\n assertEquals(false, pjeli.isLahetetty());\n }", "@Test\n void doEffectmachinegun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"machine gun\");\n Weapon w14 = new Weapon(\"machine gun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w14);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w14.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia1\");\n victim2.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia2\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim2);\n players.add(victim);\n try {\n p.getPh().getWeaponDeck().getWeapon(w14.getName()).doEffect(\"base\", \"opt1\", null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) {\n System.out.println(\"ERROR\");\n }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1);\n\n players.clear();\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n players.add(victim);\n players.add(victim2);\n players.add(victim);\n players.add(victim3);\n try {\n p.getPh().getWeaponDeck().getWeapon(w14.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1);\n }", "@Test\n public void test4() {\n userFury.login(\"23ab\");\n assertTrue(userFury.getLoggedIn());\n\n userFury.buy(secondMusicTitle);\n ArrayList<MusicTitle> actualList = userFury.getTitlesBought();\n assertTrue(actualList.isEmpty());\n }", "@Test\n\tpublic void testDarNombre()\n\t{\n\t\tassertEquals(\"El nombre esperado es Germán.\", \"Germán\", paciente.darNombre());\n\t}", "public static void pesquisarTest() {\n\t\t\n\t\tlistaProfissional = profissionalDAO.lista();\n\n\t\t//user.setReceitas(new ArrayList<Receita>());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Entrou PEsquisar ====\");\n\t\tSystem.out.println(listaProfissional);\n\n\t}", "@Test\n public void testobtenerViajes() throws Exception {\n List<ViajeEntidad> viajes = getListaViajesEntidad();\n given(viajeServicio.consultarViajes()).willReturn(viajes);\n given(usuarioServicio.usuarioPorCorreo(getUsuarioEntidad().getPkCorreo())).willReturn(Optional.of(getUsuarioEntidad()));\n\n List<ViajeEntidadTemporal> viajesRetorno = viajesControlador.obtenerViajes();\n assertNotNull(viajesRetorno);\n assertEquals(viajesRetorno.size(), 3);\n }", "@Test\n\tvoid testgetAllPlants() {\n\t\tList<Plant> plantlist = service.getAllPlant();\n\t\tboolean result = true;\n\t\tif (plantlist.isEmpty()) {\n\t\t\tresult = false;\n\t\t}\n\t\tassertTrue(result);\n\t}", "@Test\n\tpublic void test02_CheckDisplayInvitationGadget(){\n\t\tinfo(\"prepare data\");\n\t\t/*Step Number: 1\n\t\t *Step Name: Check display gadget\n\t\t *Step Description: \n\t\t\t- Login as userA\n\t\t\t- Open intranet home\n\t\t\t- Check Invitation gadget\n\t\t *Input Data: \n\n\t\t *Expected Outcome: \n\t\t\t- A maximum number of displayed requests is 4\n\t\t\t-The oldest request will appear at the bottom while the newest will appear on the top\n\t\t\t- For user request, the gadget displays the profile picture of the user, his name and if available, his title.\n\t\t\t- For Spaces request, the gadget displays the space icon, the name, privacy status which is private or public, and the number of members in the space.\n\t\t\t- The title of the gadget will show the total number of requests received which is 4*/ \n\t\tinfo(\"Create datatest\");\n\t\tString space1=txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString space2=txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString space3=txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username3 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password3 = username3;\n\t\tString email3= username3 + mailSuffixData.getMailSuffixRandom();\n\n\t\t/*Create data test*/\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\t\taddUserPage.addUser(username3, password3, email3, username3, username3);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tinfo(\"Sign in with username1 account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\t\thp.goToMySpaces();\n\t\tspaceMg.addNewSpaceSimple(space1,space1);\n\t\tspaceHome.goToSpaceSettingTab();\n\t\tsetMag.inviteUser(DATA_USER1,false,\"\");\n\n\t\tinfo(\"Sign in with username2 account\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\t\thp.goToMySpaces();\n\t\tspaceMg.addNewSpaceSimple(space2,space2);\n\t\tspaceHome.goToSpaceSettingTab();\n\t\tsetMag.inviteUser(DATA_USER1,false,\"\");\n\n\t\tinfo(\"Sign in with username3 account\");\n\t\tmagAc.signIn(username3, password3);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\t\thp.goToMySpaces();\n\t\tspaceMg.addNewSpaceSimple(space3,space3);\n\t\tspaceHome.goToSpaceSettingTab();\n\t\tsetMag.inviteUser(DATA_USER1,false,\"\");\n\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tinfo(\"Verify that the maximum number of displayed requests is 4\");\n\t\tinfo(\"Verify that for user request, the portlet will displayes the profile picture of the user, his name\");\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username3));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\twaitForAndGetElement(hp.ELEMENT_INVITAITONS_SPACE_ICON.replace(\"${name}\",space3));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITAITONS_SPACE_ICON.replace(\"${name}\",space2));\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITAITONS_SPACE_ICON.replace(\"${name}\",space1));\n\n\t\tinfo(\"Verify that for space request, the gadget displays the space icon, the name, privacy status which is private or public, and the number of members in the space.\");\n\t\twaitForAndGetElement(hp.ELEMENT_INVITAITONS_SPACE_STATUS_MEMBERS.replace(\"${name}\",space3).replace(\"${statusMember}\",\"Private Space - 1 Members\"));\n\n\t\tinfo(\"Verify that The title of the gadget will show the total number of requests received which is 5\");\n\t\twaitForAndGetElement(By.xpath(hp.ELEMENT_INVITATIONS_NUMBER.replace(\"${number}\", \"6\")),2000,0);\n\n\t\tinfo(\"Delete DATA for the last test\");\n\t\tinfo(\"Signin with james account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToMySpaces();\n\t\tspaceMg.deleteSpace(space1, false);\n\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToMySpaces();\n\t\tspaceMg.deleteSpace(space2, false);\n\n\t\tmagAc.signIn(username3, password3);\n\t\thp.goToMySpaces();\n\t\tspaceMg.deleteSpace(space3, false);\n\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t\tuserAndGroup.deleteUser(username3);\n\t}", "@Test\r\n public void testYhdista() {\r\n System.out.println(\"yhdista\");\r\n Pala toinenpala = null;\r\n Palahajautustaulu taulu = null;\r\n Pala instance = null;\r\n instance.yhdista(toinenpala, taulu);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n\tvoid testGetAllByName() {\n\t\tList<Plant> plant = service.getAllByName(\"Tulsi\");\n\t\tString name = plant.get(0).getName();\n\t\tassertEquals(\"Tulsi\", name);\n\t}", "@Test(priority = 14)\n\tpublic void testTranslationsLists_From_Translation_0_10_OnAlQuranPage() throws Exception {\n\t\tSystem.out.println(\"<------Testing Translations Lists From_Translation_1_10 On Al-Quran Page------->\\n\");\n\t\ttestTranslations_chunk_Wise(0, 10);\n\t}", "List<Plaza> consultarPlazas();", "@Test\r\n public void testGetMovieAlternativeTitles() throws MovieDbException {\r\n LOG.info(\"getMovieAlternativeTitles\");\r\n String country = \"\";\r\n List<AlternativeTitle> results = tmdb.getMovieAlternativeTitles(ID_MOVIE_BLADE_RUNNER, country);\r\n assertTrue(\"No alternative titles found\", results.size() > 0);\r\n \r\n country = \"US\";\r\n results = tmdb.getMovieAlternativeTitles(ID_MOVIE_BLADE_RUNNER, country);\r\n assertTrue(\"No alternative titles found\", results.size() > 0);\r\n \r\n }", "@Test\r\n public void getSalaTest() \r\n {\r\n SalaEntity entity = data.get(0);\r\n SalaEntity resultEntity = salaLogic.getSala(data.get(0).getId());\r\n Assert.assertNotNull(resultEntity);\r\n Assert.assertEquals(entity.getId(), resultEntity.getId());\r\n Assert.assertEquals(resultEntity.getNumero(), entity.getNumero());\r\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n TechnicalInformation technicalInformation0 = lovinsStemmer0.getTechnicalInformation();\n assertFalse(technicalInformation0.hasAdditional());\n }", "public void testbusquedaAvanzada() {\n// \ttry{\n\t \t//indexarODEs();\n\t\t\tDocumentosVO respuesta =null;//this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"agregatodos identificador:es-ma_20071119_1_9115305\", \"\"));\n\t\t\t/*\t\tObject [ ] value = { null } ;\n\t\t\tPropertyDescriptor[] beanPDs = Introspector.getBeanInfo(ParamAvanzadoVO.class).getPropertyDescriptors();\n\t\t\tString autor=autor\n\t\t\tcampo_ambito=ambito\n\t\t\tcampo_contexto=contexto\n\t\t\tcampo_descripcion=description\n\t\t\tcampo_edad=edad\n\t\t\tcampo_fechaPublicacion=fechaPublicacion\n\t\t\tcampo_formato=formato\n\t\t\tcampo_idiomaBusqueda=idioma\n\t\t\tcampo_nivelEducativo=nivelesEducativos\n\t\t\tcampo_palabrasClave=keyword\n\t\t\tcampo_procesoCognitivo=procesosCognitivos\n\t\t\tcampo_recurso=tipoRecurso\n\t\t\tcampo_secuencia=conSinSecuencia\n\t\t\tcampo_titulo=title\n\t\t\tcampo_valoracion=valoracion\n\t\t\tfor (int j = 0; j < beanPDs.length; j++) {\n\t\t\t\tif(props.getProperty(\"campo_\"+beanPDs[j].getName())!=null){\n\t\t\t\t\tvalue[0]=\"valor a cargar\";\n\t\t\t\t\tsetPropValue(Class.forName(ParamAvanzadoVO.class.getName()).newInstance(), beanPDs[j],value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t*/\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\tcomprobarRespuesta(respuesta.getResultados()[0]);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pruebatitulo\", \"\"));\n//\t\t\tSystem.err.println(\"aparar\");\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"nivel*\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"nived*\"));\n//\t\t\tassertNull(respuesta.getResultados());\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"nivel\"));\n//\t\t\tassertNotNull(respuesta.getResultados());\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"\", \"nivel\"));\n//\t\t\tassertNull(respuesta.getResultados());\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzada(\"pclave\", \"}f2e_-i3299(--5\"));\n//\t\t\tassertNull(respuesta.getResultados());\n\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"verso estrofa\", \"universal pepito\",\"\"));\n//\t\t\tassertNull(respuesta.getResultados());\n\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"descwildcard\", \"ambito0\",\"\"));\n//\t\t\tassertEquals(respuesta.getSugerencias().length, 1);\n//\t\t\t\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"desc*\", \"\",\"\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 2);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"keywordAvanzado\", \"ambito0\",\"descripcion\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"keywordAvanzado\", \"ambito0\",\"descripcion compuesta\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"keywordAvanzado\", \"ambito0\",\"descripcion pru*\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n//\t\t\t\n//\t\t\trespuesta =this.servicio.busquedaAvanzada(generarParametrosBusquedaAvanzadaComunidades(\"descwild*\", \"\",\"\"));\n//\t\t\tassertEquals(respuesta.getResultados().length, 1);\n// \t}catch(Exception e){\n//\t\t \tlogger.error(\"ERROR: fallo en test buscador-->\",e);\n//\t\t\tthrow new RuntimeException(e);\n// \t}finally{\n// \t\teliminarODE(new String [] { \"asdf\",\"hjkl\"});\n// \t}\n\t\t\tassertNull(respuesta);\n }", "@Test\n void doEffectshotgun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"shotgun\");\n Weapon w9 = new Weapon(\"shotgun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w9);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w9.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(0));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try{\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && victim.getPlayerPosition() == Board.getSquare(0));\n\n s.add(Board.getSquare(1));\n try{\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"base\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 6 && victim.getPlayerPosition() == Board.getSquare(1));\n\n s.clear();\n s.add(Board.getSpawnpoint('b'));\n try {\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"base\", null, null, p, players, s); //A choice of yours is yours\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n players.clear();\n players.add(victim);\n s.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n players.clear();\n players.add(victim);\n s.clear();\n try{\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"alt\", null, null, p, players, null); //A choice of yours is wrong\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n }", "@Test\n\tpublic void test() {\n\t\tSystem.out.println(\"Displaying Available Languages\");\n\t\tSystem.out.println(\"------------------------------\");\n\t\tLanguageList.displayAvailableLanguage();\n\t}", "@Test\n void grab() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n Square s = new Square(0, 4, false, true, false, true, false, 'b');\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(s);\n p.getPh().getPowerupDeck().getPowerups().clear();\n p.setTurn(true);\n AmmoTile a = new AmmoTile();\n PowerupDeck pud = new PowerupDeck();\n int[] cubes = new int[3];\n cubes[0] = 2;\n cubes[2] = 1;\n char[] c1 = {'b', 'b', 'b'};\n char[] c2 = {'r', 'r', 'r'};\n char[] c3 = {'y', 'y', 'y'};\n p.getPb().payAmmo(c1);\n p.getPb().payAmmo(c2);\n p.getPb().payAmmo(c3);\n a.setCubes(cubes);\n a.setPowerup(false);\n s.setAmmo(a);\n try{\n p.grab(p.getPlayerPosition(), pud);\n }catch (WrongSquareException e){}\n }", "@Test\n public void yksiVasemmalle() {\n char[][] kartta = Labyrintti.lueLabyrintti(\"src/main/resources/labyrinttiTestiVasen.txt\");\n assertFalse(kartta == null);\n Labyrintti labyrintti = new Labyrintti(kartta);\n RatkaisuLeveyshaulla ratkaisuSyvyyshaulla = new RatkaisuLeveyshaulla(labyrintti);\n String ratkaisu = ratkaisuSyvyyshaulla.ratkaisu();\n assertTrue(Tarkistaja.tarkista(ratkaisu, labyrintti));\n }", "@Test\n void doEffectrailgun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"railgun\");\n Weapon w11 = new Weapon(\"railgun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w11);\n p.setPlayerPosition(Board.getSpawnpoint('r'));\n p.getPh().drawWeapon(wd, w11.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 2);\n }", "@Test\n\tpublic void testGetLista() throws Exception {\n\t\tSystem.out.println(\"getLista\");\n\t\tso.execute(entity);\n\t\tList<IGeneralEntity> expResult = ((TakeTrucksOperation) so).getLista();\n\t\tList<IGeneralEntity> result = so.db.vratiSve(entity);\n\n\t\tassertEquals(expResult.size(), result.size());\n\t}", "@Test\n public void testLukitseRuutu() {\n System.out.println(\"lukitseRuutu\");\n int x = 0;\n int y = 0;\n Peli peli = new Peli(new Alue(3, 1));\n peli.lukitseRuutu(x, y);\n ArrayList[] lista = peli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isLukittu());\n }", "public void testAltaVehiculo(){\r\n\t}", "@Test\r\n public void testAvlPuu() {\r\n AvlPuu puu = new AvlPuu();\r\n assertEquals(puu.laskeSolmut(), 0);\r\n }", "@Test\n void doEffectthor() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"t.h.o.r.\");\n Weapon w15 = new Weapon(\"t.h.o.r.\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w15);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w15.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim2);\n try {\n p.getPh().getWeaponDeck().getWeapon(w15.getName()).doEffect(\"base\", \"opt1\", null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n players.add(victim2);\n players.add(victim3);\n try {\n p.getPh().getWeaponDeck().getWeapon(w15.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 2);\n }", "@Test\n public void testGetVastaus() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n String vastaus = k.getVastaus();\n assertEquals(\"getVastaus ei toimi odoitetusti\", \"vastine\", vastaus);\n }", "private void getPTs(){\n mPyTs = estudioAdapter.getListaPesoyTallasSinEnviar();\n //ca.close();\n }", "@Test\n public void testGetTamano() {\n System.out.println(\"getTamano\");\n Huffman instance = null;\n int expResult = 0;\n int result = instance.getTamano();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n void doEffectvortexcannon() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"vortex cannon\");\n Weapon w16 = new Weapon(\"vortex cannon\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w16);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w16.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSquare(10));\n try{\n p.getPh().getWeaponDeck().getWeapon(w16.getName()).doEffect(\"base\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim.getPlayerPosition() == Board.getSquare(10));\n\n players.clear();\n s.clear();\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSquare(9));\n players.add(victim);\n players.add(victim2);\n players.add(victim3);\n s.add(Board.getSquare(10));\n try {\n p.getPh().getWeaponDeck().getWeapon(w16.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim.getPlayerPosition() == Board.getSquare(10) && victim2.getPlayerPosition() == Board.getSquare(10) && victim2.getPb().countDamages() == 1 && victim3.getPlayerPosition()==Board.getSquare(10) && victim3.getPb().countDamages()==1);\n }", "@Test\n public void testGetAllPharmacies() throws Exception {\n System.out.println(\"getAllPharmacies\");\n\n ManagePharmaciesController instance = new ManagePharmaciesController();\n LinkedList<PharmacyDTO> expResult= new LinkedList<>();\n LinkedList<PharmacyDTO> result = instance.getAllPharmacies();\n expResult.add(getPharmacyDTOTest(\"a\"));\n expResult.add(getPharmacyDTOTest(\"b\"));\n expResult.add(getPharmacyDTOTest(\"c\"));\n\n LinkedList<Pharmacy> resultDB = new LinkedList<>();\n resultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"a\")));\n resultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"b\")));\n resultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"c\")));\n PharmacyDB db = Mockito.mock(PharmacyDB.class);\n PharmaDeliveriesApp.getInstance().getPharmacyService().setPharmacyDB(db);\n when(db.getAllPharmacies()).thenReturn(resultDB);\n result = instance.getAllPharmacies();\n Assertions.assertEquals(result.size(), expResult.size());\n Assertions.assertEquals(result.get(0).getName(), expResult.get(0).getName());\n Assertions.assertEquals(result.get(1).getName(), expResult.get(1).getName());\n Assertions.assertEquals(result.get(2).getName(), expResult.get(2).getName());\n \n// int i = 0;\n// for(PharmacyDTO p : result){\n// Assertions.assertEquals(p.getName(), expResult.get(i).getName());\n// i++;\n// }\n \n when(db.getAllPharmacies()).thenReturn(null);\n Assertions.assertNull(instance.getAllPharmacies());\n }", "@Test\n public void testGetPharmaciesByAdministrator() throws Exception {\n System.out.println(\"getPharmaciesByAdministrator\");\n \n //Logout test\n ManagePharmaciesController instance = new ManagePharmaciesController();\n// PharmaDeliveriesApp.getInstance().doLogout();\n// LinkedList<PharmacyDTO> exp = null;\n// LinkedList<PharmacyDTO> result = instance.getPharmaciesByAdministrator();\n// Assertions.assertEquals(exp, result);\n// PharmaDeliveriesApp.getInstance().doLogin(\"[email protected]\", \"adminteste\");\n \n //Value test\n PharmacyDB db = Mockito.mock(PharmacyDB.class);\n PharmaDeliveriesApp.getInstance().getPharmacyService().setPharmacyDB(db);\n \n LinkedList<Pharmacy> inputsDB = new LinkedList<>();\n inputsDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"testeA\")));\n inputsDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"testeB\")));\n \n LinkedList<Pharmacy> expResultDB = new LinkedList<>();\n expResultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"testeA\")));\n expResultDB.add(convertPharmacyDTO(getPharmacyDTOTest(\"testeB\")));\n \n LinkedList<Pharmacy> inputsCobtroller = new LinkedList<>();\n inputsCobtroller.add(convertPharmacyDTO(getPharmacyDTOTest(\"testeA\")));\n inputsCobtroller.add(convertPharmacyDTO(getPharmacyDTOTest(\"testeB\")));\n \n LinkedList<PharmacyDTO> expResult = new LinkedList<>();\n expResult.add(getPharmacyDTOTest(\"testeA\"));\n expResult.add(getPharmacyDTOTest(\"testeB\"));\n \n when(db.getPharmaciesByAdministrator(any(User.class))).thenReturn(expResultDB);\n Assertions.assertEquals(instance.getPharmaciesByAdministrator().size(), expResult.size());\n \n when(db.getPharmaciesByAdministrator(any(User.class))).thenReturn(null);\n Assertions.assertNull(instance.getPharmaciesByAdministrator());\n \n }", "@Test\n void doEffecttractorbeam() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"tractor beam\");\n Weapon w2 = new Weapon(\"tractor beam\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.getWeapons().add(w2);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w2.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSpawnpoint('b'));\n try {\n p.getPh().getWeaponDeck().getWeapon(w2.getName()).doEffect(\"base\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n assertTrue(players.get(0).getPb().countDamages() == 1 && players.get(0).getPlayerPosition() == Board.getSpawnpoint('b'));\n\n players.get(0).setPlayerPosition(Board.getSquare(1));\n s.clear();\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w2.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(players.get(0).getPb().countDamages() == 4 && players.get(0).getPlayerPosition() == p.getPlayerPosition());\n }", "public void testTumPencereleriKapat() {\n System.out.println(\"tumPencereleriKapat\");\n Yakalayici instance = new Yakalayici();\n instance.tumPencereleriKapat();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private static String testSayHello(Greeter greeter)\n {\n return greeter.sayHello();\n }", "@Test\n public void testGetVaarin() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n k.asetaKysymys(a, true, 1);\n k.tarkistaVastaus(\"vaarav vastaus\");\n k.tarkistaVastaus(\"trololololoo\");\n int virheita = k.getVaarin();\n\n assertEquals(\"Väärin menneiden tarkistusten lasku ei toimi\", 2, virheita);\n }", "@Test\r\n @Ignore\r\n public void testGetPlantoesDia() {\r\n System.out.println(\"getPlantoesDia\");\r\n Date dataDesejada = null;\r\n EnfermeiroDaoImpl instance = new EnfermeiroDaoImpl();\r\n List<Enfermeiro> expResult = null;\r\n List<Enfermeiro> result = instance.getPlantoesDia(dataDesejada);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n\tpublic void testGetPeliBalorazioNormalizatuak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == -2.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.25);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.75);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 1.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t\r\n\t\t// Normalizazioa Zsore erabiliz egiten dugu\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Zscore());\r\n\t\t\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.0000\");\r\n\t\t\r\n\t\t// p1 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"1,2247\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"-1,6398\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"-1,2247\"));\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",1491\"));\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",4472\"));\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"1,0435\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Batezbestekoa());\r\n\t\t\r\n\t}", "@Test\r\n\tpublic void testPelikulaBaloratuDutenErabiltzaileenZerrenda() {\n\t\tArrayList<Integer> zer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p1.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p2.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 4);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertTrue(zer.contains(e4.getId()));\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p3.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p4.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e4.getId()));\r\n\t\t\r\n\t}", "public static List<String> getAttackerFromEngland() throws URISyntaxException, IOException {\n HttpClient httpClient = HttpClientBuilder.create().build();\n URIBuilder uriBuilder = new URIBuilder();\n //http://api.football-data.org/v2/teams/\n uriBuilder.setScheme(\"http\").setHost(\"api.football-data.org\").setPath(\"v2/teams/66\");\n HttpGet httpGet = new HttpGet(uriBuilder.build());\n httpGet.setHeader(\"X-Auth-Token\",\"7cf82ca9d95e498793ac0d3179e1ec9f\");\n httpGet.setHeader(\"Accept\",\"application/json\");\n HttpResponse response = httpClient.execute(httpGet);\n ObjectMapper objectMapper = new ObjectMapper();\n Team66Pojo team66Pojo =objectMapper.readValue(response.getEntity().getContent(),Team66Pojo.class);\n List<Squad> squad = team66Pojo.getSquad();\n List<String> attackerName= new ArrayList<>();\n for (int i = 0; i <squad.size() ; i++) {\n try {\n if(squad.get(i).getPosition().equals(\"Attacker\")&&squad.get(i).getNationality().equals(\"England\")){\n\n attackerName.add(squad.get(i).getName());\n }\n }catch (NullPointerException e){\n\n\n }\n }\n return attackerName;\n }", "@Test\n public void tilimaksuKutsuuTilisiirtoaOikeillaParametreilla() {\n when(this.varasto.saldo(1)).thenReturn(10);\n when(this.varasto.haeTuote(1)).thenReturn(new Tuote(1, \"maito\", 5));\n \n this.kauppa.aloitaAsiointi();\n this.kauppa.lisaaKoriin(1);\n this.kauppa.tilimaksu(\"johannes\", \"12345\");\n verify(this.pankki).tilisiirto(eq(\"johannes\"), anyInt(), eq(\"12345\"), anyString(), eq(5));\n \n }", "@Test\n public void publicadorPreguntaEnPublicacionAPostulante() {\n Mensaje mp = new Mensaje();\n mp.setPublicacionId(7);\n mp.setPregunta(\"Tenes jardin?\");\n mp.setUsuarioPreguntaId(usuario.getId());\n mp.setUsuarioRespuestaId(3);\n mp.guardarPregunta(usuario.getToken());\n assertTrue(mp.getId() > 0);\n\n }", "@Test\r\n public void elCerdoNoSePuedeAtender() {\n }", "@Test\n\tpublic void testResultadosEsperados() {\n\t\t\n\t\t\n\t\t\n\t\tbicicleta.darPedalada(utilidadesCiclista.getCadencia(), 75);\n\t\t\n\t\t\n\t\t//se comprueba que la velocidad sea la esperada\n\t\t\n\t\tdouble velocidadesperada = utilidadesBicicleta.velocidadDeBici(0, utilidadesCiclista.getCadencia(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t65, bicicleta.getRadiorueda(), \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\t\n\t\tassertEquals(\"Error: La velocidad de la bicicleta no es la correcta\", velocidadesperada, bicicleta.getVelocidad(), 2);\n\t\t\n\t\t\n\t\t//se comprueba que el espacio de la pedalada sea el esperado\n\t\t\n\t\tdouble espaciodelapedaladaesperado = utilidadesBicicleta.espacioDePedalada(bicicleta.getRadiorueda(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\tassertEquals(\"Error: El espacio recorrido de la bicicleta no es el correcta\", espaciodelapedaladaesperado, utilidadesBicicleta.espacioDePedalada(bicicleta.getRadiorueda(),\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\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()],\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\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]\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\t\t\t\t\t\t\t\t), 0);\n\t\t\n\t\t\n\t\t//se comprueba que la relacion de transmision sea la esperada\n\t\t\n\t\tdouble relaciondeetransmisionesperado = utilidadesBicicleta.relacionDeTransmision(bicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\tassertEquals(\"Error: El espacio recorrido de la bicicleta no es el correcta\", relaciondeetransmisionesperado, utilidadesBicicleta.relacionDeTransmision(bicicleta.getPlatos()[bicicleta.getPlatoactual()],\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\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]\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\t\t\t\t\t\t\t\t\t\t), 0);\n\t\t\n\t\t\n\t\t//se comprueba que el recorrido lineal sea el esperado\n\t\t\n\t\tdouble recorridoLinealDeLaRuedaesperado = utilidadesBicicleta.recorridoLinealDeLaRueda(bicicleta.getRadiorueda());\n\t\t\n\t\tassertEquals(\"Error: El espacio recorrido de la bicicleta no es el correcta\", recorridoLinealDeLaRuedaesperado, utilidadesBicicleta.recorridoLinealDeLaRueda(bicicleta.getRadiorueda()), 0);\n\t\t\n\t\t\n\t\t\n\t\t//Se comprueban las variables despues de frenar\n\t\t\n\t\tbicicleta.frenar();\n\t\t\n\t\t//se comprueba que la velocidad halla decrementado como esperamos despues de frenar\n\t\t\n\t\tdouble velocidadfrenado = utilidadesBicicleta.velocidadDeBici(0, 1, 65, bicicleta.getRadiorueda(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPlatos()[bicicleta.getPlatoactual()], \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbicicleta.getPinhones()[bicicleta.getPinhonactual()]);\n\t\t\n\t\tvelocidadfrenado = -(velocidadfrenado *0.2);\n\t\t\n\t\tdouble velocidadesperadafrenando = UtilidadesNumericas.redondear(velocidadesperada + velocidadfrenado,1);\n\n\t\tassertEquals(\"Error: La velocidad de frenado de la bicicleta no es la correcta\", velocidadesperadafrenando, UtilidadesNumericas.redondear(bicicleta.getVelocidad(),1),2);\n\t\t\n\t\t\n\t\t\n\t\t//Se comprueban que los piñones se incremente y decrementen correctamente\n\t\t\n\t\tint incrementarpinhonesperado = bicicleta.getPinhonactual() +1;\n\t\t\n\t\tbicicleta.incrementarPinhon();\n\t\t\n\t\tassertEquals(\"Error: El incremento de piñon de la bicicleta no es la correcta\", incrementarpinhonesperado, bicicleta.getPinhonactual(), 0);\n\t\t\n\t\tint decrementarpinhonesperado = bicicleta.getPinhonactual() -1;\n\t\t\t\n\t\tbicicleta.decrementarPinhon();\n\t\t\n\t\tassertEquals(\"Error: El decremento de piñon de la bicicleta no es la correcta\", decrementarpinhonesperado, bicicleta.getPinhonactual(), 0);\n\t\t\n\t\t\n\t\t\n\t\t//Se comprueban que los platos se incremente y decrementen correctamente\n\t\t\n\t\tint incrementarplatoesperado = bicicleta.getPlatoactual() +1;\n\t\t\n\t\tbicicleta.incrementarPlato();\n\t\t\n\t\tassertEquals(\"Error: El incremento del plato de la bicicleta no es la correcta\", incrementarplatoesperado, bicicleta.getPlatoactual(), 2);\n\t\t\n\t\tint decrementarplatoesperado = bicicleta.getPlatoactual() -1;\n\t\t\n\t\tbicicleta.decrementarPlato();\n\t\t\n\t\tassertEquals(\"Error: El decremento de piñon de la bicicleta no es la correcta\", decrementarplatoesperado, bicicleta.getPlatoactual(), 0);\n\t}", "@Test\r\n public void testWortUeberpruefen() {\r\n System.out.println(\"wortUeberpruefen\");\r\n String eingabewort = \"\";\r\n Turingband t = null;\r\n Texteinlesen instance = new Texteinlesen();\r\n instance.wortUeberpruefen(eingabewort, t);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void apiKundenViewGetAllGetTest() throws ApiException {\n List<CmplxKunden> response = api.apiKundenViewGetAllGet();\n\n // TODO: test validations\n }", "public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\n }", "public void testOnLanguagesObtained() throws JSONException, NoSuchFieldException, IllegalAccessException, InterruptedException {\n assertFalse(\"There should be no dictionaries in sharedPrefs\", SharedPrefs.contains(\"dicts\"));\n Field privateField = SplashActivity.class.getDeclaredField(\"localizedValues\");\n privateField.setAccessible(true);\n LocalizedValues localizedValues = (LocalizedValues) privateField.get(getActivity());\n\n\n getActivity().onDictionariesObtained(dictMocks);\n getActivity().onLanguagesObtained(langMocks);\n\n while(localizedValues.getStatus() != AsyncTask.Status.FINISHED){\n //Wait\n }\n\n BiMap<String,String> languages = SharedPrefs.getStringBiMap(\"languages\");\n\n assertEquals(\"Should be equal\", \"sanskrít\", languages.get(\"SANSKRIT\"));\n\n }", "@Test\n public void testFindAllPassengers() {\n System.out.println(\"findAllPassengers\");\n PassengerHandler instance = new PassengerHandler();\n ArrayList<Passenger> expResult = new ArrayList();\n for(int i = 1; i < 24; i++){\n Passenger p = new Passenger();\n p.setPassengerID(i);\n p.setForename(\"Rob\");\n p.setSurname(\"Smith\");\n p.setDOB(new Date(2018-02-20));\n p.setNationality(\"USA\");\n p.setPassportNumber(i);\n expResult.add(p);\n }\n \n ArrayList<Passenger> result = instance.findAllPassengers();\n assertEquals(expResult, result);\n }", "@Test\r\n public void testFGetFreelancers() {\r\n System.out.println(\"getFreelancers\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> expResult = new ArrayList<>();\r\n List<Usuario> result = instance.getFreelancers();\r\n \r\n assertEquals(expResult, result);\r\n }", "@Ignore\n @Test\n public void testPostaviKorisnickePodatke() throws Exception {\n System.out.println(\"postaviKorisnickePodatke\");\n String apiKey = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n instance.postaviKorisnickePodatke(apiKey);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void avsResultTest() {\n assertEquals(\"G\", authResponse.getAvsResult());\n }", "@Test\n void pay() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"machine gun\");\n Weapon w = new Weapon(\"t.h.o.r.\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n int[] ammo = {3, 3, 3};\n p.getPb().grabAmmo(ammo);\n w.pay(\"base\", p);\n\n assertTrue(p.getPb().getAmmo('b')==3 && p.getPb().getAmmo('r')==3 && p.getPb().getAmmo('y')==3);\n\n }", "@Test\n public void getTarjetasPrepagoTest() {\n List<TarjetaPrepagoEntity> list = tarjetaPrepagoLogic.getTarjetasPrepago();\n Assert.assertEquals(data.size(), list.size());\n for (TarjetaPrepagoEntity entity : list) {\n boolean found = false;\n for (TarjetaPrepagoEntity storedEntity : data) {\n if (entity.getId().equals(storedEntity.getId())) {\n found = true;\n }\n }\n Assert.assertTrue(found);\n }\n }", "@Test\n public void testGetDistancia() {\n HospedajeLugarEntity hospedajeT = data.get(0);\n HospedajeLugarEntity hospedaje = new HospedajeLugarEntity();\n hospedaje.setDistancia(hospedajeT.getDistancia());\n Assert.assertTrue(hospedajeT.getDistancia().equals(hospedaje.getDistancia()));\n }", "protected ArrayList<Integer> bepaalTrioSpelers(Groep groep) {\r\n ArrayList<Integer> trio = new ArrayList<>();\r\n if (groep.getSpelers().size() == 3) {\r\n \t// 3 spelers, dus maak gelijk trio\r\n trio.add(groep.getSpelers().get(0).getId());\r\n trio.add(groep.getSpelers().get(1).getId());\r\n trio.add(groep.getSpelers().get(2).getId());\r\n return trio;\r\n }\r\n int spelerID = 0;\r\n try {\r\n spelerID = IJCController.c().getBeginpuntTrio(groep.getSpelers().size());\r\n }\r\n catch (Exception e) {\r\n \tlogger.log(Level.WARNING, \"Problem with spelersID. No int.\");\r\n }\r\n int minDelta = 1;\r\n int plusDelta = 1;\r\n int ignore = 0;\r\n boolean doorzoeken = true;\r\n while (doorzoeken) {\r\n Speler s1 = groep.getSpelerByID(spelerID);\r\n Speler s2 = groep.getSpelerByID(spelerID - minDelta);\r\n Speler s3 = groep.getSpelerByID(spelerID + plusDelta);\r\n if (isGoedTrio(s1, s2, s3, ignore)) {\r\n trio.add(s1.getId());\r\n trio.add(s2.getId());\r\n trio.add(s3.getId());\r\n return trio;\r\n } else {\r\n if ((s2 == null) || (s3 == null)) {\r\n if (ignore > 4) {\r\n doorzoeken = false;\r\n }\r\n ignore += 1;\r\n minDelta = 1;\r\n plusDelta = 1;\r\n } else {\r\n if (minDelta > plusDelta) {\r\n plusDelta++;\r\n } else {\r\n minDelta++;\r\n }\r\n }\r\n }\r\n }\r\n return trio;\r\n }", "@Test\n public void shouldGetLoveAll() {\n \n String expResult = \"Love - ALL \" ;\n String result = scoreService.get(nadale, federer) ;\n assertThat( expResult, is(result) ) ;\n }", "@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearPeliculasTest() {\r\n\r\n\t\tpd.crearPeliculas();\r\n\t\tpd.pm.deletePersistent(pd.filmA);\r\n\t\tpd.pm.deletePersistent(pd.filmB);\r\n\t\tpd.pm.deletePersistent(pd.filmC);\r\n\t\tpd.pm.deletePersistent(pd.filmD);\r\n\r\n\t}", "@Test\n public void apiKundenViewGetInaktiveGetTest() throws ApiException {\n List<CmplxKunden> response = api.apiKundenViewGetInaktiveGet();\n\n // TODO: test validations\n }", "@Test\n public void sucheSaeleBezT() throws Exception {\n System.out.println(\"sucheSaele nach Bezeichnung\");\n bezeichnung = \"Halle 1\";\n typ = \"\";\n plaetzeMin = null;\n ort = null;\n SaalDAO dao=DAOFactory.getSaalDAO();\n query = \"bezeichnung like '%\" + bezeichnung + \"%' \";\n explist = dao.find(query);\n System.out.println(query);\n List<Saal> result = SaalHelper.sucheSaele(bezeichnung, typ, plaetzeMin, ort);\n assertEquals(explist, result);\n \n }", "@Test\n public void testIsApellido_Materno() {\n System.out.println(\"isApellido_Materno\");\n String AM = \"Proud\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Materno(AM);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n\n }", "@Test\n public void testGetPagamentos() {\n }", "@Test\r\n public void testLisaakaari() {\r\n System.out.println(\"lisaakaari\");\r\n Kaari kaari = null;\r\n Pala instance = null;\r\n instance.lisaakaari(kaari);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Ignore\n @Test\n public void testDajLokaciju() throws Exception {\n System.out.println(\"dajLokaciju\");\n String adresa = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n Lokacija expResult = null;\n Lokacija result = instance.dajLokaciju(adresa);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }" ]
[ "0.7233977", "0.7017544", "0.65107286", "0.5935509", "0.5834023", "0.5805562", "0.5779429", "0.57169497", "0.5662601", "0.55961025", "0.559516", "0.55741835", "0.55473995", "0.5531899", "0.5513477", "0.5505774", "0.54967356", "0.5466267", "0.5462762", "0.5430873", "0.54143244", "0.5414064", "0.54139566", "0.5411075", "0.5402896", "0.5398551", "0.53844935", "0.5372754", "0.53678447", "0.53547865", "0.5352257", "0.534982", "0.53461695", "0.5344333", "0.53348047", "0.53249925", "0.53230643", "0.5319364", "0.5308952", "0.53073263", "0.5296524", "0.52935034", "0.52922976", "0.5290865", "0.5289925", "0.52891964", "0.52831084", "0.52826256", "0.5280372", "0.5279993", "0.5278883", "0.52777314", "0.5271969", "0.52677965", "0.52559584", "0.52550864", "0.5241362", "0.52368534", "0.5233679", "0.52240556", "0.5219872", "0.5219017", "0.5212926", "0.52125114", "0.52044636", "0.5197988", "0.5194558", "0.51884514", "0.5184172", "0.518379", "0.51822895", "0.5178315", "0.5177895", "0.5175262", "0.517282", "0.5172807", "0.51698726", "0.51666063", "0.51639783", "0.5156869", "0.5154366", "0.5151568", "0.51463145", "0.51409924", "0.51395315", "0.51338726", "0.51332116", "0.5132156", "0.5129886", "0.5129487", "0.5123918", "0.5123195", "0.51230127", "0.51065224", "0.51002467", "0.5097212", "0.5096532", "0.5095546", "0.509488", "0.50920755" ]
0.75115424
0
Test of editPengguna method, of class DaftarPengguna.
@Test public void testEditPengguna() { System.out.println("editPengguna"); Pengguna pengguna = null; DaftarPengguna instance = new DaftarPengguna(); instance.editPengguna(pengguna); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEdit() {\n lib.addDVD(dvd1);\n lib.addDVD(dvd2);\n \n dvd1.setTitle(\"Ghostbusters II\");\n lib.edit(dvd1);\n \n Assert.assertEquals(\"Ghostbusters II\", lib.getById(0).getTitle());\n }", "@Test \n\tpublic void edit() \n\t{\n\t\tassertTrue(true);\n\t}", "private void edit() {\n\n\t}", "@Test\n public void editIngredient_CorrectInformation(){\n int returned = testDatabase.getIngredient(\"salt\");\n testDatabase.deleteIngredient(returned);\n Ingredient newIngredient = new Ingredient(ingredientID, \"salt\");\n testDatabase.editIngredient(newIngredient);\n Ingredient retrieved = testDatabase.getIngredient(ingredientID);\n assertEquals(\"editIngredient - Correct Name\", \"salt\", retrieved.getName());\n assertEquals(\"editIngredient - Correct ID\", ingredientID, retrieved.getKeyID());\n }", "@Test\r\n\tpublic void validEditTest() {\n\t\tadminUserEdit.clickAdminLink();\r\n\t\tadminUserEdit.clickUserListLink();\r\n\t\tadminUserEdit.clickEditUserLink();\r\n\t\t\r\n\t\t// Assertion\r\n\t\tString Actual = adminUserEdit.Assertion();\r\n\t\tString Expected = \"Hari\";\r\n\t\tassertEquals(Actual, Expected);\r\n\t\tscreenShot.captureScreenShot(\"TC019\");\r\n\t}", "@Test\n public void testEdit() {\n System.out.println(\"edit\");\n curso _curso = new curso();\n cursoDAO instance = new cursoDAO();\n boolean expResult = false;\n boolean result = instance.edit(_curso);\n assertEquals(expResult, result);\n \n }", "public abstract void edit();", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "public void editarAlimento(int id_alimento, String nombre, String estado, float caloria, float proteinas,float grasas ,float hidratos_de_carbono, float H20, float NE, float vitamina_a, float vitamina_B1, float vitamina_B2, float vitamina_C, float Niac, float sodio, float potasio, float calcio, float magnesio, float cobre, float hierro, float fosforo, float azufre, float cloro, float Fen, float Ileu, float Leu, float Lis, float Met, float Tre, float Tri, float Val, float Acid, float AlCAL);", "@Test\n public void testModificar() {\n System.out.println(\"Edit\");\n Repositorio repo = new RepositorioImpl();\n Persona persona = new Persona();\n persona.setNombre(\"Hugo\");\n persona.setApellido(\"González\");\n persona.setNumeroDocumento(\"4475199\");\n repo.crear(persona);\n \n //recuperacion\n Persona p = (Persona) repo.buscar(persona.getId());\n \n //modificacion\n p.setNumeroDocumento(\"4475188\");\n repo.modificar(p);\n \n //test\n Persona pmod = (Persona)repo.buscar(persona.getId());\n assertEquals(pmod.getId(), p.getId());\n assertEquals(\"4475188\", pmod.getNumeroDocumento());\n }", "public void editOperation() {\n\t\t\r\n\t}", "@Test\n public void testEditProduct() throws Exception {\n System.out.println(\"editProduct\");\n Product p;\n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n p = prs.get(0);\n String nameNew = \"newName\", nameOld = p.getName();\n p.setName(nameNew);\n dao.editProduct(p);\n \n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.isEmpty());\n prs = dao.getProductsByName(nameNew);\n assertTrue(prs.contains(p));\n assertTrue(prs.size() == 1);\n p.setName(nameOld);\n dao.editProduct(p);\n \n prs = dao.getProductsByName(p1.getName());\n assertTrue(prs.contains(p1));\n assertTrue(prs.size() == 1);\n prs = dao.getProductsByName(nameNew);\n assertTrue(prs.isEmpty());\n }", "@LogMethod\r\n private void editAssay()\r\n {\r\n log(\"Testing edit and delete and assay definition\");\r\n clickProject(getProjectName());\r\n waitAndClickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n\r\n // change a field name and label and remove a field\r\n ReactAssayDesignerPage designerPage = _assayHelper.clickEditAssayDesign();\r\n DomainFormPanel domainFormPanel = designerPage.expandFieldsPanel(\"Results\");\r\n domainFormPanel.getField(5).setName(TEST_ASSAY_DATA_PROP_NAME + \"edit\");\r\n domainFormPanel.getField(5).setLabel(TEST_ASSAY_DATA_PROP_NAME + \"edit\");\r\n domainFormPanel.removeField(domainFormPanel.getField(4).getName(), true);\r\n designerPage.clickFinish();\r\n\r\n //ensure that label has changed in run data in Lab 1 folder\r\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n clickAndWait(Locator.linkWithText(TEST_RUN1));\r\n assertTextPresent(TEST_ASSAY_DATA_PROP_NAME + \"edit\");\r\n assertTextNotPresent(TEST_ASSAY_DATA_PROP_NAME + 4);\r\n\r\n AuditLogTest.verifyAuditEvent(this, AuditLogTest.ASSAY_AUDIT_EVENT, AuditLogTest.COMMENT_COLUMN, \"were copied to a study from the assay: \" + TEST_ASSAY, 5);\r\n }", "private void edit() {\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.update(Integer.parseInt(idField.getText().toString().trim()),nama_pasien2,nama_dokter2, tgl_pengobatanField.getText().toString().trim(),waktu_pengobatanField.getText().toString(),\n keluhan_pasienField.getText().toString().trim(),hasil_diagnosaField.getText().toString().trim(),\n biayaField.getText().toString().trim());\n blank();\n finish();\n }\n }", "public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}", "public String editar()\r\n/* 59: */ {\r\n/* 60: 74 */ if ((getMotivoLlamadoAtencion() != null) && (getMotivoLlamadoAtencion().getIdMotivoLlamadoAtencion() != 0)) {\r\n/* 61: 75 */ setEditado(true);\r\n/* 62: */ } else {\r\n/* 63: 77 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 64: */ }\r\n/* 65: 79 */ return \"\";\r\n/* 66: */ }", "public String editar()\r\n/* 86: */ {\r\n/* 87:112 */ if (getDimensionContable().getId() != 0)\r\n/* 88: */ {\r\n/* 89:113 */ this.dimensionContable = this.servicioDimensionContable.cargarDetalle(this.dimensionContable.getId());\r\n/* 90:114 */ String[] filtro = { \"indicadorValidarDimension\" + getDimension(), \"true\" };\r\n/* 91:115 */ this.listaCuentaContableBean.agregarFiltro(filtro);\r\n/* 92:116 */ this.listaCuentaContableBean.setIndicadorSeleccionarTodo(true);\r\n/* 93:117 */ verificaDimension();\r\n/* 94:118 */ setEditado(true);\r\n/* 95: */ }\r\n/* 96: */ else\r\n/* 97: */ {\r\n/* 98:120 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_seleccionar\"));\r\n/* 99: */ }\r\n/* 100:123 */ return \"\";\r\n/* 101: */ }", "@Test\n public void editIngredient_ReturnsTrue(){\n int returned = testDatabase.getIngredient(\"egg\");\n testDatabase.deleteIngredient(returned);\n Ingredient newIngredient = new Ingredient(ingredientID, \"egg\");\n assertEquals(\"editIngredient - Returns True\", true, testDatabase.editIngredient(newIngredient));\n }", "public default void edit(PlayerEntity playerIn, SpellData dataIn, World worldIn){ }", "@Test\r\n public void testModificar() {\r\n System.out.println(\"modificar\");\r\n Integer idDepto = null;\r\n String nombreDepto = \"\";\r\n Departamento instance = new Departamento();\r\n instance.modificar(idDepto, nombreDepto);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "protected abstract void editItem();", "@Test\n\tpublic void testModifyQuestion() {\n\t\tQnaQuestion question = questionLogic.getQuestionById(tdp.question1_location1.getId());\n\n\t\tquestion.setQuestionText(\"Testing update\");\n\n\t\t// Test with invalid permissions\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_NO_UPDATE;\n\t\t\tquestionLogic.saveQuestion(question,LOCATION1_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch (SecurityException e) {\n\t\t\tAssert.assertNotNull(e);\n\t\t} \n\n\t\t// Test with valid permission\n\t\ttry {\n\t\t\texternalLogicStub.currentUserId = USER_UPDATE;\n\t\t\tquestionLogic.saveQuestion(question,LOCATION1_ID);\n\t\t\tQnaQuestion changedQuestion = questionLogic.getQuestionById(tdp.question1_location1.getId());\n\t\t\tAssert.assertEquals(changedQuestion.getQuestionText(), \"Testing update\");\n\t\t} catch (Exception e) {\n\t\t\tAssert.fail(\"Should not have thrown exception\");\n\t\t}\n\t}", "@Test\n void testUpdateGoalie() {\n\n }", "@Test(groups={TestGroups.SMOKE,TestGroups.REGRESSION},testName=\"Ineligibility_Reason_Edit_By_Adding_ValidData\")\n\t\tpublic void verifyEditByAddingValidData(){\n\t\tExtentTestManager.getTest().getTest().setName(\"Ineligibility_Reason_Edit_By_Adding_ValidData\");\n\t\tExtentTestManager.getTest().assignCategory(\"Module:ABL\");\n\t\tLoginPage loginPage=new LoginPage(driver);\n\t\tCyncHomePage cyncHomePage=loginPage.doLogin();\n\t\tAssert.assertEquals(cyncHomePage.getSuccessfulMessage(), \"Signed in Successfully\");\n\n\t\t//Step1:click on Ineligibility Reason to open page\n\t\tIneligibilityReasonsPage IneligibilityReasonsPage = cyncHomePage.getCyncMenus().openIneligibilityReasons();\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step1:click on Ineligibility Reasons to open page\");\n\n\t\t//Step2:First Check box selected on Ineligibility Reason screen\n\t\tAssert.assertTrue(IneligibilityReasonsPage.checkBoxSelection());\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step2:Successfully Selected first record on the Ineligibility reasons screen\");\n\n\t\t//Step2:Click on edit button\n\t\tAssert.assertTrue(IneligibilityReasonsPage.clickOnEditButton());\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step3:Successfully clicked on the edit button on the Ineligibility reasons screen\");\n\n\t\tString IneligibilityReasonEdit=\"Ineligibility Reasons - Edit\";\n\t\t//Step3:verify the Ineligibility Reason page header\n\t\tAssert.assertTrue(IneligibilityReasonsPage.IneligibilityReasonsEditHeader(IneligibilityReasonEdit));\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step4:Successfully verified Ineligibility-Reasons Edit page header\");\n\t\t\t\n\t\tString codeData=\"aaaa\";\n\t\t//Step3:add the data to the Code text box\n\t\tAssert.assertTrue(IneligibilityReasonsPage.addValueToCodeTextBox(codeData));\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step5:Successfully passing data to the code text box\");\n\n\t\tString descriptionData=\"bbbb\";\n\t\t//Step4:add data to the Description text box\n\t\tAssert.assertTrue(IneligibilityReasonsPage.addValueToDescriptionTextBox(descriptionData));\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step6:Successfully passing data to the Description text box\");\n\n\t\t//step5:click on save\n\t\tAssert.assertTrue(IneligibilityReasonsPage.saveonEditScreen());\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step7:clicked on save button on Ineligibility Reason add screen sucessfully\");\n\n\n\t\tString SuccessMsgData=\"Record Updated Successfully\";\n\t\t//Step6:Verifying of message is done successfully.\n\t\tAssert.assertTrue(IneligibilityReasonsPage.verifyMessageOnAfterSave1(SuccessMsgData));\n\t\tExtentTestManager.getTest().log(LogStatus.PASS, \"Step8:Verifying of Success message is done successfully.\");\n\n\t}", "@Test\n public void testEdit() throws Exception {\n // create citation entity to reflect the change that happens after calling edit\n Citation entity = getSampleCitation();\n\n // pretend the entity was edited and return new entity\n doNothing().when(Service).editUrl(any(String.class), any(String.class));\n when(Service.retrieveCitation(any(String.class))).thenReturn(entity);\n\n // test to see that the correct view is returned\n ModelAndView mav = Controller.edit(\"\", \"\");\n Assert.assertEquals(\"result\", mav.getViewName());\n\n // test to see that Json is formated properly\n Map<String, Object> map = mav.getModel();\n String jsonObject = (String) map.get(\"message\");\n testJsonObject(jsonObject, entity);\n }", "static public void editPet() {\n User user = LocalUserManager.getCurrentUser();\n Pet pet = LocalPetManager.findPet(user.getPetId());\n while (true) {\n Presenter.showMenu(new String[]{\"Edit pet name\", \"Set pet public/private\", \"Re-create pet\", \"Back\"},\n \"\\nThis is the pet editor menu, you can:\");\n int userChoice = GameController.getUserNum(4);\n if (userChoice == 1) {\n assert pet != null;\n String newPetName = GameController.getUserString(\"Your previous pet name is \"+\n pet.getPetName()+\". Please enter a new name...\");\n if (newPetName.equals(pet.getPetName())){\n Presenter.showNotice(\"That's the same name from before!\");\n }\n else {\n LocalPetManager.changePetName(user.getPetId(), newPetName);\n Presenter.showNotice(\"You have changed your pet name to \"+pet.getPetName()+\" successfully!\");\n }\n }\n else if (userChoice == 2) {\n boolean petPublic = GameController.getUserYesOrNo(\n \"Your pet is \"+LocalPetManager.checkPublicity(user.getPetId())+\" to others now.\\n\" +\n \"Enter 'y' to make it public or 'n' to make it private\");\n assert pet != null;\n pet.setPublicity(petPublic);\n Presenter.showNotice(\"You have change your pet to \"+\n LocalPetManager.checkPublicity(user.getPetId())+\" successfully!\");\n }\n else if (userChoice == 3){\n boolean reCreatePet = GameController.getUserYesOrNo(\n \"Are you sure you want to create a new pet? You will lose \" + pet.getPetName()+\" in the process.\\n\" +\n \"Enter 'y' to create a new pet or 'n' to go back\"\n );\n if (reCreatePet){\n UserController.createUserPet();\n Presenter.showNotice(\"\\nYou have successfully created a new pet!\\n\");\n }\n return;\n }\n else {\n return;\n }\n }\n }", "@Test\r\n public void testModificar() {\r\n System.out.println(\"modificar\");\r\n Integer idUsuario = null;\r\n String nombre = \"\";\r\n String apellido = \"\";\r\n String usuario = \"\";\r\n String genero = \"\";\r\n String contrasenia = \"\";\r\n String direccion = \"\";\r\n Usuario instance = new Usuario();\r\n instance.modificar(idUsuario, nombre, apellido, usuario, genero, contrasenia, direccion);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n\tvoid testEditOfficer() {\n\t\tOfficer officer = new Officer(\"101\",\"dinesh_k\",\"officer\",\"Dinesh Kamat\",\"Karnataka\");\n \t\t\n\t\tassertEquals(officer,iOfficerService.editOfficer(officer,\"101\"));\n\t}", "SrInwardTruckQualityCheck edit(SrInwardTruckQualityCheck srInwardTruckQualityCheck);", "public abstract void checkEditing();", "@Test\n public void testEditSuperPower() throws Exception {\n Superpower sp1 = new Superpower();\n sp1.setSuperPowerName(\"Ice Power\");\n sp1.setSuperPowerDescription(\"Control the elements of ice\"); \n \n Superpower sp2 = new Superpower();\n sp2.setSuperPowerName(\"Fire Power\");\n sp2.setSuperPowerDescription(\"Control the elements of fire\");\n \n Superpower sp1fromDao = dao.addSuperpower(sp1);\n Superpower sp2fromDao = dao.addSuperpower(sp2);\n \n assertEquals(sp1,sp1fromDao);\n assertEquals(sp2,sp2fromDao);\n \n sp2.setSuperPowerName(\"Earth Power\");\n sp2fromDao = dao.editSuperPower(sp2);\n \n assertEquals(sp2,sp2fromDao);\n \n }", "@LogMethod\r\n private void editResults()\r\n {\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n waitAndClickAndWait(Locator.linkWithText(\"view results\"));\r\n DataRegionTable table = new DataRegionTable(\"Data\", getDriver());\r\n assertEquals(\"No rows should be editable\", 0, DataRegionTable.updateLinkLocator().findElements(table.getComponentElement()).size());\r\n assertElementNotPresent(Locator.button(\"Delete\"));\r\n\r\n // Edit the design to make them editable\r\n ReactAssayDesignerPage assayDesignerPage = _assayHelper.clickEditAssayDesign(true);\r\n assayDesignerPage.setEditableResults(true);\r\n assayDesignerPage.clickFinish();\r\n\r\n // Try an edit\r\n navigateToFolder(getProjectName(), TEST_ASSAY_FLDR_LAB1);\r\n clickAndWait(Locator.linkWithText(TEST_ASSAY));\r\n clickAndWait(Locator.linkWithText(\"view results\"));\r\n DataRegionTable dataTable = new DataRegionTable(\"Data\", getDriver());\r\n assertEquals(\"Incorrect number of results shown.\", 10, table.getDataRowCount());\r\n doAndWaitForPageToLoad(() -> dataTable.updateLink(dataTable.getRowIndex(\"Specimen ID\", \"AAA07XK5-05\")).click());\r\n setFormElement(Locator.name(\"quf_SpecimenID\"), \"EditedSpecimenID\");\r\n setFormElement(Locator.name(\"quf_VisitID\"), \"601.5\");\r\n setFormElement(Locator.name(\"quf_testAssayDataProp5\"), \"notAnumber\");\r\n clickButton(\"Submit\");\r\n assertTextPresent(\"Could not convert value: \" + \"notAnumber\");\r\n setFormElement(Locator.name(\"quf_testAssayDataProp5\"), \"514801\");\r\n setFormElement(Locator.name(\"quf_Flags\"), \"This Flag Has Been Edited\");\r\n clickButton(\"Submit\");\r\n assertTextPresent(\"EditedSpecimenID\", \"601.5\", \"514801\");\r\n assertElementPresent(Locator.xpath(\"//img[@src='/labkey/Experiment/flagDefault.gif'][@title='This Flag Has Been Edited']\"), 1);\r\n assertElementPresent(Locator.xpath(\"//img[@src='/labkey/Experiment/unflagDefault.gif'][@title='Flag for review']\"), 9);\r\n\r\n // Try a delete\r\n dataTable.checkCheckbox(table.getRowIndex(\"Specimen ID\", \"EditedSpecimenID\"));\r\n doAndWaitForPageToLoad(() ->\r\n {\r\n dataTable.clickHeaderButton(\"Delete\");\r\n assertAlert(\"Are you sure you want to delete the selected row?\");\r\n });\r\n\r\n // Verify that the edit was audited\r\n goToSchemaBrowser();\r\n viewQueryData(\"auditLog\", \"ExperimentAuditEvent\");\r\n assertTextPresent(\r\n \"Data row, id \",\r\n \", edited in \" + TEST_ASSAY + \".\",\r\n \"Specimen ID changed from 'AAA07XK5-05' to 'EditedSpecimenID'\",\r\n \"Visit ID changed from '601.0' to '601.5\",\r\n \"testAssayDataProp5 changed from blank to '514801'\",\r\n \"Deleted data row.\");\r\n }", "private void editEntry(int index) {\n Intent ChangePotintent = AddPot.makeIntent(MainActivity.this);\n ChangePotintent.putExtra(\"Index\", index);\n startActivityForResult(ChangePotintent, REQUEST_CODE_CHANGEPOT);\n }", "private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n String message = \"Failed to edit data\";\n if (flag){\n message = \"Success to edit data\";\n }\n JOptionPane.showMessageDialog(this, message, \"Notification\", JOptionPane.INFORMATION_MESSAGE);\n bindingTable();\n reset();\n }", "public void editar(AplicacionOferta aplicacionOferta){\n try{\n aplicacionOfertaDao.edit(aplicacionOferta);\n }catch(Exception e){\n Logger.getLogger(AplicacionOfertaServicio.class.getName()).log(Level.SEVERE, null, e);\n }\n }", "@Test\r\n\tpublic void editChapterDriver() {\r\n\t\tfinal Object testingData[][] = {\r\n\t\t\t{ // Successful test\r\n\t\t\t\t\"producer3\", 315, null\r\n\t\t\t}, { // A producer tries to edit a content of another producer\r\n\t\t\t\t\"producer1\", 315, IllegalArgumentException.class\r\n\t\t\t}, { // A user tries to create a content\r\n\t\t\t\t\"user3\", 315, IllegalArgumentException.class\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfor (int i = 0; i < testingData.length; i++)\r\n\t\t\tthis.editionChapterTemplate((String) testingData[i][0], (Integer) testingData[i][1], (Class<?>) testingData[i][2]);\r\n\t}", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "private void editar(){\n String codigo = getIntent().getStringExtra(\"codigo\");\n Intent otra = new Intent(this, MainActivity.class);\n otra.putExtra(\"codigo\", codigo);\n otra.putExtra(\"nombre\", nombre.getText().toString());\n otra.putExtra(\"raza\", raza.getText().toString());\n otra.putExtra(\"clase\", clase.getText().toString());\n otra.putExtra(\"nv\", nv.getText().toString());\n otra.putExtra(\"exp\", exp.getText().toString());\n otra.putExtra(\"pg\", String.valueOf(pgValue));\n otra.putExtra(\"pgMax\", String.valueOf(pgMaxValue));\n otra.putExtra(\"ca\", ca.getText().toString());\n otra.putExtra(\"vel\", vel.getText().toString());\n\n String[] statsValue = new String[stats.length];\n for(int i = 0; i < statsValue.length; i++){\n statsValue[i] = stats[i].getText().toString();\n }\n otra.putExtra(\"stats\", statsValue);\n\n otra.putExtra(\"salvBonus\", String.valueOf(salvBonus));\n\n otra.putExtra(\"statsSalv\", salvacionCb);\n\n otra.putExtra(\"habBonus\", String.valueOf(habBonus));\n\n otra.putExtra(\"habilidadesCb\", habilidadesCb);\n\n startActivity(otra);\n }", "@Test\n public void UpdatePerroTest() throws BusinessLogicException {\n\n PerroEntity entity = Perrodata.get(0);\n int edada =entity.getEdad();\n if(edada<0)\n {\n entity.setEdad(edada*-1);\n }\n \n PerroEntity newEntity = factory.manufacturePojo(PerroEntity.class);\n \n int e = newEntity.getEdad();\n if(e<0)\n {\n newEntity.setEdad(e*-1);\n }\n \n newEntity.setId(entity.getId());\n perroLogic.updatePerro(newEntity.getId(), newEntity);\n \n \n PerroEntity resp = em.find(PerroEntity.class, entity.getId());\n \n int eda =resp.getEdad();\n if(eda<0)\n {\n resp.setEdad(eda*-1);\n }\n \n Assert.assertEquals(newEntity.getId(), resp.getId());\n Assert.assertEquals(newEntity.getIdPerro(), resp.getIdPerro());\n Assert.assertEquals(newEntity.getNombre(), resp.getNombre());\n Assert.assertEquals(newEntity.getEdad(), resp.getEdad());\n Assert.assertEquals(newEntity.getRaza(), resp.getRaza());\n }", "@Test\n\tpublic void editTest() throws ParseException {\n\t\n\t\t\n\t\tSystem.out.println(\"-----Edit announcement test. Positive 0 to 4, Negative 5 to 9.\");\n\t\t\n\t\tObject testingData[][]= {\n\t\t\t\t//Positive cases\n\t\t\t\t{\"announcement1-1\", \"user1\", \"Seguro de citas online\", \"Descripción del anuncio 1\", null},\n\t\t\t\t{\"announcement1-2\", \"user1\", \"Anuncio 2\", \"Descripción del anuncio 1\", null},\n\t\t\t\t{\"announcement2-1\", \"user2\", \"Ya a la venta\", \"Esta es una nueva descripción\", null},\n\t\t\t\t{\"announcement1-1\", \"user1\", \"Anuncio 4\", \"Descripción del anuncio 1\", null},\n\t\t\t\t{\"announcement1-2\", \"user1\", \"Llega a tu cita en perfecto estado\", \"Descripción del anuncio 1\", null},\n\t\t\t\t\n\t\t\t\t//Negative cases\n\t\t\t\t//Without announcement\n\t\t\t\t{null, \"user1\", \"Anuncio 6\", \"Descripción del anuncio 1\", NullPointerException.class},\n\t\t\t\t//Without user\n\t\t\t\t{\"announcement1-1\", null, \"Anuncio 7\", \"Descripción del anuncio 1\", IllegalArgumentException.class},\n\t\t\t\t//Without title\n\t\t\t\t{\"announcement1-1\", \"user1\", null, \"No se que hago aqui, como he llegado?\", ConstraintViolationException.class},\n\t\t\t\t//Without description\n\t\t\t\t{\"announcement2-1\", \"user2\", \"Anuncio 9\", null, ConstraintViolationException.class},\n\t\t\t\t//With rendezvous not from the user\n\t\t\t\t{\"announcement1-1\", \"user2\", \"Anuncio 11\", \"Descripción del anuncio 1\", IllegalArgumentException.class},\n\t\t\t\t};\n\t\t\n\t\t\n\t\tfor (int i = 0; i< testingData.length; i++) {\n\t\t\ttemplateEditTest(\n\t\t\t\t\ti,\n\t\t\t\t\t(Integer) this.getEntityIdNullable((String) testingData[i][0]),\n\t\t\t\t\t(String) testingData[i][1],\n\t\t\t\t\t(String) testingData[i][2],\n\t\t\t\t\t(String) testingData[i][3],\n\t\t\t\t\t(Class<?>) testingData[i][4]\n\t\t\t\t\t);\n\t\t}\n\t}", "@Override\n\tpublic int edita(Solicitud bean) throws Exception {\n\t\treturn 0;\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "@Test\n public void testModificarEjemplar() {\n System.out.println(\"ModificarEjemplar\");\n Ejemplar ejemplar = new EjemplaresList().getEjemplares().get(0);;\n BibliotecarioController instance = new BibliotecarioController();\n Ejemplar expResult = new EjemplaresList().getEjemplares().get(0);;\n Ejemplar result = instance.ModificarEjemplar(ejemplar);\n assertEquals(expResult, result);\n System.out.println(\"Ejemplar dado de baja\\nid:\" + result.getIdEjemplar());\n }", "@Test\n public void updateQuejaTest() {\n QuejaEntity entity = data.get(0);\n PodamFactory factory = new PodamFactoryImpl();\n QuejaEntity newEntity = factory.manufacturePojo(QuejaEntity.class);\n\n newEntity.setId(entity.getId());\n\n quejaPersistence.update(newEntity);\n\n QuejaEntity resp = em.find(QuejaEntity.class, entity.getId());\n\n Assert.assertEquals(newEntity.getName(), resp.getName());\n }", "@Test\r\n public void testEditRecipe() {\r\n coffeeMaker.addRecipe(recipe1);\r\n assertEquals(recipe1.getName(), coffeeMaker.editRecipe(0, recipe2));\r\n }", "@Test\n public void updateEspecieTest() {\n EspecieEntity entity = especieData.get(0);\n EspecieEntity pojoEntity = factory.manufacturePojo(EspecieEntity.class);\n pojoEntity.setId(entity.getId());\n especieLogic.updateSpecies(pojoEntity.getId(), pojoEntity);\n EspecieEntity resp = em.find(EspecieEntity.class, entity.getId());\n Assert.assertEquals(pojoEntity.getId(), resp.getId());\n Assert.assertEquals(pojoEntity.getNombre(), resp.getNombre());\n }", "protected TextGuiTestObject edittext() \n\t{\n\t\treturn new TextGuiTestObject(\n getMappedTestObject(\"edittext\"));\n\t}", "public abstract void editQuestion();", "public void tryEdit() throws SQLException, DataStoreException, Exception {\r\n\t\tif (isDataModified()) {\r\n\t\t\tscrollToMe();\r\n if (getValidator().getUseAlertsForErrors()) {\r\n addConfirmScript(_okToEditQuestion, _okToEditValue);\r\n }\r\n else {\r\n _validator.setErrorMessage(_okToEditQuestion, null, -1, _okToEdit);\r\n }\r\n\t\t}\r\n else {\r\n\t\t\tdoEdit();\r\n }\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 }", "public void Editproduct(Product objproduct) {\n\t\t\n\t}", "@Override\r\n\tpublic Loja editar(String nomeResponsavel, int telefoneEmpresa, String rua, String cidade, String estado, String pais,\r\n\t\t\tint cep, int cnpj, String razaoSocial, String email, String nomeEmpresa, String senha) {\n\t\treturn null;\r\n\t}", "public static void editAlert() {\n\n }", "private void editProduct() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter Product Id - \");\n\t\t\tint productId = getValidInteger(\"Enter Product Id -\");\n\t\t\twhile (!CartController.getInstance().isProductPresentInCart(\n\t\t\t\t\tproductId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id - \");\n\t\t\t\tproductId = getValidInteger(\"Enter Product Id -\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter new Quantity of Product\");\n\t\t\tint quantity = getValidInteger(\"Enter new Quantity of Product\");\n\t\t\tCartController.getInstance().editProductFromCart(productId,\n\t\t\t\t\tquantity);\n\t\t} else {\n\t\t\tDisplayOutput.getInstance().displayOutput(\n\t\t\t\t\t\"\\n-----Cart Is Empty----\\n\");\n\t\t}\n\t}", "@Test\n public void editRecipe_ReturnsTrue(){\n testDatabase.addRecipe(testRecipe);\n testRecipe.setTitle(\"TestRecipe Updated\");\n testRecipe.setServings(1.5);\n testRecipe.setPrep_time(15);\n testRecipe.setTotal_time(45);\n testRecipe.setFavorited(true);\n listOfCategories.clear();\n listOfCategories.add(recipeCategory);\n testRecipe.setCategoryList(listOfCategories);\n listOfIngredients.clear();\n recipeIngredient.setUnit(\"tbsp\");\n recipeIngredient.setQuantity(1.5);\n recipeIngredient.setDetails(\"Brown Sugar\");\n listOfIngredients.add(recipeIngredient);\n testRecipe.setIngredientList(listOfIngredients);\n listOfDirections.clear();\n listOfDirections.add(recipeDirection1);\n testRecipe.setDirectionsList(listOfDirections);\n\n assertEquals(\"editRecipe - Returns True\", true, testDatabase.editRecipe(testRecipe));\n }", "@Test\n public void editGoalDescValid() throws DataValidationException, SQLException {\n String oldGoalDesc = testGoal.getGoalDescription();\n String validDescription = \"ValidDescription\";\n if(!Objects.equals(oldGoalDesc, validDescription))\n UserInterface.editGoalDescription(testGoal, validDescription);\n else {\n validDescription = validDescription.replace(validDescription.charAt(1), validDescription.charAt(validDescription.length()-1));\n UserInterface.editGoalDescription(testGoal, validDescription);\n }\n\n reloadTestGoal();\n Assert.assertEquals(testGoal.getGoalDescription(), validDescription,\n \"Edit Goal Description error: can not edit with valid data\");\n\n }", "@Test\n public void editProfileTest() {\n }", "void editTakingPrice() throws PresentationException {\n\t\tTakingPrice tp = null;\n\t\tint codebar_item;\n\t\tint code_supermarket;\n\t\tint newCodeItem;\n\n\t\tprinter.printMsg(\"Digite o código do item a ser alterado? \");\n\t\tcodebar_item = reader.readNumber();\n\n\t\tprinter.printMsg(\"Digite o código do supermercado a ser alterado? \");\n\t\tcode_supermarket = reader.readNumber();\n\n\t\tprinter.printMsg(\n\t\t\t\t\" Digite a data da tomada de preço do item: (Ex.Formato: '2017-12-16 10:55:53' para 16 de dezembro de 2017, 10 horas 55 min e 53 seg)\");\n\t\tString dateTP = reader.readText();\n\t\tdateTP = reader.readText();\n\n\t\tString pattern = \"yyyy-mm-dd hh:mm:ss\";\n\t\tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n\t\tDate dateTPF = null;\n\t\ttry {\n\t\t\tdateTPF = simpleDateFormat.parse(dateTP);\n\t\t} catch (ParseException e) {\n\t\t\tthrow new PresentationException(\"Não foi possível executar a formatação da data no padrão definido\", e);\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\t// pensando em cadastrar o novo preço sem editar o preço antigo. Senão terei que\n\t\t// controlar por muitos atributos.\n\n\t\tif (tpm.checksExistence(codebar_item, code_supermarket, dateTPF)) {\n\t\t\ttp = tpm.getTakingPrice(codebar_item, code_supermarket, dateTPF);\n\t\t\tint codeSupermarket = tp.getCodeSupermarket();\n\t\t\tdouble priceItem = tp.getPrice();\n\t\t\tDate dateTPE = tp.getDate();\n\t\t\tint respEdit = 0;\n\n\t\t\ttpm.deleteTakingPrice(codebar_item, code_supermarket, dateTPE);\n\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\trespEdit = this.askWhatEdit(tp);\n\n\t\t\t\t} catch (NumeroInvalidoException e) {\n\t\t\t\t\tthrow new PresentationException(\"A opção digitada não é uma opção válida\", e);\n\t\t\t\t}\n\n\t\t\t\tif (respEdit == 1) {\n\t\t\t\t\tprinter.printMsg(\" Digite o novo código do item: \");\n\t\t\t\t\tnewCodeItem = reader.readNumber();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.saveTakingPrice(newCodeItem, priceItem, codeSupermarket, dateTPE);\n\t\t\t\t\t} catch (PresentationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else if (respEdit == 2) {\n\t\t\t\t\tprinter.printMsg(\" Digite o novo código do supermercado: \");\n\t\t\t\t\tint newCodeSupermarket = 0;\n\t\t\t\t\tnewCodeSupermarket = reader.readNumber();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.saveTakingPrice(codebar_item, priceItem, newCodeSupermarket, dateTPE);\n\t\t\t\t\t} catch (PresentationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else if (respEdit == 3) {\n\t\t\t\t\tprinter.printMsg(\" Digite o novo preço do item: \");\n\t\t\t\t\tdouble newPriceItem = 0;\n\t\t\t\t\tnewPriceItem = reader.readNumberDouble();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.saveTakingPrice(codebar_item, newPriceItem, codeSupermarket, dateTPE);\n\t\t\t\t\t} catch (PresentationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} else if (respEdit == 4) {\n\t\t\t\t\tprinter.printMsg(\n\t\t\t\t\t\t\t\" Digite a nova data da tomada de preço do item: (Ex.Formato: '2017-12-16 10:55:53' para 16 de dezembro de 2017, 10 horas 55 min e 53 seg)\");\n\t\t\t\t\tString date = reader.readText();\n\t\t\t\t\tdate = reader.readText();\n\n\t\t\t\t\t// String pattern = \"yyyy-mm-dd hh:mm:ss\";\n\t\t\t\t\t// SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n\t\t\t\t\tDate newDateTP = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnewDateTP = simpleDateFormat.parse(date);\n\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\tthrow new PresentationException(\"A opção digitada não é uma opção válida\", e);\n\t\t\t\t\t\t// e.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"Date:\" + date);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis.saveTakingPrice(codebar_item, priceItem, codeSupermarket, newDateTP);\n\t\t\t\t\t} catch (PresentationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} while (respEdit != 1 & respEdit != 2 & respEdit != 3 & respEdit != 4);\n\n\t\t} else\n\n\t\t{\n\t\t\tprinter.printMsg(\"Não existe tomada de preço com estes códigos cadastrados.\");\n\t\t}\n\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void EditViewLessthan15Accts() {\n\t\tReport.createTestLogHeader(\"MuMv\",\"Verify whether user is able to edit the existing view successfully and it gets reflected in the list\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvTestdataforFAA\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ManageViews()\n\t\t.VerifyEditviewname(userProfile) \t\t\t\t\t\t \t \t\t\n\t\t.EditViewNameforLessthan15Accts(userProfile)\n\t\t.ClickAddUserRHNLink()\n\t\t.StandardUser_Creation()\t\t\t\t\t\t \t \t\t\n\t\t.verifyEditedview(userProfile)\n\t\t.enterValidData_StandardUserforEditview(userProfile);\n\t\tnew BgbRegistrationAction()\n\t\t.AddNewStdUserdata(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile);\t\n\t}", "@Test\n\tpublic void testUpdateTicketOk() {\n\t}", "void actionEdit(int position);", "@Test\n public void execute_filteredContactList_editSuccess() {\n showContactAtIndex(model, INDEX_FIRST_CONTACT);\n\n Contact contactInFilteredList = model.getFilteredContactList().get(INDEX_FIRST_CONTACT.getZeroBased());\n Contact editedContact = new ContactBuilder(contactInFilteredList).withName(VALID_NAME_BOB).build();\n\n EditContactDescriptor descriptor = new EditContactDescriptorBuilder().withName(VALID_NAME_BOB).build();\n\n EditContactCommand editContactCommand = new EditContactCommand(INDEX_FIRST_CONTACT, descriptor);\n\n String expectedMessage = String.format(EditContactCommand.MESSAGE_EDIT_CONTACT_SUCCESS, editedContact);\n\n Model expectedModel = new ModelManager(new ModuleList(), new ModuleList(),\n new ContactList(model.getContactList()), new TodoList(), new EventList(), new UserPrefs());\n\n expectedModel.setContact(model.getFilteredContactList().get(0), editedContact);\n\n assertCommandSuccess(editContactCommand, model, expectedMessage, expectedModel);\n }", "@Test\n public void testEdit() {\n System.out.println(\"edit\");\n String expected = \"edit-method worked\";\n when(cDao.edit((Componente) any())).thenReturn(expected);\n String result = cDao.edit((Componente) any());\n assertThat(result, is(expected));\n }", "@FXML\n void handleEdit(ActionEvent event) {\n if (checkFields()) {\n\n try {\n //create a pseudo new environment with the changes but same id\n Environment newEnvironment = new Environment(oldEnvironment.getId(), editTxtName.getText(), editTxtDesc.getText(), editClrColor.getValue());\n\n //edit the oldenvironment\n Environment.edit(oldEnvironment, newEnvironment);\n } catch (SQLException exception) {\n //failed to save a environment, IO with database failed\n Manager.alertException(\n resources.getString(\"error\"),\n resources.getString(\"error.10\"),\n this.dialogStage,\n exception\n );\n }\n //close the stage\n dialogStage.close();\n } else {\n //fields are not filled valid\n Manager.alertWarning(\n resources.getString(\"add.invalid\"),\n resources.getString(\"add.invalid\"),\n resources.getString(\"add.invalid.content\"),\n this.dialogStage);\n }\n Bookmark.refreshBookmarksResultsProperty();\n }", "@Test\n\tpublic void passengerEditPositiveTest() {\n\t\tsuper.authenticate(\"[email protected]\");\n\t\tfinal Integer id = this.getEntityId(\"driver20\");\n\t\tfinal Driver driver = this.driverService.findOne(id);\n\n\t\tdriver.setName(\"Pepe\");\n\t\tdriver.setSurname(\"Doe\");\n\t\tdriver.setCity(\"Patata\");\n\t\tdriver.setCountry(\"Patata\");\n\t\tdriver.setBankAccountNumber(\"ES9121000418450200051332\");\n\t\tdriver.setPhone(\"985698547\");\n\t\tdriver.setImage(\"https://d30y9cdsu7xlg0.cloudfront.net/png/48705-200.png\");\n\t\tdriver.setChilds(true);\n\t\tdriver.setMusic(true);\n\t\tdriver.setSmoke(false);\n\t\tdriver.setPets(true);\n\n\t\tfinal UserAccount account = driver.getUserAccount();\n\t\taccount.setPassword(\"123456\");\n\t\taccount.setUsername(\"[email protected]\");\n\n\t\tdriver.setUserAccount(account);\n\n\t\tthis.driverService.save(driver);\n\t\tsuper.unauthenticate();\n\t\tthis.driverService.flush();\n\t}", "@Test\n public void testModificarLibro() {\n System.out.println(\"ModificarLibro\");\n Libro libro = new LibrosList().getLibros().get(0);\n BibliotecarioController instance = new BibliotecarioController();\n Libro expResult = new LibrosList().getLibros().get(0);\n Libro result = instance.ModificarLibro(libro);\n assertEquals(expResult, result);\n System.out.println(\"Libro modificado\\ntitulo:\" + result.getTitulo() + \"\\nISBN: \" + result.getIsbn());\n }", "private void modifyActionPerformed(ActionEvent evt) throws Exception {\n String teaID = this.teaIDText.getText();\n String teaCollege = this.teaCollegeText.getText();\n String teaDepartment = this.teaDepartmentText.getText();\n String teaType = this.teaTypeText.getText();\n String teaPhone = this.teaPhoneText.getText();\n String teaRemark = this.teaRemarkText.getText();\n if(StringUtil.isEmpty(teaID)){\n JOptionPane.showMessageDialog(null, \"请先选择一条老师信息!\");\n return;\n }\n if(StringUtil.isEmpty(teaCollege)){\n JOptionPane.showMessageDialog(null, \"学院不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaDepartment)){\n JOptionPane.showMessageDialog(null, \"系不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaType)){\n JOptionPane.showMessageDialog(null, \"类型不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaPhone)){\n JOptionPane.showMessageDialog(null, \"手机不能为空!\");\n return;\n }\n if(!StringUtil.isAllNumber(teaPhone)){\n JOptionPane.showMessageDialog(null, \"请输入合法的手机号!\");\n return;\n }\n if(teaPhone.length() != 11){\n JOptionPane.showMessageDialog(null, \"请输入11位的手机号!\");\n return;\n }\n int confirm = JOptionPane.showConfirmDialog(null, \"确认修改?\");\n if(confirm == 0){//确认修改\n Teacher tea = new Teacher(teaID,teaCollege,teaDepartment,teaType,teaPhone,teaRemark);\n Connection con = dbUtil.getConnection();\n int modify = teacherInfo.updateInfo(con, tea);\n if(modify == 1){\n JOptionPane.showMessageDialog(null, \"修改成功!\");\n resetValues();\n }\n else{\n JOptionPane.showMessageDialog(null, \"修改失败!\");\n return;\n }\n initTable(new Teacher());//初始化表格\n }\n }", "@Override\r\n\tpublic void editTea(Teacher teacher) {\n\r\n\t}", "public void modifier(){\r\n try {\r\n //affectation des valeur \r\n echeance_etudiant.setIdEcheanceEtu(getViewEtudiantInscripEcheance().getIdEcheanceEtu()); \r\n \r\n echeance_etudiant.setAnneeaca(getViewEtudiantInscripEcheance().getAnneeaca());\r\n echeance_etudiant.setNumetu(getViewEtudiantInscripEcheance().getNumetu());\r\n echeance_etudiant.setMatricule(getViewEtudiantInscripEcheance().getMatricule());\r\n echeance_etudiant.setCodeCycle(getViewEtudiantInscripEcheance().getCodeCycle());\r\n echeance_etudiant.setCodeNiveau(getViewEtudiantInscripEcheance().getCodeNiveau());\r\n echeance_etudiant.setCodeClasse(getViewEtudiantInscripEcheance().getCodeClasse());\r\n echeance_etudiant.setCodeRegime(getViewEtudiantInscripEcheance().getCodeRegime());\r\n echeance_etudiant.setDrtinscri(getViewEtudiantInscripEcheance().getInscriptionAPaye());\r\n echeance_etudiant.setDrtforma(getViewEtudiantInscripEcheance().getFormationAPaye()); \r\n \r\n echeance_etudiant.setVers1(getViewEtudiantInscripEcheance().getVers1());\r\n echeance_etudiant.setVers2(getViewEtudiantInscripEcheance().getVers2());\r\n echeance_etudiant.setVers3(getViewEtudiantInscripEcheance().getVers3());\r\n echeance_etudiant.setVers4(getViewEtudiantInscripEcheance().getVers4());\r\n echeance_etudiant.setVers5(getViewEtudiantInscripEcheance().getVers5());\r\n echeance_etudiant.setVers6(getViewEtudiantInscripEcheance().getVers6()); \r\n \r\n //modification de l'utilisateur\r\n echeance_etudiantFacadeL.edit(echeance_etudiant); \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur de modification capturée : \"+e);\r\n } \r\n }", "@Test\n public void tcEditProfileWithInvalidData() {\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 }", "@Test(priority = 1)\n\tpublic void editTest() throws IOException, InterruptedException\n\t{\n\t\tdriver.get(baseURL);\n\t\tloginPage lp = new loginPage(driver);\n\t\tSearchCustomerPage scp = new SearchCustomerPage(driver);\n\t\tEditDeleteCustomerPage edcp = new EditDeleteCustomerPage(driver);\n\t\t\n\t\tlp.setUserName(username);\n\t\tlp.setPassword(password);\n\t\tlp.clickLogin();\n\t\tlogger.info(\"login passed\");\n\t\t\n\t\t//getting cutsomers page\n\t\tscp.clickCustomers();\n\t\tscp.clickCustomers1();\n\t\tlogger.info(\"customers page \");\n\t\t\n\t\t//choosing a customer to edit and editing them\n\t\tedcp.editCustomer(edcp.btnEdit2);\n\t\tlogger.info(\"edit customer clicked\");\n\t\t\n\t\t//editing company\n\t\tedcp.editCompany(\"busy QA\");\n\t\tlogger.info(\"edited company info\");\n\t\t\n\t\t//saving\n\t\tedcp.saveCutomer();\n\t\tlogger.info(\"customer saved\");\n\t\t\n\t\tString s = edcp.alertMsgSaved.getText();\n\t\t\n\t\t//checking if true\n\t\tif(s.contains(\"The customer has been updated successfully.\"))\n\t\t{\n\t\t\tAssert.assertTrue(true);\n\t\t\tlogger.info(\"passed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcaptureScreen(driver, \"editTest\");\n\t\t\tAssert.assertTrue(false);\n\t\t\tlogger.info(\"failed\");\n\t\t}\n\t\tThread.sleep(2000);\n\t\tlp.clickLogout();\n\t}", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "Product editProduct(Product product);", "@Test\n\tpublic void verifyAbletoEditandUpdatetheAd() throws Exception{\n\t\tCreateStockTradusProPage createStockObj = new CreateStockTradusProPage(driver);\n\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(userName, pwd);\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.myStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.firstStockVerificationElement);\n\t\tjsClick(driver, AllStockPage.editButtonforMANtires);\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.postingFormVerificationElement);\n\t\twaitTill(3000);\n\t\tscrollToElement(driver, createStockObj.vehicleVersionFieldPostingForm);\n\t\twaitTill(7000);\n\t\tclick(createStockObj.fuelTypeinPosting);\n\t\tclick(createStockObj.fuelTypeDropdownvalues\n\t\t\t\t.get(dynamicSelect(createStockObj.fuelTypeDropdownvalues)));\n\t\twaitTill(1000);\n\t\tscrollToElement(driver, createStockObj.conditioninPostingForm);\n\t\twaitTill(4000);\n\t\tclick(createStockObj.conditioninPostingForm);\n\t\tclick(createStockObj.conditionDropdownvalues\n\t\t\t\t.get(dynamicSelect(createStockObj.conditionDropdownvalues)));\n\t\twaitTill(1000);\n\t\tscrollToElement(driver, createStockObj.constructionYearAreainPostingForm);\n\t\twaitTill(3000);\n\t\tsendKeys(createStockObj.constructionYearAreainPostingForm,generateRandomNumber(2015,2021));\n\t\tsendKeys(createStockObj.sellerReferenceAreainPostingForm,generateRandomNumber(369258,369300));\n\t\tsendKeys(createStockObj.VINAreainPostingForm,generateRandomNumber(21144567,21144600));\n\t\twaitTill(3000);\n\t\tList<String> actualInputs=new ArrayList<String>();\n\t\tactualInputs.add(getAttribute(createStockObj.constructionYearAreainPostingForm,\"value\"));\n\t\tactualInputs.add(getAttribute(createStockObj.sellerReferenceAreainPostingForm,\"value\"));\n\t\tactualInputs.add(getAttribute(createStockObj.VINAreainPostingForm,\"value\"));\n\t\tactualInputs.add(getText(createStockObj.fuelTypeinPosting));\n\t\tactualInputs.add(getText(createStockObj.conditioninPostingForm));\n\t\twaitTill(2000);\n\t\tjsClick(driver,AllStockPage.saveButtoninPostingForm);\n\t\texplicitWaitFortheElementTobeVisible(driver, createStockObj.successToastInPostingForm);\n\t\tAssert.assertTrue(\n\t\t\t\tgetText(createStockObj.successToastInPostingForm).replace(\"\\n\", \", \").trim()\n\t\t\t\t\t\t.contains(\"Successful action, Your ad was posted.\"),\n\t\t\t\t\"Success message is not displayed while posting Ad with image and with all mandatory fields filled\");\n\t\tString pageURL=driver.getCurrentUrl();\n\t\tAssert.assertTrue(getCurrentUrl(driver).equals(pageURL)\n\t\t\t\t,\"Page is not navigating to All ads age after posting success\");\n\t\twaitTill(3000);\n\t\tString parentURL=driver.getCurrentUrl();\n\t\twhile(!verifyElementPresent(AllStockPage.tradusLinkforMANtires)) {\n\t\t\twaitTill(2000);\n\t\t\tdriver.navigate().refresh();\n\t\t}\n\t\tjsClick(driver,AllStockPage.tradusLinkforMANtires);\n\t\tswitchWindow(driver,parentURL);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.makeandModelonTradusADP);\n\t\twaitTill(3000);\n\t\tAssert.assertTrue(getText(AllStockPage.makeandModelonTradusADP).trim().equals(\"MAN MAN 18.324\"), \"Ad deatils for MAN MAN 18.324 ad is not displaying on Tradus\");\n\t\tWebElement[] updatedVal= {AllStockPage.makeYearonTradusADP,AllStockPage.sellerRefNoonTradusADP,AllStockPage.vinNumberonTradusADP};\n\t\tString[] attributeName= {\"MakeYear\",\"SellerRef\",\"VINNumber\"};\n\t\tfor(int i=0;i<updatedVal.length;i++) {\n\t\t\tAssert.assertTrue(getText(updatedVal[i]).trim().equals(actualInputs.get(i).trim()), \"\"+attributeName[i]+\" is not updated properly\");\n\t\t}\n\t\t\n\t}", "@Test(dataProvider = \"editOfferData\", dataProviderClass = OfferDataProvider.class)\n public void editOfferWithPositiveData(OfferTestData oldData, OfferTestData newData) {\n pxDriver.goToURL(super.url + \"offers/\" + oldData.getId() + \"/edit/generalInfo/\");\n login();\n new EditOffersPage(pxDriver)\n .checkDefaultValues(oldData)\n .editInstance(oldData, newData)\n .saveInstance(newData);\n CheckTestData.checkEditedOffer(newData);\n }", "@Test\n void updateTest() {\n admin.setSurname(\"Rossini\");\n Admin modifyied = adminJpa.update(admin);\n assertEquals(\"Rossini\", modifyied.getSurname());\n }", "@Test\n public void testFindPengguna() {\n System.out.println(\"findPengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.findPengguna(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "boolean isEdit();", "public void clickedSpeakerEdit() {\n\t\tif(mainWindow.getSelectedRowSpeaker().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowSpeaker().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tshowSpeakeerDetails(mainWindow.getSelectedRowSpeaker()[0]);\n\t\t}\t\n\t}", "@Override\n\tpublic void editAction(int id) {\n\t\t\n\t}", "@Test\n public void passUpdateWrong () {\n //check the display name as expected\n onView(withId(R.id.username)).check(matches(isDisplayed()));\n //enter wrong past password\n onView(withId(R.id.oldPassword)).perform(typeText(\"serene88\"));\n //close keyboard\n closeSoftKeyboard();\n //enter new pass\n onView(withId(R.id.newPassword)).perform(typeText(\"serene99\"));\n //close keyboard\n closeSoftKeyboard();\n //reenter new pass\n onView(withId(R.id.reNewPassword)).perform(typeText(\"serene99\"));\n //close keyboard\n closeSoftKeyboard();\n //click the button\n onView(withId(R.id.save)).perform(click());\n // check toast visibility\n onView(withText(R.string.wrongPassword))\n .inRoot(new ToastMatcher())\n .check(matches(withText(R.string.wrongPassword)));\n //check activity still shown\n assertFalse(activityTestRule.getActivity().isFinishing());\n }", "@Test \n\tpublic void testUpdateSetting() throws Exception\n\t{\n\t}", "private void edit() {\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.update(Integer.parseInt(txt_id.getText().toString().trim()),txt_name.getText().toString().trim(),\r\n txt_bagian.getText().toString().trim(),\r\n txt_address.getText().toString().trim(),\r\n txt_telp.getText().toString().trim());\r\n Toast.makeText(getApplicationContext(),\"Data berhasil di Ubah\",Toast.LENGTH_SHORT).show();\r\n blank();\r\n finish();\r\n }\r\n }", "boolean editEntry(String id, String val, String colName) throws Exception;", "@Test\n public void testGetPengguna() {\n System.out.println(\"getPengguna\");\n String email = \"\";\n String password = \"\";\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.getPengguna(email, password);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void testUpdateCombo() {\n\t}", "@Test\r\n public void testAlterarDados() {\r\n System.out.println(\"alterarDados\");\r\n \r\n String nome = \"nomee\";\r\n String username = \"usernamee\";\r\n String email = \"[email protected]\";\r\n String password = \"passwordd\";\r\n \r\n CentroExposicoes ce = new CentroExposicoes();\r\n AlterarUtilizadorController instance = new AlterarUtilizadorController(ce);\r\n \r\n Utilizador uti = new Utilizador(\"nome\", \"username\", \"[email protected]\", \"password\");\r\n ce.getRegistoUtilizadores().addUtilizador(uti);\r\n instance.getUtilizador(uti.getEmail());\r\n \r\n boolean expResult = true;\r\n boolean result = instance.alterarDados(nome, username, email, password);\r\n \r\n assertEquals(expResult, result);\r\n }", "void onEditClicked();", "@Test(groups = \"Transactions Tests\", description = \"Edit transaction\")\n\tpublic void editTransaction() {\n\t\tMainScreen.clickAccountItem(\"Income\");\n\t\tSubAccountScreen.clickSubAccountItem(\"Salary\");\n\t\tTransactionsScreen.clickEditBtnFromTransactionItem(\"Extra income\");\n\t\tTransactionsScreen.typeTransactionDescription(\"Bonus\");\n\t\tTransactionsScreen.typeTransactionAmount(\"600\");\n\t\tTransactionsScreen.clickSaveBtn();\n\t\tTransactionsScreen.transactionItem(\"Bonus\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$600\"));\n\t\ttest.log(Status.PASS, \"Sub-account edited successfully and the value is correct\");\n\n\t\t//Testing if the edited transaction was edited 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(\"Bonus\").shouldBe(visible);\n\t\tTransactionsScreen.transactionAmout().shouldHave(text(\"$600\"));\n\t\ttest.log(Status.PASS, \"Transaction in the 'Double Entry' account was edited too and the value is correct\");\n\n\t}", "@Test\n\tpublic void testUpdateTicketFail() {\t//campos nulos\n\t\t//tp.set_name(\"\");\n\t\t//assertFalse(sa.updatePlatform(tp)); //name empty y campos nulos\n\t\t//tp.set_name(\"PS3PS3PS3PS3PS3PS3PS3PS3PS3PS3PS3PS3PS3PS3PS3PS3\");\n\t\t//assertFalse(sa.updatePlatform(tp)); //nombre >45 chars y campos nulos\n\t\t//tp.set_name(\"STEAM\"); //campos nulos menos nombre\n\t\t//assertFalse(sa.updatePlatform(tp)); //name empty y campos nulos\n\t\t//tp.set_activated(true);\n\t\t//assertFalse(sa.updatePlatform(tp)); //id nulo\n\t\t//Plataforma no existe\n\t\t//tp.set_id(8);\n\t\t//assertFalse(sa.updatePlatform(tp));\n\t}", "@Override\n\tpublic void editar(Cliente cliente) throws ExceptionUtil {\n\t\t\n\t}", "private void abrirPlanParaEditar() {\n final AdaptadorTablaPlanTrabajoAcademia planSeleccionado = obtenerPlanSeleccionado();\n posicionSeleccionada = planesTabla.indexOf(planSeleccionado);\n if (planSeleccionado != null) {\n Stage escenaActual = (Stage) tableViewListaPlanes.getScene().getWindow();\n escenaActual.close();\n AdministradorEdicionPlanTrabajoAcademia administradorEdicion = AdministradorEdicionPlanTrabajoAcademia.obtenerInstancia();\n administradorEdicion.desplegarFormularioConDatosPlan(planSeleccionado.getId()); \n }\n }", "@Override\n\tpublic void editTutorial() {\n\t\t\n\t}", "@Test\n public void updateContact() {\n }", "private void performDirectEdit() {\n\t}", "void editMyPost(Post post);", "@Override\n public void edit(User user) {\n }", "protected void editClicked(View view){\n FragmentManager fm = getSupportFragmentManager();\n ЕditDialog editDialogFragment = new ЕditDialog(2);\n Bundle args = new Bundle();\n args.putInt(\"position\", this.position);\n args.putString(\"itemName\", this.itm.getItem(this.position).getName());\n args.putString(\"itemUrl\", this.itm.getItem(this.position).getUrl());\n editDialogFragment.setArguments(args);\n editDialogFragment.show(fm, \"edit_item\");\n }", "@Override\n\tpublic void edit(HttpServletRequest request,HttpServletResponse response) {\n\t\tint id=Integer.parseInt(request.getParameter(\"id\"));\n\t\tQuestionVo qv=new QuestionVo().getInstance(id);\n\t\tcd.edit(qv);\n\t\ttry{\n\t\t\tresponse.sendRedirect(\"Admin/question.jsp\");\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t}" ]
[ "0.7044515", "0.6944533", "0.6757589", "0.6497529", "0.64767814", "0.63975424", "0.63477105", "0.63364255", "0.6270184", "0.6231205", "0.6206143", "0.62016565", "0.61892956", "0.61871606", "0.612854", "0.6120933", "0.6100746", "0.6094631", "0.6075439", "0.6069722", "0.60481656", "0.60332763", "0.60327244", "0.6004785", "0.5976053", "0.59665745", "0.5958482", "0.5938834", "0.5923711", "0.59148604", "0.5905268", "0.5874611", "0.58455193", "0.5843486", "0.58157223", "0.5813885", "0.5812651", "0.58125025", "0.57994956", "0.5787973", "0.578464", "0.5780414", "0.5774834", "0.5766848", "0.57656085", "0.57641196", "0.575657", "0.5745264", "0.5745049", "0.57438934", "0.5743789", "0.5743707", "0.57366455", "0.5723886", "0.57163894", "0.57146955", "0.5710403", "0.5707074", "0.5701228", "0.5698927", "0.5692253", "0.5691719", "0.56882167", "0.56851286", "0.56841356", "0.56833017", "0.56786776", "0.56686246", "0.5664427", "0.5652192", "0.5652186", "0.5651871", "0.565164", "0.5636589", "0.56346667", "0.5627315", "0.56223613", "0.56203014", "0.5616764", "0.5615246", "0.5612066", "0.560879", "0.5601614", "0.5589967", "0.5585976", "0.55810916", "0.5578587", "0.5577623", "0.5574617", "0.55717695", "0.5570223", "0.55644494", "0.5562927", "0.5562232", "0.55618316", "0.5556785", "0.55540574", "0.55517936", "0.55487037", "0.55445254" ]
0.81246537
0
Test of addPengguna method, of class DaftarPengguna.
@Test public void testAddPengguna() { System.out.println("addPengguna"); Pengguna pengguna = null; DaftarPengguna instance = new DaftarPengguna(); instance.addPengguna(pengguna); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetPengguna() {\n System.out.println(\"getPengguna\");\n String email = \"\";\n String password = \"\";\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.getPengguna(email, password);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testFindPengguna() {\n System.out.println(\"findPengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.findPengguna(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEditPengguna() {\n System.out.println(\"editPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.editPengguna(pengguna);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetPenggunas_0args() {\n System.out.println(\"getPenggunas\");\n DaftarPengguna instance = new DaftarPengguna();\n List expResult = null;\n List result = instance.getPenggunas();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void testADDWithData() throws Exception {\n String data =\"Some words about Helen of Troy\";\n doAdd(data, null);\n }", "@Test\n public void testAddMaterialOneMaterial() {\n String material = \"material\";\n planned.addMaterials(material);\n\n assertEquals(planned.getMaterials().size(), 1);\n\n assertTrue(planned.getMaterials().contains(material));\n\n }", "@Test\n public void testDeletePengguna() throws Exception {\n System.out.println(\"deletePengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.deletePengguna(id);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n @DisplayName(\"Test for add patient to patient arrayList if correct\")\n public void testAddPatientTrue(){\n assertEquals(\"test\",department.getPatients().get(0).getFirstName());\n assertEquals(\"test\",department.getPatients().get(0).getLastName());\n assertEquals(\"test\",department.getPatients().get(0).getPersonNumber());\n }", "@Test void addIngredientZero()\n {\n }", "@Test\r\n public void testSamaPuu() {\r\n AvlPuu puu = new AvlPuu();\r\n Noodi noodi = new Noodi(0,0);\r\n noodi.setMatkaJaljella(10);\r\n noodi.setTehtyMatka(0);\r\n PuuSolmu solmu = new PuuSolmu(noodi);\r\n puu.insert(noodi);\r\n Noodi noodi2 = new Noodi(1,0);\r\n noodi2.setMatkaJaljella(9);\r\n noodi2.setTehtyMatka(noodi);\r\n PuuSolmu solmu2 = new PuuSolmu(noodi2);\r\n puu.insert(noodi2);\r\n \r\n AvlPuu puu2 = new AvlPuu();\r\n puu2.insert(noodi);\r\n puu2.insert(noodi2);\r\n assertTrue(puu.SamaPuu(puu2));\r\n\r\n }", "@Test\n public void testGetPenggunas_Long() {\n System.out.println(\"getPenggunas\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n List expResult = null;\n List result = instance.getPenggunas(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void testAdd() {\n System.out.println(\"add\");\n String key = \"\";\n Object value = null;\n int modo= 0;\n ObjectTempSwapWizard instance = new ObjectTempSwapWizard(modo);\n Object expResult = null;\n Object result = instance.add(key, value);\n assertEquals(expResult, result);\n }", "boolean testAdd(Tester t) {\n return t.checkExpect(this.p5.add(this.p7), new MyPosn(249, 50))\n && t.checkExpect(this.p6.add(this.p1), new MyPosn(51, 50));\n }", "@Test\n public void testAddDhlwsh() {\n System.out.println(\"addDhlwsh\");\n Mathima mathima = null;\n String hmeromDillwsis = \"\";\n Foititis instance = new Foititis();\n instance.addDhlwsh(mathima, hmeromDillwsis);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void testAgregar() {\n\t\tassertFalse(l.agregar(1, -1));\n\t\tassertEquals(0, l.tamanio());\n\t\t\n\t\t//Test de agregar al principio cuando no hay nada\n\t\tassertTrue(l.agregar(2, 0));\n\t\tassertEquals((int)(new Integer(2)), l.elemento(0));\n\t\tassertEquals(1, l.tamanio());\n\t\t\n\t\t//Test de agregar al principio cuando hay algo\n\t\tassertTrue(l.agregar(0, 0));\n\t\tassertEquals((int)(new Integer(0)), l.elemento(0));\n\t\tassertEquals((int)(new Integer(2)), l.elemento(1));\n\t\tassertEquals(2, l.tamanio());\n\t\t\n\t\t//Test de agregar entremedio\n\t\tassertTrue(l.agregar(1, 1));\n\t\tassertEquals((int)(new Integer(0)), l.elemento(0));\n\t\tassertEquals((int)(new Integer(1)), l.elemento(1));\n\t\tassertEquals((int)(new Integer(2)), l.elemento(2));\n\t\tassertEquals(3, l.tamanio());\n\t\t\n\t\t//Test de agregar al final\n\t\tassertTrue(l.agregar(3, 3));\n\t\tassertEquals((int)(new Integer(0)), l.elemento(0));\n\t\tassertEquals((int)(new Integer(1)), l.elemento(1));\n\t\tassertEquals((int)(new Integer(2)), l.elemento(2));\n\t\tassertEquals((int)(new Integer(3)), l.elemento(3));\n\t\tassertEquals(4, l.tamanio());\n\t\t\n\t\t//Test de agregar despues del final\n\t\tassertFalse(l.agregar(4, 5));\n\t\tassertEquals((int)(new Integer(0)), l.elemento(0));\n\t\tassertEquals((int)(new Integer(1)), l.elemento(1));\n\t\tassertEquals((int)(new Integer(2)), l.elemento(2));\n\t\tassertEquals((int)(new Integer(3)), l.elemento(3));\n\t\tassertEquals(4, l.tamanio());\n\t\t\n\t}", "@Test\n public void addTest() {\n BinaryTree testTree = new BinaryTree();\n ComparableWords word=new ComparableWords(\"prueba\",\"test\",\"test\");\n assertNull(testTree.root);\n testTree.add(word);\n assertNotNull(testTree.root);\n }", "public static boolean addPesanan(Pesanan baru) throws PesananSudahAdaException{\n\n for(int i=0;i<PESANAN_DATABASE.size();i++) {\n if (PESANAN_DATABASE.get(i).getPelanggan().equals(baru.getPelanggan())) {\n throw new PesananSudahAdaException(baru);\n }\n }\n PESANAN_DATABASE.add(baru);\n LAST_PESANAN_ID = baru.getID();\n return true;\n }", "@Test\n\tpublic void testAdd(){\n\t\t\n\t\tFraction testFrac1 = new Fraction();\n\t\t\n\t\tassertTrue(\"Didn't add correctly\",testFrac1.add(new Fraction(25,15)).toString().equals(new Fraction(40,15).toString()));\n\t}", "@Test\n public void addExerciseTest() {\n\n actual.addExercise(\"new exercise\");\n\n Assert.assertEquals(Arrays.asList(EXPECTED_EXERCISES), actual.getExercises());\n }", "@Test\n public void testAddItem() {\n \n System.out.println(\"AddItem\");\n \n /*ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n Product p4 = new Product(\"Monitor 4K\", 550.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n assertEquals(instance.getItemCount(), 4, 0.0);*/\n \n /*----------------------------------------------*/\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n assertTrue(instance.findProduct(\"Galletas\"));\n \n }", "@Test\r\n public void testAgregar() {\r\n System.out.println(\"agregar\");\r\n Integer idDepto = null;\r\n String nombreDepto = \"\";\r\n Departamento instance = new Departamento();\r\n instance.agregar(idDepto, nombreDepto);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n public void testAdd() {\n System.out.println(\"add\");\n al.add(1);\n Integer a = 1;\n assertEquals(a, al.get(0));\n }", "@Test\n public void testAdd() {\n System.out.println(\"add\");\n int cod = 0;\n int semestre = 0;\n String nombre = \"\";\n int cod_es = 0;\n cursoDAO instance = new cursoDAO();\n boolean expResult = false;\n boolean result = instance.add(cod, semestre, nombre, cod_es);\n assertEquals(expResult, result);\n \n }", "@Test\n\tpublic void testAddItem() {\n\t\tassertEquals(\"testAddItem(LongTermTest): valid enter failure\", 0, ltsTest.addItem(item4, 10)); //can enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid enter failure\", -1, ltsTest.addItem(item4, 100)); // can't enter\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid available capacity after adding\", 900, ltsTest.getAvailableCapacity());\n\t\tassertEquals(\"testAddItem(LongTermTest): invalid item count after adding\", 10, ltsTest.getItemCount(item4.getType()));\n\t}", "@Test\r\n public void testLaskeSolmut() {\r\n AvlPuu puu = new AvlPuu();\r\n Noodi noodi = new Noodi(0,0);\r\n noodi.setMatkaJaljella(10);\r\n noodi.setTehtyMatka(0);\r\n PuuSolmu solmu = new PuuSolmu(noodi);\r\n puu.insert(noodi);\r\n Noodi noodi2 = new Noodi(1,0);\r\n noodi2.setMatkaJaljella(9);\r\n noodi2.setTehtyMatka(noodi);\r\n PuuSolmu solmu2 = new PuuSolmu(noodi2);\r\n puu.insert(noodi2);\r\n assertEquals(puu.laskeSolmut(), 2);\r\n }", "@Test\n public void testAgregarElemento() {\n System.out.println(\"agregarElemento\");\n Nodo miNodo = null;\n Huffman instance = null;\n instance.agregarElemento(miNodo);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n public void testAddVathmos() {\n System.out.println(\"addVathmos\");\n Mathima mathima = null;\n String hmeromExetasis = \"\";\n double vathmos = 0.0;\n Foititis instance = new Foititis();\n instance.addVathmos(mathima, hmeromExetasis, vathmos);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n\tpublic void testAddPromotion() {\n\t\tassertNotNull(\"Test if there is valid Promotion arraylist to add to\", promotionList);\r\n\r\n\t\t// Given an empty list, after adding 1 item, the size of the list is 1\r\n\t\tC206_CaseStudy.addPromotion(promotionList, po1);\r\n\t\tassertEquals(\"Test if that Promotion arraylist size is 1?\", 1, promotionList.size());\r\n\r\n\t\t// The item just added is as same as the first item of the list\r\n\t\tassertSame(\"Test that Promotion is added same as 1st item of the list?\", po1, promotionList.get(0));\r\n\r\n\t\t// Add another item. test The size of the list is 2?\r\n\t\tC206_CaseStudy.addPromotion(promotionList, po2);\r\n\t\tassertEquals(\"Test that Promotion arraylist size is 2?\", 2, promotionList.size());\r\n\t}", "public abstract void addUnit(LanguageUnit languageUnit);", "@Test\r\n public void testContains() {\r\n System.out.println(\"contains\");\r\n Solmu solmu = null;\r\n Pala instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.contains(solmu);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void ensureCanAddAllergenUnit() {\n\n System.out.println(\"Ensure Can add an Allergen Unit Test\");\n\n Allergen allergen = new Allergen(\"al5\", \"allergen 5\");\n\n assertTrue(profile_unit.addAllergen(allergen));\n }", "@Test\r\n public void testAgregar() {\r\n System.out.println(\"agregar\");\r\n Integer idUsuario = null;\r\n String nombre = \"\";\r\n String apellido = \"\";\r\n String usuario = \"\";\r\n String genero = \"\";\r\n String contrasenia = \"\";\r\n String direccion = \"\";\r\n Usuario instance = new Usuario();\r\n instance.agregar(idUsuario, nombre, apellido, usuario, genero, contrasenia, direccion);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n public void testAddProduct() {\n }", "void add(Lugar lugar);", "@Test\n public void testAdd() {\n System.out.println(\"testing add\");\n Arithmetic arithmetic = new Arithmetic(); \n \n assertEquals(\"unexpected result of addition\", 8, arithmetic.add(3,5));\n assertEquals(\"unexpected result of addition\", 6, arithmetic.add(0,6));\n assertEquals(\"unexpected result of addition\", -14, arithmetic.add(0,-14));\n assertEquals(\"unexpected result of addition\", 0, arithmetic.add(-5,5));\n assertEquals(\"unexpected result of addition\", -6, arithmetic.add(-12,6));\n \n }", "@Test\r\n public void testAddition() {\n }", "@Test\n public void testAddTablet() {\n System.out.println(\"addTablet\");\n Tablet tb = new Tablet(\"T005\", \"tablet005\", 0,0);\n DBTablet instance = new DBTablet();\n boolean expResult = true;\n boolean result = instance.addTablet(tb);\n assertEquals(expResult, result);\n }", "@Test\n public void testAddPiece() {\n System.out.println(\"addPiece\");\n\n Piece piece = new Piece(PlayerColor.WHITE, 3);\n Player instance = new Player(PlayerColor.WHITE, \"\");\n\n instance.addPiece(piece);\n\n assertTrue(instance.getBagContent().contains(piece));\n }", "@Test\r\n\tpublic void testAdd() {\n\t\tint num1=10;int num2=20;\r\n\t\t\r\n\t\t//Test here:\r\n\t\t//assertEquals(30, ClientMain.add(num1,num2));\r\n\t\t\r\n\t\t\r\n\t}", "@Test(expected = NotRussianWordException.class)\r\n\tpublic void testRussianAdd() throws LanguageSyntaxException {\r\n\t\ttrans.addWord(\"home\", \"house\");\r\n\t}", "@Test\r\n public void testAvlPuu() {\r\n AvlPuu puu = new AvlPuu();\r\n assertEquals(puu.laskeSolmut(), 0);\r\n }", "@Test\n\tpublic void testAdmitirJugadores() {\n\t\tSalaDeJuego sala = new SalaDeJuego(\"sala1\");\n\t\tassertEquals(0, sala.getCantJugadores());\n\t\t//Crea un jugador y lo admite. Consulta por cantidad de jugadores = 1\n\t\tJugador jugador1 = new Jugador(\"Maikcrosoft\", 1);\n\t\tassertTrue(sala.admitirJugador(jugador1));\n\t\tassertEquals(1, sala.getCantJugadores());\n\t\t//Crea un jugador y lo admite. Consulta por cantidad de jugadores = 2\n\t\tJugador jugador2 = new Jugador(\"crosoft\", 2);\n\t\tassertTrue(sala.admitirJugador(jugador2));\n\t\tassertEquals(2, sala.getCantJugadores());\n\t\t//Crea un tercer jugador y lo admite. Consulta por cantidad de jugadores = 3\n\t\tJugador jugador3 = new Jugador(\"soft\", 3);\n\t\tassertTrue(sala.admitirJugador(jugador3));\n\t\tassertEquals(3, sala.getCantJugadores());\n\t\t//Crea un cuarto jugador y lo admite. Consulta por cantidad de jugadores = 4\n\t\tJugador jugador4 = new Jugador(\"croso\", 4);\n\t\tassertTrue(sala.admitirJugador(jugador4));\n\t\tassertEquals(4, sala.getCantJugadores());\n\t\t//Crea un quinto jugador y verifica que lo rechace. \n\t\tJugador jugador5 = new Jugador(\"ikcro\", 5);\n\t\tassertFalse(sala.admitirJugador(jugador5));\n\t}", "@Test\n public void testAdd()\n {\n System.out.println(\"add\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n assertTrue(token.size() == 159);\n }", "public void add(int v, int p){\n \n \n \n }", "@Test(expected = NotEnglishWordException.class)\r\n\tpublic void testEnglishAdd() throws LanguageSyntaxException {\r\n\t\ttrans.addWord(\"дом\", \"домик\");\r\n\t}", "@Test\n void addItem() {\n }", "@Test\n\tpublic void addPointsByListTest(){\n\t}", "@Test\n public void testAddMine() throws Exception {\n Mine.addMine(9, 9);\n assertEquals(\"success\", Mine.addMine(9, 9));\n\n }", "@Test\n\tvoid testAdd() {\n\t\tint result = calculator.add(1,3);//act\n\t\tassertEquals(4,result);//assert//customized the failed message \"Test failed\"\n\t}", "@Test void addIngredientBoundary()\n {\n }", "@Test\n void addItem() {\n\n }", "@Test\n\tpublic void bakersDozenAddTest() {\n\t\tBakersDozen Test = new BakersDozen();\n\t\tPile Result = Test.getHomeCellPile(1);\n\t\tCard card = new Card(1,3);\n\t\tint size = Result.getSize();\n\t\tResult.addCard(card);\n\t\tassertEquals(Result.getSize(), size + 1);\n\t\tassertEquals(Result.topCard(), card);\n\t}", "@Test\n public void addIngredient_DatabaseUpdates(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"addIngredient - Correct Ingredient Name\", \"Flour\", retrieved.getName());\n assertEquals(\"addIngredient - Set Ingredients ID\", returned, retrieved.getKeyID());\n }", "@Test\n\tpublic void testAdd() {\n\t\t\n\t\ttestStructure.add(\"Dog\", 5);\n\t\ttestStructure.add(\"dog\", 1);\n\t\ttestStructure.add(\"dog\", 1);\n\t\ttestStructure.add(\"zebra\", 3);\n\t\ttestStructure.add(\"horse\", 5);\n\n\t\t\n\t\tSystem.out.println(testStructure.showAll());\n\t\tassertEquals(\"[dog: 1, 5\\n, horse: 5\\n, zebra: 3\\n]\", testStructure.showAll().toString());\n\t\t\n\t}", "@Test\r\n\tpublic void testAddSong() {\r\n\t\taLibrary.addItem(song1);\r\n\t\tassertTrue(aLibrary.containsItem(song1));\r\n\t\tassertFalse(aLibrary.containsItem(song2));\r\n\t\tassertTrue(aList.getView().getItems().contains(song1));\r\n\t\tassertFalse(aList.getView().getItems().contains(song2));\r\n\t}", "@Test\n public void addition() {\n\n }", "public void testAltaVehiculo(){\r\n\t}", "@Test\n public void testAddPlayer() {\n System.out.println(\"addPlayer\");\n Player player = new Player(\"New Player\");\n Team team = new Team();\n team.addPlayer(player);\n assertEquals(player, team.getPlayers().get(0));\n }", "@Test\n public void addMovie_test() {\n theater.getMovies().add(\"Love Actually\");\n String expected = \"Love Actually\";\n String actual = theater.getMovies().get(4);\n Assert.assertEquals(expected,actual);\n }", "boolean addEasyGamePlayed();", "@Test\n public void testToevoegen_Nummer() {\n System.out.println(\"toevoegen nummer\");\n nummers.add(nummer);\n instance.toevoegen(nummer);\n ArrayList<Nummer> expResult = nummers;\n ArrayList<Nummer> result = instance.getAlbumNummers();\n assertEquals(expResult, result);\n }", "@Test\n public void canAddBedroomToArrayList() {\n hotel.addBedroom(bedroom1);\n assertEquals(5, hotel.checkNumberOfBedrooms());\n }", "@Test\n @DisplayName(\"Test for add employee to employee arrayList if correct\")\n public void testAddEmployeeTrue(){\n assertEquals(\"test\",department.getEmployees().get(0).getFirstName());\n assertEquals(\"test\",department.getEmployees().get(0).getLastName());\n assertEquals(\"test\",department.getEmployees().get(0).getPersonNumber());\n }", "@Test\n public void testAddCard() {\n d_gameData.getD_playerList().get(1).addCard(GameCard.BLOCKADE);\n assertEquals(true, d_gameData.getD_playerList().get(1).getD_cards().contains(GameCard.BLOCKADE));\n }", "@Test\n public void validAdd1() {\n assertEquals(i3, isl.get(2));\n\n //checks the amount of ingredient 4\n assertEquals(2.39, ((Ingredient) isl.get(3)).amountNeed, 0);\n assertEquals(1.01, ((Ingredient) isl.get(3)).amountHave, 0);\n\n //add an ingredient that is already present in the list\n //the amount should be added to the current amount 2.39 + 0.45 = 2.84\n //ignores the fact that category and unit don't match\n assertFalse(isl.add(new Ingredient(\"vANiLle\", \"niks\", 0.45, 0.69, \"none\")));\n assertEquals(2.84, ((Ingredient) isl.get(3)).amountNeed, 0.00001);\n assertEquals(1.7, ((Ingredient) isl.get(3)).amountHave, 0.00001);\n assertEquals(\"kruiden\", ((Ingredient) isl.get(3)).category);\n assertEquals(Unit.GRAMS, ((Ingredient) isl.get(3)).unit);\n\n //add a new ingredient and check if it's added correctly\n assertTrue(isl.add(new Ingredient(\"cookies\", \"yum\", 3, 4, \"none\")));\n assertEquals(\"cookies\", isl.get(5).name);\n assertEquals(\"yum\", ((Ingredient) isl.get(5)).category);\n assertEquals(3, ((Ingredient) isl.get(5)).amountNeed, 0);\n assertEquals(4, ((Ingredient) isl.get(5)).amountHave, 0);\n assertEquals(Unit.NONE, ((Ingredient) isl.get(5)).unit);\n }", "@Test\n public void getIngredient_CorrectInformation(){\n int returned = testDatabase.addIngredient(ingredient);\n Ingredient retrieved = testDatabase.getIngredient(returned);\n assertEquals(\"getIngredient - Correct Name\", \"Flour\", retrieved.getName());\n assertEquals(\"getIngredient - Correct ID\", returned, retrieved.getKeyID());\n }", "@Test\n\tvoid testAddPlant() {\n\t\tPlant plant = service.addPlant(new Plant(9.0, \"Hibiscus\", \"Skin Benefits\", 22.0, 8, 330.0, \"Shurbs\"));\n\t\tassertEquals(\"Hibiscus\", plant.getName());\n\n\t}", "@Test\n public void testAvaaRuutu() {\n int x = 0;\n int y = 0;\n Peli pjeli = new Peli(new Alue(3, 0));\n pjeli.avaaRuutu(x, y);\n ArrayList[] lista = pjeli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isAvattu());\n assertEquals(false, pjeli.isLahetetty());\n }", "@Test\n public void testAddPassenger() {\n System.out.println(\"addPassenger\");\n Passenger p = new Passenger();\n p.setForename(\"DAVID\");\n p.setSurname(\"DAVIDSON\");\n p.setDOB(new Date(2012-02-02));\n p.setNationality(\"ENGLISH\");\n PassengerHandler instance = new PassengerHandler();\n assertTrue(instance.addPassenger(p));\n }", "public void addSample(Point punto) {\n\t\tthis.punti.add(punto); //non gestisco il ritorno booleano di add volutamente,\n\t\t//semplicemente non sono accettati valori duplicati poichè da quelli \n\t\t//non si otterrebbe una funzione\n\t}", "@Test\r\n public void testAddAnalysis() {\r\n System.out.println(\"addAnalysis\");\r\n Analysis a = new Analysis(BigDecimal.ONE, BigDecimal.ONE, BigDecimal.ONE, null, 1, null, null, 1);\r\n assertEquals(0, w.analysies.size());\r\n w.addAnalysis(a);\r\n assertEquals(1, w.analysies.size());\r\n }", "@Test \r\n\t\r\n\tpublic void ataqueDeMagoSinMagia(){\r\n\t\tPersonaje perso=new Humano();\r\n\t\tEspecialidad mago=new Hechicero();\r\n\t\tperso.setCasta(mago);\r\n\t\tperso.bonificacionDeCasta();\r\n\t\t\r\n\t\tPersonaje enemigo=new Orco();\r\n\t\tEspecialidad guerrero=new Guerrero();\r\n\t\tenemigo.setCasta(guerrero);\r\n\t\tenemigo.bonificacionDeCasta();\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(44,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t//ataque normal\r\n\t\tperso.atacar(enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t// utilizar hechizo\r\n\t\tperso.getCasta().getHechicero().agregarHechizo(\"Engorgio\", new Engorgio());\r\n\t\tperso.getCasta().getHechicero().hechizar(\"Engorgio\",enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(20,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t}", "@Test\n public void testAdd() {\n }", "@Test\n public void testAdd() {\n }", "@Test\n\tpublic void testAddNota2(){\n\t\tej1.addNota(-2);\n\t\tassertTrue(ej1.getNotaMedia() == 0);\n\t}", "@Test\n\t public void testAdd() {\n\t\t TestSuite suite = new TestSuite(RecommendationModelTest.class, AnalysisModelTest.class);\n\t\t TestResult result = new TestResult();\n\t\t suite.run(result);\n\t\t System.out.println(\"Number of test cases = \" + result.runCount());\n\n\t }", "@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}", "@Test\n public void testAddItem() throws Exception {\n System.out.println(\"addItem\");\n Orcamentoitem orcItem = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n instance.addItem(orcItem);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testAddPoints() {\n System.out.println(\"addPoints\");\n int points = ScoreBoard.HARD_DROP_POINTS_PER_ROW * 4 + ScoreBoard.POINTS_PER_LINE;\n instance.addPoints(points);\n int result = instance.getPoints();\n int expResult = 108;\n assertEquals(result, expResult);\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}", "@Test\r\n public void testAddAndGetPoints() {\r\n Player player = new Player();\r\n int expResult = 0;\r\n int result = player.getPoints();\r\n assertEquals(expResult, result);\r\n \r\n \r\n player.addPoints(10);\r\n int expResult2 = 10;\r\n int result2 = player.getPoints();\r\n assertEquals(expResult2, result2);\r\n\r\n }", "@Test\n public void testAddMedium() throws Exception {\n System.out.println(\"addMedium\");\n String type = \"\";\n Medium pomData = new MediumImpl();\n pomData.addTitle(\"test1\");\n pomData.addTitle(\"test2\");\n DBManager instance = new ODSDBManager(\"empty.ods\");\n List<Medium> expResult = instance.getMedia(\"b\");\n instance.addMedium(\"b\", pomData);\n expResult.add(pomData);\n List<Medium> result = instance.getMedia(\"b\");\n System.out.println(\"result:\"+result+\"\\n data:\"+pomData);\n assertTrue(result.contains(pomData));\n \n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "abstract int add(boolean highsurf, boolean foggy, String eat);", "@Test\n public void testEnchantedChangedWithSongOfTheDryads() {\n // Enchantment Creature — Horror\n // 0/0\n // Bestow {2}{B}{B}\n // Nighthowler and enchanted creature each get +X/+X, where X is the number of creature cards in all graveyards.\n addCard(Zone.HAND, playerA, \"Nighthowler\");\n addCard(Zone.BATTLEFIELD, playerA, \"Swamp\", 4);\n addCard(Zone.BATTLEFIELD, playerA, \"Silvercoat Lion\"); // {1}{W} 2/2 creature\n\n addCard(Zone.GRAVEYARD, playerA, \"Pillarfield Ox\");\n addCard(Zone.GRAVEYARD, playerB, \"Pillarfield Ox\");\n\n // Enchant permanent\n // Enchanted permanent is a colorless Forest land.\n addCard(Zone.BATTLEFIELD, playerB, \"Forest\", 3);\n addCard(Zone.HAND, playerB, \"Song of the Dryads\"); // Enchantment Aura {2}{G}\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Nighthowler using bestow\", \"Silvercoat Lion\");\n\n castSpell(2, PhaseStep.PRECOMBAT_MAIN, playerB, \"Song of the Dryads\", \"Silvercoat Lion\");\n\n setStrictChooseMode(true);\n setStopAt(2, PhaseStep.BEGIN_COMBAT);\n execute();\n\n assertPermanentCount(playerB, \"Song of the Dryads\", 1);\n\n ManaOptions options = playerA.getAvailableManaTest(currentGame);\n Assert.assertEquals(\"Player should be able to create 1 green mana\", \"{G}\", options.getAtIndex(0).toString());\n\n assertPermanentCount(playerA, \"Nighthowler\", 1);\n assertPowerToughness(playerA, \"Nighthowler\", 2, 2);\n assertType(\"Nighthowler\", CardType.CREATURE, true);\n assertType(\"Nighthowler\", CardType.ENCHANTMENT, true);\n\n Permanent nighthowler = getPermanent(\"Nighthowler\");\n Assert.assertFalse(\"The unattached Nighthowler may not have the aura subtype.\", nighthowler.hasSubtype(SubType.AURA, currentGame));\n }", "@Test\n public void testAdd(){\n }", "private void add() {\n\n\t}", "@Test\n public void testAlunPainotus() {\n Scanner l;\n ByteArrayInputStream bais = new ByteArrayInputStream(\"sana\\nvastine\\n\".getBytes());\n l = new Scanner(bais);\n KyselyLogiikka k = new KyselyLogiikka(l);\n ArrayList<KysSana> a = new ArrayList<KysSana>();\n a.add(new KysSana(\"sana\", \"vastine\"));\n\n String kysymys = k.alunPainotus(true);\n\n\n assertEquals(\"AlunPainoitus ei toimi\", \"sana\", kysymys);\n }", "@Test\n public void addTest(){\n \n Assert.assertTrue(p1.getName().equals(\"banana\"));\n Assert.assertTrue(c1.getEmail().equals(\"[email protected]\"));\n \n }", "@Test// to tell jUnit that method with @Test annotation has to be run. \n\tvoid testAdd() {\n\t\tSystem.out.println(\"Before assumption method: Add Method\");\n\t\tboolean isServerUp = false;\n\t\tassumeTrue(isServerUp,\"If this method ran without skipping, my assumption is right\"); //Eg: This is used in occasions like run only when server is up.\n\t\t\n\t\tint expected = 2;\n\t\tint actual = mathUtils.add(0, 2);\n\t\t//\t\tassertEquals(expected, actual);\n\t\t// can add a string message to log \n\t\tassertEquals(expected, actual,\"add method mathUtils\");\n\t}", "@Test\n public void addIngredient_ReturnsID(){\n int returned = testDatabase.addIngredient(ingredient);\n assertNotEquals(\"addIngredients - Returns True\",-1, returned);\n }", "@Test\r\n public void testOnkoSama() {\r\n System.out.println(\"onkoSama\");\r\n Pala toinenpala = null;\r\n Pala instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.onkoSama(toinenpala);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testAdd(){\n DogHouse testDogHouseAdd = new DogHouse();\n Integer expected = 1;\n\n Dog newDog = new Dog (\"Scully\", new Date(), 1);\n testDogHouseAdd.add(newDog);\n\n Integer actual = testDogHouseAdd.getNumberOfDogs();\n\n Assert.assertEquals(expected, actual);\n }", "@Test\n\tpublic void testAllowIntakeOfAHomelessPet() {\n\t\tVirtualPetShelter testPetShelter = new VirtualPetShelter(); //eclipse ask me to create addPet in VPS\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\ttestPetShelter.addPet(new String(), new VirtualPet(\"Rusty\", \"He doesn't get hungry, he's Dead!\", 0, 0, 0));\n\t\tAssert.assertEquals(1, testPetShelter.getVirtualPets().size()); // I test # of values (pets) in collection\n\t}", "@Test\r\n public void testAdd() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n System.out.println(entry1.toString());\r\n // Initial state\r\n assertEquals(0, instance.size());\r\n assertFalse(instance.contains(entry1));\r\n\r\n instance.add(entry1);\r\n\r\n // Test general case (size)\r\n assertEquals(1, instance.size());\r\n\r\n // Test general case (content)\r\n assertTrue(instance.contains(entry1));\r\n\r\n // Test combined quantity case\r\n // Test that matching ignores letter case\r\n// int initialQuantity = entry1.getQuantity();\r\n int diff = 1;\r\n// int newQuantity = initialQuantity + diff;\r\n Grocery duplicate = new Grocery(entry1.getName().toLowerCase(),\r\n entry1.getCategory());\r\n duplicate.setQuantity(diff);\r\n instance.add(duplicate);\r\n System.out.println(instance.toString());\r\n // and ? do we test anything here?\r\n }", "@Test\n public void testLukitseRuutu() {\n System.out.println(\"lukitseRuutu\");\n int x = 0;\n int y = 0;\n Peli peli = new Peli(new Alue(3, 1));\n peli.lukitseRuutu(x, y);\n ArrayList[] lista = peli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isLukittu());\n }", "@Test\n public void insertarAerolineaEnArrayList() {\n int tamanio = AerolineasControlador.listaAerolineas.size();\n Aerolinea aerolinea = new Aerolinea(\"47FS\",\"Air Europa\",\"70\",\"MAdrid\",\"4672339U\");\n AerolineasControlador.listaAerolineas.add(aerolinea);\n assertEquals(tamanio + 1,AerolineasControlador.listaAerolineas.size());\n }", "@Test\n public void testAddAndGetSuperpower() throws Exception {\n Superpower sp = new Superpower();\n sp.setSuperPowerName(\"Ice Power\");\n sp.setSuperPowerDescription(\"Control the elements of ice\");\n \n Superpower fromDb = dao.addSuperpower(sp);\n \n assertEquals(sp, fromDb);\n \n }", "@Test\n public void testToevoegen_Album() {\n System.out.println(\"toevoegen album\");\n Album album = new Album(\"Album\", 2020, nummers);\n instance.toevoegen(album);\n ArrayList<Nummer> expResult = nummers;\n ArrayList<Nummer> result = instance.getAlbumNummers();\n assertEquals(expResult, result);\n }", "@Test\n public void testAddMaterialMultipleMaterial() {\n String[] materials = new String[]{\"material1\", \"material2\", \"material3\"};\n\n for (int i = 0; i < materials.length; i++) {\n planned.addMaterials(materials[i]);\n }\n\n assertEquals(planned.getMaterials().size(), materials.length);\n\n for (int i = 0; i < materials.length; i++) {\n assertTrue(planned.getMaterials().contains(materials[i]));\n }\n\n }", "@Test public void addPentagonalPyramid()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n PentagonalPyramid p = new PentagonalPyramid(\"new\", 10, 6);\n pList.addPentagonalPyramid(\"new\", 10, 6);\n PentagonalPyramid[] pA = pList.getList();\n Assert.assertEquals(\"addPentagonal Test\", p, pA[3]);\n }" ]
[ "0.66165525", "0.6595527", "0.65768206", "0.6399632", "0.6148594", "0.61375827", "0.61108774", "0.6102696", "0.60954756", "0.6074089", "0.6054397", "0.6030176", "0.5985823", "0.5978737", "0.59345865", "0.5934429", "0.59281677", "0.59126204", "0.5896571", "0.58679587", "0.5830522", "0.5827553", "0.58181787", "0.58180255", "0.5817542", "0.5804243", "0.5795335", "0.5793554", "0.57768065", "0.5771065", "0.57673216", "0.5762458", "0.5757181", "0.5742093", "0.57238257", "0.57207483", "0.56881535", "0.5683651", "0.5682729", "0.5652322", "0.565008", "0.56466734", "0.56455046", "0.56343794", "0.56296045", "0.56292164", "0.56230164", "0.5621266", "0.5606765", "0.55825454", "0.55816096", "0.5581385", "0.55806327", "0.55792195", "0.5573246", "0.55701965", "0.5569498", "0.55647504", "0.5564261", "0.5563698", "0.5561742", "0.5547687", "0.5547074", "0.5539347", "0.55392957", "0.5537852", "0.5535598", "0.5526095", "0.55236137", "0.55144835", "0.5514429", "0.55120414", "0.5506569", "0.5506569", "0.5501026", "0.54988813", "0.5493026", "0.54912055", "0.54842234", "0.5484036", "0.5480532", "0.5475576", "0.54701096", "0.54694664", "0.5469187", "0.54636335", "0.5463107", "0.54629964", "0.5458959", "0.5451998", "0.5449774", "0.5449725", "0.5445674", "0.54438764", "0.54396063", "0.5438179", "0.54365844", "0.5434446", "0.542755", "0.5423734" ]
0.8105543
0
Test of deletePengguna method, of class DaftarPengguna.
@Test public void testDeletePengguna() throws Exception { System.out.println("deletePengguna"); Long id = null; DaftarPengguna instance = new DaftarPengguna(); instance.deletePengguna(id); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void deleteIngredient_Deletes(){\n int returned = testDatabase.addIngredient(ingredient);\n testDatabase.deleteIngredient(returned);\n assertEquals(\"deleteIngredient - Deletes From Database\",null, testDatabase.getIngredient(returned));\n }", "@Test\n\tpublic void testDelete(){\n\t}", "@Test\n void deleteSuccess() {\n dao.delete(dao.getById(3));\n assertNull(dao.getById(3));\n }", "@Test\n public void deletePerroTest() {\n PerroEntity entity = Perrodata.get(2);\n perroLogic.deletePerro(entity.getId());\n PerroEntity deleted = em.find(PerroEntity.class, entity.getId());\n Assert.assertNull(deleted);\n }", "@Test\n void deleteSuccess() {\n dao.delete(dao.getById(2));\n assertNull(dao.getById(2));\n }", "@Test\n public void deleteQuejaTest() {\n QuejaEntity entity = data.get(0);\n quejaPersistence.delete(entity.getId());\n QuejaEntity deleted = em.find(QuejaEntity.class, entity.getId());\n Assert.assertNull(deleted);\n }", "@Test\r\n\tpublic void testDelete() {\n\t\tint todos = modelo.getAll().size();\r\n\r\n\t\tassertTrue(modelo.delete(1));\r\n\r\n\t\t// comprobar que este borrado\r\n\t\tassertNull(modelo.getById(1));\r\n\r\n\t\t// borrar un registro que no existe\r\n\t\tassertFalse(modelo.delete(13));\r\n\t\tassertNull(modelo.getById(13));\r\n\r\n\t\tassertEquals(\"debemos tener un registro menos\", (todos - 1), modelo\r\n\t\t\t\t.getAll().size());\r\n\r\n\t}", "@Test\n void delete() {\n }", "@Test\n void delete() {\n }", "@Test\n public void deleteTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.delete(1);\n Servizio servizio= manager.retriveById(1);\n assertNull(servizio,\"Should return true if delete Servizio\");\n }", "@Test\n public void test5Delete() {\n \n System.out.println(\"Prueba deSpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.delete(\"telecomunicaciones\"),1);\n }", "private static void deleteTest(int no) {\n\t\tboolean result=new CartDao().delete(no);\r\n\t\tif(!result) System.out.println(\"deleteTest fail\");\r\n\t}", "@Test\n public void deleteIngredient_ReturnsTrue(){\n int returned = testDatabase.addIngredient(ingredient);\n assertEquals(\"deleteIngredient - Returns True\",true, testDatabase.deleteIngredient(returned));\n }", "@Test\n void deleteSuccess() {\n genericDao.delete(genericDao.getById(3));\n assertNull(genericDao.getById(3));\n }", "@Test\r\n public void testEliminar() {\r\n System.out.println(\"eliminar\");\r\n Integer idDepto = null;\r\n Departamento instance = new Departamento();\r\n instance.eliminar(idDepto);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n public void delete() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n Tema t2 = new Tema(2, 0, 6, \"GUI\");\n Student s2 = new Student(2,221, \"Pop Ion\",\"[email protected]\",\"prof\");\n Nota n2 = new Nota(2,2,\"prof\", 3, \"cv\");\n repo.save(s2);\n repot.save(t2);\n repon.save(n2);\n repot.delete(2);\n repo.delete(2);\n repon.delete(\"22\");\n assert repo.size() == 1;\n assert repot.size() == 1;\n assert repon.size() == 1;\n }\n catch (ValidationException e){\n }\n }", "@Test\r\n\tpublic void deleteGame() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: deleteGame \r\n\t\tGame game_1 = new tsw.domain.Game();\r\n\t\tservice.deleteGame(game_1);\r\n\t}", "@Test\n void deleteTest() {\n Product product = new Product(\"Apple\", 10, 4);\n shoppingCart.addProducts(product.getName(), product.getPrice(), product.getQuantity());\n //when deletes two apples\n boolean result = shoppingCart.deleteProducts(product.getName(), 2);\n //then basket contains two apples\n int appleNb = shoppingCart.getQuantityOfProduct(\"Apple\");\n assertTrue(result);\n assertEquals(2, appleNb);\n }", "@Test\n\tvoid testDeletePlant() {\n\t\tList<Plant> plant = service.deletePlant(50);\n\t\tassertFalse(plant.isEmpty());\n\t}", "@Test\n public void deleteViajeroTest() {\n ViajeroEntity entity = data.get(0);\n vp.delete(entity.getId());\n ViajeroEntity deleted = em.find(ViajeroEntity.class, entity.getId());\n Assert.assertNull(deleted);\n }", "@Test\n void deleteSuccess() {\n genericDAO.delete(genericDAO.getByID(2));\n assertNull(genericDAO.getByID(2));\n }", "@Test\r\n\tpublic void checkDeleteTest() {\n\t\tassertFalse(boardService.getGameRules().checkDelete(board.field[13][13])); \r\n\t}", "@Test\n public void deleteRecipe_Deletes(){\n int returned = testDatabase.addRecipe(testRecipe);\n testDatabase.deleteRecipe(returned);\n assertEquals(\"deleteRecipe - Deletes From Database\", null, testDatabase.getRecipe(returned));\n }", "@Test\r\n public void testDelete() {\r\n System.out.println(\"delete\");\r\n String doc = \"\";\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n boolean expResult = false;\r\n boolean result = instance.delete(doc);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n void deleteSuccess() {\n\n UserDOA userDao = new UserDOA();\n User user = userDao.getById(1);\n String orderDescription = \"February Large Test-Tshirt Delete\";\n\n Order newOrder = new Order(orderDescription, user, \"February\");\n user.addOrder(newOrder);\n\n dao.delete(newOrder);\n List<Order> orders = dao.getByPropertyLike(\"description\", \"February Large Test-Tshirt Delete\");\n assertEquals(0, orders.size());\n }", "@Test\r\n public void testDelete() throws PAException {\r\n Ii spIi = IiConverter.convertToStudyProtocolIi(TestSchema.studyProtocolIds.get(0));\r\n List<StudyDiseaseDTO> dtoList = bean.getByStudyProtocol(spIi);\r\n int oldSize = dtoList.size();\r\n Ii ii = dtoList.get(0).getIdentifier();\r\n bean.delete(ii);\r\n dtoList = bean.getByStudyProtocol(spIi);\r\n assertEquals(oldSize - 1, dtoList.size());\r\n }", "@Test\n public void deleteTarjetaPrepagoTest() throws BusinessLogicException \n {\n TarjetaPrepagoEntity entity = data.get(2);\n tarjetaPrepagoLogic.deleteTarjetaPrepago(entity.getId());\n TarjetaPrepagoEntity deleted = em.find(TarjetaPrepagoEntity.class, entity.getId());\n Assert.assertNull(deleted);\n }", "@Test\r\n public void testDelete() throws Exception {\r\n bank.removePerson(p2);\r\n assertEquals(bank.viewAllPersons().size(), 1);\r\n assertEquals(bank.viewAllAccounts().size(), 1);\r\n }", "@Test\n void deleteItem() {\n }", "@Test\r\n public void testDelete() {\r\n System.out.println(\"delete\");\r\n String isbn = \"1222111131\";\r\n int expResult = 1;\r\n int result = TitleDao.delete(isbn);\r\n assertEquals(expResult, result);\r\n }", "public void testDelete() {\n\t\ttry {\n\t\t\tServerParameterTDG.create();\n\n\t\t\t// insert\n\t\t\tServerParameterTDG.insert(\"paramName\", \"A description\", \"A value\");\n\t\t\t// delete\n\t\t\tassertEquals(1, ServerParameterTDG.delete(\"paramName\"));\n\t\t\t\t\n\t\t\tServerParameterTDG.drop();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.drop();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void deleteRecipeIngredient_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedIngredient = testDatabase.addRecipeIngredient(recipeIngredient);\n testDatabase.deleteRecipeIngredients(returnedIngredient);\n ArrayList<RecipeIngredient> allIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n boolean deleted = true;\n if(allIngredients != null){\n for(int i = 0; i < allIngredients.size(); i++){\n if(allIngredients.get(i).getIngredientID() == returnedIngredient){\n deleted = false;\n }\n }\n }\n assertEquals(\"deleteRecipeIngredient - Deletes From Database\", true, deleted);\n }", "public boolean deletePalvelupisteet();", "@Test\n public void deleteDoctor() {\n\t\tList<Doctor> doctors = drepository.findByName(\"Katri Halonen\");\n\t\tassertThat(doctors).hasSize(1);\n \tdrepository.deleteById((long) 3);\n \tdoctors = drepository.findByName(\"Katri Halonen\");\n \tassertThat(doctors).hasSize(0);\n }", "@Test\n void deletePermanentlyTest() {\n Product product = new Product(\"Apple\", 10, 4);\n shoppingCart.addProducts(product.getName(), product.getPrice(), product.getQuantity());\n //when deletes four apples\n boolean result = shoppingCart.deleteProducts(product.getName(), 4);\n //then basket does not contain any apple\n int appleNb = shoppingCart.getQuantityOfProduct(\"Apple\");\n assertTrue(result);\n assertEquals(0, appleNb);\n }", "@Test\n public void testDelete() {\n System.out.println(\"delete\");\n String guestIDnumber = \"test\";\n BookingController instance = new BookingController();\n boolean expResult = true;\n boolean result = instance.delete(guestIDnumber);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n }", "@Test\n void deleteSuccess() {\n carDao.delete(carDao.getById(1));\n assertNull(carDao.getById(1));\n\n //Delete repairs\n GenericDao<Repair> repairDao = new GenericDao(Repair.class);\n Repair repair = repairDao.getById(2);\n assertNull(carDao.getById(2));\n\n //Delete part\n GenericDao<Part> partDao = new GenericDao(Part.class);\n Role part = partDao.getById(2);\n assertNull(partDao.getById(2));\n }", "public void testDelete() {\r\n\r\n\t\ttry {\r\n\t\t\tlong count, newCount, diff = 0;\r\n\t\t\tcount = levelOfCourtService.getCount();\r\n\t\t\tLevelOfCourt levelOfCourt = (LevelOfCourt) levelOfCourtTestDataFactory\r\n\t\t\t\t\t.loadOneRecord();\r\n\t\t\tlevelOfCourtService.delete(levelOfCourt);\r\n\t\t\tnewCount = levelOfCourtService.getCount();\r\n\t\t\tdiff = newCount - count;\r\n\t\t\tassertEquals(diff, 1);\r\n\t\t} catch (Exception e) {\r\n\t\t\tfail(e.getMessage());\r\n\t\t}\r\n\t}", "@Test\n public void testDeletePlaylist(){\n Playlist playlist = new Playlist();\n playlist.setId(ID);\n playlist.setGenre(GENRE);\n playlist.setDescription(DESCRIPTION);\n ReturnValue ret = Solution.deletePlaylist(playlist);\n assertEquals(NOT_EXISTS, ret);\n ret = Solution.addPlaylist(playlist);\n assertEquals(OK, ret);\n Playlist retrieved = Solution.getPlaylist(ID);\n assertEquals(playlist, retrieved);\n ret = Solution.deletePlaylist(playlist);\n assertEquals(OK, ret);\n retrieved = Solution.getPlaylist(ID);\n assertEquals(Playlist.badPlaylist(), retrieved);\n }", "@SmallTest\n public void testDelete() {\n int result = -1;\n if (this.entity != null) {\n result = (int) this.adapter.remove(this.entity.getId());\n Assert.assertTrue(result >= 0);\n }\n }", "@Test\n public void testDeleteGetAll() {\n lib.addDVD(dvd1);\n lib.addDVD(dvd2);\n \n lib.deleteDVD(0);\n \n Assert.assertEquals(1, lib.getDVDLibrary().size());\n }", "@Test\n void delete() {\n petTypeSDJpaService.delete(petType);\n\n //Then\n verify(petTypeRepository).delete(petType);\n }", "@Test\n public void testDeleteProductShouldCorrect() throws Exception {\n // Mock method\n when(productRepository.findOne(product.getId())).thenReturn(product);\n doNothing().when(productRepository).delete(product);\n\n testResponseData(RequestInfo.builder()\n .request(delete(PRODUCT_DETAIL_ENDPOINT, product.getId()))\n .token(adminToken)\n .httpStatus(HttpStatus.OK)\n .build());\n }", "@Test\r\n public void testDelete() {\r\n assertTrue(false);\r\n }", "@Test\n public void deleteEspecieTest() throws BusinessLogicException {\n EspecieEntity entity = especieData.get(1);\n System.out.println(entity.getId());\n System.out.println(entity.getRazas().size());\n especieLogic.deleteEspecie(entity.getId());\n EspecieEntity deleted = em.find(EspecieEntity.class, entity.getId());\n Assert.assertTrue(deleted.getDeleted());\n }", "@Test\n void deleteNoteSuccess() {\n noteDao.delete(noteDao.getById(2));\n assertNull(noteDao.getById(2));\n }", "@Test\n void deleteById() {\n petTypeSDJpaService.deleteById(petType.getId());\n\n //Then\n verify(petTypeRepository).deleteById(petType.getId());\n }", "@Test\n final void testDeleteDevice() {\n when(deviceDao.deleteDevice(user, DeviceFixture.SERIAL_NUMBER)).thenReturn(Long.valueOf(1));\n ResponseEntity<String> response = deviceController.deleteDevice(DeviceFixture.SERIAL_NUMBER);\n assertEquals(200, response.getStatusCodeValue());\n assertEquals(\"Device with serial number 1 deleted\", response.getBody());\n }", "@Test\n public void deleteVisitaTest() {\n VisitaEntity entity = data.get(0);\n VisitaPersistence.delete(entity.getId());\n VisitaEntity deleted = em.find(VisitaEntity.class, entity.getId());\n Assert.assertNull(deleted);\n }", "@Test\n\t public void testDelete(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t doAnswer(new Answer() {\n\t\t\t \t public Object answer(InvocationOnMock invocation) {\n\t\t\t \t Object[] args = invocation.getArguments();\n\t\t\t \t EntityManager mock = (EntityManager) invocation.getMock();\n\t\t\t \t return null;\n\t\t\t \t }\n\t\t\t \t }).when(entityManager).remove(user);\n\t\t\t\tuserDao.delete(user);\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing delete:.\",se);\n\t\t }\n\t }", "@Override\r\n\tpublic void delete(Plant plant) throws Exception {\n\r\n\t}", "@Test\n public void deleteRecipe_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipe - Returns True\",true, testDatabase.deleteRecipe(returned));\n\n }", "@Test\n @Ignore\n public void testDelete_Identifier() throws Exception {\n System.out.println(\"delete\");\n Index entity = TestUtils.getTestIndex();\n Identifier identifier = entity.getId();\n instance.create(entity);\n assertTrue(instance.exists(identifier));\n instance.delete(identifier);\n assertFalse(instance.exists(identifier));\n }", "@Test\n public void testDeleteMember() throws Exception {\n }", "@Test\r\n public void deleteSalaTest() throws BusinessLogicException \r\n {\r\n //SalaEntity deleted = em.find(SalaEntity.class, data.get(0));\r\n //salaLogic.deleteSala(deleted.getId());\r\n //Assert.assertNull(salaLogic.getSala(deleted.getId()));\r\n Assert.assertNull(null);\r\n }", "@Test\r\n\tvoid testdeleteProductFromCart() throws Exception\r\n\t{\r\n\t\tCart cart=new Cart();\r\n\t\tcart.setProductId(1001);\r\n\t\tcartdao.addProductToCart(cart);\r\n\t\tList<Cart> l=cartdao.findAllProductsInCart();\r\n\t\tcart=cartdao.deleteProductByIdInCart(1001);\r\n\t\tassertEquals(1,l.size());\r\n\t}", "int deleteByExample(PruebaExample example);", "private void delete() {\n\n\t}", "@Test\n\tpublic void testDelete() {\n\t\t\n\t\tLong id = 4L;\n\t\tString cpr = \"271190-0000\";\n\t\tint kr = 100;\n\t\tString dato = \"01-01-2001\";\n\t\tString type = \"type2\";\n\n\t\tYdelse y = new Ydelse(id, cpr, kr, dato, type);\n\t\t\n\t\tdoReturn(y).when(entityManager).getReference(y.getClass(), y.getId());\n\t\t\n\t\tydelseService.delete(y.getClass(), id);\n\t}", "int deleteByExample(ActivityHongbaoPrizeExample example);", "@Test\n public void deleteCategory_Deletes(){\n int returned = testDatabase.addCategory(category);\n testDatabase.deleteCategory(returned);\n assertEquals(\"deleteCategory - Deletes From Database\", null, testDatabase.getCategory(returned));\n }", "int deleteByExample(DashboardGoodsExample example);", "void deleteAveria(Long idAveria) throws BusinessException;", "@Test\r\n public void testEliminar() {\r\n System.out.println(\"eliminar\");\r\n Integer idUsuario = null;\r\n Usuario instance = new Usuario();\r\n instance.eliminar(idUsuario);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Override\n\tpublic void delete(Pessoa arg0) {\n\t\t\n\t}", "void deleteMataKuliah (int id);", "@Test\n\t public void testDeleteEntity(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t doAnswer(new Answer() {\n\t\t\t \t public Object answer(InvocationOnMock invocation) {\n\t\t\t \t Object[] args = invocation.getArguments();\n\t\t\t \t EntityManager mock = (EntityManager) invocation.getMock();\n\t\t\t \t return null;\n\t\t\t \t }\n\t\t\t \t }).when(entityManager).remove(entityManager.getReference(Users.class,\n\t\t\t \t \t\tuser.getLoginName()));\n\t\t\t\tuserDao.delete(user.getLoginName(),user);\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing delete:.\",se);\n\t\t }\n\t }", "@Test\r\n public void testDeleteById() {\r\n System.out.println(\"deleteById\");\r\n int id = 0;\r\n AbonentDAL instance = new AbonentDAL();\r\n Abonent expResult = null;\r\n Abonent result = instance.deleteById(id);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void deleteRecipeIngredient_ReturnsTrue(){\n int returned = testDatabase.addRecipe(testRecipe);\n assertEquals(\"deleteRecipeIngredient - Returns True\",true, testDatabase.deleteRecipeIngredients(returned));\n }", "int deleteByExample(KaiwaExample example);", "@Test\n public void deleteContact() {\n }", "public void testDelete() {\n TDelete_Return[] Basket_delete_out = basketService.delete(new String[] { BasketPath });\n assertNoError(Basket_delete_out[0].getError());\n }", "@Test\n public void testDelete()throws Exception {\n System.out.println(\"delete\");\n String query= \"delete from librarian where id=?\";\n int id = 15;\n int expResult = 0;\n //when(mockDb.getConnection()).thenReturn(mockConn);\n when(mockConn.prepareStatement(query)).thenReturn(mockPs);\n when(mockPs.executeUpdate()).thenReturn(1);\n int result = mockLibrarian.delete(id);\n assertEquals(result>0 , true);\n \n \n }", "int deleteByExample(Lbm83ChohyokanriPkeyExample example);", "@Test\n\tpublic void testEliminarJugadores() {\n\t\tSalaDeJuego sala = new SalaDeJuego(\"sala1\");\n\t\tassertEquals(0, sala.getCantJugadores());\n\t\t//Crea un jugador y lo admite. Consulta por cantidad de jugadores = 1\n\t\tJugador jugador1 = new Jugador(\"Maikcrosoft\", 1);\n\t\tsala.admitirJugador(jugador1);\n\t\tassertEquals(1, sala.getCantJugadores());\n\t\t//Crea un jugador y lo admite. Consulta por cantidad de jugadores = 2\n\t\tJugador jugador2 = new Jugador(\"crosoft\", 2);\n\t\tsala.admitirJugador(jugador2);\n\t\tassertEquals(2, sala.getCantJugadores());\n\t\t//Elimina al primer jugador, verifica que la cantidad de jugadores = 1\n\t\tsala.eliminarJugador(jugador1);\n\t\tassertEquals(1, sala.getCantJugadores());\n\t\t//Elimina al primer jugador, verifica que la cantidad de jugadores = 0\n\t\tsala.eliminarJugador(jugador2);\n\t\tassertEquals(0, sala.getCantJugadores());\n\t}", "@Test\n\tpublic void testSupprimer() {\n\t\tprofesseurServiceEmp.supprimer(prof);\n\t}", "@Test\n public void testDelete() throws Exception {\n System.out.println(\"delete\");\n Connection con = ConnexionMySQL.newConnexion();\n int size = Inscription.size(con);\n Timestamp timestamp = stringToTimestamp(\"2020/01/17 08:40:00\");\n Inscription result = Inscription.create(con, \"[email protected]\", timestamp);\n assertEquals(size + 1, Inscription.size(con));\n result.delete(con);\n assertEquals(size, Inscription.size(con));\n }", "@Test\n\tpublic void testDeleteMedicine() {\n\t\tMedicine medicine=new Medicine();\n\t\tmedicine.setMedicineName(\"neorin\");\n\t\tmedicine.setstocks(0);\n\t\tmedicineService.addMedicine(medicine.getMedicineName(),medicine.getStocks());\n\t\tString medicineName=medicine.getMedicineName();\n\t\tint medicineId=medicine.getMedicineId();\n\t\tmedicineService.deleteMedicineDetails(medicineId);\n\t\tassertEquals(0, medicineService.searchMedicine(medicineName).size());\n\t}", "private Delete() {}", "private Delete() {}", "@Test\n void deleteList() {\n }", "int deleteByExample(UserPonumberGoodsExample example);", "int deleteByExample(LtsprojectpoExample example);", "int deleteByExample(GoodexistsingleExample example);", "@Test\n\tpublic void eliminar() {\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\tint tamañoAnterior = gestionarComicPOJO.getListaComics().size();\n\t\tgestionarComicPOJO.eliminarComicDTO(\"1\");\n\t\tAssert.assertEquals(gestionarComicPOJO.getListaComics().size(), tamañoAnterior - 1);\n\t}", "@Test\n public void testUpdateDelete() {\n\n Fichier fichier = new Fichier(\"\", \"test.java\", new Date(), new Date());\n Raccourci raccourci = new Raccourci(fichier, \"shortcut vers test.java\", new Date(), new Date(), \"\");\n\n assertTrue(GestionnaireRaccourcis.getInstance().getRaccourcis().contains(raccourci));\n\n fichier.delete();\n\n assertFalse(GestionnaireRaccourcis.getInstance().getRaccourcis().contains(raccourci));\n }", "@Test\n public void testSupprimerPays() {\n System.out.println(\"supprimerPays\");\n d1.ajouterPays(p1);\n d1.ajouterPays(p2);\n d1.supprimerPays(p1);\n assertEquals(1, d1.getMyListePays().size());\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "int deleteByExample(NjProductTaticsRelationExample example);", "@Override\npublic int delete(Department department) {\n\treturn 0;\n}", "int deleteByExample(TCpySpouseExample example);", "int deleteByExample(EnfermedadExample example);", "@Test\n public void deleteTest(){\n given().pathParam(\"id\",1)\n .when().delete(\"/posts/{id}\")\n .then().statusCode(200);\n }", "public void delete()\n {\n call(\"Delete\");\n }", "@Test\r\n public void testDelete() throws Exception {\r\n System.out.println(\"delete\");\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n obj = instance.create(obj);\r\n instance.delete(obj);\r\n try {\r\n instance.read(obj.getIdbur());\r\n fail(\"exception de record introuvable non générée\");\r\n }\r\n catch(SQLException e){}\r\n //TODO vérifier qu'on a bien une exception en cas de record parent de clé étrangère\r\n }", "@Test\r\n public void deleteCarritoDeComprasTest() {\r\n System.out.println(\"d entra\"+data);\r\n CarritoDeComprasEntity entity = data.get(0);\r\n carritoDeComprasPersistence.delete(entity.getId());\r\n CarritoDeComprasEntity deleted = em.find(CarritoDeComprasEntity.class, entity.getId());\r\n Assert.assertNull(deleted);\r\n System.out.println(\"d voy\"+data);\r\n }", "public void delete() {\n\n\t}", "@Test\r\n\tpublic void testExecuteCommandsDeleteAdl() throws Exception {\r\n\t\t\r\n\t\tadvertising.executeCommand(advertising, \"adl delete --Name L1-r-medical\");\r\n\t\tassertTrue(\"adc all\", true);\r\n\t\t\r\n\t}", "@Test\n public void deleteIngredient_ReturnsFalse(){\n assertEquals(\"deleteIngredient - Returns False\",false, testDatabase.deleteIngredient(Integer.MAX_VALUE));\n }", "int deleteByExample(Lbt72TesuryoSumDPkeyExample example);", "public void testDelete() {\n TDelete_Return[] PriceLists_delete_out = priceListService.delete(new String[] { path + alias });\n\n // test if deletion was successful\n assertEquals(\"delete result set\", 1, PriceLists_delete_out.length);\n\n TDelete_Return PriceList_delete_out = PriceLists_delete_out[0];\n\n assertNoError(PriceList_delete_out.getError());\n\n assertEquals(\"deleted?\", true, PriceList_delete_out.getDeleted());\n }" ]
[ "0.719666", "0.7133315", "0.70919687", "0.70537066", "0.70302373", "0.70205796", "0.6992391", "0.6991858", "0.6991858", "0.69591314", "0.6913932", "0.6900341", "0.68933743", "0.6879102", "0.6854431", "0.68416953", "0.6837936", "0.6835973", "0.6831597", "0.6815615", "0.6814517", "0.6810912", "0.6792999", "0.67852294", "0.6780368", "0.67756283", "0.6768196", "0.6758319", "0.6755095", "0.67443246", "0.6721281", "0.67102903", "0.67038697", "0.6696474", "0.6694315", "0.66915625", "0.66910595", "0.66893953", "0.66822004", "0.6680343", "0.6669706", "0.66673404", "0.6652131", "0.6650901", "0.66349596", "0.6600293", "0.6592952", "0.6587856", "0.6586079", "0.6582951", "0.6570359", "0.6565244", "0.6563631", "0.6562577", "0.65597236", "0.65572417", "0.65549207", "0.65526915", "0.65465206", "0.65348935", "0.6532378", "0.651968", "0.6516232", "0.6513844", "0.65135705", "0.649725", "0.64971274", "0.6495973", "0.6493546", "0.6492207", "0.6487621", "0.6481059", "0.64807785", "0.6480535", "0.6473101", "0.64725435", "0.6461038", "0.64590895", "0.6448522", "0.6448522", "0.6445686", "0.6445273", "0.64418966", "0.6437398", "0.64334816", "0.6427309", "0.64267457", "0.6423977", "0.6413351", "0.6411009", "0.64102876", "0.6409546", "0.6408938", "0.6404886", "0.6403672", "0.6402696", "0.6401557", "0.6399363", "0.639381", "0.6383068" ]
0.86849326
0
Test of getEmf method, of class DaftarPengguna.
@Test public void testGetEmf() { System.out.println("getEmf"); DaftarPengguna instance = new DaftarPengguna(); EntityManagerFactory expResult = null; EntityManagerFactory result = instance.getEmf(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testSetEmf() {\n System.out.println(\"setEmf\");\n EntityManagerFactory emf = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.setEmf(emf);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testExistingEmf() {\r\n debug(\"testExistingEmf\");\r\n this.emf = initialEmf; \r\n super.testGettingEntityManager();\r\n super.testPersisting();\r\n super.testFinding();\r\n super.testQuerying();\r\n super.testGettingMetamodel();\r\n this.emf = null; \r\n }", "@Test\n\t@Ignore // now covered by OutOfSequenceData LM\n\tpublic void testFEDparsing() throws URISyntaxException {\n\t\tDAQ snapshot = getSnapshot(\"1493263275021.smile\");\n\n\t\tassertSatisfiedLogicModules ( snapshot,legacyFc1);\n\n\t\tSystem.out.println(legacyFc1.getDescriptionWithContext());\n\t\tSystem.out.println(legacyFc1.getActionWithContext());\n\n\t\tContextHandler context = legacyFc1.getContextHandler();\n\t\tassertEquals(new HashSet(Arrays.asList(\"622\")), context.getContext().get(\"PROBLEM-FED\"));\n\t\tassertEquals(new HashSet(Arrays.asList(\"ECAL\")), context.getContext().get(\"PROBLEM-SUBSYSTEM\"));\n\t\tassertEquals(new HashSet(Arrays.asList(\"EB-\")), context.getContext().get(\"PROBLEM-PARTITION\"));\n\n\t\tassertEquals(\"ECAL\",context.getActionKey());\n\t\tassertEquals(3,legacyFc1.getActionWithContext().size());\n\n\t}", "int getEvd();", "@Test\n public void testGetPengguna() {\n System.out.println(\"getPengguna\");\n String email = \"\";\n String password = \"\";\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.getPengguna(email, password);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void testFEDparsing2() throws URISyntaxException {\n\t\tDAQ snapshot = getSnapshot(\"1480809948643.smile\");\n\n\t\tassertSatisfiedLogicModules ( snapshot,legacyFc1);\n\n\t\tSystem.out.println(legacyFc1.getDescriptionWithContext());\n\t\tSystem.out.println(legacyFc1.getActionWithContext());\n\n\t\tContextHandler context = legacyFc1.getContextHandler();\n\t\tassertEquals(new HashSet(Arrays.asList(\"548\")), context.getContext().get(\"PROBLEM-FED\"));\n\t\tassertEquals(new HashSet(Arrays.asList(\"ES\")), context.getContext().get(\"PROBLEM-SUBSYSTEM\"));\n\t\tassertEquals(new HashSet(Arrays.asList(\"ES+\")), context.getContext().get(\"PROBLEM-PARTITION\"));\n\n\t\tassertEquals(\"ES\",context.getActionKey());\n\t\tassertEquals(3,legacyFc1.getActionWithContext().size());\n\n\t}", "private final void m718m() {\n boolean z;\n akl akl = this.f531p.f603f;\n if (this.f539x) {\n z = true;\n } else {\n z = akl != null && akl.f577a.mo1491f();\n }\n akp akp = this.f533r;\n if (z != akp.f617g) {\n this.f533r = new akp(akp.f611a, akp.f612b, akp.f613c, akp.f614d, akp.f615e, akp.f616f, z, akp.f618h, akp.f619i, akp.f620j, akp.f621k, akp.f622l, akp.f623m);\n }\n }", "public void testgetEfoDescriptionByName() {\n EFOServiceImpl impl = new EFOServiceImpl();\n String match = \"An experimental factor in Array Express which are essentially the variable aspects of an experiment design which can be used to describe an experiment, or set of experiments, in an increasingly detailed manner.\";\n assertEquals(match, impl.getEfoDescriptionByName(\"experimental factor\"));\n }", "@Test\n public void testMediaPesada() {\n System.out.println(\"mediaPesada\");\n int[] energia = null;\n int linhas = 0;\n double nAlpha = 0;\n Double[] expResult = null;\n Double[] resultArray = null;\n double[] result = ProjetoV1.mediaPesada(energia, linhas, nAlpha);\n if (result != null) {\n resultArray = ArrayUtils.converterParaArrayDouble(result);\n }\n\n assertArrayEquals(expResult, resultArray);\n\n }", "@Test\n public void testGetMagnitude() {\n System.out.println(\"getMagnitude\");\n Unit instance = new Unit();\n Magnitude expResult = null;\n Magnitude result = instance.getMagnitude();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void testDeterminizerOnHopcrofExamples() throws Exception {\n\t\tINFA nfa = JailTestUtils.HOP_NFA56();\n\t\tIDFA dfa = JailTestUtils.HOP_DFA63();\n\t\ttestDeterminizer(nfa,dfa);\n\t}", "java.lang.String getFmla();", "@Test\n public void testTransform() {\n File file1=new File(\"testData/testfile.mgf\");\n MgfReader rdr=new MgfReader(file1);\n ArrayList<Spectrum> specs = rdr.readAll();\n System.out.println(\"transform\");\n Spectrum spec = specs.get(0);\n ReciprocalTransform instance = new ReciprocalTransform();\n Spectrum expResult = null;\n Spectrum result = null;//instance.transform(spec);\n assertEquals(result, expResult);\n }", "@Test\n public void testFindPengguna() {\n System.out.println(\"findPengguna\");\n Long id = null;\n DaftarPengguna instance = new DaftarPengguna();\n Pengguna expResult = null;\n Pengguna result = instance.findPengguna(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testAddVathmos() {\n System.out.println(\"addVathmos\");\n Mathima mathima = null;\n String hmeromExetasis = \"\";\n double vathmos = 0.0;\n Foititis instance = new Foititis();\n instance.addVathmos(mathima, hmeromExetasis, vathmos);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Override \r\n public boolean needsEmfService() { return false; }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "public static void feec() {\n\t}", "@Test\n\tpublic void testGetTariefBehandeling(){\n\t\tdouble expResult = 89.50;\n\t\tassertTrue(expResult == instance.getTariefBehandeling());\n\t}", "FeatureCall getFec();", "@LargeTest\n public void testFisheyeApproximateFull() {\n TestAction ta = new TestAction(TestName.FISHEYE_APPROXIMATE_FULL);\n runTest(ta, TestName.FISHEYE_APPROXIMATE_FULL.name());\n }", "@Test\n public void testAlto() {\n System.out.println(\"alto\");\n Camiones instance = new Camiones(\"C088IJ\", true, 10);\n double expResult = 0.0;\n double result = instance.alto();\n \n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\r\n public void testGetSamochod() {\r\n System.out.println(\"getSamochod\");\r\n Faktura instance = new Faktura();\r\n Samochod expResult = null;\r\n Samochod result = instance.getSamochod();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\r\n public void testMedia() {\r\n EstatisticasUmidade e = new EstatisticasUmidade();\r\n e.setValor(5.2);\r\n e.setValor(7.0);\r\n e.setValor(1.3);\r\n e.setValor(6);\r\n e.setValor(0.87);\r\n double result= e.media(1);\r\n assertArrayEquals(\"ESPERA RESULTADO\", 5.2 , result, 0.1);\r\n }", "public ElfTest()\n {\n }", "@Test\n public void getEnergyModifierATest() {\n \n assertEquals(0.6, hawthorn1.getEnergyModifierA(), 0.1);\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "float getEFloat();", "@Test\n public void testGetPenggunas_0args() {\n System.out.println(\"getPenggunas\");\n DaftarPengguna instance = new DaftarPengguna();\n List expResult = null;\n List result = instance.getPenggunas();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testNuevaLr() {\n System.out.println(\"nuevaLr\");\n Alimento a = new Alimento(\"nom1\", \"inst1\", \"tempC1\");\n String uMedida = \"u1\";\n float cantidad = 3.0F;\n Receta instance = new Receta();\n boolean expResult = true;\n boolean result = instance.nuevaLr(a, uMedida, cantidad);\n assertEquals(expResult, result);\n }", "public EMFTestSuite() {\n\t\taddTest(new TestSuite(EMFTestCase.class));\n\t}", "protected Ente getEnteTest()\n\t{\t\t\n\t\ttry{\n\t\t\tEnte ente = new Ente();\n\t\t\tente.setUid(uidEnte);\n\t\t\treturn ente;\n\t\t} catch(NullPointerException npe){\n\t\t\treturn null;\n\t\t}\t\t\n\t}", "@Test\n public void testMediaGlobal() {\n System.out.println(\"mediaGlobal\");\n int[] serieTemp = new int[1];\n int qtdlinhas = 1;\n double expResult = 0.0;\n double result = ProjetoV1.mediaGlobal(serieTemp, qtdlinhas);\n assertEquals(expResult, result, 0.0);\n\n }", "public final void testAeLigature() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException, SolrServerException \n\t{\n\t\tcloseSolrProxy();\n\t\tcreateFreshIx(\"aeoeLigatureTests.mrc\");\n\t\tString fldName = \"title_245a_search\";\n\n\t\t// upper case\n\t\tSet<String> docIds = new HashSet<String>();\n\t\tdocIds.add(\"Ae1\");\n\t\tdocIds.add(\"Ae2\");\n\t\tassertSearchResults(fldName, \"Æon\", docIds);\n\t\tassertSearchResults(fldName, \"Aeon\", docIds);\n\n\t\t// lower case\n\t\tdocIds.clear();\n\t\tdocIds.add(\"ae1\");\n\t\tdocIds.add(\"ae2\");\n\t\tassertSearchResults(fldName, \"Encyclopædia\", docIds);\n\t\tassertSearchResults(fldName, \"Encyclopaedia\", docIds);\n\t}", "@Test\n public void testGetManifestationById() {\n System.out.println(\"getManifestationById\");\n String manifestationId = \"m1\";\n DataDeichmanAdapterMock instance = new DataDeichmanAdapterMock();\n Model expResult = null;\n Model result = instance.getManifestationById(manifestationId);\n assertNotNull(result);\n assertFalse(result.isEmpty());\n }", "@Test\n public void testCalculateMoviePrice2D() {\n\n String roomFormatForMovie = \"2D\";\n float moviePrice = 6.5F;\n CalculateMoviePrice instance = new CalculateMoviePrice();\n float expResult = 5.0F;\n float result = instance.calculateMoviePrice(roomFormatForMovie, moviePrice);\n assertEquals(expResult, result, 0.0);\n System.out.println(\"calculateMoviePrice2D : \"+expResult);\n // TODO review the generated test code and remove the default call to fail.\n if (result != expResult) {\n fail(\"The test case is a prototype.\");\n }\n }", "@Test\n public void test01(){\n Object result = FelEngine.instance.eval(\"5000*12+7500\");\n System.out.println(result);\n }", "@Test\r\n public void testDesvioPadrao() {\r\n EstatisticasUmidade e = new EstatisticasUmidade();\r\n e.setValor(5.2);\r\n e.setValor(7.0);\r\n e.setValor(1.3);\r\n e.setValor(6);\r\n e.setValor(0.87); \r\n \r\n double result= e.media(1);\r\n assertArrayEquals(\"ESPERA RESULTADO\", 5.2 , result, 1.2);\r\n }", "@Test\n\tpublic final void testHardZnak() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException \n\t{\n\t\tassertSingleResult(\"6\", fldName, \"Obʺedinenie\");\n\t\tassertSingleResult(\"6\", fldName, \"Obedinenie\");\n\t\t// i have no idea if these should work, or how it should look here\n//\t\tassertSingleDocWithValue(\"6\", fldName, \"Oъedinenie\");\n//\t\tassertSingleDocWithValue(\"6\", fldName, \"Obъedinenie\");\n\t}", "@LargeTest\n public void testFisheyeApproximateRelaxed() {\n TestAction ta = new TestAction(TestName.FISHEYE_APPROXIMATE_RELAXED);\n runTest(ta, TestName.FISHEYE_APPROXIMATE_RELAXED.name());\n }", "@Test\n public void testMediaMovelSimples() {\n System.out.println(\"MediaMovelSimples\");\n int[] energia = null;\n int linhas = 0;\n double n = 0;\n Double[] expResult = null;\n Double[] resultArray = null;\n double[] result = ProjetoV1.MediaMovelSimples(energia, linhas, n);\n if (resultArray != null) {\n resultArray = ArrayUtils.converterParaArrayDouble(result);\n }\n assertArrayEquals(expResult, resultArray);\n\n }", "@Test\n public void testGetManifestationList() {\n System.out.println(\"getManifestationList\");\n DataDeichmanAdapterMock instance = new DataDeichmanAdapterMock();\n Model expResult = null;\n Model result = instance.getManifestationList();\n //result.write(System.out);\n assertNotNull(result);\n assertFalse(result.isEmpty());\n //assertEquals(expResult, result.size());\n }", "@Test\n public void testGetSfc() {\n System.out.println(\"getSfc\");\n Regime instance = r1;\n double expResult = 8.2;\n double result = instance.getSfc();\n assertEquals(expResult, result, 0.0);\n }", "@Test\n\tpublic void testDarEdad()\n\t{\n\t\tassertEquals(\"La edad esperada es 22.\", 22, paciente.darEdad());\n\t}", "@Test\n public void testGetSetTemperaturaExteriorMaxima() {\n System.out.println(\"getSetTemperaturaExteriorMaxima\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExteriorMaxima(expResult);\n double result = instance.getTemperaturaExteriorMaxima();\n assertEquals(expResult, result, 0.0);\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void testFilaMediaLlena( )\n {\n setupEscenario3( );\n triqui.limpiarTablero( );\n triqui.marcarCasilla( 4, marcaJugador1 );\n triqui.marcarCasilla( 5, marcaJugador1 );\n triqui.marcarCasilla( 6, marcaJugador1 );\n assertTrue( triqui.filaMediaLlena( marcaJugador1 ) );\n assertTrue( triqui.ganoJuego( marcaJugador1 ) );\n }", "@Test\n public void testGetInteres() {\n System.out.println(\"getInteres\");\n double expResult = 0.07;\n double result = detalleAhorro.getInteres();\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\n public void getEnergyModifierDTest() {\n \n assertEquals(0.8, hawthorn1.getEnergyModifierD(), 0.1);\n }", "@Test\n public void testGetEntityManager() {\n System.out.println(\"getEntityManager\");\n DaftarPengguna instance = new DaftarPengguna();\n EntityManager expResult = null;\n EntityManager result = instance.getEntityManager();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void getMese() {\n EAMese eaMesePrevisto;\n EAMese eaMeseOttenuto;\n\n eaMesePrevisto = EAMese.maggio;\n sorgente = \"maggio\";\n eaMeseOttenuto = EAMese.getMese(sorgente);\n assertNotNull(eaMeseOttenuto);\n assertEquals(eaMesePrevisto, eaMeseOttenuto);\n\n eaMesePrevisto = EAMese.ottobre;\n sorgente = \"ott\";\n eaMeseOttenuto = EAMese.getMese(sorgente);\n assertNotNull(eaMeseOttenuto);\n assertEquals(eaMesePrevisto, eaMeseOttenuto);\n }", "static int testGetExponentCase(float f, int expected) {\n float minus_f = -f;\n int failures=0;\n\n failures+=Tests.test(\"Math.getExponent(float)\", f,\n Math.getExponent(f), expected);\n failures+=Tests.test(\"Math.getExponent(float)\", minus_f,\n Math.getExponent(minus_f), expected);\n\n failures+=Tests.test(\"StrictMath.getExponent(float)\", f,\n StrictMath.getExponent(f), expected);\n failures+=Tests.test(\"StrictMath.getExponent(float)\", minus_f,\n StrictMath.getExponent(minus_f), expected);\n return failures;\n }", "@Test\n public void test25() throws Throwable {\n RegulaFalsiSolver regulaFalsiSolver0 = new RegulaFalsiSolver(0.11113807559013367, 0.5, (-26.9977173));\n HarmonicOscillator harmonicOscillator0 = new HarmonicOscillator((-1967.765905), (-1967.765905), 0.5);\n double double0 = regulaFalsiSolver0.solve(127, (UnivariateRealFunction) harmonicOscillator0, (-1967.765905), 336.055956295, (-1076.4923));\n }", "private void testGetVersion() {\r\n\t\t\r\n\t\t// Get the value from the pointer\r\n\t\tPointer hEngine = this.phEngineFD.getValue();\r\n\t\tSystem.out.println(hEngine);\r\n\t\t\r\n\t\t// Get the version information from the engine\r\n\t\tAFD_FSDK_Version version = AFD_FSDK_Library.INSTANCE.AFD_FSDK_GetVersion(hEngine);\r\n\t\tSystem.out.println(version);\r\n\t}", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.fMeasure((-2765));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public void ektypwsiFarmakou() {\n\t\t// Elegxw an yparxoun farmaka\n\t\tif(numOfMedicine != 0)\n\t\t{\n\t\t\tfor(int i = 0; i < numOfMedicine; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"INFO FOR MEDICINE No.\" + (i+1) + \":\");\n\t\t\t\tmedicine[i].print();\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMA FARMAKA PROS EMFANISH!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Test\n public void testAddDhlwsh() {\n System.out.println(\"addDhlwsh\");\n Mathima mathima = null;\n String hmeromDillwsis = \"\";\n Foititis instance = new Foititis();\n instance.addDhlwsh(mathima, hmeromDillwsis);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testDajMeteoPrognoze() throws Exception {\n System.out.println(\"dajMeteoPrognoze\");\n int id = 0;\n String adresa = \"\";\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n MeteoIoTKlijent instance = (MeteoIoTKlijent)container.getContext().lookup(\"java:global/classes/MeteoIoTKlijent\");\n MeteoPrognoza[] expResult = null;\n MeteoPrognoza[] result = instance.dajMeteoPrognoze(id, adresa);\n assertArrayEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n }", "@Test\n public void testSoma() {\n System.out.println(\"soma\");\n float num1 = 0.0F;\n float num2 = 0.0F;\n float expResult = 0.0F;\n float result = Calculadora_teste.soma(num1, num2);\n assertEquals(expResult, result, 0.0);\n \n }", "@Test\n void testPartA_Example4() {\n assertEquals(33583, Day01.getFuelNeededForMass(100756));\n }", "public Ficha_epidemiologia_n3 obtenerFichaEpidemiologia() {\n\t\t\n\t\t\t\tFicha_epidemiologia_n3 ficha_epidemiologia_n3 = new Ficha_epidemiologia_n3();\n\t\t\t\tficha_epidemiologia_n3.setCodigo_empresa(empresa.getCodigo_empresa());\n\t\t\t\tficha_epidemiologia_n3.setCodigo_sucursal(sucursal.getCodigo_sucursal());\n\t\t\t\tficha_epidemiologia_n3.setCodigo(\"Z000\");\n\t\t\t\tficha_epidemiologia_n3.setCodigo_ficha(tbxCodigo_ficha\n\t\t\t\t\t\t.getValue());\n\t\t\t\tficha_epidemiologia_n3.setFecha_ficha(new Timestamp(dtbxFecha_ficha.getValue().getTime()));\n\t\t\t\tficha_epidemiologia_n3.setNro_identificacion(tbxNro_identificacion.getValue());\n\t\t\t\n\t\t\t\t//ficha_epidemiologia_n3\n\t\t\t\t\t//\t.setNro_identificacion(tbxNro_identificacion.getValue());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setConoce_y_o_ha_sido_picado_por_pito(rdbConoce_y_o_ha_sido_picado_por_pito\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setTransfuciones_sanguineas(rdbTransfuciones_sanguineas\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setSometido_transplante(rdbSometido_transplante\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setHijo_de_madre_cero_positiva(rdbHijo_de_madre_cero_positiva\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setEmbarazo_actual(rdbEmbarazo_actual\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setHa_sido_donante(rdbHa_sido_donante\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setTipo_techo(rdbTipo_techo\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setTipo_paredes(rdbTipo_paredes\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setEstrato_socio_economico(rdbEstrato_socio_economico\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setEstado_clinico(rdbEstado_clinico\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setClasificacion_de_caso(rdbClasificacion_de_caso\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setFiebre(chbFiebre.isChecked() ? \"S\"\n\t\t\t\t\t\t: \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setDolor_toracico_cronico(chbDolor_toracico_cronico\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setDisnea(chbDisnea.isChecked() ? \"S\"\n\t\t\t\t\t\t: \"N\");\n\t\t\t\tficha_epidemiologia_n3.setPalpitaciones(chbPalpitaciones\n\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setMialgias(chbMialgias.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setArtralgias(chbArtralgias.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setEdema_facial(chbEdema_facial\n\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setEdema_miembros_inferiores(chbEdema_miembros_inferiores\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setDerrame_pericardico(chbDerrame_pericardico\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setHepatoesplenomegalia(chbHepatoesplenomegalia\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setAdenopatias(chbAdenopatias\n\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setChagoma(chbChagoma.isChecked() ? \"S\"\n\t\t\t\t\t\t: \"N\");\n\t\t\t\tficha_epidemiologia_n3.setFalla_cardiaca(chbFalla_cardiaca\n\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setPalpitacion_taquicardia(chbPalpitacion_taquicardia\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setDolor_toracico_agudo(chbDolor_toracico_agudo\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setBrandicardia(chbBrandicardia\n\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setSincope_o_presincope(chbSincope_o_presincope\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setHipotension(chbHipotension\n\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setDisfagia(chbDisfagia.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setGota_gruesa_frotis_de_sangre_periferica(rdbGota_gruesa_frotis_de_sangre_periferica\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setMicrohematocrito_examen_fresco(rdbMicrohematocrito_examen_fresco\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setStrout(rdbStrout.getSelectedItem()\n\t\t\t\t\t\t.getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setElisa_igg_chagas(rdbElisa_igg_chagas\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setIfi_igg_chagas(rdbIfi_igg_chagas\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setHai_chagas(rdbHai_chagas\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setElectrocardiograma(rdbElectrocardiograma\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setEcocardiograma(rdbEcocardiograma\n\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setRayos_x_de_torax_indice_toracico(rdbRayos_x_de_torax_indice_toracico\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setHolter(rdbHolter.getSelectedItem()\n\t\t\t\t\t\t.getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setTratamiento_etiologico(rdbTratamiento_etiologico\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setTratamiento_sintomatico(rdbTratamiento_sintomatico\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setPosible_via_transmision(rdbPosible_via_transmision\n\t\t\t\t\t\t\t\t.getSelectedItem().getValue().toString());\n\t\t\t\tficha_epidemiologia_n3.setRomana(chbRomana.isChecked() ? \"S\"\n\t\t\t\t\t\t: \"N\");\n\t\t\t\t\n\t\t\t\tficha_epidemiologia_n3.setCodigo_empresa(empresa\n\t\t\t\t\t\t.getCodigo_empresa());\n\t\t\t\t\n\t\t\t\tficha_epidemiologia_n3.setCodigo_sucursal(sucursal\n\t\t\t\t\t\t.getCodigo_sucursal());\n\t\t\t\t// ficha_epidemiologia_n3.setCodigo(tbxCodigo.getValue());\n\t\t\t\tficha_epidemiologia_n3.setResultado1(tbxResultado1.getValue());\n\t\t\t\tficha_epidemiologia_n3.setResultado2(tbxResultado2.getValue());\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setSemanas_de_embarazo((ibxSemanas_de_embarazo\n\t\t\t\t\t\t\t\t.getValue() != null ? ibxSemanas_de_embarazo\n\t\t\t\t\t\t\t\t.getValue() : 0));\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setNumero_familiares_con_changa((ibxNumero_familiares_con_changa\n\t\t\t\t\t\t\t\t.getValue() != null ? ibxNumero_familiares_con_changa\n\t\t\t\t\t\t\t\t.getValue() : 0));\n\t\t\t\tficha_epidemiologia_n3\n\t\t\t\t\t\t.setConstipacion_cronica(chbConstipacion_cronica\n\t\t\t\t\t\t\t\t.isChecked() ? \"S\" : \"N\");\n\t\t\t\tficha_epidemiologia_n3.setCreacion_date(new Timestamp(\n\t\t\t\t\t\tnew GregorianCalendar().getTimeInMillis()));\n\t\t\t\tficha_epidemiologia_n3.setUltimo_update(new Timestamp(\n\t\t\t\t\t\tnew GregorianCalendar().getTimeInMillis()));\n\t\t\t\tficha_epidemiologia_n3.setCreacion_user(usuarios.getCodigo()\n\t\t\t\t\t\t.toString());\n\t\t\t\tficha_epidemiologia_n3.setDelete_date(null);\n\t\t\t\tficha_epidemiologia_n3.setUltimo_user(usuarios.getCodigo()\n\t\t\t\t\t\t.toString());\n\t\t\t\tficha_epidemiologia_n3.setDelete_user(null);\n\t\t\t\tficha_epidemiologia_n3.setOtro_tipo_techo(tbxotro_tipo_techo.getValue());\n\n\t\t\t\t\n\t\treturn ficha_epidemiologia_n3;\n\t\t}", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "float mo106363e();", "@Test\r\n public void testAppartentMagnitude() {\r\n System.out.println(\"appartentMagnitude\");\r\n \r\n // Test case one.\r\n System.out.println(\"Test case #1\"); \r\n \r\n double magnitude = 12;\r\n double distance = 200;\r\n \r\n SceneControl instance = new SceneControl();\r\n \r\n double expResult = 0.0003;\r\n double result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n // Test case two.\r\n System.out.println(\"Test case #2\"); \r\n \r\n magnitude = 13;\r\n distance = -50;\r\n \r\n expResult = -999999;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n // Test case three.\r\n System.out.println(\"Test case #3\"); \r\n \r\n magnitude = 56;\r\n distance = 20;\r\n \r\n expResult = -999999;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, -999999);\r\n \r\n // Test case four.\r\n System.out.println(\"Test case #4\"); \r\n \r\n magnitude = 56;\r\n distance = 20;\r\n \r\n expResult = -999999;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n // Test case five.\r\n System.out.println(\"Test case #5\"); \r\n \r\n magnitude = 14;\r\n distance = 0;\r\n \r\n expResult = -999999;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n // Test case six.\r\n System.out.println(\"Test case #6\"); \r\n \r\n magnitude = -50;\r\n distance = 12;\r\n \r\n expResult = -0.3472;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n // Test case seven.\r\n System.out.println(\"Test case #7\"); \r\n \r\n magnitude = 50;\r\n distance = 20;\r\n \r\n expResult = 0.125;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n // Test case eight.\r\n System.out.println(\"Test case #8\"); \r\n \r\n magnitude = 13;\r\n distance = 1;\r\n \r\n expResult = 13;\r\n result = instance.appartentMagnitude(magnitude, distance);\r\n assertEquals(expResult, result, 0.0001);\r\n \r\n }", "public abstract float mo70722e(String str);", "@Test\n\tpublic void testGetBehandelingNaam(){\n\t\tString expResult = \"Hamstring\";\n\t\tassertTrue(expResult == Behandelcode.getBehandelingNaam());\n\t}", "@Test\n public void getEspecieTest() {\n EspecieEntity entity = especieData.get(0);\n EspecieEntity resultEntity = especieLogic.getSpecies(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNombre(), resultEntity.getNombre());\n }", "public void testDeterminizerOnDFAs() throws Exception {\n\t\tIDFA[] dfas = JailTestUtils.getAllDFAs();\n\t\tfor (IDFA dfa: dfas) {\n\t\t\tIDirectedGraph graph = dfa.getGraph();\n\t\t\tINFA nfa = new GraphNFA(graph);\n\t\t\ttestDeterminizer(nfa,dfa);\n\t\t}\n\t}", "@Test\n public void testSetM_sfc() {\n System.out.println(\"setM_sfc\");\n double sfc = 9.5;\n Regime instance = new Regime();\n instance.setM_sfc(sfc);\n double result=instance.getSfc();\n double expResult=9.5;\n assertEquals(expResult, result, 0.0);\n }", "@Test\n\tpublic void test() {\n\t\tOptional<File> file = fileService.getFileById(\"5d2ed73ce4fb3c2d98feb1b2\");\n\t\tSystem.err.println(file.get().getContent().getData());\n\t\tString res = baiduFaceService.searchFaceOfByte(file.get().getContent().getData(), \"xiaoyou_001\", null);\n\t\tSystem.err.println(res);\n\t\tJSONObject resJson = JSONObject.parseObject(res);\n\t\tJSONObject result = resJson.getJSONObject(\"result\");\n\t\tSystem.err.println(result == null);\n\t}", "@Test()\n public void testGetMedia() {\n System.out.println(\"getMedia\");\n String type = \"b\";\n DBManager instance=null;\n try {\n instance = new ODSDBManager(\"test.ods\");\n } catch (ODSKartException ex) {\n fail(\"Neocekavana vyjimka \" +ex);\n } catch (FileNotFoundException ex) {\n fail(\"Neocekavana vyjimka \" + ex);\n }\n \n List<Medium> expResult = new ArrayList<Medium>();\n Medium medium = new MediumImpl();\n medium.addTitle(\"ba\");\n medium.addTitle(\"bb\");\n expResult.add(medium);\n List<Medium> result = instance.getMedia(type);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "public void cal_AdjustedFuelMoist(){\r\n\tADFM=0.9*FFM+0.5+9.5*Math.exp(-BUO/50);\r\n}", "@Test\n public void testCalcularImporte() {\n System.out.println(\"calcularImporte\");\n double min = 10.1;\n Camiones instance = new Camiones(\"C088IJ\", true, 10);\n double expResult = 0.0;\n double result = instance.calcularImporte(min);\n \n // TODO review the generated test code and remove the default call to fail.\n \n }", "public void testParFileReading() {\n GUIManager oManager = null;\n String sFileName = null;\n try {\n\n oManager = new GUIManager(null);\n \n //Valid file 1\n oManager.clearCurrentData();\n sFileName = writeFile1();\n oManager.inputXMLParameterFile(sFileName);\n SeedPredationBehaviors oPredBeh = oManager.getSeedPredationBehaviors();\n ArrayList<Behavior> p_oBehs = oPredBeh.getBehaviorByParameterFileTag(\"DensDepRodentSeedPredation\");\n assertEquals(1, p_oBehs.size());\n DensDepRodentSeedPredation oPred = (DensDepRodentSeedPredation) p_oBehs.get(0);\n double SMALL_VAL = 0.00001;\n \n assertEquals(oPred.m_fDensDepDensDepCoeff.getValue(), 0.07, SMALL_VAL);\n assertEquals(oPred.m_fDensDepFuncRespExpA.getValue(), 0.02, SMALL_VAL);\n\n assertEquals( ( (Float) oPred.mp_fDensDepFuncRespSlope.getValue().get(0)).\n floatValue(), 0.9, SMALL_VAL);\n assertEquals( ( (Float) oPred.mp_fDensDepFuncRespSlope.getValue().get(1)).\n floatValue(), 0.05, SMALL_VAL);\n\n //Test grid setup\n assertEquals(1, oPred.getNumberOfGrids());\n Grid oGrid = oManager.getGridByName(\"Rodent Lambda\");\n assertEquals(1, oGrid.getDataMembers().length);\n assertTrue(-1 < oGrid.getFloatCode(\"rodent_lambda\")); \n \n }\n catch (ModelException oErr) {\n fail(\"Seed predation validation failed with message \" + oErr.getMessage());\n }\n catch (java.io.IOException oE) {\n fail(\"Caught IOException. Message: \" + oE.getMessage());\n }\n finally {\n new File(sFileName).delete();\n }\n }", "public abstract EUT eut();", "@Test\r\n public void testWortUeberpruefen() {\r\n System.out.println(\"wortUeberpruefen\");\r\n String eingabewort = \"\";\r\n Turingband t = null;\r\n Texteinlesen instance = new Texteinlesen();\r\n instance.wortUeberpruefen(eingabewort, t);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@LargeTest\n public void testFisheyeFull() {\n TestAction ta = new TestAction(TestName.FISHEYE_FULL);\n runTest(ta, TestName.FISHEYE_FULL.name());\n }", "String getFpDescription();", "@Test\n public void testDeterminante() {\n System.out.println(\"determinante\");\n Matrix matrix = null;\n double expResult = 0.0;\n double result = utilsHill.determinante(matrix);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testBMI() {\n System.out.println(\"BMI\");\n float a = 54;\n float b = (float) 1.77;\n Tuan4 instance = new Tuan4();\n String expResult = \"Thiếu cân.\";\n String result = instance.BMI(a, b);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n }", "boolean testMag(Tester t) {\n return t.checkExpect(this.p6.magnitude(), 1) && t.checkExpect(this.p7.magnitude(), 1)\n && t.checkExpect(this.p2.magnitude(), 150);\n }", "@Test\n public void testIsApellido_Materno() {\n System.out.println(\"isApellido_Materno\");\n String AM = \"Proud\";\n Entradas instance = new Entradas();\n boolean expResult = false;\n boolean result = instance.isApellido_Materno(AM);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n\n }", "@Test\r\n public void testDateiEinlesen() throws Exception {\r\n System.out.println(\"dateiEinlesen\");\r\n String dateipfad = \"\";\r\n Texteinlesen instance = new Texteinlesen();\r\n instance.dateiEinlesen(dateipfad);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void mo3770E() {\n int i = this.f1434I;\n int i2 = this.f1435J;\n this.f1462ak = i;\n this.f1463al = i2;\n this.f1464am = (this.f1430E + i) - i;\n this.f1465an = (this.f1431F + i2) - i2;\n }", "@Test\n public void test31() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedFMeasure();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(groups = {\"All\", \"fixing\"})\n\tpublic void TC89302_OpenEVV_valid_EmpGender_F() throws InterruptedException, IOException, ParseException\n\t{\n\t\t// logger = extent.startTest(\"TC89302_OpenEVV_valid_EmpGender_F\");\n\t\t \n\t\tlogger.log(LogStatus.INFO, \"To validate the 'F' employee gender\");// adding what you are verifing\n\n\t\t\n\t\t//Using Reusable method to load client json\n\t\tJSONArray j=CommonMethods.LoadJSON_OpenEVV(\"employee\");\n\n\t\t//Making json values dynamic\n\t\tJSONObject js = (JSONObject) j.get(0);\n\n\t\tlogger.log(LogStatus.INFO, \"Passing EmployeeGender as F \");\n logger.log(LogStatus.INFO, \"extracting request send body \" + j.toJSONString());\n\n\t\tjs.put(\"EmployeeGender\", DataGeneratorEmployee.gender[1]);\n\n\t\tCommonMethods.validateResponse(j, CommonMethods.propertyfileReader(globalVariables.openevv_emp_url));\n\t}", "@Test\n\tpublic void testaGetMensagem() {\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 1 eh avaliada com 5 minitestes, eliminando 1 dos mais baixos.\",\n\t\t\t\tminitElimBai_1.getMensagem());\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 2 eh avaliada com 10 minitestes, eliminando 2 dos mais baixos.\",\n\t\t\t\tminitElimBai_2.getMensagem());\n\t}", "public void testVocabulary() throws Exception {\n assertVocabulary(a, getDataPath(\"kstemTestData.zip\"), \"kstem_examples.txt\");\n }", "@Test\n public void testGetTamano() {\n System.out.println(\"getTamano\");\n Huffman instance = null;\n int expResult = 0;\n int result = instance.getTamano();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n TechnicalInformation technicalInformation0 = lovinsStemmer0.getTechnicalInformation();\n assertFalse(technicalInformation0.hasAdditional());\n }", "@Test\n\tpublic void testSetBehandelingNaam(){\n\t\tString expResult = \"Enkel\";\n\t\tinstance.setBehandelingNaam(\"Enkel\");\n\t\tassertTrue(expResult == Behandelcode.getBehandelingNaam());\n\t}", "@Test \r\n\t\r\n\tpublic void ataqueDeMagoSinMagia(){\r\n\t\tPersonaje perso=new Humano();\r\n\t\tEspecialidad mago=new Hechicero();\r\n\t\tperso.setCasta(mago);\r\n\t\tperso.bonificacionDeCasta();\r\n\t\t\r\n\t\tPersonaje enemigo=new Orco();\r\n\t\tEspecialidad guerrero=new Guerrero();\r\n\t\tenemigo.setCasta(guerrero);\r\n\t\tenemigo.bonificacionDeCasta();\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(44,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t//ataque normal\r\n\t\tperso.atacar(enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t// utilizar hechizo\r\n\t\tperso.getCasta().getHechicero().agregarHechizo(\"Engorgio\", new Engorgio());\r\n\t\tperso.getCasta().getHechicero().hechizar(\"Engorgio\",enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(20,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t}", "@Test\n public void testGetGreeting() {\n //Se crea el objeto para el test\n FileModelImplementation greet = new FileModelImplementation();\n String saludoEsperado = \"Hola Mundo MVC\";\n \n //llamar al metodo \"getGreeting\"\n String saludo = greet.getGreeting();\n \n //comprobar que el saludo retorna lo que debe con assert\n assertEquals(\"El saludo no es igual\",saludoEsperado, saludo);\n }", "public void testDeterminizerOnNFAs() throws Exception {\n\t\tINFA[] nfas = JailTestUtils.getAllNFAs();\n\t\tfor (INFA nfa: nfas) {\n\t\t\tIDFA dfa = new NFADeterminizer(nfa).getResultingDFA();\n\t\t\tassertNotNull(dfa);\n\t\t}\n\t}", "@Test\n public void testGetFragmentTolerance() {\n System.out.println(\"getFragmentTolerance\");\n Data instance = null;\n double expResult = 0.0;\n double result = instance.getFragmentTolerance();\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n void testPartA_Example3() {\n assertEquals(654, Day01.getFuelNeededForMass(1969));\n }", "boolean mo54438e();", "public double getF();", "void mo21075f();" ]
[ "0.71849954", "0.6425404", "0.62561244", "0.5945379", "0.5873055", "0.5782694", "0.57302076", "0.5728542", "0.571466", "0.5681438", "0.56336665", "0.560025", "0.55976284", "0.5594236", "0.55698806", "0.55484706", "0.554726", "0.55444294", "0.5525482", "0.551599", "0.549394", "0.5476489", "0.5399738", "0.5377189", "0.53689027", "0.5365862", "0.5358592", "0.5344883", "0.5343956", "0.53379035", "0.533564", "0.53192073", "0.53089327", "0.5287523", "0.52761626", "0.5271648", "0.5269288", "0.52650386", "0.5262198", "0.5257262", "0.5250092", "0.5249568", "0.52479094", "0.5247521", "0.5233524", "0.5232166", "0.5231659", "0.5223867", "0.52193594", "0.5210665", "0.51885223", "0.51832813", "0.51801676", "0.5177402", "0.5167927", "0.5165475", "0.5162802", "0.5161743", "0.5160021", "0.5158562", "0.51578665", "0.5151171", "0.5149823", "0.5144496", "0.5139505", "0.5132206", "0.51305705", "0.5128586", "0.51267135", "0.51202726", "0.51177895", "0.5109173", "0.5106152", "0.51056755", "0.50988615", "0.5098213", "0.50977385", "0.5094676", "0.5089284", "0.50748175", "0.50733685", "0.507252", "0.5071025", "0.5070233", "0.50682473", "0.5066767", "0.5058465", "0.5056295", "0.50507087", "0.5050315", "0.5048638", "0.50485206", "0.50473917", "0.5045704", "0.5041819", "0.5029049", "0.50276613", "0.5027387", "0.5026529", "0.50258887" ]
0.7723506
0
Test of setEmf method, of class DaftarPengguna.
@Test public void testSetEmf() { System.out.println("setEmf"); EntityManagerFactory emf = null; DaftarPengguna instance = new DaftarPengguna(); instance.setEmf(emf); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetEmf() {\n System.out.println(\"getEmf\");\n DaftarPengguna instance = new DaftarPengguna();\n EntityManagerFactory expResult = null;\n EntityManagerFactory result = instance.getEmf();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testExistingEmf() {\r\n debug(\"testExistingEmf\");\r\n this.emf = initialEmf; \r\n super.testGettingEntityManager();\r\n super.testPersisting();\r\n super.testFinding();\r\n super.testQuerying();\r\n super.testGettingMetamodel();\r\n this.emf = null; \r\n }", "@Test\n\tpublic void testSetTariefBehandeling(){\n\t\tdouble expResult = 10;\n\t\tinstance.setTariefBehandeling(10);\n\t\tassertTrue(expResult == instance.getTariefBehandeling());\n\t}", "@Test\n\tpublic void testSetBehandelingNaam(){\n\t\tString expResult = \"Enkel\";\n\t\tinstance.setBehandelingNaam(\"Enkel\");\n\t\tassertTrue(expResult == Behandelcode.getBehandelingNaam());\n\t}", "@Test\n public void testSetM_sfc() {\n System.out.println(\"setM_sfc\");\n double sfc = 9.5;\n Regime instance = new Regime();\n instance.setM_sfc(sfc);\n double result=instance.getSfc();\n double expResult=9.5;\n assertEquals(expResult, result, 0.0);\n }", "@Test\n public void testSetGetEinheit() {\n \n String einheit = \"einheit\";\n messtyp.setEinheit(einheit);\n assertEquals(messtyp.getEinheit(), \"einheit\");\n }", "@Test\n public void testAddVathmos() {\n System.out.println(\"addVathmos\");\n Mathima mathima = null;\n String hmeromExetasis = \"\";\n double vathmos = 0.0;\n Foititis instance = new Foititis();\n instance.addVathmos(mathima, hmeromExetasis, vathmos);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testSetFila() {\n System.out.println(\"setFila\");\n try {\n asientoTested.setFila('A');\n } catch (IllegalArgumentException e) {\n fail(\"Caracter 'A' deberia ser valido\");\n }\n try {\n asientoTested.setFila('a');\n } catch (IllegalArgumentException e) {\n fail(\"Caracter 'a' deberia ser valido\");\n }\n try {\n asientoTested.setFila(Character.MIN_VALUE);\n fail();\n } catch (IllegalArgumentException e) {\n assertTrue(\"Character.MIN_VALUE no deberia ser valido\", true);\n }\n try {\n asientoTested.setFila('ñ');\n fail();\n } catch (IllegalArgumentException e) {\n assertTrue(\"Caracter ñ no deberia ser valido\", true);\n }\n // TODO review the generated test code and remove the default call to fail.\n }", "public baconhep.TTau.Builder setE(float value) {\n validate(fields()[4], value);\n this.e = value;\n fieldSetFlags()[4] = true;\n return this; \n }", "@Test\n public void testGetSetTemperaturaExteriorMaxima() {\n System.out.println(\"getSetTemperaturaExteriorMaxima\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExteriorMaxima(expResult);\n double result = instance.getTemperaturaExteriorMaxima();\n assertEquals(expResult, result, 0.0);\n }", "@Test\n public void testSetMagnitude() {\n System.out.println(\"setMagnitude\");\n Magnitude magnitude = null;\n Unit instance = new Unit();\n instance.setMagnitude(magnitude);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void testesExtras() {\n\t\tminitElimBai_1.setNome(\"Disc 1\");\n\t\tAssert.assertEquals(\"Erro em setNome()\", \"Disc 1\",\n\t\t\t\tminitElimBai_1.getNome());\n\t\tminitElimBai_1.setQtdProvas(10);\n\t\tAssert.assertEquals(\"Erro em setQtdProvas()\", 10,\n\t\t\t\tminitElimBai_1.getQtdProvas());\n\t\tminitElimBai_1.setQtdProvasJaRealizadas(1);\n\t\tAssert.assertEquals(\"Erro em setQtdProvasJaRealizadas()\", 1,\n\t\t\t\tminitElimBai_1.getQtdMinitestesJaRealizados());\n\t\tminitElimBai_1.setQtdFaltas(3);\n\t\tAssert.assertEquals(\"Erro em setQtdFaltas()\", 3,\n\t\t\t\tminitElimBai_1.getQtdFaltas());\n\t\tminitElimBai_1.setQtdMinitestesAEliminar(4);\n\t\tAssert.assertEquals(\"Erro em setQtdProvasAEliminar()\", 4,\n\t\t\t\tminitElimBai_1.getQtdMinitestesAEliminar());\n\n\t\tminitElimBai_2.setNome(\"Disc 2\");\n\t\tAssert.assertEquals(\"Erro em setNome()\", \"Disc 2\",\n\t\t\t\tminitElimBai_2.getNome());\n\t\tminitElimBai_2.setQtdProvas(10);\n\t\tAssert.assertEquals(\"Erro em setQtdProvas()\", 10,\n\t\t\t\tminitElimBai_2.getQtdProvas());\n\t\tminitElimBai_2.setQtdProvasJaRealizadas(1);\n\t\tAssert.assertEquals(\"Erro em setQtdProvasJaRealizadas()\", 1,\n\t\t\t\tminitElimBai_2.getQtdMinitestesJaRealizados());\n\t\tminitElimBai_2.setQtdFaltas(3);\n\t\tAssert.assertEquals(\"Erro em setQtdFaltas()\", 3,\n\t\t\t\tminitElimBai_2.getQtdFaltas());\n\t\tminitElimBai_2.setQtdMinitestesAEliminar(2);\n\t\tAssert.assertEquals(\"Erro em setQtdProvasAEliminar()\", 2,\n\t\t\t\tminitElimBai_2.getQtdMinitestesAEliminar());\n\n\t}", "private final void m718m() {\n boolean z;\n akl akl = this.f531p.f603f;\n if (this.f539x) {\n z = true;\n } else {\n z = akl != null && akl.f577a.mo1491f();\n }\n akp akp = this.f533r;\n if (z != akp.f617g) {\n this.f533r = new akp(akp.f611a, akp.f612b, akp.f613c, akp.f614d, akp.f615e, akp.f616f, z, akp.f618h, akp.f619i, akp.f620j, akp.f621k, akp.f622l, akp.f623m);\n }\n }", "@Test\n public void testSetInteres() {\n System.out.println(\"setInteres\");\n double interes = 0.0;\n DetalleAhorro instance = new DetalleAhorro();\n instance.setInteres(interes);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testSetValor() {\r\n \r\n }", "public void setGEM1ERFParams(GEM1ERF erf) {\n // set minimum magnitude\n /*\n * xxr: TODO: !!!type safety!!! apache's Configuration interface handles\n * a similar problem this way: Instead of defining one single method\n * like public void setParameter(String key, Object value) {...} there\n * is one method per type defined: setString(), setDouble(), setInt(),\n * ...\n */\n erf.setParameter(GEM1ERF.MIN_MAG_NAME, config\n .getDouble(ConfigItems.MINIMUM_MAGNITUDE.name()));\n // set time span\n TimeSpan timeSpan = new TimeSpan(TimeSpan.NONE, TimeSpan.YEARS);\n timeSpan.setDuration(config.getDouble(ConfigItems.INVESTIGATION_TIME\n .name()));\n erf.setTimeSpan(timeSpan);\n\n // params for area source\n // set inclusion of area sources in the calculation\n erf.setParameter(GEM1ERF.INCLUDE_AREA_SRC_PARAM_NAME, config\n .getBoolean(ConfigItems.INCLUDE_AREA_SOURCES.name()));\n // set rupture type (\"area source rupture model /\n // area_source_rupture_model / AreaSourceRuptureModel)\n erf.setParameter(GEM1ERF.AREA_SRC_RUP_TYPE_NAME, config\n .getString(ConfigItems.TREAT_AREA_SOURCE_AS.name()));\n // set area discretization\n erf.setParameter(GEM1ERF.AREA_SRC_DISCR_PARAM_NAME, config\n .getDouble(ConfigItems.AREA_SOURCE_DISCRETIZATION.name()));\n // set mag-scaling relationship\n erf\n .setParameter(\n GEM1ERF.AREA_SRC_MAG_SCALING_REL_PARAM_NAME,\n config\n .getString(ConfigItems.AREA_SOURCE_MAGNITUDE_SCALING_RELATIONSHIP\n .name()));\n // params for grid source\n // inclusion of grid sources in the calculation\n erf.setParameter(GEM1ERF.INCLUDE_GRIDDED_SEIS_PARAM_NAME, config\n .getBoolean(ConfigItems.INCLUDE_GRID_SOURCES.name()));\n // rupture model\n erf.setParameter(GEM1ERF.GRIDDED_SEIS_RUP_TYPE_NAME, config\n .getString(ConfigItems.TREAT_GRID_SOURCE_AS.name()));\n // mag-scaling relationship\n erf\n .setParameter(\n GEM1ERF.GRIDDED_SEIS_MAG_SCALING_REL_PARAM_NAME,\n config\n .getString(ConfigItems.AREA_SOURCE_MAGNITUDE_SCALING_RELATIONSHIP\n .name()));\n\n // params for fault source\n // inclusion of fault sources in the calculation\n erf.setParameter(GEM1ERF.INCLUDE_FAULT_SOURCES_PARAM_NAME, config\n .getBoolean(ConfigItems.INCLUDE_FAULT_SOURCE.name()));\n // rupture offset\n erf.setParameter(GEM1ERF.FAULT_RUP_OFFSET_PARAM_NAME, config\n .getDouble(ConfigItems.FAULT_RUPTURE_OFFSET.name()));\n // surface discretization\n erf.setParameter(GEM1ERF.FAULT_DISCR_PARAM_NAME, config\n .getDouble(ConfigItems.FAULT_SURFACE_DISCRETIZATION.name()));\n // mag-scaling relationship\n erf.setParameter(GEM1ERF.FAULT_MAG_SCALING_REL_PARAM_NAME, config\n .getString(ConfigItems.FAULT_MAGNITUDE_SCALING_RELATIONSHIP\n .name()));\n\n // mag-scaling sigma\n erf.setParameter(GEM1ERF.FAULT_SCALING_SIGMA_PARAM_NAME, config\n .getDouble(ConfigItems.FAULT_MAGNITUDE_SCALING_SIGMA.name()));\n // rupture aspect ratio\n erf.setParameter(GEM1ERF.FAULT_RUP_ASPECT_RATIO_PARAM_NAME, config\n .getDouble(ConfigItems.RUPTURE_ASPECT_RATIO.name()));\n // rupture floating type\n erf.setParameter(GEM1ERF.FAULT_FLOATER_TYPE_PARAM_NAME, config\n .getString(ConfigItems.RUPTURE_FLOATING_TYPE.name()));\n\n // params for subduction fault\n // inclusion of fault sources in the calculation\n erf\n .setParameter(\n GEM1ERF.INCLUDE_SUBDUCTION_SOURCES_PARAM_NAME,\n config\n .getBoolean(ConfigItems.INCLUDE_SUBDUCTION_FAULT_SOURCE\n .name()));\n // rupture offset\n erf.setParameter(GEM1ERF.SUB_RUP_OFFSET_PARAM_NAME, config\n .getDouble(ConfigItems.SUBDUCTION_FAULT_RUPTURE_OFFSET.name()));\n // surface discretization\n erf.setParameter(GEM1ERF.SUB_DISCR_PARAM_NAME, config\n .getDouble(ConfigItems.SUBDUCTION_FAULT_SURFACE_DISCRETIZATION\n .name()));\n // mag-scaling relationship\n erf\n .setParameter(\n GEM1ERF.SUB_MAG_SCALING_REL_PARAM_NAME,\n config\n .getString(ConfigItems.SUBDUCTION_FAULT_MAGNITUDE_SCALING_RELATIONSHIP\n .name()));\n // mag-scaling sigma\n erf.setParameter(GEM1ERF.SUB_SCALING_SIGMA_PARAM_NAME, config\n .getDouble(ConfigItems.SUBDUCTION_FAULT_MAGNITUDE_SCALING_SIGMA\n .name()));\n // rupture aspect ratio\n erf.setParameter(GEM1ERF.SUB_RUP_ASPECT_RATIO_PARAM_NAME, config\n .getDouble(ConfigItems.SUBDUCTION_RUPTURE_ASPECT_RATIO.name()));\n // rupture floating type\n erf\n .setParameter(GEM1ERF.SUB_FLOATER_TYPE_PARAM_NAME, config\n .getString(ConfigItems.SUBDUCTION_RUPTURE_FLOATING_TYPE\n .name()));\n\n // update\n erf.updateForecast();\n }", "@Test\r\n public void testSetSamochod() {\r\n System.out.println(\"setSamochod\");\r\n Samochod samochod = null;\r\n Faktura instance = new Faktura();\r\n instance.setSamochod(samochod);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testGetSetTemperaturaExterior() {\n System.out.println(\"getSetTemperaturaExterior\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExterior(expResult);\n double result = instance.getTemperaturaExterior();\n assertEquals(expResult, result, 0.0);\n }", "@Test\n public void testGetSetTemperaturaExteriorMinima() {\n System.out.println(\"getSetTemperaturaExteriorMinima\");\n double expResult = 10.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExteriorMinima(expResult);\n double result = instance.getTemperaturaExteriorMinima();\n assertEquals(expResult, result, 0.0);\n }", "public static void feec() {\n\t}", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\r\n public void testSetMaterial() {\r\n String expResult = \"pruebaMaterial\";\r\n articuloPrueba.setMaterial(expResult);\r\n assertEquals(expResult, articuloPrueba.getMaterial());\r\n }", "@Test\n\t@Ignore // now covered by OutOfSequenceData LM\n\tpublic void testFEDparsing() throws URISyntaxException {\n\t\tDAQ snapshot = getSnapshot(\"1493263275021.smile\");\n\n\t\tassertSatisfiedLogicModules ( snapshot,legacyFc1);\n\n\t\tSystem.out.println(legacyFc1.getDescriptionWithContext());\n\t\tSystem.out.println(legacyFc1.getActionWithContext());\n\n\t\tContextHandler context = legacyFc1.getContextHandler();\n\t\tassertEquals(new HashSet(Arrays.asList(\"622\")), context.getContext().get(\"PROBLEM-FED\"));\n\t\tassertEquals(new HashSet(Arrays.asList(\"ECAL\")), context.getContext().get(\"PROBLEM-SUBSYSTEM\"));\n\t\tassertEquals(new HashSet(Arrays.asList(\"EB-\")), context.getContext().get(\"PROBLEM-PARTITION\"));\n\n\t\tassertEquals(\"ECAL\",context.getActionKey());\n\t\tassertEquals(3,legacyFc1.getActionWithContext().size());\n\n\t}", "private static void teste02 () {\n\t\tEstoque e = Estoque.find(1);\n\t\tlog.debug(\"Estoque encontrado.\");\n\n\t\te.setPreco(new Float(10));\n\t\te.update();\n\n\t\tlog.debug(\"Estoque atualizado.\");\n\t}", "@Override\n\tpublic void setFuellFarbe(Farbe farbe) {\n\n\t}", "void setFmla(java.lang.String fmla);", "@Test\n public void testHasTemperaturaVariation() {\n System.out.println(\"hasTemperaturaVariation\");\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n boolean expResult = true;\n instance.setHasTemperaturaVariation(expResult);\n boolean result = instance.hasTemperaturaVariation();\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testSetSessieDuur(){\n\t\tdouble expResult = 5;\n\t\tinstance.setSessieDuur(5);\n\t\tassertTrue(expResult == instance.getSessieDuur());\n\t}", "@Test\r\n public void testPuteigen() {\r\n System.out.println(\"puteigen\");\r\n double[][] eigTnormal = null;\r\n connection instance = new connection();\r\n instance.puteigen(eigTnormal);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "private void setTEMparsFromRunner(){\n\t\t\n\t\tString fdummy=\" \";\n\t\t\n\t\tsoipar_cal sbcalpar = new soipar_cal();\n\t\tvegpar_cal vbcalpar = new vegpar_cal();\t\n\t\t\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_CMAX, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setCmax(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_NMAX, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setNmax(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_CFALL, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setCfall(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_NFALL, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setNfall(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KRB, 1);\n\t\tif (fdummy!=\" \") vbcalpar.setKrb(Float.valueOf(fdummy));\n\t\t\t\t\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KDCFIB, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setKdcfib(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KDCHUM, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setKdchum(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KDCMIN, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setKdcmin(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_KDCSLOW, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setKdcslow(Float.valueOf(fdummy));\n\t\tfdummy = (String)calparTB.getValueAt(GUIconfigurer.I_NUP, 1);\n\t\tif (fdummy!=\" \") sbcalpar.setNup(Float.valueOf(fdummy));\n\t\t\n\t\tif (fdummy!=\" \") TEM.runcht.cht.resetCalPar(vbcalpar, sbcalpar);\n\n\t\t//\n\t\tsoipar_bgc sbbgcpar = new soipar_bgc();\n\t\tvegpar_bgc vbbgcpar = new vegpar_bgc();\n\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_m1, 1);\n\t\tif (fdummy!=\" \") vbbgcpar.setM1(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_m2, 1);\n\t\tif (fdummy!=\" \") vbbgcpar.setM2(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_m3, 1);\n\t\tif (fdummy!=\" \") vbbgcpar.setM3(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_m4, 1);\n\t\tif (fdummy!=\" \") vbbgcpar.setM4(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_fsoma, 1);\n\t\tif (fdummy!=\" \") sbbgcpar.setFsoma(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_fsompr, 1);\n\t\tif (fdummy!=\" \") sbbgcpar.setFsompr(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_fsomcr, 1);\n\t\tif (fdummy!=\" \") sbbgcpar.setFsomcr(Float.valueOf(fdummy));\n\t\tfdummy =(String) fixparTB.getValueAt(GUIconfigurer.I_som2co2, 1);\n\t\tif (fdummy!=\" \") sbbgcpar.setSom2co2(Float.valueOf(fdummy));\n\t\t\n\t\tif (fdummy!=\" \") TEM.runcht.cht.resetBgcPar(vbbgcpar, sbbgcpar);\n\t\t\t\t\n\t}", "@Test\n public void setFishFinderOpPos(){\n Motorboot m = new Motorboot(\"boot1\",true,true);\n assertEquals(\"boot1\",m.getNaam());\n assertEquals(true,m.isRadarAanBoord());\n assertEquals(true,m.isFishFinderAanBoord());\n }", "public EMFTestSuite() {\n\t\taddTest(new TestSuite(EMFTestCase.class));\n\t}", "@Override\n\tpublic void setLinienFarbe(Farbe farbe) {\n\n\t}", "@Test\r\n public void testSetAnalizar() {\r\n System.out.println(\"setAnalizar\");\r\n String analizar = \"3+(\";\r\n RevisorParentesis instance = null;\r\n instance.setAnalizar(analizar);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testSetHasTemperaturaVariation() {\n System.out.println(\"setHasTemperaturaVariation\");\n boolean value = true;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setHasTemperaturaVariation(value);\n }", "public void setVegallomas(boolean ertek)\r\n\t{\r\n\t\tvegallomas = ertek;\r\n\t}", "@Test\n public void testEditPengguna() {\n System.out.println(\"editPengguna\");\n Pengguna pengguna = null;\n DaftarPengguna instance = new DaftarPengguna();\n instance.editPengguna(pengguna);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testSetEbXmlEventListener() {\n System.out.println(\"setEbXmlEventListener\");\n instance.setEbXmlEventListener(ebXmlEventListener);\n }", "void setEphemerisMode();", "@Before\n public void setUp() throws Exception, JVoiceXMLEvent {\n document = new VoiceXmlDocument();\n final Vxml vxml = document.getVxml();\n vxml.setXmlLang(\"en\");\n final Form form = vxml.appendChild(Form.class);\n field = form.appendChild(Field.class);\n field.setName(\"testfield\");\n\n context = Mockito.mock(VoiceXmlInterpreterContext.class);\n item = new FieldFormItem(context, field);\n final OptionConverter converter = new SrgsXmlOptionConverter();\n item.setOptionConverter(converter);\n }", "@Test\n\tpublic void testGehituErabiltzaile() {\n\t\tErabiltzaileLista.getErabiltzaileLista().erreseteatuErabiltzaileLista();\t\t\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Martin\", \"123456\",\"123456\");\n\t\tassertEquals(1, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Mikel\", \"123456\",\"123456\");\n\t\tassertEquals(2,ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t\tErabiltzaileLista.getErabiltzaileLista().gehituErabiltzaile(\"Martin\", \"123456\",\"123456\");\n\t\tassertEquals(2, ErabiltzaileLista.getErabiltzaileLista().erabiltzaileKop());\n\t}", "@LargeTest\n public void testFisheyeApproximateRelaxed() {\n TestAction ta = new TestAction(TestName.FISHEYE_APPROXIMATE_RELAXED);\n runTest(ta, TestName.FISHEYE_APPROXIMATE_RELAXED.name());\n }", "@Test\n public void test14() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFEntropyGain();\n assertEquals(0.0, double0, 0.01D);\n }", "protected abstract void setValue(Entity e,FloatTrait t,float value);", "@Test\n\tpublic void kaempfeTest() {\n\t\t\n\t\tSc1.kaempfe(Su3);\n\t\tassertEquals(true, Sc1.getIstBesiegt());\n\t\tassertEquals(false, Su3.getIstBesiegt());\n\n\t\tSu1.kaempfe(Sc2);\n\t\tassertEquals(false, Sc2.getIstBesiegt());\n\t\tassertEquals(true, Su1.getIstBesiegt());\n\t}", "public void setFarbe(FarbEnum farbe) {\n\t\tif(farbe==null){\n\t\t\tthrow new RuntimeException(\"Waehle eine Farbe !\");\n\t\t}\n\t\tthis.farbe = farbe;\n\t}", "@Test\n\tpublic void testSet() {\n\t}", "@Test\r\n public void testSetFormation() {\r\n System.out.println(\"*****************\");\r\n System.out.println(\"Test : setFormation\");\r\n String formation = \"Miage\";\r\n Cours_Reservation instance = new Cours_Reservation();\r\n instance.setFormation(formation);\r\n assertEquals(instance.getFormation(), formation);\r\n }", "@Test\n public void testSetM_rpmHigh() {\n System.out.println(\"setM_rpmHigh\");\n double rpmHigh = 2500.0;\n Regime instance = r1;\n instance.setM_rpmHigh(rpmHigh);\n double result=instance.getRPMHigh();\n double expResult=2500;\n assertEquals(expResult, result, 0.0);\n }", "public void testChangeOfSpecies() {\n GUIManager oManager = null;\n String sFileName = null;\n try {\n oManager = new GUIManager(null);\n sFileName = writeValidXMLFile();\n oManager.inputXMLParameterFile(sFileName);\n \n //Now change the species\n String[] sNewSpecies = new String[] {\n \"Species 3\",\n \"Species 2\",\n \"Species 1\",\n \"Species 4\",\n \"Species 5\",\n \"Species 6\"};\n \n oManager.getTreePopulation().setSpeciesNames(sNewSpecies);\n ManagementBehaviors oManagementBeh = oManager.getManagementBehaviors();\n ArrayList<Behavior> p_oBehs = oManagementBeh.getBehaviorByParameterFileTag(\"QualityVigorClassifier\");\n assertEquals(1, p_oBehs.size());\n QualityVigorClassifier oQual = (QualityVigorClassifier) p_oBehs.get(0);\n \n assertEquals(3, oQual.mp_oQualityVigorSizeClasses.size());\n \n QualityVigorSizeClass oClass = oQual.mp_oQualityVigorSizeClasses.get(0);\n assertEquals(10, oClass.m_fMinDbh, 0.0001);\n assertEquals(20, oClass.m_fMaxDbh, 0.0001);\n \n assertEquals(0.78, ((Float)oClass.mp_fProbVigorous.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.88, ((Float)oClass.mp_fProbVigorous.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oClass.mp_fProbVigorous.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.61, ((Float)oClass.mp_fProbVigorous.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.33, ((Float)oClass.mp_fProbSawlog.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.64, ((Float)oClass.mp_fProbSawlog.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oClass.mp_fProbSawlog.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.55, ((Float)oClass.mp_fProbSawlog.getValue().get(4)).floatValue(), 0.0001);\n \n \n oClass = oQual.mp_oQualityVigorSizeClasses.get(1);\n assertEquals(20, oClass.m_fMinDbh, 0.0001);\n assertEquals(30, oClass.m_fMaxDbh, 0.0001);\n \n assertEquals(0.33, ((Float)oClass.mp_fProbVigorous.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.81, ((Float)oClass.mp_fProbVigorous.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.64, ((Float)oClass.mp_fProbVigorous.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.32, ((Float)oClass.mp_fProbVigorous.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.32, ((Float)oClass.mp_fProbSawlog.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.69, ((Float)oClass.mp_fProbSawlog.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.33, ((Float)oClass.mp_fProbSawlog.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.58, ((Float)oClass.mp_fProbSawlog.getValue().get(4)).floatValue(), 0.0001);\n \n \n oClass = oQual.mp_oQualityVigorSizeClasses.get(2);\n assertEquals(30, oClass.m_fMinDbh, 0.0001);\n assertEquals(40, oClass.m_fMaxDbh, 0.0001);\n \n assertEquals(0.34, ((Float)oClass.mp_fProbVigorous.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.57, ((Float)oClass.mp_fProbVigorous.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.26, ((Float)oClass.mp_fProbVigorous.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.46, ((Float)oClass.mp_fProbVigorous.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.13, ((Float)oClass.mp_fProbSawlog.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.36, ((Float)oClass.mp_fProbSawlog.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.66, ((Float)oClass.mp_fProbSawlog.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.45, ((Float)oClass.mp_fProbSawlog.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.4, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.2, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(2.35, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(2.43, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(-2.3, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(1.12, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.32, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(1.3, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.13, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-0.2, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.9, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-1, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.25, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(-0.45, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.36, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.46, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.01, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.02, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.04, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.001, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.2, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.4, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.25, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(1.13, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(1.15, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.36, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.4, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.02, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.2, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-0.3, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(-0.2, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-0.4, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(-0.2, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.1, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.25, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.5, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.74, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.9, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.25, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.74, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(6, oQual.mp_iQualVigorDeciduous.getValue().size());\n for (int i = 0; i < oQual.mp_iQualVigorDeciduous.getValue().size(); i++)\n assertNotNull(oQual.mp_iQualVigorDeciduous.getValue().get(i));\n assertEquals(1, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(1)).getValue());\n assertEquals(0, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(0)).getValue());\n assertEquals(1, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(3)).getValue());\n assertEquals(0, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(4)).getValue());\n\n System.out.println(\"Change of species test succeeded.\");\n }\n catch (ModelException oErr) {\n fail(\"Change of species test failed with message \" + oErr.getMessage());\n }\n catch (java.io.IOException oE) {\n fail(\"Caught IOException. Message: \" + oE.getMessage());\n }\n finally {\n new File(sFileName).delete();\n }\n }", "public void setzePunkteanzeigeFarbe( String farbe ) \n { \n anzeige.setzeFarbePunktestand( farbe ); \n }", "public final void testAeLigature() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException, SolrServerException \n\t{\n\t\tcloseSolrProxy();\n\t\tcreateFreshIx(\"aeoeLigatureTests.mrc\");\n\t\tString fldName = \"title_245a_search\";\n\n\t\t// upper case\n\t\tSet<String> docIds = new HashSet<String>();\n\t\tdocIds.add(\"Ae1\");\n\t\tdocIds.add(\"Ae2\");\n\t\tassertSearchResults(fldName, \"Æon\", docIds);\n\t\tassertSearchResults(fldName, \"Aeon\", docIds);\n\n\t\t// lower case\n\t\tdocIds.clear();\n\t\tdocIds.add(\"ae1\");\n\t\tdocIds.add(\"ae2\");\n\t\tassertSearchResults(fldName, \"Encyclopædia\", docIds);\n\t\tassertSearchResults(fldName, \"Encyclopaedia\", docIds);\n\t}", "public void azzera() { setEnergia(0.0); }", "public void setE ( boolean e ) {\n\n\tthis.e = e;\n }", "@Test\n\tpublic void testSetBehandelCode(){\n\t\tint expResult = 002;\n\t\tinstance.setBehandelCode(002);\n\t\tassertTrue(expResult == instance.getBehandelCode());\n\t}", "public void setE(java.lang.Float value) {\n this.e = value;\n }", "public void setFE(int newFE){\n this._FE=newFE;\n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\tvendMachine = new VendingMachine();\r\n\t}", "@Test\n public void testMediaPesada() {\n System.out.println(\"mediaPesada\");\n int[] energia = null;\n int linhas = 0;\n double nAlpha = 0;\n Double[] expResult = null;\n Double[] resultArray = null;\n double[] result = ProjetoV1.mediaPesada(energia, linhas, nAlpha);\n if (result != null) {\n resultArray = ArrayUtils.converterParaArrayDouble(result);\n }\n\n assertArrayEquals(expResult, resultArray);\n\n }", "public void setEntfernung(float entf)\r\n\t{\r\n\t\tthis.entfernung=entf;\r\n\t}", "@Test\r\n public void testSetFakturaId() {\r\n System.out.println(\"setFakturaId\");\r\n Short fakturaId = null;\r\n Faktura instance = new Faktura();\r\n instance.setFakturaId(fakturaId);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testSetEtnia() {\n System.out.println(\"setEtnia\");\n String etnia = \"\";\n Paciente instance = new Paciente();\n instance.setEtnia(etnia);\n\n }", "@Test\n\tpublic void testSetAantalSessies(){\n\t\tint expResult = 5;\n\t\tinstance.setAantalSessies(5);\n\t\tassertEquals(expResult, instance.getAantalSessies());\n\t}", "@Test\r\n public void testSetPracownik() {\r\n System.out.println(\"setPracownik\");\r\n Pracownik pracownik = null;\r\n Faktura instance = new Faktura();\r\n instance.setPracownik(pracownik);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void setzeEigenenStein(int spielzug){\t\t\n\t\t//Setze eigenen Stein\n\t\tfor(int i=0; i<6; i++) {\n\t\t\tif(spielfeld[spielzug][i].equals(\"_\")){\n\t\t\t\tspielfeld[spielzug][i] = eigenerStein;\n\t\t\t\teigenerPunkt.setLocation(spielzug, i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\n\t}", "public void setzeHintergrundgrafik( String pfad ) \n {\n ea.edu.FensterE.getFenster().hintergrundSetzen( new Bild(0,0,pfad) );\n }", "@Test\n public void testTransform() {\n File file1=new File(\"testData/testfile.mgf\");\n MgfReader rdr=new MgfReader(file1);\n ArrayList<Spectrum> specs = rdr.readAll();\n System.out.println(\"transform\");\n Spectrum spec = specs.get(0);\n ReciprocalTransform instance = new ReciprocalTransform();\n Spectrum expResult = null;\n Spectrum result = null;//instance.transform(spec);\n assertEquals(result, expResult);\n }", "private void setEnergia(double nuovaEnergia)\r\n\t{\r\n\t\tif (nuovaEnergia > MAX) energia = MAX;\r\n\t\telse if (nuovaEnergia < 0.0) energia = 0.0;\r\n\t\telse energia = nuovaEnergia;\r\n\r\n\t\tstorico = allarga(storico);\r\n\r\n\t\tstorico[storico.length-1] = energia;\r\n\t\t\r\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\n\t\tpartidaEmpate = new Partida();\r\n\t\tResultadoPartida resultadoPartidaEmpate = new ResultadoPartida();\r\n\t\tresultadoPartidaEmpate.setGolsHTMandante(0);\r\n\t\tresultadoPartidaEmpate.setGolsFTMandante(1);\r\n\t\tresultadoPartidaEmpate.setGolsHTVisitante(0);\r\n\t\tresultadoPartidaEmpate.setGolsFTVisitante(1);\r\n\t\tpartidaEmpate.setResultado(resultadoPartidaEmpate);\r\n\t\t\r\n\t\t\r\n\t\t//Resultado 3 x 1\r\n\t\tpartidaMandanteVence = new Partida();\r\n\t\tResultadoPartida resultadoPartidaMandanteVenceu = new ResultadoPartida();\r\n\t\tresultadoPartidaMandanteVenceu.setGolsHTMandante(2);\r\n\t\tresultadoPartidaMandanteVenceu.setGolsFTMandante(1);\r\n\t\tresultadoPartidaMandanteVenceu.setGolsHTVisitante(0);\r\n\t\tresultadoPartidaMandanteVenceu.setGolsFTVisitante(1);\r\n\t\tpartidaMandanteVence.setResultado(resultadoPartidaMandanteVenceu);\r\n\t\t\r\n\r\n\t\t//Resultado 0 x 2\r\n\t\tpartidaVisitanteVence = new Partida();\r\n\t\tResultadoPartida resultadoPartidaVisitante = new ResultadoPartida();\r\n\t\tresultadoPartidaVisitante.setGolsHTMandante(0);\r\n\t\tresultadoPartidaVisitante.setGolsFTMandante(0);\r\n\t\tresultadoPartidaVisitante.setGolsHTVisitante(0);\r\n\t\tresultadoPartidaVisitante.setGolsFTVisitante(2);\r\n\t\tpartidaVisitanteVence.setResultado(resultadoPartidaVisitante);\r\n\r\n\t\t\r\n\t\t\r\n\t\tanalisaSeCravou.proximaAnalise(analisaSeAcertouGolsDoVencedor);\r\n\t\tanalisaSeAcertouGolsDoVencedor.proximaAnalise(analisaSeAcertouSaldo);\r\n\t\tanalisaSeAcertouSaldo.proximaAnalise(analisaResultadoSimples);\r\n\t\tanalisaResultadoSimples.proximaAnalise(analisaEmpateGarantido);\r\n\t\t\t\r\n\t}", "@LargeTest\n public void testFisheyeApproximateFull() {\n TestAction ta = new TestAction(TestName.FISHEYE_APPROXIMATE_FULL);\n runTest(ta, TestName.FISHEYE_APPROXIMATE_FULL.name());\n }", "@Test\n public void test_getAndSetFieldName_Methods() throws Exception {\n System.out.println(\"test_getAndSet_FieldName_Methods\");\n // FieldSet test values\n\n\n FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED formRequired_FieldSet = new FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED(executeInfo, null);\n\n formRequired_FieldSet.schemaInfo_Positioned = schemaInfoFieldSet_formRequired;\n\n\n\n\n // Test the Special Field-Value Get & Set methods______________________________________________________________\n\n\n\n FieldSet_TestUtilities.test_SetAndGetFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class ,\n \"set_IsRequired\", Symbol.class, \"set_IsRequired__Special\", \"get_IsRequired\",\n notRequired, null, null, notRequired); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n\n FieldSet_TestUtilities.test_SetAndGetFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class ,\n \"set_RequiredImagePath\", String.class, \"set_RequiredImagePath__Special\", \"get_RequiredImagePath\",\n \"\\test\\required.gif\", null, null, \"/images/required.gif\"); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n FieldSet_TestUtilities.test_SetAndGetFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class ,\n \"set_ImageHeight\", Integer.TYPE, \"set_ImageHeight__Special\", \"get_ImageHeight\",\n 11, -1, -1, 6); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n FieldSet_TestUtilities.test_SetAndGetFieldName(executeInfo, formRequired_FieldSet, FieldSetTuple__net$__$unconventionalthinking$__$matrix$__$schema$_CC_$WEB$__$FORM$_S_$FORM$__$REQUIRED.class ,\n \"set_ImageWidth\", Integer.TYPE, \"set_ImageWidth__Special\", \"get_ImageWidth\",\n 12, -1, -1, 7); // last 4 params: expected value, null expected value, unused expected value, default expected value \n\n\n\n }", "@Test(expected = PiezaVendidaException.class)\r\n\tpublic void venderUnaPiezaYaVendida() {\r\n\t\tthis.pieza.reservar();\r\n\t\tthis.pieza.vender();\r\n\t\tthis.pieza.vender();\r\n\t}", "@BeforeEach\n\tpublic void setUp() throws Exception {\n\t\ttestSubject=new Builder(value, sigFig, totalFig, precision)\n\t\t\t\t\t\t.meaning(meaning)\n\t\t\t\t\t\t.originatorsFlag(originatorsFlag)\n\t\t\t\t\t\t.qualityFlag(qualityFlag)\n\t\t\t\t\t\t.qualityFlagString(qualityFlagString)\n\t\t\t\t\t\t.build();\n\t\t\n\n\n\n\n\n\n\n\t}", "@Test\n public void testGetSetTemperaturaInterior() {\n System.out.println(\"getSetTemperaturaInterior\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaInterior(expResult);\n double result = instance.getTemperaturaInterior();\n assertEquals(expResult, result, 0.0);\n }", "@Test\n\tpublic void testSetFecha7(){\n\t\tPlataforma.closePlataforma();\n\t\t\n\t\tfile = new File(\"./data/plataforma\");\n\t\tfile.delete();\n\t\tPlataforma.openPlataforma();\n\t\tPlataforma.login(\"1\", \"contraseniaprofe\");\n\t\t\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.plusDays(2));\n\t\tej1.responderEjercicio(nacho, array);\n\t\t\t\t\n\t\tLocalDate fin = Plataforma.fechaActual.plusDays(10);\n\t\tLocalDate ini = Plataforma.fechaActual.plusDays(3);\n\t\tassertTrue(ej1.setFechaFin(fin));\n\t\tassertFalse(ej1.setFechaIni(ini));\n\t}", "@Test\r\n public void testSetFuncaoPrimaria() {\r\n System.out.println(\"setFuncaoPrimaria\");\r\n FuncaoIntegrante funcaoPrimaria = null;\r\n Integrante instance = new Integrante();\r\n instance.setFuncaoPrimaria(funcaoPrimaria);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void setIndicadorFacturaElectronica(boolean indicadorFacturaElectronica)\r\n/* 199: */ {\r\n/* 200:340 */ this.indicadorFacturaElectronica = indicadorFacturaElectronica;\r\n/* 201: */ }", "@Test \r\n\t\r\n\tpublic void ataqueDeMagoSinMagia(){\r\n\t\tPersonaje perso=new Humano();\r\n\t\tEspecialidad mago=new Hechicero();\r\n\t\tperso.setCasta(mago);\r\n\t\tperso.bonificacionDeCasta();\r\n\t\t\r\n\t\tPersonaje enemigo=new Orco();\r\n\t\tEspecialidad guerrero=new Guerrero();\r\n\t\tenemigo.setCasta(guerrero);\r\n\t\tenemigo.bonificacionDeCasta();\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(44,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t//ataque normal\r\n\t\tperso.atacar(enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(50,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t\t\r\n\t\t// utilizar hechizo\r\n\t\tperso.getCasta().getHechicero().agregarHechizo(\"Engorgio\", new Engorgio());\r\n\t\tperso.getCasta().getHechicero().hechizar(\"Engorgio\",enemigo);\r\n\t\t\r\n\t\tAssert.assertEquals(20,perso.getCasta().getMagia());\r\n\t\tAssert.assertEquals(7,perso.getFuerza());\r\n\t\tAssert.assertEquals(32,perso.getEnergia());\r\n\t\tAssert.assertEquals(17,perso.calcularPuntosDeAtaque());\r\n\t}", "void setFeatures(Features f) throws Exception;", "public void testVocabulary() throws Exception {\n assertVocabulary(a, getDataPath(\"kstemTestData.zip\"), \"kstem_examples.txt\");\n }", "public void testSetEssay() {\r\n s1.setEssay(\"new essay for s1\");\r\n assertEquals(s1.getEssay(), \"new essay for s1\");\r\n }", "@Test\n public void testSetNumero() {\n System.out.println(\"setNumero\");\n try {\n asientoTested.setNumero(0);\n fail();\n } catch (IllegalArgumentException e) {\n assertTrue(\"0 no es un valor valido\", true);\n }\n try {\n asientoTested.setNumero(-1);\n fail();\n } catch (IllegalArgumentException e) {\n assertTrue(\"-1 no es un valor valido\", true);\n }\n try {\n asientoTested.setNumero(30);\n } catch (IllegalArgumentException e) {\n fail(\"30 es un valor valido\");\n }\n try {\n asientoTested.setNumero(31);\n fail();\n } catch (IllegalArgumentException e) {\n assertTrue(\"31 no es un valor valido\", true);\n }\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testSetRaty() {\r\n System.out.println(\"setRaty\");\r\n String raty = \"\";\r\n Faktura instance = new Faktura();\r\n instance.setRaty(raty);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Before\r\n\tpublic void erstelleSUT() {\n\t\tSpiel spiel = new Spiel();\r\n\r\n\t\t// Für jeden Spieler eine Unternehmenskette, damit eine\r\n\t\t// Konkurrenzsituation entsteht\r\n\t\tukette = new Unternehmenskette(\"KetteNummer1\");\r\n\t\tukette1 = new Unternehmenskette(\"KetteNummer2\");\r\n\t\t// Es werden für Unternehmenskette ein Report erstellt. Pro Runde\r\n\t\t// brauchen wir eigentlich ein Report für jede Kette.\r\n\t\tReport report = new Report(1, ukette);\r\n\t\tReport report1 = new Report(1, ukette1);\r\n\t\tukette.hinzufuegenReport(report);\r\n\t\tukette1.hinzufuegenReport(report1);\r\n\t\t// Dem Spiel werden die Unternehmensketten zugeordnet\r\n\t\tspiel.hinzufuegenUnternehmenskette(ukette);\r\n\t\tspiel.hinzufuegenUnternehmenskette(ukette1);\r\n\t\t// Ein Standort, an dem die Ketten konkurrieren sollen, wird angelegt\r\n\r\n\t\t// für den Kunden:\r\n\t\t// Praeferenz für ALLE ist Qualität\r\n\t\tZufall.setzeTestmodus(true);\r\n\t\tZufall.setzeTestZufallszahl(2);\r\n\t\tZufall.setzeTestQualitaet(0.4);\r\n\t\tstandort = new Standort(Standorttyp.Standort1);\r\n\t\tfil1 = new Filiale(standort, ukette);\r\n\t\tfil1.setzeMitarbeiter(1);\r\n\t\tfil1.initialisierenKapazitaet();\r\n\t\tfil2 = new Filiale(standort, ukette1);\r\n\t\tfil2.setzeMitarbeiter(1);\r\n\t\tfil2.initialisierenKapazitaet();\r\n\t\tZufall.setzeTestmodus(false);\r\n\t\tstandort.beeinflussenKunden(ukette, 1);\r\n\t\tstandort.beeinflussenKunden(ukette1, 1);\r\n\t\tZufall.setzeTestmodus(true);\r\n\t\tZufall.setzeTestZufallszahl(2);\r\n\t\tZufall.setzeTestQualitaet(0.4);\r\n\t\tProdukt p1 = new Produkt(Produkttyp.TEE, 20);\r\n\t\tProdukt p2 = new Produkt(Produkttyp.KUCHEN, 10);\r\n\t\tp1.setzePreis(1);\r\n\t\tp1.setzeQualitaet(0.56);\r\n\t\tp2.setzePreis(1.2);\r\n\t\tp2.setzeQualitaet(0.6);\r\n\t\tukette.holeLager().einlagern(p1);\r\n\t\tukette.holeLager().einlagern(p2);\r\n\t\tp1.setzePreis(0.8);\r\n\t\tp1.setzeQualitaet(0.5);\r\n\t\tukette1.holeLager().einlagern(p1);\r\n\t\t// Kette1 bietet Kaffee (P:1; Q:0.56) und Kuchen (P:1.2; Q:0.6) an\r\n\t\t// Kette2 bietet Kaffe (P:0.8, Q:0.5) an.\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Test\n public void testGetTemperaturaInteriorAlvo() {\n System.out.println(\"getSetTemperaturaInteriorAlvo\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaInteriorAlvo(expResult);\n double result = instance.getTemperaturaInteriorAlvo();\n assertEquals(expResult, result, 0.0);\n }", "@Test\n void testSetOf6() {\n testSetOfSuccess(TestSetOf6.class, new TestSetOf6(), ASN1Integer.valueOf(1L), ASN1Integer.valueOf(2L),\n ASN1Integer.valueOf(3L));\n\n testSetOfFailure(TestSetOf6.class, new TestSetOf6(), ASN1Integer.valueOf(1L), ASN1Integer.valueOf(2L));\n }", "public void setIndicadorFactura(Boolean indicadorFactura)\r\n/* 702: */ {\r\n/* 703:769 */ this.indicadorFactura = indicadorFactura;\r\n/* 704: */ }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void testAddDhlwsh() {\n System.out.println(\"addDhlwsh\");\n Mathima mathima = null;\n String hmeromDillwsis = \"\";\n Foititis instance = new Foititis();\n instance.addDhlwsh(mathima, hmeromDillwsis);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void set() {\n float[] a = new float[] {1.001f, 2.002f, 3.003f, 4.004f, 5.005f, 6.006f}; \n float[] b = new float[] {2.0f, 1.0f, 6.0f, 3.0f, 4.0f, 5.0f};\n float[] expect = new float[] {1.0f, 6.0f, 3.0f, 4.0f};\n Vec4f.set(a, 2, b, 1);\n assertTrue(Vec4f.equals(a, 2, expect, 0));\n \n float[] expect2 = new float[] {2.0f, 1.0f, 6.0f, 3.0f};\n Vec4f.set(a, b);\n assertTrue(Vec4f.equals(a, expect2));\n \n \n float[] a3 = new float[] {1.001f, 2.002f, 3.003f, 4.004f, 5.005f, 6.006f}; \n float[] expect3 = new float[] {2.0f, 1.0f, 6.0f, 4.0f};\n Vec4f.set(a3,2, 2.0f, 1.0f, 6.0f, 4.0f );\n assertTrue(Vec4f.equals(a3, 2, expect3, 0));\n \n float[] a4 = new float[4]; \n float[] expect4 = new float[] {2.0f, 1.0f, 6.0f, 4.0f};\n Vec4f.set(a4, 2.0f, 1.0f, 6.0f, 4.0f );\n assertTrue(Vec4f.equals(a4, expect4));\n }", "@Test\n public void testSetId_edificio() {\n System.out.println(\"setId_edificio\");\n int id_edificio = 1;\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n instance.setId_edificio(id_edificio);\n \n }", "public void testGetVectorFactory()\n {\n this.testSetVectorFactory();\n }", "@Test\n public void testSetMatricula() {\n System.out.println(\"setMatricula\");\n String matricula = \"\";\n Usuario instance = null;\n instance.setMatricula(matricula);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic final void testHardZnak() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException \n\t{\n\t\tassertSingleResult(\"6\", fldName, \"Obʺedinenie\");\n\t\tassertSingleResult(\"6\", fldName, \"Obedinenie\");\n\t\t// i have no idea if these should work, or how it should look here\n//\t\tassertSingleDocWithValue(\"6\", fldName, \"Oъedinenie\");\n//\t\tassertSingleDocWithValue(\"6\", fldName, \"Obъedinenie\");\n\t}", "public void set_AllSpreadIndexToOne(){\r\n\t//test to see if the fuel moistures are greater than 33 percent.\r\n\t//if they are, set their index value to 1\r\n\tif ((FFM>33)){ // fine fuel greater than 33?\r\n\t\tGRASS=0; \r\n\t\tTIMBER=0;\r\n\t}else{\r\n\t\tTIMBER=1;\r\n\t}\r\n}", "@Test\n public void testSetOrcamento() throws Exception {\n System.out.println(\"setOrcamento\");\n Orcamento orc = null;\n EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();\n OrcamentoService instance = (OrcamentoService)container.getContext().lookup(\"java:global/classes/OrcamentoService\");\n Orcamento expResult = null;\n Orcamento result = instance.setOrcamento(orc);\n assertEquals(expResult, result);\n container.close();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testSetCodigo() {\n System.out.println(\"setCodigo\");\n int codigo = 0;\n DetalleAhorro instance = new DetalleAhorro();\n instance.setCodigo(codigo);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testSetFuncaoSecundaria() {\r\n System.out.println(\"setFuncaoSecundaria\");\r\n FuncaoIntegrante funcaoSecundaria = null;\r\n Integrante instance = new Integrante();\r\n instance.setFuncaoSecundaria(funcaoSecundaria);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public void setF(){\n\t\tf=calculateF();\n\t}" ]
[ "0.679647", "0.67537713", "0.59006715", "0.57941693", "0.57667935", "0.57325256", "0.5719332", "0.57092446", "0.56765103", "0.5629511", "0.5601785", "0.5588214", "0.55761445", "0.5573869", "0.5572257", "0.5568385", "0.5561497", "0.5550231", "0.55071926", "0.5501349", "0.54654676", "0.5427169", "0.54262924", "0.54064757", "0.5393857", "0.539274", "0.5379427", "0.53786075", "0.53714764", "0.53684264", "0.53469557", "0.53419083", "0.5317179", "0.53132933", "0.5304427", "0.53033966", "0.53001136", "0.52989405", "0.5293983", "0.528906", "0.52864134", "0.5280235", "0.5276109", "0.5271819", "0.5268336", "0.52568376", "0.5256295", "0.52552754", "0.524651", "0.52383405", "0.5235191", "0.52216977", "0.52138954", "0.5212937", "0.52080613", "0.52033025", "0.5196706", "0.5195977", "0.5193185", "0.519304", "0.51837015", "0.5180182", "0.5178332", "0.51616454", "0.5156237", "0.5153217", "0.5152764", "0.5148021", "0.5144815", "0.51407874", "0.5121258", "0.51179314", "0.5117567", "0.5113524", "0.5104057", "0.5101944", "0.51017356", "0.5100282", "0.5093162", "0.50888765", "0.5077984", "0.5072745", "0.5071792", "0.50706226", "0.5069645", "0.5063436", "0.5063307", "0.50526613", "0.50490373", "0.5049011", "0.5043494", "0.5036579", "0.5036086", "0.5034945", "0.50262725", "0.50255257", "0.5021136", "0.5015202", "0.5015108", "0.50132275" ]
0.7991061
0
final Request request = Requests.get(0);
@Override public void onBindViewHolder(ViewHolder holder, int position) { holder.mCountOfCompleted.setText(Requests.get(position).num_donator+""+" / "+Requests.get(position).numofuser); holder.mBloodType.setText(Requests.get(position).bloodtype); holder.mDate.setText(Requests.get(position).getTime()); holder.mLocation.setText(Requests.get(position).location); holder.mName.setText(Requests.get(position).user_name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Requests getRequests() {\n return requests;\n }", "void getRequests();", "TransmissionProtocol.Request getRequest(int index);", "public static Request getRequest() {\n return request;\n }", "List<SdkHttpRequest> getRequests();", "java.util.List<TransmissionProtocol.Request> \n getRequestList();", "public void request() {\n }", "java.util.List<Pokemon.Request> \n getRequestsList();", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "public Request getRequest() {\r\n return localRequest;\r\n }", "private Request() {}", "private Request() {}", "public REQ getRequest() {\n return request;\n }", "Rsp.RequestFromSelf getRequests(int index);", "public Request() {\n\n }", "public java.util.List<RequestFromSelf> getRequestsList() {\n return requests_;\n }", "Pokemon.Request getRequests(int index);", "public GhRequest getRequest() {\r\n return localRequest;\r\n }", "public GhRequest getRequest() {\r\n return localRequest;\r\n }", "public ArrayList<UserRequest> getUserRequests(){return userRequests;}", "public RequestFromSelf getRequests(int index) {\n return requests_.get(index);\n }", "public TransmissionProtocol.Request getRequest(int index) {\n return request_.get(index);\n }", "public java.util.List<TransmissionProtocol.Request> getRequestList() {\n return request_;\n }", "public Pokemon.Request getRequests(int index) {\n return requests_.get(index);\n }", "protected TrellisRequest getRequest() {\n return request;\n }", "pb4client.TransportRequest getReq(int index);", "private void addRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "public List<Integer> getRequests () {\n return requests;\n }", "public static long getRequests() {\n return requests;\n }", "public RequestFromSelf getRequests(int index) {\n return instance.getRequests(index);\n }", "net.iGap.proto.ProtoRequest.Request getRequest();", "public List <State> getRequest ()\n {\n return request;\n }", "public static int getRequestNum(){\n return requestNum;\n }", "public Request() {\n }", "public java.util.List<RequestFromSelf> getRequestsList() {\n return java.util.Collections.unmodifiableList(\n instance.getRequestsList());\n }", "public java.util.List<Pokemon.Request> getRequestsList() {\n return requests_;\n }", "public List<CustomerRequest> getCurrentRequests();", "public GrizzletRequest getRequest();", "public interface Request {\n}", "java.util.List<Rsp.RequestFromSelf>\n getRequestsList();", "public RequestFromSelfOrBuilder getRequestsOrBuilder(\n int index) {\n return requests_.get(index);\n }", "@Override\n\tpublic Request request() {\n\t\treturn originalRequest;\n\t}", "public Request getRequest() {\n String xml = JAXBUtil.getXmlStringFromReader(fromClient, \"</request>\");\n\n if (xml == null) {\n return null;\n }\n\n return JAXBUtil.deserialize(xml, Request.class);\n }", "SdkHttpRequest getLastRequest();", "public DiskRequest getRequest () { return this.request; }", "public ServletRequest getServletRequest() {\n/* 85 */ return this.request;\n/* */ }", "HttpServletRequest getCurrentRequest();", "com.uzak.inter.bean.test.TestRequest.TestBeanRequest getRequest();", "public ProfileRequests() {\n }", "public void addRequest(Request req) {\n\n }", "private Request() {\n initFields();\n }", "@Override\n\tpublic void initRequest() {\n\n\t}", "public ArrayList<TradeRequest> getTradeRequests(){return tradeRequests;}", "private void addRequests(RequestFromSelf value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureRequestsIsMutable();\n requests_.add(value);\n }", "public java.util.List<? extends RequestFromSelfOrBuilder>\n getRequestsOrBuilderList() {\n return requests_;\n }", "private RequestExecution() {}", "public java.util.List<Pokemon.Request> getRequestsList() {\n if (requestsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(requests_);\n } else {\n return requestsBuilder_.getMessageList();\n }\n }", "public String getRequest() {\n return request;\n }", "public synchronized RestRequest getRequest() {\n\t\treturn getContext().getLocalSession().getOpSession().getRequest();\n\t}", "protected List<Request> requestList() {\n return Collections.unmodifiableList(mRequestList);\n }", "private WebSearchRequest createNextRequest() {\n\t\tWebSearchRequest _request = new WebSearchRequest(query);\n\t\t_request.setStart(BigInteger.valueOf(cacheStatus+1));\t\t\t\t\t//Yahoo API starts index with 1, not with 0\n\t\t_request.setResults(getFetchBlockSize());\n\t\treturn _request;\n\t}", "public HttpServletRequest getRequest() {\r\n return request;\r\n }", "private List<Request> getStartRequest () {\n String startUrl = \"http://www.yidianzixun.com/home/q/news_list_for_channel?channel_id=sc4&cstart=20&cend=30&infinite=true&refresh=1&__from__=pc&multi=5&appid=web_yidian\";\n List<Request> list = new ArrayList<>();\n list.add(new Request(startUrl).putExtra(RequestExtraKey.KEY_BEGIN_DATE, getStartTime()));\n return list;\n }", "public Request(){\n\t\tthis(null, null, null);\n\t}", "int getNumOfRetrievelRequest();", "int getNumOfRetrievelRequest();", "public static String getRequest() {\n return request;\n }", "public static ArrayList<Request> loadRequests() {\n ArrayList<Request> requests = new ArrayList<Request>();\n try {\n Connection connection = DBHelper.getConnection();\n PreparedStatement statement = connection.prepareStatement(\"SELECT * \" + \n \"FROM requestsToApprove\");\n ResultSet results = statement.executeQuery();\n while (results.next()) {\n\n Resource tempResource = Resource.getResource(results.getInt(\"rID\"));\n if (tempResource != null) {\n // resource exits\n requests.add(new Request(results.getString(\"username\"),\n tempResource));\n } // otherwise do nothing. Should warn user\n\n }\n return requests;\n\n }\n catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }", "public int getRequestCount() {\n return request_.size();\n }", "public PaymentRequest() {\r\n items = new ArrayList();\r\n }", "public net.iGap.proto.ProtoRequest.Request getRequest() {\n return instance.getRequest();\n }", "public Pokemon.Request getRequests(int index) {\n if (requestsBuilder_ == null) {\n return requests_.get(index);\n } else {\n return requestsBuilder_.getMessage(index);\n }\n }", "public Request sechdule1(ArrayList<Request> requestList) {\n\t\treturn null;\n\t}", "public HttpServletRequest getRequest() {\r\n\t\treturn request_;\r\n\t}", "public void incrementActiveRequests() \n {\n ++requests;\n }", "public int getRequestNumber() {\n return requestNumber;\n }" ]
[ "0.7192788", "0.70103234", "0.67605907", "0.673053", "0.6672421", "0.66449267", "0.66003186", "0.656826", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.65436137", "0.6507568", "0.6507568", "0.64805514", "0.6440942", "0.6418553", "0.63952774", "0.63913476", "0.63747203", "0.63747203", "0.637182", "0.63527155", "0.63363975", "0.63234913", "0.62694037", "0.6265619", "0.62300783", "0.62258476", "0.6193754", "0.6180957", "0.6174187", "0.6173179", "0.61548734", "0.6148974", "0.6145655", "0.6136914", "0.61128783", "0.6102148", "0.60956436", "0.6093701", "0.6088229", "0.6057472", "0.6052264", "0.60440856", "0.5986216", "0.5982408", "0.5976648", "0.59601617", "0.5931321", "0.591803", "0.5909504", "0.5895812", "0.5873283", "0.5871341", "0.58633345", "0.5855687", "0.58404315", "0.58300847", "0.5828433", "0.5809274", "0.58092046", "0.58082014", "0.5797798", "0.5782515", "0.57817537", "0.5763516", "0.5763516", "0.57529736", "0.5748586", "0.57357776", "0.5733865", "0.5732707", "0.5731864", "0.572663", "0.5721248", "0.5707512", "0.5703529" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { String driver = "com.mysql.jdbc.Driver"; String url = "jdbc:mysql://localhost:3306/"; String dbname = "source_mantra_db"; String username = "root"; String password = "ClaraPark728!"; Connection conn = null; //this gets the driver and registers it{ try { try { Class.forName(driver).newInstance(); conn = DriverManager.getConnection(url + dbname,username,password); Statement statement = conn.createStatement(); ResultSet resultSet =statement.executeQuery("select * from books"); int i = 0; String t=null; String a=null; float p = 0.0f;Date d=null; while(resultSet.next()){ i = resultSet.getInt("bookId"); t = resultSet.getString("title"); a = resultSet.getString("author"); p = resultSet.getFloat("price"); d = resultSet.getDate("datePub"); System.out.println(i + "\t" +t+"\t"+a+"\t"+p+"\t"+d); } }finally{ conn.close(); } } catch (InstantiationException | IllegalAccessException | ClassNotFoundException | SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "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 We ought to be able to ask the decryptCipher (independently of it's current state!)
public int getPlaintextLimit(int ciphertextLimit) { return ciphertextLimit - macSize - record_iv_length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String decrypt(String cipherText);", "@Test\r\n public void testDecrypt()\r\n {\r\n System.out.println(\"decrypt\");\r\n String input = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new EncyptDecrypt();\r\n String expResult = \"Hello how are you?\";\r\n String result = instance.decrypt(input, sks);\r\n assertEquals(expResult, result);\r\n }", "@Override\r\n\tpublic String decrypt(String cipher) {\n\t\treturn null;\r\n\t}", "@Override\n public void decrypt() {\n algo.decrypt();\n String cypher = vigenereAlgo(false);\n this.setValue(cypher);\n }", "void decrypt(ChannelBuffer buffer, Channel c);", "@Test\n\tpublic void testEncryptDecrypt() {\n\t\tfor (int i = 0; i < CONFIDENCE; ++i) {\n\t\t\tP plain = getRandomPlaintext();\n\t\t\tR rnd = getPK().getRandom(getRand());\n\t\t\tC cipher = getPK().encrypt(plain, rnd);\n\t\t\t\n\t\t\tP plain2 = getSK().decrypt(cipher);\n\t\t\t\n\t\t\tassertTrue(\"Decryption didn't work\", plain.equals(plain2));\n\t\t}\n\t}", "public abstract void setDecryptMode();", "public void encrypt() {\n // JOptionPane.showMessageDialog(null, \"Encrypting ... Action-Type = \" + DES_action_type);\n int[] flipped_last2_cipher_rounds = new int[64];\n for (int i = 0; i < 32; i++) {\n flipped_last2_cipher_rounds[i] = DES_cipher_sequence[17][i];\n flipped_last2_cipher_rounds[32 + i] = DES_cipher_sequence[16][i];\n }\n DES_ciphertext = select(flipped_last2_cipher_rounds, FP);\n }", "public static String decryptText(byte[] byteCipherText, SecretKey secKey) throws Exception {\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.DECRYPT_MODE, secKey);\r\n\r\n byte[] bytePlainText = aesCipher.doFinal(byteCipherText);\r\n\r\n return new String(bytePlainText);\r\n\r\n}", "char decipher(int charToDeCipher);", "public DecryptionCipherInterface decryptionCipher()\n {\n return this.decryptionCipher;\n }", "public void decrypt() {\n try {\n // Create input and output streams\n System.out.println(\"Loading files\");\n FileInputStream in = new FileInputStream(this.input);\n FileOutputStream out = new FileOutputStream(this.output);\n\n // Skip IV values\n in.getChannel().position(cipher.getBlockSize());\n\n /*\n Using CipherInputStream object to read from encrypted file\n cipherIn reads data from input stream and and returns the decrypted value\n */\n System.out.println(\"Creating cipher stream\");\n CipherInputStream cipherIn = new CipherInputStream(in, this.cipher);\n\n System.out.println(\"Starting file decryption\");\n byte[] buffer = new byte[Common.BLOCK_SIZE];\n int len;\n // Reading from the input stream\n while ((len = cipherIn.read(buffer)) != -1)\n // Write the decrypted message to output stream\n out.write(buffer, 0, len);\n\n // Close all streams\n System.out.println(\"Closing file streams\");\n cipherIn.close();\n out.flush();\n out.close();\n\n System.out.println(\"Decryption complete\");\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }", "void updateDecrypt() {\r\n\r\n for (int i = 0; i < 56; i++) {\r\n queue.set(i, queue.get(i + 8));\r\n }\r\n\r\n //adding results of plaintext XOR keystream to ciphertext\r\n ciphertext.addAll(xor(plaintext, keystream));\r\n\r\n //takes last 8 bits of ciphertext and copies to right 8 bits in queue \r\n int ciphertextIndexOfLast = ciphertext.size();\r\n\r\n //notice here the bits being pushed into queue are from the ciphertext generated during encryption. although the information\r\n //is stored in a variable named \"plaintext,\" the encrypted ciphertext is what was actually passed into that plaintext variable\r\n //for decryption\r\n for (int i = ciphertextIndexOfLast - 8; i < ciphertextIndexOfLast; i++) {\r\n queue.set((i - ((ciphertextIndexOfLast - 8)) + 56), plaintext.get(i));\r\n }\r\n\r\n //using the new queue, populates registers with new data\r\n resetRegisters(queue);\r\n\r\n }", "protected void setDecripted() {\n content = this.aesKey.decrypt(this.content);\n }", "@Test\n\tpublic void testDecrypt() throws GeneralSecurityException, IOException {\n\t\tString cipher = \"4VGdDR9qJlq36bQGI+Sx3A==\";\n\t\tString key = \"io.github.odys-z\";\n\t\tString iv = \"DITVJZA2mSDAw496hBz6BA==\";\n\t\tString plain = AESHelper.decrypt(cipher, key,\n\t\t\t\t\t\t\tAESHelper.decode64(iv));\n\t\tassertEquals(\"Plain Text\", plain.trim());\n\n\t\tplain = \"-----------admin\";\n\t\tkey = \"----------123456\";\n\t\tiv = \"ZqlZsmoC3SNd2YeTTCkbVw==\";\n\t\t// PCKS7 Padding results not suitable for here - AES-128/CBC/NoPadding\n\t\tassertNotEquals(\"3A0hfZiaozpwMeYs3nXdAb8mGtVc1KyGTyad7GZI8oM=\",\n\t\t\t\tAESHelper.encrypt(plain, key, AESHelper.decode64(iv)));\n\t\t\n\t\tiv = \"CTpAnB/jSRQTvelFwmJnlA==\";\n\t\tassertEquals(\"WQiXlFCt5AGCabjSCkVh0Q==\",\n\t\t\t\tAESHelper.encrypt(plain, key, AESHelper.decode64(iv)));\n\t}", "@Override\n public String decrypt(String s) throws NotInAlphabetException{\n passwordPos = 0; //initialize to 0\n return super.decrypt(s); //invoke parent\n }", "public String Decrypt(String s);", "@Override\n\tpublic void Decrypt(Object key) {\n\n\t}", "protected void engineInitDecrypt (Key key)\n throws KeyException {\n Key[] keys = splitKey(key);\n\n des1.initDecrypt(keys[2]);\n des2.initEncrypt(keys[1]);\n des3.initDecrypt(keys[0]);\n }", "@Test\n public void testDecrypt() throws Exception {\n System.out.println(\"decrypt\");\n String seed = \"\";\n String encrypted = \"\";\n String expResult = \"\";\n String result = Crypto.decrypt(seed, encrypted);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private static String decryptAES() {\n\t\tString inFilename = \"7hex.txt\";\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(inFilename);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\tfinal String keyHex = asciiToHex(\"YELLOW SUBMARINE\");\n\t\t\tfinal String cipherHex = br.readLine();\n\n\t\t\tSecretKey key = new SecretKeySpec(DatatypeConverter.parseHexBinary(keyHex), \"AES\");\n\t\t\tCipher cipher = Cipher.getInstance(\"AES/ECB/NoPadding\");\n\t\t\tcipher.init(Cipher.DECRYPT_MODE, key);\n\t\t\tbyte[] result = cipher.doFinal(DatatypeConverter.parseHexBinary(cipherHex));\n\n\t\t\tbr.close();\n\t\t\tfr.close();\n\n\t\t\treturn new String(result);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "@org.junit.Test\n public void testCipher() {\n Assert.assertEquals(\"DITISGEHEIM\", Vigenere.cipher(\"DITISGEHEIM\", \"A\", true));\n Assert.assertEquals(\"DITISGEHEIM\", Vigenere.cipher(\"DITISGEHEIM\", \"A\", false));\n\n Assert.assertEquals(\"B\", Vigenere.cipher(\"A\", \"B\", true));\n Assert.assertEquals(\"A\", Vigenere.cipher(\"B\", \"B\", false));\n\n String plain = \"DUCOFIJMA\";\n String key = \"ABC\";\n String shouldEncryptTo = \"DVEOGKJNC\";\n String actualEncrypted = Vigenere.cipher(plain, key, true);\n Assert.assertEquals(shouldEncryptTo, actualEncrypted);\n String decrypted = Vigenere.cipher(shouldEncryptTo, key, false);\n Assert.assertEquals(plain, decrypted);\n }", "@Override\r\n\tpublic void decipher(ByteBuffer buf, final int size)\r\n\t{\r\n\t\tdecipher(buf, buf.position(), size);\r\n\t}", "public String decode(String cipher)\n {\n \treturn null;\n }", "@Test public void useAppContext() throws Exception {\n Endecrypt test = new Endecrypt();\r\n String oldString = \"lingyang1218yj@\";\r\n System.out.println(\"1、SPKEY为: \" + SPKEY);\r\n System.out.println(\"2、明文密码为: \" + oldString);\r\n String reValue = test.get3DESEncrypt(oldString, SPKEY);\r\n reValue = reValue.trim().intern();\r\n System.out.println(\"3、进行3-DES加密后的内容: \" + reValue);\r\n String reValue2 = test.get3DESDecrypt(reValue, SPKEY);\r\n System.out.println(\"4、进行3-DES解密后的内容: \" + reValue2);\r\n }", "@Override\n public int finalDecrypt(byte[] text) {\n if ( text.length != blockSize()) throw new IllegalArgumentException(\"text.length != cipher.blockSize())\");\n decrypt(text);\n int n = 0;\n for(int i = text.length-1; text[i] == 0x00; --i){\n n += 1;\n }\n return text.length - n - 1;\n }", "@Override\n\tpublic String decryptAES(byte[] key, String cipherText) {\n\t\ttry{\n\t\t\tbyte[] encryptedIvTextBytes = DatatypeConverter.parseHexBinary(cipherText);\n\t int ivSize = 16;\n\n\t byte[] iv = new byte[ivSize];\n\t System.arraycopy(encryptedIvTextBytes, 0, iv, 0, iv.length);\n\t IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);\n\t int encryptedSize = encryptedIvTextBytes.length - ivSize;\n\t byte[] encryptedBytes = new byte[encryptedSize];\n\t System.arraycopy(encryptedIvTextBytes, ivSize, encryptedBytes, 0, encryptedSize);\n\t SecretKeySpec secretKeySpec = new SecretKeySpec(key, \"AES\");\n\t Cipher cipherDecrypt = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t cipherDecrypt.init(Cipher.DECRYPT_MODE, secretKeySpec, ivParameterSpec);\n\t byte[] decrypted = cipherDecrypt.doFinal(encryptedBytes);\n\n\t return new String(decrypted);\n\t\t}catch(Exception e) {\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "public static String decrypt(String seed, String encrypted)\r\nthrows Exception {\r\nbyte[] rawKey = getRawKey(seed.getBytes());\r\nbyte[] enc = Base64.decode(encrypted.getBytes(), Base64.DEFAULT);\r\nbyte[] result = decrypt(rawKey, enc);\r\nreturn new String(result);\r\n}", "public static byte [] decrypt(byte [] cipherText, SecretKey key){\r\n\t\ttry {\r\n\t\t\tbyte [] initVector = unpackFromByteArray(cipherText, 0);\r\n\t\t\tint cursor = initVector.length+2;\t\t\t\r\n\t\t\tCipher cipher = Cipher.getInstance(symmetricKeyCryptoMode);\r\n\t\t\tcipher.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(initVector));\t\t\t\r\n\t\t\treturn cipher.doFinal(cipherText,cursor,cipherText.length-cursor);\r\n\t\t} catch (Exception e){\r\n\t\t\tthrow new ModelException(ExceptionReason.INVALID_PARAMETER, \"Error decrypting cipherText \"+cipherText,e);\r\n\t\t}\r\n\t}", "public EncryptorReturn decrytp(String in) throws CustomizeEncryptorException;", "public byte[] decrypt(byte[] encryptedInput) throws CryptoException, IncompatibleDeviceException {\n try {\n SecretKey key = new SecretKeySpec(getAESKey(), ALGORITHM_AES);\n Cipher cipher = Cipher.getInstance(AES_TRANSFORMATION);\n String encodedIV = storage.retrieveString(KEY_IV_ALIAS);\n if (TextUtils.isEmpty(encodedIV)) {\n encodedIV = storage.retrieveString(OLD_KEY_IV_ALIAS);\n if (TextUtils.isEmpty(encodedIV)) {\n //AES key was JUST generated. If anything existed before, should be encrypted again first.\n throw new CryptoException(\"The encryption keys changed recently. You need to re-encrypt something first.\", null);\n }\n }\n byte[] iv = Base64.decode(encodedIV, Base64.DEFAULT);\n cipher.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(iv));\n return cipher.doFinal(encryptedInput);\n } catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | InvalidAlgorithmParameterException e) {\n /*\n * This exceptions are safe to be ignored:\n *\n * - NoSuchPaddingException:\n * Thrown if NOPADDING is not available. Was introduced in API 1.\n * - NoSuchAlgorithmException:\n * Thrown if the transformation is null, empty or invalid, or if no security provider\n * implements it. Was introduced in API 1.\n * - InvalidKeyException:\n * Thrown if the given key is inappropriate for initializing this cipher.\n * - InvalidAlgorithmParameterException:\n * If the IV parameter is null.\n *\n * Read more in https://developer.android.com/reference/javax/crypto/Cipher\n */\n Log.e(TAG, \"Error while decrypting the input.\", e);\n throw new IncompatibleDeviceException(e);\n } catch (BadPaddingException | IllegalBlockSizeException e) {\n /*\n * Any of this exceptions mean the encrypted input is somehow corrupted and cannot be recovered.\n * - BadPaddingException:\n * Thrown if the input doesn't contain the proper padding bytes. In this case, if the input contains padding.\n * - IllegalBlockSizeException:\n * Thrown only on encrypt mode.\n */\n throw new CryptoException(\"The AES encrypted input is corrupted and cannot be recovered. Please discard it.\", e);\n }\n }", "public String decrypt(String input)\n {\n CaesarCipherTwo cipher = new CaesarCipherTwo(26 - mainKey1, 26 - mainKey2);\n return cipher.encrypt(input);\n }", "default Cipher cipher() {\n return null;\n }", "public void testCaesar(){\n String msg = \"At noon be in the conference room with your hat on for a surprise party. YELL LOUD!\";\n \n /*String encrypted = encrypt(msg, key);\n System.out.println(\"encrypted \" +encrypted);\n \n String decrypted = encrypt(encrypted, 26-key);\n System.out.println(\"decrypted \" + decrypted);*/\n \n \n String encrypted = encrypt(msg, 15);\n System.out.println(\"encrypted \" +encrypted);\n \n }", "public String decrypt(String key);", "@Override\n public void onClick(final View arg0) {\n if (key != null) {\n if (encrypt != null) {\n decrypt = key.decrypt(encrypt);\n messageTxt.setText(new String(decrypt.toByteArray()));\n } else if (messageTxt.getText().length() > 0\n && !messageTxt.getText().equals(\"\")) {\n String encryptedMessage = messageTxt.getText().toString();\n encryptedMessage = encryptedMessage.replace(\" \", \"\");\n encryptedMessage = encryptedMessage.trim();\n Log.i(\"encryptedMessage\", encryptedMessage);\n try {\n decrypt = (BigInteger) key.decrypt(new BigInteger(\n encryptedMessage));\n messageTxt.setText(new String(decrypt.toByteArray()));\n } catch (Exception e) {\n e.printStackTrace();\n Toast.makeText(ShhActivity.this, \"Your text cannot be decrypted\",\n Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(ShhActivity.this, \"Your text cannot be decrypted\",\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "void decryptCode() {\n StringBuilder temp = new StringBuilder(\"\");\n\n // go through entire phrase\n for (int i = 0; i < this.getText().length(); ++i) {\n\n // append char to temp if char at i is not a multiple of z\n if (!(i % Character.getNumericValue(this.secretKey.charAt(7)) == 0) || i == 0)\n temp.append(this.getText().charAt(i));\n }\n\n this.setText(temp);\n\n \n // Step 2:\n\n // split phrase up into words\n ArrayList<String> words = new ArrayList<>(Arrays.asList(this.text.toString().split(\" \")));\n\n for (int i = 0; i < words.size(); ++i) {\n\n // if y1x3x4 is at the end of the word, remove it from word\n \n if (words.get(i).substring(words.get(i).length() - 3, words.get(i).length())\n .equals(this.getSecretKey().substring(3, 6)))\n words.set(i, words.get(i).substring(0, words.get(i).length() - 3));\n\n // if x1x2 is at the end of the word\n else {\n // remove x1x2 from end\n words.set(i, words.get(i).substring(0, words.get(i).length() - 2));\n \n // move last char to beginning\n words.set(i, words.get(i).charAt(words.get(i).length() - 1) + words.get(i).substring(0, words.get(i).length() - 1));\n }\n }\n\n temp = new StringBuilder(\"\");\n\n for (String word : words)\n temp.append(word + \" \");\n\n this.setText(temp);\n }", "public static String breakCipher(String input) {\n int key = getKey(input);\n System.out.println(\"Found key: \"+key);\n CaesarCipherOne cc = new CaesarCipherOne(key);\n return cc.decrypt(input);\n \n }", "@Test\n public void testEncryptDecrypt3() throws InvalidCipherTextException {\n\n // password generation using KDF\n String password = \"Aa1234567890#\";\n byte[] kdf = Password.generateKeyDerivation(password.getBytes(), 32);\n\n byte[] plain = \"0123456789\".getBytes();\n byte[] plainBytes = new byte[100000000];\n for (int i = 0; i < plainBytes.length / plain.length; i++) {\n System.arraycopy(plain, 0, plainBytes, i * plain.length, plain.length);\n }\n\n byte[] encData = AESEncrypt.encrypt(plainBytes, kdf);\n byte[] plainData = AESEncrypt.decrypt(encData, kdf);\n\n assertArrayEquals(plainBytes, plainData);\n\n }", "private static void crypting(boolean encrypt, String filename, String cryptedFilename) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Please provide password as hex-encoded text (16 bytes, i.e. 32 hex-digits): \");\n\t\tSystem.out.print(\">\");\n\t\tString keyText = sc.nextLine();\n\n\t\tSystem.out.println(\"Please provide initialization vector as hex-encoded text (32 hex-digits): \");\n\t\tSystem.out.print(\">\");\n\t\tString ivText = sc.nextLine();\n\t\tsc.close();\n\n\t\tSecretKeySpec keySpec = new SecretKeySpec(Util.hextobyte(keyText), \"AES\");\n\t\tAlgorithmParameterSpec paramSpec = new IvParameterSpec(Util.hextobyte(ivText));\n\t\tCipher cipher = null;\n\n\t\ttry {\n\t\t\tcipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t\t\tcipher.init(encrypt ? Cipher.ENCRYPT_MODE : Cipher.DECRYPT_MODE, keySpec, paramSpec);\n\n\t\t} catch (NoSuchAlgorithmException | NoSuchPaddingException exc) {\n\t\t\tSystem.out.println(\"Transformation is in invalid format or contains padding scheme that is unavailable. \");\n\t\t\tSystem.exit(1);\n\t\t} catch (InvalidKeyException | InvalidAlgorithmParameterException exc) {\n\t\t\tSystem.out.println(\"Given key or algorithm is invalid for this cipher.\");\n\t\t\tSystem.exit(1);\n\n\t\t}\n\n\t\ttry (InputStream inputStream = new BufferedInputStream(new FileInputStream(filename));\n\t\t\t\tOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(cryptedFilename))) {\n\n\t\t\tint nRead;\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tbyte[] inputfile = null;\n\n\t\t\twhile ((nRead = inputStream.read(buffer, 0, buffer.length)) != -1) {\n\t\t\t\tinputfile = cipher.update(buffer, 0, nRead);\n\t\t\t\toutputStream.write(inputfile);\n\t\t\t}\n\n\t\t\tinputfile = cipher.doFinal();\n\t\t\toutputStream.write(inputfile);\n\n\t\t} catch (FileNotFoundException exc) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"File does not exist, is a directory rather than a regular file, or cannot be opened for reading because of some other reason. \");\n\t\t\tSystem.exit(1);\n\n\t\t} catch (IOException exc) {\n\t\t\tSystem.out.println(\"Input stream couldn't be initialized.\");\n\t\t\tSystem.exit(1);\n\n\t\t} catch (IllegalBlockSizeException | BadPaddingException e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Encryption algorithm is unable to process the input data provided or the decrypted data is not bounded by the appropriate padding bytes. \");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tif (encrypt) {\n\t\t\tSystem.out.printf(\"Encryption completed. Generated file %s based on file %s.\\n\", cryptedFilename, filename);\n\t\t} else {\n\t\t\tSystem.out.printf(\"Decryption completed. Generated file %s based on file %s.\\n\", cryptedFilename, filename);\n\t\t}\n\n\t}", "private static int decrypt(int index) {\n\t int k1_inv = 9; \n\t int k2 = 1;\n\t // add 26 to index to avoid error when (index - k2) <= 0\n\t index = (((index+26) - k2)*(k1_inv))%26;\n\t return index;\n }", "@Test\r\n public void testEncrypt()\r\n {\r\n System.out.println(\"encrypt\");\r\n String input = \"Hello how are you?\";\r\n KeyMaker km = new KeyMaker();\r\n SecretKeySpec sks = new SecretKeySpec(km.makeKeyDriver(\"myPassword\"), \"AES\");\r\n EncyptDecrypt instance = new EncyptDecrypt();\r\n String expResult = \"0fqylTncsgycZJQ+J5pS7v6/fj8M/fz4bavB/SnIBOQ=\";\r\n String result = instance.encrypt(input, sks);\r\n assertEquals(expResult, result);\r\n }", "public doEncryptNotifdeEncode() {\n\t}", "public CryptObject reencrypt(Ciphertext ciphertext);", "private String decrypt(SecretKey key, String encrypted) {\n\t\ttry {\n\t\t\tCipher cipher = Cipher.getInstance(\"AES\");\n\t\t\tcipher.init(Cipher.DECRYPT_MODE, key);\n\n\t\t\tbyte[] original = cipher.doFinal(Base64.decodeBase64(encrypted));\n\n\t\t\treturn new String(original);\n\t\t} catch (InvalidKeyException | NoSuchAlgorithmException | BadPaddingException | IllegalBlockSizeException\n\t\t\t\t| NoSuchPaddingException ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}", "public static byte[] decrypt(byte[] cipherText)\r\n {\r\n try {\r\n SecretKeySpec secretKey = new SecretKeySpec(key, ALGORITHM);\r\n Cipher cipher = Cipher.getInstance(ALGORITHM);\r\n cipher.init(Cipher.DECRYPT_MODE, secretKey);\r\n return cipher.doFinal(cipherText);\r\n \r\n } catch (Exception exc) {\r\n exc.printStackTrace();\r\n }\r\n return null;\r\n }", "public String decode(String cipher)\n\t {\n\t \treturn null;\n\t }", "String decryptString(String toDecrypt) throws NoUserSelectedException, IllegalValueException;", "public String decrypt(String text) {\n byte[] dectyptedText = null;\n try {\n // decrypt the text using the private key\n cipher.init(Cipher.DECRYPT_MODE, publicKey);\n byte[] data=Base64.decode(text, Base64.NO_WRAP);\n String str=\"\";\n for(int i=0;i<data.length;i++)\n {\n str+=data[i]+\"\\n\";\n }\n android.util.Log.d(\"ali\",str);\n dectyptedText = cipher.doFinal(Base64.decode(text, Base64.NO_WRAP));\n return new String(dectyptedText);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public static byte[] decrypt(byte[] decrypt, SecretKeySpec keySpec)\n {\n\tbyte[] message = null;\n\t\t\n\ttry {\n\t // Extract the cipher parameters from the end of the input array\n\t byte[] cipherText = new byte[decrypt.length - AES_PARAM_LEN];\n\t byte[] paramsEnc = new byte[AES_PARAM_LEN];\n\t\t\t\n\t System.arraycopy(decrypt, 0, cipherText, 0, cipherText.length);\n\t System.arraycopy(decrypt, cipherText.length, paramsEnc, 0, paramsEnc.length);\n\n\t // Initialize the parameters\n\t AlgorithmParameters params = AlgorithmParameters.getInstance(\"AES\");\n\t params.init(paramsEnc);\n\t \n\t // Initialize the cipher for decryption\n\t Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n\t cipher.init(Cipher.DECRYPT_MODE, keySpec, params);\n\t\t\t\n\t // Decrypt the ciphertext\n\t message = cipher.doFinal(cipherText);\n\n\t} catch (Exception e) {\n\t e.printStackTrace();\n\t}\n\t\t\n\treturn message;\n }", "public interface Cipher {\n\n /*\n return key of the cipher\n */\n int getKey();\n\n /*\n set key of the cipher\n */\n void setKey(int key);\n\n /*\n cipher text/char based on the key\n */\n char cipher(int charToCipher);\n\n /*\n decipher text/char based on the key\n */\n char decipher(int charToDeCipher);\n}", "public ArrayList<Integer> decryptCycle() {\r\n\r\n for (int i = 0; i < 416; i++) {\r\n for (int j = 0; j < 8; j++) {\r\n pulse();\r\n }\r\n updateDecrypt();\r\n }\r\n return ciphertext;\r\n }", "@Test\n public void testSuccessDecryption() throws NoSuchAlgorithmException, ComponentInitializationException {\n action = new PopulateOIDCEncryptionParameters();\n action.setForDecryption(true);\n action.setEncryptionParametersResolver(new MockEncryptionParametersResolver());\n action.initialize();\n\n ActionTestingSupport.assertProceedEvent(action.execute(requestCtx));\n Assert.assertNotNull(profileRequestCtx.getSubcontext(RelyingPartyContext.class)\n .getSubcontext(EncryptionContext.class).getAttributeEncryptionParameters());\n }", "private static void crypto(String filePath1, String filePath2) {\n\n\t\t// Retrieve the cipher\n\t\tCipher cipher;\n\t\ttry {\n\t\t\tcipher = obtainCipher();\n\n\t\t} catch (InvalidKeyException | InvalidAlgorithmParameterException | NoSuchAlgorithmException\n\t\t\t\t| NoSuchPaddingException e) {\n\t\t\tSystem.out.println(\"Exception while obtaining cypher: \" + e.getMessage());\n\t\t\treturn;\n\t\t}\n\n\t\tPath p = Paths.get(filePath1);\n\t\tPath p2 = Paths.get(filePath2);\n\n\t\t// Open the file input and output stream\n\t\ttry (InputStream is = Files.newInputStream(p); OutputStream os = Files.newOutputStream(p2)) {\n\t\t\tbyte[] buff = new byte[4096];\n\n\t\t\twhile (true) {\n\t\t\t\tint r = is.read(buff);\n\n\t\t\t\tif (r == -1) {\n\t\t\t\t\t// Finishing the cipher\n\t\t\t\t\ttry {\n\t\t\t\t\t\tos.write(cipher.doFinal());\n\t\t\t\t\t} catch (IllegalBlockSizeException | BadPaddingException e) {\n\t\t\t\t\t\tSystem.out.println(\"Exception while finalizaing cipher: \" + e.getMessage());\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Update cipher and write into new file\n\t\t\t\tos.write(cipher.update(buff, 0, r));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Exception while opening the file: \" + e.getMessage());\n\t\t\tSystem.exit(1);\n\n\t\t}\n\n\t\tSystem.out.println((encrypt ? \"Encryption\" : \"Decryption\") + \" completed. Generated file \" + filePath2\n\t\t\t\t+ \" based on file \" + filePath1 + \".\");\n\n\t}", "public void decrypt(String s)\n\t{\n\t\tchar chars[] = s.toCharArray();\n\t\tString message = \"\";\n\t\tfor(int i = 0; i < chars.length; i++)\n\t\t{\n\t\t\tif(chars[i] == (char)32)\n\t\t\t{\n\t\t\t\tBigInteger encrypted = new BigInteger(message);\n\t\t\t\tconvertToString(encrypted.modPow(privateKey, publicKey).toString());\n\t\t\t\tmessage = \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmessage += chars[i];\n\t\t\t}\n\t\t}\n\t\tmyView.setDecryptText(myDecryptedMessage);\n\t\tmyDecryptedMessage = \"\";\n\t}", "String decrypt(String text) {\n\t\tchar letter;\n\t\tString finalString = \"\";\t\t\t\t\t// slutliga klartexten\n\t\tint start = key.getStart();\t\t\t\t\t// deklarerar nyckelns startläge\n\t\tint k ;\t\t\t\t\t\t\t\t\t\t// variabel för bokstavens startläge i vanliga alfabetet\n\t\tStringBuilder sb = new StringBuilder();\t\t\t\t\t// skapar en stringbuilder som kan modifieras, bygger upp textsträngar av olika variabler\n\t\t\t\t\t\t\n\t\t// loopen går igenom alla tecken i min krypterade text \t\t\t\n\t\tfor(int i = 0; i < text.length(); i++) {\t\t\t// for-loop för att gå igenom hela texten\t\t\t\t\n\t\t\tletter = text.charAt(i);\t\t\t\t\t\t// ger bokstaven på platsen 0,1,2,3.....\n\t\t\tif(letter == ' ') {\t\t\t\t\t\t\t\t// om det är ett blanktecken så ska det vara ett blanktecken\n\t\t\t\tsb.append(' ');\t\t\t\t\t\t\t\t// sparar blanksteg i en stringBuilder\n\t\t\t} else {\n\t\t\t\tint index=0;\n\t\t\t\tstart=start%26;\t\t\t\t\t\t\t\t// vi behöver endast 26 värden\n\t\t\t\tkey.getStart();\n\n\t\t\t\t\n\t\t\t\twhile(index<26 &&(letter!=key.getLetter(index))) {\t\t// så länge som chiffret inte motsvarar förskjutningen\n\t\t\t\t\tindex++;\t\t\t\t\t\t\t\t\t\t\t// så fortsätter den leta\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\tk=index-start;\n\t\t\t\t\n\t\t\t\tif(k>=0)\n\t\t\t\t\tletter=(char)('A'+k);\n\t\t\t\telse letter=(char)('Z'-(start-1-index));\t\t\t\t// räknar från index, om index mindre än start så räknar den bakåt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// så att det inte blir tokigt mellan Z och A.\n\t\t\t\t\n\t\t\t\tsb.append(letter);\t\t\t\t\t\t\t\t\t\t//lagrar bokstav i stringBuilder\n\t\t\t\tstart++;\t\t\t\t\t\t\t\t\t\t\t\t//chiffret börjar om\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\n\t\t\t}\n\t\treturn sb.toString();\t\t\t\t\t\t\t\t\t\t// returnerar sluttexten\n\t\t}", "public static byte[] encryptText(String plainText,SecretKey secKey) throws Exception{\n\r\n Cipher aesCipher = Cipher.getInstance(\"AES\");\r\n\r\n aesCipher.init(Cipher.ENCRYPT_MODE, secKey);\r\n\r\n byte[] byteCipherText = aesCipher.doFinal(plainText.getBytes());\r\n\r\n return byteCipherText;\r\n\r\n}", "public abstract String decryptMsg(String msg);", "@Override\n\tpublic double decrypt(String encryptedText) {\n\t\treturn cryptoProvider.decrypt(encryptedText);\n\t}", "public EncryptDecrypt(String secureKey) throws EncryptDecryptException {\n\t\ttry {\n\t\t\tthis.writer = Cipher.getInstance(TRANSFORMATION);\n\t\t\tthis.reader = Cipher.getInstance(TRANSFORMATION);\n\t\t\tthis.keyWriter = Cipher.getInstance(KEY_TRANSFORMATION);\n\n\t\t\tinitCiphers(secureKey);\n\n\t\t\t//this.encryptKeys = encryptKeys; \n\t\t}\n\t\tcatch (GeneralSecurityException e) {\n\t\t\tthrow new EncryptDecryptException(e);\n\t\t}\n\t\tcatch (UnsupportedEncodingException e) {\n\t\t\tthrow new EncryptDecryptException(e);\n\t\t}\n\t}", "private char decrypt(char ch) {\n char chUC = Character.toUpperCase(ch);\n int cind = ALPHABET.indexOf(chUC);\n // do not decrypt non letters\n if (cind == -1) return ch;\n \n // index of decrypted character\n int dind = (cind - key) % 26;\n \n // java can return negative from modulo:\n if (dind <0) dind+=26;\n \n // decrypted uppercase character\n char dch = ALPHABET.charAt(dind);\n \n // check original case and return decrypted char\n if (Character.isUpperCase(ch)) return dch;\n else return Character.toLowerCase(dch);\n }", "public String decrypt (String input) {\n return new CaesarCipherTwo(ALPHABET_LENGTH-mainKey1, ALPHABET_LENGTH-mainKey2).encrypt(input);\n }", "protected void engineInitDecrypt (Key key)\n throws KeyException {\n makeKey(key);\n }", "public byte[] decrypt3DES(byte[] key, byte[] data) {\n\n try {\n\n //method def in javadoc\n //arraycopy(Object src, int srcPos, Object dest, int destPos, int length)\n byte[] keyToUse = new byte[24];\n //Pad the key if not yet 24 bytes\n if (key.length == 8) {\n System.arraycopy(key, 0, keyToUse, 0, 8);\n System.arraycopy(key, 0, keyToUse, 8, 8);\n System.arraycopy(key, 0, keyToUse, 16, 8);\n } else if (key.length == 16) {\n System.arraycopy(key, 0, keyToUse, 0, 8);\n System.arraycopy(key, 0, keyToUse, 8, 8);\n System.arraycopy(key, 0, keyToUse, 16, 8);\n }\n\n System.out.println(\"The final Key used for 3DES decryption is\\t\" + ConvertUtils.bytesToHex(keyToUse));\n\n SecretKey secretKey;\n //byte[] keyByte = key.getBytes(\"UTF-8\");\n SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(\"DESede\");\n DESedeKeySpec desedeKeySpec = new DESedeKeySpec(keyToUse);\n\n secretKey = keyFactory.generateSecret(desedeKeySpec);\n\n secretKey = keyFactory.translateKey(secretKey);\n\n Cipher cipher = Cipher.getInstance(\"DESede/ECB/NoPadding\");\n\n //Used as the Initialition vector for CBC mode(variable no used)\n //gives the same result with ECB mode when 16 0s are used\n IvParameterSpec ivp = new IvParameterSpec(ConvertUtils.hexToBytes(\"0000000000000000\"));\n\t\t\t//CBC mode\n //cipher.init(Cipher.DECRYPT_MODE,secretKey,ivp);\n\n //ECB mode\n cipher.init(Cipher.DECRYPT_MODE, secretKey);\n\n ByteArrayOutputStream bos;\n CipherOutputStream cipherOS;\n\n bos = new ByteArrayOutputStream();\n cipherOS = new CipherOutputStream(bos, cipher);\n cipherOS.write(data);\n cipherOS.flush();\n cipherOS.close();\n\n byte[] bytesDecrypted = bos.toByteArray();\n System.out.println(\"Encryption length is\\t\" + bytesDecrypted.length + ConvertUtils.bytesToHex(bytesDecrypted));\n\n return bytesDecrypted;\n } catch (UnsupportedEncodingException ex) {\n System.out.println(\"UnsupportedEncodingException\\t\" + ex.getMessage());\n } catch (NoSuchAlgorithmException ex) {\n System.out.println(\"NoSuchAlgorithmException\\t\" + ex.getMessage());\n } catch (InvalidKeySpecException ex) {\n ex.printStackTrace(System.out);\n System.out.println(\"InvalidKeySpecException\\t\" + ex.getMessage());\n } catch (InvalidKeyException ex) {\n System.out.println(\"InvalidKeyException\\t\" + ex.getMessage());\n }/*catch(IllegalBlockSizeException ex)\n {\n System.out.println(\"IllegalBlockSizeException\\t\"+ex.getMessage());\n }catch(BadPaddingException ex){\n System.out.println(\"BadPaddingException\\t\"+ex.getMessage());\n }*/ catch (NoSuchPaddingException ex) {\n System.out.println(\"NoSuchPaddingException\\t\" + ex.getMessage());\n } catch (IOException ex) {\n System.out.println(\"IOException\\t\" + ex.getMessage());\n }\n return null;\n }", "public String getCipherSuite() {\n/* 176 */ return this.delegate.getCipherSuite();\n/* */ }", "Encryption encryption();", "private void decoding(String cipherText)\n\t{\n\t\ttextLength = cipherText.length();\n\n\t\tdo\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer(textLength);\n\t\t\tchar currentLetter[] = cipherText.toCharArray();\n\n\t\t\tfor(int i = ZERO; i < textLength; i++)\n\t\t\t{\n\t\t\t\tif(i % TWO ==0)\n\t\t\t\tsb.append(currentLetter[i]);\n\t\t\t} // Ending bracket of for loop\n\n\t\t\tfor(int i = ZERO; i < textLength; i++)\n\t\t\t{\n\t\t\t\tif(i % TWO != ZERO)\n\t\t\t\tsb.append(currentLetter[i]);\n\t\t\t} // Ending bracket of for loop\n\n\t\t\tdecodedText = sb.toString();\n\t\t\tcipherText = decodedText;\n\t\t\tloopIntDecode++;\n\t\t}while(loopIntDecode < shiftAmount);\n\t}", "String decrypt(String input) {\n\t\treturn new String(BaseEncoding.base64().decode(input));\n\t}", "public Decryption(int key)\n {\n // initialise instance variables\n shiftKey = key;\n generateCipher();\n }", "public synchronized String getDecryptedText() {\n String text;\n try {\n text = ContentCrypto.decrypt(mText, getSalt(), Passphrase.INSTANCE.getPassPhrase().toCharArray());\n } catch (Exception e) {\n e.printStackTrace();\n text = \"Bad Decrypt\";\n }\n return text;\n }", "public PLEncrypterDecrypter( String textParms )\n {}", "public String decrypt(String encrypted) {\n try {\n IvParameterSpec iv = new IvParameterSpec(initVector);\n SecretKeySpec skeySpec = new SecretKeySpec(privateKey, \"AES\");\n\n Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5PADDING\");\n cipher.init(Cipher.DECRYPT_MODE, skeySpec, iv);\n\n byte[] original = cipher.doFinal(Base64Coder.decode(encrypted));\n\n return new String(original);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n return null;\n }", "public static String decrypt(String strToDecrypt)\n {\n try\n {\n Cipher cipher = Cipher.getInstance(\"AES/ECB/PKCS5PADDING\");\n final SecretKeySpec secretKey = new SecretKeySpec(key, \"AES\");\n cipher.init(Cipher.DECRYPT_MODE, secretKey);\n final String decryptedString = new String(cipher.doFinal(Base64.decodeBase64(strToDecrypt)));\n return decryptedString;\n }\n catch (Exception e)\n {\n e.printStackTrace();\n\n }\n return null;\n }", "public String decrypt(String text) {\n return content.decrypt(text);\n }", "void decryptMessage(String Password);", "protected byte[] decryptAES(byte[] cipherText, byte[] iv, SecretKey secretKey) throws GeneralSecurityException {\n // Instantiate Cipher with the AES Instance and IvParameterSpec with the iv\n final Cipher cipher = Cipher.getInstance(AES_MODE);\n final IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);\n // Initialize cipher with the desired parameters\n cipher.init(Cipher.DECRYPT_MODE, secretKey, ivParameterSpec);\n // Return plaintext\n try {\n return cipher.doFinal(cipherText);\n } catch (BadPaddingException e) {\n throw new BadPaddingException(WRONG_INTEGRITY_MODE);\n }\n }", "@NonNull\n @Override\n protected String decryptBytes(@NonNull final Key key, @NonNull final byte[] bytes,\n @Nullable final DecryptBytesHandler handler)\n throws GeneralSecurityException, IOException {\n final Cipher cipher = getCachedInstance();\n\n try {\n // read the initialization vector from bytes array\n final IvParameterSpec iv = IV.readIv(bytes);\n cipher.init(Cipher.DECRYPT_MODE, key, iv);\n\n // decrypt the bytes using cipher.doFinal(). Using a CipherInputStream for decryption has historically led to issues\n // on the Pixel family of devices.\n // see https://github.com/oblador/react-native-keychain/issues/383\n byte[] decryptedBytes = cipher.doFinal(bytes, IV.IV_LENGTH, bytes.length - IV.IV_LENGTH);\n return new String(decryptedBytes, UTF8);\n } catch (Throwable fail) {\n Log.w(LOG_TAG, fail.getMessage(), fail);\n\n throw fail;\n }\n }", "public interface ICryptoEngine \n{\n\t/**\n\t * Initialize the \n\t * \n\t * @param forEncryption should the engine be initialized for encryption (true) or decryption (false)\n\t * @param key - symmetric encryption key\n\t * \n\t * @throws IllegalStateException - if any initialization parameters are invalid\n\t */\n\tpublic void init(boolean forEncryption, byte[] key) throws IllegalStateException;\n\t\n\t/**\n\t * @return name of the encryption algorithm\n\t */\n\tpublic String getAlgorithmName();\n\t\n\t/**\n\t * @return block size of the encryption algorithm\n\t */\n\tpublic int getBlockSize();\n\t\n\t/**\n\t * Performs an encryption or decryption of a block.\n\t * The amount of processed data depends on the actual algorithm's block size \n\t * \n\t * @param in - buffer with the data to be processed\n\t * @param inOff - starting position of the data at 'in'\n\t * @param out - preallocated buffer to store the processed data\n\t * @param outOff - starting position at 'out'\n\t * \n\t * @return size of processed data (typically algorithm's block size)\n\t * \n\t * @throws IllegalStateException if engine was not initialized or buffers are invalid\n\t */\n\tpublic int processBlock(byte[] in, int inOff, byte[] out, int outOff) throws IllegalStateException;\n\t\n\t/**\n\t * Resets the encryption engine (if required by the implementation)\n\t */\n\tpublic void reset();\n}", "public static String decryptText(byte[] byteCipherText, SecretKey secKey) throws Exception {\n\t\t\n\t\t\n\n\t\tSystem.out.println(secKey.toString());\n\n\t\tCipher aesCipher = Cipher.getInstance(\"AES\");\n\n\t\taesCipher.init(Cipher.DECRYPT_MODE, secKey);\n\n\t\tbyte[] bytePlainText = aesCipher.doFinal(byteCipherText);\n\t\t\n\t\t\n\n\t\treturn new String(bytePlainText);\n\n\t}", "public void runDecrypt(String filePath) {\n try {\n byte[] paramArrayOfbyte = Files.readAllBytes(Paths.get(filePath));\n if (paramArrayOfbyte.length >= 1024 && ((paramArrayOfbyte[0] == 73 && paramArrayOfbyte[1] == 71\n && paramArrayOfbyte[2] == 69 && paramArrayOfbyte[3] == 70)\n || (paramArrayOfbyte[0] == 67 && paramArrayOfbyte[1] == 68 && paramArrayOfbyte[2] == 69\n && paramArrayOfbyte[3] == 70))) {\n // TODO: figure out why it only selects 1024 bytes.\n if (paramArrayOfbyte.length != 1024) {\n byte[] arrayOfByte = new byte[1024];\n System.arraycopy(paramArrayOfbyte, 0, arrayOfByte, 0, 1024);\n paramArrayOfbyte = arrayOfByte;\n }\n\n // Not sure why needing this section?\n byte[] arrayOfByte1 = new byte[12];\n byte[] arrayOfByte2 = new byte[12];\n System.arraycopy(paramArrayOfbyte, 4, arrayOfByte1, 0, 12);\n System.arraycopy(paramArrayOfbyte, 16, arrayOfByte2, 0, 12);\n\n // Init the most important object.\n com.b.a.b.aa.a h = new com.b.a.b.aa.a(new com.b.a.b.aa.b() {\n public byte[] a() {\n return null;\n }\n\n public int b() {\n return 3;\n }\n });\n\n String str1 = (new String(paramArrayOfbyte, 28, 32)).intern();\n // String str2 = a.a(this.n, str1);\n String str2 = Decrypt.DECRYPTION_KEY;\n int i = h.a(str2.getBytes());\n byte[] guessResult = h.b();\n h.b(guessResult); // Digest, this also sets com.b.a.a.aa.a.b. (The hashmap)\n if (i != 0)\n System.out.println(Dumper.dump(h.a(i)));\n else\n System.out.println(\"error in i.\");\n\n // Using the official file reader.\n net.zamasoft.reader.book.a.b randomAccessFile = new net.zamasoft.reader.book.a.b(new File(filePath));\n System.out.println(\"file length: \" + randomAccessFile.length());\n System.out.println(\"key: \" + com.b.a.a.a.c.a.getBLatest());\n ArrayList<Byte> bytes = new ArrayList<>();\n while (!randomAccessFile.isEOF()) {\n byte b = (byte) randomAccessFile.read();\n bytes.add(b);\n }\n assert randomAccessFile.length() == bytes.size();\n byte[] bs = new byte[bytes.size()];\n for (int ii = 0; ii < bs.length; ii++) {\n bs[ii] = bytes.get(ii);\n }\n System.out.println(\"bytes length: \" + bytes.size());\n System.out.println(new String(bs, \"utf-8\"));\n } else {\n System.out.println(\"NOOOOOOOO!\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public static void main(String[] args) \r\n {\r\n /*\r\n String data = \"This is a very important statement.\";\r\n String key = \"How old is my computer?\";\r\n KeyGenerator kGen = new KeyGenerator(key);\r\n String nK = kGen.getNumericKey();\r\n \r\n ArmstrongManager aMgr = new ArmstrongManager(nK);\r\n ColorManager cMgr = new ColorManager(nK);\r\n \r\n String encData =\"\";\r\n int temp;\r\n int i;\r\n for(i =0 ; i < data.length(); i++)\r\n {\r\n temp = aMgr.encrypt(data.charAt(i));\r\n temp = cMgr.encrypt(temp);\r\n encData = encData + (char)temp;\r\n }\r\n \r\n String decData= \"\";\r\n for(i =0 ; i < encData.length(); i++)\r\n {\r\n temp = cMgr.decrypt(encData.charAt(i));\r\n temp = aMgr.decrypt(temp);\r\n \r\n decData = decData + (char)temp;\r\n }\r\n \r\n \r\n System.out.println(\"data: \"+ data + \" \" + data.length());\r\n System.out.println(\"enc data: \"+ encData + \" \" + encData.length());\r\n System.out.println(\"dec data: \"+ decData + \" \" + decData.length());\r\n */\r\n \r\n try\r\n {\r\n //String src = \"d:/a.txt\";//images/kids.jpg\";\r\n //String enc = \"d:/e_a.txt\";//images/e_kids.jpg\";\r\n //String dec = \"d:/d_a.txt\";//images/d_kids.jpg\";\r\n String src = \"d:/images/kids.jpg\";\r\n String enc = \"d:/images/e_kids.jpg\";\r\n String dec = \"d:/images/d_kids.jpg\";\r\n\r\n String key = \"How old is my computer?\";\r\n\r\n Encryptor objEnc = new Encryptor(key);\r\n Decryptor objDec = new Decryptor(key);\r\n\r\n objEnc.encrypt(src, enc);\r\n System.out.println(\"Encryption Done\");\r\n \r\n objDec.decrypt(enc, dec);\r\n System.out.println(\"Decryption Done\");\r\n \r\n\r\n }\r\n catch(Exception ex)\r\n {\r\n System.out.println(\"Err: \" +ex.getMessage());\r\n }\r\n }", "public void decryptMessageClick(View view) {\n\n String receivedMessage = mMessageContentEditText.getText().toString();\n mMessage.extractEncryptedMessageAndKey(receivedMessage);\n\n if(!decryptMessage()) showToast(\"Error! failed to decrypt text.\");\n\n else{\n\n showDecryptedMessage();\n }\n }", "@FunctionalInterface\npublic interface CipherDecryptor {\n\t//Used to decrypt with a provided key\n\tpublic String decrypt(String key);\n\t\n}", "@Around(\"decryptPointCut()\")\n public Object aroundDecrypt(ProceedingJoinPoint joinPoint) throws Throwable {\n Object responseObj = joinPoint.proceed(); // 方法执行\n handleDecrypt(responseObj); // 解密CryptField注解字段\n return responseObj;\n\n }", "public static void decrypt() throws IOException{\n\t\tBufferedInputStream in = new BufferedInputStream(new FileInputStream(inFilename));\n\t\tBufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(outFilename));\n\n\t\tbyte[] key; //holds the encryption key\n\n\t\t//get the file length\n\t\tlong fileLength = (new File(inFilename)).length();\n\n\t\t//check the file header marker\n\t\tbyte[] actualHeader = new byte[FILE_HEADER.length];\n\t\tin.read(actualHeader); //read header from the file\n\t\tif (!Arrays.equals(actualHeader, FILE_HEADER)){\n\t\t\tSystem.out.println(\"The file was not encrypted with this program.\");\n\t\t\tSystem.exit(-1); //-1 is an error code\n\t\t}\n\n\t\t/* STAGE 1 - generate decryption key */\n\t\t//read the #padded bits and random salt from the file\n\t\tbyte[] dataFromFile = new byte[129]; //1 byte for #padded bits + 128 bytes for salt\n\t\tin.read(dataFromFile);\n\t\t//separate the #padded bits for use later\n\t\tint numPad = (int)(dataFromFile[0]);\n\t\t//next, generate the message for CubeHash: (password + dataFromFile)\n\t\tbyte[] message = new byte[password.length + dataFromFile.length];\n\t\tSystem.arraycopy(password, 0, message, 0, password.length); //add the password\n\t\tSystem.arraycopy(dataFromFile, 0, message, password.length, dataFromFile.length); //add dataFromFile\n\t\t//finally, (re)generate the encryption key\n\t\tkey = CryptoLib.CubeHash.doCubeHash(message);\n\n\t\t/* STAGE 2 - apply decryption */\n\t\tint currPiece = 0; //keeps track of which piece of the key is being used\n\t\tbyte[] currData = new byte[8]; //holds the data currently being decrypted\n\n\t\t//split the key into 4 pieces of 128 bits each\n\t\tbyte[][] keyPieces = new byte[4][16];\n\t\tfor (int i = 0; i < 4; i++){\n\t\t\tSystem.arraycopy(key, i*16, keyPieces[i], 0, 16);\n\t\t}\n\n\t\t//loop through the rest of the file (except the last block), 8 bytes at a time\n\t\tfor (long i = FILE_HEADER.length + 129; i < fileLength - 8; i += 8){\n\t\t\t//put a chunk of data in currData\n\t\t\tin.read(currData);\n\n\t\t\t//do RC4(key, unTEA(key, data)), then write to file\n\t\t\tout.write(CryptoLib.RC4.doRC4(keyPieces[currPiece],\n\t\t\t\t\t\tCryptoLib.TEA.doUnTEA(keyPieces[currPiece], currData)));\n\n\t\t\t//increment currPiece\n\t\t\tcurrPiece = (currPiece + 1) % 4;\n\t\t}\n\n\t\t//deal with the last chunk of data:\n\t\t//first, read it..\n\t\tin.read(currData);\n\t\t//..decrypt it..\n\t\tcurrData = CryptoLib.RC4.doRC4(keyPieces[currPiece],\n\t\t\t\tCryptoLib.TEA.doUnTEA(keyPieces[currPiece], currData));\n\t\t//..then write it to the file\n\t\tout.write(currData, 0, (8 - numPad));\n\n\t\t/* STAGE 3 - done! */\n\t\tin.close();\n\t\tout.close();\n\t\tSystem.out.println(\"\\nDecryption complete.\");\n\t}", "@Test\n public void testCryptographyNegative()\n {\n byte[] sensitiveBytes = sensitiveString.getBytes();\n byte[] secure = StateUtils.encrypt(sensitiveBytes, externalContext);\n \n secure[secure.length-5] = (byte) 1;\n try\n {\n byte[] insecure = StateUtils.decrypt(secure, externalContext);\n Assertions.assertFalse(Arrays.equals(insecure, sensitiveBytes));\n }\n catch (Exception e)\n {\n // do nothing\n }\n }", "public String decode(String cipherText){\n String decodedMsg = cipherText;\n for(int i=0;i<n;i++)\n decodedMsg = reShuffle(decodedMsg);\n return decodedMsg;\n }", "static void decryptCBC(String filename, String key, String IV) {\n try {\n Scanner s = new Scanner(new File(filename + EXT), \"UTF-8\");\n File newFile = new File(filename + \"_dec\" + EXT);\n newFile.delete();\n newFile.createNewFile();\n PrintWriter w = new PrintWriter(newFile);\n processHeader(s, w);\n cipherBlock = hexStringToBits(IV);\n while (s.hasNext()) {\n readBlock(s);\n int[] temp = new int[128];\n for (int i = 0; i < block.length; i++) {\n temp[i] = block[i];\n }\n block = stateToBits(AES.decrypt(bitsToHexString(block), key));\n block = xor(block, cipherBlock);\n cipherBlock = temp;\n writeBlock(w);\n }\n w.flush();\n w.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static byte[][] decryptTexts(byte[][] cipherTexts) {\n byte[][] decryptedTexts = new byte[cipherTexts.length][];\n\n for (int i = 0; i < cipherTexts.length; i++) {\n decryptedTexts[i] = AES.decrypt(cipherTexts[i], key);\n }\n\n MainFrame.printToConsole(\"Plain texts are decrypted\\n\");\n return decryptedTexts;\n }", "public String decryptAsNeeded(final String value) {\n\t\ttry {\n\t\t\t// Try a decryption\n\t\t\treturn decrypt(value);\n\t\t} catch (final EncryptionOperationNotPossibleException ignored) {\n\t\t\t// This value could be encrypted, but was not\n\t\t\treturn value;\n\t\t}\n\t}", "public void test() {\n\t\t// super.onCreate(savedInstanceState);\n\t\t// setContentView(R.layout.main);\n\t\tString masterPassword = \"abcdefghijklmn\";\n\t\tString originalText = \"i see qinhubao eat milk!\";\n\t\tbyte[] text = new byte[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' };\n\t\tbyte[] password = new byte[] { 'a' };\n\t\ttry {\n\t\t\tString encryptingCode = encrypt(masterPassword, originalText);\n\t\t\t// System.out.println(\"加密结果为 \" + encryptingCode);\n\t\t\tLog.i(\"加密结果为 \", encryptingCode);\n\t\t\tString decryptingCode = decrypt(masterPassword, encryptingCode);\n\t\t\tSystem.out.println(\"解密结果为 \" + decryptingCode);\n\t\t\tLog.i(\"解密结果\", decryptingCode);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n String secretPass2 = edt.getText().toString().trim();\n String msg = message;\n // originalMessage = msg.replace(User.CHAT_WITH_NAME + \":-\", \"\").trim();\n\n String decryptMessage = AES.decrypt(msg, secretPass2);\n textView.setText(Html.fromHtml(title));\n textView.append(\"\\n\");\n if (decryptMessage != null && !decryptMessage.isEmpty()) {\n\n try {\n textView.append(\" \" + decryptMessage + \" \\n\");\n\n // delay 10 second\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n // Actions to do after 10 seconds\n textView.setText(Html.fromHtml(title));\n textView.append(\"\\n\");\n textView.append(\" \" + message + \" \\n\");\n }\n }, 10000);\n\n // end of delay\n } catch (Exception e) {\n textView.append(\" \" + message + \" \\n\");\n }\n } else {\n textView.append(\" \" + message + \" \\n\");\n Toast.makeText(ChatActivity.this, \"Wrong Key\", Toast.LENGTH_SHORT).show();\n }\n\n b.dismiss();\n }", "protected char decode(char current) {\n int index = 0;\n charactersRead++;\n int startPos = charactersRead % keyword.length();\n changeCipher(keyword.charAt(startPos));\n\n for (int i = 0; i < cipher.length; i++) {\n if (cipher[i] == current)\n index = i;\n }\n return ALPHABET[index];\n }", "public static String decode(String decode, String decodingName) {\r\n\t\tString decoder = \"\";\r\n\t\tif (decodingName.equalsIgnoreCase(\"base64\")) {\r\n\t\t\tbyte[] decoded = Base64.decodeBase64(decode);\r\n\t\t\ttry {\r\n\t\t\t\tdecoder = new String(decoded, \"UTF-8\");\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\tlog.error(\"decode :\" + e.getMessage());\r\n\t\t\t}\r\n\t\t} else if (decodingName.equalsIgnoreCase(\"PBEWithMD5AndDES\")) {\r\n\t\t\t// Key generation for enc and desc\r\n\t\t\tKeySpec keySpec = new PBEKeySpec(secretKey.toCharArray(), salt, iterationCount);\r\n\t\t\tSecretKey key;\r\n\t\t\ttry {\r\n\t\t\t\tkey = SecretKeyFactory.getInstance(\"PBEWithMD5AndDES\").generateSecret(keySpec);\r\n\t\t\t\t// Prepare the parameter to the ciphers\r\n\t\t\t\tAlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount);\r\n\t\t\t\t// Decryption process; same key will be used for decr\r\n\t\t\t\tdcipher = Cipher.getInstance(key.getAlgorithm());\r\n\t\t\t\tdcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);\r\n\t\t\t\tif (decode.indexOf(\"(\", 0) > -1) {\r\n\t\t\t\t\tdecode = decode.replace('(', '/');\r\n\t\t\t\t}\r\n\t\t\t\tbyte[] enc = Base64.decodeBase64(decode);\r\n\t\t\t\tbyte[] utf8 = dcipher.doFinal(enc);\r\n\t\t\t\tString charSet = \"UTF-8\";\r\n\t\t\t\tString plainStr = new String(utf8, charSet);\r\n\t\t\t\treturn plainStr;\r\n\t\t\t} catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException\r\n\t\t\t\t\t| InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException\r\n\t\t\t\t\t| IOException e) {\r\n\t\t\t\tlog.error(\"decode :\" + e.getMessage());\r\n\t\t\t}\r\n\t\t} else if (decodingName.equalsIgnoreCase(\"DES/ECB/PKCS5Padding\")) {\r\n\t\t\t// Get a cipher object.\r\n\t\t\tCipher cipher;\r\n\t\t\ttry {\r\n\t\t\t\tcipher = Cipher.getInstance(\"DES/ECB/PKCS5Padding\");\r\n\t\t\t\tcipher.init(Cipher.DECRYPT_MODE, generateKey());\r\n\t\t\t\t// decode the BASE64 coded message\r\n\t\t\t\tBASE64Decoder decoder1 = new BASE64Decoder();\r\n\t\t\t\tbyte[] raw = decoder1.decodeBuffer(decode);\r\n\t\t\t\t// decode the message\r\n\t\t\t\tbyte[] stringBytes = cipher.doFinal(raw);\r\n\t\t\t\t// converts the decoded message to a String\r\n\t\t\t\tdecoder = new String(stringBytes, \"UTF8\");\r\n\t\t\t} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | IOException\r\n\t\t\t\t\t| IllegalBlockSizeException | BadPaddingException e) {\r\n\t\t\t\tlog.error(\"decode :\" + e.getMessage());\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn decoder;\r\n\t}", "public static void main(String[] args) {\n System.out.println(decryptFunction());\n //decryptFunction();\n\n }", "public static String decrypt(String encrypted, Keys keys) throws GeneralSecurityException {\n Cipher cipher = Cipher.getInstance(ENC_SYSTEM);\n String[] data = COLON.split(encrypted);\n if (data.length != 3) {\n throw new GeneralSecurityException(\"Invalid encrypted data!\");\n }\n String mac = data[0];\n String iv = data[1];\n String cipherText = data[2];\n\n // Verify that the ciphertext and IV haven't been tampered with first\n String dataToAuth = iv + \":\" + cipherText;\n if (!computeMac(dataToAuth, keys.getMacKey()).equals(mac)) {\n throw new GeneralSecurityException(\"Incorrect MAC!\");\n }\n\n // Decrypt the ciphertext\n byte[] ivBytes = decodeBase64(iv);\n cipher.init(Cipher.DECRYPT_MODE, keys.getEncKey(), new IvParameterSpec(ivBytes));\n byte[] bytes = cipher.doFinal(decodeBase64(cipherText));\n\n // Decode the plaintext bytes into a String\n CharsetDecoder decoder = Charset.defaultCharset().newDecoder();\n decoder.onMalformedInput(CodingErrorAction.REPORT);\n decoder.onUnmappableCharacter(CodingErrorAction.REPORT);\n /*\n * We are coding UTF-8 (guaranteed to be the default charset on\n * Android) to Java chars (UTF-16, 2 bytes per char). For valid UTF-8\n * sequences, then:\n * 1 byte in UTF-8 (US-ASCII) -> 1 char in UTF-16\n * 2-3 bytes in UTF-8 (BMP) -> 1 char in UTF-16\n * 4 bytes in UTF-8 (non-BMP) -> 2 chars in UTF-16 (surrogate pair)\n * The decoded output is therefore guaranteed to fit into a char\n * array the same length as the input byte array.\n */\n CharBuffer out = CharBuffer.allocate(bytes.length);\n CoderResult result = decoder.decode(ByteBuffer.wrap(bytes), out, true);\n if (result.isError()) {\n /* The input was supposed to be the result of encrypting a String,\n * so something is very wrong if it cannot be decoded into one! */\n throw new GeneralSecurityException(\"Corrupt decrypted data!\");\n }\n decoder.flush(out);\n return out.flip().toString();\n }", "@Test\n\tpublic void doEncrypt() {\n\t\tString src = \"18903193260\";\n\t\tString des = \"9oytDznWiJfLkOQspiKRtQ==\";\n\t\tAssert.assertEquals(Encryptor.getEncryptedString(KEY, src), des);\n\n\t\t/* Encrypt some plain texts */\n\t\tList<String> list = new ArrayList<String>();\n\t\tlist.add(\"18963144219\");\n\t\tlist.add(\"13331673185\");\n\t\tlist.add(\"18914027730\");\n\t\tlist.add(\"13353260117\");\n\t\tlist.add(\"13370052053\");\n\t\tlist.add(\"18192080531\");\n\t\tlist.add(\"18066874640\");\n\t\tlist.add(\"15357963496\");\n\t\tlist.add(\"13337179174\");\n\t\tfor (String str : list) {\n\t\t\tSystem.out.println(Encryptor.getEncryptedString(KEY, str));\n\t\t}\n\t}", "@Override\n public void decrypt(byte[] text) {\n if ( text.length != blockSize()) throw new IllegalArgumentException(\"text.length != cipher.blockSize())\");\n byte []temp = new byte[nonce.length];\n System.arraycopy(text, 0, temp, 0, blockSize());\n ciper.setKey(key);\n ciper.decrypt(text);\n xor_nonce(text);\n System.arraycopy(temp, 0, nonce, 0, blockSize());\n }", "@SuppressWarnings(\"static-method\")\r\n\tprivate List<String> decrypt(final List<String> encryptedLines)\r\n\t{\r\n\t\tfinal List<String> decryptedLines = new ArrayList<String>();\r\n\t\tchar[] plainChars = null;\r\n\t\tchar[] encryptedChars = null;\r\n\r\n\t\tfor (final String line : encryptedLines)\r\n\t\t{\r\n\t\t\tencryptedChars = line.toCharArray();\r\n\t\t\tplainChars = new char[encryptedChars.length];\r\n\r\n\t\t\tfor (int i = 0; i < encryptedChars.length; i++)\r\n\t\t\t\tplainChars[i] = (char) ((encryptedChars[i] - encryptedLines.size()) - encryptedChars.length);\r\n\r\n\t\t\tdecryptedLines.add(new String(plainChars));\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Decrypted.\");\r\n\r\n\t\treturn decryptedLines;\r\n\t}", "public String entschlüsseln(SecretKey key, String nachricht) throws Exception{\n BASE64Decoder myDecoder2 = new BASE64Decoder();\n byte[] crypted2 = myDecoder2.decodeBuffer(nachricht);\n\n // Entschluesseln\n Cipher cipher2 = Cipher.getInstance(\"AES\");\n cipher2.init(Cipher.DECRYPT_MODE, key);\n byte[] cipherData2 = cipher2.doFinal(crypted2);\n String erg = new String(cipherData2);\n\n // Klartext\n return(erg);\n\n}", "public org.bouncycastle.crypto.BlockCipher getUnderlyingCipher() {\n\t}" ]
[ "0.684754", "0.6815654", "0.669008", "0.6670842", "0.6600068", "0.6591014", "0.65567124", "0.6535944", "0.6532504", "0.6476651", "0.64586586", "0.63901454", "0.63699955", "0.63524896", "0.63283485", "0.6321718", "0.6302555", "0.6294426", "0.6260063", "0.62452555", "0.6242449", "0.6226202", "0.6217549", "0.6182642", "0.6132497", "0.6132019", "0.6131918", "0.6127448", "0.611433", "0.61056644", "0.6064388", "0.60619605", "0.60612243", "0.60361624", "0.60349756", "0.60170233", "0.60091585", "0.5982774", "0.59814256", "0.5931812", "0.5930921", "0.5927392", "0.5922302", "0.59083456", "0.5869291", "0.5865342", "0.585933", "0.585817", "0.584736", "0.5841289", "0.58309174", "0.58298594", "0.5825156", "0.5821897", "0.5819519", "0.5814975", "0.5814409", "0.5795508", "0.5794001", "0.57871455", "0.57833374", "0.57823765", "0.5781757", "0.5780551", "0.57788616", "0.57654226", "0.57606477", "0.5759663", "0.57468665", "0.5741163", "0.5735257", "0.5732576", "0.5732111", "0.5728764", "0.5723842", "0.5718875", "0.5713987", "0.57103103", "0.57100976", "0.57052743", "0.5704885", "0.5702968", "0.57025385", "0.57018423", "0.57003534", "0.56972647", "0.56904274", "0.56870776", "0.5685393", "0.5680095", "0.5665272", "0.5662201", "0.5656494", "0.5647713", "0.5642793", "0.5632691", "0.56309766", "0.562819", "0.56239456", "0.5614934", "0.5611486" ]
0.0
-1
/ additional_data = seq_num + TLSCompressed.type + TLSCompressed.version + TLSCompressed.length
protected byte[] getAdditionalData(long seqNo, short type, int len) throws IOException { byte[] additional_data = new byte[13]; TlsUtils.writeUint64(seqNo, additional_data, 0); TlsUtils.writeUint8(type, additional_data, 8); TlsUtils.writeVersion(context.getServerVersion(), additional_data, 9); TlsUtils.writeUint16(len, additional_data, 11); return additional_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String a(long l10, String string2, long l11, byte[] byArray, String string3) {\n Object object;\n Object object2;\n JSONObject jSONObject;\n long l12;\n Object object3;\n int n10;\n Object object4;\n block17: {\n block16: {\n object4 = byArray;\n n10 = TextUtils.isEmpty((CharSequence)string3);\n object3 = \"\";\n if (n10 != 0) {\n return object3;\n }\n long l13 = System.currentTimeMillis();\n long l14 = 1000L;\n l12 = l13 / l14;\n jSONObject = new JSONObject();\n object2 = \"TLS.ver\";\n String string4 = \"2.0\";\n try {\n jSONObject.put((String)object2, (Object)string4);\n object2 = \"TLS.identifier\";\n string4 = string2;\n }\n catch (JSONException jSONException) {\n l14 = l10;\n string4 = string2;\n break block16;\n }\n try {\n jSONObject.put((String)object2, (Object)string2);\n object2 = \"TLS.sdkappid\";\n l14 = l10;\n }\n catch (JSONException jSONException) {\n l14 = l10;\n break block16;\n }\n try {\n jSONObject.put((String)object2, l10);\n object2 = \"TLS.expire\";\n }\n catch (JSONException jSONException) {\n break block16;\n }\n try {\n jSONObject.put((String)object2, l11);\n object2 = \"TLS.time\";\n jSONObject.put((String)object2, l12);\n break block17;\n }\n catch (JSONException jSONException) {}\n }\n object2.printStackTrace();\n }\n n10 = 0;\n object2 = null;\n if (object4 != null) {\n n10 = 2;\n object4 = Base64.encodeToString((byte[])object4, (int)n10);\n object2 = \"TLS.userbuf\";\n try {\n jSONObject.put((String)object2, object4);\n }\n catch (JSONException jSONException) {\n jSONException.printStackTrace();\n }\n object = object4;\n } else {\n object = null;\n }\n object2 = d.v.o.c.d(l10, string2, l12, l11, string3, object);\n int n11 = ((String)object2).length();\n if (n11 == 0) {\n return object3;\n }\n object4 = \"TLS.sig\";\n try {\n jSONObject.put((String)object4, object2);\n }\n catch (JSONException jSONException) {\n jSONException.printStackTrace();\n }\n object2 = new Deflater();\n object4 = jSONObject.toString();\n object3 = Charset.forName(\"UTF-8\");\n object4 = object4.getBytes((Charset)object3);\n ((Deflater)object2).setInput((byte[])object4);\n ((Deflater)object2).finish();\n object4 = new byte[2048];\n int n12 = ((Deflater)object2).deflate((byte[])object4);\n ((Deflater)object2).end();\n object4 = d.v.o.c.b(Arrays.copyOfRange(object4, 0, n12));\n return new String((byte[])object4);\n }", "Long payloadLength();", "Long getCompressedContentLength(String contentEncoding);", "public byte[] encode() throws IOException {\n byte[] buffer = new byte[12+193];\n LittleEndianDataOutputStream dos = new LittleEndianDataOutputStream(new ByteArrayOutputStream());\n dos.writeByte((byte)0xFD);\n dos.writeByte(payload_length & 0x00FF);\n dos.writeByte(incompat & 0x00FF);\n dos.writeByte(compat & 0x00FF);\n dos.writeByte(packet & 0x00FF);\n dos.writeByte(sysId & 0x00FF);\n dos.writeByte(componentId & 0x00FF);\n dos.writeByte(messageType & 0x00FF);\n dos.writeByte((messageType >> 8) & 0x00FF);\n dos.writeByte((messageType >> 16) & 0x00FF);\n dos.writeLong(tms);\n for (int i=0; i<40; i++) {\n dos.writeInt((int)(data[i]&0x00FFFFFFFF));\n }\n dos.writeFloat(cx);\n dos.writeFloat(cy);\n dos.writeFloat(cz);\n dos.writeFloat(resolution);\n dos.writeFloat(extension);\n dos.writeInt((int)(count&0x00FFFFFFFF));\n dos.writeByte(status&0x00FF);\n dos.flush();\n byte[] tmp = dos.toByteArray();\n for (int b=0; b<tmp.length; b++) buffer[b]=tmp[b];\n int crc = MAVLinkCRC.crc_calculate_encode(buffer, 193);\n crc = MAVLinkCRC.crc_accumulate((byte) IMAVLinkCRC.MAVLINK_MESSAGE_CRCS[messageType], crc);\n byte crcl = (byte) (crc & 0x00FF);\n byte crch = (byte) ((crc >> 8) & 0x00FF);\n buffer[203] = crcl;\n buffer[204] = crch;\n dos.close();\n return buffer;\n}", "com.google.protobuf.ByteString getExtra();", "public byte[] packAllData1(byte[] data) {\n byte[] message = null;\n try{\n //CRC\n int crc16 = alisa.CRC.crc16(data, 0, data.length);\n byte hi = (byte)((crc16 >> 8) & 0xff);\n byte lo = (byte)(crc16 & 0xff);\n\n //crcData <- data + [hi][lo]\n byte[] crcData = new byte[data.length + 2];\n System.arraycopy(data, 0, crcData, 0, data.length);\n crcData[crcData.length-2] = hi;\n crcData[crcData.length-1] = lo;\n System.out.println(\"File-\" + this._id + \": key length = \" +this._key.length);\n byte[] secret = new Encode().encrypt(crcData, this._key);\n\n //check, can the encoded data be decode and crc?. before send it to server\n byte[] decode = new Encode().decrypt(secret, this._key);\n if(alisa.CRC.crc16(decode, 0, decode.length) != 0){\n System.out.println(\"File-\" + this._id + \": Wrong Encoding data!!\");\n return packAllData1(data);\n }\n\n System.out.println(\"File-\" + this._id + \": Password = \" +this._password + \"\\n\" + \"File-\" + this._id + \": Hash = \" + new String(this._key, \"ISO-8859-1\"));\n // //---------show crc data------------------------\n // String show2 = \"\";\n // for(int i =0; i < crcData.length; i++){\n // show2 += (int)crcData[i] + \" \";\n // }\n // System.out.println(\"File-\" + this._id + \" crcData: \" + show2);\n // //------------------------------------------\n // //---------show encnrypted data-----------------\n // String show3 = \"\";\n // for(int i =0; i < secret.length; i++){\n // show3 += (int)secret[i] + \" \";\n // }\n // System.out.println(\"File-\" + this._id + \" secret(no header): \" + show3);\n // //------------------------------------------\n // //---------show decnrypted data-----------------\n // String show4 = \"\";\n // for(int i =0; i < decode.length; i++){\n // show4 += (int)decode[i] + \" \";\n // }\n // System.out.println(\"File-\" + this._id + \" decodeed secret: \" + show4);\n // //------------------------------------------\n\n message = new byte[secret.length + 4];\n System.arraycopy(secret, 0, message, 3, secret.length);\n message[0] = (byte)255;\n message[1] = (byte)((this._id >> 8) & 0xff);\n message[2] = (byte)(this._id & 0xff);\n message[message.length-1] = (byte)254;\n }catch(Exception e){\n System.out.println(\"File-\" + this._id + \": packAllData Error\");\n try { Thread.sleep(this._interval); } catch (InterruptedException ex) { }\n return packAllData1(data);\n }\n return message;\n }", "private static int getEncryptedPacketLength(ByteBuffer buffer) {\n packetLength = 0;\n pos = buffer.position();\n switch (SslUtils.unsignedByte((byte)buffer.get((int)pos))) {\n case 20: \n case 21: \n case 22: \n case 23: \n case 24: {\n tls = true;\n ** break;\n }\n }\n tls = false;\nlbl8: // 2 sources:\n if (tls) {\n majorVersion = SslUtils.unsignedByte((byte)buffer.get((int)(pos + 1)));\n if (majorVersion == 3) {\n packetLength = SslUtils.unsignedShortBE((ByteBuffer)buffer, (int)(pos + 3)) + 5;\n if (packetLength <= 5) {\n tls = false;\n }\n } else {\n tls = false;\n }\n }\n if (tls != false) return packetLength;\n headerLength = (SslUtils.unsignedByte((byte)buffer.get((int)pos)) & 128) != 0 ? 2 : 3;\n majorVersion = SslUtils.unsignedByte((byte)buffer.get((int)(pos + headerLength + 1)));\n if (majorVersion != 2) {\n if (majorVersion != 3) return -2;\n }\n packetLength = headerLength == 2 ? (SslUtils.shortBE((ByteBuffer)buffer, (int)pos) & 32767) + 2 : (SslUtils.shortBE((ByteBuffer)buffer, (int)pos) & 16383) + 3;\n if (packetLength > headerLength) return packetLength;\n return -1;\n }", "int getServerPayloadSizeBytes();", "com.google.protobuf.ByteString\n getExtraBytes();", "public void wrap(boolean mark, int payloadType, int seqNumber, long timestamp, long ssrc, byte[] data, int offset, int len) {\n buffer.clear();\n buffer.rewind();\n\n //no extensions, paddings and cc\n buffer.put((byte)0x80);\n\n byte b = (byte) (payloadType);\n if (mark) {\n b = (byte) (b | 0x80);\n }\n\n buffer.put(b);\n\n //sequence number\n buffer.put((byte) ((seqNumber & 0xFF00) >> 8));\n buffer.put((byte) (seqNumber & 0x00FF));\n\n //timestamp\n buffer.put((byte) ((timestamp & 0xFF000000) >> 24));\n buffer.put((byte) ((timestamp & 0x00FF0000) >> 16));\n buffer.put((byte) ((timestamp & 0x0000FF00) >> 8));\n buffer.put((byte) ((timestamp & 0x000000FF)));\n\n //ssrc\n buffer.put((byte) ((ssrc & 0xFF000000) >> 24));\n buffer.put((byte) ((ssrc & 0x00FF0000) >> 16));\n buffer.put((byte) ((ssrc & 0x0000FF00) >> 8));\n buffer.put((byte) ((ssrc & 0x000000FF)));\n\n buffer.put(data, offset, len);\n buffer.flip();\n buffer.rewind();\n }", "public Paquet(byte []datainitiale) {\n\t\t\n\t\t\n\t\tsuper();\n\t\t\n\t\t_instance_id++;\n\t\tSystem.out.print(\"\\nmnb = \"+_instance_id);\n\n\t\tshort header = (short) ((datainitiale[0] & 255)<<8 | (datainitiale[1] & 255 )) ;\n\t\t\t\n\t\tthis.id = (short) (header >> 2);\n\t\tsizeofsize = (byte) (header & 3);\n\t\t\n\t\tswitch(sizeofsize)\n\t\t{\n\t\t\tcase 0 \t: \tsize = 0;break;\n\t\t\tcase 1 \t:\tsize = datainitiale[2] & 255;break;\n\t\t\tcase 2\t:\tsize = ((datainitiale[2] & 255)<<8 | datainitiale[3]& 255);break;\n\t\t\tdefault :\tsize = (((datainitiale[2] & 255 )<< 16 | (datainitiale[3]& 255) << 8) | datainitiale[4] & 255);\t\n\t\t}\n\t\tint t;\n\tif(size<8192)\n\t\t{this.data = new byte[size];\n\t\tt=size;\n\t\tfor(int i = 0; i < t ; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\tfor(int i = 0; i < datainitiale.length-(t+2+sizeofsize) ; i++)\n\t\t\tdatainitiale[i]=datainitiale[i+t+2+sizeofsize];\n\t\t}\n\telse \n\t\t{this.data=new byte[datainitiale.length-sizeofsize-2];\n\t\tt=datainitiale.length;\n\t\tfor(int i = 0; i <datainitiale.length-sizeofsize-2; i++)\n\t\t\tdata[i] = datainitiale[i+2 + sizeofsize];\n\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t}", "private static byte[] addLengthOctet(String s)\n {\n byte buf[], buf2[];\n\n buf = s.getBytes();\n buf2 = new byte[buf.length + 1];\n System.arraycopy(buf, 0, buf2, 1, buf.length);\n buf2[0] = (byte)buf.length;\n\n return buf2;\n }", "static int getEncryptedPacketLength(ByteBuf buffer, int offset) {\n packetLength = 0;\n switch (buffer.getUnsignedByte((int)offset)) {\n case 20: \n case 21: \n case 22: \n case 23: \n case 24: {\n tls = true;\n ** break;\n }\n }\n tls = false;\nlbl7: // 2 sources:\n if (tls) {\n majorVersion = buffer.getUnsignedByte((int)(offset + 1));\n if (majorVersion == 3) {\n packetLength = SslUtils.unsignedShortBE((ByteBuf)buffer, (int)(offset + 3)) + 5;\n if (packetLength <= 5) {\n tls = false;\n }\n } else {\n tls = false;\n }\n }\n if (tls != false) return packetLength;\n headerLength = (buffer.getUnsignedByte((int)offset) & 128) != 0 ? 2 : 3;\n majorVersion = buffer.getUnsignedByte((int)(offset + headerLength + 1));\n if (majorVersion != 2) {\n if (majorVersion != 3) return -2;\n }\n packetLength = headerLength == 2 ? (SslUtils.shortBE((ByteBuf)buffer, (int)offset) & 32767) + 2 : (SslUtils.shortBE((ByteBuf)buffer, (int)offset) & 16383) + 3;\n if (packetLength > headerLength) return packetLength;\n return -1;\n }", "int add(InputStream data, int length) throws ContentStoreException;", "public static byte[] createBytes()\n\t{\n\t\tfinal byte[] uuid = getTLS().compute();\n\t\tfinal byte[] rtrn = new byte[16];\n\n\t\t// In other to ensure backward compatibility with code\n\t\t// that might expect our logic to return only 16 bytes\n\t\t// we must strip off two bytes from 'uuid' (since it\n\t\t// contains 18 bytes). We'll take the first 16 bytes\n\t\t// since we know that the bytes that changes the most\n\t\t// are put first (see computeBase).\n\n\t\tSystem.arraycopy(uuid, 0, rtrn, 0, 16);\n\n\t\treturn rtrn;\n\t}", "private static byte[] packMtx(byte[] block1, byte[] block2, byte[] block3) {\n int copyDist = Math.max(block1.length, Math.max(block2.length, block3.length)) +\n LzcompCompress.getPreloadSize();\n byte[] compressed1 = LzcompCompress.compress(block1);\n byte[] compressed2 = LzcompCompress.compress(block2);\n byte[] compressed3 = LzcompCompress.compress(block3);\n int resultSize = 10 + compressed1.length + compressed2.length + compressed3.length;\n byte[] result = new byte[resultSize];\n result[0] = 3;\n writeBE24(result, copyDist, 1);\n int offset2 = 10 + compressed1.length;\n int offset3 = offset2 + compressed2.length;\n writeBE24(result, offset2, 4);\n writeBE24(result, offset3, 7);\n System.arraycopy(compressed1, 0, result, 10, compressed1.length);\n System.arraycopy(compressed2, 0, result, offset2, compressed2.length);\n System.arraycopy(compressed3, 0, result, offset3, compressed3.length);\n return result;\n }", "public DataBuffer encode() {\n try {\n\n DataBuffer buffer = new DataBuffer();\n // length\n int length = Header.PROTOCOL_HEADER_LENGTH;\n if (mData != null) {\n length += mData.readableBytes();\n }\n buffer.writeInt(length);\n // header\n mHeader.setLength(length);\n buffer.writeDataBuffer(mHeader.encode(mHeader.getVersion()));\n // data\n buffer.writeDataBuffer(mData);\n\n return buffer;\n } catch (Exception e) {\n //logger.error(\"encode error!!!\", e);\n System.out.println(\"encode error!!\");\n throw new RuntimeException(\"encode error!!!\");\n }\n }", "public abstract byte[] getEncoded() throws CRLException;", "void add(byte[] data, int offset, int length);", "String getCompressedAddress();", "public static String encode(byte[] binaryData) {\n \n if (binaryData == null)\n return null;\n \n int lengthDataBits = binaryData.length*EIGHTBIT;\n if (lengthDataBits == 0) {\n return \"\";\n }\n \n int fewerThan24bits = lengthDataBits%TWENTYFOURBITGROUP;\n int numberTriplets = lengthDataBits/TWENTYFOURBITGROUP;\n int numberQuartet = fewerThan24bits != 0 ? numberTriplets+1 : numberTriplets;\n int numberLines = (numberQuartet-1)/19+1;\n char encodedData[] = null;\n \n encodedData = new char[numberQuartet*4+numberLines];\n \n byte k=0, l=0, b1=0,b2=0,b3=0;\n \n int encodedIndex = 0;\n int dataIndex = 0;\n int i = 0;\n if (fDebug) {\n System.out.println(\"number of triplets = \" + numberTriplets );\n }\n \n for (int line = 0; line < numberLines-1; line++) {\n for (int quartet = 0; quartet < 19; quartet++) {\n b1 = binaryData[dataIndex++];\n b2 = binaryData[dataIndex++];\n b3 = binaryData[dataIndex++];\n \n if (fDebug) {\n System.out.println( \"b1= \" + b1 +\", b2= \" + b2 + \", b3= \" + b3 );\n }\n \n l = (byte)(b2 & 0x0f);\n k = (byte)(b1 & 0x03);\n \n byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);\n \n byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);\n byte val3 = ((b3 & SIGN)==0)?(byte)(b3>>6):(byte)((b3)>>6^0xfc);\n \n if (fDebug) {\n System.out.println( \"val2 = \" + val2 );\n System.out.println( \"k4 = \" + (k<<4));\n System.out.println( \"vak = \" + (val2 | (k<<4)));\n }\n \n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ (l <<2 ) | val3 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ b3 & 0x3f ];\n \n i++;\n }\n encodedData[encodedIndex++] = 0xa;\n }\n \n for (; i<numberTriplets; i++) {\n b1 = binaryData[dataIndex++];\n b2 = binaryData[dataIndex++];\n b3 = binaryData[dataIndex++];\n \n if (fDebug) {\n System.out.println( \"b1= \" + b1 +\", b2= \" + b2 + \", b3= \" + b3 );\n }\n \n l = (byte)(b2 & 0x0f);\n k = (byte)(b1 & 0x03);\n \n byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);\n \n byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);\n byte val3 = ((b3 & SIGN)==0)?(byte)(b3>>6):(byte)((b3)>>6^0xfc);\n \n if (fDebug) {\n System.out.println( \"val2 = \" + val2 );\n System.out.println( \"k4 = \" + (k<<4));\n System.out.println( \"vak = \" + (val2 | (k<<4)));\n }\n \n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ (l <<2 ) | val3 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ b3 & 0x3f ];\n }\n \n // form integral number of 6-bit groups\n if (fewerThan24bits == EIGHTBIT) {\n b1 = binaryData[dataIndex];\n k = (byte) ( b1 &0x03 );\n if (fDebug) {\n System.out.println(\"b1=\" + b1);\n System.out.println(\"b1<<2 = \" + (b1>>2) );\n }\n byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ k<<4 ];\n encodedData[encodedIndex++] = PAD;\n encodedData[encodedIndex++] = PAD;\n } else if (fewerThan24bits == SIXTEENBIT) {\n b1 = binaryData[dataIndex];\n b2 = binaryData[dataIndex +1 ];\n l = ( byte ) ( b2 &0x0f );\n k = ( byte ) ( b1 &0x03 );\n \n byte val1 = ((b1 & SIGN)==0)?(byte)(b1>>2):(byte)((b1)>>2^0xc0);\n byte val2 = ((b2 & SIGN)==0)?(byte)(b2>>4):(byte)((b2)>>4^0xf0);\n \n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val1 ];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ val2 | ( k<<4 )];\n encodedData[encodedIndex++] = lookUpBase64Alphabet[ l<<2 ];\n encodedData[encodedIndex++] = PAD;\n }\n \n //encodedData[encodedIndex] = 0xa;\n \n return new String(encodedData);\n }", "private byte[] encode(byte[] data) {\n int lc = (data==null ? 0 : data.length);\n int L = 0;\n\n // decide whether short or extended encoding is to be used\n boolean useShort = (lc<256)&&(le<256);\n\n // compute total length of body\n L += lc; // length due to data bytes\n\n if (lc>0) // need to code Lc\n L = (useShort ? L+1 : L+3); // coding Lc as 1 or 3 bytes\n\n if (le>=0) // need to code Le\n L = (useShort ? L+1 : L+2); // coding Le as 1 or 2 bytes\n\n if (L==0) \n return null;\n\n // perform encoding\n byte[] body = new byte[L];\n int l=0;\n\n if (lc>0) { // need to code Lc\n\n if (useShort) // Lc fits in a single byte\n body[l++]=(byte)(lc&0xFF);\n else { // Lc requires 3 bytes\n body[l] =(byte)0x00; // marker indicating extended encoding\n body[l+1]=(byte)((lc>>8)&0xFF);\n body[l+2]=(byte)(lc&0xFF);\n l+=3;\n }\n\n // code data\n System.arraycopy(data, 0, body, l, lc);\n l += lc;\n } // if (lc > 0)\n\n if (le>=0) { // need to code Le\n\n if (useShort) // Le fits in a single byte\n body[l++]=(byte) (le&0xFF); // handle coding of 256\n else { // Le fits in two bytes\n body[l] =(byte)((le>>8)&0xFF);\n body[l+1]=(byte)(le&0xFF);\n }\n\n } // if (le >= 0)\n return body;\n }", "byte[] deflate(byte[] data) throws IOException;", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "public interface CompressedResource {\r\n\t\r\n\t/**\r\n\t * Return the supported encoding from the list of allowable encodings from the user agent\r\n\t * \r\n\t * If none are supported return null.\r\n\t * \r\n\t * @param acceptableEncodings\r\n\t * @return - null if none of the given encodings are supported, otherwise the content encoding header value to be used\r\n\t */\r\n\tString getSupportedEncoding(String acceptableEncodings);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param contentEncoding - the supported encoding returned from getSupportedEncoding\r\n\t * @param out\r\n\t * @param range\r\n\t * @param params\r\n\t * @param contentType\r\n\t * @throws IOException\r\n\t * @throws NotAuthorizedException\r\n\t * @throws BadRequestException\r\n\t * @throws NotFoundException \r\n\t */\r\n\tvoid sendCompressedContent( String contentEncoding, OutputStream out, Range range, Map<String,String> params, String contentType ) throws IOException, NotAuthorizedException, BadRequestException, NotFoundException;\r\n\t\r\n\t/**\r\n\t * Return the content length, if known, for the given encoding. Otherwise \r\n\t * return null\r\n\t * \r\n\t * @param contentEncoding\r\n\t * @return - null, or the length of the content encoded with the given encoding\r\n\t */\r\n\tLong getCompressedContentLength(String contentEncoding);\r\n}", "@Override\n protected void readAdditionalFields(final UnsafeBufferSerializer buffer)\n {\n final int encodedSessionKeySize = buffer.readInt();\n\n // If the internal byte array for they key don't have the right size, create it again\n if (this.encodedSessionKey.length != encodedSessionKeySize)\n {\n this.encodedSessionKey = new byte[encodedSessionKeySize];\n }\n\n // Read the session key\n buffer.readBytes(this.encodedSessionKey);\n }", "private void m43017g() {\n try {\n this.f40245p = this.f40244o + Long.valueOf(this.f40240k.getHeaderField(\"Content-Length\")).longValue();\n } catch (Exception e) {\n this.f40245p = -1;\n }\n }", "public TlsClientImpl(DtlsPacketTransformer packetTransformer)\n {\n super(BC_TLS_CRYPTO);\n this.packetTransformer = packetTransformer;\n }", "com.google.protobuf.ByteString\n getField1832Bytes();", "public byte[] getAdditionalInternalData() {\n\t\treturn this.additionalIntData;\n\t}", "public byte[] getRawPayloadBytesPadded(byte[] data) {\r\n byte[] encData = subbytes(data, BLDevice.DEFAULT_BYTES_SIZE, data.length);\r\n byte[] newBytes = null;\r\n if(encData.length > 0) {\r\n int numpad = 16 - (encData.length % 16);\r\n\r\n newBytes = new byte[encData.length+numpad];\r\n for(int i = 0; i < newBytes.length; i++) {\r\n \t if(i < encData.length)\r\n \t\t newBytes[i] = encData[i];\r\n \t else\r\n \t\t newBytes[i] = 0x00;\r\n }\r\n }\r\n return newBytes;\r\n }", "@Override\n public void readFieldsCompressed(DataInput in) throws IOException {\n int length = in.readInt();\n byte[] array = this.array;\n if (array == null || array.length != length) {\n array = new byte[length];\n }\n in.readFully(array);\n this.length = length;\n this.array = array;\n }", "@Override\n protected FrameData getFrameData(byte[] frameHeader, byte[] content, int length)\n {\n int crc32c = (content[3] & 0xFF) << 24 |\n (content[2] & 0xFF) << 16 |\n (content[1] & 0xFF) << 8 |\n (content[0] & 0xFF);\n\n return new FrameData(crc32c, 4);\n }", "protected abstract ByteBuf decompress(ByteBuf compressed, int originalLength) throws Exception;", "private byte[] buildBytes() {\n byte[] message = new byte[4 + 2 + 2 + 1 + data.getLength()];\n System.arraycopy(id.getBytes(), 0, message, 0, 4);\n System.arraycopy(sq.getBytes(), 0, message, 4, 2);\n System.arraycopy(ack.getBytes(), 0, message, 6, 2);\n message[8] = flag.getBytes();\n System.arraycopy(data.getBytes(), 0, message, 9, data.getBytes().length);\n return message;\n }", "private byte[] getEncoded0() throws java.security.cert.CRLException {\n /*\n // Can't load method instructions: Load method exception: null in method: sun.security.x509.X509CRLEntryImpl.getEncoded0():byte[], dex: in method: sun.security.x509.X509CRLEntryImpl.getEncoded0():byte[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: sun.security.x509.X509CRLEntryImpl.getEncoded0():byte[]\");\n }", "private long writeOrCountBytes(okio.BufferedSink r19, boolean r20) throws java.io.IOException {\n /*\n r18 = this;\n r4 = 0\n r3 = 0\n if (r20 == 0) goto L_0x000c\n okio.Buffer r3 = new okio.Buffer\n r3.<init>()\n r19 = r3\n L_0x000c:\n r12 = 0\n r0 = r18\n java.util.List<okhttp3.MultipartBody$Part> r15 = r0.parts\n int r14 = r15.size()\n L_0x0015:\n if (r12 >= r14) goto L_0x00c0\n r0 = r18\n java.util.List<okhttp3.MultipartBody$Part> r15 = r0.parts\n java.lang.Object r13 = r15.get(r12)\n okhttp3.MultipartBody$Part r13 = (okhttp3.MultipartBody.Part) r13\n okhttp3.Headers r11 = r13.headers\n okhttp3.RequestBody r2 = r13.body\n byte[] r15 = DASHDASH\n r0 = r19\n r0.write(r15)\n r0 = r18\n okio.ByteString r15 = r0.boundary\n r0 = r19\n r0.write(r15)\n byte[] r15 = CRLF\n r0 = r19\n r0.write(r15)\n if (r11 == 0) goto L_0x0065\n r9 = 0\n int r10 = r11.size()\n L_0x0043:\n if (r9 >= r10) goto L_0x0065\n java.lang.String r15 = r11.name(r9)\n r0 = r19\n okio.BufferedSink r15 = r0.writeUtf8(r15)\n byte[] r16 = COLONSPACE\n okio.BufferedSink r15 = r15.write(r16)\n java.lang.String r16 = r11.value(r9)\n okio.BufferedSink r15 = r15.writeUtf8(r16)\n byte[] r16 = CRLF\n r15.write(r16)\n int r9 = r9 + 1\n goto L_0x0043\n L_0x0065:\n okhttp3.MediaType r8 = r2.contentType()\n if (r8 == 0) goto L_0x0081\n java.lang.String r15 = \"Content-Type: \"\n r0 = r19\n okio.BufferedSink r15 = r0.writeUtf8(r15)\n java.lang.String r16 = r8.toString()\n okio.BufferedSink r15 = r15.writeUtf8(r16)\n byte[] r16 = CRLF\n r15.write(r16)\n L_0x0081:\n long r6 = r2.contentLength()\n r16 = -1\n int r15 = (r6 > r16 ? 1 : (r6 == r16 ? 0 : -1))\n if (r15 == 0) goto L_0x00b2\n java.lang.String r15 = \"Content-Length: \"\n r0 = r19\n okio.BufferedSink r15 = r0.writeUtf8(r15)\n okio.BufferedSink r15 = r15.writeDecimalLong(r6)\n byte[] r16 = CRLF\n r15.write(r16)\n L_0x009d:\n byte[] r15 = CRLF\n r0 = r19\n r0.write(r15)\n if (r20 == 0) goto L_0x00ba\n long r4 = r4 + r6\n L_0x00a7:\n byte[] r15 = CRLF\n r0 = r19\n r0.write(r15)\n int r12 = r12 + 1\n goto L_0x0015\n L_0x00b2:\n if (r20 == 0) goto L_0x009d\n r3.clear()\n r16 = -1\n L_0x00b9:\n return r16\n L_0x00ba:\n r0 = r19\n r2.writeTo(r0)\n goto L_0x00a7\n L_0x00c0:\n byte[] r15 = DASHDASH\n r0 = r19\n r0.write(r15)\n r0 = r18\n okio.ByteString r15 = r0.boundary\n r0 = r19\n r0.write(r15)\n byte[] r15 = DASHDASH\n r0 = r19\n r0.write(r15)\n byte[] r15 = CRLF\n r0 = r19\n r0.write(r15)\n if (r20 == 0) goto L_0x00e9\n long r16 = r3.size()\n long r4 = r4 + r16\n r3.clear()\n L_0x00e9:\n r16 = r4\n goto L_0x00b9\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.MultipartBody.writeOrCountBytes(okio.BufferedSink, boolean):long\");\n }", "@Override\n\tpublic long compressedSize() {\n\t\treturn this.compressedLength.get();\n\t}", "void setDQ1( byte[] buffer, short offset, short length) throws CryptoException;", "public void addIndex(String key, String value, String timer, int totalCopies, int copyNum, boolean timerType, String userId, int layerID, String time, java.security.cert.Certificate c) {\n origkey = key;\n origvalue = value;\n origtimer = timer;\n origtotalCopies = totalCopies;\n origcopyNum = copyNum;\n origtimerType = timerType;\n origuserId = userId;\n origLayerId = layerID;\n origTime = time;\n origCerti = c;\n\n\n // Verifying Digital Signature of Value using Certificate\n\n Verif v = new Verif();\n\n boolean b1 = v.Verify_Digital_Signature(origCerti, origvalue);\n\n // If signature is verified\n\n if (b1) {\n\n boolean b2 = checkTable(origLayerId);\n if (b2) {\n\n //If table exists.Check if copy is original or not.\n\n boolean b3 = checkiforiginal(copyNum);\n if (!b3) {\n utility.add_entry(origLayerId, origkey, origvalue, origtimer, origtotalCopies, origcopyNum, origtimerType, origuserId, origTime, origCerti);\n userToCertMap(origuserId, origCerti);\n System.out.println(\"Entry added\");\n } else {\n\n // If copy is original,calculate root nodes for redundant copies and put XML files containing all details for key valu pair in buffer for Glue Code to pick up.\n\n utility.add_entry(origLayerId, origkey, origvalue, origtimer, origtotalCopies, origcopyNum, origtimerType, origuserId, origTime, origCerti);\n userToCertMap(origuserId, origCerti);\n System.out.println(\"Entry added\");\n String[] s = rootcalc(origkey);\n File f1 = XMLforRoot(s[0], origkey, origvalue, origLayerId, 1, origtimer, origtimerType, origuserId, origTime, origCerti);\n File f2 = XMLforRoot(s[1], origkey, origvalue, origLayerId, 2, origtimer, origtimerType, origuserId, origTime, origCerti);\n IMbuffer.addToIMOutputBuffer(f1);\n IMbuffer.addToIMOutputBuffer(f2);\n }\n } else {\n\n //If table doesn't exist then create table and add entries accordingly as specified above for copy number.\n\n utility.createtable(origLayerId);\n\n boolean b4 = checkiforiginal(copyNum);\n if (!b4) {\n\n utility.add_entry(origLayerId, origkey, origvalue, origtimer, origtotalCopies, origcopyNum, origtimerType, origuserId, origTime, origCerti);\n userToCertMap(origuserId, origCerti);\n System.out.println(\"Entry added\");\n } else {\n utility.add_entry(origLayerId, origkey, origvalue, origtimer, origtotalCopies, origcopyNum, origtimerType, origuserId, origTime, origCerti);\n userToCertMap(origuserId, origCerti);\n String[] s = rootcalc(origkey);\n File f1 = XMLforRoot(s[0], origkey, origvalue, origLayerId, 1, origtimer, origtimerType, origuserId, origTime, origCerti);\n File f2 = XMLforRoot(s[1], origkey, origvalue, origLayerId, 2, origtimer, origtimerType, origuserId, origTime, origCerti);\n IMbuffer.addToIMOutputBuffer(f1);\n IMbuffer.addToIMOutputBuffer(f2);\n\n }\n\n }\n\n } else {\n\n //If Signature is not verified entry will not be added.\n\n System.out.println(\"Signature not verified\");\n }\n\n }", "protected void encode() {\t\n\t\tsuper.rawPkt = new byte[12 + this.pktData.length];\n\t\tbyte[] tmp = StaticProcs.uIntLongToByteWord(super.ssrc);\n\t\tSystem.arraycopy(tmp, 0, super.rawPkt, 4, 4);\n\t\tSystem.arraycopy(this.pktName, 0, super.rawPkt, 8, 4);\n\t\tSystem.arraycopy(this.pktData, 0, super.rawPkt, 12, this.pktData.length);\n\t\twriteHeaders();\n\t\t//System.out.println(\"ENCODE: \" + super.length + \" \" + rawPkt.length + \" \" + pktData.length);\n\t}", "public byte [] getTransportHeader_DL(int payloadLength) {\n byte [] packet = new byte[ETH_HEADER_SIZE];\n packet[0] = (byte)(_downloader_servicePort | 0x80);\n packet[1] = _downloader_servicePort ;\n packet[2] = control;\n //packet[3] = (byte) _interfaceKind.ordinal();\n packet[3] = (byte) 0x02;\n\n // length bytes, length is 2 bytes\n int Value0 = payloadLength & 0x00ff;\n int Value1 = payloadLength >> 8;\n packet[4] = (byte)Value0;\n packet[5] = (byte)Value1;\n packet[6] = (byte)_messageProtocol.ordinal();\n packet[7] = (byte)0;\n\n int xorValue = packet[0];\n\n packet[7] = GetTransportMessageCheckSum(packet);\n return packet;\n }", "public static native int getSaioVersion(String packagename, int type, byte[] info);", "private byte[] packObject(ProtocolObject obj) {\n ByteArrayOutputStream bos = new ByteArrayOutputStream(37);\n for (int i = 0; i < 5; i++) {\n \t// write header bytes...\n \tbos.write(0);\n }\n packObject(obj, bos);\n return bos.toByteArray();\n }", "public String getCompressionInfo() {\r\n String msg = null;\r\n if (!compressionInfoCleared) {\r\n int bytesInSession = bop.getCount() - countAtSessionStart;\r\n if(bytesInSession != bytesWrittenSinceSessionStart) {\r\n msg = \"Compressed data from \" + bytesWrittenSinceSessionStart + \" to \" + bytesInSession + \" bytes\";\r\n }\r\n else if(abandonedGzipLen > 0) {\r\n msg = \"Abandoned GZIP because \" + bytesWrittenAtLastAbandonCheck + \" bytes compressed only to \" + abandonedGzipLen + \" (\" + ((int) Math.round(100 * (double) abandonedGzipLen / bytesWrittenAtLastAbandonCheck)) + \"%). Final Data Length = \" + bytesWrittenSinceSessionStart + \"(=\" + bytesInSession + ')';\r\n }\r\n }\r\n return msg;\r\n }", "private void storeHeaderDataToByte() {\n\t\tString byteNumStr = String.format(\"%24s\",\n\t\t\t\tInteger.toBinaryString(encodedByte.length)).replace(' ',\n\t\t\t\t'0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\t.substring(0, 8));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\t.substring(8, 16));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(byteNumStr\n\t\t\t\t.substring(16, 24));\n\n\t\t\n\t\tString widthStr = String.format(\"%16s\",\n\t\t\t\tInteger.toBinaryString(width)).replace(' ', '0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(widthStr\n\t\t\t\t.substring(0, 8));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(widthStr\n\t\t\t\t.substring(8, 16));\n\n\t\t\n\t\tString heightStr = String.format(\"%16s\",\n\t\t\t\tInteger.toBinaryString(height)).replace(' ', '0');\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(heightStr\n\t\t\t\t.substring(0, 8));\n\t\tencodedByte[encodingIndex++] = convert8BitsStrToByte(heightStr\n\t\t\t\t.substring(8, 16));\n\n\t\tencodedByte[encodingIndex++] = (byte) numOfTableValue;\n\t\tencodedByte[encodingIndex++] = (byte) byteSizeForCode;\n\t\tencodedByte[encodingIndex++] = (byte) extraBits;\n\t}", "private static byte[] m2534a(Context context, byte[] bArr) {\n try {\n return ClientInfo.m2404a(context, bArr);\n } catch (CertificateException e) {\n e.printStackTrace();\n } catch (InvalidKeySpecException e2) {\n e2.printStackTrace();\n } catch (NoSuchAlgorithmException e3) {\n e3.printStackTrace();\n } catch (IOException e4) {\n e4.printStackTrace();\n } catch (InvalidKeyException e5) {\n e5.printStackTrace();\n } catch (NoSuchPaddingException e6) {\n e6.printStackTrace();\n } catch (IllegalBlockSizeException e7) {\n e7.printStackTrace();\n } catch (BadPaddingException e8) {\n e8.printStackTrace();\n }\n return null;\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:55:06.822 -0500\", hash_original_method = \"2D2F8FB9FD0DE4D4C70B238FD2D4C88B\", hash_generated_method = \"CFB81A0992BCD18B37272999971C8572\")\n \npublic ContentLength(int length) {\n super(NAME);\n this.contentLength = Integer.valueOf(length);\n }", "public void addSDESInfo(RTCPSDES chunk) {\n int ci = 0;\n while (ci < chunk.items.length && chunk.items[ci].type != 1) {\n ci++;\n }\n String s = new String(chunk.items[ci].data);\n String sourceinfocname = null;\n if (this.sourceInfo != null) {\n sourceinfocname = this.sourceInfo.getCNAME();\n }\n if (!(this.sourceInfo == null || s.equals(sourceinfocname))) {\n this.sourceInfo.removeSSRC(this);\n this.sourceInfo = null;\n }\n if (this.sourceInfo == null) {\n this.sourceInfo = this.cache.sourceInfoCache.get(s, this.ours);\n this.sourceInfo.addSSRC(this);\n }\n if (chunk.items.length > 1) {\n for (int i = 0; i < chunk.items.length; i++) {\n s = new String(chunk.items[i].data);\n switch (chunk.items[i].type) {\n case 2:\n if (this.name != null) {\n this.name.setDescription(s);\n break;\n } else {\n this.name = new SourceDescription(2, s, 0, false);\n break;\n }\n case 3:\n if (this.email != null) {\n this.email.setDescription(s);\n break;\n } else {\n this.email = new SourceDescription(3, s, 0, false);\n break;\n }\n case 4:\n if (this.phone != null) {\n this.phone.setDescription(s);\n break;\n } else {\n this.phone = new SourceDescription(4, s, 0, false);\n break;\n }\n case 5:\n if (this.loc != null) {\n this.loc.setDescription(s);\n break;\n } else {\n this.loc = new SourceDescription(5, s, 0, false);\n break;\n }\n case 6:\n if (this.tool != null) {\n this.tool.setDescription(s);\n break;\n } else {\n this.tool = new SourceDescription(6, s, 0, false);\n break;\n }\n case 7:\n if (this.note != null) {\n this.note.setDescription(s);\n break;\n } else {\n this.note = new SourceDescription(7, s, 0, false);\n break;\n }\n case 8:\n if (this.priv != null) {\n this.priv.setDescription(s);\n break;\n } else {\n this.priv = new SourceDescription(8, s, 0, false);\n break;\n }\n default:\n break;\n }\n }\n }\n }", "public int getLength() { return dataLength; }", "@Override\n protected void prepareHandshakeMessageContents() {\n }", "byte[] inflate(byte[] data) throws IOException;", "private java.security.cert.X509Certificate generateJcaObject(com.android.org.bouncycastle.asn1.x509.TBSCertificate r1, byte[] r2) throws java.security.cert.CertificateEncodingException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.generateJcaObject(com.android.org.bouncycastle.asn1.x509.TBSCertificate, byte[]):java.security.cert.X509Certificate, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.x509.X509V1CertificateGenerator.generateJcaObject(com.android.org.bouncycastle.asn1.x509.TBSCertificate, byte[]):java.security.cert.X509Certificate\");\n }", "private void addCertificate(com.google.protobuf.ByteString value) {\n java.lang.Class<?> valueClass = value.getClass();\n ensureCertificateIsMutable();\n certificate_.add(value);\n }", "public short getDataLength() {\r\n //Add the size of the header also\r\n //Header length contains the header+data length\r\n final int lpadding;\r\n if (_padding != null) lpadding = _padding.length();\r\n else lpadding = 0;\r\n return ( (short) (_len + lpadding));\r\n }", "private void preparePkcs1ClearText(byte[] clearText, short type, short messageLength) \r\n \t /*@ requires clearText != null &*& array_slice(clearText, 0, clearText.length, _) &*& clearText.length >= 128\r\n\t \t &*& PKCS1_HEADER |-> ?thePKCS1HEADER &*& PKCS1_SHA1_HEADER |-> ?thePKCS1SHA1HEADER &*& PKCS1_MD5_HEADER |-> ?thePKCS1MD5HEADER\r\n\t \t &*& thePKCS1HEADER != null &*& thePKCS1SHA1HEADER != null &*& thePKCS1MD5HEADER != null\r\n\t \t &*& thePKCS1HEADER.length == 1 &*& thePKCS1SHA1HEADER.length == 16 &*& thePKCS1MD5HEADER.length == 19\r\n\t \t &*& array_slice(thePKCS1HEADER, 0, thePKCS1HEADER.length, _)\r\n\t \t &*& array_slice(thePKCS1SHA1HEADER, 0, thePKCS1SHA1HEADER.length, _)\r\n\t \t &*& array_slice(thePKCS1MD5HEADER, 0, thePKCS1MD5HEADER.length, _)\r\n\t \t &*& messageBuffer |-> ?theMessageBuffer &*& theMessageBuffer != null \r\n\t \t &*& messageLength >= 0\r\n\t \t &*& type == ALG_SHA1_PKCS1 ? messageLength == 20 || messageLength == 22 : type == ALG_MD5_PKCS1 ? messageLength == 16 : messageLength < 126; @*/\r\n \t /*@ ensures array_slice(clearText, 0, clearText.length, _) &*& PKCS1_HEADER |-> thePKCS1HEADER \r\n \t \t &*& PKCS1_SHA1_HEADER |-> thePKCS1SHA1HEADER &*& PKCS1_MD5_HEADER |-> thePKCS1MD5HEADER\r\n\t \t &*& array_slice(thePKCS1HEADER, 0, thePKCS1HEADER.length, _)\r\n\t \t &*& array_slice(thePKCS1SHA1HEADER, 0, thePKCS1SHA1HEADER.length, _)\r\n\t \t &*& array_slice(thePKCS1MD5HEADER, 0, thePKCS1MD5HEADER.length, _)\r\n \t \t &*& messageBuffer |-> theMessageBuffer ; @*/\r\n\t{\r\n\t\t// first pad the whole clear text with 0xFF\r\n\t\tUtil.arrayFillNonAtomic(clearText, (short) 0, (short) 128, (byte) 0xff);\r\n\t\t// first 2 bytes should be 0x00 and 0x01\r\n\t\tUtil.arrayFillNonAtomic(clearText, (short) 0, (short) 1, (byte) 0x00);\r\n\t\tUtil.arrayFillNonAtomic(clearText, (short) 1, (short) 1, (byte) 0x01);\r\n\t\t// add the PKCS#1 header at the correct location\r\n\t\tbyte[] header = PKCS1_HEADER;\r\n\t\tif (type == ALG_SHA1_PKCS1)\r\n\t\t\theader = PKCS1_SHA1_HEADER;\r\n\t\tif (type == ALG_MD5_PKCS1)\r\n\t\t\theader = PKCS1_MD5_HEADER;\r\n\t\tUtil.arrayCopy(header, (short) 0, clearText, (short) (128 - messageLength - header.length), (short) header.length);\r\n\t}", "public TextObjectBaseRecord(short id, short size, byte [] data)\n {\n super(id, size, data);\n \n }", "public byte[] addOTK(String authkey) {\n return new byte[2*32];\n }", "public Add128(byte[] bytekey) {\n key=bytekey;\n }", "public int sizeCompressed (){\r\n\t\t\treturn _sizeCompressed;\r\n\t\t}", "static byte[] compressData(byte data[]) {\n\t\tif (data.length < 8) {\n\t\t\treturn (data);\n\t\t} // Too short to compress effectively...\n\t\ttry {\n\t\t\t// Make a buffer; data expansion is unusual except for short inputs.\n\t\t\tfinal ByteArrayOutputStream baos = new ByteArrayOutputStream(\n\t\t\t\t\tMath.max(data.length, 32));\n\t\t\tfinal DefOutputStream cos = new DefOutputStream(baos);\n\t\t\t// Write uncompressed data to stream.\n\t\t\tcos.write(data);\n\t\t\t// Force everything out...\n\t\t\tcos.finish();\n\t\t\tcos.flush();\n\t\t\t// Maybe we should strip some other headers too?\n\t\t\treturn (baos.toByteArray());\n\t\t} catch (IOException e) {\n\t\t\t// Should never happen...\n\t\t\tthrow new Error(\"unexpected internal error\");\n\t\t}\n\t}", "byte[] getStructuredData(String messageData);", "com.google.protobuf.ByteString\n getField1844Bytes();", "int getMaxPackLen()\n {\n return configfile.max_pack_len;\n }", "public byte[] getExtensionValue(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.security.keystore.DelegatingX509Certificate.getExtensionValue(java.lang.String):byte[], dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.security.keystore.DelegatingX509Certificate.getExtensionValue(java.lang.String):byte[]\");\n }", "public native static long getConvertBytes();", "@Override\n int getEncodingLength() {\n return encodingLength;\n }", "CRBase(final byte[] data, final int offset) throws KNXFormatException\n\t{\n\t\tint i = offset;\n\t\tlength = data[i++] & 0xFF;\n\t\tconnType = data[i++] & 0xFF;\n\t\tif (length > data.length - offset)\n\t\t\tthrow new KNXFormatException(\"structure length bigger than buffer\", length);\n\t\topt = new byte[length - 2];\n\t\tfor (int k = 0; k < length - 2; ++i, ++k)\n\t\t\topt[k] = data[i];\n\t}", "com.google.protobuf.ByteString\n getField1305Bytes();", "public byte[] getNetworkPacket() {\n /*\n The packet layout will be:\n byte(datatype)|int(length of name)|byte[](name)|int(length of value)|byte[](value)|...\n */\n byte[] data = new byte[2];\n int currentPosition = 0;\n \n if(STRINGS.size() > 0) {\n Enumeration enumer = STRINGS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x73;\n currentPosition++;\n\n SimpleMessageObjectStringItem item = (SimpleMessageObjectStringItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = item.getValue().getBytes();\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(INTS.size() > 0) {\n Enumeration enumer = INTS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x69;\n currentPosition++;\n\n SimpleMessageObjectIntItem item = (SimpleMessageObjectIntItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(LONGS.size() > 0) {\n Enumeration enumer = LONGS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x6C;\n currentPosition++;\n\n SimpleMessageObjectLongItem item = (SimpleMessageObjectLongItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(DOUBLES.size() > 0) {\n Enumeration enumer = DOUBLES.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x64;\n currentPosition++;\n\n SimpleMessageObjectDoubleItem item = (SimpleMessageObjectDoubleItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(FLOATS.size() > 0) {\n Enumeration enumer = FLOATS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x66;\n currentPosition++;\n\n SimpleMessageObjectFloatItem item = (SimpleMessageObjectFloatItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(CHARS.size() > 0) {\n Enumeration enumer = CHARS.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x63;\n currentPosition++;\n\n SimpleMessageObjectCharItem item = (SimpleMessageObjectCharItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = DataConversions.getBytes(item.getValue());\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n \n if(BYTES.size() > 0) {\n Enumeration enumer = BYTES.elements();\n while(enumer.hasMoreElements()) {\n if(currentPosition == data.length) {\n data = growArray(data, 1);\n }\n // Add the type\n data[currentPosition] = 0x62;\n currentPosition++;\n\n SimpleMessageObjectByteArrayItem item = (SimpleMessageObjectByteArrayItem) enumer.nextElement();\n int spaceLeft = data.length - currentPosition;\n byte[] name = item.getName().getBytes();\n if(spaceLeft < name.length + 4) {\n data = growArray(data, name.length - spaceLeft + 4);\n }\n \n //Add the length of the name\n byte[] nameLength = DataConversions.getBytes(name.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = nameLength[i];\n currentPosition++;\n }\n \n //Add the name\n for(int i = 0 ; i < name.length ; i++) {\n data[currentPosition] = name[i];\n currentPosition++;\n }\n \n spaceLeft = data.length - currentPosition;\n byte[] value = item.getValue();\n if(spaceLeft < value.length + 4) {\n data = growArray(data, value.length - spaceLeft + 4);\n }\n \n //Add the length of the value\n byte[] valueLength = DataConversions.getBytes(value.length);\n for(int i = 0 ; i < 4 ; i++) {\n data[currentPosition] = valueLength[i];\n currentPosition++;\n }\n \n //Add the value\n for(int i = 0 ; i < value.length ; i++) {\n data[currentPosition] = value[i];\n currentPosition++;\n }\n }\n }\n\n return data;\n }", "com.google.protobuf.ByteString\n getField1332Bytes();", "@Override public long getInitializedDataLength() {\n return getDataLength();\n }", "public Version(byte[] msg) throws Exception{\n super(msg);\n\n this.version = ByteBuffer.wrap(Arrays.copyOfRange(data, 0, 4))\n .order(ByteOrder.LITTLE_ENDIAN)\n .getInt();\n this.network_service = ByteBuffer.wrap(Arrays\n .copyOfRange(data, 4, 12)\n )\n .order(ByteOrder.LITTLE_ENDIAN)\n .getLong();\n this.timestamp = ByteBuffer.wrap(\n Arrays\n .copyOfRange(data, 12, 20)\n )\n .order(ByteOrder.LITTLE_ENDIAN)\n .getLong();\n\n this.recipient = new NetAddr(\n Arrays.copyOfRange(data, 20, 46)\n );\n this.sender = new NetAddr(\n Arrays.copyOfRange(data, 46, 72)\n );\n this.nodeId = Arrays.copyOfRange(data, 72, 80);\n\n VarInt len = new VarInt(Arrays.copyOfRange(data, 80, data.length));\n subversion = new String(\n Arrays.copyOfRange(data, 80 + len.getNumBytes(), 80 + len.getNumBytes() + (int)len.getValue())\n );\n\n int endOfSubVersion = 80 + len.getNumBytes() + (int)len.getValue();\n\n lastBlock = ByteBuffer.wrap(\n Arrays.copyOfRange(data, endOfSubVersion, endOfSubVersion + 4)\n ).order(ByteOrder.LITTLE_ENDIAN)\n .getInt();\n\n System.out.println(\"VERSION \" + version + \" - \" + subversion + \" last \" + lastBlock);\n }", "void setDP1( byte[] buffer, short offset, short length) throws CryptoException;", "private long packValues(int key, int next) {\n return ((long)next << 32) | ((long)key & 0xFFFFFFFFL);\n }", "synchronized byte[] pack(String c, Map<String, ?> meta) throws IOException {\n byte[] cmdS = c.getBytes();\n int l = cmdS.length + 1;\n\n byte[] metaS = null;\n if (meta != null) {\n StringBuilder sb = new StringBuilder();\n for (String k : meta.keySet()) {\n sb.append(k).append(\":\").append(meta.get(k).toString()).append('\\n');\n }\n metaS = sb.toString().getBytes();\n l += metaS.length;\n }\n l++;\n\n byte[] out = new byte[l + 5];\n\n // TODO: fully convert to proto\n CodedOutputStreamMicro outb = CodedOutputStreamMicro.newInstance(out);\n\n outb.writeRawByte(0);\n outb.writeRawLittleEndian32(l);\n\n outb.writeRawBytes(cmdS);\n outb.writeRawByte('\\n');\n\n if (metaS != null) {\n outb.writeRawBytes(metaS);\n }\n outb.writeRawByte('\\n');\n\n return out;\n }", "public SSLContext mo12551a() {\n try {\n CertificateFactory instance = CertificateFactory.getInstance(\"X.509\");\n TrustManagerFactory instance2 = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());\n KeyStore instance3 = KeyStore.getInstance(KeyStore.getDefaultType());\n instance3.load(null, null);\n instance3.setCertificateEntry(\"DigiCertGlobalRootCA\", (X509Certificate) instance.generateCertificate(new BufferedInputStream(getClass().getClassLoader().getResourceAsStream(\"com/clevertap/android/sdk/certificates/DigiCertGlobalRootCA.crt\"))));\n instance3.setCertificateEntry(\"DigiCertSHA2SecureServerCA\", (X509Certificate) instance.generateCertificate(new BufferedInputStream(getClass().getClassLoader().getResourceAsStream(\"com/clevertap/android/sdk/certificates/DigiCertSHA2SecureServerCA.crt\"))));\n instance2.init(instance3);\n SSLContext instance4 = SSLContext.getInstance(\"TLS\");\n instance4.init(null, instance2.getTrustManagers(), null);\n C3111h1.m14930d(\"SSL Context built\");\n return instance4;\n } catch (Throwable th) {\n C3111h1.m14937e(\"Error building SSL Context\", th);\n return null;\n }\n }", "private void cipherGeneric( APDU apdu, Cipher cipher, short keyLength ) {\n\t}", "public com.google.protobuf.ByteString getExtra() {\n return extra_;\n }", "public int getBufferLength() {\n return data.length;\n }", "public int getMarshalledSize()\n{\n int marshalSize = 0; \n\n marshalSize += recordType.getMarshalledSize();\n marshalSize += changeIndicator.getMarshalledSize();\n marshalSize += entityType.getMarshalledSize();\n marshalSize += 2; // padding\n marshalSize += 4; // padding1\n\n return marshalSize;\n}", "public interface L3Header {\n\n int getMinimumHeaderLength();\n\n int getTotalLength(ByteBuffer packet);\n\n boolean isMatch(ByteBuffer packet);\n\n}", "public boolean IsCompressed() {\n return false;\n }", "public byte [] getTransportHeader_Generic(int payloadLength) {\n byte [] packet = new byte[ETH_HEADER_SIZE];\n packet[0] = (byte)(_generic_servicePort | 0x80);\n packet[1] = _generic_servicePort ;\n packet[2] = control;\n //packet[3] = (byte) _interfaceKind.ordinal();\n packet[3] = (byte) 0x02;\n\n // length bytes, length is 2 bytes\n int Value0 = payloadLength & 0x00ff;\n int Value1 = payloadLength >> 8;\n packet[4] = (byte)Value0;\n packet[5] = (byte)Value1;\n packet[6] = (byte)_messageProtocol.ordinal();\n packet[7] = (byte)0;\n\n int xorValue = packet[0];\n\n packet[7] = GetTransportMessageCheckSum(packet);\n return packet;\n }", "public Add128(){\n key = new byte[128];\n Random rand = new Random();\n rand.nextBytes(key);\n }", "public ByteBuf order(ByteOrder endianness)\r\n/* 53: */ {\r\n/* 54: 70 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 55: 71 */ return super.order(endianness);\r\n/* 56: */ }", "protected int _writeBinary(Base64Variant b64variant, InputStream data, byte[] readBuffer)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1523 */ int inputPtr = 0;\n/* 1524 */ int inputEnd = 0;\n/* 1525 */ int lastFullOffset = -3;\n/* 1526 */ int bytesDone = 0;\n/* */ \n/* */ \n/* 1529 */ int safeOutputEnd = this._outputEnd - 6;\n/* 1530 */ int chunksBeforeLF = b64variant.getMaxLineLength() >> 2;\n/* */ \n/* */ for (;;)\n/* */ {\n/* 1534 */ if (inputPtr > lastFullOffset) {\n/* 1535 */ inputEnd = _readMore(data, readBuffer, inputPtr, inputEnd, readBuffer.length);\n/* 1536 */ inputPtr = 0;\n/* 1537 */ if (inputEnd < 3) {\n/* */ break;\n/* */ }\n/* 1540 */ lastFullOffset = inputEnd - 3;\n/* */ }\n/* 1542 */ if (this._outputTail > safeOutputEnd) {\n/* 1543 */ _flushBuffer();\n/* */ }\n/* */ \n/* 1546 */ int b24 = readBuffer[(inputPtr++)] << 8;\n/* 1547 */ b24 |= readBuffer[(inputPtr++)] & 0xFF;\n/* 1548 */ b24 = b24 << 8 | readBuffer[(inputPtr++)] & 0xFF;\n/* 1549 */ bytesDone += 3;\n/* 1550 */ this._outputTail = b64variant.encodeBase64Chunk(b24, this._outputBuffer, this._outputTail);\n/* 1551 */ chunksBeforeLF--; if (chunksBeforeLF <= 0) {\n/* 1552 */ this._outputBuffer[(this._outputTail++)] = '\\\\';\n/* 1553 */ this._outputBuffer[(this._outputTail++)] = 'n';\n/* 1554 */ chunksBeforeLF = b64variant.getMaxLineLength() >> 2;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 1559 */ if (inputPtr < inputEnd) {\n/* 1560 */ if (this._outputTail > safeOutputEnd) {\n/* 1561 */ _flushBuffer();\n/* */ }\n/* 1563 */ int b24 = readBuffer[(inputPtr++)] << 16;\n/* 1564 */ int amount = 1;\n/* 1565 */ if (inputPtr < inputEnd) {\n/* 1566 */ b24 |= (readBuffer[inputPtr] & 0xFF) << 8;\n/* 1567 */ amount = 2;\n/* */ }\n/* 1569 */ bytesDone += amount;\n/* 1570 */ this._outputTail = b64variant.encodeBase64Partial(b24, amount, this._outputBuffer, this._outputTail);\n/* */ }\n/* 1572 */ return bytesDone;\n/* */ }", "com.google.protobuf.ByteString\n getField1813Bytes();", "com.google.protobuf.ByteString\n getSerialBytes();", "protected final int populateSECSItemHeaderData(byte[] buffer, int numberOfBytes)\n {\n int offset = 0;\n byte[] outputLengthBytes = new byte[]{0, 0, 0, 0};\n buffer[0] = (byte)((SECSItemFormatCode.getNumberFromSECSItemFormatCode(formatCode) << 2) | outboundNumberOfLengthBytes.valueOf());\n \n ByteBuffer bb = ByteBuffer.wrap(outputLengthBytes);\n bb.order(ByteOrder.BIG_ENDIAN);\n bb.putInt(numberOfBytes);\n\n switch(outboundNumberOfLengthBytes)\n {\n case ONE:\n buffer[1] = outputLengthBytes[3];\n offset = 2;\n break;\n case TWO:\n buffer[1] = outputLengthBytes[2];\n buffer[2] = outputLengthBytes[3];\n offset = 3;\n break;\n case THREE:\n buffer[1] = outputLengthBytes[1];\n buffer[2] = outputLengthBytes[2];\n buffer[3] = outputLengthBytes[3];\n offset = 4;\n break;\n case NOT_INITIALIZED:\n System.err.println(\"The case where outboundNumberOfLengthBytes is still in its NOT_INITIALIZED state should never happen.\");\n break;\n }\n \n return offset;\n }", "public native byte[] __byteArrayMethod( long __swiftObject, byte[] arg );", "private static int getBytes(long r23) {\n /*\n java.lang.ThreadLocal<byte[]> r0 = TEMP_NUMBER_BUFFER\n java.lang.Object r0 = r0.get()\n byte[] r0 = (byte[]) r0\n r1 = 20\n if (r0 != 0) goto L_0x0013\n byte[] r0 = new byte[r1]\n java.lang.ThreadLocal<byte[]> r2 = TEMP_NUMBER_BUFFER\n r2.set(r0)\n L_0x0013:\n r2 = -9223372036854775808\n r4 = 54\n r5 = 57\n r6 = 45\n r7 = 53\n r8 = 56\n r9 = 55\n r10 = 51\n r11 = 50\n r12 = 0\n r13 = 48\n r14 = 1\n int r15 = (r23 > r2 ? 1 : (r23 == r2 ? 0 : -1))\n if (r15 != 0) goto L_0x0076\n r0[r12] = r6\n r0[r14] = r5\n r2 = 2\n r0[r2] = r11\n r2 = 3\n r0[r2] = r11\n r2 = 4\n r0[r2] = r10\n r2 = 5\n r0[r2] = r10\n r2 = 6\n r0[r2] = r9\n r2 = 7\n r0[r2] = r11\n r2 = 8\n r0[r2] = r13\n r2 = 9\n r0[r2] = r10\n r2 = 10\n r0[r2] = r4\n r2 = 11\n r0[r2] = r8\n r2 = 12\n r0[r2] = r7\n r2 = 13\n r3 = 52\n r0[r2] = r3\n r2 = 14\n r0[r2] = r9\n r2 = 15\n r0[r2] = r9\n r2 = 16\n r0[r2] = r7\n r2 = 17\n r0[r2] = r8\n r2 = 18\n r0[r2] = r13\n r2 = 19\n r0[r2] = r8\n return r1\n L_0x0076:\n r1 = 0\n int r3 = (r23 > r1 ? 1 : (r23 == r1 ? 0 : -1))\n if (r3 != 0) goto L_0x007f\n r0[r12] = r13\n return r14\n L_0x007f:\n if (r3 >= 0) goto L_0x0088\n r0[r12] = r6\n long r15 = java.lang.Math.abs(r23)\n goto L_0x008b\n L_0x0088:\n r14 = 0\n r15 = r23\n L_0x008b:\n r17 = 9\n r19 = 10\n r21 = 1\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0099\n r17 = r21\n goto L_0x017e\n L_0x0099:\n r17 = 99\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00a3\n r17 = r19\n goto L_0x017e\n L_0x00a3:\n r17 = 999(0x3e7, double:4.936E-321)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00ad\n r17 = 100\n goto L_0x017e\n L_0x00ad:\n r17 = 9999(0x270f, double:4.94E-320)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00b7\n r17 = 1000(0x3e8, double:4.94E-321)\n goto L_0x017e\n L_0x00b7:\n r17 = 99999(0x1869f, double:4.9406E-319)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00c2\n r17 = 10000(0x2710, double:4.9407E-320)\n goto L_0x017e\n L_0x00c2:\n r17 = 999999(0xf423f, double:4.94065E-318)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00ce\n r17 = 100000(0x186a0, double:4.94066E-319)\n goto L_0x017e\n L_0x00ce:\n r17 = 9999999(0x98967f, double:4.940656E-317)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00da\n r17 = 1000000(0xf4240, double:4.940656E-318)\n goto L_0x017e\n L_0x00da:\n r17 = 99999999(0x5f5e0ff, double:4.9406564E-316)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00e6\n r17 = 10000000(0x989680, double:4.9406565E-317)\n goto L_0x017e\n L_0x00e6:\n r17 = 999999999(0x3b9ac9ff, double:4.940656453E-315)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00f2\n r17 = 100000000(0x5f5e100, double:4.94065646E-316)\n goto L_0x017e\n L_0x00f2:\n r17 = 9999999999(0x2540be3ff, double:4.940656458E-314)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0100\n r17 = 1000000000(0x3b9aca00, double:4.94065646E-315)\n goto L_0x017e\n L_0x0100:\n r17 = 99999999999(0x174876e7ff, double:4.94065645836E-313)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0110\n r17 = 10000000000(0x2540be400, double:4.9406564584E-314)\n goto L_0x017e\n L_0x0110:\n r17 = 999999999999(0xe8d4a50fff, double:4.940656458408E-312)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x011f\n r17 = 100000000000(0x174876e800, double:4.9406564584E-313)\n goto L_0x017e\n L_0x011f:\n r17 = 9999999999999(0x9184e729fff, double:4.940656458412E-311)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x012e\n r17 = 1000000000000(0xe8d4a51000, double:4.94065645841E-312)\n goto L_0x017e\n L_0x012e:\n r17 = 99999999999999(0x5af3107a3fff, double:4.9406564584124E-310)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x013d\n r17 = 10000000000000(0x9184e72a000, double:4.9406564584125E-311)\n goto L_0x017e\n L_0x013d:\n r17 = 999999999999999(0x38d7ea4c67fff, double:4.94065645841246E-309)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x014c\n r17 = 100000000000000(0x5af3107a4000, double:4.94065645841247E-310)\n goto L_0x017e\n L_0x014c:\n r17 = 9999999999999999(0x2386f26fc0ffff, double:5.431165199810527E-308)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x015b\n r17 = 1000000000000000(0x38d7ea4c68000, double:4.940656458412465E-309)\n goto L_0x017e\n L_0x015b:\n r17 = 99999999999999999(0x16345785d89ffff, double:5.620395787888204E-302)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x016a\n r17 = 10000000000000000(0x2386f26fc10000, double:5.431165199810528E-308)\n goto L_0x017e\n L_0x016a:\n r17 = 999999999999999999(0xde0b6b3a763ffff, double:7.832953389245684E-242)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0179\n r17 = 100000000000000000(0x16345785d8a0000, double:5.620395787888205E-302)\n goto L_0x017e\n L_0x0179:\n r17 = 1000000000000000000(0xde0b6b3a7640000, double:7.832953389245686E-242)\n L_0x017e:\n long r1 = r15 / r17\n int r3 = (int) r1\n switch(r3) {\n case 0: goto L_0x01b6;\n case 1: goto L_0x01af;\n case 2: goto L_0x01aa;\n case 3: goto L_0x01a5;\n case 4: goto L_0x019e;\n case 5: goto L_0x0199;\n case 6: goto L_0x0194;\n case 7: goto L_0x018f;\n case 8: goto L_0x018a;\n case 9: goto L_0x0185;\n default: goto L_0x0184;\n }\n L_0x0184:\n goto L_0x01bb\n L_0x0185:\n int r3 = r14 + 1\n r0[r14] = r5\n goto L_0x01ba\n L_0x018a:\n int r3 = r14 + 1\n r0[r14] = r8\n goto L_0x01ba\n L_0x018f:\n int r3 = r14 + 1\n r0[r14] = r9\n goto L_0x01ba\n L_0x0194:\n int r3 = r14 + 1\n r0[r14] = r4\n goto L_0x01ba\n L_0x0199:\n int r3 = r14 + 1\n r0[r14] = r7\n goto L_0x01ba\n L_0x019e:\n int r3 = r14 + 1\n r6 = 52\n r0[r14] = r6\n goto L_0x01ba\n L_0x01a5:\n int r3 = r14 + 1\n r0[r14] = r10\n goto L_0x01ba\n L_0x01aa:\n int r3 = r14 + 1\n r0[r14] = r11\n goto L_0x01ba\n L_0x01af:\n int r3 = r14 + 1\n r6 = 49\n r0[r14] = r6\n goto L_0x01ba\n L_0x01b6:\n int r3 = r14 + 1\n r0[r14] = r13\n L_0x01ba:\n r14 = r3\n L_0x01bb:\n int r3 = (r17 > r21 ? 1 : (r17 == r21 ? 0 : -1))\n if (r3 != 0) goto L_0x01c0\n goto L_0x01d8\n L_0x01c0:\n java.lang.Long.signum(r17)\n long r1 = r1 * r17\n long r15 = r15 - r1\n r1 = 0\n int r3 = (r15 > r1 ? 1 : (r15 == r1 ? 0 : -1))\n if (r3 != 0) goto L_0x01d9\n L_0x01cc:\n int r1 = (r17 > r21 ? 1 : (r17 == r21 ? 0 : -1))\n if (r1 <= 0) goto L_0x01d8\n int r1 = r14 + 1\n r0[r14] = r13\n long r17 = r17 / r19\n r14 = r1\n goto L_0x01cc\n L_0x01d8:\n return r14\n L_0x01d9:\n long r17 = r17 / r19\n goto L_0x017e\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.unboundid.util.ByteStringBuffer.getBytes(long):int\");\n }", "public Long getCertBuf() {\n\t\treturn certBuf;\n\t}", "private void serializeHeader(ByteBuffer buffer){\n buffer.putShort(msgType); //2B\n if(srcIP==null) srcIP=\"\";\n String srcIP_temp = srcIP;\n for(int i=0; i<15-srcIP.length(); i++) {\n srcIP_temp = srcIP_temp + \" \";\n }\n buffer.put(srcIP_temp.getBytes()); //15B\n buffer.putInt(srcPort); //4B\n buffer.putFloat(desCost); //4B\n\n String desIP_temp = desIP;\n for(int i=0; i<15-desIP.length(); i++) {\n desIP_temp = desIP_temp + \" \";\n }\n buffer.put(desIP_temp.getBytes()); //15B\n buffer.putInt(desPort);\n }", "public com.google.protobuf.ByteString\n getExtraBytes() {\n Object ref = extra_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n extra_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public long getFileCompressedSize()\r\n {\r\n return lFileCompressedSize;\r\n }", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();", "com.google.protobuf.ByteString getData();" ]
[ "0.59902513", "0.5371083", "0.5198322", "0.50963616", "0.5082797", "0.5062489", "0.5058886", "0.49972162", "0.4948425", "0.49391416", "0.4896833", "0.48947078", "0.4848132", "0.4816842", "0.47632554", "0.47571766", "0.47391832", "0.47161233", "0.47112903", "0.47065446", "0.4694756", "0.46941128", "0.46461347", "0.46453902", "0.46427584", "0.46407947", "0.4639756", "0.46232328", "0.45888636", "0.45836544", "0.45757854", "0.45681134", "0.45612797", "0.4555398", "0.45480508", "0.45422003", "0.45380607", "0.4535829", "0.45311874", "0.45255193", "0.45224345", "0.4511653", "0.4510553", "0.4509978", "0.44972712", "0.44802517", "0.44774505", "0.4474627", "0.44731402", "0.4472779", "0.44675216", "0.44663596", "0.4449252", "0.44479167", "0.4447782", "0.44469583", "0.4441612", "0.4439939", "0.4438373", "0.44350144", "0.44181314", "0.44106945", "0.44046196", "0.4392734", "0.4390542", "0.4382736", "0.43822297", "0.43778265", "0.43755612", "0.437474", "0.43730766", "0.4368672", "0.43656132", "0.4364377", "0.43635535", "0.43619218", "0.43540752", "0.43457294", "0.43377748", "0.43333873", "0.43283358", "0.43281803", "0.4324841", "0.43219945", "0.43084282", "0.43071988", "0.43063122", "0.43061757", "0.43018386", "0.43012208", "0.43000194", "0.42978886", "0.42966637", "0.42959127", "0.42958236", "0.42941403", "0.42929426", "0.42929426", "0.42929426", "0.42929426" ]
0.6170328
0
Calcula la edad a patir de la fecha de nacimiento
public static int getYears(Date fechaNacimiento) { Calendar fechaActual = Calendar.getInstance(); int hoyDia = fechaActual.get(Calendar.DAY_OF_YEAR); Calendar nacimiento = Calendar.getInstance(); nacimiento.setTime(fechaNacimiento); int nacimientoDia = nacimiento.get(Calendar.DAY_OF_YEAR); // Todavía no ha cumplido los años if (nacimientoDia - hoyDia < 0) return fechaActual.get(Calendar.YEAR) - nacimiento.get(Calendar.YEAR) - 1; else // Ya ha cumplido los años return fechaActual.get(Calendar.YEAR) - nacimiento.get(Calendar.YEAR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Date getFechaNacimiento();", "private void fechaActual() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat sm = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\t// Formateo de Fecha para mostrar en la vista - (String)\r\n\t\tsetFechaCreacion(sm.format(date.getTime()));\r\n\t\t// Formateo de Fecha campo db - (Date)\r\n\t\ttry {\r\n\t\t\tnewEntidad.setFechaCreacion(sm.parse(getFechaCreacion()));\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t;\r\n\t}", "public void get_fecha(){\n //Obtenemos la fecha\n Calendar c1 = Calendar.getInstance();\n fecha.setCalendar(c1);\n }", "public static int diasParaFecha(Date fechafin) {\n try {\n System.out.println(\"Fecha = \" + fechafin + \" / \");\n GregorianCalendar fin = new GregorianCalendar();\n fin.setTime(fechafin);\n System.out.println(\"fin=\" + CalendarToString(fin, \"dd/MM/yyyy\"));\n GregorianCalendar hoy = new GregorianCalendar();\n System.out.println(\"hoy=\" + CalendarToString(hoy, \"dd/MM/yyyy\"));\n\n if (fin.get(Calendar.YEAR) == hoy.get(Calendar.YEAR)) {\n System.out.println(\"Valor de Resta simple: \"\n + String.valueOf(fin.get(Calendar.DAY_OF_YEAR)\n - hoy.get(Calendar.DAY_OF_YEAR)));\n return fin.get(Calendar.DAY_OF_YEAR)\n - hoy.get(Calendar.DAY_OF_YEAR);\n } else {\n int diasAnyo = hoy.isLeapYear(hoy.get(Calendar.YEAR)) ? 366\n : 365;\n int rangoAnyos = fin.get(Calendar.YEAR)\n - hoy.get(Calendar.YEAR);\n int rango = (rangoAnyos * diasAnyo)\n + (fin.get(Calendar.DAY_OF_YEAR) - hoy\n .get(Calendar.DAY_OF_YEAR));\n System.out.println(\"dias restantes: \" + rango);\n return rango;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return 0;\n }", "public void fechahoy(){\n Date fecha = new Date();\n \n Calendar c1 = Calendar.getInstance();\n Calendar c2 = new GregorianCalendar();\n \n String dia = Integer.toString(c1.get(Calendar.DATE));\n String mes = Integer.toString(c2.get(Calendar.MONTH));\n int mm = Integer.parseInt(mes);\n int nmes = mm +1;\n String memes = String.valueOf(nmes);\n if (nmes < 10) {\n memes = \"0\"+memes;\n }\n String anio = Integer.toString(c1.get(Calendar.YEAR));\n \n String fechoy = anio+\"-\"+memes+\"-\"+dia;\n \n txtFecha.setText(fechoy);\n \n }", "public int calcularEdad(GregorianCalendar gregorianCalendar);", "private void inicializarFechaHora(){\n Calendar c = Calendar.getInstance();\r\n year1 = c.get(Calendar.YEAR);\r\n month1 = (c.get(Calendar.MONTH)+1);\r\n String mes1 = month1 < 10 ? \"0\"+month1 : \"\" +month1;\r\n String dia1 = \"01\";\r\n\r\n String date1 = \"\"+dia1+\"/\"+mes1+\"/\"+year1;\r\n txt_fecha_desde.setText(date1);\r\n\r\n\r\n day2 = c.getActualMaximum(Calendar.DAY_OF_MONTH) ;\r\n String date2 = \"\"+day2+\"/\"+mes1+\"/\"+ year1;\r\n\r\n Log.e(TAG,\"date2: \" + date2 );\r\n txt_fecha_hasta.setText(date2);\r\n\r\n }", "public void dataPadrao() {\n Calendar c = Calendar.getInstance();\n SimpleDateFormat s = new SimpleDateFormat(\"dd/MM/yyyy\");\n String dataAtual = s.format(c.getTime());\n c.add(c.MONTH, 1);\n String dataAtualMaisUm = s.format(c.getTime());\n dataInicial.setText(dataAtual);\n dataFinal.setText(dataAtualMaisUm);\n }", "public Integer getEdad() {\n Calendar fechaNac_ = Calendar.getInstance();\n fechaNac_.setTime(fechaNac);\n try {\n return Math.abs(Calendar.getInstance().get(Calendar.YEAR) - fechaNac_.get(Calendar.YEAR));\n } catch (ArithmeticException e) {\n return -1;\n }\n }", "public Integer getEdad()\r\n/* 193: */ {\r\n/* 194:356 */ if (getFechaNacimiento() == null) {\r\n/* 195:357 */ this.edad = new Integer(0);\r\n/* 196: */ } else {\r\n/* 197:359 */ this.edad = Integer.valueOf(FuncionesUtiles.obtenerEdad(getFechaNacimiento()));\r\n/* 198: */ }\r\n/* 199:361 */ return this.edad;\r\n/* 200: */ }", "public static String fechaActual() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(calendario.getTime());\n }", "public int jogadorAtual() {\n return vez;\n }", "public Date obterHrEnt1Turno(){\n \ttxtHrEnt1Turno.setEditable(true);\n txtHrSai1Turno.setEditable(false);\n txtHrEnt2Turno.setEditable(false);\n txtHrSai2Turno.setEditable(false);\n \ttxtHrEnt1TurnoExt.setEditable(false);\n txtHrSai1TurnoExt.setEditable(false);\n txtHrEnt2TurnoExt.setEditable(false);\n txtHrSai2TurnoExt.setEditable(false);\n\n return new Date();\n }", "public Date getFecha_nacimiento() {\r\n\t\tDate result=null;\r\n\t\ttry {\r\n\t\t DateFormat df = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n\t\t \r\n\t\t\tresult = df.parse(calendario.getDia()+\"-\"+calendario.getMes()+\"-\"+calendario.getAno());\r\n\r\n\t\t} catch (ParseException e) {\r\n\t\t\tSystem.out.println(\"Fecha incorrecta\");\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\treturn result;\r\n\t}", "public Date getFecModificacion() {\n return fecModificacion;\n }", "void actualizarRondaCancion( Cancion cancion, Date fecha) throws ExceptionDao;", "public boolean fechaSesionAnterior(String fechasesion)\r\n\t{\r\n\t\tboolean anterior = false;\r\n\t\tGregorianCalendar calendario = new GregorianCalendar();\r\n\t\tint añoactual = calendario.get(Calendar.YEAR);\r\n\t\tint mesactual = (calendario.get(Calendar.MONTH)+1);\r\n\t\tint diaactual = calendario.get(Calendar.DAY_OF_MONTH);\r\n\t\tString fechaactual = añoactual+\"-\"+mesactual+\"-\"+diaactual;\r\n\t\t\r\n\t\tint añosesion = 0;\r\n\t\tint messesion = 0;\r\n\t\tint diasesion = 0;\r\n\t\t\r\n\t\tString numerofecha = \"\";\r\n\t\tfor (int i = 0; i < (fechasesion.length()); i++) \r\n\t\t{\r\n\t\t\tchar digito = fechasesion.charAt(i);\r\n\t\t\tif(digito == '0' || digito == '1' || digito == '2' || digito == '3' || digito == '4' || digito == '5' || digito == '6' || digito == '7' || digito == '8' || digito == '9')\r\n\t\t\t{\r\n\t\t\t\tnumerofecha += digito;\r\n\t\t\t\tif((i+1) == (fechasesion.length()))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(añosesion == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tañosesion = Integer.parseInt(numerofecha);\r\n\t\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(messesion == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmessesion = Integer.parseInt(numerofecha);\r\n\t\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(diasesion == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdiasesion = Integer.parseInt(numerofecha);\r\n\t\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(añosesion == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tañosesion = Integer.parseInt(numerofecha);\r\n\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(messesion == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tmessesion = Integer.parseInt(numerofecha);\r\n\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(diasesion == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tdiasesion = Integer.parseInt(numerofecha);\r\n\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif((añosesion) <= añoactual)\r\n\t\t{\r\n\t\t\tif((messesion) <= mesactual)\r\n\t\t\t{\r\n\t\t\t\tif((diasesion+3) <= diaactual)\r\n\t\t\t\t{\r\n\t\t\t\t\tanterior = true;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\treturn anterior;\r\n\t}", "public Date getFechaHasta()\r\n/* 174: */ {\r\n/* 175:302 */ return this.fechaHasta;\r\n/* 176: */ }", "private String leerFecha() {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYY/MM/dd\");\n\t\t\treturn sdf.format(txtFecha.getDate());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Seleccione una fecha válida\", \"Aviso\", 2);\n\t\t\treturn null;\n\t\t}\n\t}", "public Fecha () {\n\t\tthis.ahora = Calendar.getInstance();\n\t\tahora.set(2018, 3, 1, 15, 15, 0);\t \n\t\taño = ahora.get(Calendar.YEAR);\n\t\tmes = ahora.get(Calendar.MONTH) + 1; // 1 (ENERO) y 12 (DICIEMBRE)\n\t\tdia = ahora.get(Calendar.DAY_OF_MONTH);\n\t\thr_12 = ahora.get(Calendar.HOUR);\n\t\thr_24 = ahora.get(Calendar.HOUR_OF_DAY);\n\t\tmin = ahora.get(Calendar.MINUTE);\n\t\tseg = ahora.get(Calendar.SECOND);\n\t\tam_pm = v_am_pm[ahora.get(Calendar.AM_PM)]; //ahora.get(Calendar.AM_PM)=> 0 (AM) y 1 (PM)\n\t\tmes_nombre = v_mes_nombre[ahora.get(Calendar.MONTH)];\n\t\tdia_nombre = v_dia_nombre[ahora.get(Calendar.DAY_OF_WEEK) - 1];\n\n\t}", "private String ObtenerFechaActual() {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/mm/yyyy\");\n Calendar calendar = GregorianCalendar.getInstance();\n return String.valueOf(simpleDateFormat.format(calendar.getTime()));\n }", "private static Date sumarORestarFecha(Date fecha, int field, int value){\n\t\tCalendar calendar = GregorianCalendar.getInstance();\n\t\tDate fechaTemp = calendar.getTime();\n\t\tif(fecha!=null){\n\t\t\tcalendar.setTime(fecha);\n\t\t\tcalendar.add(field, value);\n\t\t\tfecha = calendar.getTime();\n\t\t\tcalendar.setTime(fechaTemp);\n\t\t}\n\t\treturn fecha;\n\t}", "public void hora()\n {\n horaTotal = HoraSalida - HoraLlegada;\n\n }", "public Date getFechaDesde()\r\n/* 164: */ {\r\n/* 165:283 */ return this.fechaDesde;\r\n/* 166: */ }", "void ejecuta(Date fechaEvento);", "private Timestamp getFechaFinal(Admision admision) {\n\t\tTimestamp fecha_final = admisionService\n\t\t\t\t.getFechaUltimoServicio(admision);\n\t\tif (fecha_final == null) {\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tif (admision.getFecha_atencion() != null) {\n\t\t\t\tcalendar.setTime(admision.getFecha_atencion());\n\t\t\t} else {\n\t\t\t\tcalendar.setTime(admision.getFecha_ingreso());\n\t\t\t}\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY,\n\t\t\t\t\tcalendar.get(Calendar.HOUR_OF_DAY) + 1);\n\t\t\treturn new Timestamp(calendar.getTimeInMillis());\n\t\t}\n\t\treturn fecha_final;\n\t}", "public static String getFechaActual() {\n Date ahora = new Date();\n SimpleDateFormat formateador = new SimpleDateFormat(\"yyyy-MM-dd\");\n return formateador.format(ahora);\n }", "public String getFecha(){\r\n return fechaInicial.get(Calendar.DAY_OF_MONTH)+\"/\"+(fechaInicial.get(Calendar.MONTH)+1)+\"/\"+fechaInicial.get(Calendar.YEAR);\r\n }", "public void calcularCost() {\r\n cost = 0;\r\n int a = 0;\r\n try {\r\n String r = DataR.toString()+ \" \" + horaR;\r\n String d = DataD.toString()+ \" \" + horaD;\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\r\n Date dateR = simpleDateFormat.parse(r);\r\n Date dateD = simpleDateFormat.parse(d);\r\n a = (int) ((dateD.getTime() - dateR.getTime())/(1000*3600));\r\n \r\n \r\n } catch (ParseException ex) {\r\n Logger.getLogger(Reserva.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(a > 24) {\r\n cost += 15*(a/(24));\r\n a -= (((int)(a/24))*24);\r\n }\r\n if(a%3600 == 0) {\r\n cost += 1;\r\n }\r\n if(a%3600 > 0) {\r\n cost += 1;\r\n }\r\n \r\n }", "public Date getDateDembauche() {\r\n return dateEmbauche.copie();\r\n }", "Date getEDate();", "@Override\n public java.util.Date getFecha() {\n return _partido.getFecha();\n }", "public int getFECHAECVACT() {\n return fechaecvact;\n }", "public Date getFechaSistema() {\n\t\tfechaSistema = new Date();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTime(fechaSistema);\n\t\tcalendar.add(Calendar.HOUR, (-3));\n\t\tfechaSistema = calendar.getTime();\n\t\treturn fechaSistema;\n\t}", "public java.util.Calendar getFechaFacturado(){\n return localFechaFacturado;\n }", "public static String obtenerFechaActual() {\n\t\tCalendar date = Calendar.getInstance();\n\t\treturn date.get(Calendar.DATE) + \"_\" + (date.get(Calendar.MONTH) < 10 ? \"0\" + (date.get(Calendar.MONTH) + 1) : (date.get(Calendar.MONTH) + 1) + \"\") + \"_\" + date.get(Calendar.YEAR);\n\t}", "public Date getDateDembauche () {\n return dateEmbauche.copie();\n }", "public String formatoCortoDeFecha(Date fecha){\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n return format.format(fecha);\n }", "public int getEdad() {\n\t\treturn (new Date()).getYear()- fechanac.getYear();\n\t}", "public void fijarFecha(int d, int m, int a)\n {\n // put your code here\n dia.setValor(d);\n mes.setValor(m);\n año.setValor(a);\n }", "public Date getFechaNacimiento()\r\n/* 133: */ {\r\n/* 134:242 */ return this.fechaNacimiento;\r\n/* 135: */ }", "public Date getFechaconsulta() {\r\n return fechaconsulta;\r\n }", "public int getDtVenda() {\n return dtVenda;\n }", "public static Date ahora() {\n return ahoraCalendar().getTime();\n }", "public int getFECHAECVACT() {\n return fechaecvact;\n }", "public Date getFecRegistro() {\n return fecRegistro;\n }", "private static String fechaMod(File imagen) {\n\t\tlong tiempo = imagen.lastModified();\n\t\tDate d = new Date(tiempo);\n\t\tCalendar c = new GregorianCalendar();\n\t\tc.setTime(d);\n\t\tString dia = Integer.toString(c.get(Calendar.DATE));\n\t\tString mes = Integer.toString(c.get(Calendar.MONTH));\n\t\tString anyo = Integer.toString(c.get(Calendar.YEAR));\n\t\tString hora = Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\tString minuto = Integer.toString(c.get(Calendar.MINUTE));\n\t\tString segundo = Integer.toString(c.get(Calendar.SECOND));\n\t\treturn hora+\":\"+minuto+\":\"+segundo+\" - \"+ dia+\"/\"+mes+\"/\"+\n\t\tanyo;\n\t}", "public abstract java.lang.String getFecha_inicio();", "public Date getFechaNacim() {\r\n return fechaNacim;\r\n }", "@Override\r\n\tpublic String calculerDonnee() {\n\t\tif (this.quest.getIdPersonne() == null) {\r\n\t\t\tSystem.err\r\n\t\t\t\t\t.println(\"Il n'y a pas de personne associé qu questionnaire, comment voulez vous calculer son age?\");\r\n\t\t\treturn \"-1 idPersonne inconnu\";\r\n\t\t} else {\r\n\t\t\tString[] donnee = GestionDonnee.getInfoPersonne(this.quest\r\n\t\t\t\t\t.getIdPersonne());\r\n\t\t\t// System.err.println(\"donnée : \"+donnee[0]+\" : \"+donnee[1]+\" : \"+donnee[2]);\r\n\r\n\t\t\tDate datenaissance = new Date(donnee[2]);\r\n\t\t\t// System.out.println(\"date actuelle : \"+new\r\n\t\t\t// java.sql.Date(System.currentTimeMillis()).toString());\r\n\t\t\tString temp[] = new java.sql.Date(System.currentTimeMillis())\r\n\t\t\t\t\t.toString().split(\"-\");\r\n\t\t\tDate dateActuelle = new Date(Integer.parseInt(temp[2]),\r\n\t\t\t\t\tInteger.parseInt(temp[1]), Integer.parseInt(temp[0]));\r\n\t\t\t// System.out.println(dateActuelle.annee);\r\n\t\t\t// System.out.println(\"age : \"+datenaissance.calculerAge(dateActuelle)+\"------------------------------------\");\r\n\t\t\treturn datenaissance.calculerAge(dateActuelle).toString();\r\n\r\n\t\t}\r\n\r\n\t}", "public final void calcular() {\n long dias = Duration.between(retirada, devolucao).toDays();\n valor = veiculo.getModelo().getCategoria().getDiaria().multiply(new BigDecimal(dias));\n }", "public boolean fechaVigente(String fechafinal, String horafinal)\r\n\t{\r\n\t\tboolean vigente = true;\r\n\t\tGregorianCalendar calendario = new GregorianCalendar();\r\n\t\tint añoactual = calendario.get(Calendar.YEAR);\r\n\t\tint mesactual = (calendario.get(Calendar.MONTH)+1);\r\n\t\tint diaactual = calendario.get(Calendar.DAY_OF_MONTH);\r\n\t\tString fechaactual = añoactual+\"-\"+mesactual+\"-\"+diaactual;\r\n\t\tint horasactuales = calendario.get(Calendar.HOUR_OF_DAY);\r\n\t\tint minutosactuales = calendario.get(Calendar.MINUTE);\r\n\t\tint segundosactuales = calendario.get(Calendar.SECOND);\r\n\t\tString horaactual = horasactuales+\":\"+minutosactuales+\":\"+segundosactuales;\r\n\t\t\r\n\t\tint añofinal = 0;\r\n\t\tint mesfinal = 0;\r\n\t\tint diafinal = 0;\r\n\t\t\r\n\t\tint horasfinales = 0;\r\n\t\tint minutosfinales = 0;\r\n\t\tint segundosfinales = 0;\r\n\r\n\t\tString numerofecha = \"\";\r\n\t\tfor (int i = 0; i < (fechafinal.length()); i++) \r\n\t\t{\r\n\t\t\tchar digito = fechafinal.charAt(i);\r\n\t\t\tif(digito == '0' || digito == '1' || digito == '2' || digito == '3' || digito == '4' || digito == '5' || digito == '6' || digito == '7' || digito == '8' || digito == '9')\r\n\t\t\t{\r\n\t\t\t\tnumerofecha += digito;\r\n\t\t\t\tif((i+1) == (fechafinal.length()))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(añofinal == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tañofinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mesfinal == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmesfinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(diafinal == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdiafinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(añofinal == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tañofinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(mesfinal == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tmesfinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(diafinal == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tdiafinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tString numerohora = \"\";\r\n\t\tfor (int i = 0; i < (horafinal.length()); i++) \r\n\t\t{\r\n\t\t\tchar digito = horafinal.charAt(i);\r\n\t\t\tif(digito == '0' || digito == '1' || digito == '2' || digito == '3' || digito == '4' || digito == '5' || digito == '6' || digito == '7' || digito == '8' || digito == '9')\r\n\t\t\t{\r\n\t\t\t\tnumerohora += digito;\r\n\t\t\t\tif((i+1) == (horafinal.length()))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(horasfinales == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\thorasfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(minutosfinales == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tminutosfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(segundosfinales == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsegundosfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(horasfinales == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\thorasfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(minutosfinales == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tminutosfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(segundosfinales == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tsegundosfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tString fechafinal2 = añofinal+\"-\"+mesfinal+\"-\"+diafinal;\r\n\t\tString horafinal2 = horasfinales+\":\"+minutosfinales+\":\"+segundosfinales;\r\n\t\tif(añoactual >= añofinal)\r\n\t\t{\r\n\t\t\tif(mesactual >= mesfinal)\r\n\t\t\t{\r\n\t\t\t\tif(diaactual >= diafinal)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(horasactuales >= horasfinales)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(minutosactuales >= minutosfinales)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvigente = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn vigente;\r\n\t}", "public void setFechaDesde(Date fechaDesde)\r\n/* 169: */ {\r\n/* 170:293 */ this.fechaDesde = fechaDesde;\r\n/* 171: */ }", "public Date getDateFinContrat() {\r\n return dateFinContrat;\r\n }", "private boolean evaluarEntrada(Date fechaPoliza, AnalisisDeFlete det) {\r\n\t\treturn true;\r\n\t}", "public String obtenerFechaSistema() {\n Calendar fecha = new GregorianCalendar();\r\n//Obtenemos el valor del año, mes, día,\r\n//hora, minuto y segundo del sistema\r\n//usando el método get y el parámetro correspondiente\r\n int anio = fecha.get(Calendar.YEAR);\r\n int mes = fecha.get(Calendar.MONTH)+1;\r\n int dia = fecha.get(Calendar.DAY_OF_MONTH);\r\n// int hora = fecha.get(Calendar.HOUR_OF_DAY);\r\n// int minuto = fecha.get(Calendar.MINUTE);\r\n// int segundo = fecha.get(Calendar.SECOND);\r\n// String ff = \"\" + dia + \"/\" + (mes + 1) + \"/\" + anio;\r\n String ff;\r\n// = System.out.println(\"Fecha Actual: \"\r\n// + dia + \"/\" + (mes + 1) + \"/\" + año);\r\n// System.out.printf(\"Hora Actual: %02d:%02d:%02d %n\",\r\n// hora, minuto, segundo);\r\n// ff = hora + \":\" + minuto + \":\" + segundo + \".0\";\r\n ff = anio + \"-\" + mes + \"-\" + dia;\r\n return ff;\r\n }", "public int getIntHora(int antelacio)\n {\n int hsel = 1;\n //int nhores = CoreCfg.horesClase.length;\n \n Calendar cal2 = null;\n Calendar cal = null;\n \n for(int i=1; i<14; i++)\n {\n cal = Calendar.getInstance();\n cal.setTime(cfg.getCoreCfg().getIesClient().getDatesCollection().getHoresClase()[i-1]);\n cal.set(Calendar.YEAR, m_cal.get(Calendar.YEAR));\n cal.set(Calendar.MONTH, m_cal.get(Calendar.MONTH));\n cal.set(Calendar.DAY_OF_MONTH, m_cal.get(Calendar.DAY_OF_MONTH));\n\n cal2 = Calendar.getInstance();\n cal2.setTime(cfg.getCoreCfg().getIesClient().getDatesCollection().getHoresClase()[i]);\n cal2.set(Calendar.YEAR, m_cal.get(Calendar.YEAR));\n cal2.set(Calendar.MONTH, m_cal.get(Calendar.MONTH));\n cal2.set(Calendar.DAY_OF_MONTH, m_cal.get(Calendar.DAY_OF_MONTH));\n\n cal.add(Calendar.MINUTE, -antelacio);\n cal2.add(Calendar.MINUTE, -antelacio);\n\n if(cal.compareTo(m_cal)<=0 && m_cal.compareTo(cal2)<=0 )\n {\n hsel = i;\n break;\n }\n }\n\n if(m_cal.compareTo(cal2)>0) {\n hsel = 14;\n }\n\n \n return hsel;\n }", "public int getFECHAFORMALIZ() {\n return fechaformaliz;\n }", "public void setFecha(Fecha fecha) {\r\n this.fecha = fecha;\r\n }", "public int diaReserva(String dataEntrada) {\r\n\t\tint diaReal = Integer.parseInt(dataEntrada.substring(0, 2));\r\n\t\tint mesReal = Integer.parseInt(dataEntrada.substring(3, 5));\r\n\t\tint anoReal = Integer.parseInt(dataEntrada.substring(6, 8));\r\n\t\tmesReal *= 30;\r\n\t\tanoReal *= 365;\r\n\t\treturn diaReal+mesReal+anoReal; \r\n\t}", "private static long getQtdDias(String dataAniversario){\n DateTimeFormatter data = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n LocalDateTime now = LocalDateTime.now();\n String dataHoje = data.format(now);\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.ENGLISH);\n try {\n Date dtAniversario = sdf.parse(dataAniversario);\n Date hoje = sdf.parse(dataHoje);\n //Date hoje = sdf.parse(\"51515/55454\");\n long diferenca = Math.abs(hoje.getTime() - dtAniversario.getTime());\n long qtdDias = TimeUnit.DAYS.convert(diferenca, TimeUnit.MILLISECONDS);\n return qtdDias;\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return 0;\n }", "public int elimiarAlInicio(){\n int edad = inicio.edad;\n if(inicio==fin){\n inicio=fin=null;\n }else{\n inicio=inicio.siguiente;\n }\n return edad;\n }", "public Double getTotalOliDOdeEnvasadoresEntreDates(Long temporadaId, Date dataInici, Date dataFi, Integer idAutorizada) throws InfrastructureException {\r\n\t\tlogger.debug(\"getTotalOliDOdeEnvasadoresEntreDates ini\");\r\n//\t\tCollection listaTrasllat = getEntradaTrasladosEntreDiasoTemporadas(temporadaId, dataInici, dataFi);\r\n\t\tCollection listaTrasllat = null;\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\tdouble litros = 0;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString q = \"from Trasllat tdi where tdi.retornatEstablimentOrigen = true \";\r\n\t\t\tif(dataInici != null){\r\n\t\t\t\tString fi = df.format(dataInici);\r\n\t\t\t\tq = q+ \" and tdi.data >= '\"+fi+\"' \";\r\n\t\t\t}\r\n\t\t\tif(dataFi != null){\r\n\t\t\t\tString ff = df.format(dataFi);\r\n\t\t\t\tq = q+ \" and tdi.data <= '\"+ff+\"' \";\r\n\t\t\t}\r\n\t\t\tlistaTrasllat = getHibernateTemplate().find(q);\t\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tlogger.error(\"getTotalOliDOdeEnvasadoresEntreDates failed\", ex);\r\n\t\t\tthrow new InfrastructureException(ex);\r\n\t\t}\r\n\t\t\r\n\t\t//Para cada uno de lor registro Trasllat separamos los depositos y devolvemos un objeto rasllatDipositCommand\r\n\t\tif (listaTrasllat != null){\r\n\t\t\tfor(Iterator it=listaTrasllat.iterator();it.hasNext();){\r\n\t\t\t\tTrasllat trasllat = (Trasllat)it.next();\r\n\t\t\t\tif(trasllat.getDiposits()!= null){\r\n\t\t\t\t\tfor(Iterator itDip=trasllat.getDiposits().iterator();itDip.hasNext();){\r\n\t\t\t\t\t\tDiposit diposit = (Diposit)itDip.next();\r\n\t\t\t\t\t\tif(idAutorizada!= null && diposit.getPartidaOli() != null && diposit.getPartidaOli().getCategoriaOli() !=null && diposit.getPartidaOli().getCategoriaOli()!= null){\r\n\t\t\t\t\t\t\tif(diposit.getPartidaOli().getCategoriaOli().getId().intValue() == idAutorizada.intValue() && diposit.getVolumActual()!= null){\r\n\t\t\t\t\t\t\t\tlitros+= diposit.getVolumActual().doubleValue();\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlogger.debug(\"getTotalOliDOdeEnvasadoresEntreDates fin\");\r\n\t\treturn Double.valueOf(String.valueOf(litros));\r\n\t}", "public void setCreacion(Date creacion) {\r\n this.creacion = creacion;\r\n }", "public Restauracion(Date fecha) {\r\n this.fecha = fecha;\r\n }", "public void setFechaHasta(Date fechaHasta)\r\n/* 179: */ {\r\n/* 180:312 */ this.fechaHasta = fechaHasta;\r\n/* 181: */ }", "public int getDateRmain() throws ParseException {\n String[] dateParts = description.split(\"<br />\");\n\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"E, dd MMMMM yyyy - HH:mm\");\n String start = dateParts[0];\n Date st = sdf.parse(start.split(\": \")[1]);\n String end = dateParts[1];\n Date ed = sdf.parse(end.split(\": \")[1]);\n Date now = Calendar.getInstance().getTime();\n\n //long daysRemain1=(e.getTime()-s.getTime()+1000000)/(3600*24*1000);\n long diffInMillies = Math.abs(ed.getTime() - st.getTime());\n long diff = TimeUnit.DAYS.convert(diffInMillies, TimeUnit.MILLISECONDS);\n\n dateRmain = (int)diff;\n return dateRmain;\n }", "public Date getGioBatDau();", "public String dar_fecha(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n return dateFormat.format(date).toString();\n\n }", "public Date getFechaAutorizacionGastoExpediente() {\r\n return fechaAutorizacionGastoExpediente;\r\n }", "public Date getDeldte() {\r\n return deldte;\r\n }", "public void setFechaNacim(Date fechaNacim) {\r\n this.fechaNacim = fechaNacim;\r\n }", "public String estadoAlum() {\n String informacion = \"\";\n if (getProm() >= 60) {\n setCad(\"USTED APRUEBA CON TOTAL EXITO\");\n } else {\n if (getProm() <= 59) {\n setCad(\"REPROBADO\");\n }\n }\n return getCad();\n }", "private void incrementeDate() {\n dateSimulation++;\n }", "public void setFechaconsulta(Date fechaconsulta) {\r\n this.fechaconsulta = fechaconsulta;\r\n }", "public Date getFechaAltaDesde() {\r\n\t\treturn fechaAltaDesde;\r\n\t}", "public static String DiaActual(){\n java.util.Date fecha = new Date();\n int dia = fecha.getDay();\n String myDia=null;\n switch (dia){\n case 1:\n myDia=\"LUNES\";\n break;\n case 2:\n myDia=\"MARTES\";\n break;\n case 3:\n myDia=\"MIERCOLES\";\n break;\n case 4:\n myDia=\"JUEVES\";\n break;\n case 5:\n myDia=\"VIERNES\";\n break;\n case 6:\n myDia=\"SABADO\";\n break;\n case 7:\n myDia=\"DOMINGO\";\n break; \n }\n return myDia;\n }", "public void actualizarFechaComprobantes() {\r\n if (utilitario.isFechasValidas(cal_fecha_inicio.getFecha(), cal_fecha_fin.getFecha())) {\r\n tab_tabla1.setCondicion(\"fecha_trans_cnccc between '\" + cal_fecha_inicio.getFecha() + \"' and '\" + cal_fecha_fin.getFecha() + \"' and ide_cntcm=\" + com_tipo_comprobante.getValue());\r\n tab_tabla1.ejecutarSql();\r\n tab_tabla2.ejecutarValorForanea(tab_tabla1.getValorSeleccionado());\r\n utilitario.addUpdate(\"tab_tabla1,tab_tabla2\");\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Rango de fechas no válidas\", \"\");\r\n }\r\n\r\n }", "public static Fecha IngresarFecha(){\n int diaIngreso, mesIngreso,anioIngreso;\r\n Fecha fechaIngreso = null;\r\n boolean condicion=false;\r\n \r\n do {\r\n System.out.println(\"Ingrese una fecha.\\n\"\r\n + \"Ingrese Dia: \");\r\n diaIngreso = TecladoIn.readInt();\r\n System.out.println(\"Ingrese el Mes: \");\r\n mesIngreso = TecladoIn.readLineInt();\r\n System.out.println(\"Ingrese el año: \");\r\n anioIngreso = TecladoIn.readInt();\r\n if (Validaciones.esValidoDatosFecha(diaIngreso, mesIngreso, anioIngreso)) {\r\n fechaIngreso = new Fecha(diaIngreso, mesIngreso, anioIngreso);\r\n \r\n condicion = true;\r\n } else {\r\n System.out.println(\"...........................................\");\r\n System.out.println(\"Ingrese Una Fecha Correcta: Dia/Mes/Año\");\r\n System.out.println(\"...........................................\");\r\n }\r\n } while (condicion != true);\r\n \r\n return fechaIngreso;}", "public static int dan(int mjesec, int day, int godina) {\r\n\r\n\t\tint y = godina - (14 - mjesec) / 12;\r\n\t\tint x = y + y / 4 - y / 100 + y / 400;\r\n\t\tint m = mjesec + 12 * ((14 - mjesec) / 12) - 2;\r\n\t\tint d = (day + x + (31 * m) / 12) % 7;\r\n\t\treturn d;\r\n\t}", "public void comenzarDiaLaboral() {\n\t\tSystem.out.println(\"AEROPUERTO: Inicio del dia laboral, se abren los puestos de informe, atención y freeshops al público, el conductor del tren llega a tiempo como siempre\");\n\t\tthis.turnoPuestoDeInforme.release();\n\t\t}", "protected abstract void calcNextDate();", "public void setFechaCompra() {\n LocalDate fecha=LocalDate.now();\n this.fechaCompra = fecha;\n }", "public void setFechaNacimiento(Date fechaNacimiento)\r\n/* 138: */ {\r\n/* 139:252 */ this.fechaNacimiento = fechaNacimiento;\r\n/* 140: */ }", "public void setFecha(java.util.Calendar fecha)\r\n {\r\n this.fecha = fecha;\r\n }", "public void setFechaModificacion(String p) { this.fechaModificacion = p; }", "public void setFechaModificacion(String p) { this.fechaModificacion = p; }", "private void affichageDateFin() {\r\n\t\tif (dateFinComptage!=null){\r\n\t\t\tSystem.out.println(\"Le comptage est clos depuis le \"+ DateUtils.format(dateFinComptage));\r\n\t\t\tif (nbElements==0){\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos mais n'a pas d'éléments. Le comptage est en anomalie.\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos et est OK.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Le compte est actif.\");\r\n\t\t}\r\n\t}", "public void mostrarHora(String formato){\n Date objDate = new Date();\n SimpleDateFormat objSDF = new SimpleDateFormat(formato);\n //este sera el resultado de la fechas\n fecha=objSDF.format(objDate);\n }", "public void setFechaFacturado(java.util.Calendar param){\n \n this.localFechaFacturado=param;\n \n\n }", "public Date getCreacion() {\r\n return creacion;\r\n }", "public void setDeldte(Date deldte) {\r\n this.deldte = deldte;\r\n }", "public Calendar getFechaMatriculacion() {\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.set(Integer.parseInt(cbox_ano.getSelectedItem().toString()), cbox_mes.getSelectedIndex(),\r\n\t\t\t\tInteger.parseInt(cbox_dia.getSelectedItem().toString()));\r\n\t\treturn c;\r\n\t}", "public HTMLElement getElementFechaModificacionEd() { return this.$element_FechaModificacionEd; }", "public void setFecRegistro(Date fecRegistro) {\n this.fecRegistro = fecRegistro;\n }", "public double calcularIncremento(){\n double incremento=0.0;\n \n if (this.edad>=18&&this.edad<50){\n incremento=this.salario*0.05;\n }\n if (this.edad>=50&&this.edad<60){\n incremento=this.salario*0.10;\n }\n if (this.edad>=60){\n incremento=this.salario*0.15;\n }\n return incremento;\n }", "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "public Date getModificacao() {\n\n\t\treturn this.modificacao;\n\t}", "private String tilStandardDatostreng(Calendar c)\n {\n return c.get(Calendar.DATE) + \"/\" + (c.get(Calendar.MONTH) + 1) + \"/\" + c.get(Calendar.YEAR);\n }", "public Date getNascimento() {\n return this.NASCIMENTO;\n }", "public void setFecModificacion(Date fecModificacion) {\n this.fecModificacion = fecModificacion;\n }" ]
[ "0.69143224", "0.6763469", "0.67155784", "0.6637194", "0.6610289", "0.6570841", "0.64390504", "0.6346667", "0.62876797", "0.62790406", "0.62644595", "0.6213208", "0.61929137", "0.61846936", "0.6179393", "0.6158357", "0.6152355", "0.61473453", "0.61092055", "0.60985565", "0.6096687", "0.6090868", "0.6065575", "0.6064264", "0.60562396", "0.60433656", "0.6033081", "0.60217303", "0.60164887", "0.60098356", "0.59954154", "0.5995147", "0.5985826", "0.59802926", "0.59801006", "0.5974196", "0.5972367", "0.5959416", "0.5956793", "0.5956027", "0.59527904", "0.5921694", "0.59212404", "0.59194154", "0.5910396", "0.59050494", "0.59026647", "0.58931357", "0.5888676", "0.5882103", "0.5878457", "0.5877407", "0.58707833", "0.5867963", "0.5853982", "0.5852976", "0.5844825", "0.5842887", "0.583457", "0.5827836", "0.58077353", "0.58059615", "0.5800659", "0.579936", "0.5798933", "0.57979995", "0.57918566", "0.578608", "0.57733405", "0.5772804", "0.57676715", "0.5765019", "0.576268", "0.57616514", "0.5761594", "0.5752826", "0.5750923", "0.5739498", "0.5728205", "0.57088435", "0.5707308", "0.5695494", "0.56848836", "0.56804353", "0.56673753", "0.566263", "0.566263", "0.5661963", "0.5661222", "0.5653043", "0.5652116", "0.56514204", "0.5648922", "0.56483924", "0.56460476", "0.5641687", "0.5640943", "0.5635761", "0.5635261", "0.56280535", "0.56258595" ]
0.0
-1
Validate Email with regular expression
public static boolean validate(String mobileNo) { // if(mobileNo.length() > 10) // mobileNo = mobileNo.substring(mobileNo.length()-10); pattern = Pattern.compile(MOBILE_PATTERN); matcher = pattern.matcher(mobileNo); return matcher.matches(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static boolean isValid(String email) {\r\n\t\t String regex = \"^[\\\\w-_\\\\.+]*[\\\\w-_\\\\.]\\\\@([\\\\w]+\\\\.)+[\\\\w]+[\\\\w]$\";\r\n\t\t return email.matches(regex);\r\n\t}", "private boolean isEmailValid(String email) {\n return email.matches(\"^[a-zA-Z]{5,12}$\");\r\n }", "private boolean isEmailValid(String email) {\n if(Patterns.EMAIL_ADDRESS.matcher(email).matches()){\n\n return true;\n }else {\n return false;\n }\n// return email.contains(\"@\");\n }", "private boolean checkEmailPattern(String email) {\n Pattern pattern = Pattern.compile(EMAIL_PATTERN);\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }", "protected void validateEmail(){\n\n //Creating Boolean Value And checking More Accurate Email Validator Added\n\n Boolean email = Pattern.matches(\"^[A-Za-z]+([.+-]?[a-z A-z0-9]+)?@[a-zA-z0-9]{1,6}\\\\.[a-zA-Z]{2,6},?([.][a-zA-z+,]{2,6})?$\",getEmail());\n System.out.println(emailResult(email));\n }", "void validate(String email);", "private boolean isEmailValid(String email) {\n return true;\r\n }", "public boolean validarEmail(String email) { \r\n\t\tPattern p = Pattern.compile(\"[a-zA-Z0-9]+[.[a-zA-Z0-9_-]+]*@[a-z0-9][\\\\w\\\\.-]*[a-z0-9]\\\\.[a-z][a-z\\\\.]*[a-z]$\");\r\n\t\tMatcher m = p.matcher(email); \r\n\t\treturn m.matches(); \r\n\t}", "@Override\n\tpublic boolean emailisValid(String email) \n\t{\n\t\treturn false;\n\t}", "public static boolean validateEmail(String email) {\n \n // Compiles the given regular expression into a pattern.\n Pattern pattern = Pattern.compile(PATTERN_EMAIL);\n \n // Match the given input against this pattern\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n \n }", "private void checkValidEmail(String email) throws ValidationException {\n String emailRegex = \"^[\\\\w-_\\\\.+]*[\\\\w-_\\\\.]\\\\@([\\\\w]+\\\\.)+[\\\\w]+[\\\\w]$\";\n if (!email.matches(emailRegex)) {\n throw new ValidationException(\"Incorrect email format\");\n }\n }", "private boolean validateEmail(String email) {\n return Constants.VALID_EMAIL_PATTERN.matcher(email).find();\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return true;\n }", "private boolean isValidMail(String email) {\n String EMAIL_STRING = \"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\";\n return Pattern.compile(EMAIL_STRING).matcher(email).matches();\n }", "private void emailValidation( String email ) throws Exception {\r\n if ( email != null && !email.matches( \"([^.@]+)(\\\\.[^.@]+)*@([^.@]+\\\\.)+([^.@]+)\" ) ) {\r\n throw new Exception( \"Merci de saisir une adresse courriel valide.\" );\r\n }\r\n }", "public boolean emailValidate(final String email) {\n\n\t\tmatcher = pattern.matcher(email);\n\t\treturn matcher.matches();\n\n\t}", "private boolean isEmailValid(String email){\n boolean isValid = false;\n\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n CharSequence inputStr = email;\n //Make the comparison case-insensitive.\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(inputStr);\n if(matcher.matches()){\n isValid = true;\n }\n return isValid;\n }", "private boolean isEmailValid(CharSequence email) {\n return android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches();\n }", "public static boolean validateEmail(String email){\n return email.matches(EMAIL_PATTERN);\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\r\n }", "public static boolean validate(final String email){\n\t\t final Matcher matcher = pattern.matcher(email);\n\t\t return matcher.matches();\n\t }", "static void emailValidation(String email) throws Exception {\n Pattern pattern_email = Pattern.compile(\"^[a-z0-9._-]+@[a-z0-9._-]{2,}\\\\.[a-z]{2,4}$\");\n if (email != null) {\n if (!pattern_email.matcher(email).find()) {\n throw new Exception(\"The value is not a valid email address\");\n }\n } else {\n throw new Exception(\"The email is required\");\n }\n }", "private boolean isEmailValid(String email) {\n return Patterns.EMAIL_ADDRESS.matcher(email).matches();\n }", "private boolean isEmailValid(String email) {\n return Patterns.EMAIL_ADDRESS.matcher(email).matches();\n }", "private boolean isEmailValid(String email){\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\r\n //TODO: Replace this with your own logic\r\n return email.contains(\"@\");\r\n }", "private boolean validEmail(String email) {\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\" +\n \"[a-zA-Z0-9_+&*-]+)*@\" +\n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" +\n \"A-Z]{2,7}$\";\n\n Pattern pat = Pattern.compile(emailRegex);\n return email != null && pat.matcher(email).matches();\n }", "boolean validateEmail(String email) {\n\t\treturn true;\n\n\t}", "public boolean isValidEmail(String u) {\n Pattern pattern = Pattern.compile(EMAIL_PATTERN);\n Matcher matcher = pattern.matcher(u);\n return matcher.matches();\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\");\n }", "public static boolean validateEmail(String email){\n String regular = \"^([a-z0-9A-Z]+[-|\\\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\\\.)+[a-zA-Z]{2,}$\";\n Pattern pattern = Pattern.compile(regular);\n return pattern.matcher(email).matches();\n }", "private boolean isEmailValid(String email) {\n //TODO: Replace this with your own logic\n return email.contains(\"@\");\n }", "private static boolean isValid(String email){\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\"+\n \"[a-zA-Z0-9_+&*-]+)*@\" +\n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" +\n \"A-Z]{2,7}$\";\n\n Pattern pat = Pattern.compile(emailRegex);\n if (email == null)\n return false;\n return pat.matcher(email).matches();\n\n }", "public static boolean checkEmail (String email) throws IllegalArgumentException{\n check = Pattern.compile(\"^[a-zA-Z0-9]+(?:\\\\+*-*.[a-zA-Z0-9]+)*@[a-zA-Z0-9]+(?:\\\\.[a-zA-Z0-9]{2,}+)*$\").matcher(email).matches();\n if (check) {\n return true;\n } else {\n throw new IllegalArgumentException(\"Enter a valid Email Address\");\n }\n }", "private boolean isEmailValid(String email) {\n if (email.length() == 8){\n return true;\n }\n\t//user names first two characters must be letters\n Boolean condition1 = false;\n Boolean condition2 = false;\n\n int ascii = (int) email.charAt(0);\n if ((ascii >= 65 && ascii <= 90) || ascii >= 97 && ascii <= 122){\n condition1 = true;\n }\n ascii = (int) email.charAt(1);\n if ((ascii >= 65 && ascii <= 90) || ascii >= 97 && ascii <= 122){\n condition2 = true;\n }\n if (condition1 == true && condition2 == true){\n return true;\n }\n\n\t//user names last six characters must be numbers\n for (int i = email.length()-6; i < email.length(); i++){\n ascii = (int) email.charAt(i);\n if (!(ascii >= 48 && ascii <= 57)){\n return false;\n }\n }\n\n return true;\n }", "public static boolean validarEmail(String email) {\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\"+ \n \"[a-zA-Z0-9_+&*-]+)*@\" + \n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" + \n \"A-Z]{2,7}$\"; \n \n Pattern pat = Pattern.compile(emailRegex); \n if (email == null) \n return false; \n return pat.matcher(email).matches(); \n }", "boolean isValidEmail(String email){\n boolean ValidEmail = !email.isEmpty() && Patterns.EMAIL_ADDRESS.matcher(email).matches();\n if(!ValidEmail){\n userEmail.setError(\"please fill this field correctly\");\n return false;\n }\n return true;\n }", "private boolean isValidEmail(String email) {\n String EMAIL_PATTERN = \"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@\"\n + \"[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\";\n\n Pattern pattern = Pattern.compile(EMAIL_PATTERN);\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }", "public static boolean validateEmail(String email){\n String emailcheck= \"[a-zA-Z0-9._-]+@[a-z]+\\\\.+[a-z]+\";\n boolean iscorrect= email.trim().matches(emailcheck);\n return iscorrect;\n }", "private void validationEmail(String email) throws Exception {\r\n\t\tif (email != null && email.trim().length() != 0) {\r\n\t\t\tif (!email.matches(\"([^.@]+)(\\\\.[^.@]+)*@([^.@]+\\\\.)+([^.@]+)\")) {\r\n\t\t\t\tthrow new Exception(\"Merci de saisir une adresse mail valide.\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Exception(\"Merci de saisir une adresse mail.\");\r\n\t\t}\r\n\t}", "public static\n\tboolean isValidEmail(String value)\n\t{\n\t\treturn !StringX.isBlank(value) && RegExHelper.EMAIL_PATTERN.matcher(value).matches();\n\t}", "public static boolean checkEmail(String email){\n String regex = \"^[\\\\w!#$%&’*+/=?`{|}~^-]+(?:\\\\.[\\\\w!#$%&’*+/=?\"\n + \"`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\\\.)+[a-zA-Z]{2,6}$\";\n if (email.matches(regex))\n return true;\n else\n return false;\n }", "public boolean validateMail(String mail){\n Pattern pattern;\n Matcher matcher;\n pattern = Pattern.compile(\"^[_A-Za-z0-9-]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n matcher = pattern.matcher(mail);\n return matcher.matches();\n }", "protected boolean isValidEmailAddress(String email) {\n return EMAIL_REGEX.matcher(email).matches();\n }", "public boolean validateEmail(final String hex) {\n pattern = Pattern.compile(EMAIL_PATTERN);\n matcher = pattern.matcher(hex);\n return matcher.matches();\n }", "private static boolean isEmailValid(String email) {\n String emailRegex = \"^[a-zA-Z0-9_+&*-]+(?:\\\\.\" +\n \"[a-zA-Z0-9_+&*-]+)*@\" +\n \"(?:[a-zA-Z0-9-]+\\\\.)+[a-z\" +\n \"A-Z]{2,7}$\";\n\n Pattern pat = Pattern.compile(emailRegex);\n if (email == null)\n return false;\n return pat.matcher(email).matches();\n }", "private boolean isValidEmail(TextInputLayout tiEmail, EditText etEmail) {\n String email = etEmail.getText().toString().trim();\n boolean result = false;\n\n if (email.length() == 0)\n tiEmail.setError(c.getString(R.string.required));\n else {\n Pattern emailPattern = Patterns.EMAIL_ADDRESS;\n if (!emailPattern.matcher(email).matches())\n tiEmail.setError(c.getString(R.string.invalid));\n else {\n tiEmail.setError(null);\n result = true;\n }\n }\n\n return result;\n }", "public static boolean isEmailValid(String email) {\r\n boolean isValid = false;\r\n\r\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\r\n CharSequence inputStr = email;\r\n\r\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\r\n Matcher matcher = pattern.matcher(inputStr);\r\n if (matcher.matches()) {\r\n isValid = true;\r\n }\r\n return isValid;\r\n }", "private boolean checkEmail(String email) {\n\n\t\tString patternStr = \"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\";\n\t\tPattern pattern = Pattern.compile(patternStr, Pattern.CASE_INSENSITIVE);\n\t\tMatcher matcher = pattern.matcher(email);\n\t\tboolean matchFound = matcher.matches();\n\t\treturn matchFound;\n\n\t}", "public boolean isEmailValid(String email) {\n return true;\n }", "private boolean isEmailValid(String email) {\n return email.equals(\"[email protected]\");\n }", "private boolean checkemail(String s) {\n\t\tboolean flag = false;\r\n\t\tString[] m = s.split(\"@\");\r\n\t\tif (m.length < 2) {\r\n\t\t\tflag = true;\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "public static boolean isEmailValid(String email) {\n boolean isValid = false;\n\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n CharSequence inputStr = email;\n\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(inputStr);\n if (matcher.matches()) {\n isValid = true;\n }\n return isValid;\n }", "public static boolean isEmailValid(String email) {\n boolean isValid = false;\n\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n CharSequence inputStr = email;\n\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(inputStr);\n if (matcher.matches()) {\n isValid = true;\n }\n return isValid;\n }", "private boolean checkEmailString(String email) {\n boolean validEmail = true;\n try {\n InternetAddress emailAddr = new InternetAddress(email);\n emailAddr.validate();\n } catch (AddressException ex) {\n validEmail = false;\n }\n return validEmail;\n }", "public boolean emailFormat(String email){\n Pattern VALID_EMAIL_ADDRESS_REGEX =\n Pattern.compile(\"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\", Pattern.CASE_INSENSITIVE);\n Matcher matcher=VALID_EMAIL_ADDRESS_REGEX.matcher(email);\n return matcher.find();\n\n }", "boolean validateMailAddress(final String mailAddress);", "public void validateEmail(String email) throws SubscriptionValidationException {\n final Pattern VALID_EMAIL_ADDRESS_REGEX = Pattern.compile(\"^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\\\.[A-Z]{2,6}$\",\n Pattern.CASE_INSENSITIVE);\n Matcher matcher = VALID_EMAIL_ADDRESS_REGEX.matcher(email);\n if (!(matcher.matches())) {\n throw new SubscriptionValidationException(\"Wrong email address: \" + email);\n }\n }", "private boolean isEmailValid(String email) {\n return email.contains(\"@\") && (email.length() <= 30); //TODO: Perhaps change to a longer maximum length? Also in db.\n }", "public static boolean esEmailCorrecto(String email) {\n \n boolean valid = false;\n \n Pattern p = Pattern.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@\" +\"[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n \n Matcher mE = p.matcher(email.toLowerCase());\n if (mE.matches()){\n valid = true; \n }\n return valid;\n }", "public static boolean verifyEmailFormat(String email) {\n\t\tboolean isValid = false;\n\n\t\tif (email != null) {\n\t\t\tPattern p = Pattern.compile(\".+@.+\\\\.[a-z]+\");\n\t\t\tMatcher m = p.matcher(email);\n\t\t\tisValid = m.matches();\n\t\t}\n\n\t\treturn isValid;\n\t}", "private void validateEmail() {\n mEmailValidator.processResult(\n mEmailValidator.apply(binding.registerEmail.getText().toString().trim()),\n this::validatePasswordsMatch,\n result -> binding.registerEmail.setError(\"Please enter a valid Email address.\"));\n }", "private boolean isEmail(String email)\n {\n Pattern pat = null;\n Matcher mat = null;\n pat = Pattern.compile(\"^[\\\\w\\\\\\\\\\\\+]+(\\\\.[\\\\w\\\\\\\\]+)*@([A-Za-z0-9-]+\\\\.)+[A-Za-z]{2,4}$\");\n mat = pat.matcher(email);\n if (mat.find()) {\n return true;\n }\n else\n {\n return false;\n }\n }", "public static boolean isEmailValid(String email) {\n String regExpression = \"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\\\.[A-Za-z]{2,4}\";\n\n Pattern pattern = Pattern.compile(regExpression, Pattern.CASE_INSENSITIVE);\n Matcher matcher = pattern.matcher(email);\n\n if (matcher.matches())\n return true;\n else\n return false;\n }", "private boolean isValidEmail(final String theEmail) {\n return theEmail.contains(\"@\");\n }", "public boolean checkEmail(String email){\r\n boolean check = true;\r\n if(!email.matches(\"^[a-zA-Z0-9]+@[a-zA-Z0-9]+(.[a-zA-Z]{2,})$\")){\r\n check = false;\r\n }\r\n return check;\r\n }", "@Test\n public void testBasicValid() {\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"admin@mailserver1\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n assertTrue(EmailValidator.isValid(\"user%[email protected]\"));\n assertTrue(EmailValidator.isValid(\"[email protected]\"));\n }", "private boolean isEmailValid(String email) {\n //TODO: Replace this with your own logic\n return email.length() > 0;\n }", "private void validationEmail(String email) throws FormValidationException {\n\t\tif (email != null) {\n\t\t\tif (!email.matches(\"([^.@]+)(\\\\.[^.@]+)*@([^.@]+\\\\.)+([^.@]+)\")) {\n\t\t\t\tSystem.out.println(\"Merci de saisir une adresse mail valide.\");\n\n\t\t\t\tthrow new FormValidationException(\n\t\t\t\t\t\t\"Merci de saisir une adresse mail valide.\");\n\t\t\t\t// } else if ( groupDao.trouver( email ) != null ) {\n\t\t\t\t// System.out.println(\"Cette adresse email est déjà utilisée, merci d'en choisir une autre.\");\n\t\t\t\t// throw new FormValidationException(\n\t\t\t\t// \"Cette adresse email est déjà utilisée, merci d'en choisir une autre.\"\n\t\t\t\t// );\n\t\t\t}\n\t\t}\n\t}", "public static boolean email(String email) {\r\n\t\tboolean resul = false;\r\n\r\n\t\tif (email != null) {\r\n\t\t\tMatcher matcher = VALID_EMAIL_ADDRESS_REGEX.matcher(email);\r\n\t\t\tresul = matcher.find();\r\n\t\t}\r\n\r\n\t\treturn resul;\r\n\t}", "public static boolean isEmailValid(String email) {\n boolean isValid = false;\n //Acceptable email formats include:\n String expression = \"^[\\\\w\\\\.-]+@([\\\\w\\\\-]+\\\\.)+[A-Z]{2,4}$\";\n Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);\n CharSequence inputStr = email;\n Matcher matcher = pattern.matcher(inputStr);\n if(matcher.matches()) {\n isValid = true;\n }\n return isValid;\n }", "public static boolean email(String email) throws UserRegistrationException {\n\t\tboolean resultEmail = validateEmail.validator(email);\n\t\tif(true) {\n\t\t\treturn Pattern.matches(patternEmail, email);\n\t\t}else\n\t\t\tthrow new UserRegistrationException(\"Enter correct Email\");\n\t}", "private static boolean isEmail(String string) {\r\n if (string == null) return false;\r\n String regEx1 = \"^([a-z0-9A-Z]+[-|\\\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\\\.)+[a-zA-Z]{2,}$\";\r\n Pattern p;\r\n Matcher m;\r\n p = Pattern.compile(regEx1);\r\n m = p.matcher(string);\r\n if (m.matches()) return true;\r\n else\r\n return false;\r\n }", "public static boolean validateEmail(final String email) {\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }", "public static boolean isEmailValid(String email) {\r\n\r\n return email.matches(\"^([a-z]|[A-Z]){1,100}@([a-z]|[A-Z]){1,100}\\\\.([a-z]|[A-Z]){1,10}\");\r\n }", "@Test\n public void Email_WhenValid_ShouldReturnTrue(){\n RegexTest valid = new RegexTest();\n boolean result = valid.Email(\"[email protected]\");\n Assert.assertEquals(true,result);\n }", "public static boolean validateEmail(String email) {\n Pattern pattern = Pattern.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@\"\n + \"[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n Matcher matcher = pattern.matcher(email);\n return matcher.matches();\n }", "public boolean validEmailAddress(String string) {\n\n String pattern = \"^([a-zA-Z0-9_\\\\-\\\\.]+)@([a-zA-Z0-9_\\\\-\\\\.]+)\\\\.([a-zA-Z]{2,5})$\";\n\n if (string.matches(pattern))\n return true;\n else\n return false;\n }" ]
[ "0.78645706", "0.7812508", "0.77753085", "0.7740057", "0.7733386", "0.76476276", "0.7627885", "0.7594782", "0.7555", "0.755271", "0.7548012", "0.7542181", "0.7514232", "0.7514232", "0.7514232", "0.7514232", "0.75125796", "0.7486368", "0.74819565", "0.7480735", "0.74544996", "0.7434196", "0.74312586", "0.74312586", "0.74312586", "0.74312586", "0.7429169", "0.74006164", "0.7394828", "0.7394828", "0.73636705", "0.7355559", "0.7341685", "0.73241025", "0.7309363", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7301277", "0.7287647", "0.7276319", "0.72740185", "0.72653174", "0.7255818", "0.7246928", "0.7245309", "0.72310835", "0.7226586", "0.72190905", "0.72139275", "0.72070205", "0.7205721", "0.7192024", "0.7189372", "0.71801573", "0.71704394", "0.7169292", "0.7157866", "0.7145526", "0.7145161", "0.7136766", "0.7129082", "0.7129082", "0.7119253", "0.71191937", "0.7119065", "0.7117721", "0.70961106", "0.7092527", "0.70871055", "0.7083985", "0.7068008", "0.70408964", "0.7036628", "0.7035541", "0.7026697", "0.702529", "0.7022586", "0.7011075", "0.6991242", "0.69869226", "0.6983553", "0.6982678", "0.6963984", "0.6962528", "0.69602937", "0.6942429" ]
0.0
-1
Checks for Null String object
public static boolean isNotNull(String txt){ return txt!=null && txt.trim().length()>0 ? true: false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tvoid testCheckString4() {\n\t\tassertFalse(DataChecker.checkString((String)null));\n\t}", "private boolean checkForEmptyString(Object value)\n\t{\n\t\tif (value == null || value.toString().isEmpty()) \n\t\t\treturn true;\n\t\treturn false;\n\t}", "public void testCheckNull() {\n Util.checkNull(\" \", \"test\");\n }", "@Test\n\tpublic void testNullString() {\n\t\tString s = null;\n\t\tassertTrue(\"Null string\", StringUtil.isEmpty(s));\n\t}", "private static void checkForNullValue(String value) {\n if ( value == null ) {\n throw new NullPointerException();\n }\n }", "public static String checkString(String s) {\n if(s==null || s.length()==0) return null;\n return s;\n }", "private String checkNullString(String text) {\n if ( text.contains( \" \" )) {\n return null;\n }\n\n // otherwise, we're totally good\n return text;\n }", "public static boolean isNullOrEmptyString(Object obj) {\r\n\t\treturn (obj instanceof String) ? ((String)obj).trim().equals(\"\") : obj==null;\r\n\t}", "@Test\n\tvoid testCheckString3() {\n\t\tassertFalse(DataChecker.checkString(null));\n\t}", "public void testCheckNull() {\n Util.checkNull(\"\", \"test\");\n }", "public static String checkNull(String string1) {\n if (string1 != null)\n return string1;\n else\n return \"\";\n }", "public String checkNull(String result) {\r\n\t\tif (result == null || result.equals(\"null\")) {\r\n\t\t\treturn \"\";\r\n\t\t} else {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}", "private boolean hasValue (String s) { return s != null && s.length() != 0; }", "private boolean m16125a(Object obj) {\n return obj == null || obj.toString().equals(\"\") || obj.toString().trim().equals(\"null\");\n }", "private String getStringOrNull (String value) {\n if (value == null || value.isEmpty()) value = null;\n return value;\n }", "static String checkEmptyString(String str, String strName) {\n String errorMsg = \"empty \" + strName;\n str = Optional.ofNullable(str).map(s -> {\n if(s.isEmpty()) {\n throw new NullPointerException(errorMsg);\n }\n return s;\n }).orElseThrow(() -> new NullPointerException(errorMsg));\n return str;\n }", "public void testCheckString_NullArg() {\n try {\n Util.checkString(null, \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public void testCheckString_NullArg() {\n try {\n Util.checkString(null, \"Test\");\n\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "public static String checkNull(String sInString) {\n\n\t\tString sOutString = \"\";\n\n\t\tif (sInString == null || sInString.trim().equals(\"\")) {\n\t\t\tsOutString = \"\";\n\t\t} else {\n\t\t\tsOutString = sInString.trim();\n\t\t}\n\n\t\treturn sOutString;\n\n\t}", "public static boolean isNotNull(String str) {\n\t\tif(str==null||\"\".equals(str.trim())||\"NULL\".equals(str.trim().toUpperCase())){\n\t\t\treturn false ;\n\t\t}\n\t\treturn true;\n\t}", "public static String requireNullOrNonEmpty(String str) {\n if (str != null && str.isEmpty()) {\n throw new IllegalArgumentException();\n }\n return str;\n }", "@Test\n\tpublic void caseNameWithNull() {\n\t\tString caseName = \"null\";\n\t\ttry {\n\t\t\tStringNumberUtil.stringUtil(caseName);\n\t\t\tfail();\n\t\t} catch (StringException e) {\n\n\t\t}\n\t}", "static boolean isNullOrEmpty(String string) {\n return string == null || string.isEmpty();\n }", "static boolean isNullOrEmpty(String str){\n if(str == null){\n return true;\n }\n if(str.isEmpty()){\n return true;\n }\n if(str.length() == 0){\n return true;\n }\n if(str.equalsIgnoreCase(\" \")){\n return true;\n }\n return false;\n }", "public static boolean nullity(String param) {\n return (param == null || param.trim().equals(\"\"));\n }", "private static boolean isEmpty(CharSequence str) {\n return str == null || str.length() == 0;\n }", "public static boolean isNotNull(String txt){\n return txt!=null && txt.trim().length()>0 ? true: false;\n }", "private boolean isEmpty(String str) {\n return (str == null) || (str.equals(\"\"));\n }", "protected static boolean isDBNull( String s )\r\n\t{\r\n\t\treturn ( s == null ) || s.equals( \"\\\\N\" ) || s.equals( \"NULL\" );\r\n\t}", "protected boolean isEmpty(Object obj) {\r\n return (obj == null || obj instanceof String\r\n && ((String) obj).trim().length() == 0);\r\n }", "public static boolean checkNullOrEmptyString(String inputString) {\n\t\treturn inputString == null || inputString.trim().isEmpty();\n\t}", "private static boolean isEmpty(String str) {\n return str == null || str.trim().isEmpty();\n }", "public static String checkNull(String string1, String string2) {\n if (string1 != null)\n return string1;\n else if (string2 != null)\n return string2;\n else\n return \"\";\n }", "@Test(expected=IllegalArgumentException.class)\n\tpublic void testcontainsUniqueCharsNaiveNullString() {\n\t\tQuestion11.containsUniqueCharsNaive(null);\n\t}", "boolean canMatchEmptyString() {\n return false;\n }", "private boolean checkForEmpty(String str){\r\n\t\tString sourceStr = str;\r\n\t\tif(StringUtils.isBlank(sourceStr)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Test\n public void nonNullStringPass() {\n }", "public static boolean isEmptyString(String theString)\n {\n return (theString == null || theString.length() == 0 || theString.equalsIgnoreCase(\"null\"));\n }", "public boolean canProvideString();", "public static String checkNullObject(Object val) {\n\n if (val != null) {\n if (\"\".equals(val.toString().trim())) {\n return \"\";\n }\n return val.toString();\n } else {\n return \"\";\n }\n }", "public static boolean isNullOrEmpty(String strIn)\r\n {\r\n return (strIn == null || strIn.equals(\"\"));\r\n }", "private String notNull(String value) {\n return value != null ? value : \"\";\n }", "@Test(expected=IllegalArgumentException.class)\n\tpublic void testContainsUniqueChars2NullString() {\n\t\tQuestion11.containsUniqueChars2(null);\n\t}", "public static boolean IsNullOrEmpty(String text) {\n\t\treturn text == null || text.length() == 0;\n\t}", "public static boolean stringNullOrEmpty ( String string ) {\r\n if ( string == null ) return true;\r\n if ( string.isEmpty() ) return true;\r\n return false;\r\n }", "public static String dispNull (String input) {\n //because of short circuiting, if it's null, it never checks the length.\n if (input == null || input.length() == 0)\n return \"N/A\";\n else\n return input;\n }", "public static String dispNull (String input) {\n //because of short circuiting, if it's null, it never checks the length.\n if (input == null || input.length() == 0)\n return \"N/A\";\n else\n return input;\n }", "public static String dispNull (String input) {\n //because of short circuiting, if it's null, it never checks the length.\n if (input == null || input.length() == 0)\n return \"N/A\";\n else\n return input;\n }", "public static String requireNullOrNonEmpty(String str, String message) {\n if (str != null && str.isEmpty()) {\n throw new IllegalArgumentException(message);\n }\n return str;\n }", "@Test\n public void nonNullString() {\n }", "private static boolean isEmpty(CharSequence str) {\n if (str == null || str.length() == 0) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isNullOrEmpty(String str){\n \treturn str!=null && !str.isEmpty() ? false : true;\n }", "@Test(expected = NullPointerException.class)\n\tpublic void testNull() {\n\n\t\tString str = null;\n\t\tstr.toUpperCase();\n\t}", "public static boolean isEmpty(CharSequence str) {\n if (str == null || str.length() == 0 || \"null\".equals(str))\n return true;\n else\n return false;\n }", "static boolean containsNoData(String str) {\n return \"\".equals(str) || \"-\".equals(str);\n }", "private boolean isEmpty(String string) {\n\t\treturn string == null || string.isEmpty();\n\t}", "@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }", "private boolean isEmpty(String s) {\n return s == null || \"\".equals(s);\n }", "protected boolean isEmpty(String s) {\n return s == null || s.trim().isEmpty();\n }", "public static Boolean IsStringNullOrEmpty(String value) {\n\t\treturn value == null || value == \"\" || value.length() == 0;\n\t}", "public static String displayNull (String input)\r\n {\r\n //because of short circuiting, if it's null, it never checks the length.\r\n if (input == null || input.length() == 0)\r\n return \"N/A\";\r\n else\r\n return input;\r\n }", "public static String checkNull(String string1, String string2, String string3) {\n if (string1 != null)\n return string1;\n else if (string2 != null)\n return string2;\n else if (string3 != null)\n return string3;\n else\n return \"\";\n }", "public void testGetNullValue() {\n ValueString vs = new ValueString();\n\n assertNull(vs.getString());\n assertEquals(0.0D, vs.getNumber(), 0.0D);\n assertNull(vs.getDate());\n assertEquals(false, vs.getBoolean());\n assertEquals(0, vs.getInteger());\n assertEquals(null, vs.getBigNumber());\n assertNull(vs.getSerializable());\n }", "abstract boolean canMatchEmptyString();", "public static boolean isValid(String str) {\r\n\t\tif(str != null && !str.isEmpty())\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public static boolean checkEmptiness(String str) {\r\n return str != null && !str.trim().equals(\"\");\r\n }", "private static String null2unknown(String in) {\r\n\t\tif (in == null || in.length() == 0) {\r\n\t\t\treturn null;\r\n\t\t} else {\r\n\t\t\treturn in;\r\n\t\t}\r\n\t}", "public static boolean isBlankOrNullString(String s){\n return s == null || s.isEmpty() || s.equalsIgnoreCase(\"\");\n }", "public static boolean isNullOrEmpty(String str) {\n return str == null || str.isEmpty();\n }", "public static void validateNull(JsonObject inputObject, String value) throws ValidatorException {\n if (value != null && !(value.equals(\"null\") || value.equals(\"\\\"null\\\"\"))) {\n ValidatorException exception = new ValidatorException(\"Expected a null but found a value\");\n logger.error(\"Received not null input\" + value + \" to be validated with : \" + inputObject\n .toString(), exception);\n throw exception;\n }\n }", "boolean checkNull();", "protected boolean notEmpty(String s) {\n return s != null && s.length() != 0;\n }", "private static final boolean isEmpty(String s) {\n return s == null || s.trim().length() < 1;\n }", "public static boolean isEmptyString(String s) {\n return (s==null || s.equals(\"\"));\n }", "public static boolean isEmptyString(Object o) {\n \tif (o instanceof java.lang.String) {\n \t\treturn isEmptyString((String)o);\n \t}\n \treturn false;\n \t\n }", "private static boolean isBlank(String str)\r\n/* 254: */ {\r\n/* 255: */ int length;\r\n/* 256:300 */ if ((str == null) || ((length = str.length()) == 0)) {\r\n/* 257:301 */ return true;\r\n/* 258: */ }\r\n/* 259: */ int length;\r\n/* 260:302 */ for (int i = length - 1; i >= 0; i--) {\r\n/* 261:303 */ if (!Character.isWhitespace(str.charAt(i))) {\r\n/* 262:304 */ return false;\r\n/* 263: */ }\r\n/* 264: */ }\r\n/* 265:306 */ return true;\r\n/* 266: */ }", "public static boolean isNotNull(String txt) {\n return txt != null && txt.trim().length() > 0 ? true : false;\n }", "private void valida(String str)throws Exception{\n\t\t\t\n\t\t\tif(str == null || str.trim().isEmpty()){\n\t\t\t\tthrow new Exception(\"Nao eh possivel trabalhar com valores vazios ou null.\");\n\t\t\t}\n\t\t\n\t\t}", "static <T> boolean isNullOrEmpty(T t){\n if(t == null){\n return true;\n }\n String str = t.toString();\n if(str.isEmpty()){\n return true;\n }\n if(str.length() == 0){\n return true;\n }\n return false;\n }", "public static boolean isNullOrEmpty(String text) {\n if (text == null || text.equals(\"\")) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isString();", "public static final boolean isEmpty(String strSource){\n return strSource==null ||strSource.equals(\"\")|| strSource.trim().length()==0; \n }", "@Override\r\n public boolean checkNull() {\r\n // Check if the two textfields are null or default \r\n return newIng_ingName.getText().equals(\"\") || newIng_ingCal.getText().equals(\"\");\r\n }", "public boolean isString() {\n return false;\n }", "@Test\n public void testIsNullValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = null;\n boolean result = service.isValidName(name);\n assertEquals(false, result);\n }", "public boolean validString(String str){\n if(!str.equals(null) && str.length() <= this.MAX_LEN){\n return true;\n }\n return false;\n }", "public static boolean isStringEmpty(String str) {\r\n return (str == null) || \"\".equals(str.trim());\r\n }", "public String verifyNullValue(String object, String data) {\n\t\tlogger.debug(\"Verifying the Textbox text is null\");\n\t\ttry {\n\t\t\tdata = \"\";\n\t\t\tString actual = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))).getAttribute(OR.getProperty(\"ATTRIBUTE_VALUE\"));\n\t\t\tString expected = data;\n\n\t\t\tlogger.debug(\"actual\" + actual);\n\t\t\tlogger.debug(\"expected\" + expected);\n\t\t\tif (actual.equals(expected))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- text not verified--\" + actual + \" -- \" + expected;\n\t\t} \ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Object not found \" + e.getMessage();\n\t\t}\n\t}", "public static boolean notEmpty(String str) {\n return str != null && !\"\".equals(str) && !\"null\".equalsIgnoreCase(str);\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void whenNullStringUsed_ExceptionIsThrown() {\n\t\tString input = null;\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tstringUtility.castWordNumberToNumber(input);\n\t}", "public static boolean isNullOrEmpty(String text) {\n return text == null || text.trim().isEmpty() || text.trim().equals(\"null\");\n }", "@Override\n\tpublic boolean supports(Object value) {\n\t\treturn value != null && (value instanceof String);\n\t}", "public static boolean isBlank(String str)\n {\n if( str == null || str.length() == 0 )\n return true;\n return false;\n }", "private static boolean isBlank(CharSequence str) {\n int strLen;\n if (str == null || (strLen = str.length()) == 0) {\n return true;\n }\n for (int i = 0; i < strLen; i++) {\n if ((Character.isWhitespace(str.charAt(i)) == false)) {\n return false;\n }\n }\n return true;\n }", "private static boolean validName(String name) {\n return name != null && !name.strip().isBlank();\n }", "public String notNull(String text)\n {\n return text == null ? \"\" : text;\n }", "public static final boolean isNullOrWhitespace(final String str) {\n\t\treturn (str == null || str.trim().isEmpty());\n\t}", "public static void verifyNonEmptyString(String variableName, Object value, Class<?> owner) throws DiagnoseException {\r\n DiagnoseUtil.verifyNotNull(variableName, value, owner);\r\n if (!(value instanceof String))\r\n throw new DiagnoseException(owner.getName() + \" parameter [\" + variableName + \"] must be a String.\");\r\n String stringValue = (String) value;\r\n if (stringValue.length() == 0)\r\n throw new DiagnoseException(owner.getName() + \" parameter [\" + variableName + \"] cannot be empty.\");\r\n }", "public static boolean isEmpty(CharSequence str) {\n return str == null || str.length() == 0;\n }", "public boolean canProcessNull() {\n return false;\n }" ]
[ "0.74294907", "0.73421806", "0.7314156", "0.7313515", "0.7226197", "0.7197037", "0.711619", "0.70788395", "0.7073044", "0.6992757", "0.6988361", "0.69581854", "0.6948729", "0.69486505", "0.6892827", "0.6872995", "0.68274486", "0.68274486", "0.67947394", "0.6781013", "0.6762445", "0.67319167", "0.6723758", "0.6700143", "0.6657269", "0.66243", "0.6618334", "0.6614979", "0.66023326", "0.65754116", "0.65700597", "0.65498406", "0.65424424", "0.6534261", "0.6524105", "0.6523647", "0.651989", "0.6496094", "0.64891404", "0.64887106", "0.6483692", "0.64827484", "0.647676", "0.6462077", "0.6426129", "0.6424231", "0.6421311", "0.6421311", "0.6421016", "0.6411821", "0.64092773", "0.6408181", "0.64014447", "0.63854253", "0.6379454", "0.63731486", "0.63415956", "0.63385534", "0.63284284", "0.63245845", "0.6322225", "0.631102", "0.63095224", "0.6297371", "0.62845355", "0.628376", "0.62714994", "0.6265442", "0.6258813", "0.6254253", "0.62429005", "0.6241438", "0.62312686", "0.6230281", "0.62263405", "0.6222529", "0.62125796", "0.62115765", "0.62108016", "0.61948675", "0.6194616", "0.61885506", "0.6188236", "0.6181801", "0.6175411", "0.6166179", "0.6154912", "0.61484504", "0.6144198", "0.6143925", "0.6133139", "0.61169875", "0.6107427", "0.6106159", "0.6105685", "0.61021876", "0.610189", "0.6099797", "0.60890406", "0.60881144" ]
0.6580874
29
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_contacts, container, false); ButterKnife.bind(this, v); ContactListViewModel contactListViewModel = ViewModelProviders.of(this).get(ContactListViewModel.class); contactListViewModel.init(); LiveData<PagedList<Contact>> contactsLiveData = contactListViewModel.getContactList(); contactsLiveData.observe(this, new Observer<PagedList<Contact>>() { @Override public void onChanged(@Nullable PagedList<Contact> contacts) { contactListView.setData(contacts); } }); return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
LocalDate birthday = LocalDate.of(1990, 7, 4); Driver driver = new Driver("Mockracer", "Mocky", "McMockerson", birthday); when(repository.save(any(Driver.class))).thenReturn(driver);
@BeforeEach void setUp() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void whenReviewCreationSuccessful() throws Exception{\n //Arrange\n ReviewMapping first= new ReviewMapping(new Long(1),new Long(2),\"good\",5);\n ReviewMapping second= new ReviewMapping(3L,new Long(1),new Long(1),\"good\",3);\n Mockito.when(reviewRepository.save(ArgumentMatchers.any(ReviewMapping.class))).thenReturn(second);\n\n ReviewMapping e= reviewService.addNewReviewMapping(first);\n assertThat(e.getId(), equalTo(3L));\n }", "@Test\n void save() {\n Owner ownerToSave = Owner.builder().id(1L).build();\n\n // When I call \"save\" I want to return the owner\n when(ownerRepository.save(any())).thenReturn(returnOwner);\n\n // I call the method\n Owner savedOwner = service.save(ownerToSave);\n\n // I'm expecting to be not null\n assertNotNull(savedOwner);\n\n // I can verify if that method was called - optional\n verify(ownerRepository).save(any());\n }", "@Test\n\n public void create() {\n User user = new User();\n user.setAccount(\"TestUser03\");\n user.setEmail(\"[email protected]\");\n user.setPhoneNumber(\"010-1111-3333\");\n user.setCreatedAt(LocalDateTime.now());\n user.setCreatedBy(\"TestUser3\");\n\n User newUser = userRepository.save(user);\n System.out.println(\"newUser : \" + newUser);\n }", "@Test\n public void testInsert() {\n\n User user = new User();\n user.setUsername(\"yinka\");\n\n user = repository.save(user);\n\n assertEquals(user, repository.findOne(user.getId()));\n assertThat(user.getFirstName(), is(\"yinka\"));\n }", "@Test\n public void test_addNewTweet() throws Exception {\n\n Tweet tweet=new Tweet(\"id\",\"Hello\");\n //doNothing().when(twitterRepository.save(any()));\n twitterService.addNewTweet(tweet);\n verify(twitterRepository).save(tweet); // verify method also mock things. Due to this no use of when method.\n\n }", "@Test\n public void given_AlimentDTO_Should_Be_Save_InBDD() {\n AlimentDTO alimentDTO = getAlimentDTO();\n\n\n //When\n alimentController.ajouterAliment(alimentDTO);\n\n //Then\n //vérifier on a appelé une fois le saveAlimentService\n verify(alimentServiceMock, times(1)).saveAlimentService(any());\n\n }", "@Test\n\tpublic void validaPeticionSaveRegistro() {\n\t\t// Arrange\n\t\tRegistro registro = new RegistroTestDataBuilder().build();\n\t\tMockito.when(registroRepository.save(registro)).thenReturn(registro);\n\t\t// Act\n\t\tRegistro registroGuardado = new Registro();\n\t\tregistroGuardado = registroService.saveRegistro(registro);\n\t\t// Assert\n\t\tAssert.assertNotNull(registroGuardado);\n\t}", "@Test\n public void savingNewRecipeSetsOwner()\n throws Exception {\n Recipe testRecipeWithOneIngredientAndOneItemId = new Recipe();\n // Arrange some user to be owner\n User testUserOwner = new User();\n\n // Arrange:\n // when recipeDao.save will be called\n // we save some recipe\n doAnswer(\n invocation -> {\n Recipe r = invocation.getArgumentAt(0, Recipe.class);\n return r;\n }\n ).when(recipeDao).save(any(Recipe.class));\n\n // Act:\n // when we call recipeService.save method\n Recipe savedRecipe = recipeService.save(\n testRecipeWithOneIngredientAndOneItemId,\n testUserOwner\n );\n\n assertThat(\n \"owner was set to recipe\",\n savedRecipe.getOwner(),\n is(testUserOwner)\n );\n // verify mock interactions\n verify(recipeDao).save(any(Recipe.class));\n }", "@Test\r\n public void testSave() throws SQLException{\r\n System.out.println(\"save\");\r\n //when(c.prepareStatement(any(String.class))).thenReturn(stmt);\r\n //mockStatic(DriverManager.class);\r\n //expect(DriverManager.getConnection(\"jdbc:mysql://10.200.64.182:3306/testdb\", \"jacplus\", \"jac567\"))\r\n // .andReturn(c);\r\n //expect(DriverManager.getConnection(null))\r\n // .andReturn(null);\r\n //replay(DriverManager.class);\r\n Title t = new Title();\r\n t.setIsbn(\"888888888888888\");\r\n t.setTitle(\"kkkkkk\");\r\n t.setAuthor(\"aaaa\");\r\n t.setType(\"E\");\r\n int expResult = 1;\r\n int result = TitleDao.save(t);\r\n assertEquals(expResult, result);\r\n }", "@Override\r\n\tpublic Driver insertDriver(Driver driver) {\r\n\t\tdriver = driverRepository.save(driver);\r\n\t\treturn driver;\r\n\t}", "@Test\n\tpublic void testSaveOrUpdateDriverSave() throws MalBusinessException{\n\t \n\t\tsetUpDriverForAdd();\n\t\tdriver = driverService.saveOrUpdateDriver(externalAccount, driverGrade, driver, generateAddresses(driver, 1), generatePhoneNumbers(driver, 1), userName, null);\n\t\t\n\t assertNotNull(\"Add driver failed\", driverService.getDriver(driver.getDrvId())); \n\t assertNotNull(\"Contact number was not saved\", driver.getPhoneNumbers().get(0).getCnrId());\n\t assertNotNull(\"Driver address was not saved\", driver.getDriverAddressList().get(0).getDraId());\n\t assertTrue(\"Driver address does not have a default ind\", driver.getDriverAddressList().get(0).getDefaultInd() == \"Y\");\n\t}", "@Test\n public void givenThreeEntity_whenSave_thenReturnSavedEntity() {\n ThreeEntity entity = new ThreeEntity(1,1);\n\n given(threeDao.save(entity)).willReturn(entity);\n\n ThreeEntity found = threeService.save(entity);\n\n assertEquals(entity.getId(), found.getId());\n assertEquals(entity.getParentId(), found.getParentId());\n assertEquals(entity.getValue(), found.getValue());\n }", "@Test\n public void test(){\n User user = new User();\n\n userService.save(user);\n }", "@Test\n public void save() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n assert repot.findOne(1) == t;\n assert repo.findOne(1) == s;\n assert repon.findOne(\"11\") == n;\n }\n catch (ValidationException e){\n assert true;\n }\n }", "@Test\n public void testSaveTransaction(){\n long timeStamp = 10000L;\n when(calendar.getTimeInMillis()).thenReturn(timeStamp);\n Transaction.save(\"123456789\",50L,\"first deposit\");\n ArgumentCaptor<TransactionDTO> argument = ArgumentCaptor.forClass(TransactionDTO.class);\n verify(transactionDao).save(argument.capture());\n assertEquals(\"123456789\",argument.getValue().getAccountNumber());\n assertEquals(50L,argument.getValue().getAmount());\n assertEquals(timeStamp,argument.getValue().getTimeStamp(),100);\n assertEquals(\"first deposit\",argument.getValue().getDescription());\n }", "public Employee save(Employee employee){\n return employeeRepository.save(employee);\n }", "@Test\n void findByLastName() {\n when(ownerRepository.findByLastName(any())).thenReturn(returnOwner);\n\n // Create the object using a mock -> I cal \"findByLasName\" here, so I am sure that it will return an owner because of the above line of code\n Owner smith = service.findByLastName(LAST_NAME);\n\n assertEquals(LAST_NAME, smith.getLastName());\n\n // I verify the invocation of the mock\n verify(ownerRepository).findByLastName(any());\n }", "Bird save(BirdDTO birdDTO);", "public BankThing save(BankThing thing);", "@Test\n void findOne() {\n UserEntity userEntity = new UserEntity();\n userEntity.setId(1);\n userEntity.setFirstName(\"mickey\");\n userEntity.setLastName(\"mouse\");\n UserEntity save = repository.save(userEntity);\n\n // then find\n UserEntity byId = repository.getById(1);\n\n System.out.println(\"byId.getId() = \" + byId.getId());\n\n Assert.isTrue(1 == byId.getId());\n }", "@Test\n public void whenAddingCustomerItShouldReturnTheSavedCustomer() {\n given(repository.saveAndFlush(CUSTOMER1)).willReturn(CUSTOMER2);\n // When adding a CUSTOMER1\n assertThat(controller.addCustomer(CUSTOMER1))\n // Then it should return the CUSTOMER2\n .isSameAs(CUSTOMER2);\n }", "@Test\n void saveAndExpectServiceException() {\n DomainUser expected = DomainUser.builder()\n .userName(\"someone\")\n .password(\"short\")\n .build();\n when(ldaptiveTemplate.exists(any(), any())).thenReturn(false);\n assertThrows(\n ServiceException.class,\n () -> userRepository.save(expected, true));\n }", "@Test\n public void testSaveUser() {\n User user = new User();\n user.setUsername(\"MyBatis Annotation\");\n user.setAddress(\"北京市海淀区\");\n user.setSex(\"男\");\n user.setBirthday(new Date());\n userDao.saveUser(user);\n }", "@Test\r\n public void testSave() {\r\n System.out.println(\"save\");\r\n Festivity object = new Festivity();\r\n object.setStart(Calendar.getInstance().getTime());\r\n object.setEnd(Calendar.getInstance().getTime());\r\n object.setName(\"Test Fest\"+System.currentTimeMillis());\r\n object.setPlace(\"Narnia\");\r\n boolean expResult = true;\r\n boolean result = Database.save(object);\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void testSave()throws Exception {\n System.out.println(\"save\");\n String query = \"insert into librarian(name,password,email,address,city,contact) values(?,?,?,?,?,?)\";\n String name = \"Raf\";\n String password = \"rrrr\";\n String email = \"[email protected]\";\n String address = \"1218/7\";\n String city = \"dacca\";\n String contact = \"016446\";\n int expResult = 0;\n \n //when(mockDb.getConnection()).thenReturn(mockConn);\n when(mockConn.prepareStatement(query)).thenReturn(mockPs);\n int result = mockLibrarian.save(name, password, email, address, city, contact);\n assertEquals(result >0, true);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n public void testByName() {\n Optional<User> user1 = userRepository.findById(11L);\n //assertEquals(user, user1);\n }", "@Test(enabled = true)\n public void createPerson() {\n List <Account> accounts = new ArrayList<>();\n List<Subscription> sub = new ArrayList<>();\n \n Contact contact = new Contact.Builder().emailaddress(\"[email protected]\").phoneNumber(\"021345685\").build();\n Address address = new Address.Builder().location(\"Daveyton\").streetName(\"Phaswane Street\").houseNumber(45).build();\n \n repo = ctx.getBean(PersonsRepository.class);\n Person p = new Person.Builder()\n .firstname(\"Nobu\")\n .lastname(\"Tyokz\")\n .age(25)\n .account(accounts)\n .sub(sub)\n .contact(contact)\n .address(address)\n .build();\n repo.save(p);\n id = p.getId();\n Assert.assertNotNull(p);\n\n }", "@Test\n\tpublic void testSave() {\n\t}", "@Test\n void save() {\n }", "@Test\n\tpublic void driverCreatePositiveTest() {\n\t\tDriver driver;\n\t\tUserAccount ua;\n\t\tfinal Authority authority;\n\t\tCollection<Authority> authorities;\n\n\t\tdriver = this.driverService.create();\n\t\tua = this.userAccountService.create();\n\t\tauthority = new Authority();\n\t\tauthority.setAuthority(Authority.DRIVER);\n\t\tauthorities = new ArrayList<Authority>();\n\t\tauthorities.add(authority);\n\n\t\tdriver.setName(\"Name\");\n\t\tdriver.setSurname(\"Surname\");\n\t\tdriver.setCountry(\"Country\");\n\t\tdriver.setCity(\"City\");\n\t\tdriver.setBankAccountNumber(\"ES4963116815932885489285\");\n\t\tdriver.setPhone(\"698456847\");\n\t\tdriver.setChilds(true);\n\t\tdriver.setMusic(true);\n\t\tdriver.setSmoke(false);\n\t\tdriver.setPets(true);\n\n\t\tua.setUsername(\"[email protected]\");\n\t\tua.setPassword(\"newdriver\");\n\t\tua.setAuthorities(authorities);\n\n\t\tdriver.setUserAccount(ua);\n\n\t\tthis.driverService.save(driver);\n\t\tthis.driverService.flush();\n\t}", "public Company saveCompany(Company company);", "@Test\n public void findOne() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n assert repot.findOne(1)== t;\n assert repo.findOne(1) == s;\n assert repon.findOne(\"11\") == n;\n }\n catch (ValidationException e){\n }\n }", "@Test\r\n public void testSave_again() {\r\n\r\n PaymentDetailPojo expResult = instance.save(paymentDetail1);\r\n assertEquals(expResult, instance.save(paymentDetail1));\r\n }", "@Test\n\tpublic void testCreateShare() {\n\t\tShare newShare = new Share(\"Vodafone\", 2000, 1.5);\n\t\tShare savedShare = new Share(1L, \"Vodafone\", 2000, 1.5);\n\n\t\t// Telling mocked repository what to do\n\t\tMockito.when(this.repo.save(newShare)).thenReturn(savedShare);\n\n\t\t// Test\n\t\tassertThat(this.service.createShare(newShare)).isEqualTo(savedShare);\n\t\tMockito.verify(this.repo, Mockito.times(1)).save(newShare);\n\t}", "@Test\n\tpublic void test_saveCar_whenCarDataIsCorect_thenReturnSavedCar() {\n\t\t// given or arrange\n\t\tCarServiceModel toBeSavedCar = getCarWithCorectData();\n\t\t// when or act\n\t\tCarServiceModel actualCar = carService.saveCar(toBeSavedCar);\n\t\tCarServiceModel expectedCar = modelMapper.map(carRepository.findById(actualCar.getId()).orElse(null), CarServiceModel.class);\n\t\t// then or assert\n\t\tassertEquals(expectedCar.getId(), actualCar.getId());\n\t\tassertEquals(expectedCar.getMake(), actualCar.getMake());\n\t\tassertEquals(expectedCar.getModel(), actualCar.getModel());\n\t\tassertEquals(expectedCar.getTravelledDistance(), actualCar.getTravelledDistance());\n\n\t}", "@Test\n @Transactional\n public void testPostQuestion() {\n when(questionRepository.save(any(QuestionEntity.class))).thenReturn(createNewQuestion());\n CreateQuestionResponseDto createQuestionResponseDto = questionService.addQuestion(createQuestionRequestDto());\n assertEquals(\"Author1\", createQuestionResponseDto.getAuthor());\n assertEquals(\"Message1\", createQuestionResponseDto.getMessage());\n assertEquals(Long.valueOf(0), createQuestionResponseDto.getReplies());\n assertEquals(Long.valueOf(1), createQuestionResponseDto.getId());\n }", "@Test\n public void testSaveOrUpdate() {\n Customer customer = new Customer();\n customer.setId(3);\n customer.setName(\"nancy\");\n customer.setAge(18);\n saveOrUpdate(customer);\n }", "@Test(expected=MalException.class)\n\tpublic void testSaveWithoutFirstName() throws MalBusinessException{\n\t\tsetUpDriverForAdd();\n\t\tdriver.setDriverForename(null);\n\t\tdriver = driverService.saveOrUpdateDriver(externalAccount, driverGrade, driver, generateAddresses(driver, 1), generatePhoneNumbers(driver, 1), userName, null);\n\t}", "@Test\n\tpublic void testSaveOrUpdateDriverUpdate() throws MalBusinessException{\t\n\t\tfinal long drvId = 203692;\n\t\tfinal String FNAME = \"Update\";\n\t\tfinal String LNAME = \"Driver Test\";\n\t\tfinal String PHONE_NUMBER = \"554-2728\";\n\t\t\n\t\tDriver driver;\n\t\t\n\t\tdriver = driverService.getDriver(drvId);\n\t\tdriver.setDriverForename(FNAME);\n\t\tdriver.setDriverSurname(LNAME);\t\t\n\t\tdriver.getDriverAddressList().get(0).setAddressLine1(\"111\");\t\n\t\tdriver.getPhoneNumbers().get(0).setNumber(PHONE_NUMBER);\n\t\tdriver = driverService.saveOrUpdateDriver(driver.getExternalAccount(), driver.getDgdGradeCode(), driver, driver.getDriverAddressList(), driver.getPhoneNumbers(), userName, null);\t\n\t\tdriver = driverService.getDriver(drvId);\n\t\t\n assertEquals(\"Update driver first name failed \", driver.getDriverForename(), FNAME);\t\n\t\tassertEquals(\"Update driver last name failed \", driver.getDriverSurname(), LNAME);\t\t\n\t\tassertEquals(\"Update driver phone number failed \", driver.getPhoneNumbers().get(0).getNumber(), PHONE_NUMBER);\t\t\n\t}", "@Test\n public void testCanUpdatePublisher() {\n Publisher publisher = new Publisher();\n publisher.setName(\"Publisher\");\n publisher = publisherRepo.save(publisher);\n publisher = publisherRepo.findOne(publisher.getId());\n\n publisher.setName(\"New name\");\n publisher = publisherRepo.save(publisher);\n Publisher retrievedPublisher = publisherRepo.findOne(publisher.getId());\n assertThat(retrievedPublisher.getName(), equalTo(\"New name\"));\n }", "@Test\n public void save() throws Exception {\n }", "@Test\n void insertSuccess() {\n String name = \"Testing a new event\";\n LocalDate date = LocalDate.parse(\"2020-05-23\");\n LocalTime startTime = LocalTime.parse(\"11:30\");\n LocalTime endTime = LocalTime.parse(\"13:45\");\n String notes = \"Here are some new notes for my new event.\";\n GenericDao userDao = new GenericDao(User.class);\n User user = (User)userDao.getById(1);\n\n Event newEvent = new Event(name, date, startTime, endTime, notes, user);\n int id = genericDao.insert(newEvent);\n assertNotEquals(0,id);\n Event insertedEvent = (Event)genericDao.getById(id);\n assertEquals(newEvent, insertedEvent);\n }", "public People savePeople(People people);", "@Test\n void insertSuccess() {\n Date today = new Date();\n User newUser = new User(\"Artemis\", \"Jimmers\", \"[email protected]\", \"ajimmers\", \"supersecret2\", today);\n int id = dao.insert(newUser);\n assertNotEquals(0, id);\n User insertedUser = (User) dao.getById(id);\n assertNotNull(insertedUser);\n assertEquals(\"Jimmers\", insertedUser.getLastName());\n //Could continue comparing all values, but\n //it may make sense to use .equals()\n }", "@Test\n public void tempSaveTest()throws Exception{\n Mockito.when(paperAnswerRepository.getMaxTimes(1L,1L)).thenReturn(Optional.of(2));\n Mockito.when(paperService.getPaperInfo(1L,1L)).thenReturn(paper);\n Mockito.when(userService.getUserInfo(1L)).thenReturn(user);\n Mockito.when(courseService.getCourseInfo(1L)).thenReturn(course);\n Mockito.when(questionRepository.findById(1L)).thenReturn(Optional.of(question));\n\n PaperAnswer paperAnswer1 = new PaperAnswer();\n PaperAnswerPrimaryKey paperAnswerPrimaryKey = new PaperAnswerPrimaryKey(user,paper,2);\n paperAnswer1.setPaperAnswerPrimaryKey(paperAnswerPrimaryKey);\n paperAnswer1.setState(PaperAnswerState.TEMP_SAVE);\n Mockito.when(paperRepository.getOne(1L)).thenReturn(paper);\n Answer answer = new Answer();\n AnswerPrimaryKey answerPrimaryKey = new AnswerPrimaryKey(paperAnswer1,question);\n answer.setAnswerPrimaryKey(answerPrimaryKey);\n answer.setAnswer(\"A\");\n paperAnswer1.setAnswers(new ArrayList<>(List.of(answer)));\n\n Mockito.when(paperAnswerRepository.getOne(paperAnswerPrimaryKey)).thenReturn(paperAnswer1);\n Mockito.when(paperAnswerRepository.save(any(PaperAnswer.class))).thenAnswer(i -> i.getArguments()[0]);\n Mockito.when(answerRepository.save(any(Answer.class))).thenAnswer(i->i.getArguments()[0]);\n\n PaperAnswer paperAnswer2 = paperAnswerService.submitAnswer(1L,1L,1L,submitAnswerForm);\n assertThat(paperAnswer2.getPaperAnswerPrimaryKey().getTimes()).isEqualTo(2);\n assertThat(paperAnswer2.getAnswers().size()).isEqualTo(2);\n }", "@Test\n public void testSave() {\n NoteCours nc = new NoteCours(\"titre\",\"description\", etu,matiere);\n // when: la méthode saveNote est invoquée\n ncService.saveNoteCours(nc);\n // then: la méthode save du NoteCoursRepository associé est invoquée\n verify(ncService.getNoteCoursRepository()).save(nc);\n }", "@Before\n public void setUp() throws Exception {\n this.trainer = repository.save(TrainerFactory.getTrainer(1,\"Dillyn\",\"Lakey\",\"Boss\"));\n }", "@Test\n public void TestCreateDog() {\n String expectedName = \"Tyro\";\n Date expectedBirthDate = new Date();\n\n Dog newDog = AnimalFactory.createDog(expectedName, expectedBirthDate);\n\n Assert.assertEquals(expectedName, newDog.getName());\n Assert.assertEquals(expectedBirthDate, newDog.getBirthDate());\n }", "@Test\n public void shouldCreateAnValidRoomAndPersistIt() throws Exception {\n\n\tfinal CreateRoomCommand command = new CreateRoomCommand(\n\t\tArrays.asList(validRoomOfferValues));\n\n\tfinal UrlyBirdRoomOfferService roomOfferService = new UrlyBirdRoomOfferService(\n\t\tdao, builder, isOccupancyIn48Hours, isRoomBookable);\n\n\twhen(isOccupancyIn48Hours.isSatisfiedBy((Date) any())).thenReturn(true);\n\twhen(dao.create(Arrays.asList(validRoomOfferValues))).thenReturn(\n\t\tvalidRoomOffer);\n\n\tfinal UrlyBirdRoomOffer createdRoomOffer = roomOfferService\n\t\t.createRoomOffer(command);\n\n\tverify(dao).create(Arrays.asList(validRoomOfferValues));\n\tassertThat(createdRoomOffer, is(equalTo(validRoomOffer)));\n }", "@Test\n public void testInsertPharmacy() throws Exception {\n System.out.println(\"insertPharmacy\");\n \n //Null test\n PharmacyDTO pharmacy = null;\n ManagePharmaciesController instance = new ManagePharmaciesController();\n PharmacyDTO expResult = null;\n PharmacyDTO result = instance.updatePharmacy(pharmacy);\n Assertions.assertEquals(expResult, result);\n \n //Value test\n instance = new ManagePharmaciesController();\n PharmacyDB db = Mockito.mock(PharmacyDB.class);\n PharmaDeliveriesApp.getInstance().getPharmacyService().setPharmacyDB(db);\n PharmacyDTO inserted = getPharmacyDTOTest(\"teste1\");\n Pharmacy returnedP = convertPharmacyDTO(inserted);\n returnedP.setId(1);\n \n when(db.insertPharmacy(any(Pharmacy.class),any(User.class))).thenReturn(returnedP);\n Assertions.assertEquals(instance.insertPharmacy(inserted).getName(), inserted.getName());\n Assertions.assertNotEquals(instance.insertPharmacy(inserted).getId(), inserted.getId());\n \n when(db.insertPharmacy(any(Pharmacy.class),any(User.class))).thenReturn(null);\n Assertions.assertNull(instance.insertPharmacy(inserted));\n }", "Patient save(Patient patient);", "@Test\n void insertSuccess() {\n int insertedCarId;\n\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(1);\n\n //Create Inserted Car\n Car insertedCar = new Car(user,\"2016\",\"Honda\",\"Civic\",\"19XFC1F35GE206053\");\n\n //Save Inserted Car\n insertedCarId = carDao.insert(insertedCar);\n\n //Get Saved Car\n Car retrievedCar = carDao.getById(insertedCarId);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(insertedCar,retrievedCar);\n }", "@Test\n public void testSave_1(){\n String firstName=\"prakash\",lastName=\"s\";\n int age=21;\n String city=\"chennai\", houseNo=\"c-1\";\n Address address1=new Address(city, houseNo);\n Employee employee1=new Employee(firstName,lastName,age,address1);\n employee1=employeeService.save(employee1);\n String id=employee1.getId();\n Employee fetched=mongo.findById(id,Employee.class);\n Assertions.assertEquals(employee1.getId(),fetched.getId());\n Assertions.assertEquals(firstName,employee1.getFirstName());\n Assertions.assertEquals(lastName, employee1.getLastName());\n Assertions.assertEquals(age,employee1.getAge());\n }", "@Test\n\tpublic void saveTest(){\n\t\t\n\t}", "@Test\n\tpublic void testInsert(){\n\t\tUser u = new User();\n\t\tu.setFirst(\"ttest\");\n\t\tu.setLast(\"ttest2\");\n\t\tu.setUsername(\"testusername\");\n\t\tu.setPassword(\"password\");\n\t\t//u.getSalt();\n\t\tu.setUserWins(1);\n\t\tu.setUserLosses(3);\n\t\tu.setUserRecord(0.25);\n\t\t\n\t\twhen(udaoMock.insert(u)).thenReturn(u);\n\t\tassertEquals(u, uSerMock.insertUser(u));\n\n\t}", "@Test(expected=MalException.class)\n\tpublic void testSaveWithoutGaraged() throws MalBusinessException{\n\t List<DriverAddress> driverAddress = null;\n\t\tsetUpDriverForAdd();\n\t\t\n\t\tdriver = driverService.saveOrUpdateDriver(externalAccount, driverGrade, driver, driverAddress, generatePhoneNumbers(driver, 1), userName, null);\n\t}", "@Test\n @DisplayName(\"Deve salvar um livro\")\n public void saveBookTest() {\n given(bookToSaveMocked.getIsbn()).willReturn(BookHelperTest.DOM_CASMURRO_ISBN);\n given(bookRepositoryMocked.existsByIsbn(BookHelperTest.DOM_CASMURRO_ISBN)).willReturn(false);\n given(bookRepositoryMocked.save(bookToSaveMocked)).willReturn(bookSavedMocked);\n\n // When execute save\n Book bookSaved = bookService.save(bookToSaveMocked);\n\n // Then validate save return\n assertThat(bookSaved).isNotNull();\n\n // And verify mocks interaction\n verify(bookToSaveMocked, times(1)).getIsbn();\n verify(bookRepositoryMocked, times(1)).existsByIsbn(BookHelperTest.DOM_CASMURRO_ISBN);\n verify(bookRepositoryMocked, times(1)).save(Mockito.any(Book.class));\n }", "@Test\n\tpublic void t1_date_main() {\n\t\tDate in = Date.from(K_ZDT.toInstant());\n\t\t\n\t\t_TestEntityWithDate toDb = new _TestEntityWithDate();\n\t\ttoDb.setId(new Random().nextLong());\n\t\ttoDb.setUserEntered(in);\n\t\t\n\t\tmongo.save(toDb);\n\t\t\n\t\t_TestEntityWithDate fromDb = mongo.findById(toDb.getId(), _TestEntityWithDate.class);\n\t\tassertNotNull(fromDb);\n\t\t\n\t\tassertEquals(in, fromDb.getUserEntered());\n\t}", "public Car saveCar(Car car) {\r\n return repository.save(car);\r\n }", "User save(User user);", "@Test\r\n public void testSave() {\r\n\r\n PaymentDetailPojo result = instance.save(paymentDetail1);\r\n assertTrue(paymentDetail1.hasSameParameters(result));\r\n assertTrue(result.getId() > 0);\r\n }", "@Test\n\tpublic void testPersistNewSupplierOrder() throws Exception {\n\t\tLong id = saveEntity();\n\t\tSupplierOrder order = dao.findById(id);\n\t\tassertNull(order.getUpdateDate());\n\t}", "@Test\n public void saveTrack() throws Exception {\n when(trackService.save(any())).thenReturn(track);\n mockMvc.perform(MockMvcRequestBuilders.post(\"/api/v1/track\")\n .contentType(MediaType.APPLICATION_JSON).content(asJsonString(track)))\n .andExpect(MockMvcResultMatchers.status().isCreated())\n .andDo(MockMvcResultHandlers.print());\n\n\n }", "public void testRegisterNewAuthor() {\r\n //given\r\n /*System.out.println(\"registerNewAuthor\"); \r\n String name = \"James Fenimore\";\r\n String surname = \"Cooper\";\r\n int birthYear = 1789;\r\n int deathYear = 1851;\r\n String shortDescription = \"One of the most popular american novelists\";\r\n String referencePage = \"http://en.wikipedia.org/wiki/James_Fenimore_Cooper\";\r\n AuthorHibernateDao instance = new AuthorHibernateDao();\r\n boolean expResult = true;\r\n \r\n //when\r\n boolean result = instance.registerNewAuthor(name, surname, birthYear, deathYear, shortDescription, referencePage);\r\n \r\n //then\r\n assertEquals(expResult, result);*/ \r\n }", "public interface PaymentInfoRepo {\n PaymentInfo findByMatch(PaymentInfo paymentInfo);\n\n PaymentInfo create(PaymentInfo paymentInfo);\n\n void update(PaymentInfo paymentInfo);\n}", "@Test\n public void insertOne() throws Exception {\n\n }", "@Test\n public void saveSingleEntity() {\n repository.save(eddard);\n assertThat(operations\n .execute((RedisConnection connection) -> connection.exists((\"persons:\" + eddard.getId()).getBytes(CHARSET))))\n .isTrue();\n }", "@Test\n public void whenUpdatingCustomerItShouldReturnTheSavedCustomer() {\n given(repository.getOne(CUSTOMER1_ID)).willReturn(CUSTOMER1);\n // Given that a CUSTOMER1 is saved and flushed, a CUSTOMER1 is returned\n given(repository.saveAndFlush(CUSTOMER1)).willReturn(CUSTOMER1);\n // When updating a CUSTOMER1\n assertThat(controller.updateCustomer(CUSTOMER1, CUSTOMER1_ID))\n // Then it should return the CUSTOMER1\n .isSameAs(CUSTOMER1);\n }", "@Test\n void findById() {\n when(ownerRepository.findById(anyLong())).thenReturn(Optional.of(returnOwner));\n\n Owner owner = service.findById(1L);\n\n assertNotNull(owner);\n }", "public Optional<Payment> savePayment(Payment payment);", "protected void saveLocalDate() {\n\n }", "public User save(User user);", "@Test\n public void createBasket(){\n BasketRepositoryImpl basketRepository=new BasketRepositoryImpl(basketCrudRepository);\n // basketRepository.save(basket);\n var response= basketRepository.findByProductId(\"11\");\n System.out.println(response.toString());\n }", "@Test\r\n public void testSave_two() {\r\n\r\n PaymentDetailPojo expResult1 = instance.save(paymentDetail1);\r\n PaymentDetailPojo expResult2 = instance.save(paymentDetail2);\r\n \r\n assertEquals(expResult1, instance.save(paymentDetail1)); \r\n assertEquals(expResult2, instance.save(paymentDetail2));\r\n }", "Account save(Account account);", "static void testSavingDAO() {\n }", "@Test\n\tpublic void testSaveDriverEmail() throws MalBusinessException{\n\t\tString email = \"[email protected]\";\n\t\tsetUpDriverForAdd();\n\t\tdriver.setEmail(email);\n\t\tdriver = driverService.saveOrUpdateDriver(externalAccount, driverGrade, driver, generateAddresses(driver, 1), generatePhoneNumbers(driver, 1), userName, null);\n\t\t\n\t\tassertEquals(\"Inserted Email does not match \" + email, driver.getEmail(), email);\n\t}", "@Test\n public void givenThreeEntity_whenUpdate_thenReturnUpdatedEntity() {\n ThreeEntity entity = new ThreeEntity(1,1);\n entity.setValue(1000);\n entity.setParentId(12);\n\n given(threeDao.save(entity)).willReturn(entity);\n\n ThreeEntity found = threeService.save(entity);\n\n assertEquals(entity.getId(), found.getId());\n assertEquals(entity.getParentId(), found.getParentId());\n assertEquals(entity.getValue(), found.getValue());\n }", "@Test\n public void test_create_user_success() throws Exception {\n UserDto user = new UserDto(null, \"Arya\", \"Stark\", \"[email protected]\");\n UserDto newUser = new UserDto(1L, \"Arya\", \"Stark\", \"[email protected]\");\n\n when(userService.existsByEmail(user)).thenReturn(false);\n when(userService.createUser(user)).thenReturn(newUser);\n\n mockMvc.perform(post(\"/users\").contentType(MediaType.APPLICATION_JSON).content(asJsonString(user)))\n .andExpect(status().isCreated());\n\n verify(userService, times(1)).existsByEmail(user);\n verify(userService, times(1)).createUser(user);\n verifyNoMoreInteractions(userService);\n }", "public void testSave() throws RepositoryException{\n session.save();\n sessionControl.replay();\n sfControl.replay();\n \n jt.save();\n }", "@Test\n void postRequest_Params_SuccessfullyPostsCar() throws Exception {\n Auto auto = autosList.get(0);\n when(autosService.addAuto(any(Auto.class))).thenReturn(auto);\n\n mockMvc.perform(post(\"/api/autos\")\n .contentType(MediaType.APPLICATION_JSON)\n .content(toJSON(auto)))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"vin\").value(auto.getVin()));\n}", "@Test\n public void testBirthDate() {\n registerUser(username, password, password, email, email, forename, surname, \"01/01/1990\");\n assertNotNull(userService.getUser(username));\n }", "@Test\n public void testCrear() {\n System.out.println(\"crear\");\n Repositorio repo = new RepositorioImpl();\n Persona persona = new Persona();\n persona.setNombre(\"Hugo\");\n persona.setApellido(\"González\");\n persona.setNumeroDocumento(\"4475199\");\n repo.crear(persona);\n Persona p = (Persona) repo.buscar(persona.getId());\n assertEquals(p, persona);\n }", "User saveUser(User user);", "@Test\n void deve_retornar_um_objeto_timemodel_com_id() {\n TimeModel timeModelComId = TimeModelStub.getTimeModelComId();\n TimeModel timeModel = TimeModelStub.getTimeModel();\n when(timeManagementRepository.save(any())).thenReturn(TimeEntityStub.getTimeEntity());\n TimeModel response = timeService.timeSave(timeModel);\n Assert.assertEquals(timeModelComId, response);\n }", "public interface ShipperRepositoryTest extends JpaRepository<Shipper, ShipperKey> {\n}", "@Test(expected=MalException.class)\n\tpublic void testSaveWithoutLastName() throws MalBusinessException{\n\t\tsetUpDriverForAdd();\n\t\tdriver.setDriverSurname(null);\n\t\tdriver = driverService.saveOrUpdateDriver(externalAccount, driverGrade, driver, generateAddresses(driver, 1), generatePhoneNumbers(driver, 1), userName, null);\n\t}", "@Test\n\tpublic void testInsertObj() {\n\t}", "public Booking saveBooking(Booking booking);", "@Test\n public void testSave() throws Exception {\n System.out.println(\"save\");\n Item item = new Item(1L, new Category(\"name\", \"code\", \"description\"), \n new Shop(new Date(), \"12345\", \"Pepe perez\", \"Tienda\", \"Nit\", \"Natural\"), new Date(), \"name\", 20.0);\n \n \n// Item result = itemDAO.save(item);\n// Assert.assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n public void modifyUserSuccessfull(){\n User user_test = new User();\n user_test.setId(1L);\n user_test.setName(\"nametest\");\n user_test.setLast_name(\"lastnametest\");\n user_test.setUsername(\"usernametest\");\n user_test.setPassword(\"apassword\");\n\n given(userRepository.findById(anyLong())).willReturn(Optional.of(user_test));\n\n User user_expected = new User();\n user_expected.setId(1L);\n user_expected.setName(\"nametestmodified\");\n user_expected.setLast_name(\"lastnametestmodified\");\n user_expected.setUsername(\"usernametest\");\n user_expected.setPassword(\"apassword\");\n\n given(userRepository.save(any())).willReturn(user_expected);\n\n User user_retrieved = userServiceImpl.modifyUser(user_test.getId(), user_test);\n\n Assertions.assertNotNull(user_retrieved);\n Assertions.assertEquals(user_expected.getName(),user_retrieved.getName());\n Assertions.assertEquals(user_expected.getLast_name(),user_retrieved.getLast_name());\n Assertions.assertNull(user_retrieved.getPassword());\n }", "void save(Employee employee);", "Entity save(Entity entity);", "public void testSaveCallsExpectedSQLandThenIsSavedReturnsTrue() throws Exception {\n\t\tResultSet mockResultSet = MockDB.createResultSet();\n\t\tStatement mockStatement = MockDB.createStatement();\n\t\t\n\t\tUser localValidUser = new User(validUser);\n\t\tassertFalse(\"isSaved() called on an unsaved user should return false!\",localValidUser.isSaved());\n\t\t\n\t\t// Mock the insert\n\t\texpect(mockStatement.execute(\"INSERT INTO user \"+\n\t\t\t\t\"(first_name,last_name,address,postal_code,city,province_state,country,email,datetime,user_name,password,salt)\"+\n\t\t\t\t\" VALUES ('Foo','Bar','123 4th Street','H3Z2K6','Calgary','Alberta','Canada','[email protected]',NOW(),'foo','foobar','----5---10---15---20---25---30---35---40---45---50---55---60--64');\"+\n\t\t\t\t\"select last_insert_id() as user_id;\")).andReturn(true);\n\t\texpect(mockStatement.getResultSet()).andReturn(mockResultSet);\n\t\t\n\t\t// Mock the update\n\t\texpect(mockStatement.execute(\"UPDATE user SET \"+\n\t\t\t\t\"first_name='Foo',\" +\n\t\t\t\t\"last_name='SNAFU',\" +\n\t\t\t\t\"address='123 4th Street',\" +\n\t\t\t\t\"postal_code='H3Z2K6',\" +\n\t\t\t\t\"city='Calgary',\" +\n\t\t\t\t\"province_state='Alberta',\" +\n\t\t\t\t\"country='Canada',\" +\n\t\t\t\t\"email='[email protected]',\" +\n\t\t\t\t\"user_name='foo',\" +\n\t\t\t\t\"password='foobar' \"+\n\t\t\t\t\"WHERE user_id=1;\")).andReturn(true);\n\t\texpect(mockStatement.getResultSet()).andReturn(mockResultSet);\n\t\treplay(mockStatement);\n\t\t\n\t\t// Mock the results\n\t\texpect(mockResultSet.next()).andReturn(true);\n\t\texpect(mockResultSet.getInt(\"user_id\")).andReturn(1);\n\t\texpect(mockResultSet.next()).andReturn(true);\n\t\treplay(mockResultSet);\n\t\t\n\t\tassertTrue(\"save() called on a valid user should return true!\",localValidUser.save());\n\t\tassertTrue(\"isSaved() called on a saved user should return true!\",localValidUser.isSaved());\n\t\t\n\t\t// Now make the changes!\n\t\tlocalValidUser.lastName = \"SNAFU\"; // User got married\n\t\tassertTrue(\"save() called on a valid user should return true!\",localValidUser.save());\n\t}", "@Test\n void saveSuccess() {\n TestEntity testEntity = buildEntity();\n Api2 instance = new Api2();\n Long result = instance.save(testEntity);\n System.out.println(\"Result\" + result);\n\n if (result != null) {\n Optional<TestEntity> optionalEntity = instance.getById(TestEntity.class, result);\n\n TestEntity entity = optionalEntity.orElse(null);\n\n if (entity != null) {\n Assertions.assertEquals(result, entity.getId());\n Assertions.assertNotNull(result);\n } else {\n Assertions.fail();\n }\n } else {\n Assertions.fail();\n }\n }", "@Test\r\n\tpublic void saveTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeam \r\n\t\tTeam team = new wsdm.domain.Team();\r\n\t\tservice.saveTeam(team);\r\n\t}", "public User saveUser(User user);", "@Test\n public void addPublisherTest() {\n Mockito.when(this.repo.save(testPublisher1)).thenReturn(testPublisher1);\n Publisher resultFromService = this.publisherService.addOne(testPublisher1);\n assertTrue(resultFromService.getWebsite().equals(\"www.whatthewhat.com\"));\n }", "public Client save(Client client){\r\n return clientRepository.save(client);\r\n }", "@Test\n public void testNewEntity() throws Exception {\n\n }", "@Test\n\tpublic void testActiveDriver() throws MalBusinessException{\n\t \n\t\tsetUpDriverForAdd();\n\t\tdriver.setActiveInd(MalConstants.FLAG_N);\n\t\tdriver = driverService.saveOrUpdateDriver(externalAccount, driverGrade, driver, generateAddresses(driver, 1), generatePhoneNumbers(driver, 1), userName, null);\t\t\n\t\tassertEquals(\"Active driver should null but it got data\", null, driverService.getActiveDriver(driver.getDrvId())); \n\t \n\t}" ]
[ "0.6948652", "0.6931089", "0.674649", "0.65543544", "0.6498405", "0.6388848", "0.6325636", "0.62512356", "0.6240059", "0.6227262", "0.6218286", "0.6190416", "0.61755913", "0.6162933", "0.6145497", "0.6144438", "0.6143271", "0.6122524", "0.611935", "0.6099873", "0.6098675", "0.6080252", "0.60742563", "0.6073998", "0.60283", "0.6013869", "0.59952515", "0.59831905", "0.5978165", "0.5977288", "0.59572846", "0.59502774", "0.5898414", "0.58957726", "0.5894782", "0.58828086", "0.5875943", "0.586174", "0.5850498", "0.5835884", "0.58277124", "0.58168936", "0.581626", "0.58085054", "0.5806477", "0.5800659", "0.57921225", "0.5784578", "0.57824117", "0.5778223", "0.5777795", "0.57772225", "0.5775376", "0.577493", "0.57718515", "0.5765129", "0.5764772", "0.5762664", "0.57576203", "0.5754659", "0.57545877", "0.57366663", "0.57349044", "0.5719147", "0.57152206", "0.57119197", "0.5707644", "0.5703829", "0.57034296", "0.5680935", "0.56726646", "0.56693625", "0.56649417", "0.56584316", "0.5638893", "0.56363946", "0.56355554", "0.5630107", "0.56279916", "0.562137", "0.561947", "0.56184435", "0.5607629", "0.559381", "0.55920744", "0.5589764", "0.55889904", "0.55746627", "0.55724406", "0.5571777", "0.5564288", "0.5562004", "0.55604947", "0.555705", "0.5553816", "0.55353653", "0.55326235", "0.5528781", "0.552761", "0.5520714", "0.5512031" ]
0.0
-1
LOGGER.debug(" Before doFilter ");
@Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { servletResponse.setContentType("application/json"); servletResponse.setCharacterEncoding("UTF-8"); servletRequest.setCharacterEncoding("UTF-8"); PrintWriter out = servletResponse.getWriter(); try { if (servletRequest instanceof HttpServletRequest) { String requestURL = ((HttpServletRequest) servletRequest).getRequestURL().toString(); String queryString = ((HttpServletRequest) servletRequest).getQueryString(); queryString = URLDecoder.decode(StringUtils.trimToEmpty(queryString), "UTF-8"); LOGGER.info("doFilter:==>" + requestURL + "?" + queryString); } String remoteHost = servletRequest.getRemoteHost(); String remoteAddr = servletRequest.getRemoteAddr(); LOGGER.info("remoteHost=" + remoteHost + ", remoteAddr=" + remoteAddr); // Validate the token: String token = servletRequest.getParameter(RootAPI.API_KEY); LOGGER.info("token=" + token); if (!this.checkToken(token)) { LOGGER.error("Invalide token=" + token); String jsonStr = ApiResponse.unauthorizedError().toString(); out.print(jsonStr); } else { filterChain.doFilter(servletRequest, servletResponse); } } catch (Exception e) { LOGGER.error(e.getMessage()); out.print(ApiResponse.unknownError().toString()); } // LOGGER.debug(" ******* After doFilter ******* "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean doFilter() { return false; }", "@Override\n public int filterOrder() {\n return 1;\n }", "@Override\n public int filterOrder() {\n return 1;\n }", "@Test\n public void filter() {\n\n }", "public void doFilter(ServletRequest arg0, ServletResponse arg1, FilterChain arg2)\n\t\t\tthrows IOException, ServletException {\n\t\t\n\t\tSystem.out.println(\"logfilter\");\n\t\targ2.doFilter(arg0, arg1);\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void filterChange() {\n\t\t\n\t}", "@Override\n public boolean shouldFilter() {\n return true;\n }", "void handleManualFilterRequest();", "@Override\n\tpublic boolean shouldFilter() {\n\t\treturn true;\n\t}", "@Override\n\tpublic int filterOrder() {\n\t\treturn 1;\n\t}", "@Override\n\tpublic void doFilter(ServletRequest request, ServletResponse response,\n\t\t\tFilterChain chain) throws IOException, ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\tSystem.out.println(\"╔˙│╔filter\");\n\t}", "@Override\n\tprotected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\tSystem.out.print(\"过滤初始\");\n\t}", "public void start(){\n isFiltersSatisfied();\n }", "@Override\r\n\tprotected void preFilter(Procedure procedure) {\r\n\t\tsuper.preFilter(procedure);\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig arg0) throws ServletException {\r\n\t\tSystem.out.println(\"[\" + Calendar.getInstance().getTime() + \"] Iniciando filter\");\r\n\t}", "public void clickonFilter() {\n\t\t\n\t}", "@Override\n public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\n chain.doFilter(request, response);\n }", "protected Filter getFilter() {\n/* 631 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean shouldFilter() {\n return true;\n }", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\tSystem.out.print(\"过滤器初始化\");\n\t\t\n\t}", "CompiledFilter() {\n }", "public LogFilter() {}", "@Override\n public void filter(Filter arg0) throws NoTestsRemainException {\n super.filter(getCustomFilter());\n }", "public abstract void filter();", "@Override\n\tpublic void filter(ContainerRequestContext context) throws IOException {\n\t}", "@Override//过滤器执行顺序,当一个请求在同一个阶段的时候,存在多个过滤器的时候,多个过滤器的执行顺序问题\r\n\tpublic int filterOrder() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\tSystem.out.println(\"系统启动时初始化filter\");\n\t}", "@Override\n public void init(FilterConfig filterConfig) throws ServletException {\n }", "@Override\n public void init(FilterConfig filterConfig) throws ServletException {\n\n }", "public void filter(Filter filter) throws NoTestsRemainException {\n runner.filter(filter);\n }", "@Override\n public Object run() {\n System.out.println(\"[MyZuulFilter] This request has passed through the custom Zuul Filter...\");\n return null;\n }", "@Test\n public void eventFilterTest() {\n // TODO: test eventFilter\n }", "@Override\n public List runFilter(String filter) {\n return runFilter(\"\", filter);\n }", "@DISPID(-2147412069)\n @PropGet\n java.lang.Object onfilterchange();", "private LogFilter() {\n\t\tacceptedEventTypes = new HashMap<String, Integer>();\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\n\t}", "public ObjectFilter()\n\t{\n\t}", "@Override\n\tpublic void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException {\n\t\tSystem.out.println(\"inside ContainerResponseFilter\");\n\t}", "void onEntry(FilterContext ctx) throws SoaException;", "@Override\r\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\r\n\t}", "@Override\n public void init(final FilterConfig filterConfig) {\n Misc.log(\"Request\", \"initialized\");\n }", "@Override\n\tpublic void filterClick() {\n\t\t\n\t}", "public interface FilterChain {\n\n // execute current filter's onEntry\n void onEntry(FilterContext ctx) throws SoaException;\n\n // execute current filter's onExit\n void onExit(FilterContext ctx)throws SoaException;\n\n\n}", "void filterChanged(Filter filter);", "@SuppressWarnings(\"unused\")\n\tprivate Filter() {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException\n\t{\n\t\t\n\t}", "@Override public Filter getFilter() { return null; }", "public void init(FilterConfig arg0) throws ServletException {\n\t\tSystem.out.println(\"FirstFilter::init\");\r\n\t\t\r\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) {\n\n\t}", "public abstract void updateFilter();", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\n\t}", "@Override\n\tpublic void filterClick() throws Exception {\n\t\t\n\t}", "@Override\n public void init(FilterConfig filterConfig) throws ServletException {\n }", "@Override\n public void init(FilterConfig filterConfig) throws ServletException {\n }", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\r\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\r\n\t}", "boolean isPreFiltered();", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t}", "@Override//判断过滤器是否生效。\r\n\tpublic boolean shouldFilter() {\n\t\treturn false;\r\n\t}", "EventChannelFilter filter();", "public void init(FilterConfig arg0) throws ServletException {\n\t\tSystem.out.println(\"UserFilter Initialized\");\r\n\t\t\r\n\t}", "@Override\r\n public void init(FilterConfig filterConfig) throws ServletException {\n }", "public PipelineFilter()\n {\n }", "@Override\r\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\t\t\r\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Override\n\tpublic void init(FilterConfig arg0) throws ServletException {\n\n\t}", "@Test\n public void shouldFilterTheFirstMessageAndLogTheSecond() {\n ILogger logger = new SysoutLogger();\n IFilter filter = new FilterLogStartingWith(\"w\");\n ILogger filterLogger = new FilterLogger(filter, logger);\n\n filterLogger.log(\"hello\");\n filterLogger.log(\"world\");\n assertThat(outContent.toString(), is(\"world\" + System.getProperty(\"line.separator\")));\n\n // TODO: Enhance functional interface Logger to take a filter and to have no more FilterLogger\n }", "@Override\n\tpublic void destroy() {\n\t\tSystem.out.print(\"过滤销毁\");\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t}", "void enableFilter(boolean enable);", "@Override\r\n\tpublic void destroy() {\n\t\tSystem.out.println(\"FirstFilter::destroy\");\r\n\t}", "public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException {\n StringBuilder b = new StringBuilder();\n HttpServletRequest hreq = (HttpServletRequest)request;\n b.append( LF );\n b.append( \"Request for: \" );\n b.append( hreq.getRequestURI() );\n if ( hreq.getRequestURI().contains( \".js\" ) ) {\n // nothing to do here\n } else {\n if ( LOG.getLevel().intValue() < Level.WARNING.intValue() ) {\n b.append( LF );\n dumpHeaders( hreq, b );\n dumpRequestParameters( hreq, b );\n dumpSessionAttributes( hreq, b );\n dumpCookies( hreq, b );\n }\n }\n LOG.info( b.toString() );\n chain.doFilter( request, response );\n }", "public Filter() {\n }", "@Override\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t}", "@Override\r\n\tpublic void init(FilterConfig filterConfig) throws ServletException {\n\t\t\r\n\t}", "void onFilterChanged(ArticleFilter filter);", "public Filter () {\n\t\tsuper();\n\t}", "@Override\n\tpublic void doFilter(ServletRequest req, ServletResponse resp, FilterChain filterChain)\n\t\t\tthrows IOException, ServletException {\n\t\tif(filterConfig == null){\n\t\t\tthrow new ServletException(\"FilterConfig not set before first request\");\n\t\t}\n\t\tfilterConfig.getServletContext().log(\"in LoggerFilter\");\n\t\tSystem.out.println(\"in LoggerFilter\");\n\t\t\n\t\tlong starTime=System.currentTimeMillis();\n\t\tString remoteAddress=req.getRemoteAddr();\n\t\tString remoteHost=req.getRemoteHost();\n\t\tHttpServletRequest myReq=(HttpServletRequest) req;\n\t\tString reqURI=myReq.getRequestURI();\n\t\tSystem.out.println(reqURI);\n\t\tSystem.out.println(remoteAddress);\n\t\tSystem.out.println(remoteHost);\n\t\t\treq.setAttribute(\"URI\", reqURI);\n\t\t\treq.setAttribute(\"RAddress\", remoteAddress);\n\t\t\treq.setAttribute(\"RHost\", remoteHost);\n\t\t\tfilterChain.doFilter(req, resp);\n\t}", "void filterDisposed(Filter filter);", "private void updateFilter(BasicOutputCollector collector) {\n if (updateFilter()){\n \tValues v = new Values();\n v.add(ImmutableList.copyOf(filter));\n \n collector.emit(\"filter\",v);\n \t\n }\n \n \n \n }", "public interface Filter {\n\n}" ]
[ "0.7378022", "0.72136986", "0.72136986", "0.71811783", "0.7176347", "0.7100789", "0.7059128", "0.69718915", "0.690441", "0.6852082", "0.68502325", "0.68293655", "0.6799727", "0.67928463", "0.6789542", "0.6776163", "0.6767179", "0.6752591", "0.66966164", "0.66620344", "0.6652548", "0.6609938", "0.65892977", "0.6542073", "0.6507022", "0.6488427", "0.64705086", "0.64548486", "0.6411229", "0.6403982", "0.6387631", "0.6386801", "0.6371298", "0.6346758", "0.6342646", "0.6337416", "0.6310462", "0.62817854", "0.62817854", "0.62817854", "0.62817854", "0.62817854", "0.62817854", "0.62817854", "0.62817854", "0.62817854", "0.6279432", "0.62693787", "0.6266901", "0.62657857", "0.62657857", "0.62657857", "0.62413913", "0.62346965", "0.623389", "0.6231508", "0.6227218", "0.62148815", "0.62139416", "0.6204856", "0.6204824", "0.6198447", "0.6196034", "0.6196034", "0.61909074", "0.6179817", "0.6179817", "0.6176544", "0.6176544", "0.61731875", "0.61672664", "0.6162312", "0.6159791", "0.6159549", "0.6157451", "0.61473745", "0.6135796", "0.6132491", "0.6132491", "0.6132491", "0.6132491", "0.6132491", "0.6132491", "0.6132491", "0.6132491", "0.6132491", "0.6120864", "0.6112051", "0.6099799", "0.6098754", "0.60968184", "0.60923177", "0.6091931", "0.6090144", "0.60886997", "0.6078303", "0.6074785", "0.6071347", "0.60713416", "0.60581094", "0.6053841" ]
0.0
-1
TODO Autogenerated method stub
@Transactional(readOnly = true) @Override public List<Map<String, Object>> getList(Map<String, Object> params) { DataManager dataManager = new DataManager(entityManager); dataManager.add("SELECT A.*,B.ENABLE FROM USER_PROFILE A LEFT JOIN USERS B ON A.USERNAME=B.USERNAME WHERE 1=1"); for(String index : params.keySet()) { if(!StringUtils.isBlank(String.valueOf(params.get(index)))) { if(!index.equals("role")) { dataManager.add("AND A."+index.toUpperCase()+" = :"+index+" ",params.get(index)); } } } dataManager.add(" ORDER BY A.USERNAME"); List<Map<String, Object>> result = (List<Map<String, Object>>) dataManager.getResult(); for( Map<String, Object> index : result) { DataManager subDataManager = new DataManager(entityManager); subDataManager.add("SELECT * FROM ROLES WHERE USERNAME = :username",index.get("USERNAME")); subDataManager.add("AND ROLE = :role",params.get("role")); List<Map<String, Object>> subResult = (List<Map<String, Object>>) subDataManager.getResult(); String roles=""; for( Map<String, Object> subIndex : subResult) { if(roles.length()>0) { roles+=","; } roles+=subIndex.get("ROLE"); } index.put("ROLE", roles); } return result; }
{ "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
@Transactional(rollbackFor = Exception.class) @Override public void delete(String username) throws Exception { try { userProfileRepository.delete(username); rolesRepository.delete(username); }catch(Exception ex) { throw new Exception("刪除失敗!",ex); } }
{ "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
@Transactional(rollbackFor = Exception.class) @Override public void update(UserRegisterForm userRegisterForm) throws Exception { try { UserProfile userProfile = new UserProfile(); userProfile.setUsername(userRegisterForm.getUsername()); userProfile.setName(userRegisterForm.getName()); userProfile.setImage(userRegisterForm.getImage()); userProfileRepository.save(userProfile); List<Roles> rolesList = new ArrayList<Roles>(); for (String index : userRegisterForm.getRoles()) { RolesPk id = new RolesPk(); id.setUsername(userRegisterForm.getUsername()); id.setRole(index); Roles roles = new Roles(); roles.setId(id); rolesList.add(roles); } rolesRepository.deleteUsernameAndExcludeRole(userRegisterForm.getUsername(), userRegisterForm.getRoles()); rolesRepository.saveAll(rolesList); }catch(Exception ex) { throw new Exception("更新失敗!",ex); } }
{ "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
@Transactional(readOnly = true) @Override public String getImage() { UserProfile userProfile = userProfileRepository.getOne(UserProfileUtils.getUsername()); return userProfile.getImage(); }
{ "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
Add a book in the database
public static void addBook(Book book) throws HibernateException{ session=sessionFactory.openSession(); session.beginTransaction(); //Insert detail of the book to the database session.save(book); session.getTransaction().commit(); session.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Book addBook(Book book) {\n\t\treturn bd.save(book);\r\n\t}", "private void insertBook() {\n /// Create a ContentValues object with the dummy data\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_NAME, \"Harry Potter and the goblet of fire\");\n values.put(BookEntry.COLUMN_BOOK_PRICE, 100);\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, 2);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_NAME, \"Supplier 1\");\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE, \"972-3-1234567\");\n\n // Insert the dummy data to the database\n Uri uri = getContentResolver().insert(BookEntry.CONTENT_URI, values);\n // Show a toast message\n String message;\n if (uri == null) {\n message = getResources().getString(R.string.error_adding_book_toast).toString();\n } else {\n message = getResources().getString(R.string.book_added_toast).toString();\n }\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "@Override\r\n\tpublic boolean addBook(BookDto book) {\n\t\tsqlSession.insert(ns + \"addBook\", book);\t\t\r\n\t\treturn true;\r\n\t}", "public void addLivros( LivroModel book){\n Connection connection=ConexaoDB.getConnection();\n PreparedStatement pStatement=null;\n try {\n String query=\"Insert into book(id_book,title,author,category,publishing_company,release_year,page_number,description,cover)values(null,?,?,?,?,?,?,?,?)\";\n pStatement=connection.prepareStatement(query);\n pStatement.setString(1, book.getTitulo());\n pStatement.setString(2, book.getAutor());\n pStatement.setString(3, book.getCategoria());\n pStatement.setString(4, book.getEditora());\n pStatement.setInt(5, book.getAnoDeLancamento());\n pStatement.setInt(6, book.getPaginas());\n pStatement.setString(7, book.getDescricao());\n pStatement.setString(8, book.getCapa());\n pStatement.execute();\n } catch (Exception e) {\n \n }finally{\n ConexaoDB.closeConnection(connection);\n ConexaoDB.closeStatement(pStatement);\n }\n }", "public boolean addBook(Books books){\n String sql=\"insert into Book(book_name,book_publish_date,book_author,book_price,scraption)values(?,?,?,?,?)\";\n boolean flag=dao.exeucteUpdate(sql,new Object[]{books.getBook_name(),books.getBook_publish_date(),\n books.getBook_author_name(),books.getBook_price(),books.getScraption()});\n return flag;\n }", "public com.huqiwen.demo.book.model.Books create(long bookId);", "public boolean insertBook(Book book) {\r\n books.add(book);\r\n return true;\r\n }", "@Override\n\tpublic void add() {\n\t\tHashMap<String, String> data = new HashMap<>();\n\t\tdata.put(\"title\", title);\n\t\tdata.put(\"author\", author);\n\t\tdata.put(\"publisher\", publisher);\n\t\tdata.put(\"isbn\", isbn);\n\t\tdata.put(\"bookID\", bookID);\n\t\tHashMap<String, Object> result = null;\n\t\tString endpoint = \"bookinfo/post.php\";\n\t\ttry {\n\t\t\tresult = APIClient.post(BookInfo.host + endpoint, data);\n\t\t\tvalid = result.get(\"status_code\").equals(\"Success\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "boolean insertBook(Book book);", "public static void addBook(final @Valid Book book) {\n\t\tif (book.serie.id == null) {\r\n\t\t\tValidation.required(\"book.serie.name\", book.serie.name);\r\n\r\n\t\t\tif (book.serie.name != null) {\r\n\t\t\t\tSerie serie = Serie.find(\"byName\", book.serie.name).first();\r\n\t\t\t\tif (serie != null) {\r\n\t\t\t\t\tValidation.addError(\"book.serie.name\",\r\n\t\t\t\t\t\t\t\"La série existe déjà\",\r\n\t\t\t\t\t\t\tArrayUtils.EMPTY_STRING_ARRAY);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Validation errror treatment\r\n\t\tif (Validation.hasErrors()) {\r\n\r\n\t\t\tif (Logger.isDebugEnabled()) {\r\n\t\t\t\tfor (play.data.validation.Error error : Validation.errors()) {\r\n\t\t\t\t\tLogger.debug(error.message() + \" \" + error.getKey());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Specific treatment for isbn, just to provide example\r\n\t\t\tif (!Validation.errors(\"book.isbn\").isEmpty()) {\r\n\t\t\t\tflash.put(\"error_isbn\", Messages.get(\"error.book.isbn.msg\"));\r\n\t\t\t}\r\n\r\n\t\t\tparams.flash(); // add http parameters to the flash scope\r\n\t\t\tValidation.keep(); // keep the errors for the next request\r\n\t\t} else {\r\n\r\n\t\t\t// Create serie is needed\r\n\t\t\tif (book.serie.id == null) {\r\n\t\t\t\tbook.serie.create();\r\n\t\t\t}\r\n\r\n\t\t\tbook.create();\r\n\r\n\t\t\t// Send WebSocket message\r\n\t\t\tWebSocket.liveStream.publish(MessageFormat.format(\r\n\t\t\t\t\t\"La BD ''{0}'' a été ajoutée dans la série ''{1}''\",\r\n\t\t\t\t\tbook.title, book.serie.name));\r\n\r\n\t\t\tflash.put(\"message\",\r\n\t\t\t\t\t\"La BD a été ajoutée, vous pouvez créer à nouveau.\");\r\n\t\t}\r\n\r\n\t\tBookCtrl.prepareAdd(); // Redirection toward input form\r\n\t}", "@Override\n public int addBook(Book book) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n ResultSet resultSet = null;\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementAdd =\n helper.prepareStatementAdd(connection, book);\n PreparedStatement statementSelect =\n helper.prepareStatementSelect(connection, book)) {\n statementAdd.executeUpdate();\n resultSet = statementSelect.executeQuery();\n resultSet.next();\n return new BookCreator().getBookId(resultSet);\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n close(resultSet);\n }\n }", "public int addBook(Book addBook) throws Exception {\r\n\r\n\t\tString insert = \"INSERT into book\" + \"(title,description,date,author,isbn,price) VALUES \" + \" (?,?,?,?,?,?)\";\r\n\t\tint result = 0;\r\n\r\n\t\ttry (\r\n\t\t\t\t// Class.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\t\tConnection connection = DriverManager.getConnection(\r\n\t\t\t\t\t\t\"jdbc:mysql://localhost:3306/sjsu_textbookstore?autoReconnect=true&useSSL=false\", \"root\",\r\n\t\t\t\t\t\t\"N00bcakes\");\r\n\r\n\t\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(insert)) {\r\n\t\t\tpreparedStatement.setString(1, addBook.getTitle());\r\n//\t\t\t\tpreparedStatement.setInt(2, acc.getAccount_id());\r\n\t\t\tpreparedStatement.setString(2, addBook.getDescription());\r\n\t\t\tpreparedStatement.setDate(3, getCurrentDate());\r\n\t\t\tpreparedStatement.setString(4, addBook.getAuthor());\r\n\t\t\tpreparedStatement.setString(5, addBook.getIsbn());\r\n\t\t\tpreparedStatement.setString(6, addBook.getPrice());\r\n\r\n\t\t\tSystem.out.println(preparedStatement);\r\n\t\t\tresult = preparedStatement.executeUpdate();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\t}", "public void addBook(Book book) {\n this.bookList.add(book);\n }", "@Override\r\n\tpublic void storedBook(Book book) {\n\t\tticketDao.insertBook(book);\r\n\t}", "@Override\n\tpublic String insertBook(Book book) {\n\t\treturn \"Book successfully inserted\";\n\t}", "@Override\n\tpublic void addBook() {\n\t\t\n\t}", "public void addBook(Book book) {\n \tset.add(book);\n }", "@Override\r\n\tpublic int insertBook(Book book) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic boolean addBook(Book book) throws DAOException {\n\t\treturn false;\n\t}", "public void create(String title, String numPages, String quantity, String category, String price, String publicationYear, String[] authorsId, String publisherId) {\n System.out.println(\"creating book \" + title + \" by \"+ authorsId[0] + \" published by \" + publisherId);\n dbmanager.open();\n \n JSONObject item = new JSONObject();\n item.put(\"idBOOK\", dbmanager.getNextId());\n item.put(\"title\", title);\n item.put(\"numPages\", numPages);\n item.put(\"quantity\", quantity);\n item.put(\"category\", category);\n item.put(\"price\", price);\n item.put(\"publicationYear\", publicationYear);\n item.put(\"authors\", authorsId); \n item.put(\"publisher\", publisherId);\n\n dbmanager.createCommit(getNextBookId(),item);\n \n dbmanager.close();\n }", "String insert(BookDO record);", "public void add(Book book)\n\t{\n\t\tbooks.add(book);\n\t}", "private void insertDummyBook() {\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_NAME, getString(R.string.dummy_book_name));\n values.put(BookEntry.COLUMN_GENRE, BookEntry.GENRE_SELF_HELP);\n values.put(BookEntry.COLUMN_PRICE, getResources().getInteger(R.integer.dummy_book_price));\n values.put(BookEntry.COLUMN_QUANTITY, getResources().getInteger(R.integer.dummy_book_quantity));\n values.put(BookEntry.COLUMN_SUPPLIER, getString(R.string.dummy_book_supplier));\n values.put(DatabaseContract.BookEntry.COLUMN_SUPPLIER_PHONE, getString(R.string.dummy_supplier_phone_number));\n values.put(DatabaseContract.BookEntry.COLUMN_SUPPLIER_EMAIL, getString(R.string.dummy_book_supplier_email));\n getContentResolver().insert(BookEntry.CONTENT_URI, values);\n }", "@Override\n\tpublic Book createBook(Book book) throws SQLException {\n\t\ttry {\n\t\t\treturn dao.insertBook(book);\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}return book;\n\t}", "public void insertBook(){\n\n // Create a new map of values, where column names are the keys\n ContentValues values = new ContentValues();\n values.put(BookContract.BookEntry.COLUMN_PRODUCT_NAME, \"You Do You\");\n values.put(BookContract.BookEntry.COLUMN_PRICE, 10);\n values.put(BookContract.BookEntry.COLUMN_QUANTITY, 20);\n values.put(BookContract.BookEntry.COLUMN_SUPPLIER_NAME, \"Kedros\");\n values.put(BookContract.BookEntry.COLUMN_SUPPLIER_PHONE_NUMBER, \"210 27 10 48\");\n\n Uri newUri = getContentResolver().insert(BookContract.BookEntry.CONTENT_URI, values);\n }", "public void addBook(Book title)\n {\n bookList.add(title);\n }", "public void addBook(String name, String catogary){\n\t\tBook newBook = new Book(name, catogary);\n newBook.setAddDate();\n Library.Books.add(newBook);\n\t\tLibrary.saveObject(Library.Books,\"books.dat\");\n\t\t\n\t}", "public boolean add(Book item) {\r\n\t\ttry {\t\r\n\t\t\topenConnection();\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\tString sql = \"INSERT INTO db VALUES ('\" + item.ISBN13 + \"', '\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ item.title + \"', '\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ item.author + \"', '\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ item.publisher + \"', '\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ item.year + \"', '\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ item.ISBN10 + \"', '\" \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ item.link + \"', '1')\";\r\n\t\t\tstmt.executeUpdate(sql);\r\n\t\t\tSystem.out.println(item.title + \" added into the database\");\r\n\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\t\t\r\n\t\t\t//e.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tcloseConnection();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void create(Book book) {\n\t\tentityManager.persist(book);\n\t\tSystem.out.println(\"BookDao.create()\" +book.getId());\n\t\t\n\t}", "int insert(Book record);", "int insert(Book record);", "int insert(CmsRoomBook record);", "int insert(BookInfo record);", "@Override\n\tpublic Long addBook(BookRequestVO request) {\n\t\tLong savedBookId = bookStorePersistDao.addBook(request);\n\t\treturn savedBookId;\n\t}", "public void addnew(book newbook) {\n\t\trepository.save(newbook);\n\t\t\n\t}", "protected static void addBook(Book toAdd)\n {\n if (toAdd == null) // if product is null, becuase the formatting wasnt correct, then dont go forward and print out that the book wasnt added\n ProductGUI.Display(\"Book not added\\n\");\n else{\n try{\n if (!(toAdd.isAvailable(toAdd.getID(), productList))) // if the product id alrady exists, dont go forard towards adding it\n {\n ProductGUI.Display(\"Sorry. this product already exists\\n\");\n return;\n }\n else\n ProductGUI.Display(\"New book product\\n\");\n \n myProduct = new Book(toAdd.getID(), toAdd.getName(), toAdd.getYear(), toAdd.getPrice(), toAdd.getAuthor(), toAdd.getPublisher()); // make new product using this object\n productList.add(myProduct); // add product to arraylist\n \n addToMap(toAdd.getName()); // adding the product name to the hashmap\n System.out.println(\"book added to all\");\n ProductGUI.fieldReset(); // reset the fields to being blank\n } catch (Exception e){\n ProductGUI.Display(e.getMessage()+\"errorrorror\\n\");\n }\n }\n }", "@Override\n\tpublic int addBook(bookInfo bookinfo) {\n\t\treturn 0;\n\t}", "void addInBookNo(Object newInBookNo);", "@PostMapping(\"api/book\")\n public ResponseEntity<Book> addBook(@RequestBody Book book) {\n Result<Book> result = bookService.save(book);\n if (result.isSuccess()) {\n return ResponseEntity.ok(book);\n } else {\n return ResponseEntity.noContent().build();\n }\n }", "public void addBook(Book b){\n\t\tbookMap.get(b.getTitle()).add(b);\n\t}", "public void addNewBook(Book b) {\n if (totalbooks < books.length) {\n books[totalbooks] = b;\n totalbooks++;\n } else {\n System.out.println(\"The bookstore is full\");\n }\n\n }", "public void registerBooks(Book b) {\n\t\ttry (PreparedStatement stmt = LibraryConnection.getConnection()\n\t\t\t\t.prepareStatement(\n\t\t\t\t\t\t\"INSERT INTO book(isbn, title) VALUES ( ?, ?)\");) {\n\t\t\tstmt.setString(1, b.getIsbn());\n\t\t\tstmt.setString(2, b.getTitle());\n\t\t\tstmt.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void addBook() {\n\t\t JTextField callno = new JTextField();\r\n\t\t JTextField name = new JTextField();\r\n\t\t JTextField author = new JTextField(); \r\n\t\t JTextField publisher = new JTextField(); \r\n\t\t JTextField quantity = new JTextField(); \r\n\t\t Object[] book = {\r\n\t\t\t\t \"Callno:\",callno,\r\n\t\t\t\t \"Name:\",name,\r\n\t\t\t\t \"Author:\",author,\r\n\t\t\t\t \"Publisher:\",publisher,\r\n\t\t\t\t \"Quantity:\",quantity\r\n\t\t\t\t\r\n\t\t };\r\n\t\t int option = JOptionPane.showConfirmDialog(null, book, \"New book\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\t if(option==JOptionPane.OK_OPTION) {\r\n // add to the Book database\r\n\t\t try {\r\n\t\t\t \r\n\t\t String query = \"insert into Book(callno,name,author,publisher,quantity,added_date)\"\r\n\t\t\t\t +\" values(?,?,?,?,?,GETDATE())\";\r\n\t\t \r\n\t\t PreparedStatement s = SimpleLibraryMangement.connector.prepareStatement(query);\r\n\t\t s.setString(1, callno.getText());\r\n\t\t s.setString(2, name.getText());\r\n\t\t s.setString(3, author.getText());\r\n\t\t s.setString(4, publisher.getText());\r\n\t s.setInt(5, Integer.parseInt(quantity.getText()));\r\n\t\t s.executeUpdate();\r\n\t\t JOptionPane.showMessageDialog(null, \"Add book successfully\", null, JOptionPane.INFORMATION_MESSAGE);\r\n\r\n\t\t } catch(Exception e) {\r\n\t\t\t JOptionPane.showMessageDialog(null, \"Add book failed\", null, JOptionPane.ERROR_MESSAGE);\r\n\t\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t } \r\n\t\t \r\n\t}", "public void insertBook(int ISBN, String BookName, String AuthorName, int Price) {\n String sql = \"INSERT INTO books (ISBN, BookName, AuthorName, Price) VALUES(?,?,?,?)\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n // Set values\n pstmt.setInt(1, ISBN);\n pstmt.setString(2, BookName);\n pstmt.setString(3, AuthorName);\n pstmt.setInt(4, Price);\n\n pstmt.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "public Book createBook(Book newBook) {\n\t\treturn this.sRepo.save(newBook);\n\t}", "public void add(int id, String name, String author, int issueDate, int returnDate) {\n\tBook book = new Book();\n\tbook.id = id;\n\tbook.name = name;\n\tbook.author = author;\n\tbook.issueDate = issueDate;\n\tbook.returnDate = returnDate;\n\tlist.add(book);\n\tSystem.out.println(\"Successfully added: \"+book.id);\n}", "public void insertBooking(Booking booking) throws SQLException, Exception;", "@Override\r\n\tpublic boolean addBook(Book book) {\n\r\n\t\tif (searchBook(book.getISBN()).getISBN() == 98564567l) {\r\n\t\t\ttransactionTemplate.setReadOnly(false);\r\n\t\t\treturn transactionTemplate.execute(new TransactionCallback<Boolean>() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\tint rows = bookDAO.addBook(book);\r\n\t\t\t\t\t\tif (rows > 0)\r\n\t\t\t\t\t\t\treturn true;\r\n\r\n\t\t\t\t\t} catch (Exception exception) {\r\n\t\t\t\t\t\tstatus.setRollbackOnly();\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean insertBook(Book book) {\n \tassert _loggerHelper != null;\n \t\n \tif (book == null) {\n \t\tthrow new IllegalArgumentException();\n \t}\n \t\n \tboolean result = insertBook(book, false);\n \t_loggerHelper.logInfo(result ? \"Book was succesfully inserted\" : \"Book insertion failed\");\n \treturn result;\n }", "void addbook(String book){\n\t\tthis.books[no_of_books]=book;\n\t\tno_of_books++;\n\t\tSystem.out.println(book+\" ...add\");\n\n\t}", "@PostMapping(\"/books\")\n\tpublic Book createBook(@RequestBody Book book)\n\t{\n\t\treturn bookRepository.save(book);\n\t}", "@PostMapping(\"/{username}/books\")\n public Book addBookToLibrary(@PathVariable String username,\n @RequestBody Book book) {\n\n if(book.getBookId() == null) {\n logger.error(\"bookId is null\");\n throw new IllegalArgumentException(\"Invalid bookId\");\n }\n return userBookToBook.apply(userService.addBook(username, book.getBookId()));\n }", "public Book save(Book book) {\n return bookRepository.save(book);\n }", "public static Response createBook(String title, double price){\n Book b = new Book();\n b.setTitle(title);\n b.setPrice(price);\n EntityTransaction t = em.getTransaction();\n t.begin();\n em.persist(b);\n t.commit();\n return Response.ok().build();\n }", "@Test\n\tpublic void testAddBook() {\n\t\t//System.out.println(\"Adding book to bookstore...\");\n\t\tstore.addBook(b5);\n\t\tassertTrue(store.getBooks().contains(b5));\n\t\t//System.out.println(store);\n\t}", "public Book addBook(Book b){\n list.add(b);\n return b;\n }", "@Override\n\tpublic int insertWannaBook(WannaBookVO wannaBookvo) throws RemoteException {\n\t\treturn 0;\n\t}", "@POST\n @Consumes(MediaType.APPLICATION_JSON)\n public Response createBook(Book book) {\n final BookServiceResult result = bookService.addBook(book);\n return Response\n .status(result.getStatus())\n .entity(getJsonFromServiceResult(result))\n .build();\n }", "public void persistBook(Book book) {\n\t\tEntityManager entityManager = factory.createEntityManager();\n\t\t// User user = new User(\"someuser2\",\"password2123\");\n\t\tentityManager.getTransaction().begin();\n\t\tentityManager.persist(book);\n\t\tentityManager.getTransaction().commit();\n\t\tSystem.out.println(\"added Book\");\n\t}", "public void onAdd() {\n String bookTitle = details[0];\n String author = details[1];\n boolean addedCorrectly = ControllerBook.addBook(this.ISBN, author, bookTitle, \"\");\n if (addedCorrectly) {\n dispose();\n } else {\n\n pack();\n }\n\n }", "Book addBook(String title, String[] authors, boolean silent);", "@Test\n\tpublic void addBook_EmptyTitle(){\n\t\tBook b = new Book(\"abc\", \"\");\n\t\tassertTrue(db.putBook(b));\n\t}", "@GetMapping(\"/addBook\")\n public String addNewBook(Model model) {\n Book newBook = new Book();\n List<Author> authors = authorService.getAllAuthor();\n List<Category> categories = categoryService.getAllCategory();\n model.addAttribute(\"authorAddBook\", authors);\n model.addAttribute(\"newBook\", newBook);\n model.addAttribute(\"categoryAddBook\", categories);\n return \"add-new-book\";\n }", "public void addBook(Book book)\r\n\t{\r\n\t\tList<Book> oldValue = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\titems.add(book);\r\n\t\tfirePropertyChange(\"books\", oldValue, items);\r\n\t\tfirePropertyChange(\"itemsCount\", oldValue.size(), items.size());\r\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tStoredBookDAO storeBookDAO = new StoredBookDAO(BookInfoActivity.this);\n\t\t\tBookStoredEntity testBookBorrowedEntity1 = new BookStoredEntity();\n\t\t\ttestBookBorrowedEntity1.setBookId(\"1\");\n\t\t\ttestBookBorrowedEntity1.setBookText(\"android\");\n\t\t\ttestBookBorrowedEntity1.setBookImageUrl(\"android\");\n\t\t\ttestBookBorrowedEntity1.setBookPress(\"android\");\n\t\t\ttestBookBorrowedEntity1.setBookPressTime(\"android\");\n\t\t\tstoreBookDAO.insert(testBookBorrowedEntity1);\n\t\t\tToast.makeText(BookInfoActivity.this, R.string.storesuccess, Toast.LENGTH_SHORT).show();\n\t\t}", "public void add(Book book) {\n if (books.length == numBooks){ grow(); }\n books[numBooks++] = book;\n }", "public static void add( EntityManager em, UserTransaction ut, String isbn,\n String title, int year) throws Exception {\n ut.begin();\n Book book = new Book( isbn, title, year);\n em.persist( book);\n ut.commit();\n System.out.println( \"Book.add: the book \" + book + \" was saved.\");\n }", "@PostMapping(\"/book\")\n public ResponseEntity<?> addBook(@RequestBody Book book) {\n if(bookService.findBook(book.getBarcode()).isPresent()){\n return ResponseEntity.badRequest().body(\"Book with this barcode already exists.\");\n } else {\n bookService.addBook(book);\n return ResponseEntity.status(HttpStatus.OK).body(\"Book was added.\");\n }\n\n }", "private void save(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tBook book = new Book();\r\n\t\tbook.setId(bookService.list().size()+1);\r\n\t\tbook.setBookname(request.getParameter(\"bookname\"));\r\n\t\tbook.setAuthor(request.getParameter(\"author\"));\r\n\t\tbook.setPrice(Float.parseFloat(request.getParameter(\"price\")));\r\n\t\tbookService.save(book);\r\n\t\t//out.println(\"<script>window.location.href='index.html'</script>\");\r\n\t\tresponse.sendRedirect(\"index.html\");\r\n\t}", "public Result save() {\n try {\n Form<Book> bookForm = formFactory.form(Book.class).bindFromRequest();\n Book book = bookForm.get();\n libraryManager.addLibraryItem(book);\n return redirect(routes.MainController.index());\n } catch (IsbnAlreadyInUseException e) {\n return notAcceptable(e.getMessage());\n }\n }", "public BookEntity addBook(Long clientsId, Long booksId) {\n ClientEntity clientEntity = clientPersistence.find(clientsId);\n BookEntity bookEntity = bookPersistence.find(booksId);\n clientEntity.getBooks().add(bookEntity);\n return bookPersistence.find(booksId);\n }", "@Override\n\tpublic void insertBookData(BookingBus b) {\n\t\tuserdao.insertBookData(b);\n\t}", "public void addBook(Book book) {\n\t\tboolean notFound = true;\n\t\tfor (Item item : items) {\n\t\t\tif(item.getName().equals(book.getName())) {\n\t\t\t\t// Found\n\t\t\t\tnotFound = false;\n\t\t\t\titem.updateQuantity();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(notFound) {\n\t\t\tItem item = new Item(book, 1);\n\t\t\titems.add(item);\n\t\t}\n\t}", "private void setUpAddBookButton()\n {\n setComponentAlignment(addBookButton, Alignment.BOTTOM_LEFT);\n addBookButton.setCaption(\"Add\");\n addBookButton.addClickListener(new Button.ClickListener() {\n public void buttonClick(Button.ClickEvent event)\n {\n Object id = bookTable.getValue();\n int book_id = (int)bookTable.getContainerProperty(id,\"id\").getValue();\n basket.add(allBooksBean.getIdByIndex(book_id-1));\n //basket.add(allBooks.get(book_id-1));\n errorLabel.setCaption(\"Successfully added book to Basket\");\n }\n });\n }", "public static void AddBooking(Booking booking){\n \n \n try (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM booking\")){\n \n resultSet.moveToInsertRow();\n resultSet.updateInt(\"BookingNumber\", booking.getBookingNumber());\n resultSet.updateString(\"FlightNumber\", booking.getFlightNumber());\n resultSet.updateDouble(\"Price\", booking.getPrice());\n resultSet.updateString(\"CabinClass\", booking.getCabinClass());\n resultSet.updateInt(\"Quantity\", booking.getQuantity());\n resultSet.updateInt(\"Insurance\", booking.getInsurance());\n resultSet.insertRow();\n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n \n \n \n }", "void create(Book book);", "public void addToCart(Publication book) {\n if(book != null){\n shoppingCart.add(book);\n } else {\n throw new NoSuchPublicationException();\n }\n\n }", "public void createbook(Author a, Connection c) throws SQLException{\n\t a.insert(c, \"While the cows lie\", \"Cows are big and cannot run\", 2, 2, 0);\r\n\t\t\r\n\t\t\r\n\t\t//a.createTable(c);\r\n\t\t//String chapName= \"Toodloo\";\r\n\t\t//String chap = \"Bippidee boppidee\";\r\n\t\t//a.insert(c, chapName, chap);\r\n\t\t//a.viewnextchap(c,2);\r\n\t\t//a.getNextChap(c, 2);\r\n\t}", "public void reserveBook(String cardNo, String book_id) throws SQLException {\n\t\tPreparedStatement myStmt = null;\n\t\t\n\t\tString query = \" insert into book_loans (book_id, branch_id, card_no, date_out, date_due)\"\n\t\t + \" values (?, 9745, ?, curdate(), curdate()+7)\";\n\t\t\n\t\tmyStmt = myConn.prepareStatement(query);\n\t\t\n\t\tmyStmt.setString(1, book_id);\n\t\tmyStmt.setString(2, cardNo);\n\t\t\n\t\t\n\t\t\n\t\tmyStmt.execute();\n\t\t\n\t}", "int insert(IntegralBook record);", "@Override\r\n\tpublic Book updateBook(Book book) {\n\t\treturn bd.save(book);\r\n\t}", "Book createBook();", "public void createBooking(Booking book) {\n\tStudentDAO studentDAO=new StudentDAO();\n\tstudentDAO.createBooking(book);\n}", "public void addBooking(Booking b)\r\n {\r\n bookings.add(b);\r\n }", "int addBookToLibrary(Book book) {\n\t\t\n\t\t// checks if the book is already in our library \n\t\tint checkBookId = this.getBookId(book);\n\n\t\tif (checkBookId != -1) {\n\t\t\treturn checkBookId;\n\t\t}\n\t\t\n\t\t// checks if passed the amount of books we can hold\n\t\tif (this.bookCounter >= this.maxBookCapacity) {\n\t\t\treturn -1; \n\t\t}\n\t\t\t\n\t\t// adds the book to the bookshelf\n\t\tthis.bookShelf[this.bookCounter] = book; \n\t\t\n\t\t// update the counter\n\t\tthis.bookCounter ++; \n\t\t\n\t\treturn (this.bookCounter - 1); \n\t}", "public synchronized void addBook(String title, int quantity){\n titleList.add(title);\n quantityList.add(quantity);\n borrowerList.add(new LinkedList<>());\n }", "private static void addBook() {\n\t\t\r\n\t\tString author = input(\"Enter author: \"); // varaible change A to author\r\n\t\tString title = input(\"Enter title: \"); // variable changes T to title\r\n\t\tString callNumber = input(\"Enter call number: \"); // variable name change C to callNumber\r\n\t\tbook B = lib.addBook(author, title, callNumber); //variable LIB changes to library,A to author,T to title,C to callNumber , method changes Add_book to addBook()\r\n\t\toutput(\"\\n\" + B + \"\\n\");\r\n\t\t\r\n\t}", "public Book addBook(){\n Book book = new Book();\r\n String t = title.getText().toString();\r\n book.setTitle(t);\r\n String[] str = author.getText().toString().split(\",\");\r\n Author[] authors = new Author[str.length];\r\n int index = 0;\r\n for(String s : str){\r\n Author a = null;\r\n String[] fml = s.split(\"\\\\s+\");\r\n if(fml.length == 1){\r\n a = new Author(fml[0]);\r\n }else if(fml.length == 2){\r\n a = new Author(fml[0], fml[1]);\r\n }else if(fml.length == 3){\r\n a = new Author(fml[0], fml[1], fml[2]);\r\n }else{\r\n Toast.makeText(this, \"Invalid Author Name\", Toast.LENGTH_LONG).show();\r\n }\r\n authors[index] = a;\r\n index++;\r\n }\r\n book.setAuthors(authors);\r\n String isb = isbn.getText().toString();\r\n book.setIsbn(isb);\r\n\r\n\t\treturn book;\r\n\t}", "public void add(String t, String author){\r\n\t \r\n\t items.add(new Book(t, author));\r\n\t \r\n }", "public void addBookList(BookList bookList) {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tlong newRowId;\n\t\t\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(KEY_BOOK_LIST_NAME, bookList.getListTitle());\n\t\tnewRowId = db.insert(BOOK_LIST_TABLE_NAME, null, values);\n\t\t\n\t\tif (newRowId > -1) {\n\t\t\tfor (Book book : bookList.getList()) {\n\t\t\t\tContentValues bookValues = new ContentValues();\n\t\t\t\tbookValues.put(KEY_TITLE, book.getTitle());\n\t\t\t\tbookValues.put(KEY_AUTHOR, book.getAuthor());\n\t\t\t\tbookValues.put(KEY_PRICE, book.getPrice());\n\t\t\t\tbookValues.put(KEY_DESCRIPTION, book.getDescription());\n\t\t\t\tbookValues.put(KEY_IMG_URL, book.getImgUrl());\n\t\t\t\tbookValues.put(KEY_BOOK_LIST_ID, newRowId);\n\t\t\t\tdb.insert(BOOK_TABLE_NAME, null, bookValues);\n\t\t\t}\n\t\t}\n\t\t\n\t\tdb.close();\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic Book save(Book book) {\r\n\t\tSession session = getSession();\r\n\r\n\t\tsession.save(book);\r\n\r\n\t\treturn book;\r\n\t}", "@Test\n public void canAddBookToLibrary(){\n library.add(book);\n assertEquals(1, library.countBooks());\n }", "public void addBook(int index, Book book)\r\n\t{\r\n\t\tif(index == -1) {\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\tList<Book> oldValue = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\titems.add(index, book);\r\n\t\tfirePropertyChange(\"books\", oldValue, items);\r\n\t\tfirePropertyChange(\"itemsCount\", oldValue.size(), items.size());\r\n\t}", "public boolean bookSave(Book book) {\n\t\t\r\n\t\treturn true;\r\n\t}", "@RequestMapping(value=\"/book\",method=RequestMethod.POST)\n\tpublic @ResponseBody ResponseEntity<Books> createBooks(@RequestBody Books bookDetails) throws Exception{\n\t\tBooks book=null;\n\t\t\n\t\t//for checking duplicate entry of books\n\t\tbook=booksDAO.findOne(bookDetails.getIsbn());\n\t\tif(book==null){\n\t\t\t//create a new book entry \n\t\t\ttry{\n\t\t\t\tbook=new Books(bookDetails.getBookName(),bookDetails.getBookDescription(),bookDetails.getPrice(),bookDetails.getIsActive(),new Date(),new Date());\n\t\t\t\tbooksDAO.save(book);\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\tthrow new Exception(\"Exception in saving book details...\",e);\n\t\t\t\t}\n\t\t}else{\n\t\t\t bookDetails.setCreationTime(book.getCreationTime());\n\t\t\t bookDetails.setLastModifiedTime(new Date());\n\t\t\t booksDAO.save(bookDetails);\n\t\t}\n\t\t\treturn new ResponseEntity<Books>(book, HttpStatus.OK);\n\t}", "public void addBookToBooks(Book book) {\n\t\tcustomerBooks.add(book);\n\t}", "public void doCreateItem() {\r\n\t\tlogger.info(\"Se procede a crear el book \" + newItem.getDescription());\r\n\t\tBook entity = newItem.getEntity();\r\n\t\tentity.setUser(Global.activeUser());\r\n\t\tentity.setBookBalance(BigDecimal.ZERO);\r\n\t\tentity.setTotalBudget(BigDecimal.ZERO);\r\n\t\tentity.setTotalIncome(BigDecimal.ZERO);\r\n\t\tentity.setTotalExpenses(BigDecimal.ZERO);\r\n\t\tentity = bookService.create(entity);\r\n\r\n\t\t// Actualizar el mapa de books\r\n\t\tGlobalBook.instance().put(new BookData(entity));\r\n\r\n\t\tlogger.info(\"Se ha creado el book \" + newItem.getDescription());\r\n\t\tnewItem = new BookData(new Book());\r\n\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO, \"Libro creado\", \"Libro creado correctamente\"));\r\n\t}", "@Override\n\tpublic void add(BookInfoVO vo) {\n\t\tbookInfoDao.add(vo);\n\t}", "String insertSelective(BookDO record);", "public void addBooking(Bookings b) {\n IController<Bookings> ic = new Controller<>();\n\n // Check whether the booking conflicts with another booking.\n for (Bookings booking : ic.readAll(Bookings.class)) {\n if (b.conflictsWith(booking)) {\n throw new IllegalArgumentException(\"That booking conflicts with another booking.\");\n }\n }\n\n Modules relatedModule = b.getModule();\n\n // Check whether the room is available at the given time.\n if (!b.getRooms().isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"That room is unavailable at this time.\");\n }\n // Check whether the students are available at that time.\n for (Students student : relatedModule.getStudents()) {\n if (!student.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A student is unavailable at this time.\");\n }\n }\n // Check whether the staff members are available at that time.\n for (Staff staff : relatedModule.getStaff()) {\n if (!staff.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A staff member is unavailable at this time.\");\n }\n }\n\n // Put the booking into the database.\n ic.create(b);\n System.out.println(b.confirmation() + \"\\n\");\n }" ]
[ "0.80073285", "0.79212177", "0.76343095", "0.761304", "0.75121146", "0.75117874", "0.74317884", "0.74057305", "0.7394905", "0.73484874", "0.7336845", "0.73074424", "0.7265185", "0.7210624", "0.71984506", "0.7163489", "0.7146822", "0.71194255", "0.7098487", "0.7080618", "0.7068671", "0.70458025", "0.70410776", "0.7038696", "0.70056033", "0.6978522", "0.69761676", "0.6971084", "0.69425726", "0.6937542", "0.6937542", "0.6932335", "0.6890526", "0.68558365", "0.68103874", "0.6794646", "0.67530423", "0.67508185", "0.67466563", "0.67460376", "0.6738448", "0.6737597", "0.6723981", "0.6710559", "0.66867834", "0.66747195", "0.66731715", "0.66598946", "0.66563374", "0.66350687", "0.66294897", "0.66199726", "0.6615642", "0.6609564", "0.65894294", "0.6587137", "0.65775055", "0.65685433", "0.65615106", "0.6544996", "0.64901483", "0.6479373", "0.6478504", "0.6465779", "0.6455869", "0.6427499", "0.6420671", "0.6388975", "0.6385926", "0.6377268", "0.6374498", "0.6346028", "0.63201284", "0.6315228", "0.63105714", "0.6306436", "0.62979287", "0.629199", "0.62867254", "0.6286452", "0.62821156", "0.6269604", "0.62593853", "0.6251105", "0.62444216", "0.62414604", "0.6216847", "0.6209544", "0.6201701", "0.6186504", "0.61629504", "0.6151825", "0.6150927", "0.61484027", "0.61450315", "0.6141907", "0.61365604", "0.61159736", "0.61142695", "0.6105594" ]
0.73114675
11
Update book details in the database
public static void updateBook(Book book) throws HibernateException{ session=sessionFactory.openSession(); session.beginTransaction(); //Update detail of the book to the database session.update(book); session.getTransaction().commit(); session.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void updatebook(BookDto book) {\n\t\tsqlSession.update(ns + \"updatebook\", book);\r\n\t}", "@Override\r\n\tpublic Book updateBook(Book book) {\n\t\treturn bd.save(book);\r\n\t}", "public boolean updateBook(Books books){\n String sql=\"update Book set book_name=?,book_publish_date=?,book_author=?,book_price=?,scraption=? where id=?\";\n boolean flag=dao.exeucteUpdate(sql,new Object[]{books.getBook_name(),books.getBook_publish_date(),\n books.getBook_author_name(),books.getBook_price(),books.getScraption(),books.getId()});\n return flag;\n }", "@Override\r\n\tpublic int updateBookInfo(Book book, int book_id) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void updateBookData() {\n\t\tList<Book> bookList = dao.findByHql(\"from Book where bookId > 1717\",null);\n\t\tString bookSnNumber = \"\";\n\t\tfor(Book book:bookList){\n\t\t\tfor (int i = 1; i <= book.getLeftAmount(); i++) {\n\t\t\t\t// 添加图书成功后,根据ISBN和图书数量自动生成每本图书SN号\n\t\t\t\tBookSn bookSn = new BookSn();\n\t\t\t\t// 每本书的bookSn号根据书的ISBN号和数量自动生成,\n\t\t\t\t// 如书的ISBN是123,数量是3,则每本书的bookSn分别是:123-1,123-2,123-3\n\t\t\t\tbookSnNumber = \"-\" + i;//book.getIsbn() + \"-\" + i;\n\t\t\t\tbookSn.setBookId(book.getBookId());\n\t\t\t\tbookSn.setBookSN(bookSnNumber);\n\t\t\t\t// 默认书的状态是0表示未借出\n\t\t\t\tbookSn.setStatus(new Short((short) 0));\n\t\t\t\t// 添加bookSn信息\n\t\t\t\tbookSnDao.save(bookSn);\n\t\t\t}\n\t\t}\n\t}", "int updateByPrimaryKey(BookInfo record);", "private void updateBook(){\n String dateStarted = ((EditText)dialogView.findViewById(R.id.input_date_started_reading))\n .getText().toString();\n book.setDateStarted(dateStarted);\n\n String dateCompleted = ((EditText)dialogView.findViewById(R.id.input_date_completed))\n .getText().toString();\n book.setDateCompleted(dateCompleted);\n\n //update the book\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\n mDatabase.child(\"books\").child(book.getId()).setValue(book);\n\n //hide dialog\n dismiss();\n }", "public boolean updateBookRecord(Connection con, Book book) {\n try {\n String updateRecord = \"UPDATE tblBooks SET book_title = ?, book_author = ?, book_released = ?, book_blurb = ?, book_cover = ? WHERE book_id = ?\";\n PreparedStatement prepStatement = con.prepareStatement(updateRecord);\n //The below statements must be in the correct order as the SQL statement referes ot it to getBooktitle etc\n prepStatement.setString(1, book.getBookTitle());\n prepStatement.setString(2, book.getBookAuthor());\n prepStatement.setString(3, book.getBookYear());\n prepStatement.setString(4, book.getBookBlurb());\n prepStatement.setString(5, book.getCoverURL());\n prepStatement.setInt(6, book.getBookID());\n\n prepStatement.executeUpdate();\n prepStatement.close();\n } catch (Exception ex) {\n System.out.println(ex.getClass());\n ex.printStackTrace();\n return false;\n } finally {\n try {\n con.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return true;\n }", "public void update(int bookId, int quantity){ \n JSONObject jbook = dbmanager.getBmanager().readJSON(bookId);\n dbmanager.getBmanager().delete(bookId);\n jbook.remove(\"quantity\");\n jbook.put(\"quantity\", Integer.toString(quantity));\n dbmanager.open();\n dbmanager.createCommit(getNextBookId(),jbook);\n dbmanager.close();\n \n }", "int updateByPrimaryKey(Book record);", "int updateByPrimaryKey(Book record);", "@PutMapping(\"/books/{id}\")\n\tpublic ResponseEntity<Book> updateBook(@PathVariable Long id,@RequestBody Book bookDetails)\n\t{\n\t\tBook book = bookRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Book Not found with id\" + id));\n\t\tbook.setTitle(bookDetails.getTitle());\n\t\tbook.setAuthors(bookDetails.getAuthors());\n\t\tbook.setYear(bookDetails.getYear());\n\t\tbook.setPrice(bookDetails.getPrice());\n\t\t\n\t\tBook updatedBook = bookRepository.save(book);\n\t\treturn ResponseEntity.ok(updatedBook);\n\t}", "@Override\n public void update(BookUpdateViewModel viewModel) {\n Book bookDb = repository.findById(viewModel.getId())\n .orElseThrow(RecordNotFoundException::new);\n\n\n // check the validity of the fields\n if (viewModel.getTitle().strip().length() < 5) {\n throw new DomainValidationException();\n }\n\n // apply the update\n BeanUtils.copyProperties(viewModel, bookDb);\n\n // save and flush\n repository.saveAndFlush(bookDb);\n }", "int updateByPrimaryKey(BookDO record);", "public Book updateBook(Long id, Book book) {\n return this.sRepo.save(book);\n\n\t}", "int updateByPrimaryKey(CmsRoomBook record);", "@PutMapping(\"/book\")\n public ResponseEntity<?> update(@RequestBody Book book) {\n bookService.update(book);\n\n return ResponseEntity.ok().body(\"Book has been updated successfully.\");\n }", "private void rSButton8ActionPerformed(java.awt.event.ActionEvent evt) {\n try{\n String val1=jtext15.getText();\n String val2=jtext16.getText();\n String val3;\n val3 = (String) jComboBox4.getSelectedItem();\n String val4=jtext17.getText();\n String val5=jtext18.getText();\n String val6=jtext19.getText();\n String val7=jtext20.getText();\n String val8=jtext21.getText();\n \n String sql=\"update book set book_title='\"+val2+\"',category='\"+val3+\"',author_name='\"+val4+\"',publication='\"+val5+\"',edition='\"+val6+\"',pages='\"+val7+\"',price='\"+val8+\"' where book_id='\"+val1+\"'\";\n pst=(OraclePreparedStatement) conn.prepareStatement(sql);\n pst.execute();\n JOptionPane.showMessageDialog(null,\"Book Details Modified\"); \n refresh3();\n update1();\n }catch(Exception e)\n {\n JOptionPane.showMessageDialog(null,e); \n }\n }", "@Override\r\n\tpublic Book update(Book book) {\r\n\t\treturn null;\r\n\t}", "void update(Book book);", "@Override\r\n\tpublic boolean updateByBookId(Book book) {\n\t\tboolean flag=false;\r\n\t\tString sql=\"update books set title=?,author=?,publisherId=?,publishDate=?,isbn=?,wordsCount=?,unitPrice=?,contentDescription=?,aurhorDescription=?,editorComment=?,TOC=?,categoryId=?,booksImages=?,quantity=?,address=?,baoyou=? \"\r\n\t\t\t\t+ \"where id=?\";\r\n\t\tList<Object> list=new ArrayList<Object>();\r\n\t\tif(book!=null){\r\n\t\t\tlist.add(book.getTitle());\r\n\t\t\tlist.add(book.getAuthor());\r\n\t\t\tlist.add(book.getPublisherId());\r\n\t\t\tlist.add(book.getPublishDate());\r\n\t\t\tlist.add(book.getIsbn());\r\n\t\t\tlist.add(book.getWordsCount());\r\n\t\t\tlist.add(book.getUnitPrice());\r\n\t\t\tlist.add(book.getContentDescription());\r\n\t\t\tlist.add(book.getAurhorDescription());\r\n\t\t\tlist.add(book.getEditorComment());\r\n\t\t\tlist.add(book.getTOC());\r\n\t\t\tlist.add(book.getCategoryId());\r\n\t\t\t\r\n\t\t\tlist.add(book.getBooksImages());\r\n\t\t\tlist.add(book.getQuantity());\r\n\t\t\t\r\n\t\t\tlist.add(book.getAddress());\r\n\t\t\tif(book.getBaoyou()==\"0\"){\r\n\t\t\t\tbook.setBaoyou(\"不包邮\");\r\n\t\t\t}else{\r\n\t\t\t\tbook.setBaoyou(\"包邮\");\r\n\t\t\t}\r\n\t\t\tlist.add(book.getBaoyou());\r\n\t\t\tlist.add(book.getId());\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint update = runner.update(sql, list.toArray());\r\n\t\t\tif(update>0){\r\n\t\t\t\tflag=true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn flag;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "int updateByPrimaryKey(IntegralBook record);", "@PutMapping(\"/update/{id}\")\n public ResponseEntity<Void> updateBook(@RequestBody Book book,\n @PathVariable(\"id\") Long id) throws BookNotFoundException {\n bookService.updateBook(book, id);\n\n return ResponseEntity.status(HttpStatus.OK).build();\n }", "public void update(BibliographicDetails bibDetails) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n tx = session.beginTransaction();\n session.update(bibDetails);\n tx.commit();\n } catch (RuntimeException e) {\n \n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }", "@RequestMapping(value=\"/api/books/{id}\", method=RequestMethod.PUT)\n\t public Book update(@ModelAttribute(\"Book\") Book books, @PathVariable(\"id\") Long id, @RequestParam(value=\"title\") String title, @RequestParam(value=\"description\") String desc, @RequestParam(value=\"language\") String lang, @RequestParam(value=\"pages\") Integer numberOfPages) {\n\t Book book = bookService.findBook(id);\n\t book.setTitle(title);\n\t book.setDescription(desc);\n\t book.setNumberOfPages(numberOfPages);\n\t return book;\n\t }", "@Override\n\tpublic BookModel update(BookModel updateBook) {\n\t\tCategoryModel category = categoryDao.findByCode(updateBook.getCategoryCode());\n\t\tupdateBook.setCategoryId(category.getId());\n\t\tbookDao.update(updateBook);\n\t\treturn bookDao.findOne(updateBook.getId());\n\t}", "public void update(Book entity)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSessionwithTransation();\r\n\t\t\tbookdao.update(entity);\r\n\t\t\tbookdao.closeSessionwithTransaction();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public book edit(book editedbook) {\n\t\t\n\t\treturn repository.save(editedbook);\n\t}", "private void updateAdmin(String book_email ,String book_title,String book_phone) {\n if (!TextUtils.isEmpty(book_email))\n mFirebaseDatabase.child(bookId).child(\"book_email\").setValue(book_email);\n if (!TextUtils.isEmpty(book_title))\n mFirebaseDatabase.child(bookId).child(\"book_title\").setValue(book_title);\n if (!TextUtils.isEmpty(book_phone))\n mFirebaseDatabase.child(bookId).child(\"book_phone\").setValue(book_phone);\n }", "@Override\n\tpublic int editBook(bookInfo bookinfo) {\n\t\treturn 0;\n\t}", "@GetMapping(\"/update\")\n\tpublic String updateBook(Map<String, Object> map, @ModelAttribute(\"bookCmd\") Book book, HttpServletRequest req) {\n\n\t\tList<BookModel> listmodel = null;\n\t\tBookModel model = null;\n\n\t\t// create model class object\n\t\tmodel = new BookModel();\n\t\t// use service\n\t\tmodel = service.findById(Integer.parseInt(req.getParameter(\"bookid\")));\n\n\t\t// copy model class to command class\n\t\tBeanUtils.copyProperties(model, book);\n\n\t\t// use service\n\t\tlistmodel = service.findAllBookDetails();\n\t\t\n\t\t//map \n\t\tmap.put(\"listmodel\", listmodel);\n\t\tmap.put(\"book\", book);\n\t\tSystem.out.println(book);\n\t\treturn \"register\";\n\n\t}", "public void updateAcc(DocumentDetails bibDetails) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n tx = session.beginTransaction();\n session.update(bibDetails);\n tx.commit();\n } catch (RuntimeException e) {\n\n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }", "void update(EmployeeDetail detail) throws DBException;", "int updateByPrimaryKeySelective(BookInfo record);", "private void updateBook(final Properties bookData){\n\t\tnew SwingWorker<Boolean, Void>() {\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() {\n\t\t\t\tJDBCBroker.getInstance().startTransaction();\n\t\t\t\tif(book.isLost()){\n\t\t\t\t\tBorrower borrower = book.getBorrowerThatLost();\n\t\t\t\t\tif(borrower == null || !borrower.subtractMonetaryPenaltyForLostBook(book)){\n\t\t\t\t\t\tJDBCBroker.getInstance().rollbackTransaction();\n\t\t\t\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.ERROR, \"Whoops! An error occurred while saving.\"));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbookData.setProperty(\"Status\", \"Active\");\n\t\t\t\tbook.stateChangeRequest(bookData);\n\t\t\t\treturn book.save();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void done() {\n\t\t\t\tboolean success = false;\n\t\t\t\ttry {\n\t\t\t\t\tsuccess = get();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tsuccess = false;\n\t\t\t\t} catch (ExecutionException e) {\n\t\t\t\t\tsuccess = false;\n\t\t\t\t}\n\t\t\t\tif(success){\n\t\t\t\t\tJDBCBroker.getInstance().commitTransaction();\n\t\t\t\t\tstateChangeRequest(Key.BACK, \"ListBooksView\");\n\t\t\t\t\tlistBooksTransaction.stateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.SUCCESS, \"Well done! The book was sucessfully saved.\"));\n\t\t\t\t}else{\n\t\t\t\t\tJDBCBroker.getInstance().rollbackTransaction();\n\t\t\t\t\tList<String> inputErrors = book.getErrors();\n\t\t\t\t\tif(inputErrors.size() > 0){\n\t\t\t\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.ERROR, \"Aw shucks! There are errors in the input. Please try again.\", inputErrors));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.ERROR, \"Whoops! An error occurred while saving.\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}.execute();\n\t}", "public void delete(Book book){\n try{\n String query = \"DELETE FROM testdb.book WHERE id=\" + book.getId();\n DbConnection.update(query);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "@Override\n\tpublic Book update(Book dto) {\n\t\treturn null;\n\t}", "int updateByPrimaryKeySelective(CmsRoomBook record);", "int updateByPrimaryKeySelective(Book record);", "int updateByPrimaryKeySelective(Book record);", "public static void update( EntityManager em, UserTransaction ut, String isbn,\n String title, int year) throws Exception {\n ut.begin();\n Book book = em.find( Book.class, isbn);\n if ( title != null && !title.equals( book.title)) {\n book.setTitle( title);\n }\n if ( year != book.year) {\n book.setYear( year);\n }\n ut.commit();\n System.out.println( \"Book.update: the book \" + book + \" was updated.\");\n }", "private void update(){\n if(!((EditText)findViewById(R.id.bookTitle)).getText().toString().trim().isEmpty()){\n if(!appData.getCurrentBookId().isEmpty()){\n mRealm.executeTransactionAsync(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n BookInfo mBookInfo= realm.where(BookInfo.class).equalTo(\"mBookId\",\n appData.getCurrentBookId()).findFirst();\n mBookInfo.setBookTitle(((EditText) findViewById(R.id.bookTitle))\n .getText().toString());\n mBookInfo.setAuthorsNames(((EditText) findViewById(R.id.bookAuthor))\n .getText().toString());\n mBookInfo.setGenre(mSelectedGenre.get(\"position\"));\n }\n });\n Intent main = new Intent(this,BookListActivity.class);\n startActivity(main);\n finish();\n }else{\n\n mRealm.executeTransactionAsync(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n\n BookInfo mBookInfo = realm.createObject(BookInfo.class,\n UUID.randomUUID().toString());\n mBookInfo.setBookTitle(((EditText) findViewById(R.id.bookTitle))\n .getText().toString());\n mBookInfo.setAuthorsNames(((EditText) findViewById(R.id.bookAuthor))\n .getText().toString());\n mBookInfo.setGenre(mSelectedGenre.get(\"position\"));\n }\n });\n Intent main = new Intent(this,BookListActivity.class);\n startActivity(main);\n finish();\n\n }\n }else{\n new AlertDialog.Builder(EditOrAddBookActivity.this)\n .setTitle(\"No Book Title\")\n .setMessage(\"You must at the very least have a book title\")\n .setCancelable(false)\n .setPositiveButton(\"ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // Whatever...\n }\n }).show();\n }\n }", "public boolean addBook(Books books){\n String sql=\"insert into Book(book_name,book_publish_date,book_author,book_price,scraption)values(?,?,?,?,?)\";\n boolean flag=dao.exeucteUpdate(sql,new Object[]{books.getBook_name(),books.getBook_publish_date(),\n books.getBook_author_name(),books.getBook_price(),books.getScraption()});\n return flag;\n }", "private void updateDB() {\n }", "int updateByPrimaryKeySelective(BookDO record);", "int updateByPrimaryKeyWithBLOBs(BookInfo record);", "public void updateBooks(String oldIsbn, String newIsbn, String title) {\n\t\ttry (PreparedStatement stmt = LibraryConnection\n\t\t\t\t.getConnection()\n\t\t\t\t.prepareStatement(\"UPDATE book SET isbn=?,title=? WHERE isbn=?\")) {\n\t\t\tstmt.setString(1, newIsbn);\n\t\t\tstmt.setString(2, title);\n\t\t\tstmt.setString(3, oldIsbn);\n\t\t\t// System.out.println(query);\n\t\t\tstmt.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void updateCopies() throws SQLException {\r\n\t\tSystem.out.println(\"Branch: \" + selectedBranch.getName());\r\n\t\tSystem.out.println(\"Book: \" + selectedBook.getName());\r\n\r\n\t\t// distinguish between: the entry exists & is zero, or the entry doesn't exist\r\n\t\tBookCopies bc = libServ.readCopiesByIds(selectedBook.getId(), selectedBranch.getId());\r\n\t\tString numCopiesStr = (bc != null) ? String.valueOf(bc.getNoOfCopies()) : \"None\";\r\n\t\tSystem.out.println(\"Existing number of copies: \" + numCopiesStr + endl);\r\n\r\n\t\tint copies = readInt(\"Enter new number of copies:\");\r\n\t\tif (copies == -1)\r\n\t\t\treturn;\r\n\r\n\t\t// update the db entry\r\n\t\tif (bc != null)\r\n\t\t\tlibServ.updateCopies(selectedBook.getId(), selectedBranch.getId(), copies);\r\n\t\telse\r\n\t\t\tlibServ.createCopies(selectedBook.getId(), selectedBranch.getId(), copies);\r\n\t}", "private void saveBook() {\n // Read the data from the fields\n String productName = productNameEditText.getText().toString().trim();\n String price = priceEditText.getText().toString().trim();\n String quantity = Integer.toString(bookQuantity);\n String supplierName = supplierNameEditText.getText().toString().trim();\n String supplierPhone = supplierPhoneEditText.getText().toString().trim();\n\n // Check if any fields are empty, throw error message and return early if so\n if (productName.isEmpty() || price.isEmpty() ||\n quantity.isEmpty() || supplierName.isEmpty() ||\n supplierPhone.isEmpty()) {\n Toast.makeText(this, R.string.editor_activity_empty_message, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Format the price so it has 2 decimal places\n String priceFormatted = String.format(java.util.Locale.getDefault(), \"%.2f\", Float.parseFloat(price));\n\n // Create the ContentValue object and put the information in it\n ContentValues contentValues = new ContentValues();\n contentValues.put(BookEntry.COLUMN_BOOK_PRODUCT_NAME, productName);\n contentValues.put(BookEntry.COLUMN_BOOK_PRICE, priceFormatted);\n contentValues.put(BookEntry.COLUMN_BOOK_QUANTITY, quantity);\n contentValues.put(BookEntry.COLUMN_BOOK_SUPPLIER_NAME, supplierName);\n contentValues.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER, supplierPhone);\n\n // Save the book data\n if (currentBookUri == null) {\n // New book, so insert into the database\n Uri newUri = getContentResolver().insert(BookEntry.CONTENT_URI, contentValues);\n\n // Show toast if successful or not\n if (newUri == null)\n Toast.makeText(this, getString(R.string.editor_insert_book_failed), Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, getString(R.string.editor_insert_book_successful), Toast.LENGTH_SHORT).show();\n } else {\n // Existing book, so save changes\n int rowsAffected = getContentResolver().update(currentBookUri, contentValues, null, null);\n\n // Show toast if successful or not\n if (rowsAffected == 0)\n Toast.makeText(this, getString(R.string.editor_update_book_failed), Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, getString(R.string.editor_update_book_successful), Toast.LENGTH_SHORT).show();\n\n }\n\n finish();\n }", "public void updateBook(View view){\n update();\n }", "public void updatedata()throws ClassNotFoundException,SQLException {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tStatement smt=(Statement) con.getConnection().createStatement();\r\n\t\tSystem.out.println(\"Enter Id:\");\r\n\t\tint rollno=s.nextInt();\r\n\t\tSystem.out.println(\"Enter new name:\");\r\n\t\tString name=s.next();\r\n\t\t//System.out.println(\"Enter new year:\");\r\n\t\t//String year=s.next();\r\n\t\t//System.out.println(\"Enter new Department:\");\r\n\t\t//String dep=s.next();\r\n\t\tPreparedStatement ps=con.getConnection().prepareStatement(\"update student set Name=? where RollNo=?\");\r\n\t\tps.setString(1, name);\r\n\t\tps.setInt(2, rollno);\r\n\t\tps.executeUpdate();\r\n\t\tSystem.out.println(\"Successfully Updated...\");\r\n\t}", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "@Override\n public Optional<BookDto> updateBook(Integer bookId, BookDto bookDto) {\n try {\n Optional<BookEntity> bookEntity = bookRepository.findByBookId(bookId);\n if (bookEntity.isPresent()) {\n BookEntity updatedBookEntity = bookRepository.save(new BookEntity(bookId,\n bookDto.getBookName(), bookDto.getBookAuthor()));\n LogUtils.getInfoLogger().info(\"Book Updated: {}\", updatedBookEntity.toString());\n return Optional.of(bookDtoBookEntityMapper.bookEntityToBookDto(updatedBookEntity));\n } else {\n LogUtils.getInfoLogger().info(\"Book Not updated\");\n return Optional.empty();\n }\n }catch (Exception exception){\n throw new BookException(exception.getMessage());\n }\n }", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "public void update(TdiaryArticle obj) throws SQLException {\n\r\n\t}", "public void editHouse() {\n System.out.println(\"-----Update House-----\");\n System.out.println(\"enter id(-1 cancel): \");\n int updateId = Utility.readInt();\n if (updateId == -1) {\n System.out.println(\"cancel update program\");\n return;\n }\n House h = houseService.searchHouse(updateId);\n if(h == null) {\n System.out.println(\"no house you needed found\");\n return;\n }\n //update owner name\n System.out.print(\"owner = \" + h.getOwner() + \": \");\n String owner = Utility.readString(10, \"\");\n if(!\"\".equals(owner)) {\n h.setOwner(owner);\n }\n\n //update phone\n System.out.print(\"phone = \" + h.getPhone() + \": \");\n String phone = Utility.readString(10, \"\");\n if(!\"\".equals(phone)) {\n h.setPhone(phone);\n }\n\n //update address\n System.out.print(\"address = \" + h.getAddress() + \": \");\n String address = Utility.readString(20, \"\");\n if(!\"\".equals(address)) {\n h.setAddress(address);\n }\n\n //update rent\n System.out.print(\"rent = \" + h.getRent() + \": \");\n int rent = Utility.readInt(-1);\n if(! (-1 == rent)) {\n h.setRent(rent);\n }\n\n //update state\n System.out.print(\"state = \" + h.getState() + \": \");\n String state = Utility.readString(10, \"\");\n if(!\"\".equals(state)) {\n h.setState(state);\n }\n\n System.out.println(\"update successful\");\n }", "int updateByExample(@Param(\"record\") Book record,\n @Param(\"example\") BookExample example);", "public Bookings saveBookingDetails(Bookings bookings) ;", "int updateByPrimaryKeySelective(IntegralBook record);", "public void update1(DocumentDetails docDetails) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n tx = session.beginTransaction();\n session.update(docDetails);\n tx.commit();\n } catch (RuntimeException e) {\n \n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }", "public void doUpdateTable() {\r\n\t\tlogger.info(\"Actualizando tabla books\");\r\n\t\tlazyModel = new LazyBookDataModel();\r\n\t}", "int updateByPrimaryKey(AuthorDO record);", "@Override\n\tpublic int updateBookshelfinfo(BookshelfinfoEntity bookshelfinfoEntity) {\n\t\treturn this.sqlSessionTemplate.update(\"bookshelfinfo.update\", bookshelfinfoEntity);\n\t}", "@Override\n\tpublic void modify(BookInfoVO vo) {\n\t\tbookInfoDao.modify(vo);\n\t}", "public void issueBook() {\n\t\t JTextField callno = new JTextField();\r\n\t\t JTextField name = new JTextField();\r\n\t\t JTextField id = new JTextField(); \r\n\t\t JTextField contact = new JTextField(); \r\n\t\t Object[] issued = {\r\n\t\t\t\t \"Bookcallno:\",callno,\r\n\t\t\t\t \"Student ID:\",id,\r\n\t\t\t\t \"Name:\",name,\r\n\t\t\t\t \"Contact:\",contact\r\n\t\t\t\t\r\n\t\t };\r\n\t\t int option = JOptionPane.showConfirmDialog(null, issued, \"New issued book\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\t if(option==JOptionPane.OK_OPTION) {\r\n\t\t\tint check = checkBook(callno.getText());\r\n\t\t\tif(check==-1) {\r\n\t\t\t\t JOptionPane.showMessageDialog(null, \"Wrong book call number\", null, JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t return;\r\n\t\t\t}\r\n\t\t\telse if(check == 0) {\r\n\t\t\t\t JOptionPane.showMessageDialog(null, \"Book is not available right now\", null, JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t return;\r\n\t\t\t}\r\n // add to the Book database\r\n\t\t try {\r\n\t\t\t \r\n\t\t String query = \"insert into Issued(bookcallno,studentId,studentName,studentContact,issued_date)\"\r\n\t\t\t\t +\" values(?,?,?,?,GETDATE())\";\r\n\t\t \r\n\t\t PreparedStatement s = SimpleLibraryMangement.connector.prepareStatement(query);\r\n\t\t s.setString(1, callno.getText());\r\n\t\t s.setInt(2, Integer.parseInt(id.getText()));\r\n\t\t s.setString(3, name.getText());\r\n\t\t s.setString(4, contact.getText());\r\n\t\t \r\n\t\t s.executeUpdate();\r\n\t\t updateIssuedBook(callno.getText());\r\n\t\t JOptionPane.showMessageDialog(null, \"Issue book successfully\", null, JOptionPane.INFORMATION_MESSAGE);\r\n\r\n\t\t } catch(Exception e) {\r\n\t\t\t JOptionPane.showMessageDialog(null, \"Issue book failed\", null, JOptionPane.ERROR_MESSAGE);\r\n\t\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t } \r\n\t }", "public void update(BookLoans bookLoans) throws SQLException, ClassNotFoundException {\n\t}", "boolean updateAuthor(Author author) throws PersistenceException, IllegalArgumentException;", "int updateByPrimaryKey(ExamRoom record);", "public void setBook(Book book) {\n this.book = book;\n }", "public void updateBid(Bid b) {\r\n this.edit(b);\r\n }", "int updateByPrimaryKey(SrHotelRoomInfo record);", "int update(Purchase purchase) throws SQLException, DAOException;", "public void updateCatalog(BibliographicDetails bibDetails,AccessionRegister acc,DocumentDetails doc) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n tx = session.beginTransaction();\n session.update(bibDetails);\n session.update(acc);\n session.update(doc);\n tx.commit();\n } catch (RuntimeException e) {\n\n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }", "@Override\r\n\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\n\t\t\t\ttry {\r\n\t\t\t\r\n\t\t\t\t\t\tint rows = bookDAO.updateBook(ISBN, price);\r\n\t\t\t\t\t\tif (rows > 0)\r\n\t\t\t\t\t\t\treturn true;\r\n\r\n\t\t\t\t} catch (Exception exception) {\r\n\t\t\t\t\tstatus.setRollbackOnly();\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t}", "public static void AddBooking(Booking booking){\n \n \n try (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM booking\")){\n \n resultSet.moveToInsertRow();\n resultSet.updateInt(\"BookingNumber\", booking.getBookingNumber());\n resultSet.updateString(\"FlightNumber\", booking.getFlightNumber());\n resultSet.updateDouble(\"Price\", booking.getPrice());\n resultSet.updateString(\"CabinClass\", booking.getCabinClass());\n resultSet.updateInt(\"Quantity\", booking.getQuantity());\n resultSet.updateInt(\"Insurance\", booking.getInsurance());\n resultSet.insertRow();\n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n \n \n \n }", "@RequestMapping(\"/update\")\n\tpublic Booking update(@RequestParam Long bookingId, @RequestParam String psngrName) {\n\t\tBooking booking = bookingRepository.findOne(bookingId);\n\t\tbooking.setPsngrName(psngrName);\n\t\tbooking = bookingRepository.save(booking);\n\t return booking;\n\t}", "public boolean bookSave(Book book) {\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean updateBook(long ISBN, int price) {\n\t\tif (searchBook(ISBN).getISBN() == ISBN) {\r\n\t\t\ttransactionTemplate.setReadOnly(false);\r\n\t\treturn transactionTemplate.execute(new TransactionCallback<Boolean>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttry {\r\n\t\t\t\r\n\t\t\t\t\t\tint rows = bookDAO.updateBook(ISBN, price);\r\n\t\t\t\t\t\tif (rows > 0)\r\n\t\t\t\t\t\t\treturn true;\r\n\r\n\t\t\t\t} catch (Exception exception) {\r\n\t\t\t\t\tstatus.setRollbackOnly();\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public int Editcomp(Long comp_id, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String e_mail) throws SQLException {\nint i =DbConnect.getStatement().executeUpdate(\"update company set address='\"+address+\"',city='\"+city+\"',state='\"+state+\"',offno=\"+offno+\",faxno=\"+faxno+\",website='\"+website+\"',email='\"+e_mail+\"'where comp_id=\"+comp_id+\" \");\r\n\treturn i;\r\n}", "public void bind(final Book book) {\n final long id = book.getId();\n\n textTitle.setText(book.getTitle());\n textAuthor.setText(book.getAuthor());\n textDescription.setText(book.getDescription());\n\n // load the background image\n if (book.getImageUrl() != null) {\n Glide.with(context)\n .load(book.getImageUrl())\n .fitCenter()\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(imageBackground);\n }\n\n //remove single match from realm\n card.setOnLongClickListener(new View.OnLongClickListener() {\n @Override\n public boolean onLongClick(View v) {\n booksPresenter.deleteBookById(id);\n return false;\n }\n });\n\n //update single match from realm\n card.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n booksPresenter.showEditDialog(book);\n }\n });\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "private void saveBook() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String productName = etTitle.getText().toString().trim();\n String author = etAuthor.getText().toString().trim();\n String price = etPrice.getText().toString().trim();\n String quantity = etEditQuantity.getText().toString().trim();\n String supplier = etSupplier.getText().toString().trim();\n String supplierPhoneNumber = etPhoneNumber.getText().toString().trim();\n\n // If this is a new book and all of the fields are blank.\n if (currentBookUri == null &&\n TextUtils.isEmpty(productName) && TextUtils.isEmpty(author) &&\n TextUtils.isEmpty(price) && quantity.equals(getString(R.string.zero)) &&\n TextUtils.isEmpty(supplier) && TextUtils.isEmpty(supplierPhoneNumber)) {\n // Exit the activity without saving a new book.\n finish();\n return;\n }\n\n // Make sure the book title is entered.\n if (TextUtils.isEmpty(productName)) {\n Toast.makeText(this, R.string.enter_title, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the author is entered.\n if (TextUtils.isEmpty(author)) {\n Toast.makeText(this, R.string.enter_author, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the price is entered.\n if (TextUtils.isEmpty(price)) {\n Toast.makeText(this, R.string.enter_price, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the quantity is entered if it is a new book.\n // Can be zero when editing book, in case the book is out of stock and user wants to change\n // other information, but hasn't received any new inventory yet.\n if (currentBookUri == null && (quantity.equals(getString(R.string.zero)) ||\n quantity.equals(\"\"))) {\n Toast.makeText(this, R.string.enter_quantity, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the supplier is entered.\n if (TextUtils.isEmpty(supplier)) {\n Toast.makeText(this, R.string.enter_supplier, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the supplier's phone number is entered.\n if (TextUtils.isEmpty(supplierPhoneNumber)) {\n Toast.makeText(this, R.string.enter_suppliers_phone_number,\n Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Convert the price to a double.\n double bookPrice = Double.parseDouble(price);\n\n // Convert the quantity to an int, if there is a quantity entered, if not set it to zero.\n int bookQuantity = 0;\n if (!quantity.equals(\"\")) {\n bookQuantity = Integer.parseInt(quantity);\n }\n\n // Create a new map of values, where column names are the keys\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_PRODUCT_NAME, productName);\n values.put(BookEntry.COLUMN_BOOK_AUTHOR, author);\n values.put(BookEntry.COLUMN_BOOK_PRICE, bookPrice);\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, bookQuantity);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER, supplier);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER, supplierPhoneNumber);\n\n // Check if this is a new or existing book.\n if (currentBookUri == null) {\n // Insert a new book into the provider, returning the content URI for the new book.\n Uri newUri = getContentResolver().insert(BookEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the row ID is null, then there was an error with insertion.\n Toast.makeText(this, R.string.save_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful, display a toast.\n Toast.makeText(this, R.string.save_successful, Toast.LENGTH_SHORT).show();\n }\n } else {\n // Check to see if any updates were made if not, no need to update the database.\n if (!bookHasChanged) {\n // Exit the activity without updating the book.\n finish();\n } else {\n // Update the book.\n int rowsUpdated = getContentResolver().update(currentBookUri, values, null,\n null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsUpdated == 0) {\n // If no rows were updated, then there was an error with the update.\n Toast.makeText(this, R.string.update_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful, display a toast.\n Toast.makeText(this, R.string.update_successful,\n Toast.LENGTH_SHORT).show();\n }\n }\n }\n\n // Exit the activity, called here so the user can enter all of the required fields.\n finish();\n }", "@PUT\n @Path(\"{isbn}\")\n @Consumes(MediaType.APPLICATION_JSON)\n public Response updateBook(@PathParam(\"isbn\") String isbn, Book book) {\n //isbn in uri differs from isbn in book object. I do that because updateBook only gets a book object,\n //there's no possibility to check in service for the local var isbn because the json defined isbn is given to\n //the service\n if (!book.getIsbn().equals(\"\") && !isbn.equals(book.getIsbn())) {\n return Response.status(Response.Status.BAD_REQUEST)\n .entity(new JSONObject().put(\"Message\", \"Isbn differs from isbn specified in payload.\").toString())\n .build();\n }\n //no isbn in request json body\n else if (book.getIsbn().equals(\"\")) {\n book = new Book(book.getTitle(), book.getAuthor(), isbn);\n }\n\n //find and replace book object\n final BookServiceResult result = bookService.updateBook(book);\n return Response.status(result.getStatus().getStatusCode())\n .entity(getJsonFromServiceResult(result))\n .build();\n }", "int updateByPrimaryKey(Course record);", "int updateByPrimaryKey(Course record);", "public void updateBooking(String booking_id, String status) {\n\t\tString sql = \"update bookings set status = ? where booking_id =?\";\n\t\tObject args[]= {status, booking_id};\n\t\tjdbcTemplate.update(sql, args);\n\t\t\n\t}", "int updateByPrimaryKey(Goods record);", "int updateByPrimaryKey(Goods record);", "public book update(long id) {\n\t\treturn repository.findById(id).orElse(new book());\n\t\t\n\t}", "@Override\r\n\tpublic boolean updateBooking(Shift_IF shift, Booking_IF bk) {\r\n\t\tPreparedStatement myStatement = null;\r\n\t\tString query = null;\r\n\t\tint count = 0;\r\n\t\ttry{\r\n\t\t\tquery = \"update Booking set Shift_ID = ? where User_ID = ? AND Shift_ID = ?\";\r\n\t\t\tmyStatement = myCon.prepareStatement(query);\r\n\t\t\tmyStatement.setInt(1, bk.getShiftid());\r\n\t\t\tmyStatement.setInt(2, bk.getUserid());\r\n\t\t\tmyStatement.setInt(3, shift.getId());\r\n\t\t\tcount = myStatement.executeUpdate();\r\n\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\ttry {\r\n\t\t\t\tif (myStatement != null)\r\n\t\t\t\t\tmyStatement.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count!=1){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public Book save(Book book) {\n return bookRepository.save(book);\n }", "@Override\n\tpublic void update(String state,String id) {\n\t\tString query=\"UPDATE Book SET State='\"+state+\"' Where id='\"+id+\"'\";\n\t\texecuteQuery(query);\n\t\tnotifyAllObservers();\n\t\t\n\t}", "public void update() throws SQLException {\n DatabaseConnector.updateQuery(\"UPDATE course SET \"\n + \"courseDept='\" + this.courseDept + \"', \"\n + \"courseNum='\" + this.courseNum + \"', \"\n + \"courseName='\" + this.courseName + \"', \"\n + \"info='\" + this.info + \"', \"\n + \"credit=\" + this.credit);\n }", "int updateByPrimaryKey(BnesBrowsingHis record) throws SQLException;", "@Override\r\n\tpublic int updateCheckout(int userId, BookBean books) {\n\t\t return jdbcTemplate.update(\r\n\t \"insert into libtrx (userid,bookid,trx_date,trx_status) values(?,?,?,?);\"+\r\n\t \t\t\"update libbook set bookcount=(bookcount-1) where bookid=?;\",\r\n\t userId,books.getBookId(),LocalDate.now(),\"CO\",books.getBookId());\r\n\t\t \r\n\t}", "private void returnBookButtonMouseClicked(java.awt.event.MouseEvent evt) {\n if (checkList() == true) {\n if (checkReturn().equalsIgnoreCase(\"null\")) {\n try {\n String uQuery = \"update student set day_of_return='\"+ getReturnDateSTR() +\"', fee='\" + getFee() +\"' where book_id=\" + bookIDTextField.getText() + \" and rb_id=\" + studentIDField.getText();\n Connection conn = DBConnector.connectDB();\n PreparedStatement pst = conn.prepareStatement(uQuery);\n pst.execute();\n pst.close();\n System.out.println(\"Return Completed!\");\n\n Connection myConn = DBConnector.connectDB();\n String u2Query = \"update book set availability='Yes' where book_id=\" + bookIDTextField.getText() ;\n PreparedStatement mypststmt = myConn.prepareStatement(u2Query);\n mypststmt.execute();\n System.out.println(\"Update Completed!\");\n\n jLabel_overDue.setText(\"Over Due by \" + Long.toString(getDiffDays()) + \" day(s)\");\n jLabel_totalFee.setText(\"Total Fee: $\" + String.valueOf(getFee()));\n\n JOptionPane.showMessageDialog(null, \"Book Returned Successfully\");\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Book Already Returned\");\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Book ID or Student ID is Incorrect\");\n }\n }", "public boolean updateRatingByBookId (String newRate, int bookId)\n {\n String stmnt = String.format(\n \"UPDATE book \"\n + \"SET rating = %d \"\n + \"WHERE book_ID = %d\", newRate, bookId);\n\n //Test!\n System.out.println(\"Statement: \\n\" + stmnt);\n\n int result = executeUpdate(stmnt);\n\n if (result == -1) return false;\n else return true;\n\n }", "private void save(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tBook book = new Book();\r\n\t\tbook.setId(bookService.list().size()+1);\r\n\t\tbook.setBookname(request.getParameter(\"bookname\"));\r\n\t\tbook.setAuthor(request.getParameter(\"author\"));\r\n\t\tbook.setPrice(Float.parseFloat(request.getParameter(\"price\")));\r\n\t\tbookService.save(book);\r\n\t\t//out.println(\"<script>window.location.href='index.html'</script>\");\r\n\t\tresponse.sendRedirect(\"index.html\");\r\n\t}", "public Booking saveBooking(Booking booking);" ]
[ "0.7948341", "0.78137153", "0.74429184", "0.7294027", "0.7291182", "0.7250176", "0.71991456", "0.7165953", "0.71649754", "0.71588796", "0.71588796", "0.7154547", "0.7133399", "0.6998072", "0.69619066", "0.6948859", "0.69483066", "0.69303274", "0.69174373", "0.69107294", "0.6814152", "0.6813935", "0.6792644", "0.6780272", "0.6771951", "0.6734183", "0.6710929", "0.66626143", "0.6611435", "0.6597341", "0.65824485", "0.6565645", "0.6537715", "0.64441764", "0.64239013", "0.6414441", "0.6375919", "0.6374853", "0.6372035", "0.6372035", "0.6367384", "0.63596195", "0.63560915", "0.63455063", "0.6316822", "0.63165474", "0.629061", "0.6261333", "0.62570995", "0.6253784", "0.6225681", "0.6217334", "0.6202359", "0.6193741", "0.6185339", "0.614565", "0.61439407", "0.6141148", "0.61391723", "0.6132709", "0.6124672", "0.60974866", "0.60842854", "0.6074928", "0.6072224", "0.6064232", "0.60628545", "0.6057431", "0.60574085", "0.6032472", "0.603131", "0.6030035", "0.6022064", "0.6018014", "0.6009825", "0.6009535", "0.60007703", "0.60002285", "0.5985534", "0.5975505", "0.5956535", "0.5956535", "0.5947097", "0.5940305", "0.5937382", "0.5937382", "0.59333205", "0.5928512", "0.5928512", "0.5924711", "0.5922131", "0.59133786", "0.58974606", "0.58974415", "0.5897119", "0.58944184", "0.58928806", "0.5892861", "0.58913386", "0.5891318" ]
0.76561886
2
Delete a book in the database
public static int deleteBook(String itemCode) throws HibernateException{ session=sessionFactory.openSession(); session.beginTransaction(); Query query=session.getNamedQuery("INVENTORY_deleteBook").setString("itemCode", itemCode); //Execute the query which delete the detail of the book from the database int res=query.executeUpdate(); //check whether transaction is correctly done session.getTransaction().commit(); session.close(); return res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete(Book book){\n try{\n String query = \"DELETE FROM testdb.book WHERE id=\" + book.getId();\n DbConnection.update(query);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "private void deleteBook() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Delete the book only if mBookId matches DEFAULT_BOOK_ID\n if (mBookId != DEFAULT_BOOK_ID) {\n bookEntry.setId(mBookId);\n mDb.bookDao().deleteBook(bookEntry);\n }\n finish();\n }\n });\n\n }", "private void deleteBook() {\n if (currentBookUri != null) {\n int rowsDeleted = getContentResolver().delete(currentBookUri, null, null);\n\n // Confirmation or failure message on whether row was deleted from database\n if (rowsDeleted == 0)\n Toast.makeText(this, R.string.editor_activity_book_deleted_error, Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, R.string.editor_activity_book_deleted, Toast.LENGTH_SHORT).show();\n }\n finish();\n }", "private void deleteBook() {\n // Only perform the delete if this is an existing book.\n if (currentBookUri != null) {\n // Delete an existing book.\n int rowsDeleted = getContentResolver().delete(currentBookUri, null,\n null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, R.string.delete_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful, display a toast.\n Toast.makeText(this, R.string.delete_successful, Toast.LENGTH_SHORT).show();\n }\n }\n // Exit the activity.\n finish();\n }", "int deleteByPrimaryKey(String bookId);", "@Override\n\tpublic void deleteBook() {\n\t\t\n\t}", "@Override\r\n\tpublic void deletebook(int seq) {\n\t\tsqlSession.delete(ns + \"deletebook\", seq);\r\n\t}", "@Override\r\n\tpublic int deleteBook(int book_id) {\n\t\treturn 0;\r\n\t}", "void delete(Book book);", "public void delete(int bookId){ \n dbmanager.open();\n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jauthor = new JSONObject(resultAttribute);\n\n if(jauthor.getInt(\"idBOOK\")==bookId){\n \n dbmanager.getDB().delete(bytes(key));\n break;\n }\n keyIterator.next(); \n }\n } catch(Exception ex){\n ex.printStackTrace();\n } \n dbmanager.close();\n }", "int deleteByPrimaryKey(String bookIsbn);", "int deleteByPrimaryKey(Long integralBookId);", "@Override\n\tpublic boolean deleteBook(int idBook) throws DAOException {\n\t\treturn false;\n\t}", "@Override\n\tpublic int deleteBook(int bookID) {\n\t\treturn 0;\n\t}", "@Override\n public void delete(int id) {\n Book bookDb = repository.findById(id)\n .orElseThrow(RecordNotFoundException::new);\n // delete\n repository.delete(bookDb);\n }", "@DeleteMapping(\"/delete/{id}\")\n public void deleteBookById(@PathVariable(\"id\") Long id) throws BookNotFoundException {\n bookService.deleteBookById(id);\n }", "public void delete(Book book) {\n\t\tif (entityManager.contains(book))\n\t\t\tentityManager.remove(book);\n\t\tentityManager.remove(entityManager.merge(book));\n\t\treturn;\n\n\t}", "void deleteBookingById(BookingKey bookingKey);", "@DeleteMapping(\"/{username}/books/{bookId}\")\n public void deleteBookFromLibrary(@PathVariable String username,\n @PathVariable Long bookId) {\n userService.deleteBook(username, bookId);\n }", "private void deleteEmployeeBooking() {\n BookingModel bookingModel1 = new BookingModel();\n try {\n bookingModel1.deleteBooking(employeeID);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public void deleteBook(int num)\n { \n bookList.remove(num); \n }", "int deleteByExample(BookExample example);", "@DeleteMapping(\"/book\")\n public ResponseEntity<?> delete(@RequestBody Book book) {\n bookService.delete(book);\n return ResponseEntity.ok().body(\"Book has been deleted successfully.\");\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString number=textFieldn.getText();\n\t\t\t\t\t\t\t\n\t\t\t\tBookModel bookModel=new BookModel();\n\t\t\t\tbookModel.setBook_number(number);\n\t\t\t\t\n\t\t\t\tBookDao bookDao=new BookDao();\n\t\t\t\t\n\t\t\t\tDbUtil dbUtil = new DbUtil();\n\t\t\t\tConnection con =null;\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tcon = dbUtil.getCon();\n\t\t\t\t\tint db=bookDao.deletebook(con,bookModel);\n\t\t\t\t\t\n\t\t\t\t\tif(db==1) {\n\t\t\t\t\t JOptionPane.showMessageDialog(null, \"删除成功\");\n\t\t\t\t\t } \t\t\t\t\t\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public void delete(String book_id){\n\t\tmap.remove(book_id);\n\t\t\n\t}", "public int delete(int rb_seq) {\n\t\t\n\t\tint ret = readBookDao.delete(rb_seq);\n\t\treturn ret;\n\t}", "@Test\n\tpublic void testDeleteBook() {\n\t\t//System.out.println(\"Deleting book from bookstore...\");\n\t\tstore.deleteBook(b1);\n\t\tassertFalse(store.getBooks().contains(b1));\n\t\t//System.out.println(store);\n\t}", "public abstract void deleteAPriceBook(String priceBookName);", "public void deleteEntry(String book1)\n{\n}", "public void onClick(View v) {\n MySQLiteHelper.deleteBookByID(currentBookID);\n // Then go back to book list\n startActivity(new Intent(BookDetailActivity.this, BookListViewActivity.class));\n }", "boolean deleteAuthor(Author author) throws PersistenceException, IllegalArgumentException;", "public boolean deleteBook(int book_id[]){\n String sql=\"delete from Book where id=?\";\n for (int i=0;i<book_id.length;i++){\n if( !dao.exeucteUpdate(sql,new Object[]{book_id[i]})){\n return false;\n }\n }\n return true;\n }", "@Override\n\tpublic Response deleteOrder(BookDeleteRequest request) {\n\t\treturn null;\n\t}", "@DeleteMapping(\"/{isbn}\")\n\tpublic ResponseEntity<?> deleteBook(@PathVariable(name = \"isbn\") String isbn){\n\t\treturn bookRepository.findByIsbn(isbn).\n\t\t\tmap(bookDelete -> {\n\t\t\t\tbookRepository.delete(bookDelete);\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NO_CONTENT);\n\t\t\t})\n\t\t\t.orElseThrow(() -> new BookNotFoundException(\"Wrong isbn\"));\n\t}", "int deleteByPrimaryKey(Long authorId);", "@RequestMapping(\"/book/delete/{id}\")\n public String delete(@PathVariable Long id){\n bookService.deleteBook(id);\n return \"redirect:/books\";\n }", "@Override\n\tpublic void delete(String id) {\n\t\tString query=\"Delete from Book Where id='\"+id+\"'\";\n\t\texecuteQuery(query);\n\t\tnotifyAllObservers();\n\t\t\n\t}", "void deleteBooking(int detail_id) throws DataAccessException;", "int deleteByPrimaryKey(String bid);", "@Override\n public Optional<BookDto> deleteBook(Integer bookId) {\n try {\n Optional<BookEntity> bookEntity = bookRepository.findByBookId(bookId);\n if (bookEntity.isPresent()) {\n bookRepository.deleteByBookId(bookId);\n LogUtils.getInfoLogger().info(\"Book Deleted: {}\",bookEntity.get().toString());\n return Optional.of(bookDtoBookEntityMapper.bookEntityToBookDto(bookEntity.get()));\n } else {\n LogUtils.getInfoLogger().info(\"Book not Deleted\");\n return Optional.empty();\n }\n }catch (Exception exception){\n throw new BookException(exception.getMessage());\n }\n }", "@Override\n public Book removeBookById(int id) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n Book book = Book.newBuilder().build();\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementSelectById =\n helper.prepareStatementSelectById(connection, id);\n ResultSet resultSet = statementSelectById.executeQuery()) {\n while (resultSet.next()) {\n BookCreator bookCreator = new BookCreator();\n book = bookCreator.create(resultSet);\n resultSet.deleteRow();\n }\n if (book.getId() == 0) {\n throw new DaoException(\"There is no such book in warehouse!\");\n }\n } catch (SQLException e) {\n throw new DaoException(e);\n }\n return book;\n }", "int deleteByExample(IntegralBookExample example);", "int deleteByExample(BnesBrowsingHisExample example) throws SQLException;", "@GetMapping(\"/deleteBook\")\n public String deleteBook(@RequestParam(\"id\") int id, Model model){\n bookService.deleteBook(id);\n return \"redirect:/1\";\n }", "@Override\r\n\tpublic boolean deleteBook(long ISBN) {\n\t\tif (searchBook(ISBN).getISBN() == ISBN) {\r\n\t\ttransactionTemplate.setReadOnly(false);\t\r\n\t\t\t\treturn transactionTemplate.execute(new TransactionCallback<Boolean>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\tboolean result = bookDAO.deleteBook(ISBN);\r\n\t\t\t\t\t\treturn result;\r\n\r\n\t\t\t\t} catch (Exception exception) {\r\n\t\t\t\t\tstatus.setRollbackOnly();\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void deleteAllBooks(){\n int rowsDeleted = getContentResolver().delete(BookContract.BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", rowsDeleted + \" rows deleted from database\");\n }", "public void delete(String id)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSessionwithTransation();\r\n\t\t\tBook book=bookdao.findById(id);\r\n\t\t\tbookdao.delete(book);\r\n\t\t\tbookdao.closeSessionwithTransaction();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic boolean deleteBooking(Booking_IF bk) {\r\n\t\tPreparedStatement myStatement = null;\r\n\t\tString query = null;\r\n\t\tint count = 0;\r\n\t\ttry{\r\n\t\t\tquery = \"delete from Booking where Shift_ID = ? AND User_ID = ?\";\r\n\t\t\tmyStatement = myCon.prepareStatement(query);\r\n\t\t\tmyStatement.setInt(1, bk.getShiftid());\r\n\t\t\tmyStatement.setInt(2, bk.getUserid());\r\n\t\t\tcount = myStatement.executeUpdate();\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\ttry {\r\n\t\t\t\tif (myStatement != null)\r\n\t\t\t\t\tmyStatement.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count!=1){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "@RequestMapping(value = \"/{branch}/stackRoom/{book}\", method = RequestMethod.DELETE)\n public String removeBookFromStock(@PathVariable String branch, @PathVariable String book) {\n branchBookService.removeBook(branch, book);\n return \"Success\";\n }", "public void delete(Book entity) {\n\t\tentityManager.remove(entityManager.contains(entity) ? entity : entityManager.merge(entity));\n\t}", "public void delete1(int biblio_id, String library_id, String sub_library_id) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n \n\n try {\n tx = session.beginTransaction();\n \n Query query = session.createQuery(\"DELETE FROM DocumentDetails WHERE biblioId = :biblioId and id.libraryId = :libraryId and id.sublibraryId = :subLibraryId\");\n\n query.setInteger(\"biblioId\", biblio_id);\n query.setString(\"libraryId\", library_id);\n query.setString(\"subLibraryId\", sub_library_id);\n query.executeUpdate();\n tx.commit();\n \n } catch (RuntimeException e) {\n\n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }", "@RequestMapping(value = \"/delete/{bookId}\", method = RequestMethod.GET)\n\tpublic @ResponseBody()\n\tStatus deleteEmployee(@PathVariable(\"bookId\") long bookId) {\n\t\ttry {\n\t\t\tbookService.deleteBook(bookId);;\n\t\t\treturn new Status(1, \"book deleted Successfully !\");\n\t\t} catch (Exception e) {\n\t\t\treturn new Status(0, e.toString());\n\t\t}\n\t}", "@Override\n\tpublic void delete(BookInfoVO vo) {\n\t\tbookInfoDao.delete(vo);\n\t}", "@Override\r\n\tpublic void remove(Book book) {\r\n\r\n\t}", "@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tdeleteBook(position);\n\t\t\t\t\tcandelete =-1;\n\t\t\t\t}", "public void removeBook(int ISBN) {\n String sql = \"DELETE FROM books WHERE ISBN = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n // Set value\n pstmt.setInt(1, ISBN);\n\n pstmt.executeUpdate();\n\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\n\tpublic void deleteKeyword(Integer bookId) {\n\t\tdao.removeKeyword(bookId);\n\t\t\n\t\t\n\t}", "public void delete(int biblio_id, String library_id, String sub_library_id) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n //Object acqdocentry = null;\n\n try {\n tx = session.beginTransaction();\n //acqdocentry = session.load(BibliographicDetails.class, id);\n Query query = session.createQuery(\"DELETE FROM BibliographicDetails WHERE id.biblioId = :biblioId and id.libraryId = :libraryId and id.sublibraryId = :subLibraryId\");\n\n query.setInteger(\"biblioId\", biblio_id);\n query.setString(\"libraryId\", library_id);\n query.setString(\"subLibraryId\", sub_library_id);\n query.executeUpdate();\n tx.commit();\n //return (BibliographicDetails) query.uniqueResult();\n } catch (RuntimeException e) {\n\n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }", "void deleteconBooking(int confirm_id) throws DataAccessException;", "@Override\r\n\tpublic boolean deleteByBookId(String id) {\n\t\tConnection conn=null;\r\n\t\tPreparedStatement pst=null;\r\n\t\r\n\t\tboolean flag=false;\r\n\t\ttry {\r\n\t\t\tconn=Dbconn.getConnection();\r\n\t\t\tString sql = \"update books set tag=0 where id=?\";\r\n\t\t\tpst = conn.prepareStatement(sql);\r\n\t\t\tpst.setString(1, id);\r\n\t\t\tif(0<pst.executeUpdate()){\r\n\t\t\t\tflag=true;\r\n\t\t\t}\r\n\t\t\treturn flag;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tDbconn.closeConn(pst, null, conn);\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "public void deleteBook(String title)\n {\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n if(bookList.get(iterator).getTitle().equals(title))\n {\n bookList.remove(iterator); \n }\n }\n }", "@DeleteMapping(\"/{id}/shoppingcart\")\n public ShoppingCart removeBookFromShoppingCart(@PathVariable long id, @RequestBody Book book){\n Customer b = customerRepository.findById(id);\n ShoppingCart sc = b.getShoppingCart();\n sc.removeBook(book);\n b = customerRepository.save(b);\n \n return b.getShoppingCart();\n }", "@RequestMapping(value=\"/book/{isbn}\",method=RequestMethod.DELETE)\n\t\t\tpublic @ResponseBody ResponseEntity<Books> deleteBookDetails(@PathVariable Long isbn)throws Exception{\n\t\t\t\tBooks book=null;\n\t\t\t\tbook=booksDAO.findOne(isbn);\n\t\t\t\tif(book!=null)\n\t\t\t\t{\ttry{\t\n\t\t\t\t\t\t\tbook.setLastModifiedTime(new Date());\n\t\t\t\t\t\t\tif(book.getIsActive())\n\t\t\t\t\t\t\t\tbook.setIsActive(false);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tbook.setIsActive(true);\n\t\t\t\t\t\t\tbooksDAO.save(book);\n\t\t\t\t\t\t\treturn new ResponseEntity<Books>(book, HttpStatus.OK);\n\t\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\t\tthrow new Exception(\"Could not change the status of book. \",e);\n\t\t\t\t\t\t}\n\t\t\t\t}else\n\t\t\t\t\treturn new ResponseEntity<Books>(HttpStatus.NOT_FOUND); \n\t\t\t}", "public void delete() throws SQLException {\n DatabaseConnector.updateQuery(\"DELETE FROM course \"\n + \"WHERE courseDept='\" + this.courseDept \n + \"' AND courseNum = '\" + this.courseNum + \"'\");\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Books : {}\", id);\n booksRepository.deleteById(id);\n booksSearchRepository.deleteById(id);\n }", "@Override\n\tpublic void deleteBourse(Bourse brs) {\n\t\t\n\t}", "@DeleteMapping(\"/books/{id}\")\n\tpublic ResponseEntity<Map<String, Boolean>> deleteBook(@PathVariable Long id)\n\t{\n\t\tBook book = bookRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Book Not found with id\" + id));\n\t\tbookRepository.delete(book);\n\t\tMap<String, Boolean> response = new HashMap<>();\n\t\tresponse.put(\"deleted\", Boolean.TRUE);\n\t\treturn ResponseEntity.ok(response);\n\t}", "@Override\n\tpublic void delete(String... args) throws SQLException {\n\t\t\n\t}", "int deleteByPrimaryKey(String goodsId);", "int deleteByExample(CTipoComprobanteExample example) throws SQLException;", "int deleteByPrimaryKey(String idTipoComprobante) throws SQLException;", "@Override\n @DELETE\n @Path(\"/delete/{id}\")\n public void delete(@PathParam(\"id\") int id) {\n EntityManager em = PersistenceUtil.getEntityManagerFactory().createEntityManager();\n DaoImp dao = new DaoImp(em);\n dao.delete(Author.class, id);\n }", "@Test\n\tpublic void deleteBook() {\n\t\tRestAssured.baseURI = \"http://216.10.245.166\";\n\t\t given().log().all().queryParam(\"ID\", \"321wergt\")\n\t\t\t\t.header(\"Content-Type\", \"application/json\").when()\n\t\t\t\t.delete(\"/Library/DeleteBook.php\").then().log().all()\n\t\t\t\t.assertThat().statusCode(200);\n\n\t\n\t /*JsonPath js = new JsonPath(response); \n\t String id = js.get(\"ID\");\n\t System.out.println(id);*/\n\t \n\t }", "public void delete() throws SQLException {\r\n\t\t//SQL Statement\r\n\r\n\t\tString sql = \"DELETE FROM \" + table+ \" WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setInt(1, this.getGenreID());\r\n\r\n\t\tint rowsDeleted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsDeleted+ \"Zeilen gelöscht\");\r\n\t\tstmt.close();\r\n\t}", "private void deleteAllBooks() {\n int rowsDeleted = getContentResolver().delete(BookEntry.CONTENT_URI, null, null);\n // Update the message for the Toast\n String message;\n if (rowsDeleted == 0) {\n message = getResources().getString(R.string.inventory_delete_books_failed).toString();\n } else {\n message = getResources().getString(R.string.inventory_delete_books_successful).toString();\n }\n // Show toast\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic void delete(int chapter_id) {\n\t\trDao.delete(chapter_id);\n\t}", "@RequestMapping(\"/delete\")\n\tpublic String delete(@RequestParam Long bookingId) {\n\t\tbookingRepository.delete(bookingId);\n\t return \"booking #\"+bookingId+\" deleted successfully\";\n\t}", "int deleteByPrimaryKey(String courseId);", "@Override\n public int deleteByUserIdAndBookshelfIdAndBookId(\n final int userId,\n final int shelfId,\n final int bookId) {\n return jdbcTemplate.update(\"delete from MyBook where user_id = ? \"\n + \"and book_id = ? and bookshelf_id = ?\",\n new Object[] {userId, bookId, shelfId});\n }", "public void delete(final Book key) {\n root = delete(root, key);\n }", "int deleteByPrimaryKey(Long articleTagId);", "public void delete() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n int safeCheck = BusinessFacade.getInstance().checkIDinDB(this.goodID,\n \"orders\", \"goods_id\");\n if (safeCheck == -1) {\n stmtIn.executeUpdate(\"DELETE FROM ngaccount.goods WHERE goods.goods_id = \" +\n this.goodID + \" LIMIT 1;\");\n }\n }", "public void eliminar(){\n SQLiteDatabase db = conn.getWritableDatabase();\n String[] parametros = {cajaId.getText().toString()};\n db.delete(\"personal\", \"id = ?\", parametros);\n Toast.makeText(getApplicationContext(), \"Se eliminó el personal\", Toast.LENGTH_SHORT).show();\n db.close();\n }", "@FXML\n private void handleBookDeleteOption(ActionEvent event) {\n Book selectedItem = tableViewBook.getSelectionModel().getSelectedItem();\n if (selectedItem == null) {\n AlertMaker.showErrorMessage(\"No book selected\", \"Please select book for deletion.\");\n return;\n }\n if (DatabaseHandler.getInstance().isBookAlreadyIssued(selectedItem)) {\n AlertMaker.showErrorMessage(\"Cant be deleted\", \"This book is already issued and cant be deleted.\");\n return;\n }\n //confirm the opertion\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Deleting Book\");\n Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();\n UtilitiesBookLibrary.setStageIcon(stage);\n alert.setHeaderText(null);\n alert.setContentText(\"Are u sure u want to Delete the book ?\");\n Optional<ButtonType> response = alert.showAndWait();\n if (response.get() == ButtonType.OK) {\n \n boolean result = dbHandler.deleteBook(selectedItem);\n if (result == true) {\n AlertMaker.showSimpleAlert(\"Book delete\", selectedItem.getTitle() + \" was deleted successfully.\");\n observableListBook.remove(selectedItem);\n } else {\n AlertMaker.showSimpleAlert(\"Failed\", selectedItem.getTitle() + \" unable to delete.\");\n\n }\n } else {\n AlertMaker.showSimpleAlert(\"Deletion Canclled\", \"Deletion process canclled.\");\n\n }\n\n }", "int deleteByPrimaryKey(Long bId);", "int deleteByExample(GfanCodeBannerExample example) throws SQLException;", "@Override\n @Transactional\n public int deleteById(final int id) {\n return jdbcTemplate.update(\"delete from MyBook where id = ?\",\n new Object[] {id});\n }", "public void onClick(DialogInterface dialog, int id) {\n deleteBook();\n }", "public void onClick(DialogInterface dialog, int id) {\n deleteBook();\n }", "@Test\n\tpublic void deleteBook_Nonexistent() {\n\t\tsystem.deleteBook(\"asdfasdfasdfaslkjdfasd\");\n\t}", "int deleteByPrimaryKey(String detailId);", "public void removeBook(Book book) {\n this.bookList.remove(book);\n }", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "void deleteAuthor(Long authorId) throws LogicException;", "public void vaciarCarrito() {\r\n String sentSQL = \"DELETE from carrito\";\r\n try {\r\n Statement st = conexion.createStatement();\r\n st.executeUpdate(sentSQL);\r\n st.close();\r\n LOG.log(Level.INFO,\"Carrito vaciado\");\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n \tLOG.log(Level.WARNING,e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }", "public void delete(RelacionConceptoEmbalajePk pk) throws RelacionConceptoEmbalajeDaoException;", "@Test\r\n public void prueba() throws Exception {\r\n // Creates an instance of book\r\n Book book = new Book();\r\n book.setTitle(\"The Hitchhiker's Guide to the Galaxy\");\r\n book.setPrice(12.5F);\r\n book.setDescription(\"Science fiction comedy series created by Douglas Adams.\");\r\n book.setIsbn(\"1-84023-742-2\");\r\n book.setNbOfPage(354);\r\n book.setIllustrations(false);\r\n \r\n BookFacade bookEJB = (BookFacade) ctx.lookup(\"java:global/classes/BookFacade!miEjB.BookFacade\");\r\n book = bookEJB.createBook(book);\r\n book = bookEJB.find(book.getId());\r\n\r\n assertTrue(book.getPrice()== 12.5F);\r\n\r\n System.out.println(\"### Book created : \" + book);\r\n System.out.println(\"### \"+ bookEJB.findAll().size() + \" books in the db\" );\r\n bookEJB.remove(book);\r\n System.out.println(\"### Book deleted\");\r\n book = bookEJB.find(book.getId());\r\n assertTrue(book== null);\r\n\r\n }", "@Override\n public List<Book> removeBooks(Book removingBook) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n List<Book> removedBooks = new ArrayList<>();\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementSelect =\n helper.prepareStatementSelect(connection, removingBook);\n ResultSet resultSet = statementSelect.executeQuery()) {\n while (resultSet.next()) {\n BookCreator bookCreator = new BookCreator();\n Book book = bookCreator.create(resultSet);\n removedBooks.add(book);\n resultSet.deleteRow();\n }\n if (removedBooks.isEmpty()) {\n throw new DaoException(\"There is no such book in warehouse!\");\n }\n } catch (SQLException e) {\n throw new DaoException(e);\n }\n return removedBooks;\n }", "int deleteByPrimaryKey(String card);", "@GetMapping(\"/delete\")\n\tpublic String removeBookById(Map<String, Object> map, @ModelAttribute(\"bookCmd\") Book book, HttpServletRequest res,\n\t\t\tRedirectAttributes attribute) {\n\t\tString msg = null;\n\t\tList<BookModel> listmodel = null;\n\t\tmsg = service.deleteBookDetail(Integer.parseInt(res.getParameter(\"bookid\")));\n\t\tlistmodel = service.findAllBookDetails();\n\t\tattribute.addFlashAttribute(\"listmodel\", listmodel);\n\t\tattribute.addFlashAttribute(\"msg\", msg);\n\t\treturn \"redirect:/register\";\n\n\t}" ]
[ "0.8734464", "0.82536477", "0.8222673", "0.81083935", "0.8057556", "0.7940556", "0.7906853", "0.7868474", "0.78365934", "0.75477463", "0.7539604", "0.7514458", "0.74791616", "0.73876387", "0.72588205", "0.7148784", "0.7147462", "0.71078235", "0.7088878", "0.7079534", "0.70771575", "0.70733523", "0.70674324", "0.7056421", "0.70517886", "0.6989008", "0.69411343", "0.69081855", "0.6899584", "0.6898059", "0.6861191", "0.685769", "0.6785609", "0.6769281", "0.67678607", "0.67621285", "0.6740813", "0.67390835", "0.67210317", "0.67128414", "0.6710106", "0.66774255", "0.66512996", "0.66495216", "0.6645822", "0.66278166", "0.66042805", "0.66020316", "0.6584753", "0.6562772", "0.65460974", "0.65381753", "0.6534357", "0.65092415", "0.64978546", "0.6497646", "0.64943975", "0.6492822", "0.64915854", "0.6484877", "0.6484815", "0.64721036", "0.64392984", "0.64375657", "0.641966", "0.64124084", "0.64110017", "0.64077353", "0.638266", "0.6374923", "0.6368579", "0.636065", "0.6351787", "0.63512003", "0.6350351", "0.63492846", "0.63422114", "0.6336003", "0.6331861", "0.63181245", "0.63087636", "0.63048816", "0.6297748", "0.6292318", "0.6288945", "0.6287023", "0.6285007", "0.62743396", "0.62743396", "0.62725544", "0.6272142", "0.62581277", "0.6257628", "0.625651", "0.62537223", "0.6251631", "0.6247948", "0.62468493", "0.62430567", "0.62402755" ]
0.6751043
36
Load Selected book details to the table in settings according to given item code
public static List<Book> searchBookByItemCode(String itemCode) throws HibernateException{ session = sessionFactory.openSession(); session.beginTransaction(); Query query = session.getNamedQuery("INVENTORY_searchBookByItemCode").setString("itemCode", itemCode); List<Book> resultList = query.list(); session.getTransaction().commit(); session.close(); return resultList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n\t private void loadbookinfo(ActionEvent event) {\n\t \tclearbookcache();\n\t \t\n\t \tString id = bookidinput.getText();\n\t \tString qu = \"SELECT * FROM BOOK_LMS WHERE id = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t Boolean flag = false;\n\t \n\t try {\n while (rs.next()) {\n String bName = rs.getString(\"title\");\n String bAuthor = rs.getString(\"author\");\n Boolean bStatus = rs.getBoolean(\"isAvail\");\n\n Bookname.setText(bName);\n Bookauthor.setText(bAuthor);\n String status = (bStatus) ? \"Available\" : \"Not Available\";\n bookstatus.setText(status);\n\n flag = true;\n }\n\n if (!flag) {\n Bookname.setText(\"No Such Book Available\");\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void populateUI(BookEntry book) {\n // Return if the task is null\n if (book == null) {\n return;\n }\n // Use the variable book to populate the UI\n mNameEditText.setText(book.getBook_name());\n mQuantityTextView.setText(Integer.toString(book.getQuantity()));\n mPriceEditText.setText(Double.toString(book.getPrice()));\n mPhoneEditText.setText(Integer.toString(book.getSupplier_phone_number()));\n mSupplier = book.getSupplier_name();\n switch (mSupplier) {\n case BookEntry.SUPPLIER_ONE:\n mSupplierSpinner.setSelection(1);\n break;\n case BookEntry.SUPPLIER_TWO:\n mSupplierSpinner.setSelection(2);\n break;\n default:\n mSupplierSpinner.setSelection(0);\n break;\n }\n mSupplierSpinner.setSelection(mSupplier);\n }", "private void getItemListById() throws ClassNotFoundException, SQLException, IOException {\n itemCodeCombo.removeAllItems();\n ItemControllerByChule itemController = new ItemControllerByChule();\n ArrayList<Item> allItem = itemController.getAllItems();\n itemCodeCombo.addItem(\"\");\n for (Item item : allItem) {\n itemCodeCombo.addItem(item.getItemCode());\n }\n itemListById.setSearchableCombo(itemCodeCombo, true, null);\n }", "private void loadBookInformation(String rawPage, Document doc, Book book) {\n BookDetailParser parser = new BookDetailParser();\n SwBook swBook = parser.parseDetailPage(rawPage);\n book.setContributors(swBook.getContributors());\n book.setCover_url(coverUrlParser.parse(doc));\n book.setShort_description(descriptionShortParser.parse(doc));\n book.addPrice(swBook.getPrice().getPrices().get(0));\n book.setTitle(titleParser.parse(doc));\n }", "private void selectBook(Book book){\n\t\tthis.book = book;\n\t\tshowView(\"ModifyBookView\");\n\t\tif(book.isInactive()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is archived. It must be recovered before it can be modified.\"));\n\t\t}else if(book.isLost()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is lost. It must be recovered before it can be modified.\"));\n\t\t}\n\t}", "public void getBookDetails() {\n\t}", "public void loadBook() {\n List<Book> books = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n Book book = new Book(\"Book-\" + i, \"Test book \" + i);\n books.add(book);\n }\n this.setBooks(books);\n }", "public void setBookCode(java.lang.String value);", "public List<ErpBookInfo> selData();", "private void loadItem(Item item, ResultSet resultSet, int index) throws SQLException {\n\t\t\titem.setName(resultSet.getString(index++));\n\t\t\titem.setLocationID(resultSet.getInt(index++));\n\t\t\titem.setItemID(resultSet.getInt(index++));\n\t\t}", "public void establishSelectedBook(final long id) {\r\n selectedBook = dataManager.selectBook(id);\r\n }", "BookDO selectByPrimaryKey(String bookIsbn);", "private void initData() {\n\r\n\t\tint statusBarHeight = 50;\r\n\t\tint readHeight = ApplicationManager.SCREEN_HEIGHT - statusBarHeight;\r\n\r\n\t\t// TODO 获取图书信息\r\n\t\tIntent intent = getIntent();\r\n\t\tbookInfo = (BookInfo) intent.getSerializableExtra(BOOK_INFO_KEY);\r\n\r\n\t\ttitleName.setText(bookInfo.getName());\r\n\r\n\t\tString progressInfo = PreferenceHelper.getString(bookInfo.getId() + \"\",\r\n\t\t\t\tnull);\r\n\t\tL.v(TAG, \"initData\", \"progressInfo : \" + progressInfo);\r\n\r\n\t\tif (!TextUtils.isEmpty(progressInfo)) {\r\n\t\t\t// 格式 : ChapterId_ChapterName_CharsetIndex\r\n\t\t\tString[] values = progressInfo.split(\"#\");\r\n\t\t\tif (values.length == 3) {\r\n\t\t\t\treadProgress = new Bookmark();\r\n\t\t\t\treadProgress.setChapterId(Integer.valueOf(values[0]));\r\n\t\t\t\treadProgress.setChapterName(values[1]);\r\n\t\t\t\treadProgress.setCharsetIndex(Integer.valueOf(values[2]));\r\n\t\t\t} else {\r\n\t\t\t\tPreferenceHelper.putString(bookInfo.getId() + \"\", \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (readProgress == null) {\r\n\t\t\treadProgress = new Bookmark();\r\n\t\t\tChapterInfo chapterInfo = bookInfo.getChapterInfos().get(0);\r\n\t\t\treadProgress.setChapterId(chapterInfo.getId());\r\n\t\t\treadProgress.setChapterName(chapterInfo.getName());\r\n\t\t\treadProgress.setCharsetIndex(0);\r\n\t\t}\r\n\r\n\t\tcurrentChapter = findChapterInfoById(readProgress.getChapterId());\r\n\r\n\t\tif (currentChapter == null\r\n\t\t\t\t&& TextUtils.isEmpty(currentChapter.getPath())) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// TODO 读取sp中的字体大小\r\n\t\tcurrentTextSize = PreferenceHelper.getInt(TEXT_SIZE_KEY, 40);\r\n\t\tBookPageFactory.setFontSize(currentTextSize);\r\n\t\tpagefactory = BookPageFactory.build(ApplicationManager.SCREEN_WIDTH, readHeight);\r\n\t\ttry {\r\n\t\t\tpagefactory.openbook(currentChapter.getPath());\r\n\t\t} catch (IOException e) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tadapter = new ScanViewAdapter(this, pagefactory);\r\n\r\n\t\t// TODO 跳转到历史记录\r\n\t\tscanview.setAdapter(adapter, readProgress.getCharsetIndex());\r\n\r\n\t\tmenuIn = AnimationUtils.loadAnimation(this, R.anim.menu_pop_in);\r\n\t\tmenuOut = AnimationUtils.loadAnimation(this, R.anim.menu_pop_out);\r\n\t\t\r\n\t\tif(android.os.Build.VERSION.SDK_INT>=16){\r\n\t\t\ttitleOut = new TranslateAnimation(\r\n\t Animation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n\t 0, Animation.ABSOLUTE, 0,\r\n\t Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24));\r\n\t\t\ttitleOut.setDuration(400);\r\n\t \t\t\r\n\t titleIn = new TranslateAnimation(\r\n \t\t\t\tAnimation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n \t\t\t\t0, Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24),\r\n \t\t\t\tAnimation.ABSOLUTE, 0);\r\n\t titleIn.setDuration(400);\r\n\t\t}else{\r\n\t\t\ttitleIn = AnimationUtils.loadAnimation(this, R.anim.title_in);\r\n\t\t\ttitleOut = AnimationUtils.loadAnimation(this, R.anim.title_out);\r\n\t\t}\r\n\t\t\r\n\t\taddBookmark = AnimationUtils.loadAnimation(this, R.anim.add_bookmark);\r\n\t\t\r\n\r\n\t\ttitleOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\ttitle.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\r\n\t\tmenuOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\tmenu.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tscanview.setOnMoveListener(new onMoveListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onMoveEvent() {\r\n\t\t\t\tif (isMenuShowing) {\r\n\t\t\t\t\thideMenu();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageChanged(View currPage) {\r\n\t\t\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\t\t\treadProgress.setCharsetIndex(tag.start_index);\r\n\t\t\t\tshowChaptersBtn(tag);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tView currPage = scanview.getCurrPage();\r\n\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\tshowChaptersBtn(tag);\r\n\t\t\r\n\t\t//TODO 获取该书的书签\r\n\t\tgetBookMarks();\r\n\t\t\r\n\t}", "@Override\n public void DataIsLoaded(List<BookModel> bookModels, List<String> keys) {\n BookModel bookModel = bookModels.get(0);\n Intent intent = new Intent (getContext(), BookDetailsActivity.class);\n intent.putExtra(\"Book\", bookModel);\n getContext().startActivity(intent);\n Log.i(TAG, \"Data is loaded\");\n\n }", "Book selectByPrimaryKey(String bid);", "@Override\n\t\tpublic Object getItem(int arg0) {\n\t\t\treturn books.get(arg0);\n\t\t}", "BookInfo selectByPrimaryKey(Integer id);", "private void setBooksInfo () {\n infoList = new ArrayList<> ();\n\n\n // item number 1\n\n Info info = new Info ();// this class will help us to save data easily !\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"ما هي اضطرابات طيف التوحد؟\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"سيساعدك هذا المستند على معرفة اضطراب طيف التوحد بشكل عام\");\n\n // we can add book url or download >>\n info.setInfoPageURL (\"https://firebasestorage.googleapis.com/v0/b/autismapp-b0b6a.appspot.com/o/material%2FInfo-Pack-for\"\n + \"-translation-Arabic.pdf?alt=media&token=69b19a8d-8b4c-400a-a0eb-bb5c4e5324e6\");\n\n infoList.add (info); //adding item 1 to list\n\n\n/* // item number 2\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 2 to list\n\n\n // item 3\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 3 to list\n\n // item number 4\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism part 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 4 to list\n\n\n // item 5\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 5 to list*/\n\n\n displayInfo (infoList);\n\n }", "@FXML\n\t void loadbookinfo2(ActionEvent event) {\n\t \t ObservableList<String> issueData = FXCollections.observableArrayList();\n\t isReadyForSubmission = false;\n\t String id = Bookid.getText();\n\t String qu = \"SELECT * FROM ISSUE_LMS WHERE bookID = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t try {\n\t while (rs.next()) {\n\t String mBookID = id;\n\t String mMemberID = rs.getString(\"memberID\");\n\t Timestamp mIssueTime = rs.getTimestamp(\"issueTime\");\n\t int mRenewCount = rs.getInt(\"renew_count\");\n\n issueData.add(\"Issue Date and Time :\" + mIssueTime.toGMTString());\n issueData.add(\"Renew Count :\" + mRenewCount);\n issueData.add(\"Book Information:-\");\n\t \n\t qu = \"SELECT * FROM BOOK_LMS WHERE ID = '\" + mBookID + \"'\";\n\t ResultSet r1 = dbhandler.execQuery(qu);\n\n\t while (r1.next()) {\n\t issueData.add(\"\\tBook Name :\" + r1.getString(\"title\"));\n\t issueData.add(\"\\tBook ID :\" + r1.getString(\"id\"));\n\t issueData.add(\"\\tBook Author :\" + r1.getString(\"author\"));\n\t issueData.add(\"\\tBook Publisher :\" + r1.getString(\"publisher\"));\n\t }\n\t qu = \"SELECT * FROM MEMBER_LMS WHERE ID = '\" + mMemberID + \"'\";\n\t r1 = dbhandler.execQuery(qu);\n\t issueData.add(\"Member Information:-\");\n\n\t while (r1.next()) {\n\t issueData.add(\"\\tName :\" + r1.getString(\"name\"));\n\t issueData.add(\"\\tMobile :\" + r1.getString(\"mobile\"));\n\t issueData.add(\"\\tEmail :\" + r1.getString(\"email\"));\n\t }\n\n\t isReadyForSubmission = true;\n\t }\n\t } catch (SQLException ex) {\n\t Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n\t }\n\t issuedatallist.getItems().setAll(issueData);\n\t }", "CmsRoomBook selectByPrimaryKey(String bookId);", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "public void handleGetItemDetailsButtonAction(ActionEvent event) {\n String itemID = updateItemItemID.getText();\n try{\n //get the details from mgr\n HashMap itemInfo = updateMgr.getItemInfo(itemID);\n //display on the fields\n updateItemTitle.setText((String)itemInfo.get(Table.BOOK_TITLE));\n updateItemAuthor.setText((String)itemInfo.get(Table.BOOK_AUTHOR));\n updateItemDescription.setText((String)itemInfo.get(Table.BOOK_DESCRIPTION));\n updateItemPublishDate.setText(formatDateString((Calendar)itemInfo.get(Table.BOOK_DATE)));\n updateItemISBN.setText((String)itemInfo.get(Table.BOOK_ISBN));\n updateItemGenre.setText((String)itemInfo.get(Table.BOOK_GENRE));\n //enable item info pane\n updateItemInfoPane.setDisable(false);\n this.tempItemID = itemID;\n }\n catch(ItemNotFoundException | SQLException | ClassNotFoundException e){\n this.displayWarning(\"Error\", e.getMessage());\n } catch (Exception ex) {\n this.displayWarning(\"Error\", ex.getMessage());\n } \n }", "@Override\n public Object getItem(int position) {\n return listBook.get(position);\n }", "public void setComboBoxValues() {\n String sql = \"select iName from item where iActive=? order by iName asc\";\n \n cbo_iniName.removeAllItems();\n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,\"Yes\");\n rs = pst.executeQuery();\n \n while (rs.next()) {\n cbo_iniName.addItem(rs.getString(1));\n }\n \n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item list cannot be loaded\");\n }finally {\n try{\n rs.close();\n pst.close();\n \n }catch(Exception e) {}\n }\n }", "private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}", "@Override\n public void onBindViewHolder(LoreBookSelectionViewHolder holder, int position) {\n LoreBookSelectionInformation current = bookSelectionData.get(position);\n\n holder.bookIcon.setImageResource(current.getBookIconID());\n holder.bookName.setText(current.getBookName());\n }", "public void loadBooksOfCategory(){\n long categoryId=mainActivityViewModel.getSelectedCategory().getMcategory_id();\n Log.v(\"Catid:\",\"\"+categoryId);\n\n mainActivityViewModel.getBookofASelectedCategory(categoryId).observe(this, new Observer<List<Book>>() {\n @Override\n public void onChanged(List<Book> books) {\n if(books.isEmpty()){\n binding.emptyView.setVisibility(View.VISIBLE);\n }\n else {\n binding.emptyView.setVisibility(View.GONE);\n }\n\n booksAdapter.setmBookList(books);\n }\n });\n }", "private void initData(View view) {\n /*\n * the array of item which need to show in gridview\n * it contains string and a picture\n * */\n ArrayList<HashMap<String, Object>> mList = new ArrayList<HashMap<String, Object>>();\n\n\n /**\n * download info from local database\n * */\n ContentResolver contentResolver = mContext.getContentResolver();\n Uri uri = Uri.parse(\"content://com.example.root.libapp_v1.SQLiteModule.Bookpage.BookpageProvider/bookpage\");\n Cursor cursor = contentResolver.query(uri, null, null, null, null);\n if (cursor != null) {\n while (cursor.moveToNext()) {\n HashMap<String, Object> map = new HashMap<String, Object>();\n String bookname = cursor.getString(cursor.getColumnIndex(\"name\"));\n map.put(\"image\", mImgUrl+\"bookimg_\"+bookname+\".png\");\n map.put(\"text\", bookname);\n mList.add(map);\n }\n /**\n * use the new data to show in gridview\n * */\n initGridView(view, mList);\n }\n cursor.close();\n }", "public LoreBookSelectionAdapter(Context context, List<LoreBookSelectionInformation> bookSelectionData, FragmentManager fragmentManager) {\n super();\n this.inflater = LayoutInflater.from(context);\n this.bookSelectionData = bookSelectionData;\n this.database = ManifestDatabase.getInstance(context);\n this.fragmentManager = fragmentManager;\n loadLoreEntries();\n }", "private Book getBook(String sku) {\n return bookDB.get(sku);\n }", "Book selectByPrimaryKey(String id);", "public void read(String bookName, World world) {\n\t\tItem item = world.dbItems().get(bookName);\n\t\tList<Item> items = super.getItems();\n\n\t\tif (items.contains(item) && item instanceof Book) {\n\t\t\tBook book = (Book) item;\n\t\t\tSystem.out.println(book.getBookText());\n\t\t} else {\n\t\t\tSystem.out.println(\"No book called \" + bookName + \" in inventory.\");\n\t\t}\n\t}", "public Book getBook(int index)\r\n\t{\r\n\t\tBook book = null;\r\n\t\ttry {\r\n\t\t\tbook = items.get(index);\r\n\t\t} catch(IndexOutOfBoundsException e) {\r\n\t\t}\r\n\t\treturn book;\r\n\t}", "private void getBookItemInformation(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws ServletException, IOException {\n\t\t\n\t\tString idBookItem = request.getParameter(\"bookItemIdGetBookManager\");\n\t\tString url = \"/main.jsp\";\n\t\t\n\t\tif(this.bookItem.getValueInformations(idBookItem, BookItem.BOOK_ITEM_CODE)) {\n\t\t\t//Set value for properties of edit book part\n\t\t\t\n\t\t\tsession.setAttribute(\"imageBookResultLinkEditBookManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_IMAGE]);\n\t\t\tsession.setAttribute(\"nameEditBookUpdateManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_TITLE]);\n\t\t\tsession.setAttribute(\"codeEditBookUpdateManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_CODE]);\n\t\t\tsession.setAttribute(\"authorEditBookUpdateManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_AUTHOR]);\n\t\t\tsession.setAttribute(\"dayPublisherEditBookUpdateManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_DAY_PUBPLICATION]);\n\t\t\tsession.setAttribute(\"publisherEditUpdateBookManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_PUBLISHER]);\n\t\t\tsession.setAttribute(\"summaryEditUpdateBookManager\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_SUMMARY]);\n\t\t\t//Set style for display part edit book\n\t\t\t\n\t\t\tsession.setAttribute(\"styleResultNotExistBookManager\", \"display: none;\");\n\t\t\tsession.setAttribute(\"styleResultExistBookManager\", \"display: block;\");\n\t\t\t//Redirect to BookTitleController\n\t\t\t\n\t\t\tsession.setAttribute(\"requestFromBookItem\", \"getBookTitleInformation\");\n\t\t\tsession.setAttribute(\"bookItemId\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID]);\n\t\t\t\n\t\t\tresponse.sendRedirect(\"BookTitleController\");\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\t//Set style for display part error\n\t\t\t\n\t\t\tsession.setAttribute(\"styleResultNotExistBookManager\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleResultExistBookManager\", \"display: none;\");\n\t\t\t\n\t\t\tdispatcher = getServletContext().getRequestDispatcher(url);\n\t\t\tdispatcher.forward(request, response);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}", "public Book load(String bid) {\n\t\treturn bookDao.load(bid);\r\n\t}", "private void bookRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bookRadioActionPerformed\n itemList.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Select a Book\", \"Texas Homeowners Association Law\", \"Harry Potter and the Sorcerer's Stone\", \"Eldest\" }));\n }", "@FXML\n public void showBorrowedBooks() {\n LibrarySystem.setScene(new BorroweddBookList(\n (reader.getBorrowedBooks(booklist)), reader, readerlist, booklist));\n }", "public void getBookInfo(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\t\r\n\t}", "private void cbo_iniNameItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbo_iniNameItemStateChanged\n if(listLoaded) {\n String sql = \"select * from item where iName=?\";\n \n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,cbo_iniName.getSelectedItem().toString());\n rs = pst.executeQuery();\n rs.next(); //Move resultset to the first pointer\n\n txt_iniId.setText(rs.getString(1));\n\n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item details cannot be found\");\n }finally {\n try{\n rs.close();\n pst.close();\n }catch(Exception e) {}\n }\n }\n }", "public void firstLoadBookUpdate(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\tint cp=myViewDetailBook.getNoofcopies();\r\n\t\tSystem.out.println(\"No of Copy in First Load Book Update=\"+cp);\r\n\t\tmyForm.setNoOfcopies(cp);\r\n\t\t\r\n\t}", "private void getFBDetails(String rangeCode, String divCode) {\n List<String> fbName = new ArrayList<String>();\r\n //rangeName.add(\"Select Range\");\r\n fbKey = new HashMap<>();\r\n db = openOrCreateDatabase(\"sltp.db\", MODE_PRIVATE, null);\r\n Cursor cursor = db.rawQuery(\"select * from m_fb where div_id='\" + divCode + \"' and m_fb_range_id ='\" + rangeCode + \"'order by m_fb_name\", null);\r\n cursor.moveToFirst();\r\n if (cursor.moveToFirst()) {\r\n do {\r\n fbName.add(cursor.getString(cursor.getColumnIndex(\"m_fb_name\"))+ \" \" + cursor.getString(cursor.getColumnIndex(\"fb_type\")));\r\n fbKey.put(cursor.getString(cursor.getColumnIndex(\"m_fb_name\")),\r\n cursor.getString(cursor.getColumnIndex(\"m_fb_id\")));\r\n\r\n\r\n } while (cursor.moveToNext());\r\n }\r\n cursor.close();\r\n db.close();\r\n final ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(getApplicationContext(), R.layout.spinner_row, fbName);\r\n dataAdapter.setDropDownViewResource(R.layout.spinner_row);\r\n fb.setAdapter(dataAdapter);\r\n fb.setPaddingSafe(0, 0, 0, 0);\r\n }", "public void setItemCode(String itemCode) {\n this.itemCode = itemCode;\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n IntentResult scanISBN = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);\n if (scanISBN != null) {\n if (scanISBN.getContents() != null) {\n String ISBN = scanISBN.getContents();\n Book book = BookList.getBook(ISBN);\n if (book== null) {\n Toast.makeText(getActivity(), \"Book Does not Exist\", Toast.LENGTH_SHORT).show();\n }\n else {\n Intent book_info_intent = new Intent(getActivity(), book_description_activity.class);\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"book\", book);\n if (book.getOwner().equalsIgnoreCase(UserList.getCurrentUser().getUsername())) {\n bundle.putInt(\"VISIBILITY\", 1); // 1 for show Edit button\n }\n else {\n bundle.putInt(\"VISIBILITY\", 2); // 2 for not show Edit button\n }\n book_info_intent.putExtras(bundle);\n startActivity(book_info_intent);\n }\n } else {\n Toast.makeText(getActivity(), \"No Results\", Toast.LENGTH_SHORT).show();\n }\n } else {\n super.onActivityResult(requestCode, resultCode, intent);\n }\n }", "@Override\r\n\tpublic Book getBookInfo(int book_id) {\n\t\treturn null;\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n itemName.setCellValueFactory(new PropertyValueFactory<Item, String>(\"Name\"));\n type.setCellValueFactory(new PropertyValueFactory<Item, String>(\"Type\"));\n category.setCellValueFactory(new PropertyValueFactory<Category, String>(\"CategoryName\"));\n description.setCellValueFactory(new PropertyValueFactory<Item, String>(\"Description\"));\n price.setCellValueFactory(new PropertyValueFactory<Item, Double>(\"Price\"));\n quantity.setCellValueFactory(new PropertyValueFactory<Item, Integer>(\"Quantity\"));\n rating.setCellValueFactory(new PropertyValueFactory<Item, Integer>(\"Rating\"));\n author.setCellValueFactory(new PropertyValueFactory<Item, String>(\"Author\"));\n publishDate.setCellValueFactory(new PropertyValueFactory<Item, Date>(\"PublishDate\"));\n pageNumber.setCellValueFactory(new PropertyValueFactory<Item, Integer>(\"PageNumber\"));\n\n ArrayList<Item> items = sba.selectItems();\n\n ObservableList<Item> data = FXCollections.<Item>observableArrayList(items);\n itemsTable.setItems(data);\n\n if (ws.getWishlistId(cs.showcustomer(idlogin).getUserid()) == 0) {\n cs.showcustomer(idlogin).setWishId((ws.createWishlist(cs.showcustomer(idlogin).getUserid())));\n }\n\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void selectNewBook(MouseEvent e)\n\t{\n\t\tBookApp.currentBook = otherAppearances.getSelectionModel().getSelectedItem();\n\t\tcurrentBookDisplay.getItems().clear();\n\t\tcurrentBookDisplay.getItems().add(BookApp.currentBook);\n\t\tcharactersNameList.getItems().clear();\n\t\tfor(Character character : (MyLinkedList<Character>) BookApp.currentBook.getCharacterList()){\n\t\t\tcharactersNameList.getItems().add(character);\n\t\t\tcharactersNameList.getSelectionModel().getSelectedIndex();\n\t\t}\n\t\totherAppearances.getItems().clear();\n\t\tfor(int i = 0; i< BookApp.unsortedBookTable.hashTable.length; i++) {\t\t\n\t\t\tfor(Book eachBook : (MyLinkedList<Book>) BookApp.unsortedBookTable.hashTable[i]) {\n\t\t\t\tfor(Character eachCharacterInTotalList : (MyLinkedList<Character>) eachBook.getCharacterList())\n\t\t\t\t{\n\t\t\t\t\tif(eachCharacterInTotalList.equals(BookApp.currentCharacter) && eachBook.equals(BookApp.currentBook))\n\t\t\t\t\t{\n\t\t\t\t\t\totherAppearances.getItems().add(eachBook);\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}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getBookCode();", "public Book getItem(int id) {\n return BookManagerSingelton.getInstance().getBook(id);\n }", "private void ComboBoxLoader (){\n try {\n if (obslistCBOCategory.size()!=0)\n obslistCBOCategory.clear();\n /*add the records from the database to the ComboBox*/\n rset = connection.createStatement().executeQuery(\"SELECT * FROM category\");\n while (rset.next()) {\n String row =\"\";\n for(int i=1;i<=rset.getMetaData().getColumnCount();i++){\n row += rset.getObject(i) + \" \";\n }\n obslistCBOCategory.add(row); //add string to the observable list\n }\n\n cboCategory.setItems(obslistCBOCategory); //add observable list into the combo box\n //text alignment to center\n cboCategory.setButtonCell(new ListCell<String>() {\n @Override\n public void updateItem(String item, boolean empty) {\n super.updateItem(item, empty);\n if (item != null) {\n setText(item);\n setAlignment(Pos.CENTER);\n Insets old = getPadding();\n setPadding(new Insets(old.getTop(), 0, old.getBottom(), 0));\n }\n }\n });\n\n //listener to the chosen list in the combo box and displays it to the text fields\n cboCategory.getSelectionModel().selectedItemProperty().addListener((obs, oldValue, newValue)->{\n if(newValue!=null){\n Scanner textDisplay = new Scanner((String) newValue);\n txtCategoryNo.setText(textDisplay.next());\n txtCategoryName.setText(textDisplay.nextLine());}\n\n });\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }", "public void dropDownInventory(ComboBox combo) throws SQLException {\r\n dataAccess = new Connection_SQL(\"jdbc:mysql://localhost:3306/items\", \"root\", \"P@ssword123\");\r\n combo.setItems(dataAccess.menuInventory());\r\n }", "public void setBookID(int bookID) {\n this.bookID = bookID;\n }", "@Override\n public void onResume() {\n super.onResume();\n if(book != null) {\n //Also send the first author\n String author = \"\";\n if(!book.getVolumeInfo().getAuthors().isEmpty()) {\n author = book.getVolumeInfo().getAuthors().get(0);\n }\n getPresenter().searchBooks(book.getVolumeInfo().getTitle(), author);\n }\n }", "public void readBook()\n\t{\n\t\tb.input();\n\t\tSystem.out.print(\"Enter number of available books:\");\n\t\tavailableBooks=sc.nextInt();\n\t}", "public void setItems() {\n if (partSelected instanceof OutSourced) { // determines if part is OutSourced\n outSourcedRbtn.setSelected(true);\n companyNameLbl.setText(\"Company Name\");\n OutSourced item = (OutSourced) partSelected;\n idTxt.setText(Integer.toString(item.getPartID()));\n idTxt.setEditable(false);\n nameTxt.setText(item.getPartName());\n invTxt.setText(Integer.toString(item.getPartInStock()));\n costTxt.setText(Double.toString(item.getPartPrice()));\n maxTxt.setText(Integer.toString(item.getMax()));\n minTxt.setText(Integer.toString(item.getMin()));\n idTxt.setText(Integer.toString(item.getPartID()));\n companyNameTxt.setText(item.getCompanyName());\n }\n if (partSelected instanceof InHouse) { // determines if part Is InHouse\n inHouseRbtn.setSelected(true);\n companyNameLbl.setText(\"Machine ID\");\n InHouse itemA = (InHouse) partSelected;\n idTxt.setText(Integer.toString(itemA.getPartID()));\n idTxt.setEditable(false);\n nameTxt.setText(itemA.getPartName());\n invTxt.setText(Integer.toString(itemA.getPartInStock()));\n costTxt.setText(Double.toString(itemA.getPartPrice()));\n maxTxt.setText(Integer.toString(itemA.getMax()));\n minTxt.setText(Integer.toString(itemA.getMin()));\n idTxt.setText(Integer.toString(itemA.getPartID()));\n companyNameTxt.setText(Integer.toString(itemA.getMachineID()));\n\n }\n }", "private void getRangeDetails(String divCode) {\n List<String> rangeName = new ArrayList<String>();\r\n //rangeName.add(\"Select Range\");\r\n rangeKey = new HashMap<>();\r\n db = openOrCreateDatabase(\"sltp.db\", MODE_PRIVATE, null);\r\n Cursor cursor = db.rawQuery(\"select * from m_range where d_id='\" + divCode + \"' order by r_name\", null);\r\n cursor.moveToFirst();\r\n if (cursor.moveToFirst()) {\r\n do {\r\n rangeName.add(cursor.getString(cursor.getColumnIndex(\"r_name\")));\r\n rangeKey.put(cursor.getString(cursor.getColumnIndex(\"r_name\")),\r\n cursor.getString(cursor.getColumnIndex(\"r_id\")));\r\n } while (cursor.moveToNext());\r\n }\r\n cursor.close();\r\n db.close();\r\n final ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(getApplicationContext(), R.layout.spinner_row, rangeName);\r\n dataAdapter.setDropDownViewResource(R.layout.spinner_row);\r\n range.setAdapter(dataAdapter);\r\n range.setPaddingSafe(0, 0, 0, 0);\r\n }", "@Override\n\tpublic int editBook(bookInfo bookinfo) {\n\t\treturn 0;\n\t}", "public void loadLecturer2(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec2.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n}", "protected abstract void loadItemsInternal();", "@Override\n\tpublic void updateBookData() {\n\t\tList<Book> bookList = dao.findByHql(\"from Book where bookId > 1717\",null);\n\t\tString bookSnNumber = \"\";\n\t\tfor(Book book:bookList){\n\t\t\tfor (int i = 1; i <= book.getLeftAmount(); i++) {\n\t\t\t\t// 添加图书成功后,根据ISBN和图书数量自动生成每本图书SN号\n\t\t\t\tBookSn bookSn = new BookSn();\n\t\t\t\t// 每本书的bookSn号根据书的ISBN号和数量自动生成,\n\t\t\t\t// 如书的ISBN是123,数量是3,则每本书的bookSn分别是:123-1,123-2,123-3\n\t\t\t\tbookSnNumber = \"-\" + i;//book.getIsbn() + \"-\" + i;\n\t\t\t\tbookSn.setBookId(book.getBookId());\n\t\t\t\tbookSn.setBookSN(bookSnNumber);\n\t\t\t\t// 默认书的状态是0表示未借出\n\t\t\t\tbookSn.setStatus(new Short((short) 0));\n\t\t\t\t// 添加bookSn信息\n\t\t\t\tbookSnDao.save(bookSn);\n\t\t\t}\n\t\t}\n\t}", "@FXML\n private void setDetailsItemOnSelect() {\n Ad ad = tableViewAds.getSelectionModel().getSelectedItem();\n Location location = LocationDAO.LocationSEL(ad.getLocationID()).get(0);\n Content content = ContentDAO.ContentSEL(ad.getContentD()).get(0);\n Price price = PriceDAO.PriceSEL(ad.getPriceID()).get(0);\n\n ad.setAdTotalPrice(Float.valueOf((\n price.getPriceCostClick()\n .multiply(new BigDecimal(ad.getAdClickNumber()))\n .add(\n price.getPriceCostView()\n .multiply(new BigDecimal(ad.getAdViewNumber())))\n ).toString()));\n\n loadLocationDetailsValue(ad, location);\n loadContentDetailsValue(content);\n loadPriceDetailsValue(ad, price);\n\n //Ad Titled Pane\n this.datePickerAdsStopDate.setValue(LocalDate.parse(dateFormat.format(ad.getStopDate().getTime()), DateTimeFormatter.ofPattern(\"yyyy-MM-dd\")));\n this.datePickerAdsStartDate.setValue(LocalDate.parse(dateFormat.format(ad.getStartDate().getTime()), DateTimeFormatter.ofPattern(\"yyyy-MM-dd\")));\n\n this.comboBoxPrice.setValue(ad.getPriceID());\n this.comboBoxContent.setValue(ad.getContentD());\n this.comboBoxLocation.setValue(ad.getLocationID());\n this.comboBoxClient.setValue(ad.getClientID());\n this.comboBoxAuthor.setValue(ad.getAuthorID());\n }", "private static void loadBooks() {\n\tbookmarks[2][0]=BookmarkManager.getInstance().createBook(4000,\"Walden\",\"\",1854,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][1]=BookmarkManager.getInstance().createBook(4001,\"Self-Reliance and Other Essays\",\"\",1900,\"Dover Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][2]=BookmarkManager.getInstance().createBook(4002,\"Light From Many Lamps\",\"\",1960,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][3]=BookmarkManager.getInstance().createBook(4003,\"Head First Design Patterns\",\"\",1944,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][4]=BookmarkManager.getInstance().createBook(4004,\"Effective Java Programming Language Guide\",\"\",1990,\"Wilder Publications\",new String[] {\"Eric Freeman\",\"Bert Bates\",\"Kathy Sierra\",\"Elisabeth Robson\"},\"Philosophy\",4.3);\n}", "private void getBookItemIdForPlacingBook(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws ServletException, IOException {\n\t\t\n\t\tString bookItemCode = (String) session.getAttribute(\"bookItemCodeFromPlacingBook\");\n\t\t//Get value properties from bookItem\n\t\t\n\t\tthis.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID] = \"\";\n\t\t\n\t\tthis.bookItem.getValueInformations(bookItemCode, BookItem.BOOK_ITEM_CODE);\n\t\t\n\t\tif(this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID].equals(\"\")) {\n\t\t\t//Display error \n\t\t\t\n\t\t\tsession.setAttribute(\"styleErrorPlaceBook\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleSuccessResutPlaceBook\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorOver15Days\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorOver10BooksLending\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorSameBook\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorNotExistBookItem\", \"display: block;\");\n\t\t\tsession.setAttribute(\"errorNotAvaiablePlaceBook\", \"display: none;\");\n\t\t\t//Create dispatcher and forward to main.jsp\n\t\t\t\n\t\t\tdispatcher = getServletContext().getRequestDispatcher(\"/main.jsp\");\n\t\t\tdispatcher.forward(request, response);\n\t\t\t\n\t\t\treturn;\n\t\t} else {\n\t\t\t//Set some attributes\n\t\t\t\n\t\t\tsession.setAttribute(\"bookItemIdFromController\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID]);\n\t\t\tsession.setAttribute(\"typeRequestToLendingController\", \"returnGetBookItemFromBookItemController\");\n\t\t\t//Send direct to LendingBookController\n\t\t\t\n\t\t\tresponse.sendRedirect(\"LendingController\");\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}", "@Override\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\t\tmBookLocationStr = getLocationKey(arg2);\n\t\t\t\t\t\t// Log.e(\"LOCATION-INDEX\", arg2 + \"\");\n\t\t\t\t\t}", "@Override\n\tpublic void loadData() {\n\t\tint sel = getSelected() == null ? -1 : getSelected().getWardId();\n\t\ttry {\n\t\t\tList<Ward> list = searchInput.getText().equals(\"\") ? WardData.getList()\n\t\t\t\t\t: WardData.getBySearch(searchInput.getText());\t\t\t\n\t\t\ttableData.removeAll(tableData);\n\t\t\tfor (Ward p : list) {\n\t\t\t\ttableData.add(p);\n\t\t\t}\n\t\t} catch (DBException e) {\n\t\t\tGlobal.log(e.getMessage());\n\t\t}\n\n\t\tif (sel > 0) {\n\t\t\tsetSelected(sel);\n\t\t}\n\t}", "private void checkBookByCodeBook(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws IOException, ServletException {\n\t\t\n\t\tString codeBookItem = request.getParameter(\"n_textBookCodeCheckBook\");\n\t\t//Reset all value of bookItem\n\t\t\n\t\tfor(int i = 0; i < BookItem.BOOK_ITEM_SIZE_PROPERTES; i ++) {\n\t\t\tthis.bookItem.getValueProperties()[i] = \"\";\n\t\t}\n\t\t//Get book item information by code book\n\t\t\n\t\tthis.bookItem.getValueInformations(codeBookItem, BookItem.BOOK_ITEM_CODE);\n\t\t\n\t\tif(this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID].equals(\"\")) {\n\t\t\t//Set attributes of session variable to show error\n\t\t\t\n\t\t\tsession.setAttribute(\"styleNotFoundCheckBook\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleResultFromCheckBook\", \"display: none;\");\n\t\t\t//Forward to main.jsp\n\t\t\t\n\t\t\tdispatcher = getServletContext().getRequestDispatcher(\"/main.jsp\");\n\t\t\tdispatcher.forward(request, response);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\t//Set attribute to display informations to client\n\t\t\t\n\t\t\tsession.setAttribute(\"srcImageCheckBookPart\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_IMAGE]);\n\t\t\tsession.setAttribute(\"nameBookCheckBookPart\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_TITLE]);\n\t\t\tsession.setAttribute(\"codeBookCheckBookPart\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_CODE]);\n\t\t\tsession.setAttribute(\"typeExplainBookCheckBookPart\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_TYPE_EXPLAIN]);\n\t\t\tsession.setAttribute(\"authorBookCheckBookPart\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_AUTHOR]);\n\t\t\tsession.setAttribute(\"publisherBookCheckBookPart\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_PUBLISHER]);\n\t\t\tsession.setAttribute(\"publicationDateBookCheckBookPart\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_DAY_PUBPLICATION]);\n\t\t\tsession.setAttribute(\"summaryBookCheckBookPart\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_SUMMARY]);\n\t\t\t//Set value of some variables to display result\n\t\t\t\n\t\t\tsession.setAttribute(\"styleNotFoundCheckBook\", \"display: none;\");\n\t\t\tsession.setAttribute(\"styleResultFromCheckBook\", \"display: block;\");\n\t\t\t//Set bookItemId to get when sendRedirect to BookTitleController\n\t\t\t\n\t\t\tsession.setAttribute(\"bookItemIdFromBookItemController\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID]);\n\t\t\tsession.setAttribute(\"requestFromBookItem\", \"chekBookByCodeBook\");\n\t\t\t//Redirect to BookTitleController\n\t\t\t\n\t\t\tresponse.sendRedirect(\"BookTitleController\");\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}", "private void setUpTable()\n {\n //Setting the outlook of the table\n bookTable.setColumnReorderingAllowed(true);\n bookTable.setColumnCollapsingAllowed(true);\n \n \n bookTable.setContainerDataSource(allBooksBean);\n \n \n //Setting up the table data row and column\n /*bookTable.addContainerProperty(\"id\", Integer.class, null);\n bookTable.addContainerProperty(\"book name\",String.class, null);\n bookTable.addContainerProperty(\"author name\", String.class, null);\n bookTable.addContainerProperty(\"description\", String.class, null);\n bookTable.addContainerProperty(\"book genres\", String.class, null);\n */\n //The initial values in the table \n db.connectDB();\n try{\n allBooks = db.getAllBooks();\n }catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n db.closeDB();\n allBooksBean.addAll(allBooks);\n \n //Set Visible columns (show certain columnes)\n bookTable.setVisibleColumns(new Object[]{\"id\",\"bookName\", \"authorName\", \"description\" ,\"bookGenreString\"});\n \n //Set height and width\n bookTable.setHeight(\"370px\");\n bookTable.setWidth(\"1000px\");\n \n //Allow the data in the table to be selected\n bookTable.setSelectable(true);\n \n //Save the selected row by saving the change Immediately\n bookTable.setImmediate(true);\n //Set the table on listener for value change\n bookTable.addValueChangeListener(new Property.ValueChangeListener()\n {\n public void valueChange(ValueChangeEvent event) {\n \n }\n\n });\n }", "public void load2() throws Exception {\n String query = \"select * from catalog_snapshot where item_id = \" + item_id + \" and facility_id = '\" + facility_id + \"'\";\n query += \" and fac_item_id = '\" + this.fac_item_id + \"'\";\n DBResultSet dbrs = null;\n ResultSet rs = null;\n try {\n dbrs = db.doQuery(query);\n rs = dbrs.getResultSet();\n if (rs.next()) {\n setItemId( (int) rs.getInt(\"ITEM_ID\"));\n setFacItemId(rs.getString(\"FAC_ITEM_ID\"));\n setMaterialDesc(rs.getString(\"MATERIAL_DESC\"));\n setGrade(rs.getString(\"GRADE\"));\n setMfgDesc(rs.getString(\"MFG_DESC\"));\n setPartSize( (float) rs.getFloat(\"PART_SIZE\"));\n setSizeUnit(rs.getString(\"SIZE_UNIT\"));\n setPkgStyle(rs.getString(\"PKG_STYLE\"));\n setType(rs.getString(\"TYPE\"));\n setPrice(BothHelpObjs.makeBlankFromNull(rs.getString(\"PRICE\")));\n setShelfLife( (float) rs.getFloat(\"SHELF_LIFE\"));\n setShelfLifeUnit(rs.getString(\"SHELF_LIFE_UNIT\"));\n setUseage(rs.getString(\"USEAGE\"));\n setUseageUnit(rs.getString(\"USEAGE_UNIT\"));\n setApprovalStatus(rs.getString(\"APPROVAL_STATUS\"));\n setPersonnelId( (int) rs.getInt(\"PERSONNEL_ID\"));\n setUserGroupId(rs.getString(\"USER_GROUP_ID\"));\n setApplication(rs.getString(\"APPLICATION\"));\n setFacilityId(rs.getString(\"FACILITY_ID\"));\n setMsdsOn(rs.getString(\"MSDS_ON_LINE\"));\n setSpecOn(rs.getString(\"SPEC_ON_LINE\"));\n setMatId( (int) rs.getInt(\"MATERIAL_ID\"));\n setSpecId(rs.getString(\"SPEC_ID\"));\n setMfgPartNum(rs.getString(\"MFG_PART_NO\"));\n\n //trong 3-27-01\n setCaseQty(BothHelpObjs.makeZeroFromNull(rs.getString(\"CASE_QTY\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n HelpObjs.monitor(1,\n \"Error object(\" + this.getClass().getName() + \"): \" + e.getMessage(), null);\n throw e;\n } finally {\n dbrs.close();\n }\n return;\n }", "@FXML\n\t private void loadlistbook(ActionEvent event) {\n\t \tloadwindow(\"views/booklist.fxml\", \"View Book List\");\n\t }", "private void loadBtechData()\r\n\t{\r\n\t\tlist.clear();\r\n\t\tString qu = \"SELECT * FROM BTECHSTUDENT\";\r\n\t\tResultSet result = databaseHandler.execQuery(qu);\r\n\r\n\t\ttry {// retrieve student information form database\r\n\t\t\twhile(result.next())\r\n\t\t\t{\r\n\t\t\t\tString studendID = result.getString(\"studentNoB\");\r\n\t\t\t\tString nameB = result.getString(\"nameB\");\r\n\t\t\t\tString studSurnameB = result.getString(\"surnameB\");\r\n\t\t\t\tString supervisorB = result.getString(\"supervisorB\");\r\n\t\t\t\tString emailB = result.getString(\"emailB\");\r\n\t\t\t\tString cellphoneB = result.getString(\"cellphoneNoB\");\r\n\t\t\t\tString courseB = result.getString(\"stationB\");\r\n\t\t\t\tString stationB = result.getString(\"courseB\");\r\n\r\n\t\t\t\tlist.add(new StudentProperty(studendID, nameB, studSurnameB,\r\n\t\t\t\t\t\tsupervisorB, emailB, cellphoneB, courseB, stationB));\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\t// Transfer the list data on the table\r\n\t\tstudentBTable.setItems(list);\r\n\t}", "public void loadLecturer1(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec1.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\n}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int pos, long id) {\n DashboardResModel.BookData bookData = (DashboardResModel.BookData) adapterView.getItemAtPosition(pos);\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"data\", bookData);\n FragmentBookInfo fragment = new FragmentBookInfo();\n fragment.setArguments(bundle);\n ((MainActivity) getActivity()).loadFragment(fragment);\n }", "public int getBook_id() {\n\treturn book_id;\n}", "@Override\n\tpublic void load() {\n\t\tsuper.load();\n\t\t\n\t\tUriAdapter adapter = new UriAdapter(config);\n\t\tbnetMap = loadBnetMap(adapter, config.getStoreUri(), getName());\n\t\tadapter.close();\n\t\t\n\t\titemIds = bnetMap.keySet();\n\t}", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "private void populateEducation() {\n try {\n vecEducationKeys = new Vector();\n vecEducationLabels = new Vector();\n //MSB -09/01/05 -- Changed configuration file and Keys\n // config = new ConfigMgr(\"customer.cfg\");\n // String strSubTypes = config.getString(\"EDUCATION_TYPES\");\n// config = new ConfigMgr(\"ArmaniCommon.cfg\");\n config = new ArmConfigLoader();\n String strSubTypes = config.getString(\"EDUCATION\");\n StringTokenizer stk = null;\n int i = -1;\n if (strSubTypes != null && strSubTypes.trim().length() > 0) {\n stk = new StringTokenizer(strSubTypes, \",\");\n } else\n return;\n if (stk != null) {\n types = new String[stk.countTokens()];\n while (stk.hasMoreTokens()) {\n types[++i] = stk.nextToken();\n String key = config.getString(types[i] + \".CODE\");\n vecEducationKeys.add(key);\n String value = config.getString(types[i] + \".LABEL\");\n vecEducationLabels.add(value);\n }\n }\n cbxEducation.setModel(new DefaultComboBoxModel(vecEducationLabels));\n } catch (Exception e) {}\n }", "@FXML\n public void returnOrBorrowBook() {\n LibrarySystem.setScene(\n new SearchBook(reader, null, readerlist, booklist));\n }", "private void loadDataCombobox(ModelMap model)\r\n\t{\n\t\tList<SYS_PARAMETER> vendorList = sysParameterDao.getVendorList();\r\n\t\tmodel.addAttribute(\"vendorList\", vendorList);\r\n\t\t\r\n\t\t// Danh sach status\r\n\t\tList<SYS_PARAMETER> statusList = sysParameterDao.getStatusDyTrx();\r\n\t\tmodel.addAttribute(\"statusList\", statusList);\r\n\t\t\r\n\t\t// Danh sach type\r\n\t\tList<SYS_PARAMETER> typeList = sysParameterDao.getTypeDyTrx3g();\r\n\t\tmodel.addAttribute(\"typeList\", typeList);\r\n\t\t\r\n\t\t// Danh sach gợi nhớ bscid\r\n\t\tList<VRpDyTrx3g> getRncidList = vRpDyTrx3gDAO.getRncidList();\r\n\t\tString rncidArray=\"var rncidList = new Array(\";\r\n\t\tString cn=\"\";\r\n\t\tfor (int i=0;i<getRncidList.size();i++) {\r\n\t\t\trncidArray = rncidArray + cn +\"\\\"\"+getRncidList.get(i).getNe()+\"\\\"\";\r\n\t\t\tcn=\",\";\r\n\t\t}\r\n\t\trncidArray = rncidArray+\");\";\r\n\t\tmodel.addAttribute(\"rncidList\", rncidArray);\r\n\t\t\r\n\t\t// Danh sach gợi nhớ site/cell\r\n\t\tList<VRpDyTrx3g> siteCellList = vRpDyTrx3gDAO.getSiteCell3gList();\r\n\t\tString siteCellArray=\"var siteCellList = new Array(\";\r\n\t\tString cn1=\"\";\r\n\t\tfor (int i=0;i<siteCellList.size();i++) {\r\n\t\t\tsiteCellArray = siteCellArray + cn1 +\"\\\"\"+siteCellList.get(i).getCellid()+\"\\\"\";\r\n\t\t\tcn1=\",\";\r\n\t\t}\r\n\t\tsiteCellArray = siteCellArray+\");\";\r\n\t\tmodel.addAttribute(\"siteCellList\", siteCellArray);\r\n\t}", "private void reloadBook() {\n\t\tnew SwingWorker<Void, Void>() {\n\t\t\t@Override\n\t\t\tprotected Void doInBackground() {\n\t\t\t\tbook.reload();\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void done() {\n\t\t\t\tstateChangeRequest(Key.BOOK, null);\n\t\t\t}\n\t\t}.execute();\n\t}", "private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }", "private void populateProfession() {\n try {\n vecProfessionKeys = new Vector();\n StringTokenizer stk = null;\n vecProfessionLabels = new Vector();\n //MSB -09/01/05 -- Changed configuration file.\n // config = new ConfigMgr(\"customer.cfg\");\n// config = new ConfigMgr(\"ArmaniCommon.cfg\");\n config = new ArmConfigLoader();\n String strSubTypes = config.getString(\"PROFESSION\");\n int i = -1;\n if (strSubTypes != null && strSubTypes.trim().length() > 0) {\n stk = new StringTokenizer(strSubTypes, \",\");\n } else\n return;\n if (stk != null) {\n types = new String[stk.countTokens()];\n while (stk.hasMoreTokens()) {\n types[++i] = stk.nextToken();\n String key = config.getString(types[i] + \".CODE\");\n vecProfessionKeys.add(key);\n String value = config.getString(types[i] + \".LABEL\");\n vecProfessionLabels.add(value);\n }\n }\n cbxProfession.setModel(new DefaultComboBoxModel(vecProfessionLabels));\n } catch (Exception e) {}\n }", "private void getCodeBookForPayBook(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws IOException {\n\t\t\n\t\tString bookItemId = (String) session.getAttribute(\"bookItemIdForPayBookPart\");\n\t\t//Get value properties from bookItem variable\n\t\t\n\t\tthis.bookItem.getValueInformations(bookItemId, BookItem.BOOK_ITEM_ID);\n\t\t//Set attribute to display to user\n\t\t\n\t\tsession.setAttribute(\"codeBookPayBookPart\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_CODE]);\n\t\tsession.setAttribute(\"requestFromBookItem\", \"getBookTitleIdForPayBookController\");\n\t\t//Send redirect to BookTitleController\n\t\t\n\t\tresponse.sendRedirect(\"BookTitleController\");\n\t\t\n\t\treturn;\n\t}", "private void initialize(BookVO bookVO) {\n \n BookDAO bookDAO = new BookDAO();\n \n frame = new setGUI();\n frame.getContentPane().setBackground(new Color(250,233,220));\n frame.setBounds(750,250, 450, 600);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.getContentPane().setLayout(null);\n \n JLabel lblNewLabel = new JLabel(\"\\uC544\\uD30C\\uC694\");\n lblNewLabel.setFont(new Font(\"맑은 고딕\", Font.BOLD, 35));\n lblNewLabel.setForeground(new Color(250, 138, 98));\n lblNewLabel.setBounds(153, 37, 180, 42);\n frame.getContentPane().add(lblNewLabel);\n \n JComboBox cb_state = new JComboBox();\n cb_state.setModel(new DefaultComboBoxModel(new String[] {\"\\uCC45\\uC758 \\uC0C1\\uD0DC\", \"1. \\uCC22\\uAE40\", \"2. \\uB099\\uC11C\", \"3. \\uC624\\uC5FC\", \"4. \\uC624\\uB798\\uB428, \\uB0A1\\uC74C\", \"5. \\uAE30\\uD0C0(\\uC758\\uACAC\\uC744 \\uC801\\uC5B4\\uC8FC\\uC138\\uC694)\"}));\n cb_state.setFont(new Font(\"굴림\", Font.PLAIN, 15));\n cb_state.setBounds(44, 139, 159, 33);\n frame.getContentPane().add(cb_state);\n \n JComboBox cb_stateLevel = new JComboBox();\n cb_stateLevel.setModel(new DefaultComboBoxModel(new String[] {\"\\uC0C1\\uD0DC \\uC815\\uB3C4\", \"1. \\uC0C1\", \"2. \\uC911\", \"3. \\uD558\"}));\n cb_stateLevel.setFont(new Font(\"굴림\", Font.PLAIN, 15));\n cb_stateLevel.setBounds(229, 139, 154, 33);\n frame.getContentPane().add(cb_stateLevel);\n \n JTextArea textArea = new JTextArea(\"20자 이내로 부탁드립니다.\",21, 0);\n \n textArea.setFont(new Font(\"새굴림\", Font.PLAIN, 13));\n textArea.setBounds(35, 216, 355, 222);\n //textArea.setText(\"20자 이내로 부탁드립니다.\");\n \n textArea.addKeyListener(new KeyAdapter() {\n public void keyTyped(KeyEvent e) {\n if (textArea.getText().length() == 21) {\n e.consume();\n }\n }\n });//20글자 제한\n \n textArea.addMouseListener(new MouseAdapter(){\n @Override\n public void mouseClicked(MouseEvent e){\n \t textArea.setText(\"\");\n }\n });//기본문장 클릭하면 자동삭제\n \n frame.getContentPane().add(textArea);\n \n //BookVO bookVO2 = daoBook.getAllInfo(voBook);\n \n JButton btn_insert = new RoundedButton(\"\\uB4F1\\uB85D\");\n btn_insert.setForeground(new Color(255, 255, 255));\n btn_insert.setBackground(new Color(241, 109, 80));\n \n\n btn_insert.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n \n String bookIsbn = bookVO.getISBN();\n int bookId = 1; // bookVO에서 가져와야되는데 현재 화면의 bookVO는 id가 없음 => 다음프로젝트에서는 잘생각하고 디자인할 것...\n String userId = UserLoginGUI.userIdStatic;\n \n \n int bookState = cb_state.getSelectedIndex(); // SICK_CAT\n int stateLevel = cb_stateLevel.getSelectedIndex(); // SICK_LEVEL\n String comment = textArea.getText();\n \n// System.out.println(bookIsbn);\n// System.out.println(bookId);\n// System.out.println(userId);\n// System.out.println(bookState);\n// System.out.println(stateLevel);\n// System.out.println(comment);\n \n int sickResultCnt = bookDAO.insertSickReview(bookIsbn, bookId, userId, bookState, stateLevel, comment);\n \n \n if (sickResultCnt > 0) {\n JOptionPane.showMessageDialog(null, \n \"아파요 등록 완료!!\", \"Message\", \n JOptionPane.INFORMATION_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, \n \"아파요 등록 실패\", \"Message\", \n JOptionPane.ERROR_MESSAGE);\n }\n \n \n// txt_bookName.setText(bookVO2.getBookName());\n \n //SickBookListVO voSick = new SickBookListVO(null, null, null, null, bookState, stateLevel, null, comment);\n //daoSick.insertSick(voSick);\n \n }\n });\n btn_insert.setFont(new Font(\"맑은 고딕\", Font.BOLD, 21));\n btn_insert.setBounds(50, 470, 122, 34);\n frame.getContentPane().add(btn_insert);\n \n JButton btn_close = new RoundedButton(\"\\uB2EB\\uAE30\");\n btn_close.setForeground(new Color(255, 255, 255));\n btn_close.setBackground(new Color(246, 147, 99));\n btn_close.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n frame.dispose();\n SwingUtilities.updateComponentTreeUI(BookInfoGUI.getFrame());\n BookInfoGUI.getFrame().invalidate();\n BookInfoGUI.getFrame().validate();\n BookInfoGUI.getFrame().repaint();\n \n BookInfoGUI.getFrame().setVisible(true);\n \n }\n });\n btn_close.setFont(new Font(\"맑은 고딕\", Font.BOLD, 21));\n btn_close.setBounds(250, 470, 122, 34);\n frame.getContentPane().add(btn_close);\n \n JPanel panel = new JPanel();\n panel.setToolTipText(\"\");\n panel.setBorder(new TitledBorder(UIManager.getBorder(\"TitledBorder.border\"), \"\\uC790\\uC138\\uD788 \\uC54C\\uB824\\uC8FC\\uC138\\uC694\", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n panel.setBounds(28, 196, 370, 252);\n frame.getContentPane().add(panel);\n \n \n }", "private void getBookItemCodeForCheckPlacingBook(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws ServletException, IOException {\n\t\t\n\t\tString bookItemId = (String) session.getAttribute(\"bookItemIdFromCheckPlacingInformation\");\n\t\t\n\t\tthis.bookItem.getValueInformations(bookItemId, BookItem.BOOK_ITEM_ID);\n\t\t\n\t\tsession.setAttribute(\"codeBookCheckAcceptRegisterBook\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_CODE]);\n\t\tsession.setAttribute(\"bookItemIdAcceptRegisterBeforeBook\", bookItemId);\n\t\t//Create dispatcher and forward to main.jsp\n\t\t\n\t\tdispatcher = getServletContext().getRequestDispatcher(\"/main.jsp\");\n\t\tdispatcher.forward(request, response);\n\t\t\n\t\treturn;\n\t}", "public void loadCakeID() throws SQLException, ClassNotFoundException {\r\n ArrayList<Cake> cakeArrayList = new CakeController().getAllCake();\r\n ArrayList<String> ids = new ArrayList<>();\r\n\r\n for (Cake cake : cakeArrayList) {\r\n ids.add(cake.getCakeID());\r\n }\r\n\r\n cmbCakeID.getItems().addAll(ids);\r\n }", "@Override\n public void onCreate(Bundle savedInstanceState){\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_returntask);\n\n ListView BookListLV;\n\n BookListLV = findViewById(R.id.RETURNT_LVbooks);\n bookDataList = new ArrayList<>();\n bookAdapter = new ReturningTaskCustomList(this, bookDataList);\n BookListLV.setAdapter(bookAdapter);\n\n db = FirebaseFirestore.getInstance();\n mAuth = FirebaseAuth.getInstance();\n String currentUID = mAuth.getCurrentUser().getUid();\n collectionReference = db.collection(\"users\" + \"/\" + currentUID + \"/requested\");\n\n collectionReference.addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable\n FirebaseFirestoreException error) {\n bookDataList.clear();\n for(QueryDocumentSnapshot doc: queryDocumentSnapshots)\n {\n if (!doc.getData().containsKey(\"blank\")) {\n\n if (doc.getData().get(\"status\").toString().equals(\"borrowed\")) {\n ArrayList<String> owner = new ArrayList<>();\n owner.add(doc.getData().get(\"owners\").toString());\n\n Book book = new Book(doc.getData().get(\"title\").toString(),\n doc.getData().get(\"author\").toString(),\n owner.get(0), doc.getId().replace(\"-\", \"\"));\n //Log.e(\"ISB\", doc.getId());\n //Log.e(\"title\", doc.getData().get(\"title\").toString());\n bookDataList.add(book);\n }\n }\n }\n bookAdapter.notifyDataSetChanged();\n }\n });\n\n BookListLV.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n selectedISBN = bookDataList.get(i).getISBN();\n otherUID = bookDataList.get(i).getOwner();\n Log.e(\"SELECTED BOOK\", bookDataList.get(i).getTitle());\n Log.e(\"SELECTED BOOK ISBN\", bookDataList.get(i).getISBN());\n openScanner();\n\n }\n });\n\n }", "public String getBook() {\n\t\treturn book;\r\n\t}", "public LoadRestItem(int fno,String fname,int masterno,String mastername,int itemCode,String itemName,double dUnitPrice,double dTaxPrice,\n int dtaxClass,double mUnitPrice,double mTaxPrice,int mTaxClass,int currencyId,int subMenu){\n this.familyNno = fno;\n this.familyName = fname;\n this.masterNo = masterno;\n this.masterName = mastername;\n this.itemCode = itemCode;\n this.itemName = itemName;\n this.dUnitPrice = dUnitPrice;\n this.dTaxPrice = dTaxPrice;\n this.dtaxClass = dtaxClass;\n this.mUnitPrice = mUnitPrice;\n this.mTaxPrice = mTaxPrice;\n this.mTaxClass = mTaxClass; \n this.currencyId = currencyId;\n this.subMenu = subMenu;\n }", "public void setBookid(Integer bookid) {\r\n\t\tthis.bookid = bookid;\r\n\t}", "public void LoadSingleItemData(View view) {\n loadSingleItem(friendsDatabase);\n }", "public void setBook(Book book) {\n this.book = book;\n }", "public void viewLibraryBooks(){\n\t\tIterator booksIterator = bookMap.keySet().iterator();\n\t\tint number, i=1;\n\t\tSystem.out.println(\"\\n\\t\\t===Books in the Library===\\n\");\n\t\twhile(booksIterator.hasNext()){\t\n\t\t\tString current = booksIterator.next().toString();\n\t\t\tnumber = bookMap.get(current).size();\n\t\t\tSystem.out.println(\"\\t\\t[\" + i + \"] \" + \"Title: \" + current);\n\t\t\tSystem.out.println(\"\\t\\t Quantity: \" + number + \"\\n\");\t\t\t\n\t\t\ti += 1; \n\t\t}\n\t}", "@Override\r\n\tpublic ArrayList<BooksClass> readItem(String address) {\n\t\treturn null;\r\n\t}", "public void open(String fileName){\r\n \tString inStr = \"\";\r\n \tString[] parts;\r\n \tString title = \"\";\r\n \tString author = \"\";\r\n \tString year = \"\";\r\n \tString availability = \"\";\r\n \tString type = \"\";\r\n \tString temp = \"\";\r\n \t\r\n \titems.clear();\r\n \t\r\n \ttry{\r\n \t BufferedReader ir = new BufferedReader(new FileReader(fileName + \".txt\"));\r\n \t while((inStr = ir.readLine()) != null){\r\n \t \t\t//First we have to split the string\r\n \t \t\t//at every comma, since the file \r\n \t \t\t//contains a comma seperated list.\r\n\t\tparts = inStr.split(\", \");\r\n\t\tif(parts.length == 1)\r\n\t\t\tcontinue;\r\n\r\n\t\t \r\n\t\tfor(int i = 0; i < parts.length; i++){\r\n\t\t\tString[] pts = parts[i].split(\": \");\r\n\t\t\t\r\n\t\t\t //A switch statement makes it a little\r\n\t\t\t //easier and cleaner when splitting up\r\n\t\t\t //the elements for the second time,\r\n\t\t\t //by the :\r\n\t\t\tswitch(i) {\r\n \t\t\t\tcase 0:\r\n \t\t\t\t\ttitle = pts[1];\r\n\t \t\t\tbreak;\r\n \t\t\t\tcase 1:\r\n \t\t\t\t\ttemp = pts[1];\r\n \t\t\t\tbreak;\r\n\t \t\t\tcase 2:\r\n \t\t\t\t\tavailability = pts[1];\r\n \t\t\t\tbreak;\r\n \t\t\t\tcase 3:\r\n \t\t\t\t\ttype = pts[1];\r\n\t \t\t\tbreak;\r\n \t\t\t}\r\n \t \t}\t\r\n \t \t\r\n \t \t\t//Type and Title are common to all items,\r\n \t \t\t//so we dont have to check the itemType\r\n \t \t\t//before printing this part.\r\n\t\tSystem.out.println(\"Type: \" + type);\t\r\n\t\tSystem.out.println(\"Title: \" + title);\r\n\t\t\r\n\t\t\t//Now we have to check if the type is a book\r\n\t\t\t//or a magazine, since the two will have\r\n\t\t\t//different information attached to them.\r\n \t\tif(type.equalsIgnoreCase(\"BOOK\")) {\r\n\t\t\tSystem.out.println(\"Author: \" + temp);\r\n\t\t\tBook b = new Book(title, temp);\r\n\t\t\tif(availability.equalsIgnoreCase(\"true\"))\r\n\t\t\t\tb.setAvailability(true);\r\n\t\t\telse\r\n\t\t\t\tb.setAvailability(false);\r\n\t\t\titems.add(b);\r\n \t\t} else {\r\n\t\t\tSystem.out.println(\"Year: \" + temp);\r\n\t\t\tMagazine b = new Magazine(title, Integer.parseInt(temp));\r\n\t\t\tSystem.out.println(\"Control: \" + availability);\r\n\t\t\tif(availability.equalsIgnoreCase(\"true\"))\r\n\t\t\t\tb.setAvailability(true);\r\n\t\t\telse\r\n\t\t\t\tb.setAvailability(false);\r\n\t\t\titems.add(b);\r\n \t\t}\r\n \t\t\r\n \t\t\t//Since Availability is also common to all items,\r\n \t\t\t//it can be printed here without testing the\r\n \t\t\t//itemType. \r\n\t\tSystem.out.println(\"Availability: \" + availability);\r\n\t\tSystem.out.println(\"\");\r\n\t }\r\n\r\n ir.close();\t//Close file when done.\r\n \t } catch (FileNotFoundException e) {\r\n System.out.println(\"ERROR: file not found\");\r\n } catch (IOException e) {\r\n System.out.println(\"ERROR: file I/O problem\");\r\n } catch (NullPointerException e){\r\n \tSystem.out.println(\"ERROR: Null Pointer.\");\r\n }\r\n }", "public void loadBrandDataToTable() {\n\n\t\tbrandTableView.clear();\n\t\ttry {\n\n\t\t\tString sql = \"SELECT * FROM branddetails WHERE active_indicator = 1\";\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(sql);\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tbrandTableView.add(new BrandsModel(resultSet.getInt(\"brnd_slno\"), resultSet.getInt(\"active_indicator\"),\n\t\t\t\t\t\tresultSet.getString(\"brand_name\"), resultSet.getString(\"sup_name\"),\n\t\t\t\t\t\tresultSet.getString(\"created_at\"), resultSet.getString(\"updated_at\")));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tbrandName.setCellValueFactory(new PropertyValueFactory<>(\"brand_name\"));\n\t\tsupplierName.setCellValueFactory(new PropertyValueFactory<>(\"sup_name\"));\n\t\tdetailsOfBrands.setItems(brandTableView);\n\t}", "@Override\r\n\t\t\tpublic Book doInTransaction(TransactionStatus status) {\n\t\t\t\tBook book=new Book();\r\n\t\t\t\tbook.setISBN(ISBN);\r\n\t\t\t\tbookDAO.addBook(book);\r\n\t\t\t\treturn book;\r\n\t\t\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODOcomboBoxCh\n remplirTableView();\n comboBoxCh.getItems().addAll(\"Code Adherent\", \"Nom Adherent\");\n }", "Book getBookByTitle(String title);", "public void loadNew(Integer pr_number) throws Exception {\n String query = \"select * from pr_history_view where item_id = \" + item_id + \" and facility_id = '\" + facility_id + \"'\";\n query += \" and fac_part_no = '\" + this.fac_item_id + \"'\";\n query += \" and pr_number = \" + pr_number.intValue();\n DBResultSet dbrs = null;\n ResultSet rs = null;\n try {\n dbrs = db.doQuery(query);\n rs = dbrs.getResultSet();\n if (rs.next()) {\n setType(rs.getString(\"ITEM_TYPE\"));\n setPrice(BothHelpObjs.makeBlankFromNull(rs.getString(\"UNIT_PRICE\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n HelpObjs.monitor(1,\n \"Error object(\" + this.getClass().getName() + \"): \" + e.getMessage(), null);\n throw e;\n } finally {\n dbrs.close();\n }\n return;\n }" ]
[ "0.6280886", "0.6252284", "0.60281795", "0.5967595", "0.59351707", "0.58864284", "0.5870026", "0.5826714", "0.5793319", "0.57350826", "0.5720798", "0.56778103", "0.560316", "0.55738014", "0.553065", "0.55258167", "0.5509866", "0.5464111", "0.54635626", "0.54155385", "0.54136896", "0.54056364", "0.5386107", "0.5359112", "0.5341745", "0.5330449", "0.5327064", "0.5320788", "0.5319157", "0.5317564", "0.5317005", "0.5316968", "0.53150207", "0.52999157", "0.5289785", "0.5282064", "0.52735513", "0.52685463", "0.52665454", "0.5258383", "0.5256402", "0.52467275", "0.5245617", "0.52352196", "0.52329034", "0.52255094", "0.52255094", "0.52252346", "0.5200036", "0.5198907", "0.51888305", "0.5188628", "0.51785463", "0.51776546", "0.5153914", "0.5151856", "0.51423466", "0.51270545", "0.5122227", "0.5119706", "0.5116207", "0.5108502", "0.51078576", "0.5103255", "0.51015407", "0.50951684", "0.50947505", "0.50924605", "0.5088334", "0.5087204", "0.50844413", "0.508304", "0.5080557", "0.50748885", "0.50738895", "0.507354", "0.50699717", "0.50615335", "0.5059609", "0.50561506", "0.5048795", "0.50480616", "0.5041686", "0.5041361", "0.5033401", "0.5031835", "0.5030449", "0.50287956", "0.50224775", "0.5019808", "0.50162023", "0.4999224", "0.49989954", "0.49961945", "0.49958274", "0.49953696", "0.4992354", "0.4978004", "0.4969232", "0.49639422" ]
0.5237584
43
Load Selected book details to the table in settings according to given name
public static List<Book> searchEBookByName(String name) throws HibernateException{ session = sessionFactory.openSession(); session.beginTransaction(); Query query = session.getNamedQuery("INVENTORY_searchBookByName").setString("name", name); List<Book> resultList = query.list(); session.getTransaction().commit(); session.close(); return resultList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n\t private void loadbookinfo(ActionEvent event) {\n\t \tclearbookcache();\n\t \t\n\t \tString id = bookidinput.getText();\n\t \tString qu = \"SELECT * FROM BOOK_LMS WHERE id = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t Boolean flag = false;\n\t \n\t try {\n while (rs.next()) {\n String bName = rs.getString(\"title\");\n String bAuthor = rs.getString(\"author\");\n Boolean bStatus = rs.getBoolean(\"isAvail\");\n\n Bookname.setText(bName);\n Bookauthor.setText(bAuthor);\n String status = (bStatus) ? \"Available\" : \"Not Available\";\n bookstatus.setText(status);\n\n flag = true;\n }\n\n if (!flag) {\n Bookname.setText(\"No Such Book Available\");\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void loadBook() {\n List<Book> books = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n Book book = new Book(\"Book-\" + i, \"Test book \" + i);\n books.add(book);\n }\n this.setBooks(books);\n }", "private void loadBookInformation(String rawPage, Document doc, Book book) {\n BookDetailParser parser = new BookDetailParser();\n SwBook swBook = parser.parseDetailPage(rawPage);\n book.setContributors(swBook.getContributors());\n book.setCover_url(coverUrlParser.parse(doc));\n book.setShort_description(descriptionShortParser.parse(doc));\n book.addPrice(swBook.getPrice().getPrices().get(0));\n book.setTitle(titleParser.parse(doc));\n }", "private void selectBook(Book book){\n\t\tthis.book = book;\n\t\tshowView(\"ModifyBookView\");\n\t\tif(book.isInactive()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is archived. It must be recovered before it can be modified.\"));\n\t\t}else if(book.isLost()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is lost. It must be recovered before it can be modified.\"));\n\t\t}\n\t}", "private void populateUI(BookEntry book) {\n // Return if the task is null\n if (book == null) {\n return;\n }\n // Use the variable book to populate the UI\n mNameEditText.setText(book.getBook_name());\n mQuantityTextView.setText(Integer.toString(book.getQuantity()));\n mPriceEditText.setText(Double.toString(book.getPrice()));\n mPhoneEditText.setText(Integer.toString(book.getSupplier_phone_number()));\n mSupplier = book.getSupplier_name();\n switch (mSupplier) {\n case BookEntry.SUPPLIER_ONE:\n mSupplierSpinner.setSelection(1);\n break;\n case BookEntry.SUPPLIER_TWO:\n mSupplierSpinner.setSelection(2);\n break;\n default:\n mSupplierSpinner.setSelection(0);\n break;\n }\n mSupplierSpinner.setSelection(mSupplier);\n }", "public void setBookName(java.lang.String value);", "public void read(String bookName, World world) {\n\t\tItem item = world.dbItems().get(bookName);\n\t\tList<Item> items = super.getItems();\n\n\t\tif (items.contains(item) && item instanceof Book) {\n\t\t\tBook book = (Book) item;\n\t\t\tSystem.out.println(book.getBookText());\n\t\t} else {\n\t\t\tSystem.out.println(\"No book called \" + bookName + \" in inventory.\");\n\t\t}\n\t}", "public void scandb_book_info(String table_name) {\n sql = \" SELECT * from \" + table_name + \";\";\n\n try {\n result = statement.executeQuery(sql);\n while (result.next()) {\n set_book_info(result.getInt(\"id\"), result.getString(\"name\"), result.getString(\"url\"));\n\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public void establishSelectedBook(final long id) {\r\n selectedBook = dataManager.selectBook(id);\r\n }", "public void getBookDetails() {\n\t}", "public Book load(String bid) {\n\t\treturn bookDao.load(bid);\r\n\t}", "private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}", "public void loadLecturer2(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec2.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n}", "public void loadLecturer1(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec1.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\n}", "public List<ErpBookInfo> selData();", "private void getBookName(){\n db = DatabaseHelper.getInstance(this).getWritableDatabase();\n cursor = db.rawQuery(\"SELECT Name FROM Book WHERE _id = \"+bookIDSelected+\";\", null);\n startManagingCursor(cursor);\n String bookNameSelected = \"Failed to load Book Name\";\n while(cursor.moveToNext()){\n bookNameSelected = cursor.getString(0);\n }\n\n TextView txtBookTitle = findViewById(R.id.rvTxtName);\n txtBookTitle.setText(String.valueOf(bookNameSelected));\n }", "@Override\n public void DataIsLoaded(List<BookModel> bookModels, List<String> keys) {\n BookModel bookModel = bookModels.get(0);\n Intent intent = new Intent (getContext(), BookDetailsActivity.class);\n intent.putExtra(\"Book\", bookModel);\n getContext().startActivity(intent);\n Log.i(TAG, \"Data is loaded\");\n\n }", "private void initData() {\n\r\n\t\tint statusBarHeight = 50;\r\n\t\tint readHeight = ApplicationManager.SCREEN_HEIGHT - statusBarHeight;\r\n\r\n\t\t// TODO 获取图书信息\r\n\t\tIntent intent = getIntent();\r\n\t\tbookInfo = (BookInfo) intent.getSerializableExtra(BOOK_INFO_KEY);\r\n\r\n\t\ttitleName.setText(bookInfo.getName());\r\n\r\n\t\tString progressInfo = PreferenceHelper.getString(bookInfo.getId() + \"\",\r\n\t\t\t\tnull);\r\n\t\tL.v(TAG, \"initData\", \"progressInfo : \" + progressInfo);\r\n\r\n\t\tif (!TextUtils.isEmpty(progressInfo)) {\r\n\t\t\t// 格式 : ChapterId_ChapterName_CharsetIndex\r\n\t\t\tString[] values = progressInfo.split(\"#\");\r\n\t\t\tif (values.length == 3) {\r\n\t\t\t\treadProgress = new Bookmark();\r\n\t\t\t\treadProgress.setChapterId(Integer.valueOf(values[0]));\r\n\t\t\t\treadProgress.setChapterName(values[1]);\r\n\t\t\t\treadProgress.setCharsetIndex(Integer.valueOf(values[2]));\r\n\t\t\t} else {\r\n\t\t\t\tPreferenceHelper.putString(bookInfo.getId() + \"\", \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (readProgress == null) {\r\n\t\t\treadProgress = new Bookmark();\r\n\t\t\tChapterInfo chapterInfo = bookInfo.getChapterInfos().get(0);\r\n\t\t\treadProgress.setChapterId(chapterInfo.getId());\r\n\t\t\treadProgress.setChapterName(chapterInfo.getName());\r\n\t\t\treadProgress.setCharsetIndex(0);\r\n\t\t}\r\n\r\n\t\tcurrentChapter = findChapterInfoById(readProgress.getChapterId());\r\n\r\n\t\tif (currentChapter == null\r\n\t\t\t\t&& TextUtils.isEmpty(currentChapter.getPath())) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// TODO 读取sp中的字体大小\r\n\t\tcurrentTextSize = PreferenceHelper.getInt(TEXT_SIZE_KEY, 40);\r\n\t\tBookPageFactory.setFontSize(currentTextSize);\r\n\t\tpagefactory = BookPageFactory.build(ApplicationManager.SCREEN_WIDTH, readHeight);\r\n\t\ttry {\r\n\t\t\tpagefactory.openbook(currentChapter.getPath());\r\n\t\t} catch (IOException e) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tadapter = new ScanViewAdapter(this, pagefactory);\r\n\r\n\t\t// TODO 跳转到历史记录\r\n\t\tscanview.setAdapter(adapter, readProgress.getCharsetIndex());\r\n\r\n\t\tmenuIn = AnimationUtils.loadAnimation(this, R.anim.menu_pop_in);\r\n\t\tmenuOut = AnimationUtils.loadAnimation(this, R.anim.menu_pop_out);\r\n\t\t\r\n\t\tif(android.os.Build.VERSION.SDK_INT>=16){\r\n\t\t\ttitleOut = new TranslateAnimation(\r\n\t Animation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n\t 0, Animation.ABSOLUTE, 0,\r\n\t Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24));\r\n\t\t\ttitleOut.setDuration(400);\r\n\t \t\t\r\n\t titleIn = new TranslateAnimation(\r\n \t\t\t\tAnimation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n \t\t\t\t0, Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24),\r\n \t\t\t\tAnimation.ABSOLUTE, 0);\r\n\t titleIn.setDuration(400);\r\n\t\t}else{\r\n\t\t\ttitleIn = AnimationUtils.loadAnimation(this, R.anim.title_in);\r\n\t\t\ttitleOut = AnimationUtils.loadAnimation(this, R.anim.title_out);\r\n\t\t}\r\n\t\t\r\n\t\taddBookmark = AnimationUtils.loadAnimation(this, R.anim.add_bookmark);\r\n\t\t\r\n\r\n\t\ttitleOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\ttitle.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\r\n\t\tmenuOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\tmenu.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tscanview.setOnMoveListener(new onMoveListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onMoveEvent() {\r\n\t\t\t\tif (isMenuShowing) {\r\n\t\t\t\t\thideMenu();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageChanged(View currPage) {\r\n\t\t\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\t\t\treadProgress.setCharsetIndex(tag.start_index);\r\n\t\t\t\tshowChaptersBtn(tag);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tView currPage = scanview.getCurrPage();\r\n\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\tshowChaptersBtn(tag);\r\n\t\t\r\n\t\t//TODO 获取该书的书签\r\n\t\tgetBookMarks();\r\n\t\t\r\n\t}", "BookInfo selectByPrimaryKey(Integer id);", "CmsRoomBook selectByPrimaryKey(String bookId);", "public Book[] retrieveBookName(String bkName) {\n\t\ttry {\r\n\t\t\treturn ((BorrowDAL)dal).getObjectbkName(bkName);\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 null;\r\n\t}", "Book selectByPrimaryKey(String bid);", "private void load_buku() {\n Object header[] = {\"ID BUKU\", \"JUDUL BUKU\", \"PENGARANG\", \"PENERBIT\", \"TAHUN TERBIT\"};\n DefaultTableModel data = new DefaultTableModel(null, header);\n bookTable.setModel(data);\n String sql_data = \"SELECT * FROM tbl_buku\";\n try {\n Connection kon = koneksi.getConnection();\n Statement st = kon.createStatement();\n ResultSet rs = st.executeQuery(sql_data);\n while (rs.next()) {\n String d1 = rs.getString(1);\n String d2 = rs.getString(2);\n String d3 = rs.getString(3);\n String d4 = rs.getString(4);\n String d5 = rs.getString(5);\n\n String d[] = {d1, d2, d3, d4, d5};\n data.addRow(d);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public void selectNewBook(MouseEvent e)\n\t{\n\t\tBookApp.currentBook = otherAppearances.getSelectionModel().getSelectedItem();\n\t\tcurrentBookDisplay.getItems().clear();\n\t\tcurrentBookDisplay.getItems().add(BookApp.currentBook);\n\t\tcharactersNameList.getItems().clear();\n\t\tfor(Character character : (MyLinkedList<Character>) BookApp.currentBook.getCharacterList()){\n\t\t\tcharactersNameList.getItems().add(character);\n\t\t\tcharactersNameList.getSelectionModel().getSelectedIndex();\n\t\t}\n\t\totherAppearances.getItems().clear();\n\t\tfor(int i = 0; i< BookApp.unsortedBookTable.hashTable.length; i++) {\t\t\n\t\t\tfor(Book eachBook : (MyLinkedList<Book>) BookApp.unsortedBookTable.hashTable[i]) {\n\t\t\t\tfor(Character eachCharacterInTotalList : (MyLinkedList<Character>) eachBook.getCharacterList())\n\t\t\t\t{\n\t\t\t\t\tif(eachCharacterInTotalList.equals(BookApp.currentCharacter) && eachBook.equals(BookApp.currentBook))\n\t\t\t\t\t{\n\t\t\t\t\t\totherAppearances.getItems().add(eachBook);\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}", "Book selectByPrimaryKey(String id);", "public void loadBooks(){\n\t\tSystem.out.println(\"\\n\\tLoading books from CSV file\");\n\t\ttry{\n\t\t\tint iD=0, x;\n\t\t\tString current = null;\n\t\t\tRandom r = new Random();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"../bin/books.csv\"));\n\t\t\twhile((current = br.readLine()) != null){\n\t\t\t\tString[] data = current.split(\",\");\n\t\t\t\tx = r.nextInt(6) + 15;\n\t\t\t\tfor(int i =0;i<x;i++){\n\t\t\t\t\tBook b= new Book(Integer.toHexString(iD), data[0], data[1], data[2], data[3]);\n\t\t\t\t\tif(bookMap.containsKey(data[0]) != true){\n\t\t\t\t\t\tbookMap.put(data[0], new ArrayList<Book>());\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\tbookMap.get(data[0]).add(b);\n\t\t\t\t\tiD += 1;\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"\\tBooks Added!\");\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"\\tFile not found\");\n\t\t}catch(IOException e){\n System.out.println(e.toString());\n }\n\t}", "private static void loadBooks() {\n\tbookmarks[2][0]=BookmarkManager.getInstance().createBook(4000,\"Walden\",\"\",1854,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][1]=BookmarkManager.getInstance().createBook(4001,\"Self-Reliance and Other Essays\",\"\",1900,\"Dover Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][2]=BookmarkManager.getInstance().createBook(4002,\"Light From Many Lamps\",\"\",1960,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][3]=BookmarkManager.getInstance().createBook(4003,\"Head First Design Patterns\",\"\",1944,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][4]=BookmarkManager.getInstance().createBook(4004,\"Effective Java Programming Language Guide\",\"\",1990,\"Wilder Publications\",new String[] {\"Eric Freeman\",\"Bert Bates\",\"Kathy Sierra\",\"Elisabeth Robson\"},\"Philosophy\",4.3);\n}", "@FXML\n public void showBorrowedBooks() {\n LibrarySystem.setScene(new BorroweddBookList(\n (reader.getBorrowedBooks(booklist)), reader, readerlist, booklist));\n }", "@Override\r\n\tpublic boolean findDbSetting(String bookName) throws Exception {\n\t\tboolean result;\r\n\t\tresult = dbSettingMapper.findDbSetting(bookName);\r\n\t\t\r\n\t\treturn result;\r\n\t}", "private void loadlec() {\n try {\n\n ResultSet rs = DBConnection.search(\"select * from lecturers\");\n Vector vv = new Vector();\n//vv.add(\"\");\n while (rs.next()) {\n\n// vv.add(rs.getString(\"yearAndSemester\"));\n String gette = rs.getString(\"lecturerName\");\n\n vv.add(gette);\n\n }\n //\n jComboBox1.setModel(new DefaultComboBoxModel<>(vv));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void loadIngreID() throws SQLException, ClassNotFoundException {\r\n ArrayList<Ingredient> ingredients = new IngredientControllerUtil().getAllIngredient();\r\n ArrayList<String> name = new ArrayList<>();\r\n\r\n for (Ingredient ingredient : ingredients) {\r\n name.add(ingredient.getIngreName());\r\n }\r\n\r\n cmbIngreName.getItems().addAll(name);\r\n }", "public void setBorrowBookDetailsToTable() {\n\n try {\n Connection con = databaseconnection.getConnection();\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"select * from lending_book where status= '\" + \"pending\" + \"'\");\n\n while (rs.next()) {\n String id = rs.getString(\"id\");\n String bookName = rs.getString(\"book_name\");\n String studentName = rs.getString(\"student_name\");\n String lendingDate = rs.getString(\"borrow_date\");\n String returnDate = rs.getString(\"return_book_datte\");\n String status = rs.getString(\"status\");\n\n Object[] obj = {id, bookName, studentName, lendingDate, returnDate, status};\n\n model = (DefaultTableModel) tbl_borrowBookDetails.getModel();\n model.addRow(obj);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Error\");\n }\n }", "public void setBook(Book book) {\n this.book = book;\n }", "private Book getBook(String sku) {\n return bookDB.get(sku);\n }", "public void loadBooks() {\n\t\ttry {\n\t\t\tScanner load = new Scanner(new File(FILEPATH));\n\t\t\tSystem.out.println(\"Worked\");\n\n\t\t\twhile (load.hasNext()) {\n\t\t\t\tString[] entry = load.nextLine().split(\";\");\n\n\t\t\t\t// checks the type of book\n\t\t\t\tint type = bookType(entry[0]);\n\n\t\t\t\t// creates the appropriate book\n\t\t\t\tswitch (type) {\n\t\t\t\tcase 0:\n\t\t\t\t\tcreateChildrensBook(entry); // creates a Childrensbook and adds it to the array\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tcreateCookBook(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreatePaperbackBook(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tcreatePeriodical(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase -1:\n\t\t\t\t\tSystem.out.println(\"No book created\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tload.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Did not read in file properly, restart the program, and check filepath of books.txt.\");\n\t\t}\n\t}", "private void loadDatabaseSettings() {\r\n\r\n\t\tint dbID = BundleHelper.getIdScenarioResultForSetup();\r\n\t\tthis.getJTextFieldDatabaseID().setText(dbID + \"\");\r\n\t}", "public void listBooksByName(String name) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE BookName = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setString(1, name);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "private void loadBtechData()\r\n\t{\r\n\t\tlist.clear();\r\n\t\tString qu = \"SELECT * FROM BTECHSTUDENT\";\r\n\t\tResultSet result = databaseHandler.execQuery(qu);\r\n\r\n\t\ttry {// retrieve student information form database\r\n\t\t\twhile(result.next())\r\n\t\t\t{\r\n\t\t\t\tString studendID = result.getString(\"studentNoB\");\r\n\t\t\t\tString nameB = result.getString(\"nameB\");\r\n\t\t\t\tString studSurnameB = result.getString(\"surnameB\");\r\n\t\t\t\tString supervisorB = result.getString(\"supervisorB\");\r\n\t\t\t\tString emailB = result.getString(\"emailB\");\r\n\t\t\t\tString cellphoneB = result.getString(\"cellphoneNoB\");\r\n\t\t\t\tString courseB = result.getString(\"stationB\");\r\n\t\t\t\tString stationB = result.getString(\"courseB\");\r\n\r\n\t\t\t\tlist.add(new StudentProperty(studendID, nameB, studSurnameB,\r\n\t\t\t\t\t\tsupervisorB, emailB, cellphoneB, courseB, stationB));\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\t// Transfer the list data on the table\r\n\t\tstudentBTable.setItems(list);\r\n\t}", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "@Override\n\tpublic void loadData() {\n\t\tint sel = getSelected() == null ? -1 : getSelected().getWardId();\n\t\ttry {\n\t\t\tList<Ward> list = searchInput.getText().equals(\"\") ? WardData.getList()\n\t\t\t\t\t: WardData.getBySearch(searchInput.getText());\t\t\t\n\t\t\ttableData.removeAll(tableData);\n\t\t\tfor (Ward p : list) {\n\t\t\t\ttableData.add(p);\n\t\t\t}\n\t\t} catch (DBException e) {\n\t\t\tGlobal.log(e.getMessage());\n\t\t}\n\n\t\tif (sel > 0) {\n\t\t\tsetSelected(sel);\n\t\t}\n\t}", "public void loadBooksOfCategory(){\n long categoryId=mainActivityViewModel.getSelectedCategory().getMcategory_id();\n Log.v(\"Catid:\",\"\"+categoryId);\n\n mainActivityViewModel.getBookofASelectedCategory(categoryId).observe(this, new Observer<List<Book>>() {\n @Override\n public void onChanged(List<Book> books) {\n if(books.isEmpty()){\n binding.emptyView.setVisibility(View.VISIBLE);\n }\n else {\n binding.emptyView.setVisibility(View.GONE);\n }\n\n booksAdapter.setmBookList(books);\n }\n });\n }", "private void reloadBook() {\n\t\tnew SwingWorker<Void, Void>() {\n\t\t\t@Override\n\t\t\tprotected Void doInBackground() {\n\t\t\t\tbook.reload();\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void done() {\n\t\t\t\tstateChangeRequest(Key.BOOK, null);\n\t\t\t}\n\t\t}.execute();\n\t}", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "@FXML\n public void returnOrBorrowBook() {\n LibrarySystem.setScene(\n new SearchBook(reader, null, readerlist, booklist));\n }", "BookDO selectByPrimaryKey(String bookIsbn);", "@FXML\n\t private void loadlistbook(ActionEvent event) {\n\t \tloadwindow(\"views/booklist.fxml\", \"View Book List\");\n\t }", "private static boolean loadBooks() throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new FileReader(BOOKS_FILE));\n\t\tboolean error_loading = false; //stores whether there was an error loading a book\n\t\t\n\t\tString line = reader.readLine(); //read the properties of a book in the books.txt file\n\t\t/*read books.txt file, set the input for each BookDetails object and add each BookDetails object to the ALL_BOOKS Hashtable*/\n\t\twhile(line != null){\n\t\t\tBookDetails book = new BookDetails();\n\t\t\tString[] details = line.split(\"\\t\"); //the properties of each BookDetails object are separated by tab spaces in the books.txt file\n\t\t\tfor(int i = 0; i < details.length; i ++){\n\t\t\t\tif(!setBookInput(i, details[i], book)){ //checks if there was an error in setting the BookDetails object's properties with the values in the books.txt file\n\t\t\t\t\tSystem.out.println(\"ERROR Loading Books\");\n\t\t\t\t\terror_loading = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(error_loading) //if there was an error loading a book then stop the process of loading books\n\t\t\t\tbreak;\n\t\t\tALL_BOOKS.put(book.getBookId(), book); //add BookDetails object to ALL_BOOKS\n\t\t\taddToPublisherTable(book.getPublisher(), book.getBookTitle()); //add book's title to the ALL_PUBLISHERS Hashtable\n\t\t\taddToGenreTable(book, book.getBookTitle()); //add book's title to the ALL_GENRES ArrayList\n\t\t\taddToAuthorTable(book.getAuthor().toString(), book.getBookTitle()); //add book's title to the ALL_AUTHORS Hashtable\n\t\t\tline = reader.readLine(); \n\t\t}\n\t\treader.close();\n\t\t\n\t\tif(!error_loading){\n\t\t\tSystem.out.println(\"Loading Books - Complete!\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false; //error encountered while loading books\n\t}", "Book getBookByTitle(String title);", "private void loadToChoice() {\n\t\tfor(Genre genre : genreList) {\n\t\t\tuploadPanel.getGenreChoice().add(genre.getName());\n\t\t}\n\t}", "public void loadBrandDataToTable() {\n\n\t\tbrandTableView.clear();\n\t\ttry {\n\n\t\t\tString sql = \"SELECT * FROM branddetails WHERE active_indicator = 1\";\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(sql);\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tbrandTableView.add(new BrandsModel(resultSet.getInt(\"brnd_slno\"), resultSet.getInt(\"active_indicator\"),\n\t\t\t\t\t\tresultSet.getString(\"brand_name\"), resultSet.getString(\"sup_name\"),\n\t\t\t\t\t\tresultSet.getString(\"created_at\"), resultSet.getString(\"updated_at\")));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tbrandName.setCellValueFactory(new PropertyValueFactory<>(\"brand_name\"));\n\t\tsupplierName.setCellValueFactory(new PropertyValueFactory<>(\"sup_name\"));\n\t\tdetailsOfBrands.setItems(brandTableView);\n\t}", "@Override\n public void onResume() {\n super.onResume();\n if(book != null) {\n //Also send the first author\n String author = \"\";\n if(!book.getVolumeInfo().getAuthors().isEmpty()) {\n author = book.getVolumeInfo().getAuthors().get(0);\n }\n getPresenter().searchBooks(book.getVolumeInfo().getTitle(), author);\n }\n }", "public void setBookDesc(java.lang.String value);", "@Override\n\tpublic List<BookRequestVO> bookList(String bookName) {\n\t\treturn bookStorePersistDao.bookList(bookName);\n\t}", "public void setBsifbookname(java.lang.String _bsifbookname)\r\n {\r\n this._bsifbookname = _bsifbookname;\r\n }", "private void setAll(int bnr){\n BookingManager bm = new BookingManager();\n Booking b = bm.getBooking(bnr);\n name = b.getName();\n hotelName = b.getHotel().getName();\n address = b.getHotel().getAddress();\n nrPeople = b.getRoom().getCount();\n price = b.getRoom().getPrice();\n dateFrom = b.getDateFrom();\n dateTo = b.getDateTo();\n \n \n jName.setText(name);\n jHotelName.setText(hotelName);\n jHotelAddress.setText(\"\" + address);\n jNrPeople.setText(\"\" + nrPeople);\n jPrice.setText(\"\" + price);\n jDateFrom.setText(\"\" + dateFrom);\n jDateTo.setText(\"\" + dateTo);\n }", "public List<Book> readByBookName(String searchString) throws Exception{\n\t\tsearchString = \"%\"+searchString+\"%\";\n\t\treturn (List<Book>) template.query(\"select * from tbl_book where title like ?\", new Object[] {searchString}, this);\n\t}", "public void setBookName(final String bookName) {\n\t\tthis.bookName = bookName;\n\t}", "public void setBookCode(java.lang.String value);", "public Book readBookFile()\n {\n\n String name=\"\";\n String author ;\n ArrayList<String> genre = new ArrayList<String>();\n float price=0;\n String bookId;\n String fields2[];\n String line;\n\n line = bookFile.getNextLine();\n if(line==null)\n {\n return null;\n }\n String fields[] = line.split(\" by \");\n if(fields.length>2)\n {\n int i=0;\n while (i<fields.length-1)\n {\n name+=fields[i];\n if(i<fields.length-2)\n {\n name+= \" by \";\n }\n i++;\n }\n fields2 = fields[fields.length-1].split(\"%\");\n }\n else\n {\n name = fields[0];\n fields2 = fields[1].split(\"%\");\n }\n\n author = fields2[0];\n price=Float.parseFloat(fields2[1]);\n bookId=fields2[2];\n genre.add(fields2[3]);\n genre.add(fields2[4]);\n return new Book(name,genre,author,price,bookId);\n\n\n }", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }", "private void initialize(BookVO bookVO) {\n \n BookDAO bookDAO = new BookDAO();\n \n frame = new setGUI();\n frame.getContentPane().setBackground(new Color(250,233,220));\n frame.setBounds(750,250, 450, 600);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.getContentPane().setLayout(null);\n \n JLabel lblNewLabel = new JLabel(\"\\uC544\\uD30C\\uC694\");\n lblNewLabel.setFont(new Font(\"맑은 고딕\", Font.BOLD, 35));\n lblNewLabel.setForeground(new Color(250, 138, 98));\n lblNewLabel.setBounds(153, 37, 180, 42);\n frame.getContentPane().add(lblNewLabel);\n \n JComboBox cb_state = new JComboBox();\n cb_state.setModel(new DefaultComboBoxModel(new String[] {\"\\uCC45\\uC758 \\uC0C1\\uD0DC\", \"1. \\uCC22\\uAE40\", \"2. \\uB099\\uC11C\", \"3. \\uC624\\uC5FC\", \"4. \\uC624\\uB798\\uB428, \\uB0A1\\uC74C\", \"5. \\uAE30\\uD0C0(\\uC758\\uACAC\\uC744 \\uC801\\uC5B4\\uC8FC\\uC138\\uC694)\"}));\n cb_state.setFont(new Font(\"굴림\", Font.PLAIN, 15));\n cb_state.setBounds(44, 139, 159, 33);\n frame.getContentPane().add(cb_state);\n \n JComboBox cb_stateLevel = new JComboBox();\n cb_stateLevel.setModel(new DefaultComboBoxModel(new String[] {\"\\uC0C1\\uD0DC \\uC815\\uB3C4\", \"1. \\uC0C1\", \"2. \\uC911\", \"3. \\uD558\"}));\n cb_stateLevel.setFont(new Font(\"굴림\", Font.PLAIN, 15));\n cb_stateLevel.setBounds(229, 139, 154, 33);\n frame.getContentPane().add(cb_stateLevel);\n \n JTextArea textArea = new JTextArea(\"20자 이내로 부탁드립니다.\",21, 0);\n \n textArea.setFont(new Font(\"새굴림\", Font.PLAIN, 13));\n textArea.setBounds(35, 216, 355, 222);\n //textArea.setText(\"20자 이내로 부탁드립니다.\");\n \n textArea.addKeyListener(new KeyAdapter() {\n public void keyTyped(KeyEvent e) {\n if (textArea.getText().length() == 21) {\n e.consume();\n }\n }\n });//20글자 제한\n \n textArea.addMouseListener(new MouseAdapter(){\n @Override\n public void mouseClicked(MouseEvent e){\n \t textArea.setText(\"\");\n }\n });//기본문장 클릭하면 자동삭제\n \n frame.getContentPane().add(textArea);\n \n //BookVO bookVO2 = daoBook.getAllInfo(voBook);\n \n JButton btn_insert = new RoundedButton(\"\\uB4F1\\uB85D\");\n btn_insert.setForeground(new Color(255, 255, 255));\n btn_insert.setBackground(new Color(241, 109, 80));\n \n\n btn_insert.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n \n String bookIsbn = bookVO.getISBN();\n int bookId = 1; // bookVO에서 가져와야되는데 현재 화면의 bookVO는 id가 없음 => 다음프로젝트에서는 잘생각하고 디자인할 것...\n String userId = UserLoginGUI.userIdStatic;\n \n \n int bookState = cb_state.getSelectedIndex(); // SICK_CAT\n int stateLevel = cb_stateLevel.getSelectedIndex(); // SICK_LEVEL\n String comment = textArea.getText();\n \n// System.out.println(bookIsbn);\n// System.out.println(bookId);\n// System.out.println(userId);\n// System.out.println(bookState);\n// System.out.println(stateLevel);\n// System.out.println(comment);\n \n int sickResultCnt = bookDAO.insertSickReview(bookIsbn, bookId, userId, bookState, stateLevel, comment);\n \n \n if (sickResultCnt > 0) {\n JOptionPane.showMessageDialog(null, \n \"아파요 등록 완료!!\", \"Message\", \n JOptionPane.INFORMATION_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, \n \"아파요 등록 실패\", \"Message\", \n JOptionPane.ERROR_MESSAGE);\n }\n \n \n// txt_bookName.setText(bookVO2.getBookName());\n \n //SickBookListVO voSick = new SickBookListVO(null, null, null, null, bookState, stateLevel, null, comment);\n //daoSick.insertSick(voSick);\n \n }\n });\n btn_insert.setFont(new Font(\"맑은 고딕\", Font.BOLD, 21));\n btn_insert.setBounds(50, 470, 122, 34);\n frame.getContentPane().add(btn_insert);\n \n JButton btn_close = new RoundedButton(\"\\uB2EB\\uAE30\");\n btn_close.setForeground(new Color(255, 255, 255));\n btn_close.setBackground(new Color(246, 147, 99));\n btn_close.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n frame.dispose();\n SwingUtilities.updateComponentTreeUI(BookInfoGUI.getFrame());\n BookInfoGUI.getFrame().invalidate();\n BookInfoGUI.getFrame().validate();\n BookInfoGUI.getFrame().repaint();\n \n BookInfoGUI.getFrame().setVisible(true);\n \n }\n });\n btn_close.setFont(new Font(\"맑은 고딕\", Font.BOLD, 21));\n btn_close.setBounds(250, 470, 122, 34);\n frame.getContentPane().add(btn_close);\n \n JPanel panel = new JPanel();\n panel.setToolTipText(\"\");\n panel.setBorder(new TitledBorder(UIManager.getBorder(\"TitledBorder.border\"), \"\\uC790\\uC138\\uD788 \\uC54C\\uB824\\uC8FC\\uC138\\uC694\", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n panel.setBounds(28, 196, 370, 252);\n frame.getContentPane().add(panel);\n \n \n }", "public void readBook()\n\t{\n\t\tb.input();\n\t\tSystem.out.print(\"Enter number of available books:\");\n\t\tavailableBooks=sc.nextInt();\n\t}", "private void loadDetails() {\n TextView tvName = (TextView) findViewById(R.id.tvPropertyName);\n TextView tvAddress = (TextView) findViewById(R.id.tvFullAddress);\n TextView tvCategory = (TextView) findViewById(R.id.tvPropCategory);\n TextView tvSize = (TextView) findViewById(R.id.tvRoomSize);\n TextView tvPrice = (TextView) findViewById(R.id.tvPropPrice);\n\n tvName.setText(name);\n tvAddress.setText(address);\n tvCategory.setText(category);\n tvSize.setText(size + \"m2\");\n tvPrice.setText(\"R\" + price + \".00 pm\");\n getImage();\n }", "private void loadInfo() {\n fname.setText(prefs.getString(\"fname\", null));\n lname.setText(prefs.getString(\"lname\", null));\n email.setText(prefs.getString(\"email\", null));\n password.setText(prefs.getString(\"password\", null));\n spinner_curr.setSelection(prefs.getInt(\"curr\", 0));\n spinner_stock.setSelection(prefs.getInt(\"stock\", 0));\n last_mod_date.setText(\" \" + prefs.getString(\"date\", getString(R.string.na)));\n }", "public Book[] getBooksByName(String bkName) throws SQLException {\n\t\t\t\tArrayList<Book> books = new ArrayList<Book>();\r\n\t\t\t\t\r\n\t\t\t\tString sql = \"select * from TB_Book where bkName like ?\";\r\n\t\t\t\t\r\n\t\t\t\tObject[] params = new Object[]{bkName};\r\n\r\n\t\t\t\tResultSet rs = SQLHelper.getResultSet(sql,params);\r\n\t\t\t\tif(rs != null){\r\n\t\t\t\t\twhile(rs.next()){\r\n\t\t\t\t\t\tBook book = initBook(rs);\r\n\t\t\t\t\t\tbooks.add(book);\r\n\t\t\t\t\t}\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t}\r\n\t\t\t\tif(books.size()>0){\r\n\t\t\t\t\tBook[] array = new Book[books.size()];\r\n\t\t\t\t\tbooks.toArray(array);\r\n\t\t\t\t\treturn array;\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t}", "public void loadCakeID() throws SQLException, ClassNotFoundException {\r\n ArrayList<Cake> cakeArrayList = new CakeController().getAllCake();\r\n ArrayList<String> ids = new ArrayList<>();\r\n\r\n for (Cake cake : cakeArrayList) {\r\n ids.add(cake.getCakeID());\r\n }\r\n\r\n cmbCakeID.getItems().addAll(ids);\r\n }", "List<BookStoreElement> load(Reader reader);", "@Override\r\n\tpublic Book getBookInfo(int book_id) {\n\t\treturn null;\r\n\t}", "public List<Book> getByAuthor(String name );", "private void loadBookResultsView(Book[] results) {\n try {\n DashboardController.dbc.bookResults(results);\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "public void LoadDataToComBo(DefaultComboBoxModel cbx) {\n cbx.removeAllElements();\n String sql = \"select * from SuKien\\n\"\n + \"where TrangThai = 1 and AnSk = 1\";\n List<SuKien> list = selectSuKien(sql);\n for (int i = 0; i < list.size(); i++) {\n SuKien sk = list.get(i);\n cbx.addElement(sk);\n }\n }", "public BookBean getBook(String Bookid) throws SQLException {\n\t\tConnection con = DbConnection.getConnection();\n\t\tBookBean book = new BookBean();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from books where bookid= ?\";\n\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);// 鏇存敼JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t\tps = con.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setString(1, Bookid);//ps锟斤拷锟斤拷锟斤拷锟絬ser锟斤拷锟斤拷锟斤拷锟斤拷要锟斤拷同锟斤拷\n\t\t\t\n\t\t\trs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tbook.setBookid(rs.getString(\"bookid\"));\n\t\t\t\tbook.setBookname(rs.getString(\"bookname\"));\n\t\t\t\tbook.setAuthor(rs.getString(\"author\"));\n\t\t\t\tbook.setCategoryid(rs.getString(\"categoryid\"));\n\t\t\t\tbook.setPublishing(rs.getString(\"publishing\"));\n\t\t\t\tbook.setPrice(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityin(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityout(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityloss(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setPicture(rs.getString(\"bookname\"));\n\t\t\t}\n\t\t\tcon.commit();//鎻愪氦JDBC浜嬪姟\n\t\t\tcon.setAutoCommit(true);// 鎭㈠JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tcon.rollback();//鍥炴粴JDBC浜嬪姟\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDbConnection.closeConnection(rs, ps, con);\n\t\t}\n\n\t\treturn book;\n\t}", "public String getBookname() {\n return bookname;\n }", "public void listBooksByAuthor(String name) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE AuthorName = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setString(1, name);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@FXML\n\t private void loadaddbook(ActionEvent event) {\n\t\n\t\t loadwindow(\"views/addbook.fxml\", \"Add new Book\");\n\t }", "private void populateProfession() {\n try {\n vecProfessionKeys = new Vector();\n StringTokenizer stk = null;\n vecProfessionLabels = new Vector();\n //MSB -09/01/05 -- Changed configuration file.\n // config = new ConfigMgr(\"customer.cfg\");\n// config = new ConfigMgr(\"ArmaniCommon.cfg\");\n config = new ArmConfigLoader();\n String strSubTypes = config.getString(\"PROFESSION\");\n int i = -1;\n if (strSubTypes != null && strSubTypes.trim().length() > 0) {\n stk = new StringTokenizer(strSubTypes, \",\");\n } else\n return;\n if (stk != null) {\n types = new String[stk.countTokens()];\n while (stk.hasMoreTokens()) {\n types[++i] = stk.nextToken();\n String key = config.getString(types[i] + \".CODE\");\n vecProfessionKeys.add(key);\n String value = config.getString(types[i] + \".LABEL\");\n vecProfessionLabels.add(value);\n }\n }\n cbxProfession.setModel(new DefaultComboBoxModel(vecProfessionLabels));\n } catch (Exception e) {}\n }", "@FXML\n\t void loadbookinfo2(ActionEvent event) {\n\t \t ObservableList<String> issueData = FXCollections.observableArrayList();\n\t isReadyForSubmission = false;\n\t String id = Bookid.getText();\n\t String qu = \"SELECT * FROM ISSUE_LMS WHERE bookID = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t try {\n\t while (rs.next()) {\n\t String mBookID = id;\n\t String mMemberID = rs.getString(\"memberID\");\n\t Timestamp mIssueTime = rs.getTimestamp(\"issueTime\");\n\t int mRenewCount = rs.getInt(\"renew_count\");\n\n issueData.add(\"Issue Date and Time :\" + mIssueTime.toGMTString());\n issueData.add(\"Renew Count :\" + mRenewCount);\n issueData.add(\"Book Information:-\");\n\t \n\t qu = \"SELECT * FROM BOOK_LMS WHERE ID = '\" + mBookID + \"'\";\n\t ResultSet r1 = dbhandler.execQuery(qu);\n\n\t while (r1.next()) {\n\t issueData.add(\"\\tBook Name :\" + r1.getString(\"title\"));\n\t issueData.add(\"\\tBook ID :\" + r1.getString(\"id\"));\n\t issueData.add(\"\\tBook Author :\" + r1.getString(\"author\"));\n\t issueData.add(\"\\tBook Publisher :\" + r1.getString(\"publisher\"));\n\t }\n\t qu = \"SELECT * FROM MEMBER_LMS WHERE ID = '\" + mMemberID + \"'\";\n\t r1 = dbhandler.execQuery(qu);\n\t issueData.add(\"Member Information:-\");\n\n\t while (r1.next()) {\n\t issueData.add(\"\\tName :\" + r1.getString(\"name\"));\n\t issueData.add(\"\\tMobile :\" + r1.getString(\"mobile\"));\n\t issueData.add(\"\\tEmail :\" + r1.getString(\"email\"));\n\t }\n\n\t isReadyForSubmission = true;\n\t }\n\t } catch (SQLException ex) {\n\t Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n\t }\n\t issuedatallist.getItems().setAll(issueData);\n\t }", "public void setBookDetails(String[] details) throws MalformedURLException, IOException {\n String bookTitle = details[0];\n String author = details[1];\n String path = details[2];\n String description = \"<html> \" + details[3];\n\n title.setText(bookTitle);\n authors.setText(author);\n descriptionLabel.setText(description);\n\n // Read in the imgae from URL path\n URL url = new URL(path);\n BufferedImage image = ImageIO.read(url);\n // Set the ImageIcon of the label\n ImageIcon icon = new ImageIcon(image);\n iconLabel.setIcon(icon);\n iconLabel.setText(\"\");\n }", "public void findBook() {\n\t\tif (books.size() > 0) {\n\t\t\tint randInt = rand.nextInt(books.size());\n\t\t\tbook = books.get(randInt);\n\t\t}\n\t}", "public void loadBookList(java.util.List<LdPublisher> ls) {\r\n final ReffererConditionBookList reffererCondition = new ReffererConditionBookList() {\r\n public void setup(LdBookCB cb) {\r\n cb.addOrderBy_PK_Asc();// Default OrderBy for Refferer.\r\n }\r\n };\r\n loadBookList(ls, reffererCondition);\r\n }", "@FXML\n public void showAllBooks() {\n LibrarySystem.setScene(new AllBookListInReaderPage(\n reader, readerlist, booklist, booklist));\n }", "public String getBook() {\n\t\treturn book;\r\n\t}", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "private void setBooksInfo () {\n infoList = new ArrayList<> ();\n\n\n // item number 1\n\n Info info = new Info ();// this class will help us to save data easily !\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"ما هي اضطرابات طيف التوحد؟\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"سيساعدك هذا المستند على معرفة اضطراب طيف التوحد بشكل عام\");\n\n // we can add book url or download >>\n info.setInfoPageURL (\"https://firebasestorage.googleapis.com/v0/b/autismapp-b0b6a.appspot.com/o/material%2FInfo-Pack-for\"\n + \"-translation-Arabic.pdf?alt=media&token=69b19a8d-8b4c-400a-a0eb-bb5c4e5324e6\");\n\n infoList.add (info); //adding item 1 to list\n\n\n/* // item number 2\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 2 to list\n\n\n // item 3\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 3 to list\n\n // item number 4\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism part 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 4 to list\n\n\n // item 5\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 5 to list*/\n\n\n displayInfo (infoList);\n\n }", "private static void addToAuthorTable(String author_name, String bookTitle) {\n\t\tif(ALL_AUTHORS.containsKey(author_name)) \n\t\t\tALL_AUTHORS.get(author_name).add(bookTitle);\n\t\t/*put author_name as a new key in ALL_AUTHORS*/\n\t\telse{\n\t\t\tHashSet<String> bookTitles_list = new HashSet<String>();\n\t\t\tbookTitles_list.add(bookTitle);\n\t\t\tALL_AUTHORS.put(author_name, bookTitles_list);\n\t\t}\n\t}", "public void setBookEdition(java.lang.String value);", "@Override\r\n\tpublic Book getBook(long bookId) {\n\t\treturn bd.getOne(bookId);\r\n\t}", "public void loadList(String name){\n }", "public void initiateStore() {\r\n\t\tURLConnection urlConnection = null;\r\n\t\tBufferedReader in = null;\r\n\t\tURL dataUrl = null;\r\n\t\ttry {\r\n\t\t\tdataUrl = new URL(URL_STRING);\r\n\t\t\turlConnection = dataUrl.openConnection();\r\n\t\t\tin = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\r\n\t\t\tString inputLine;\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tString[] splittedLine = inputLine.split(\";\");\r\n\t\t\t\t// an array of 4 elements, the fourth element\r\n\t\t\t\t// the first three elements are the properties of the book.\r\n\t\t\t\t// last element is the quantity.\r\n\t\t\t\tBook book = new Book();\r\n\t\t\t\tbook.setTitle(splittedLine[0]);\r\n\t\t\t\tbook.setAuthor(splittedLine[1]);\r\n\t\t\t\tBigDecimal decimalPrice = new BigDecimal(splittedLine[2].replaceAll(\",\", \"\"));\r\n\t\t\t\tbook.setPrice(decimalPrice);\r\n\t\t\t\tfor(int i=0; i<Integer.parseInt(splittedLine[3]); i++)\r\n\t\t\t\t\tthis.addBook(book);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(!in.equals(null)) in.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public List<BookData> searchBookbyTitle (String name) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where title = ?\");\n\t\t\tmyStmt.setString(1, name);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "Book getBookById(Integer id);", "public String getBookName()\r\n {\r\n\treturn bookName;\r\n }", "void loadSet() {\n int returnVal = fc.showOpenDialog(this);\n if (returnVal != JFileChooser.APPROVE_OPTION) {\n System.out.println(\"Open command cancelled by user.\");\n return;\n }\n file = fc.getSelectedFile();\n System.out.println(\"Opening: \" + file.getName());\n closeAllTabs();\n try {\n FileInputStream fis = new FileInputStream(file);\n ObjectInputStream ois = new ObjectInputStream(fis);\n //loopButton.setSelected( ois.readObject() ); \n ArrayList l = (ArrayList) ois.readObject();\n System.out.println(\"read \"+l.size()+\" thingies\");\n ois.close();\n for(int i=0; i<l.size(); i++) {\n HashMap m = (HashMap) l.get(i);\n openNewTab();\n getCurrentTab().paste(m);\n }\n } catch(Exception e) {\n System.out.println(\"Open error \"+e);\n }\n }", "private void setUpTable()\n {\n //Setting the outlook of the table\n bookTable.setColumnReorderingAllowed(true);\n bookTable.setColumnCollapsingAllowed(true);\n \n \n bookTable.setContainerDataSource(allBooksBean);\n \n \n //Setting up the table data row and column\n /*bookTable.addContainerProperty(\"id\", Integer.class, null);\n bookTable.addContainerProperty(\"book name\",String.class, null);\n bookTable.addContainerProperty(\"author name\", String.class, null);\n bookTable.addContainerProperty(\"description\", String.class, null);\n bookTable.addContainerProperty(\"book genres\", String.class, null);\n */\n //The initial values in the table \n db.connectDB();\n try{\n allBooks = db.getAllBooks();\n }catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n db.closeDB();\n allBooksBean.addAll(allBooks);\n \n //Set Visible columns (show certain columnes)\n bookTable.setVisibleColumns(new Object[]{\"id\",\"bookName\", \"authorName\", \"description\" ,\"bookGenreString\"});\n \n //Set height and width\n bookTable.setHeight(\"370px\");\n bookTable.setWidth(\"1000px\");\n \n //Allow the data in the table to be selected\n bookTable.setSelectable(true);\n \n //Save the selected row by saving the change Immediately\n bookTable.setImmediate(true);\n //Set the table on listener for value change\n bookTable.addValueChangeListener(new Property.ValueChangeListener()\n {\n public void valueChange(ValueChangeEvent event) {\n \n }\n\n });\n }", "List<Book> findBooksByName(String name);", "public void firstLoadBookUpdate(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\tint cp=myViewDetailBook.getNoofcopies();\r\n\t\tSystem.out.println(\"No of Copy in First Load Book Update=\"+cp);\r\n\t\tmyForm.setNoOfcopies(cp);\r\n\t\t\r\n\t}", "public void getBookInfo(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\t\r\n\t}", "public void load() {\r\n try {\r\n project = ProjectAccessor.findFromTitle(title, conn);\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }" ]
[ "0.6580219", "0.63185734", "0.61762077", "0.61567575", "0.6124185", "0.5980637", "0.5956666", "0.5927356", "0.5885177", "0.5836319", "0.5799591", "0.56240016", "0.5591992", "0.5571187", "0.55270386", "0.55108774", "0.5504855", "0.5504326", "0.5480758", "0.54743177", "0.5449146", "0.5419484", "0.539162", "0.53877527", "0.5375086", "0.53737324", "0.53670275", "0.5358101", "0.53490984", "0.53460187", "0.53317976", "0.5301622", "0.5289239", "0.52892303", "0.52888", "0.52869266", "0.526687", "0.52557397", "0.5248176", "0.52476865", "0.5244758", "0.52376264", "0.5232237", "0.52268475", "0.52177185", "0.52129596", "0.51947194", "0.5193067", "0.51826197", "0.5172708", "0.51695794", "0.516147", "0.5153926", "0.5151178", "0.5133713", "0.5132531", "0.5122731", "0.51179534", "0.5109119", "0.51046777", "0.5101901", "0.5100319", "0.5096453", "0.5084595", "0.5067655", "0.50651157", "0.50584316", "0.50551844", "0.50541604", "0.50540125", "0.50450546", "0.5043364", "0.504136", "0.50284374", "0.50280184", "0.50272286", "0.50241226", "0.5020349", "0.5018936", "0.50188226", "0.5013107", "0.5012806", "0.5010087", "0.5009902", "0.5000843", "0.49875054", "0.49825916", "0.49801823", "0.49784595", "0.497587", "0.49755985", "0.49712816", "0.49712816", "0.4971158", "0.49704885", "0.49629474", "0.49612924", "0.49609822", "0.49591652", "0.49477684", "0.4940989" ]
0.0
-1
Load Selected book details to the table in settings according to given seller
public static List<Book> searchBookByNameOfSeller(String nameOfSeller) throws HibernateException{ session = sessionFactory.openSession(); session.beginTransaction(); Query query = session.getNamedQuery("INVENTORY_searchBookByNameOfTheSeller").setString("nameOfTheSeller", nameOfSeller); List<Book> resultList = query.list(); session.getTransaction().commit(); session.close(); return resultList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void populateUI(BookEntry book) {\n // Return if the task is null\n if (book == null) {\n return;\n }\n // Use the variable book to populate the UI\n mNameEditText.setText(book.getBook_name());\n mQuantityTextView.setText(Integer.toString(book.getQuantity()));\n mPriceEditText.setText(Double.toString(book.getPrice()));\n mPhoneEditText.setText(Integer.toString(book.getSupplier_phone_number()));\n mSupplier = book.getSupplier_name();\n switch (mSupplier) {\n case BookEntry.SUPPLIER_ONE:\n mSupplierSpinner.setSelection(1);\n break;\n case BookEntry.SUPPLIER_TWO:\n mSupplierSpinner.setSelection(2);\n break;\n default:\n mSupplierSpinner.setSelection(0);\n break;\n }\n mSupplierSpinner.setSelection(mSupplier);\n }", "@FXML\n\t private void loadbookinfo(ActionEvent event) {\n\t \tclearbookcache();\n\t \t\n\t \tString id = bookidinput.getText();\n\t \tString qu = \"SELECT * FROM BOOK_LMS WHERE id = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t Boolean flag = false;\n\t \n\t try {\n while (rs.next()) {\n String bName = rs.getString(\"title\");\n String bAuthor = rs.getString(\"author\");\n Boolean bStatus = rs.getBoolean(\"isAvail\");\n\n Bookname.setText(bName);\n Bookauthor.setText(bAuthor);\n String status = (bStatus) ? \"Available\" : \"Not Available\";\n bookstatus.setText(status);\n\n flag = true;\n }\n\n if (!flag) {\n Bookname.setText(\"No Such Book Available\");\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void selectBook(Book book){\n\t\tthis.book = book;\n\t\tshowView(\"ModifyBookView\");\n\t\tif(book.isInactive()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is archived. It must be recovered before it can be modified.\"));\n\t\t}else if(book.isLost()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is lost. It must be recovered before it can be modified.\"));\n\t\t}\n\t}", "private Book getBook(String sku) {\n return bookDB.get(sku);\n }", "public void getBookDetails() {\n\t}", "private void loadBookInformation(String rawPage, Document doc, Book book) {\n BookDetailParser parser = new BookDetailParser();\n SwBook swBook = parser.parseDetailPage(rawPage);\n book.setContributors(swBook.getContributors());\n book.setCover_url(coverUrlParser.parse(doc));\n book.setShort_description(descriptionShortParser.parse(doc));\n book.addPrice(swBook.getPrice().getPrices().get(0));\n book.setTitle(titleParser.parse(doc));\n }", "public void establishSelectedBook(final long id) {\r\n selectedBook = dataManager.selectBook(id);\r\n }", "static void presentBookingHistory(User booker) {\r\n\t\tBooking bookings = new Booking();\r\n\t\tResultSet historyRs = null;\r\n\r\n\t\tSystem.out.printf(\"*%14s%10s%18s%28s%28s%15s%11s\\n\", \"Booking No\", \"Lot No\", \"Car No\", \"Start Time\", \"End Time\", \"Cost\", \"*\");\r\n\t\tSystem.out.println(\"*****************************************************************************************************************************\");\r\n\t\ttry {\r\n\t\t\tDbConnection historyConn = new DbConnection();\r\n\t\t\thistoryRs = historyConn.fetchSelectUserByUNameBookings(booker.getUName());\r\n\t\t\twhile (historyRs.next()) {\r\n\t\t\t\tjava.sql.Timestamp endTime = historyRs.getTimestamp(6);\r\n\t\t\t\t/**\r\n\t\t\t\t*\tTo show only the ones which are not checked out yet\r\n\t\t\t\t*\tIf a record with end time as 0 is found, it will be considered as not booked and shown\r\n\t\t\t\t*/\r\n\t\t\t\tif (endTime.getTime() != 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tString bookingNo = historyRs.getString(1);\r\n\t\t\t\tint lotNo = historyRs.getInt(3);\r\n\t\t\t\tString carNo = historyRs.getString(4);\r\n\t\t\t\tjava.sql.Timestamp startTime = historyRs.getTimestamp(5);\r\n\t\t\t\tint cost = historyRs.getInt(7);\r\n\t\t\t\tbookings.setAllValues(bookingNo, lotNo, carNo, startTime, endTime, cost);\r\n\r\n\t\t\t\tbookings.showBookHistory();\r\n\t\t\t}\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"No records with the given booking number found\");\r\n\t\t\t//SqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} catch (NullPointerException npExcep) {\r\n\t\t\tnpExcep.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\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}", "public List<ErpBookInfo> selData();", "public void loadBook() {\n List<Book> books = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n Book book = new Book(\"Book-\" + i, \"Test book \" + i);\n books.add(book);\n }\n this.setBooks(books);\n }", "@Override\n public void DataIsLoaded(List<BookModel> bookModels, List<String> keys) {\n BookModel bookModel = bookModels.get(0);\n Intent intent = new Intent (getContext(), BookDetailsActivity.class);\n intent.putExtra(\"Book\", bookModel);\n getContext().startActivity(intent);\n Log.i(TAG, \"Data is loaded\");\n\n }", "public void scandb_book_info(String table_name) {\n sql = \" SELECT * from \" + table_name + \";\";\n\n try {\n result = statement.executeQuery(sql);\n while (result.next()) {\n set_book_info(result.getInt(\"id\"), result.getString(\"name\"), result.getString(\"url\"));\n\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public void setSeller(String seller) {\n this.seller = seller;\n }", "public void setSeller(String seller) {\n this.seller = seller;\n }", "private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}", "public LoreBookSelectionAdapter(Context context, List<LoreBookSelectionInformation> bookSelectionData, FragmentManager fragmentManager) {\n super();\n this.inflater = LayoutInflater.from(context);\n this.bookSelectionData = bookSelectionData;\n this.database = ManifestDatabase.getInstance(context);\n this.fragmentManager = fragmentManager;\n loadLoreEntries();\n }", "Book selectByPrimaryKey(String bid);", "CmsRoomBook selectByPrimaryKey(String bookId);", "public void setSBookerID(String sBookerID) {\n this.sBookerID = sBookerID;\n }", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "BookInfo selectByPrimaryKey(Integer id);", "public void setBook(Book book) {\n this.book = book;\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n IntentResult scanISBN = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);\n if (scanISBN != null) {\n if (scanISBN.getContents() != null) {\n String ISBN = scanISBN.getContents();\n Book book = BookList.getBook(ISBN);\n if (book== null) {\n Toast.makeText(getActivity(), \"Book Does not Exist\", Toast.LENGTH_SHORT).show();\n }\n else {\n Intent book_info_intent = new Intent(getActivity(), book_description_activity.class);\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"book\", book);\n if (book.getOwner().equalsIgnoreCase(UserList.getCurrentUser().getUsername())) {\n bundle.putInt(\"VISIBILITY\", 1); // 1 for show Edit button\n }\n else {\n bundle.putInt(\"VISIBILITY\", 2); // 2 for not show Edit button\n }\n book_info_intent.putExtras(bundle);\n startActivity(book_info_intent);\n }\n } else {\n Toast.makeText(getActivity(), \"No Results\", Toast.LENGTH_SHORT).show();\n }\n } else {\n super.onActivityResult(requestCode, resultCode, intent);\n }\n }", "public void setBestSeller (String bS)\n {\n bestSeller = bS;\n }", "public void setBorrowBookDetailsToTable() {\n\n try {\n Connection con = databaseconnection.getConnection();\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"select * from lending_book where status= '\" + \"pending\" + \"'\");\n\n while (rs.next()) {\n String id = rs.getString(\"id\");\n String bookName = rs.getString(\"book_name\");\n String studentName = rs.getString(\"student_name\");\n String lendingDate = rs.getString(\"borrow_date\");\n String returnDate = rs.getString(\"return_book_datte\");\n String status = rs.getString(\"status\");\n\n Object[] obj = {id, bookName, studentName, lendingDate, returnDate, status};\n\n model = (DefaultTableModel) tbl_borrowBookDetails.getModel();\n model.addRow(obj);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Error\");\n }\n }", "@Override\r\n\tpublic Book getBookInfo(int book_id) {\n\t\treturn null;\r\n\t}", "public Book load(String bid) {\n\t\treturn bookDao.load(bid);\r\n\t}", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "@Override\n public void onCreate(Bundle savedInstanceState){\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_returntask);\n\n ListView BookListLV;\n\n BookListLV = findViewById(R.id.RETURNT_LVbooks);\n bookDataList = new ArrayList<>();\n bookAdapter = new ReturningTaskCustomList(this, bookDataList);\n BookListLV.setAdapter(bookAdapter);\n\n db = FirebaseFirestore.getInstance();\n mAuth = FirebaseAuth.getInstance();\n String currentUID = mAuth.getCurrentUser().getUid();\n collectionReference = db.collection(\"users\" + \"/\" + currentUID + \"/requested\");\n\n collectionReference.addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable\n FirebaseFirestoreException error) {\n bookDataList.clear();\n for(QueryDocumentSnapshot doc: queryDocumentSnapshots)\n {\n if (!doc.getData().containsKey(\"blank\")) {\n\n if (doc.getData().get(\"status\").toString().equals(\"borrowed\")) {\n ArrayList<String> owner = new ArrayList<>();\n owner.add(doc.getData().get(\"owners\").toString());\n\n Book book = new Book(doc.getData().get(\"title\").toString(),\n doc.getData().get(\"author\").toString(),\n owner.get(0), doc.getId().replace(\"-\", \"\"));\n //Log.e(\"ISB\", doc.getId());\n //Log.e(\"title\", doc.getData().get(\"title\").toString());\n bookDataList.add(book);\n }\n }\n }\n bookAdapter.notifyDataSetChanged();\n }\n });\n\n BookListLV.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n selectedISBN = bookDataList.get(i).getISBN();\n otherUID = bookDataList.get(i).getOwner();\n Log.e(\"SELECTED BOOK\", bookDataList.get(i).getTitle());\n Log.e(\"SELECTED BOOK ISBN\", bookDataList.get(i).getISBN());\n openScanner();\n\n }\n });\n\n }", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "@Override\n public void onResume() {\n super.onResume();\n if(book != null) {\n //Also send the first author\n String author = \"\";\n if(!book.getVolumeInfo().getAuthors().isEmpty()) {\n author = book.getVolumeInfo().getAuthors().get(0);\n }\n getPresenter().searchBooks(book.getVolumeInfo().getTitle(), author);\n }\n }", "public void setBookOffering(java.lang.String value);", "private void enterEmptyBook(String sku) {\n Book book = new Book();\n bookDB.put(sku, book);\n return;\n }", "private void setAll(int bnr){\n BookingManager bm = new BookingManager();\n Booking b = bm.getBooking(bnr);\n name = b.getName();\n hotelName = b.getHotel().getName();\n address = b.getHotel().getAddress();\n nrPeople = b.getRoom().getCount();\n price = b.getRoom().getPrice();\n dateFrom = b.getDateFrom();\n dateTo = b.getDateTo();\n \n \n jName.setText(name);\n jHotelName.setText(hotelName);\n jHotelAddress.setText(\"\" + address);\n jNrPeople.setText(\"\" + nrPeople);\n jPrice.setText(\"\" + price);\n jDateFrom.setText(\"\" + dateFrom);\n jDateTo.setText(\"\" + dateTo);\n }", "@Override\n public void onItemSelected(View view, int position) {\n\n FirebaseFirestore.getInstance()\n .collection(\"AllSalon\")\n .document(Common.state_name)\n .collection(\"Branch\")\n .document(Common.selected_salon.getSalonId())\n .collection(\"Barbers\")\n .document(Common.currentBarber.getBarberId())\n .collection(Common.simpleDateFormat.format(Common.bookingDate.getTime()))\n .document(slotValue.getSlot().toString())\n .get()\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }).addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful()) {\n if (task.getResult().exists()) {\n Common.currentBookingInformation = task.getResult().toObject(BookingInformation.class);\n Common.currentBookingInformation.setBookingId(task.getResult().getId());\n context.startActivity(new Intent(context, DoneServicesActivity.class));\n }\n }\n }\n });\n\n }", "public String getSBookerID() {\n return sBookerID;\n }", "protected static Book goodBookValues(String bidField, String bnameField, String byearField, String bpriceField, String bauthorField, String bpublisherField) throws Exception{\n Book myBook;\n String [] ID,strPrice;\n String Name;\n int Year;\n double Price;\n \n try{\n ID = bidField.split(\"\\\\s+\"); // split using spaces\n if (ID.length > 1 || ID[0].equals(\"\")) // id should only be one word\n {\n throw new Exception (\"ERROR: The ID must be entered\\n\"); // if the id is empty, it must be conveyed to this user via this exception\n }\n if (ID[0].length() !=6) // id must be 6 digits\n throw new Exception (\"ERROR: ID must be 6 digits\\n\");\n if (!(ID[0].matches(\"[0-9]+\"))) // id must only be numbers\n throw new Exception (\"ERROR: ID must only contain numbers\");\n Name = bnameField;\n if (Name.equals(\"\")) // name must not be blank\n throw new Exception (\"ERROR: Name of product must be entered\\n\");\n if (byearField.equals(\"\") || byearField.length() != 4) // year field cannot be blank\n {\n throw new Exception (\"ERROR: Year of product must be 4 numbers\\n\");\n } else {\n Year = Integer.parseInt(byearField);\n if (Year > 9999 || Year < 1000)\n {\n throw new Exception (\"Error: Year must be between 1000 and 9999 years\");\n }\n }\n \n strPrice = bpriceField.split(\"\\\\s+\");\n if (strPrice.length > 1 || strPrice[0].equals(\"\"))\n Price = 0;\n else\n Price = Double.parseDouble(strPrice[0]);\n \n myBook = new Book(ID[0],Name,Year,Price,bauthorField,bpublisherField);\n ProductGUI.Display(\"Book fields are good\\n\");\n return myBook;\n } catch (Exception e){\n throw new Exception (e.getMessage());\n }\n \n }", "@Override\n\tpublic void updateBookData() {\n\t\tList<Book> bookList = dao.findByHql(\"from Book where bookId > 1717\",null);\n\t\tString bookSnNumber = \"\";\n\t\tfor(Book book:bookList){\n\t\t\tfor (int i = 1; i <= book.getLeftAmount(); i++) {\n\t\t\t\t// 添加图书成功后,根据ISBN和图书数量自动生成每本图书SN号\n\t\t\t\tBookSn bookSn = new BookSn();\n\t\t\t\t// 每本书的bookSn号根据书的ISBN号和数量自动生成,\n\t\t\t\t// 如书的ISBN是123,数量是3,则每本书的bookSn分别是:123-1,123-2,123-3\n\t\t\t\tbookSnNumber = \"-\" + i;//book.getIsbn() + \"-\" + i;\n\t\t\t\tbookSn.setBookId(book.getBookId());\n\t\t\t\tbookSn.setBookSN(bookSnNumber);\n\t\t\t\t// 默认书的状态是0表示未借出\n\t\t\t\tbookSn.setStatus(new Short((short) 0));\n\t\t\t\t// 添加bookSn信息\n\t\t\t\tbookSnDao.save(bookSn);\n\t\t\t}\n\t\t}\n\t}", "BookDO selectByPrimaryKey(String bookIsbn);", "public void setSellerId(Integer sellerId) {\n this.sellerId = sellerId;\n }", "@Override\n public void onLoadFinished(android.content.Loader<Cursor> loader, Cursor cursor) {\n if (cursor.moveToFirst()) {\n // Get the column indexes\n int productNameColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRODUCT_NAME);\n int priceColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRICE);\n int quantityColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_QUANTITY);\n int supplierNameColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_SUPPLIER_NAME);\n int supplierPhoneColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER);\n\n // Pull the data from the columns\n String productName = cursor.getString(productNameColumnIndex);\n String price = cursor.getString(priceColumnIndex);\n String quantity = cursor.getString(quantityColumnIndex);\n String supplierName = cursor.getString(supplierNameColumnIndex);\n String supplierPhone = cursor.getString(supplierPhoneColumnIndex);\n\n // Set the data pulled onto the objects\n productNameEditText.setText(productName);\n priceEditText.setText(price);\n quantityTextView.setText(quantity);\n supplierNameEditText.setText(supplierName);\n supplierPhoneEditText.setText(supplierPhone);\n\n // Set the global variable for the quantity of books\n bookQuantity = Integer.parseInt(quantity);\n }\n }", "public void setSellerOrderId(String sellerOrderId) {\r\n this.sellerOrderId = sellerOrderId;\r\n }", "@Override\r\n\tpublic List<Seat> loadBookedSeats(Performance prm, String secName, int dateByTimeIdx) {\n\t\treturn ticketDao.selectBookedseats(prm,secName, dateByTimeIdx);\r\n\t}", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "@Override\r\n\tpublic Book getBook(long bookId) {\n\t\treturn bd.getOne(bookId);\r\n\t}", "@FXML\n public void showBorrowedBooks() {\n LibrarySystem.setScene(new BorroweddBookList(\n (reader.getBorrowedBooks(booklist)), reader, readerlist, booklist));\n }", "public void readBook()\n\t{\n\t\tb.input();\n\t\tSystem.out.print(\"Enter number of available books:\");\n\t\tavailableBooks=sc.nextInt();\n\t}", "Book selectByPrimaryKey(String id);", "public void getBookInfo(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\t\r\n\t}", "public void loadBookList(java.util.List<LdPublisher> ls) {\r\n final ReffererConditionBookList reffererCondition = new ReffererConditionBookList() {\r\n public void setup(LdBookCB cb) {\r\n cb.addOrderBy_PK_Asc();// Default OrderBy for Refferer.\r\n }\r\n };\r\n loadBookList(ls, reffererCondition);\r\n }", "public void setBookId(String bookId) {\n this.bookId = bookId;\n }", "@Override\n public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {\n if (cursor == null || cursor.getCount() < 1) {\n return;\n }\n\n // Proceed with moving to the first row of the cursor and reading data from it.\n if (cursor.moveToFirst()) {\n // Find the columns of book attributes that are needed.\n int productNameColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRODUCT_NAME);\n int authorColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_AUTHOR);\n int priceColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRICE);\n int quantityColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_QUANTITY);\n int supplierColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_SUPPLIER);\n int supplierPhoneNumberColumnIndex = cursor.getColumnIndex(\n BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER);\n\n // Extract out the value from the Cursor for the given column index.\n String productName = cursor.getString(productNameColumnIndex);\n String author = cursor.getString(authorColumnIndex);\n double price = cursor.getDouble(priceColumnIndex);\n quantity = cursor.getInt(quantityColumnIndex);\n String supplier = cursor.getString(supplierColumnIndex);\n supplierPhoneNumber = cursor.getString(supplierPhoneNumberColumnIndex);\n\n // Format the price to two decimal places so that it displays as \"7.50\" not \"7.5\"\n NumberFormat nf = NumberFormat.getInstance();\n nf.setMaximumFractionDigits(2);\n nf.setMinimumFractionDigits(2);\n String formatPrice = nf.format(price);\n\n // Remove commas from large numbers so that it displays as \"258963.99\" not \"258,963.99\",\n // to keep the app from crashing when the save button is clicked.\n String newFormatPrice = formatPrice.replace(\",\", \"\");\n\n // Update the views on the screen with the values from the database.\n etTitle.setText(productName);\n etAuthor.setText(author);\n etPrice.setText(newFormatPrice);\n etEditQuantity.setText(String.valueOf(quantity));\n etSupplier.setText(supplier);\n etPhoneNumber.setText(supplierPhoneNumber);\n }\n }", "public String getBookId() {\r\n return bookId;\r\n }", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "Seller findById(Integer id);", "Seller findById(Integer id);", "public void read(String bookName, World world) {\n\t\tItem item = world.dbItems().get(bookName);\n\t\tList<Item> items = super.getItems();\n\n\t\tif (items.contains(item) && item instanceof Book) {\n\t\t\tBook book = (Book) item;\n\t\t\tSystem.out.println(book.getBookText());\n\t\t} else {\n\t\t\tSystem.out.println(\"No book called \" + bookName + \" in inventory.\");\n\t\t}\n\t}", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }", "private void enterBook() {\n String sku;\n String author;\n String description;\n double price;\n String title;\n boolean isInStock;\n String priceTmp;\n String inStock;\n Scanner keyb = new Scanner(System.in);\n\n System.out.println(\"Enter the sku number.\"); // Enter the SKU number\n sku = keyb.nextLine();\n\n System.out.println(\"Enter the title of the book.\"); // Enter the title\n title = keyb.nextLine();\n\n System.out.println(\"Enter the author of the book.\"); // Enter the author\n author = keyb.nextLine();\n\n System.out.println(\"Enter the price of the book.\"); // Enter the price of the book\n priceTmp = keyb.nextLine();\n price = Double.parseDouble(priceTmp);\n\n System.out.println(\"Enter a description of the book.\"); // Enter the description of the book\n description = keyb.nextLine();\n\n System.out.println(\"Enter whether the book is in stock (\\\"Y\\\"|\\\"N\\\").\"); // in stock?\n inStock = keyb.nextLine();\n if (inStock.equalsIgnoreCase(\"Y\")) {\n isInStock = true;\n } else if (inStock.equalsIgnoreCase(\"N\")) {\n isInStock = false;\n } else {\n System.out.println(\"Not a valid entry. In stock status is unknown; therefore, it will be listed as no.\");\n isInStock = false;\n }\n\n Book book = new Book(title, author, description, price, isInStock);\n bookDB.put(sku, book);\n }", "public void setBookID(int bookID) {\n this.bookID = bookID;\n }", "public void setBookName(java.lang.String value);", "public void setSellerId(Long sellerId) {\n this.sellerId = sellerId;\n }", "public void setSellerId(Long sellerId) {\n this.sellerId = sellerId;\n }", "@Override\n\tpublic List<Sold> selectSoldListBySeller(int seller_id) {\n\t\tList<Sold> list = new ArrayList<>();\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"SELECT * FROM sold WHERE seller_id=?\";\n \n\t\ttry {\n\t\t\tconn = getConnection();\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t\tpstmt.setInt(1, seller_id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tSold sd = new Sold();\n\t\t\t\t\n\t\t\t\tsd.setOrder_id(rs.getInt(\"order_id\"));\n\t\t\t\tsd.setSeller_id(rs.getInt(\"seller_id\"));\n\t\t\t\tsd.setBook_id(rs.getInt(\"book_id\"));\n\t\t\t\tsd.setSold_date(rs.getDate(\"sold_date\"));\n\t\t\t\tsd.setSold_price(rs.getInt(\"sold_price\"));\n\t\t\t\tsd.setBuyer_id(rs.getInt(\"buyer_id\"));\n\t\t\t\tsd.setSold_date_string(rs.getString(\"sold_date\"));\n\t\t\t\t\n\t\t\t\tlist.add(sd);\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} catch (Exception 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\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t\tif (pstmt != null)\n\t\t\t\t\tpstmt.close();\n\t\t\t\tif(conn !=null)\n\t\t\t\t\tconn.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 \n\t\treturn list;\n\t}", "public void findBook() {\n\t\tif (books.size() > 0) {\n\t\t\tint randInt = rand.nextInt(books.size());\n\t\t\tbook = books.get(randInt);\n\t\t}\n\t}", "void setBookBorrowedDao(final BookBorrowedDao bookBorrowedDao);", "public void setBookid(Integer bookid) {\r\n\t\tthis.bookid = bookid;\r\n\t}", "@Override\n public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {\n String[] projection = {\n BookEntry._ID,\n BookEntry.COLUMN_NAME,\n BookEntry.COLUMN_PRICE,\n BookEntry.COLUMN_QUANTITY};\n return new CursorLoader(this, BookEntry.CONTENT_URI, projection,null,null,null);\n }", "public String getBookId() {\n return bookId;\n }", "public String getBookId() {\n return bookId;\n }", "public int getBook_id() {\n\treturn book_id;\n}", "public void firstLoadBookUpdate(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\tint cp=myViewDetailBook.getNoofcopies();\r\n\t\tSystem.out.println(\"No of Copy in First Load Book Update=\"+cp);\r\n\t\tmyForm.setNoOfcopies(cp);\r\n\t\t\r\n\t}", "private void load_buku() {\n Object header[] = {\"ID BUKU\", \"JUDUL BUKU\", \"PENGARANG\", \"PENERBIT\", \"TAHUN TERBIT\"};\n DefaultTableModel data = new DefaultTableModel(null, header);\n bookTable.setModel(data);\n String sql_data = \"SELECT * FROM tbl_buku\";\n try {\n Connection kon = koneksi.getConnection();\n Statement st = kon.createStatement();\n ResultSet rs = st.executeQuery(sql_data);\n while (rs.next()) {\n String d1 = rs.getString(1);\n String d2 = rs.getString(2);\n String d3 = rs.getString(3);\n String d4 = rs.getString(4);\n String d5 = rs.getString(5);\n\n String d[] = {d1, d2, d3, d4, d5};\n data.addRow(d);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "private void btnTakeBookActionPerformed(java.awt.event.ActionEvent evt) {\n DefaultTableModel model = (DefaultTableModel) tblStudentsBookList.getModel();\n lblTakeBookLimit.setText(new texts().takeBookLimit() + takeBookLimit + \" )\");\n if (model.getRowCount() < takeBookLimit) {\n String BookID = txtID.getText().trim();\n int bookID = Integer.parseInt(BookID);\n String bookName = txtBookName.getText().trim();\n String ISBN_NO = txtISBN_No.getText().trim();\n int ISBN_No = Integer.parseInt(ISBN_NO);\n String BookStatus = txtBookStatus.getText().trim();\n String StudentID = lblStudentID.getText().trim();\n int studentID = sNum.studentID;\n int bookGenreIndex = comboBxBookGenre.getSelectedIndex();\n if (bookGenreIndex <= 0) {\n JOptionPane.showMessageDialog(null, new texts().selectLine());\n return;\n }\n bookGenre bookGenre = bookGenreList.get(bookGenreIndex - 1);\n\n int authorIndex = comboBxAuthor.getSelectedIndex();\n if (authorIndex <= 0) {\n JOptionPane.showMessageDialog(null, new texts().selectLine());\n return;\n }\n DAL.author valueOfAuthor = authorList.get(authorIndex - 1);\n\n int publisherIndex = comboBxPublisher.getSelectedIndex();\n if (publisherIndex <= 0) {\n JOptionPane.showMessageDialog(null, new texts().selectLine());\n return;\n }\n DAL.publisher valueOfPublisher = publisherList.get(publisherIndex - 1);\n\n String takeDate = (bas.format(today));\n String with = new texts().withStudent();\n new servicesBooks().vtUpdateStudent(bookID, with);\n servicesStudentsBook book = new servicesStudentsBook();\n book.vtAdd(studentID, bookID, bookName, bookGenre.getBookGenreID(), valueOfAuthor.getAuthorID(), ISBN_No, BookStatus, valueOfPublisher.getPublisherID(), takeDate);\n new servicesStudentsBook().vtUpdateStudent(bookID, with);\n takeBookLimit -= 1;\n } else {\n lblTakeBookLimit.setText(\"alınabilir kitap limti dolduğu için kitap alamazsınız\");\n }\n List();\n Clean();\n }", "public void initiateStore() {\r\n\t\tURLConnection urlConnection = null;\r\n\t\tBufferedReader in = null;\r\n\t\tURL dataUrl = null;\r\n\t\ttry {\r\n\t\t\tdataUrl = new URL(URL_STRING);\r\n\t\t\turlConnection = dataUrl.openConnection();\r\n\t\t\tin = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\r\n\t\t\tString inputLine;\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tString[] splittedLine = inputLine.split(\";\");\r\n\t\t\t\t// an array of 4 elements, the fourth element\r\n\t\t\t\t// the first three elements are the properties of the book.\r\n\t\t\t\t// last element is the quantity.\r\n\t\t\t\tBook book = new Book();\r\n\t\t\t\tbook.setTitle(splittedLine[0]);\r\n\t\t\t\tbook.setAuthor(splittedLine[1]);\r\n\t\t\t\tBigDecimal decimalPrice = new BigDecimal(splittedLine[2].replaceAll(\",\", \"\"));\r\n\t\t\t\tbook.setPrice(decimalPrice);\r\n\t\t\t\tfor(int i=0; i<Integer.parseInt(splittedLine[3]); i++)\r\n\t\t\t\t\tthis.addBook(book);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(!in.equals(null)) in.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public BookBean retrieveBook(String bid) throws SQLException {\r\n\t\tString query = \"select * from BOOK where bid='\" + bid + \"'\";\t\t\r\n\t\tBookBean book = null;\r\n\t\tPreparedStatement p = con.prepareStatement(query);\t\t\r\n\t\tResultSet r = p.executeQuery();\r\n\t\t\r\n\t\twhile(r.next()){\r\n\t\t\tString bookID = r.getString(\"BID\");\r\n\t\t\tString title = r.getString(\"TITLE\");\r\n\t\t\tint price = r.getInt(\"PRICE\");\r\n\t\t\tString bookCategory = r.getString(\"CATEGORY\");\t\t\t\r\n\t\t\tbook = new BookBean(bookID, title, price,bookCategory);\r\n\t\t}\r\n\t\tr.close();\r\n\t\tp.close();\r\n\t\treturn book;\r\n\t}", "public static void loadSellTable()\n {\n final String QUERY = \"SELECT Sells.SellId, Sells.ProductId, Clients.FirstName, Clients.LastName, Products.ProductName, Sells.Stock, Sells.FinalPrice \"\n + \"FROM Sells, Products, Clients WHERE Sells.ProductId = Products.ProductId AND Sells.ClientId=Clients.clientId\";\n\n DefaultTableModel dtm = (DefaultTableModel) new SellDatabase().selectTable(QUERY);\n sellTable.setModel(dtm);\n }", "@FXML\n public void returnOrBorrowBook() {\n LibrarySystem.setScene(\n new SearchBook(reader, null, readerlist, booklist));\n }", "public void getBookAvailability() {\n getBookReservationEligibility();\n }", "public void bookItin(View view){\n try{\n // Get index of itinerary from tis user\n EditText numberEdit = (EditText) findViewById(R.id.numberEdit);\n int index = Integer.parseInt(numberEdit.getText().toString());\n Client thisClient = system.getClient(userInfo[0]);\n Itinerary itin = selectionItinerary.get(index);\n // Store this users booked itinerary\n thisClient.bookItin(itin);\n system.addClient(thisClient);\n bookedItins.add(itin);\n TextView displayText = (TextView) findViewById(R.id.displayText);\n displayText.setText(\"This Itinerary booked successfully: \" + itin.toString());\n }catch (Exception e){\n // Let user know if itinerary cannot be stored\n TextView displayText = (TextView) findViewById(R.id.displayText);\n displayText.setText(\"No such itinerary found. Please choose\\n\" +\n \"number from search list displayed\");\n Button button = (Button) findViewById(R.id.bookButton);\n button.setEnabled(false);\n EditText numberEdit = (EditText) findViewById(R.id.numberEdit);\n numberEdit.setText(\"\");\n }\n }", "public void setSBookerLevel(String sBookerLevel) {\n this.sBookerLevel = sBookerLevel;\n }", "java.lang.String getSeller();", "protected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.bookdisplay);\n\t\tpreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\t\tprice = (EditText)findViewById(R.id.price);\n\t\tBundle extras = getIntent().getExtras();\n\t\tbookTitle = extras.getString(\"bookTitle\");\n\t\tbookAuthor = extras.getString(\"bookAuthor\");\n\t\tbookPublisher = extras.getString(\"bookPublisher\");\n\t\tbookISBN = extras.getString(\"bookISBN\");\n\t\tbookDescription = extras.getString(\"bookDescription\");\n\t\tLog.d(\"title\", bookTitle);\n\t\tLog.d(\"bokAuthor\", bookAuthor);\n\t\tLog.d(\"title\", bookPublisher);\n\t\tLog.d(\"title\", bookISBN);\n\t\ttitle = (TextView)findViewById(R.id.title);\n\t\tauthor = (TextView)findViewById(R.id.author);\n\t\tdescription = (TextView)findViewById(R.id.description);\n\t\tratings = (TextView)findViewById(R.id.rating);\n\t\tbookcover = (ImageView)findViewById(R.id.bookcover);\n\t\tpublisher = (TextView)findViewById(R.id.publisher);\n\t\tpages = (TextView)findViewById(R.id.pages);\n\t\tcategory = (TextView)findViewById(R.id.categories);\n\t\tisbncode = (TextView)findViewById(R.id.isbncode);\n\t\tonShare = (Button)findViewById(R.id.onShare);\n\t\t\n\t\tonShare.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tgoToCheck();\n\t\t\t}\n\t\t});\n\t\t\n\t\ttitle.setText(bookTitle);\n\t\tauthor.setText(bookAuthor);\n\t\tpublisher.setText(bookPublisher);\n\t\tisbncode.setText(bookISBN);\n\t\tdescription.setText(bookDescription);\n\t\tratings.setText(bookRatings);\n\t\tcategory.setText(bookCategory);\n\t\tpages.setText(bookPages);\n\t\tbookcover.setImageResource(R.drawable.thumbnail);\n\t\t\n\t\tprogressDialog = new ProgressDialog(this);\n\t progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n\t progressDialog.setCancelable(false);\n\t\t\n\t mDbHelper = new SharedBooksDbAdapter(this);\n\t\tmDbHelper.open();\n\t\t\n\t}", "List<Booking> getBookingByUserID(LibraryUser libraryUser);", "public void displayBook()\n\t{\n\t\tb.display();\n\t\tSystem.out.println(\"Available Books=\"+availableBooks+\"\\n\");\n\t}", "public String getBook() {\n\t\treturn book;\r\n\t}", "@Override\n public void onBindViewHolder(LoreBookSelectionViewHolder holder, int position) {\n LoreBookSelectionInformation current = bookSelectionData.get(position);\n\n holder.bookIcon.setImageResource(current.getBookIconID());\n holder.bookName.setText(current.getBookName());\n }", "public void loadBooksOfCategory(){\n long categoryId=mainActivityViewModel.getSelectedCategory().getMcategory_id();\n Log.v(\"Catid:\",\"\"+categoryId);\n\n mainActivityViewModel.getBookofASelectedCategory(categoryId).observe(this, new Observer<List<Book>>() {\n @Override\n public void onChanged(List<Book> books) {\n if(books.isEmpty()){\n binding.emptyView.setVisibility(View.VISIBLE);\n }\n else {\n binding.emptyView.setVisibility(View.GONE);\n }\n\n booksAdapter.setmBookList(books);\n }\n });\n }", "public String getBookId() {\n\t\treturn bookId;\n\t}", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n mSupplier = BookEntry.SUPPLIER_UNKNOWN;\n }", "private void setBooksInfo () {\n infoList = new ArrayList<> ();\n\n\n // item number 1\n\n Info info = new Info ();// this class will help us to save data easily !\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"ما هي اضطرابات طيف التوحد؟\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"سيساعدك هذا المستند على معرفة اضطراب طيف التوحد بشكل عام\");\n\n // we can add book url or download >>\n info.setInfoPageURL (\"https://firebasestorage.googleapis.com/v0/b/autismapp-b0b6a.appspot.com/o/material%2FInfo-Pack-for\"\n + \"-translation-Arabic.pdf?alt=media&token=69b19a8d-8b4c-400a-a0eb-bb5c4e5324e6\");\n\n infoList.add (info); //adding item 1 to list\n\n\n/* // item number 2\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 2 to list\n\n\n // item 3\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 3 to list\n\n // item number 4\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism part 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 4 to list\n\n\n // item 5\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 5 to list*/\n\n\n displayInfo (infoList);\n\n }", "public void loadLecturer2(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec2.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n}", "public String getSeller() {\n return seller;\n }", "public String getSeller() {\n return seller;\n }", "void establishBookDataSourceFromProvider() {\n String className = prefs.getString(\"dataproviderpref\", GoogleBookDataSource.class.getCanonicalName());\r\n Log.i(Constants.LOG_TAG, \"Establishing book data provider using class name - \" + className);\r\n try {\r\n Class<?> clazz = Class.forName(className);\r\n // NOTE - validate that clazz is of BookDataSource type?\r\n Constructor<?> ctor = clazz.getConstructor(new Class[] { BookWormApplication.class });\r\n bookDataSource = (BookDataSource) ctor.newInstance(this);\r\n } catch (ClassNotFoundException e) {\r\n Log.e(Constants.LOG_TAG, e.getMessage(), e);\r\n throw new RuntimeException(\"Error, unable to establish data provider. \" + e.getMessage());\r\n } catch (InvocationTargetException e) {\r\n Log.e(Constants.LOG_TAG, e.getMessage(), e);\r\n throw new RuntimeException(\"Error, unable to establish data provider. \" + e.getMessage());\r\n } catch (NoSuchMethodException e) {\r\n Log.e(Constants.LOG_TAG, e.getMessage(), e);\r\n throw new RuntimeException(\"Error, unable to establish data provider. \" + e.getMessage());\r\n } catch (IllegalAccessException e) {\r\n Log.e(Constants.LOG_TAG, e.getMessage(), e);\r\n throw new RuntimeException(\"Error, unable to establish data provider. \" + e.getMessage());\r\n } catch (InstantiationException e) {\r\n Log.e(Constants.LOG_TAG, e.getMessage(), e);\r\n throw new RuntimeException(\"Error, unable to establish data provider. \" + e.getMessage());\r\n }\r\n }", "Booking getBookingById(BookingKey bookingKey);" ]
[ "0.63099504", "0.6077196", "0.6064007", "0.6039541", "0.5994568", "0.59734684", "0.5722914", "0.5698503", "0.56841576", "0.5661361", "0.5571297", "0.5561962", "0.55132294", "0.55132294", "0.5487453", "0.5471832", "0.54662436", "0.5463797", "0.54568005", "0.5453437", "0.54165894", "0.5405046", "0.5404376", "0.539714", "0.5345742", "0.53320664", "0.5322538", "0.5315839", "0.5315839", "0.53093165", "0.52946573", "0.52865434", "0.5249911", "0.5249876", "0.5236466", "0.522693", "0.5225078", "0.52184635", "0.5217733", "0.52083236", "0.5192343", "0.51850945", "0.5182162", "0.51809794", "0.5177732", "0.5169817", "0.51685023", "0.5167107", "0.5158617", "0.51585335", "0.51441824", "0.51404417", "0.51369476", "0.5136226", "0.51348686", "0.5131002", "0.5131002", "0.5129947", "0.51265156", "0.51265156", "0.51265156", "0.51230323", "0.5122016", "0.5105085", "0.5101699", "0.50978684", "0.50978684", "0.5097061", "0.5085188", "0.50833917", "0.5078962", "0.5078018", "0.50670433", "0.50670433", "0.506354", "0.5062598", "0.5062522", "0.5058265", "0.50545406", "0.50372124", "0.5036867", "0.50352514", "0.50350106", "0.5034531", "0.5026639", "0.5024086", "0.50228983", "0.502111", "0.50105304", "0.5010144", "0.50022626", "0.49982244", "0.4997382", "0.49967843", "0.4994946", "0.49878088", "0.49853107", "0.49853107", "0.4985165", "0.4966156" ]
0.5027273
84
Load Selected book details to the table in settings according to given name and location
public static List<Book> searchBookByNameAndLocation(String name,String location) throws HibernateException{ session = sessionFactory.openSession(); session.beginTransaction(); Query query = session.getNamedQuery("INVENTORY_searchBookByNameAndLocation").setString("name", name).setString("location", location); List<Book> resultList = query.list(); session.getTransaction().commit(); session.close(); return resultList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadBookInformation(String rawPage, Document doc, Book book) {\n BookDetailParser parser = new BookDetailParser();\n SwBook swBook = parser.parseDetailPage(rawPage);\n book.setContributors(swBook.getContributors());\n book.setCover_url(coverUrlParser.parse(doc));\n book.setShort_description(descriptionShortParser.parse(doc));\n book.addPrice(swBook.getPrice().getPrices().get(0));\n book.setTitle(titleParser.parse(doc));\n }", "@FXML\n\t private void loadbookinfo(ActionEvent event) {\n\t \tclearbookcache();\n\t \t\n\t \tString id = bookidinput.getText();\n\t \tString qu = \"SELECT * FROM BOOK_LMS WHERE id = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t Boolean flag = false;\n\t \n\t try {\n while (rs.next()) {\n String bName = rs.getString(\"title\");\n String bAuthor = rs.getString(\"author\");\n Boolean bStatus = rs.getBoolean(\"isAvail\");\n\n Bookname.setText(bName);\n Bookauthor.setText(bAuthor);\n String status = (bStatus) ? \"Available\" : \"Not Available\";\n bookstatus.setText(status);\n\n flag = true;\n }\n\n if (!flag) {\n Bookname.setText(\"No Such Book Available\");\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void populateUI(BookEntry book) {\n // Return if the task is null\n if (book == null) {\n return;\n }\n // Use the variable book to populate the UI\n mNameEditText.setText(book.getBook_name());\n mQuantityTextView.setText(Integer.toString(book.getQuantity()));\n mPriceEditText.setText(Double.toString(book.getPrice()));\n mPhoneEditText.setText(Integer.toString(book.getSupplier_phone_number()));\n mSupplier = book.getSupplier_name();\n switch (mSupplier) {\n case BookEntry.SUPPLIER_ONE:\n mSupplierSpinner.setSelection(1);\n break;\n case BookEntry.SUPPLIER_TWO:\n mSupplierSpinner.setSelection(2);\n break;\n default:\n mSupplierSpinner.setSelection(0);\n break;\n }\n mSupplierSpinner.setSelection(mSupplier);\n }", "public void loadBook() {\n List<Book> books = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n Book book = new Book(\"Book-\" + i, \"Test book \" + i);\n books.add(book);\n }\n this.setBooks(books);\n }", "public void read(String bookName, World world) {\n\t\tItem item = world.dbItems().get(bookName);\n\t\tList<Item> items = super.getItems();\n\n\t\tif (items.contains(item) && item instanceof Book) {\n\t\t\tBook book = (Book) item;\n\t\t\tSystem.out.println(book.getBookText());\n\t\t} else {\n\t\t\tSystem.out.println(\"No book called \" + bookName + \" in inventory.\");\n\t\t}\n\t}", "public void getBookDetails() {\n\t}", "private void selectBook(Book book){\n\t\tthis.book = book;\n\t\tshowView(\"ModifyBookView\");\n\t\tif(book.isInactive()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is archived. It must be recovered before it can be modified.\"));\n\t\t}else if(book.isLost()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is lost. It must be recovered before it can be modified.\"));\n\t\t}\n\t}", "public void scandb_book_info(String table_name) {\n sql = \" SELECT * from \" + table_name + \";\";\n\n try {\n result = statement.executeQuery(sql);\n while (result.next()) {\n set_book_info(result.getInt(\"id\"), result.getString(\"name\"), result.getString(\"url\"));\n\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "private void loadLocation(Location location, ResultSet resultSet, int index) throws SQLException {\n\t\t\tlocation.setLocationID(resultSet.getInt(index++));\n\t\t\tlocation.setLongDescription(resultSet.getString(index++));\n\t\t\tlocation.setShortDescription(resultSet.getString(index++));\n\t\t}", "public void setBookName(java.lang.String value);", "public void establishSelectedBook(final long id) {\r\n selectedBook = dataManager.selectBook(id);\r\n }", "private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}", "public Book load(String bid) {\n\t\treturn bookDao.load(bid);\r\n\t}", "private static void loadBooks() {\n\tbookmarks[2][0]=BookmarkManager.getInstance().createBook(4000,\"Walden\",\"\",1854,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][1]=BookmarkManager.getInstance().createBook(4001,\"Self-Reliance and Other Essays\",\"\",1900,\"Dover Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][2]=BookmarkManager.getInstance().createBook(4002,\"Light From Many Lamps\",\"\",1960,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][3]=BookmarkManager.getInstance().createBook(4003,\"Head First Design Patterns\",\"\",1944,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][4]=BookmarkManager.getInstance().createBook(4004,\"Effective Java Programming Language Guide\",\"\",1990,\"Wilder Publications\",new String[] {\"Eric Freeman\",\"Bert Bates\",\"Kathy Sierra\",\"Elisabeth Robson\"},\"Philosophy\",4.3);\n}", "public void loadBooks(){\n\t\tSystem.out.println(\"\\n\\tLoading books from CSV file\");\n\t\ttry{\n\t\t\tint iD=0, x;\n\t\t\tString current = null;\n\t\t\tRandom r = new Random();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"../bin/books.csv\"));\n\t\t\twhile((current = br.readLine()) != null){\n\t\t\t\tString[] data = current.split(\",\");\n\t\t\t\tx = r.nextInt(6) + 15;\n\t\t\t\tfor(int i =0;i<x;i++){\n\t\t\t\t\tBook b= new Book(Integer.toHexString(iD), data[0], data[1], data[2], data[3]);\n\t\t\t\t\tif(bookMap.containsKey(data[0]) != true){\n\t\t\t\t\t\tbookMap.put(data[0], new ArrayList<Book>());\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\tbookMap.get(data[0]).add(b);\n\t\t\t\t\tiD += 1;\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"\\tBooks Added!\");\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"\\tFile not found\");\n\t\t}catch(IOException e){\n System.out.println(e.toString());\n }\n\t}", "CmsRoomBook selectByPrimaryKey(String bookId);", "private void initData() {\n\r\n\t\tint statusBarHeight = 50;\r\n\t\tint readHeight = ApplicationManager.SCREEN_HEIGHT - statusBarHeight;\r\n\r\n\t\t// TODO 获取图书信息\r\n\t\tIntent intent = getIntent();\r\n\t\tbookInfo = (BookInfo) intent.getSerializableExtra(BOOK_INFO_KEY);\r\n\r\n\t\ttitleName.setText(bookInfo.getName());\r\n\r\n\t\tString progressInfo = PreferenceHelper.getString(bookInfo.getId() + \"\",\r\n\t\t\t\tnull);\r\n\t\tL.v(TAG, \"initData\", \"progressInfo : \" + progressInfo);\r\n\r\n\t\tif (!TextUtils.isEmpty(progressInfo)) {\r\n\t\t\t// 格式 : ChapterId_ChapterName_CharsetIndex\r\n\t\t\tString[] values = progressInfo.split(\"#\");\r\n\t\t\tif (values.length == 3) {\r\n\t\t\t\treadProgress = new Bookmark();\r\n\t\t\t\treadProgress.setChapterId(Integer.valueOf(values[0]));\r\n\t\t\t\treadProgress.setChapterName(values[1]);\r\n\t\t\t\treadProgress.setCharsetIndex(Integer.valueOf(values[2]));\r\n\t\t\t} else {\r\n\t\t\t\tPreferenceHelper.putString(bookInfo.getId() + \"\", \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (readProgress == null) {\r\n\t\t\treadProgress = new Bookmark();\r\n\t\t\tChapterInfo chapterInfo = bookInfo.getChapterInfos().get(0);\r\n\t\t\treadProgress.setChapterId(chapterInfo.getId());\r\n\t\t\treadProgress.setChapterName(chapterInfo.getName());\r\n\t\t\treadProgress.setCharsetIndex(0);\r\n\t\t}\r\n\r\n\t\tcurrentChapter = findChapterInfoById(readProgress.getChapterId());\r\n\r\n\t\tif (currentChapter == null\r\n\t\t\t\t&& TextUtils.isEmpty(currentChapter.getPath())) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// TODO 读取sp中的字体大小\r\n\t\tcurrentTextSize = PreferenceHelper.getInt(TEXT_SIZE_KEY, 40);\r\n\t\tBookPageFactory.setFontSize(currentTextSize);\r\n\t\tpagefactory = BookPageFactory.build(ApplicationManager.SCREEN_WIDTH, readHeight);\r\n\t\ttry {\r\n\t\t\tpagefactory.openbook(currentChapter.getPath());\r\n\t\t} catch (IOException e) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tadapter = new ScanViewAdapter(this, pagefactory);\r\n\r\n\t\t// TODO 跳转到历史记录\r\n\t\tscanview.setAdapter(adapter, readProgress.getCharsetIndex());\r\n\r\n\t\tmenuIn = AnimationUtils.loadAnimation(this, R.anim.menu_pop_in);\r\n\t\tmenuOut = AnimationUtils.loadAnimation(this, R.anim.menu_pop_out);\r\n\t\t\r\n\t\tif(android.os.Build.VERSION.SDK_INT>=16){\r\n\t\t\ttitleOut = new TranslateAnimation(\r\n\t Animation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n\t 0, Animation.ABSOLUTE, 0,\r\n\t Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24));\r\n\t\t\ttitleOut.setDuration(400);\r\n\t \t\t\r\n\t titleIn = new TranslateAnimation(\r\n \t\t\t\tAnimation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n \t\t\t\t0, Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24),\r\n \t\t\t\tAnimation.ABSOLUTE, 0);\r\n\t titleIn.setDuration(400);\r\n\t\t}else{\r\n\t\t\ttitleIn = AnimationUtils.loadAnimation(this, R.anim.title_in);\r\n\t\t\ttitleOut = AnimationUtils.loadAnimation(this, R.anim.title_out);\r\n\t\t}\r\n\t\t\r\n\t\taddBookmark = AnimationUtils.loadAnimation(this, R.anim.add_bookmark);\r\n\t\t\r\n\r\n\t\ttitleOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\ttitle.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\r\n\t\tmenuOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\tmenu.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tscanview.setOnMoveListener(new onMoveListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onMoveEvent() {\r\n\t\t\t\tif (isMenuShowing) {\r\n\t\t\t\t\thideMenu();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageChanged(View currPage) {\r\n\t\t\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\t\t\treadProgress.setCharsetIndex(tag.start_index);\r\n\t\t\t\tshowChaptersBtn(tag);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tView currPage = scanview.getCurrPage();\r\n\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\tshowChaptersBtn(tag);\r\n\t\t\r\n\t\t//TODO 获取该书的书签\r\n\t\tgetBookMarks();\r\n\t\t\r\n\t}", "private static boolean loadBooks() throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new FileReader(BOOKS_FILE));\n\t\tboolean error_loading = false; //stores whether there was an error loading a book\n\t\t\n\t\tString line = reader.readLine(); //read the properties of a book in the books.txt file\n\t\t/*read books.txt file, set the input for each BookDetails object and add each BookDetails object to the ALL_BOOKS Hashtable*/\n\t\twhile(line != null){\n\t\t\tBookDetails book = new BookDetails();\n\t\t\tString[] details = line.split(\"\\t\"); //the properties of each BookDetails object are separated by tab spaces in the books.txt file\n\t\t\tfor(int i = 0; i < details.length; i ++){\n\t\t\t\tif(!setBookInput(i, details[i], book)){ //checks if there was an error in setting the BookDetails object's properties with the values in the books.txt file\n\t\t\t\t\tSystem.out.println(\"ERROR Loading Books\");\n\t\t\t\t\terror_loading = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(error_loading) //if there was an error loading a book then stop the process of loading books\n\t\t\t\tbreak;\n\t\t\tALL_BOOKS.put(book.getBookId(), book); //add BookDetails object to ALL_BOOKS\n\t\t\taddToPublisherTable(book.getPublisher(), book.getBookTitle()); //add book's title to the ALL_PUBLISHERS Hashtable\n\t\t\taddToGenreTable(book, book.getBookTitle()); //add book's title to the ALL_GENRES ArrayList\n\t\t\taddToAuthorTable(book.getAuthor().toString(), book.getBookTitle()); //add book's title to the ALL_AUTHORS Hashtable\n\t\t\tline = reader.readLine(); \n\t\t}\n\t\treader.close();\n\t\t\n\t\tif(!error_loading){\n\t\t\tSystem.out.println(\"Loading Books - Complete!\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false; //error encountered while loading books\n\t}", "@Override\n\tpublic void loadData() {\n\t\tint sel = getSelected() == null ? -1 : getSelected().getWardId();\n\t\ttry {\n\t\t\tList<Ward> list = searchInput.getText().equals(\"\") ? WardData.getList()\n\t\t\t\t\t: WardData.getBySearch(searchInput.getText());\t\t\t\n\t\t\ttableData.removeAll(tableData);\n\t\t\tfor (Ward p : list) {\n\t\t\t\ttableData.add(p);\n\t\t\t}\n\t\t} catch (DBException e) {\n\t\t\tGlobal.log(e.getMessage());\n\t\t}\n\n\t\tif (sel > 0) {\n\t\t\tsetSelected(sel);\n\t\t}\n\t}", "@FXML\n public void returnOrBorrowBook() {\n LibrarySystem.setScene(\n new SearchBook(reader, null, readerlist, booklist));\n }", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "BookInfo selectByPrimaryKey(Integer id);", "@Override\n public void DataIsLoaded(List<BookModel> bookModels, List<String> keys) {\n BookModel bookModel = bookModels.get(0);\n Intent intent = new Intent (getContext(), BookDetailsActivity.class);\n intent.putExtra(\"Book\", bookModel);\n getContext().startActivity(intent);\n Log.i(TAG, \"Data is loaded\");\n\n }", "private void load() {\n Uri poiUri = Uri.withAppendedPath(Wheelmap.POIs.CONTENT_URI_POI_ID,\r\n String.valueOf(poiID));\r\n\r\n // Then query for this specific record:\r\n Cursor cur = getActivity().managedQuery(poiUri, null, null, null, null);\r\n\r\n if (cur.getCount() < 1) {\r\n cur.close();\r\n return;\r\n }\r\n\r\n cur.moveToFirst();\r\n\r\n WheelchairState state = POIHelper.getWheelchair(cur);\r\n String name = POIHelper.getName(cur);\r\n String comment = POIHelper.getComment(cur);\r\n int lat = (int) (POIHelper.getLatitude(cur) * 1E6);\r\n int lon = (int) (POIHelper.getLongitude(cur) * 1E6);\r\n int nodeTypeId = POIHelper.getNodeTypeId(cur);\r\n int categoryId = POIHelper.getCategoryId(cur);\r\n\r\n NodeType nodeType = mSupportManager.lookupNodeType(nodeTypeId);\r\n // iconImage.setImageDrawable(nodeType.iconDrawable);\r\n\r\n setWheelchairState(state);\r\n // nameText.setText(name);\r\n\r\n String category = mSupportManager.lookupCategory(categoryId).localizedName;\r\n // categoryText.setText(category);\r\n nodetypeText.setText(nodeType.localizedName);\r\n commentText.setText(comment);\r\n addressText.setText(POIHelper.getAddress(cur));\r\n websiteText.setText(POIHelper.getWebsite(cur));\r\n phoneText.setText(POIHelper.getPhone(cur));\r\n\r\n /*\r\n * POIMapsforgeOverlay overlay = new POIMapsforgeOverlay();\r\n * overlay.setItem(name, comment, nodeType, state, lat, lon);\r\n * mapView.getOverlays().clear(); mapView.getOverlays().add(overlay);\r\n * mapController.setCenter(new GeoPoint(lat, lon));\r\n */\r\n }", "public void loadLecturer2(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec2.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n}", "public void initiateStore() {\r\n\t\tURLConnection urlConnection = null;\r\n\t\tBufferedReader in = null;\r\n\t\tURL dataUrl = null;\r\n\t\ttry {\r\n\t\t\tdataUrl = new URL(URL_STRING);\r\n\t\t\turlConnection = dataUrl.openConnection();\r\n\t\t\tin = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\r\n\t\t\tString inputLine;\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tString[] splittedLine = inputLine.split(\";\");\r\n\t\t\t\t// an array of 4 elements, the fourth element\r\n\t\t\t\t// the first three elements are the properties of the book.\r\n\t\t\t\t// last element is the quantity.\r\n\t\t\t\tBook book = new Book();\r\n\t\t\t\tbook.setTitle(splittedLine[0]);\r\n\t\t\t\tbook.setAuthor(splittedLine[1]);\r\n\t\t\t\tBigDecimal decimalPrice = new BigDecimal(splittedLine[2].replaceAll(\",\", \"\"));\r\n\t\t\t\tbook.setPrice(decimalPrice);\r\n\t\t\t\tfor(int i=0; i<Integer.parseInt(splittedLine[3]); i++)\r\n\t\t\t\t\tthis.addBook(book);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(!in.equals(null)) in.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void loadBooks() {\n\t\ttry {\n\t\t\tScanner load = new Scanner(new File(FILEPATH));\n\t\t\tSystem.out.println(\"Worked\");\n\n\t\t\twhile (load.hasNext()) {\n\t\t\t\tString[] entry = load.nextLine().split(\";\");\n\n\t\t\t\t// checks the type of book\n\t\t\t\tint type = bookType(entry[0]);\n\n\t\t\t\t// creates the appropriate book\n\t\t\t\tswitch (type) {\n\t\t\t\tcase 0:\n\t\t\t\t\tcreateChildrensBook(entry); // creates a Childrensbook and adds it to the array\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tcreateCookBook(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreatePaperbackBook(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tcreatePeriodical(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase -1:\n\t\t\t\t\tSystem.out.println(\"No book created\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tload.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Did not read in file properly, restart the program, and check filepath of books.txt.\");\n\t\t}\n\t}", "public void selectNewBook(MouseEvent e)\n\t{\n\t\tBookApp.currentBook = otherAppearances.getSelectionModel().getSelectedItem();\n\t\tcurrentBookDisplay.getItems().clear();\n\t\tcurrentBookDisplay.getItems().add(BookApp.currentBook);\n\t\tcharactersNameList.getItems().clear();\n\t\tfor(Character character : (MyLinkedList<Character>) BookApp.currentBook.getCharacterList()){\n\t\t\tcharactersNameList.getItems().add(character);\n\t\t\tcharactersNameList.getSelectionModel().getSelectedIndex();\n\t\t}\n\t\totherAppearances.getItems().clear();\n\t\tfor(int i = 0; i< BookApp.unsortedBookTable.hashTable.length; i++) {\t\t\n\t\t\tfor(Book eachBook : (MyLinkedList<Book>) BookApp.unsortedBookTable.hashTable[i]) {\n\t\t\t\tfor(Character eachCharacterInTotalList : (MyLinkedList<Character>) eachBook.getCharacterList())\n\t\t\t\t{\n\t\t\t\t\tif(eachCharacterInTotalList.equals(BookApp.currentCharacter) && eachBook.equals(BookApp.currentBook))\n\t\t\t\t\t{\n\t\t\t\t\t\totherAppearances.getItems().add(eachBook);\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}", "public void loadLecturer1(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec1.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\n}", "public List<ErpBookInfo> selData();", "@FXML\n public void showBorrowedBooks() {\n LibrarySystem.setScene(new BorroweddBookList(\n (reader.getBorrowedBooks(booklist)), reader, readerlist, booklist));\n }", "public void insertBook(){\n\n // Create a new map of values, where column names are the keys\n ContentValues values = new ContentValues();\n values.put(BookContract.BookEntry.COLUMN_PRODUCT_NAME, \"You Do You\");\n values.put(BookContract.BookEntry.COLUMN_PRICE, 10);\n values.put(BookContract.BookEntry.COLUMN_QUANTITY, 20);\n values.put(BookContract.BookEntry.COLUMN_SUPPLIER_NAME, \"Kedros\");\n values.put(BookContract.BookEntry.COLUMN_SUPPLIER_PHONE_NUMBER, \"210 27 10 48\");\n\n Uri newUri = getContentResolver().insert(BookContract.BookEntry.CONTENT_URI, values);\n }", "private void updateTable(final String name, final String location) throws ServiceUnavailableException, BookingServiceException {\n\t\t\n\t\tif (name == null && location == null) {\n\t\t\ttableModel = controller.getAllEntries();\n\t\t} else {\n\t\t\ttableModel = controller.getSpecificEntries(name, location);\n\t\t}\n\t\t\n\t\ttable.setModel(tableModel);\n\t}", "public void setBook(Book book) {\n this.book = book;\n }", "static public void set_location_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"location name:\", \"rating:\", \"population:\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\n\t\t\t\t\" select distinct c.`id`, c.`name`, c.`area (1000 km^2)`, c.`GDP per capita (1000 $)`, \" +\n\t\t\t\t\t\t\t\t\"c.`population (million)`, c.`capital`, c.`GDP (billion $)` \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_places_countries c, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_places_location_country lc \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where lc.country_id=c.id and lc.location_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by c.`GDP (billion $)` desc \";\n\t\t\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct c.`id`, c.`name`, c.`area (1000 km^2)`, c.`GDP per capita (1000 $)`, \" +\n\t\t\t\t\" c.`population (million)`, c.`capital`, c.`GDP (billion $)` \" +\n\t\t\t\t\" from curr_places_countries c \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id:\", \"country name:\", \"area (1000 km^2):\", \"GDP per capita (1000 $):\",\n\t\t\t\t\"population (million):\", \"capital:\", \"GDP (billion $):\"};\n\t\tEdit_row_window.label_min_parameter=\"min. population:\";\n\t\tEdit_row_window.linked_category_name = \"COUNTRIES\";\n\t}", "private void load_buku() {\n Object header[] = {\"ID BUKU\", \"JUDUL BUKU\", \"PENGARANG\", \"PENERBIT\", \"TAHUN TERBIT\"};\n DefaultTableModel data = new DefaultTableModel(null, header);\n bookTable.setModel(data);\n String sql_data = \"SELECT * FROM tbl_buku\";\n try {\n Connection kon = koneksi.getConnection();\n Statement st = kon.createStatement();\n ResultSet rs = st.executeQuery(sql_data);\n while (rs.next()) {\n String d1 = rs.getString(1);\n String d2 = rs.getString(2);\n String d3 = rs.getString(3);\n String d4 = rs.getString(4);\n String d5 = rs.getString(5);\n\n String d[] = {d1, d2, d3, d4, d5};\n data.addRow(d);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "private void loadBtechData()\r\n\t{\r\n\t\tlist.clear();\r\n\t\tString qu = \"SELECT * FROM BTECHSTUDENT\";\r\n\t\tResultSet result = databaseHandler.execQuery(qu);\r\n\r\n\t\ttry {// retrieve student information form database\r\n\t\t\twhile(result.next())\r\n\t\t\t{\r\n\t\t\t\tString studendID = result.getString(\"studentNoB\");\r\n\t\t\t\tString nameB = result.getString(\"nameB\");\r\n\t\t\t\tString studSurnameB = result.getString(\"surnameB\");\r\n\t\t\t\tString supervisorB = result.getString(\"supervisorB\");\r\n\t\t\t\tString emailB = result.getString(\"emailB\");\r\n\t\t\t\tString cellphoneB = result.getString(\"cellphoneNoB\");\r\n\t\t\t\tString courseB = result.getString(\"stationB\");\r\n\t\t\t\tString stationB = result.getString(\"courseB\");\r\n\r\n\t\t\t\tlist.add(new StudentProperty(studendID, nameB, studSurnameB,\r\n\t\t\t\t\t\tsupervisorB, emailB, cellphoneB, courseB, stationB));\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\t// Transfer the list data on the table\r\n\t\tstudentBTable.setItems(list);\r\n\t}", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "@Override\r\n\tpublic Book getBookInfo(int book_id) {\n\t\treturn null;\r\n\t}", "private void setAll(int bnr){\n BookingManager bm = new BookingManager();\n Booking b = bm.getBooking(bnr);\n name = b.getName();\n hotelName = b.getHotel().getName();\n address = b.getHotel().getAddress();\n nrPeople = b.getRoom().getCount();\n price = b.getRoom().getPrice();\n dateFrom = b.getDateFrom();\n dateTo = b.getDateTo();\n \n \n jName.setText(name);\n jHotelName.setText(hotelName);\n jHotelAddress.setText(\"\" + address);\n jNrPeople.setText(\"\" + nrPeople);\n jPrice.setText(\"\" + price);\n jDateFrom.setText(\"\" + dateFrom);\n jDateTo.setText(\"\" + dateTo);\n }", "@FXML\n void loadComboBoxLocationValues() {\n ArrayList<Location> locations = LocationDAO.LocationSEL(-1);\n comboBoxLocation.getItems().clear();\n if (!locations.isEmpty())\n for (Location location : locations) {\n comboBoxLocation.getItems().addAll(location.getLocationID());\n }\n }", "private Book getBook(String sku) {\n return bookDB.get(sku);\n }", "public void setBorrowBookDetailsToTable() {\n\n try {\n Connection con = databaseconnection.getConnection();\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"select * from lending_book where status= '\" + \"pending\" + \"'\");\n\n while (rs.next()) {\n String id = rs.getString(\"id\");\n String bookName = rs.getString(\"book_name\");\n String studentName = rs.getString(\"student_name\");\n String lendingDate = rs.getString(\"borrow_date\");\n String returnDate = rs.getString(\"return_book_datte\");\n String status = rs.getString(\"status\");\n\n Object[] obj = {id, bookName, studentName, lendingDate, returnDate, status};\n\n model = (DefaultTableModel) tbl_borrowBookDetails.getModel();\n model.addRow(obj);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Error\");\n }\n }", "private void loadlec() {\n try {\n\n ResultSet rs = DBConnection.search(\"select * from lecturers\");\n Vector vv = new Vector();\n//vv.add(\"\");\n while (rs.next()) {\n\n// vv.add(rs.getString(\"yearAndSemester\"));\n String gette = rs.getString(\"lecturerName\");\n\n vv.add(gette);\n\n }\n //\n jComboBox1.setModel(new DefaultComboBoxModel<>(vv));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void loadBrandDataToTable() {\n\n\t\tbrandTableView.clear();\n\t\ttry {\n\n\t\t\tString sql = \"SELECT * FROM branddetails WHERE active_indicator = 1\";\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(sql);\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tbrandTableView.add(new BrandsModel(resultSet.getInt(\"brnd_slno\"), resultSet.getInt(\"active_indicator\"),\n\t\t\t\t\t\tresultSet.getString(\"brand_name\"), resultSet.getString(\"sup_name\"),\n\t\t\t\t\t\tresultSet.getString(\"created_at\"), resultSet.getString(\"updated_at\")));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tbrandName.setCellValueFactory(new PropertyValueFactory<>(\"brand_name\"));\n\t\tsupplierName.setCellValueFactory(new PropertyValueFactory<>(\"sup_name\"));\n\t\tdetailsOfBrands.setItems(brandTableView);\n\t}", "private void initialize(BookVO bookVO) {\n \n BookDAO bookDAO = new BookDAO();\n \n frame = new setGUI();\n frame.getContentPane().setBackground(new Color(250,233,220));\n frame.setBounds(750,250, 450, 600);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.getContentPane().setLayout(null);\n \n JLabel lblNewLabel = new JLabel(\"\\uC544\\uD30C\\uC694\");\n lblNewLabel.setFont(new Font(\"맑은 고딕\", Font.BOLD, 35));\n lblNewLabel.setForeground(new Color(250, 138, 98));\n lblNewLabel.setBounds(153, 37, 180, 42);\n frame.getContentPane().add(lblNewLabel);\n \n JComboBox cb_state = new JComboBox();\n cb_state.setModel(new DefaultComboBoxModel(new String[] {\"\\uCC45\\uC758 \\uC0C1\\uD0DC\", \"1. \\uCC22\\uAE40\", \"2. \\uB099\\uC11C\", \"3. \\uC624\\uC5FC\", \"4. \\uC624\\uB798\\uB428, \\uB0A1\\uC74C\", \"5. \\uAE30\\uD0C0(\\uC758\\uACAC\\uC744 \\uC801\\uC5B4\\uC8FC\\uC138\\uC694)\"}));\n cb_state.setFont(new Font(\"굴림\", Font.PLAIN, 15));\n cb_state.setBounds(44, 139, 159, 33);\n frame.getContentPane().add(cb_state);\n \n JComboBox cb_stateLevel = new JComboBox();\n cb_stateLevel.setModel(new DefaultComboBoxModel(new String[] {\"\\uC0C1\\uD0DC \\uC815\\uB3C4\", \"1. \\uC0C1\", \"2. \\uC911\", \"3. \\uD558\"}));\n cb_stateLevel.setFont(new Font(\"굴림\", Font.PLAIN, 15));\n cb_stateLevel.setBounds(229, 139, 154, 33);\n frame.getContentPane().add(cb_stateLevel);\n \n JTextArea textArea = new JTextArea(\"20자 이내로 부탁드립니다.\",21, 0);\n \n textArea.setFont(new Font(\"새굴림\", Font.PLAIN, 13));\n textArea.setBounds(35, 216, 355, 222);\n //textArea.setText(\"20자 이내로 부탁드립니다.\");\n \n textArea.addKeyListener(new KeyAdapter() {\n public void keyTyped(KeyEvent e) {\n if (textArea.getText().length() == 21) {\n e.consume();\n }\n }\n });//20글자 제한\n \n textArea.addMouseListener(new MouseAdapter(){\n @Override\n public void mouseClicked(MouseEvent e){\n \t textArea.setText(\"\");\n }\n });//기본문장 클릭하면 자동삭제\n \n frame.getContentPane().add(textArea);\n \n //BookVO bookVO2 = daoBook.getAllInfo(voBook);\n \n JButton btn_insert = new RoundedButton(\"\\uB4F1\\uB85D\");\n btn_insert.setForeground(new Color(255, 255, 255));\n btn_insert.setBackground(new Color(241, 109, 80));\n \n\n btn_insert.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n \n String bookIsbn = bookVO.getISBN();\n int bookId = 1; // bookVO에서 가져와야되는데 현재 화면의 bookVO는 id가 없음 => 다음프로젝트에서는 잘생각하고 디자인할 것...\n String userId = UserLoginGUI.userIdStatic;\n \n \n int bookState = cb_state.getSelectedIndex(); // SICK_CAT\n int stateLevel = cb_stateLevel.getSelectedIndex(); // SICK_LEVEL\n String comment = textArea.getText();\n \n// System.out.println(bookIsbn);\n// System.out.println(bookId);\n// System.out.println(userId);\n// System.out.println(bookState);\n// System.out.println(stateLevel);\n// System.out.println(comment);\n \n int sickResultCnt = bookDAO.insertSickReview(bookIsbn, bookId, userId, bookState, stateLevel, comment);\n \n \n if (sickResultCnt > 0) {\n JOptionPane.showMessageDialog(null, \n \"아파요 등록 완료!!\", \"Message\", \n JOptionPane.INFORMATION_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, \n \"아파요 등록 실패\", \"Message\", \n JOptionPane.ERROR_MESSAGE);\n }\n \n \n// txt_bookName.setText(bookVO2.getBookName());\n \n //SickBookListVO voSick = new SickBookListVO(null, null, null, null, bookState, stateLevel, null, comment);\n //daoSick.insertSick(voSick);\n \n }\n });\n btn_insert.setFont(new Font(\"맑은 고딕\", Font.BOLD, 21));\n btn_insert.setBounds(50, 470, 122, 34);\n frame.getContentPane().add(btn_insert);\n \n JButton btn_close = new RoundedButton(\"\\uB2EB\\uAE30\");\n btn_close.setForeground(new Color(255, 255, 255));\n btn_close.setBackground(new Color(246, 147, 99));\n btn_close.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n frame.dispose();\n SwingUtilities.updateComponentTreeUI(BookInfoGUI.getFrame());\n BookInfoGUI.getFrame().invalidate();\n BookInfoGUI.getFrame().validate();\n BookInfoGUI.getFrame().repaint();\n \n BookInfoGUI.getFrame().setVisible(true);\n \n }\n });\n btn_close.setFont(new Font(\"맑은 고딕\", Font.BOLD, 21));\n btn_close.setBounds(250, 470, 122, 34);\n frame.getContentPane().add(btn_close);\n \n JPanel panel = new JPanel();\n panel.setToolTipText(\"\");\n panel.setBorder(new TitledBorder(UIManager.getBorder(\"TitledBorder.border\"), \"\\uC790\\uC138\\uD788 \\uC54C\\uB824\\uC8FC\\uC138\\uC694\", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n panel.setBounds(28, 196, 370, 252);\n frame.getContentPane().add(panel);\n \n \n }", "@FXML\n\t private void loadlistbook(ActionEvent event) {\n\t \tloadwindow(\"views/booklist.fxml\", \"View Book List\");\n\t }", "@Override\r\n\tpublic boolean findDbSetting(String bookName) throws Exception {\n\t\tboolean result;\r\n\t\tresult = dbSettingMapper.findDbSetting(bookName);\r\n\t\t\r\n\t\treturn result;\r\n\t}", "Book selectByPrimaryKey(String id);", "Book selectByPrimaryKey(String bid);", "public void loadIngreID() throws SQLException, ClassNotFoundException {\r\n ArrayList<Ingredient> ingredients = new IngredientControllerUtil().getAllIngredient();\r\n ArrayList<String> name = new ArrayList<>();\r\n\r\n for (Ingredient ingredient : ingredients) {\r\n name.add(ingredient.getIngreName());\r\n }\r\n\r\n cmbIngreName.getItems().addAll(name);\r\n }", "private void reloadBook() {\n\t\tnew SwingWorker<Void, Void>() {\n\t\t\t@Override\n\t\t\tprotected Void doInBackground() {\n\t\t\t\tbook.reload();\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void done() {\n\t\t\t\tstateChangeRequest(Key.BOOK, null);\n\t\t\t}\n\t\t}.execute();\n\t}", "public void setBookDetails(String[] details) throws MalformedURLException, IOException {\n String bookTitle = details[0];\n String author = details[1];\n String path = details[2];\n String description = \"<html> \" + details[3];\n\n title.setText(bookTitle);\n authors.setText(author);\n descriptionLabel.setText(description);\n\n // Read in the imgae from URL path\n URL url = new URL(path);\n BufferedImage image = ImageIO.read(url);\n // Set the ImageIcon of the label\n ImageIcon icon = new ImageIcon(image);\n iconLabel.setIcon(icon);\n iconLabel.setText(\"\");\n }", "public void loadBookList(java.util.List<LdPublisher> ls) {\r\n final ReffererConditionBookList reffererCondition = new ReffererConditionBookList() {\r\n public void setup(LdBookCB cb) {\r\n cb.addOrderBy_PK_Asc();// Default OrderBy for Refferer.\r\n }\r\n };\r\n loadBookList(ls, reffererCondition);\r\n }", "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 }", "public void readBook()\n\t{\n\t\tb.input();\n\t\tSystem.out.print(\"Enter number of available books:\");\n\t\tavailableBooks=sc.nextInt();\n\t}", "@Nullable\n public static BookData getBook(ResourceLocation id) {\n return books.getOrDefault(id, null);\n }", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "private void loadDatabaseSettings() {\r\n\r\n\t\tint dbID = BundleHelper.getIdScenarioResultForSetup();\r\n\t\tthis.getJTextFieldDatabaseID().setText(dbID + \"\");\r\n\t}", "private void insertBook() {\n /// Create a ContentValues object with the dummy data\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_NAME, \"Harry Potter and the goblet of fire\");\n values.put(BookEntry.COLUMN_BOOK_PRICE, 100);\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, 2);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_NAME, \"Supplier 1\");\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE, \"972-3-1234567\");\n\n // Insert the dummy data to the database\n Uri uri = getContentResolver().insert(BookEntry.CONTENT_URI, values);\n // Show a toast message\n String message;\n if (uri == null) {\n message = getResources().getString(R.string.error_adding_book_toast).toString();\n } else {\n message = getResources().getString(R.string.book_added_toast).toString();\n }\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "private void loadBookResultsView(Book[] results) {\n try {\n DashboardController.dbc.bookResults(results);\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "private void setBooksInfo () {\n infoList = new ArrayList<> ();\n\n\n // item number 1\n\n Info info = new Info ();// this class will help us to save data easily !\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"ما هي اضطرابات طيف التوحد؟\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"سيساعدك هذا المستند على معرفة اضطراب طيف التوحد بشكل عام\");\n\n // we can add book url or download >>\n info.setInfoPageURL (\"https://firebasestorage.googleapis.com/v0/b/autismapp-b0b6a.appspot.com/o/material%2FInfo-Pack-for\"\n + \"-translation-Arabic.pdf?alt=media&token=69b19a8d-8b4c-400a-a0eb-bb5c4e5324e6\");\n\n infoList.add (info); //adding item 1 to list\n\n\n/* // item number 2\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 2 to list\n\n\n // item 3\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 3 to list\n\n // item number 4\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism part 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 4 to list\n\n\n // item 5\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 5 to list*/\n\n\n displayInfo (infoList);\n\n }", "public void setBookCode(java.lang.String value);", "private void getBookName(){\n db = DatabaseHelper.getInstance(this).getWritableDatabase();\n cursor = db.rawQuery(\"SELECT Name FROM Book WHERE _id = \"+bookIDSelected+\";\", null);\n startManagingCursor(cursor);\n String bookNameSelected = \"Failed to load Book Name\";\n while(cursor.moveToNext()){\n bookNameSelected = cursor.getString(0);\n }\n\n TextView txtBookTitle = findViewById(R.id.rvTxtName);\n txtBookTitle.setText(String.valueOf(bookNameSelected));\n }", "private void setUpTable()\n {\n //Setting the outlook of the table\n bookTable.setColumnReorderingAllowed(true);\n bookTable.setColumnCollapsingAllowed(true);\n \n \n bookTable.setContainerDataSource(allBooksBean);\n \n \n //Setting up the table data row and column\n /*bookTable.addContainerProperty(\"id\", Integer.class, null);\n bookTable.addContainerProperty(\"book name\",String.class, null);\n bookTable.addContainerProperty(\"author name\", String.class, null);\n bookTable.addContainerProperty(\"description\", String.class, null);\n bookTable.addContainerProperty(\"book genres\", String.class, null);\n */\n //The initial values in the table \n db.connectDB();\n try{\n allBooks = db.getAllBooks();\n }catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n db.closeDB();\n allBooksBean.addAll(allBooks);\n \n //Set Visible columns (show certain columnes)\n bookTable.setVisibleColumns(new Object[]{\"id\",\"bookName\", \"authorName\", \"description\" ,\"bookGenreString\"});\n \n //Set height and width\n bookTable.setHeight(\"370px\");\n bookTable.setWidth(\"1000px\");\n \n //Allow the data in the table to be selected\n bookTable.setSelectable(true);\n \n //Save the selected row by saving the change Immediately\n bookTable.setImmediate(true);\n //Set the table on listener for value change\n bookTable.addValueChangeListener(new Property.ValueChangeListener()\n {\n public void valueChange(ValueChangeEvent event) {\n \n }\n\n });\n }", "public Book readBookFile()\n {\n\n String name=\"\";\n String author ;\n ArrayList<String> genre = new ArrayList<String>();\n float price=0;\n String bookId;\n String fields2[];\n String line;\n\n line = bookFile.getNextLine();\n if(line==null)\n {\n return null;\n }\n String fields[] = line.split(\" by \");\n if(fields.length>2)\n {\n int i=0;\n while (i<fields.length-1)\n {\n name+=fields[i];\n if(i<fields.length-2)\n {\n name+= \" by \";\n }\n i++;\n }\n fields2 = fields[fields.length-1].split(\"%\");\n }\n else\n {\n name = fields[0];\n fields2 = fields[1].split(\"%\");\n }\n\n author = fields2[0];\n price=Float.parseFloat(fields2[1]);\n bookId=fields2[2];\n genre.add(fields2[3]);\n genre.add(fields2[4]);\n return new Book(name,genre,author,price,bookId);\n\n\n }", "public void setBookDesc(java.lang.String value);", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "private void addLoad() {\n\n\t\ttry {\n\t\t\tString company_name = company_name_txtfield.getText();\n\t\t\tString company_phone = company_phone_txtfield.getText();\n\t\t\tString pickup_name_of_place = pickup_name_of_place_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString pickup_street_address = pickup_street_address_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString pickup_city = pickup_city_txtfield.getText();\n\t\t\tString pickup_state = pickup_state_txtfield.getText();\n\t\t\tString pickup_zip_code = pickup_zipcode_txtfield.getText();\n\t\t\tString delivery_name_of_place = delivery_name_of_place_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString delivery_street_address = delivery_street_address_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString delivery_city = delivery_city_txtfield.getText();\n\t\t\tString delivery_state = delivery_state_txtfield.getText();\n\t\t\tString delivery_zip_code = delivery_zipcode_txtfield.getText();\n\t\t\tString pickup_date = Utils.getDate(pickup_date_field);// pickup_date_field.getDate().toString();\n\t\t\tString delivery_date = Utils.getDate(delivery_date_field);// delivery_date_field.getDate().toString();\n\t\t\tString driver_assigned = driver_assigned_combolist\n\t\t\t\t\t.getSelectedItem().toString();\n\t\t\tString status = status_combolist.getSelectedItem().toString();\n\t\t\tString driver_assigned_id = driver_assigned.split(\"/\")[0];\n\t\t\tString driver_assigned_name = driver_assigned.split(\"/\")[1];\n\n\t\t\tLoadBean bean = new LoadBean();\n\t\t\tbean.setCompany_name(company_name);\n\t\t\tbean.setCompany_phone(company_phone);\n\t\t\tbean.setPickup_name_of_place(pickup_name_of_place);\n\t\t\tbean.setPickup_street_address(pickup_street_address);\n\t\t\tbean.setPickup_state(pickup_state);\n\t\t\tbean.setPickup_city(pickup_city);\n\t\t\tbean.setPickup_zip_code(pickup_zip_code);\n\t\t\tbean.setPickup_date(pickup_date);\n\t\t\tbean.setDelivery_date(delivery_date);\n\t\t\tbean.setDelivery_name_of_place(delivery_name_of_place);\n\t\t\tbean.setDelivery_state(delivery_state);\n\t\t\tbean.setDelivery_street_address(delivery_street_address);\n\t\t\tbean.setDelivery_city(delivery_city);\n\t\t\tbean.setDelivery_zip_code(delivery_zip_code);\n\t\t\tbean.setDriver_assigned_id(driver_assigned_id);\n\t\t\tbean.setDriver_assigned_name(driver_assigned_name);\n\t\t\tbean.setStatus(status);\n\n\t\t\tif (DatabaseManager.getInstance() != null) {\n\t\t\t\tif (DbConnectionManager.getConnection() != null) {\n\t\t\t\t\tboolean flag = DatabaseManager.getInstance().insertLoad(\n\t\t\t\t\t\t\tDbConnectionManager.getConnection(), bean);\n\t\t\t\t\tif (flag) {\n\t\t\t\t\t\tframe.updateLoadList();\n\t\t\t\t\t\tAddLoadInformations.this.dispose();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tUtils.infoBox(\"DB Connection Error\", \"Connection Error\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void loadDetails() {\n TextView tvName = (TextView) findViewById(R.id.tvPropertyName);\n TextView tvAddress = (TextView) findViewById(R.id.tvFullAddress);\n TextView tvCategory = (TextView) findViewById(R.id.tvPropCategory);\n TextView tvSize = (TextView) findViewById(R.id.tvRoomSize);\n TextView tvPrice = (TextView) findViewById(R.id.tvPropPrice);\n\n tvName.setText(name);\n tvAddress.setText(address);\n tvCategory.setText(category);\n tvSize.setText(size + \"m2\");\n tvPrice.setText(\"R\" + price + \".00 pm\");\n getImage();\n }", "private void loadDropDownInfo() {\n\t\tif(isConnected) {\n\t\t\ttry {\n\t\t\t\tlocationBuilder = connection.getLocationData();\n\n\t\t\t\tbuildingComboData = locationBuilder.getBLDGList();\n\t\t\t\tcampusComboData = locationBuilder.getCampusList();\n\t\t\t\troomComboData = locationBuilder.getRMList();\n\n\t\t\t\tbuildingCombo.setItems(buildingComboData);\n\t\t\t\tcampusCombo.setItems(campusComboData);\n\t\t\t\troomCombo.setItems(roomComboData);\n\n\t\t\t\tbuildingCombo.getSelectionModel().selectFirst();\n\t\t\t\tcampusCombo.getSelectionModel().selectFirst();\n\t\t\t\troomCombo.getSelectionModel().selectFirst();\n\t\t\t} // End try statement \n\t\t\tcatch (SQLException e) {\n\t\t\t\tsetNotificationAnimation(\"Connection Problem, Could Not Pull Information\", Color.RED);\n\t\t\t} // End catch statement \n\t\t} // End if statement\n\t\telse {\n\t\t\tsetNotificationAnimation(\"Not Connect\", Color.RED);\n\t\t} // End else statement \n\t}", "public Book[] retrieveBookName(String bkName) {\n\t\ttry {\r\n\t\t\treturn ((BorrowDAL)dal).getObjectbkName(bkName);\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 null;\r\n\t}", "Book getBookByTitle(String title);", "@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 }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n\n try {\n cmbBookPublisherIdAdd.getItems().setAll(ChoiceBoxes.PublisherIdChoice());\n cmbBookAuthorIdAdd.getItems().setAll(ChoiceBoxes.AuthorIdChoice());\n cmdBookGenreIdAdd.getItems().setAll(ChoiceBoxes.GenreIdChoice());\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "@Override\n public void onLoadFinished(android.content.Loader<Cursor> loader, Cursor cursor) {\n if (cursor.moveToFirst()) {\n // Get the column indexes\n int productNameColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRODUCT_NAME);\n int priceColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRICE);\n int quantityColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_QUANTITY);\n int supplierNameColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_SUPPLIER_NAME);\n int supplierPhoneColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER);\n\n // Pull the data from the columns\n String productName = cursor.getString(productNameColumnIndex);\n String price = cursor.getString(priceColumnIndex);\n String quantity = cursor.getString(quantityColumnIndex);\n String supplierName = cursor.getString(supplierNameColumnIndex);\n String supplierPhone = cursor.getString(supplierPhoneColumnIndex);\n\n // Set the data pulled onto the objects\n productNameEditText.setText(productName);\n priceEditText.setText(price);\n quantityTextView.setText(quantity);\n supplierNameEditText.setText(supplierName);\n supplierPhoneEditText.setText(supplierPhone);\n\n // Set the global variable for the quantity of books\n bookQuantity = Integer.parseInt(quantity);\n }\n }", "private void loadRecordDetails() {\n updateRecordCount();\n loadCurrentRecord();\n }", "public void findBook() {\n\t\tif (books.size() > 0) {\n\t\t\tint randInt = rand.nextInt(books.size());\n\t\t\tbook = books.get(randInt);\n\t\t}\n\t}", "public void displayBook()\n\t{\n\t\tb.display();\n\t\tSystem.out.println(\"Available Books=\"+availableBooks+\"\\n\");\n\t}", "BookDO selectByPrimaryKey(String bookIsbn);", "@Override\n public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {\n String[] projection = {\n BookEntry._ID,\n BookEntry.COLUMN_NAME,\n BookEntry.COLUMN_PRICE,\n BookEntry.COLUMN_QUANTITY};\n return new CursorLoader(this, BookEntry.CONTENT_URI, projection,null,null,null);\n }", "public static List readFromACsv(String addressbookname){\n final String COMMA_DELIMITER = \",\";\n String PATH=\"C:/Users/Sukrutha Manjunath/IdeaProjects/Parctice+\" + addressbookname;\n List<Person> personList=new ArrayList<Person>();\n BufferedReader br =null;\n try{\n br=new BufferedReader(new FileReader(PATH));\n String line = \"\";\n br.readLine();\n while ((line = br.readLine()) != null)\n {\n String[] personDetails = line.split(COMMA_DELIMITER);\n\n if(personDetails.length > 0 )\n {\n //Save the employee details in Employee object\n Person person = new Person(personDetails[0],personDetails[1],personDetails[2],\n personDetails[3],personDetails[4], personDetails[5],personDetails[6]);\n personList.add(person);\n }\n }\n\n }catch (Exception ex){\n ex.printStackTrace();\n }\n finally {\n try{\n br.close();\n }\n catch (IOException e){\n e.printStackTrace();\n }\n }\n return personList;\n }", "public List<Book> readByBookName(String searchString) throws Exception{\n\t\tsearchString = \"%\"+searchString+\"%\";\n\t\treturn (List<Book>) template.query(\"select * from tbl_book where title like ?\", new Object[] {searchString}, this);\n\t}", "public static void openBooksSection() {\n click(BOOKS_TAB_UPPER_MENU);\n }", "private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n \n createBookingTimeStart.localTimeProperty().set(LocalTime.of(0,0));\n createBookingTimeEnd.localTimeProperty().set(LocalTime.of(0,0));\n \n booking = new Booking();\n \n \n createBookingType.getItems().addAll(dbH.getBookingTypes(2).toArray(new String[dbH.getBookingTypes(2).size()]));\n \n createBookingMechanic.getItems().addAll(getMechanicNames(dbH.getAllMechanics())); \n \n }", "private void loadInfo() {\n fname.setText(prefs.getString(\"fname\", null));\n lname.setText(prefs.getString(\"lname\", null));\n email.setText(prefs.getString(\"email\", null));\n password.setText(prefs.getString(\"password\", null));\n spinner_curr.setSelection(prefs.getInt(\"curr\", 0));\n spinner_stock.setSelection(prefs.getInt(\"stock\", 0));\n last_mod_date.setText(\" \" + prefs.getString(\"date\", getString(R.string.na)));\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "@FXML\n\t private void loadaddbook(ActionEvent event) {\n\t\n\t\t loadwindow(\"views/addbook.fxml\", \"Add new Book\");\n\t }", "public void retrieveDetailedBookInfo(){\n //Check for internet connection\n if(!NetworkJSONUtils.checkInternetConnection(this)) {\n ErrorUtils.errorDialog(BookDetailsActivity.this, \"Network Error\", \"It seems you don't have any network connection. Reset your connection and try again.\");\n return;\n }\n\n //Build Uri that fetches book data\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(SCHEME)\n .authority(BASE_URL)\n .appendPath(PATH0)\n .appendPath(PATH1)\n .appendPath(PATH2)\n .appendQueryParameter(PARAM_ACTION, VALUE_ACTION_RETRIEVE_DETAILED_DATA)\n .appendQueryParameter(PARAM_GID, VALUE_GID)\n .build();\n String urlString = builder.toString();\n\n //Download and parse JSON\n downloadJSON(urlString);\n }", "List<BookStoreElement> load(Reader reader);", "@FXML\n public void showAllBooks() {\n LibrarySystem.setScene(new AllBookListInReaderPage(\n reader, readerlist, booklist, booklist));\n }", "public String getBook() {\n\t\treturn book;\r\n\t}", "private void importCatalogue() {\n\n mAuthors = importModelsFromDataSource(Author.class, getHeaderClass(Author.class));\n mBooks = importModelsFromDataSource(Book.class, getHeaderClass(Book.class));\n mMagazines = importModelsFromDataSource(Magazine.class, getHeaderClass(Magazine.class));\n }", "public void loadBooksOfCategory(){\n long categoryId=mainActivityViewModel.getSelectedCategory().getMcategory_id();\n Log.v(\"Catid:\",\"\"+categoryId);\n\n mainActivityViewModel.getBookofASelectedCategory(categoryId).observe(this, new Observer<List<Book>>() {\n @Override\n public void onChanged(List<Book> books) {\n if(books.isEmpty()){\n binding.emptyView.setVisibility(View.VISIBLE);\n }\n else {\n binding.emptyView.setVisibility(View.GONE);\n }\n\n booksAdapter.setmBookList(books);\n }\n });\n }", "public BookBean getBook(String Bookid) throws SQLException {\n\t\tConnection con = DbConnection.getConnection();\n\t\tBookBean book = new BookBean();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from books where bookid= ?\";\n\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);// 鏇存敼JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t\tps = con.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setString(1, Bookid);//ps锟斤拷锟斤拷锟斤拷锟絬ser锟斤拷锟斤拷锟斤拷锟斤拷要锟斤拷同锟斤拷\n\t\t\t\n\t\t\trs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tbook.setBookid(rs.getString(\"bookid\"));\n\t\t\t\tbook.setBookname(rs.getString(\"bookname\"));\n\t\t\t\tbook.setAuthor(rs.getString(\"author\"));\n\t\t\t\tbook.setCategoryid(rs.getString(\"categoryid\"));\n\t\t\t\tbook.setPublishing(rs.getString(\"publishing\"));\n\t\t\t\tbook.setPrice(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityin(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityout(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityloss(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setPicture(rs.getString(\"bookname\"));\n\t\t\t}\n\t\t\tcon.commit();//鎻愪氦JDBC浜嬪姟\n\t\t\tcon.setAutoCommit(true);// 鎭㈠JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tcon.rollback();//鍥炴粴JDBC浜嬪姟\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDbConnection.closeConnection(rs, ps, con);\n\t\t}\n\n\t\treturn book;\n\t}", "public void setBookId(String bookId) {\n this.bookId = bookId;\n }", "public void addBook(Book b){\n\t\tbookMap.get(b.getTitle()).add(b);\n\t}" ]
[ "0.6374507", "0.6370758", "0.61679125", "0.6123859", "0.5894817", "0.58756983", "0.5868508", "0.5771436", "0.57102466", "0.5657854", "0.56442523", "0.55158406", "0.54994863", "0.54942495", "0.5466813", "0.5369261", "0.53651613", "0.53591186", "0.5344246", "0.53066957", "0.52978086", "0.52869695", "0.5283751", "0.52800524", "0.527598", "0.52632105", "0.5254332", "0.5238079", "0.5236224", "0.5224979", "0.5223094", "0.52037823", "0.52032286", "0.52012724", "0.52005154", "0.5190555", "0.5187289", "0.51689506", "0.5167903", "0.51676244", "0.5165337", "0.5158365", "0.5141475", "0.5137954", "0.5132627", "0.51216364", "0.51212776", "0.510702", "0.5096594", "0.5095598", "0.5095146", "0.5091889", "0.50786805", "0.5074985", "0.5071144", "0.50655144", "0.50625527", "0.506076", "0.5056167", "0.50360394", "0.50287443", "0.502764", "0.50245786", "0.5022473", "0.50101537", "0.50087106", "0.5007947", "0.5005678", "0.500261", "0.5001703", "0.50001985", "0.49975333", "0.49949232", "0.4987599", "0.49854603", "0.49806958", "0.49799266", "0.4979874", "0.49776283", "0.49615112", "0.4953921", "0.49507022", "0.49474877", "0.49465466", "0.4945822", "0.4945785", "0.49358004", "0.49350077", "0.493157", "0.493157", "0.4930889", "0.49305958", "0.49280462", "0.492356", "0.49209553", "0.4918201", "0.49141872", "0.49117976", "0.49085692", "0.49077857" ]
0.5172313
37
Load Selected book details to the table in settings according to given name and seller
public static List<Book> searchBookByNameAndNameOfTheSeller(String name,String nameOfTheSeller) throws HibernateException{ session = sessionFactory.openSession(); session.beginTransaction(); Query query = session.getNamedQuery("INVENTORY_searchBookByNameAndNameOfTheSeller").setString("name", name).setString("nameOfTheSeller", nameOfTheSeller); List<Book> resultList = query.list(); session.getTransaction().commit(); session.close(); return resultList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void populateUI(BookEntry book) {\n // Return if the task is null\n if (book == null) {\n return;\n }\n // Use the variable book to populate the UI\n mNameEditText.setText(book.getBook_name());\n mQuantityTextView.setText(Integer.toString(book.getQuantity()));\n mPriceEditText.setText(Double.toString(book.getPrice()));\n mPhoneEditText.setText(Integer.toString(book.getSupplier_phone_number()));\n mSupplier = book.getSupplier_name();\n switch (mSupplier) {\n case BookEntry.SUPPLIER_ONE:\n mSupplierSpinner.setSelection(1);\n break;\n case BookEntry.SUPPLIER_TWO:\n mSupplierSpinner.setSelection(2);\n break;\n default:\n mSupplierSpinner.setSelection(0);\n break;\n }\n mSupplierSpinner.setSelection(mSupplier);\n }", "@FXML\n\t private void loadbookinfo(ActionEvent event) {\n\t \tclearbookcache();\n\t \t\n\t \tString id = bookidinput.getText();\n\t \tString qu = \"SELECT * FROM BOOK_LMS WHERE id = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t Boolean flag = false;\n\t \n\t try {\n while (rs.next()) {\n String bName = rs.getString(\"title\");\n String bAuthor = rs.getString(\"author\");\n Boolean bStatus = rs.getBoolean(\"isAvail\");\n\n Bookname.setText(bName);\n Bookauthor.setText(bAuthor);\n String status = (bStatus) ? \"Available\" : \"Not Available\";\n bookstatus.setText(status);\n\n flag = true;\n }\n\n if (!flag) {\n Bookname.setText(\"No Such Book Available\");\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void loadBookInformation(String rawPage, Document doc, Book book) {\n BookDetailParser parser = new BookDetailParser();\n SwBook swBook = parser.parseDetailPage(rawPage);\n book.setContributors(swBook.getContributors());\n book.setCover_url(coverUrlParser.parse(doc));\n book.setShort_description(descriptionShortParser.parse(doc));\n book.addPrice(swBook.getPrice().getPrices().get(0));\n book.setTitle(titleParser.parse(doc));\n }", "public void getBookDetails() {\n\t}", "private Book getBook(String sku) {\n return bookDB.get(sku);\n }", "private void selectBook(Book book){\n\t\tthis.book = book;\n\t\tshowView(\"ModifyBookView\");\n\t\tif(book.isInactive()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is archived. It must be recovered before it can be modified.\"));\n\t\t}else if(book.isLost()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is lost. It must be recovered before it can be modified.\"));\n\t\t}\n\t}", "public void scandb_book_info(String table_name) {\n sql = \" SELECT * from \" + table_name + \";\";\n\n try {\n result = statement.executeQuery(sql);\n while (result.next()) {\n set_book_info(result.getInt(\"id\"), result.getString(\"name\"), result.getString(\"url\"));\n\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public List<ErpBookInfo> selData();", "public void setBookName(java.lang.String value);", "public void loadBook() {\n List<Book> books = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n Book book = new Book(\"Book-\" + i, \"Test book \" + i);\n books.add(book);\n }\n this.setBooks(books);\n }", "public void establishSelectedBook(final long id) {\r\n selectedBook = dataManager.selectBook(id);\r\n }", "public void read(String bookName, World world) {\n\t\tItem item = world.dbItems().get(bookName);\n\t\tList<Item> items = super.getItems();\n\n\t\tif (items.contains(item) && item instanceof Book) {\n\t\t\tBook book = (Book) item;\n\t\t\tSystem.out.println(book.getBookText());\n\t\t} else {\n\t\t\tSystem.out.println(\"No book called \" + bookName + \" in inventory.\");\n\t\t}\n\t}", "private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}", "@Override\n public void DataIsLoaded(List<BookModel> bookModels, List<String> keys) {\n BookModel bookModel = bookModels.get(0);\n Intent intent = new Intent (getContext(), BookDetailsActivity.class);\n intent.putExtra(\"Book\", bookModel);\n getContext().startActivity(intent);\n Log.i(TAG, \"Data is loaded\");\n\n }", "Book selectByPrimaryKey(String bid);", "public Book load(String bid) {\n\t\treturn bookDao.load(bid);\r\n\t}", "private void setAll(int bnr){\n BookingManager bm = new BookingManager();\n Booking b = bm.getBooking(bnr);\n name = b.getName();\n hotelName = b.getHotel().getName();\n address = b.getHotel().getAddress();\n nrPeople = b.getRoom().getCount();\n price = b.getRoom().getPrice();\n dateFrom = b.getDateFrom();\n dateTo = b.getDateTo();\n \n \n jName.setText(name);\n jHotelName.setText(hotelName);\n jHotelAddress.setText(\"\" + address);\n jNrPeople.setText(\"\" + nrPeople);\n jPrice.setText(\"\" + price);\n jDateFrom.setText(\"\" + dateFrom);\n jDateTo.setText(\"\" + dateTo);\n }", "public static List<Book> searchBookByNameOfSeller(String nameOfSeller) throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n\r\n Query query = session.getNamedQuery(\"INVENTORY_searchBookByNameOfTheSeller\").setString(\"nameOfTheSeller\", nameOfSeller);\r\n\r\n List<Book> resultList = query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return resultList;\r\n \r\n }", "public void setBookOffering(java.lang.String value);", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "public void loadLecturer2(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec2.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n}", "public LoreBookSelectionAdapter(Context context, List<LoreBookSelectionInformation> bookSelectionData, FragmentManager fragmentManager) {\n super();\n this.inflater = LayoutInflater.from(context);\n this.bookSelectionData = bookSelectionData;\n this.database = ManifestDatabase.getInstance(context);\n this.fragmentManager = fragmentManager;\n loadLoreEntries();\n }", "public void setBook(Book book) {\n this.book = book;\n }", "CmsRoomBook selectByPrimaryKey(String bookId);", "BookInfo selectByPrimaryKey(Integer id);", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "protected static Book goodBookValues(String bidField, String bnameField, String byearField, String bpriceField, String bauthorField, String bpublisherField) throws Exception{\n Book myBook;\n String [] ID,strPrice;\n String Name;\n int Year;\n double Price;\n \n try{\n ID = bidField.split(\"\\\\s+\"); // split using spaces\n if (ID.length > 1 || ID[0].equals(\"\")) // id should only be one word\n {\n throw new Exception (\"ERROR: The ID must be entered\\n\"); // if the id is empty, it must be conveyed to this user via this exception\n }\n if (ID[0].length() !=6) // id must be 6 digits\n throw new Exception (\"ERROR: ID must be 6 digits\\n\");\n if (!(ID[0].matches(\"[0-9]+\"))) // id must only be numbers\n throw new Exception (\"ERROR: ID must only contain numbers\");\n Name = bnameField;\n if (Name.equals(\"\")) // name must not be blank\n throw new Exception (\"ERROR: Name of product must be entered\\n\");\n if (byearField.equals(\"\") || byearField.length() != 4) // year field cannot be blank\n {\n throw new Exception (\"ERROR: Year of product must be 4 numbers\\n\");\n } else {\n Year = Integer.parseInt(byearField);\n if (Year > 9999 || Year < 1000)\n {\n throw new Exception (\"Error: Year must be between 1000 and 9999 years\");\n }\n }\n \n strPrice = bpriceField.split(\"\\\\s+\");\n if (strPrice.length > 1 || strPrice[0].equals(\"\"))\n Price = 0;\n else\n Price = Double.parseDouble(strPrice[0]);\n \n myBook = new Book(ID[0],Name,Year,Price,bauthorField,bpublisherField);\n ProductGUI.Display(\"Book fields are good\\n\");\n return myBook;\n } catch (Exception e){\n throw new Exception (e.getMessage());\n }\n \n }", "public void setBorrowBookDetailsToTable() {\n\n try {\n Connection con = databaseconnection.getConnection();\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"select * from lending_book where status= '\" + \"pending\" + \"'\");\n\n while (rs.next()) {\n String id = rs.getString(\"id\");\n String bookName = rs.getString(\"book_name\");\n String studentName = rs.getString(\"student_name\");\n String lendingDate = rs.getString(\"borrow_date\");\n String returnDate = rs.getString(\"return_book_datte\");\n String status = rs.getString(\"status\");\n\n Object[] obj = {id, bookName, studentName, lendingDate, returnDate, status};\n\n model = (DefaultTableModel) tbl_borrowBookDetails.getModel();\n model.addRow(obj);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Error\");\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent intent) {\n IntentResult scanISBN = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);\n if (scanISBN != null) {\n if (scanISBN.getContents() != null) {\n String ISBN = scanISBN.getContents();\n Book book = BookList.getBook(ISBN);\n if (book== null) {\n Toast.makeText(getActivity(), \"Book Does not Exist\", Toast.LENGTH_SHORT).show();\n }\n else {\n Intent book_info_intent = new Intent(getActivity(), book_description_activity.class);\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"book\", book);\n if (book.getOwner().equalsIgnoreCase(UserList.getCurrentUser().getUsername())) {\n bundle.putInt(\"VISIBILITY\", 1); // 1 for show Edit button\n }\n else {\n bundle.putInt(\"VISIBILITY\", 2); // 2 for not show Edit button\n }\n book_info_intent.putExtras(bundle);\n startActivity(book_info_intent);\n }\n } else {\n Toast.makeText(getActivity(), \"No Results\", Toast.LENGTH_SHORT).show();\n }\n } else {\n super.onActivityResult(requestCode, resultCode, intent);\n }\n }", "private void enterEmptyBook(String sku) {\n Book book = new Book();\n bookDB.put(sku, book);\n return;\n }", "private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }", "@Override\n public void onResume() {\n super.onResume();\n if(book != null) {\n //Also send the first author\n String author = \"\";\n if(!book.getVolumeInfo().getAuthors().isEmpty()) {\n author = book.getVolumeInfo().getAuthors().get(0);\n }\n getPresenter().searchBooks(book.getVolumeInfo().getTitle(), author);\n }\n }", "static void presentBookingHistory(User booker) {\r\n\t\tBooking bookings = new Booking();\r\n\t\tResultSet historyRs = null;\r\n\r\n\t\tSystem.out.printf(\"*%14s%10s%18s%28s%28s%15s%11s\\n\", \"Booking No\", \"Lot No\", \"Car No\", \"Start Time\", \"End Time\", \"Cost\", \"*\");\r\n\t\tSystem.out.println(\"*****************************************************************************************************************************\");\r\n\t\ttry {\r\n\t\t\tDbConnection historyConn = new DbConnection();\r\n\t\t\thistoryRs = historyConn.fetchSelectUserByUNameBookings(booker.getUName());\r\n\t\t\twhile (historyRs.next()) {\r\n\t\t\t\tjava.sql.Timestamp endTime = historyRs.getTimestamp(6);\r\n\t\t\t\t/**\r\n\t\t\t\t*\tTo show only the ones which are not checked out yet\r\n\t\t\t\t*\tIf a record with end time as 0 is found, it will be considered as not booked and shown\r\n\t\t\t\t*/\r\n\t\t\t\tif (endTime.getTime() != 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tString bookingNo = historyRs.getString(1);\r\n\t\t\t\tint lotNo = historyRs.getInt(3);\r\n\t\t\t\tString carNo = historyRs.getString(4);\r\n\t\t\t\tjava.sql.Timestamp startTime = historyRs.getTimestamp(5);\r\n\t\t\t\tint cost = historyRs.getInt(7);\r\n\t\t\t\tbookings.setAllValues(bookingNo, lotNo, carNo, startTime, endTime, cost);\r\n\r\n\t\t\t\tbookings.showBookHistory();\r\n\t\t\t}\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"No records with the given booking number found\");\r\n\t\t\t//SqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} catch (NullPointerException npExcep) {\r\n\t\t\tnpExcep.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\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}", "public void loadLecturer1(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec1.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\n}", "private void enterBook() {\n String sku;\n String author;\n String description;\n double price;\n String title;\n boolean isInStock;\n String priceTmp;\n String inStock;\n Scanner keyb = new Scanner(System.in);\n\n System.out.println(\"Enter the sku number.\"); // Enter the SKU number\n sku = keyb.nextLine();\n\n System.out.println(\"Enter the title of the book.\"); // Enter the title\n title = keyb.nextLine();\n\n System.out.println(\"Enter the author of the book.\"); // Enter the author\n author = keyb.nextLine();\n\n System.out.println(\"Enter the price of the book.\"); // Enter the price of the book\n priceTmp = keyb.nextLine();\n price = Double.parseDouble(priceTmp);\n\n System.out.println(\"Enter a description of the book.\"); // Enter the description of the book\n description = keyb.nextLine();\n\n System.out.println(\"Enter whether the book is in stock (\\\"Y\\\"|\\\"N\\\").\"); // in stock?\n inStock = keyb.nextLine();\n if (inStock.equalsIgnoreCase(\"Y\")) {\n isInStock = true;\n } else if (inStock.equalsIgnoreCase(\"N\")) {\n isInStock = false;\n } else {\n System.out.println(\"Not a valid entry. In stock status is unknown; therefore, it will be listed as no.\");\n isInStock = false;\n }\n\n Book book = new Book(title, author, description, price, isInStock);\n bookDB.put(sku, book);\n }", "private void setBooksInfo () {\n infoList = new ArrayList<> ();\n\n\n // item number 1\n\n Info info = new Info ();// this class will help us to save data easily !\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"ما هي اضطرابات طيف التوحد؟\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"سيساعدك هذا المستند على معرفة اضطراب طيف التوحد بشكل عام\");\n\n // we can add book url or download >>\n info.setInfoPageURL (\"https://firebasestorage.googleapis.com/v0/b/autismapp-b0b6a.appspot.com/o/material%2FInfo-Pack-for\"\n + \"-translation-Arabic.pdf?alt=media&token=69b19a8d-8b4c-400a-a0eb-bb5c4e5324e6\");\n\n infoList.add (info); //adding item 1 to list\n\n\n/* // item number 2\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 2 to list\n\n\n // item 3\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 3 to list\n\n // item number 4\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism part 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 4 to list\n\n\n // item 5\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 5 to list*/\n\n\n displayInfo (infoList);\n\n }", "@Override\r\n\tpublic Book getBookInfo(int book_id) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void updateBookData() {\n\t\tList<Book> bookList = dao.findByHql(\"from Book where bookId > 1717\",null);\n\t\tString bookSnNumber = \"\";\n\t\tfor(Book book:bookList){\n\t\t\tfor (int i = 1; i <= book.getLeftAmount(); i++) {\n\t\t\t\t// 添加图书成功后,根据ISBN和图书数量自动生成每本图书SN号\n\t\t\t\tBookSn bookSn = new BookSn();\n\t\t\t\t// 每本书的bookSn号根据书的ISBN号和数量自动生成,\n\t\t\t\t// 如书的ISBN是123,数量是3,则每本书的bookSn分别是:123-1,123-2,123-3\n\t\t\t\tbookSnNumber = \"-\" + i;//book.getIsbn() + \"-\" + i;\n\t\t\t\tbookSn.setBookId(book.getBookId());\n\t\t\t\tbookSn.setBookSN(bookSnNumber);\n\t\t\t\t// 默认书的状态是0表示未借出\n\t\t\t\tbookSn.setStatus(new Short((short) 0));\n\t\t\t\t// 添加bookSn信息\n\t\t\t\tbookSnDao.save(bookSn);\n\t\t\t}\n\t\t}\n\t}", "public void readBook()\n\t{\n\t\tb.input();\n\t\tSystem.out.print(\"Enter number of available books:\");\n\t\tavailableBooks=sc.nextInt();\n\t}", "@Override\r\n\tpublic List<BookDto> getBookList(String storename) {\n\t\tList<BookDto> blist = sqlSession.selectList(ns + \"getBookList\", storename);\t\t\r\n\t\treturn blist;\r\n\t}", "public void initiateStore() {\r\n\t\tURLConnection urlConnection = null;\r\n\t\tBufferedReader in = null;\r\n\t\tURL dataUrl = null;\r\n\t\ttry {\r\n\t\t\tdataUrl = new URL(URL_STRING);\r\n\t\t\turlConnection = dataUrl.openConnection();\r\n\t\t\tin = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\r\n\t\t\tString inputLine;\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tString[] splittedLine = inputLine.split(\";\");\r\n\t\t\t\t// an array of 4 elements, the fourth element\r\n\t\t\t\t// the first three elements are the properties of the book.\r\n\t\t\t\t// last element is the quantity.\r\n\t\t\t\tBook book = new Book();\r\n\t\t\t\tbook.setTitle(splittedLine[0]);\r\n\t\t\t\tbook.setAuthor(splittedLine[1]);\r\n\t\t\t\tBigDecimal decimalPrice = new BigDecimal(splittedLine[2].replaceAll(\",\", \"\"));\r\n\t\t\t\tbook.setPrice(decimalPrice);\r\n\t\t\t\tfor(int i=0; i<Integer.parseInt(splittedLine[3]); i++)\r\n\t\t\t\t\tthis.addBook(book);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(!in.equals(null)) in.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "@FXML\n public void showBorrowedBooks() {\n LibrarySystem.setScene(new BorroweddBookList(\n (reader.getBorrowedBooks(booklist)), reader, readerlist, booklist));\n }", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "private void getBookName(){\n db = DatabaseHelper.getInstance(this).getWritableDatabase();\n cursor = db.rawQuery(\"SELECT Name FROM Book WHERE _id = \"+bookIDSelected+\";\", null);\n startManagingCursor(cursor);\n String bookNameSelected = \"Failed to load Book Name\";\n while(cursor.moveToNext()){\n bookNameSelected = cursor.getString(0);\n }\n\n TextView txtBookTitle = findViewById(R.id.rvTxtName);\n txtBookTitle.setText(String.valueOf(bookNameSelected));\n }", "private void load_buku() {\n Object header[] = {\"ID BUKU\", \"JUDUL BUKU\", \"PENGARANG\", \"PENERBIT\", \"TAHUN TERBIT\"};\n DefaultTableModel data = new DefaultTableModel(null, header);\n bookTable.setModel(data);\n String sql_data = \"SELECT * FROM tbl_buku\";\n try {\n Connection kon = koneksi.getConnection();\n Statement st = kon.createStatement();\n ResultSet rs = st.executeQuery(sql_data);\n while (rs.next()) {\n String d1 = rs.getString(1);\n String d2 = rs.getString(2);\n String d3 = rs.getString(3);\n String d4 = rs.getString(4);\n String d5 = rs.getString(5);\n\n String d[] = {d1, d2, d3, d4, d5};\n data.addRow(d);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public void loadBookList(java.util.List<LdPublisher> ls) {\r\n final ReffererConditionBookList reffererCondition = new ReffererConditionBookList() {\r\n public void setup(LdBookCB cb) {\r\n cb.addOrderBy_PK_Asc();// Default OrderBy for Refferer.\r\n }\r\n };\r\n loadBookList(ls, reffererCondition);\r\n }", "BookDO selectByPrimaryKey(String bookIsbn);", "public void setBookCode(java.lang.String value);", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "@Override\r\n\tpublic List<Seat> loadBookedSeats(Performance prm, String secName, int dateByTimeIdx) {\n\t\treturn ticketDao.selectBookedseats(prm,secName, dateByTimeIdx);\r\n\t}", "@Override\n public void onLoadFinished(android.content.Loader<Cursor> loader, Cursor cursor) {\n if (cursor.moveToFirst()) {\n // Get the column indexes\n int productNameColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRODUCT_NAME);\n int priceColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRICE);\n int quantityColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_QUANTITY);\n int supplierNameColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_SUPPLIER_NAME);\n int supplierPhoneColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER);\n\n // Pull the data from the columns\n String productName = cursor.getString(productNameColumnIndex);\n String price = cursor.getString(priceColumnIndex);\n String quantity = cursor.getString(quantityColumnIndex);\n String supplierName = cursor.getString(supplierNameColumnIndex);\n String supplierPhone = cursor.getString(supplierPhoneColumnIndex);\n\n // Set the data pulled onto the objects\n productNameEditText.setText(productName);\n priceEditText.setText(price);\n quantityTextView.setText(quantity);\n supplierNameEditText.setText(supplierName);\n supplierPhoneEditText.setText(supplierPhone);\n\n // Set the global variable for the quantity of books\n bookQuantity = Integer.parseInt(quantity);\n }\n }", "public void setSeller(String seller) {\n this.seller = seller;\n }", "public void setSeller(String seller) {\n this.seller = seller;\n }", "public Book[] retrieveBookName(String bkName) {\n\t\ttry {\r\n\t\t\treturn ((BorrowDAL)dal).getObjectbkName(bkName);\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 null;\r\n\t}", "Book selectByPrimaryKey(String id);", "@Override\n public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {\n String[] projection = {\n BookEntry._ID,\n BookEntry.COLUMN_NAME,\n BookEntry.COLUMN_PRICE,\n BookEntry.COLUMN_QUANTITY};\n return new CursorLoader(this, BookEntry.CONTENT_URI, projection,null,null,null);\n }", "public void selectNewBook(MouseEvent e)\n\t{\n\t\tBookApp.currentBook = otherAppearances.getSelectionModel().getSelectedItem();\n\t\tcurrentBookDisplay.getItems().clear();\n\t\tcurrentBookDisplay.getItems().add(BookApp.currentBook);\n\t\tcharactersNameList.getItems().clear();\n\t\tfor(Character character : (MyLinkedList<Character>) BookApp.currentBook.getCharacterList()){\n\t\t\tcharactersNameList.getItems().add(character);\n\t\t\tcharactersNameList.getSelectionModel().getSelectedIndex();\n\t\t}\n\t\totherAppearances.getItems().clear();\n\t\tfor(int i = 0; i< BookApp.unsortedBookTable.hashTable.length; i++) {\t\t\n\t\t\tfor(Book eachBook : (MyLinkedList<Book>) BookApp.unsortedBookTable.hashTable[i]) {\n\t\t\t\tfor(Character eachCharacterInTotalList : (MyLinkedList<Character>) eachBook.getCharacterList())\n\t\t\t\t{\n\t\t\t\t\tif(eachCharacterInTotalList.equals(BookApp.currentCharacter) && eachBook.equals(BookApp.currentBook))\n\t\t\t\t\t{\n\t\t\t\t\t\totherAppearances.getItems().add(eachBook);\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}", "private void loadlec() {\n try {\n\n ResultSet rs = DBConnection.search(\"select * from lecturers\");\n Vector vv = new Vector();\n//vv.add(\"\");\n while (rs.next()) {\n\n// vv.add(rs.getString(\"yearAndSemester\"));\n String gette = rs.getString(\"lecturerName\");\n\n vv.add(gette);\n\n }\n //\n jComboBox1.setModel(new DefaultComboBoxModel<>(vv));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void setBookDesc(java.lang.String value);", "private void initData() {\n\r\n\t\tint statusBarHeight = 50;\r\n\t\tint readHeight = ApplicationManager.SCREEN_HEIGHT - statusBarHeight;\r\n\r\n\t\t// TODO 获取图书信息\r\n\t\tIntent intent = getIntent();\r\n\t\tbookInfo = (BookInfo) intent.getSerializableExtra(BOOK_INFO_KEY);\r\n\r\n\t\ttitleName.setText(bookInfo.getName());\r\n\r\n\t\tString progressInfo = PreferenceHelper.getString(bookInfo.getId() + \"\",\r\n\t\t\t\tnull);\r\n\t\tL.v(TAG, \"initData\", \"progressInfo : \" + progressInfo);\r\n\r\n\t\tif (!TextUtils.isEmpty(progressInfo)) {\r\n\t\t\t// 格式 : ChapterId_ChapterName_CharsetIndex\r\n\t\t\tString[] values = progressInfo.split(\"#\");\r\n\t\t\tif (values.length == 3) {\r\n\t\t\t\treadProgress = new Bookmark();\r\n\t\t\t\treadProgress.setChapterId(Integer.valueOf(values[0]));\r\n\t\t\t\treadProgress.setChapterName(values[1]);\r\n\t\t\t\treadProgress.setCharsetIndex(Integer.valueOf(values[2]));\r\n\t\t\t} else {\r\n\t\t\t\tPreferenceHelper.putString(bookInfo.getId() + \"\", \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (readProgress == null) {\r\n\t\t\treadProgress = new Bookmark();\r\n\t\t\tChapterInfo chapterInfo = bookInfo.getChapterInfos().get(0);\r\n\t\t\treadProgress.setChapterId(chapterInfo.getId());\r\n\t\t\treadProgress.setChapterName(chapterInfo.getName());\r\n\t\t\treadProgress.setCharsetIndex(0);\r\n\t\t}\r\n\r\n\t\tcurrentChapter = findChapterInfoById(readProgress.getChapterId());\r\n\r\n\t\tif (currentChapter == null\r\n\t\t\t\t&& TextUtils.isEmpty(currentChapter.getPath())) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// TODO 读取sp中的字体大小\r\n\t\tcurrentTextSize = PreferenceHelper.getInt(TEXT_SIZE_KEY, 40);\r\n\t\tBookPageFactory.setFontSize(currentTextSize);\r\n\t\tpagefactory = BookPageFactory.build(ApplicationManager.SCREEN_WIDTH, readHeight);\r\n\t\ttry {\r\n\t\t\tpagefactory.openbook(currentChapter.getPath());\r\n\t\t} catch (IOException e) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tadapter = new ScanViewAdapter(this, pagefactory);\r\n\r\n\t\t// TODO 跳转到历史记录\r\n\t\tscanview.setAdapter(adapter, readProgress.getCharsetIndex());\r\n\r\n\t\tmenuIn = AnimationUtils.loadAnimation(this, R.anim.menu_pop_in);\r\n\t\tmenuOut = AnimationUtils.loadAnimation(this, R.anim.menu_pop_out);\r\n\t\t\r\n\t\tif(android.os.Build.VERSION.SDK_INT>=16){\r\n\t\t\ttitleOut = new TranslateAnimation(\r\n\t Animation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n\t 0, Animation.ABSOLUTE, 0,\r\n\t Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24));\r\n\t\t\ttitleOut.setDuration(400);\r\n\t \t\t\r\n\t titleIn = new TranslateAnimation(\r\n \t\t\t\tAnimation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n \t\t\t\t0, Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24),\r\n \t\t\t\tAnimation.ABSOLUTE, 0);\r\n\t titleIn.setDuration(400);\r\n\t\t}else{\r\n\t\t\ttitleIn = AnimationUtils.loadAnimation(this, R.anim.title_in);\r\n\t\t\ttitleOut = AnimationUtils.loadAnimation(this, R.anim.title_out);\r\n\t\t}\r\n\t\t\r\n\t\taddBookmark = AnimationUtils.loadAnimation(this, R.anim.add_bookmark);\r\n\t\t\r\n\r\n\t\ttitleOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\ttitle.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\r\n\t\tmenuOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\tmenu.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tscanview.setOnMoveListener(new onMoveListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onMoveEvent() {\r\n\t\t\t\tif (isMenuShowing) {\r\n\t\t\t\t\thideMenu();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageChanged(View currPage) {\r\n\t\t\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\t\t\treadProgress.setCharsetIndex(tag.start_index);\r\n\t\t\t\tshowChaptersBtn(tag);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tView currPage = scanview.getCurrPage();\r\n\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\tshowChaptersBtn(tag);\r\n\t\t\r\n\t\t//TODO 获取该书的书签\r\n\t\tgetBookMarks();\r\n\t\t\r\n\t}", "@Override\r\n\tpublic boolean findDbSetting(String bookName) throws Exception {\n\t\tboolean result;\r\n\t\tresult = dbSettingMapper.findDbSetting(bookName);\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public void setBookId(String bookId) {\n this.bookId = bookId;\n }", "public Book readBookFile()\n {\n\n String name=\"\";\n String author ;\n ArrayList<String> genre = new ArrayList<String>();\n float price=0;\n String bookId;\n String fields2[];\n String line;\n\n line = bookFile.getNextLine();\n if(line==null)\n {\n return null;\n }\n String fields[] = line.split(\" by \");\n if(fields.length>2)\n {\n int i=0;\n while (i<fields.length-1)\n {\n name+=fields[i];\n if(i<fields.length-2)\n {\n name+= \" by \";\n }\n i++;\n }\n fields2 = fields[fields.length-1].split(\"%\");\n }\n else\n {\n name = fields[0];\n fields2 = fields[1].split(\"%\");\n }\n\n author = fields2[0];\n price=Float.parseFloat(fields2[1]);\n bookId=fields2[2];\n genre.add(fields2[3]);\n genre.add(fields2[4]);\n return new Book(name,genre,author,price,bookId);\n\n\n }", "public void setBestSeller (String bS)\n {\n bestSeller = bS;\n }", "public void getBookInfo(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\t\r\n\t}", "@Override\n\tpublic List<BookRequestVO> bookList(String bookName) {\n\t\treturn bookStorePersistDao.bookList(bookName);\n\t}", "@Override\n public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {\n if (cursor == null || cursor.getCount() < 1) {\n return;\n }\n\n // Proceed with moving to the first row of the cursor and reading data from it.\n if (cursor.moveToFirst()) {\n // Find the columns of book attributes that are needed.\n int productNameColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRODUCT_NAME);\n int authorColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_AUTHOR);\n int priceColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRICE);\n int quantityColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_QUANTITY);\n int supplierColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_SUPPLIER);\n int supplierPhoneNumberColumnIndex = cursor.getColumnIndex(\n BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER);\n\n // Extract out the value from the Cursor for the given column index.\n String productName = cursor.getString(productNameColumnIndex);\n String author = cursor.getString(authorColumnIndex);\n double price = cursor.getDouble(priceColumnIndex);\n quantity = cursor.getInt(quantityColumnIndex);\n String supplier = cursor.getString(supplierColumnIndex);\n supplierPhoneNumber = cursor.getString(supplierPhoneNumberColumnIndex);\n\n // Format the price to two decimal places so that it displays as \"7.50\" not \"7.5\"\n NumberFormat nf = NumberFormat.getInstance();\n nf.setMaximumFractionDigits(2);\n nf.setMinimumFractionDigits(2);\n String formatPrice = nf.format(price);\n\n // Remove commas from large numbers so that it displays as \"258963.99\" not \"258,963.99\",\n // to keep the app from crashing when the save button is clicked.\n String newFormatPrice = formatPrice.replace(\",\", \"\");\n\n // Update the views on the screen with the values from the database.\n etTitle.setText(productName);\n etAuthor.setText(author);\n etPrice.setText(newFormatPrice);\n etEditQuantity.setText(String.valueOf(quantity));\n etSupplier.setText(supplier);\n etPhoneNumber.setText(supplierPhoneNumber);\n }\n }", "private static void readBooksInfo() {\n List<eGenre> arrBook = new ArrayList<>();\n\n // 1 //\n arrBook.add(eGenre.FANTASY);\n arrBook.add(eGenre.ADVENTURE);\n book.add(new Book(1200, arrBook, \"Верн Жюль\", \"Таинственный остров\", 1875));\n arrBook.clear();\n // 2 //\n arrBook.add(eGenre.FANTASY);\n arrBook.add(eGenre.MYSTIC);\n book.add(new Book(425, arrBook, \"Григоренко Виталий\", \"Иван-душитель\", 1953));\n arrBook.clear();\n // 3 //\n arrBook.add(eGenre.DETECTIVE);\n arrBook.add(eGenre.MYSTIC);\n book.add(new Book(360, arrBook, \"Сейгер Райли\", \"Последние Девушки\", 1992));\n arrBook.clear();\n // 4 //\n arrBook.add(eGenre.DETECTIVE);\n book.add(new Book(385, arrBook, \"Ольга Володарская\", \"То ли ангел, то ли бес\", 1995));\n arrBook.clear();\n // 5 //\n arrBook.add(eGenre.NOVEL);\n arrBook.add(eGenre.ACTION);\n book.add(new Book(180, arrBook, \"Лихэйн Деннис\", \"Закон ночи\", 1944));\n arrBook.clear();\n // 6 //\n arrBook.add(eGenre.NOVEL);\n book.add(new Book(224, arrBook, \"Мураками Харуки\", \"Страна Чудес без тормозов и Конец Света\", 1985));\n arrBook.clear();\n // 7 //\n arrBook.add(eGenre.STORY);\n book.add(new Book(1200, arrBook, \"Джон Хейвуд\", \"Люди Севера: История викингов, 793–1241\", 2017));\n arrBook.clear();\n // 8 //\n arrBook.add(eGenre.ACTION);\n arrBook.add(eGenre.MYSTIC);\n arrBook.add(eGenre.DETECTIVE);\n book.add(new Book(415, arrBook, \"Линдквист Юн\", \"Впусти меня\", 2017));\n arrBook.clear();\n // 9 //\n arrBook.add(eGenre.ACTION);\n book.add(new Book(202, arrBook, \"Сухов Евгений\", \"Таежная месть\", 2016));\n arrBook.clear();\n // 10 //\n arrBook.add(eGenre.DETECTIVE);\n arrBook.add(eGenre.MYSTIC);\n book.add(new Book(231, arrBook, \"Винд Кристиан\", \"Призраки глубин\", 2019));\n arrBook.clear();\n }", "@FXML\n public void returnOrBorrowBook() {\n LibrarySystem.setScene(\n new SearchBook(reader, null, readerlist, booklist));\n }", "public void Loadata(){ // fill the choice box\n stats.removeAll(stats);\n String seller = \"Seller\";\n String customer = \"Customer\";\n stats.addAll(seller,customer);\n Status.getItems().addAll(stats);\n }", "public BookBean retrieveBook(String bid) throws SQLException {\r\n\t\tString query = \"select * from BOOK where bid='\" + bid + \"'\";\t\t\r\n\t\tBookBean book = null;\r\n\t\tPreparedStatement p = con.prepareStatement(query);\t\t\r\n\t\tResultSet r = p.executeQuery();\r\n\t\t\r\n\t\twhile(r.next()){\r\n\t\t\tString bookID = r.getString(\"BID\");\r\n\t\t\tString title = r.getString(\"TITLE\");\r\n\t\t\tint price = r.getInt(\"PRICE\");\r\n\t\t\tString bookCategory = r.getString(\"CATEGORY\");\t\t\t\r\n\t\t\tbook = new BookBean(bookID, title, price,bookCategory);\r\n\t\t}\r\n\t\tr.close();\r\n\t\tp.close();\r\n\t\treturn book;\r\n\t}", "public void loadBrandDataToTable() {\n\n\t\tbrandTableView.clear();\n\t\ttry {\n\n\t\t\tString sql = \"SELECT * FROM branddetails WHERE active_indicator = 1\";\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(sql);\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tbrandTableView.add(new BrandsModel(resultSet.getInt(\"brnd_slno\"), resultSet.getInt(\"active_indicator\"),\n\t\t\t\t\t\tresultSet.getString(\"brand_name\"), resultSet.getString(\"sup_name\"),\n\t\t\t\t\t\tresultSet.getString(\"created_at\"), resultSet.getString(\"updated_at\")));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tbrandName.setCellValueFactory(new PropertyValueFactory<>(\"brand_name\"));\n\t\tsupplierName.setCellValueFactory(new PropertyValueFactory<>(\"sup_name\"));\n\t\tdetailsOfBrands.setItems(brandTableView);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState){\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_returntask);\n\n ListView BookListLV;\n\n BookListLV = findViewById(R.id.RETURNT_LVbooks);\n bookDataList = new ArrayList<>();\n bookAdapter = new ReturningTaskCustomList(this, bookDataList);\n BookListLV.setAdapter(bookAdapter);\n\n db = FirebaseFirestore.getInstance();\n mAuth = FirebaseAuth.getInstance();\n String currentUID = mAuth.getCurrentUser().getUid();\n collectionReference = db.collection(\"users\" + \"/\" + currentUID + \"/requested\");\n\n collectionReference.addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable\n FirebaseFirestoreException error) {\n bookDataList.clear();\n for(QueryDocumentSnapshot doc: queryDocumentSnapshots)\n {\n if (!doc.getData().containsKey(\"blank\")) {\n\n if (doc.getData().get(\"status\").toString().equals(\"borrowed\")) {\n ArrayList<String> owner = new ArrayList<>();\n owner.add(doc.getData().get(\"owners\").toString());\n\n Book book = new Book(doc.getData().get(\"title\").toString(),\n doc.getData().get(\"author\").toString(),\n owner.get(0), doc.getId().replace(\"-\", \"\"));\n //Log.e(\"ISB\", doc.getId());\n //Log.e(\"title\", doc.getData().get(\"title\").toString());\n bookDataList.add(book);\n }\n }\n }\n bookAdapter.notifyDataSetChanged();\n }\n });\n\n BookListLV.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n selectedISBN = bookDataList.get(i).getISBN();\n otherUID = bookDataList.get(i).getOwner();\n Log.e(\"SELECTED BOOK\", bookDataList.get(i).getTitle());\n Log.e(\"SELECTED BOOK ISBN\", bookDataList.get(i).getISBN());\n openScanner();\n\n }\n });\n\n }", "public void insertBook(){\n\n // Create a new map of values, where column names are the keys\n ContentValues values = new ContentValues();\n values.put(BookContract.BookEntry.COLUMN_PRODUCT_NAME, \"You Do You\");\n values.put(BookContract.BookEntry.COLUMN_PRICE, 10);\n values.put(BookContract.BookEntry.COLUMN_QUANTITY, 20);\n values.put(BookContract.BookEntry.COLUMN_SUPPLIER_NAME, \"Kedros\");\n values.put(BookContract.BookEntry.COLUMN_SUPPLIER_PHONE_NUMBER, \"210 27 10 48\");\n\n Uri newUri = getContentResolver().insert(BookContract.BookEntry.CONTENT_URI, values);\n }", "public void setSBookerID(String sBookerID) {\n this.sBookerID = sBookerID;\n }", "public void loadBooksOfCategory(){\n long categoryId=mainActivityViewModel.getSelectedCategory().getMcategory_id();\n Log.v(\"Catid:\",\"\"+categoryId);\n\n mainActivityViewModel.getBookofASelectedCategory(categoryId).observe(this, new Observer<List<Book>>() {\n @Override\n public void onChanged(List<Book> books) {\n if(books.isEmpty()){\n binding.emptyView.setVisibility(View.VISIBLE);\n }\n else {\n binding.emptyView.setVisibility(View.GONE);\n }\n\n booksAdapter.setmBookList(books);\n }\n });\n }", "Book getBookByTitle(String title);", "public Books getBooks(String title,String authors,String isbn,String publisher);", "public void setBookEdition(java.lang.String value);", "public void loadBooks(){\n\t\tSystem.out.println(\"\\n\\tLoading books from CSV file\");\n\t\ttry{\n\t\t\tint iD=0, x;\n\t\t\tString current = null;\n\t\t\tRandom r = new Random();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"../bin/books.csv\"));\n\t\t\twhile((current = br.readLine()) != null){\n\t\t\t\tString[] data = current.split(\",\");\n\t\t\t\tx = r.nextInt(6) + 15;\n\t\t\t\tfor(int i =0;i<x;i++){\n\t\t\t\t\tBook b= new Book(Integer.toHexString(iD), data[0], data[1], data[2], data[3]);\n\t\t\t\t\tif(bookMap.containsKey(data[0]) != true){\n\t\t\t\t\t\tbookMap.put(data[0], new ArrayList<Book>());\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\tbookMap.get(data[0]).add(b);\n\t\t\t\t\tiD += 1;\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"\\tBooks Added!\");\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"\\tFile not found\");\n\t\t}catch(IOException e){\n System.out.println(e.toString());\n }\n\t}", "@Override\n\tpublic void loadData() {\n\t\tint sel = getSelected() == null ? -1 : getSelected().getWardId();\n\t\ttry {\n\t\t\tList<Ward> list = searchInput.getText().equals(\"\") ? WardData.getList()\n\t\t\t\t\t: WardData.getBySearch(searchInput.getText());\t\t\t\n\t\t\ttableData.removeAll(tableData);\n\t\t\tfor (Ward p : list) {\n\t\t\t\ttableData.add(p);\n\t\t\t}\n\t\t} catch (DBException e) {\n\t\t\tGlobal.log(e.getMessage());\n\t\t}\n\n\t\tif (sel > 0) {\n\t\t\tsetSelected(sel);\n\t\t}\n\t}", "@Override\n public void onItemSelected(View view, int position) {\n\n FirebaseFirestore.getInstance()\n .collection(\"AllSalon\")\n .document(Common.state_name)\n .collection(\"Branch\")\n .document(Common.selected_salon.getSalonId())\n .collection(\"Barbers\")\n .document(Common.currentBarber.getBarberId())\n .collection(Common.simpleDateFormat.format(Common.bookingDate.getTime()))\n .document(slotValue.getSlot().toString())\n .get()\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }).addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful()) {\n if (task.getResult().exists()) {\n Common.currentBookingInformation = task.getResult().toObject(BookingInformation.class);\n Common.currentBookingInformation.setBookingId(task.getResult().getId());\n context.startActivity(new Intent(context, DoneServicesActivity.class));\n }\n }\n }\n });\n\n }", "private void insertBook() {\n /// Create a ContentValues object with the dummy data\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_NAME, \"Harry Potter and the goblet of fire\");\n values.put(BookEntry.COLUMN_BOOK_PRICE, 100);\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, 2);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_NAME, \"Supplier 1\");\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE, \"972-3-1234567\");\n\n // Insert the dummy data to the database\n Uri uri = getContentResolver().insert(BookEntry.CONTENT_URI, values);\n // Show a toast message\n String message;\n if (uri == null) {\n message = getResources().getString(R.string.error_adding_book_toast).toString();\n } else {\n message = getResources().getString(R.string.book_added_toast).toString();\n }\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "public void findBook() {\n\t\tif (books.size() > 0) {\n\t\t\tint randInt = rand.nextInt(books.size());\n\t\t\tbook = books.get(randInt);\n\t\t}\n\t}", "private void receiveData()\n {\n Intent i = getIntent();\n productSelected = Paper.book().read(Prevalent.currentProductKey);\n vendorID = i.getStringExtra(\"vendorID\");\n if (productSelected != null) {\n\n productName = i.getStringExtra(\"productName\");\n productImage = i.getStringExtra(\"imageUrl\");\n productLongDescription = i.getStringExtra(\"productLongDescription\");\n productCategory = i.getStringExtra(\"productCategory\");\n productPrice = i.getStringExtra(\"productPrice\");\n productSizesSmall = i.getStringExtra(\"productSizesSmall\");\n productSizesMedium = i.getStringExtra(\"productSizesMedium\");\n productSizesLarge = i.getStringExtra(\"productSizesLarge\");\n productSizesXL = i.getStringExtra(\"productSizesXL\");\n productSizesXXL = i.getStringExtra(\"productSizesXXL\");\n productSizesXXXL = i.getStringExtra(\"productSizesXXXL\");\n productQuantity = i.getStringExtra(\"productQuantity\");\n }\n }", "@Override\n public MyBook findByUserAndBookShelfAndBookId(final String userid,\n final String shelfName, final String bookId) {\n // TODO Auto-generated method stub\n return null;\n }", "public void listBooksByName(String name) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE BookName = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setString(1, name);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "private static void loadBooks() {\n\tbookmarks[2][0]=BookmarkManager.getInstance().createBook(4000,\"Walden\",\"\",1854,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][1]=BookmarkManager.getInstance().createBook(4001,\"Self-Reliance and Other Essays\",\"\",1900,\"Dover Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][2]=BookmarkManager.getInstance().createBook(4002,\"Light From Many Lamps\",\"\",1960,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][3]=BookmarkManager.getInstance().createBook(4003,\"Head First Design Patterns\",\"\",1944,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][4]=BookmarkManager.getInstance().createBook(4004,\"Effective Java Programming Language Guide\",\"\",1990,\"Wilder Publications\",new String[] {\"Eric Freeman\",\"Bert Bates\",\"Kathy Sierra\",\"Elisabeth Robson\"},\"Philosophy\",4.3);\n}", "public String getBook() {\n\t\treturn book;\r\n\t}", "private void loadBtechData()\r\n\t{\r\n\t\tlist.clear();\r\n\t\tString qu = \"SELECT * FROM BTECHSTUDENT\";\r\n\t\tResultSet result = databaseHandler.execQuery(qu);\r\n\r\n\t\ttry {// retrieve student information form database\r\n\t\t\twhile(result.next())\r\n\t\t\t{\r\n\t\t\t\tString studendID = result.getString(\"studentNoB\");\r\n\t\t\t\tString nameB = result.getString(\"nameB\");\r\n\t\t\t\tString studSurnameB = result.getString(\"surnameB\");\r\n\t\t\t\tString supervisorB = result.getString(\"supervisorB\");\r\n\t\t\t\tString emailB = result.getString(\"emailB\");\r\n\t\t\t\tString cellphoneB = result.getString(\"cellphoneNoB\");\r\n\t\t\t\tString courseB = result.getString(\"stationB\");\r\n\t\t\t\tString stationB = result.getString(\"courseB\");\r\n\r\n\t\t\t\tlist.add(new StudentProperty(studendID, nameB, studSurnameB,\r\n\t\t\t\t\t\tsupervisorB, emailB, cellphoneB, courseB, stationB));\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\t// Transfer the list data on the table\r\n\t\tstudentBTable.setItems(list);\r\n\t}", "@Override\r\n\tpublic Book findOneBook(String id) {\n\t\t\r\n\t\tString sql=\"select * from books where id= ?\";\r\n\t\tString sql2 =\"select * from categories where id=?\";\r\n\t\tString sql3 =\"select * from publishers where id=?\";\r\n\t\ttry {\r\n\t\t\tBook book = runner.query(sql, new BeanHandler<Book>(Book.class), id);\r\n\t\t\tCategory category = runner.query(sql2, new BeanHandler<Category>(Category.class), book.getCategoryId());\r\n\t\t\tPublisher publisher = runner.query(sql3, new BeanHandler<Publisher>(Publisher.class), book.getPublisherId());\r\n\t\t\tbook.setPublisher(publisher);\r\n\t\t\tbook.setCategory(category);\r\n\t\t\tif(book!=null)\r\n\t\t\treturn book;\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 null;\r\n\t}", "@Override\r\n\tpublic Book getBook(long bookId) {\n\t\treturn bd.getOne(bookId);\r\n\t}", "public void displayBook()\n\t{\n\t\tb.display();\n\t\tSystem.out.println(\"Available Books=\"+availableBooks+\"\\n\");\n\t}", "public void setBookName(final String bookName) {\n\t\tthis.bookName = bookName;\n\t}", "void establishBookDataSourceFromProvider() {\n String className = prefs.getString(\"dataproviderpref\", GoogleBookDataSource.class.getCanonicalName());\r\n Log.i(Constants.LOG_TAG, \"Establishing book data provider using class name - \" + className);\r\n try {\r\n Class<?> clazz = Class.forName(className);\r\n // NOTE - validate that clazz is of BookDataSource type?\r\n Constructor<?> ctor = clazz.getConstructor(new Class[] { BookWormApplication.class });\r\n bookDataSource = (BookDataSource) ctor.newInstance(this);\r\n } catch (ClassNotFoundException e) {\r\n Log.e(Constants.LOG_TAG, e.getMessage(), e);\r\n throw new RuntimeException(\"Error, unable to establish data provider. \" + e.getMessage());\r\n } catch (InvocationTargetException e) {\r\n Log.e(Constants.LOG_TAG, e.getMessage(), e);\r\n throw new RuntimeException(\"Error, unable to establish data provider. \" + e.getMessage());\r\n } catch (NoSuchMethodException e) {\r\n Log.e(Constants.LOG_TAG, e.getMessage(), e);\r\n throw new RuntimeException(\"Error, unable to establish data provider. \" + e.getMessage());\r\n } catch (IllegalAccessException e) {\r\n Log.e(Constants.LOG_TAG, e.getMessage(), e);\r\n throw new RuntimeException(\"Error, unable to establish data provider. \" + e.getMessage());\r\n } catch (InstantiationException e) {\r\n Log.e(Constants.LOG_TAG, e.getMessage(), e);\r\n throw new RuntimeException(\"Error, unable to establish data provider. \" + e.getMessage());\r\n }\r\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }" ]
[ "0.62704134", "0.6232881", "0.61099684", "0.5971852", "0.5954181", "0.59527594", "0.58763874", "0.5812997", "0.5806655", "0.57921743", "0.5685579", "0.56556207", "0.5507066", "0.55052084", "0.5486312", "0.5485447", "0.54673195", "0.54580325", "0.5454372", "0.54121894", "0.5385928", "0.5384333", "0.5376788", "0.53758544", "0.5375734", "0.53475887", "0.53283894", "0.5310203", "0.53043014", "0.5294245", "0.52842563", "0.52695763", "0.52624047", "0.52577496", "0.5229416", "0.5225669", "0.5218103", "0.5216592", "0.52154046", "0.52143973", "0.52084243", "0.5207449", "0.51952225", "0.51943314", "0.5191957", "0.51907504", "0.5189287", "0.51804996", "0.5178282", "0.5151624", "0.5151624", "0.51419526", "0.51392305", "0.51387125", "0.51387125", "0.51332504", "0.5122593", "0.5120762", "0.5113991", "0.5111147", "0.5104467", "0.5099469", "0.50933444", "0.5092431", "0.5085293", "0.5084784", "0.5081102", "0.5073705", "0.5071983", "0.5070773", "0.50632995", "0.5057363", "0.5051351", "0.50497895", "0.50466335", "0.5042164", "0.50409126", "0.5034536", "0.50339305", "0.5031196", "0.50292605", "0.5028524", "0.5027439", "0.5025505", "0.50212944", "0.5019076", "0.501627", "0.5014157", "0.50109607", "0.501002", "0.5008838", "0.50079393", "0.49983656", "0.4990004", "0.49898008", "0.49752942", "0.4965054", "0.49623814", "0.49623814", "0.49623814" ]
0.53034246
29
Load Selected book details to the table in settings according to given category
public static List<Book> searchBookByCategory(String category) throws HibernateException{ session = sessionFactory.openSession(); session.beginTransaction(); Query query = session.getNamedQuery("INVENTORY_searchBookByCategory").setString("category", category); List<Book> resultList = query.list(); session.getTransaction().commit(); session.close(); return resultList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadBooksOfCategory(){\n long categoryId=mainActivityViewModel.getSelectedCategory().getMcategory_id();\n Log.v(\"Catid:\",\"\"+categoryId);\n\n mainActivityViewModel.getBookofASelectedCategory(categoryId).observe(this, new Observer<List<Book>>() {\n @Override\n public void onChanged(List<Book> books) {\n if(books.isEmpty()){\n binding.emptyView.setVisibility(View.VISIBLE);\n }\n else {\n binding.emptyView.setVisibility(View.GONE);\n }\n\n booksAdapter.setmBookList(books);\n }\n });\n }", "@FXML\n\t private void loadbookinfo(ActionEvent event) {\n\t \tclearbookcache();\n\t \t\n\t \tString id = bookidinput.getText();\n\t \tString qu = \"SELECT * FROM BOOK_LMS WHERE id = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t Boolean flag = false;\n\t \n\t try {\n while (rs.next()) {\n String bName = rs.getString(\"title\");\n String bAuthor = rs.getString(\"author\");\n Boolean bStatus = rs.getBoolean(\"isAvail\");\n\n Bookname.setText(bName);\n Bookauthor.setText(bAuthor);\n String status = (bStatus) ? \"Available\" : \"Not Available\";\n bookstatus.setText(status);\n\n flag = true;\n }\n\n if (!flag) {\n Bookname.setText(\"No Such Book Available\");\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void selectBook(Book book){\n\t\tthis.book = book;\n\t\tshowView(\"ModifyBookView\");\n\t\tif(book.isInactive()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is archived. It must be recovered before it can be modified.\"));\n\t\t}else if(book.isLost()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is lost. It must be recovered before it can be modified.\"));\n\t\t}\n\t}", "public void loadBook() {\n List<Book> books = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n Book book = new Book(\"Book-\" + i, \"Test book \" + i);\n books.add(book);\n }\n this.setBooks(books);\n }", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "private void ComboBoxLoader (){\n try {\n if (obslistCBOCategory.size()!=0)\n obslistCBOCategory.clear();\n /*add the records from the database to the ComboBox*/\n rset = connection.createStatement().executeQuery(\"SELECT * FROM category\");\n while (rset.next()) {\n String row =\"\";\n for(int i=1;i<=rset.getMetaData().getColumnCount();i++){\n row += rset.getObject(i) + \" \";\n }\n obslistCBOCategory.add(row); //add string to the observable list\n }\n\n cboCategory.setItems(obslistCBOCategory); //add observable list into the combo box\n //text alignment to center\n cboCategory.setButtonCell(new ListCell<String>() {\n @Override\n public void updateItem(String item, boolean empty) {\n super.updateItem(item, empty);\n if (item != null) {\n setText(item);\n setAlignment(Pos.CENTER);\n Insets old = getPadding();\n setPadding(new Insets(old.getTop(), 0, old.getBottom(), 0));\n }\n }\n });\n\n //listener to the chosen list in the combo box and displays it to the text fields\n cboCategory.getSelectionModel().selectedItemProperty().addListener((obs, oldValue, newValue)->{\n if(newValue!=null){\n Scanner textDisplay = new Scanner((String) newValue);\n txtCategoryNo.setText(textDisplay.next());\n txtCategoryName.setText(textDisplay.nextLine());}\n\n });\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }", "static public void set_category_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"category name:\"};\n\t\tEdit_row_window.attr_vals = new String[]{Edit_row_window.selected[0].getText(1)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct m.id, m.name, m.num_links, m.year_made \" +\n\t\t\t\t\" from curr_cinema_movies m, \" +\n\t\t\t\t\" curr_cinema_movie_tag mt\" +\n\t\t\t\t\" where mt.movie_id=m.id and mt.tag_id=\"+Edit_row_window.id+\n\t\t\t\t\" order by num_links desc \";\n\n\t\tEdit_row_window.not_linked_query = \" select distinct m.id, m.name, m.num_links, m.year_made \" +\n\t\t\t\t\" from curr_cinema_movies m \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"movie name\", \"rating\", \"release year\"};\n\t\tEdit_row_window.label_min_parameter=\"min. release year:\";\n\t\tEdit_row_window.linked_category_name = \"MOVIES\";\n\t}", "private void loadBookInformation(String rawPage, Document doc, Book book) {\n BookDetailParser parser = new BookDetailParser();\n SwBook swBook = parser.parseDetailPage(rawPage);\n book.setContributors(swBook.getContributors());\n book.setCover_url(coverUrlParser.parse(doc));\n book.setShort_description(descriptionShortParser.parse(doc));\n book.addPrice(swBook.getPrice().getPrices().get(0));\n book.setTitle(titleParser.parse(doc));\n }", "private void populateUI(BookEntry book) {\n // Return if the task is null\n if (book == null) {\n return;\n }\n // Use the variable book to populate the UI\n mNameEditText.setText(book.getBook_name());\n mQuantityTextView.setText(Integer.toString(book.getQuantity()));\n mPriceEditText.setText(Double.toString(book.getPrice()));\n mPhoneEditText.setText(Integer.toString(book.getSupplier_phone_number()));\n mSupplier = book.getSupplier_name();\n switch (mSupplier) {\n case BookEntry.SUPPLIER_ONE:\n mSupplierSpinner.setSelection(1);\n break;\n case BookEntry.SUPPLIER_TWO:\n mSupplierSpinner.setSelection(2);\n break;\n default:\n mSupplierSpinner.setSelection(0);\n break;\n }\n mSupplierSpinner.setSelection(mSupplier);\n }", "private void loadDefaultCategory() {\n CategoryTable category = new CategoryTable();\n String categoryId = category.generateCategoryID(db.getLastCategoryID());\n String categoryName = \"Food\";\n String type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n categoryId = category.generateCategoryID(db.getLastCategoryID());\n categoryName = \"Study\";\n type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n db.close();\n }", "public void setCategory(String category){\n this.category = category;\n }", "public void loadBooks(){\n\t\tSystem.out.println(\"\\n\\tLoading books from CSV file\");\n\t\ttry{\n\t\t\tint iD=0, x;\n\t\t\tString current = null;\n\t\t\tRandom r = new Random();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"../bin/books.csv\"));\n\t\t\twhile((current = br.readLine()) != null){\n\t\t\t\tString[] data = current.split(\",\");\n\t\t\t\tx = r.nextInt(6) + 15;\n\t\t\t\tfor(int i =0;i<x;i++){\n\t\t\t\t\tBook b= new Book(Integer.toHexString(iD), data[0], data[1], data[2], data[3]);\n\t\t\t\t\tif(bookMap.containsKey(data[0]) != true){\n\t\t\t\t\t\tbookMap.put(data[0], new ArrayList<Book>());\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\tbookMap.get(data[0]).add(b);\n\t\t\t\t\tiD += 1;\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"\\tBooks Added!\");\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"\\tFile not found\");\n\t\t}catch(IOException e){\n System.out.println(e.toString());\n }\n\t}", "public void loadCategoryAdapter() {\n categoryAdapter = new CategoryAdapter(context, sectionItemsWithHeaders);\n listView.setAdapter(categoryAdapter);\n }", "private void setCategoryData(){\n ArrayList<Category> categories = new ArrayList<>();\n //add categories\n categories.add(new Category(\"Any Category\",0));\n categories.add(new Category(\"General Knowledge\", 9));\n categories.add(new Category(\"Entertainment: Books\", 10));\n categories.add(new Category(\"Entertainment: Film\", 11));\n categories.add(new Category(\"Entertainment: Music\", 12));\n categories.add(new Category(\"Entertainment: Musicals & Theaters\", 13));\n categories.add(new Category(\"Entertainment: Television\", 14));\n categories.add(new Category(\"Entertainment: Video Games\", 15));\n categories.add(new Category(\"Entertainment: Board Games\", 16));\n categories.add(new Category(\"Science & Nature\", 17));\n categories.add(new Category(\"Science: Computers\", 18));\n categories.add(new Category(\"Science: Mathematics\", 19));\n categories.add(new Category(\"Mythology\", 20));\n categories.add(new Category(\"Sport\", 21));\n categories.add(new Category(\"Geography\", 22));\n categories.add(new Category(\"History\", 23));\n categories.add(new Category(\"Politics\", 24));\n categories.add(new Category(\"Art\", 25));\n categories.add(new Category(\"Celebrities\", 26));\n categories.add(new Category(\"Animals\", 27));\n categories.add(new Category(\"Vehicles\", 28));\n categories.add(new Category(\"Entertainment: Comics\", 29));\n categories.add(new Category(\"Science: Gadgets\", 30));\n categories.add(new Category(\"Entertainment: Japanese Anime & Manga\", 31));\n categories.add(new Category(\"Entertainment: Cartoon & Animations\", 32));\n\n //fill data in selectCategory Spinner\n ArrayAdapter<Category> adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_dropdown_item, categories);\n selectCategory.setAdapter(adapter);\n\n }", "public void selectCategory() {\n\t\t\r\n\t}", "CmsRoomBook selectByPrimaryKey(String bookId);", "public final void readCategoria() {\n cmbCategoria.removeAllItems();\n cmbCategoria.addItem(\"\");\n categoryMapCategoria.clear();\n AtividadePreparoDAO atvprepDAO = new AtividadePreparoDAO();\n for (AtividadePreparo atvprep : atvprepDAO.readMotivoRetrabalho(\"Categoria\")) {\n Integer id = atvprep.getMotivo_retrabalho_id();\n String name = atvprep.getMotivo_retrabalho();\n cmbCategoria.addItem(name);\n categoryMapCategoria.put(id, name);\n }\n }", "public void selectNewBook(MouseEvent e)\n\t{\n\t\tBookApp.currentBook = otherAppearances.getSelectionModel().getSelectedItem();\n\t\tcurrentBookDisplay.getItems().clear();\n\t\tcurrentBookDisplay.getItems().add(BookApp.currentBook);\n\t\tcharactersNameList.getItems().clear();\n\t\tfor(Character character : (MyLinkedList<Character>) BookApp.currentBook.getCharacterList()){\n\t\t\tcharactersNameList.getItems().add(character);\n\t\t\tcharactersNameList.getSelectionModel().getSelectedIndex();\n\t\t}\n\t\totherAppearances.getItems().clear();\n\t\tfor(int i = 0; i< BookApp.unsortedBookTable.hashTable.length; i++) {\t\t\n\t\t\tfor(Book eachBook : (MyLinkedList<Book>) BookApp.unsortedBookTable.hashTable[i]) {\n\t\t\t\tfor(Character eachCharacterInTotalList : (MyLinkedList<Character>) eachBook.getCharacterList())\n\t\t\t\t{\n\t\t\t\t\tif(eachCharacterInTotalList.equals(BookApp.currentCharacter) && eachBook.equals(BookApp.currentBook))\n\t\t\t\t\t{\n\t\t\t\t\t\totherAppearances.getItems().add(eachBook);\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}", "@PostConstruct\n\t@Transactional\n\tpublic void fillData() {\n\t\n\t\tBookCategory progromming1 = new BookCategory(1,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming2 = new BookCategory(2,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming3 = new BookCategory(3,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming4 = new BookCategory(4,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming5 = new BookCategory(5,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming6 = new BookCategory(6,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming7 = new BookCategory(7,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming8 = new BookCategory(8,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming9 = new BookCategory(9,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming10 = new BookCategory(10,\"Programming\",new ArrayList<Book>());\n\t\t\n\n\t\t\n\t\tbookCategoryRepository.save(progromming1);\n\t\tbookCategoryRepository.save(programming2);\n\t\tbookCategoryRepository.save(programming3);\n\t\tbookCategoryRepository.save(programming4);\n\t\tbookCategoryRepository.save(programming5);\n\t\tbookCategoryRepository.save(programming6);\n\t\tbookCategoryRepository.save(programming7);\n\t\tbookCategoryRepository.save(programming8);\n\t\tbookCategoryRepository.save(programming9);\n\t\tbookCategoryRepository.save(programming10);\n\t\t\n\t\tBook java = new Book(\n\t\t\t\t(long) 1,\"text-100\",\"Java Programming Language\",\n\t\t\t\t \"Master Core Java basics\",\n\t\t\t\t 754,\n\t\t\t\t \"assets/images/books/text-106.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogromming1\n\t\t);\n\t\tBook kotlin = new Book(\n\t\t\t\t(long) 2,\"text-101\",\"Kotlin Programming Language\",\n\t\t\t\t \"Learn Kotlin Programming Language\",\n\t\t\t\t 829,\n\t\t\t\t \"assets/images/books/text-102.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming2\n\t\t);\n\t\tBook python = new Book(\n\t\t\t\t(long) 3,\"text-102\",\"Python 9\",\n\t\t\t\t \"Learn Python Language\",\n\t\t\t\t 240,\n\t\t\t\t \"assets/images/books/text-103.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming3\n\t\t);\n\t\tBook cShap = new Book(\n\t\t\t\t(long) 4,\"text-103\",\"C#\",\n\t\t\t\t \"Learn C# Programming Language\",\n\t\t\t\t 490,\n\t\t\t\t \"assets/images/books/text-101.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming4\n\t\t);\n\t\tBook cpp = new Book(\n\t\t\t\t(long) 5,\"text-104\",\"C++\",\n\t\t\t\t \"Learn C++ Language\",\n\t\t\t\t 830,\n\t\t\t\t \"assets/images/books/text-110.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming5\n\t\t);\n\t\tBook dataStru = new Book(\n\t\t\t\t(long) 6,\"text-105\",\"Data Structure 3\",\n\t\t\t\t \"Learn Data Structures\",\n\t\t\t\t 560,\n\t\t\t\t \"assets/images/books/text-106.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming6\n\t\t);\n\t\tBook cprog = new Book(\n\t\t\t\t(long) 7,\"text-106\",\"C Programming\",\n\t\t\t\t \"Learn C Language\",\n\t\t\t\t 695,\n\t\t\t\t \"assets/images/books/text-100.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming7\n\t\t);\n\t\tBook crushInterview = new Book(\n\t\t\t\t(long) 3,\"text-102\",\"Coding Interview\",\n\t\t\t\t \"Crushing the Coding interview\",\n\t\t\t\t 600,\n\t\t\t\t \"assets/images/books/text-103.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming8\n\t\t);\n\t\tBook desing = new Book(\n\t\t\t\t(long) 859,\"text-102\",\"Design Parttens\",\n\t\t\t\t \"Learn Python Language\",\n\t\t\t\t 690,\n\t\t\t\t \"assets/images/books/text-105.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming9\n\t\t);\n\t\tBook machineLearn = new Book(\n\t\t\t\t(long) 9,\"text-102\",\"Python 3\",\n\t\t\t\t \"Learn Python Machine Learning with Python\",\n\t\t\t\t 416,\n\t\t\t\t \"assets/images/books/text-107.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming10\n\t\t);\n\t\tBook apiJava = new Book(\n\t\t\t\t(long) 10,\"text-102\",\"Practical API Design\",\n\t\t\t\t \"Java Framework Architect\",\n\t\t\t\t 540,\n\t\t\t\t \"assets/images/books/text-108.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming8\n\t\t);\n\tbookRepository.save(java);\n\tbookRepository.save(kotlin);\n\tbookRepository.save(python);\n\tbookRepository.save(cpp);\n\tbookRepository.save(cprog);\n\tbookRepository.save(crushInterview);\n\tbookRepository.save(cShap);\n\tbookRepository.save(dataStru);\n\tbookRepository.save(desing);\n\tbookRepository.save(machineLearn);\n\tbookRepository.save(apiJava);\n\n\t}", "public void getBookDetails() {\n\t}", "@Override\n public void DataIsLoaded(List<BookModel> bookModels, List<String> keys) {\n BookModel bookModel = bookModels.get(0);\n Intent intent = new Intent (getContext(), BookDetailsActivity.class);\n intent.putExtra(\"Book\", bookModel);\n getContext().startActivity(intent);\n Log.i(TAG, \"Data is loaded\");\n\n }", "public void establishSelectedBook(final long id) {\r\n selectedBook = dataManager.selectBook(id);\r\n }", "@FXML\n public void showBorrowedBooks() {\n LibrarySystem.setScene(new BorroweddBookList(\n (reader.getBorrowedBooks(booklist)), reader, readerlist, booklist));\n }", "private void importCatalogue() {\n\n mAuthors = importModelsFromDataSource(Author.class, getHeaderClass(Author.class));\n mBooks = importModelsFromDataSource(Book.class, getHeaderClass(Book.class));\n mMagazines = importModelsFromDataSource(Magazine.class, getHeaderClass(Magazine.class));\n }", "public Map<String, BookBean> retrieveAllBooks() throws SQLException {\r\n\t\tString query = \"select * from BOOK order by CATEGORY\";\t\t\r\n\t\tMap<String, BookBean> rv= new HashMap<String, BookBean>();\r\n\t\tPreparedStatement p = con.prepareStatement(query);\t\t\r\n\t\tResultSet r = p.executeQuery();\r\n\t\t\r\n\t\twhile(r.next()){\r\n\t\t\tString bid = r.getString(\"BID\");\r\n\t\t\tString title = r.getString(\"TITLE\");\r\n\t\t\tint price = r.getInt(\"PRICE\");\r\n\t\t\tString category = r.getString(\"CATEGORY\");\t\t\t\r\n\t\t\tBookBean s = new BookBean(bid, title, price,category);\t\t\t\r\n\t\t\trv.put(bid, s);\r\n\t\t}\r\n\t\tr.close();\r\n\t\tp.close();\r\n\t\treturn rv;\r\n\t\t}", "public void setCategory(String category);", "public void setCategory(Category cat) {\n this.category = cat;\n }", "private void defaultvalues(){\n cat1 = new com.example.myapp.category();\n cat1.setCategory(\"Groceries\");\n cat1.setImage(\"https://i.imgur.com/XhTjOMu.png\");\n databaseReference.child(\"Groceries\").setValue(cat1);\n cat1 = new com.example.myapp.category();\n cat1.setCategory(\"Books\");\n cat1.setImage(\"https://i.imgur.com/U9tdGo6_d.webp?maxwidth=760&fidelity=grand\");\n databaseReference.child(\"Books\").setValue(cat1);\n cat1 = new com.example.myapp.category();\n cat1.setCategory(\"Furniture\");\n cat1.setImage(\"https://i.imgur.com/X0qnvfp.png\");\n databaseReference.child(\"Furniture\").setValue(cat1);\n cat1 = new com.example.myapp.category();\n cat1.setCategory(\"Appliances\");\n cat1.setImage(\"https://i.imgur.com/UpUzKwA.png\");\n databaseReference.child(\"Appliances\").setValue(cat1);\n cat1 = new com.example.myapp.category();\n\n }", "private void loadlec() {\n try {\n\n ResultSet rs = DBConnection.search(\"select * from lecturers\");\n Vector vv = new Vector();\n//vv.add(\"\");\n while (rs.next()) {\n\n// vv.add(rs.getString(\"yearAndSemester\"));\n String gette = rs.getString(\"lecturerName\");\n\n vv.add(gette);\n\n }\n //\n jComboBox1.setModel(new DefaultComboBoxModel<>(vv));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void loadCakeID() throws SQLException, ClassNotFoundException {\r\n ArrayList<Cake> cakeArrayList = new CakeController().getAllCake();\r\n ArrayList<String> ids = new ArrayList<>();\r\n\r\n for (Cake cake : cakeArrayList) {\r\n ids.add(cake.getCakeID());\r\n }\r\n\r\n cmbCakeID.getItems().addAll(ids);\r\n }", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "private void onCategorySelected(Category category) {\n et_category.setText(category.getName());\n et_category_id.setText(String.valueOf(category.getKey()));\n }", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "public List<Book> getBooksByCategory(String category) {\n List<Book> books = bookRepository.findAll();\n return books.stream()\n .filter(book -> Arrays.stream(book.getCategories())\n .anyMatch(bookCategory -> bookCategory.equals(category)))\n .collect(Collectors.toList());\n \n }", "private void load_buku() {\n Object header[] = {\"ID BUKU\", \"JUDUL BUKU\", \"PENGARANG\", \"PENERBIT\", \"TAHUN TERBIT\"};\n DefaultTableModel data = new DefaultTableModel(null, header);\n bookTable.setModel(data);\n String sql_data = \"SELECT * FROM tbl_buku\";\n try {\n Connection kon = koneksi.getConnection();\n Statement st = kon.createStatement();\n ResultSet rs = st.executeQuery(sql_data);\n while (rs.next()) {\n String d1 = rs.getString(1);\n String d2 = rs.getString(2);\n String d3 = rs.getString(3);\n String d4 = rs.getString(4);\n String d5 = rs.getString(5);\n\n String d[] = {d1, d2, d3, d4, d5};\n data.addRow(d);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public void setCategory(String category) {\r\n this.category = category;\r\n }", "private void initData() {\n\r\n\t\tint statusBarHeight = 50;\r\n\t\tint readHeight = ApplicationManager.SCREEN_HEIGHT - statusBarHeight;\r\n\r\n\t\t// TODO 获取图书信息\r\n\t\tIntent intent = getIntent();\r\n\t\tbookInfo = (BookInfo) intent.getSerializableExtra(BOOK_INFO_KEY);\r\n\r\n\t\ttitleName.setText(bookInfo.getName());\r\n\r\n\t\tString progressInfo = PreferenceHelper.getString(bookInfo.getId() + \"\",\r\n\t\t\t\tnull);\r\n\t\tL.v(TAG, \"initData\", \"progressInfo : \" + progressInfo);\r\n\r\n\t\tif (!TextUtils.isEmpty(progressInfo)) {\r\n\t\t\t// 格式 : ChapterId_ChapterName_CharsetIndex\r\n\t\t\tString[] values = progressInfo.split(\"#\");\r\n\t\t\tif (values.length == 3) {\r\n\t\t\t\treadProgress = new Bookmark();\r\n\t\t\t\treadProgress.setChapterId(Integer.valueOf(values[0]));\r\n\t\t\t\treadProgress.setChapterName(values[1]);\r\n\t\t\t\treadProgress.setCharsetIndex(Integer.valueOf(values[2]));\r\n\t\t\t} else {\r\n\t\t\t\tPreferenceHelper.putString(bookInfo.getId() + \"\", \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (readProgress == null) {\r\n\t\t\treadProgress = new Bookmark();\r\n\t\t\tChapterInfo chapterInfo = bookInfo.getChapterInfos().get(0);\r\n\t\t\treadProgress.setChapterId(chapterInfo.getId());\r\n\t\t\treadProgress.setChapterName(chapterInfo.getName());\r\n\t\t\treadProgress.setCharsetIndex(0);\r\n\t\t}\r\n\r\n\t\tcurrentChapter = findChapterInfoById(readProgress.getChapterId());\r\n\r\n\t\tif (currentChapter == null\r\n\t\t\t\t&& TextUtils.isEmpty(currentChapter.getPath())) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// TODO 读取sp中的字体大小\r\n\t\tcurrentTextSize = PreferenceHelper.getInt(TEXT_SIZE_KEY, 40);\r\n\t\tBookPageFactory.setFontSize(currentTextSize);\r\n\t\tpagefactory = BookPageFactory.build(ApplicationManager.SCREEN_WIDTH, readHeight);\r\n\t\ttry {\r\n\t\t\tpagefactory.openbook(currentChapter.getPath());\r\n\t\t} catch (IOException e) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tadapter = new ScanViewAdapter(this, pagefactory);\r\n\r\n\t\t// TODO 跳转到历史记录\r\n\t\tscanview.setAdapter(adapter, readProgress.getCharsetIndex());\r\n\r\n\t\tmenuIn = AnimationUtils.loadAnimation(this, R.anim.menu_pop_in);\r\n\t\tmenuOut = AnimationUtils.loadAnimation(this, R.anim.menu_pop_out);\r\n\t\t\r\n\t\tif(android.os.Build.VERSION.SDK_INT>=16){\r\n\t\t\ttitleOut = new TranslateAnimation(\r\n\t Animation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n\t 0, Animation.ABSOLUTE, 0,\r\n\t Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24));\r\n\t\t\ttitleOut.setDuration(400);\r\n\t \t\t\r\n\t titleIn = new TranslateAnimation(\r\n \t\t\t\tAnimation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n \t\t\t\t0, Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24),\r\n \t\t\t\tAnimation.ABSOLUTE, 0);\r\n\t titleIn.setDuration(400);\r\n\t\t}else{\r\n\t\t\ttitleIn = AnimationUtils.loadAnimation(this, R.anim.title_in);\r\n\t\t\ttitleOut = AnimationUtils.loadAnimation(this, R.anim.title_out);\r\n\t\t}\r\n\t\t\r\n\t\taddBookmark = AnimationUtils.loadAnimation(this, R.anim.add_bookmark);\r\n\t\t\r\n\r\n\t\ttitleOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\ttitle.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\r\n\t\tmenuOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\tmenu.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tscanview.setOnMoveListener(new onMoveListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onMoveEvent() {\r\n\t\t\t\tif (isMenuShowing) {\r\n\t\t\t\t\thideMenu();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageChanged(View currPage) {\r\n\t\t\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\t\t\treadProgress.setCharsetIndex(tag.start_index);\r\n\t\t\t\tshowChaptersBtn(tag);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tView currPage = scanview.getCurrPage();\r\n\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\tshowChaptersBtn(tag);\r\n\t\t\r\n\t\t//TODO 获取该书的书签\r\n\t\tgetBookMarks();\r\n\t\t\r\n\t}", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "public void setCategory(String category) {\n this.category = category;\n }", "BookInfo selectByPrimaryKey(Integer id);", "public List<ViewSearchBook> getViewBookListByAuthorCategoryAndSubCategory(\r\n\t\t\tString author, Integer categoryId, Integer subcategoryId) {\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"This is Dao Impl for getBookListByAuthorCategoryAndSubCategory!!\");\r\n\t\tString hql = \"from ViewSearchBook i where i.noofcopies<>0 and i.authorName like '%\" +author+ \"%' and i.categoryId=? and i.subCategoryId=?\";\r\n\t\tObject[] parm = new Object[] {categoryId, subcategoryId };\r\n\t\tList<ViewSearchBook> l = getHibernateTemplate().find(hql, parm);\r\n\t\tSystem.out.println(\"list size:\" + l.size());\r\n\t\treturn l.isEmpty() || l == null ? null : l;\r\n\r\n\t}", "TbInvCategory selectByPrimaryKey(TbInvCategoryKey key);", "Category selectCategory(long id);", "private static void loadBooks() {\n\tbookmarks[2][0]=BookmarkManager.getInstance().createBook(4000,\"Walden\",\"\",1854,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][1]=BookmarkManager.getInstance().createBook(4001,\"Self-Reliance and Other Essays\",\"\",1900,\"Dover Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][2]=BookmarkManager.getInstance().createBook(4002,\"Light From Many Lamps\",\"\",1960,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][3]=BookmarkManager.getInstance().createBook(4003,\"Head First Design Patterns\",\"\",1944,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][4]=BookmarkManager.getInstance().createBook(4004,\"Effective Java Programming Language Guide\",\"\",1990,\"Wilder Publications\",new String[] {\"Eric Freeman\",\"Bert Bates\",\"Kathy Sierra\",\"Elisabeth Robson\"},\"Philosophy\",4.3);\n}", "public List<ErpBookInfo> selData();", "ItemCategory selectByPrimaryKey(Integer id);", "public Book load(String bid) {\n\t\treturn bookDao.load(bid);\r\n\t}", "public static List<String> buscarCategoriaDoLivro(){\n List<String> categoriasLivros=new ArrayList<>();\n Connection connector=ConexaoDB.getConnection();\n String sql=\"Select category from bookCategory\";\n Statement statement=null;\n ResultSet rs=null;\n String nome;\n try {\n statement=connector.createStatement();\n rs=statement.executeQuery(sql);\n while (rs.next()) {\n nome=rs.getString(\"category\");\n categoriasLivros.add(nome);\n }\n \n } catch (Exception e) {\n \n }finally{\n ConexaoDB.closeConnection(connector, statement, rs);\n }\n return categoriasLivros;\n}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.edit_or_add_book);\n appData.setCurrentSection(2);\n int positionCount=0;\n String mGenrePosition =\"\";\n mRealm = Realm.getDefaultInstance();\n\n if(!appData.getCurrentBookId().isEmpty()){\n mBookInfo = mRealm.where(BookInfo.class).equalTo(\"mBookId\",\n appData.getCurrentBookId()).findFirst();\n ((EditText)findViewById(R.id.bookTitle)).setText(mBookInfo.getBookTitle(),\n TextView.BufferType.EDITABLE);\n ((EditText)findViewById(R.id.bookAuthor)).setText(mBookInfo.getAuthorsNames(),\n TextView.BufferType.EDITABLE);\n mGenrePosition = mBookInfo.getGenre();\n }\n\n Spinner mSpinner;\n mSpinner = (Spinner) findViewById(R.id.bookGenre);\n ArrayAdapter<String> mAdapter;\n ArrayList<String> mHelpArray = new ArrayList<>();\n\n mSelectedGenre = new HashMap<>();\n mCurrentTypes = new ArrayList<>();\n mCurrentTypes.add(new HashMap<String, String>());\n mCurrentTypes.get(0).put(\"position\", \"0\");\n mCurrentTypes.get(0).put(\"genre\",\"choose sub-category\");\n mHelpArray.add(\"̶ choose sub-category ̶\");\n for (Map.Entry<String, String> entry : Constants.genreMap.entrySet()) {\n mCurrentTypes.add(new HashMap<String, String>());\n int count = mCurrentTypes.size() - 1;\n mCurrentTypes.get(count).put(\"position\", entry.getKey());\n if(!mGenrePosition.isEmpty()){\n if(mCurrentTypes.get(count).get(\"position\").equals(mGenrePosition)){\n positionCount =count;\n }\n }\n mCurrentTypes.get(count).put(\"genre\",entry.getValue());\n\n mHelpArray.add(entry.getValue());\n\n }\n\n mAdapter = new ArrayAdapter<>(this,\n R.layout.spinner_text, mHelpArray);\n mAdapter.setDropDownViewResource(R.layout.spinner_inner_text);\n mSpinner.setAdapter(mAdapter);\n\n if(!mGenrePosition.isEmpty()){\n mSpinner.setSelection(positionCount);\n mSelectedGenre = new HashMap<>();\n mSelectedGenre.put(\"position\",mCurrentTypes.get(positionCount).get(\"position\"));\n mSelectedGenre.put(\"genre\", mCurrentTypes.get(positionCount).get(\"genre\"));\n }else {\n mSpinner.setSelection(0, false);\n }\n mSpinner.setOnItemSelectedListener(new Spinner.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id)\n {\n\n mSelectedGenre = new HashMap<>();\n mSelectedGenre.put(\"position\",mCurrentTypes.get(position).get(\"position\"));\n mSelectedGenre.put(\"genre\", mCurrentTypes.get(position).get(\"genre\"));\n\n }\n public void onNothingSelected(AdapterView<?> parent)\n {\n\n mSelectedGenre = new HashMap<>();\n mSelectedGenre.put(\"position\",mCurrentTypes.get(0).get(\"position\"));\n mSelectedGenre.put(\"genre\", mCurrentTypes.get(0).get(\"genre\"));\n }\n });\n\n }", "private void initialize(BookVO bookVO) {\n \n BookDAO bookDAO = new BookDAO();\n \n frame = new setGUI();\n frame.getContentPane().setBackground(new Color(250,233,220));\n frame.setBounds(750,250, 450, 600);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.getContentPane().setLayout(null);\n \n JLabel lblNewLabel = new JLabel(\"\\uC544\\uD30C\\uC694\");\n lblNewLabel.setFont(new Font(\"맑은 고딕\", Font.BOLD, 35));\n lblNewLabel.setForeground(new Color(250, 138, 98));\n lblNewLabel.setBounds(153, 37, 180, 42);\n frame.getContentPane().add(lblNewLabel);\n \n JComboBox cb_state = new JComboBox();\n cb_state.setModel(new DefaultComboBoxModel(new String[] {\"\\uCC45\\uC758 \\uC0C1\\uD0DC\", \"1. \\uCC22\\uAE40\", \"2. \\uB099\\uC11C\", \"3. \\uC624\\uC5FC\", \"4. \\uC624\\uB798\\uB428, \\uB0A1\\uC74C\", \"5. \\uAE30\\uD0C0(\\uC758\\uACAC\\uC744 \\uC801\\uC5B4\\uC8FC\\uC138\\uC694)\"}));\n cb_state.setFont(new Font(\"굴림\", Font.PLAIN, 15));\n cb_state.setBounds(44, 139, 159, 33);\n frame.getContentPane().add(cb_state);\n \n JComboBox cb_stateLevel = new JComboBox();\n cb_stateLevel.setModel(new DefaultComboBoxModel(new String[] {\"\\uC0C1\\uD0DC \\uC815\\uB3C4\", \"1. \\uC0C1\", \"2. \\uC911\", \"3. \\uD558\"}));\n cb_stateLevel.setFont(new Font(\"굴림\", Font.PLAIN, 15));\n cb_stateLevel.setBounds(229, 139, 154, 33);\n frame.getContentPane().add(cb_stateLevel);\n \n JTextArea textArea = new JTextArea(\"20자 이내로 부탁드립니다.\",21, 0);\n \n textArea.setFont(new Font(\"새굴림\", Font.PLAIN, 13));\n textArea.setBounds(35, 216, 355, 222);\n //textArea.setText(\"20자 이내로 부탁드립니다.\");\n \n textArea.addKeyListener(new KeyAdapter() {\n public void keyTyped(KeyEvent e) {\n if (textArea.getText().length() == 21) {\n e.consume();\n }\n }\n });//20글자 제한\n \n textArea.addMouseListener(new MouseAdapter(){\n @Override\n public void mouseClicked(MouseEvent e){\n \t textArea.setText(\"\");\n }\n });//기본문장 클릭하면 자동삭제\n \n frame.getContentPane().add(textArea);\n \n //BookVO bookVO2 = daoBook.getAllInfo(voBook);\n \n JButton btn_insert = new RoundedButton(\"\\uB4F1\\uB85D\");\n btn_insert.setForeground(new Color(255, 255, 255));\n btn_insert.setBackground(new Color(241, 109, 80));\n \n\n btn_insert.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n \n String bookIsbn = bookVO.getISBN();\n int bookId = 1; // bookVO에서 가져와야되는데 현재 화면의 bookVO는 id가 없음 => 다음프로젝트에서는 잘생각하고 디자인할 것...\n String userId = UserLoginGUI.userIdStatic;\n \n \n int bookState = cb_state.getSelectedIndex(); // SICK_CAT\n int stateLevel = cb_stateLevel.getSelectedIndex(); // SICK_LEVEL\n String comment = textArea.getText();\n \n// System.out.println(bookIsbn);\n// System.out.println(bookId);\n// System.out.println(userId);\n// System.out.println(bookState);\n// System.out.println(stateLevel);\n// System.out.println(comment);\n \n int sickResultCnt = bookDAO.insertSickReview(bookIsbn, bookId, userId, bookState, stateLevel, comment);\n \n \n if (sickResultCnt > 0) {\n JOptionPane.showMessageDialog(null, \n \"아파요 등록 완료!!\", \"Message\", \n JOptionPane.INFORMATION_MESSAGE);\n } else {\n JOptionPane.showMessageDialog(null, \n \"아파요 등록 실패\", \"Message\", \n JOptionPane.ERROR_MESSAGE);\n }\n \n \n// txt_bookName.setText(bookVO2.getBookName());\n \n //SickBookListVO voSick = new SickBookListVO(null, null, null, null, bookState, stateLevel, null, comment);\n //daoSick.insertSick(voSick);\n \n }\n });\n btn_insert.setFont(new Font(\"맑은 고딕\", Font.BOLD, 21));\n btn_insert.setBounds(50, 470, 122, 34);\n frame.getContentPane().add(btn_insert);\n \n JButton btn_close = new RoundedButton(\"\\uB2EB\\uAE30\");\n btn_close.setForeground(new Color(255, 255, 255));\n btn_close.setBackground(new Color(246, 147, 99));\n btn_close.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n frame.dispose();\n SwingUtilities.updateComponentTreeUI(BookInfoGUI.getFrame());\n BookInfoGUI.getFrame().invalidate();\n BookInfoGUI.getFrame().validate();\n BookInfoGUI.getFrame().repaint();\n \n BookInfoGUI.getFrame().setVisible(true);\n \n }\n });\n btn_close.setFont(new Font(\"맑은 고딕\", Font.BOLD, 21));\n btn_close.setBounds(250, 470, 122, 34);\n frame.getContentPane().add(btn_close);\n \n JPanel panel = new JPanel();\n panel.setToolTipText(\"\");\n panel.setBorder(new TitledBorder(UIManager.getBorder(\"TitledBorder.border\"), \"\\uC790\\uC138\\uD788 \\uC54C\\uB824\\uC8FC\\uC138\\uC694\", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n panel.setBounds(28, 196, 370, 252);\n frame.getContentPane().add(panel);\n \n \n }", "public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }", "public void scandb_book_info(String table_name) {\n sql = \" SELECT * from \" + table_name + \";\";\n\n try {\n result = statement.executeQuery(sql);\n while (result.next()) {\n set_book_info(result.getInt(\"id\"), result.getString(\"name\"), result.getString(\"url\"));\n\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public List<Concept> populateConceptSection(String category){\n\t\tConceptService cs = Context.getConceptService();\n\t\tDeIdentifiedExportService d = Context.getService(DeIdentifiedExportService.class);\n\t\tList<String> list = d.getConceptByCategory(category);\n\t\tInteger temp;\n\t\tList<Concept> conceptList = new Vector<Concept>();\n\t\tfor(int i=0; i<list.size();i++){\n\t\t\tfor (String retval: list.get(i).split(\",\")){\n\t\t\t\ttemp = Integer.parseInt(retval);\n\t\t\t\tconceptList.add(cs.getConcept(temp));\n\t\t\t}\n\t\t}\n\t\tSet set = new HashSet(conceptList);\n\t\tList list1 = new ArrayList(set);\n\t\treturn list1;\n\t}", "private static boolean loadBooks() throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new FileReader(BOOKS_FILE));\n\t\tboolean error_loading = false; //stores whether there was an error loading a book\n\t\t\n\t\tString line = reader.readLine(); //read the properties of a book in the books.txt file\n\t\t/*read books.txt file, set the input for each BookDetails object and add each BookDetails object to the ALL_BOOKS Hashtable*/\n\t\twhile(line != null){\n\t\t\tBookDetails book = new BookDetails();\n\t\t\tString[] details = line.split(\"\\t\"); //the properties of each BookDetails object are separated by tab spaces in the books.txt file\n\t\t\tfor(int i = 0; i < details.length; i ++){\n\t\t\t\tif(!setBookInput(i, details[i], book)){ //checks if there was an error in setting the BookDetails object's properties with the values in the books.txt file\n\t\t\t\t\tSystem.out.println(\"ERROR Loading Books\");\n\t\t\t\t\terror_loading = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(error_loading) //if there was an error loading a book then stop the process of loading books\n\t\t\t\tbreak;\n\t\t\tALL_BOOKS.put(book.getBookId(), book); //add BookDetails object to ALL_BOOKS\n\t\t\taddToPublisherTable(book.getPublisher(), book.getBookTitle()); //add book's title to the ALL_PUBLISHERS Hashtable\n\t\t\taddToGenreTable(book, book.getBookTitle()); //add book's title to the ALL_GENRES ArrayList\n\t\t\taddToAuthorTable(book.getAuthor().toString(), book.getBookTitle()); //add book's title to the ALL_AUTHORS Hashtable\n\t\t\tline = reader.readLine(); \n\t\t}\n\t\treader.close();\n\t\t\n\t\tif(!error_loading){\n\t\t\tSystem.out.println(\"Loading Books - Complete!\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false; //error encountered while loading books\n\t}", "public void chooseCategory(){\n String title = intent.getStringExtra(\"title\");\n String content = intent.getStringExtra(\"content\");\n TextView titleView = findViewById(R.id.category_grid_title);\n titleView.setText(R.string.choose_category_title);\n categoriesAdapter.passInfo(title, content);\n }", "public void setCategory(Category category) {\r\n this.category = category;\r\n }", "@Override\n\tpublic void loadData() {\n\t\tint sel = getSelected() == null ? -1 : getSelected().getWardId();\n\t\ttry {\n\t\t\tList<Ward> list = searchInput.getText().equals(\"\") ? WardData.getList()\n\t\t\t\t\t: WardData.getBySearch(searchInput.getText());\t\t\t\n\t\t\ttableData.removeAll(tableData);\n\t\t\tfor (Ward p : list) {\n\t\t\t\ttableData.add(p);\n\t\t\t}\n\t\t} catch (DBException e) {\n\t\t\tGlobal.log(e.getMessage());\n\t\t}\n\n\t\tif (sel > 0) {\n\t\t\tsetSelected(sel);\n\t\t}\n\t}", "private void setTopData(){\n\n\n model = getIntent().getExtras().getParcelable(\"value\");\n\n setValue(model);\n //binding.bdayDesc.setText(model.categoryName);\n\n }", "private void setCategoryPageModel() {\n List<SliderModel> sliderModelFakeList = new ArrayList<>();\n sliderModelFakeList.add(new SliderModel(\"null\",\"#ffffff\"));\n sliderModelFakeList.add(new SliderModel(\"null\",\"#ffffff\"));\n sliderModelFakeList.add(new SliderModel(\"null\",\"#ffffff\"));\n sliderModelFakeList.add(new SliderModel(\"null\",\"#ffffff\"));\n sliderModelFakeList.add(new SliderModel(\"null\",\"#ffffff\"));\n\n List<HorizontalProductScrollModel>horizontalProductScrollFakeModel = new ArrayList<>();\n horizontalProductScrollFakeModel.add(new HorizontalProductScrollModel(\"\",\"\",\"\",\"\",\"\"));\n horizontalProductScrollFakeModel.add(new HorizontalProductScrollModel(\"\",\"\",\"\",\"\",\"\"));\n horizontalProductScrollFakeModel.add(new HorizontalProductScrollModel(\"\",\"\",\"\",\"\",\"\"));\n horizontalProductScrollFakeModel.add(new HorizontalProductScrollModel(\"\",\"\",\"\",\"\",\"\"));\n horizontalProductScrollFakeModel.add(new HorizontalProductScrollModel(\"\",\"\",\"\",\"\",\"\"));\n horizontalProductScrollFakeModel.add(new HorizontalProductScrollModel(\"\",\"\",\"\",\"\",\"\"));\n horizontalProductScrollFakeModel.add(new HorizontalProductScrollModel(\"\",\"\",\"\",\"\",\"\"));\n\n homepageModelFakeList.add(new HomePageModel(0,sliderModelFakeList));\n homepageModelFakeList.add(new HomePageModel(1,\"\",\"#ffffff\"));\n homepageModelFakeList.add(new HomePageModel(2,\"\",\"#ffffff\",horizontalProductScrollFakeModel,new ArrayList<WishListItemModel>()));\n homepageModelFakeList.add(new HomePageModel(3,\"\",\"#ffffff\",horizontalProductScrollFakeModel));\n // homepageModelFakeList\n\n categoryPageAdapter = new HomePageAdapter(homepageModelFakeList);\n\n loadSpecificFragmentData();\n }", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "public void setCategory(Category category) {\n this.category = category;\n }", "public void setCategory(Category category) {\n this.category = category;\n }", "public void setCategory(Category category) {\n this.category = category;\n }", "public void setCategory(Category category) {\n this.category = category;\n }", "@FXML\n public void showAllBooks() {\n LibrarySystem.setScene(new AllBookListInReaderPage(\n reader, readerlist, booklist, booklist));\n }", "Book selectByPrimaryKey(String id);", "@FXML\n public void returnOrBorrowBook() {\n LibrarySystem.setScene(\n new SearchBook(reader, null, readerlist, booklist));\n }", "public void viewLibraryBooks(){\n\t\tIterator booksIterator = bookMap.keySet().iterator();\n\t\tint number, i=1;\n\t\tSystem.out.println(\"\\n\\t\\t===Books in the Library===\\n\");\n\t\twhile(booksIterator.hasNext()){\t\n\t\t\tString current = booksIterator.next().toString();\n\t\t\tnumber = bookMap.get(current).size();\n\t\t\tSystem.out.println(\"\\t\\t[\" + i + \"] \" + \"Title: \" + current);\n\t\t\tSystem.out.println(\"\\t\\t Quantity: \" + number + \"\\n\");\t\t\t\n\t\t\ti += 1; \n\t\t}\n\t}", "public static ResultSet getItemByCategory(String cat) {\n try {\n PreparedStatement st = conn.prepareStatement(\"SELECT itemID, ownerID, Name, status, description, category, image1,image2,image3,image4 FROM iteminformation WHERE category=?\");\n st.setString(1, cat);\n ResultSet rs = st.executeQuery();\n\n return rs;\n\n } catch (SQLException ex) {\n Logger.getLogger(itemDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }", "private void loadCategories() {\n // adapter that show data (View Holder with data )in Recycler View\n adapter=new FirebaseRecyclerAdapter<Category, CategoryViewHolder>(\n Category.class,\n R.layout.category_layout,\n CategoryViewHolder.class,\n categories) {\n @Override\n protected void populateViewHolder(CategoryViewHolder viewHolder, final Category model, int position) {\n // set data in View Holder\n viewHolder.name.setText(model.getName());\n Picasso.with(getActivity()).load(model.getImage()).into(viewHolder.image);\n // action View Holder\n viewHolder.setItemClickListener(new ItemClickListener() {\n // method that i create in interface and put it in action of click item in category view holder (to use position )\n @Override\n public void onClick(View view, int position, boolean isLongClick) {\n //get category id from adapter and set in Common.CategoryId\n Common.categoryId=adapter.getRef(position).getKey(); // 01 or 02 or 03 ..... of category\n Common.categoryName=model.getName(); // set name of category to Common variable categoryName\n startActivity(Start.newIntent(getActivity()));// move to StartActivity\n\n }\n });\n\n }\n };\n adapter.notifyDataSetChanged(); //refresh data when changed\n list.setAdapter(adapter); // set adapter\n }", "public List<Movie> getMoviesFromCats(Category chosenCat) throws DalException\n {\n\n ArrayList<Movie> categoryMovies = new ArrayList<>();\n // Attempts to connect to the database.\n try ( Connection con = dbCon.getConnection())\n {\n Integer idCat = chosenCat.getId();\n // SQL code. \n String sql = \"SELECT * FROM Movie INNER JOIN CatMovie ON Movie.id = CatMovie.movieId WHERE categoryId=\" + idCat + \";\";\n\n Statement statement = con.createStatement();\n ResultSet rs = statement.executeQuery(sql);\n\n while (rs.next())\n {\n // Add all to a list\n Movie movie = new Movie();\n movie.setId(rs.getInt(\"id\"));\n movie.setName(rs.getString(\"name\"));\n movie.setRating(rs.getDouble(\"rating\"));\n movie.setFilelink(rs.getString(\"filelink\"));\n movie.setLastview(rs.getDate(\"lastview\").toLocalDate());\n movie.setImdbRating(rs.getDouble(\"imdbrating\"));\n categoryMovies.add(movie);\n }\n //Return\n return categoryMovies;\n\n } catch (SQLException ex)\n {\n Logger.getLogger(MovieDBDAO.class\n .getName()).log(Level.SEVERE, null, ex);\n throw new DalException(\"Nope can´t do\");\n }\n\n }", "Book selectByPrimaryKey(String bid);", "public void setBorrowBookDetailsToTable() {\n\n try {\n Connection con = databaseconnection.getConnection();\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"select * from lending_book where status= '\" + \"pending\" + \"'\");\n\n while (rs.next()) {\n String id = rs.getString(\"id\");\n String bookName = rs.getString(\"book_name\");\n String studentName = rs.getString(\"student_name\");\n String lendingDate = rs.getString(\"borrow_date\");\n String returnDate = rs.getString(\"return_book_datte\");\n String status = rs.getString(\"status\");\n\n Object[] obj = {id, bookName, studentName, lendingDate, returnDate, status};\n\n model = (DefaultTableModel) tbl_borrowBookDetails.getModel();\n model.addRow(obj);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Error\");\n }\n }", "List<Category> selectCategoryList();", "@Override\n\tpublic BookModel update(BookModel updateBook) {\n\t\tCategoryModel category = categoryDao.findByCode(updateBook.getCategoryCode());\n\t\tupdateBook.setCategoryId(category.getId());\n\t\tbookDao.update(updateBook);\n\t\treturn bookDao.findOne(updateBook.getId());\n\t}", "private void loadBtechData()\r\n\t{\r\n\t\tlist.clear();\r\n\t\tString qu = \"SELECT * FROM BTECHSTUDENT\";\r\n\t\tResultSet result = databaseHandler.execQuery(qu);\r\n\r\n\t\ttry {// retrieve student information form database\r\n\t\t\twhile(result.next())\r\n\t\t\t{\r\n\t\t\t\tString studendID = result.getString(\"studentNoB\");\r\n\t\t\t\tString nameB = result.getString(\"nameB\");\r\n\t\t\t\tString studSurnameB = result.getString(\"surnameB\");\r\n\t\t\t\tString supervisorB = result.getString(\"supervisorB\");\r\n\t\t\t\tString emailB = result.getString(\"emailB\");\r\n\t\t\t\tString cellphoneB = result.getString(\"cellphoneNoB\");\r\n\t\t\t\tString courseB = result.getString(\"stationB\");\r\n\t\t\t\tString stationB = result.getString(\"courseB\");\r\n\r\n\t\t\t\tlist.add(new StudentProperty(studendID, nameB, studSurnameB,\r\n\t\t\t\t\t\tsupervisorB, emailB, cellphoneB, courseB, stationB));\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\t// Transfer the list data on the table\r\n\t\tstudentBTable.setItems(list);\r\n\t}", "private void populateProfession() {\n try {\n vecProfessionKeys = new Vector();\n StringTokenizer stk = null;\n vecProfessionLabels = new Vector();\n //MSB -09/01/05 -- Changed configuration file.\n // config = new ConfigMgr(\"customer.cfg\");\n// config = new ConfigMgr(\"ArmaniCommon.cfg\");\n config = new ArmConfigLoader();\n String strSubTypes = config.getString(\"PROFESSION\");\n int i = -1;\n if (strSubTypes != null && strSubTypes.trim().length() > 0) {\n stk = new StringTokenizer(strSubTypes, \",\");\n } else\n return;\n if (stk != null) {\n types = new String[stk.countTokens()];\n while (stk.hasMoreTokens()) {\n types[++i] = stk.nextToken();\n String key = config.getString(types[i] + \".CODE\");\n vecProfessionKeys.add(key);\n String value = config.getString(types[i] + \".LABEL\");\n vecProfessionLabels.add(value);\n }\n }\n cbxProfession.setModel(new DefaultComboBoxModel(vecProfessionLabels));\n } catch (Exception e) {}\n }", "public void loadBrandDataToTable() {\n\n\t\tbrandTableView.clear();\n\t\ttry {\n\n\t\t\tString sql = \"SELECT * FROM branddetails WHERE active_indicator = 1\";\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(sql);\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tbrandTableView.add(new BrandsModel(resultSet.getInt(\"brnd_slno\"), resultSet.getInt(\"active_indicator\"),\n\t\t\t\t\t\tresultSet.getString(\"brand_name\"), resultSet.getString(\"sup_name\"),\n\t\t\t\t\t\tresultSet.getString(\"created_at\"), resultSet.getString(\"updated_at\")));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tbrandName.setCellValueFactory(new PropertyValueFactory<>(\"brand_name\"));\n\t\tsupplierName.setCellValueFactory(new PropertyValueFactory<>(\"sup_name\"));\n\t\tdetailsOfBrands.setItems(brandTableView);\n\t}", "private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void loadLecturer2(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec2.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n}", "private void loadCategories() {\n\t\tcategoryService.getAllCategories(new CustomResponseListener<Category[]>() {\n\t\t\t@Override\n\t\t\tpublic void onHeadersResponse(Map<String, String> headers) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\tLog.e(\"EditTeamProfileActivity\", \"Error while loading categories\", error);\n\t\t\t\tToast.makeText(EditTeamProfileActivity.this, \"Error while loading categories \" + error.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(Category[] response) {\n\t\t\t\tCollections.addAll(categories, response);\n\n\t\t\t\tif (null != categoryRecyclerAdapter) {\n\t\t\t\t\tcategoryRecyclerAdapter.setSelected(0);\n\t\t\t\t\tcategoryRecyclerAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\n\t\t\t\tupdateSelectedCategory();\n\t\t\t}\n\t\t});\n\t}", "public void setCategory(Integer category) {\n this.category = category;\n }", "public void chooseCategory(String category) {\n for (Category c : categories) {\n if (c.getName().equals(category)) {\n if (c.isActive()) {\n c.setInActive();\n } else {\n c.setActive();\n }\n }\n }\n for (int i = 0; i < categories.size(); i++) {\n System.out.println(categories.get(i).getName());\n System.out.println(categories.get(i).isActive());\n }\n }", "public void setCategory(Category c) {\n this.category = c;\n }", "public void loadClue(String category,int index) {\n\t\tString clue = _gamesData.get(category).get(index);\n\t\ttry {\n\t\t\t_currentClue = new Clue (clue,(index+1)*100);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@FXML\n\t private void loadlistbook(ActionEvent event) {\n\t \tloadwindow(\"views/booklist.fxml\", \"View Book List\");\n\t }", "private static void queryBook(){\n\t\tSystem.out.println(\"===Book Queries Menu===\");\n\t\t\n\t\t/*Display menu options*/\n\t\tSystem.out.println(\"1--> Query Books by Author\");\n\t\tSystem.out.println(\"2--> Query Books by Genre\");\n\t\tSystem.out.println(\"3--> Query Books by Publisher\");\n\t\tSystem.out.println(\"Any other number --> Exit To Main Menu\");\n\t\tSystem.out.println(\"Enter menu option: \");\n\t\tint menu_option = getIntegerInput(); //ensures user input is an integer value\n\t\t\n\t\tswitch(menu_option){\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBooksByAuthor();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBooksByGenre();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBooksByPublisher();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Then(\"book categories must match book_categories table from db\")\n public void book_categories_must_match_book_categories_table_from_db() {\n String sql = \"SELECT name FROM book_categories;\";\n List<Object> namesObj = DBUtils.getColumnData(sql, \"name\");\n List<String> exNames = new ArrayList<>();\n for (Object o : namesObj) {\n exNames.add(o.toString());\n }\n // get the actual categories from UI as webelements\n // convert the web elements to list\n List<WebElement> optionsEl = booksPage.mainCategoryList().getOptions();\n List<String> acNames = BrowserUtils.getElementsText(optionsEl);\n // remove the first option ALL from acList.\n acNames.remove(0);\n // compare 2 lists\n assertEquals(\"Categories did not match\", exNames, acNames);\n }", "public static void openBooksSection() {\n click(BOOKS_TAB_UPPER_MENU);\n }", "@Override\r\n\tpublic Book findOneBook(String id) {\n\t\t\r\n\t\tString sql=\"select * from books where id= ?\";\r\n\t\tString sql2 =\"select * from categories where id=?\";\r\n\t\tString sql3 =\"select * from publishers where id=?\";\r\n\t\ttry {\r\n\t\t\tBook book = runner.query(sql, new BeanHandler<Book>(Book.class), id);\r\n\t\t\tCategory category = runner.query(sql2, new BeanHandler<Category>(Category.class), book.getCategoryId());\r\n\t\t\tPublisher publisher = runner.query(sql3, new BeanHandler<Publisher>(Publisher.class), book.getPublisherId());\r\n\t\t\tbook.setPublisher(publisher);\r\n\t\t\tbook.setCategory(category);\r\n\t\t\tif(book!=null)\r\n\t\t\treturn book;\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 null;\r\n\t}", "@FXML\n\t void loadbookinfo2(ActionEvent event) {\n\t \t ObservableList<String> issueData = FXCollections.observableArrayList();\n\t isReadyForSubmission = false;\n\t String id = Bookid.getText();\n\t String qu = \"SELECT * FROM ISSUE_LMS WHERE bookID = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t try {\n\t while (rs.next()) {\n\t String mBookID = id;\n\t String mMemberID = rs.getString(\"memberID\");\n\t Timestamp mIssueTime = rs.getTimestamp(\"issueTime\");\n\t int mRenewCount = rs.getInt(\"renew_count\");\n\n issueData.add(\"Issue Date and Time :\" + mIssueTime.toGMTString());\n issueData.add(\"Renew Count :\" + mRenewCount);\n issueData.add(\"Book Information:-\");\n\t \n\t qu = \"SELECT * FROM BOOK_LMS WHERE ID = '\" + mBookID + \"'\";\n\t ResultSet r1 = dbhandler.execQuery(qu);\n\n\t while (r1.next()) {\n\t issueData.add(\"\\tBook Name :\" + r1.getString(\"title\"));\n\t issueData.add(\"\\tBook ID :\" + r1.getString(\"id\"));\n\t issueData.add(\"\\tBook Author :\" + r1.getString(\"author\"));\n\t issueData.add(\"\\tBook Publisher :\" + r1.getString(\"publisher\"));\n\t }\n\t qu = \"SELECT * FROM MEMBER_LMS WHERE ID = '\" + mMemberID + \"'\";\n\t r1 = dbhandler.execQuery(qu);\n\t issueData.add(\"Member Information:-\");\n\n\t while (r1.next()) {\n\t issueData.add(\"\\tName :\" + r1.getString(\"name\"));\n\t issueData.add(\"\\tMobile :\" + r1.getString(\"mobile\"));\n\t issueData.add(\"\\tEmail :\" + r1.getString(\"email\"));\n\t }\n\n\t isReadyForSubmission = true;\n\t }\n\t } catch (SQLException ex) {\n\t Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n\t }\n\t issuedatallist.getItems().setAll(issueData);\n\t }", "@Override\n public void loadCategories() {\n loadCategories(mFirstLoad, true);\n mFirstLoad = false;\n }", "private void setAllFields(){\n Expense retrievedExpense = db.getExpenseWithId(bundle.getInt(EXPENSE_TABLE_COLUMN_ID));\n label.setText(retrievedExpense.getLabel());\n\n // Get adapter from category array\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.expense_category, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // Get position where it matches the category name retrieved with the category array\n int spinnerPosition = adapter.getPosition(retrievedExpense.getCategory());\n\n // Set category spinner\n category.setSelection(spinnerPosition);\n\n cost.setText(String.format(\"%.2f \",retrievedExpense.getCost()));\n paid.setChecked(retrievedExpense.isWasItPaid());\n dateDue.setText(retrievedExpense.getDueDate());\n\n }", "private void LoadSubjectToCBO() {\n\n List<MonHoc> monHocs = monHocDAO.getAll();\n for (MonHoc monHoc : monHocs) {\n cbsuject.addItem(monHoc.getTenmonhoc());\n }\n }" ]
[ "0.6991753", "0.6119679", "0.5862582", "0.58372223", "0.57754886", "0.57677925", "0.57220584", "0.5659288", "0.5650861", "0.55645007", "0.5460104", "0.54401505", "0.5431858", "0.5421353", "0.54158556", "0.5405614", "0.53968596", "0.53831786", "0.5364006", "0.53472567", "0.5331381", "0.53260726", "0.5306611", "0.52922827", "0.52878743", "0.52840394", "0.5245948", "0.52338576", "0.5228775", "0.52182466", "0.5201705", "0.5199946", "0.51813096", "0.5167398", "0.5156474", "0.5143502", "0.5139009", "0.5137592", "0.5137592", "0.5137592", "0.5137592", "0.5137592", "0.5136729", "0.5134177", "0.5125442", "0.5110751", "0.51090336", "0.509969", "0.508842", "0.50842094", "0.5081612", "0.50772005", "0.50739986", "0.5069817", "0.5065997", "0.5063865", "0.505835", "0.50498945", "0.5049681", "0.5037686", "0.50369", "0.503382", "0.503235", "0.50323343", "0.50323343", "0.50323343", "0.50323343", "0.50119495", "0.5007941", "0.50066507", "0.49985158", "0.49927416", "0.4989607", "0.4987918", "0.49806765", "0.49780622", "0.49779058", "0.4972023", "0.49718872", "0.49614835", "0.49611667", "0.49554512", "0.49535573", "0.49520037", "0.49520037", "0.49487552", "0.49459735", "0.49441436", "0.494044", "0.49363104", "0.4926204", "0.4922292", "0.49136204", "0.49036014", "0.49032038", "0.490305", "0.4901067", "0.48946622", "0.48934424", "0.48908928" ]
0.54170483
14
Load Book details to the table in settings according to requirement
public static List<Book> getBookDetails_1() throws HibernateException{ session = sessionFactory.openSession(); session.beginTransaction(); Query query=session.getNamedQuery("INVENTORY_getAllBookList_1"); List<Book> bookList=query.list(); session.getTransaction().commit(); session.close(); return bookList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n\t private void loadbookinfo(ActionEvent event) {\n\t \tclearbookcache();\n\t \t\n\t \tString id = bookidinput.getText();\n\t \tString qu = \"SELECT * FROM BOOK_LMS WHERE id = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t Boolean flag = false;\n\t \n\t try {\n while (rs.next()) {\n String bName = rs.getString(\"title\");\n String bAuthor = rs.getString(\"author\");\n Boolean bStatus = rs.getBoolean(\"isAvail\");\n\n Bookname.setText(bName);\n Bookauthor.setText(bAuthor);\n String status = (bStatus) ? \"Available\" : \"Not Available\";\n bookstatus.setText(status);\n\n flag = true;\n }\n\n if (!flag) {\n Bookname.setText(\"No Such Book Available\");\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void loadBook() {\n List<Book> books = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n Book book = new Book(\"Book-\" + i, \"Test book \" + i);\n books.add(book);\n }\n this.setBooks(books);\n }", "private void loadBookInformation(String rawPage, Document doc, Book book) {\n BookDetailParser parser = new BookDetailParser();\n SwBook swBook = parser.parseDetailPage(rawPage);\n book.setContributors(swBook.getContributors());\n book.setCover_url(coverUrlParser.parse(doc));\n book.setShort_description(descriptionShortParser.parse(doc));\n book.addPrice(swBook.getPrice().getPrices().get(0));\n book.setTitle(titleParser.parse(doc));\n }", "public void getBookDetails() {\n\t}", "private void populateUI(BookEntry book) {\n // Return if the task is null\n if (book == null) {\n return;\n }\n // Use the variable book to populate the UI\n mNameEditText.setText(book.getBook_name());\n mQuantityTextView.setText(Integer.toString(book.getQuantity()));\n mPriceEditText.setText(Double.toString(book.getPrice()));\n mPhoneEditText.setText(Integer.toString(book.getSupplier_phone_number()));\n mSupplier = book.getSupplier_name();\n switch (mSupplier) {\n case BookEntry.SUPPLIER_ONE:\n mSupplierSpinner.setSelection(1);\n break;\n case BookEntry.SUPPLIER_TWO:\n mSupplierSpinner.setSelection(2);\n break;\n default:\n mSupplierSpinner.setSelection(0);\n break;\n }\n mSupplierSpinner.setSelection(mSupplier);\n }", "public Book load(String bid) {\n\t\treturn bookDao.load(bid);\r\n\t}", "private void initData() {\n\r\n\t\tint statusBarHeight = 50;\r\n\t\tint readHeight = ApplicationManager.SCREEN_HEIGHT - statusBarHeight;\r\n\r\n\t\t// TODO 获取图书信息\r\n\t\tIntent intent = getIntent();\r\n\t\tbookInfo = (BookInfo) intent.getSerializableExtra(BOOK_INFO_KEY);\r\n\r\n\t\ttitleName.setText(bookInfo.getName());\r\n\r\n\t\tString progressInfo = PreferenceHelper.getString(bookInfo.getId() + \"\",\r\n\t\t\t\tnull);\r\n\t\tL.v(TAG, \"initData\", \"progressInfo : \" + progressInfo);\r\n\r\n\t\tif (!TextUtils.isEmpty(progressInfo)) {\r\n\t\t\t// 格式 : ChapterId_ChapterName_CharsetIndex\r\n\t\t\tString[] values = progressInfo.split(\"#\");\r\n\t\t\tif (values.length == 3) {\r\n\t\t\t\treadProgress = new Bookmark();\r\n\t\t\t\treadProgress.setChapterId(Integer.valueOf(values[0]));\r\n\t\t\t\treadProgress.setChapterName(values[1]);\r\n\t\t\t\treadProgress.setCharsetIndex(Integer.valueOf(values[2]));\r\n\t\t\t} else {\r\n\t\t\t\tPreferenceHelper.putString(bookInfo.getId() + \"\", \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (readProgress == null) {\r\n\t\t\treadProgress = new Bookmark();\r\n\t\t\tChapterInfo chapterInfo = bookInfo.getChapterInfos().get(0);\r\n\t\t\treadProgress.setChapterId(chapterInfo.getId());\r\n\t\t\treadProgress.setChapterName(chapterInfo.getName());\r\n\t\t\treadProgress.setCharsetIndex(0);\r\n\t\t}\r\n\r\n\t\tcurrentChapter = findChapterInfoById(readProgress.getChapterId());\r\n\r\n\t\tif (currentChapter == null\r\n\t\t\t\t&& TextUtils.isEmpty(currentChapter.getPath())) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// TODO 读取sp中的字体大小\r\n\t\tcurrentTextSize = PreferenceHelper.getInt(TEXT_SIZE_KEY, 40);\r\n\t\tBookPageFactory.setFontSize(currentTextSize);\r\n\t\tpagefactory = BookPageFactory.build(ApplicationManager.SCREEN_WIDTH, readHeight);\r\n\t\ttry {\r\n\t\t\tpagefactory.openbook(currentChapter.getPath());\r\n\t\t} catch (IOException e) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tadapter = new ScanViewAdapter(this, pagefactory);\r\n\r\n\t\t// TODO 跳转到历史记录\r\n\t\tscanview.setAdapter(adapter, readProgress.getCharsetIndex());\r\n\r\n\t\tmenuIn = AnimationUtils.loadAnimation(this, R.anim.menu_pop_in);\r\n\t\tmenuOut = AnimationUtils.loadAnimation(this, R.anim.menu_pop_out);\r\n\t\t\r\n\t\tif(android.os.Build.VERSION.SDK_INT>=16){\r\n\t\t\ttitleOut = new TranslateAnimation(\r\n\t Animation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n\t 0, Animation.ABSOLUTE, 0,\r\n\t Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24));\r\n\t\t\ttitleOut.setDuration(400);\r\n\t \t\t\r\n\t titleIn = new TranslateAnimation(\r\n \t\t\t\tAnimation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n \t\t\t\t0, Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24),\r\n \t\t\t\tAnimation.ABSOLUTE, 0);\r\n\t titleIn.setDuration(400);\r\n\t\t}else{\r\n\t\t\ttitleIn = AnimationUtils.loadAnimation(this, R.anim.title_in);\r\n\t\t\ttitleOut = AnimationUtils.loadAnimation(this, R.anim.title_out);\r\n\t\t}\r\n\t\t\r\n\t\taddBookmark = AnimationUtils.loadAnimation(this, R.anim.add_bookmark);\r\n\t\t\r\n\r\n\t\ttitleOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\ttitle.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\r\n\t\tmenuOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\tmenu.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tscanview.setOnMoveListener(new onMoveListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onMoveEvent() {\r\n\t\t\t\tif (isMenuShowing) {\r\n\t\t\t\t\thideMenu();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageChanged(View currPage) {\r\n\t\t\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\t\t\treadProgress.setCharsetIndex(tag.start_index);\r\n\t\t\t\tshowChaptersBtn(tag);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tView currPage = scanview.getCurrPage();\r\n\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\tshowChaptersBtn(tag);\r\n\t\t\r\n\t\t//TODO 获取该书的书签\r\n\t\tgetBookMarks();\r\n\t\t\r\n\t}", "@Override\n public void DataIsLoaded(List<BookModel> bookModels, List<String> keys) {\n BookModel bookModel = bookModels.get(0);\n Intent intent = new Intent (getContext(), BookDetailsActivity.class);\n intent.putExtra(\"Book\", bookModel);\n getContext().startActivity(intent);\n Log.i(TAG, \"Data is loaded\");\n\n }", "private static boolean loadBooks() throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new FileReader(BOOKS_FILE));\n\t\tboolean error_loading = false; //stores whether there was an error loading a book\n\t\t\n\t\tString line = reader.readLine(); //read the properties of a book in the books.txt file\n\t\t/*read books.txt file, set the input for each BookDetails object and add each BookDetails object to the ALL_BOOKS Hashtable*/\n\t\twhile(line != null){\n\t\t\tBookDetails book = new BookDetails();\n\t\t\tString[] details = line.split(\"\\t\"); //the properties of each BookDetails object are separated by tab spaces in the books.txt file\n\t\t\tfor(int i = 0; i < details.length; i ++){\n\t\t\t\tif(!setBookInput(i, details[i], book)){ //checks if there was an error in setting the BookDetails object's properties with the values in the books.txt file\n\t\t\t\t\tSystem.out.println(\"ERROR Loading Books\");\n\t\t\t\t\terror_loading = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(error_loading) //if there was an error loading a book then stop the process of loading books\n\t\t\t\tbreak;\n\t\t\tALL_BOOKS.put(book.getBookId(), book); //add BookDetails object to ALL_BOOKS\n\t\t\taddToPublisherTable(book.getPublisher(), book.getBookTitle()); //add book's title to the ALL_PUBLISHERS Hashtable\n\t\t\taddToGenreTable(book, book.getBookTitle()); //add book's title to the ALL_GENRES ArrayList\n\t\t\taddToAuthorTable(book.getAuthor().toString(), book.getBookTitle()); //add book's title to the ALL_AUTHORS Hashtable\n\t\t\tline = reader.readLine(); \n\t\t}\n\t\treader.close();\n\t\t\n\t\tif(!error_loading){\n\t\t\tSystem.out.println(\"Loading Books - Complete!\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false; //error encountered while loading books\n\t}", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "public void setBorrowBookDetailsToTable() {\n\n try {\n Connection con = databaseconnection.getConnection();\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"select * from lending_book where status= '\" + \"pending\" + \"'\");\n\n while (rs.next()) {\n String id = rs.getString(\"id\");\n String bookName = rs.getString(\"book_name\");\n String studentName = rs.getString(\"student_name\");\n String lendingDate = rs.getString(\"borrow_date\");\n String returnDate = rs.getString(\"return_book_datte\");\n String status = rs.getString(\"status\");\n\n Object[] obj = {id, bookName, studentName, lendingDate, returnDate, status};\n\n model = (DefaultTableModel) tbl_borrowBookDetails.getModel();\n model.addRow(obj);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Error\");\n }\n }", "public void initiateStore() {\r\n\t\tURLConnection urlConnection = null;\r\n\t\tBufferedReader in = null;\r\n\t\tURL dataUrl = null;\r\n\t\ttry {\r\n\t\t\tdataUrl = new URL(URL_STRING);\r\n\t\t\turlConnection = dataUrl.openConnection();\r\n\t\t\tin = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\r\n\t\t\tString inputLine;\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tString[] splittedLine = inputLine.split(\";\");\r\n\t\t\t\t// an array of 4 elements, the fourth element\r\n\t\t\t\t// the first three elements are the properties of the book.\r\n\t\t\t\t// last element is the quantity.\r\n\t\t\t\tBook book = new Book();\r\n\t\t\t\tbook.setTitle(splittedLine[0]);\r\n\t\t\t\tbook.setAuthor(splittedLine[1]);\r\n\t\t\t\tBigDecimal decimalPrice = new BigDecimal(splittedLine[2].replaceAll(\",\", \"\"));\r\n\t\t\t\tbook.setPrice(decimalPrice);\r\n\t\t\t\tfor(int i=0; i<Integer.parseInt(splittedLine[3]); i++)\r\n\t\t\t\t\tthis.addBook(book);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(!in.equals(null)) in.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void loadBtechData()\r\n\t{\r\n\t\tlist.clear();\r\n\t\tString qu = \"SELECT * FROM BTECHSTUDENT\";\r\n\t\tResultSet result = databaseHandler.execQuery(qu);\r\n\r\n\t\ttry {// retrieve student information form database\r\n\t\t\twhile(result.next())\r\n\t\t\t{\r\n\t\t\t\tString studendID = result.getString(\"studentNoB\");\r\n\t\t\t\tString nameB = result.getString(\"nameB\");\r\n\t\t\t\tString studSurnameB = result.getString(\"surnameB\");\r\n\t\t\t\tString supervisorB = result.getString(\"supervisorB\");\r\n\t\t\t\tString emailB = result.getString(\"emailB\");\r\n\t\t\t\tString cellphoneB = result.getString(\"cellphoneNoB\");\r\n\t\t\t\tString courseB = result.getString(\"stationB\");\r\n\t\t\t\tString stationB = result.getString(\"courseB\");\r\n\r\n\t\t\t\tlist.add(new StudentProperty(studendID, nameB, studSurnameB,\r\n\t\t\t\t\t\tsupervisorB, emailB, cellphoneB, courseB, stationB));\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\t// Transfer the list data on the table\r\n\t\tstudentBTable.setItems(list);\r\n\t}", "private void loadRecordDetails() {\n updateRecordCount();\n loadCurrentRecord();\n }", "public void scandb_book_info(String table_name) {\n sql = \" SELECT * from \" + table_name + \";\";\n\n try {\n result = statement.executeQuery(sql);\n while (result.next()) {\n set_book_info(result.getInt(\"id\"), result.getString(\"name\"), result.getString(\"url\"));\n\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}", "private void selectBook(Book book){\n\t\tthis.book = book;\n\t\tshowView(\"ModifyBookView\");\n\t\tif(book.isInactive()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is archived. It must be recovered before it can be modified.\"));\n\t\t}else if(book.isLost()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is lost. It must be recovered before it can be modified.\"));\n\t\t}\n\t}", "private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }", "@Override\r\n\tpublic Book getBookInfo(int book_id) {\n\t\treturn null;\r\n\t}", "public void setBook(Book book) {\n this.book = book;\n }", "private void addLoad() {\n\n\t\ttry {\n\t\t\tString company_name = company_name_txtfield.getText();\n\t\t\tString company_phone = company_phone_txtfield.getText();\n\t\t\tString pickup_name_of_place = pickup_name_of_place_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString pickup_street_address = pickup_street_address_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString pickup_city = pickup_city_txtfield.getText();\n\t\t\tString pickup_state = pickup_state_txtfield.getText();\n\t\t\tString pickup_zip_code = pickup_zipcode_txtfield.getText();\n\t\t\tString delivery_name_of_place = delivery_name_of_place_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString delivery_street_address = delivery_street_address_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString delivery_city = delivery_city_txtfield.getText();\n\t\t\tString delivery_state = delivery_state_txtfield.getText();\n\t\t\tString delivery_zip_code = delivery_zipcode_txtfield.getText();\n\t\t\tString pickup_date = Utils.getDate(pickup_date_field);// pickup_date_field.getDate().toString();\n\t\t\tString delivery_date = Utils.getDate(delivery_date_field);// delivery_date_field.getDate().toString();\n\t\t\tString driver_assigned = driver_assigned_combolist\n\t\t\t\t\t.getSelectedItem().toString();\n\t\t\tString status = status_combolist.getSelectedItem().toString();\n\t\t\tString driver_assigned_id = driver_assigned.split(\"/\")[0];\n\t\t\tString driver_assigned_name = driver_assigned.split(\"/\")[1];\n\n\t\t\tLoadBean bean = new LoadBean();\n\t\t\tbean.setCompany_name(company_name);\n\t\t\tbean.setCompany_phone(company_phone);\n\t\t\tbean.setPickup_name_of_place(pickup_name_of_place);\n\t\t\tbean.setPickup_street_address(pickup_street_address);\n\t\t\tbean.setPickup_state(pickup_state);\n\t\t\tbean.setPickup_city(pickup_city);\n\t\t\tbean.setPickup_zip_code(pickup_zip_code);\n\t\t\tbean.setPickup_date(pickup_date);\n\t\t\tbean.setDelivery_date(delivery_date);\n\t\t\tbean.setDelivery_name_of_place(delivery_name_of_place);\n\t\t\tbean.setDelivery_state(delivery_state);\n\t\t\tbean.setDelivery_street_address(delivery_street_address);\n\t\t\tbean.setDelivery_city(delivery_city);\n\t\t\tbean.setDelivery_zip_code(delivery_zip_code);\n\t\t\tbean.setDriver_assigned_id(driver_assigned_id);\n\t\t\tbean.setDriver_assigned_name(driver_assigned_name);\n\t\t\tbean.setStatus(status);\n\n\t\t\tif (DatabaseManager.getInstance() != null) {\n\t\t\t\tif (DbConnectionManager.getConnection() != null) {\n\t\t\t\t\tboolean flag = DatabaseManager.getInstance().insertLoad(\n\t\t\t\t\t\t\tDbConnectionManager.getConnection(), bean);\n\t\t\t\t\tif (flag) {\n\t\t\t\t\t\tframe.updateLoadList();\n\t\t\t\t\t\tAddLoadInformations.this.dispose();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tUtils.infoBox(\"DB Connection Error\", \"Connection Error\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void loadBrandDataToTable() {\n\n\t\tbrandTableView.clear();\n\t\ttry {\n\n\t\t\tString sql = \"SELECT * FROM branddetails WHERE active_indicator = 1\";\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(sql);\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tbrandTableView.add(new BrandsModel(resultSet.getInt(\"brnd_slno\"), resultSet.getInt(\"active_indicator\"),\n\t\t\t\t\t\tresultSet.getString(\"brand_name\"), resultSet.getString(\"sup_name\"),\n\t\t\t\t\t\tresultSet.getString(\"created_at\"), resultSet.getString(\"updated_at\")));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tbrandName.setCellValueFactory(new PropertyValueFactory<>(\"brand_name\"));\n\t\tsupplierName.setCellValueFactory(new PropertyValueFactory<>(\"sup_name\"));\n\t\tdetailsOfBrands.setItems(brandTableView);\n\t}", "@FXML\n\t void loadbookinfo2(ActionEvent event) {\n\t \t ObservableList<String> issueData = FXCollections.observableArrayList();\n\t isReadyForSubmission = false;\n\t String id = Bookid.getText();\n\t String qu = \"SELECT * FROM ISSUE_LMS WHERE bookID = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t try {\n\t while (rs.next()) {\n\t String mBookID = id;\n\t String mMemberID = rs.getString(\"memberID\");\n\t Timestamp mIssueTime = rs.getTimestamp(\"issueTime\");\n\t int mRenewCount = rs.getInt(\"renew_count\");\n\n issueData.add(\"Issue Date and Time :\" + mIssueTime.toGMTString());\n issueData.add(\"Renew Count :\" + mRenewCount);\n issueData.add(\"Book Information:-\");\n\t \n\t qu = \"SELECT * FROM BOOK_LMS WHERE ID = '\" + mBookID + \"'\";\n\t ResultSet r1 = dbhandler.execQuery(qu);\n\n\t while (r1.next()) {\n\t issueData.add(\"\\tBook Name :\" + r1.getString(\"title\"));\n\t issueData.add(\"\\tBook ID :\" + r1.getString(\"id\"));\n\t issueData.add(\"\\tBook Author :\" + r1.getString(\"author\"));\n\t issueData.add(\"\\tBook Publisher :\" + r1.getString(\"publisher\"));\n\t }\n\t qu = \"SELECT * FROM MEMBER_LMS WHERE ID = '\" + mMemberID + \"'\";\n\t r1 = dbhandler.execQuery(qu);\n\t issueData.add(\"Member Information:-\");\n\n\t while (r1.next()) {\n\t issueData.add(\"\\tName :\" + r1.getString(\"name\"));\n\t issueData.add(\"\\tMobile :\" + r1.getString(\"mobile\"));\n\t issueData.add(\"\\tEmail :\" + r1.getString(\"email\"));\n\t }\n\n\t isReadyForSubmission = true;\n\t }\n\t } catch (SQLException ex) {\n\t Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n\t }\n\t issuedatallist.getItems().setAll(issueData);\n\t }", "public void loadBooks(){\n\t\tSystem.out.println(\"\\n\\tLoading books from CSV file\");\n\t\ttry{\n\t\t\tint iD=0, x;\n\t\t\tString current = null;\n\t\t\tRandom r = new Random();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"../bin/books.csv\"));\n\t\t\twhile((current = br.readLine()) != null){\n\t\t\t\tString[] data = current.split(\",\");\n\t\t\t\tx = r.nextInt(6) + 15;\n\t\t\t\tfor(int i =0;i<x;i++){\n\t\t\t\t\tBook b= new Book(Integer.toHexString(iD), data[0], data[1], data[2], data[3]);\n\t\t\t\t\tif(bookMap.containsKey(data[0]) != true){\n\t\t\t\t\t\tbookMap.put(data[0], new ArrayList<Book>());\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\tbookMap.get(data[0]).add(b);\n\t\t\t\t\tiD += 1;\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"\\tBooks Added!\");\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"\\tFile not found\");\n\t\t}catch(IOException e){\n System.out.println(e.toString());\n }\n\t}", "private void setUpTable()\n {\n //Setting the outlook of the table\n bookTable.setColumnReorderingAllowed(true);\n bookTable.setColumnCollapsingAllowed(true);\n \n \n bookTable.setContainerDataSource(allBooksBean);\n \n \n //Setting up the table data row and column\n /*bookTable.addContainerProperty(\"id\", Integer.class, null);\n bookTable.addContainerProperty(\"book name\",String.class, null);\n bookTable.addContainerProperty(\"author name\", String.class, null);\n bookTable.addContainerProperty(\"description\", String.class, null);\n bookTable.addContainerProperty(\"book genres\", String.class, null);\n */\n //The initial values in the table \n db.connectDB();\n try{\n allBooks = db.getAllBooks();\n }catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n db.closeDB();\n allBooksBean.addAll(allBooks);\n \n //Set Visible columns (show certain columnes)\n bookTable.setVisibleColumns(new Object[]{\"id\",\"bookName\", \"authorName\", \"description\" ,\"bookGenreString\"});\n \n //Set height and width\n bookTable.setHeight(\"370px\");\n bookTable.setWidth(\"1000px\");\n \n //Allow the data in the table to be selected\n bookTable.setSelectable(true);\n \n //Save the selected row by saving the change Immediately\n bookTable.setImmediate(true);\n //Set the table on listener for value change\n bookTable.addValueChangeListener(new Property.ValueChangeListener()\n {\n public void valueChange(ValueChangeEvent event) {\n \n }\n\n });\n }", "Book getBookById(Integer id);", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "private void insertBook() {\n /// Create a ContentValues object with the dummy data\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_NAME, \"Harry Potter and the goblet of fire\");\n values.put(BookEntry.COLUMN_BOOK_PRICE, 100);\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, 2);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_NAME, \"Supplier 1\");\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE, \"972-3-1234567\");\n\n // Insert the dummy data to the database\n Uri uri = getContentResolver().insert(BookEntry.CONTENT_URI, values);\n // Show a toast message\n String message;\n if (uri == null) {\n message = getResources().getString(R.string.error_adding_book_toast).toString();\n } else {\n message = getResources().getString(R.string.book_added_toast).toString();\n }\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "private static void loadBooks() {\n\tbookmarks[2][0]=BookmarkManager.getInstance().createBook(4000,\"Walden\",\"\",1854,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][1]=BookmarkManager.getInstance().createBook(4001,\"Self-Reliance and Other Essays\",\"\",1900,\"Dover Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][2]=BookmarkManager.getInstance().createBook(4002,\"Light From Many Lamps\",\"\",1960,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][3]=BookmarkManager.getInstance().createBook(4003,\"Head First Design Patterns\",\"\",1944,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][4]=BookmarkManager.getInstance().createBook(4004,\"Effective Java Programming Language Guide\",\"\",1990,\"Wilder Publications\",new String[] {\"Eric Freeman\",\"Bert Bates\",\"Kathy Sierra\",\"Elisabeth Robson\"},\"Philosophy\",4.3);\n}", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "Book getBookByTitle(String title);", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "@PostConstruct\n\t@Transactional\n\tpublic void fillData() {\n\t\n\t\tBookCategory progromming1 = new BookCategory(1,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming2 = new BookCategory(2,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming3 = new BookCategory(3,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming4 = new BookCategory(4,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming5 = new BookCategory(5,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming6 = new BookCategory(6,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming7 = new BookCategory(7,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming8 = new BookCategory(8,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming9 = new BookCategory(9,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming10 = new BookCategory(10,\"Programming\",new ArrayList<Book>());\n\t\t\n\n\t\t\n\t\tbookCategoryRepository.save(progromming1);\n\t\tbookCategoryRepository.save(programming2);\n\t\tbookCategoryRepository.save(programming3);\n\t\tbookCategoryRepository.save(programming4);\n\t\tbookCategoryRepository.save(programming5);\n\t\tbookCategoryRepository.save(programming6);\n\t\tbookCategoryRepository.save(programming7);\n\t\tbookCategoryRepository.save(programming8);\n\t\tbookCategoryRepository.save(programming9);\n\t\tbookCategoryRepository.save(programming10);\n\t\t\n\t\tBook java = new Book(\n\t\t\t\t(long) 1,\"text-100\",\"Java Programming Language\",\n\t\t\t\t \"Master Core Java basics\",\n\t\t\t\t 754,\n\t\t\t\t \"assets/images/books/text-106.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogromming1\n\t\t);\n\t\tBook kotlin = new Book(\n\t\t\t\t(long) 2,\"text-101\",\"Kotlin Programming Language\",\n\t\t\t\t \"Learn Kotlin Programming Language\",\n\t\t\t\t 829,\n\t\t\t\t \"assets/images/books/text-102.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming2\n\t\t);\n\t\tBook python = new Book(\n\t\t\t\t(long) 3,\"text-102\",\"Python 9\",\n\t\t\t\t \"Learn Python Language\",\n\t\t\t\t 240,\n\t\t\t\t \"assets/images/books/text-103.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming3\n\t\t);\n\t\tBook cShap = new Book(\n\t\t\t\t(long) 4,\"text-103\",\"C#\",\n\t\t\t\t \"Learn C# Programming Language\",\n\t\t\t\t 490,\n\t\t\t\t \"assets/images/books/text-101.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming4\n\t\t);\n\t\tBook cpp = new Book(\n\t\t\t\t(long) 5,\"text-104\",\"C++\",\n\t\t\t\t \"Learn C++ Language\",\n\t\t\t\t 830,\n\t\t\t\t \"assets/images/books/text-110.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming5\n\t\t);\n\t\tBook dataStru = new Book(\n\t\t\t\t(long) 6,\"text-105\",\"Data Structure 3\",\n\t\t\t\t \"Learn Data Structures\",\n\t\t\t\t 560,\n\t\t\t\t \"assets/images/books/text-106.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming6\n\t\t);\n\t\tBook cprog = new Book(\n\t\t\t\t(long) 7,\"text-106\",\"C Programming\",\n\t\t\t\t \"Learn C Language\",\n\t\t\t\t 695,\n\t\t\t\t \"assets/images/books/text-100.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming7\n\t\t);\n\t\tBook crushInterview = new Book(\n\t\t\t\t(long) 3,\"text-102\",\"Coding Interview\",\n\t\t\t\t \"Crushing the Coding interview\",\n\t\t\t\t 600,\n\t\t\t\t \"assets/images/books/text-103.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming8\n\t\t);\n\t\tBook desing = new Book(\n\t\t\t\t(long) 859,\"text-102\",\"Design Parttens\",\n\t\t\t\t \"Learn Python Language\",\n\t\t\t\t 690,\n\t\t\t\t \"assets/images/books/text-105.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming9\n\t\t);\n\t\tBook machineLearn = new Book(\n\t\t\t\t(long) 9,\"text-102\",\"Python 3\",\n\t\t\t\t \"Learn Python Machine Learning with Python\",\n\t\t\t\t 416,\n\t\t\t\t \"assets/images/books/text-107.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming10\n\t\t);\n\t\tBook apiJava = new Book(\n\t\t\t\t(long) 10,\"text-102\",\"Practical API Design\",\n\t\t\t\t \"Java Framework Architect\",\n\t\t\t\t 540,\n\t\t\t\t \"assets/images/books/text-108.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming8\n\t\t);\n\tbookRepository.save(java);\n\tbookRepository.save(kotlin);\n\tbookRepository.save(python);\n\tbookRepository.save(cpp);\n\tbookRepository.save(cprog);\n\tbookRepository.save(crushInterview);\n\tbookRepository.save(cShap);\n\tbookRepository.save(dataStru);\n\tbookRepository.save(desing);\n\tbookRepository.save(machineLearn);\n\tbookRepository.save(apiJava);\n\n\t}", "public void firstLoadBookUpdate(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\tint cp=myViewDetailBook.getNoofcopies();\r\n\t\tSystem.out.println(\"No of Copy in First Load Book Update=\"+cp);\r\n\t\tmyForm.setNoOfcopies(cp);\r\n\t\t\r\n\t}", "public void loadBookList(java.util.List<LdPublisher> ls) {\r\n final ReffererConditionBookList reffererCondition = new ReffererConditionBookList() {\r\n public void setup(LdBookCB cb) {\r\n cb.addOrderBy_PK_Asc();// Default OrderBy for Refferer.\r\n }\r\n };\r\n loadBookList(ls, reffererCondition);\r\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\n }", "protected static Book goodBookValues(String bidField, String bnameField, String byearField, String bpriceField, String bauthorField, String bpublisherField) throws Exception{\n Book myBook;\n String [] ID,strPrice;\n String Name;\n int Year;\n double Price;\n \n try{\n ID = bidField.split(\"\\\\s+\"); // split using spaces\n if (ID.length > 1 || ID[0].equals(\"\")) // id should only be one word\n {\n throw new Exception (\"ERROR: The ID must be entered\\n\"); // if the id is empty, it must be conveyed to this user via this exception\n }\n if (ID[0].length() !=6) // id must be 6 digits\n throw new Exception (\"ERROR: ID must be 6 digits\\n\");\n if (!(ID[0].matches(\"[0-9]+\"))) // id must only be numbers\n throw new Exception (\"ERROR: ID must only contain numbers\");\n Name = bnameField;\n if (Name.equals(\"\")) // name must not be blank\n throw new Exception (\"ERROR: Name of product must be entered\\n\");\n if (byearField.equals(\"\") || byearField.length() != 4) // year field cannot be blank\n {\n throw new Exception (\"ERROR: Year of product must be 4 numbers\\n\");\n } else {\n Year = Integer.parseInt(byearField);\n if (Year > 9999 || Year < 1000)\n {\n throw new Exception (\"Error: Year must be between 1000 and 9999 years\");\n }\n }\n \n strPrice = bpriceField.split(\"\\\\s+\");\n if (strPrice.length > 1 || strPrice[0].equals(\"\"))\n Price = 0;\n else\n Price = Double.parseDouble(strPrice[0]);\n \n myBook = new Book(ID[0],Name,Year,Price,bauthorField,bpublisherField);\n ProductGUI.Display(\"Book fields are good\\n\");\n return myBook;\n } catch (Exception e){\n throw new Exception (e.getMessage());\n }\n \n }", "public BookBean getBook(String Bookid) throws SQLException {\n\t\tConnection con = DbConnection.getConnection();\n\t\tBookBean book = new BookBean();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from books where bookid= ?\";\n\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);// 鏇存敼JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t\tps = con.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setString(1, Bookid);//ps锟斤拷锟斤拷锟斤拷锟絬ser锟斤拷锟斤拷锟斤拷锟斤拷要锟斤拷同锟斤拷\n\t\t\t\n\t\t\trs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tbook.setBookid(rs.getString(\"bookid\"));\n\t\t\t\tbook.setBookname(rs.getString(\"bookname\"));\n\t\t\t\tbook.setAuthor(rs.getString(\"author\"));\n\t\t\t\tbook.setCategoryid(rs.getString(\"categoryid\"));\n\t\t\t\tbook.setPublishing(rs.getString(\"publishing\"));\n\t\t\t\tbook.setPrice(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityin(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityout(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityloss(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setPicture(rs.getString(\"bookname\"));\n\t\t\t}\n\t\t\tcon.commit();//鎻愪氦JDBC浜嬪姟\n\t\t\tcon.setAutoCommit(true);// 鎭㈠JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tcon.rollback();//鍥炴粴JDBC浜嬪姟\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDbConnection.closeConnection(rs, ps, con);\n\t\t}\n\n\t\treturn book;\n\t}", "private void insertDummyBook() {\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_NAME, getString(R.string.dummy_book_name));\n values.put(BookEntry.COLUMN_GENRE, BookEntry.GENRE_SELF_HELP);\n values.put(BookEntry.COLUMN_PRICE, getResources().getInteger(R.integer.dummy_book_price));\n values.put(BookEntry.COLUMN_QUANTITY, getResources().getInteger(R.integer.dummy_book_quantity));\n values.put(BookEntry.COLUMN_SUPPLIER, getString(R.string.dummy_book_supplier));\n values.put(DatabaseContract.BookEntry.COLUMN_SUPPLIER_PHONE, getString(R.string.dummy_supplier_phone_number));\n values.put(DatabaseContract.BookEntry.COLUMN_SUPPLIER_EMAIL, getString(R.string.dummy_book_supplier_email));\n getContentResolver().insert(BookEntry.CONTENT_URI, values);\n }", "private Book getBook(String sku) {\n return bookDB.get(sku);\n }", "private void enterBook() {\n String sku;\n String author;\n String description;\n double price;\n String title;\n boolean isInStock;\n String priceTmp;\n String inStock;\n Scanner keyb = new Scanner(System.in);\n\n System.out.println(\"Enter the sku number.\"); // Enter the SKU number\n sku = keyb.nextLine();\n\n System.out.println(\"Enter the title of the book.\"); // Enter the title\n title = keyb.nextLine();\n\n System.out.println(\"Enter the author of the book.\"); // Enter the author\n author = keyb.nextLine();\n\n System.out.println(\"Enter the price of the book.\"); // Enter the price of the book\n priceTmp = keyb.nextLine();\n price = Double.parseDouble(priceTmp);\n\n System.out.println(\"Enter a description of the book.\"); // Enter the description of the book\n description = keyb.nextLine();\n\n System.out.println(\"Enter whether the book is in stock (\\\"Y\\\"|\\\"N\\\").\"); // in stock?\n inStock = keyb.nextLine();\n if (inStock.equalsIgnoreCase(\"Y\")) {\n isInStock = true;\n } else if (inStock.equalsIgnoreCase(\"N\")) {\n isInStock = false;\n } else {\n System.out.println(\"Not a valid entry. In stock status is unknown; therefore, it will be listed as no.\");\n isInStock = false;\n }\n\n Book book = new Book(title, author, description, price, isInStock);\n bookDB.put(sku, book);\n }", "private void loadDatabaseSettings() {\r\n\r\n\t\tint dbID = BundleHelper.getIdScenarioResultForSetup();\r\n\t\tthis.getJTextFieldDatabaseID().setText(dbID + \"\");\r\n\t}", "CmsRoomBook selectByPrimaryKey(String bookId);", "List<BookStoreElement> load(Reader reader);", "BookInfo selectByPrimaryKey(Integer id);", "public void doUpdateTable() {\r\n\t\tlogger.info(\"Actualizando tabla books\");\r\n\t\tlazyModel = new LazyBookDataModel();\r\n\t}", "public void readBook()\n\t{\n\t\tb.input();\n\t\tSystem.out.print(\"Enter number of available books:\");\n\t\tavailableBooks=sc.nextInt();\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\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n String BookName = dataSnapshot.child(\"bookname\").getValue(String.class);\n String BookAuthor = dataSnapshot.child(\"bookauthor\").getValue(String.class);\n String BookYear = dataSnapshot.child(\"bookyear\").getValue(String.class);\n String BookCategory = dataSnapshot.child(\"bookcategory\").getValue(String.class);\n String BookCover = dataSnapshot.child(\"bookcover\").getValue(String.class);\n String BookURL = dataSnapshot.child(\"bookurl\").getValue(String.class);\n String BookID = String.valueOf(dataSnapshot.child(\"bookid\").getValue(Integer.class));\n\n StoreBook.put(\"bookname\", BookName);\n StoreBook.put(\"bookauthor\", BookAuthor);\n StoreBook.put(\"bookyear\", BookYear);\n StoreBook.put(\"bookcategory\", BookCategory);\n StoreBook.put(\"bookcover\", BookCover);\n StoreBook.put(\"bookurl\", BookURL);\n StoreBook.put(\"bookid\", BookID);\n\n\n Log.d(TAG, \"-------------------onDataChange:\\n Book Details:\\n\" + StoreBook);\n LoadPDF();\n\n }", "private void putDataIntoTable(List<Book> books)\n {\n for(int i = 0; i<books.size(); i++)\n {\n bookTable.addItem(new Object[]{books.get(i).getId(), books.get(i).getBookName(), books.get(i).getAuthorName(), books.get(i).getDescription(), books.get(i).getBookGenreString()}, i+1);\n }\n }", "@Override\n\tpublic void updateBookData() {\n\t\tList<Book> bookList = dao.findByHql(\"from Book where bookId > 1717\",null);\n\t\tString bookSnNumber = \"\";\n\t\tfor(Book book:bookList){\n\t\t\tfor (int i = 1; i <= book.getLeftAmount(); i++) {\n\t\t\t\t// 添加图书成功后,根据ISBN和图书数量自动生成每本图书SN号\n\t\t\t\tBookSn bookSn = new BookSn();\n\t\t\t\t// 每本书的bookSn号根据书的ISBN号和数量自动生成,\n\t\t\t\t// 如书的ISBN是123,数量是3,则每本书的bookSn分别是:123-1,123-2,123-3\n\t\t\t\tbookSnNumber = \"-\" + i;//book.getIsbn() + \"-\" + i;\n\t\t\t\tbookSn.setBookId(book.getBookId());\n\t\t\t\tbookSn.setBookSN(bookSnNumber);\n\t\t\t\t// 默认书的状态是0表示未借出\n\t\t\t\tbookSn.setStatus(new Short((short) 0));\n\t\t\t\t// 添加bookSn信息\n\t\t\t\tbookSnDao.save(bookSn);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic Book getBook(long bookId) {\n\t\treturn bd.getOne(bookId);\r\n\t}", "public CrudBook() {\n initComponents();\n loadTable();\n btnAdd.setEnabled(true);\n btnDelete.setEnabled(false);\n btnModify.setEnabled(false);\n }", "public void getBookInfo(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\t\r\n\t}", "public Book readBookFile()\n {\n\n String name=\"\";\n String author ;\n ArrayList<String> genre = new ArrayList<String>();\n float price=0;\n String bookId;\n String fields2[];\n String line;\n\n line = bookFile.getNextLine();\n if(line==null)\n {\n return null;\n }\n String fields[] = line.split(\" by \");\n if(fields.length>2)\n {\n int i=0;\n while (i<fields.length-1)\n {\n name+=fields[i];\n if(i<fields.length-2)\n {\n name+= \" by \";\n }\n i++;\n }\n fields2 = fields[fields.length-1].split(\"%\");\n }\n else\n {\n name = fields[0];\n fields2 = fields[1].split(\"%\");\n }\n\n author = fields2[0];\n price=Float.parseFloat(fields2[1]);\n bookId=fields2[2];\n genre.add(fields2[3]);\n genre.add(fields2[4]);\n return new Book(name,genre,author,price,bookId);\n\n\n }", "List<Info> getBookInfoById(Long infoId) throws Exception;", "private void load_buku() {\n Object header[] = {\"ID BUKU\", \"JUDUL BUKU\", \"PENGARANG\", \"PENERBIT\", \"TAHUN TERBIT\"};\n DefaultTableModel data = new DefaultTableModel(null, header);\n bookTable.setModel(data);\n String sql_data = \"SELECT * FROM tbl_buku\";\n try {\n Connection kon = koneksi.getConnection();\n Statement st = kon.createStatement();\n ResultSet rs = st.executeQuery(sql_data);\n while (rs.next()) {\n String d1 = rs.getString(1);\n String d2 = rs.getString(2);\n String d3 = rs.getString(3);\n String d4 = rs.getString(4);\n String d5 = rs.getString(5);\n\n String d[] = {d1, d2, d3, d4, d5};\n data.addRow(d);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public void getBookAvailability() {\n getBookReservationEligibility();\n }", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "public String getBook() {\n\t\treturn book;\r\n\t}", "public void acquire(Book book)\r\n\t {\r\n\t \tbooks.put(book.getCallNumber(), book);\r\n\t }", "public void bind(final Book book) {\n final long id = book.getId();\n\n textTitle.setText(book.getTitle());\n textAuthor.setText(book.getAuthor());\n textDescription.setText(book.getDescription());\n\n // load the background image\n if (book.getImageUrl() != null) {\n Glide.with(context)\n .load(book.getImageUrl())\n .fitCenter()\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(imageBackground);\n }\n\n //remove single match from realm\n card.setOnLongClickListener(new View.OnLongClickListener() {\n @Override\n public boolean onLongClick(View v) {\n booksPresenter.deleteBookById(id);\n return false;\n }\n });\n\n //update single match from realm\n card.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n booksPresenter.showEditDialog(book);\n }\n });\n }", "public void initialize() {\n this.loadBidDetails();\n }", "public void setBookDesc(java.lang.String value);", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public UpdateBooks() {\n initComponents();\n showTable();\n }", "private void tableLoad() {\n try{\n String sql=\"SELECT * FROM salary\";\n pst = conn.prepareStatement(sql);\n rs = pst.executeQuery();\n \n table1.setModel(DbUtils.resultSetToTableModel(rs));\n \n \n }\n catch(SQLException e){\n \n }\n }", "public void loadBooks() {\n\t\ttry {\n\t\t\tScanner load = new Scanner(new File(FILEPATH));\n\t\t\tSystem.out.println(\"Worked\");\n\n\t\t\twhile (load.hasNext()) {\n\t\t\t\tString[] entry = load.nextLine().split(\";\");\n\n\t\t\t\t// checks the type of book\n\t\t\t\tint type = bookType(entry[0]);\n\n\t\t\t\t// creates the appropriate book\n\t\t\t\tswitch (type) {\n\t\t\t\tcase 0:\n\t\t\t\t\tcreateChildrensBook(entry); // creates a Childrensbook and adds it to the array\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tcreateCookBook(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreatePaperbackBook(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tcreatePeriodical(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase -1:\n\t\t\t\t\tSystem.out.println(\"No book created\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tload.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Did not read in file properly, restart the program, and check filepath of books.txt.\");\n\t\t}\n\t}", "public BookView() {\n initComponents();\n setLocationRelativeTo(null);\n setTitle(\"Livaria Paris - Editora\");\n dataBase = new DataBase();\n dataBase.insertBook();\n fillTable(dataBase.getBooks());\n }", "public Book getBook() {\n return book;\n }", "public BookInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setBookId(String bookId) {\n this.bookId = bookId;\n }", "public void read(String bookName, World world) {\n\t\tItem item = world.dbItems().get(bookName);\n\t\tList<Item> items = super.getItems();\n\n\t\tif (items.contains(item) && item instanceof Book) {\n\t\t\tBook book = (Book) item;\n\t\t\tSystem.out.println(book.getBookText());\n\t\t} else {\n\t\t\tSystem.out.println(\"No book called \" + bookName + \" in inventory.\");\n\t\t}\n\t}", "public void initializeBookStore() throws IOException{\r\n //creates new file called \"Book.txt\". \r\n file = new File(\"Book.txt\");\r\n //adds/writes into the file created. \r\n in = new FileWriter(\"Book.txt\", true);\r\n write = new BufferedWriter(in);\r\n \r\n if(file.length() == 0){\r\n write.write(data);\r\n write.newLine();\r\n write.close();\r\n }\r\n }", "ReadOnlyEntryBook getEntryBook();", "public Book(String bookAuthor, String bookTitle, int bookPages, String getDetails)\n {\n author = bookAuthor;\n title = bookTitle;\n pages = bookPages;\n details = author,title,pages;\n Number = \"\";\n }", "public void addLivros( LivroModel book){\n Connection connection=ConexaoDB.getConnection();\n PreparedStatement pStatement=null;\n try {\n String query=\"Insert into book(id_book,title,author,category,publishing_company,release_year,page_number,description,cover)values(null,?,?,?,?,?,?,?,?)\";\n pStatement=connection.prepareStatement(query);\n pStatement.setString(1, book.getTitulo());\n pStatement.setString(2, book.getAutor());\n pStatement.setString(3, book.getCategoria());\n pStatement.setString(4, book.getEditora());\n pStatement.setInt(5, book.getAnoDeLancamento());\n pStatement.setInt(6, book.getPaginas());\n pStatement.setString(7, book.getDescricao());\n pStatement.setString(8, book.getCapa());\n pStatement.execute();\n } catch (Exception e) {\n \n }finally{\n ConexaoDB.closeConnection(connection);\n ConexaoDB.closeStatement(pStatement);\n }\n }", "public Book getBook() {\n\t\treturn book; //changed BoOk to book\r\n\t}", "private void loadSchoolInfo() {\r\n \r\n try {\r\n // Get fine ammount to be incurred by retrieving data from the database. \r\n String sql3 = \"SELECT * FROM schoolInfo \";\r\n pstmt = con.prepareStatement(sql3);\r\n\r\n ResultSet rs3=pstmt.executeQuery();\r\n if (rs3.next()) {\r\n schoolName = rs3.getString(\"name\");\r\n schoolContact = rs3.getString(\"contact\");\r\n schoolAddress = rs3.getString(\"address\");\r\n schoolRegion = rs3.getString(\"region\");\r\n schoolEmail = rs3.getString(\"email\");\r\n schoolWebsite = rs3.getString(\"website\");\r\n } \r\n \r\n pstmt.close();\r\n \r\n } catch (SQLException e) {\r\n }\r\n \r\n //////////////////////////////////// \r\n }", "@Override\n protected void loadAndFormatData()\n {\n // Place the data into the table model along with the column\n // names, set up the editors and renderers for the table cells,\n // set up the table grid lines, and calculate the minimum width\n // required to display the table information\n setUpdatableCharacteristics(getScriptAssociationData(allowSelectDisabled, parent),\n AssociationsTableColumnInfo.getColumnNames(),\n null,\n new Integer[] {AssociationsTableColumnInfo.AVAILABLE.ordinal()},\n null,\n AssociationsTableColumnInfo.getToolTips(),\n true,\n true,\n true,\n true);\n }", "Book selectByPrimaryKey(String bid);", "Book selectByPrimaryKey(String id);", "private void setBooksInfo () {\n infoList = new ArrayList<> ();\n\n\n // item number 1\n\n Info info = new Info ();// this class will help us to save data easily !\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"ما هي اضطرابات طيف التوحد؟\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"سيساعدك هذا المستند على معرفة اضطراب طيف التوحد بشكل عام\");\n\n // we can add book url or download >>\n info.setInfoPageURL (\"https://firebasestorage.googleapis.com/v0/b/autismapp-b0b6a.appspot.com/o/material%2FInfo-Pack-for\"\n + \"-translation-Arabic.pdf?alt=media&token=69b19a8d-8b4c-400a-a0eb-bb5c4e5324e6\");\n\n infoList.add (info); //adding item 1 to list\n\n\n/* // item number 2\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 2 to list\n\n\n // item 3\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 3 to list\n\n // item number 4\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism part 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 4 to list\n\n\n // item 5\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 5 to list*/\n\n\n displayInfo (infoList);\n\n }", "private void loadConfiguration() {\n // TODO Get schema key value from model and set to text field\n /*\n\t\t * if (!StringUtils.isBlank(schemaKey.getKeyValue())) {\n\t\t * schemaKeyTextField.setText(schemaKey.getKeyValue()); }\n\t\t */\n }", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "public Book() {\n this.bookName = \"Five Point Someone\";\n this.bookAuthorName = \"Chetan Bhagat\";\n this.bookIsbnNumber = \"9788129104595\";\n\n }", "public void loadBooksOfCategory(){\n long categoryId=mainActivityViewModel.getSelectedCategory().getMcategory_id();\n Log.v(\"Catid:\",\"\"+categoryId);\n\n mainActivityViewModel.getBookofASelectedCategory(categoryId).observe(this, new Observer<List<Book>>() {\n @Override\n public void onChanged(List<Book> books) {\n if(books.isEmpty()){\n binding.emptyView.setVisibility(View.VISIBLE);\n }\n else {\n binding.emptyView.setVisibility(View.GONE);\n }\n\n booksAdapter.setmBookList(books);\n }\n });\n }", "@Override\r\n\tpublic Book findOneBook(String id) {\n\t\t\r\n\t\tString sql=\"select * from books where id= ?\";\r\n\t\tString sql2 =\"select * from categories where id=?\";\r\n\t\tString sql3 =\"select * from publishers where id=?\";\r\n\t\ttry {\r\n\t\t\tBook book = runner.query(sql, new BeanHandler<Book>(Book.class), id);\r\n\t\t\tCategory category = runner.query(sql2, new BeanHandler<Category>(Category.class), book.getCategoryId());\r\n\t\t\tPublisher publisher = runner.query(sql3, new BeanHandler<Publisher>(Publisher.class), book.getPublisherId());\r\n\t\t\tbook.setPublisher(publisher);\r\n\t\t\tbook.setCategory(category);\r\n\t\t\tif(book!=null)\r\n\t\t\treturn book;\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 null;\r\n\t}", "public void setBookID(int bookID) {\n this.bookID = bookID;\n }", "@Override\n public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {\n if (cursor == null || cursor.getCount() < 1) {\n return;\n }\n\n // Proceed with moving to the first row of the cursor and reading data from it.\n if (cursor.moveToFirst()) {\n // Find the columns of book attributes that are needed.\n int productNameColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRODUCT_NAME);\n int authorColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_AUTHOR);\n int priceColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRICE);\n int quantityColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_QUANTITY);\n int supplierColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_SUPPLIER);\n int supplierPhoneNumberColumnIndex = cursor.getColumnIndex(\n BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER);\n\n // Extract out the value from the Cursor for the given column index.\n String productName = cursor.getString(productNameColumnIndex);\n String author = cursor.getString(authorColumnIndex);\n double price = cursor.getDouble(priceColumnIndex);\n quantity = cursor.getInt(quantityColumnIndex);\n String supplier = cursor.getString(supplierColumnIndex);\n supplierPhoneNumber = cursor.getString(supplierPhoneNumberColumnIndex);\n\n // Format the price to two decimal places so that it displays as \"7.50\" not \"7.5\"\n NumberFormat nf = NumberFormat.getInstance();\n nf.setMaximumFractionDigits(2);\n nf.setMinimumFractionDigits(2);\n String formatPrice = nf.format(price);\n\n // Remove commas from large numbers so that it displays as \"258963.99\" not \"258,963.99\",\n // to keep the app from crashing when the save button is clicked.\n String newFormatPrice = formatPrice.replace(\",\", \"\");\n\n // Update the views on the screen with the values from the database.\n etTitle.setText(productName);\n etAuthor.setText(author);\n etPrice.setText(newFormatPrice);\n etEditQuantity.setText(String.valueOf(quantity));\n etSupplier.setText(supplier);\n etPhoneNumber.setText(supplierPhoneNumber);\n }\n }", "public PageInfo<Book> getBookList() {\n \tPageHelper.startPage(1,2);\r\n List<Book> list = bookMapper.getBookList();\r\n PageInfo<Book> pageInfo=new PageInfo<Book>(list);\r\n\t\treturn pageInfo;\r\n \r\n }", "static void presentBookingHistory(User booker) {\r\n\t\tBooking bookings = new Booking();\r\n\t\tResultSet historyRs = null;\r\n\r\n\t\tSystem.out.printf(\"*%14s%10s%18s%28s%28s%15s%11s\\n\", \"Booking No\", \"Lot No\", \"Car No\", \"Start Time\", \"End Time\", \"Cost\", \"*\");\r\n\t\tSystem.out.println(\"*****************************************************************************************************************************\");\r\n\t\ttry {\r\n\t\t\tDbConnection historyConn = new DbConnection();\r\n\t\t\thistoryRs = historyConn.fetchSelectUserByUNameBookings(booker.getUName());\r\n\t\t\twhile (historyRs.next()) {\r\n\t\t\t\tjava.sql.Timestamp endTime = historyRs.getTimestamp(6);\r\n\t\t\t\t/**\r\n\t\t\t\t*\tTo show only the ones which are not checked out yet\r\n\t\t\t\t*\tIf a record with end time as 0 is found, it will be considered as not booked and shown\r\n\t\t\t\t*/\r\n\t\t\t\tif (endTime.getTime() != 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tString bookingNo = historyRs.getString(1);\r\n\t\t\t\tint lotNo = historyRs.getInt(3);\r\n\t\t\t\tString carNo = historyRs.getString(4);\r\n\t\t\t\tjava.sql.Timestamp startTime = historyRs.getTimestamp(5);\r\n\t\t\t\tint cost = historyRs.getInt(7);\r\n\t\t\t\tbookings.setAllValues(bookingNo, lotNo, carNo, startTime, endTime, cost);\r\n\r\n\t\t\t\tbookings.showBookHistory();\r\n\t\t\t}\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"No records with the given booking number found\");\r\n\t\t\t//SqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} catch (NullPointerException npExcep) {\r\n\t\t\tnpExcep.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\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}", "public void setBookid(Integer bookid) {\r\n\t\tthis.bookid = bookid;\r\n\t}", "public void findBook() {\n\t\tif (books.size() > 0) {\n\t\t\tint randInt = rand.nextInt(books.size());\n\t\t\tbook = books.get(randInt);\n\t\t}\n\t}", "loadDetails initloadDetails(loadDetails iLoadDetails)\n {\n iLoadDetails.setLorryName(\"lorryName\");\n iLoadDetails.setEstateName(\"estateName\");\n iLoadDetails.setDate(\"date\");\n \n return iLoadDetails;\n }", "private static void init() throws IOException, BusinessException {\n\t\tMap<String, String> books = new HashMap<String, String>();\n\t\tbooks.put(\"tranc1-in\", Entry.class.getClassLoader().getResource(\"TRANC1-IN.book\").getPath());\n\t\tbooks.put(\"tranc1-out\", Entry.class.getClassLoader().getResource(\"TRANC1-OUT.book\").getPath());\n\t\tBookStore.loadBooks(books);\n\t}", "public interface BookInfo {\n String getTitle();\n String getAuthor();\n String getOriginalLanguage();\n String getOriginalTitle();\n String getYearOfFirsEdition();\n String getCategory();\n String getGenre();\n String getForm();\n String getPublisherNote();\n String getPicturePath();\n String getGrade();\n}" ]
[ "0.6776885", "0.6586385", "0.6556439", "0.64884394", "0.63168925", "0.6106728", "0.6031598", "0.59153605", "0.5906647", "0.5861638", "0.5852295", "0.5762441", "0.5760744", "0.571398", "0.5711297", "0.5701571", "0.5689648", "0.56773704", "0.56235707", "0.5619944", "0.5603306", "0.5597978", "0.5588106", "0.5565397", "0.5565211", "0.5557578", "0.55574954", "0.5532358", "0.5532227", "0.552745", "0.5520202", "0.5520133", "0.5518134", "0.5514336", "0.550093", "0.5491616", "0.5491616", "0.5491571", "0.5490558", "0.54840654", "0.5466985", "0.5458524", "0.54578805", "0.5448056", "0.54471946", "0.5440829", "0.54302156", "0.5428864", "0.54266346", "0.54241836", "0.54131454", "0.5409343", "0.54082686", "0.5399868", "0.5395872", "0.538135", "0.53795916", "0.5364067", "0.536205", "0.53465056", "0.53424156", "0.5340405", "0.53295135", "0.53231806", "0.53163856", "0.53159994", "0.5312119", "0.5312119", "0.5312119", "0.5311578", "0.5311477", "0.5310533", "0.530528", "0.5297004", "0.52969533", "0.5294587", "0.5283785", "0.52827215", "0.52706593", "0.52579963", "0.52545494", "0.5252979", "0.5240498", "0.5237211", "0.5232661", "0.522937", "0.5228839", "0.5228553", "0.52250946", "0.52214766", "0.52186805", "0.52162874", "0.5209548", "0.5202591", "0.5202143", "0.5200067", "0.5198463", "0.5196879", "0.51963824", "0.5194959", "0.5191198" ]
0.0
-1
Load Book details to the table in settings according to requirement
public static List<Book> getBookDetails_2() throws HibernateException{ session = sessionFactory.openSession(); session.beginTransaction(); Query query=session.getNamedQuery("INVENTORY_getAllBookList_2"); List<Book> bookList=query.list(); session.getTransaction().commit(); session.close(); return bookList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n\t private void loadbookinfo(ActionEvent event) {\n\t \tclearbookcache();\n\t \t\n\t \tString id = bookidinput.getText();\n\t \tString qu = \"SELECT * FROM BOOK_LMS WHERE id = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t Boolean flag = false;\n\t \n\t try {\n while (rs.next()) {\n String bName = rs.getString(\"title\");\n String bAuthor = rs.getString(\"author\");\n Boolean bStatus = rs.getBoolean(\"isAvail\");\n\n Bookname.setText(bName);\n Bookauthor.setText(bAuthor);\n String status = (bStatus) ? \"Available\" : \"Not Available\";\n bookstatus.setText(status);\n\n flag = true;\n }\n\n if (!flag) {\n Bookname.setText(\"No Such Book Available\");\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void loadBook() {\n List<Book> books = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n Book book = new Book(\"Book-\" + i, \"Test book \" + i);\n books.add(book);\n }\n this.setBooks(books);\n }", "private void loadBookInformation(String rawPage, Document doc, Book book) {\n BookDetailParser parser = new BookDetailParser();\n SwBook swBook = parser.parseDetailPage(rawPage);\n book.setContributors(swBook.getContributors());\n book.setCover_url(coverUrlParser.parse(doc));\n book.setShort_description(descriptionShortParser.parse(doc));\n book.addPrice(swBook.getPrice().getPrices().get(0));\n book.setTitle(titleParser.parse(doc));\n }", "public void getBookDetails() {\n\t}", "private void populateUI(BookEntry book) {\n // Return if the task is null\n if (book == null) {\n return;\n }\n // Use the variable book to populate the UI\n mNameEditText.setText(book.getBook_name());\n mQuantityTextView.setText(Integer.toString(book.getQuantity()));\n mPriceEditText.setText(Double.toString(book.getPrice()));\n mPhoneEditText.setText(Integer.toString(book.getSupplier_phone_number()));\n mSupplier = book.getSupplier_name();\n switch (mSupplier) {\n case BookEntry.SUPPLIER_ONE:\n mSupplierSpinner.setSelection(1);\n break;\n case BookEntry.SUPPLIER_TWO:\n mSupplierSpinner.setSelection(2);\n break;\n default:\n mSupplierSpinner.setSelection(0);\n break;\n }\n mSupplierSpinner.setSelection(mSupplier);\n }", "public Book load(String bid) {\n\t\treturn bookDao.load(bid);\r\n\t}", "private void initData() {\n\r\n\t\tint statusBarHeight = 50;\r\n\t\tint readHeight = ApplicationManager.SCREEN_HEIGHT - statusBarHeight;\r\n\r\n\t\t// TODO 获取图书信息\r\n\t\tIntent intent = getIntent();\r\n\t\tbookInfo = (BookInfo) intent.getSerializableExtra(BOOK_INFO_KEY);\r\n\r\n\t\ttitleName.setText(bookInfo.getName());\r\n\r\n\t\tString progressInfo = PreferenceHelper.getString(bookInfo.getId() + \"\",\r\n\t\t\t\tnull);\r\n\t\tL.v(TAG, \"initData\", \"progressInfo : \" + progressInfo);\r\n\r\n\t\tif (!TextUtils.isEmpty(progressInfo)) {\r\n\t\t\t// 格式 : ChapterId_ChapterName_CharsetIndex\r\n\t\t\tString[] values = progressInfo.split(\"#\");\r\n\t\t\tif (values.length == 3) {\r\n\t\t\t\treadProgress = new Bookmark();\r\n\t\t\t\treadProgress.setChapterId(Integer.valueOf(values[0]));\r\n\t\t\t\treadProgress.setChapterName(values[1]);\r\n\t\t\t\treadProgress.setCharsetIndex(Integer.valueOf(values[2]));\r\n\t\t\t} else {\r\n\t\t\t\tPreferenceHelper.putString(bookInfo.getId() + \"\", \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (readProgress == null) {\r\n\t\t\treadProgress = new Bookmark();\r\n\t\t\tChapterInfo chapterInfo = bookInfo.getChapterInfos().get(0);\r\n\t\t\treadProgress.setChapterId(chapterInfo.getId());\r\n\t\t\treadProgress.setChapterName(chapterInfo.getName());\r\n\t\t\treadProgress.setCharsetIndex(0);\r\n\t\t}\r\n\r\n\t\tcurrentChapter = findChapterInfoById(readProgress.getChapterId());\r\n\r\n\t\tif (currentChapter == null\r\n\t\t\t\t&& TextUtils.isEmpty(currentChapter.getPath())) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// TODO 读取sp中的字体大小\r\n\t\tcurrentTextSize = PreferenceHelper.getInt(TEXT_SIZE_KEY, 40);\r\n\t\tBookPageFactory.setFontSize(currentTextSize);\r\n\t\tpagefactory = BookPageFactory.build(ApplicationManager.SCREEN_WIDTH, readHeight);\r\n\t\ttry {\r\n\t\t\tpagefactory.openbook(currentChapter.getPath());\r\n\t\t} catch (IOException e) {\r\n\t\t\tshowShortToast(\"图书不存在\");\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tadapter = new ScanViewAdapter(this, pagefactory);\r\n\r\n\t\t// TODO 跳转到历史记录\r\n\t\tscanview.setAdapter(adapter, readProgress.getCharsetIndex());\r\n\r\n\t\tmenuIn = AnimationUtils.loadAnimation(this, R.anim.menu_pop_in);\r\n\t\tmenuOut = AnimationUtils.loadAnimation(this, R.anim.menu_pop_out);\r\n\t\t\r\n\t\tif(android.os.Build.VERSION.SDK_INT>=16){\r\n\t\t\ttitleOut = new TranslateAnimation(\r\n\t Animation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n\t 0, Animation.ABSOLUTE, 0,\r\n\t Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24));\r\n\t\t\ttitleOut.setDuration(400);\r\n\t \t\t\r\n\t titleIn = new TranslateAnimation(\r\n \t\t\t\tAnimation.ABSOLUTE, 0, Animation.ABSOLUTE,\r\n \t\t\t\t0, Animation.ABSOLUTE, -ScreenUtil.dp2px(mContext, 48+24),\r\n \t\t\t\tAnimation.ABSOLUTE, 0);\r\n\t titleIn.setDuration(400);\r\n\t\t}else{\r\n\t\t\ttitleIn = AnimationUtils.loadAnimation(this, R.anim.title_in);\r\n\t\t\ttitleOut = AnimationUtils.loadAnimation(this, R.anim.title_out);\r\n\t\t}\r\n\t\t\r\n\t\taddBookmark = AnimationUtils.loadAnimation(this, R.anim.add_bookmark);\r\n\t\t\r\n\r\n\t\ttitleOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\ttitle.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\r\n\t\tmenuOut.setAnimationListener(new AnimationListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationRepeat(Animation animation) {\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\r\n\t\t\t\tmenu.setVisibility(View.GONE);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tscanview.setOnMoveListener(new onMoveListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onMoveEvent() {\r\n\t\t\t\tif (isMenuShowing) {\r\n\t\t\t\t\thideMenu();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageChanged(View currPage) {\r\n\t\t\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\t\t\treadProgress.setCharsetIndex(tag.start_index);\r\n\t\t\t\tshowChaptersBtn(tag);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tView currPage = scanview.getCurrPage();\r\n\t\tHolder tag = (Holder) currPage.getTag();\r\n\t\tshowChaptersBtn(tag);\r\n\t\t\r\n\t\t//TODO 获取该书的书签\r\n\t\tgetBookMarks();\r\n\t\t\r\n\t}", "@Override\n public void DataIsLoaded(List<BookModel> bookModels, List<String> keys) {\n BookModel bookModel = bookModels.get(0);\n Intent intent = new Intent (getContext(), BookDetailsActivity.class);\n intent.putExtra(\"Book\", bookModel);\n getContext().startActivity(intent);\n Log.i(TAG, \"Data is loaded\");\n\n }", "private static boolean loadBooks() throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new FileReader(BOOKS_FILE));\n\t\tboolean error_loading = false; //stores whether there was an error loading a book\n\t\t\n\t\tString line = reader.readLine(); //read the properties of a book in the books.txt file\n\t\t/*read books.txt file, set the input for each BookDetails object and add each BookDetails object to the ALL_BOOKS Hashtable*/\n\t\twhile(line != null){\n\t\t\tBookDetails book = new BookDetails();\n\t\t\tString[] details = line.split(\"\\t\"); //the properties of each BookDetails object are separated by tab spaces in the books.txt file\n\t\t\tfor(int i = 0; i < details.length; i ++){\n\t\t\t\tif(!setBookInput(i, details[i], book)){ //checks if there was an error in setting the BookDetails object's properties with the values in the books.txt file\n\t\t\t\t\tSystem.out.println(\"ERROR Loading Books\");\n\t\t\t\t\terror_loading = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(error_loading) //if there was an error loading a book then stop the process of loading books\n\t\t\t\tbreak;\n\t\t\tALL_BOOKS.put(book.getBookId(), book); //add BookDetails object to ALL_BOOKS\n\t\t\taddToPublisherTable(book.getPublisher(), book.getBookTitle()); //add book's title to the ALL_PUBLISHERS Hashtable\n\t\t\taddToGenreTable(book, book.getBookTitle()); //add book's title to the ALL_GENRES ArrayList\n\t\t\taddToAuthorTable(book.getAuthor().toString(), book.getBookTitle()); //add book's title to the ALL_AUTHORS Hashtable\n\t\t\tline = reader.readLine(); \n\t\t}\n\t\treader.close();\n\t\t\n\t\tif(!error_loading){\n\t\t\tSystem.out.println(\"Loading Books - Complete!\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false; //error encountered while loading books\n\t}", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "public void setBorrowBookDetailsToTable() {\n\n try {\n Connection con = databaseconnection.getConnection();\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"select * from lending_book where status= '\" + \"pending\" + \"'\");\n\n while (rs.next()) {\n String id = rs.getString(\"id\");\n String bookName = rs.getString(\"book_name\");\n String studentName = rs.getString(\"student_name\");\n String lendingDate = rs.getString(\"borrow_date\");\n String returnDate = rs.getString(\"return_book_datte\");\n String status = rs.getString(\"status\");\n\n Object[] obj = {id, bookName, studentName, lendingDate, returnDate, status};\n\n model = (DefaultTableModel) tbl_borrowBookDetails.getModel();\n model.addRow(obj);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Error\");\n }\n }", "public void initiateStore() {\r\n\t\tURLConnection urlConnection = null;\r\n\t\tBufferedReader in = null;\r\n\t\tURL dataUrl = null;\r\n\t\ttry {\r\n\t\t\tdataUrl = new URL(URL_STRING);\r\n\t\t\turlConnection = dataUrl.openConnection();\r\n\t\t\tin = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));\r\n\t\t\tString inputLine;\r\n\t\t\twhile ((inputLine = in.readLine()) != null) {\r\n\t\t\t\tString[] splittedLine = inputLine.split(\";\");\r\n\t\t\t\t// an array of 4 elements, the fourth element\r\n\t\t\t\t// the first three elements are the properties of the book.\r\n\t\t\t\t// last element is the quantity.\r\n\t\t\t\tBook book = new Book();\r\n\t\t\t\tbook.setTitle(splittedLine[0]);\r\n\t\t\t\tbook.setAuthor(splittedLine[1]);\r\n\t\t\t\tBigDecimal decimalPrice = new BigDecimal(splittedLine[2].replaceAll(\",\", \"\"));\r\n\t\t\t\tbook.setPrice(decimalPrice);\r\n\t\t\t\tfor(int i=0; i<Integer.parseInt(splittedLine[3]); i++)\r\n\t\t\t\t\tthis.addBook(book);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(!in.equals(null)) in.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void loadBtechData()\r\n\t{\r\n\t\tlist.clear();\r\n\t\tString qu = \"SELECT * FROM BTECHSTUDENT\";\r\n\t\tResultSet result = databaseHandler.execQuery(qu);\r\n\r\n\t\ttry {// retrieve student information form database\r\n\t\t\twhile(result.next())\r\n\t\t\t{\r\n\t\t\t\tString studendID = result.getString(\"studentNoB\");\r\n\t\t\t\tString nameB = result.getString(\"nameB\");\r\n\t\t\t\tString studSurnameB = result.getString(\"surnameB\");\r\n\t\t\t\tString supervisorB = result.getString(\"supervisorB\");\r\n\t\t\t\tString emailB = result.getString(\"emailB\");\r\n\t\t\t\tString cellphoneB = result.getString(\"cellphoneNoB\");\r\n\t\t\t\tString courseB = result.getString(\"stationB\");\r\n\t\t\t\tString stationB = result.getString(\"courseB\");\r\n\r\n\t\t\t\tlist.add(new StudentProperty(studendID, nameB, studSurnameB,\r\n\t\t\t\t\t\tsupervisorB, emailB, cellphoneB, courseB, stationB));\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\t// Transfer the list data on the table\r\n\t\tstudentBTable.setItems(list);\r\n\t}", "private void loadRecordDetails() {\n updateRecordCount();\n loadCurrentRecord();\n }", "public void scandb_book_info(String table_name) {\n sql = \" SELECT * from \" + table_name + \";\";\n\n try {\n result = statement.executeQuery(sql);\n while (result.next()) {\n set_book_info(result.getInt(\"id\"), result.getString(\"name\"), result.getString(\"url\"));\n\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}", "private void selectBook(Book book){\n\t\tthis.book = book;\n\t\tshowView(\"ModifyBookView\");\n\t\tif(book.isInactive()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is archived. It must be recovered before it can be modified.\"));\n\t\t}else if(book.isLost()){\n\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.INFO, \"Heads Up! This book is lost. It must be recovered before it can be modified.\"));\n\t\t}\n\t}", "private Book createBook() {\n Book book = null;\n\n try {\n\n //determine if fiction or non-fiction\n if (radFiction.isSelected()) {\n //fiction book\n book = new Fiction(Integer.parseInt(tfBookID.getText()));\n\n } else if (radNonFiction.isSelected()) {\n //non-fiction book\n book = new NonFiction(Integer.parseInt(tfBookID.getText()));\n\n } else {\n driver.errorMessageNormal(\"Please selecte fiction or non-fiction.\");\n }\n } catch (NumberFormatException nfe) {\n driver.errorMessageNormal(\"Please enter numbers only the Borrower ID and Book ID fields.\");\n }\n return book;\n }", "@Override\r\n\tpublic Book getBookInfo(int book_id) {\n\t\treturn null;\r\n\t}", "public void setBook(Book book) {\n this.book = book;\n }", "private void addLoad() {\n\n\t\ttry {\n\t\t\tString company_name = company_name_txtfield.getText();\n\t\t\tString company_phone = company_phone_txtfield.getText();\n\t\t\tString pickup_name_of_place = pickup_name_of_place_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString pickup_street_address = pickup_street_address_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString pickup_city = pickup_city_txtfield.getText();\n\t\t\tString pickup_state = pickup_state_txtfield.getText();\n\t\t\tString pickup_zip_code = pickup_zipcode_txtfield.getText();\n\t\t\tString delivery_name_of_place = delivery_name_of_place_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString delivery_street_address = delivery_street_address_txtfield\n\t\t\t\t\t.getText();\n\t\t\tString delivery_city = delivery_city_txtfield.getText();\n\t\t\tString delivery_state = delivery_state_txtfield.getText();\n\t\t\tString delivery_zip_code = delivery_zipcode_txtfield.getText();\n\t\t\tString pickup_date = Utils.getDate(pickup_date_field);// pickup_date_field.getDate().toString();\n\t\t\tString delivery_date = Utils.getDate(delivery_date_field);// delivery_date_field.getDate().toString();\n\t\t\tString driver_assigned = driver_assigned_combolist\n\t\t\t\t\t.getSelectedItem().toString();\n\t\t\tString status = status_combolist.getSelectedItem().toString();\n\t\t\tString driver_assigned_id = driver_assigned.split(\"/\")[0];\n\t\t\tString driver_assigned_name = driver_assigned.split(\"/\")[1];\n\n\t\t\tLoadBean bean = new LoadBean();\n\t\t\tbean.setCompany_name(company_name);\n\t\t\tbean.setCompany_phone(company_phone);\n\t\t\tbean.setPickup_name_of_place(pickup_name_of_place);\n\t\t\tbean.setPickup_street_address(pickup_street_address);\n\t\t\tbean.setPickup_state(pickup_state);\n\t\t\tbean.setPickup_city(pickup_city);\n\t\t\tbean.setPickup_zip_code(pickup_zip_code);\n\t\t\tbean.setPickup_date(pickup_date);\n\t\t\tbean.setDelivery_date(delivery_date);\n\t\t\tbean.setDelivery_name_of_place(delivery_name_of_place);\n\t\t\tbean.setDelivery_state(delivery_state);\n\t\t\tbean.setDelivery_street_address(delivery_street_address);\n\t\t\tbean.setDelivery_city(delivery_city);\n\t\t\tbean.setDelivery_zip_code(delivery_zip_code);\n\t\t\tbean.setDriver_assigned_id(driver_assigned_id);\n\t\t\tbean.setDriver_assigned_name(driver_assigned_name);\n\t\t\tbean.setStatus(status);\n\n\t\t\tif (DatabaseManager.getInstance() != null) {\n\t\t\t\tif (DbConnectionManager.getConnection() != null) {\n\t\t\t\t\tboolean flag = DatabaseManager.getInstance().insertLoad(\n\t\t\t\t\t\t\tDbConnectionManager.getConnection(), bean);\n\t\t\t\t\tif (flag) {\n\t\t\t\t\t\tframe.updateLoadList();\n\t\t\t\t\t\tAddLoadInformations.this.dispose();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tUtils.infoBox(\"DB Connection Error\", \"Connection Error\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void loadBrandDataToTable() {\n\n\t\tbrandTableView.clear();\n\t\ttry {\n\n\t\t\tString sql = \"SELECT * FROM branddetails WHERE active_indicator = 1\";\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(sql);\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tbrandTableView.add(new BrandsModel(resultSet.getInt(\"brnd_slno\"), resultSet.getInt(\"active_indicator\"),\n\t\t\t\t\t\tresultSet.getString(\"brand_name\"), resultSet.getString(\"sup_name\"),\n\t\t\t\t\t\tresultSet.getString(\"created_at\"), resultSet.getString(\"updated_at\")));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tbrandName.setCellValueFactory(new PropertyValueFactory<>(\"brand_name\"));\n\t\tsupplierName.setCellValueFactory(new PropertyValueFactory<>(\"sup_name\"));\n\t\tdetailsOfBrands.setItems(brandTableView);\n\t}", "@FXML\n\t void loadbookinfo2(ActionEvent event) {\n\t \t ObservableList<String> issueData = FXCollections.observableArrayList();\n\t isReadyForSubmission = false;\n\t String id = Bookid.getText();\n\t String qu = \"SELECT * FROM ISSUE_LMS WHERE bookID = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t try {\n\t while (rs.next()) {\n\t String mBookID = id;\n\t String mMemberID = rs.getString(\"memberID\");\n\t Timestamp mIssueTime = rs.getTimestamp(\"issueTime\");\n\t int mRenewCount = rs.getInt(\"renew_count\");\n\n issueData.add(\"Issue Date and Time :\" + mIssueTime.toGMTString());\n issueData.add(\"Renew Count :\" + mRenewCount);\n issueData.add(\"Book Information:-\");\n\t \n\t qu = \"SELECT * FROM BOOK_LMS WHERE ID = '\" + mBookID + \"'\";\n\t ResultSet r1 = dbhandler.execQuery(qu);\n\n\t while (r1.next()) {\n\t issueData.add(\"\\tBook Name :\" + r1.getString(\"title\"));\n\t issueData.add(\"\\tBook ID :\" + r1.getString(\"id\"));\n\t issueData.add(\"\\tBook Author :\" + r1.getString(\"author\"));\n\t issueData.add(\"\\tBook Publisher :\" + r1.getString(\"publisher\"));\n\t }\n\t qu = \"SELECT * FROM MEMBER_LMS WHERE ID = '\" + mMemberID + \"'\";\n\t r1 = dbhandler.execQuery(qu);\n\t issueData.add(\"Member Information:-\");\n\n\t while (r1.next()) {\n\t issueData.add(\"\\tName :\" + r1.getString(\"name\"));\n\t issueData.add(\"\\tMobile :\" + r1.getString(\"mobile\"));\n\t issueData.add(\"\\tEmail :\" + r1.getString(\"email\"));\n\t }\n\n\t isReadyForSubmission = true;\n\t }\n\t } catch (SQLException ex) {\n\t Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n\t }\n\t issuedatallist.getItems().setAll(issueData);\n\t }", "public void loadBooks(){\n\t\tSystem.out.println(\"\\n\\tLoading books from CSV file\");\n\t\ttry{\n\t\t\tint iD=0, x;\n\t\t\tString current = null;\n\t\t\tRandom r = new Random();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"../bin/books.csv\"));\n\t\t\twhile((current = br.readLine()) != null){\n\t\t\t\tString[] data = current.split(\",\");\n\t\t\t\tx = r.nextInt(6) + 15;\n\t\t\t\tfor(int i =0;i<x;i++){\n\t\t\t\t\tBook b= new Book(Integer.toHexString(iD), data[0], data[1], data[2], data[3]);\n\t\t\t\t\tif(bookMap.containsKey(data[0]) != true){\n\t\t\t\t\t\tbookMap.put(data[0], new ArrayList<Book>());\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\tbookMap.get(data[0]).add(b);\n\t\t\t\t\tiD += 1;\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"\\tBooks Added!\");\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"\\tFile not found\");\n\t\t}catch(IOException e){\n System.out.println(e.toString());\n }\n\t}", "private void setUpTable()\n {\n //Setting the outlook of the table\n bookTable.setColumnReorderingAllowed(true);\n bookTable.setColumnCollapsingAllowed(true);\n \n \n bookTable.setContainerDataSource(allBooksBean);\n \n \n //Setting up the table data row and column\n /*bookTable.addContainerProperty(\"id\", Integer.class, null);\n bookTable.addContainerProperty(\"book name\",String.class, null);\n bookTable.addContainerProperty(\"author name\", String.class, null);\n bookTable.addContainerProperty(\"description\", String.class, null);\n bookTable.addContainerProperty(\"book genres\", String.class, null);\n */\n //The initial values in the table \n db.connectDB();\n try{\n allBooks = db.getAllBooks();\n }catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n db.closeDB();\n allBooksBean.addAll(allBooks);\n \n //Set Visible columns (show certain columnes)\n bookTable.setVisibleColumns(new Object[]{\"id\",\"bookName\", \"authorName\", \"description\" ,\"bookGenreString\"});\n \n //Set height and width\n bookTable.setHeight(\"370px\");\n bookTable.setWidth(\"1000px\");\n \n //Allow the data in the table to be selected\n bookTable.setSelectable(true);\n \n //Save the selected row by saving the change Immediately\n bookTable.setImmediate(true);\n //Set the table on listener for value change\n bookTable.addValueChangeListener(new Property.ValueChangeListener()\n {\n public void valueChange(ValueChangeEvent event) {\n \n }\n\n });\n }", "Book getBookById(Integer id);", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "private void insertBook() {\n /// Create a ContentValues object with the dummy data\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_NAME, \"Harry Potter and the goblet of fire\");\n values.put(BookEntry.COLUMN_BOOK_PRICE, 100);\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, 2);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_NAME, \"Supplier 1\");\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE, \"972-3-1234567\");\n\n // Insert the dummy data to the database\n Uri uri = getContentResolver().insert(BookEntry.CONTENT_URI, values);\n // Show a toast message\n String message;\n if (uri == null) {\n message = getResources().getString(R.string.error_adding_book_toast).toString();\n } else {\n message = getResources().getString(R.string.book_added_toast).toString();\n }\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "private static void loadBooks() {\n\tbookmarks[2][0]=BookmarkManager.getInstance().createBook(4000,\"Walden\",\"\",1854,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][1]=BookmarkManager.getInstance().createBook(4001,\"Self-Reliance and Other Essays\",\"\",1900,\"Dover Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][2]=BookmarkManager.getInstance().createBook(4002,\"Light From Many Lamps\",\"\",1960,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][3]=BookmarkManager.getInstance().createBook(4003,\"Head First Design Patterns\",\"\",1944,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][4]=BookmarkManager.getInstance().createBook(4004,\"Effective Java Programming Language Guide\",\"\",1990,\"Wilder Publications\",new String[] {\"Eric Freeman\",\"Bert Bates\",\"Kathy Sierra\",\"Elisabeth Robson\"},\"Philosophy\",4.3);\n}", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "Book getBookByTitle(String title);", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "@PostConstruct\n\t@Transactional\n\tpublic void fillData() {\n\t\n\t\tBookCategory progromming1 = new BookCategory(1,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming2 = new BookCategory(2,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming3 = new BookCategory(3,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming4 = new BookCategory(4,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming5 = new BookCategory(5,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming6 = new BookCategory(6,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming7 = new BookCategory(7,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming8 = new BookCategory(8,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming9 = new BookCategory(9,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming10 = new BookCategory(10,\"Programming\",new ArrayList<Book>());\n\t\t\n\n\t\t\n\t\tbookCategoryRepository.save(progromming1);\n\t\tbookCategoryRepository.save(programming2);\n\t\tbookCategoryRepository.save(programming3);\n\t\tbookCategoryRepository.save(programming4);\n\t\tbookCategoryRepository.save(programming5);\n\t\tbookCategoryRepository.save(programming6);\n\t\tbookCategoryRepository.save(programming7);\n\t\tbookCategoryRepository.save(programming8);\n\t\tbookCategoryRepository.save(programming9);\n\t\tbookCategoryRepository.save(programming10);\n\t\t\n\t\tBook java = new Book(\n\t\t\t\t(long) 1,\"text-100\",\"Java Programming Language\",\n\t\t\t\t \"Master Core Java basics\",\n\t\t\t\t 754,\n\t\t\t\t \"assets/images/books/text-106.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogromming1\n\t\t);\n\t\tBook kotlin = new Book(\n\t\t\t\t(long) 2,\"text-101\",\"Kotlin Programming Language\",\n\t\t\t\t \"Learn Kotlin Programming Language\",\n\t\t\t\t 829,\n\t\t\t\t \"assets/images/books/text-102.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming2\n\t\t);\n\t\tBook python = new Book(\n\t\t\t\t(long) 3,\"text-102\",\"Python 9\",\n\t\t\t\t \"Learn Python Language\",\n\t\t\t\t 240,\n\t\t\t\t \"assets/images/books/text-103.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming3\n\t\t);\n\t\tBook cShap = new Book(\n\t\t\t\t(long) 4,\"text-103\",\"C#\",\n\t\t\t\t \"Learn C# Programming Language\",\n\t\t\t\t 490,\n\t\t\t\t \"assets/images/books/text-101.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming4\n\t\t);\n\t\tBook cpp = new Book(\n\t\t\t\t(long) 5,\"text-104\",\"C++\",\n\t\t\t\t \"Learn C++ Language\",\n\t\t\t\t 830,\n\t\t\t\t \"assets/images/books/text-110.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming5\n\t\t);\n\t\tBook dataStru = new Book(\n\t\t\t\t(long) 6,\"text-105\",\"Data Structure 3\",\n\t\t\t\t \"Learn Data Structures\",\n\t\t\t\t 560,\n\t\t\t\t \"assets/images/books/text-106.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming6\n\t\t);\n\t\tBook cprog = new Book(\n\t\t\t\t(long) 7,\"text-106\",\"C Programming\",\n\t\t\t\t \"Learn C Language\",\n\t\t\t\t 695,\n\t\t\t\t \"assets/images/books/text-100.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming7\n\t\t);\n\t\tBook crushInterview = new Book(\n\t\t\t\t(long) 3,\"text-102\",\"Coding Interview\",\n\t\t\t\t \"Crushing the Coding interview\",\n\t\t\t\t 600,\n\t\t\t\t \"assets/images/books/text-103.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming8\n\t\t);\n\t\tBook desing = new Book(\n\t\t\t\t(long) 859,\"text-102\",\"Design Parttens\",\n\t\t\t\t \"Learn Python Language\",\n\t\t\t\t 690,\n\t\t\t\t \"assets/images/books/text-105.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming9\n\t\t);\n\t\tBook machineLearn = new Book(\n\t\t\t\t(long) 9,\"text-102\",\"Python 3\",\n\t\t\t\t \"Learn Python Machine Learning with Python\",\n\t\t\t\t 416,\n\t\t\t\t \"assets/images/books/text-107.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming10\n\t\t);\n\t\tBook apiJava = new Book(\n\t\t\t\t(long) 10,\"text-102\",\"Practical API Design\",\n\t\t\t\t \"Java Framework Architect\",\n\t\t\t\t 540,\n\t\t\t\t \"assets/images/books/text-108.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming8\n\t\t);\n\tbookRepository.save(java);\n\tbookRepository.save(kotlin);\n\tbookRepository.save(python);\n\tbookRepository.save(cpp);\n\tbookRepository.save(cprog);\n\tbookRepository.save(crushInterview);\n\tbookRepository.save(cShap);\n\tbookRepository.save(dataStru);\n\tbookRepository.save(desing);\n\tbookRepository.save(machineLearn);\n\tbookRepository.save(apiJava);\n\n\t}", "public void firstLoadBookUpdate(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\tint cp=myViewDetailBook.getNoofcopies();\r\n\t\tSystem.out.println(\"No of Copy in First Load Book Update=\"+cp);\r\n\t\tmyForm.setNoOfcopies(cp);\r\n\t\t\r\n\t}", "public void loadBookList(java.util.List<LdPublisher> ls) {\r\n final ReffererConditionBookList reffererCondition = new ReffererConditionBookList() {\r\n public void setup(LdBookCB cb) {\r\n cb.addOrderBy_PK_Asc();// Default OrderBy for Refferer.\r\n }\r\n };\r\n loadBookList(ls, reffererCondition);\r\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\n }", "protected static Book goodBookValues(String bidField, String bnameField, String byearField, String bpriceField, String bauthorField, String bpublisherField) throws Exception{\n Book myBook;\n String [] ID,strPrice;\n String Name;\n int Year;\n double Price;\n \n try{\n ID = bidField.split(\"\\\\s+\"); // split using spaces\n if (ID.length > 1 || ID[0].equals(\"\")) // id should only be one word\n {\n throw new Exception (\"ERROR: The ID must be entered\\n\"); // if the id is empty, it must be conveyed to this user via this exception\n }\n if (ID[0].length() !=6) // id must be 6 digits\n throw new Exception (\"ERROR: ID must be 6 digits\\n\");\n if (!(ID[0].matches(\"[0-9]+\"))) // id must only be numbers\n throw new Exception (\"ERROR: ID must only contain numbers\");\n Name = bnameField;\n if (Name.equals(\"\")) // name must not be blank\n throw new Exception (\"ERROR: Name of product must be entered\\n\");\n if (byearField.equals(\"\") || byearField.length() != 4) // year field cannot be blank\n {\n throw new Exception (\"ERROR: Year of product must be 4 numbers\\n\");\n } else {\n Year = Integer.parseInt(byearField);\n if (Year > 9999 || Year < 1000)\n {\n throw new Exception (\"Error: Year must be between 1000 and 9999 years\");\n }\n }\n \n strPrice = bpriceField.split(\"\\\\s+\");\n if (strPrice.length > 1 || strPrice[0].equals(\"\"))\n Price = 0;\n else\n Price = Double.parseDouble(strPrice[0]);\n \n myBook = new Book(ID[0],Name,Year,Price,bauthorField,bpublisherField);\n ProductGUI.Display(\"Book fields are good\\n\");\n return myBook;\n } catch (Exception e){\n throw new Exception (e.getMessage());\n }\n \n }", "public BookBean getBook(String Bookid) throws SQLException {\n\t\tConnection con = DbConnection.getConnection();\n\t\tBookBean book = new BookBean();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from books where bookid= ?\";\n\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);// 鏇存敼JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t\tps = con.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setString(1, Bookid);//ps锟斤拷锟斤拷锟斤拷锟絬ser锟斤拷锟斤拷锟斤拷锟斤拷要锟斤拷同锟斤拷\n\t\t\t\n\t\t\trs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tbook.setBookid(rs.getString(\"bookid\"));\n\t\t\t\tbook.setBookname(rs.getString(\"bookname\"));\n\t\t\t\tbook.setAuthor(rs.getString(\"author\"));\n\t\t\t\tbook.setCategoryid(rs.getString(\"categoryid\"));\n\t\t\t\tbook.setPublishing(rs.getString(\"publishing\"));\n\t\t\t\tbook.setPrice(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityin(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityout(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityloss(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setPicture(rs.getString(\"bookname\"));\n\t\t\t}\n\t\t\tcon.commit();//鎻愪氦JDBC浜嬪姟\n\t\t\tcon.setAutoCommit(true);// 鎭㈠JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tcon.rollback();//鍥炴粴JDBC浜嬪姟\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDbConnection.closeConnection(rs, ps, con);\n\t\t}\n\n\t\treturn book;\n\t}", "private void insertDummyBook() {\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_NAME, getString(R.string.dummy_book_name));\n values.put(BookEntry.COLUMN_GENRE, BookEntry.GENRE_SELF_HELP);\n values.put(BookEntry.COLUMN_PRICE, getResources().getInteger(R.integer.dummy_book_price));\n values.put(BookEntry.COLUMN_QUANTITY, getResources().getInteger(R.integer.dummy_book_quantity));\n values.put(BookEntry.COLUMN_SUPPLIER, getString(R.string.dummy_book_supplier));\n values.put(DatabaseContract.BookEntry.COLUMN_SUPPLIER_PHONE, getString(R.string.dummy_supplier_phone_number));\n values.put(DatabaseContract.BookEntry.COLUMN_SUPPLIER_EMAIL, getString(R.string.dummy_book_supplier_email));\n getContentResolver().insert(BookEntry.CONTENT_URI, values);\n }", "private Book getBook(String sku) {\n return bookDB.get(sku);\n }", "private void enterBook() {\n String sku;\n String author;\n String description;\n double price;\n String title;\n boolean isInStock;\n String priceTmp;\n String inStock;\n Scanner keyb = new Scanner(System.in);\n\n System.out.println(\"Enter the sku number.\"); // Enter the SKU number\n sku = keyb.nextLine();\n\n System.out.println(\"Enter the title of the book.\"); // Enter the title\n title = keyb.nextLine();\n\n System.out.println(\"Enter the author of the book.\"); // Enter the author\n author = keyb.nextLine();\n\n System.out.println(\"Enter the price of the book.\"); // Enter the price of the book\n priceTmp = keyb.nextLine();\n price = Double.parseDouble(priceTmp);\n\n System.out.println(\"Enter a description of the book.\"); // Enter the description of the book\n description = keyb.nextLine();\n\n System.out.println(\"Enter whether the book is in stock (\\\"Y\\\"|\\\"N\\\").\"); // in stock?\n inStock = keyb.nextLine();\n if (inStock.equalsIgnoreCase(\"Y\")) {\n isInStock = true;\n } else if (inStock.equalsIgnoreCase(\"N\")) {\n isInStock = false;\n } else {\n System.out.println(\"Not a valid entry. In stock status is unknown; therefore, it will be listed as no.\");\n isInStock = false;\n }\n\n Book book = new Book(title, author, description, price, isInStock);\n bookDB.put(sku, book);\n }", "private void loadDatabaseSettings() {\r\n\r\n\t\tint dbID = BundleHelper.getIdScenarioResultForSetup();\r\n\t\tthis.getJTextFieldDatabaseID().setText(dbID + \"\");\r\n\t}", "CmsRoomBook selectByPrimaryKey(String bookId);", "List<BookStoreElement> load(Reader reader);", "BookInfo selectByPrimaryKey(Integer id);", "public void doUpdateTable() {\r\n\t\tlogger.info(\"Actualizando tabla books\");\r\n\t\tlazyModel = new LazyBookDataModel();\r\n\t}", "public void readBook()\n\t{\n\t\tb.input();\n\t\tSystem.out.print(\"Enter number of available books:\");\n\t\tavailableBooks=sc.nextInt();\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\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n String BookName = dataSnapshot.child(\"bookname\").getValue(String.class);\n String BookAuthor = dataSnapshot.child(\"bookauthor\").getValue(String.class);\n String BookYear = dataSnapshot.child(\"bookyear\").getValue(String.class);\n String BookCategory = dataSnapshot.child(\"bookcategory\").getValue(String.class);\n String BookCover = dataSnapshot.child(\"bookcover\").getValue(String.class);\n String BookURL = dataSnapshot.child(\"bookurl\").getValue(String.class);\n String BookID = String.valueOf(dataSnapshot.child(\"bookid\").getValue(Integer.class));\n\n StoreBook.put(\"bookname\", BookName);\n StoreBook.put(\"bookauthor\", BookAuthor);\n StoreBook.put(\"bookyear\", BookYear);\n StoreBook.put(\"bookcategory\", BookCategory);\n StoreBook.put(\"bookcover\", BookCover);\n StoreBook.put(\"bookurl\", BookURL);\n StoreBook.put(\"bookid\", BookID);\n\n\n Log.d(TAG, \"-------------------onDataChange:\\n Book Details:\\n\" + StoreBook);\n LoadPDF();\n\n }", "private void putDataIntoTable(List<Book> books)\n {\n for(int i = 0; i<books.size(); i++)\n {\n bookTable.addItem(new Object[]{books.get(i).getId(), books.get(i).getBookName(), books.get(i).getAuthorName(), books.get(i).getDescription(), books.get(i).getBookGenreString()}, i+1);\n }\n }", "@Override\n\tpublic void updateBookData() {\n\t\tList<Book> bookList = dao.findByHql(\"from Book where bookId > 1717\",null);\n\t\tString bookSnNumber = \"\";\n\t\tfor(Book book:bookList){\n\t\t\tfor (int i = 1; i <= book.getLeftAmount(); i++) {\n\t\t\t\t// 添加图书成功后,根据ISBN和图书数量自动生成每本图书SN号\n\t\t\t\tBookSn bookSn = new BookSn();\n\t\t\t\t// 每本书的bookSn号根据书的ISBN号和数量自动生成,\n\t\t\t\t// 如书的ISBN是123,数量是3,则每本书的bookSn分别是:123-1,123-2,123-3\n\t\t\t\tbookSnNumber = \"-\" + i;//book.getIsbn() + \"-\" + i;\n\t\t\t\tbookSn.setBookId(book.getBookId());\n\t\t\t\tbookSn.setBookSN(bookSnNumber);\n\t\t\t\t// 默认书的状态是0表示未借出\n\t\t\t\tbookSn.setStatus(new Short((short) 0));\n\t\t\t\t// 添加bookSn信息\n\t\t\t\tbookSnDao.save(bookSn);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic Book getBook(long bookId) {\n\t\treturn bd.getOne(bookId);\r\n\t}", "public CrudBook() {\n initComponents();\n loadTable();\n btnAdd.setEnabled(true);\n btnDelete.setEnabled(false);\n btnModify.setEnabled(false);\n }", "public void getBookInfo(CheckOutForm myForm) {\n\t\tString isbn=myForm.getFrmIsbn();\r\n\t\tViewDetailBook myViewDetailBook=myViewDetailBookDao.getBookInfoByIsbn(isbn);\r\n\t\tmyForm.setFrmViewDetailBook(myViewDetailBook);\r\n\t\t\r\n\t}", "public Book readBookFile()\n {\n\n String name=\"\";\n String author ;\n ArrayList<String> genre = new ArrayList<String>();\n float price=0;\n String bookId;\n String fields2[];\n String line;\n\n line = bookFile.getNextLine();\n if(line==null)\n {\n return null;\n }\n String fields[] = line.split(\" by \");\n if(fields.length>2)\n {\n int i=0;\n while (i<fields.length-1)\n {\n name+=fields[i];\n if(i<fields.length-2)\n {\n name+= \" by \";\n }\n i++;\n }\n fields2 = fields[fields.length-1].split(\"%\");\n }\n else\n {\n name = fields[0];\n fields2 = fields[1].split(\"%\");\n }\n\n author = fields2[0];\n price=Float.parseFloat(fields2[1]);\n bookId=fields2[2];\n genre.add(fields2[3]);\n genre.add(fields2[4]);\n return new Book(name,genre,author,price,bookId);\n\n\n }", "List<Info> getBookInfoById(Long infoId) throws Exception;", "private void load_buku() {\n Object header[] = {\"ID BUKU\", \"JUDUL BUKU\", \"PENGARANG\", \"PENERBIT\", \"TAHUN TERBIT\"};\n DefaultTableModel data = new DefaultTableModel(null, header);\n bookTable.setModel(data);\n String sql_data = \"SELECT * FROM tbl_buku\";\n try {\n Connection kon = koneksi.getConnection();\n Statement st = kon.createStatement();\n ResultSet rs = st.executeQuery(sql_data);\n while (rs.next()) {\n String d1 = rs.getString(1);\n String d2 = rs.getString(2);\n String d3 = rs.getString(3);\n String d4 = rs.getString(4);\n String d5 = rs.getString(5);\n\n String d[] = {d1, d2, d3, d4, d5};\n data.addRow(d);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "public void getBookAvailability() {\n getBookReservationEligibility();\n }", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "public String getBook() {\n\t\treturn book;\r\n\t}", "public void acquire(Book book)\r\n\t {\r\n\t \tbooks.put(book.getCallNumber(), book);\r\n\t }", "public void bind(final Book book) {\n final long id = book.getId();\n\n textTitle.setText(book.getTitle());\n textAuthor.setText(book.getAuthor());\n textDescription.setText(book.getDescription());\n\n // load the background image\n if (book.getImageUrl() != null) {\n Glide.with(context)\n .load(book.getImageUrl())\n .fitCenter()\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(imageBackground);\n }\n\n //remove single match from realm\n card.setOnLongClickListener(new View.OnLongClickListener() {\n @Override\n public boolean onLongClick(View v) {\n booksPresenter.deleteBookById(id);\n return false;\n }\n });\n\n //update single match from realm\n card.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n booksPresenter.showEditDialog(book);\n }\n });\n }", "public void initialize() {\n this.loadBidDetails();\n }", "public void setBookDesc(java.lang.String value);", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public UpdateBooks() {\n initComponents();\n showTable();\n }", "private void tableLoad() {\n try{\n String sql=\"SELECT * FROM salary\";\n pst = conn.prepareStatement(sql);\n rs = pst.executeQuery();\n \n table1.setModel(DbUtils.resultSetToTableModel(rs));\n \n \n }\n catch(SQLException e){\n \n }\n }", "public void loadBooks() {\n\t\ttry {\n\t\t\tScanner load = new Scanner(new File(FILEPATH));\n\t\t\tSystem.out.println(\"Worked\");\n\n\t\t\twhile (load.hasNext()) {\n\t\t\t\tString[] entry = load.nextLine().split(\";\");\n\n\t\t\t\t// checks the type of book\n\t\t\t\tint type = bookType(entry[0]);\n\n\t\t\t\t// creates the appropriate book\n\t\t\t\tswitch (type) {\n\t\t\t\tcase 0:\n\t\t\t\t\tcreateChildrensBook(entry); // creates a Childrensbook and adds it to the array\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tcreateCookBook(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreatePaperbackBook(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tcreatePeriodical(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase -1:\n\t\t\t\t\tSystem.out.println(\"No book created\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tload.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Did not read in file properly, restart the program, and check filepath of books.txt.\");\n\t\t}\n\t}", "public BookView() {\n initComponents();\n setLocationRelativeTo(null);\n setTitle(\"Livaria Paris - Editora\");\n dataBase = new DataBase();\n dataBase.insertBook();\n fillTable(dataBase.getBooks());\n }", "public Book getBook() {\n return book;\n }", "public BookInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setBookId(String bookId) {\n this.bookId = bookId;\n }", "public void read(String bookName, World world) {\n\t\tItem item = world.dbItems().get(bookName);\n\t\tList<Item> items = super.getItems();\n\n\t\tif (items.contains(item) && item instanceof Book) {\n\t\t\tBook book = (Book) item;\n\t\t\tSystem.out.println(book.getBookText());\n\t\t} else {\n\t\t\tSystem.out.println(\"No book called \" + bookName + \" in inventory.\");\n\t\t}\n\t}", "public void initializeBookStore() throws IOException{\r\n //creates new file called \"Book.txt\". \r\n file = new File(\"Book.txt\");\r\n //adds/writes into the file created. \r\n in = new FileWriter(\"Book.txt\", true);\r\n write = new BufferedWriter(in);\r\n \r\n if(file.length() == 0){\r\n write.write(data);\r\n write.newLine();\r\n write.close();\r\n }\r\n }", "ReadOnlyEntryBook getEntryBook();", "public Book(String bookAuthor, String bookTitle, int bookPages, String getDetails)\n {\n author = bookAuthor;\n title = bookTitle;\n pages = bookPages;\n details = author,title,pages;\n Number = \"\";\n }", "public void addLivros( LivroModel book){\n Connection connection=ConexaoDB.getConnection();\n PreparedStatement pStatement=null;\n try {\n String query=\"Insert into book(id_book,title,author,category,publishing_company,release_year,page_number,description,cover)values(null,?,?,?,?,?,?,?,?)\";\n pStatement=connection.prepareStatement(query);\n pStatement.setString(1, book.getTitulo());\n pStatement.setString(2, book.getAutor());\n pStatement.setString(3, book.getCategoria());\n pStatement.setString(4, book.getEditora());\n pStatement.setInt(5, book.getAnoDeLancamento());\n pStatement.setInt(6, book.getPaginas());\n pStatement.setString(7, book.getDescricao());\n pStatement.setString(8, book.getCapa());\n pStatement.execute();\n } catch (Exception e) {\n \n }finally{\n ConexaoDB.closeConnection(connection);\n ConexaoDB.closeStatement(pStatement);\n }\n }", "public Book getBook() {\n\t\treturn book; //changed BoOk to book\r\n\t}", "private void loadSchoolInfo() {\r\n \r\n try {\r\n // Get fine ammount to be incurred by retrieving data from the database. \r\n String sql3 = \"SELECT * FROM schoolInfo \";\r\n pstmt = con.prepareStatement(sql3);\r\n\r\n ResultSet rs3=pstmt.executeQuery();\r\n if (rs3.next()) {\r\n schoolName = rs3.getString(\"name\");\r\n schoolContact = rs3.getString(\"contact\");\r\n schoolAddress = rs3.getString(\"address\");\r\n schoolRegion = rs3.getString(\"region\");\r\n schoolEmail = rs3.getString(\"email\");\r\n schoolWebsite = rs3.getString(\"website\");\r\n } \r\n \r\n pstmt.close();\r\n \r\n } catch (SQLException e) {\r\n }\r\n \r\n //////////////////////////////////// \r\n }", "@Override\n protected void loadAndFormatData()\n {\n // Place the data into the table model along with the column\n // names, set up the editors and renderers for the table cells,\n // set up the table grid lines, and calculate the minimum width\n // required to display the table information\n setUpdatableCharacteristics(getScriptAssociationData(allowSelectDisabled, parent),\n AssociationsTableColumnInfo.getColumnNames(),\n null,\n new Integer[] {AssociationsTableColumnInfo.AVAILABLE.ordinal()},\n null,\n AssociationsTableColumnInfo.getToolTips(),\n true,\n true,\n true,\n true);\n }", "Book selectByPrimaryKey(String bid);", "Book selectByPrimaryKey(String id);", "private void setBooksInfo () {\n infoList = new ArrayList<> ();\n\n\n // item number 1\n\n Info info = new Info ();// this class will help us to save data easily !\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"ما هي اضطرابات طيف التوحد؟\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"سيساعدك هذا المستند على معرفة اضطراب طيف التوحد بشكل عام\");\n\n // we can add book url or download >>\n info.setInfoPageURL (\"https://firebasestorage.googleapis.com/v0/b/autismapp-b0b6a.appspot.com/o/material%2FInfo-Pack-for\"\n + \"-translation-Arabic.pdf?alt=media&token=69b19a8d-8b4c-400a-a0eb-bb5c4e5324e6\");\n\n infoList.add (info); //adding item 1 to list\n\n\n/* // item number 2\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 2 to list\n\n\n // item 3\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 3 to list\n\n // item number 4\n info = new Info ();// save the second Book\n //set the title >> it can be Book name or Topic title ...\n info.setInfoTitle (\"Solve My Autism part 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this Book has will help patient of Autism to get better by communicate with experts ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://material.io/\");\n\n infoList.add (info);//adding item number 4 to list\n\n\n // item 5\n info = new Info ();// save the third Book\n //set the title >> it can be website name or Topic title ...\n info.setInfoTitle (\"Autism Community 2\");\n\n //set the description of the Topic or the website ....\n info.setInfoDescription (\"this an Book about patient of Autism and how to help them get better ...\");\n\n // we can add the url >>\n info.setInfoPageURL (\"https://www.tutorialspoint.com/android/index.html\");\n infoList.add (info);// adding item 5 to list*/\n\n\n displayInfo (infoList);\n\n }", "private void loadConfiguration() {\n // TODO Get schema key value from model and set to text field\n /*\n\t\t * if (!StringUtils.isBlank(schemaKey.getKeyValue())) {\n\t\t * schemaKeyTextField.setText(schemaKey.getKeyValue()); }\n\t\t */\n }", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "public Book() {\n this.bookName = \"Five Point Someone\";\n this.bookAuthorName = \"Chetan Bhagat\";\n this.bookIsbnNumber = \"9788129104595\";\n\n }", "public void loadBooksOfCategory(){\n long categoryId=mainActivityViewModel.getSelectedCategory().getMcategory_id();\n Log.v(\"Catid:\",\"\"+categoryId);\n\n mainActivityViewModel.getBookofASelectedCategory(categoryId).observe(this, new Observer<List<Book>>() {\n @Override\n public void onChanged(List<Book> books) {\n if(books.isEmpty()){\n binding.emptyView.setVisibility(View.VISIBLE);\n }\n else {\n binding.emptyView.setVisibility(View.GONE);\n }\n\n booksAdapter.setmBookList(books);\n }\n });\n }", "@Override\r\n\tpublic Book findOneBook(String id) {\n\t\t\r\n\t\tString sql=\"select * from books where id= ?\";\r\n\t\tString sql2 =\"select * from categories where id=?\";\r\n\t\tString sql3 =\"select * from publishers where id=?\";\r\n\t\ttry {\r\n\t\t\tBook book = runner.query(sql, new BeanHandler<Book>(Book.class), id);\r\n\t\t\tCategory category = runner.query(sql2, new BeanHandler<Category>(Category.class), book.getCategoryId());\r\n\t\t\tPublisher publisher = runner.query(sql3, new BeanHandler<Publisher>(Publisher.class), book.getPublisherId());\r\n\t\t\tbook.setPublisher(publisher);\r\n\t\t\tbook.setCategory(category);\r\n\t\t\tif(book!=null)\r\n\t\t\treturn book;\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 null;\r\n\t}", "public void setBookID(int bookID) {\n this.bookID = bookID;\n }", "@Override\n public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {\n if (cursor == null || cursor.getCount() < 1) {\n return;\n }\n\n // Proceed with moving to the first row of the cursor and reading data from it.\n if (cursor.moveToFirst()) {\n // Find the columns of book attributes that are needed.\n int productNameColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRODUCT_NAME);\n int authorColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_AUTHOR);\n int priceColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_PRICE);\n int quantityColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_QUANTITY);\n int supplierColumnIndex = cursor.getColumnIndex(BookEntry.COLUMN_BOOK_SUPPLIER);\n int supplierPhoneNumberColumnIndex = cursor.getColumnIndex(\n BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER);\n\n // Extract out the value from the Cursor for the given column index.\n String productName = cursor.getString(productNameColumnIndex);\n String author = cursor.getString(authorColumnIndex);\n double price = cursor.getDouble(priceColumnIndex);\n quantity = cursor.getInt(quantityColumnIndex);\n String supplier = cursor.getString(supplierColumnIndex);\n supplierPhoneNumber = cursor.getString(supplierPhoneNumberColumnIndex);\n\n // Format the price to two decimal places so that it displays as \"7.50\" not \"7.5\"\n NumberFormat nf = NumberFormat.getInstance();\n nf.setMaximumFractionDigits(2);\n nf.setMinimumFractionDigits(2);\n String formatPrice = nf.format(price);\n\n // Remove commas from large numbers so that it displays as \"258963.99\" not \"258,963.99\",\n // to keep the app from crashing when the save button is clicked.\n String newFormatPrice = formatPrice.replace(\",\", \"\");\n\n // Update the views on the screen with the values from the database.\n etTitle.setText(productName);\n etAuthor.setText(author);\n etPrice.setText(newFormatPrice);\n etEditQuantity.setText(String.valueOf(quantity));\n etSupplier.setText(supplier);\n etPhoneNumber.setText(supplierPhoneNumber);\n }\n }", "public PageInfo<Book> getBookList() {\n \tPageHelper.startPage(1,2);\r\n List<Book> list = bookMapper.getBookList();\r\n PageInfo<Book> pageInfo=new PageInfo<Book>(list);\r\n\t\treturn pageInfo;\r\n \r\n }", "static void presentBookingHistory(User booker) {\r\n\t\tBooking bookings = new Booking();\r\n\t\tResultSet historyRs = null;\r\n\r\n\t\tSystem.out.printf(\"*%14s%10s%18s%28s%28s%15s%11s\\n\", \"Booking No\", \"Lot No\", \"Car No\", \"Start Time\", \"End Time\", \"Cost\", \"*\");\r\n\t\tSystem.out.println(\"*****************************************************************************************************************************\");\r\n\t\ttry {\r\n\t\t\tDbConnection historyConn = new DbConnection();\r\n\t\t\thistoryRs = historyConn.fetchSelectUserByUNameBookings(booker.getUName());\r\n\t\t\twhile (historyRs.next()) {\r\n\t\t\t\tjava.sql.Timestamp endTime = historyRs.getTimestamp(6);\r\n\t\t\t\t/**\r\n\t\t\t\t*\tTo show only the ones which are not checked out yet\r\n\t\t\t\t*\tIf a record with end time as 0 is found, it will be considered as not booked and shown\r\n\t\t\t\t*/\r\n\t\t\t\tif (endTime.getTime() != 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tString bookingNo = historyRs.getString(1);\r\n\t\t\t\tint lotNo = historyRs.getInt(3);\r\n\t\t\t\tString carNo = historyRs.getString(4);\r\n\t\t\t\tjava.sql.Timestamp startTime = historyRs.getTimestamp(5);\r\n\t\t\t\tint cost = historyRs.getInt(7);\r\n\t\t\t\tbookings.setAllValues(bookingNo, lotNo, carNo, startTime, endTime, cost);\r\n\r\n\t\t\t\tbookings.showBookHistory();\r\n\t\t\t}\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSystem.out.println(\"No records with the given booking number found\");\r\n\t\t\t//SqlExcep.printStackTrace();\r\n\t\t} catch (ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} catch (NullPointerException npExcep) {\r\n\t\t\tnpExcep.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\t//validateConn.closeDbConnection();\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}", "public void setBookid(Integer bookid) {\r\n\t\tthis.bookid = bookid;\r\n\t}", "public void findBook() {\n\t\tif (books.size() > 0) {\n\t\t\tint randInt = rand.nextInt(books.size());\n\t\t\tbook = books.get(randInt);\n\t\t}\n\t}", "loadDetails initloadDetails(loadDetails iLoadDetails)\n {\n iLoadDetails.setLorryName(\"lorryName\");\n iLoadDetails.setEstateName(\"estateName\");\n iLoadDetails.setDate(\"date\");\n \n return iLoadDetails;\n }", "private static void init() throws IOException, BusinessException {\n\t\tMap<String, String> books = new HashMap<String, String>();\n\t\tbooks.put(\"tranc1-in\", Entry.class.getClassLoader().getResource(\"TRANC1-IN.book\").getPath());\n\t\tbooks.put(\"tranc1-out\", Entry.class.getClassLoader().getResource(\"TRANC1-OUT.book\").getPath());\n\t\tBookStore.loadBooks(books);\n\t}", "public interface BookInfo {\n String getTitle();\n String getAuthor();\n String getOriginalLanguage();\n String getOriginalTitle();\n String getYearOfFirsEdition();\n String getCategory();\n String getGenre();\n String getForm();\n String getPublisherNote();\n String getPicturePath();\n String getGrade();\n}" ]
[ "0.6776885", "0.6586385", "0.6556439", "0.64884394", "0.63168925", "0.6106728", "0.6031598", "0.59153605", "0.5906647", "0.5861638", "0.5852295", "0.5762441", "0.5760744", "0.571398", "0.5711297", "0.5701571", "0.5689648", "0.56773704", "0.56235707", "0.5619944", "0.5603306", "0.5597978", "0.5588106", "0.5565397", "0.5565211", "0.5557578", "0.55574954", "0.5532358", "0.5532227", "0.552745", "0.5520202", "0.5520133", "0.5518134", "0.5514336", "0.550093", "0.5491616", "0.5491616", "0.5491571", "0.5490558", "0.54840654", "0.5466985", "0.5458524", "0.54578805", "0.5448056", "0.54471946", "0.5440829", "0.54302156", "0.5428864", "0.54266346", "0.54241836", "0.54131454", "0.5409343", "0.54082686", "0.5399868", "0.5395872", "0.538135", "0.53795916", "0.5364067", "0.536205", "0.53465056", "0.53424156", "0.5340405", "0.53295135", "0.53231806", "0.53163856", "0.53159994", "0.5312119", "0.5312119", "0.5312119", "0.5311578", "0.5311477", "0.5310533", "0.530528", "0.5297004", "0.52969533", "0.5294587", "0.5283785", "0.52827215", "0.52706593", "0.52579963", "0.52545494", "0.5252979", "0.5240498", "0.5237211", "0.5232661", "0.522937", "0.5228839", "0.5228553", "0.52250946", "0.52214766", "0.52186805", "0.52162874", "0.5209548", "0.5202591", "0.5202143", "0.5200067", "0.5198463", "0.5196879", "0.51963824", "0.5194959", "0.5191198" ]
0.0
-1
Load all Book names in the database
public static List<Book> getBookName() throws HibernateException{ session = sessionFactory.openSession(); session.beginTransaction(); Query query=session.getNamedQuery("INVENTORY_getBookName"); List<Book> bookNameList=query.list(); session.getTransaction().commit(); session.close(); return bookNameList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void loadBook() {\n List<Book> books = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n Book book = new Book(\"Book-\" + i, \"Test book \" + i);\n books.add(book);\n }\n this.setBooks(books);\n }", "public void loadBooks(){\n\t\tSystem.out.println(\"\\n\\tLoading books from CSV file\");\n\t\ttry{\n\t\t\tint iD=0, x;\n\t\t\tString current = null;\n\t\t\tRandom r = new Random();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"../bin/books.csv\"));\n\t\t\twhile((current = br.readLine()) != null){\n\t\t\t\tString[] data = current.split(\",\");\n\t\t\t\tx = r.nextInt(6) + 15;\n\t\t\t\tfor(int i =0;i<x;i++){\n\t\t\t\t\tBook b= new Book(Integer.toHexString(iD), data[0], data[1], data[2], data[3]);\n\t\t\t\t\tif(bookMap.containsKey(data[0]) != true){\n\t\t\t\t\t\tbookMap.put(data[0], new ArrayList<Book>());\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\tbookMap.get(data[0]).add(b);\n\t\t\t\t\tiD += 1;\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"\\tBooks Added!\");\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"\\tFile not found\");\n\t\t}catch(IOException e){\n System.out.println(e.toString());\n }\n\t}", "List<Book> findBooksByName(String name);", "public List<Book> readByBookName(String searchString) throws Exception{\n\t\tsearchString = \"%\"+searchString+\"%\";\n\t\treturn (List<Book>) template.query(\"select * from tbl_book where title like ?\", new Object[] {searchString}, this);\n\t}", "public List<BookData> searchBookbyTitle (String name) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where title = ?\");\n\t\t\tmyStmt.setString(1, name);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}", "public void loadNames() {\n\t\tloadNames(false);\n\t}", "public void listBooks() {\n for (int g = 0; g < books.length; g++) {\n books[g].toString();\n }\n// List all books in Bookstore\n }", "public List<Book> findAll() {\n\t\treturn bookDao.findAll();\r\n\t}", "public void listBooksByName(String name) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE BookName = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setString(1, name);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "Collection<Book> readAll();", "public List<String> loadAddressBook()\n\t{\n\t\treturn controller.listAllAddressBook();\n\t}", "public Book[] getBooksByName(String bkName) throws SQLException {\n\t\t\t\tArrayList<Book> books = new ArrayList<Book>();\r\n\t\t\t\t\r\n\t\t\t\tString sql = \"select * from TB_Book where bkName like ?\";\r\n\t\t\t\t\r\n\t\t\t\tObject[] params = new Object[]{bkName};\r\n\r\n\t\t\t\tResultSet rs = SQLHelper.getResultSet(sql,params);\r\n\t\t\t\tif(rs != null){\r\n\t\t\t\t\twhile(rs.next()){\r\n\t\t\t\t\t\tBook book = initBook(rs);\r\n\t\t\t\t\t\tbooks.add(book);\r\n\t\t\t\t\t}\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t}\r\n\t\t\t\tif(books.size()>0){\r\n\t\t\t\t\tBook[] array = new Book[books.size()];\r\n\t\t\t\t\tbooks.toArray(array);\r\n\t\t\t\t\treturn array;\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t}", "public void loadBooks() {\n\t\ttry {\n\t\t\tScanner load = new Scanner(new File(FILEPATH));\n\t\t\tSystem.out.println(\"Worked\");\n\n\t\t\twhile (load.hasNext()) {\n\t\t\t\tString[] entry = load.nextLine().split(\";\");\n\n\t\t\t\t// checks the type of book\n\t\t\t\tint type = bookType(entry[0]);\n\n\t\t\t\t// creates the appropriate book\n\t\t\t\tswitch (type) {\n\t\t\t\tcase 0:\n\t\t\t\t\tcreateChildrensBook(entry); // creates a Childrensbook and adds it to the array\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tcreateCookBook(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tcreatePaperbackBook(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tcreatePeriodical(entry);\n\t\t\t\t\tbreak;\n\t\t\t\tcase -1:\n\t\t\t\t\tSystem.out.println(\"No book created\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tload.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Did not read in file properly, restart the program, and check filepath of books.txt.\");\n\t\t}\n\t}", "@Override\n\tpublic List<Book> findAll() {\n\t\treturn dao.findAll();\n\t}", "public void loadIngreID() throws SQLException, ClassNotFoundException {\r\n ArrayList<Ingredient> ingredients = new IngredientControllerUtil().getAllIngredient();\r\n ArrayList<String> name = new ArrayList<>();\r\n\r\n for (Ingredient ingredient : ingredients) {\r\n name.add(ingredient.getIngreName());\r\n }\r\n\r\n cmbIngreName.getItems().addAll(name);\r\n }", "public List<Book> getAllBooks() {\n return entityManager.createQuery(\"select b from Book b\", Book.class).getResultList();\n }", "public List<Book> getAll() {\n return bookFacade.findAll(); \n }", "public List<Books> showAllBooks(){\n String sql=\"select * from Book\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{});\n List<Books> list=new ArrayList<>();\n list=resultSetToBook(baseDao);\n return list;\n }", "Collection<Book> getAll();", "public List<Book> getAllBooks(){\n\t\treturn this.bRepo.findAll();\n\t}", "public List<Book> allBooks() {\n return bookRepository.findAll();\n }", "public List<BookData> getAllBooks() throws Exception{\n\t\tList<BookData> list = new ArrayList<>();\n\t\tStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\tmyStmt = myConn.createStatement();\n\t\t\tmyRs = myStmt.executeQuery(\"select title, author_name, publisher_name, book_id from books natural join book_authors\");\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public ArrayList<Book> getAllBooksArray(){\n ArrayList<Book> booksArray = new ArrayList<>();\n\n Connection con = null;\n Statement stmt = null;\n ResultSet rs = null;\n\n try{\n Class.forName(\"org.sqlite.JDBC\");\n con = DriverManager.getConnection(\"jdbc:sqlite:Library.db\");\n stmt = con.createStatement();\n String sql = \"SELECT * FROM BOOKS\";\n rs = stmt.executeQuery(sql);\n while(rs.next()){\n Book book = new Book(rs.getString(\"TITLE\"), rs.getString(\"AUTHOR\"), rs.getString(\"ILLUSTRATOR\"), rs.getString(\"ISBN\"), rs.getString(\"DECIMAL\"),\n rs.getString(\"DESCRIPTION\"), rs.getString(\"GENRE\"), rs.getBoolean(\"NON_FICTION\"));\n String tags = rs.getString(\"TAGS\");\n book.setID(rs.getInt(\"ID\"));\n book.deserializeTags(tags);\n booksArray.add(book);\n }\n rs.close();\n stmt.close();\n con.close();\n }catch(SQLException | ClassNotFoundException e){\n e.printStackTrace();\n }\n return booksArray;\n }", "public ObservableList<Object> selectAllBooks(){\n System.out.println(\"Printing all books...\");\n dbmanager.open();\n ObservableList<Object> books = FXCollections.observableArrayList();\n\n try{\n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n dbmanager.incrementNextId(Integer.parseInt(splittedString[1]));\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jbook = new JSONObject(resultAttribute);\n\n Book book = new Book(jbook);\n \n book.setPublisher(dbmanager.getPmanager().read(jbook.getInt(\"publisher\")));\n \n JSONArray jauthors = jbook.getJSONArray(\"authors\");\n List<Author> authors = new ArrayList();\n for(int i=0; i<jauthors.length(); i++){\n \n int a=-1;\n a=jauthors.getInt(i);\n if(a>=0){ \n authors.add(dbmanager.getAmanager().read(a));\n }else{\n System.out.println(\"A book has mysterious author\"); \n }\n \n }\n \n book.setAuthors(authors);\n books.add(book);\n keyIterator.next();\n }\n }\n } catch(IOException e){\n e.printStackTrace();\n }\n dbmanager.close();\n return books;\n }", "public List<Book> getByAuthor(String name );", "List<Book> getAllBooks();", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Book> getAllBook() {\n\t\treturn entityManager.createQuery(\"from Book\").getResultList();\n\t}", "public List<Book> findAll() {\n return bookRepository.findAll();\n }", "@Override\r\n\tpublic List<Book> getBooks() {\n\t\treturn bd.findAll();\r\n\t}", "public static List<Book> retrieveAll( EntityManager em) {\n TypedQuery<Book> query = em.createQuery( \"SELECT b FROM Book b\", Book.class);\n List<Book> books = query.getResultList();\n System.out.println( \"Book.retrieveAll: \" + books.size()\n + \" books were loaded from DB.\");\n return books;\n }", "public List<Book> fetchAllBooks() {\n\t\treturn null;\n\t}", "List<String> loadAllUserNames();", "public void listBooks() {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price FROM books\";\n\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "List<Book> findAll();", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "public List<Book> findAll()\r\n\t{\r\n\t\tList<Book> booklist= null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSession();\r\n\t\t booklist=bookdao.findAll();\r\n\t\t\tbookdao.closeCurrentSession();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn booklist;\r\n\t}", "public void populateFilmListFromDatabase() throws SQLException {\r\n ArrayList<Film> films = this.film_database_controller.getFilms();\r\n\r\n for(Film current_film : films){\r\n this.addFilm(current_film);\r\n }\r\n }", "@Override\n\tpublic List<BookRequestVO> bookList(String bookName) {\n\t\treturn bookStorePersistDao.bookList(bookName);\n\t}", "public void loadSubjectName(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from SUbjects \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"SubjectName\");\n\t\t\t\t\tsubname.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n}", "public ArrayList<Book> getBooks()\n {\n ArrayList<Book> books = new ArrayList<>();\n String sql = \"SELECT [book_id]\\n\" +\n \" ,[book_title]\\n \" +\n \" ,[book_author]\\n\" +\n \" ,[book_publish_year]\\n\" +\n \" ,[book_category]\\n\" +\n \" ,[book_keyword]\\n\" +\n \" ,[book_status]\\n \" +\n \" FROM [lib_book_master]\";\n try {\n PreparedStatement statement = connection.prepareStatement(sql);\n ResultSet rs = statement.executeQuery();\n //cursor\n while(rs.next()) \n { \n int book_id = rs.getInt(\"book_id\");\n String book_title = rs.getString(\"book_title\");\n String book_author = rs.getString(\"book_author\");\n String book_publish_year = rs.getString(\"book_publish_year\");\n String book_category = rs.getString(\"book_category\");\n String book_keyword = rs.getString(\"book_keyword\");\n String book_status = rs.getString(\"book_status\");\n \n Book s = new Book(book_id,book_title, book_author, book_publish_year,book_category,book_keyword,book_status);\n books.add(s);\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(DBContext.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return books;\n }", "private void populateArtists(){\n try{\n Connection conn = DriverManager.getConnection(\n \"jdbc:sqlite:\\\\D:\\\\Programming\\\\Java\\\\Assignments\\\\CIS_452\\\\Music_Library\\\\album_library.sqlite\");\n Statement stmnt = conn.createStatement();\n ResultSet results = stmnt.executeQuery(\"SELECT artist_name FROM artist ORDER BY artist_name\");\n\n while(results.next()){\n String artist = results.getString(1);\n artistList.add(artist);\n }\n conn.close();\n } catch(SQLException e) {\n System.out.println(\"Error connecting to database: \" + e.getMessage());\n }\n }", "@FXML\n\t private void loadbookinfo(ActionEvent event) {\n\t \tclearbookcache();\n\t \t\n\t \tString id = bookidinput.getText();\n\t \tString qu = \"SELECT * FROM BOOK_LMS WHERE id = '\" + id + \"'\";\n\t ResultSet rs = dbhandler.execQuery(qu);\n\t Boolean flag = false;\n\t \n\t try {\n while (rs.next()) {\n String bName = rs.getString(\"title\");\n String bAuthor = rs.getString(\"author\");\n Boolean bStatus = rs.getBoolean(\"isAvail\");\n\n Bookname.setText(bName);\n Bookauthor.setText(bAuthor);\n String status = (bStatus) ? \"Available\" : \"Not Available\";\n bookstatus.setText(status);\n\n flag = true;\n }\n\n if (!flag) {\n Bookname.setText(\"No Such Book Available\");\n }\n\n } catch (SQLException ex) {\n Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public List<String > getBooks(){\n List<String> titles = new ArrayList<>();\n\n String strSQL = \"SELECT B._id, B.Title FROM TBooks B WHERE NOT B._id IN (Select TLoaned.TitleID \" +\n \" FROM TLoaned WHERE TLoaned.ReturnDate IS NULL);\";\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(strSQL, null);\n try {\n if (c.moveToFirst()) {\n do {\n titles.add(c.getString(0) + \". \" + c.getString(1));\n } while (c.moveToNext());\n }\n }\n finally {\n c.close();\n db.close();\n }\n return titles;\n }", "public void scandb_book_info(String table_name) {\n sql = \" SELECT * from \" + table_name + \";\";\n\n try {\n result = statement.executeQuery(sql);\n while (result.next()) {\n set_book_info(result.getInt(\"id\"), result.getString(\"name\"), result.getString(\"url\"));\n\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "@Override\n public List<Book> findBooks(SelectRequest selectRequest)\n throws DaoException {\n List<Book> foundBooks = new ArrayList<>();\n DataBaseHelper helper = new DataBaseHelper();\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statement = helper\n .prepareStatementFind(connection, selectRequest);\n ResultSet resultSet = statement.executeQuery()) {\n while (resultSet.next()) {\n BookCreator bookCreator = new BookCreator();\n Book book = bookCreator.create(resultSet);\n foundBooks.add(book);\n }\n } catch (SQLException e) {\n throw new DaoException(\"Error while reading database!\", e);\n }\n return foundBooks;\n }", "@Override\r\n\tpublic List<BookDto> getBookList(String storename) {\n\t\tList<BookDto> blist = sqlSession.selectList(ns + \"getBookList\", storename);\t\t\r\n\t\treturn blist;\r\n\t}", "private static void loadBooks() {\n\tbookmarks[2][0]=BookmarkManager.getInstance().createBook(4000,\"Walden\",\"\",1854,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][1]=BookmarkManager.getInstance().createBook(4001,\"Self-Reliance and Other Essays\",\"\",1900,\"Dover Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][2]=BookmarkManager.getInstance().createBook(4002,\"Light From Many Lamps\",\"\",1960,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][3]=BookmarkManager.getInstance().createBook(4003,\"Head First Design Patterns\",\"\",1944,\"Wilder Publications\",new String[] {\"Henry David Thoreau\"},\"Philosophy\",4.3);\n\tbookmarks[2][4]=BookmarkManager.getInstance().createBook(4004,\"Effective Java Programming Language Guide\",\"\",1990,\"Wilder Publications\",new String[] {\"Eric Freeman\",\"Bert Bates\",\"Kathy Sierra\",\"Elisabeth Robson\"},\"Philosophy\",4.3);\n}", "List<BookStoreElement> load(Reader reader);", "@SuppressWarnings(\"unchecked\")\n\tpublic Collection<Book> findAll() {\n\t\treturn entityManager.createQuery(\"SELECT b FROM Book b\").getResultList();\n\t}", "public java.util.List<com.huqiwen.demo.book.model.Books> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "private static boolean loadBooks() throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new FileReader(BOOKS_FILE));\n\t\tboolean error_loading = false; //stores whether there was an error loading a book\n\t\t\n\t\tString line = reader.readLine(); //read the properties of a book in the books.txt file\n\t\t/*read books.txt file, set the input for each BookDetails object and add each BookDetails object to the ALL_BOOKS Hashtable*/\n\t\twhile(line != null){\n\t\t\tBookDetails book = new BookDetails();\n\t\t\tString[] details = line.split(\"\\t\"); //the properties of each BookDetails object are separated by tab spaces in the books.txt file\n\t\t\tfor(int i = 0; i < details.length; i ++){\n\t\t\t\tif(!setBookInput(i, details[i], book)){ //checks if there was an error in setting the BookDetails object's properties with the values in the books.txt file\n\t\t\t\t\tSystem.out.println(\"ERROR Loading Books\");\n\t\t\t\t\terror_loading = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(error_loading) //if there was an error loading a book then stop the process of loading books\n\t\t\t\tbreak;\n\t\t\tALL_BOOKS.put(book.getBookId(), book); //add BookDetails object to ALL_BOOKS\n\t\t\taddToPublisherTable(book.getPublisher(), book.getBookTitle()); //add book's title to the ALL_PUBLISHERS Hashtable\n\t\t\taddToGenreTable(book, book.getBookTitle()); //add book's title to the ALL_GENRES ArrayList\n\t\t\taddToAuthorTable(book.getAuthor().toString(), book.getBookTitle()); //add book's title to the ALL_AUTHORS Hashtable\n\t\t\tline = reader.readLine(); \n\t\t}\n\t\treader.close();\n\t\t\n\t\tif(!error_loading){\n\t\t\tSystem.out.println(\"Loading Books - Complete!\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false; //error encountered while loading books\n\t}", "private void populateGenres(){\n try{\n Connection conn = DriverManager.getConnection(\n \"jdbc:sqlite:\\\\D:\\\\Programming\\\\Java\\\\Assignments\\\\CIS_452\\\\Music_Library\\\\album_library.sqlite\");\n Statement stmnt = conn.createStatement();\n ResultSet results = stmnt.executeQuery(\"SELECT DISTINCT genre FROM artist ORDER BY genre\");\n\n while(results.next()){\n String genre = results.getString(1);\n genreList.add(genre);\n }\n conn.close();\n } catch(SQLException e) {\n System.out.println(\"Error connecting to database: \" + e.getMessage());\n }\n }", "private void listAll() throws SQLException { \n\t\t List<SearchList> bookList = searchListDao.listAll();\n\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\",\"Id#\", \"Title\", \"Author\", \"Series\"); \n\t\t for (SearchList book : bookList) { \n\t\t\t System.out.printf(\"%-5s %-35s %-30s %-30s \\n\", book.getBookIdNum(), book.getTitle(), book.getAuthor(), book.getSeries());\n\t\t }\n\t }", "public void listBooksByAuthor(String name) {\n String sql = \"SELECT ISBN, BookName, AuthorName, Price \" +\n \"FROM books \" +\n \"WHERE AuthorName = ?\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n\n // Set values\n pstmt.setString(1, name);\n\n ResultSet rs = pstmt.executeQuery();\n\n // Print results\n while(rs.next()) {\n System.out.println(rs.getInt(\"ISBN\") + \"\\t\" +\n rs.getString(\"BookName\") + \"\\t\" +\n rs.getString(\"AuthorName\") + \"\\t\" +\n rs.getInt(\"Price\"));\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\n\tpublic List<BookInfoVO> findAll() {\n\t\treturn bookInfoDao.findAll();\n\t}", "public List<Book> getAllBooks()\n {\n List<Book> books = new LinkedList<Book>();\n\n //1. Query para la consulta\n String query = \"Select * FROM \"+ BookReaderContract.FeedBook.TABLE_NAME;\n\n //2. Obtener la referencia a la DB\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(query, null);\n\n //3. Recorrer el resultado y crear un objeto Book\n Book book = null;\n if(cursor.moveToFirst()){\n do{\n book = new Book();\n book.setId(Integer.parseInt(cursor.getString(0)));\n book.setTitle(cursor.getString(1));\n book.setAuthor(cursor.getString(2));\n books.add(book);\n }while(cursor.moveToNext());\n }\n Log.d(\"getAllBooks\",books.toString());\n return books;\n }", "private void getBookName(){\n db = DatabaseHelper.getInstance(this).getWritableDatabase();\n cursor = db.rawQuery(\"SELECT Name FROM Book WHERE _id = \"+bookIDSelected+\";\", null);\n startManagingCursor(cursor);\n String bookNameSelected = \"Failed to load Book Name\";\n while(cursor.moveToNext()){\n bookNameSelected = cursor.getString(0);\n }\n\n TextView txtBookTitle = findViewById(R.id.rvTxtName);\n txtBookTitle.setText(String.valueOf(bookNameSelected));\n }", "public List<Book> listBooks() {\n\t\tArrayList<Book> books = new ArrayList<>();\n\t\ttry (Connection con = LibraryConnection.getConnection()) {\n\t\t\tPreparedStatement stmt = con.prepareStatement(\"SELECT * FROM book\");\n\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tbooks.add(new Book(rs.getString(\"isbn\"), rs.getString(\"title\")));\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 books;\n\t}", "public Book load(String bid) {\n\t\treturn bookDao.load(bid);\r\n\t}", "@RequestMapping(value=\"/getbooks\", method=RequestMethod.GET, produces = \"application/json\")\n\tpublic List<Book> getAll() {\n\t\tList<Book> books = new ArrayList<>();\n\t\tbooks = bookDao.getAllFromDB();\n\t\t\n\t\treturn books;\n\t}", "public static List<Book> searchEBookByName(String name) throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n\r\n Query query = session.getNamedQuery(\"INVENTORY_searchBookByName\").setString(\"name\", name);\r\n\r\n List<Book> resultList = query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return resultList;\r\n \r\n }", "public Book[] retrieveBookName(String bkName) {\n\t\ttry {\r\n\t\t\treturn ((BorrowDAL)dal).getObjectbkName(bkName);\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 null;\r\n\t}", "public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VBook> fetchByTitle(java.lang.String... values) {\n\t\treturn fetch(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.TITLE, values);\n\t}", "public void loadList(String name){\n }", "public void loadLecturer2(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec2.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n}", "public void loadLecturer1(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Lecturers \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"LecturerName\");\n\t\t\t\t\tlec1.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\n}", "public Map<String, BookBean> retrieveAllBooks() throws SQLException {\r\n\t\tString query = \"select * from BOOK order by CATEGORY\";\t\t\r\n\t\tMap<String, BookBean> rv= new HashMap<String, BookBean>();\r\n\t\tPreparedStatement p = con.prepareStatement(query);\t\t\r\n\t\tResultSet r = p.executeQuery();\r\n\t\t\r\n\t\twhile(r.next()){\r\n\t\t\tString bid = r.getString(\"BID\");\r\n\t\t\tString title = r.getString(\"TITLE\");\r\n\t\t\tint price = r.getInt(\"PRICE\");\r\n\t\t\tString category = r.getString(\"CATEGORY\");\t\t\t\r\n\t\t\tBookBean s = new BookBean(bid, title, price,category);\t\t\t\r\n\t\t\trv.put(bid, s);\r\n\t\t}\r\n\t\tr.close();\r\n\t\tp.close();\r\n\t\treturn rv;\r\n\t\t}", "private void enterAll() {\n\n String sku = \"Java1001\";\n Book book1 = new Book(\"Head First Java\", \"Kathy Sierra and Bert Bates\", \"Easy to read Java workbook\", 47.50, true);\n bookDB.put(sku, book1);\n\n sku = \"Java1002\";\n Book book2 = new Book(\"Thinking in Java\", \"Bruce Eckel\", \"Details about Java under the hood.\", 20.00, true);\n bookDB.put(sku, book2);\n\n sku = \"Orcl1003\";\n Book book3 = new Book(\"OCP: Oracle Certified Professional Jave SE\", \"Jeanne Boyarsky\", \"Everything you need to know in one place\", 45.00, true);\n bookDB.put(sku, book3);\n\n sku = \"Python1004\";\n Book book4 = new Book(\"Automate the Boring Stuff with Python\", \"Al Sweigart\", \"Fun with Python\", 10.50, true);\n bookDB.put(sku, book4);\n\n sku = \"Zombie1005\";\n Book book5 = new Book(\"The Maker's Guide to the Zombie Apocalypse\", \"Simon Monk\", \"Defend Your Base with Simple Circuits, Arduino and Raspberry Pi\", 16.50, false);\n bookDB.put(sku, book5);\n\n sku = \"Rasp1006\";\n Book book6 = new Book(\"Raspberry Pi Projects for the Evil Genius\", \"Donald Norris\", \"A dozen friendly fun projects for the Raspberry Pi!\", 14.75, true);\n bookDB.put(sku, book6);\n }", "private ArrayList<Book> readBookCollection() {\n File file = new File(\"books.txt\");\n ArrayList<Book> collection = new ArrayList<Book>();\n try {\n FileReader fileReader = new FileReader(file);\n BufferedReader reader = new BufferedReader(fileReader);\n while (true) {\n String line = reader.readLine();\n if (line == null) break;\n line = line.trim();\n if (line.equals(\"\")) continue; // ignore possible blank lines\n String[] bookInfo = line.split(\" :: \");\n collection.add(new Book(bookInfo[0], bookInfo[1]));\n }\n }\n catch (IOException e) {\n System.out.println(e.getMessage());\n }\n return collection;\n }", "public List<BookBean> getBooklist() throws SQLException {\n\t\tList<BookBean> booklist = new ArrayList<BookBean>();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tConnection con = DbConnection.getConnection();\n\t\tString sql = \"select * from books\";\n\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);// 鏇存敼JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t\tps = con.prepareStatement(sql);\n\t\t\t\n\t\t\t\n\t\t\trs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tBookBean book1 = new BookBean();\n\t\t\t\tbook1.setBookid(rs.getString(\"bookid\"));\n\t\t\t\tbook1.setBookname(rs.getString(\"bookname\"));\n\t\t\t\tbook1.setAuthor(rs.getString(\"author\"));\n\t\t\t\tbook1.setCategoryid(rs.getString(\"categoryid\"));\n\t\t\t\tbook1.setPublishing(rs.getString(\"publishing\"));\n\t\t\t\tbook1.setPrice(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook1.setQuantityin(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook1.setQuantityout(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook1.setQuantityloss(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook1.setPicture(rs.getString(\"bookname\"));\n\t\t\t\tbooklist.add(book1);\n\t\t\t}\n\t\t\tcon.commit();//鎻愪氦JDBC浜嬪姟\n\t\t\tcon.setAutoCommit(true);// 鎭㈠JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tcon.rollback();//鍥炴粴JDBC浜嬪姟\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDbConnection.closeConnection(rs, ps, con);\n\t\t}\n\n\t\treturn booklist;\n\t}", "private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }", "public void loadTag(){ \n\t\t try {\n\n\t\t\t\tConnection con = DBConnection.connect();\n\n\t\t\t\tString query=\"select * from Tag \";\n\t\t\t\tPreparedStatement pst=con.prepareStatement(query);\n\t\t\t\tResultSet rs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tString name =rs.getString(\"relatedtag\");\n\t\t\t\t\ttag.addItem(name);\n\t\t\t\t\t \n\t\t\t\t}\n\n\t\t\t\tcon.close();\n\t\t\t}\n\t\t\tcatch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n}", "public void loadBookmarks() {\n // Set the WHERE clause\n mDbNodeHelper.setConditions(\"is_bookmarked\", \"1\");\n // Run the query.\n nodes = mDbNodeHelper.getNodeListData();\n // Flush the query builder properties.\n mDbNodeHelper.flushQuery();\n }", "public void read(String bookName, World world) {\n\t\tItem item = world.dbItems().get(bookName);\n\t\tList<Item> items = super.getItems();\n\n\t\tif (items.contains(item) && item instanceof Book) {\n\t\t\tBook book = (Book) item;\n\t\t\tSystem.out.println(book.getBookText());\n\t\t} else {\n\t\t\tSystem.out.println(\"No book called \" + bookName + \" in inventory.\");\n\t\t}\n\t}", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "private void loadBtechData()\r\n\t{\r\n\t\tlist.clear();\r\n\t\tString qu = \"SELECT * FROM BTECHSTUDENT\";\r\n\t\tResultSet result = databaseHandler.execQuery(qu);\r\n\r\n\t\ttry {// retrieve student information form database\r\n\t\t\twhile(result.next())\r\n\t\t\t{\r\n\t\t\t\tString studendID = result.getString(\"studentNoB\");\r\n\t\t\t\tString nameB = result.getString(\"nameB\");\r\n\t\t\t\tString studSurnameB = result.getString(\"surnameB\");\r\n\t\t\t\tString supervisorB = result.getString(\"supervisorB\");\r\n\t\t\t\tString emailB = result.getString(\"emailB\");\r\n\t\t\t\tString cellphoneB = result.getString(\"cellphoneNoB\");\r\n\t\t\t\tString courseB = result.getString(\"stationB\");\r\n\t\t\t\tString stationB = result.getString(\"courseB\");\r\n\r\n\t\t\t\tlist.add(new StudentProperty(studendID, nameB, studSurnameB,\r\n\t\t\t\t\t\tsupervisorB, emailB, cellphoneB, courseB, stationB));\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\t// Transfer the list data on the table\r\n\t\tstudentBTable.setItems(list);\r\n\t}", "public static String[] getAllNames(){\n int size = getCountofPeople();\n String[] names = new String[size];\n\n try (Connection con = DriverManager.getConnection(url, user, password)){\n String query = \"SELECT name FROM \"+DATABASE_NAME+\".People;\";\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(query);\n int i = 0;\n\n while (rs.next()) {\n names[i] = rs.getString(1);\n i++;\n }\n \n con.close();\n }catch (SQLException ex) {\n ex.printStackTrace();\n } \n\n return names;\n }", "public void loadData() {\n\t\tempsList.add(\"Pankaj\");\r\n\t\tempsList.add(\"Raj\");\r\n\t\tempsList.add(\"David\");\r\n\t\tempsList.add(\"Lisa\");\r\n\t}", "private static void addToAuthorTable(String author_name, String bookTitle) {\n\t\tif(ALL_AUTHORS.containsKey(author_name)) \n\t\t\tALL_AUTHORS.get(author_name).add(bookTitle);\n\t\t/*put author_name as a new key in ALL_AUTHORS*/\n\t\telse{\n\t\t\tHashSet<String> bookTitles_list = new HashSet<String>();\n\t\t\tbookTitles_list.add(bookTitle);\n\t\t\tALL_AUTHORS.put(author_name, bookTitles_list);\n\t\t}\n\t}", "public List<Books> findBooksByTitle(String title) {\r\n return bookController.findBooksByTitle(title);\r\n }", "@PostConstruct\n\t@Transactional\n\tpublic void fillData() {\n\t\n\t\tBookCategory progromming1 = new BookCategory(1,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming2 = new BookCategory(2,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming3 = new BookCategory(3,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming4 = new BookCategory(4,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming5 = new BookCategory(5,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming6 = new BookCategory(6,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming7 = new BookCategory(7,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming8 = new BookCategory(8,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming9 = new BookCategory(9,\"Programming\",new ArrayList<Book>());\n\t\tBookCategory programming10 = new BookCategory(10,\"Programming\",new ArrayList<Book>());\n\t\t\n\n\t\t\n\t\tbookCategoryRepository.save(progromming1);\n\t\tbookCategoryRepository.save(programming2);\n\t\tbookCategoryRepository.save(programming3);\n\t\tbookCategoryRepository.save(programming4);\n\t\tbookCategoryRepository.save(programming5);\n\t\tbookCategoryRepository.save(programming6);\n\t\tbookCategoryRepository.save(programming7);\n\t\tbookCategoryRepository.save(programming8);\n\t\tbookCategoryRepository.save(programming9);\n\t\tbookCategoryRepository.save(programming10);\n\t\t\n\t\tBook java = new Book(\n\t\t\t\t(long) 1,\"text-100\",\"Java Programming Language\",\n\t\t\t\t \"Master Core Java basics\",\n\t\t\t\t 754,\n\t\t\t\t \"assets/images/books/text-106.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogromming1\n\t\t);\n\t\tBook kotlin = new Book(\n\t\t\t\t(long) 2,\"text-101\",\"Kotlin Programming Language\",\n\t\t\t\t \"Learn Kotlin Programming Language\",\n\t\t\t\t 829,\n\t\t\t\t \"assets/images/books/text-102.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming2\n\t\t);\n\t\tBook python = new Book(\n\t\t\t\t(long) 3,\"text-102\",\"Python 9\",\n\t\t\t\t \"Learn Python Language\",\n\t\t\t\t 240,\n\t\t\t\t \"assets/images/books/text-103.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming3\n\t\t);\n\t\tBook cShap = new Book(\n\t\t\t\t(long) 4,\"text-103\",\"C#\",\n\t\t\t\t \"Learn C# Programming Language\",\n\t\t\t\t 490,\n\t\t\t\t \"assets/images/books/text-101.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming4\n\t\t);\n\t\tBook cpp = new Book(\n\t\t\t\t(long) 5,\"text-104\",\"C++\",\n\t\t\t\t \"Learn C++ Language\",\n\t\t\t\t 830,\n\t\t\t\t \"assets/images/books/text-110.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming5\n\t\t);\n\t\tBook dataStru = new Book(\n\t\t\t\t(long) 6,\"text-105\",\"Data Structure 3\",\n\t\t\t\t \"Learn Data Structures\",\n\t\t\t\t 560,\n\t\t\t\t \"assets/images/books/text-106.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming6\n\t\t);\n\t\tBook cprog = new Book(\n\t\t\t\t(long) 7,\"text-106\",\"C Programming\",\n\t\t\t\t \"Learn C Language\",\n\t\t\t\t 695,\n\t\t\t\t \"assets/images/books/text-100.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming7\n\t\t);\n\t\tBook crushInterview = new Book(\n\t\t\t\t(long) 3,\"text-102\",\"Coding Interview\",\n\t\t\t\t \"Crushing the Coding interview\",\n\t\t\t\t 600,\n\t\t\t\t \"assets/images/books/text-103.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming8\n\t\t);\n\t\tBook desing = new Book(\n\t\t\t\t(long) 859,\"text-102\",\"Design Parttens\",\n\t\t\t\t \"Learn Python Language\",\n\t\t\t\t 690,\n\t\t\t\t \"assets/images/books/text-105.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming9\n\t\t);\n\t\tBook machineLearn = new Book(\n\t\t\t\t(long) 9,\"text-102\",\"Python 3\",\n\t\t\t\t \"Learn Python Machine Learning with Python\",\n\t\t\t\t 416,\n\t\t\t\t \"assets/images/books/text-107.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming10\n\t\t);\n\t\tBook apiJava = new Book(\n\t\t\t\t(long) 10,\"text-102\",\"Practical API Design\",\n\t\t\t\t \"Java Framework Architect\",\n\t\t\t\t 540,\n\t\t\t\t \"assets/images/books/text-108.jpg\",\n\t\t\t\t true, 300,LocalDateTime.now(), null,\tprogramming8\n\t\t);\n\tbookRepository.save(java);\n\tbookRepository.save(kotlin);\n\tbookRepository.save(python);\n\tbookRepository.save(cpp);\n\tbookRepository.save(cprog);\n\tbookRepository.save(crushInterview);\n\tbookRepository.save(cShap);\n\tbookRepository.save(dataStru);\n\tbookRepository.save(desing);\n\tbookRepository.save(machineLearn);\n\tbookRepository.save(apiJava);\n\n\t}", "public void loadArtistsFromDB(Context context){\n if(context != null){\n this.artistList.clear();\n this.artistList_backup.clear();\n this.artistList.addAll(DBFolder.getInstance(context).getArtistList());\n this.artistList_backup.addAll(artistList);\n }\n }", "public List<String> load();", "public List<Cosa> findAllBooks() {\r\n\t\tList<Cosa> cosas = (List<Cosa>) jdbcTemplate.query(\r\n\t\t\t\t\"select * from persone\", new CosaRowMapper());\r\n\t\treturn cosas;\r\n\t}", "@Override\n\tpublic ObservableList<Book> read() {\n\t\tObservableList<Book> list=FXCollections.observableArrayList();\n\t\tString query=\"Select * from Book\";\n\t\tStatement statement;\n\t\tResultSet resultSet;\n\t\ttry {\n\t\t\tstatement=connection.createStatement();\n\t\t\tresultSet=statement.executeQuery(query);\n\t\t\tBook books;\n\t\t\twhile(resultSet.next()) {\n\t\t\t\tbooks=new Book(resultSet.getString(\"id\"),resultSet.getString(\"Title\"),resultSet.getString(\"Author\"),resultSet.getString(\"State\"));\n\t\t\t\tlist.add(books);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "private void initData() {\n Author steinbeck = new Author(\"John\", \"Steinbeck\");\n Publisher p1 = new Publisher(\"Covici Friede\", \"111 Main Street\", \"Santa Cruz\", \"CA\", \"95034\");\n Book omam = new Book(\"Of Mice And Men\", \"11234\", p1);\n \n publisherRepository.save(p1);\n\n steinbeck.getBooks().add(omam);\n omam.getAuthors().add(steinbeck);\n authorRepository.save(steinbeck);\n bookRepository.save(omam);\n\n // Create Crime & Punishment\n Author a2 = new Author(\"Fyodor\", \"Dostoevsky\");\n Publisher p2 = new Publisher( \"The Russian Messenger\", \"303 Stazysky Rao\", \"Rustovia\", \"OAL\", \"00933434-3943\");\n Book b2 = new Book(\"Crime and Punishment\", \"22334\", p2);\n a2.getBooks().add(b2);\n b2.getAuthors().add(a2);\n\n publisherRepository.save(p2);\n authorRepository.save(a2);\n bookRepository.save(b2);\n }", "@Override\n\tpublic List<Book> getAllBooks() {\n\t\treturn bookList;\n\t}", "public void loadQuestions() \n {\n try{\n ArrayList<QuestionPojo> questionList=QuestionDao.getQuestionByExamId(editExam.getExamId());\n for(QuestionPojo obj:questionList)\n {\n qstore.addQuestion(obj);\n }\n }\n catch(SQLException ex)\n {\n JOptionPane.showMessageDialog(null, \"Error while connecting to DB!\",\"Exception!\",JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n\n }\n }", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "public void loadList () {\r\n ArrayList<String> list = fileManager.loadWordList();\r\n if (list != null) {\r\n for (String s : list) {\r\n addWord(s);\r\n }\r\n }\r\n }", "public List<Player> loadAll() throws SQLException {\n\t\tfinal Connection connection = _database.getConnection();\n\t\tfinal String sql = \"SELECT * FROM \" + table_name + \" ORDER BY id ASC \";\n\t\tfinal List<Player> searchResults = listQuery(connection.prepareStatement(sql));\n\n\t\treturn searchResults;\n\t}", "private void populateYears(){\n try{\n Connection conn = DriverManager.getConnection(\n \"jdbc:sqlite:\\\\D:\\\\Programming\\\\Java\\\\Assignments\\\\CIS_452\\\\Music_Library\\\\album_library.sqlite\");\n Statement stmnt = conn.createStatement();\n ResultSet results = stmnt.executeQuery(\"SELECT DISTINCT year FROM album ORDER BY year\");\n\n while(results.next()){\n Integer year = results.getInt(1);\n yearList.add(year);\n }\n conn.close();\n } catch(SQLException e) {\n System.out.println(\"Error connecting to database: \" + e.getMessage());\n }\n }", "public static List<Person> loadTrainingSet(){\n List<Person> list_of_persons = new LinkedList<Person>();\n String[] names = getAllNames();\n\n try (Connection con = DriverManager.getConnection(url, user, password)){\n for(int i=0; i<names.length; i++){\n List<Histogram> histograms = new ArrayList<>();\n String query = \"SELECT h_json FROM \"+DATABASE_NAME+\".\"+names[i]+\";\";\n \n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(query);\n\n while (rs.next()) {\n Map<Integer, Integer> map = new HashMap<>();\n JSONObject obje = new JSONObject(rs.getString(1));\n for(int y=0; y<255; y++){\n map.put(y, (int)obje.get(\"\"+y));\n }\n histograms.add(new Histogram(map));\n }\n\n list_of_persons.add(new Person(names[i], histograms));\n }\n con.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n } \n\n return list_of_persons;\n }", "private void get_rooms() throws FileNotFoundException\n {\n Scanner room_all = new Scanner(new FileInputStream(db_rooms));\n room_all.nextLine();\n while(room_all.hasNextLine())\n {\n String [] searcher = (room_all.nextLine()).split(\"\\\"\");\n if(!searcher[7].equals(\"empty\"))\n data_set.add(new Room(searcher[3], searcher[5], (searcher[7].equals(\"booked\") ? 1 : 2), Integer.valueOf(searcher[1])));\n else\n data_set.add(new Room(Integer.valueOf(searcher[1])));\n }\n room_all.close();\n }", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "public List getBookList() throws SQLException {\n\t\treturn null;\n\t}", "public ArrayList<Book> gettitleBook(String title);", "@Override\n public List<School> importAllData(final String databaseName) {\n Connection connection = getConnection(databaseName);\n return querySchools(connection);\n }", "private void populateBooks() {\n\n PrintWriter out;\n try {\n out = new PrintWriter(\"books.txt\");\n String ISBN, title, publisher, publicationPlace, shelfNum;\n int cost, copyrightYear, subjectCounter = 0, shelfNumCounter = 0, floor = 1, aisle = 1, shelf = 1, isbnCounter = 0;\n\n for (int subject = 0; subject < 6; subject++) {\n for (int book = 0; book < 20; book++) {\n title = BOOKS[randomInt(0, BOOKS.length - 1)];\n copyrightYear = randomInt(1970, 2012);\n shelfNum = \"\";\n shelfNum += Integer.toString(floor);\n shelfNum += Integer.toString(aisle);\n shelfNum += Integer.toString(shelf);\n for (int edition = 1; edition < 4; edition++) {\n publisher = PUBLISHERS[randomInt(0,\n PUBLISHERS.length - 1)];\n publicationPlace = PUBLICATION_PLACES[randomInt(0,\n PUBLICATION_PLACES.length - 1)];\n cost = randomInt(10, 200);\n ISBN = \"\";\n ISBN += Integer.toString(subject) + \"-\";\n ISBN += String.format(\"%03d\", randomInt(0, 999)) + \"-\";\n ISBN += String.format(\"%05d\", isbnCounter++) + \"-\";\n ISBN += edition;\n out.println(\"INSERT INTO `4400`.`Book` (`isbn`, `title`, `cost`, `isReserved`, `edition`, `publisher`, `publicationPlace`, `copyrightYear`, `shelfNumber`, `subjectName`) VALUES \"\n + \"('\"\n + ISBN\n + \"', '\"\n + title\n + \"', '\"\n + cost\n + \"', '0', '\"\n + edition\n + \"', '\"\n + publisher\n + \"', '\"\n + publicationPlace\n + \"', '\"\n + copyrightYear\n + \"', '\"\n + shelfNum\n + \"', '\"\n + SUBJECTS[subject] + \"');\");\n copyrightYear++;\n }\n if (shelfNumCounter++ == 3) {\n shelfNumCounter = 0;\n if (shelf++ == 2) {\n shelf = 1;\n aisle++;\n\n }\n }\n }\n\n if (subjectCounter++ == 1) {\n subjectCounter = 0;\n floor++;\n aisle = 1;\n shelf = 1;\n }\n }\n System.out.println(\"RAN\");\n out.close();\n } catch (final FileNotFoundException e) {\n System.out.println(\"TEST\");\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public void loadBookList(java.util.List<LdPublisher> ls) {\r\n final ReffererConditionBookList reffererCondition = new ReffererConditionBookList() {\r\n public void setup(LdBookCB cb) {\r\n cb.addOrderBy_PK_Asc();// Default OrderBy for Refferer.\r\n }\r\n };\r\n loadBookList(ls, reffererCondition);\r\n }" ]
[ "0.7045303", "0.6428399", "0.63954043", "0.6232838", "0.6219205", "0.61774343", "0.61663747", "0.61458397", "0.6108368", "0.6076879", "0.6066756", "0.6061381", "0.6048748", "0.6046782", "0.6039218", "0.60023236", "0.60007113", "0.6000123", "0.59825885", "0.5963586", "0.5952665", "0.59401464", "0.5926748", "0.59182", "0.5909768", "0.5908657", "0.59048617", "0.5895259", "0.5891034", "0.5878606", "0.5847452", "0.58462465", "0.5836645", "0.5835325", "0.5818832", "0.58112955", "0.58007574", "0.5791175", "0.57551736", "0.5751056", "0.5742459", "0.5721022", "0.570863", "0.5705448", "0.56794554", "0.5664403", "0.56610537", "0.5660365", "0.5652671", "0.5639418", "0.563487", "0.5624784", "0.5622366", "0.5619577", "0.5617772", "0.5614131", "0.5610002", "0.56030655", "0.5600363", "0.55906796", "0.5584336", "0.55814046", "0.5580233", "0.55771005", "0.55641747", "0.5553868", "0.5550982", "0.5537236", "0.5533276", "0.5491624", "0.5480574", "0.54786474", "0.5474185", "0.5472116", "0.54675263", "0.5467524", "0.54670936", "0.5464379", "0.5441874", "0.5436578", "0.540564", "0.5395758", "0.5395226", "0.5385801", "0.5370759", "0.536641", "0.5362929", "0.53619254", "0.5349073", "0.53489083", "0.5328279", "0.53171754", "0.5315803", "0.5312385", "0.5299538", "0.5291618", "0.5279999", "0.52781564", "0.5272348", "0.52385813" ]
0.5856635
30
Load all Location in the database
public static List<Book> getBookLocation() throws HibernateException{ session = sessionFactory.openSession(); session.beginTransaction(); Query query=session.getNamedQuery("INVENTORY_getBookLocation"); List<Book> bookLocationList=query.list(); session.getTransaction().commit(); session.close(); return bookLocationList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void LoadingDatabaseGameLocation() {\n\n\t\tCursor cursor = helper.getDataAll(GamelocationTableName);\n\n\t\t// id_counter = cursor.getCount();\n\n\t\tGAME_LIST.clear();\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_GAME_LCOATION_COLUMN);\n\t\t\tString Description = cursor\n\t\t\t\t\t.getString(DESCRIPTION_GAME_LCOATION_COLUMN);\n\t\t\tString isGameVisited = cursor.getString(GAME_IS_VISITED_COLUMN);\n\n\t\t\tGAME_LIST.add(new gameLocation(ID, Description,\n\t\t\t\t\tisUsed(isGameVisited)));\n\t\t\t\n\t\t\tLog.d(TAG, \"game ID : \"+ ID);\n\t\t\t\n\t\t} // travel to database result\n\n\t}", "@Override\n\tprotected Cursor loadCursor() {\n\t\treturn DataManager.get().queryLocations();\n\t}", "@Override\n public List<Location> getAll() {\n\n List<Location> locations = new ArrayList<>();\n \n Query query = new Query(\"Location\");\n PreparedQuery results = ds.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n double lat = (double) entity.getProperty(\"lat\");\n double lng = (double) entity.getProperty(\"lng\");\n String title = (String) entity.getProperty(\"title\");\n String note = (String) entity.getProperty(\"note\");\n int voteCount = ((Long) entity.getProperty(\"voteCount\")).intValue();\n String keyString = KeyFactory.keyToString(entity.getKey()); \n // TODO: Handle situation when one of these properties is missing\n\n Location location = new Location(title, lat, lng, note, voteCount, keyString);\n locations.add(location);\n }\n return locations;\n }", "public static ArrayList<Location> GetAllLocations(){\n \n ArrayList<Location> Locations = new ArrayList<>();\n try ( \n Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM location\")){\n \n while(resultSet.next())\n {\n Location location = new Location();\n location.setCity(resultSet.getString(\"City\"));\n location.setCity(resultSet.getString(\"AirportCode\"));\n Locations.add(location);\n }\n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n return Locations;\n }", "private void LoadingDatabasePoolLocation() {\n\n\t\tCursor cursor = helper.getDataAll(PooltableName);\n\n\t\t// id_counter = cursor.getCount();\n\n\t\tPOOL_LIST.clear();\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_POOL_LCOATION_COLUMN);\n\t\t\tString Description = cursor\n\t\t\t\t\t.getString(DESCRIPTION_POOL_LCOATION_COLUMN);\n\t\t\tString isCouponUsed = cursor.getString(COUPON_IS_USED_COLUMN);\n\n\t\t\tPOOL_LIST.add(new poolLocation(ID, Description,\n\t\t\t\t\tisUsed(isCouponUsed), ThumbNailFactory.create()\n\t\t\t\t\t\t\t.getThumbNail(ID)));\n\n\t\t} // travel to database result\n\n\t}", "@Transactional\n\tpublic List<Location> listAllLocation() {\n\n\t\tCriteriaBuilder builder = getSession().getCriteriaBuilder();\n\t\tCriteriaQuery<Location> criteriaQuery = builder.createQuery(Location.class);\n\t\tRoot<Location> root = criteriaQuery.from(Location.class);\n\t\tcriteriaQuery.select(root);\n\t\tQuery<Location> query = getSession().createQuery(criteriaQuery);\n\n\t\t// query.setFirstResult((page - 1) * 5);\n\t\t// query.setMaxResults(5);\n\t\treturn query.getResultList();\n\t}", "private void loadLocations()\n {\n locationsPopUpMenu.getMenu().clear();\n\n ArrayList<String> locations = new ArrayList<>(locationDBManager.findSavedLocations());\n for (int i=0; i < locations.size(); i++)\n {\n locationsPopUpMenu.getMenu().add(locations.get(i));\n }\n }", "public void initArrayList()\n {\n\tSQLiteDatabase db = getWritableDatabase();\n\tCursor cursor = db.rawQuery(\"SELECT * FROM \" + TABLE_NAME, null);\n\n\tif (cursor.moveToFirst())\n\t{\n\t do\n\t {\n\t\tJacocDBLocation newLocation = new JacocDBLocation();\n\t\tnewLocation.setLocationName(cursor.getString(1));\n\t\tnewLocation.setRealLocation(new LocationBorder(new LatLng(cursor.getDouble(2), cursor.getDouble(3)), new LatLng(cursor.getDouble(4), cursor.getDouble(5))));\n\t\tnewLocation.setMapLocation(new LocationBorder(new LatLng(cursor.getInt(6), cursor.getInt(7)), new LatLng(cursor.getInt(8), cursor.getInt(9))));\n\t\tnewLocation.setHighSpectrumRange(cursor.getDouble(10));\n\t\tnewLocation.setLowSpectrumRange(cursor.getDouble(11));\n\n\t\t// adding the new Location to the collection\n\t\tlocationList.add(newLocation);\n\t }\n\t while (cursor.moveToNext()); // move to the next row in the DB\n\n\t}\n\tcursor.close();\n\tdb.close();\n }", "public List<PhotoLocation> loadSavedLocations(GoogleMap xMap) {\n List<PhotoLocation> list = mDb.locationModel().loadAllLocations();\n for (PhotoLocation each : list) {\n MarkerOptions m = new MarkerOptions();\n m.position(new LatLng(each.lat, each.lon));\n m.title(each.name);\n Marker marker = xMap.addMarker(m);\n marker.setTag(each.id);\n mMarkers.add(marker);\n }\n return list;\n }", "public Cursor getAllLocationsLoc(){\n if (mDB != null)\n return mDB.query(LOCNODE_TABLE, new String[] { FIELD_ROW_ID, FIELD_NAME, FIELD_ADDY, FIELD_LAT , FIELD_LNG, FIELD_TIMESVISITED }, null, null, null, null, null);\n Cursor c = null;\n return c;\n }", "public Cursor getAllLocations(){\n if (mDB != null)\n return mDB.query(DATABASE_TABLE, new String[] { FIELD_ROW_ID, FIELD_LAT , FIELD_LNG, FIELD_ACC, FIELD_TIME } , null, null, null, null, null);\n Cursor c = null;\n return c;\n }", "public void initializeLocations() {\n dataGraphLocation.setItems(FXCollections.observableArrayList(_locationData.getAll()));\n }", "@RequestMapping(value=\"/locations\", method=RequestMethod.GET)\n\t@ResponseBody\n\tpublic Iterable<Location> getLocations(){\n\t\treturn lr.findAll();\n\t}", "public Cursor getAllLocations()\n\t{\n\t\treturn db.query(DATABASE_TABLE, new String[] {\n\t\t\t\tKEY_DATE,KEY_LAT,KEY_LNG},\n\t\t\t\tnull,null,null,null,null);\n\t}", "public List<LocationInfo> getAllLocation() {\n return allLocation;\n }", "public void buildLocations() {\n try (PreparedStatement prep = Database.getConnection().prepareStatement(\n \"CREATE TABLE IF NOT EXISTS locations (id TEXT, latitude\"\n + \" REAL, longitude REAL, name TEXT, PRIMARY KEY (id));\")) {\n prep.executeUpdate();\n } catch (final SQLException exc) {\n exc.printStackTrace();\n }\n }", "@Test\n public void testGetAllLocations() {\n\n Location loc1 = new Location();\n loc1.setLocationName(\"The Basement\");\n loc1.setDescription(\"Underground\");\n loc1.setAddress(\"123 nunya Ave\");\n loc1.setCity(\"Cityville USA\");\n loc1.setLatitude(123.456);\n loc1.setLongitude(123.456);\n locDao.addLocation(loc1);\n\n Location loc2 = new Location();\n loc2.setLocationName(\"The Attic\");\n loc2.setDescription(\"Above ground\");\n loc2.setAddress(\"123 nunya Ave\");\n loc2.setCity(\"HamletTown USA\");\n loc2.setLatitude(654.321);\n loc2.setLongitude(654.321);\n locDao.addLocation(loc2);\n \n List<Location> locations = locDao.getAllLocations();\n \n assertEquals(2, locations.size());\n }", "public ArrayList< LocationHandler >getAllLocation (){\n\t\tArrayList< LocationHandler> locationList = new ArrayList< LocationHandler>();\n\t\tString selectQuery = \"SELECT * FROM \" + table_location + \" ORDER BY \" + key_date_entry; \n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tLocationHandler locationHandlerArray = new LocationHandler();\n\t\t\t\tlocationHandlerArray.setId(cursor.getInt(0)); \n\t\t\t\tlocationHandlerArray.setBase_id(cursor.getInt(1)); \n\t\t\t\tlocationHandlerArray.setDate_entry(cursor.getString(2)); \n\t\t\t\tlocationHandlerArray.setLongitude(cursor.getDouble(3)); \n\t\t\t\tlocationHandlerArray.setLatitude(cursor.getDouble(4)); \n\t\t\t\tlocationHandlerArray.setName(cursor.getString(5)); \n\t\t\t\tlocationHandlerArray.setType(cursor.getString(6)); \n\t\t\t\tlocationHandlerArray.setSearchTag(cursor.getString(7));\n\t\t\t\tlocationHandlerArray.setAmountables(cursor.getDouble(8));\n\t\t\t\tlocationHandlerArray.setDescription(cursor.getString(9));\n\t\t\t\tlocationHandlerArray.setBestSeller(cursor.getString(10));\n\t\t\t\tlocationHandlerArray.setWebsite(cursor.getString(11));\n\t\t\t\tlocationList.add(locationHandlerArray);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdb.close();\n\t\treturn locationList;\n\t}", "@GetMapping(\"/getAllLocation\")\n public ResponseEntity<List<LocationModel>> getAllLocation() {\n \n List<LocationModel> list = locationRepository.findAll();\n if (list.isEmpty()) {\n return new ResponseEntity<List<LocationModel>>(HttpStatus.NO_CONTENT);\n }\n return new ResponseEntity<List<LocationModel>>(list, HttpStatus.OK);\n }", "Collection<L> getLocations ();", "public List<FavoriteLocation> queryAllLocations() {\n\t\tArrayList<FavoriteLocation> fls = new ArrayList<FavoriteLocation>(); \n\t\tCursor c = queryTheCursorLocation(); \n\t\twhile(c.moveToNext()){\n\t\t\tFavoriteLocation fl = new FavoriteLocation();\n\t\t\tfl._id = c.getInt(c.getColumnIndex(\"_id\"));\n\t\t\tfl.description = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_DES));\n\t\t\tfl.latitude = c.getDouble(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_GEO_LAT));\n\t\t\tfl.longitude = c.getDouble(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_GEO_LON));\n\t\t\tfl.street_info = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_STREET));\n\t\t\tfl.type = c.getInt(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_CATEGORY));\n\t\t\tbyte[] image_byte = c.getBlob(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_PIC)); \n\t\t\tfl.image = BitmapArrayConverter.convertByteArrayToBitmap(image_byte);\n\t\t\tfl.title = c.getString(c.getColumnIndex(DBEntryContract.LocationEntry.COLUMN_NAME_TITLE));\n\t\t\tfls.add(fl);\n\t\t}\n\t\t// close the cursor\n\t\tc.close();\n\t\treturn fls;\n\t}", "LiveData<List<Location>> getAllLocations() {\n return mAllLocations;\n }", "private void loadLocation() {\n\r\n\t\t_stateItems = new ArrayList<DropDownItem>();\r\n\t\t_stateAdapter = new DropDownAdapter(getActivity(), _stateItems);\r\n\t\tspin_state.setAdapter(_stateAdapter);\r\n\r\n\t\t_cityItems = new ArrayList<DropDownItem>();\r\n\t\t_cityAdapter = new DropDownAdapter(getActivity(), _cityItems);\r\n\t\tspin_city.setAdapter(_cityAdapter);\r\n\r\n\t\t_locationItems = new ArrayList<DropDownItem>();\r\n\t\t_locationAdapter = new DropDownAdapter(getActivity(), _locationItems);\r\n\t\tspin_location.setAdapter(_locationAdapter);\r\n\r\n\t\tnew StateAsync().execute(\"\");\r\n\r\n\t}", "@Test\n\tpublic void listLocations(){\n\t\tList<Location> lists = locationService.queryLoctionsByLat(29.8679775, 121.5450105);\n\t\t//System.out.println(lists.size()) ;\n\t\tfor(Location loc : lists){\n\t\t\tSystem.out.println(loc.getAddress_cn());\n\t\t}\n\t}", "public void loadInitialData() {\n\t\t\texecuteTransaction(new Transaction<Boolean>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Boolean execute(Connection conn) throws SQLException {\n\t\t\t\t\tList<Item> inventory;\n\t\t\t\t\tList<Location> locationList;\n\t\t\t\t\tList<User> userList;\n\t\t\t\t\tList<JointLocations> jointLocationsList;\n\t\t\t\t\t//List<Description> descriptionList; \n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinventory = InitialData.getInventory();\n\t\t\t\t\t\tlocationList = InitialData.getLocations(); \n\t\t\t\t\t\tuserList = InitialData.getUsers();\n\t\t\t\t\t\tjointLocationsList = InitialData.getJointLocations();\n\t\t\t\t\t\t//descriptionList = //InitialData.getDescriptions();\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tthrow new SQLException(\"Couldn't read initial data\", e);\n\t\t\t\t\t}\n\n\t\t\t\t\tPreparedStatement insertItem = null;\n\t\t\t\t\tPreparedStatement insertLocation = null; \n\t\t\t\t\tPreparedStatement insertUser = null;\n\t\t\t\t\tPreparedStatement insertJointLocations = null;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// AD: populate locations first since location_id is foreign key in inventory table\n\t\t\t\t\t\tinsertLocation = conn.prepareStatement(\"insert into locations (description_short, description_long) values (?, ?)\" );\n\t\t\t\t\t\tfor (Location location : locationList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertLocation.setString(1, location.getShortDescription());\n\t\t\t\t\t\t\tinsertLocation.setString(2, location.getLongDescription());\n\t\t\t\t\t\t\tinsertLocation.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertLocation.executeBatch(); \n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertJointLocations = conn.prepareStatement(\"insert into jointLocations (fk_location_id, location_north, location_south, location_east, location_west) values (?, ?, ?, ?, ?)\" );\n\t\t\t\t\t\tfor (JointLocations jointLocations: jointLocationsList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinsertJointLocations.setInt(1, jointLocations.getLocationID());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(2, jointLocations.getLocationNorth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(3, jointLocations.getLocationSouth());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(4, jointLocations.getLocationEast());\n\t\t\t\t\t\t\tinsertJointLocations.setInt(5, jointLocations.getLocationWest());\n\t\t\t\t\t\t\tinsertJointLocations.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertJointLocations.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertItem = conn.prepareStatement(\"insert into inventory (location_id, item_name) values (?, ?)\");\n\t\t\t\t\t\tfor (Item item : inventory) \n\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t// Auto generate itemID\n\t\t\t\t\t\t\tinsertItem.setInt(1, item.getLocationID());\n\t\t\t\t\t\t\tinsertItem.setString(2, item.getName());\n\t\t\t\t\t\t\tinsertItem.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertItem.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tinsertUser = conn.prepareStatement(\"insert into users (username, password) values (?, ?)\");\n\t\t\t\t\t\tfor(User user: userList) {\n\t\t\t\t\t\t\tinsertUser.setString(1, user.getUsername());\n\t\t\t\t\t\t\tinsertUser.setString(2, user.getPassword());\n\t\t\t\t\t\t\tinsertUser.addBatch();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinsertUser.executeBatch();\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"Tables populated\");\n\t\t\t\t\t\t\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tDBUtil.closeQuietly(insertLocation);\t\n\t\t\t\t\t\tDBUtil.closeQuietly(insertItem);\n\t\t\t\t\t\tDBUtil.closeQuietly(insertUser);\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "@FXML\n void loadComboBoxLocationValues() {\n ArrayList<Location> locations = LocationDAO.LocationSEL(-1);\n comboBoxLocation.getItems().clear();\n if (!locations.isEmpty())\n for (Location location : locations) {\n comboBoxLocation.getItems().addAll(location.getLocationID());\n }\n }", "private void getLocations() {\n TripSave tripSave = TripHelper.tripOngoing();\n if (tripSave != null) {\n for (LocationSave locationSave : tripSave.getLocations()) {\n if (locationSave != null) {\n tripTabFragment.drawPolyLine(new LatLng(locationSave.getLatitude(), locationSave.getLongitude()));\n }\n }\n }\n }", "private void setLocation(){\r\n\t\t//make the sql command\r\n\t\tString sqlCmd = \"INSERT INTO location VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"');\";\r\n\r\n\t\ttry {//start SQL statement\r\n\t\t\tstmt.executeUpdate(sqlCmd);\r\n\t\t} catch (SQLException e) {\r\n\t\t\terror = true;\r\n\t\t\tout.println(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");\r\n\t}", "public void loadList() {\n // Run the query.\n nodes = mDbNodeHelper.getNodeListData();\n }", "@SuppressWarnings({\"unchecked\"})\n private void loadDataFromOSM() {\n try {\n System.out.println(\">> Attempting to load data from OSM database...\");\n // Load JDBC driver and establish connection\n Class.forName(\"org.postgresql.Driver\");\n String url = \"jdbc:postgresql://localhost:5432/osm_austria\";\n mConn = DriverManager.getConnection(url, \"geo\", \"geo\");\n // Add geometry types to the connection\n PGConnection c = (PGConnection) mConn;\n c.addDataType(\"geometry\", (Class<? extends PGobject>) Class.forName(\"org.postgis.PGgeometry\"));\n c.addDataType(\"box2d\", (Class<? extends PGobject>) Class.forName(\"org.postgis.PGbox2d\"));\n\n // Create statement and execute query\n Statement s = mConn.createStatement();\n\n // Get boundary types\n String query = \"SELECT * FROM boundary_area AS a WHERE a.type IN (8001,8002,8003,8004);\";\n executeSQL(query, s);\n\n query = \"SELECT * FROM landuse_area AS a WHERE a.type IN (5001, 5002);\";\n executeSQL(query, s);\n\n /* // Get landuse types\n\n r = s.executeQuery(query);\n\n while (r.next()) {\n String id = r.getString(\"id\");\n int type = r.getInt(\"type\");\n PGgeometry geom = (PGgeometry) r.getObject(\"geom\");\n\n switch (geom.getGeoType()) {\n case Geometry.POLYGON:\n String wkt = geom.toString();\n org.postgis.Polygon p = new org.postgis.Polygon(wkt);\n if (p.numRings() >= 1) {\n Polygon poly = new Polygon();\n LinearRing ring = p.getRing(0);\n for (int i = 0; i < ring.numPoints(); i++) {\n org.postgis.Point pPG = ring.getPoint(i);\n poly.addPoint((int) pPG.x, (int) pPG.y);\n }\n mObjects.add(new GeoObject(id, type, poly));\n }\n break;\n default:\n break;\n }\n }\n\n // Get natural types\n query = \"SELECT * FROM natural_area AS a WHERE a.type IN (6001, 6002, 6005);\";\n\n r = s.executeQuery(query);\n\n while (r.next()) {\n String id = r.getString(\"id\");\n int type = r.getInt(\"type\");\n PGgeometry geom = (PGgeometry) r.getObject(\"geom\");\n\n switch (geom.getGeoType()) {\n case Geometry.POLYGON:\n String wkt = geom.toString();\n org.postgis.Polygon p = new org.postgis.Polygon(wkt);\n if (p.numRings() >= 1) {\n Polygon poly = new Polygon();\n LinearRing ring = p.getRing(0);\n for (int i = 0; i < ring.numPoints(); i++) {\n org.postgis.Point pPG = ring.getPoint(i);\n poly.addPoint((int) pPG.x, (int) pPG.y);\n }\n mObjects.add(new GeoObject(id, type, poly));\n }\n break;\n default:\n break;\n }\n }\n */\n\n s.close();\n mConn.close();\n } catch (Exception _e) {\n System.out.println(\">> Loading data failed!\\n\" + _e.toString());\n }\n\n }", "@Override\n public ArrayList<GeoDataRecordObj> getAllGeoData() {\n if(allGeoData == null) {\n this.reloadData();\n }\n return allGeoData;\n }", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "public Set<Location> get_all_locations() {\n Set<Location> locations = new HashSet<Location>();\n try {\n Object obj = JsonUtil.getInstance().getParser().parse(this.text);\n JSONObject jsonObject = (JSONObject) obj;\n JSONArray array = (JSONArray) jsonObject.get(\"pictures\");\n Iterator<String> iterator = array.iterator();\n while (iterator.hasNext()) {\n locations.add(new Location(iterator.next()));\n }\n return locations;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "private void fillCitiesTable() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement();\n ResultSet rs = statement.executeQuery(INIT.GET_CITY.toString())) {\n if (!rs.next()) {\n try (PreparedStatement ps = connection.prepareStatement(INIT.FILL_CITIES.toString())) {\n connection.setAutoCommit(false);\n ParseSiteForCities parse = new ParseSiteForCities();\n for (City city : parse.parsePlanetologDotRu()) {\n ps.setString(1, city.getCountry());\n ps.setString(2, city.getCity());\n ps.addBatch();\n }\n ps.executeBatch();\n connection.commit();\n connection.setAutoCommit(true);\n }\n }\n\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }", "public ArrayList< LocationInfoHandler >getAllLocationInfo (){\n\t\tArrayList< LocationInfoHandler> locationInfoList = new ArrayList< LocationInfoHandler>();\n\t\tString selectQuery = \"SELECT * FROM \" + table_locationInfo + \" ORDER BY \" + key_date_entry; \n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tLocationInfoHandler locationInfoHandlerArray = new LocationInfoHandler();\n\t\t\t\tlocationInfoHandlerArray.setId(cursor.getInt(0)); \n\t\t\t\tlocationInfoHandlerArray.setBase_id(cursor.getInt(1)); \n\t\t\t\tlocationInfoHandlerArray.setDate_entry(cursor.getString(2)); \n\t\t\t\tlocationInfoHandlerArray.setContent(cursor.getString(3)); \n\t\t\t\tlocationInfoHandlerArray.setTitle(cursor.getString(4)); \n\t\t\t\tlocationInfoHandlerArray.setLocation_id(cursor.getInt(5)); \n\t\t\t\tlocationInfoHandlerArray.setImage(convertToBitmap(cursor.getBlob(6))); \n\t\t\t\tlocationInfoList.add(locationInfoHandlerArray);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdb.close();\n\t\treturn locationInfoList;\n\t}", "private void readLocations(List<Element> locationElements,\n Model model)\n throws ObjectExistsException {\n // Add the locations.\n for (int i = 0; i < locationElements.size(); i++) {\n Element curLocationElement = locationElements.get(i);\n Integer locID;\n try {\n locID = Integer.valueOf(curLocationElement.getAttributeValue(\"id\"));\n }\n catch (NumberFormatException e) {\n locID = null;\n }\n String typeName = curLocationElement.getAttributeValue(\"type\");\n if (typeName == null || typeName.isEmpty()) {\n typeName = \"LocationType\" + i + \"Unknown\";\n }\n TCSObjectReference<LocationType> typeRef\n = model.getLocationType(typeName).getReference();\n Location curLocation = model.createLocation(locID, typeRef);\n TCSObjectReference<Location> locRef = curLocation.getReference();\n String locName = curLocationElement.getAttributeValue(\"name\");\n if (locName == null || locName.isEmpty()) {\n locName = \"LocationName\" + i + \"Unknown\";\n }\n model.getObjectPool().renameObject(locRef, locName);\n // Set position.\n Triple position = new Triple();\n String attrVal;\n attrVal = curLocationElement.getAttributeValue(\"xPosition\");\n if (attrVal != null) {\n position.setX(Long.parseLong(attrVal));\n }\n attrVal = curLocationElement.getAttributeValue(\"yPosition\");\n if (attrVal != null) {\n position.setY(Long.parseLong(attrVal));\n }\n attrVal = curLocationElement.getAttributeValue(\"zPosition\");\n if (attrVal != null) {\n position.setZ(Long.parseLong(attrVal));\n }\n model.setLocationPosition(locRef, position);\n // Add links.\n List<Element> linkElements = curLocationElement.getChildren(\"link\");\n for (int j = 0; j < linkElements.size(); j++) {\n Element curLinkElement = linkElements.get(j);\n String pointName = curLinkElement.getAttributeValue(\"point\");\n if (pointName == null || pointName.isEmpty()) {\n pointName = \"PointName\" + j + \"Unknown\";\n }\n TCSObjectReference<Point> pointRef\n = model.getPoint(pointName).getReference();\n model.connectLocationToPoint(locRef, pointRef);\n List<Element> allowedOpElements\n = curLinkElement.getChildren(\"allowedOperation\");\n for (Element curOpElement : allowedOpElements) {\n String allowedOp = curOpElement.getAttributeValue(\"name\", \"NOP\");\n model.addLocationLinkAllowedOperation(locRef, pointRef, allowedOp);\n }\n }\n List<Element> properties = curLocationElement.getChildren(\"property\");\n for (int m = 0; m < properties.size(); m++) {\n Element curPropElement = properties.get(m);\n String curKey = curPropElement.getAttributeValue(\"name\");\n if (curKey == null || curKey.isEmpty()) {\n curKey = \"Key\" + m + \"Unknown\";\n }\n String curValue = curPropElement.getAttributeValue(\"value\");\n if (curValue == null || curValue.isEmpty()) {\n curValue = \"Value\" + m + \"Unknown\";\n }\n model.getObjectPool().setObjectProperty(locRef, curKey, curValue);\n }\n }\n\n }", "private void loadLocation(Location location, ResultSet resultSet, int index) throws SQLException {\n\t\t\tlocation.setLocationID(resultSet.getInt(index++));\n\t\t\tlocation.setLongDescription(resultSet.getString(index++));\n\t\t\tlocation.setShortDescription(resultSet.getString(index++));\n\t\t}", "private void saveLocations(){\n\n final LocationsDialog frame = this;\n WorkletContext context = WorkletContext.getInstance();\n\n LocationsTableModel model = (LocationsTableModel) locationsTable.getModel();\n final HashMap<Integer, Location> dirty = model.getDirty();\n\n\n for(Integer id : dirty.keySet()) {\n Location location = dirty.get(id);\n\n\n if (!Helper.insert(location, \"Locations\", context)) {\n System.out.print(\"insert failed!\");\n }\n\n }// end for\n\n model.refresh();\n\n }", "private void loadLists() {\n loadSavedCourses();\n loadSavedSchedules();\n }", "private void loadAddresses() {\n\t\ttry {\n\t\t\torg.hibernate.Session session = sessionFactory.getCurrentSession();\n\t\t\tsession.beginTransaction();\n\t\t\taddresses = session.createCriteria(Address.class).list();\n\t\t\tsession.getTransaction().commit();\n\t\t\tSystem.out.println(\"Retrieved addresses from database:\"\n\t\t\t\t\t+ addresses.size());\n\t\t} catch (Throwable ex) {\n\t\t\tSystem.err.println(\"Can't retrieve address!\" + ex);\n\t\t\tex.printStackTrace();\n\t\t\t// Initialize the message queue anyway\n\t\t\tif (addresses == null) {\n\t\t\t\taddresses = new ArrayList<Address>();\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<LocationDetail> getLocations() throws LocationException;", "@Override\n\t@Transactional\n\n\tpublic void initPlaces() {\n\t\tsalleRepository.findAll().forEach(salle->{\n\t\t\tfor(int i=0;i<salle.getNombrePlace();i++) {\n\t\t\tPlace place=new Place();\n\t\t\tplace.setNumero(i+1);\n\t\t\tplace.setSalle(salle);\n\t\t\tplaceRepository.save(place);\n\t\t\t}\n\t\t\t});\n\t}", "public abstract void loadFromDatabase();", "void countries_init() throws SQLException {\r\n countries = DatabaseQuerySF.get_all_stations();\r\n }", "private void populateMap() {\n DatabaseHelper database = new DatabaseHelper(this);\n Cursor cursor = database.getAllDataForScavengerHunt();\n\n //database.updateLatLng(\"Gym\", 34.181243783767364, -117.31866795569658);\n\n while (cursor.moveToNext()) {\n double lat = cursor.getDouble(cursor.getColumnIndex(database.COL_LAT));\n double lng = cursor.getDouble(cursor.getColumnIndex(database.COL_LONG));\n int image = database.getImage(cursor.getString(cursor.getColumnIndex(database.COL_LOC)));\n\n //Log.i(\"ROW\", R.drawable.library + \"\");\n LatLng coords = new LatLng(lat, lng);\n\n GroundOverlayOptions overlayOptions = new GroundOverlayOptions()\n .image(BitmapDescriptorFactory.fromResource(image))\n .position(coords, 30f, 30f);\n\n mMap.addGroundOverlay(overlayOptions);\n }\n }", "@GetMapping(path=\"/all\")\n public @ResponseBody Iterable<driverlocation> getAllUsers() {\n return locationRepository.findAll();\n }", "LocationsClient getLocations();", "public InstitutionBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM institution\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "@PostConstruct\n public void loaddata() throws IOException {\n File file = ResourceUtils.getFile(configProvider.getFilePath());\n Reader in = new FileReader(file.getPath());\n Iterable<CSVRecord> records = CSVFormat.RFC4180.withHeader(\n \"locationid\", \"Applicant\", \"FacilityType\", \"cnn\", \"LocationDescription\", \"Address\", \"blocklot\", \"block\", \"lot\",\n \"permit\", \"Status\", \"FoodItems\", \"X\", \"Y\", \"Latitude\", \"Longitude\", \"Schedule\",\n \"dayshours\", \"NOISent\", \"Approved\", \"Received\", \"PriorPermit\", \"ExpirationDate\",\n \"Location\", \"Fire Prevention Districts\", \"Police Districts\",\n \"Supervisor Districts\", \"Zip Codes\", \"Neighborhoods (old)\"\n ).parse(in);\n\n Iterator<CSVRecord> iterator = records.iterator();\n iterator.next();\n // use our own ids because of how atomic integers work, we can't have a 0 for an id, so can't rely on outside sources.\n int i = 0;\n while (iterator.hasNext()) {\n CSVRecord record = iterator.next();\n FoodTruck truck = new FoodTruck(Float.parseFloat(record.get(\"Latitude\")), Float.parseFloat(record.get(\"Longitude\")),\n record.get(\"Address\"), record.get(\"FoodItems\"), ++i);\n //add food truck to datastore\n truckDataStore.addTruck(truck.getId(), truck);\n\n final Rectangle rect = new Rectangle(truck.getLat(), truck.getLon(),\n truck.getLat(), truck.getLon());\n //add food truck location + id to location data store.\n locationDataStore.getSpatialIndex().add(rect, truck.getId());\n }\n }", "@GetMapping(\"/locations\")\n public List<Location> getLocations(){\n return service.getAll();\n }", "public ArrayList< SubLocationHandler >getAllSubLocation (){\n\t\tArrayList< SubLocationHandler> subLocationList = new ArrayList< SubLocationHandler>();\n\t\tString selectQuery = \"SELECT * FROM \" + table_subLocation + \" ORDER BY \" + key_date_entry; \n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tSubLocationHandler subLocationHandlerArray = new SubLocationHandler();\n\t\t\t\tsubLocationHandlerArray.setId(cursor.getInt(0)); \n\t\t\t\tsubLocationHandlerArray.setBase_id(cursor.getInt(1)); \n\t\t\t\tsubLocationHandlerArray.setDate_entry(cursor.getString(2)); \n\t\t\t\tsubLocationHandlerArray.setName(cursor.getString(3)); \n\t\t\t\tsubLocationHandlerArray.setLongitude(cursor.getDouble(4)); \n\t\t\t\tsubLocationHandlerArray.setLatitude(cursor.getDouble(5)); \n\t\t\t\tsubLocationHandlerArray.setLocation_id(cursor.getInt(6)); \n\t\t\t\tsubLocationList.add(subLocationHandlerArray);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdb.close();\n\t\treturn subLocationList;\n\t}", "@Override\n\tpublic List<Historic_siteVO> MainLocation() throws Exception {\n\t\treturn dao.MainLocation();\n\t}", "List<String> locations();", "public static GlobalStates getStatesFromAllLocations()\n {\n GlobalStates globalStates = new GlobalStates();\n try {\n\n List<LocalStates> compileRes = new ArrayList<>();\n getLocationIds().getLocationIds().forEach(\n (locn) -> {\n LocalStates ls = new LocalStates();\n StateVariables sv = IoTGateway.getGlobalStates().get(locn);\n ls.setLocation(locn);\n ls.setStateVariable(sv);\n ls.setFire(IoTGateway.getIsFireLocn().get(locn));\n ls.setSmokeAlert(IoTGateway.getSmokeWarn().get(locn));\n compileRes.add(ls);\n\n }\n );\n globalStates.setLocalStates(compileRes);\n }\n catch (NullPointerException npe)\n {\n LOGGER.error(\"Null Pointer Exception at Horizon.Restart project and open browser after atleast one timestep\");\n }\n return globalStates;\n }", "public ArrayList getLocations()\r\n\t\t{\r\n\t\t\treturn locations;\r\n\t\t}", "public synchronized static List<Store> loadStoresNotAffectToLocation(Connection c) throws SQLException {\r\n //list of shop\r\n List<Store> listShop = new ArrayList<>();\r\n Statement myStmt = c.createStatement();\r\n //The query which selects all the shops.\r\n ResultSet myRs = myStmt.executeQuery(\"select * from magasin where idMagasin not in (select Magasin_idMagasin from emplacement_has_magasin)\");\r\n //Loop which add a shop to the list.\r\n while (myRs.next()) {\r\n int id = myRs.getInt(\"idMagasin\");\r\n String designation = myRs.getString(\"designation\");\r\n String description = myRs.getString(\"description\");\r\n int loyer = myRs.getInt(\"loyer\");\r\n int surface = myRs.getInt(\"superficie\");\r\n int niveau = myRs.getInt(\"niveau\");\r\n String localisation = myRs.getString(\"localisation\");\r\n //liste type \r\n Statement myStmt2 = c.createStatement();\r\n //The query which selects all the shops.\r\n ResultSet myRs2 = myStmt2.executeQuery(\"SELECT designation,idType from magasin_has_type,type where magasin_has_type.type_idType=type.idType and magasin_has_type.magasin_idMagasin=\" + id);\r\n List<TypeStore> list = new ArrayList<>();\r\n while (myRs2.next()) {\r\n int idtype = myRs2.getInt(\"idType\");\r\n String designationType = myRs2.getString(\"designation\");\r\n TypeStore T = new TypeStore(idtype, designationType);\r\n list.add(T);\r\n }\r\n Store M = new Store(id, designation, description, loyer, surface, niveau, localisation, list);\r\n\r\n listShop.add(M);\r\n }\r\n myStmt.close();\r\n return listShop;\r\n\r\n }", "public List<EntityPropertyLocation> find();", "public abstract Location[] retrieveLocation();", "@Override\r\n\tpublic void loadData() {\r\n\t\t// Get Session\r\n\r\n\t\tSession ses = HibernateUtil.getSession();\r\n\r\n\t\tQuery query = ses.createQuery(\"FROM User\");\r\n\r\n\t\tList<User> list = null;\r\n\t\tSet<PhoneNumber> phone = null;\r\n\t\tlist = query.list();\r\n\t\tfor (User u : list) {\r\n\t\t\tSystem.out.println(\"Users are \" + u);\r\n\t\t\t// Getting phones for for a particular user Id\r\n\t\t\tphone = u.getPhone();\r\n\t\t\tfor (PhoneNumber ph : phone) {\r\n\t\t\t\tSystem.out.println(\"Phones \" + ph);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "static public void set_location_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"location name:\", \"rating:\", \"population:\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\n\t\t\t\t\" select distinct c.`id`, c.`name`, c.`area (1000 km^2)`, c.`GDP per capita (1000 $)`, \" +\n\t\t\t\t\t\t\t\t\"c.`population (million)`, c.`capital`, c.`GDP (billion $)` \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_places_countries c, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_places_location_country lc \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where lc.country_id=c.id and lc.location_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by c.`GDP (billion $)` desc \";\n\t\t\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct c.`id`, c.`name`, c.`area (1000 km^2)`, c.`GDP per capita (1000 $)`, \" +\n\t\t\t\t\" c.`population (million)`, c.`capital`, c.`GDP (billion $)` \" +\n\t\t\t\t\" from curr_places_countries c \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id:\", \"country name:\", \"area (1000 km^2):\", \"GDP per capita (1000 $):\",\n\t\t\t\t\"population (million):\", \"capital:\", \"GDP (billion $):\"};\n\t\tEdit_row_window.label_min_parameter=\"min. population:\";\n\t\tEdit_row_window.linked_category_name = \"COUNTRIES\";\n\t}", "public void loadAllUserData(){\n\n }", "public ArrayList< LocationTypeHandler >getAllLocationType (){\n\t\tArrayList< LocationTypeHandler> locationTypeList = new ArrayList< LocationTypeHandler>();\n\t\tString selectQuery = \"SELECT * FROM \" + table_locationType + \" ORDER BY \" + key_date_entry; \n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tLocationTypeHandler locationTypeHandlerArray = new LocationTypeHandler();\n\t\t\t\tlocationTypeHandlerArray.setId(cursor.getInt(0)); \n\t\t\t\tlocationTypeHandlerArray.setBase_id(cursor.getInt(1)); \n\t\t\t\tlocationTypeHandlerArray.setDate_entry(cursor.getString(2)); \n\t\t\t\tlocationTypeHandlerArray.setImage_resource(convertToBitmap(cursor.getBlob(3))); \n\t\t\t\tlocationTypeHandlerArray.setImage_url(cursor.getString(4)); \n\t\t\t\tlocationTypeHandlerArray.setName(cursor.getString(5)); \n\t\t\t\tlocationTypeHandlerArray.setBg_color(cursor.getString(6)); \n\t\t\t\tlocationTypeHandlerArray.setPin_resource(convertToBitmap(cursor.getBlob(7))); \n\t\t\t\tlocationTypeList.add(locationTypeHandlerArray);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdb.close();\n\t\treturn locationTypeList;\n\t}", "@Override\n public Iterable<Location> listLocations() {\n return ImmutableSet.<Location>of();\n }", "private void mockUpDB() {\n locationDBAdapter.insertLocationData(\n \"ChIJd0UHJHcw2jARVTHgHdgUyrk\",\n \"Baan Thong Luang\",\n \"https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png\",\n \"https://maps.google.com/maps/contrib/101781857378275784222/photos\",\n \"CmRSAAAAEegLHnt03YODdRQ658VBWtIhOoz3TjUAj1oVqQIlLq0DkfSttuS-SQ3aOLBBbuFdwKbpkbsrFzMWghgyZeRD-n5rshknOXv6p5Xo3bdYr5FMOUGCy-6f6LYRy1PN9cKOEhBuj-7Dc5fBhX_38N_Sn7OPGhTBRgFIvThYstd7e8naYNPMUS2rTQ\",\n \"GOOGLE\",\n \"236/10 Wualai Road Tumbon Haiya, CHIANG MAI\",\n 18.770709,\n 98.978078,\n 0.0);\n\n }", "public List<StudyLocation> getStudyLocationsByLocId(Integer id) {\n\t\tSqlSession session = connectionFactory.sqlSessionFactory.openSession();\r\n\t\tStudyLocationMapper studyLocationMapper = session.getMapper(StudyLocationMapper.class);\r\n\t\ttry {\r\n\t\t\tStudyLocationExample example = new StudyLocationExample();\r\n\t\t\texample.createCriteria().andLocationidEqualTo(id);\r\n\t\t\tList<StudyLocation> studyLocations = studyLocationMapper.selectByExample(example);\r\n\t\t\treturn studyLocations;\r\n\t\t} finally {\r\n\t\t\tsession.close();\r\n\t\t}\r\n\t}", "public abstract List<LocationDto> viewAll();", "protected abstract void getAllUniformLocations();", "public Map<String, URLValue> loadAllURLs()\n\t{\n\t\tEntityCursor<URLEntity> results = this.env.getEntityStore().getPrimaryIndex(String.class, URLEntity.class).entities();\n\t\tMap<String, URLValue> urls = new HashMap<String, URLValue>();\n\t\tURLValue url;\n\t\tfor (URLEntity entity : results)\n\t\t{\n\t\t\turl = new URLValue(entity.getKey(), entity.getURL(), entity.getUpdatingPeriod());\n\t\t\turls.put(url.getKey(), url);\n\t\t}\n\t\tresults.close();\n\t\treturn urls;\n\t}", "public void load() {\n mapdb_ = DBMaker.newFileDB(new File(\"AllPoems.db\"))\n .closeOnJvmShutdown()\n .encryptionEnable(\"password\")\n .make();\n\n // open existing an collection (or create new)\n poemIndexToPoemMap_ = mapdb_.getTreeMap(\"Poems\");\n \n constructPoems();\n }", "private void addLocationToDatabase(Location location){\n if(recordLocations){\n JourneyLocation journeyLocation = new JourneyLocation(currentJourneyId, new LatLng(location.getLatitude(), location.getLongitude()), System.currentTimeMillis());\n interactor.addLocation(journeyLocation);\n }\n }", "Map<UUID, Optional<Location>> getAllCurrentLocations();", "public void loadMap() {\n\t\tchests.clear();\r\n\t\t// Load the chests for the map\r\n\t\tchestsLoaded = false;\r\n\t\t// Load data asynchronously\r\n\t\tg.p.getServer().getScheduler().runTaskAsynchronously(g.p, new AsyncLoad());\r\n\t}", "public void initializeAfterLoad(URL location) {\n \t\tthis.location = location;\n \t\tif (mapper == null)\n \t\t\tmapper = new Mapper();\n \t\tmapper.initialize(Activator.getContext(), mappingRules);\n \t}", "public void createLocations() {\n createAirports();\n createDocks();\n createEdges();\n createCrossroads();\n }", "public List<String> getLocationAndCity(){\n\t\treturn jtemp.queryForList(\"SELECT location_id||city FROM locations\", String.class);\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 void load() {\n loadDisabledWorlds();\n chunks.clear();\n for (World world : ObsidianDestroyer.getInstance().getServer().getWorlds()) {\n for (Chunk chunk : world.getLoadedChunks()) {\n loadChunk(chunk);\n }\n }\n }", "public abstract java.util.Set getLocations();", "private static Map<String, List<String>> loadCitiesByLanguage() {\n String resource = Config.get(\"generate.geography.foreign.birthplace.default_file\",\n \"geography/foreign_birthplace.json\");\n return loadCitiesByLanguage(resource);\n }", "public ArrayList<Location> getLocations() {\n return locations;\n }", "private void preloadDb() {\n String[] branches = getResources().getStringArray(R.array.branches);\n //Insertion from xml\n for (String b : branches)\n {\n dataSource.getTherapyBranchTable().insertTherapyBranch(b);\n }\n String[] illnesses = getResources().getStringArray(R.array.illnesses);\n for (String i : illnesses)\n {\n dataSource.getIllnessTable().insertIllness(i);\n }\n String[] drugs = getResources().getStringArray(R.array.drugs);\n for (String d : drugs)\n {\n dataSource.getDrugTable().insertDrug(d);\n }\n }", "@Override\n public Map<String,Map<String,Object>> getLocatedLocations() {\n Map<String,Map<String,Object>> result = new LinkedHashMap<String,Map<String,Object>>();\n Map<Location, Integer> counts = new EntityLocationUtils(mgmt()).countLeafEntitiesByLocatedLocations();\n for (Map.Entry<Location,Integer> count: counts.entrySet()) {\n Location l = count.getKey();\n Map<String,Object> m = MutableMap.<String,Object>of(\n \"id\", l.getId(),\n \"name\", l.getDisplayName(),\n \"leafEntityCount\", count.getValue(),\n \"latitude\", l.getConfig(LocationConfigKeys.LATITUDE),\n \"longitude\", l.getConfig(LocationConfigKeys.LONGITUDE)\n );\n result.put(l.getId(), m);\n }\n return result;\n }", "public List<Landmark> getAll() {\n\t\t// Retrieve session from Hibernate\n\t\tSession session = sessionFactory.getCurrentSession();\n\n\t\t// Create a Hibernate query (HQL)\n\t\tQuery query = session.createQuery(\"FROM Landmark\");\n\n\t\t// Retrieve all\n\t\treturn query.list();\n\t}", "private void GetSavedLocation() {\n\t\tCursor c = database.rawQuery(\"SELECT * from locations \", null);\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tString mName = null, mPolygon = null;\r\n\t\tbyte[] blob;\r\n\r\n\t\tif (c != null) {\r\n\t\t\tif (c.moveToFirst()) {\r\n\t\t\t\tdo {\r\n\t\t\t\t\tmName = c.getString(c.getColumnIndex(\"name\"));\r\n\t\t\t\t\tblob = c.getBlob(c.getColumnIndex(\"polygon\"));\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tmPolygon = new String(blob, \"UTF-8\");\r\n\t\t\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.err.println(\"Location NAme:\" + mName);\r\n\t\t\t\t} while (c.moveToNext());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n void start(Collection<? extends Location> locations);", "private void load() {\n Uri poiUri = Uri.withAppendedPath(Wheelmap.POIs.CONTENT_URI_POI_ID,\r\n String.valueOf(poiID));\r\n\r\n // Then query for this specific record:\r\n Cursor cur = getActivity().managedQuery(poiUri, null, null, null, null);\r\n\r\n if (cur.getCount() < 1) {\r\n cur.close();\r\n return;\r\n }\r\n\r\n cur.moveToFirst();\r\n\r\n WheelchairState state = POIHelper.getWheelchair(cur);\r\n String name = POIHelper.getName(cur);\r\n String comment = POIHelper.getComment(cur);\r\n int lat = (int) (POIHelper.getLatitude(cur) * 1E6);\r\n int lon = (int) (POIHelper.getLongitude(cur) * 1E6);\r\n int nodeTypeId = POIHelper.getNodeTypeId(cur);\r\n int categoryId = POIHelper.getCategoryId(cur);\r\n\r\n NodeType nodeType = mSupportManager.lookupNodeType(nodeTypeId);\r\n // iconImage.setImageDrawable(nodeType.iconDrawable);\r\n\r\n setWheelchairState(state);\r\n // nameText.setText(name);\r\n\r\n String category = mSupportManager.lookupCategory(categoryId).localizedName;\r\n // categoryText.setText(category);\r\n nodetypeText.setText(nodeType.localizedName);\r\n commentText.setText(comment);\r\n addressText.setText(POIHelper.getAddress(cur));\r\n websiteText.setText(POIHelper.getWebsite(cur));\r\n phoneText.setText(POIHelper.getPhone(cur));\r\n\r\n /*\r\n * POIMapsforgeOverlay overlay = new POIMapsforgeOverlay();\r\n * overlay.setItem(name, comment, nodeType, state, lat, lon);\r\n * mapView.getOverlays().clear(); mapView.getOverlays().add(overlay);\r\n * mapController.setCenter(new GeoPoint(lat, lon));\r\n */\r\n }", "public static void listGeolocations()\n {\n {\n JSONArray listGeolocations = new JSONArray();\n List<User> users = User.findAll();\n for (User user : users)\n {\n listGeolocations.add(Arrays.asList(user.firstName, user.latitude, user.longitude));\n }\n renderJSON(listGeolocations);\n }\n }", "private void loadDataFromDatabase() {\n mSwipeRefreshLayout.setRefreshing(true);\n mPresenter.loadDataFromDatabase();\n }", "public void setLocationDao(LocationDAO dao) { _locationData = dao; }", "public List<Location> getLocations() {\n\t\treturn locations;\n\t}", "public Location[] getLocation() {\r\n return locations;\r\n }", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "@Override\n\tpublic void load() {\n\t\tsuper.load();\n\t\t\n\t\tUriAdapter adapter = new UriAdapter(config);\n\t\tbnetMap = loadBnetMap(adapter, config.getStoreUri(), getName());\n\t\tadapter.close();\n\t\t\n\t\titemIds = bnetMap.keySet();\n\t}", "java.util.List<phaseI.Hdfs.DataNodeLocation> \n getLocationsList();", "void loadAll() {\n\t\tsynchronized (this) {\n\t\t\tif (isFullyLoaded) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (Entry<Integer, Supplier<ChunkMeta<?>>> generator : ChunkMetaFactory.getInstance()\n\t\t\t\t\t.getEmptyChunkFunctions()) {\n\t\t\t\tChunkMeta<?> chunk = generator.getValue().get();\n\t\t\t\tchunk.setChunkCoord(this);\n\t\t\t\tchunk.setPluginID(generator.getKey());\n\t\t\t\ttry {\n\t\t\t\t\tchunk.populate();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// need to catch everything here, otherwise we block the main thread forever\n\t\t\t\t\t// once it tries to read this\n\t\t\t\t\tCivModCorePlugin.getInstance().getLogger().log(Level.SEVERE, \n\t\t\t\t\t\t\t\"Failed to load chunk data\", e);\n\t\t\t\t}\n\t\t\t\taddChunkMeta(chunk);\n\t\t\t}\n\t\t\tisFullyLoaded = true;\n\t\t\tthis.notifyAll();\n\t\t}\n\t}", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void loadData() {\n RetrofitHelper.getInstance().getNearbyItems(new Observer<MainItemListBean>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onNext(MainItemListBean mainItemListBean) {\n if (refreshLayout.getState() == RefreshState.Refreshing) {\n dataBeans.clear();\n }\n dataBeans.addAll(mainItemListBean.getData());\n if (dataBeans.isEmpty()) {\n emptyView.setVisibility(View.VISIBLE);\n } else {\n emptyView.setVisibility(View.GONE);\n }\n adapter.setData(dataBeans);\n }\n\n @Override\n public void onError(Throwable e) {\n e.printStackTrace();\n endLoading();\n }\n\n @Override\n public void onComplete() {\n endLoading();\n }\n }, longitude, latitude, maxDistance, page, category);\n }", "public List<Long> createLocations(List<Location> locations) {\n\n String sql = \"insert into mdm.location(\" +\n \"location_name) values(\" +\n \":\" + \"location_name\" +\n \")\";\n\n List<Long> locationIds = new ArrayList<>(locations.size());\n\n locations.forEach(location -> {\n SqlParameterSource sqlParameterSource = buildSqlParamSourceFromLocation(location);\n KeyHolder keyHolder = new GeneratedKeyHolder();\n namedParameterJdbcTemplate.update(sql, sqlParameterSource, keyHolder, new String[]{COLUMN_NAME_LOCATION_DB_ID});\n locationIds.add(keyHolder.getKey().longValue());\n });\n\n return locationIds;\n\n }", "public void loadQuestions() \n {\n try{\n ArrayList<QuestionPojo> questionList=QuestionDao.getQuestionByExamId(editExam.getExamId());\n for(QuestionPojo obj:questionList)\n {\n qstore.addQuestion(obj);\n }\n }\n catch(SQLException ex)\n {\n JOptionPane.showMessageDialog(null, \"Error while connecting to DB!\",\"Exception!\",JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n\n }\n }", "public void fetchRegions () {\n try {\n // try loading from geoserve\n this.regions = loadFromGeoserve();\n } catch (Exception e) {\n LOGGER.log(Level.WARNING,\n \"Error fetching ANSS Regions from geoserve\",\n e);\n try {\n if (this.regions == null) {\n // fall back to local cache\n this.regions = loadFromFile();\n }\n } catch (Exception e2) {\n LOGGER.log(Level.WARNING,\n \"Error fetching ANSS Regions from local file\",\n e);\n }\n }\n }", "public Queries loadQueries() {\r\n\t\tQueries queries = null;\r\n\t try {\r\n queries = Queries.unmarshalAsQueries();\r\n\t } catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t return queries;\r\n\t}" ]
[ "0.7295438", "0.7276036", "0.70990264", "0.68784434", "0.6672069", "0.65698785", "0.65655994", "0.6522241", "0.65214425", "0.650537", "0.64238787", "0.6411869", "0.6360155", "0.63438606", "0.6323273", "0.6258246", "0.6242126", "0.6226269", "0.59845036", "0.5982402", "0.5974187", "0.5895323", "0.5859964", "0.5852253", "0.58387536", "0.5822141", "0.58214444", "0.579284", "0.5768279", "0.5767195", "0.5765451", "0.5741893", "0.5731018", "0.5726278", "0.57229006", "0.5722847", "0.57155377", "0.5708412", "0.56980634", "0.56907314", "0.5683834", "0.56607515", "0.56447786", "0.5643798", "0.56357527", "0.56334364", "0.56310433", "0.56154984", "0.56127185", "0.56119406", "0.5595334", "0.5592211", "0.5583139", "0.55799365", "0.5574648", "0.55607396", "0.55432796", "0.55291337", "0.55171895", "0.5516174", "0.5506626", "0.54969394", "0.5466977", "0.5465228", "0.54623276", "0.5450287", "0.54483086", "0.54304814", "0.54298365", "0.54177296", "0.5411698", "0.5403765", "0.5403066", "0.53984743", "0.53897464", "0.5389137", "0.5380162", "0.53778154", "0.53733414", "0.5355702", "0.5353599", "0.5316694", "0.5314944", "0.5310799", "0.53017634", "0.5301671", "0.5298015", "0.5297977", "0.5295252", "0.529398", "0.5286397", "0.5279913", "0.527441", "0.52670854", "0.5265483", "0.5265332", "0.5263316", "0.52623343", "0.52592033", "0.5255312", "0.52516466" ]
0.0
-1
Load all sellers in the database
public static List<Book> getBookSellers() throws HibernateException{ session = sessionFactory.openSession(); session.beginTransaction(); Query query=session.getNamedQuery("INVENTORY_getBookSellers"); List<Book> bookLocationList=query.list(); session.getTransaction().commit(); session.close(); return bookLocationList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"\", method = RequestMethod.GET)\n public ArrayList<Seller> getAllSeller()\n {\n return DatabaseSeller.getSellerDatabase();\n }", "List<Seller> findAll();", "@Override\n\tpublic List<Seller> findAll() {\n\t\tStatement st = null;\n\t\tResultSet rst = null;\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trst = st.executeQuery(\"SELECT seller.*,Department.Name as DepName \" +\n\t\t\t\t\t\"FROM seller INNER JOIN department \" + \n\t\t\t\t\t\"ON seller.Id = department.Id \" + \n\t\t\t\t\t\"ORDER BY Name;\");\n\t\t\tMap<Integer, Department> map = new HashMap<>();\n\t\t\tList<Seller> sellers = new ArrayList<>();\n\t\t\tDepartment dep = null;\n\t\t\tSeller seller = null;\n\t\t\twhile(rst.next()) {\n\t\t\t\tdep = map.get(rst.getInt(\"DepartmentId\"));\n\t\t\t\tif(dep == null) {\n\t\t\t\t\tdep = instanceDepartment(rst);\n\t\t\t\t\tmap.put(rst.getInt(\"DepartmentId\"), dep);\n\t\t\t\t}\n\t\t\t\tseller = instanceSeller(rst, dep);\n\t\t\t\tsellers.add(seller);\n\t\t\t}\n\t\t\treturn sellers;\n\t\t}catch(SQLException e){\n\t\t\tthrow new DbException(e.getMessage());\n\t\t}finally {\n\t\t\tDb.closeResultSet(rst);\n\t\t\tDb.closeStatement(st);\n\t\t}\n\t}", "@GetMapping(\"/all\")\n List<Seller> findAllSeller(){\n return sellerService.findAllSeller();\n }", "@Override\n\tpublic List<Sold> selectSoldListBySeller(int seller_id) {\n\t\tList<Sold> list = new ArrayList<>();\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"SELECT * FROM sold WHERE seller_id=?\";\n \n\t\ttry {\n\t\t\tconn = getConnection();\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t\tpstmt.setInt(1, seller_id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tSold sd = new Sold();\n\t\t\t\t\n\t\t\t\tsd.setOrder_id(rs.getInt(\"order_id\"));\n\t\t\t\tsd.setSeller_id(rs.getInt(\"seller_id\"));\n\t\t\t\tsd.setBook_id(rs.getInt(\"book_id\"));\n\t\t\t\tsd.setSold_date(rs.getDate(\"sold_date\"));\n\t\t\t\tsd.setSold_price(rs.getInt(\"sold_price\"));\n\t\t\t\tsd.setBuyer_id(rs.getInt(\"buyer_id\"));\n\t\t\t\tsd.setSold_date_string(rs.getString(\"sold_date\"));\n\t\t\t\t\n\t\t\t\tlist.add(sd);\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} catch (Exception 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\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t\tif (pstmt != null)\n\t\t\t\t\tpstmt.close();\n\t\t\t\tif(conn !=null)\n\t\t\t\t\tconn.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 \n\t\treturn list;\n\t}", "public List<Seller> loadAllDeepFromCursor(Cursor cursor) {\n int count = cursor.getCount();\n List<Seller> list = new ArrayList<Seller>(count);\n \n if (cursor.moveToFirst()) {\n if (identityScope != null) {\n identityScope.lock();\n identityScope.reserveRoom(count);\n }\n try {\n do {\n list.add(loadCurrentDeep(cursor, false));\n } while (cursor.moveToNext());\n } finally {\n if (identityScope != null) {\n identityScope.unlock();\n }\n }\n }\n return list;\n }", "public List<Buy> getAll() throws PersistException;", "List<User> fetchAllUSers();", "List<Customer> loadAllCustomer();", "private void getScholsFromDatabase() {\n schols = new Select().all().from(Scholarship.class).execute();\n }", "public List<SupplierEntity> getAllSuppliers() {\n\n List<SupplierEntity> suppliers = new ArrayList<SupplierEntity>();\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n suppliers = session.createQuery(\"FROM SupplierEntity ORDER BY supplierId\").list();\n tx.commit();\n\n } catch (HibernateException e) {\n\n if (tx != null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n return suppliers;\n\n }", "public List<Engineer> getListFromDB(){\n\t\treturn engineerList;\n\t}", "Seller findById(Integer id);", "Seller findById(Integer id);", "@Override\r\n\tpublic List<Applier> retrieveAllAppliers() {\n\t\treturn em.createQuery(\"Select a from Applier a\").getResultList();\r\n\t}", "List<Product> getAllProducts() throws DataBaseException;", "public List<ProductWithSupplierTO> getAllProducts(long storeID) throws NotInDatabaseException;", "List<Product> getAllProducts() throws PersistenceException;", "@Override\n\tpublic List<Sold> selectSoldListByBuyer(int buyer_id) {\n\t\tList<Sold> list = new ArrayList<>();\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"SELECT * FROM sold WHERE buyer_id=?\";\n \n\t\ttry {\n\t\t\tconn = getConnection();\n\t\t\tpstmt = conn.prepareStatement(sql);\n\t\t\tpstmt.setInt(1, buyer_id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tSold sd = new Sold();\n\t\t\t\t\n\t\t\t\tsd.setOrder_id(rs.getInt(\"order_id\"));\n\t\t\t\tsd.setSeller_id(rs.getInt(\"seller_id\"));\n\t\t\t\tsd.setBook_id(rs.getInt(\"book_id\"));\n\t\t\t\tsd.setSold_date(rs.getDate(\"sold_date\"));\n\t\t\t\tsd.setSold_price(rs.getInt(\"sold_price\"));\n\t\t\t\tsd.setBuyer_id(rs.getInt(\"buyer_id\"));\n\t\t\t\tsd.setSold_date_string(rs.getString(\"sold_date\"));\n\t\t\t\tlist.add(sd);\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} catch (Exception 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\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t\tif (pstmt != null)\n\t\t\t\t\tpstmt.close();\n\t\t\t\tif(conn !=null)\n\t\t\t\t\tconn.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 \n\t\treturn list;\n\t}", "@Override\n\tpublic List<Lending> findAllLending() {\n\t\t\n\t\tList<Lending> objectList = new ArrayList<Lending>();\n\t\tLending lending = new Lending();\n\t\tResultSet resultset = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tconnection = getConnection();\n\t\t\tstatement = connection.prepareStatement(\"select * from lending;\");\n\t\t\tresultset = statement.executeQuery();\n\t\t\twhile(resultset!=null && resultset.next())\n\t\t\t{\n\t\t\t\tint id = resultset.getInt(1);\n\t\t\t\tint user_id = resultset.getInt(2);\n\t\t\t\tUserService us_se = new UserServiceImpl();\n\t\t\t\tUser user = us_se.findUserById(user_id);\n\t\t\t\tint lib_book_id = resultset.getInt(3);\n\t\t\t\tLibraryBookService lb_se = new LibraryBookServiceImpl();\n\t\t\t\tLibraryBook book = lb_se.findLibraryBookById(lib_book_id);\n\t\t\t\tString lending_date = resultset.getString(4);\n\t\t\t\tString return_date = resultset.getString(5);\n\t\t\t\tString returned_date = resultset.getString(6);\n\t\t\t\tint lending_status = resultset.getInt(7);\n\t\t\t\t\n\t\t\t\tlending = new Lending(id,user,book,lending_date,return_date,returned_date,lending_status);\n\t\t\t\t\n\t\t\t\tobjectList.add(lending);\n\t\t\t\t\n\t\t\t\tConstants.Response.MSG = Constants.Response.MSG_SUCCESS;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\tConstants.Response.MSG = Constants.Response.MSG_FAILED;\n\t\t\tSystem.out.println(\"Error occured in data finding\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcloseDBResource();\n\t\treturn objectList;\n\t}", "List<StockList> fetchAll();", "private void populateExpenses() {\n\n List<ExpenseCategory> expenseCategories = expenseCategoryRepository.findAll();\n //todo this isn't null safe fix it\n Payee payee = payeeRepository.findByName(\"Tom\").get(0);\n\n for (int i = 0; i < 10; i++) {\n expenseRepository.save(new Expense(\n new Date(),\n expenseCategories.get(i),\n getRandomBigDecimal(),\n payee,\n \"this is a note about the expense\"\n ));\n\n }\n }", "public static List<Book> retrieveAll( EntityManager em) {\n TypedQuery<Book> query = em.createQuery( \"SELECT b FROM Book b\", Book.class);\n List<Book> books = query.getResultList();\n System.out.println( \"Book.retrieveAll: \" + books.size()\n + \" books were loaded from DB.\");\n return books;\n }", "List<Salesman> findAll();", "public List<CartItem> findCartItemsByCartItemIdItemSellerSellerId(int sellerId);", "public ArrayList<String> getSellers(String productName);", "@JsonIgnore public Collection<Participant> getSellers() {\n final Object current = myData.get(\"seller\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<Participant>) current;\n }\n return Arrays.asList((Participant) current);\n }", "public List<Brands> LoadAllBrands() {\n Brands brands = null;\n List<Brands> brandsList = new ArrayList<>();\n try {\n Connection connection = DBConnection.getConnectionToDatabase();\n // String sql = \"SELECT * FROM `humusam_root`.`Users` WHERE UserEmail=\" + email;\n String sql = \"SELECT * FROM `brands`\";\n Statement statment = connection.createStatement();\n ResultSet set = statment.executeQuery(sql);\n ListBrands(brandsList, set);\n } catch (SQLException exception) {\n System.out.println(\"sqlException in Application in LoadAllBrands Section : \" + exception);\n exception.printStackTrace();\n }\n\n return brandsList;\n }", "@Override\n\tpublic List<Goods> GetGoodsOfSeller(Integer sellerid) {\n\t\treturn null;\n\t}", "@Override\n public List<Buyer> query(Buyer buyer) {\n return null;\n }", "@Deferred\n @RequestAction\n @IgnorePostback\n public void loadData() {\n users = userRepository.findAll();\n }", "List<User> loadAll();", "public static void loadSellTable()\n {\n final String QUERY = \"SELECT Sells.SellId, Sells.ProductId, Clients.FirstName, Clients.LastName, Products.ProductName, Sells.Stock, Sells.FinalPrice \"\n + \"FROM Sells, Products, Clients WHERE Sells.ProductId = Products.ProductId AND Sells.ClientId=Clients.clientId\";\n\n DefaultTableModel dtm = (DefaultTableModel) new SellDatabase().selectTable(QUERY);\n sellTable.setModel(dtm);\n }", "List fetchAll() throws AdaptorException ;", "@Override\r\n\tpublic List<Supplies> findall() {\n\t\treturn suppliesDao.findall();\r\n\t}", "void fetchForSaleHousesData();", "public HTMLManager loadAllData() throws SQLException {\n\t\tHTMLManager hm = new HTMLManager();\n\t\tDataManager dm = new DataManager();\n\t\tdao.loadData(dm);\n\t\tArrayList<Product> productsList = dm.getProductList();\n\t\tfor(Product product : productsList) {\n\t\t\thm.addRowToOutputData(product);\n\t\t}\n\t\treturn hm;\n\t}", "@Override\n\tpublic List<Student> retrieveAllStudents() {\n\t\tTypedQuery<Student> query = em.createQuery(\"select s from Student s\",\n\t\t\t\tStudent.class);\n\t\treturn query.getResultList();\n\t}", "@Override\n public void loadData(final List<Integer> allCommerceItemIds) {\n if (allCommerceItemIds.size() == 0) {\n return;\n }\n int pos = 0;\n // initiates the loading of items and their price via REST. Since each item must\n // be loaded in a single request, this loop loads the items in chunks (otherwise\n // we might have too many requests at once)\n while (pos < allCommerceItemIds.size()) {\n try {\n Log.i(TAG, \"loaded items: \" + mDatabaseAccess.itemsDAO().selectItemCount());\n Log.i(TAG, \"loaded item prices: \" +\n mDatabaseAccess.itemsDAO().selectItemPriceCount());\n // creates a \",\" separated list of item IDs for the GET parameter\n String ids = RestHelper.splitIntToGetParamList(allCommerceItemIds,\n pos, ITEM_PROCESS_SIZE);\n // all prices to the \",\" separated ID list.\n List<Price> prices = mCommerceAccess.getPricesWithWifi(ids);\n\n processPrices(prices);\n pos += ITEM_PROCESS_SIZE;\n\n // to prevent too many request at once, wait every 1000 processed items\n if (pos % ITEM_PROCESS_WAIT_COUNT == 0) {\n waitMs(TOO_MANY_REQUEST_DELAY_MS);\n }\n } catch (ResponseException ex) {\n Log.e(TAG, \"An error has occurred while trying to load the commerce data from the\" +\n \" server side!\",\n ex);\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load commerce data.\",\n ex);\n }\n }\n }", "public void populate(){\n salesRepRepository.save(new SalesRep(\"Maddy\"));\n salesRepRepository.save(new SalesRep(\"Jegor\"));\n salesRepRepository.save(new SalesRep(\"Natalia\"));\n salesRepRepository.save(new SalesRep(\"Joao\"));\n }", "void loadCurrentPrices() {\n for(SecurityRow row : allSecurities) {\n row.updateCurrentPrice();\n }\n fireTableRowsUpdated(0, allSecurities.size()-1);\n }", "@Override\r\n\tpublic List<Employee> findAllEMployees() {\n\t\tList<Employee> employees = new ArrayList<Employee>();\r\n\t\tString findData = \"select * from employee\";\r\n\r\n\t\ttry {\r\n\t\t\tStatement s = dataSource.getConnection().createStatement();\r\n\r\n\t\t\tResultSet set = s.executeQuery(findData);\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\tEmployee employee = new Employee(id, sal, name, tech);\r\n\t\t\t\temployees.add(employee);\r\n\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 employees;\r\n\r\n\t}", "List<Product> retrieveProducts();", "@Override\r\n\tpublic List<Employer> getAll() {\n\t\treturn employerDao.findAll();\r\n\t}", "public ArrayList<Desserts> getAllDesserts() { \r\n\t ArrayList<Desserts> AllDesserts = new ArrayList<Desserts>();\r\n\t try {\r\n\t Class.forName(\"com.mysql.jdbc.Driver\");\r\n\t Connection conn = DriverManager.getConnection(url+dbName,userName,password);\r\n\t statement=conn.createStatement();\r\n\t resultSet=statement.executeQuery(\"select * from g13restaurant.Desserts\");\r\n\t \r\n\t while ( resultSet.next() ) {\r\n\t \t Desserts nextDesserts = new Desserts(\r\n\t \t\t\t resultSet.getInt(\"dessert_ID\"), \r\n\t \t\t\t resultSet.getString(\"dessert_Name\"),\r\n\t resultSet.getString(\"dessert_Description\"), \r\n\t resultSet.getFloat(\"dessert_Cost\"),\r\n\t resultSet.getString(\"dessert_Type\").toString() ); \r\n\t AllDesserts.add(nextDesserts);\r\n\t }\r\n\t conn.close();\r\n\t } \r\n\t catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t return AllDesserts; \r\n\t }", "@Override\r\n\tpublic List<MarketDto> readMarketAll() {\n\t\treturn session.selectList(\"kdc.market.readMarketAll\");\r\n\t}", "public static List<Book> searchBookByNameOfSeller(String nameOfSeller) throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n\r\n Query query = session.getNamedQuery(\"INVENTORY_searchBookByNameOfTheSeller\").setString(\"nameOfTheSeller\", nameOfSeller);\r\n\r\n List<Book> resultList = query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return resultList;\r\n \r\n }", "public void consultarProductos() throws StoreException {\n\t\tproductos = productoService.consultarProductos();\n\t}", "public List<Book> getAll() {\n return bookFacade.findAll(); \n }", "@Override\n\tpublic List<Order> readAll() {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders\");) {\n\t\t\tList<Order> orderList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\torderList.add(modelFromResultSet(resultSet));\n\t\t\t}\n\t\t\treturn orderList;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "@Override\r\n\tpublic List<EmployeeBean> getAllData() {\n\r\n\t\tEntityManager manager = entityManagerFactory.createEntityManager();\r\n\r\n\t\tString query = \"from EmployeeBean\";\r\n\r\n\t\tjavax.persistence.Query query2 = manager.createQuery(query);\r\n\r\n\t\tList<EmployeeBean> list = query2.getResultList();\r\n\t\tif (list != null) {\r\n\t\t\treturn list;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void initiateOfferQueue() {\n List<Offer> offerList = offerRepository.findAll();\n\n if (!offerList.isEmpty()) {\n\n for (Offer offer : offerList) {\n\n addOfferToOfferBook(offer);\n }\n }\n\n }", "public void getAllMartyrs() {\n\t\tDispatcher.forwardEvent(AppEvents.MARTYRS_HOMEPAGE_EVENT, JSONDataReader.loadMartyrs());\n\t}", "public ArrayList<Bookser> rented_books(int user_id) {\n startSession();\n\n Query q = session.createQuery(\"from Rent where rentee = :r\").setFirstResult(0);\n q.setParameter(\"r\", new User (user_id));\n\n List rents = q.getResultList();\n ArrayList<Bookser> book_objects = new ArrayList<>();\n\n for (Object rent: rents) {\n Rent r = (Rent) rent;\n Book b = r.getBook();\n Bookser bser = new Bookser(b.getId(), b.getName(), b.getAuthor(), b.getRent(), b.getDeposit());\n book_objects.add(bser);\n }\n\n System.out.println(\"Successful queries!\");\n endSession();\n return book_objects;\n }", "private void loadSingers() {\n swipeRefreshLayout.setRefreshing(true);\n api.getArtists().subscribeOn(Schedulers.newThread())\n .doOnEach(notification -> getActivity().runOnUiThread(() -> swipeRefreshLayout.setRefreshing(false)))\n .doOnError(err -> {\n Log.wtf(Consts.TAG, err.getMessage());\n Snackbar.make(getView(), err.getLocalizedMessage(), Snackbar.LENGTH_SHORT).show();\n })\n .onErrorReturn(err -> null)\n .doOnNext(singers -> {\n if (singers == null) return;\n\n SP.edit(getContext()).putString(Consts.SINGERS_CACHE, new Gson().toJson(singers)).apply();\n getActivity().runOnUiThread(() -> {\n setSingersToAdapter(singers, singers);\n });\n }\n )\n .subscribe();\n }", "public List<Book> findAll()\r\n\t{\r\n\t\tList<Book> booklist= null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSession();\r\n\t\t booklist=bookdao.findAll();\r\n\t\t\tbookdao.closeCurrentSession();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn booklist;\r\n\t}", "List<Revenue> findAll();", "public synchronized static List<Store> loadStores(Connection c) throws SQLException {\r\n //list of shop\r\n List<Store> listShop = new ArrayList<>();\r\n Statement myStmt = c.createStatement();\r\n //The query which selects all the shops.\r\n ResultSet myRs = myStmt.executeQuery(\"select * from magasin\");\r\n //Loop which add a shop to the list.\r\n while (myRs.next()) {\r\n int id = myRs.getInt(\"idMagasin\");\r\n String designation = myRs.getString(\"designation\");\r\n String description = myRs.getString(\"description\");\r\n int loyer = myRs.getInt(\"loyer\");\r\n int surface = myRs.getInt(\"superficie\");\r\n int niveau = myRs.getInt(\"niveau\");\r\n String localisation = myRs.getString(\"localisation\");\r\n //liste type \r\n Statement myStmt2 = c.createStatement();\r\n //The query which selects all the shops.\r\n ResultSet myRs2 = myStmt2.executeQuery(\"SELECT designation,idType from magasin_has_type,type where magasin_has_type.type_idType=type.idType and magasin_has_type.magasin_idMagasin=\" + id);\r\n List<TypeStore> list = new ArrayList<>();\r\n while (myRs2.next()) {\r\n int idtype = myRs2.getInt(\"idType\");\r\n String designationType = myRs2.getString(\"designation\");\r\n TypeStore T = new TypeStore(idtype, designationType);\r\n list.add(T);\r\n }\r\n Store M = new Store(id, designation, description, loyer, surface, niveau, localisation, list);\r\n\r\n listShop.add(M);\r\n }\r\n myStmt.close();\r\n return listShop;\r\n\r\n }", "public static List<Offer> offerList() {\n OfferDAO offerDAO = getOfferDAO();\n List<Offer> offerList = offerDAO.offerList();\n return offerList;\n }", "public List<Result> loadResults() {\n List<Result> results = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n results = dbb.loadResults();\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return results;\n }", "List<SpotPrice> getAll();", "@GetMapping(path=\"/load\")\n\tpublic @ResponseBody Iterable<Resource> loadAllUsers() {\n\t\t try {\n\t\t\tList<Resource> resources = DataLoader.loadData(DataUtils.SLA2017);\n\t\t\tresourceRepository.save(resources);\n\t\t\tList<Resource> resourcesFalabella = DataLoader.loadData(DataUtils.FALABELLA);\n\t\t\tresourceRepository.save(resourcesFalabella);\n\t\t\tList<Resource> resourcesSantiago = DataLoader.loadData(DataUtils.SANTIAGO2017);\n\t\t\tresourceRepository.save(resourcesSantiago);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return null;\n\t}", "public List<Books> showAllBooks(){\n String sql=\"select * from Book\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{});\n List<Books> list=new ArrayList<>();\n list=resultSetToBook(baseDao);\n return list;\n }", "@Override\r\n\tpublic void loadData() {\r\n\t\t// Get Session\r\n\r\n\t\tSession ses = HibernateUtil.getSession();\r\n\r\n\t\tQuery query = ses.createQuery(\"FROM User\");\r\n\r\n\t\tList<User> list = null;\r\n\t\tSet<PhoneNumber> phone = null;\r\n\t\tlist = query.list();\r\n\t\tfor (User u : list) {\r\n\t\t\tSystem.out.println(\"Users are \" + u);\r\n\t\t\t// Getting phones for for a particular user Id\r\n\t\t\tphone = u.getPhone();\r\n\t\t\tfor (PhoneNumber ph : phone) {\r\n\t\t\t\tSystem.out.println(\"Phones \" + ph);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public List<Author> fetchAllAuthors() {\n\t\tEntityManager entityManager = factory.createEntityManager();\n\t\tTypedQuery<Author> query = entityManager.createQuery(\"from Author\", Author.class);\n\t\tList<Author> authors = query.getResultList();\n\t\tentityManager.close();\n\t\treturn authors;\n\t}", "@Override\n public List<Item> retrieveAllItems() throws VendingMachinePersistenceException {\n loadItemFile();\n List<Item> itemList = new ArrayList<>();\n for (Item currentItem: itemMap.values()) {\n itemList.add(currentItem);\n }\n\n return itemList;\n }", "@Override\r\n\tpublic List<Seat> loadBookedSeats(Performance prm, String secName, int dateByTimeIdx) {\n\t\treturn ticketDao.selectBookedseats(prm,secName, dateByTimeIdx);\r\n\t}", "public void initSalesList() {\n\n String sql = \"SELECT menu.id_product, menu.name, menu.price,size.size, COUNT(orders_menu.id_order) \"\n + \"FROM menu, orders_menu, orders, size WHERE menu.id_product=orders_menu.id_product \"\n + \"AND orders.id_order=orders_menu.id_order AND orders.id_status=4 \"\n + \"AND size.id_size=menu.id_size GROUP BY menu.id_product\";\n\n Session session = HibernateUtil.getSessionFactory().getCurrentSession();\n\n session.beginTransaction();\n List<Object[]> empDepts = session.createNativeQuery(sql).list();\n\n salesFxObservableList.clear();\n for (Object[] objects : empDepts) {\n SalesFx salesFx = new SalesFx();\n salesFx.setIdProduct((Integer) objects[0]);\n salesFx.setName((String) objects[1]);\n salesFx.setPrice((Integer) objects[2]);\n salesFx.setSize((String) objects[3]);\n BigInteger bigInteger = (BigInteger) objects[4];\n salesFx.setSale(bigInteger.intValue());\n salesFxObservableList.add(salesFx);\n }\n\n session.getTransaction().commit();\n }", "public List<CustomerPurchase> getAll() throws SQLException;", "public void loadArtistsFromDB(Context context){\n if(context != null){\n this.artistList.clear();\n this.artistList_backup.clear();\n this.artistList.addAll(DBFolder.getInstance(context).getArtistList());\n this.artistList_backup.addAll(artistList);\n }\n }", "private void getAllItems() {\n\n try {\n double sellingPrice = 0;\n ArrayList<Item> allItems = ItemController.getAllItems();\n for (Item item : allItems) {\n double selling_margin = item.getSelling_margin();\n if (selling_margin > 0) {\n sellingPrice = item.getSellingPrice() - (item.getSellingPrice() * selling_margin / 100);\n } else {\n sellingPrice = item.getSellingPrice();\n }\n Object row[] = {item.getItemCode(), item.getDescription(), Validator.BuildTwoDecimals(item.getQuantity()), Validator.BuildTwoDecimals(sellingPrice)};\n tableModel.addRow(row);\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(FormItemSearch.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@RequestMapping(value=\"/getbooks\", method=RequestMethod.GET, produces = \"application/json\")\n\tpublic List<Book> getAll() {\n\t\tList<Book> books = new ArrayList<>();\n\t\tbooks = bookDao.getAllFromDB();\n\t\t\n\t\treturn books;\n\t}", "@Override\r\n\tpublic List<Product> showAll() throws Exception {\n\t\treturn this.dao.showAll();\r\n\t}", "public List<Publisher> findAllPublishers() {\n\t\tList<Publisher> result = new ArrayList<Publisher>();\n\t\t// --- 2. Controlli preliminari sui dati in ingresso ---\n\t\t// n.d.\n\t\t// --- 3. Apertura della connessione ---\n\t\tConnection conn = getCurrentJDBCFactory().getConnection();\n\t\t// --- 4. Tentativo di accesso al db e impostazione del risultato ---\n\t\ttry {\n\t\t\t// --- a. Crea (se senza parametri) o prepara (se con parametri) lo statement\n\t\t\tPreparedStatement prep_stmt = conn.prepareStatement(find_all_publishers);\n\t\t\t// --- b. Pulisci e imposta i parametri (se ve ne sono)\n\t\t\tprep_stmt.clearParameters();\n\t\t\t// --- c. Esegui l'azione sul database ed estrai il risultato (se atteso)\n\t\t\tResultSet rs = prep_stmt.executeQuery();\n\t\t\t// --- d. Cicla sul risultato (se presente) pe accedere ai valori di ogni sua tupla\n\t\t\twhile ( rs.next() ) {\n\t\t\t\tPublisher publisher = new Publisher();\n\t\t\t\tpublisher.setId(rs.getInt(publisher_id));\n\t\t\t\tpublisher.setName(rs.getString(publisher_name));\n\t\t\t\t// books.. lazy fetch\n\t\t\t\tresult.add(publisher);\n\t\t\t}\n\t\t\t// --- e. Rilascia la struttura dati del risultato\n\t\t\trs.close();\n\t\t\t// --- f. Rilascia la struttura dati dello statement\n\t\t\tprep_stmt.close();\n\t\t}\n\t\t// --- 5. Gestione di eventuali eccezioni ---\n\t\tcatch (Exception e) {\n\t\t\tgetCurrentJDBCFactory().getLogger().error(\"failed to retrieve publishers\",e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// --- 6. Rilascio, SEMPRE E COMUNQUE, la connessione prima di restituire il controllo al chiamante\n\t\tfinally {\n\t\t\tgetCurrentJDBCFactory().releaseConnection(conn);\n\t\t}\n\t\t// --- 7. Restituzione del risultato (eventualmente di fallimento)\n\t\treturn result;\n\t}", "public static void loadIndustrys(){\n //Try to connect to the database\n try {\n\n //Create Database Connection\n Class.forName(Main.database.DRIVER);\n Connection con = DriverManager.getConnection(Main.database.SERVER, Main.database.USERNAME, Main.database.PASSWORD);\n\n String sql = \"SELECT * FROM Industry\";\n\n //Create the java statement\n Statement statement = con.createStatement();\n\n //Execute the query and get the result\n ResultSet row = statement.executeQuery(sql);\n\n //Iterate through the results\n while (row.next()) {\n industrys.addItem(makeItem(row.getString(\"Name\")));\n }\n\n } catch (Exception ex) {\n\n //We got an Exception\n System.err.println(ex.getMessage());\n\n //Alert Error\n JOptionPane.showMessageDialog(Main.frame, \" Error Connecting to Database!\");\n }\n }", "@GetMapping(\"/{id}/sales\")\n public Iterable<Sale> getSalesByCustomer(@PathVariable long id){\n Customer b = customerRepository.findById(id);\n return b.getSales();\n }", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public Seller getSellerById(@PathVariable int id)\n {\n Seller seller = null;\n try\n {\n seller = DatabaseSeller.getSellerById(id);\n }\n catch (SellerNotFoundException e)\n {\n e.getMessage();\n return null;\n }\n return seller;\n }", "List<Price> findAll();", "public List<Book> allBooks() {\n return bookRepository.findAll();\n }", "@Override\n public List<Book> findBooks(SelectRequest selectRequest)\n throws DaoException {\n List<Book> foundBooks = new ArrayList<>();\n DataBaseHelper helper = new DataBaseHelper();\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statement = helper\n .prepareStatementFind(connection, selectRequest);\n ResultSet resultSet = statement.executeQuery()) {\n while (resultSet.next()) {\n BookCreator bookCreator = new BookCreator();\n Book book = bookCreator.create(resultSet);\n foundBooks.add(book);\n }\n } catch (SQLException e) {\n throw new DaoException(\"Error while reading database!\", e);\n }\n return foundBooks;\n }", "@Override\r\n\tpublic List<Book> getBooks() {\n\t\treturn bd.findAll();\r\n\t}", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "public ArrayList findAll() {\n String query = \"SELECT * FROM SilentAuction.Users\";\n ArrayList aUserCollection = selectUsersFromDB(query);\n return aUserCollection;\n }", "@Override\n\tpublic List<BookshelfinfoEntity> queryAllBookshelfinfo() {\n\t\treturn this.sqlSessionTemplate.selectList(\"bookshelfinfo.select\");\n\t}", "@Transactional\n\tpublic List<Supplier> list() {\n\t\tString hql=\"from Supplier\";\n\t\tQuery query=sessionFactory.getCurrentSession().createQuery(hql);\n\t\t\n\t\treturn query.list();\n\t}", "public void addAll() throws SQLException {\r\n DbHandler dbHandler = new DbHandler();\r\n\r\n ResultSet resultSet = dbHandler.getAll();\r\n while (resultSet.next()) {\r\n Photographer photographer = new Photographer();\r\n photographer.setId(resultSet.getString(1));\r\n System.out.println(photographer.getId());\r\n photographer.setName(resultSet.getString(2));\r\n System.out.println(photographer.getName());\r\n photographer.setSurname(resultSet.getString(3));\r\n System.out.println(photographer.getSurname());\r\n photographer.setStage(resultSet.getString(4));\r\n System.out.println(photographer.getStage());\r\n photographer.setPortfolio(resultSet.getString(5));\r\n System.out.println(photographer.getPortfolio());\r\n photographer.setLocation_(resultSet.getString(6));\r\n System.out.println(photographer.getLocation_());\r\n readersList.add(photographer);\r\n }\r\n }", "@Override\n\tpublic List<Book> findAll() {\n\t\treturn dao.findAll();\n\t}", "private void getAllNewsFromDatabase() {\n new GetAllNewsAsyncTask(newsDao).execute(newsList);\n }", "@Override\n public List<Integer> loadAllIds() {\n List<Integer> allCommerceItemIds = new LinkedList<>();\n try {\n allCommerceItemIds = mCommerceAccess.getAllCommerceItemsWithWifi();\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load all item IDs.\",\n ex);\n }\n return allCommerceItemIds;\n }", "private void demoSellProducts()\n {\n System.out.println(\"\\nSelling all the products\\n\");\n System.out.println(\"============================\");\n System.out.println();\n for(int id = 101; id <= 110; id++)\n {\n amount = generator.nextInt(20);\n manager.sellProduct(id, amount);\n }\n \n manager.printAllProducts();\n }", "@Override\n public List<School> importAllData(final String databaseName) {\n Connection connection = getConnection(databaseName);\n return querySchools(connection);\n }", "private void getAllProducts() {\n }", "public List<Book> findAll() {\n\t\treturn bookDao.findAll();\r\n\t}", "public List<Book> fetchAllBooks() {\n\t\treturn null;\n\t}", "@EventListener(ApplicationReadyEvent.class)\n\tpublic void loadData() {\n\t\tList<AppUser> allUsers = appUserRepository.findAll();\n\t\tList<Customer> allCustomers = customerRepository.findAll();\n\t\tList<Part> allPArts = partRepository.findAll();\n\n\t\tif (allUsers.size() == 0 && allCustomers.size() == 0 && allPArts.size() == 0) {\n\t\t\tSystem.out.println(\"Pre-populating the database with test data\");\n\n\t\t\tResourceDatabasePopulator resourceDatabasePopulator = new ResourceDatabasePopulator(\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\t\"UTF-8\",\n\t\t\t\tnew ClassPathResource(\"data.sql\"));\n\t\t\tresourceDatabasePopulator.execute(dataSource);\n\t\t}\n\t\tSystem.out.println(\"Application successfully started!\");\n\t}", "@PostConstruct\r\n public void init() {\r\n all.addAll(allFromDB());\r\n Collections.sort(all);\r\n }", "public List<Company> readFromDatabase() {\n\t\treturn this.jdbcTemplate.query(\"SELECT * FROM \" + table + \";\", (rs, i) -> new Company(rs.getString(\"Date\"), rs.getString(\"Security\"), rs.getDouble(\"Weighting\")));\n\t}", "@Override\r\n\tpublic List<BookDto> getBookList(String storename) {\n\t\tList<BookDto> blist = sqlSession.selectList(ns + \"getBookList\", storename);\t\t\r\n\t\treturn blist;\r\n\t}", "@RequestMapping(value=\"/purchase/all\",method=RequestMethod.GET)\n\t\t public @ResponseBody ResponseEntity<List<Purchases>> getAllPurchases(){\n\t\t\t List<Purchases> purchase=(List<Purchases>) purchaseDAO.findAll();\n\t\t\t Books books=null;\n\t\t\t User user=null;\n\t\t\t for(Purchases purch : purchase) {\n\t\t\t\t books=booksDAO.findOne(purch.getIsbn());\n\t\t\t\t purch.setBook(books);\n\t\t\t\t user=userDAO.findOne(purch.getUserId());\n\t\t\t\t purch.setUser(user);\n\t\t\t }\n\t\t\t return new ResponseEntity<List<Purchases>>(purchase, HttpStatus.OK);\n\t\t }", "@Override\n\tpublic List<Supplier> getAllSupplier() {\n\t\tString sql=\"SELECT * FROM supplier\";\n\t\tRowMapper<Supplier> rowmapper=new BeanPropertyRowMapper<Supplier> (Supplier.class);\n\t\treturn this.getJdbcTemplate().query(sql, rowmapper);\n\t}", "private void loadItems() {\n try {\n if (ServerIdUtil.isServerId(memberId)) {\n if (ServerIdUtil.containsServerId(memberId)) {\n memberId = ServerIdUtil.getLocalId(memberId);\n } else {\n return;\n }\n }\n List<VideoReference> videoReferences = new Select().from(VideoReference.class).where(VideoReference_Table.userId.is(memberId)).orderBy(OrderBy.fromProperty(VideoReference_Table.date).descending()).queryList();\n List<String> videoIds = new ArrayList<>();\n for (VideoReference videoReference : videoReferences) {\n videoIds.add(videoReference.getId());\n }\n itemList = new Select().from(Video.class).where(Video_Table.id.in(videoIds)).orderBy(OrderBy.fromProperty(Video_Table.date).descending()).queryList();\n } catch (Throwable t) {\n itemList = new ArrayList<>();\n }\n }" ]
[ "0.71309006", "0.71032023", "0.70531374", "0.64319605", "0.61324155", "0.60800827", "0.59647906", "0.5918441", "0.58993524", "0.58646643", "0.5840635", "0.58080566", "0.57833636", "0.57833636", "0.5729565", "0.5728963", "0.57111925", "0.57067263", "0.5696532", "0.56928366", "0.56811976", "0.5672933", "0.563823", "0.56272405", "0.56101584", "0.5608899", "0.5598628", "0.55964047", "0.55889934", "0.55630636", "0.5547199", "0.5543776", "0.55318445", "0.5515191", "0.5510302", "0.54694647", "0.54199296", "0.5410505", "0.5405254", "0.53876144", "0.53792346", "0.5373674", "0.53699857", "0.53685254", "0.5327639", "0.5326228", "0.53248245", "0.5320891", "0.5320719", "0.53089786", "0.530743", "0.5306407", "0.5303791", "0.52936727", "0.5277864", "0.5275533", "0.52714336", "0.5269581", "0.5266679", "0.526612", "0.52652824", "0.5249186", "0.5245637", "0.5245136", "0.5239458", "0.52366424", "0.52312225", "0.522468", "0.5219608", "0.5212742", "0.5209941", "0.52056587", "0.51995146", "0.51989514", "0.51940465", "0.5193737", "0.51868707", "0.5186284", "0.5186246", "0.51846606", "0.51825523", "0.5181904", "0.51801676", "0.51780564", "0.51723313", "0.5171206", "0.5168965", "0.51670825", "0.5161314", "0.5157727", "0.5149812", "0.51439756", "0.5143529", "0.51385224", "0.5137825", "0.5137564", "0.51373106", "0.5136688", "0.51353645", "0.5134591", "0.51331556" ]
0.0
-1
Load all categories in the database
public static List<Book> getBookCategory() throws HibernateException{ session = sessionFactory.openSession(); session.beginTransaction(); Query query=session.getNamedQuery("INVENTORY_getBookCategory"); List<Book> bookLocationList=query.list(); session.getTransaction().commit(); session.close(); return bookLocationList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void loadCategories() {\n loadCategories(mFirstLoad, true);\n mFirstLoad = false;\n }", "List<Category> getAllCategories() throws DataBaseException;", "private void loadCategories() {\n\t\tcategoryService.getAllCategories(new CustomResponseListener<Category[]>() {\n\t\t\t@Override\n\t\t\tpublic void onHeadersResponse(Map<String, String> headers) {\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\tLog.e(\"EditTeamProfileActivity\", \"Error while loading categories\", error);\n\t\t\t\tToast.makeText(EditTeamProfileActivity.this, \"Error while loading categories \" + error.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(Category[] response) {\n\t\t\t\tCollections.addAll(categories, response);\n\n\t\t\t\tif (null != categoryRecyclerAdapter) {\n\t\t\t\t\tcategoryRecyclerAdapter.setSelected(0);\n\t\t\t\t\tcategoryRecyclerAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\n\t\t\t\tupdateSelectedCategory();\n\t\t\t}\n\t\t});\n\t}", "List<Category> getAllCategories() throws DaoException;", "List<Category> getAllCategories();", "@Override\r\n\tpublic List<Category> getAllCategory() {\n\t\treturn categoryDao.getAll();\r\n\t}", "public List<Categorie> getAllCategories();", "@Override\n\tpublic List<Category> getAllCategories() {\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(\"FROM \"+Category.class.getName());\n\t\treturn (List<Category>)query.list();\t\t\n\t}", "public @NotNull Set<Category> findAllCategories() throws BazaarException;", "@Override\n\tpublic List<Category> getAllCategory() {\n\t\treturn dao.getAllCategory();\n\t}", "@Override\r\n\tpublic List<Category> getAllCategory() {\n\t\tString hql = \"from Category\";\r\n\t\treturn (List<Category>) getHibernateTemplate().find(hql);\r\n\t}", "@Override\n\tpublic Iterable<Category> findAllCategory() {\n\t\treturn categoryRepository.findAll();\n\t}", "List<Category> findAll();", "public List<Category> findAll() {\n\t\treturn categoryDao.getAll();\n\t}", "@Override\n public List<Category> getAll()\n {\n \n ResultSet rs = DataService.getData(\"SELECT * FROM Categories\");\n \n List<Category> categories = new ArrayList<Category>();\n \n try\n {\n while (rs.next())\n {\n categories.add(convertResultSetToCategory(rs));\n }\n }\n catch (SQLException e)\n {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n \n return categories;\n }", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "public List<Category> getAllCategories() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Category\");\r\n\t\tList<Category> categories = query.list();\r\n\r\n\t\treturn categories;\r\n\t}", "public List<Category> getAllCategories() {\n\t\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\tQuery q = session.createQuery(\"from Category\");\n\t\t\tList<Category> catlist = q.list();\n\t\t\t\n\t\t\treturn catlist;\n\t\t}", "public List<Category> findAll();", "List<Categorie> findAll();", "@Override\n\tpublic List<Category> findAllCategory() {\n\t\treturn categoryRepository.findAllCategory();\n\t}", "public static List<Category> getAllCategory() {\n\n List<Category> categoryList = new ArrayList<>();\n try {\n categoryList = Category.listAll(Category.class);\n } catch (Exception e) {\n\n }\n return categoryList;\n\n }", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<Category> getCategoryFindAll() {\n return em.createNamedQuery(\"Category.findAll\", Category.class).getResultList();\n }", "public List<Category> findAll() {\n\t\treturn categoryMapper.selectAll();\n\t}", "public Category loadCategoryTree() {\n Category categoryTree = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n categoryTree = dbb.loadCategoryTree();\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return categoryTree;\n }", "@Override\n\tpublic List<Category> getAllCategory() {\n\t\treturn category.selectAllCategory();\n\t}", "List<Category> getCategories() throws DAOExceptionHandler;", "List<ProductCategory> getAll();", "@Override\n @Transactional(readOnly = true)\n @Cacheable\n public List<Category> findAll(){\n log.debug(\"Request to get all Categories\");\n return categoryRepository.findAll();\n }", "@GetMapping(\"/categoriesfu\")\n public synchronized List<Category> getAllCategories() {\n log.debug(\"REST request to get a page of Categories\");\n //fu\n final String user =SecurityUtils.getCurrentUserLogin().get();\n final UserToRestaurant userToRestaurant=userToRestaurantRepository.findOneByUserLogin(user);\n final Restaurant restaurant=userToRestaurant.getRestaurant();\n return categoryRepository.findAllByRestaurant(restaurant);\n }", "private void loadDefaultCategory() {\n CategoryTable category = new CategoryTable();\n String categoryId = category.generateCategoryID(db.getLastCategoryID());\n String categoryName = \"Food\";\n String type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n categoryId = category.generateCategoryID(db.getLastCategoryID());\n categoryName = \"Study\";\n type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n db.close();\n }", "public static List<Category> findAll() {\n List<Category> categories = categoryFinder.findList();\n if(categories.isEmpty()){\n categories = new ArrayList<>();\n }\n return categories;\n }", "public List<String> findAllCategories() {\r\n\t\tList<String> result = new ArrayList<>();\r\n\r\n\t\t// 1) get a Connection from the DataSource\r\n\t\tConnection con = DB.gInstance().getConnection();\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 2) create a PreparedStatement from a SQL string\r\n\t\t\tPreparedStatement ps = con.prepareStatement(GET_CATEGORIES_SQL);\r\n\r\n\t\t\t// 3) execute the SQL\r\n\t\t\tResultSet resultSet = ps.executeQuery();\r\n\t\t\twhile (resultSet.next()) {\r\n\r\n\t\t\t\tString cat = resultSet.getString(1);\r\n\t\t\t\tresult.add(cat);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException se) {\r\n\t\t\tse.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.gInstance().returnConnection(con);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "@Override\r\n\tpublic List<Categorie> getAllCategorie() {\n\t\treturn cateDao.getAllCategorie();\r\n\t}", "List<Category> lisCat() {\n return dao.getAll(Category.class);\n }", "public static ResultSet getAllCategory() {\n try {\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"SELECT catName FROM category\");\n return rs;\n } catch (SQLException ex) {\n Logger.getLogger(itemDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "@Override\r\n\tpublic List<Categoria> readAll() {\n\t\tList<Categoria> lista = new ArrayList<>();\r\n\t\tString SQL = \"select *from categoria\";\r\n\t\ttry {\r\n\t\t\tcx = Conexion.getConexion();\r\n\t\t\tps = cx.prepareStatement(SQL);\r\n\t\t\trs = ps.executeQuery(SQL);\r\n\t\t\twhile(rs.next()) {\r\n\t\t\t\tCategoria r = new Categoria();\r\n\t\t\t\tr.setCategoria_idcategoria(rs.getInt(\"CATEGORIA_IDCATEGORIA\"));\r\n\t\t\t\tr.setNombre(rs.getString(\"NOMBRE\"));\r\n\t\t\t\tlista.add(r);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.out.println(\"Error: \"+e);\r\n\t\t}\r\n\t\t\r\n\t\treturn lista;\r\n\t}", "public List<ProductCatagory> getAllCategory() throws BusinessException;", "public ArrayList<Categories> getAllCategories() {\n\t\t\n\t\tCategories cg;\n\t\tArrayList<Categories> list=new ArrayList<Categories>();\n\t\t\n\t\ttry {\n\t\t\t String query=\"select * from categories;\";\n\t\t\tPreparedStatement pstm=con.prepareStatement(query);\n\t\t\tResultSet set= pstm.executeQuery();\n\t\t\t\n\t\t\twhile(set.next()) {\n\t\t\t\tint cid=set.getInt(1);\n\t\t\t\tString cname=set.getString(2);\n\t\t\t\tString cdes=set.getString(3);\n\t\t\t\t\n\t\t\t\tcg=new Categories(cid, cname, cdes);\n\t\t\t\tlist.add(cg);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}", "@Override\n\tpublic List<Cat> getAll() {\n\t\treturn catRepository.findAll();\n\t}", "@Override\n\tpublic List<FoodCategory> findAll() {\n\t\treturn foodCategoryDao.findAll();\n\t}", "public ArrayList<Category> getCategories() {\n ArrayList<Category> categories = new ArrayList<>();\n Cursor cursor = database.rawQuery(\"SELECT * FROM tbl_categories\", null);\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n Category category = new Category();\n category.setCategory_id(cursor.getInt(cursor.getColumnIndex(\"category_id\")));\n category.setCategory_name(cursor.getString(cursor.getColumnIndex(\"category_name\")));\n\n\n categories.add(category);\n cursor.moveToNext();\n }\n cursor.close();\n return categories;\n }", "private void buildCategories() {\n List<Category> categories = categoryService.getCategories();\n if (categories == null || categories.size() == 0) {\n throw new UnrecoverableApplicationException(\n \"no item types found in database\");\n }\n\n Map<Category, List<Category>> categoriesMap = new HashMap<Category, List<Category>>();\n for (Category subCategory : categories) {\n Category parent = subCategory.getParentCategory();\n if (categoriesMap.get(parent) == null) {\n categoriesMap.put(parent, new ArrayList<Category>());\n categoriesMap.get(parent).add(subCategory);\n } else {\n categoriesMap.get(parent).add(subCategory);\n }\n }\n\n this.allCategories = categories;\n this.sortedCategories = categoriesMap;\n }", "void loadCategoriesAsync(OnCategoryLoad onCategoryLoad);", "@Override\n\tpublic List<EventCategory> getAllCategories() {\n\t\treturn categoriesRepository.findAll();\n\t}", "public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }", "public List<Category> getListCategory() {\n List<Category> list = new ArrayList<>();\n SQLiteDatabase sqLiteDatabase = dbHelper.getWritableDatabase();\n\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM Category\", null);\n while (cursor.moveToNext()) {\n int id =cursor.getInt(0);\n\n Category category = new Category(id, cursor.getString(cursor.getColumnIndex(\"Name\")), cursor.getString(cursor.getColumnIndex(\"Image\")));\n Log.d(\"TAG\", \"getListCategory: \" + category.getId());\n list.add(category);\n }\n cursor.close();\n dbHelper.close();\n return list;\n }", "@Override\n\t@Transactional\n\n\tpublic void initCategorie() {\n\t\tStream.of(\"Action\",\"Drame\",\"Guerre\",\"Fantastique\",\"Science-fiction\",\"Thriller\").forEach(cat->{\n\t\t\tCategorie categorie=new Categorie();\n\t\t\tcategorie.setName(cat);\n\t\t\tcategorieRepository.save(categorie);\n\t\t});\n\t}", "public List<Categoria> listarCategorias(){\n //este metodo devuelve una lista.\n return categoriaRepo.findAll(); \n\n }", "@Override\r\n\tpublic List<Category> getAllCategories() throws CategoryRetrievalException {\n\t\ttry {\r\n\t\t\treturn categoryDao.getAllCategories();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tthrow new CategoryRetrievalException(\"error in retriving Category\");\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic List<Category> findAll() {\n\t\treturn(List<Category>) em.createNamedQuery(\"findAllCategories\").getResultList();\r\n\t}", "public static ArrayList<String> getCategories() {\n String query;\n ArrayList<String> categories = new ArrayList<String>();\n\n try {\n Connection con = Database.createDBconnection();\n Statement stmt = con.createStatement();\n query = \"SELECT category FROM category;\";\n ResultSet rs = stmt.executeQuery(query);\n\n while(rs.next()) {\n categories.add(rs.getString(\"category\"));\n }\n\n Database.closeDBconnection(con);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n return categories;\n }", "@RequestMapping(value = \"/allCategory\", method = RequestMethod.POST)\r\n\tpublic ModelAndView loadallCategory() {\r\n\t\tModelAndView modelAndView = null;\r\n\t\tList<Category> categoryObjLst = chooseAssessmentService.fetchAssessmentCategory();\r\n\t\tChooseAssessment assessment = new ChooseAssessment();\r\n\t\tassessment.setCategoryObjList(categoryObjLst);\r\n\t\tmodelAndView = new ModelAndView(\"attemptsQuestionsPage\", \"assessment\", assessment);\r\n\r\n\t\tmodelAndView.addObject(\"categoryObjs\", categoryObjLst);\r\n\t\treturn modelAndView;\r\n\t}", "public List<Cvcategory> findAllCvcategories();", "@Override\n\tpublic List<Category> findAll() {\n\t\treturn findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "private void getCategoryList() {\n jsonArray = dataBaseHelper.getCategoriesFromDB();\n if (jsonArray != null && jsonArray.length() > 0) {\n rvCategories.setVisibility(View.VISIBLE);\n setupCategoryListAdapter(jsonArray);\n }else {\n rvCategories.setVisibility(View.GONE);\n Toast.makeText(getActivity(), Constants.ERR_NO_CATEGORY_FOUND, Toast.LENGTH_SHORT).show();\n }\n }", "public List<Category> queryExistingCategory(){\n\t\tArrayList<Category> cs = new ArrayList<Category>(); \n\t\tCursor c = queryTheCursorCategory(); \n\t\twhile(c.moveToNext()){\n\t\t\tCategory category = new Category();\n\t\t\tcategory._id = c.getInt(c.getColumnIndex(\"_id\"));\n\t\t\tcategory.title = c.getString(c.getColumnIndex(DBEntryContract.CategoryEntry.COLUMN_NAME_TITLE));\n\t\t\tcategory.numberOfEntries = this.queryLocationEntryNumberByCategory(category._id);\n\t\t\tcs.add(category);\n\t\t}\n\t\t// close the cursor\n\t\tc.close();\n\t\treturn cs;\n\t\t\n\t}", "public static ArrayList<AdminCategory> fetchCategoryList() {\r\n\r\n\t\tArrayList<AdminCategory> categoryList = new ArrayList<AdminCategory>();\r\n\r\n\t\tsqlQuery = \"SELECT categoryName, status, B.level,\" +\r\n\t\t\t\t\"(SELECT categoryName FROM flipkart_category A WHERE A.categoryID=C.parentID) AS parentCategory, \" +\r\n\t\t\t\t\"B.categoryID \" +\r\n\t\t\t\t\"FROM flipkart_category B, flipkart_path C \" +\r\n\t\t\t\t\"WHERE B.categoryID=C.categoryID ORDER BY B.level;\";\r\n\r\n\t\ttry{\r\n\t\t\tconn=DbConnection.getConnection();\r\n\t\t\tps=conn.prepareStatement(sqlQuery);\r\n\t\t\trs=ps.executeQuery();\r\n\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tAdminCategory category = new AdminCategory();\r\n\t\t\t\tcategory.setCategoryName(rs.getString(1));\r\n\t\t\t\tcategory.setStatus(rs.getInt(2));\r\n\t\t\t\tcategory.setLevel(rs.getInt(3));\r\n\t\t\t\tcategory.setParentCategory(rs.getString(4));\r\n\t\t\t\tcategory.setCategoryID(rs.getInt(5));\r\n\t\t\t\tcategoryList.add(category);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn categoryList;\r\n\t}", "public static void consultarListaCategorias(Activity activity) {\n ConexionSQLite conectar = new ConexionSQLite(activity, BASE_DATOS, null, 1);\n SQLiteDatabase db = conectar.getReadableDatabase();\n CategoriaVo categoria = null;\n listaCategorias = new ArrayList<CategoriaVo>();\n Cursor cursor = db.rawQuery(\"SELECT * FROM \"+TABLA_CATEGORIAS, null);\n\n while (cursor.moveToNext()) {\n categoria = new CategoriaVo();\n categoria.setId(cursor.getInt(0));\n categoria.setCategoria(cursor.getString(1));\n categoria.setDescripcion(cursor.getString(2));\n\n listaCategorias.add(categoria);\n }\n db.close();\n }", "private void loadCategories(CategoriesCallback callback) {\n CheckItemsActivity context = this;\n makeRestGetRequest(RestClient.CATEGORIES_URL, (success, response) -> {\n if (!success) {\n Toast.makeText(context, LOAD_CATEGORIES_FAIL, Toast.LENGTH_SHORT).show();\n // TODO: finish activity\n } else {\n try {\n categories = ModelsBuilder.getCategoriesFromJSON(response);\n // set categories list to spinner (common category spinner) and listener for it\n ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(context,\n android.R.layout.simple_spinner_item,\n categories);\n spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n categorySpinner.setAdapter(spinnerAdapter);\n categorySpinner.setOnItemSelectedListener(new OnCommonCategorySelected());\n } catch (JSONException e) {\n success = false;\n Log.d(DEBUG_TAG, \"Load categories parsing fail\");\n }\n }\n // inform waiting entities (e.g. waiting for items list loading start)\n callback.onLoadedCategories(success);\n });\n }", "public Flowable<List<Category>> getCategories() {\n return findAllData(Category.class);\n }", "public List<DocCategory> getAllDocCategories() {\n return docCategoryRepository.findAll();\n }", "public List<CategoriaEntity> findAll() {\n LOGGER.log(Level.INFO, \"Consultando todas las categorias\");\n // Se crea un query para buscar todas las categorias en la base de datos.\n TypedQuery query = em.createQuery(\"select u from CategoriaEntity u\", CategoriaEntity.class);\n // Note que en el query se hace uso del método getResultList() que obtiene una lista de categorias.\n return query.getResultList();\n }", "@Transactional\n\tpublic List<CategoryEntity> GetCategory() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\n\t\tList<CategoryEntity> categoryEntities = session.createQuery(\"from category\").getResultList();\n\n\t\treturn categoryEntities;\n\t}", "public synchronized ActionCategories loadMedicalActionCategories()\n\t{\n\t\t// if action categories is null\n\t\tif (medicalActionCategories == null)\n\t\t{\n\t\t\t// create an xml serializator\n\t\t\tSimpleXMLSerializator serializator = new SimpleXMLSerializator();\n\t\t\t// Open categories file\n\t\t\tFile categoriesFile = new File(StorageModule.getInstance().getBasePath() + \"/\" + CATEGORIES_RELATIVE_PATH);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// load medicalactions categories\n\t\t\t\tmedicalActionCategories = (ActionCategories) serializator.deserialize(categoriesFile, ActionCategories.class);\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\tlog.error(\"An error ocurred while reading categories file.\", e);\n\t\t\t\tmedicalActionCategories = new ActionCategories();\n\t\t\t}\n\t\t}\n\t\treturn medicalActionCategories;\n\t}", "public static List<Category> getCategories(Context context) {\r\n DbManager dbManager = new DbManager(context);\r\n SQLiteDatabase db = dbManager.getReadableDatabase();\r\n\r\n Cursor cursor = db.query(\r\n CategoryTable.TABLE_NAME,\r\n new String[]{CategoryTable._ID, CategoryTable.COLUMN_NAME_CATEGORY_NAME},\r\n CategoryTable.COLUMN_NAME_IS_DELETED + \" = 0\",\r\n null,\r\n null,\r\n null,\r\n CategoryTable.COLUMN_NAME_CATEGORY_NAME + \" ASC\"\r\n );\r\n\r\n List<Category> categories = new ArrayList<>();\r\n while(cursor.moveToNext()) {\r\n Category category = new Category();\r\n category._id = cursor.getInt(cursor.getColumnIndexOrThrow(CategoryTable._ID));\r\n category.category = cursor.getString(cursor.getColumnIndexOrThrow(CategoryTable.COLUMN_NAME_CATEGORY_NAME));\r\n categories.add(category);\r\n }\r\n cursor.close();\r\n db.close();\r\n\r\n return categories;\r\n }", "private void listadoCategorias() {\r\n sessionProyecto.getCategorias().clear();\r\n sessionProyecto.setCategorias(itemService.buscarPorCatalogo(CatalogoEnum.CATALOGOPROYECTO.getTipo()));\r\n }", "@PostConstruct\n void init() {\n categoryRepository.findAll().forEach(category -> findOne(category.getId()));\n }", "public List<CatMovie> getAllCatMovies() throws DalException\n {\n ArrayList<CatMovie> allCatMovies = new ArrayList<>();\n // Attempts to connect to the database.\n try ( Connection con = dbCon.getConnection())\n {\n // SQL code. \n String sql = \"SELECT * FROM CatMovie;\";\n // Create statement.\n Statement statement = con.createStatement();\n // Attempts to execute the statement.\n ResultSet rs = statement.executeQuery(sql);\n while (rs.next())\n {\n // Add all to a list\n CatMovie catMovie = new CatMovie();\n catMovie.setCategoryId(rs.getInt(\"categoryId\"));\n catMovie.setMovieId(rs.getInt(\"movieId\"));\n\n allCatMovies.add(catMovie);\n }\n //Return\n return allCatMovies;\n\n } catch (SQLException ex)\n {\n Logger.getLogger(CatMovieDBDAO.class\n .getName()).log(Level.SEVERE, null, ex);\n throw new DalException(\"Can´t do that\");\n }\n }", "public static List<Categorias> obtenerCategorias(){\n List<Categorias> categorias = new ArrayList<>();\n \n Categorias c = new Categorias();\n \n c.conectar();\n \n c.crearQuery(\"select * from categoria_libro\");\n \n ResultSet informacion = c.getResultSet();\n \n try {\n while (informacion.next())\n categorias.add(new Categorias(informacion));\n } catch (Exception error) {}\n \n c.desconectar();\n \n return categorias;\n }", "public List<Category> list() {\n\t\tSession session = getSession();\n\n\t\tQuery query = session.createQuery(\"from Category\");\n\t\tList<Category> categoryList = query.list();\n session.close();\n\t\treturn categoryList;\n\t}", "List<MusclegroupCategory> getAllMusclegroup() throws PersistenceException;", "public List<Category> findAllCategoryt_id() {\n\t\treturn null;\n\t\t\n\t}", "public List<Category> getAllCategories() {\n\t dbUtil = new DBUtil();\n\t StringBuffer sbQuery = dbUtil.getQueryBuffer();\n\t ArrayList<String> args = dbUtil.getArgs();\n\t ResultSet rs = null;\n\t List<Category> listCategory = null;\n\t \n\t /*** Get the details of a particular Category ***/\n\t /*** QUERY ***/\n\t sbQuery.setLength(0);\n\t sbQuery.append(\" SELECT \");\n\t sbQuery.append(\" id, \");\n\t sbQuery.append(\" name, \");\n\t sbQuery.append(\" userid \");\n\t sbQuery.append(\" FROM lookup.category \");\n\t \n\t /*** Prepare parameters for query ***/\n\t args.clear();\n\t \n\t \n\t /*** Pass the appropriate arguments to DBUtil class ***/\n\t rs = dbUtil.executeSelect(sbQuery.toString(), args);\n\t \n\t /*** Convert the result set into a User object ***/\n\t if(rs!=null)\n\t listCategory = TransformUtil.convertToListCategory(rs);\n\t \n\t dbUtil.closeConnection();\n\t dbUtil = null;\n\t \n\t return listCategory;\n\t}", "List<Category> listAllCategoriesByStoreId(Integer storeId);", "@Transactional\r\n\tpublic List<CmVocabularyCategory> getCmVocabularyCategorys() {\r\n\t\treturn dao.findAllWithOrder(CmVocabularyCategory.class, \"modifyTimestamp\", false);\r\n\t}", "@Override\n protected ArrayList<Categorie> doInBackground(String... urls) {\n Log.i(\"smart\", \"DoInBackground\");\n ArrayList<Categorie> categories = CategorieSQL.selectAll();\n return categories;\n }", "List<Category> findAll(Integer page,Integer pageSize)throws Exception;", "@Override\n\tprotected Object[][] fetchAll(int limit, int offset) {\n\t\tArrayList<Category> items = new Categories().findAll(limit, offset);\n\n\t\tIterator<Category> it = items.iterator();\n\t\tObject[][] results = new Object[items.size()][];\n\t\tint i = 0;\n\n\t\twhile (it.hasNext()) {\n\t\t\tCategory category = it.next();\n\t\t\tresults[i] = new Object[] { category.getId(), category.getName(), category.getGameId(), category.getCreatedAt(), category.getUpdatedAt() };\n\t\t\ti++;\n\t\t}\n\n\t\treturn results;\n\t}", "@Override\n\tpublic List<AnimalCategory> findCategory() {\n\t\tList<AnimalCategory> list = animaldao.findCategory();\n\t\treturn list;\n\t}", "@Override\n @Transactional(readOnly = true)\n @Cacheable\n public Page<Category> findAll(Pageable pageable) {\n log.debug(\"Request to get all Categories\");\n return categoryRepository.findAll(pageable);\n }", "@GetMapping(\"/category\")\n\t public ResponseEntity<List<Category>> getcategorys() {\n\n\t List<Category> list = categoryService.getAllcategorys();\n\t if (list.size() <= 0) {\n\t return ResponseEntity.status(HttpStatus.NOT_FOUND).build();\n\t }\n\t return ResponseEntity.status(HttpStatus.CREATED).body(list);\n\t }", "@Override\n public List<CategoryDTO> listAll() {\n List<CategoryDTO> result = new ArrayList<>();\n List<Category> listCategory = categoryRepository.findAll();\n for (Category category: listCategory){\n result.add(categoryConverter.toDTO(category));\n }\n return result;\n }", "public void librosPorCategorian() {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tCategoriaDAO OwlDAO = new CategoriaDAO();\n\t\t\tList<LibroVO> resultado = new ArrayList();\n\t\t\tOwlDAO.actualizarCategorian(mysql);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}", "public List<Movie> getMoviesFromCats(Category chosenCat) throws DalException\n {\n\n ArrayList<Movie> categoryMovies = new ArrayList<>();\n // Attempts to connect to the database.\n try ( Connection con = dbCon.getConnection())\n {\n Integer idCat = chosenCat.getId();\n // SQL code. \n String sql = \"SELECT * FROM Movie INNER JOIN CatMovie ON Movie.id = CatMovie.movieId WHERE categoryId=\" + idCat + \";\";\n\n Statement statement = con.createStatement();\n ResultSet rs = statement.executeQuery(sql);\n\n while (rs.next())\n {\n // Add all to a list\n Movie movie = new Movie();\n movie.setId(rs.getInt(\"id\"));\n movie.setName(rs.getString(\"name\"));\n movie.setRating(rs.getDouble(\"rating\"));\n movie.setFilelink(rs.getString(\"filelink\"));\n movie.setLastview(rs.getDate(\"lastview\").toLocalDate());\n movie.setImdbRating(rs.getDouble(\"imdbrating\"));\n categoryMovies.add(movie);\n }\n //Return\n return categoryMovies;\n\n } catch (SQLException ex)\n {\n Logger.getLogger(MovieDBDAO.class\n .getName()).log(Level.SEVERE, null, ex);\n throw new DalException(\"Nope can´t do\");\n }\n\n }", "public List<CategoriaVO> mostrarCategorias() {\n\t\tJDBCTemplate mysql = MysqlConnection.getConnection();\n\t\ttry {\n\t\t\tmysql.connect();\n\t\t\tCategoriaDAO OwlDAO = new CategoriaDAO();\n\t\t\tList<CategoriaVO> resultado = new ArrayList();\n\t\t\tresultado = OwlDAO.obtenerCategorias(mysql);\n\t\t\treturn resultado;\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.err);\n\t\t\treturn null;\n\n\t\t} finally {\n\t\t\tmysql.disconnect();\n\t\t}\n\t}", "@Override\n\tpublic List<Categories> getListCat() {\n\t\treturn categoriesDAO.getListCat();\n\t}", "@RequestMapping(value = \"/categories\", method = RequestMethod.GET, produces = \"application/json\")\n public Collection<String> getCategories() {\n return this.datasetService.getCategories();\n }", "public void setCategories(Categories categories) {\n this.categories = categories;\n }", "@Test\n public void getAllRecipeCategories_ReturnsList(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returned);\n assertNotEquals(\"getAllRecipeCategories - Non-empty List Returned\", 0, allCategories.size());\n }", "@Override\n\tpublic void removeAll() {\n\t\tfor (Category category : findAll()) {\n\t\t\tremove(category);\n\t\t}\n\t}", "private void initialiseCategories() {\n\t\t_nzCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/nz\");\n\t\t_intCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/international\");\n\t}", "@Override\n\tpublic List<SApplicationcategory> findAll() {\n\t\treturn SApplicationcategorydao.find(\"from \"+tablename);\n\t}", "@ModelAttribute(\"categories\")\r\n\tpublic List<Category> getCategoryList() {\r\n\t\treturn categoryDAO.list();\r\n\t}", "public ArrayList<TagCategory> loadTaglist() {\n\t\tFile src = new File(directory, FILENAME_TAGS);\n\t\treturn storageReader.loadTaglist(src);\n\t}", "@GetMapping\n\t public List<Categories> touslescategories() {\n\t\treturn catsociete.findAll();}", "public static void checkCategoryInDb() {\n try {\n Category category = Category.listAll(Category.class).get(0);\n\n } catch (Exception e) {\n Category undefinedCategory = new Category();\n undefinedCategory.setCategoryId(1);\n undefinedCategory.setCategoryName(\"Others\");\n undefinedCategory.save();\n }\n }", "private void readCategories() throws Exception {\n\t\t//reads files in nz category\n\t\tif (_nzCategories.size() > 0) {\n\t\t\tfor (String category: _nzCategories) {\n\t\t\t\t// read each individual line from the category files and store it\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"categories/nz/\", category);\n\t\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\t\tList<String> allLines = new ArrayList<String>();\n\t\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\t\tallLines.add(fileLine);\n\t\t\t\t\t}\n\t\t\t\t\tList<String> copy = new ArrayList<String>(allLines);\n\t\t\t\t\t_nzData.put(category, copy);\n\t\t\t\t\tallLines.clear();\n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//reads file in international categories\n\t\tif (_intCategories.size() > 0) {\n\t\t\tfor (String category: _intCategories) {\n\t\t\t\t// read each individual line from the category files and store it\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(\"categories/international/\", category);\n\t\t\t\t\tScanner myReader = new Scanner(file);\n\t\t\t\t\tList<String> allLines = new ArrayList<String>();\n\t\t\t\t\twhile(myReader.hasNextLine()) {\n\t\t\t\t\t\tString fileLine = myReader.nextLine();\n\t\t\t\t\t\tallLines.add(fileLine);\n\t\t\t\t\t}\n\t\t\t\t\tList<String> copy = new ArrayList<String>(allLines);\n\t\t\t\t\t_intData.put(category, copy);\n\t\t\t\t\tallLines.clear();\n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic List<Category> queryCategory() throws SQLException {\n\t\treturn productDao.queryCategory();\n\t}", "public List<Category> getCatForMovies(Movie chosenMovie) throws DalException\n {\n ArrayList<Category> allCatForMovies = new ArrayList<>();\n // Attempts to connect to the database.\n try ( Connection con = dbCon.getConnection())\n {\n Integer idMov = chosenMovie.getId();\n // SQL code. \n String sql = \"SELECT * FROM Category INNER JOIN CatMovie ON Category.id = CatMovie.categoryId WHERE movieId='\" + idMov + \"';\";\n // Create statement.\n Statement statement = con.createStatement();\n // Attempts to execute the statement.\n ResultSet rs = statement.executeQuery(sql);\n while (rs.next())\n {\n\n // Add all to a list\n Category category = new Category();\n category.setId(rs.getInt(\"id\"));\n category.setName(rs.getString(\"name\"));\n\n allCatForMovies.add(category);\n }\n //Return\n return allCatForMovies;\n\n } catch (SQLException ex)\n {\n Logger.getLogger(CatMovieDBDAO.class\n .getName()).log(Level.SEVERE, null, ex);\n throw new DalException(\"Can´t do that\");\n }\n }", "@Query(\"SELECT * FROM species_category ORDER BY name\")\n LiveData<List<SpeciesCategory>> getCategories();" ]
[ "0.78566766", "0.7706488", "0.7430425", "0.7402686", "0.7152647", "0.7063937", "0.70247793", "0.6968725", "0.6930432", "0.68895495", "0.68744534", "0.68569565", "0.68360025", "0.67949724", "0.6789528", "0.67861474", "0.677567", "0.67707133", "0.672303", "0.6719461", "0.6701331", "0.66768026", "0.6666192", "0.6663318", "0.6655469", "0.66397893", "0.66363776", "0.6627131", "0.6580983", "0.6578454", "0.65622884", "0.6543529", "0.6542319", "0.65350384", "0.6532764", "0.65131754", "0.6511959", "0.6467091", "0.64663947", "0.64423245", "0.6411443", "0.6407339", "0.6394955", "0.6386897", "0.6374762", "0.63727564", "0.63600755", "0.6345355", "0.63349324", "0.6331051", "0.632307", "0.63179576", "0.62737787", "0.6271447", "0.6245655", "0.62162334", "0.62053084", "0.6204302", "0.6198496", "0.6167508", "0.61669695", "0.6132538", "0.6123076", "0.6112601", "0.6110724", "0.61087966", "0.6093987", "0.6075566", "0.607546", "0.6059207", "0.6054855", "0.6051963", "0.6046015", "0.60156554", "0.5997166", "0.5986514", "0.59791344", "0.59610546", "0.5934126", "0.5923514", "0.5917759", "0.59083784", "0.59031796", "0.5902847", "0.5902379", "0.5879305", "0.587663", "0.5874976", "0.5869257", "0.5858605", "0.58527005", "0.584943", "0.5842667", "0.5840037", "0.583337", "0.5831897", "0.5829136", "0.5825318", "0.58097935", "0.57990634", "0.57889676" ]
0.0
-1
A method to execute a select statement
public ResultSet executeQueryStatement(String statement) throws SQLException { Statement sqlStmt = connection.createStatement(); // execute the statement and check whether there is a result return sqlStmt.executeQuery(statement); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void executeSelect(String query){\n try {\n statement = connection.createStatement();\n rs = statement.executeQuery(query);\n } catch (SQLException e) {\n throw new RuntimeException(e);\n } \n }", "Object executeSelectQuery(String sql) { return null;}", "SELECT createSELECT();", "public void execute() throws SQLException {\n\t\ttry {\n\t\t\tselect.setUsername(\"INTRANET\");\n\t\t\tselect.setPassword(\"INTRANET\");\n\t\t\tselect.execute();\n\t\t}\n\n\t\t// Liberar recursos del objeto select.\n\t\tfinally {\n\t\t\tselect.close();\n\t\t}\n\t}", "ResultSet runSQL(String query) {\n try {\n return connection.prepareStatement(query).executeQuery();\n }\n catch (SQLException e) {\n System.err.println(e.getMessage());\n return null;\n }\n }", "public ResultSet querySelect(String query) throws SQLException {\n\t \t\t// Création de l'objet gérant les requêtes\n\t \t\tstatement = cnx.createStatement();\n\t \t\t\n\t \t\t// Exécution d'une requête de lecture\n\t \t\tResultSet result = statement.executeQuery(query);\n\t \t\t\n\t \t\treturn result;\n\t \t}", "public void getSelect(String query, ArrayList<Object> params) {\r\n\t\tif (null != connection) {\r\n\t\t\tSystem.out.println(QueryProcessor.exec(connection, query, params));\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Hubo algún error con la conexión...\");\r\n\t\t}\r\n\t}", "public abstract Statement queryToRetrieveData();", "protected T selectImpl(String sql, String... paramentros) {\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tcursor = BancoHelper.db.rawQuery(sql, paramentros);\n\t\t\t\n\t\t\tif (cursor.getCount() > 0 && cursor.moveToFirst()) {\n\t\t\t\treturn fromCursor(cursor);\n\t\t\t}\n\n\t\t\tthrow new RuntimeException(\"Não entrou no select\");\n\n\t\t} finally {\n\n\t\t\tif (cursor != null && !cursor.isClosed()) {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t}\n\n\t}", "public ResultSet executeSQL() {\t\t\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch(SQLException se) {\n\t\t\t} finally {\n\t\t\t\trs = null;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\trs = pstmt.executeQuery();\n\t\t} catch (SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}\n\t\treturn rs;\n\t}", "public ResultSet runQuery(String sql){\n\n try {\n\n Statement stmt = conn.createStatement();\n\n return stmt.executeQuery(sql);\n\n } catch (SQLException e) {\n e.printStackTrace(System.out);\n return null;\n }\n\n }", "private void executeQuery() {\n }", "public ResultSet executeQuery() throws SQLException {\n return statement.executeQuery();\n }", "public void prepareExecuteSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteSelect();\n }", "protected abstract void select();", "public ResultSet exicutionSelect(Connection con, String Query) throws SQLException {\n\tStatement stmt = con.createStatement();\n\t\n\t// step4 execute query\n\t\tResultSet rs = stmt.executeQuery(Query);\n\t\treturn rs;\n\t\n\t}", "ResultSet executeQuery() throws SQLException;", "SelectQuery createSelectQuery();", "public ResultSet doQuery( String sql) throws SQLException {\r\n\t\tif (dbConnection == null)\r\n\t\t\treturn null;\r\n\t\t// prepare sql statement\r\n\t\toutstmt = dbConnection.prepareStatement(sql);\r\n\t\tif (outstmt == null)\r\n\t\t\treturn null;\r\n\t\tif (outstmt.execute()){\r\n\t\t\t//return stmt.getResultSet(); //old\r\n\t\t\toutrs = outstmt.getResultSet();\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn null;\r\n\t\treturn outrs;\r\n\t}", "protected synchronized ResultSet pureSQLSelect(String query) {\n if(this.connect()) {\n try {\n this.statement = this.connection.createStatement();\n this.resultSet = this.statement.executeQuery(query);\n } catch(SQLException ex) {\n Logger.getLogger(MySQLMariaDBConnector.class.getName()).log(Level.SEVERE, null, ex);\n this.resultSet = null;\n }\n }\n return this.resultSet;\n }", "private void selectOperator() {\n String query = \"\";\n System.out.print(\"Issue the Select Query: \");\n query = sc.nextLine();\n query.trim();\n if (query.substring(0, 6).compareToIgnoreCase(\"select\") == 0) {\n sqlMngr.selectOp(query);\n } else {\n System.err.println(\"No select statement provided!\");\n }\n }", "public void selectQuery(String query) {\n\t\tQuery q = QueryFactory.create(query);\n\t\tQueryExecution qe = QueryExecutionFactory.create(q, model);\n\t\tResultSet result = qe.execSelect();\n\t\tprintResultSet(result);\n\t\tqe.close();\n\t}", "private static void selectRecordsFromDbUserTable() throws SQLException {\n\n\t\tConnection dbConnection = null;\n\t\tStatement statement = null;\n\n\t\tString selectTableSQL = \"SELECT * from spelers\";\n\n\t\ttry {\n\t\t\tdbConnection = getDBConnection();\n\t\t\tstatement = dbConnection.createStatement();\n\n\t\t\tSystem.out.println(selectTableSQL);\n\n\t\t\t// execute select SQL stetement\n\t\t\tResultSet rs = statement.executeQuery(selectTableSQL);\n\n\t\t\twhile (rs.next()) {\n \n String naam = rs.getString(\"naam\");\n\t\t\t\tint punten = rs.getInt(\"punten\");\n \n System.out.println(\"naam : \" + naam);\n\t\t\t\tSystem.out.println(\"punten : \" + punten);\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t} finally {\n\n\t\t\tif (statement != null) {\n\t\t\t\tstatement.close();\n\t\t\t}\n\n\t\t\tif (dbConnection != null) {\n\t\t\t\tdbConnection.close();\n\t\t\t}\n\n\t\t}\n\n\t}", "public ResultSet executeQueryCmd(String sql) {\n\t\ttry {\n\t\t\treturn stmt.executeQuery(sql);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} \n\t}", "public void executeQuery(Statement stmt, String query) throws SQLException {\n //check if it is select\n Boolean ret = stmt.execute(query);\n if (ret) {\n ResultSet result = stmt.executeQuery(query);\n ResultSetMetaData rsmd = result.getMetaData();\n int columnCount = rsmd.getColumnCount();\n // The column count starts from 1\n\n //ArrayList<String> column_names = new ArrayList<String>();\n for (int i = 1; i <= columnCount; i++) {\n String name = rsmd.getColumnName(i);\n //column_names.add(name);\n System.out.format(\"|%-30s \",name);\n // Do stuff with name\n }\n System.out.println();\n\n while (result.next()) {\n for (int i = 0; i < columnCount; i++) {\n System.out.format(\"|%-30s \",result.getString(i+1));\n }\n System.out.println();\n }\n // STEP 5: Clean-up environment\n result.close();\n }\n }", "public ResultSet execute(final String stmt) throws SQLException {\n return connection.createStatement().executeQuery(stmt);\n }", "public ResultSet ExecuteQuery(String statement) throws SQLException{\r\n\t\treturn _dbStatement.executeQuery(statement);\r\n\t}", "private ResultSet execute_statement(String sql, boolean returns_rs) {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n\n try {\n connection = this.connect(); //connect to database\n statement = connection.createStatement();\n if (returns_rs) {\n resultSet = statement.executeQuery(sql); //calculate resultSet\n } else {\n statement.execute(sql); //execute statement\n }\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n if (!returns_rs) {\n try {\n this.disconnect(null, statement, connection); //disconnect from database\n } catch (SQLException ignored) {\n\n }\n }\n }\n return resultSet;\n }", "List<Map<String,Object>> executeSelectQuery(String query) {\n\n\t\t// preparing the list for the retrieved statements in the database\n\t\tList<Map<String, Object>> statementsList = new ArrayList<>();\n\n\t\ttry {\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tstatement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t\t\t// the ResultSet represents a table of data retrieved in the database\n\t\t\tResultSet rs = statement.executeQuery(query);\n\n\t\t\t// the ResultSetMetaData represents all the metadata of the ResultSet\n\t\t\tResultSetMetaData rsmd = rs.getMetaData();\n\t\t\tint columnsNumber = rsmd.getColumnCount();\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tMap<String, Object> statementMap = new HashMap<>();\n\n\t\t\t\tfor (int i = 1; i <= columnsNumber; i++) {\n\n\t\t\t\t\tint columnType = rsmd.getColumnType(i);\n\n\t\t\t\t\tswitch (columnType) {\n\t\t\t\t\t\tcase Types.VARCHAR:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getString(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.NULL:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), null);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.CHAR:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getString(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.TIMESTAMP:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getTimestamp(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.DOUBLE:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getDouble(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.INTEGER:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getString(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.SMALLINT:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getInt(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Types.DECIMAL:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getBigDecimal(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tstatementMap.put(rsmd.getColumnLabel(i), rs.getString(i));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// adding the Map to the statementsList\n\t\t\t\tstatementsList.add(statementMap);\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// in the end, we return the populated statementsList\n\t\treturn statementsList;\n\t}", "protected void createSelectStatement() throws Exception\n {\n selectStatement = new SQLStatementWithParams();\n\n // Generate the SQL and collect all host variables needed to execute it later\n generateSelectClause( wrqInfo, selectStatement );\n generateFromClause( wrqInfo, selectStatement );\n generateWhereClause( wrqInfo, selectStatement );\n generateGroupingClause( wrqInfo, selectStatement );\n generateHavingClause( wrqInfo, selectStatement );\n generateOrderClause( wrqInfo, selectStatement );\n }", "public static String getSelectStatement() {\n return SELECT_STATEMENT;\n }", "public static ResultSet executeSelectQuery(String query){\n\t\tStatement statement = null;\n\t\tResultSet resultSet = null;\n\t\tCachedRowSetImpl cachedRowSet = null;\n\t\ttry{\n\t\t\tconnectDatabase();\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(query);\n\t\t\tcachedRowSet = new CachedRowSetImpl(); // cache the resultset\n\t\t\tcachedRowSet.populate(resultSet);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry{\n\t\t\t\t// close the connections\n\t\t\t\tif (resultSet != null) resultSet.close();\n\t\t\t\tif (statement != null) statement.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tdisconnectDatabase();\n\t\t}\n\t\treturn cachedRowSet;\n\t}", "public ResultSet executeQuery(String sql) throws Exception {\n\n\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t// stmt.close();\n\t\treturn rs;\n\t}", "public ResultSet getResultSetFromGivenQuery(Connection connection, String selectQuery) throws SQLException {\n\t\t stmt = connection.createStatement (ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n\t\t resultSet = stmt.executeQuery (selectQuery); \n\n\t\treturn resultSet;\n\t}", "public abstract ResultList executeSQL(RawQuery rawQuery);", "private void executeRequest(String sql) {\n\t}", "public Vector executeCmd_v2(String sql_stmt) {\n \tVector v = null;\n \tListIterator li = null;\n \ttry {\n \t//String ipAddr = request.getRemoteAddr();\n \tContext initContext = new InitialContext();\n \tContext envContext = (Context)initContext.lookup(\"java:/comp/env\");\n \tds = (DataSource)envContext.lookup(\"jdbc\"+beans.setting.Constants.getDbschema());\n \tcon = ds.getConnection();\n \t//update civitas\n \tstmt = con.prepareStatement(sql_stmt);\n \tif(sql_stmt.startsWith(\"select\")||sql_stmt.startsWith(\"SELECT\")||sql_stmt.startsWith(\"Select\")) {\n \t\trs = stmt.executeQuery();\n \t\tResultSetMetaData rsmd = rs.getMetaData();\n \t\tint columnsNumber = rsmd.getColumnCount();\n \t\tString col_label = null;\n \t\tString col_type = null;\n \t\tfor(int i=1;i<=columnsNumber;i++) {\n \t\t\t//getColumnName\n \t\t\t\tString col_name = rsmd.getColumnLabel(i);\n \t\t\t\tif(col_label==null) {\n \t\t\t\t\tcol_label = new String(col_name);\n \t\t\t\t\tcol_type = new String(\"`\");\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tcol_label = col_label+\"`\"+col_name;\n \t\t\t\t}\n \t\t\t\t//get col type\n \t\t\t\tint type = rsmd.getColumnType(i);\n \t\t\t\tif(type == java.sql.Types.DATE) {\n \t\t\t\t\tcol_type = col_type+\"date`\";\n \t\t\t\t}\n \t\t\t\telse if(type == java.sql.Types.DECIMAL || type == java.sql.Types.DOUBLE || type == java.sql.Types.FLOAT ) {\n \t\t\t\t\tcol_type = col_type+\"double`\";\n \t\t\t\t}\n \t\t\t\telse if(type == java.sql.Types.INTEGER || type == java.sql.Types.BIGINT || type == java.sql.Types.NUMERIC || type == java.sql.Types.SMALLINT) {\n \t\t\t\t\tcol_type = col_type+\"long`\";\n \t\t\t\t}\n \t\t\t\telse if(type == java.sql.Types.VARCHAR || type == java.sql.Types.LONGNVARCHAR || type == java.sql.Types.LONGVARCHAR || type == java.sql.Types.CHAR || type == java.sql.Types.NCHAR) {\n \t\t\t\t\tcol_type = col_type+\"string`\";\n \t\t\t\t}\n \t\t\t\telse if(type == java.sql.Types.TIME) {\n \t\t\t\t\tcol_type = col_type+\"time`\";\n \t\t\t\t}\n \t\t\t\telse if(type == java.sql.Types.BOOLEAN || type == java.sql.Types.TINYINT) {\n \t\t\t\t\tcol_type = col_type+\"boolean`\";\n \t\t\t\t}\n \t\t\t\telse if(type == java.sql.Types.TIMESTAMP) {\n \t\t\t\t\tcol_type = col_type+\"timestamp`\";\n \t\t\t\t}\n \t\t\t}\n \t\tif(v==null) {\n \t\t\t\tv = new Vector();\n \t\t\t\tli=v.listIterator();\n \t\t\t\tli.add(col_type);\n \t\t\t\tli.add(col_label);\n \t\t\t}\n \t\t\t\n \t\t//System.out.println(\"columnsNumber=\"+columnsNumber);\n \t\tString brs = null;\n \t\twhile(rs.next()) {\n \t\t\tfor(int i=1;i<=columnsNumber;i++) {\n \t\t\t\tString tmp = \"\";\n \t\t\t\t/*\n \t\t\t\t * ADA 2 metode cek column type, karena diupdate yg baruan adalah cara yg diatas, belum tau mana yg lebih efektif\n \t\t\t\t */\n \t\t\t\tcol_type = rsmd.getColumnTypeName(i);\n \t\t\t\t\n \t\t\t\tif(col_type.equalsIgnoreCase(\"VARCHAR\")||col_type.equalsIgnoreCase(\"TEXT\")||col_type.startsWith(\"CHAR\")) {\n \t\t\t\t\ttmp = \"\"+rs.getString(i);\n \t\t\t\t}\n \t\t\t\telse if(col_type.equalsIgnoreCase(\"TINYINT\")) {\n \t\t\t\t\ttmp = \"\"+rs.getBoolean(i);\n \t\t\t\t}\n \t\t\t\telse if(col_type.contains(\"INT\")||col_type.contains(\"LONG\")) {\n \t\t\t\t\ttmp = \"\"+rs.getLong(i);\n \t\t\t\t}\n \t\t\t\telse if(col_type.equalsIgnoreCase(\"DATE\")) {\n \t\t\t\t\ttmp = \"\"+rs.getDate(i);\n \t\t\t\t}\n \t\t\t\telse if(col_type.equalsIgnoreCase(\"DECIMAL\")||col_type.equalsIgnoreCase(\"DOUBLE\")||col_type.equalsIgnoreCase(\"FLOAT\")) {\n \t\t\t\t\ttmp = \"\"+rs.getDouble(i);\n \t\t\t\t}\n \t\t\t\telse if(col_type.equalsIgnoreCase(\"TIMESTAMP\")||col_type.equalsIgnoreCase(\"DATETIME\")) {\n \t\t\t\t\ttmp = \"\"+rs.getTimestamp(i);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif(brs==null) {\n \t\t\t\t\tif(Checker.isStringNullOrEmpty(tmp)) {\n \t\t\t\t\t\tbrs = new String(\"null\");\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tbrs = new String(tmp);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tif(Checker.isStringNullOrEmpty(tmp)) {\n \t\t\t\t\t\tbrs = brs +\"`null\";\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tbrs = brs+\"`\"+tmp;\n \t\t\t\t\t}\n \t\t\t\t}\t\n \t\t\t}\n \t\t\t\t\n \t\t\tli.add(brs);\n \t\t\tbrs = null;\n \t\t}\n \t}\n \telse {\n \t\t//non select\n \t\tint i = stmt.executeUpdate();\n \t\tif(v==null) {\n \t\t\t\tv = new Vector();\n \t\t\t\tli=v.listIterator();\n \t\t\t\tli.add(\"string`string\");\n \t\t\t\tli.add(\"COMMAND`EXE\");\n \t\t\t}\n \t\t\n \t\tli.add(sql_stmt+\"`\"+i);\n \t}\n \t}\n \tcatch (NamingException e) {\n \t\te.printStackTrace();\n \t\tif(v==null) {\n\t\t\t\tv = new Vector();\n\t\t\t\tli=v.listIterator();\n\t\t\t\tli.add(\"ERROR\");\n\t\t\t}\n \t\tli.add(e.toString());\n \t}\n \tcatch (SQLException ex) {\n \t\tex.printStackTrace();\n \t\tif(v==null) {\n\t\t\t\tv = new Vector();\n\t\t\t\tli=v.listIterator();\n\t\t\t\tli.add(\"ERROR\");\n\t\t\t}\n \t\tli.add(ex.toString());\n \t} \n \tfinally {\n \t\tif (rs!=null) try { rs.close(); } catch (Exception ignore){}\n \t if (stmt!=null) try { stmt.close(); } catch (Exception ignore){}\n \t if (con!=null) try { con.close();} catch (Exception ignore){}\n \t}\n \ttry {\n \t\tv = Tool.removeDuplicateFromVector(v);\n \t}\n \tcatch(Exception e) {}\n \treturn v;\n }", "private void sampleQuery(final SQLManager sqlManager, final HttpServletResponse resp)\n throws IOException {\n try (Connection sql = sqlManager.getConnection()) {\n\n // Execute the query.\n final String query = \"SELECT 'Hello, world'\";\n try (PreparedStatement statement = sql.prepareStatement(query)) {\n \n // Gather results.\n try (ResultSet result = statement.executeQuery()) {\n if (result.next()) {\n resp.getWriter().println(result.getString(1));\n }\n }\n }\n \n } catch (SQLException e) {\n LOG.log(Level.SEVERE, \"SQLException\", e);\n resp.getWriter().println(\"Failed to execute database query.\");\n }\n }", "public void select();", "private ResultSet executeQuery(String query) {\r\n Statement stmt;\r\n ResultSet result = null;\r\n try {\r\n// System.out.print(\"Connect DB .... \");\r\n conn = openConnect();\r\n// System.out.println(\"successfully \");\r\n stmt = conn.createStatement();\r\n result = stmt.executeQuery(query);\r\n } catch (SQLException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return result;\r\n }", "protected ResultSet ejecutarSQL(String consultaSQL, Object[] param) throws Exception {\n \n ResultSet rs = null;\n if (this.conectar()) {\n PreparedStatement sql = this.conexion.prepareStatement(consultaSQL);\n if(param != null){ cargarParametros(sql, param); }\n rs = sql.executeQuery();\n } \n return rs;\n }", "public <T> int select(final String sqlQuery, final Map<String, Object> param) throws Exception;", "public ResultSet executeQuery() throws SQLException {\n return currentPreparedStatement.executeQuery();\n }", "private ResultSet GetData(String query){\n\t\ttry{\n\t\t\tstat = connection.createStatement();\n\t\t\treturn stat.executeQuery(query);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public synchronized ResultSet executeQuery(String sql)\n throws SQLException {\n\n // tinySQL only supports one result set at a time, so\n // don't let them get another one, just in case it's\n // hanging out.\n //\n tinySQLResultSet trs;\n result = null; \n statementString = sql;\n\n // create a new tinySQLResultSet with the tsResultSet\n // returned from connection.executetinySQL()\n //\n if ( debug ) {\n System.out.println(\"executeQuery conn is \" + connection.toString());\n }\n trs = new tinySQLResultSet(connection.executetinySQL(this), this);\n return trs; \n }", "public abstract ResultList executeQuery(DatabaseQuery query);", "public ResultSet executeQuery(String sql) throws SQLException {\n return currentPreparedStatement.executeQuery(sql);\n }", "public SelectStatement() {\n\t\tthis.columnSpecs = new ArrayList<>();\n\t}", "private String stageDetailsFromDB(String queryString){\n\t\tString RET=\"\";\n\t\ttry\n\t\t{\n\t\t\tcon = Globals.getDatasource().getConnection();\n\t\t\tps = con.prepareStatement(queryString); \n\t\t\tresult = ps.executeQuery();\n\t\t\tif (result.first()) {\n\t\t\t\tRET = result.getString(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(SQLException sqle){sqle.printStackTrace();}\n\t\tfinally {\n\t\t Globals.closeQuietly(con, ps, result);\n\t\t}\n\t\treturn RET;\n\t}", "public ResultSet execute(PreparedStatement query)\r\n {\r\n try\r\n {\r\n return query.executeQuery();\r\n } catch(SQLException exception)\r\n {\r\n LOG.log(Level.SEVERE, \"\", exception);\r\n }\r\n return null;\r\n }", "public ResultSet doQuery(String sql, Object[] params) throws SQLException {\r\n\t\t\r\n\t/*\tSystem.out.println(\"doQuery_sql: \" + sql);\r\n\t\tfor (int i = 0 ;i< params.length; i++)\r\n\t\t\tSystem.out.println(\"param: \" + params[i]);\t\r\n\t\t\r\n\t\t*/\r\n\t\tif (dbConnection == null)\r\n\t\t\treturn null;\r\n\t\toutstmt = dbConnection.prepareStatement(sql);\r\n\t\t// stuff parameters in\r\n\t\tfor (int i=0; i<params.length; i++){\r\n\t\t\toutstmt.setObject(i + 1,params[i]);\r\n\t\t}\r\n\t\t\r\n\t\tif (outstmt == null){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// return a collection that can be iterated on\r\n\t\tif (outstmt.execute()){\r\n\t\t\t//return stmt.getResultSet();\r\n\t\t\toutrs = outstmt.getResultSet();\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn null;\r\n\t\treturn outrs;\r\n\t}", "public void select ();", "public synchronized Cursor ExecuteRawSql(String s) {//Select Query\n try {\n\n//\t\t\tif(sqLiteDb != null)\n//\t\t\t\tcloseDB(null);\n\n sqLiteDb = openDatabaseInReadableMode();\n Log.d(TAG, \"Actual Query--->>\" + s);\n return sqLiteDb.rawQuery(s, null);\n\n }\n catch (Exception e) {\n e.printStackTrace();\n LogUtility.NoteLog(e);\n return null;\n }\n }", "public static ResultSet getSelectStatement(String sqlQuery) {\r\n\t\tResultSet results = null;\r\n\t\ttry {\r\n\r\n\t\t\tConnection conn = getConnection();\r\n\t\t\tStatement query = conn.createStatement();\r\n\t\t\tresults = query.executeQuery(sqlQuery);\r\n\t\t\tquery.close();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn results;\r\n\t}", "public SelectStatement getSelectStatement() {\r\n return selectStatement;\r\n }", "public static ResultSet Execute(String query) throws SQLException{\r\n\t\ttry {\r\n\t\t\tinitConnection();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(e.toString());\r\n\t\t}\r\n\t\tStatement state = dbCon.createStatement();\r\n\t\treturn state.executeQuery(query);\t\t\t\r\n\t}", "@Override\n SqlSelect wrapSelect(SqlNode node) {\n throw new UnsupportedOperationException();\n }", "public ResultSet execute(String query)\n\t{\n\t\tResultSet resultSet = null;\n\t\ttry {\n\t\tStatement statement = this.connection.createStatement();\n\t\tresultSet = statement.executeQuery(query);\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error while executing query.\" +e.getMessage());\n\t\t}\n\t\treturn resultSet;\n\t}", "CommandResult execute();", "@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 static String SelectQuery_String(String query)\r\n {\n Connection conn = null;\r\n Statement stat = null;\r\n ResultSet rs = null;\r\n String resp = \"\";\r\n try\r\n {\r\n LoadDriver();\r\n conn = DriverManager.getConnection(DB_URL,userName,password);\r\n stat = conn.createStatement();\r\n rs = stat.executeQuery(query);\r\n if(rs.next())\r\n resp = rs.getString(1);\r\n }\r\n catch(SQLException ex)\r\n {\r\n ex.printStackTrace();\r\n }\r\n finally\r\n {\r\n try\r\n {\r\n if(conn != null)\r\n conn.close();\r\n if(stat != null)\r\n stat.close();\r\n if(rs != null)\r\n rs.close();\r\n }\r\n catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n return resp;\r\n }", "private void sendQuery(String sqlQuery) {\n getRemoteConnection();\n try {\n statement = conn.createStatement();{\n // Execute a SELECT SQL statement.\n resultSet = statement.executeQuery(sqlQuery);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "private void select(String tableName) {\n String query = \"SELECT * FROM \" + tableName;\n\n this.executeSelect(query);\n }", "public Vector executeCmd_v2_khusus1(String sql_stmt) {\n \tVector v = null;\n \tListIterator li = null;\n \ttry {\n \t//String ipAddr = request.getRemoteAddr();\n \tContext initContext = new InitialContext();\n \tContext envContext = (Context)initContext.lookup(\"java:/comp/env\");\n \tds = (DataSource)envContext.lookup(\"jdbc\"+beans.setting.Constants.getDbschema());\n \tcon = ds.getConnection();\n \t//update civitas\n \tstmt = con.prepareStatement(sql_stmt);\n \tif(sql_stmt.startsWith(\"select\")||sql_stmt.startsWith(\"SELECT\")||sql_stmt.startsWith(\"Select\")) {\n \t\trs = stmt.executeQuery();\n \t\tResultSetMetaData rsmd = rs.getMetaData();\n \t\tint columnsNumber = rsmd.getColumnCount();\n \t\tString col_label = null;\n \t\tString col_type = null;\n \t\tfor(int i=1;i<=columnsNumber;i++) {\n \t\t\t//getColumnName\n \t\t\t\tString col_name = rsmd.getColumnLabel(i);\n \t\t\t\tif(col_label==null) {\n \t\t\t\t\tcol_label = new String(col_name);\n \t\t\t\t\tcol_type = new String(\"`\");\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tcol_label = col_label+\"`\"+col_name;\n \t\t\t\t}\n \t\t\t\t//get col type\n \t\t\t\tint type = rsmd.getColumnType(i);\n \t\t\t\tif(type == java.sql.Types.DATE) {\n \t\t\t\t\tcol_type = col_type+\"date`\";\n \t\t\t\t}\n \t\t\t\telse if(type == java.sql.Types.DECIMAL || type == java.sql.Types.DOUBLE || type == java.sql.Types.FLOAT ) {\n \t\t\t\t\tcol_type = col_type+\"double`\";\n \t\t\t\t}\n \t\t\t\telse if(type == java.sql.Types.INTEGER || type == java.sql.Types.BIGINT || type == java.sql.Types.NUMERIC || type == java.sql.Types.SMALLINT) {\n \t\t\t\t\tcol_type = col_type+\"long`\";\n \t\t\t\t}\n \t\t\t\telse if(type == java.sql.Types.VARCHAR || type == java.sql.Types.LONGNVARCHAR || type == java.sql.Types.LONGVARCHAR || type == java.sql.Types.CHAR || type == java.sql.Types.NCHAR) {\n \t\t\t\t\tcol_type = col_type+\"string`\";\n \t\t\t\t}\n \t\t\t\telse if(type == java.sql.Types.TIME) {\n \t\t\t\t\tcol_type = col_type+\"time`\";\n \t\t\t\t}\n \t\t\t\telse if(type == java.sql.Types.BOOLEAN || type == java.sql.Types.TINYINT) {\n \t\t\t\t\tcol_type = col_type+\"boolean`\";\n \t\t\t\t}\n \t\t\t\telse if(type == java.sql.Types.TIMESTAMP) {\n \t\t\t\t\tcol_type = col_type+\"timestamp`\";\n \t\t\t\t}\n \t\t\t}\n \t\tif(v==null) {\n \t\t\t\tv = new Vector();\n \t\t\t\tli=v.listIterator();\n \t\t\t\tli.add(col_type);\n \t\t\t\tli.add(col_label);\n \t\t\t}\n \t\t\t\n \t\t//System.out.println(\"columnsNumber=\"+columnsNumber);\n \t\tString brs = null;\n \t\twhile(rs.next()) {\n \t\t\tfor(int i=1;i<=columnsNumber;i++) {\n \t\t\t\tString tmp = \"\";\n \t\t\t\t/*\n \t\t\t\t * ADA 2 metode cek column type, karena diupdate yg baruan adalah cara yg diatas, belum tau mana yg lebih efektif\n \t\t\t\t */\n \t\t\t\tcol_type = rsmd.getColumnTypeName(i);\n \t\t\t\t\n \t\t\t\tif(col_type.equalsIgnoreCase(\"VARCHAR\")||col_type.equalsIgnoreCase(\"TEXT\")||col_type.startsWith(\"CHAR\")) {\n \t\t\t\t\ttmp = \"\"+rs.getString(i);\n \t\t\t\t}\n \t\t\t\telse if(col_type.equalsIgnoreCase(\"TINYINT\")) {\n \t\t\t\t\ttmp = \"\"+rs.getBoolean(i);\n \t\t\t\t}\n \t\t\t\telse if(col_type.contains(\"INT\")||col_type.contains(\"LONG\")) {\n \t\t\t\t\ttmp = \"\"+rs.getLong(i);\n \t\t\t\t}\n \t\t\t\telse if(col_type.equalsIgnoreCase(\"DATE\")) {\n \t\t\t\t\ttmp = \"\"+rs.getDate(i);\n \t\t\t\t}\n \t\t\t\telse if(col_type.equalsIgnoreCase(\"DECIMAL\")||col_type.equalsIgnoreCase(\"DOUBLE\")||col_type.equalsIgnoreCase(\"FLOAT\")) {\n \t\t\t\t\ttmp = \"\"+rs.getDouble(i);\n \t\t\t\t}\n \t\t\t\telse if(col_type.equalsIgnoreCase(\"TIMESTAMP\")||col_type.equalsIgnoreCase(\"DATETIME\")) {\n \t\t\t\t\ttmp = \"\"+rs.getTimestamp(i);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif(brs==null) {\n \t\t\t\t\tif(Checker.isStringNullOrEmpty(tmp)) {\n \t\t\t\t\t\tbrs = new String(\"null\");\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tbrs = new String(tmp);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tif(Checker.isStringNullOrEmpty(tmp)) {\n \t\t\t\t\t\tbrs = brs +\"`null\";\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tbrs = brs+\"`\"+tmp;\n \t\t\t\t\t}\n \t\t\t\t}\t\n \t\t\t}\n \t\t\tbrs = brs.replace(\"`K`\", \"`KELUAR`\");\n \t\t\tli.add(brs);\n \t\t\tbrs = null;\n \t\t}\n \t}\n \telse {\n \t\t//non select\n \t\tint i = stmt.executeUpdate();\n \t\tif(v==null) {\n \t\t\t\tv = new Vector();\n \t\t\t\tli=v.listIterator();\n \t\t\t\tli.add(\"string`string\");\n \t\t\t\tli.add(\"COMMAND`EXE\");\n \t\t\t}\n \t\t\n \t\tli.add(sql_stmt+\"`\"+i);\n \t}\n \t}\n \tcatch (NamingException e) {\n \t\te.printStackTrace();\n \t\tif(v==null) {\n\t\t\t\tv = new Vector();\n\t\t\t\tli=v.listIterator();\n\t\t\t\tli.add(\"ERROR\");\n\t\t\t}\n \t\tli.add(e.toString());\n \t}\n \tcatch (SQLException ex) {\n \t\tex.printStackTrace();\n \t\tif(v==null) {\n\t\t\t\tv = new Vector();\n\t\t\t\tli=v.listIterator();\n\t\t\t\tli.add(\"ERROR\");\n\t\t\t}\n \t\tli.add(ex.toString());\n \t} \n \tfinally {\n \t\tif (rs!=null) try { rs.close(); } catch (Exception ignore){}\n \t if (stmt!=null) try { stmt.close(); } catch (Exception ignore){}\n \t if (con!=null) try { con.close();} catch (Exception ignore){}\n \t}\n \ttry {\n \t\tv = Tool.removeDuplicateFromVector(v);\n \t}\n \tcatch(Exception e) {}\n \treturn v;\n }", "public Cliente[] findByDynamicSelect(String sql, Object[] sqlParams) throws ClienteDaoException;", "protected ResultSet executeQuery(String query) {\n ResultSet rs = null;\n \n try {\n Statement stmt = getConnection().createStatement();\n rs = stmt.executeQuery(query);\n } catch (SQLException e) {\n String msg = \"Failed to execute query: \" + query;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n return rs;\n }", "public Ruta[] findByDynamicSelect(String sql, Object[] sqlParams) throws RutaDaoException;", "public static ResultSet executeQuery(String query) {\n\t\t\n\t\tString url = \"jdbc:postgresql://localhost:5432/postgres\";\n String user = \"postgres\";\n String password = \"admin\";\n \n ResultSet rs = null;\n\n try {\n \tConnection con = DriverManager.getConnection(url, user, password);\n \t\tStatement st = con.createStatement();\n \t\n rs = st.executeQuery(query);\n\n\t\t\t/*\n\t\t\t * if (rs.next()) { System.out.println(rs.getString(1)); }\n\t\t\t */\n \n \n\n } catch (SQLException ex) {\n \n System.out.println(\"Exception occured while running query\");\n ex.printStackTrace();\n }\n \n return rs;\n\t}", "public void callQuery(int a) throws SQLException{\n data.get(a).OUPUTQUERY(data.get(a).getConversionArray(), data.get(a).getResultSet());\n }", "public ResultSet execute(String command) {\n try {\n connect = getConnection();\n statement = connect.createStatement();\n statement.execute(command);\n return statement.getResultSet();\n } catch (SQLException e) {\n System.err.println(\"Error while executing SQL statement\" + e.toString());\n return null;\n }\n }", "public interface BackTestOperation {\n\n\n @Select( \"SELECT * FROM ${listname}\")\n public ArrayList<BackTestDailyResultPo> getResult(@Param(\"listname\") String resultid);\n\n @Select(\" SELECT resultid FROM backtesting WHERE userid = #{0,jdbcType=BIGINT} AND sid = #{1,jdbcType=BIGINT} AND start = #{2,jdbcType=LONGVARCHAR}\\n\" +\n \" AND end = #{3,jdbcType=LONGVARCHAR}\")\n public String getResultid(String userid, String strategyid, String startdate, String enddate);\n}", "public ResultSet executeQuery(String request) {\n try {\r\n return st.executeQuery(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n return null;\r\n }\r\n }", "public void select() {}", "private void select(String tableName, String colName, String value,\n boolean usePar) {\n String query;\n \n if (usePar == true){\n // Parenthesis will surrond the value making it a string\n query = \"SELECT * FROM \" + tableName + \" WHERE \" + colName + \" = \\'\" + value + \"\\'\";\n }\n else{\n // Parenthesis will not surround the value\n query = \"SELECT * FROM \" + tableName + \" WHERE \" + colName + \" = \" + value;\n }\n \n this.executeSelect(query);\n }", "private static void selectRecord(Long i) {\n\n\t\t\t\ttry {\n\t\t\t\t\tConnection myConn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/student_management_system\", \"root\", \"124536\");//to create sql connection\n\t\t\t\t\t//sql preparedStatement with sql query where '?' is the placeholder \n\t\t\t\t\tPreparedStatement myStmt = myConn.prepareStatement(\"select * from student where ID = ?\"); \n\t\t\t\t\t\n\t\t\t\t\tmyStmt.setLong(1, i);// this is going to replace the placeholder which is '?'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\tResultSet myRs = myStmt.executeQuery();//execute the query and assign it to Resultset\n\t\t\t\t\t\n\t\t\t\t\tdisplay(myRs);//send the executed resultset result to display() which going to display the result\n\n\t\t\t\t} catch (Exception e) {//catch any exception if any \n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t}\n\t\t\t\n\n\t\t\t}", "@Test\n public void selectStatementSuccessful() throws SQLException {\n assertNotNull(testConnection.selectStatement(con, \"SELECT * FROM Employees;\"));\n assertNull(testConnection.selectStatement(con, \"SELECT * FROM Emp;\"));\n\n //Test if RS is empty\n assertTrue(testConnection.selectStatement(con, \"SELECT * FROM Employees\").next());\n assertFalse(testConnection.selectStatement(con, \"SELECT * FROM Employees WHERE email='x'\").next());\n }", "public ResultSet query(String sQLQuery) throws SQLException {\n\t Statement stmt = c.createStatement();\n\t ResultSet ret = stmt.executeQuery(sQLQuery);\n\t stmt.close();\n\t return ret;\n\t}", "public ResultSet ejecutarQuery(String query) throws Exception {\n ResultSet rs = null;\n rs = stmt.executeQuery(query);\n return rs;\n }", "public ResultSet selectData(String sql) throws java.sql.SQLException {\n\t\treturn selectData(sql, -1);\n\t}", "private void appendSelectStatement() {\n builder.append(SELECT).append(getSelectedFields()).append(FROM);\n }", "public static Disease selectOne(String command) throws Exception {\n if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)\n {\n throw new ApplicationException(\"Not allowed to send sql directly. Rewrite the calling class to not use this query:\\r\\n\" + command);\n }\n \n List<Disease> list = tableToList(Db.getTable(command));\n if (list.Count == 0)\n {\n return null;\n }\n \n return list[0];\n }", "public abstract ExecuteResult<T> execute() throws SQLException;", "public ResultSet query (String query) throws java.sql.SQLException {\n /*\n if (query.indexOf('(') != -1)\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query.substring(0,query.indexOf('(')) + \"...\\\")\");\n else\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query.substring(0,20) + \"...\\\")\");\n */\n Logger.write(\"VERBOSE\", \"DB\", \"query(\\\"\" + query + \"\\\")\");\n \n try {\n Statement statement = dbConnection.createStatement();\n statement.setQueryTimeout(30);\n ResultSet r = statement.executeQuery(query);\n return r;\n } catch (java.sql.SQLException e) {\n Logger.write(\"RED\", \"DB\", \"Failed to query database: \" + e);\n throw e;\n }\n }", "private void getSelectStatements()\n\t{\n\t\tString[] sqlIn = new String[] {m_sqlOriginal};\n\t\tString[] sqlOut = null;\n\t\ttry\n\t\t{\n\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\tthrow new IllegalArgumentException(m_sqlOriginal);\n\t\t}\n\t\t//\ta sub-query was found\n\t\twhile (sqlIn.length != sqlOut.length)\n\t\t{\n\t\t\tsqlIn = sqlOut;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\t\tthrow new IllegalArgumentException(sqlOut.length + \": \"+ m_sqlOriginal);\n\t\t\t}\n\t\t}\n\t\tm_sql = sqlOut;\n\t\t/** List & check **\n\t\tfor (int i = 0; i < m_sql.length; i++)\n\t\t{\n\t\t\tif (m_sql[i].indexOf(\"SELECT \",2) != -1)\n\t\t\t\tlog.log(Level.SEVERE, \"#\" + i + \" Has embedded SQL - \" + m_sql[i]);\n\t\t\telse\n\t\t\t\tlog.fine(\"#\" + i + \" - \" + m_sql[i]);\n\t\t}\n\t\t/** **/\n\t}", "private static void selectEx() throws SQLException {\n ResultSet rs = stmt.executeQuery(\"SELECT name,score FROM students \\n\" +\n \"WHERE score >50;\");\n\n while (rs.next()) {\n System.out.println(rs.getString(\"name\") + \" \" + rs.getInt(\"score\"));\n }\n rs.close();\n }", "public void select_star() throws Exception\n\t{\n\t\t// the statement for non-parametric select:\n\t\tjava.sql.Statement st = db.createStatement();\n\t\t// the resultset used for the queries:\n\t\tjava.sql.ResultSet rs;\n\n\t\tif(perf==0){out.println(\"EP_EPISODE_SELECT_STAR\");}\n\t\trs = ((org.inria.jdbc.Statement)st).executeQuery(DMSP_QEP_IDs.EP_TEST.EP_EPISODE_SELECT_STAR);\n\t\tlireResultSet(rs, out);\n\t\tif(perf==0){out.println(\"EP_FORMULAIRE_SELECT_STAR\");}\n\t\trs = ((org.inria.jdbc.Statement)st).executeQuery(DMSP_QEP_IDs.EP_TEST.EP_FORMULAIRE_SELECT_STAR);\n\t\tlireResultSet(rs, out);\n\t\tif(perf==0){out.println(\"EP_USER_SELECT_STAR\");}\n\t\trs = ((org.inria.jdbc.Statement)st).executeQuery(DMSP_QEP_IDs.EP_TEST.EP_USER_SELECT_STAR);\n\t\tlireResultSet(rs, out);\n\t\tif(perf==0){out.println(\"EP_EVENT_SELECT_STAR\");}\n\t\trs = ((org.inria.jdbc.Statement)st).executeQuery(DMSP_QEP_IDs.EP_TEST.EP_EVENT_SELECT_STAR);\n\t\tlireResultSet(rs, out);\n\t\tif(perf==0){out.println(\"EP_INFO_SELECT_STAR\");}\n\t\trs = ((org.inria.jdbc.Statement)st).executeQuery(DMSP_QEP_IDs.EP_TEST.EP_INFO_SELECT_STAR);\n\t\tlireResultSet(rs, out);\n\t\tif(perf==0){out.println(\"EP_COMMENT_SELECT_STAR\");}\n\t\trs = ((org.inria.jdbc.Statement)st).executeQuery(DMSP_QEP_IDs.EP_TEST.EP_COMMENT_SELECT_STAR);\n\t\tlireResultSet(rs, out);\n\t\tif(perf==0){out.println(\"EP_ROLE_SELECT_STAR\");}\n\t\trs = ((org.inria.jdbc.Statement)st).executeQuery(DMSP_QEP_IDs.EP_TEST.EP_ROLE_SELECT_STAR);\n\t\tlireResultSet(rs, out);\n\t\tif(perf==0){out.println(\"EP_HABILITATION_SELECT_STAR\");}\n\t\trs = ((org.inria.jdbc.Statement)st).executeQuery(DMSP_QEP_IDs.EP_TEST.EP_HABILITATION_SELECT_STAR);\n\t\tlireResultSet(rs, out);\n\t}", "@Override\r\n\tpublic String getSelect() {\n\t\treturn SQL;\r\n\t}", "public void onSelect(Statement select, Connection cx, SimpleFeatureType featureType) throws SQLException {\r\n }", "public abstract ConnectorResultSet select(DataRequest source) throws ConnectorOperationException;", "@Override\n public boolean execute(String sql) throws SQLException {\n\n // a result set object\n //\n tsResultSet r;\n\n // execute the query \n //\n r = connection.executetinySQL(this);\n\n // check for a null result set. If it wasn't null,\n // use it to create a tinySQLResultSet, and return whether or\n // not it is null (not null returns true).\n //\n if( r == null ) {\n result = null;\n } else {\n result = new tinySQLResultSet(r, this);\n }\n return (result != null);\n\n }", "public static <T> T fromSelect(Class<T> clazz, String select, Object... args) {\n return SqlClosure.sqlExecute(connection -> {\n PreparedStatement stmnt = connection.prepareStatement(select);\n return fromStatement(stmnt, clazz, args);\n });\n }", "private String executeQuery(final PreparedStatement preparedStatement) throws SQLException {\n try (ResultSet result = preparedStatement.executeQuery();) {\n if (result.next()) {\n return result.getString(EVENT_ID_KEY);\n }\n }\n return \"\";\n }", "public ResultSet executeSQL(String sql) {\t\t\t\t\t\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t} catch(SQLException se) {\n\t\t\t} finally {\n\t\t\t\trs = null;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\trs = stmt.executeQuery(sql);\n\t\t} catch(SQLException se) {\n\t\t\tse.printStackTrace();\n\t\t}\n\t\treturn rs;\t\t\t\t\t\t\t\t\t\t\t\t\t// Note that result can be null if something fail.\n\t}", "public ResultSet executeQuery(String query) {\n ResultSet rs = null;\n \ttry {\n rs = st.executeQuery(query);\n } catch(Exception e) {\n \te.printStackTrace();\n }\n return rs;\n }", "@Override\n\tpublic ResultSet executeQuery(final String sql) throws SQLException {\n\n\t\tfinal String transformedSQL = transformSQL(sql);\n\n\t\tif (transformedSQL.length() > 0) {\n\n\t\t\tfinal Statement statement = new SimpleStatement(transformedSQL);\n\n\t\t\tif (getMaxRows() > 0)\n\t\t\t\tstatement.setFetchSize(getMaxRows());\n\n\t\t\tresultSet = session.execute(statement);\n\n\t\t\twarnings.add(resultSet);\n\n\t\t\treturn new CassandraResultSet(driverContext, resultSet);\n\t\t}\n\n\t\treturn null;\n\t}", "@Test\n public void test2(){\n String sql = \"select order_id orderID, order_name orderName, order_date orderDate from order_table where order_id = ?\";\n Order order = getOrder(sql, 4);\n System.out.println(order);\n }", "Query query();", "@Override\n \tpublic List<?> execute() {\n \t\ttry {\n \t\t\n \t\t\treturn _jdbcTemplate.query(_sql, new RowMapper() {\n \t\t\t\tpublic Object mapRow(ResultSet rs, int rowNum) throws SQLException {\n \t\t\t\t\tint campaignId = rs.getInt(1);\n \t\t\t\t\tint groupId = rs.getInt(2);\n \t\t\t\t\tint count = rs.getInt(3);\n \t\t\t\t\treturn new CampaignPromptGroupItemCount(campaignId, groupId, count);\n \t\t\t\t}\n \t\t\t});\n \t\t\t\n \t\t} catch (org.springframework.dao.DataAccessException dae) {\n \t\t\t\n \t\t\t_logger.error(\"an exception occurred running the sql '\" + _sql + \"' \" + dae.getMessage());\n \t\t\tthrow new DataAccessException(dae);\n \t\t\t\n \t\t}\n \t}", "protected String getSelectSQL() {\n\t\treturn queryData.getString(\"SelectSQL\");\n\t}", "@Override\n\tpublic ArrayList select(String... args) throws SQLException {\n\t\treturn null;\n\t}" ]
[ "0.7999116", "0.7702022", "0.70752984", "0.69729936", "0.6904955", "0.6859031", "0.68477046", "0.6798035", "0.67209816", "0.6698755", "0.6612133", "0.65817255", "0.6574168", "0.65733236", "0.6563921", "0.6528611", "0.6516817", "0.6511023", "0.6460498", "0.6459221", "0.64463824", "0.64343244", "0.64280766", "0.64227384", "0.6420446", "0.64021957", "0.64007103", "0.6379493", "0.6378078", "0.6376079", "0.634742", "0.6331978", "0.6245766", "0.62239826", "0.6221303", "0.61952734", "0.61944914", "0.6174066", "0.6165108", "0.6164835", "0.6164067", "0.6162896", "0.6162517", "0.61603457", "0.6158163", "0.6147641", "0.61472857", "0.61453086", "0.61439264", "0.61289686", "0.6127415", "0.61255085", "0.6115893", "0.6103361", "0.6101313", "0.6059782", "0.60465586", "0.6044428", "0.60395217", "0.6037672", "0.6024094", "0.6017167", "0.6008811", "0.6000566", "0.5997747", "0.59882724", "0.5985821", "0.59856135", "0.5961591", "0.59558463", "0.59530133", "0.5940802", "0.5937301", "0.59366906", "0.5927126", "0.5923059", "0.5898363", "0.5882769", "0.58792955", "0.5878359", "0.5866796", "0.5864605", "0.5862363", "0.58607626", "0.5849987", "0.5845095", "0.58425003", "0.5841727", "0.58387864", "0.5830183", "0.5826966", "0.58268917", "0.5826152", "0.5824529", "0.58193666", "0.5815845", "0.58143026", "0.5814271", "0.5813748", "0.5813467" ]
0.59698653
68
A method to execute nonselect statements
public int executeUpdateStatement(String statement) throws SQLException { Statement sqlStmt = connection.createStatement(); // execute the statement and check whether there is a result return sqlStmt.executeUpdate(statement); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void prepareExecuteNoSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteNoSelect();\n }", "protected void execute() {\n \t// literally still do nothing\n }", "public void prepareExecuteSelect() {\n setCallFromStatement();\n // The statement is no longer require so can be released.\n clearStatement();\n\n super.prepareExecuteSelect();\n }", "public void stringCommandNoReturn(String command) throws SQLException {\n try (PreparedStatement prep = conn.prepareStatement(command)) {\n //executes command\n try {\n prep.execute();\n } catch (SQLException e) {\n throw new SQLException(\"Failed to execute query: \" + e);\n }\n }\n }", "Object executeSelectQuery(String sql) { return null;}", "protected void execute() {}", "private void executeRequest(String sql) {\n\t}", "private void executeQuery() {\n }", "private void getSelectStatements()\n\t{\n\t\tString[] sqlIn = new String[] {m_sqlOriginal};\n\t\tString[] sqlOut = null;\n\t\ttry\n\t\t{\n\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\tthrow new IllegalArgumentException(m_sqlOriginal);\n\t\t}\n\t\t//\ta sub-query was found\n\t\twhile (sqlIn.length != sqlOut.length)\n\t\t{\n\t\t\tsqlIn = sqlOut;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tsqlOut = getSubSQL (sqlIn);\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\tlog.log(Level.SEVERE, m_sqlOriginal, e);\n\t\t\t\tthrow new IllegalArgumentException(sqlOut.length + \": \"+ m_sqlOriginal);\n\t\t\t}\n\t\t}\n\t\tm_sql = sqlOut;\n\t\t/** List & check **\n\t\tfor (int i = 0; i < m_sql.length; i++)\n\t\t{\n\t\t\tif (m_sql[i].indexOf(\"SELECT \",2) != -1)\n\t\t\t\tlog.log(Level.SEVERE, \"#\" + i + \" Has embedded SQL - \" + m_sql[i]);\n\t\t\telse\n\t\t\t\tlog.fine(\"#\" + i + \" - \" + m_sql[i]);\n\t\t}\n\t\t/** **/\n\t}", "abstract protected void execute();", "protected abstract void execute();", "private void executeSelect(String query){\n try {\n statement = connection.createStatement();\n rs = statement.executeQuery(query);\n } catch (SQLException e) {\n throw new RuntimeException(e);\n } \n }", "int executeSafely();", "protected void execute() {\n\t\t\n\t}", "NonQueryResult executeNonQuery(ExecutionContext context, File file) throws ExecutorException;", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "void execute();", "public void execute() throws SQLException {\n\t\ttry {\n\t\t\tselect.setUsername(\"INTRANET\");\n\t\t\tselect.setPassword(\"INTRANET\");\n\t\t\tselect.execute();\n\t\t}\n\n\t\t// Liberar recursos del objeto select.\n\t\tfinally {\n\t\t\tselect.close();\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n public void execute() {\n execute(null, null);\n }", "public void execute() {\n execute0();\n }", "CommandResult execute();", "public boolean execute(){\n return false;\n }", "void runQueries();", "@Override\n\tpublic boolean Unexecute() \n\t{\n\t\treturn false;\n\t}", "public void unExecute()\n\t{\n\t}", "public void execute() {\n // empty\n }", "public void ExecuteCypherQueryNoReturn(String cypherQuery) {\r\n\t\tExecutionEngine engine = new ExecutionEngine( _db );\r\n\t\tExecutionResult result = null;\r\n\t\tTransaction tx = _db.beginTx();\r\n\t\ttry {\r\n\t\t engine.execute(cypherQuery);\r\n\t\t tx.success();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tSystem.out.print(\"issues with fetching node and its relations\");\r\n\t\t\ttx.failure();\r\n\t\t\t//return \"failed\";\r\n\t\t} finally {\r\n\t\t\ttx.close();\r\n\t\t}\r\n\t}", "public void executeNot() {\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString sourceBS = mIR.substring(7, 3);\n\t\tmRegisters[destBS.getValue()] = mRegisters[sourceBS.getValue()].copy();\n\t\tmRegisters[destBS.getValue()].invert();\n\n\t\tBitString notVal = mRegisters[destBS.getValue()];\n\t\tsetConditionalCode(notVal);\n\t}", "private int execRawSqlPrivate(String sql, boolean isNative, Object params) {\r\n\t\tQuery query = createQuery(sql, null, isNative, 0, 0, params);\r\n\t\tint executeUpdate = query.executeUpdate();\r\n\t\treturn executeUpdate;\r\n\t}", "@Override\n public void execute() {}", "protected void execute()\n\t{\n\t}", "private void selectOperator() {\n String query = \"\";\n System.out.print(\"Issue the Select Query: \");\n query = sc.nextLine();\n query.trim();\n if (query.substring(0, 6).compareToIgnoreCase(\"select\") == 0) {\n sqlMngr.selectOp(query);\n } else {\n System.err.println(\"No select statement provided!\");\n }\n }", "protected void execute() {\n\t}", "boolean getMissingStatement();", "boolean getMissingStatement();", "boolean getMissingStatement();", "boolean getMissingStatement();", "public void execute(){\n\t\t\n\t}", "public abstract void execute();", "public abstract void execute();", "public abstract void execute();", "protected void execute() {\n\n\t}", "@Override\r\n\tpublic void execute() {\n }", "private void executeImmediate(String stmtText) throws SQLException\n {\n // execute the statement and auto-close it as well\n try (final Statement statement = this.createStatement();)\n {\n statement.execute(stmtText);\n }\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "public void execute();", "public void execute();", "public void execute();", "public void execute();", "@Override\n\tpublic String execute() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String execute() {\n\t\treturn null;\n\t}", "default void execute(@Language(\"MySQL\") @Nonnull String statement) {\n this.execute(statement, stmt -> {});\n }", "boolean execute();", "@Override\r\n\tpublic void unexecute() {\n\t\t\r\n\t}", "protected abstract void execute() throws Exception;", "protected void execute() {\r\n }", "@Override\n public void executeTransaction() {\n System.out.println(\"Please make a selection first\");\n }", "@Override\n public boolean execute() {\n return false;\n }", "@Override\n public boolean execute() {\n return false;\n }", "@Override\n\tpublic Object execute() {\n\n\t\treturn null;\n\t}", "protected abstract NonMatchingResult processSelection(\n\t\t\tTableEntitySelection selection,\n\t\t\tSession session);", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.apache.derby.iapi.sql.execute.ExecutionContext\");\n String[] stringArray0 = new String[4];\n String string0 = SQLUtil.renderQuery(defaultDBTable0, stringArray0, stringArray0);\n assertEquals(\"SELECT * FROM org.apache.derby.iapi.sql.execute.ExecutionContext WHERE null = null AND null = null AND null = null AND null = null\", string0);\n }", "public void execute() {\n\t\t\n\t}", "void execute() throws Exception;", "protected void execute()\n {\n }", "StatementChain not(ProfileStatement... statements);", "SELECT createSELECT();", "@Override\n public int[] executeBatch() throws SQLException {\n throw new SQLException(\"tinySQL does not support executeBatch.\");\n }", "protected void execute() {\n\n\n \n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n boolean boolean0 = SQLUtil.isQuery(\"select into\");\n assertFalse(boolean0);\n }", "@Override\n\tpublic void execute() {\n\t\t\n\t}", "protected abstract NativeSQLStatement createNativeIsNotEmptyStatement();", "@Override\r\n\tprotected void execute() {\r\n\t}", "@Override\n public PlainSqlQuery<T, ID> createPlainSqlQuery() {\n return null;\n }", "protected void runQueryWithNoReturnValue(String query, Connection myConn, String successMessage) {\n try {\n Statement newCommand = myConn.createStatement();\n newCommand.executeUpdate(query);\n newCommand.close();\n displaySuccessMessage(successMessage);\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic boolean execute() {\n\t\treturn false;\n\t}", "public abstract int execute();", "protected void execute() {\n \t\n }", "protected void execute() {\n \t\n }", "abstract public void execNonTurtle(TurtleModel t) throws InvalidCommandException;", "public void execute() {\r\n\t\r\n\t}", "@Override\n\t\tpublic void execute() {\n\t\t\tsuper.execute();\n\t\t\ttry {\n\t\t\t\tString select;\n\t\t\t\tif (tokenData.isRtb4FreeSuperUser()) \n\t\t\t\t\tselect = \"select * from rtb_standards\";\n\t\t\t\telse\n\t\t\t\t\tselect = \"select * from rtb_standards where customer_id='\"+tokenData.customer+\"'\";\n\t\t\t\tvar conn = CrosstalkConfig.getInstance().getConnection();\n\t\t\t\tvar stmt = conn.createStatement();\n\t\t\t\tvar prep = conn.prepareStatement(select);\n\t\t\t\tResultSet rs = prep.executeQuery();\n\t\t\t\t\n\t\t\t\trules = convertToJson(rs); \n\t\t\t\t\t\t\t\n\t\t\t\treturn;\n\t\t\t} catch (Exception err) {\n\t\t\t\terr.printStackTrace();\n\t\t\t\terror = true;\n\t\t\t\tmessage = err.toString();\n\t\t\t}\n\t\t\tmessage = \"Timed out\";\n\t\t}", "public void testExecuteSQL() {\n\t\tsqlExecUtil.setDriver(\"com.mysql.jdbc.Driver\");\n\t\tsqlExecUtil.setUser(\"root\");\n\t\tsqlExecUtil.setPassword(\"\");\n\t\tsqlExecUtil.setUrl(\"jdbc:mysql://localhost/sysadmin?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=gb2312\");\n\t\tsqlExecUtil.setSqlText(\"select * from t_role\");\n\t\tsqlExecUtil.executeSQL();\n\t\t\n\t\tsqlExecUtil.setSqlText(\"select * from t_user\");\n\t\tsqlExecUtil.executeSQL();\n\t}", "public int execute();", "void execute() throws TMQLLexerException;" ]
[ "0.7372238", "0.65890557", "0.6479932", "0.61343664", "0.60780215", "0.5930501", "0.5906747", "0.5858352", "0.5822731", "0.58158046", "0.5806758", "0.58042836", "0.57766974", "0.57326245", "0.5706799", "0.5706429", "0.5706429", "0.5706429", "0.5706429", "0.5706429", "0.5706429", "0.5706429", "0.57047576", "0.5701896", "0.5688762", "0.56661814", "0.5663873", "0.56247437", "0.5617197", "0.56123996", "0.56089693", "0.5586268", "0.5582171", "0.5574399", "0.5572469", "0.5571219", "0.555978", "0.5555624", "0.55477", "0.55477", "0.55477", "0.55477", "0.5542647", "0.553692", "0.553692", "0.553692", "0.55282116", "0.5499944", "0.54969037", "0.54777485", "0.54777485", "0.54777485", "0.54777485", "0.54777485", "0.54777485", "0.54777485", "0.54777485", "0.54777485", "0.54777485", "0.54777485", "0.54777485", "0.5476347", "0.5476347", "0.5476347", "0.5476347", "0.54758406", "0.54758406", "0.54573447", "0.5451238", "0.5447735", "0.5446024", "0.5445888", "0.54431516", "0.5439559", "0.5439559", "0.5438472", "0.54366714", "0.54349273", "0.54307073", "0.5430156", "0.5413732", "0.5411273", "0.54101455", "0.5409771", "0.5403401", "0.53867006", "0.5382719", "0.53802454", "0.537233", "0.53600115", "0.5351936", "0.5348223", "0.53475654", "0.53470784", "0.53470784", "0.53439003", "0.5334266", "0.5328272", "0.53243434", "0.5314892", "0.5312216" ]
0.0
-1
displays the map in the web
public String display(PlayMap aPlayMap) { String tmpOutput = ""; Field tmpField; tmpOutput = "<div class=\"map\" id=\"map\" style=\"width:" + aPlayMap.getXDimension() * 34.75 + "px; "; tmpOutput += "height:" + aPlayMap.getYDimension() * 34.75 + "px;\">\n"; // loop for row for (int i = 0; i < aPlayMap.getYDimension(); i++) { // loop for column for (int j = 0; j < aPlayMap.getXDimension(); j++) { tmpField = aPlayMap.getField(j, i); tmpOutput += "<div id=\"" + j + "/" + i + "\" "; try { tmpOutput += "class=\"field " + Ground.getGroundLabeling(tmpField.getGround()) + "\" "; } catch (UnknownFieldGroundException e) { e.printStackTrace(); } Placeable tmpSetter = tmpField.getSetter(); String tmpColor = new String ("#000000"); String tmpPlacable = new String ("item"); if (tmpSetter != null) { if (tmpSetter instanceof Figure) { tmpColor = new String(); switch (tmpField.getSetter().getId()) { case 'A': tmpColor = "#ff0000"; break; case 'B': tmpColor = "#0000ff"; break; } tmpPlacable = "figure"; } tmpOutput += "onClick=\"checkUserAction(this);\" "; tmpOutput += "onMouseOver=\"hoverOn(this);\" onMouseOut=\"hoverOff(this);\" status=\"placed\" filled=\"" + tmpPlacable + "\" placablecolor=\"" + tmpColor + "\" >"; String tmpImage = tmpSetter.getImage(); tmpOutput += "<img src=\"resources/pictures/" + tmpImage + "\">"; } else { tmpOutput += "onClick=\"checkUserAction(this);\" "; tmpOutput += "onMouseOver=\"hoverOn(this);\" onMouseOut=\"hoverOff(this);\" status=\"empty\" filled=\"no\" placablecolor=\"#000000\" >"; } tmpOutput += "</div>\n"; } } tmpOutput += "</div>\n"; return tmpOutput; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayMap() {\n MapMenuView mapMenu = new MapMenuView();\r\n mapMenu.display();\r\n \r\n }", "protected void showMap() {\n \t\t\n \t\tApplicationData applicationData;\n \t\ttry {\n \t\t\tapplicationData = ApplicationData.readApplicationData(this);\n \t\t\tif(applicationData != null){\n \t\t\t\tIntent intent = getIntent();\n \t\t\t\tNextLevel nextLevel = (NextLevel)intent.getSerializableExtra(ApplicationData.NEXT_LEVEL_TAG);\n \t\t\t\tAppLevelDataItem item = applicationData.getDataItem(this, nextLevel);\t\t\t\t\n \t\t\t\t\n \t\t\t\tif(Utils.hasLength(item.getGeoReferencia())){\n \t\t\t\t\tString urlString = \"http://maps.google.com/maps?q=\" + item.getGeoReferencia() + \"&near=Madrid,Espa�a\";\n \t\t\t\t\tIntent browserIntent = new Intent(\"android.intent.action.VIEW\", \n \t\t\t\t\t\t\tUri.parse(urlString ));\n \t\t\t\t\tstartActivity(browserIntent);\n \t\t\t\t}\n \t\t\t}\n \t\t} catch (InvalidFileException e) {\n \t\t}\n \t}", "private void viewMap() {\r\n \r\n // Get the current game \r\n theGame = cityofaaron.CityOfAaron.getTheGame();\r\n \r\n // Get the map \r\n Map map = theGame.getMap();\r\n Location locations = null;\r\n \r\n // Print the map's title\r\n System.out.println(\"\\n*** Map: CITY OF AARON and Surrounding Area ***\\n\");\r\n // Print the column numbers \r\n System.out.println(\" 1 2 3 4 5\");\r\n // for every row:\r\n for (int i = 0; i < max; i++){\r\n // Print a row divider\r\n System.out.println(\" -------------------------------\");\r\n // Print the row number\r\n System.out.print((i + 1) + \" \");\r\n // for every column:\r\n for(int j = 0; j<max; j++){\r\n // Print a column divider\r\n System.out.print(\"|\");\r\n // Get the symbols and locations(row, column) for the map\r\n locations = map.getLocation(i, j);\r\n System.out.print(\" \" + locations.getSymbol() + \" \");\r\n }\r\n // Print the ending column divider\r\n System.out.println(\"|\");\r\n }\r\n // Print the ending row divider\r\n System.out.println(\" -------------------------------\\n\");\r\n \r\n // Print a key for the map\r\n System.out.println(\"Key:\\n\" + \"|=| - Temple\\n\" + \"~~~ - River\\n\" \r\n + \"!!! - Farmland\\n\" + \"^^^ - Mountains\\n\" + \"[*] - Playground\\n\" \r\n + \"$$$ - Capital \" + \"City of Aaron\\n\" + \"### - Chief Judge/Courthouse\\n\" \r\n + \"YYY - Forest\\n\" + \"TTT - Toolshed\\n\" +\"xxx - Pasture with \"\r\n + \"Animals\\n\" + \"+++ - Storehouse\\n\" +\">>> - Undeveloped Land\\n\");\r\n }", "public void showmap() {\n MapForm frame = new MapForm(this.mapLayout);\n frame.setSize(750, 540);\n frame.setLocationRelativeTo(null);\n frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n frame.setVisible(true);\n }", "public void printMap()\n {\n this.mapFrame.paint();\n this.miniMapFrame.paint();\n }", "public BorderPane getMapView() {\n final WebEngine webEngine = new WebEngine(getClass().getResource(\"/racesearcher/ui/map/map.html\").toString());\n final WebView webView = new WebView(webEngine);\n // create map type buttons\n final ToggleGroup mapTypeGroup = new ToggleGroup();\n final ToggleButton road = new ToggleButton(\"Road\");\n road.setSelected(true);\n road.setToggleGroup(mapTypeGroup);\n final ToggleButton satellite = new ToggleButton(\"Satellite\");\n satellite.setToggleGroup(mapTypeGroup);\n final ToggleButton hybrid = new ToggleButton(\"Hybrid\");\n hybrid.setToggleGroup(mapTypeGroup);\n final ToggleButton terrain = new ToggleButton(\"Terrain\");\n terrain.setToggleGroup(mapTypeGroup);\n mapTypeGroup.selectedToggleProperty().addListener(\n new ChangeListener<Toggle>() {\n\n public void changed(\n ObservableValue<? extends Toggle> observableValue,\n Toggle toggle, Toggle toggle1) {\n if (road.isSelected()) {\n webEngine.executeScript(\"document.setMapTypeRoad()\");\n } else if (satellite.isSelected()) {\n webEngine.executeScript(\n \"document.setMapTypeSatellite()\");\n } else if (hybrid.isSelected()) {\n webEngine.executeScript(\n \"document.setMapTypeHybrid()\");\n } else if (terrain.isSelected()) {\n webEngine.executeScript(\n \"document.setMapTypeTerrain()\");\n }\n }\n });\n\n Button zoomIn = new Button(\"Zoom In\");\n zoomIn.setOnAction(new EventHandler<ActionEvent>() {\n\n public void handle(ActionEvent actionEvent) {\n webEngine.executeScript(\"document.zoomIn()\");\n }\n });\n Button zoomOut = new Button(\"Zoom Out\");\n zoomOut.setOnAction(new EventHandler<ActionEvent>() {\n\n public void handle(ActionEvent actionEvent) {\n webEngine.executeScript(\"document.zoomOut()\");\n }\n });\n // create toolbar\n ToolBar toolBar = new ToolBar();\n toolBar.getStyleClass().add(\"map-toolbar\");\n toolBar.getItems().addAll(\n road, satellite, hybrid, terrain,\n createSpacer(),\n new Label(\"Location:\"), zoomIn, zoomOut);\n // create root\n BorderPane root = new BorderPane();\n root.getStyleClass().add(\"map\");\n root.setCenter(webView);\n root.setTop(toolBar);\n\n return root;\n }", "private static void showMap(LinkedList<String> addresses, LinkedList<String> refAddresses, LinkedList<String> comments){\n\t\t\n\t\tString url = null;\n\t\t\n\t\t\tFile f = new File (\"plugins/connectors/googleMaps/bin/tuc/apon/googleMaps/gmaps2.html\");\n//\t\t\tf.deleteOnExit();\n\t\t\ttry {\n\t\t\t\tWriter output = new BufferedWriter(new FileWriter(f));\n\t\t\t\toutput.write(\"<%@page contentType=\\\"text/html\\\" pageEncoding=\\\"UTF-8\\\"%>\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"<!DOCTYPE html \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\"\\n\");\n\t\t\t\toutput.write(\"\\t\\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t<html>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t<head>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\"/>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<title>Google Maps</title>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<script src=\\\"http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAehEtphK7nLd2bfjGnoeamRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRt67OEH9Y01Qjh2XRhCjBABPhfYg&sensor=false\\\"\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\ttype=\\\"text/javascript\\\"></script>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<script type=\\\"text/javascript\\\">\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\tvar map = null;\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\tvar geocoder = null;\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\tfunction initialize() {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tif (GBrowserIsCompatible()) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tmap = new GMap2(document.getElementById(\\\"map_canvas\\\"));\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tmap.setCenter(new GLatLng(35.517321015720384, 24.02161180973053), 13)\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tmap.setUIToDefault();\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tgeocoder = new GClientGeocoder();\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tvar addresses=new Array(\");\n\t\t\t\tfor(int i=0;i<addresses.size();i++){\n\t\t\t\t\tString addr = addresses.get(i);\n\t\t\t\t\toutput.write(\"\\\"\"+addr+\"\\\"\");\n\t\t\t\t\tif(i != addresses.size()-1) output.write(\",\");\n\t\t\t\t}\n\t\t\t\toutput.write(\");\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tvar comments=new Array(\");\n\t\t\t\tfor(int i=0;i<addresses.size();i++){\t//this is done so that comments' array \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//is the same size with addresses array\n\t\t\t\t\tString comnt = \"\";\n\t\t\t\t\tif(i<comments.size())\n\t\t\t\t\t\tcomnt = comments.get(i);\n\t\t\t\t\toutput.write(\"\\\"\"+comnt+\"\\\"\");\n\t\t\t\t\tif(i != addresses.size()-1) output.write(\",\");\n\t\t\t\t}\n\t\t\t\toutput.write(\");\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tvar refAddresses=new Array(\");\n\t\t\t\tfor(int i=0;i<refAddresses.size();i++){\n\t\t\t\t\tString addr = refAddresses.get(i);\n\t\t\t\t\toutput.write(\"\\\"\"+addr+\"\\\"\");\n\t\t\t\t\tif(i != refAddresses.size()-1) output.write(\",\");\n\t\t\t\t}\n\t\t\t\toutput.write(\");\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tvar refComments=new Array(\");\n\t\t\t\tfor(int i=0;i<refAddresses.size();i++){\t//this is done so that comments' array \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//is the same size with addresses array\n\t\t\t\t\tString comnt = \"\";\n\t\t\t\t\toutput.write(\"\\\"\"+comnt+\"\\\"\");\n\t\t\t\t\tif(i != refAddresses.size()-1) output.write(\",\");\n\t\t\t\t}\n\t\t\t\toutput.write(\");\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tfor(i = 0; i < addresses.length; i++){\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tshowAddress(addresses[i],comments[i],0);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tfor(i = 0; i < refAddresses.length; i++){\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tshowAddress(refAddresses[i],refComments[i],1);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tfunction showAddress(address, comments,blue) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tif (geocoder) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\tgeocoder.getLatLng(\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\taddress,\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\tfunction(point) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif (!point && i < addresses.length) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\talert(address + \\\" not found\\\");\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmap.setCenter(point, 13);\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar baseIcon = new GIcon(G_DEFAULT_ICON);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.shadow = \\\"http://www.google.com/mapfiles/shadow50.png\\\";\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.iconSize = new GSize(20, 34);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.shadowSize = new GSize(37, 34);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.iconAnchor = new GPoint(9, 34);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.infoWindowAnchor = new GPoint(9, 2);\\n\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(blue==1)\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.image=\\\"markers/marker_blue.png\\\";\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\telse\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.image=\\\"markers/marker.png\\\";\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar numberedIcon = new GIcon(baseIcon);\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmarkerOptions = { icon:numberedIcon };\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar marker = new GMarker(point, markerOptions);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmap.addOverlay(marker);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tGEvent.addListener(marker, \\\"click\\\", function(){\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmarker.openInfoWindowHtml(address.replace(/\\\\+/g, \\\" \\\")+\\\"<br>\\\"+comments);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t});\\n\");\n\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t</script>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t</head>\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t<body onload=\\\"initialize()\\\" onunload=\\\"GUnload()\\\">\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t<div id=\\\"map_canvas\\\" style=\\\"width: 800px; height: 600px\\\"></div>\\n\");\n\t\t\t\toutput.write(\"\\t\\t</body>\\n\");\n\t\t\t\toutput.write(\"\\t</html>\\n\");\n\t\t\t\t\n\t\t\t\toutput.close();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\turl = \"file://\"+f.getAbsolutePath();\n\t\t\n\t\t\n\t\tif( !java.awt.Desktop.isDesktopSupported() ) {\n\n System.err.println( \"Desktop is not supported (fatal)\" );\n System.exit( 1 );\n }\n\n java.awt.Desktop desktop = java.awt.Desktop.getDesktop();\n\n if( !desktop.isSupported( java.awt.Desktop.Action.BROWSE ) ) {\n\n System.err.println( \"Desktop doesn't support the browse action (fatal)\" );\n System.exit( 1 );\n }\n\n try {\n \t/*\n \t * if all ok, making a URI from the URL and feeding it\n \t * to the platform's default browser \n \t */\n \tjava.net.URI uri = new java.net.URI(url);\n desktop.browse( uri );\n }\n catch ( Exception e ) {\n System.err.println( e.getMessage() );\n e.printStackTrace();\n }\n\t\t\n\t}", "private static void showMap(LinkedList<String> addresses, LinkedList<String> comments, boolean refAddr){\n\t\t\n\t\tString url = null;\n\t\t\n\t\t\tFile f = new File (\"plugins/connectors/googleMaps/bin/tuc/apon/googleMaps/gmaps2.html\");\n//\t\t\tf.deleteOnExit();\n\t\t\ttry {\n\t\t\t\tWriter output = new BufferedWriter(new FileWriter(f));\n\t\t\t\toutput.write(\"<%@page contentType=\\\"text/html\\\" pageEncoding=\\\"UTF-8\\\"%>\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"<!DOCTYPE html \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\"\\n\");\n\t\t\t\toutput.write(\"\\t\\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\\\">\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t<html>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t<head>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\"/>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<title>Google Maps</title>\\n\");\n\t\t\t\t//insert your google code API key here\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<script src=\\\"http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAehEtphK7nLd2bfjGnoeamRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxRt67OEH9Y01Qjh2XRhCjBABPhfYg&sensor=false\\\"\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\ttype=\\\"text/javascript\\\"></script>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t<script type=\\\"text/javascript\\\">\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\tvar map = null;\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\tvar geocoder = null;\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\tfunction initialize() {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tif (GBrowserIsCompatible()) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tmap = new GMap2(document.getElementById(\\\"map_canvas\\\"));\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tmap.setCenter(new GLatLng(35.517321015720384, 24.02161180973053), 13)\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tmap.setUIToDefault();\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tgeocoder = new GClientGeocoder();\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tvar addresses=new Array(\");\n\t\t\t\tfor(int i=0;i<addresses.size();i++){\n\t\t\t\t\tString addr = addresses.get(i);\n\t\t\t\t\toutput.write(\"\\\"\"+addr+\"\\\"\");\n\t\t\t\t\tif(i != addresses.size()-1) output.write(\",\");\n\t\t\t\t}\n\t\t\t\toutput.write(\");\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tvar comments=new Array(\");\n\t\t\t\tfor(int i=0;i<addresses.size();i++){\t//this is done so that comments' array \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//is the same size with addresses array\n\t\t\t\t\tString comnt = \"\";\n\t\t\t\t\tif(i<comments.size())\n\t\t\t\t\t\tcomnt = comments.get(i);\n\t\t\t\t\toutput.write(\"\\\"\"+comnt+\"\\\"\");\n\t\t\t\t\tif(i != addresses.size()-1) output.write(\",\");\n\t\t\t\t}\n\t\t\t\toutput.write(\");\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tfor(i = 0; i < addresses.length; i++){\\n\");\n\t\t\t\tif(!refAddr){\n\t\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tshowAddress(addresses[i],i,comments[i],0);\\n\");\n\t\t\t\t}else{\n\t\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tif(i==(addresses.length-1)){\\n\");\n\t\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\tshowAddress(addresses[i],i,comments[i],1);\\n\");\n\t\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t}else{\\n\");\n\t\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\tshowAddress(addresses[i],i,comments[i],0);\\n\");\n\t\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\t}\n//\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tshowAddress(addresses[i],i,comments[i]);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\tfunction showAddress(address, index,comments,blue) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\tif (geocoder) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\tgeocoder.getLatLng(\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\taddress,\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\tfunction(point) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif (!point && i < addresses.length) {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\talert(address + \\\" not found\\\");\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmap.setCenter(point, 13);\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar letter = String.fromCharCode(\\\"A\\\".charCodeAt(0) + index);\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar baseIcon = new GIcon(G_DEFAULT_ICON);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.shadow = \\\"http://www.google.com/mapfiles/shadow50.png\\\";\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.iconSize = new GSize(20, 34);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.shadowSize = new GSize(37, 34);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.iconAnchor = new GPoint(9, 34);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbaseIcon.infoWindowAnchor = new GPoint(9, 2);\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar letteredIcon = new GIcon(baseIcon);\\n\");\n//\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tletteredIcon.image = \\\"http://www.google.com/mapfiles/marker\\\" + letter + \\\".png\\\";\\n\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif(blue==1){\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tletteredIcon.image = \\\"markers/marker_blue.png\\\";\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\telse{\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tletteredIcon.image = \\\"markers/marker.png\\\";\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\");\n\t\t\t\t/*\n\t\t\t\t * var letteredIcon = new GIcon(baseIcon);\n letteredIcon.image = \"http://www.google.com/mapfiles/marker\" + letter + \".png\";\n\t\t\t\t */\n\t\t\t\t//output.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tletteredIcon.image = \\\"markers/marker_blue.png\\\";\\n\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmarkerOptions = { icon:letteredIcon };\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar marker = new GMarker(point, markerOptions);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmap.addOverlay(marker);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tGEvent.addListener(marker, \\\"click\\\", function(){\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmarker.openInfoWindowHtml(address.replace(/\\\\+/g, \\\" \\\")+\\\"<br>\\\"+comments);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t});\\n\");\n\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t\\t);\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t\\t}\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t\\t</script>\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t</head>\\n\\n\");\n\t\t\t\t\n\t\t\t\toutput.write(\"\\t\\t\\t<body onload=\\\"initialize()\\\" onunload=\\\"GUnload()\\\">\\n\");\n\t\t\t\toutput.write(\"\\t\\t\\t<div id=\\\"map_canvas\\\" style=\\\"width: 800px; height: 600px\\\"></div>\\n\");\n\t\t\t\toutput.write(\"\\t\\t</body>\\n\");\n\t\t\t\toutput.write(\"\\t</html>\\n\");\n\t\t\t\t\n\t\t\t\toutput.close();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\turl = \"file://\"+f.getAbsolutePath();\n\t\t\n\t\t\n\t\tif( !java.awt.Desktop.isDesktopSupported() ) {\n\n System.err.println( \"Desktop is not supported (fatal)\" );\n System.exit( 1 );\n }\n\n java.awt.Desktop desktop = java.awt.Desktop.getDesktop();\n\n if( !desktop.isSupported( java.awt.Desktop.Action.BROWSE ) ) {\n\n System.err.println( \"Desktop doesn't support the browse action (fatal)\" );\n System.exit( 1 );\n }\n\n try {\n \t/*\n \t * if all ok, making a URI from the URL and feeding it\n \t * to the platform's default browser \n \t */\n \tjava.net.URI uri = new java.net.URI(url);\n desktop.browse( uri );\n }\n catch ( Exception e ) {\n System.err.println( e.getMessage() );\n e.printStackTrace();\n }\t\t\n\t}", "public LeafletMapView() {\n super();\n\n this.getChildren().add(webView);\n }", "public void printMap()\n {\n if(this.firstTime)\n {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() { setVisible(true); }\n });\n this.firstTime = false;\n }\n screen.repaint();\n }", "public void displaymap(AircraftData data);", "@Override\r\n public void mapshow() {\r\n showMap l_showmap = new showMap(d_playerList, d_country);\r\n l_showmap.check();\r\n }", "public void showMaps() throws Exception{\r\n MapMaintenanceBaseWindow mapMaintenanceBaseWindow = null;\r\n String unitNumber=mdiForm.getUnitNumber();\r\n \r\n if( ( mapMaintenanceBaseWindow = (MapMaintenanceBaseWindow)mdiForm.getFrame(\r\n CoeusGuiConstants.MAPS_BASE_FRAME_TITLE+\" \"+unitNumber))!= null ){\r\n if( mapMaintenanceBaseWindow.isIcon() ){\r\n mapMaintenanceBaseWindow.setIcon(false);\r\n }\r\n mapMaintenanceBaseWindow.setSelected( true );\r\n return;\r\n }\r\n \r\n MapMaintenanceBaseWindowController mapMaintenanceBaseWindowController = new MapMaintenanceBaseWindowController(unitNumber,false);\r\n mapMaintenanceBaseWindowController.display();\r\n \r\n }", "void display(Map m) {\r\n\t\tm.tour = this;\r\n\t\tm.update(m.getGraphics());\r\n\t}", "public void drawMap() {\r\n\t\tfor (int x = 0; x < map.dimensionsx; x++) {\r\n\t\t\tfor (int y = 0; y < map.dimensionsy; y++) {\r\n\t\t\t\tRectangle rect = new Rectangle(x * scalingFactor, y * scalingFactor, scalingFactor, scalingFactor);\r\n\t\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\t\tif (islandMap[x][y]) {\r\n\t\t\t\t\tImage isl = new Image(\"island.jpg\", 50, 50, true, true);\r\n\t\t\t\t\tislandIV = new ImageView(isl);\r\n\t\t\t\t\tislandIV.setX(x * scalingFactor);\r\n\t\t\t\t\tislandIV.setY(y * scalingFactor);\r\n\t\t\t\t\troot.getChildren().add(islandIV);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trect.setFill(Color.PALETURQUOISE);\r\n\t\t\t\t\troot.getChildren().add(rect);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void printMiniMap() \n { \n /* this.miniMapFrame(); */\n }", "public void showContent() {\n\n mapView.setVisibility(View.VISIBLE);\n loadingLayout.setVisibility(View.GONE);\n errorLayout.setVisibility(View.GONE);\n\n }", "@Override\n\tpublic void drawMap(Map map) {\n\t\tSystem.out.println(\"Draw map\"+map.getClass().getName()+\"on SD Screen\");\n\t}", "@Override\n public void displayMapTiles(MapTile[][] grid)\n {\n Platform.runLater(() -> {\n MapView mapArea = gui.getMapArea();\n mapArea.displayMapGrid(grid, -3, -3);\n });\n }", "public void setShowMap( boolean show )\r\n {\r\n showMap = show;\r\n }", "private void render() {\n\n // Clear the whole screen\n gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\n // Draw the background image\n gc.drawImage(curMap.getMap(), 0,0, canvas.getWidth(), canvas.getHeight());\n\n // Draw Paths\n for(DrawPath p : pathMap.values()) {\n p.draw(gc);\n }\n\n // Draw all of the lines and edges\n\n // Lines\n for(Line l : lineMap.values()) {\n l.draw(gc);\n }\n\n // Points\n for(Point p : pointMap.values()) {\n p.draw(gc);\n }\n\n // Images\n for(Img i : imgMap.values()) {\n i.draw(gc);\n }\n\n // Text\n for(Text t : textMap.values()) {\n t.draw(gc);\n }\n }", "public MapView(int height, int width)\n {\n stats = new FieldStats();\n colors = new LinkedHashMap<>();\n\n setTitle(\"Map Environment Viewer\");\n stepLabel = new JLabel(STEP_PREFIX, JLabel.CENTER);\n infoLabel = new JLabel(\" \", JLabel.CENTER);\n population = new JLabel(POPULATION_PREFIX, JLabel.CENTER);\n\n currentEnvironment = \"Savanna\";\n\n setLocation(500, 50);\n\n fieldView = new FieldView(height, width);\n\n Container contents = getContentPane();\n\n JPanel infoPane = new JPanel(new BorderLayout());\n infoPane.add(stepLabel, BorderLayout.WEST);\n infoPane.add(infoLabel, BorderLayout.CENTER);\n contents.add(infoPane, BorderLayout.NORTH);\n contents.add(fieldView, BorderLayout.CENTER);\n contents.add(population, BorderLayout.SOUTH);\n pack();\n setVisible(true);\n }", "public void showMapTypePanel(){\n mapTypePanel.showMapTypePanel();\n if(mapTypePanel.isVisible() && optionsPanel.isVisible()){\n optionsPanel.setVisible(false);\n if(iconPanel.isVisible()) iconPanel.setVisible(false);\n }\n if(routePanel.isVisible()) routePanel.setVisible(false); closeDirectionList();\n canvas.repaint();\n }", "public MapPanel() {\r\n\t\tthis(EarthFlat.class);\r\n\t}", "public void showMap(boolean isEnd) {\n\t\t// Map shown inbetween games. Works by grabbing the system time in milliseconds,\n\t\t// adding 5000, and then counting down 1 second every second. Effectively keeping\n\t\t// the map screen up for 5 seconds.\n//\t\tif(legnum == 4) {\n//\t\t\treplay = new JButton(\"Replay\");\n//\t\t\treplay.setSize(frameWidth*5/100, frameHeight*5/100);\n//\t\t\tif(isOsprey) {\n//\t\t\t\treplay.setLocation((frameWidth/2)+frameWidth*30/100, frameHeight/2);\n//\t\t\t}\n//\t\t\telse {\n//\t\t\t\treplay.setLocation((frameWidth/2)+frameWidth*15/100, frameWidth/2);\n//\t\t\t}\n//\t\t\tframe.add(replay);\n//\t\t}\n\t\tlong tEnd = System.currentTimeMillis();\n\t\tframe.setVisible(true);\n\t\tlong tStart = tEnd + 3*1000;\n\t\twhile(tStart > tEnd) {\n\t\t\ttStart -= 1000;\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public MAPVIEW() {\n initComponents();\n }", "private MapContainer(MapProvider provider, String htmlApiKey) {\n super(new BorderLayout());\n internalNative = (InternalNativeMaps)NativeLookup.create(InternalNativeMaps.class);\n if(internalNative != null) {\n if(internalNative.isSupported()) {\n currentMapId++;\n mapId = currentMapId;\n PeerComponent p = internalNative.createNativeMap(mapId);\n \n // can happen if Google play services failed or aren't installed on an Android device\n if(p != null) {\n addComponent(BorderLayout.CENTER, p);\n return;\n }\n } \n internalNative = null;\n }\n if(provider != null) {\n internalLightweightCmp = new MapComponent(provider) {\n private boolean drg = false;\n\n @Override\n public void pointerDragged(int x, int y) {\n super.pointerDragged(x, y); \n drg = true;\n }\n\n @Override\n public void pointerDragged(int[] x, int[] y) {\n super.pointerDragged(x, y); \n drg = true;\n }\n\n @Override\n public void pointerReleased(int x, int y) {\n super.pointerReleased(x, y); \n if(!drg) {\n fireTapEvent(x, y);\n }\n drg = false;\n }\n\n };\n addComponent(BorderLayout.CENTER, internalLightweightCmp);\n } else {\n internalBrowser = new BrowserComponent();\n\n internalBrowser.putClientProperty(\"BrowserComponent.fireBug\", Boolean.TRUE);\n\n Location loc = LocationManager.getLocationManager().getLastKnownLocation();\n internalBrowser.setPage(\n \"<!DOCTYPE html>\\n\" +\n \"<html>\\n\" +\n \" <head>\\n\" +\n \" <title>Simple Map</title>\\n\" +\n \" <meta name=\\\"viewport\\\" content=\\\"initial-scale=1.0\\\">\\n\" +\n \" <meta charset=\\\"utf-8\\\">\\n\" +\n \" <style>\\n\" +\n \" /* Always set the map height explicitly to define the size of the div\\n\" +\n \" * element that contains the map. */\\n\" +\n \" #map {\\n\" +\n \" height: 100%;\\n\" +\n \" }\\n\" +\n \" /* Optional: Makes the sample page fill the window. */\\n\" +\n \" html, body {\\n\" +\n \" height: 100%;\\n\" +\n \" margin: 0;\\n\" +\n \" padding: 0;\\n\" +\n \" }\\n\" +\n \" </style>\\n\" +\n \" </head>\\n\" +\n \" <body>\\n\" +\n \" <div id=\\\"map\\\"></div>\\n\" +\n \" <script>\\n\" + \n \" var map;\\n\" +\n \" function initMap() {\\n\" +\n \" var origin = {lat: \"+ loc.getLatitude() + \", lng: \" + loc.getLongitude() + \"};\\n\" +\n \" map = new google.maps.Map(document.getElementById('map'), {\\n\" +\n \" center: origin,\\n\" +\n \" zoom: 8\\n\" +\n \" });\\n\" +\n \" var clickHandler = new ClickEventHandler(map, origin);\\n\" +\n \" }\\n\" +\n \" var ClickEventHandler = function(map, origin) {\\n\" +\n \" var self = this;\\n\" +\n \" this.origin = origin;\\n\" +\n \" this.map = map;\\n\" +\n \" //this.directionsService = new google.maps.DirectionsService;\\n\" +\n \" //this.directionsDisplay = new google.maps.DirectionsRenderer;\\n\" +\n \" //this.directionsDisplay.setMap(map);\\n\" +\n \" //this.placesService = new google.maps.places.PlacesService(map);\\n\" +\n \" //this.infowindow = new google.maps.InfoWindow;\\n\" +\n \" //this.infowindowContent = document.getElementById('infowindow-content');\\n\" +\n \" //this.infowindow.setContent(this.infowindowContent);\\n\" +\n \"\\n\" +\n// \" google.maps.event.addListener(this.map, 'click', function(evt) {\\n\" +\n// \" self.handleClick(evt);\\n\" +\n// \" });\" +\n \"this.map.addListener('click', this.handleClick.bind(this));\\n\" +\n \" };\\n\" +\n \" ClickEventHandler.prototype.handleClick = function(event) {\\n\" + \n \" //document.getElementById('map').innerHTML = 'foobar';\\n\" +\n \" cn1OnClickCallback(event);\" +\n \" };\\n\" +\n \" </script>\\n\" +\n \" <script src=\\\"https://maps.googleapis.com/maps/api/js?key=\" + \n htmlApiKey +\n \"&callback=initMap\\\"\\n\" +\n \" async defer></script>\\n\" +\n \" </body>\\n\" +\n \"</html>\", \"/\");\n browserContext = new JavascriptContext(internalBrowser);\n internalBrowser.addWebEventListener(\"onLoad\", new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n JSObject window = (JSObject)browserContext.get(\"window\");\n window.set(\"cn1OnClickCallback\", new JSFunction() {\n public void apply(JSObject self, Object[] args) {\n Log.p(\"Click\");\n }\n });\n }\n });\n addComponent(BorderLayout.CENTER, internalBrowser);\n }\n setRotateGestureEnabled(true);\n }", "public MapDisplay getMap(){\n\t\treturn map; //gibt die Karte zurück\n\t}", "protected void buildUi() {\n\t\t\t LatLng cawkerCity = LatLng.newInstance(39.509, -98.434);\n\t\t\n\t\t\t map = new MapWidget(cawkerCity, 2);\n\t\t\t map.setSize(\"100%\", \"100%\");\n\t\t\t // Add some controls for the zoom level\n\t\t\t map.addControl(new LargeMapControl());\n\t\t\n\t\t\t // Add a marker\n\t\t\t map.addOverlay(new Marker(cawkerCity));\n\t\t\n\t\t\t // Add an info window to highlight a point of interest\n\t\t\t map.getInfoWindow().open(map.getCenter(),\n\t\t\t new InfoWindowContent(\"World's Largest Ball of Sisal Twine\"));\n\t\t\n\t\t\t root.addNorth(map, 500);\n\n\t}", "public void drawMap() {\n\t\tRoad[] roads = map.getRoads();\r\n\t\tfor (Road r : roads) {\r\n\t\t\tif (r.turn) {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road = true;\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_vert = true;\r\n\t\t\t} else if (r.direction == Direction.NORTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_north = true;\r\n\t\t\telse if (r.direction == Direction.SOUTH)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_south = true;\r\n\t\t\telse if (r.direction == Direction.WEST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_west = true;\r\n\t\t\telse if (r.direction == Direction.EAST)\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].oneway_road_east = true;\r\n\t\t\ttry {\r\n\t\t\t\tcity_squares[r.location.y][r.location.x].updateImage();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void drawMapCities(ArrayList<City> cities) {\n\t\t// Use a label to display the image\n\t\tJFrame frame = new JFrame();\n\t\tframe.setSize(1080, 540);\n\t\tMap map = new Map((ArrayList<City>)(cities), null, null, 1, 0, 0);\n\t\tframe.add(map);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t}", "private void render() {\n\t\ttheMap.draw(g);\n\t\ttheTrainer.draw(g);\n\t}", "@GetMapping(\"/\")\n public ModelAndView index(){\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"index\");\n mav.addObject(\"maps_js\", \"https://maps.googleapis.com/maps/api/js?key=\"+geocache_api+\"&libraries=places\");\n return mav;\n }", "public void showMap() {\n//\t\tSystem.out.print(\" \");\n//\t\tfor (int i = 0; i < maxY; i++) {\n//\t\t\tSystem.out.print(i);\n//\t\t\tSystem.out.print(' ');\n//\t\t}\n\t\tSystem.out.println();\n\t\tfor (int i = 0; i < maxX; i++) {\n//\t\t\tSystem.out.print(i + \" \");\n\t\t\tfor (int j = 0; j < maxY; j++) {\n\t\t\t\tSystem.out.print(coveredMap[i][j]);\n\t\t\t\tSystem.out.print(' ');\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t}", "private void generateMap(){\n if(currDirections != null){\n\n\t \tPoint edge = new Point(mapPanel.getWidth(), mapPanel.getHeight());\n \tmapPanel.paintImmediately(0, 0, edge.x, edge.y);\n\t \t\n\t \t\n\t \t// setup advanced graphics object\n\t Graphics2D g = (Graphics2D)mapPanel.getGraphics();\n\t g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t g.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);\n\n\t \n\t Route rt = currDirections.getRoute();\n\t\n\t boolean singleStreet = rt.getGeoSegments().size() == 1;\n\t Route contextRoute = (!singleStreet ? rt : \n\t \t\tnew Route( virtualGPS.findFullSegment(rt.getEndingGeoSegment()) ) );\n\t \n\t // calculate the longitude and latitude bounds\n\t int[] bounds = calculateCoverage( contextRoute , edge);\n\t \n\t Collection<StreetSegment> map = virtualGPS.getContext(bounds, contextRoute);\n\t \n\t \n\t // draw every segment of the map\n\t g.setColor(Color.GRAY);\n\t for(GeoSegment gs : map){\n\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t \n\t // draw the path over the produced map in BLUE\n\t g.setColor(Color.BLUE);\n\t for(GeoFeature gf : rt.getGeoFeatures()){\n\t for(GeoSegment gs : gf.getGeoSegments()){\n\t\t \tdrawSegment(g, bounds, edge, gs);\n\t }\n\t Point start = derivePoint(bounds, edge, gf.getStart());\n\t Point end = derivePoint(bounds, edge, gf.getEnd());\n\t \n\t int dX = (int)(Math.abs(start.x - end.x) / 2.0);\n\t int dY = (int)(Math.abs(start.y - end.y) / 2.0);\n\n if(!jCheckBoxHideStreetNames.isSelected()){\n \tg.setFont(new Font(g.getFont().getFontName(), Font.BOLD, g.getFont().getSize()));\n \tg.drawString(gf.getName(), start.x + (start.x<end.x ? dX : -dX),\n \t\t\tstart.y + (start.y<end.y ? dY : -dY));\n }\n\t }\n }\n }", "public void printMap() {\n String s = \"\";\n Stack st = new Stack();\n st.addAll(map.entrySet());\n while (!st.isEmpty()) {\n s += st.pop().toString() + \"\\n\";\n }\n window.getDHTText().setText(s);\n }", "@RequestMapping(value = \"/homed/{map}\", method = RequestMethod.GET)\r\n public String mapHomeDebug(HttpServletRequest request, @PathVariable(\"map\") String map, ModelMap model) throws ServletException, IOException { \r\n return(renderPage(request, model, \"map\", map, null, null, true));\r\n }", "public MapPanel(String map, Object[] toLoad) {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setPreferredSize(new Dimension(WIDTH, HEIGHT));\n\t\tthis.setSize(this.getPreferredSize());\n\t\tthis.setVisible(true);\n\t\tthis.setFocusable(true);\n\t\tthis.requestFocus();\n\t\ttheMap = new Map(map, 50);\n\t\ttheTrainer = new Trainer(theMap, toLoad);\n\n\t\tinBattle = false;\n\t}", "public void updateMap(boolean animate) {\n\t\tgetContentPane().add(mapContainer);\n\t\trevalidate();\n\t\t\n\t\t// Setting up map\n\t\tint width = mapContainer.getWidth();\n\t\tint height = mapContainer.getHeight();\n\t\tBufferedImage I = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n\t\tGraphics2D g2d = I.createGraphics();\n\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\t// Setting up map dimensions\n\t\tdouble xM = width*zoom, yM = height*zoom;\n\t\tdouble xL = Math.abs(mapBounds[1]-mapBounds[3]), yL = Math.abs(mapBounds[0]-mapBounds[2]);\n\t\tdouble xI = (xM-(yM-60)*(xL/yL))/2, yI = 30;\n\t\tif(xM/yM < xL/yL) {\n\t\t\txI = 30;\n\t\t\tyI += (yM-(xM-60)*(yL/xL))/2;\n\t\t}\n\t\tdouble yP = yM*yF-yM/zoom/2, xP = xM*xF-xM/zoom/2;\n\t\t\n\t\tg2d.setColor(Color.white);\n\t\tg2d.fillRect(20, 20, width-40, height-40);\n\t\tg2d.setColor(roadColor);\n\t\tg2d.setStroke(new BasicStroke(roadWidth));\n\t\t\n\t\t// Drawing each road\n\t\tint i, n = G.getSize();\n\t\tdouble[] v1, v2;\n\t\tfor(i = 0; i < n; i++) {\n\t\t\tfor(Edge e : G.getEdges(i)) {\t\t\t\t\n\t\t\t\tv1 = V.get(i);\n\t\t\t\tv2 = V.get(e.next);\n\t\t\t\tif(animate)\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 0, g2d);\n\t\t\t\telse {\n\t\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], (int)(v1[2]*v2[2]), g2d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Drawing each path\n\t\tif(animate) {\n\t\t\tn = P.size()-1;\n\t\t\tfor(i = 0; i < n; i++) {\n\t\t\t\t\n\t\t\t\tv1 = V.get(P.get(i));\n\t\t\t\tv2 = V.get(P.get(i+1));\n\t\t\t\t\n\t\t\t\tdrawRoad(xM, yM, xL, yL, xI, yI, xP, yP, v1[0], v1[1], v2[0], v2[1], 1, g2d);\n\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\t\t\trevalidate();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Creating image base\n\t\tg2d.setStroke(new BasicStroke(1));\n\t\tg2d.setColor(Color.lightGray);\n\t\tg2d.fillRect(0, 0, width, 20);\n\t\tg2d.fillRect(0, 0, 20, height);\n\t\tg2d.fillRect(width-20, 0, 20, height);\n\t\tg2d.fillRect(0, height-20, width, 20);\n\t\tg2d.setColor(Color.black);\n\t\tg2d.drawRect(20, 20, width-40, height-40);\n\t\tg2d.setFont(titleFont);\n\t\tg2d.drawString(title, 40, 15);\n\t\tint tw = g2d.getFontMetrics().stringWidth(title);\n\t\tg2d.setFont(subtitleFont);\n\t\tg2d.drawString(subtitle, 50+tw, 15);\n\t\t\n\t\t\n\t\tmapContainer.setIcon(new ImageIcon(I));\n\t\trevalidate();\n\t}", "public static void drawMapPoints(ArrayList<PointOfInterest> points) {\n\t\t// Use a label to display the image\n\t\tJFrame frame = new JFrame();\n\t\tframe.setSize(1080, 540);\n\t\tMap map = new Map(null, (ArrayList<PointOfInterest>)(points), null, 2, 0, 0);\n\t\tframe.add(map);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t}", "public void onStartup()\n/* 359: */ {\n/* 360:438 */ super.onStartup();\n/* 361: */ \n/* 362:440 */ this.mapPanel.addMouseListener(new MouseAdapter()\n/* 363: */ {\n/* 364: */ public void mouseClicked(MouseEvent e)\n/* 365: */ {\n/* 366:443 */ if (e.getButton() == 1)\n/* 367: */ {\n/* 368:444 */ Point p = e.getPoint();\n/* 369:445 */ if ((TileGIS.this.mapPanel.courtesyBounds != null) && (TileGIS.this.mapPanel.courtesyBounds.contains(p)))\n/* 370: */ {\n/* 371:446 */ TileGIS.this.getPresentation().openWebSite(TileGIS.this.mapPanel.tip.courtesyLnk);\n/* 372: */ }\n/* 373:447 */ else if ((TileGIS.this.mapPanel.courtesyImgBounds != null) && (TileGIS.this.mapPanel.courtesyImgBounds.contains(p)))\n/* 374: */ {\n/* 375:448 */ TileGIS.this.getPresentation().openWebSite(TileGIS.this.mapPanel.tip.courtesyLnk);\n/* 376: */ }\n/* 377: */ else\n/* 378: */ {\n/* 379:451 */ Point mP = TileGIS.this.mapPanel.panelToMap(p);\n/* 380:452 */ double lon = MercatorProj.XtoLon(mP.x, TileGIS.this.mapPanel.zoom);\n/* 381:453 */ double lat = MercatorProj.YtoLat(mP.y, TileGIS.this.mapPanel.zoom);\n/* 382:454 */ TileGIS.this.onClick(lat, lon);\n/* 383: */ }\n/* 384: */ }\n/* 385: */ }\n/* 386:458 */ });\n/* 387:459 */ getPresentation().getPanel().addContainerListener(new ContainerListener()\n/* 388: */ {\n/* 389: */ public void componentAdded(ContainerEvent e)\n/* 390: */ {\n/* 391:461 */ if (e.getChild() == TileGIS.this.placeholder.getJComponent()) {\n/* 392:462 */ TileGIS.this.getPresentation().getPanel().add(TileGIS.this.mapPanel);\n/* 393: */ }\n/* 394: */ }\n/* 395: */ \n/* 396: */ public void componentRemoved(ContainerEvent e)\n/* 397: */ {\n/* 398:467 */ if (e.getChild() == TileGIS.this.placeholder.getJComponent()) {\n/* 399:468 */ TileGIS.this.getPresentation().getPanel().remove(TileGIS.this.mapPanel);\n/* 400: */ }\n/* 401: */ }\n/* 402:472 */ });\n/* 403:473 */ this.placeholder.getJComponent().addComponentListener(new ComponentListener()\n/* 404: */ {\n/* 405: */ public void componentShown(ComponentEvent e) {}\n/* 406: */ \n/* 407: */ public void componentHidden(ComponentEvent e) {}\n/* 408: */ \n/* 409: */ public void componentResized(ComponentEvent e)\n/* 410: */ {\n/* 411:478 */ TileGIS.this.mapPanel.setSize(TileGIS.this.placeholder.getJComponent().getSize());\n/* 412: */ }\n/* 413: */ \n/* 414: */ public void componentMoved(ComponentEvent e)\n/* 415: */ {\n/* 416:482 */ TileGIS.this.mapPanel.setLocation(TileGIS.this.placeholder.getJComponent().getLocation());\n/* 417: */ }\n/* 418: */ });\n/* 419: */ }", "private void showMapAndSendCoordinate(String coordinateMap, String name) {\n showMapFragment = new ShowMapFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"LatLng\", coordinateMap);\n bundle.putString(\"Name\", name);\n showMapFragment.setArguments(bundle);\n\n getSupportFragmentManager()\n .beginTransaction()\n .replace(R.id.linearMap, showMapFragment)\n .commit();\n }", "public boolean getShowMap()\r\n {\r\n return showMap;\r\n }", "@Override\n\tpublic void run() {\n\t\tfinal MapOptions options = MapOptions.create(); //Dhmiourgeia antikeimenou me Factory (xwris constructor)\n\t\t//Default na fenetai xarths apo doruforo (Hybrid)\n\t\toptions.setMapTypeId(MapTypeId.HYBRID);\n\t\toptions.setZoom(Map.GOOGLE_MAPS_ZOOM);\n\t\t//Dhmiourgei ton xarth me tis panw ruthmiseis kai to vazei sto mapDiv\n\t\tgoogleMap = GoogleMap.create(map, options);\n\t\t//Otan o xrhsths kanei click epanw ston xarth\n\t\tfinal MarkerOptions markerOptions = MarkerOptions.create();\n\t\tmarkerOptions.setMap(googleMap);\n\t\tmarker = Marker.create(markerOptions);\n\t\t//psaxnei antikeimeno gia na kentrarei o xarths kai na fortwsei h forma\n\t\tfinal String id = Window.Location.getParameter(\"id\");\n\t\tif (id == null) {\n\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorRetrievingMedium(\n\t\t\t\t\tMOBILE_MEDIA_SHARE_CONSTANTS.noMediaIdSpecified()));\n\t\t\t//redirect sto map\n\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), URL.encodeQueryString(\n\t\t\t\t\t//me to antistoixo locale \n\t\t\t\t\tLocaleInfo.getCurrentLocale().getLocaleName())));\n\t\t} else {\n\t\t\t//Klhsh tou MEDIA_SERVICE gia na paroume to antikeimeno (metadedomena)\n\t\t\tMEDIA_SERVICE.getMedia(id, new AsyncCallback<Media>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(final Throwable throwable) {\n\t\t\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorRetrievingMedium(throwable.getMessage()));\n\t\t\t\t\t//redirect sto map\n\t\t\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), URL.encodeQueryString(\n\t\t\t\t\t\t\t//me to antistoixo locale \n\t\t\t\t\t\t\tLocaleInfo.getCurrentLocale().getLocaleName())));\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(final Media media) {\n\t\t\t\t\tif (media == null) {\n\t\t\t\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorViewingMedia(\n\t\t\t\t\t\t\t\tMOBILE_MEDIA_SHARE_CONSTANTS.mediaNotFound()));\n\t\t\t\t\t\t//redirect sto map\n\t\t\t\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), URL.encodeQueryString(\n\t\t\t\t\t\t\t\t//me to antistoixo locale \n\t\t\t\t\t\t\t\tLocaleInfo.getCurrentLocale().getLocaleName())));\n\t\t\t\t\t//o xrhsths vlepei to media giati einai diko tou 'h einai diaxeirisths 'h to media einai public\n\t\t\t\t\t} else if (currentUser.equals(media.getUser()) || (currentUser.getStatus() == UserStatus.ADMIN) || media.isPublic()) {\n\t\t\t\t\t\t//Gemisma tou div content analoga ton tupo\n\t\t\t\t\t\tswitch (MediaType.getMediaType(media.getType())) {\n\t\t\t\t\t\tcase APPLICATION:\n\t\t\t\t\t\t\tfinal ImageElement application = Document.get().createImageElement();\n\t\t\t\t\t\t\tapplication.setSrc(MOBILE_MEDIA_SHARE_URLS.selectedImage(GWT.getHostPageBaseURL(), MediaType.APPLICATION.name().toLowerCase()));\n\t\t\t\t\t\t\tapplication.setAlt(media.getTitle());\n\t\t\t\t\t\t\tapplication.getStyle().setWidth(CONTENT_WIDTH, Style.Unit.PX);\n\t\t\t\t\t\t\tapplication.getStyle().setHeight(CONTENT_HEIGHT, Style.Unit.PX);\n\t\t\t\t\t\t\tcontent.appendChild(application);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase AUDIO:\n\t\t\t\t\t\t\tfinal AudioElement audio = Document.get().createAudioElement();\n\t\t\t\t\t\t\taudio.setControls(true);\n\t\t\t\t\t\t\taudio.setPreload(AudioElement.PRELOAD_AUTO);\n\t\t\t\t\t\t\t//url sto opoio vriskontai ta dedomena tou antikeimenou. Ta travaei o browser\n\t\t\t\t\t\t\t//me xrhsh tou media servlet\n\t\t\t\t\t\t\tfinal SourceElement audioSource = Document.get().createSourceElement();\n\t\t\t\t\t\t\taudioSource.setSrc(MOBILE_MEDIA_SHARE_URLS.download(GWT.getHostPageBaseURL(), media.getId()));\n\t\t\t\t\t\t\taudioSource.setType(media.getType());\n\t\t\t\t\t\t\taudio.appendChild(audioSource);\n\t\t\t\t\t\t\tcontent.appendChild(audio);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase IMAGE:\n\t\t\t\t\t\t\tfinal ImageElement image = Document.get().createImageElement();\n\t\t\t\t\t\t\timage.setSrc(MOBILE_MEDIA_SHARE_URLS.download(GWT.getHostPageBaseURL(), media.getId()));\n\t\t\t\t\t\t\timage.setAlt(media.getTitle());\n\t\t\t\t\t\t\timage.getStyle().setWidth(CONTENT_WIDTH, Style.Unit.PX);\n\t\t\t\t\t\t\timage.getStyle().setHeight(CONTENT_HEIGHT, Style.Unit.PX);\n\t\t\t\t\t\t\tcontent.appendChild(image);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase TEXT:\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * @see http://www.gwtproject.org/doc/latest/tutorial/JSON.html#http\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tfinal ParagraphElement text = Document.get().createPElement();\n\t\t\t\t\t\t\ttext.getStyle().setWidth(CONTENT_WIDTH, Style.Unit.PX);\n\t\t\t\t\t\t\ttext.getStyle().setHeight(CONTENT_HEIGHT, Style.Unit.PX);\n\t\t\t\t\t\t\t//scrollbar gia to text\n\t\t\t\t\t\t\ttext.getStyle().setOverflow(Style.Overflow.SCROLL);\n\t\t\t\t\t\t\tcontent.appendChild(text);\n\t\t\t\t\t\t\t//Zhtaei asugxrona to periexomeno enos url\n\t\t\t\t\t\t\tfinal RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.GET,\n\t\t\t\t\t\t\t\t\tMOBILE_MEDIA_SHARE_URLS.download(GWT.getHostPageBaseURL(), media.getId()));\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\trequestBuilder.sendRequest(null, new RequestCallback() {\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onError(final Request request, final Throwable throwable) {\n\t\t\t\t\t\t\t\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorViewingMedia(throwable.getMessage()));\n\t\t\t\t\t\t\t\t\t\t//redirect sto map\n\t\t\t\t\t\t\t\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), URL.encodeQueryString(\n\t\t\t\t\t\t\t\t\t\t\t\t//me to antistoixo locale \n\t\t\t\t\t\t\t\t\t\t\t\tLocaleInfo.getCurrentLocale().getLocaleName())));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void onResponseReceived(final Request request, final Response response) {\n\t\t\t\t\t\t\t\t\t\tif (response.getStatusCode() == Response.SC_OK) {\n\t\t\t\t\t\t\t\t\t\t\t//selida pou fernei to response se me to keimeno pros anazhthsh\n\t\t\t\t\t\t\t\t\t\t\ttext.setInnerText(response.getText());\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t//selida pou efere to response se periptwsh sfalmatos (getText())\n\t\t\t\t\t\t\t\t\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorViewingMedia(response.getText()));\n\t\t\t\t\t\t\t\t\t\t\t//redirect sto map\n\t\t\t\t\t\t\t\t\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), URL.encodeQueryString(\n\t\t\t\t\t\t\t\t\t\t\t\t\t//me to antistoixo locale \n\t\t\t\t\t\t\t\t\t\t\t\t\tLocaleInfo.getCurrentLocale().getLocaleName())));\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} catch (final RequestException e) {\n\t\t\t\t\t\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorViewingMedia(e.getMessage()));\n\t\t\t\t\t\t\t\t//redirect sto map\n\t\t\t\t\t\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), URL.encodeQueryString(\n\t\t\t\t\t\t\t\t\t\t//me to antistoixo locale \n\t\t\t\t\t\t\t\t\t\tLocaleInfo.getCurrentLocale().getLocaleName())));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase VIDEO:\n\t\t\t\t\t\t\tfinal VideoElement video = Document.get().createVideoElement();\n\t\t\t\t\t\t\tvideo.setPoster(MOBILE_MEDIA_SHARE_URLS.selectedImage(GWT.getHostPageBaseURL(), MediaType.VIDEO.name().toLowerCase()));\n\t\t\t\t\t\t\tvideo.setControls(true);\n\t\t\t\t\t\t\tvideo.setPreload(VideoElement.PRELOAD_AUTO);\n\t\t\t\t\t\t\tvideo.setWidth(Double.valueOf(CONTENT_WIDTH).intValue());\n\t\t\t\t\t\t\tvideo.setHeight(Double.valueOf(CONTENT_HEIGHT).intValue());\n\t\t\t\t\t\t\tfinal SourceElement videoSource = Document.get().createSourceElement();\n\t\t\t\t\t\t\tvideoSource.setSrc(MOBILE_MEDIA_SHARE_URLS.download(GWT.getHostPageBaseURL(), media.getId()));\n\t\t\t\t\t\t\tvideoSource.setType(media.getType());\n\t\t\t\t\t\t\tvideo.appendChild(videoSource);\n\t\t\t\t\t\t\tcontent.appendChild(video);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//O current user peirazei to media an einai diko tou 'h an einai diaxeirisths\n\t\t\t\t\t\tif (currentUser.equals(media.getUser()) || (currentUser.getStatus() == UserStatus.ADMIN)) {\n\t\t\t\t\t\t\tedit.setEnabled(true);\n\t\t\t\t\t\t\tdelete.setEnabled(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttitle.setText(media.getTitle());\n\t\t\t\t\t\t//prosthikh html (keimeno kai eikona) stin selida\n\t\t\t\t\t\ttype.setHTML(List.TYPE.getValue(media));\n\t\t\t\t\t\t//analoga ton tupo dialegetai to katallhlo eikonidio\n\t\t\t\t\t\tmarker.setIcon(MarkerImage.create(MOBILE_MEDIA_SHARE_URLS.selectedImage(GWT.getHostPageBaseURL(), \n\t\t\t\t\t\t\t\tMediaType.getMediaType(media.getType()).name().toLowerCase())));\n\t\t\t\t\t\tsize.setText(List.SIZE.getValue(media));\n\t\t\t\t\t\tduration.setText(List.DURATION.getValue(media));\n\t\t\t\t\t\tuser.setText(List.USER.getValue(media));\n\t\t\t\t\t\tcreated.setText(List.CREATED.getValue(media));\n\t\t\t\t\t\tedited.setText(List.EDITED.getValue(media));\n\t\t\t\t\t\tpublik.setHTML(List.PUBLIC.getValue(media));\n\t\t\t\t\t\tlatitudeLongitude.setText(\"(\" + List.LATITUDE.getValue(media) + \", \" + List.LONGITUDE.getValue(media) + \")\");\n\t\t\t\t\t\tfinal LatLng latLng = LatLng.create(media.getLatitude().doubleValue(), media.getLongitude().doubleValue());\n\t\t\t\t\t\tgoogleMap.setCenter(latLng);\n\t\t\t\t\t\tmarker.setPosition(latLng);\n\t\t\t\t\t} else { //Vrethike to media alla einai private allounou\n\t\t\t\t\t\tWindow.alert(MOBILE_MEDIA_SHARE_MESSAGES.errorViewingMedia(\n\t\t\t\t\t\t\t\tMOBILE_MEDIA_SHARE_CONSTANTS.accessDenied()));\n\t\t\t\t\t\t//redirect sto map\n\t\t\t\t\t\tWindow.Location.assign(MOBILE_MEDIA_SHARE_URLS.map(GWT.getHostPageBaseURL(), \n\t\t\t\t\t\t\t\tURL.encodeQueryString(LocaleInfo.getCurrentLocale().getLocaleName())));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "@Override\n\tpublic void mapInitialized() {\n\t\tfinal LatLong center = new LatLong(32.777, 35.0225);\n\t\tSystem.out.println(\"got here\");\n\t\tmapComponent.addMapReadyListener(() -> checkCenter(center));\n\t\t// lblClick.setText((center + \"\"));\n\t\tfinal MapOptions options = new MapOptions();\n\t\toptions.center(center).zoom(12).overviewMapControl(false).panControl(false).rotateControl(false)\n\t\t\t\t.scaleControl(true).streetViewControl(true).zoomControl(true).mapType(MapTypeIdEnum.ROADMAP);\n\n\t\tmap = mapComponent.createMap(options, false);\n\t\tmap.setHeading(123.2);\n\t\tmap.fitBounds(new LatLongBounds(center, new LatLong(32.779032, 35.024663)));\n\t\tmap.addUIEventHandler(UIEventType.click, (final JSObject obj) -> {\n\t\t\tLatLong newLat = new LatLong((JSObject) obj.getMember(\"latLng\"));\n\t\t\tnewLat = new LatLong(newLat.getLatitude(), newLat.getLongitude());\n\t\t\tlblClick.setText(newLat + \"\");\n\t\t\tmap.addMarker(createMarker(newLat, \"marker at \" + newLat));\n\t\t});\n\t\tmapTypeCombo.setDisable(false);\n\n\t\tmapTypeCombo.getItems().addAll(MapTypeIdEnum.ALL);\n\t\tdirectionsService = new DirectionsService();\n\t\tdirectionsPane = mapComponent.getDirec();\n\t\tscene.getWindow().sizeToScene();\n\t}", "public MapPanel() {\n painter = NONE_PAINTER;\n setBackground(BACKGROUND_COLOR);\n mapBounds = new Rectangle2D.Double(0, 0, MIN_WIDTH, MIN_HEIGHT);\n mouseClick = SwingObservable.mouse(this, SwingObservable.MOUSE_CLICK)\n .toFlowable(BackpressureStrategy.LATEST)\n .filter(ev -> ev.getID() == MouseEvent.MOUSE_CLICKED)\n .map(this::mapMouseEvent);\n logger.atDebug().log(\"Created\");\n }", "private ImageIcon displayMap(int mapZoomLevel, Map map) {\n try {\n ImageIcon mapImage = new ImageIcon((new ImageIcon(map.getMap(mapZoomLevel))).getImage().getScaledInstance(700,450,java.awt.Image.SCALE_SMOOTH));\n return mapImage; \n\n } catch(Exception e) {\n return null; \n }\n }", "private void inicMapComponent() {\n\t\tmapView = ((MapFragment) getFragmentManager()\n\t\t\t\t.findFragmentById(R.id.map)).getMap();\n\t\t\n\n\t\tlocationService = new LocationService(MapPage.this);\n\t\tlocationService.getLocation();\n\t\t\n\t\tmapView.setMyLocationEnabled(true);\n\n\t Location location = mapView.getMyLocation();\n\t LatLng myLocation = null; //new LatLng(44.8167d, 20.4667d);\n\t \n\t\tif (location != null) {\n\t myLocation = new LatLng(location.getLatitude(),\n\t location.getLongitude());\n\t } else {\n\t \tLocationManager service = (LocationManager) getSystemService(LOCATION_SERVICE);\n\t\t\tCriteria criteria = new Criteria();\n\t\t\tString provider = service.getBestProvider(criteria, false);\n\t\t\tLocation lastKnownLocation = service.getLastKnownLocation(provider);\n\t\t\tmyLocation = new LatLng(lastKnownLocation.getLatitude(),lastKnownLocation.getLongitude());\n\t }\n\t\t\n\t\tmapView.animateCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 13));\n\t\t\n\t\tmapView.setPadding(0, 0, 0, 80);\n\t\t\n\t\tmapView.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onInfoWindowClick(Marker marker) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t//onMapWindwosClick(marker.getId(),marker.getTitle());\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t\n\t}", "public void show(int i){\n if (i == 0){\n this.showmap();\n } else \n this.showfigure();\n }", "public GUI(GUIListener gl) {\n // Load certain necessary resources.\n map = getClass().getResource(\"/res/map.html\").toString();\n start = createImageIcon(\"play_16.png\");\n stop = createImageIcon(\"stop_16.png\");\n MIN_FRAME_DIM = new Dimension(960, 540);\n popup = new PopupMenu();\n trayIcon = new TrayIcon(createImageIcon(\"map_16.png\").getImage());\n languageCodes.put(\"English\", \"en\");\n languageCodes.put(\"Dutch\", \"nl\");\n languageCodes.put(\"German\", \"de\");\n languageCodes.put(\"French\", \"fr\");\n languageCodes.put(\"Spanish\", \"es\");\n languageCodes.put(\"Italian\", \"it\");\n languageCodes.put(\"Russian\", \"ru\");\n languageCodes.put(\"Lithuanian\", \"lt\");\n languageCodes.put(\"Hindi\", \"hi\");\n languageCodes.put(\"Tamil\", \"ta\");\n languageCodes.put(\"Arabic\", \"ar\");\n languageCodes.put(\"Chinese\", \"zh\");\n languageCodes.put(\"Japanese\", \"ja\");\n languageCodes.put(\"Korean\", \"ko\");\n languageCodes.put(\"Vietnamese\", \"vi\");\n\n // Create a browser, its associated UI view object and the browser listener.\n browser = new Browser();\n browserView = new BrowserView(browser);\n listener = gl;\n \n /* set link load handler to load all links in the running system's \n default browser.*/\n browser.setLoadHandler(new DefaultLoadHandler(){\n\n @Override\n public boolean onLoad(LoadParams lp) {\n String url = lp.getURL();\n boolean cancel = !url.endsWith(\"map.html\");\n if(cancel) {\n try {\n // open up any other link on the system's default browser.\n UIutils.openWebpage(new java.net.URL(url));\n } catch (MalformedURLException ex) {\n JDialog.setDefaultLookAndFeelDecorated(true);\n JOptionPane.showMessageDialog(null, \"Could not open link.\",\n \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }\n return cancel;\n }\n \n });\n\n /* Set the Windows look and feel and initialize all the GUI components. */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html\n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Windows\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n initComponents();\n\n // Select english as a filter language by default.\n String[] sel = new String[] {\"English\", \"en\"};\n selectedLanguages.put(sel[0], sel[1]);\n ((DefaultTableModel) selectedLangTable.getModel()).addRow(sel);\n\n // Load certain variables.\n timeScale = 60000; // 1min = 60000ms\n\n // Add the map view to the GUI frame and load the map URL.\n mapPanel.add(browserView, BorderLayout.CENTER);\n browser.loadURL(map);\n\n // Adding support for minimizing window to system tray if supported.\n if (SystemTray.isSupported()) {\n systrayCheckBox.setEnabled(true);\n try {\n systrayCheckBox.setSelected(Boolean.parseBoolean(\n listener.getProperties().getProperty(\"MINIMIZE_TO_TRAY\")));\n } catch (Exception ex) {}\n systrayCheckBox.setToolTipText(\"Enable/Disable minimizing to system tray.\");\n\n // Context menu items to system tray icon.\n final MenuItem exitItem = new MenuItem(\"Exit\");\n exitItem.addActionListener((ActionEvent e) -> {\n GUI.this.exitMenuItemActionPerformed(e);\n });\n popup.add(exitItem);\n trayIcon.setPopupMenu(popup);\n trayIcon.addActionListener((ActionEvent e) -> {\n GUI.this.setVisible(true);\n GUI.this.setExtendedState(GUI.NORMAL);\n SystemTray.getSystemTray().remove(trayIcon);\n });\n } else {\n systrayCheckBox.setEnabled(false);\n systrayCheckBox.setToolTipText(\"OS does not support this function.\");\n }\n\n // add a text field change listener to the twitter credentials input dialog.\n DocumentListener dl1 = new DocumentListener() {\n\n @Override\n public void insertUpdate(DocumentEvent e) {\n applyKeysButton.setEnabled(true);\n }\n\n @Override\n public void removeUpdate(DocumentEvent e) {\n applyKeysButton.setEnabled(true);\n }\n\n @Override\n public void changedUpdate(DocumentEvent e) {\n }\n };\n consumerKeyTextField.getDocument().addDocumentListener(dl1);\n consumerSecretTextField.getDocument().addDocumentListener(dl1);\n apiKeyTextField.getDocument().addDocumentListener(dl1);\n apiSecretTextField.getDocument().addDocumentListener(dl1);\n\n // add a text field change listener to the MySQL credentials input dialog.\n DocumentListener dl2 = new DocumentListener() {\n\n @Override\n public void insertUpdate(DocumentEvent e) {\n sqlApplyButton.setEnabled(true);\n }\n\n @Override\n public void removeUpdate(DocumentEvent e) {\n sqlApplyButton.setEnabled(true);\n }\n\n @Override\n public void changedUpdate(DocumentEvent e) {\n }\n };\n sqlUserTextField.getDocument().addDocumentListener(dl2);\n sqlPasswordField.getDocument().addDocumentListener(dl2);\n sqlLinkTextField.getDocument().addDocumentListener(dl2);\n \n // Set and start the connection to the MySQL database if USE_MYSQL is true.\n try {\n Properties p = listener.getProperties();\n boolean isSelected = Boolean.parseBoolean(p.getProperty(\"USE_MYSQL\"));\n useDBCheckBox.setSelected(isSelected);\n dbInputDialogShown(null);\n if(isSelected)\n sqlApplyButtonActionPerformed(null);\n } catch (Exception ex) {}\n\n // Display the keywords dialog at start\n keywordsDialog.setVisible(true);\n }", "private void setUpMap() {\n mMap.getUiSettings().setZoomControlsEnabled(false);\n \n // Setting an info window adapter allows us to change the both the\n // contents and look of the\n // info window.\n mMap.setInfoWindowAdapter(new CustomInfoWindowAdapter(getLayoutInflater()));\n \n // Add lots of markers to the map.\n addMarkersToMap();\n \n }", "@FXML\n\tpublic void loadMap(ActionEvent ev) {\n menuBar.getScene().getWindow().hide();\n \n\t\tStage map = new Stage();\n\t\ttry {\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"/FXML/Map.fxml\"));\n\t\t\tScene scene = new Scene(root);\n\t\t\tmap.setScene(scene);\n\t\t\tmap.show();\n\t\t\tmap.setResizable(false);\n\t\t\tmap.centerOnScreen();\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\t\n\t}", "@FXML\n\tpublic void loadMap(ActionEvent ev) {\n menuBar.getScene().getWindow().hide();\n \n\t\tStage map = new Stage();\n\t\ttry {\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"/FXML/Map.fxml\"));\n\t\t\tScene scene = new Scene(root);\n\t\t\tmap.setScene(scene);\n\t\t\tmap.show();\n\t\t\tmap.setResizable(false);\n\t\t\tmap.centerOnScreen();\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\t\n\t}", "private void inflateMap() {\n\n // Alter the visibiliity\n waitLayout.setVisibility(View.GONE);\n mapWearFrame.setVisibility(View.VISIBLE);\n\n // Set up fragment manager\n fm = getFragmentManager();\n\n // Set up map fragment\n mapFragment = (MapFragment) fm.findFragmentByTag(TAG_FRAG_MAP);\n if (mapFragment == null) {\n // Initialize map options\n GoogleMapOptions mapOptions = new GoogleMapOptions();\n mapOptions.mapType(GoogleMap.MAP_TYPE_NORMAL)\n .compassEnabled(true)\n .rotateGesturesEnabled(true)\n .tiltGesturesEnabled(true);\n mapFragment = MapFragment.newInstance(mapOptions);\n }\n mapFragment.getMapAsync(this);\n\n // Add map to DismissOverlayView\n fm.beginTransaction().add(R.id.mapWearFrame, mapFragment).commit();\n }", "@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }", "@RequestMapping(value = \"/home/{map}\", method = RequestMethod.GET)\r\n public String mapHome(HttpServletRequest request, @PathVariable(\"map\") String map, ModelMap model) throws ServletException, IOException { \r\n return(renderPage(request, model, \"map\", map, null, null, false));\r\n }", "private void initializeMap() {\n // - Map -\n map = (MapView) this.findViewById(R.id.map);\n //map.setBuiltInZoomControls(true);\n map.setMultiTouchControls(true);\n map.setMinZoomLevel(16);\n // Tiles for the map, can be changed\n map.setTileSource(TileSourceFactory.MAPNIK);\n\n // - Map controller -\n IMapController mapController = map.getController();\n mapController.setZoom(19);\n\n // - Map overlays -\n CustomResourceProxy crp = new CustomResourceProxy(getApplicationContext());\n currentLocationOverlay = new DirectedLocationOverlay(this, crp);\n\n map.getOverlays().add(currentLocationOverlay);\n\n // - Location -\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER));\n }\n else if (locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER) != null) {\n onLocationChanged(locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER));\n }\n else {\n currentLocationOverlay.setEnabled(false);\n }\n }", "@Override\n protected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tFont f = new Font(\"sansserif\", Font.BOLD, 12);\n\t\tg.setFont(f);\n\t\tif(type == 1){\n\t\t\t //draw the map\n\t g.drawImage(image, 0, 0, getWidth(), getHeight(), this);\n\t //draw the names on the map\n\t for (City city : cities) {\n\t \n\t \tif (city.hasLocation()) {\n\t \t\tPoint location = getLocationFromCoordinate(city.getLatitude(), city.getLongitude());\n\t \t\tg.drawString(city.getName(), (int)(location.getx())*multiplier, (int)(location.gety())*multiplier);\n\t \t\tg.fillRect((int)location.getx()*multiplier, (int)location.gety()*multiplier, 3, 3);\n\t \t}\n\t }\n\t\t}\n\t\tif(type == 2) {\n\t\t\t//draw the map\n\t g.drawImage(image, 0, 0, getWidth(), getHeight(), this);\n\t //draw the names on the map\n\t for (PointOfInterest point : points) {\n\t \tif (point.hasLocation()) {\n\t \t\tPoint location = getLocationFromCoordinate(point.getLatitude(), point.getLongitude());\n\t \t\tg.drawString(point.getName(), (int)(location.getx())*multiplier, (int)(location.gety())*multiplier);\n\t \t}\n\t }\n\t\t}\n\t\tif (type == 3) {\n\t\t\tg.drawImage(image, 0,0,getWidth(),getHeight(), this);\n\t\t\tfor(Region region : regions) {\n\t\t\t\tif (region.hasLocation()) {\n\t\t\t\t\tPoint location = getLocationFromCoordinate(region.getLatitude(), region.getLongitude());\n\t\t\t\t\tg.drawString(region.getName(), (int)location.getx()*multiplier, (int)(location.gety())*multiplier);\n\t\t\t\t\tg.drawRect((int)location.getx()*multiplier - (length/2)*3, (int)(location.gety())*multiplier - (breadth/2)*3, \n\t\t\t\t\t\t\tlength*multiplier, breadth*multiplier);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }", "public void paint(Graphics g)\n\t\t{\n\t\t\t\n\t\t\tif (!gameStarted)\n\t\t\t\ttown.show (g); //when the game first starts draws the map\n//\t\t\ttown.show(g);\n//\t\t\ttestPlayer.show(g);\n//\t\t\thouse1.show (g);\n//\t\t\thome.show (g);\n//\t\t\thouse2.show (g);\n//\t\t\tpokecentre.show (g);\n//\t\t\toakLab.show(g);\n\t\t}", "private void configMap() {\n\n googleMap.getUiSettings().setMapToolbarEnabled(false);//an buton dieu huong bat snag map\n\n googleMap.getUiSettings().setMyLocationButtonEnabled(true);//nut vi tri cua minh tru se hien thi\n googleMap.getUiSettings().setZoomControlsEnabled(true);//co the zoom\n\n// b2\n googleMap.setInfoWindowAdapter(new MyInfoWindown());//cutom titlemap\n\n try {//them lenh nay de no cap location thì cai nut tren moi hoat dong\n\n googleMap.setMyLocationEnabled(true);//cung cap vi tri cua minh,can try cacth xin quyen\n } catch (SecurityException e) {\n\n }\n googleMap.setOnMyLocationButtonClickListener(this);//dNG KY\n\n\n }", "private void populateView(){\n\n //Display image without blocking, and cache it\n ImageView imageView = (ImageView) findViewById(R.id.activity_location_image);\n Picasso.with(this)\n .load(location.getImageURL()).fit().centerCrop().into(imageView);\n\n //Display description\n TextView description = (TextView) findViewById(R.id.activity_location_description);\n description.setText(location.getDescription());\n\n //Display hours\n TextView hours = (TextView) findViewById(R.id.activity_location_hours);\n hours.setText(location.getStringOpenHours());\n\n //Display google maps, map IF address can be found\n SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()\n .findFragmentById(R.id.activity_location_map);\n if (canFindLocationAddress()){\n\n //Set width and height of map\n mapFragment.getView().getLayoutParams().height = getMapHeight();\n mapFragment.getView().offsetLeftAndRight(50);\n mapFragment.getMapAsync(this);\n }\n\n //Hide the map otherwise\n else{\n mapFragment.getView().setVisibility(View.INVISIBLE);\n }\n }", "public void setMap(String mn){\r\n mapName = mn;\r\n currentMap = new ImageIcon(mapName);\r\n }", "void btnLoadMap();", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n// MapContainer = (LinearLayout) findViewById(R.id.testampmap);\n\n// if (USE_XML_LAYOUT) {\n// setContentView(R.layout.activity_map);\n//\n//// mMapView = (NMapView) findViewById(R.id.mapView);\n// }\n\n\n //네이버 지도 MapView를 생성해준다.\n mMapView = new NMapView(this);\n //지도에서 ZoomControll을 보여준다\n mMapView.setBuiltInZoomControls(true, null);\n //네이버 OPEN API 사이트에서 할당받은 KEY를 입력하여 준다.\n mMapView.setApiKey(API_KEY);\n //이 페이지의 레이아웃을 네이버 MapView로 설정해준다.\n// setContentView(mMapView);\n setContentView(R.layout.activity_map);\n mLinearLayout = (LinearLayout)findViewById(R.id.mapmap);\n mLinearLayout.addView(mMapView);\n //네이버 지도의 클릭이벤트를 처리 하도록한다.\n mMapView.setClickable(true);\n //맵의 상태가 변할때 이메소드를 탄다.\n mMapView.setOnMapStateChangeListener(new NMapView.OnMapStateChangeListener() {\n public void onZoomLevelChange(NMapView arg0, int arg1) {\n\n }\n\n public void onMapInitHandler(NMapView arg0, NMapError arg1) {\n\n if (arg1 == null) {\n // 표시해줄 위치\n mMapController.setMapCenter(new NGeoPoint(126.978371, 37.5666091), 11);\n } else {\n Toast.makeText(getApplicationContext(), arg1.toString(), Toast.LENGTH_SHORT).show();\n }\n }\n\n public void onMapCenterChangeFine(NMapView arg0) {\n\n }\n\n public void onMapCenterChange(NMapView arg0, NGeoPoint arg1) {\n\n }\n\n public void onAnimationStateChange(NMapView arg0, int arg1, int arg2) {\n\n }\n });\n //맵뷰의 이벤트리스너의 정의.\n mMapView.setOnMapViewTouchEventListener(new NMapView.OnMapViewTouchEventListener() {\n\n public void onTouchDown(NMapView arg0, MotionEvent arg1) {\n\n }\n\n @Override\n public void onTouchUp(NMapView nMapView, MotionEvent motionEvent) {\n\n }\n\n public void onSingleTapUp(NMapView arg0, MotionEvent arg1) {\n\n }\n\n public void onScroll(NMapView arg0, MotionEvent arg1, MotionEvent arg2) {\n\n }\n\n public void onLongPressCanceled(NMapView arg0) {\n\n }\n\n public void onLongPress(NMapView arg0, MotionEvent arg1) {\n\n }\n });\n mMapController = mMapView.getMapController();\n super.setMapDataProviderListener(new OnDataProviderListener() {\n\n public void onReverseGeocoderResponse(NMapPlacemark arg0, NMapError arg1) {\n\n }\n });\n }", "@Override\r\n public void ShowMaps() throws Exception {\r\n printInvalidCommandMessage();\r\n }", "public void renderMap(GameMap gameMap, Player player)\n\t{\n\t\tthis.drawMapGlyphs(gameMap, player);\n\t\t// this.getGlyphs(gameMap, player);\n\t\t// for(Text text : this.getGlyphs(gameMap))\n\t\t// window.getRenderWindow().draw(text);\n\t}", "public void ShowAll (View paramView)\n\t{\n\t\tfinal MapView mapView = (MapView) findViewById(R.id.mapView);\n\n\n\t\tmapView.getOverlays().clear();\n\t\titemizedoverlay.clear();\n\t\tmapView.setBuiltInZoomControls(false);\n\n\t\t// add our position to map\n\t\tmapView.getOverlays().add(myLocationOverlay);\n\t\tmapView.postInvalidate();\n\n\t\tfinal List<Overlay> mapOverlays = mapView.getOverlays();\n\t\tmyLocationOverlay.enableMyLocation();\n\n\t\t// add our position to map and refresh it\n\t\tmapView.getOverlays().add(myLocationOverlay);\n\t\tmapView.postInvalidate();\n\t\tmyLocationOverlay.enableMyLocation();\n\n\t\t// add all points from list to map\n\t\tfor(int i = 0; i<MiejscaArray.length; i++)\n\t\t{\t\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tHashMap MojaMapa = (HashMap) MiejscaArray[i];\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tHashMap MyMap = (HashMap) MojaMapa.get(\"Category\");\n\t\t\tSystem.out.println(MojaMapa);\n\n\t\t\tfloat Lat = Float.parseFloat(\"\"+MojaMapa.get(\"latitude\"));\n\t\t\tfloat Long = Float.parseFloat(\"\"+MojaMapa.get(\"longitude\"));\n\t\t\tint MicroLat = (int) (Lat*1e6);\n\t\t\tint MicroLong = (int) (Long*1e6);\n\n\t\t\tGeoPoint point = new GeoPoint(MicroLat, MicroLong);\n\t\t\tMyOverlayItem overlayitem = new MyOverlayItem(point, \n\t\t\t\t\t\"\"+i, \n\t\t\t\t\t\"\"+category, \n\t\t\t\t\t\"\"+MojaMapa.get(\"address\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"city\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"zip_code\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"country\"),\n\t\t\t\t\tString.format(\"%.2f\", Float.parseFloat(MojaMapa.get(\"kilometers\").toString())),\n\t\t\t\t\t\"\"+MojaMapa.get(\"latitude\"),\n\t\t\t\t\t\"\"+MojaMapa.get(\"longitude\"),\n\t\t\t\t\t\"\"+MyMap.get(\"icon\"), \n\t\t\t\t\tLat+\",\"+Long);\n\n\t\t\tSetDrawable(\"\"+MyMap.get(\"icon\"), \"\"+MyMap.get(\"color\"));\n\t\t\titemizedoverlay = new HelloItemizedOverlay(drawable, this);\n\t\t\titemizedoverlay.addOverlay(overlayitem);\n\t\t\tmapOverlays.add(itemizedoverlay);\n\t\t}\n\n\t\t// Remove WebView and place MapView in his place\n\t\tWebView webView = (WebView) findViewById(R.id.webView);\n\t\twebView.setVisibility(View.GONE);\n\n\t\tmylistView =(ListView)findViewById(android.R.id.list);\n\n\t\tif (isThisTablet == false)\n\t\t{\n\t\t\tmylistView.setVisibility(View.GONE);\n\t\t\tmapView.setVisibility(View.VISIBLE);\n\n\t\t\tButton Mapbutton = (Button) findViewById(R.id.map_button);\n\t\t\tMapbutton.setBackgroundColor(Color.BLUE);\n\n\t\t\tButton ListButton = (Button) findViewById(R.id.list_button);\n\t\t\tListButton.setBackgroundColor(Color.rgb(192, 192, 192));\n\n\t\t\tButton SzczeButton = (Button) findViewById(R.id.szczegoly_button);\n\t\t\tSzczeButton.setBackgroundColor(Color.rgb(192, 192, 192));\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Button Mapbutton = (Button) findViewById(R.id.map);\n\t\t\t//Mapbutton.setVisibility(View.GONE);\n\n\t\t\t//Button Szczebutton = (Button) findViewById(R.id.szczegoly);\n\t\t\t//Szczebutton.setVisibility(View.VISIBLE);\n\n\t\t\tmapView.setVisibility(View.VISIBLE);\t\n\t\t}\n\t}", "private void setUpMap() {\n // Crear all map elements\n mGoogleMap.clear();\n // Set map type\n mGoogleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n // If we cant find the location now, we call a Network Provider location\n if (mLocation != null) {\n // Create a LatLng object for the current location\n LatLng latLng = new LatLng(mLocation.getLatitude(), mLocation.getLongitude());\n // Show the current location in Google Map\n mGoogleMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n // Draw the first circle in the map\n mCircleOptions = new CircleOptions().fillColor(0x5500ff00).strokeWidth(0l);\n // Zoom in the Google Map\n mGoogleMap.animateCamera(CameraUpdateFactory.zoomTo(15));\n\n // Zoom in the Google Map\n //icon = BitmapDescriptorFactory.fromResource(R.drawable.logo2);\n\n // Creation and settings of Marker Options\n mMarkerOptions = new MarkerOptions().position(latLng).title(\"You are here!\");//.icon(icon);\n // Creation and addition to the map of the Marker\n mMarker = mGoogleMap.addMarker(mMarkerOptions);\n // set the initial map radius and draw the circle\n drawCircle(RADIUS);\n }\n }", "private static void showMap() {\n\t\tSet<Point> pointSet = map.keySet();\n\t\tfor (Point p : pointSet) {\n\t\t\tSystem.out.println(map.get(p));\n\t\t}\n\t}", "public static void index()\n {\n String adminId = session.get(\"logged_in_adminid\"); // to display page to logged-in administrator only\n if (adminId == null)\n {\n Logger.info(\"Donor Location: Administrator not logged-in\");\n Welcome.index();\n }\n else\n {\n Logger.info(\"Displaying geolocations of all donors\");\n render();\n }\n }", "public void show(String fileName, Item itemType) {\n JFrame frame = new JFrame();\n frame.add(new mapPanel(fileName, itemType));\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }", "private void drawMap( Graphics2D g2 )\r\n {\r\n MobilityMap map = sim.getMap();\r\n \r\n /* Draw map nodes and their links */\r\n int numNodes = map.getNumberOfNodes();\r\n \r\n for( int i=0; i < numNodes; i++ )\r\n {\r\n MapNode node = map.getNodeAt(i);\r\n Point2D.Double nodeLoc = node.getLocation();\r\n \r\n // Draw the node\r\n drawCircle( g2, nodeLoc, MAP_NODE_COLOUR, MAP_NODE_RADIUS, false );\r\n \r\n // Draw the node's links\r\n int numLinks = node.getNumberOfLinks();\r\n for( int j=0; j < numLinks; j++ )\r\n {\r\n MapNode destNode = node.getLinkAt(j).getGoesTo();\r\n Point2D.Double destNodeLoc = destNode.getLocation();\r\n drawLine( g2, nodeLoc, destNodeLoc, MAP_LINK_COLOUR );\r\n }\r\n }\r\n }", "public void map(View view) {\n Intent intent = new Intent(this, MapsActivity.class);\n startActivity(intent);\n }", "public void mapIsClicked(View view) {\n Controller.viewMappa();\n }", "public void map(){\n this.isMap = true;\n System.out.println(\"Switch to map mode\");\n }", "private void setupMapView(){\n Log.d(TAG, \"setupMapView: Started\");\n\n view_stage_map = VIEW_MAP_FULL;\n cycleMapView();\n\n }", "public void initMap() {\r\n\r\n\t\tproviders = new AbstractMapProvider[3];\t\r\n\t\tproviders[0] = new Microsoft.HybridProvider();\r\n\t\tproviders[1] = new Microsoft.RoadProvider();\r\n\t\tproviders[2] = new Microsoft.AerialProvider();\r\n\t\t/*\r\n\t\t * providers[3] = new Yahoo.AerialProvider(); providers[4] = new\r\n\t\t * Yahoo.RoadProvider(); providers[5] = new OpenStreetMapProvider();\r\n\t\t */\r\n\t\tcurrentProviderIndex = 0;\r\n\r\n\t\tmap = new InteractiveMap(this, providers[currentProviderIndex],\r\n\t\t\t\tUtilities.mapOffset.x, Utilities.mapOffset.y,\r\n\t\t\t\tUtilities.mapSize.x, Utilities.mapSize.y);\r\n\t\tmap.panTo(locationUSA);\r\n\t\tmap.setZoom(minZoom);\r\n\r\n\t\tupdateCoordinatesLimits();\r\n\t}", "public GridMapPanel() {\n super();\n initialize();\n }", "private void setupMap() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n \t\tif ( status != ConnectionResult.SUCCESS ) {\n \t\t\t// Google Play Services are not available.\n \t\t\tint requestCode = 10;\n \t\t\tGooglePlayServicesUtil.getErrorDialog( status, this, requestCode ).show();\n \t\t} else {\n \t\t\t// Google Play Services are available.\n \t\t\tif ( this.googleMap == null ) {\n \t\t\t\tFragmentManager fragManager = this.getSupportFragmentManager();\n \t\t\t\tSupportMapFragment mapFrag = (SupportMapFragment) fragManager.findFragmentById( R.id.edit_gpsfilter_area_google_map );\n \t\t\t\tthis.googleMap = mapFrag.getMap();\n \n \t\t\t\tif ( this.googleMap != null ) {\n \t\t\t\t\t// The Map is verified. It is now safe to manipulate the map.\n \t\t\t\t\tthis.configMap();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }", "@Override\n public void onMapReady(GoogleMap map) {\n mMap = map;\n\n // Use a custom info window adapter to handle multiple lines of text in the\n // info window contents.\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n // Return null here, so that getInfoContents() is called next.\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n // Inflate the layouts for the info window, title and snippet.\n View infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n TextView title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(marker.getTitle());\n\n TextView snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(marker.getSnippet());\n\n return infoWindow;\n }\n });\n\n // Turn on the My Location layer and the related control on the map.\n updateLocationUI();\n\n // Get the current location of the device and set the position of the map.\n getDeviceLocation();\n }", "protected void initMap(Location location, SimplePanel mapPanel) {\n GWT.log(\"initMap\");\n if (location == null) {\n mapWidget = new MapWidget();\n } else {\n LatLng latLng = LatLng.newInstance(location.getLatitude(), location.getLongitude());\n mapWidget = new MapWidget(latLng, 15);\n reverseGeocode(latLng, null);\n Marker marker = new Marker(latLng);\n mapWidget.addOverlay(marker);\n }\n mapWidget.setSize(\"840px\", \"600px\");\n mapWidget.setUIToDefault();\n MapUIOptions opts = mapWidget.getDefaultUI();\n opts.setDoubleClick(false);\n mapWidget.setUI(opts);\n mapWidget.addMapClickHandler(new MapClickHandler() {\n public void onClick(MapClickEvent e) {\n Overlay overlay = e.getOverlay();\n LatLng point = e.getLatLng();\n if (overlay != null && overlay instanceof Marker) {\n // no point if we click on marker\n } else {\n mywebapp.setAutoGps(false);\n //this is a callback\n reverseGeocode(point, afterGeocodeCallback);\n }\n }\n });\n //mapWidget.checkResize();\n //if (mapPanel != null) {\n mapPanel.setWidget(mapWidget);\n // }\n }", "public static void map(int location)\n\t{\n\t\tswitch(location)\n\t\t{\t\n\t\t\tcase 1:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # X # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * X # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # X # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 4:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # X # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 5:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * X # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 6:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # X # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 7:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # X * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 8:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * X # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 9:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # X * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 10:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * X # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 11:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # X # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\"); break;\n\t\t\tcase 12:\n\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\tSystem.out.print(\" -LEGEND- \\n\");\n\t\t\t\tSystem.out.print(\" X = Current Location \\n\");\t\n\t\t\t\tSystem.out.print(\" # = Wall ############################################ \\n\");\n\t\t\t\tSystem.out.print(\" * = Door # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # X # \\n\");\n\t\t\t\tSystem.out.print(\" ######################## # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############ \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ############### ############### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # ###########***########### \\n\");\n\t\t\t\tSystem.out.print(\" ####################***# # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # # \\n\");\n\t\t\t\tSystem.out.print(\" #########***##### # ######## \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # #### # \\n\");\n\t\t\t\tSystem.out.print(\" ############ # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # * # ###########***########### # # \\n\");\n\t\t\t\tSystem.out.print(\" # ######## # # # ###***######### \\n\");\n\t\t\t\tSystem.out.print(\" # # # ############## # # # # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # * # # * # \\n\");\n\t\t\t\tSystem.out.print(\" # # # ##############***##### # # # \\n\");\n\t\t\t\tSystem.out.print(\" #***# # # # # # ####### \\n\");\n\t\t\t\tSystem.out.print(\" # # # # # # \\n\");\n\t\t\t\tSystem.out.print(\" ################# # # ######### \\n\");\n\t\t\t\tSystem.out.print(\" ############### \\n\");\n\t\t\t\tSystem.out.print(\"[R] Return\\n\");\n\t\t\t\tSystem.out.print(\"\\n______________________________________________________\"\n\t\t\t\t\t+ \"____________________\\n\\n\");\n\t\t}//end switch(location)\n\t\t\n\t}", "public MapPanel(int size, int style)\r\n {\r\n this.setLayout(new BorderLayout());\r\n zoom = 32;//set initail zoom to 32;\r\n\t\t\t\tyear = -4000;\r\n\r\n //set up initial key movements\r\n keyUp = KeyEvent.VK_W;\r\n keyLeft = KeyEvent.VK_A;\r\n keyRight = KeyEvent.VK_D;\r\n keyDown = KeyEvent.VK_S;\r\n keyZoom = KeyEvent.VK_Z;\r\n\r\n if(size == 100 && style == 2)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 100, 3, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 100, 3, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 75 && style == 2)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 75, 3, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 75, 3, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 50 && style == 2)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 50, 2, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 50, 2, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n if(size == 100 && style == 1)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 10, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 10, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 75 && style == 1)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 10, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 10, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 50 && style == 1)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 7, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 7, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n if(size == 100 && style == 3)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 120, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 120, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 75 && style == 3)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 100, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 100, 1, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n else if(size == 50 && style == 3)\r\n {\r\n //create the map\r\n myMap = GWMap.getGWMap();\r\n if (myMap == null)\r\n {\r\n GWMap.create(size, size, 75, 0, (float) 50.0, (float) 33.0, 2, 4);\r\n myMap = GWMap.getGWMap();\r\n }\r\n else\r\n myMap.reCreate(size, size, 75, 0, (float) 50.0, (float) 33.0, 2, 4);\r\n generate();\r\n }\r\n\r\n //set up the cursor\r\n cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);\r\n\r\n //set up the buttons\r\n leftButton = new JButton();\r\n leftButton.setFocusable(false);\r\n leftButton.setBorder(null);\r\n leftButton.setContentAreaFilled(false);\r\n leftButton.setCursor(cursor);\r\n iconDefault = new ImageIcon(\"images/left.gif\");\r\n leftButton.setIcon(iconDefault);\r\n\r\n rightButton = new JButton();\r\n rightButton.setFocusable(false);\r\n rightButton.setBorder(null);\r\n rightButton.setContentAreaFilled(false);\r\n rightButton.setCursor(cursor);\r\n iconDefault = new ImageIcon(\"images/right.gif\");\r\n rightButton.setIcon(iconDefault);\r\n\r\n upButton = new JButton();\r\n upButton.setFocusable(false);\r\n upButton.setBorder(null);\r\n upButton.setContentAreaFilled(false);\r\n upButton.setCursor(cursor);\r\n iconDefault = new ImageIcon(\"images/up.gif\");\r\n upButton.setIcon(iconDefault);\r\n\r\n downButton = new JButton();\r\n downButton.setFocusable(false);\r\n downButton.setBorder(null);\r\n downButton.setContentAreaFilled(false);\r\n downButton.setCursor(cursor);\r\n iconDefault = new ImageIcon(\"images/down.gif\");\r\n downButton.setIcon(iconDefault);\r\n\r\n leftButton.addActionListener(this);\r\n rightButton.addActionListener(this);\r\n upButton.addActionListener(this);\r\n downButton.addActionListener(this);\r\n\r\n //set up the panels\r\n worldPanel = new WorldPanel();\r\n this.add(worldPanel, BorderLayout.CENTER);\r\n\r\n southPanel = new JPanel(new FlowLayout());\r\n southPanel.setBackground(Color.black);\r\n southPanel.add(leftButton);\r\n\t\t\t\tsouthPanel.add(upButton);\r\n southPanel.add(downButton);\r\n southPanel.add(rightButton);\r\n this.add(southPanel, BorderLayout.SOUTH);\r\n\r\n miniMap = new MiniMap();\r\n unitPanel = new UnitInfoPanel();\r\n\r\n eastPanel1 = new JPanel(new BorderLayout());\r\n eastPanel1.setBackground(Color.black);\r\n eastPanel1.add(miniMap ,BorderLayout.SOUTH);\r\n eastPanel1.add(unitPanel, BorderLayout.CENTER);\r\n this.add(eastPanel1, BorderLayout.EAST);\r\n\r\n //create initial map\r\n worldPanel.setInitialMap(mapPieces, mapWidth, mapHeight);\r\n miniMap.setMap(mapPieces, mapWidth, mapHeight, 12, 12);\r\n int x = worldPanel.getFirstX();\r\n int y = worldPanel.getFirstY();\r\n miniMap.setNewXY(x,y,21,15);\r\n addKeyListener(this);\r\n this.setBackground(Color.black);\r\n this.requestFocus();\r\n }", "private void setMapView()\n\t{\n\t\tMapContainer.mapView = new MapView(SubMainActivity.this, this.getString(R.string.apiKey));\n\t\tMapContainer.mapView.setClickable(true);\n\t\tMapContainer.mapView.setLayoutParams(new FrameLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));;\n\t}", "private void setMapMode(boolean mapMode) {\n\t\tif (this.isShowingMap != mapMode) {\n\n\t\t\tif (mapMode) {\n\n\t\t\t\tlargeStatsFragment.setVisibility(View.GONE);\n\t\t\t\tsmallStatsFragment.setVisibility(View.VISIBLE);\n\t\t\t\t// pnlLargeTiles.setVisibility(View.GONE);\n\t\t\t\t// pnlSmallTiles.setVisibility(View.VISIBLE);\n\t\t\t\tpnlMap.setVisibility(View.VISIBLE);\n\n\t\t\t\t// float alpha = getResources().getFraction(fraction.alpha_semi_transparent, 1, 1);\n\t\t\t\t// float alpha = ALPHA_TRANSPARENT;\n\t\t\t\t// pnlSmallTiles.setAlpha(alpha);\n\t\t\t\t// pnlBottomButtons.setAlpha(alpha);\n\t\t\t\t// pnlTopButtons.setAlpha(alpha);\n\t\t\t\t// pnlStopwatch.setAlpha(alpha);\n\n\t\t\t} else {\n\n\t\t\t\tlargeStatsFragment.setVisibility(View.VISIBLE);\n\t\t\t\tsmallStatsFragment.setVisibility(View.GONE);\n\t\t\t\t// pnlSmallTiles.setVisibility(View.GONE);\n\t\t\t\tpnlMap.setVisibility(View.GONE);\n\t\t\t\t// pnlLargeTiles.setVisibility(View.VISIBLE);\n\n\t\t\t\t// float alpha = getResources().getFraction(fraction.alpha_lighter, 1, 1);\n\t\t\t\t// float alpha = ALPHA_OPAQUE;\n\t\t\t\t// pnlSmallTiles.setAlpha(OPAQUE);\n\t\t\t\t// pnlBottomButtons.setAlpha(alpha);\n\t\t\t\t// pnlTopButtons.setAlpha(alpha);\n\t\t\t\t// pnlStopwatch.setAlpha(OPAQUE);\n\n\t\t\t}\n\n\t\t\tthis.isShowingMap = mapMode;\n\t\t\tthis.btnToggleMap.setChecked(mapMode);\n\n\t\t}\n\n\t\tif (this.isShowingMap) {\n\t\t\tLocation loc = workoutService == null ? null : workoutService.getService().getLastKnownLocation();\n\t\t\tif (loc != null) {\n\t\t\t\tshowOnMap(loc);\n\t\t\t}\n\t\t}\n\t}", "private void initUI() {\t\t\n\t\t\n\t\t/* Get a handle to the Map Fragment and to \n\t\t * the Map object */\t\t\t\t\n\t\tmvMap = ((MapFragment) getFragmentManager()\n\t\t\t\t.findFragmentById(R.id.frMap)).getMap();\n\t\t\n\t\t/* Enables the my-location layer in the map */\n\t\tmvMap.setMyLocationEnabled(true);\n\t\t\n\t\t/* Disable my-location button */\n\t\tmvMap.getUiSettings().setMyLocationButtonEnabled(false);\n\t\t\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n drawGokongweiBuilding();\n getContinuousLocationUpdates();\n }", "public void showMap(Uri geoLocation) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(geoLocation);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "public void printMap(GameMap map);", "public void getMapView() {\n Bitmap bitmap = Bitmap.createBitmap(webView.getWidth(), webView.getHeight(), Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n //绘制\n webView.draw(canvas);\n // 获取内置SD卡路径\n String sdCardPath = Environment.getExternalStorageDirectory().getPath();\n // 图片文件路径\n Calendar calendar = Calendar.getInstance();\n String creatTime = calendar.get(Calendar.YEAR) + \"-\" +\n calendar.get(Calendar.MONTH) + \"-\"\n + calendar.get(Calendar.DAY_OF_MONTH) + \" \"\n + calendar.get(Calendar.HOUR_OF_DAY) + \":\"\n + calendar.get(Calendar.MINUTE) + \":\"\n + calendar.get(Calendar.SECOND);\n String filePath = sdCardPath + File.separator + \"shot_\" + creatTime + \".png\";\n if (bitmap != null) {\n try {\n File file = new File(filePath);\n if (file.exists()) {\n file.delete();\n }\n FileOutputStream os = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, os);\n os.flush();\n os.close();\n Log.d(\"webview\", \"存储完成\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public interface MapsView {\n void showMessageOnFailure(String message);\n\n void showProgressDialog();\n\n void hideProgressDialog();\n\n void showDetails(String[] detail);\n\n void showEmptyRouteMessage();\n\n void showEmptyParkingMessage();\n}", "public Map getMap(){\n\t image = ImageIO.read(getClass().getResource(\"/images/maps/\" + mapName + \".png\"));\n\t\t\n\t\t\n\t\treturn null;\t\t\n\t}", "public void showLocation(double lat, double lon) {\n IMapController mapController = mapView.getController();\n GeoPoint cl = new GeoPoint(lat, lon);\n mapController.animateTo(cl);\n settings.setZoomLevel(settings.getZoomLevel(), cl.getLatitude(), cl.getLongitude());\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n getLocationInfo();\n setUpMap(mMap);\n //drawPath(googleMap, pathString);\n }", "@Override\n\tpublic void render(Bitmap map) {\n\t\t\n\t}", "public void onMapClick (LatLng point) {\n\t\tmap.clear();\n\t\tdouble lat1 = point.latitude;\n\t\tdouble lng1 = point.longitude;\n\t\tlat=String.valueOf(lat1);\n\t\tlongi=String.valueOf(lng1);\n\t\tGeocoder gcd = new Geocoder(Home.this, Locale.getDefault());\n\t\tList<Address> addresses;\n\t\ttry {\n\t\t\taddresses = gcd.getFromLocation(lat1, lng1, 1);\n\t\t\tif (addresses.size() > 0) \n\t\t\t\t\n\t\t\t\theading.setText(addresses.get(0).getSubAdminArea());\n\t\t\tToast.makeText(Home.this, addresses.get(0).getLocality(),Toast.LENGTH_SHORT).show();\t\t\t\n\t\t\tMarkerOptions options = new MarkerOptions();\n\t\t\toptions.position(point);\n\t\t\tBitmap icon = BitmapFactory.decodeResource(Home.this.getResources(),\n\t\t\t\t\tR.drawable.pin);\n\t\t\tBitmap bhalfsize=Bitmap.createScaledBitmap(icon, icon.getWidth()/5,icon.getHeight()/5, false);\n\t\t\toptions.icon(BitmapDescriptorFactory.fromBitmap(bhalfsize));\n\t\t\toptions.title(addresses.get(0).getLocality());\t\t\n\t\t\tmap.addMarker(options);\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 displayShapefile(File file) throws Exception {\n FileDataStore store = FileDataStoreFinder.getDataStore(file);\n featureSource = store.getFeatureSource();\n setGeometry(); //definimos la geometria\n\n /*\n * Crea el jmapFrame y lo configura para mostrar el shapefile con estilo por defecto\n */\n MapContent map = new MapContent();\n map.setTitle(\"Ejemplo seleccion y dibujo\");\n Style style = createDefaultStyle();\n Layer layer = new FeatureLayer(featureSource, style);\n map.addLayer(layer);\n mapFrame = new JMapFrame(map);\n mapFrame.enableToolBar(true);\n mapFrame.enableStatusBar(true);\n \n \n /**\n * Agregamos los atributos necesarios para crear los botones que permita dibujar un punto en el mapa y otro para seleccionar la figura\n * geometrica mas cercana a donde el usuario haga click\n */\n JToolBar toolBarDibujo = mapFrame.getToolBar();\n JButton botonDibujo = new JButton(\"Draw\");\n toolBarDibujo.addSeparator();\n toolBarDibujo.add(botonDibujo);\n\n botonDibujo.addActionListener(e -> mapFrame.getMapPane().setCursorTool(new CursorTool() { //accion al seleccionar el boton \"draw\"\n @Override\n public void onMouseClicked(MapMouseEvent ev) {\n \tint respuesta= JOptionPane.showConfirmDialog(null, \"¿Desea guardar este punto?\", \"Confirmar\",JOptionPane.YES_NO_OPTION);\n \tif(respuesta==0) {\n \t\tString texto=JOptionPane.showInputDialog(null, \"Nombre del lugar\");\n \t\tDirectPosition2D p = ev.getWorldPos();\n System.out.println(p.getX() + \" -- \" + p.getY());\n drawMyPoint(p.getX(), p.getY(), map, texto);\n \t}\n \telse{\n \t\tSystem.out.println(\"Punto no guardado\");\n \t}\n \n }\n })); \n\n JToolBar toolBar = mapFrame.getToolBar();\n JButton btn = new JButton(\"Select\"); //el boton que agregamos\n toolBar.addSeparator();\n toolBar.add(btn);\n\n\n btn.addActionListener(e ->mapFrame.getMapPane().setCursorTool(new CursorTool() {@Override //accion al seleccionar el boton \"select\"\n public void onMouseClicked(MapMouseEvent ev) {\n selectFeatures(ev);\n }\n }));\n\n \n mapFrame.setSize(600, 600);\n mapFrame.setVisible(true);\n}", "public static void intro(){\n System.out.println(\"Welcome to Maze Runner!\");\n System.out.println(\"Here is your current position:\");\n myMap.printMap();\n\n }", "public Maps()\n\t{\t\n\t\tsetOnMapReadyHandler( new MapReadyHandler() {\n\t\t\t@Override\n\t\t\tpublic void onMapReady(MapStatus status)\n\t\t\t{\n\t\t\t\tmodelo = new MVCModelo();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tmodelo.cargarInfo();\n\t\t\t\t\tArregloDinamico<Coordenadas> aux = modelo.sacarCoordenadasVertices();\n\t\t\t\t\tLatLng[] rta = new LatLng[aux.darTamano()];\n\t\t\t\t\tfor(int i=0; i< aux.darTamano();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tCoordenadas actual = aux.darElementoPos(i);\n\t\t\t\t\t\trta[i] = new LatLng(actual.darLatitud(), actual.darLongitud());\n\t\t\t\t\t}\n\t\t\t\t\tlocations = rta;\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tif ( status == MapStatus.MAP_STATUS_OK )\n\t\t\t\t\t{\n\t\t\t\t\t\tmap = getMap();\n\n\t\t\t\t\t\t// Configuracion de localizaciones intermedias del path (circulos)\n\t\t\t\t\t\tCircleOptions middleLocOpt= new CircleOptions(); \n\t\t\t\t\t\tmiddleLocOpt.setFillColor(\"#00FF00\"); // color de relleno\n\t\t\t\t\t\tmiddleLocOpt.setFillOpacity(0.5);\n\t\t\t\t\t\tmiddleLocOpt.setStrokeWeight(1.0);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i=0; i<locations.length;i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCircle middleLoc1 = new Circle(map);\n\t\t\t\t\t\t\tmiddleLoc1.setOptions(middleLocOpt);\n\t\t\t\t\t\t\tmiddleLoc1.setCenter(locations[i]); \n\t\t\t\t\t\t\tmiddleLoc1.setRadius(20); //Radio del circulo\n\t\t\t\t\t\t}\n\n\t\t\t \t //Configuracion de la linea del camino\n\t\t\t \t PolylineOptions pathOpt = new PolylineOptions();\n\t\t\t \t pathOpt.setStrokeColor(\"#FFFF00\");\t // color de linea\t\n\t\t\t \t pathOpt.setStrokeOpacity(1.75);\n\t\t\t \t pathOpt.setStrokeWeight(1.5);\n\t\t\t \t pathOpt.setGeodesic(false);\n\t\t\t \t \n\t\t\t \t Polyline path = new Polyline(map); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t \t path.setOptions(pathOpt); \n\t\t\t \t path.setPath(locations);\n\t\t\t\t\t\tinitMap( map );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t);\n\n\n\t}" ]
[ "0.8077027", "0.746933", "0.744402", "0.7390419", "0.72112226", "0.70857185", "0.6976239", "0.68863785", "0.6745129", "0.67113835", "0.66855866", "0.66792923", "0.6659477", "0.6629925", "0.66244394", "0.6594103", "0.6559589", "0.6534003", "0.65057486", "0.6474565", "0.64201504", "0.64138615", "0.639309", "0.6377396", "0.6376802", "0.6346337", "0.6345556", "0.6334916", "0.6329875", "0.63260967", "0.63249654", "0.6320814", "0.6285781", "0.6284351", "0.62797296", "0.6278225", "0.62583166", "0.62510115", "0.62476003", "0.6247157", "0.62194353", "0.6219285", "0.6208423", "0.6187944", "0.6148703", "0.6134829", "0.6116895", "0.6113682", "0.611305", "0.6097599", "0.60826343", "0.6074254", "0.6074254", "0.60708046", "0.6054657", "0.6052981", "0.60490966", "0.6043596", "0.6042654", "0.6036445", "0.6035294", "0.6033634", "0.6028738", "0.601136", "0.6005067", "0.5983654", "0.59807676", "0.59566385", "0.5952061", "0.5951482", "0.5947377", "0.59325075", "0.5930249", "0.5929658", "0.59283966", "0.592747", "0.5921174", "0.59151375", "0.59143126", "0.5909266", "0.5905062", "0.59033513", "0.5897709", "0.58708614", "0.5867954", "0.58570725", "0.58550745", "0.5854618", "0.58438575", "0.5841427", "0.5830771", "0.58271706", "0.5826233", "0.5824194", "0.58141327", "0.5811575", "0.5803261", "0.5790757", "0.57870364", "0.5784191" ]
0.6554205
17
Resets the "selected" attribute of any parent Entity controllers.
public void resetParents() { idDepartamentoController.setSelected(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetParents() {\n businessentityController.setSelected(null);\n }", "public void resetParents() {\n oferenteController.setSelected(null);\n expedienteprocesoController.setSelected(null);\n }", "public void resetParents() {\n idEmpleadoController.setSelected(null);\n idEquipoController.setSelected(null);\n idUsuarioController.setSelected(null);\n }", "public void resetParents() {\r\n servicioIdController.setSelected(null);\r\n }", "public void resetParents() {\n frecuenciaServicioIdPeriodoController.setSelected(null);\n frecuenciaServicioIdServicioController.setSelected(null);\n frecuenciaServicioIdTipoDemandaController.setSelected(null);\n frecuenciaServicioIdTipoDiaController.setSelected(null);\n }", "public void resetParents() {\n manufacturerIdController.setSelected(null);\n productCodeController.setSelected(null);\n }", "public void resetParents() {\n idemenController.setSelected(null);\n }", "public void resetParents() {\n seguimientoController.setSelected(null);\n programaAnoController.setSelected(null);\n }", "public void resetParents() {\n hospitalOperationController.setSelected(null);\n }", "public void resetParents() {\n stateProvinceIDController.setSelected(null);\n }", "public void resetParents() {\n seqTurnoController.setSelected(null);\n seqPessoaController.setSelected(null);\n seqEscolaController.setSelected(null);\n seqAnoController.setSelected(null);\n }", "public void resetParents() {\n trabajadorAdicionalSaludIdMonedaController.setSelected(null);\n trabajadorAdicionalSaludIdTrabajadorController.setSelected(null);\n }", "public void resetSelectPresentation();", "public void resetSelection(IClientContext context) throws Exception;", "public void clearEntityTagsForSelectedEntities() {\n getRTParent().clearEntityTagsForSelectedEntities();\n }", "public void resetSelectedCases() {\n Component[] contenu = this.getComponents();\n for (int i = 0; i < contenu.length; i++) {\n if (contenu[i].getClass().equals(CaseJeu.class)) {\n CaseJeu c = (CaseJeu) contenu[i];\n if (c.getEtat().equals(Case.Etat.SELECTIONE)) {\n c.setEtat(Case.Etat.RIEN);\n }\n }\n }\n }", "@Override\n\tpublic Object getModelSelected() {\n\t\treturn null;\n\t}", "public void reset() {\r\n availableOptionsModel.getObject().clear();\r\n selectedOptionsModel.getObject().clear();\r\n paletteForm.visitChildren(FormComponent.class, new IVisitor<Component>() {\r\n @Override\r\n public Object component(Component component) {\r\n ((FormComponent<?>) component).clearInput();\r\n return Component.IVisitor.CONTINUE_TRAVERSAL;\r\n }\r\n });\r\n paletteForm.getModelObject().setSearchString(\"\");\r\n }", "@Listen(\"onClick = #selectTree\")\n\tpublic void select(){\n\t\ttreeModel.setOpenObjects(treeModel.getRoot().getChildren());\n\t\tTreeitem[] items = tree.getItems().toArray(new Treeitem[0]);\n\t\ttree.setSelectedItem(items[items.length - 1]);\n\t}", "@Listen(\"onClick = #selectModel\")\n\tpublic void selectModel(){\n\t\ttreeModel.setOpenObjects(List.of(treeModel.getRoot().getChildren().get(path[0])));\n\t\ttreeModel.addToSelection(treeModel.getChild(path));\n\t}", "public void resetForm() {\n selectedTipo = null;\n }", "public void undo() {\n\t\tparent.requestChange(new ModelChangeRequest(this.getClass(), parent,\n\t\t\t\t\"create\") {\n\t\t\t@Override\n\t\t\tprotected void _execute() throws Exception {\n\t\t\t\teditor.selectPage((CompositeActor) parent);\n\t\t\t\tif (child instanceof NamedObj) {\n\t\t\t\t\tComponentUtility.setContainer(child, null);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void reset() {\n\t\t// set any default values\n\t\t// setDefaultController() ???\n\t}", "public void setSelectedEntities(List<BasicEntity> selectedEntities) {\n this.selectedEntities = selectedEntities;\n }", "public void resetSelected()\n\t{\n\t\tfor (int i = 0; i < 13; i++)\n\t\t{\n\t\t\tthis.selected[i] = false;\n\t\t}\n\t}", "public void resetWidget() {\n\t\tif (!modelList.isEmpty()) {\n\t\t\tthis.setSelectedIndex(0);\n\t\t}\n\t}", "protected void restoreTreeSelection() {\n _spTree.setIgnoreSelection(true);\n tree.setSelectionPaths(selections);\n\n // Restore the lead selection\n if (leadSelection != null) {\n tree.removeSelectionPath(leadSelection);\n tree.addSelectionPath(leadSelection);\n }\n\n _spTree.setIgnoreSelection(false);\n }", "@Override\n\tpublic void setModel() {\n\t\tsuper.setModel();\n\t\tclear();\n\t}", "void resetSelectedDevice() {\n selectedDevice = null;\n userSelectedDevice = null;\n }", "public void itemsSelected() {\n getEntitySelect().close();\n Collection<T> selectedValues = getEntitySelect().getResults().getSelectedValues();\n setReferencesToParentAndPersist((T[]) selectedValues.toArray());\n showAddSuccessful();\n }", "@Override\n\tpublic ODocument getModelSelected() {\n\t\treturn null;\n\t}", "private void setSelectedSetting(Parent parent) {\n localSettings = AppSettings.getSettings();\n selectedSetting.getChildren().removeAll(selectedSetting.getChildren());\n selectedSetting.getChildren().add(parent);\n }", "@Override\n public void undo(){\n this.parent.getSelectedArea().clear();\n }", "public void clearTableSelectedSet(){\n\t\tselectionModel.clear();\n\t}", "public void onSelectedFromReset() {\n\t\tfilterName = null;\n\t\tfilterState = null;\n\t\tfilterVariant = null;\n\t\tfilterAcquisition = null;\n\t\tfilterLiquidation = null;\n\t\tfilterLocation = null;\n\t\tfilterComment = null;\n\t\tledger.reset();\n\t\t// ... then just fall through to the success action.\n\t}", "@FXML\n public void limpaCidade(){\n \ttxtNome.setText(\"\");\n \ttxtUf.getSelectionModel().clearSelection();\n }", "public void resetSelectedSensors(){\n kFrontLeft.setSelectedSensorPosition(0,PID_IDX,0);\n kRearLeft.setSelectedSensorPosition(0,PID_IDX,0);\n kFrontRight.setSelectedSensorPosition(0,PID_IDX,0);\n kRearRight.setSelectedSensorPosition(0,PID_IDX,0);\n }", "public void resetParents() {\r\n }", "public void prepareOferente(ActionEvent event) {\n if (this.getSelected() != null && oferenteController.getSelected() == null) {\n oferenteController.setSelected(this.getSelected().getOferente());\n }\n }", "void reset() {\n colorSelectedList = new HashSet<>();\n }", "@Override\n public void deselectGolem() {\n }", "abstract public void cabMultiselectPrimaryAction();", "public void clearAllSelected() {\n getSelectHelper().clearAllSelected();\n }", "@Override\npublic void setUIComponentDeselected(ObjectAdapter[] child) {\n\t\n}", "public void resetSelectIds() {\n calendarId = new SelectId<>(null, SelectId.AHasPrecedence);\n locId = new SelectId<>(null, SelectId.AHasPrecedence);\n ctctId = new SelectId<>(null, SelectId.AHasPrecedence);\n }", "@Override\n\tpublic int getSelectedNavigationIndex() {\n\t\treturn 0;\n\t}", "public abstract void clearAllSelections();", "public void resetSelected(){\n\t\tfor(int x =0; x<9; x++){\n\t\t\tClientWindow.retButtons()[x].setBackground(Color.LIGHT_GRAY);\n\t\t}\n\t}", "public void resetSelections()\n {\n for(Node child: gridpane.getChildren())\n {\n Button randButton = (Button) child;\n\n // set all buttons to have default background\n randButton.setStyle(null);\n }\n }", "public void setSelectedItem( final T selectedEntity ) {\n this.selectedEntity = selectedEntity;\n }", "@Override\n\tpublic void deleteSelected() {\n\n\t}", "public void setSelectedEntities(Entity[] newEntities) {\n\t\tselectedEntities = newEntities;\n\t}", "public void prepareIdEmpleado(ActionEvent event) {\n Rentadevolucion selected = this.getSelected();\n if (selected != null && idEmpleadoController.getSelected() == null) {\n idEmpleadoController.setSelected(selected.getIdEmpleado());\n }\n }", "private void syncNodeSelection() {\r\n\t\tGraphNode node = ((AbstractGraph)graphController.getGraph()).getFirstSelectedNode();\r\n\t\tif(node != null) {\r\n\t\t\tcancelSelectionUpdate = true;\r\n\t\t\tsetGlobalSelection((OWLEntity)node.getUserObject());\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void cleanup() {\r\n\t\tlevelList.setSelectedIndex(0);\t\t\r\n\t}", "public void setSelectedItems( final Set<T> selectedEntities ) {\n this.selectedEntities = selectedEntities;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tROOM.setSelectedItem(\"\");\n\t\t\t\ttxtrent.setText(\"\");\n\t\t\t\ttxtSeat.setText(\"\");\n\t\t\t\tgrp.clearSelection();\n\t\t\t}", "public void prepareBusinessentity(ActionEvent event) {\n if (this.getSelected() != null && businessentityController.getSelected() == null) {\n businessentityController.setSelected(this.getSelected().getBusinessentity());\n }\n }", "public void Reset()\r\n\t{\r\n\t\tif(!levelEditingMode)//CAN ONLY RESET IN LEVEL EDITING MODE\r\n\t\t{\r\n\t\t\tgrid.clearUserObjects();\r\n\t\t\tmenu = new SpriteMenu(listFileName, playButton);\r\n\t\t}\r\n\t}", "public void resetSearchSelection() {\n this.quantSearchSelection = null;\n SelectionChanged(\"reset_quant_searching\");\n }", "@FXML\n private void resetFilters() {\n regionFilterComboBox.getSelectionModel().select(regionString);\n organFilterComboBox.getSelectionModel().select(organString);\n }", "@VisibleForTesting\n protected void applyProvisionalSelection() {\n mSelection.addAll(mProvisionalSelection);\n mProvisionalSelection.clear();\n }", "public void setParentController(HomeController parent) {\n\t\tthis.parent = parent;\n\t}", "@Override\r\n\tpublic void setSelection(List<EObject> selection) {\r\n\t\tthis.selection = selection;\r\n\t\tthis.refactoringProcessor = \r\n\t\t\t\tnew InternalRefactoringProcessor(this.selection);\r\n\t}", "public synchronized void reset() {\n for (TreeManagementModel model : mgrModels.values()) {\n model.reset();\n }\n }", "public void initializeAll() {\n getConsole_inclusionFactor().getSelectionModel().selectFirst();\n getConsole_sortingDirection().getSelectionModel().selectFirst();\n getConsole_firstSortingFactor().getSelectionModel().selectFirst();\n getConsole_secondSortingFactor().getSelectionModel().selectFirst();\n getAction_inclusionFactor().getSelectionModel().selectFirst();\n getAction_sortingDirection().getSelectionModel().selectFirst();\n getAction_firstSortingFactor().getSelectionModel().selectFirst();\n getAction_secondSortingFactor().getSelectionModel().selectFirst();\n getAction_Status().getSelectionModel().selectFirst();\n getAction_Member().getSelectionModel().selectFirst();\n getAction_Team().getSelectionModel().selectFirst();\n \n }", "public void resetCurrentlySelectedObject() {\n this.currentlySelectedObject.setTransparency(255);\n this.currentlySelectedObject = null;\n }", "@Override\n\tprotected void cmdClearWidgetSelected() {\n\t\tclearMode();\n\n\t}", "public void deselectAll() {\n\t\tselected.clear();\n\t}", "public void setSelected(boolean newSelected) {\n \t\tboolean oldSelected = selected;\n \t\tselected = newSelected;\n \t\tif (oldSelected != newSelected && parentSelection != null)\n \t\t\tparentSelection.setModified(true);\n \t}", "public void selectAgent(int selected) {\n this.selected = selected;\n }", "public void setParentMenu(String name);", "@Override\n\tpublic void setSelected(boolean selected) {\n\t\t\n\t}", "@Override\n public void reset() {\n model.reset();\n view.resetView();\n }", "public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }", "public void reset()\n\t{\n\t\tthis.resetSelected();\n\t\tthis.clearMsgArea();\n\t}", "public void filterOutSelection() {\n RenderContext myrc = (RenderContext) rc; if (myrc == null) return;\n Set<String> sel = myrc.filterEntities(getRTParent().getSelectedEntities());\n if (sel == null || sel.size() == 0) { getRTParent().pop(); repaint(); return; }\n Set<Bundle> new_bundles = new HashSet<Bundle>();\n if (sel != null && sel.size() > 0) {\n new_bundles.addAll(myrc.bs.bundleSet());\n Iterator<String> it = sel.iterator();\n\twhile (it.hasNext()) new_bundles.removeAll(myrc.entity_counter_context.getBundles(it.next()));\n getRTParent().setSelectedEntities(new HashSet<String>());\n\tgetRTParent().push(myrc.bs.subset(new_bundles));\n repaint();\n }\n }", "@Override\r\n @Test\r\n public void testSelectedOnClearItemsSingle() {\r\n int index = 2;\r\n getSelectionModel().select(index);\r\n TreeItem parent = getSelectedItem().getParent();\r\n int parentIndex = getView().getRow(parent);\r\n clearItems();\r\n if (getSelectionModel().isEmpty()) {\r\n assertTrue(\"selection must be empty\", getSelectionModel().isEmpty());\r\n assertEquals(-1, getSelectedIndex());\r\n assertEquals(null, getSelectedItem());\r\n assertTrue(\"\", getSelectedIndices().isEmpty());\r\n assertTrue(\"\", getSelectedItems().isEmpty());\r\n// assertEquals(\"focus must be cleared\", -1, getFocusModel()\r\n// .getFocusedIndex());\r\n } else {\r\n assertEquals(\"selectedIndex at parentIndex\", parentIndex, getSelectedIndex());\r\n assertEquals(\"parent must be selected after clearing \", parent, \r\n getSelectedItem());\r\n }\r\n }", "@Override\r\n\tprotected void ResetBaseObject() {\r\n\t\tsuper.ResetBaseObject();\r\n\r\n\t\t// new Base Object\r\n\t\tbaseEntity = new Chooseval();\r\n\r\n\t\t// new other Objects and set them into Base object\r\n\r\n\t\t// refresh Lists\r\n\t\tbaseEntityList = ChoosevalService.FindAll(\"id\", JPAOp.Asc);\r\n\t}", "private void resetAll() {\n\t\tif(mu1 != null)\n\t\t\tmodel.getView().reset(mu1);\n\t\tmu1 = null;\n\t\t\n\t\tif(mu2 != null)\n\t\t\tmodel.getView().reset(mu2);\n\t\tmu2 = null;\n\t\t\n\t\tif(functionWord != null)\n\t\t\tmodel.getView().reset(functionWord);\n\t\tfunctionWord = null;\n\t\t\n\t\tmodel.getSGCreatingMenu().reset();\n\t}", "@Override\n\tprotected void selectedProductChanged()\n\t{\n\t\tgetController().selectedProductChanged();\n\t}", "@FXML\n public void allSelected() {\n this.populateListInterview(this.interviewer.getPendingInterviews());\n }", "public void clearChoiceSelect() {\n choiceSelect = -1;\n }", "public void prepareServicioId(ActionEvent event) {\r\n if (this.getSelected() != null && servicioIdController.getSelected() == null) {\r\n servicioIdController.setSelected(this.getSelected().getServicioId());\r\n }\r\n }", "public void clearChoiceSelect() {\n choiceSelect = -1;\n }", "@Override\n\tpublic void unselect() {\n\t}", "void setSelectedItems(ValueType selectedItems);", "public void setParent(MenuTree parent){\n this.parentMenuTree = parent;\n }", "public void setParent(int id);", "public void setParent(@CheckForNull final OtuSet parent) {\n\t\tthis.parent = parent;\n\t}", "@Override\n\tpublic List<Tmenu> selectParentMenu() {\n\t\treturn menuMapper.selectParentMenu();\n\t}", "protected void reinitialize() {\n \n TTSelectTargetModel m = new TTSelectTargetModel(source, targetFilter);\n \n targetTree.setTreeTableModel( m );\n \n expandAll(new TreePath(m.getRoot()));\n \n // Clear any old listeners by creating a new listener list.\n listenerList = new EventListenerList();\n \n setPresetTarget(false);\n \n setAdditionalNotes(null);\n }", "private void resetApp() {\n\t\tthis.panelTags.setVisible(false);\n\t\tthis.panelMenu.setVisible(true);\n\t\tthis.model.clear();\n\t\tthis.btnClearAll.doClick(0);\n\t\t// textDestination jest czyszczony osobno, po JOptionPane\n\t\t// this.textDestination.setText(null);\n\t\tthis.btnDeleteAll.setEnabled(false);\n\t\tthis.btnDelete.setEnabled(false);\n\t}", "public void resetSelectedDate() {\r\n selectedDate = null;\r\n }", "public static void reset() {\n\t\tselectedAtts.clear();\n\t}", "@Override\npublic void setUIComponentSelected(ObjectAdapter[] child) {\n\t\n}", "private SelectEntityAction(){\r\n\t\tobservers = new ArrayList<IObserver>();\r\n\t\tselectedEntity = null;\r\n\t}", "public void clearComponentSelection(){\r\n ComponentSelectionTree.clearSelection();\r\n }", "public void prepareSeguimiento(ActionEvent event) {\n if (this.getSelected() != null && seguimientoController.getSelected() == null) {\n seguimientoController.setSelected(this.getSelected().getSeguimiento());\n }\n }", "protected void resetValue(ActionEvent ae) {\n\t\tsearchClassNameTextField.setText(\"\");\r\n\t}" ]
[ "0.76650393", "0.7534451", "0.74119014", "0.73539287", "0.7280383", "0.72471625", "0.7238065", "0.7148984", "0.71272284", "0.7003519", "0.69074196", "0.6807132", "0.5925203", "0.5890661", "0.5857201", "0.5826842", "0.57976145", "0.5762226", "0.56932205", "0.56463844", "0.5639663", "0.559153", "0.55159116", "0.55144185", "0.5506411", "0.544653", "0.542658", "0.54091346", "0.53989905", "0.53774583", "0.5366348", "0.5353321", "0.53410846", "0.53277737", "0.53190196", "0.5294386", "0.52777535", "0.52648455", "0.52588326", "0.5249921", "0.5245618", "0.52400327", "0.52383524", "0.5235479", "0.5232081", "0.5210731", "0.52097887", "0.5209427", "0.5209144", "0.519625", "0.51853096", "0.5170202", "0.51630247", "0.5158152", "0.51578337", "0.5141467", "0.5139717", "0.51345736", "0.5128066", "0.51126856", "0.5099658", "0.5091055", "0.50903404", "0.50843465", "0.50679255", "0.5066619", "0.5063645", "0.5062795", "0.5061837", "0.50593954", "0.50536495", "0.5052795", "0.50275755", "0.5025619", "0.5024892", "0.50233555", "0.5019541", "0.5015448", "0.5014378", "0.5013694", "0.5010534", "0.50097984", "0.50012356", "0.4998096", "0.49970698", "0.49940944", "0.49928707", "0.49907225", "0.49861076", "0.49830115", "0.49802554", "0.49787024", "0.49611515", "0.49582842", "0.49573734", "0.4956395", "0.49375704", "0.4935955", "0.49319327", "0.49295878" ]
0.7206758
7
Set the "is[ChildCollection]Empty" property for OneToMany fields.
@Override protected void setChildrenEmptyFlags() { this.setIsRutaCollectionEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setNotEmpty(){\n this.empty = false;\n }", "@Override\n\tpublic void setEmpty() {\n\t\t\n\t}", "@Override\n protected void setChildrenEmptyFlags() {\n this.setIsMenuRolListEmpty();\n }", "QueryElement addEmpty(String collectionProperty);", "@PrePersist\r\n @PreUpdate\r\n public void removeEmptyComments()\r\n {\r\n List<Comment> empty = new ArrayList<Comment>();\r\n for (Comment current : this.getComments())\r\n {\r\n current.removeEmptyComments();\r\n if (current.getText() == null || current.getText().isEmpty())\r\n {\r\n empty.add(current);\r\n }\r\n }\r\n\r\n this.getComments().removeAll(empty);\r\n }", "public boolean isEmpty() {\n Entity e = null;\n if (parent != null) {\n e = parent.get(ContentType.EntityType, null);\n } else if (root != null) {\n e = root;\n }\n \n if (e != null) {\n if (isIndexSelector()) {\n if (!(e instanceof EntityList)) {\n return true;\n }\n EntityList el = (EntityList)e;\n return index.isEmpty(el);\n \n }\n Property prop = property;\n if (prop == null) {\n prop = e.getEntity().getEntityType().findProperty(tags);\n }\n if (prop != null) {\n return e.getEntity().isEmpty(prop);\n }\n }\n return true;\n }", "public void setEmpty(boolean empty) {\r\n this.empty = empty;\r\n }", "public boolean isEmpty() {\n return labeledFieldEmptyOrHidden;\n }", "public void setOccupied(){\n this.isEmpty = false;\n }", "public void setEmpty(){this.empty = true;}", "public void setAllowEmptyFields(Boolean allowEmptyFields) {\n setExtProperty(\"allowEmptyFields\", DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS, allowEmptyFields);\n }", "private void populateEmptyFields(DublinCoreMetadataCollection dublinCoreMetadata, Set<String> emptyFields) {\n for (String field : emptyFields) {\n try {\n dublinCoreMetadata.addField(dublinCoreProperties.get(field), \"\", getListProvidersService());\n } catch (Exception e) {\n logger.error(\"Skipping metadata field '{}' because of error: {}\", field, ExceptionUtils.getStackTrace(e));\n }\n }\n }", "@Override\n public boolean isEmpty() { return true; }", "@Override\n\t\t\tpublic boolean isEmpty() {\n\t\t\t\treturn false;\n\t\t\t}", "private void clearCollection() {\n \n collection_ = getDefaultInstance().getCollection();\n }", "@Override\n \t\tpublic boolean isEmpty() {\n \t\t\treturn (state != null && state.getChildrenCount(currentPage) == 0);\n \t\t}", "@Override\n public boolean isEmpty() {\n return false;\n }", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "QueryElement addOrEmpty(String collectionProperty);", "@Override\n public boolean isEmpty()\n {\n return false;\n }", "public boolean isEmpty()\n{\n // If any attributes are not default return false\n if(getMaxTime()!=5 || getFrameRate()!=25 || !SnapUtils.equals(getEndAction(),\"Loop\"))\n return false;\n \n // Iterate over owner children and if any are not empty, return false\n for(int i=0, iMax=getOwner().getChildCount(); i<iMax; i++)\n if(!isEmpty(getOwner().getChild(i)))\n return false;\n \n // Return true since every child was empty\n return true;\n}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "QueryElement addNotEmpty(String collectionProperty);", "public boolean isEmpty() {\r\n\t\treturn objectCollection.isEmpty();\r\n\t}", "public boolean isEmpty() {\n if (super.size() > 0) {\n return false;\n } else {\n return true;\n }\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn super.isEmpty() || getFluid() == Fluids.EMPTY;\n\t}", "public void clear() {\n\t\t// If settingActive is true, clear will be called for all children anyway. No need to loop.\n\t\tif (children != null) {\n\t\t\tfor (BusinessObject child : children.values()) {\n\t\t\t\tchild.clear();\n\t\t\t}\n\t\t}\n\t}", "@Test\r\n\tpublic void getRelatedFieldsArrayEmpty() {\r\n\t\tassertEquals(\"relatedFields should be empty\", 0, testObj.getRelatedFieldsArray().length);\r\n\t}", "@Override\npublic boolean isEmpty() {\n\treturn false;\n}", "public boolean isEmpty() {\n return collection.isEmpty();\n }", "public boolean empty() {\n return one.isEmpty();\n \n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "public void setSetEmptyMappings(Boolean setEmptyMappings) {\n this.setEmptyMappings = setEmptyMappings;\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn size() == 0;\r\n\t}", "public boolean isEmpty(){\n\t\treturn super.isEmpty();\n\t}", "@Override\npublic Boolean isEmpty() {\n\treturn null;\n}", "@Override\n public boolean isEmpty() {\n return this.count() == 0;\n }", "public boolean isEmpty() {\n\t\t\treturn properties.isEmpty();\n\t\t}", "public boolean isEmpty() {\n\t\treturn super.isEmpty();\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn(size() == 0);\n\t}", "@Override\n public boolean isEmpty() {\n return this.size == 0;\n }", "public CollectionPreconditions toBeEmpty() {\n return customMatcher(new Matcher<Collection>() {\n @Override\n public boolean match(final Collection value, final String label) {\n return expect(value, label).not().toBeNull().check().isEmpty();\n }\n\n @Override\n public PreconditionException getException(final Collection value, final String label) {\n return new CollectionNotEmptyPreconditionException(value, label);\n }\n\n @Override\n public PreconditionException getNegatedException(Collection value, String label) {\n return new CollectionEmptyPreconditionException(value, label);\n }\n });\n }", "public boolean isSetBelongs_to_collection() {\n return this.belongs_to_collection != null;\n }", "public Boolean getAllowEmptyFields() {\n return (Boolean) getExtProperty(\"allowEmptyFields\", DatabaseConfig.FEATURE_ALLOW_EMPTY_FIELDS);\n }", "private void setEmpty() {\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++)\n\t\t\t\tboard[r][c] = new Cell(false, false,\n\t\t\t\t\t\tfalse, false); // totally clear.\n\t}", "@Override\n public boolean isEmpty(){\n return itemCount == 0;\n }", "public Builder clearItems() {\n items_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n return this;\n }", "public boolean isEmpty() {\n\t\treturn objectMappers.isEmpty();\n\t}", "public void makeEmpty(){\n deleteAll(root);\n root = null;\n numItems = 0;\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn set.isEmpty();\r\n\t}", "@Override\r\n public boolean isEmpty() {\n return size == 0;\r\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn this.size == 0;\r\n\t}", "@Override\n public boolean isEmpty() {\n return this.size==0;\n }", "@Override\r\n public boolean isEmpty() {\r\n return size == 0;\r\n }", "public EmptyOrganizer(Node node, ModelInstance modelInstance, IProcess parentProcess)\r\n {\r\n super(node, modelInstance, parentProcess);\r\n \r\n String emptyName = getAttribute(\"name\");\r\n element = (IBasicElement) modelInstance.getElement(emptyName);\r\n element.setParentProcess(parentProcess);\r\n ((IActivity)element).setName( emptyName );\r\n String suppresed = getAttribute( ATTRIBUTE_SUPPRESED_JOIN_FAILURE );\r\n \r\n if(suppresed == null)\r\n ((IActivity)element).useActivitySupressJoinFailure();\r\n \r\n ((IActivity)element).setSuppressJoinFailure( Boolean.parseBoolean( suppresed ) );\r\n\r\n empty = (IEmpty) element;\r\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isAListEmpty(){\r\n\t\tif((programChairs.size() > 0) && (committeeMembers.size() > 0)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void setAsEmpty(){\n\t\tnodeStatus = Status.empty;\n\t\tunitNum=-1;\n\t}", "@Override\n public boolean isEmpty() {\n return size()==0;\n }", "public void setNull(){\n for (int i = 0; i < Nodes.size(); i++){\n this.References.add(null);\n }\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "public synchronized boolean isEmpty() {\r\n return super.isEmpty();\r\n }", "boolean isEmpty() {\n return mapped_vms.isEmpty();\n }", "public boolean empty() {\n return objects.isEmpty();\n }", "@Override\n public boolean isEmpty() {\n return mBaseAdapter.isEmpty();\n }", "@Override\n public boolean isEmpty() {\n return _size == 0;\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\tif(size() == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean isEmpty()\n {\n return size == 0;\n }", "@Override\n\tpublic boolean isEmpty ()\n\t{\n\t\treturn false;\n\t}", "public void clear()\r\n {\r\n this.boundObjects.clear();\r\n }", "@Override\n public boolean isEmpty() {\n if (size == 0) {\n return true;\n }\n return false;\n }", "@Override\n\tpublic boolean ignoreForeignItems() {\n\t\treturn true;\n\t}", "@XmlTransient\n\tpublic boolean isCandidateContactsEmpty() {\n\t\treturn (candidateContacts.isEmpty());\n\t}", "public boolean isEmpty() { return true; }", "public boolean supportsEmptyInList() {\n \t\treturn true;\n \t}", "@SuppressWarnings(\"unchecked\") // Nested sets are immutable, so a downcast is fine.\n <E> NestedSet<E> emptySet() {\n return (NestedSet<E>) emptySet;\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn bnetMap.size() == 0;\n\t}", "public void clear() {\n\t\tthis.boundObjects.clear();\n\t}", "public void noPropertyies() {\n\t\tproperties.clear();\r\n\t\tfor(int i = 0; i<groups.length; i++){\r\n\t\t\tgroups[i].clear();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn data != null && data.list != null && data.list.isEmpty();\r\n\t}", "@Override\n\tpublic boolean ignoreForeignItems() {\n\t\treturn false;\n\t}", "public void makeEmpty( )\n {\n doClear( );\n }", "public Builder clearIsList() {\n bitField0_ = (bitField0_ & ~0x00000008);\n isList_ = false;\n onChanged();\n return this;\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\tmodCount = root.numChildren();\n\t\treturn (modCount == 0);\n\t}" ]
[ "0.6611867", "0.6449874", "0.60206395", "0.59109646", "0.57900196", "0.5786118", "0.57683486", "0.5768071", "0.57230675", "0.57108927", "0.56910056", "0.5689972", "0.5688117", "0.5683676", "0.56434673", "0.56409943", "0.5631573", "0.56118006", "0.56118006", "0.55895495", "0.55085725", "0.5503571", "0.55035186", "0.55035186", "0.55035186", "0.55035186", "0.55035186", "0.55035186", "0.55035186", "0.5500426", "0.54891634", "0.5485833", "0.54851395", "0.5466795", "0.5459911", "0.5448866", "0.5447805", "0.5443599", "0.5435326", "0.5435326", "0.5435326", "0.5435326", "0.5435326", "0.54340076", "0.5415414", "0.54014194", "0.5393042", "0.538901", "0.53878576", "0.5386417", "0.53846014", "0.53834337", "0.536465", "0.5357597", "0.53364307", "0.53299296", "0.5327365", "0.5316827", "0.53133166", "0.53128445", "0.53056276", "0.5304098", "0.53001297", "0.5286965", "0.52713484", "0.5270236", "0.526971", "0.526971", "0.5262484", "0.52616346", "0.5253636", "0.5251079", "0.5250668", "0.5250668", "0.5250668", "0.5250668", "0.5250668", "0.5243418", "0.5232952", "0.5219419", "0.521822", "0.5213577", "0.521096", "0.5209091", "0.52036643", "0.51961315", "0.5191058", "0.51853335", "0.51805496", "0.5178942", "0.51761144", "0.5175507", "0.5172076", "0.51646626", "0.51632136", "0.51598364", "0.5159705", "0.51591367", "0.51585525", "0.51560956" ]
0.6717869
0
Sets the "items" attribute with a collection of Ruta entities that are retrieved from Municipio and returns the navigation outcome.
public String navigateRutaCollection() { Municipio selected = this.getSelected(); if (selected != null) { MunicipioFacade ejbFacade = (MunicipioFacade) this.getFacade(); Collection<Ruta> selectedRutaCollection = ejbFacade.findRutaCollection(selected); FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("Ruta_items", selectedRutaCollection); } return "/app/ruta/index"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setItems(Item items) {\n this.items = items;\n }", "public void setItems(ItemList items) {\r\n this.items = items;\r\n }", "public Item getItems() {\n return items;\n }", "public void setItems(String items)\n {\n _items = items;\n }", "public void setItems(Item[] itemsIn)\n {\n items = itemsIn;\n }", "public void setItems(ArrayList<Item> items) {\n\t\tthis.items = items;\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 Item[] getItems()\n {\n return items;\n }", "@RequestMapping(method=RequestMethod.PUT, value = \"/item\", produces = \"application/json\")\n public void setItems(ArrayList<Item> itemsToSet)\n {\n this.itemRepository.setItems(itemsToSet);\n }", "public List<Item> getItems() {\n return items;\n }", "public List<Item> getItems() {\n return items;\n }", "@Override\n\tpublic List<Marca> listaporitem() {\n\t\treturn marcadao.listaporitem();\n\t}", "@Override\n public Set<T> getItems() {\n return items;\n }", "public void setItems(){\n }", "@ApiModelProperty(value = \"The items that are setup to rebill\")\r\n public List<AutoOrderItem> getItems() {\r\n return items;\r\n }", "public void setItems(nl.webservices.www.soap.GCRItem[] items) {\n this.items = items;\n }", "@RequestMapping(method=RequestMethod.GET, value = \"/item\", produces = \"application/json\")\n public List<Item> getItems()\n {\n return this.itemRepository.getItems();\n }", "public ArrayList<Collectable> getItems(){\n return items;\n }", "public NavigableSet<Utilisateur> getUtilisateurs();", "public void listarMunicipios() {\r\n\t\tmunicipios = departamentoEJB.listarMunicipiosDepartamento(deptoSeleccionado);\r\n\t}", "public ArrayList<Item> getItems()\n {\n return items;\n }", "private void loadItems() {\n try {\n if (ServerIdUtil.isServerId(memberId)) {\n if (ServerIdUtil.containsServerId(memberId)) {\n memberId = ServerIdUtil.getLocalId(memberId);\n } else {\n return;\n }\n }\n List<VideoReference> videoReferences = new Select().from(VideoReference.class).where(VideoReference_Table.userId.is(memberId)).orderBy(OrderBy.fromProperty(VideoReference_Table.date).descending()).queryList();\n List<String> videoIds = new ArrayList<>();\n for (VideoReference videoReference : videoReferences) {\n videoIds.add(videoReference.getId());\n }\n itemList = new Select().from(Video.class).where(Video_Table.id.in(videoIds)).orderBy(OrderBy.fromProperty(Video_Table.date).descending()).queryList();\n } catch (Throwable t) {\n itemList = new ArrayList<>();\n }\n }", "public void setMunicipio(String municipio) {\n this.municipio = municipio;\n }", "@Override\n\tpublic CollectionItem getItem() {\n\t\treturn manga;\n\t}", "public void populate() {\n populate(this.mCurItem);\n }", "@ResponseBody\n @RequestMapping(\n value = { \"\" },\n method = {RequestMethod.GET},\n produces = {\"application/json;charset=UTF-8\"})\n public List<Map<String, Object>> listMunicipios() {\n return municipioService.listMunicipios();\n }", "private static List<Item> getItems() {\n\t\treturn items;\n\t}", "public List<ReturnItem> getItems() {\n return (List<ReturnItem>) get(\"items\");\n }", "public void setItems (java.util.Set<com.jspgou.cms.entity.OrderItem> items) {\r\n\t\tthis.items = items;\r\n\t}", "private void setItems(Set<T> items) {\n Assertion.isNotNull(items, \"items is required\");\n this.items = items;\n }", "public String navigateDetalleofertaCollection() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Detalleoferta_items\", this.getSelected().getDetalleofertaCollection());\n }\n return \"/detalleoferta/index\";\n }", "public void setItem(Item item) {\n this.item = item;\n }", "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 }", "private void loadItemList() {\n this.presenter.initialize();\n }", "public void setItems(java.util.Collection<java.util.Map<String, AttributeValue>> items) {\n if (items == null) {\n this.items = null;\n return;\n }\n\n this.items = new java.util.ArrayList<java.util.Map<String, AttributeValue>>(items);\n }", "protected List<View> getItems() {\n return items;\n }", "public void set(List<Item> items) {\n if (mUseIdDistributor) {\n IdDistributor.checkIds(items);\n }\n\n //first collapse all items\n getFastAdapter().collapse();\n\n //get sizes\n int newItemsCount = items.size();\n int previousItemsCount = mItems.size();\n int itemsBeforeThisAdapter = getFastAdapter().getItemCount(getOrder());\n\n //make sure the new items list is not a reference of the already mItems list\n if (items != mItems) {\n //remove all previous items\n if (!mItems.isEmpty()) {\n mItems.clear();\n }\n\n //add all new items to the list\n mItems.addAll(items);\n }\n\n //map the types\n mapPossibleTypes(items);\n\n //now properly notify the adapter about the changes\n if (newItemsCount > previousItemsCount) {\n if (previousItemsCount > 0) {\n getFastAdapter().notifyAdapterItemRangeChanged(itemsBeforeThisAdapter, previousItemsCount);\n }\n getFastAdapter().notifyAdapterItemRangeInserted(itemsBeforeThisAdapter + previousItemsCount, newItemsCount - previousItemsCount);\n } else if (newItemsCount > 0 && newItemsCount < previousItemsCount) {\n getFastAdapter().notifyAdapterItemRangeChanged(itemsBeforeThisAdapter, newItemsCount);\n getFastAdapter().notifyAdapterItemRangeRemoved(itemsBeforeThisAdapter + newItemsCount, previousItemsCount - newItemsCount);\n } else if (newItemsCount == 0) {\n getFastAdapter().notifyAdapterItemRangeRemoved(itemsBeforeThisAdapter, previousItemsCount);\n } else {\n getFastAdapter().notifyAdapterDataSetChanged();\n }\n }", "public @NotNull Set<Item> findAllItems() throws BazaarException;", "public String navigateDocenteCollection() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Docente_items\", this.getSelected().getDocenteCollection());\n }\n return this.mobilePageController.getMobilePagesPrefix() + \"/docente/index\";\n }", "public String navigateUsuarioList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Usuario_items\", this.getSelected().getUsuarioList());\n }\n return \"/usuario/index\";\n }", "public abstract List<Organism> getOrganisms();", "private void setItems()\n {\n sewers.setItem(rope); \n promenade.setItem(rope);\n bridge.setItem(potion);\n tower.setItem(potion);\n throneRoomEntrance.setItem(potion);\n depths.setItem(shovel);\n crypt.setItem(shovel);\n }", "@Override\n public List<Item> retrieveAllItems() throws VendingMachinePersistenceException {\n loadItemFile();\n List<Item> itemList = new ArrayList<>();\n for (Item currentItem: itemMap.values()) {\n itemList.add(currentItem);\n }\n\n return itemList;\n }", "private void loadItems() {\n CheckItemsActivity context = this;\n makeRestGetRequest(String.format(Locale.getDefault(),\n RestClient.ITEMS_URL, checkId), (success, response) -> {\n if (!success) {\n Log.d(DEBUG_TAG, \"Load items fail\");\n Toast.makeText(context, LOAD_ITEMS_FAIL, Toast.LENGTH_SHORT).show();\n } else {\n try {\n items = ModelsBuilder.buildItemsFromJSON(response);\n // pass loaded items and categories to adapter and set adapter to Recycler View\n itemsListAdapter = new ItemsListAdapter(items, categories, context);\n recyclerView.setAdapter(itemsListAdapter);\n } catch (JSONException e) {\n Log.d(DEBUG_TAG, \"Load items parsing fail\");\n }\n }\n // set loading progress bar to invisible when loading is finished\n progressBar.setVisibility(View.INVISIBLE);\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 Item[] getItems() {\n/* 3068 */ if (this.vitems != null) {\n/* 3069 */ return this.vitems.getAllItemsAsArray();\n/* */ }\n/* 3071 */ return emptyItems;\n/* */ }", "public List<Item> getItems() {\n\t\treturn this.items;\n\t}", "public void setItems(java.util.Collection<java.util.Map<String,AttributeValue>> items) {\n if (items == null) {\n this.items = null;\n return;\n }\n\n java.util.List<java.util.Map<String,AttributeValue>> itemsCopy = new java.util.ArrayList<java.util.Map<String,AttributeValue>>(items.size());\n itemsCopy.addAll(items);\n this.items = itemsCopy;\n }", "private void getTravelItems() {\n String[] columns = Columns.getTravelColumnNames();\n Cursor travelCursor = database.query(TABLE_NAME, columns, null, null, null, null, Columns.KEY_TRAVEL_ID.getColumnName());\n travelCursor.moveToFirst();\n while (!travelCursor.isAfterLast()) {\n cursorToTravel(travelCursor);\n travelCursor.moveToNext();\n }\n travelCursor.close();\n }", "@Override\n\tpublic List<Estadoitem> listar() {\n\t\treturn estaitemdao.listar();\n\t}", "List<Navigation> getNavigationList();", "@Override\r\n\t\tpublic List<Item> getItems() {\n\t\t\treturn null;\r\n\t\t}", "@Transactional\r\n\tpublic List<UIDataModelEntity>getLinks(int startItem){\r\n\t\tPageRequest page = new PageRequest(startItem, PAGE_OFFSET);\r\n\t\tPage<Item> items = itemRepo.findAll(page);\r\n\t\tList<UIDataModelEntity> uiEntitiesList = new ArrayList<>();\r\n\t\tfor(Item item : items){\r\n\t\t\titem.getItemLinks().size();\r\n\t\t\tSet<ItemLink> links = item.getItemLinks();\r\n\t\t\tCategory category = item.getCategory();\r\n\t\t\tUIDataModelEntity modelEntity = new UIDataModelEntity();\r\n\t\t\tmodelEntity.setCategoryName(category.getName());\r\n\t\t\tmodelEntity.setCompanyName(item.getName());\r\n\t\t\tlinks.stream().forEach(e->{modelEntity.getGoogleLinks().add(e.getLink());});\r\n\t\t\tuiEntitiesList.add(modelEntity);\r\n\t\t}\r\n\t\t\r\n\t\treturn uiEntitiesList;\r\n\t\t\r\n\t}", "private void populateOrganizations() {\n\t\tMatContext.get().getAdminService().getAllOrganizations(new AsyncCallback<ManageOrganizationSearchModel>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onSuccess(ManageOrganizationSearchModel model) {\n\t\t\t\tList<Result> results = model.getData();\n\t\t\t\tdetailDisplay.populateOrganizations(results);\n\t\t\t\t\n\t\t\t\tMap<String, Result> orgMap = new HashMap<String, Result>();\n\t\t\t\tfor(Result organization : results) {\n\t\t\t\t\torgMap.put(organization.getId(), organization);\n\t\t\t\t}\n\t\t\t\tdetailDisplay.setOrganizationsMap(orgMap);\n\t\t\t\t\n\t\t\t\tsetUserDetailsToView();\n\t\t\t}\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 AbstractMetamodelRepository(Set<T> items) {\n setItems(items);\n }", "@Override\n public void loadItems(){\n Log.d(\"Presenter\",\"Loading Items\");\n mRepository.getItems(new DataSource.LoadItemsCallback() {\n @Override\n public void onItemsLoaded(List<Session> sessions) {\n Log.d(\"PRESENTER\",\"Loaded\");\n\n //mView.showItems(Items);\n }\n\n @Override\n public void onDataNotAvailable() {\n Log.d(\"PRESENTER\",\"Not Loaded\");\n }\n });\n }", "Items(){\n}", "public void resolveItems(View view){\n\t\t\n\t\tItem newItem1 = new Item(lostItem.getItemName(),lostItem.getItemDes(),lostItem.getReward(),\n\t\t\t\t\"Resolved\",lostItem.getDate(),lostItem.getCatagory(),lostItem.getLocation(),\n\t\t\t\tlostItem.getOwner());//recreate lost item\n\t\tItem newItem2 = new Item(matchedItem.getItemName(),matchedItem.getItemDes(),matchedItem.getReward(),\n\t\t\t\t\"Resolved\",matchedItem.getDate(),matchedItem.getCatagory(),matchedItem.getLocation(),\n\t\t\t\tmatchedItem.getOwner());//recreate found item\n\t\t\n\t\titemCollection.deleteItem(lostItem);\n\t\titemCollection.deleteItem(matchedItem);\n\t\t\n\t\titemCollection.addItem(newItem1);\n\t\titemCollection.addItem(newItem2);\n\t\t\n\t\tIntent intent = new Intent(this, TabsActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent); \n\t\t\n\t}", "@Override\n public List<Item> viewAllItems() {\n // calls List<Item> itemRepo.findCatalog();\n return itemRepo.findCatalog();\n }", "public void getMenuItems(){ \n\t\tParseUser user = ParseUser.getCurrentUser();\n\t\tmenu = user.getParseObject(\"menu\");\n\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"Item\");\n\t\tquery.whereEqualTo(\"menu\", menu);\n\n\t\tquery.findInBackground(new FindCallback<ParseObject>() {\n\t\t\tpublic void done(List<ParseObject> menuItems, ParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\tlistMenuItems(menuItems);\n\t\t\t\t} else {\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@JsonProperty(\"itens\")\n @NotNull\n public List<ItemAgrupamentoLpco> getItens() {\n return itens;\n }", "@Nonnull\n\t@Override\n\tpublic NodeCollection getItems() {\n\t\treturn items;\n\t}", "public List<Item> getItems(){\n\t\treturn data;\n\t}", "public void setItemList(String item)\n {\n this.itemLinkedList.add(new Item(item));\n }", "public void setItem (Item item)\n\t{\n\t\tthis.item = item;\n\t}", "public void setItems(List<PickerItem> items) {\n this.items = items;\n initViews();\n selectChild(-1);\n }", "@SuppressWarnings (\"rawtypes\") public java.util.List getItems(){\n return this.items;\n }", "public java.util.Set<com.jspgou.cms.entity.OrderItem> getItems () {\r\n\t\treturn items;\r\n\t}", "public String navigateMenuRolList() {\n Submenu selected = this.getSelected();\n if (selected != null) {\n SubmenuFacade ejbFacade = (SubmenuFacade) this.getFacade();\n List<MenuRol> selectedMenuRolList = ejbFacade.findMenuRolList(selected);\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"MenuRol_items\", selectedMenuRolList);\n }\n return this.mobilePageController.getMobilePagesPrefix() + \"/app/menuRol/index\";\n }", "public List<IDataSetItem> getItems() {\n return items;\n }", "public void setItem(Collectable c) {\n\t\tthis.m_item = c;\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\t}", "private void loadItemsMaps()\n {\n _icons=new HashMap<String,List<Item>>(); \n _names=new HashMap<String,List<Item>>(); \n List<Item> items=ItemsManager.getInstance().getAllItems();\n for(Item item : items)\n {\n String icon=item.getIcon();\n if (icon!=null)\n {\n registerMapping(_icons,icon,item);\n String mainIconId=icon.substring(0,icon.indexOf('-'));\n registerMapping(_icons,mainIconId,item);\n String name=item.getName();\n registerMapping(_names,name,item);\n }\n }\n }", "@JSProperty(\"items\")\n void setItems(Any... value);", "@OneToMany(mappedBy = \"estadoCivil\")\n\tpublic List<Aluno> getAlunos() {\n\t\treturn this.alunos;\n\t}", "public java.util.List<com.rpg.framework.database.Protocol.Item> getItemsList() {\n return items_;\n }", "public DesktopClient printItemList() {\n String uri = \"http://localhost:8080/api/items\";\n RestTemplate restTemplate = new RestTemplate();\n ResponseEntity<Item[]> result = restTemplate.getForEntity(uri, Item[].class);\n Item[] items = result.getBody();\n List<Item> itemList = new ArrayList<>();\n if (items != null) {\n itemList.addAll(Arrays.asList(items));\n\n for (Item item :\n itemList) {\n System.out.println(item.toString());\n }\n } else {\n System.out.println(\"Didn't get items.\");\n }\n\n return this;\n }", "public void initAttributes(ObservableList<Item> items) {\n this.items = items;\n }", "public Set<Medicine> loadMedicines();", "@RequestMapping(value = \"/items\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<Item> itemListRest() {\n\t\treturn (List<Item>) repository.findAll();\n\t}", "@PostConstruct\r\n public void leerListaUsuarios() {\r\n listaUsuarios.addAll(usuarioFacadeLocal.findAll());\r\n }", "@JSProperty(\"items\")\n @Nullable\n Any[] getItems();", "public List<T> items() {\n return items;\n }", "public ArrayList<Item> getItems() {\n\t\treturn items;\n\t}", "public ArrayList<Item> getItems() {\n\t\treturn items;\n\t}", "public PaymentRequest setItems(List items) {\r\n this.items = items;\r\n return this;\r\n }", "public List<Mobibus> darMobibus();", "@Override\r\n\tpublic void setInventoryItems() {\n\t\t\r\n\t}", "public NavigableSet<Groupe> getGroupes();", "public ArrayList<Item> getItems() {\r\n\t\treturn items;\r\n\t}", "public void setItem(ItemType item) {\n\t this.item = item;\n\t}", "public void setItem(ItemType item) {\n\t this.item = item;\n\t}", "public List<Item> getItems() {\n return Collections.unmodifiableList(items);\n }", "private void actualizarEnemigosItems() {\n if(estadoMapa== EstadoMapa.RURAL || estadoMapa== EstadoMapa.RURALURBANO ){\n moverCamionetas();\n moverAves();\n }\n if(estadoMapa== EstadoMapa.URBANO || estadoMapa == EstadoMapa.URBANOUNIVERSIDAD){\n moverCarroLujo();\n moverAves();\n }\n if(estadoMapa== EstadoMapa.UNIVERSIDAD){\n moverCarritoGolf();\n moverAves();\n }\n if (estadoMapa == EstadoMapa.SALONES){\n moverLamparas();\n moverSillas();\n }\n actualizaPuntuacion();\n moverTareas();\n moverItemCorazon();\n verificarColisiones();\n verificarMuerte();\n moverItemRayo();\n /*\n IMPLEMENTAR\n\n //moverPajaro();\n //etc\n */\n }", "@DebugLog\n public void setItems(ArrayList<Update> items) {\n if (items != null) {\n for (Update item : items) {\n mItems.add(new OverviewItem(item));\n }\n }\n notifyDataSetChanged();\n //Remove the isloading\n if (getBasicItemCount() <= 0) return;\n try {\n OverviewItem overviewItem = mItems.get(getBasicItemCount() - items.size() - 1);\n if (overviewItem.isLoadingItem) {\n mItems.remove(getBasicItemCount() - items.size() - 1);\n notifyDataSetChanged();\n }\n }catch(ArrayIndexOutOfBoundsException e)\n {\n //theres no loading overview\n return;\n }\n\n }", "public void setMiembros(ArrayList<Usuario> miembros) {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"setMiembros(ArrayList) - start\");\n\t\t}\n\n\t\tthis.miembros = miembros;\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"setMiembros(ArrayList) - end\");\n\t\t}\n\t}", "public List<Movie> getMovies() {\n return movies;\n }", "public String navigatePartidoCollection2() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Partido_items\", this.getSelected().getPartidoCollection2());\n }\n return \"/partido/index\";\n }" ]
[ "0.58096325", "0.571871", "0.5540447", "0.55087334", "0.5431392", "0.54220146", "0.53367174", "0.53268087", "0.53109485", "0.5262806", "0.5262806", "0.5238667", "0.523375", "0.5217553", "0.5160338", "0.51597786", "0.51522756", "0.5056322", "0.5042294", "0.50356925", "0.49930933", "0.49843282", "0.4956607", "0.49366564", "0.4923889", "0.49234992", "0.49071074", "0.4894938", "0.4887607", "0.48671815", "0.4861964", "0.48457152", "0.4845572", "0.48356685", "0.482324", "0.4822168", "0.47984388", "0.4792721", "0.47876954", "0.47752726", "0.47729367", "0.47712392", "0.47625554", "0.47525486", "0.47514656", "0.47486126", "0.47195292", "0.47160858", "0.47102016", "0.47059354", "0.4698587", "0.46962556", "0.46887216", "0.46803418", "0.4679673", "0.46767685", "0.46733314", "0.4673008", "0.46612993", "0.46555984", "0.4651888", "0.46493852", "0.46486408", "0.46485296", "0.46478027", "0.46437082", "0.46412307", "0.46398208", "0.463505", "0.4633276", "0.4623469", "0.46168834", "0.461687", "0.461687", "0.4608063", "0.46046522", "0.46002045", "0.45991173", "0.4584043", "0.45833144", "0.45822158", "0.45744574", "0.45731735", "0.4572158", "0.45675322", "0.45642984", "0.45642984", "0.45577988", "0.45563257", "0.4555445", "0.45530924", "0.45524055", "0.45505762", "0.45505762", "0.45473963", "0.45467725", "0.45422912", "0.45409876", "0.45401928", "0.45401746" ]
0.63785505
0
Sets the "selected" attribute of the Departamento controller in order to display its data in its View dialog.
public void prepareIdDepartamento(ActionEvent event) { Municipio selected = this.getSelected(); if (selected != null && idDepartamentoController.getSelected() == null) { idDepartamentoController.setSelected(selected.getIdDepartamento()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSelectedItem( final T selectedEntity ) {\n this.selectedEntity = selectedEntity;\n }", "public void setSelected(boolean selected) \n {\n this.selected = selected;\n }", "public void setSelected(boolean selected) {\n this.selected = selected;\n }", "public void selectAgent(int selected) {\n this.selected = selected;\n }", "public void setSelectedItem(BrowseItem selectedItem)\r\n\t{\r\n\t\tthis.selectedItem = selectedItem;\r\n\t}", "public void setSelected(List<F> selected) {\n this.selected = selected;\n }", "public void setSelected(boolean selected) {\r\n\t\tthis.selected = selected;\r\n\t}", "public void setSelected(boolean selected);", "public void setSelected(boolean selected)\n\t{\n\t\tthis.selected = selected;\n\t}", "public void setSelectedItem(Gnome selectedItem) {\n this.selectedItem = selectedItem;\n }", "@Override\n\tpublic void selecciona() {\n\t\tClienteProxy bean = grid.getSelectionModel().getSelectedObject();\n\t\tif(bean!=null){\t\t\t\t\n\t\tuiHomePrestamo.getHeader().getLblTitulo().setText(\"Devolpay\");\n\t\tuiHomePrestamo.getHeader().setVisibleBtnMenu(true);\t\t\n\t\tuiHomePrestamo.getUIMantPrestamoImpl().setBeanCliente(bean);\n\t\tuiHomePrestamo.getContainer().showWidget(1);\t\t\n\t\t}else{\n\t\t\t//Dialogs.alert(constants.alerta(), constants.seleccioneCliente(), null);\n\t\t\t//Window.alert(constants.seleccioneCliente());\n\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccioneCliente());\n\t\t\tnot.showPopup();\n\t\t}\n\t}", "public void setSelectedItem(int selectedItem) {\n setSelectedItem(selectedItem, true);\n }", "public void setSelected(boolean selected) {\n\t\tiAmSelected = selected;\n\t}", "public void setSelected(boolean selected) {\t\t\t\t\n\t\tthis.selected = selected;\t\t\t\t\t\t\n\t}", "public void setSelectedItem(T value) {\n getElement().setSelectedItem(SerDes.mirror(value));\n }", "@Override\n\tpublic void setSelected(boolean selected) {\n\t\t\n\t}", "public void setSelectedFood(online.food.ordering.Food _selectedFood)\n {\n selectedFood = _selectedFood;\n }", "public void prepareFrecuenciaServicioIdTipoDemanda(ActionEvent event) {\n if (this.getSelected() != null && frecuenciaServicioIdTipoDemandaController.getSelected() == null) {\n frecuenciaServicioIdTipoDemandaController.setSelected(this.getSelected().getFrecuenciaServicioIdTipoDemanda());\n }\n }", "public void setSelectedMuniv(Muniv selectedMuniv) {\n getMunivMainCtrl().setSelectedMuniv(selectedMuniv);\r\n }", "@Override\n public void selectItem(String selection) {\n vendingMachine.setSelectedItem(selection);\n vendingMachine.changeToHasSelectionState();\n }", "@Override\n\t\tpublic void setSelected(int p_178011_1_, int p_178011_2_, int p_178011_3_) {\n\n\t\t}", "@Override\n\t\tpublic void setSelected(int p_178011_1_, int p_178011_2_, int p_178011_3_) {\n\n\t\t}", "public void setSelected(boolean select) {\r\n isSelected = select;\r\n }", "public void select(int id) {\n selectedId = id;\n }", "public void setSelected(boolean s)\n {\n selected = s; \n }", "@Override\r\n\tpublic void seleccionarPersona() {\n\t\t\r\n\t}", "@Override\n public void modelView(Model m) {\n Aluno a = (Aluno) m;\n this.jCurso.setSelectedItem(a.getCurso());\n this.jAno.setSelectedItem(a.getAno());;\n this.jNome.setText(a.getNome());\n this.jIdade.setText(a.getIdade());\n }", "public void prepareOferente(ActionEvent event) {\n if (this.getSelected() != null && oferenteController.getSelected() == null) {\n oferenteController.setSelected(this.getSelected().getOferente());\n }\n }", "public void setSelected( boolean selected )\n\t{\n\t\tmSelected = selected;\n\t\t\n\t\tmUpdated = true;\n\t}", "public void prepareIdEmpleado(ActionEvent event) {\n Rentadevolucion selected = this.getSelected();\n if (selected != null && idEmpleadoController.getSelected() == null) {\n idEmpleadoController.setSelected(selected.getIdEmpleado());\n }\n }", "public void setListaPartidas() {\r\n\t\tDefaultListModel<String> modelo = new DefaultListModel<String>();\r\n\t\t\r\n\t\tfor(int i = 0; i < this.listadoPartidas.size(); i++) {\r\n\t\t\tmodelo.add(i, this.listadoPartidas.get(i).getNombre());\r\n\t\t}\r\n\t\tthis.partidasList.setModel(modelo);\r\n\t\tif(!this.partidaSelecionada.equals(\"\")) {\r\n\t\t\tfor (Partida partida : this.listadoPartidas) {\r\n\t\t\t\tif(partida.getNombre().equals(this.partidaSelecionada)){\r\n\t\t\t\t\tlblInfoEspera.setText(Integer.toString(partida.getConectados()));\r\n\t\t\t\t\tlblInfoEstado.setText(partida.getEstado());\r\n\t\t\t\t\tlblInfoJugadoresReq.setText(Integer.toString(partida.getJugadoresReq()));\r\n\t\t\t\t\tif(principal.getVentanaEspera() != null)\r\n\t\t\t\t\t\tprincipal.getVentanaEspera().setValoresEspera(this.partidaMaxJugadores, partida.getJugadoresReq(), partida.getConectados());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@FXML\n public void clicaTblCidade(){\n \tCidade sel = tblCidade.getSelectionModel().getSelectedItem();\n \ttxtNome.setText(sel.getNome());\n \ttxtUf.getSelectionModel().select(sel.getUf());\n }", "public void setSelectedItem(ItemT item) {\n selectedItem = item;\n onSelectedItemChanged();\n }", "@Override\r\n public void setSelected(boolean selected) {\r\n boolean oldSelected = this.mSelected;\r\n this.mSelected = selected;\r\n if (!oldSelected && selected) {\r\n this.mMultiSelect.addToken(this.getPrototype());\r\n } else if (oldSelected && !selected) {\r\n this.mMultiSelect.removeToken(this.getPrototype());\r\n }\r\n\r\n if (oldSelected != this.mSelected) {\r\n this.invalidate();\r\n }\r\n }", "public void setSelected(boolean selected) {\n\t\t// Set the Selection on the CoolBar\n\t _coolBar.setSelected(selected);\n\t}", "public void setSelectedOption(int selectedOption) {\n this.selectedOption = selectedOption;\n }", "public void setSelectedObject(SimObject selectedObject) {\n\t\tthis.selectedObject = selectedObject;\n\t\tthis.mainMenu.updateDetailedMenu();\n\t}", "@FXML\n public void alteraCidade(){\n \tCidade sel = tblCidade.getSelectionModel().getSelectedItem();\n \t\n \tif(sel!=null){\n \t\tsel.setNome(txtNome.getText());\n \t\tsel.setUf(txtUf.getSelectionModel().getSelectedItem());\n \t\tsel.altera(conn);\n \t\tattTblCidade();\n \t\tlimpaCidade();\n \t}else{\n \t\tMensagens.msgErro(\"FALHA\", \"Selecione uma cidade\");\n \t}\n }", "@FXML\n private void editSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"Edit DonorReceiver\");\n } else {\n EditPaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.EDIT);\n }\n }", "public void prepareFrecuenciaServicioIdTipoDia(ActionEvent event) {\n if (this.getSelected() != null && frecuenciaServicioIdTipoDiaController.getSelected() == null) {\n frecuenciaServicioIdTipoDiaController.setSelected(this.getSelected().getFrecuenciaServicioIdTipoDia());\n }\n }", "public void setSelected(AnimationDef selected) {\n getAdapter().getSelectionManager().deselectAll();\n if( selected != null ){\n getAdapter().getSelectionManager().select(selected);\n }\n }", "public void setSelectedUser(ch.ivyteam.ivy.security.IUser _selectedUser)\n {\n selectedUser = _selectedUser;\n }", "public void setSelected(List<T> value) {\n if (isMulti()) {\n getElement().setSelected(SerDes.mirror(value));\n } else {\n getElement().setSelected(value.isEmpty()?null:SerDes.mirror(value.iterator().next()));\n }\n }", "public void setSelectedRestaurant(int selectedRestaurant) {\n this.selectedRestaurant = selectedRestaurant;\n }", "public void setCardSelected(Card cardSelected) {\r\n this.cardSelected = cardSelected;\r\n }", "@Override\n\tpublic void setSelectedNavigationItem(int position) {\n\t\t\n\t}", "public void prepareFrecuenciaServicioIdServicio(ActionEvent event) {\n if (this.getSelected() != null && frecuenciaServicioIdServicioController.getSelected() == null) {\n frecuenciaServicioIdServicioController.setSelected(this.getSelected().getFrecuenciaServicioIdServicio());\n }\n }", "public void selecionarCliente() {\n int cod = tabCliente.getSelectionModel().getSelectedItem().getCodigo();\n cli = cli.buscar(cod);\n\n cxCPF.setText(cli.getCpf());\n cxNome.setText(cli.getNome());\n cxRua.setText(cli.getRua());\n cxNumero.setText(Integer.toString(cli.getNumero()));\n cxBairro.setText(cli.getBairro());\n cxComplemento.setText(cli.getComplemento());\n cxTelefone1.setText(cli.getTelefone1());\n cxTelefone2.setText(cli.getTelefone2());\n cxEmail.setText(cli.getEmail());\n btnSalvar.setText(\"Novo\");\n bloquear(false);\n }", "@FXML\n private void viewSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"View DonorReceiver\");\n } else {\n ViewProfilePaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.VIEW);\n }\n }", "@Listen(\"onClick = #selectModel\")\n\tpublic void selectModel(){\n\t\ttreeModel.setOpenObjects(List.of(treeModel.getRoot().getChildren().get(path[0])));\n\t\ttreeModel.addToSelection(treeModel.getChild(path));\n\t}", "public void setSelectedTrain(Train train){\n\n this.selectedTrain = train;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tTableRow selected=null;\n\t\t\t\tfor(int i=0;i<table.getChildCount() && selected==null;i++){\n\t\t\t\t\tTableRow row = (TableRow)table.getChildAt(i);\n\t\t\t\t\tif(row.isSelected()){\n\t\t\t\t\t\tselected=row;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(selected==null){\n\t\t\t\t\t//Creamos un toast para avisar\n\t\t\t\t\tResources res = getResources();\n\t\t\t\t\tString text = String.format(res.getString(R.string.selectBill));\n\t\t\t\t\tToast msg = Toast.makeText(getBaseContext(),text, Toast.LENGTH_LONG);\n\t\t\t\t\tmsg.show();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tTextView idFactura = (TextView) selected.getChildAt(1);\n\t\t\t\t\tTextView nameClient = (TextView) selected.getChildAt(0);\n\t\t\t\t\t\n\t\t\t\t\tGlobalStatic data = (GlobalStatic) getApplicationContext();\n\t\t\t\t\t\n\t\t\t\t\tdata.cliente = data.getCliente((String)nameClient.getText());\n\t\t\t\t\tdata.factura = data.getFacturasId(data.cliente, Integer.parseInt((String)idFactura.getText()));\n\n\t\t\t\t\tIntent intent = new Intent(DiarySelection.this,BillForm.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}\n\t\t\t}", "public void setSelected(boolean b){\n\t\ttry{\n\t\t\tframe.setSelected(b);\n\t\t}catch(PropertyVetoException pve){}\n\t}", "public void itemSelected(boolean selected);", "public void setSelectedEntities(List<BasicEntity> selectedEntities) {\n this.selectedEntities = selectedEntities;\n }", "public void prepareServicioId(ActionEvent event) {\r\n if (this.getSelected() != null && servicioIdController.getSelected() == null) {\r\n servicioIdController.setSelected(this.getSelected().getServicioId());\r\n }\r\n }", "public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }", "public void prepareSeguimiento(ActionEvent event) {\n if (this.getSelected() != null && seguimientoController.getSelected() == null) {\n seguimientoController.setSelected(this.getSelected().getSeguimiento());\n }\n }", "@Override\n public void select(TaskView selectedCard) {\n if(selectedTask != null) {\n selectedTask.deselectCard();\n }\n selectedTask = selectedCard;\n selectedTask.selectCard();\n }", "public void setCodDepartamento(String codDepartamento);", "public void setSelectedValue(String selectedValue) {\r\n\t\tthis.selectedValue = selectedValue;\r\n\t}", "public void setSelectedMitarbeiter(Mitarbeiter_ selectedMitarbeiter) {\n this.selectedMitarbeiter = Optional.ofNullable(selectedMitarbeiter);\n }", "public boolean getSelected()\n {\n return selected; \n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tListSelectionModel lsm = list.getSelectionModel();\r\n\t\t\tint selected = lsm.getMinSelectionIndex();\r\n\r\n\t\t\tItemView itemView = (ItemView) list.getModel().getElementAt(selected);\r\n\r\n\t\t\t// change item\r\n\t\t\tJOptionPane options = new JOptionPane();\r\n\t\t\tObject[] addFields = { \"Name: \", nameTextField, \"Price: \", priceTextField, \"URL: \", urlTextField, };\r\n\t\t\tint option = JOptionPane.showConfirmDialog(null, addFields, \"Edit item\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\t\tif (option == JOptionPane.OK_OPTION) {\r\n\t\t\t\tString name = nameTextField.getText();\r\n\t\t\t\tString price = priceTextField.getText();\r\n\t\t\t\tString url = urlTextField.getText();\r\n\r\n\t\t\t\tdouble doublePrice = Double.parseDouble(price);\r\n\r\n\t\t\t\titemView.getItem().setName(name);\r\n\t\t\t\titemView.getItem().setCurrentPrice(doublePrice);\r\n\t\t\t\titemView.getItem().setUrl(url);\r\n\t\t\t\t// clear text fields\r\n\t\t\t\tnameTextField.setText(\"\");\r\n\t\t\t\tpriceTextField.setText(\"\");\r\n\t\t\t\turlTextField.setText(\"\");\r\n\t\t\t}\r\n\t\t}", "void showSelectedAgentView();", "public void editarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.edit(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaEditDialog').hide()\");\n ejbFacade.limpiarCache();\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n// FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\"));\n// requestContext.execute(\"PF('mensajeRegistroExitoso').show()\");\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se editó con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n\n }", "private void selectItem(int position) \n {\n \tFragment fragment = null;\n Bundle args = new Bundle();\n switch(position){\n \n case 0:\n \tDrawerTest.this.getActionBar().hide();\n \tfragment = new StaticViewer();\n args.putInt(\"static_viewer\", position);\n break;\n case 1:\n \tDrawerTest.this.getActionBar().hide();\n \tfragment = new DoctorPanel();\n args.putInt(\"doctor_panel\", position);\n break;\n case 2:\n \tDrawerTest.this.getActionBar().hide();\n \tfragment = new Panel();\n \targs.putInt(\"panel\", position);\n \tbreak;\n case 3:\n \tfragment = new Help();\n \targs.putInt(\"help\", position);\n case 4:\n \tfragment = new About();\n \targs.putInt(\"about\", position);\n default:\n \tDrawerTest.this.getActionBar().show();\n \tbreak;\n }\n //args.putInt(PlanetFragment.ARG_PLANET_NUMBER, position);\n fragment.setArguments(args);\n\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();\n\n // update selected item and title, then close the drawer\n mDrawerList.setItemChecked(position, true);\n setTitle(mPlanetTitles[position]);\n mDrawerLayout.closeDrawer(mDrawerList);\n }", "public final void setSelectedBone(Bone selectedBone) {\n this.selectedBone = selectedBone;\n }", "private void setSelectedItem(int selectedItem, boolean scrollIntoView) {\n mSelectedItem = selectedItem;\n if (mSelectedItemChangeListener != null) {\n mSelectedItemChangeListener.OnSelectedItemChange(this, selectedItem);\n }\n if (scrollIntoView) {\n centerOnItem(selectedItem);\n }\n invalidate();\n requestLayout();\n }", "private void select(ActionEvent e){\r\n // Mark this client as an existing client since they are in the list\r\n existingClient = true;\r\n // To bring data to Management Screen we will modify the text fields\r\n NAME_FIELD.setText(client.getName());\r\n ADDRESS_1_FIELD.setText(client.getAddress1());\r\n ADDRESS_2_FIELD.setText(client.getAddress2());\r\n CITY_FIELD.setText(client.getCity());\r\n ZIP_FIELD.setText(client.getZip());\r\n COUNTRY_FIELD.setText(client.getCountry());\r\n PHONE_FIELD.setText(client.getPhone());\r\n // client.setAddressID();\r\n client.setClientID(Client.getClientID(client.getName(), client.getAddressID()));\r\n // Pass client information to Client Management Screen\r\n currClient = client;\r\n back(e);\r\n }", "public void selectItem(int i) {\n checkIndex(i);\n selectedItem = i;\n }", "public String navigateFechamentoList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Fechamento_items\", this.getSelected().getFechamentoList());\n }\n return \"/pages/prime/fechamento/index\";\n }", "public void select(boolean a)\n {\n selected = a;\n }", "private void modifierParametre() {\n if (getSelectedParamatre() == null) return;\n FenetreModifierParametre fenetreModifierParametre = new FenetreModifierParametre(getSelectedParamatre());\n fenetreModifierParametre.showAndWait();\n if (fenetreModifierParametre.getParametre() == null) return;\n Parametre temp = fenetreModifierParametre.getParametre();\n getSelectedParamatre().setNom(temp.getNom());\n getSelectedParamatre().setType(temp.getType());\n parametreListView.refresh();\n }", "public void setSelectedArena(Arena arena) {\n this.selectedArena = arena;\n }", "void setDetailsForecastDayPosition(int selectedPosition)\n {\n this.selectedPosition = selectedPosition;\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n showModal(position);\n view.setSelected(true);\n }", "public void setSelectedUser(String selected) {\n selectedUser = selected;\n\n //this.removeAllEvents();\n //loadEvents();\n }", "public int getSelectedId() {\n return selectedId;\n }", "public Axiom getSelected() {\r\n\treturn view.getSelected();\r\n }", "public void setSelectPresentationBackingList(java.util.Collection items, String valueProperty, String labelProperty);", "public void setIsSelected(boolean value) {\n this.setValue(IS_SELECTED_PROPERTY_KEY, value);\n }", "void setSelected(boolean selected) {\n if (selected == isSelected()) {\n return;\n }\n if (selected) {\n highlight();\n } else {\n unhighlight();\n }\n this.selected = selected;\n }", "public void setSelectedImpact(Operation selectedImpact) {\r\n\t\t_selectedImpact = selectedImpact;\r\n\r\n\t\trefreshImpactSelectDependentFields();\r\n\t}", "@Override\n public void setSelected(int value) {\n super.setSelected(value);\n EditableLabel columnLabel = getFigure().getLabel();\n columnLabel.setSelected(value != EditPart.SELECTED_NONE);\n if (false) {\n IFigure rightPanel = getFigure().getRightPanel();\n if (rightPanel instanceof EditableLabel) {\n ((EditableLabel) rightPanel).setSelected(value != EditPart.SELECTED_NONE);\n }\n }\n columnLabel.repaint();\n\n if (value != EditPart.SELECTED_NONE) {\n if (this.getViewer() instanceof ERDGraphicalViewer && associatedRelationsHighlighing == null) {\n Color color = UIUtils.getColorRegistry().get(ERDUIConstants.COLOR_ERD_FK_HIGHLIGHTING);\n associatedRelationsHighlighing = ((ERDGraphicalViewer) this.getViewer()).getEditor().getHighlightingManager().highlightAttributeAssociations(this, color);\n }\n } else if (associatedRelationsHighlighing != null) {\n associatedRelationsHighlighing.release();\n associatedRelationsHighlighing = null;\n }\n }", "public void setEstado(biz.belcorp.www.canonico.ffvv.vender.TEstadoPedido param){\n \n this.localEstado=param;\n \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}", "@Override\r\n\t\t\tpublic void seleccionar() {\n\r\n\t\t\t}", "public void selectedAdmision(Admision admision) {\r\n if (admision == null) {\r\n datos_seleccion.remove(\"list_item_admision\");\r\n limpiarDatos();\r\n deshabilitarCampos(true);\r\n } else {\r\n Hospitalizacion hospitalizacion = new Hospitalizacion();\r\n\r\n hospitalizacion.setCodigo_empresa(admision.getCodigo_empresa());\r\n hospitalizacion.setCodigo_sucursal(admision.getCodigo_sucursal());\r\n hospitalizacion.setNro_identificacion(admision\r\n .getNro_identificacion());\r\n hospitalizacion.setNro_ingreso(admision.getNro_ingreso());\r\n final Hospitalizacion hsp = getServiceLocator()\r\n .getHospitalizacionService().consultar(hospitalizacion);\r\n\r\n if (admision.getHospitalizacion().equals(\"S\") && hsp != null) {\r\n msgExistencia(hsp);\r\n } else if (admision.getHospitalizacion().equals(\"N\")) {\r\n Messagebox\r\n .show(\"No se ha registrado el ingreso del paciente por hospitalizacion\",\r\n \"Paciente no admisionado\", Messagebox.OK,\r\n Messagebox.EXCLAMATION);\r\n Listitem listitem = (Listitem) datos_seleccion\r\n .get(\"list_item_admision\");\r\n lbxNro_ingreso.setSelectedItem(listitem);\r\n Admision admisionTemp = listitem.getValue();\r\n if (admisionTemp != null) {\r\n Utilidades.setValueFrom(lbxCausa_externa,\r\n admisionTemp.getCausa_externa());\r\n }\r\n return;\r\n } else {\r\n datos_seleccion.put(\"list_item_admision\",\r\n lbxNro_ingreso.getSelectedItem());\r\n cargarAdmisiones(admision);\r\n Utilidades.setValueFrom(lbxCausa_externa,\r\n admision.getCausa_externa());\r\n }\r\n }\r\n }", "public void modifySelectedFurniture() {\n if (!Home.getFurnitureSubList(this.home.getSelectedItems()).isEmpty()) {\n new HomeFurnitureController(this.home, this.preferences, \n this.viewFactory, this.contentManager, this.undoSupport).displayView(getView());\n }\n }", "public void startSelect(View v){\n isStart = true;\n isCancel = false;\n mySave.setVisibility(View.VISIBLE);\n myCancel.setVisibility(View.VISIBLE);\n myEdit.setVisibility(View.INVISIBLE);\n myCancel.bringToFront();\n myViewFilter.setVisibility(View.INVISIBLE);\n adapter.notifyDataSetChanged();\n }", "public void setSelectedItems( final Set<T> selectedEntities ) {\n this.selectedEntities = selectedEntities;\n }", "@Test\r\n public void testSetIdDepto() {\r\n System.out.println(\"setIdDepto\");\r\n Integer idDepto = null;\r\n Departamento instance = new Departamento();\r\n instance.setIdDepto(idDepto);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "public void prepareIdEquipo(ActionEvent event) {\n Rentadevolucion selected = this.getSelected();\n if (selected != null && idEquipoController.getSelected() == null) {\n idEquipoController.setSelected(selected.getIdEquipo());\n }\n }", "public void prepareIdUsuario(ActionEvent event) {\n Rentadevolucion selected = this.getSelected();\n if (selected != null && idUsuarioController.getSelected() == null) {\n idUsuarioController.setSelected(selected.getIdUsuario());\n }\n }", "public void ViagemSelecionado(SelectEvent event) {\n\n\t\tViagem m1 = (Viagem) event.getObject();\n\t\tthis.viagem = m1;\n\n\t}", "public void setSelection(Pair selection);", "public void abrirVentanaEditarLista(ActionEvent event){\n Parent root;\n try {\n //Se carga la ventana\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"editarListaSample.fxml\"));\n root =loader.load();\n Stage stage = new Stage();\n stage.setTitle(\"Lista\");\n stage.setScene(new Scene(root,600,450));\n //Se define la selecciono de lista y lo que se hara con ella\n ListaCompras listaSeleccionada = ListasComprasTabla.getSelectionModel().getSelectedItem();\n if (listaSeleccionada!=null) {\n EditarListaSample controllerEditarLista = loader.getController();\n controllerEditarLista.definirPantalla(listaSeleccionada);\n\n listaSeleccionada.getArticulos().forEach(articulo -> controllerEditarLista.anadirArticulos(articulo));\n\n\n //Se muestra la ventana\n stage.show();\n }else{\n System.out.println(\"No ha seleccionado nada\");\n }\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "public void setSelected(boolean newSelected) {\n \t\tboolean oldSelected = selected;\n \t\tselected = newSelected;\n \t\tif (oldSelected != newSelected && parentSelection != null)\n \t\t\tparentSelection.setModified(true);\n \t}", "public void setSelectedDate(Date selectedDate);" ]
[ "0.6594509", "0.65038455", "0.6420879", "0.6287912", "0.6275238", "0.62596536", "0.6255511", "0.62253386", "0.62216276", "0.6190974", "0.61825824", "0.6181962", "0.6170598", "0.61602724", "0.6143771", "0.61122173", "0.6085376", "0.5944129", "0.59078145", "0.58664626", "0.5820419", "0.5820419", "0.5815695", "0.5787178", "0.5784115", "0.5783069", "0.5774098", "0.57236624", "0.5715472", "0.5693943", "0.56856996", "0.56558156", "0.5654712", "0.56253403", "0.56228375", "0.56109864", "0.56069696", "0.5601578", "0.5529864", "0.55096704", "0.55036604", "0.5490112", "0.54757637", "0.5462774", "0.5458166", "0.54468775", "0.5445111", "0.54402906", "0.5434176", "0.54258895", "0.5418654", "0.5414029", "0.54137677", "0.5411253", "0.5403682", "0.54021674", "0.5387099", "0.53623533", "0.535154", "0.53504705", "0.5348124", "0.5321437", "0.53133106", "0.5309466", "0.52934754", "0.5289789", "0.52868956", "0.5283689", "0.52824473", "0.5279015", "0.5269933", "0.5266774", "0.5265508", "0.52627534", "0.5257798", "0.52503204", "0.52497596", "0.52492106", "0.5247469", "0.52381796", "0.5232987", "0.5223561", "0.5219833", "0.5218932", "0.5215341", "0.52086926", "0.52010113", "0.5196099", "0.5194998", "0.51930636", "0.5188553", "0.5187845", "0.5186915", "0.51774526", "0.5169282", "0.5162926", "0.51601344", "0.51556003", "0.5155184", "0.5154364" ]
0.67047447
0
Suite of the whole set of tests.
public static Test suite() { TestSuite suite = new TestSuite("All hypertree Tests"); suite.addTest(TestHTModel.suite()); suite.addTest(TestHTCoord.suite()); return suite; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AllTests() {\n\t\taddTest(new TestSuite(TestSuiteTest.class));\n\t}", "public static Test suite() {\n\t\treturn new AllTests();\n\t}", "public static Test suite() {\n final TestSuite suite = new TestSuite();\n\n\n suite.addTestSuite(EntityNotFoundExceptionTest.class);\n suite.addTestSuite(DAOExceptionTest.class);\n suite.addTestSuite(DAOConfigurationExceptionTest.class);\n\n suite.addTestSuite(CompanyDAOBeanTest.class);\n suite.addTestSuite(ClientStatusDAOBeanTest.class);\n suite.addTestSuite(ProjectDAOBeanTest.class);\n suite.addTestSuite(ClientDAOBeanTest.class);\n suite.addTestSuite(ProjectStatusDAOBeanTest.class);\n suite.addTestSuite(HelperTest.class);\n\n suite.addTestSuite(ProjectStatusTest.class);\n suite.addTestSuite(CompanyTest.class);\n suite.addTestSuite(ClientStatusTest.class);\n suite.addTestSuite(ProjectTest.class);\n suite.addTestSuite(AuditableEntityTest.class);\n suite.addTestSuite(ClientTest.class);\n suite.addTestSuite(GenericEJB3DAOTest.class);\n suite.addTestSuite(SearchByFilterUtilityImplTest.class);\n return suite;\n }", "public static TestSuite suite()\n\t{\n\t\tTestSuite suite = new TestSuite();\n\n\t\t//\n\t\t// Add one line per class in our test cases. These should be in order of\n\t\t// complexity.\n\n\t\t// ANTTest should be first as it ensures that test parameters are\n\t\t// being sent to the suite.\n\t\t//\n\t\tsuite.addTestSuite(ANTTest.class);\n\n\t\t// Basic Driver internals\n\t\tsuite.addTestSuite(DriverTest.class);\n\t\tsuite.addTestSuite(ConnectionTest.class);\n\t\tsuite.addTestSuite(DatabaseMetaDataTest.class);\n\t\tsuite.addTestSuite(DatabaseMetaDataPropertiesTest.class);\n\t\tsuite.addTestSuite(EncodingTest.class);\n\n\t\t// Connectivity/Protocols\n\n\t\t// ResultSet\n\t\tsuite.addTestSuite(ResultSetTest.class);\n\n\t\t// Time, Date, Timestamp\n\t\tsuite.addTestSuite(DateTest.class);\n\t\tsuite.addTestSuite(TimeTest.class);\n\t\tsuite.addTestSuite(TimestampTest.class);\n\n\t\t// PreparedStatement\n\t\tsuite.addTestSuite(PreparedStatementTest.class);\n\n\t\t// ServerSide Prepared Statements\n\t\tsuite.addTestSuite(ServerPreparedStmtTest.class);\n\n\t\t// BatchExecute\n\t\tsuite.addTestSuite(BatchExecuteTest.class);\n\n\n\t\t// Other misc tests, based on previous problems users have had or specific\n\t\t// features some applications require.\n\t\tsuite.addTestSuite(JBuilderTest.class);\n\t\tsuite.addTestSuite(MiscTest.class);\n\t\tsuite.addTestSuite(NotifyTest.class);\n\n\t\t// Fastpath/LargeObject\n\t\tsuite.addTestSuite(BlobTest.class);\n\t\tsuite.addTestSuite(OID74Test.class);\n\n\t\tsuite.addTestSuite(UpdateableResultTest.class );\n\n\t\tsuite.addTestSuite(CallableStmtTest.class );\n\t\tsuite.addTestSuite(CursorFetchTest.class);\n\t\tsuite.addTestSuite(ServerCursorTest.class);\n\n\t\t// That's all folks\n\t\treturn suite;\n\t}", "public static Test suite() {\n final TestSuite suite = new TestSuite();\n suite.addTest(ActorUtilTest.suite());\n suite.addTest(AddActionTest.suite());\n suite.addTest(AddActorActionTest.suite());\n suite.addTest(AddExtendActionTest.suite());\n suite.addTest(AddIncludeActionTest.suite());\n suite.addTest(AddSubsystemActionTest.suite());\n suite.addTest(AddUseCaseActionTest.suite());\n suite.addTest(CopyActionTest.suite());\n suite.addTest(CopyActorActionTest.suite());\n suite.addTest(CopyExtendActionTest.suite());\n suite.addTest(CopyIncludeActionTest.suite());\n suite.addTest(CopySubsystemActionTest.suite());\n suite.addTest(CopyUseCaseActionTest.suite());\n suite.addTest(CutActionTest.suite());\n suite.addTest(CutActorActionTest.suite());\n suite.addTest(CutExtendActionTest.suite());\n suite.addTest(CutIncludeActionTest.suite());\n suite.addTest(CutSubsystemActionTest.suite());\n suite.addTest(CutUseCaseActionTest.suite());\n suite.addTest(ExtendUtilTest.suite());\n suite.addTest(IncludeUtilTest.suite());\n suite.addTest(InvalidDataContentExceptionTest.suite());\n suite.addTest(ModelTransferTest.suite());\n suite.addTest(PasteActionTest.suite());\n suite.addTest(PasteActorActionTest.suite());\n suite.addTest(PasteExtendActionTest.suite());\n suite.addTest(PasteIncludeActionTest.suite());\n suite.addTest(PasteSubsystemActionTest.suite());\n suite.addTest(PasteUseCaseActionTest.suite());\n suite.addTest(RemoveActionTest.suite());\n suite.addTest(RemoveActorActionTest.suite());\n suite.addTest(RemoveExtendActionTest.suite());\n suite.addTest(RemoveIncludeActionTest.suite());\n suite.addTest(RemoveSubsystemActionTest.suite());\n suite.addTest(RemoveUseCaseActionTest.suite());\n suite.addTest(SubsystemUtilTest.suite());\n suite.addTest(UsecaseToolUtilTest.suite());\n suite.addTest(UsecaseUndoableActionTest.suite());\n suite.addTest(UseCaseUtilTest.suite());\n\n suite.addTest(Demo.suite());\n\n return suite;\n }", "public static Test suite() {\r\n final TestSuite suite = new TestSuite();\r\n\r\n suite.addTest(DatabaseReviewAuctionPersistenceAccuracyTests.suite());\r\n suite.addTest(DatabaseReviewApplicationPersistenceAccuracyTests.suite());\r\n\r\n suite.addTest(ReviewApplicationManagerImplAccuracyTests.suite());\r\n suite.addTest(ReviewAuctionManagerImplAccuracyTests.suite());\r\n\r\n suite.addTest(ReviewApplicationFilterBuilderAccuracyTests.suite());\r\n\r\n return suite;\r\n }", "public static Test suite()\r\n {\r\n return suite(com.redknee.app.crm.TestPackage.createDefaultContext());\r\n }", "public static Test suite() {\n\t\tTestSuite suite = new TestSuite(\"Test for Server\");\n\t\tsuite.addTestSuite(DatabaseTest.class);\n suite.addTest(SuiteTestMenu.suite());\n\t\tsuite.addTestSuite(ServerGameTest.class);\n\t\tsuite.addTestSuite(ManagedGameTest.class);\n\t\tsuite.addTestSuite(UserManagerTest.class);\n\t\tsuite.addTestSuite(SessionManagerTest.class);\n\t\treturn suite;\n\t}", "public static Test suite() {\n \n TestSuite suite = new TestSuite(\"ImplementationSuite\");\n suite.addTest(org.mmbase.storage.search.implementation.BasicAggregatedFieldTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicCompareFieldsConstraintTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicCompositeConstraintTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicConstraintTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicFieldCompareConstraintTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicFieldConstraintTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicFieldNullConstraintTest.suite());\n// yet to be implemented:\n// suite.addTest(org.mmbase.storage.search.implementation.BasicFieldValueBetweenConstraintTest.suite()); \n suite.addTest(org.mmbase.storage.search.implementation.BasicFieldValueConstraintTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicFieldValueInConstraintTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicLegacyConstraintTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicRelationStepTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicSearchQueryTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicSortOrderTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicStepTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicStepFieldTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.BasicStringSearchConstraintTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.database.DatabaseSuite.suite());\n suite.addTest(org.mmbase.storage.search.implementation.ModifiableQueryTest.suite());\n suite.addTest(org.mmbase.storage.search.implementation.NodeSearchQueryTest.suite());\n //:JUNIT--\n //This value MUST ALWAYS be returned from this function.\n return suite;\n }", "public static Test suite() {\n \t\treturn new TestSuite(ModelObjectReaderWriterTest.class);\n \t}", "public static Test suite() {\n\treturn TestAll.makeTestSuite(CompilerInterface.NONE);\n }", "public static Test suite() {\n\t\t// the type safe way is in SimpleTest\n\t\t// the dynamic way :\n\t\treturn new TestSuite(DSetOfActivitiesInSitesTest.class);\n\t}", "public static Test suite() {\r\n return new TestSuite(FileSystemPersistenceTestCase.class);\r\n }", "public static Test suite()\n {\n TestSuite ts = new TestSuite(\"TestAPI\") ;\n\t\t\t\n // This test should run first, in order to enable the optimizer for subsequent tests\n\t\tts.addTest(new TestAPI(\"testOptimizerDisable\")) ;\n\t\tts.addTest(new TestAPI(\"testOptimizerEnable\")) ;\n\t\tts.addTest(new TestAPI(\"testExplain\")) ;\n\t\tts.addTest(new TestAPI(\"testIndex\")) ;\n\t\tts.addTest(new TestAPI(\"testProbability1\")) ;\n\t\tts.addTest(new TestAPI(\"testProbability2\")) ;\n\t\t\n // Wrapper for the test suite including the test cases which executes the setup only once\n\t\tTestSetup wrapper = new TestSetup(ts) \n\t\t{\n\t\t\tprotected void setUp() \n\t\t\t{\n\t\t\t\toneTimeSetUp();\n\t\t\t}\n\n\t\t\tprotected void tearDown() \n\t\t\t{\n\t\t\t\toneTimeTearDown();\n\t\t\t}\n\t\t};\n\t\t\n\t\treturn wrapper ;\n }", "public static Test suite() {\r\n final TestSuite suite = new TestSuite();\r\n\r\n suite.addTest(CategoryConfigurationUnitTest.suite());\r\n suite.addTest(CategoryTypeUnitTest.suite());\r\n suite.addTest(EntityTypeUnitTest.suite());\r\n suite.addTest(ForumEntityNotFoundExceptionUnitTest.suite());\r\n suite.addTest(JiveForumManagementExceptionUnitTest.suite());\r\n suite.addTest(JiveForumManagerUnitTest.suite());\r\n suite.addTest(UserNotFoundExceptionUnitTest.suite());\r\n suite.addTest(UserRoleUnitTest.suite());\r\n\r\n suite.addTest(HelperUnitTest.suite());\r\n suite.addTest(TCAuthTokenUnitTest.suite());\r\n\r\n suite.addTest(ServiceConfigurationExceptionUnitTest.suite());\r\n\r\n suite.addTest(JiveForumServiceBeanUnitTest.suite());\r\n\r\n suite.addTest(MockJiveForumServiceTest.suite());\r\n return suite;\r\n }", "public static Test suite() {\r\n return new TestSuite(JPADigitalRunTrackStatusDAOTest.class);\r\n }", "public static void runTests() {\n\t\tResult result = JUnitCore.runClasses(TestCalculator.class);\n\n\t}", "public static Test suite() {\n return new TestSuite(GeneralizationImplAccuracyTest.class);\n }", "static public TestSuite suite() {\r\n return new TestIndividual( \"TestIndividual\" );\r\n }", "public static Test suite() {\n return new TestSuite(LNumberComparatorTest.class);\n }", "public static Test suite() {\n return new TestSuite(DefaultDetailWindowTest.class);\n }", "public static Test suite()\r\n {\r\n return new TestSuite(UserTest.class);\r\n\t}", "public static Test suite() {\r\n\t\treturn new JUnit4TestAdapter(AllTests.class);\r\n\t}", "public static Test suite() {\n final TestSuite suite = new TestSuite();\n\n suite.addTest(HelperTest.suite());\n suite.addTest(Demo.suite());\n suite.addTest(HelperTest.suite());\n suite.addTest(InstanceTest.suite());\n suite.addTest(InstanceAbstractImplTest.suite());\n suite.addTest(ObjectTest.suite());\n suite.addTest(ObjectImplTest.suite());\n suite.addTest(StimulusTest.suite());\n suite.addTest(StimulusImplTest.suite());\n suite.addTest(LinkTest.suite());\n suite.addTest(LinkEndTest.suite());\n suite.addTest(LinkEndImplTest.suite());\n suite.addTest(LinkImplTest.suite());\n suite.addTest(ProcedureTest.suite());\n suite.addTest(ProcedureImplTest.suite());\n\n return suite;\n }", "public static void runAllTheTests() {\n\t\ttestConstructorAndGetters();\n\t}", "public static void runAllTheTests() {\n\t\ttestConstructorAndGetters();\n\t}", "public static Test suite() {\r\n return new TestSuite(UserClientPKUnitTests.class);\r\n }", "public static Test suite() {\n final TestSuite suite = new TestSuite();\n suite.addTest(FunctionalTests.suite());\n // functional tests\n suite.addTest(GUITests.suite());\n\n TestSetup wrapper = new TestSetup(suite) {\n protected void setUp() {\n Runnable r = new Runnable() {\n public void run() {\n com.topcoder.umltool.deploy.UMLToolDeploy.main(new String[0]);\n }\n };\n\n try {\n SwingUtilities.invokeAndWait(r);\n } catch (Exception e) {\n }\n }\n\n protected void tearDown() throws Exception {\n File generateCode = new File(TestHelper.getCodeGenBase() + \"/c\");\n if (generateCode.exists()) {\n //deleteFolder(generateCode);\n }\n generateCode = new File(TestHelper.getCodeGenBase() + \"/java\");\n if (generateCode.exists()) {\n //deleteFolder(generateCode);\n }\n }\n\n private void deleteFolder(File dir) {\n File filelist[] = dir.listFiles();\n int listlen = filelist.length;\n for (int i = 0; i < listlen; i++) {\n if (filelist[i].isDirectory()) {\n deleteFolder(filelist[i]);\n } else {\n filelist[i].delete();\n }\n }\n dir.delete();\n }\n };\n\n return wrapper;\n }", "public static Test suite() {\r\n return new TestSuite(AccuracyTestReportCategory.class);\r\n }", "public static Test suite() {\n TestSuite suite = new TestSuite(BinaryOperationTest.class);\n\n return suite;\n }", "public static Test suite() {\n\t\treturn new TestSuite(ClientTransactionTest.class);\n\t}", "public static Test suite() {\n return new TestSuite(TestLearningAPI.class);\n }", "public static Test suite() {\n return new TestSuite(Sun13AnalyzerAccuracyTests.class);\n }", "public static Test suite() {\n final TestSuite suite = new TestSuite();\n suite.addTest(ConfigurationExceptionAccuracyTest.suite());\n suite.addTest(DefaultManagersProviderAccuracyTest.suite());\n suite.addTest(DefaultUploadExternalServicesAccuracyTest.suite());\n suite.addTest(DefaultUploadServicesAccuracyTest.suite());\n suite.addTest(InvalidProjectExceptionAccuracyTest.suite());\n suite.addTest(InvalidProjectPhaseExceptionAccuracyTest.suite());\n suite.addTest(InvalidSubmissionExceptionAccuracyTest.suite());\n suite.addTest(InvalidSubmissionStatusExceptionAccuracyTest.suite());\n suite.addTest(InvalidUserExceptionAccuracyTest.suite());\n suite.addTest(PersistenceExceptionAccuracyTest.suite());\n suite.addTest(UploadServicesExceptionAccuracyTest.suite());\n return suite;\n }", "void runTestSuites() throws InterruptedException {\n // all test suites are located under this directory\n String testSuiteDirectory = config.getTestSuiteDirectoryPathString();\n if (!testSuiteDirectory.endsWith(Constants.FILE_SEPARATOR)) {\n testSuiteDirectory += Constants.FILE_SEPARATOR;\n }\n\n String programNames = options.getValueFor(Constants.PROGRAMS_OPTION);\n String[] programNamesSeparated = programNames.split(Constants.COLON);\n\n // Find test subdirectories that match program names\n List<String> matchingDirectories;\n for (String programName : programNamesSeparated) {\n Path path = Paths.get(programName);\n String fname = path.getFileName().toString();\n programName = fname;\n DirectoryNameMatcher directoryFinder = new DirectoryNameMatcher(programName);\n try {\n Files.walkFileTree(Paths.get(testSuiteDirectory), directoryFinder);\n matchingDirectories = directoryFinder.getMatchingDirectories();\n if (matchingDirectories.isEmpty()) {\n Log.warn(messages.get(\"WRN001\", programName, testSuiteDirectory));\n }\n } catch (IOException ioException) {\n throw new PossibleInternalLogicErrorException(\n messages.get(\"ERR019\", programName));\n }\n\n for (String matchingDirectory : matchingDirectories) {\n TestSuiteConcatenator concatenator =\n new TestSuiteConcatenator(config, options);\n testSuite = concatenator.concatenateTestSuites(matchingDirectory);\n\n // Create READER for the Cobol source program to be tested\n StringBuilder cobolSourceInPath = new StringBuilder();\n cobolSourceInPath.append(System.getProperty(\"user.dir\"));\n cobolSourceInPath.append(Constants.FILE_SEPARATOR);\n cobolSourceInPath.append(config.getApplicationSourceDirectoryPathString());\n if (!cobolSourceInPath.toString().endsWith(Constants.FILE_SEPARATOR)) {\n cobolSourceInPath.append(Constants.FILE_SEPARATOR);\n }\n cobolSourceInPath.append(programName);\n\n List<String> applicationFilenameSuffixes = config.getApplicationFilenameSuffixes();\n for (String suffix : applicationFilenameSuffixes) {\n Log.debug(\"Driver looking for source file <\" + cobolSourceInPath.toString() + suffix + \">\");\n if (Files.isRegularFile(Paths.get(cobolSourceInPath.toString() + suffix))) {\n cobolSourceInPath.append(suffix);\n Log.debug(\"Driver recognized this file as a regular file: <\" + cobolSourceInPath.toString() + \">\");\n break;\n }\n }\n String cobolSourceInPathString = adjustPathString(cobolSourceInPath.toString());\n\n try {\n cobolSourceIn = new FileReader(cobolSourceInPathString);\n } catch (IOException cobolSourceInException) {\n throw new PossibleInternalLogicErrorException(\n messages.get(\"ERR018\", programName));\n }\n\n // Create WRITER for the test source program (copy of program to be tested plus test code)\n StringBuilder testSourceOutPath = new StringBuilder();\n testSourceOutPath.append(new File(Constants.EMPTY_STRING).getAbsolutePath());\n testSourceOutPath.append(Constants.FILE_SEPARATOR);\n testSourceOutPath.append(\n config.getString(Constants.TEST_PROGRAM_NAME_CONFIG_KEY,\n Constants.DEFAULT_TEST_PROGRAM_NAME));\n\n Log.debug(\"Driver.runTestSuites() testSourceOutPath: <\" + testSourceOutPath.toString() + \">\");\n\n try {\n testSourceOut = new FileWriter(testSourceOutPath.toString());\n } catch (IOException testSourceOutException) {\n throw new PossibleInternalLogicErrorException(\n messages.get(\"ERR016\", programName));\n }\n\n mergeTestSuitesIntoTheTestProgram();\n try {\n testSourceOut.close();\n } catch (IOException closeTestSourceOutException) {\n throw new PossibleInternalLogicErrorException(\n messages.get(\"ERR017\", programName));\n }\n\n // Compile and run the test program\n String processConfigKeyPrefix;\n ProcessLauncher launcher = null;\n switch (PlatformLookup.get()) {\n case LINUX :\n Log.debug(\"Driver launching Linux process\");\n processConfigKeyPrefix = \"linux\";\n launcher = new LinuxProcessLauncher(config);\n break;\n case WINDOWS :\n Log.debug(\"Driver launching Windows process\");\n processConfigKeyPrefix = \"windows\";\n launcher = new WindowsProcessLauncher(config);\n break;\n case OSX :\n Log.debug(\"Driver launching OS X process\");\n processConfigKeyPrefix = \"osx\";\n //launcher = new OSXProcessLauncher(config);\n break;\n case ZOS :\n Log.debug(\"Driver launching z/OS process\");\n processConfigKeyPrefix = \"zos\";\n //launcher = new ZOSProcessLauncher(config);\n break;\n default :\n Log.debug(\"Driver launching default process\");\n processConfigKeyPrefix = \"unix\";\n launcher = new LinuxProcessLauncher(config);\n break;\n }\n String processConfigKey = processConfigKeyPrefix + Constants.PROCESS_CONFIG_KEY;\n String processName = config.getString(processConfigKey);\n if (isBlank(processName)) {\n String errorMessage = messages.get(\"ERR021\", processConfigKey);\n Log.error(errorMessage);\n throw new PossibleInternalLogicErrorException(errorMessage);\n }\n if (launcher != null){\n Process process = launcher.run(testSourceOutPath.toString());\n int exitCode = 1;\n// try {\n exitCode = process.waitFor();\n// } catch (InterruptedException interruptedException) {\n// exitCode = 1;\n// }\n Log.info(messages.get(\"INF009\", processName, String.valueOf(exitCode)));\n }\n }\n }\n }", "private Test createSuite()\n {\n //Let's discover what tests have been scheduled for execution.\n // (we expect a list of fully qualified test class names)\n String tests = System.getProperty(TEST_LIST_PROPERTY_NAME);\n if (tests == null || tests.trim().length() == 0)\n {\n tests = \"\";\n }\n logger.debug(\"specfied test list is: \" + tests);\n\n StringTokenizer st = new StringTokenizer(tests);\n String[] ids = new String[st.countTokens()];\n int n = 0;\n while (st.hasMoreTokens())\n {\n ids[n++] = st.nextToken().trim();\n }\n\n TestSuite suite = new TestSuite();\n for (int i=0; i<n; i++)\n {\n String testName = ids[i];\n if (testName != null && testName.trim().length() > 0)\n {\n try\n {\n Class<?> testClass = Class.forName(testName);\n if ((bc == null)\n && BundleActivator.class.isAssignableFrom(testClass))\n {\n logger.error(\"test \" + testName\n + \" skipped - it must run under felix\");\n }\n else\n {\n suite.addTest(new TestSuite(testClass));\n }\n }\n catch (ClassNotFoundException e)\n {\n logger.error(\"Failed to load standalone test \" + testName);\n }\n }\n }\n return suite;\n }", "public static Test suite() {\n\n TestSuite suite = new TestSuite(FileChangeSetTest.class);\n return suite;\n }", "public static Test suite() {\r\n return new TestSuite(DistributionScriptParserImplTest.class);\r\n }", "public static TestSuite suite()\n {\n TestSuite result = new TestSuite();\n\n for (int i = 0; i < TESTS.length; i++) {\n result.addTest(new NumericConversionTest(TESTS[i][0],\n (Class) TESTS[i][1],\n TESTS[i][2],\n (TESTS[i].length > 3) ? ((Integer) TESTS[i][3]).intValue() : -1));\n }\n return result;\n }", "public static Test suite() {\r\n return new TestSuite(DefaultReviewApplicationProcessorAccuracyTest.class);\r\n }", "public static Test suite()\n {\n return new TestSuite(BugFixesTest.class);\n }", "public static Test suite() {\n return new TestSuite(ProjectManagerImplTest.class);\n }", "public static Test suite() {\r\n return new TestSuite(InputStreamBytesIteratorTestCase.class);\r\n }", "public static junit.framework.Test suite() {\n return new JUnit4TestAdapter(ClientsPrepopulatingBaseActionTest.class);\n }", "public static Test suite()\n {\n TestSuite suite = new TestSuite();\n suite.addTest(new PSJdbcTableSchemaTest(\"testDef\"));\n return suite;\n }", "public static Test suite() {\n return createModuleTest(WizardsTest.class);\n }", "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 }", "public static Test suite() {\n return new TestSuite(PersistenceExceptionTest.class);\n }", "public static Test suite() {\n return new TestSuite(RenameConverterUnitTest.class);\n }", "public static junit.framework.Test suite() throws Exception {\n\n junit.framework.TestSuite suite =\n new junit.framework.TestSuite(AllSystemTestsConfigQ.class\n .getName());\n\n suite.addTest(org.fcrepo.test.AllCommonSystemTests.suite());\n suite.addTest(org.fcrepo.test.api.TestAPIAConfigA.suite());\n suite.addTest(org.fcrepo.test.api.TestAPIALiteConfigA.suite());\n suite.addTest(org.fcrepo.test.api.TestHTTPStatusCodesConfigQ.suite());\n suite.addTest(org.fcrepo.test.api.TestManyDisseminations.suite());\n\n return suite;\n }", "public static Test suite() {\n return new TestSuite(DefineVariableCommandTest.class);\n }", "@Test public void runCommonTests() {\n\t\trunAllTests();\n\t}", "public static Test suite() {\n return new TestSuite(RectangleAnchorTest.class);\n }", "public static Test suite() {\n return new TestSuite(UserConstantsTest.class);\n }", "public static void main( String args[] ) {\n\n for ( int j = 0; j < TEST_COUNT; ++j ) {\n testSuite[j].execute();\n }\n }", "public EMFTestSuite() {\n\t\taddTest(new TestSuite(EMFTestCase.class));\n\t}", "public static Test suite() {\n TestSuite suite = new TestSuite();\n suite.addTest(new UDDIOperationInputTest(\"testGetterAndSetter\"));\n\n return suite;\n }", "public static void main(String args[])\n {\n junit.textui.TestRunner.run(suite());\n }", "public static Test suite() {\n\n // Edit the name of the class in the parens to match the name\n // of this class.\n return new TestSuite(TestRevealEvaluator.class);\n }", "public static Test suite() {\n\t\tEPPCodecTst.initEnvironment();\n\n\t\tTestSuite suite = new TestSuite(EPPFeeTst.class);\n\n\t\t// iterations Property\n\t\tString numIterProp = System.getProperty(\"iterations\");\n\n\t\tif (numIterProp != null) {\n\t\t\tnumIterations = Integer.parseInt(numIterProp);\n\t\t}\n\n\t\t// Add the EPPNSProductExtFactory to the EPPCodec.\n\t\ttry {\n\t\t\tEPPFactory.getInstance().addMapFactory(\n\t\t\t\t\t\"com.verisign.epp.codec.host.EPPHostMapFactory\");\n\t\t\tEPPFactory.getInstance().addMapFactory(\n\t\t\t\t\t\"com.verisign.epp.codec.domain.EPPDomainMapFactory\");\n\t\t\tEPPFactory.getInstance().addExtFactory(\n\t\t\t\t\t\"com.verisign.epp.codec.fee.v08.EPPFeeExtFactory\");\n\t\t}\n\t\tcatch (EPPCodecException e) {\n\t\t\tAssert.fail(\"EPPCodecException adding factories to EPPCodec: \" + e);\n\t\t}\n\n\t\treturn suite;\n\t}", "public static junit.framework.Test suite() {\r\n\t\treturn new JUnit4TestAdapter(SimpleTest.class);\r\n\t}", "public static junit.framework.Test suite() {\n return new junit.framework.JUnit4TestAdapter(TestBetamon.class);\n }", "public static Test suite()\n {\n return new TestSuite(PicTest.class);\n }", "@BeforeClass // runs before all test cases; runs only once\n public static void setUpSuite() {\n\n }", "public static Test suite() {\r\n return new TestSuite(UploadRequestValidatorTestCase.class);\r\n }", "public abstract void initializeTestSuite();", "public static Test suite() {\n\t\tTestSuite suite = new TestSuite();\n\n\t\texecuteScript(false, \"testdata/monitor-data.sql\");\n\n\t\t// run all tests\n\t\t// suite = new TestSuite(TestLogMessageService.class);\n\n\t\t// or a subset thereoff\n\t\tsuite.addTest(new TestLogMessageService(\"testGetLogMessages\"));\n\t\tsuite.addTest(new TestLogMessageService(\n\t\t\t\t\"testGetLogMessagesByApplicationType\"));\n\t\tsuite.addTest(new TestLogMessageService(\n\t\t\t\t\"testGetLogMessagesByDeviceIdentification\"));\n\t\tsuite.addTest(new TestLogMessageService(\n\t\t\t\t\"testGetLogMessagesByDeviceIdentifications\"));\n\t\tsuite\n\t\t\t\t.addTest(new TestLogMessageService(\n\t\t\t\t\t\t\"testGetLogMessagesByDeviceId\"));\n\t\tsuite\n\t\t\t\t.addTest(new TestLogMessageService(\n\t\t\t\t\t\t\"testGetLogMessagesByDeviceIds\"));\n\t\tsuite\n\t\t\t\t.addTest(new TestLogMessageService(\n\t\t\t\t\t\t\"testGetLogMessagesByHostName\"));\n\t\tsuite\n\t\t\t\t.addTest(new TestLogMessageService(\n\t\t\t\t\t\t\"testGetLogMessagesByHostNames\"));\n\t\tsuite.addTest(new TestLogMessageService(\"testGetLogMessagesByHostId\"));\n\t\tsuite.addTest(new TestLogMessageService(\"testGetLogMessagesByHostIds\"));\n\t\tsuite.addTest(new TestLogMessageService(\"testGetLogMessagesByService\"));\n\t\tsuite.addTest(new TestLogMessageService(\n\t\t\t\t\"testGetLogMessagesByServiceStatusId\"));\n\t\tsuite.addTest(new TestLogMessageService(\n\t\t\t\t\"testGetLogMessagesByHostGroupName\"));\n\t\t/*suite\n\t\t\t\t.addTest(new TestLogMessageService(\n\t\t\t\t\t\t\"testUnlinkLogMessagesFromHost\"));*/\n\t\tsuite.addTest(new TestLogMessageService(\"testHostStateTransitions\"));\n\t\t/*suite\n\t\t\t\t.addTest(new TestLogMessageService(\n\t\t\t\t\t\t\"testGetLogMessagesByCriteria\"));*/\n\t\t// suite.addTest(new\n\t\t// TestLogMessageService(\"testGetLogMessagesByHostGroupNames\"));\n\t\t// suite.addTest(new\n\t\t// TestLogMessageService(\"testGetLogMessagesByHostGroupId\"));\n\t\t// suite.addTest(new\n\t\t// TestLogMessageService(\"testGetLogMessagesByHostGroupIds\"));\n\t\t// suite.addTest(new TestLogMessageService(\"testGetLogMessageById\"));\n\t\t// suite.addTest(new\n\t\t// TestLogMessageService(\"testUnlinkLogMessagesFromService\"));\n\t\t// suite.addTest(new\n\t\t// TestLogMessageService(\"testDeleteLogMessagesForDevice\"));\n\t\t// suite.addTest(new\n\t\t// TestLogMessageService(\"testGetLogMessageForConsolidationCriteria\"));\n\t\t// suite.addTest(new TestLogMessageService(\"testSetIsStateChanged\"));\n\n suite.addTest(new TestLogMessageService(\"testSetDynamicProperty\"));\n\n\t\treturn suite;\n\t}", "public static junit.framework.Test suite() {\r\n return new JUnit4TestAdapter(HelperUnitTests.class);\r\n }", "public synchronized void executeSuite( TestSuite suite ) {\n PrivilegeManager.enablePrivilege( \"UniversalFileAccess\" );\n PrivilegeManager.enablePrivilege( \"UniversalFileRead\" ); \n PrivilegeManager.enablePrivilege( \"UniversalFileWrite\" ); \n PrivilegeManager.enablePrivilege( \"UniversalPropertyRead\" );\n \n LiveNavEnv context;\n TestFile file;\n\n for ( int i = 0; i < suite.size(); i++ ) {\n synchronized ( suite ) {\n file = (TestFile) suite.elementAt( i );\n context = new LiveNavEnv( file, suite, this );\n context.runTest();\n\n writeFileResult( file, suite, OUTPUT_DIRECTORY );\n writeCaseResults(file, suite, OUTPUT_DIRECTORY );\n context.close();\n context = null;\n\n if ( ! file.passed ) {\n suite.passed = false;\n }\n }\n }\n writeSuiteResult( suite, OUTPUT_DIRECTORY );\n writeSuiteSummary( suite, OUTPUT_DIRECTORY );\n }", "public static Test suite() {\n return new TestSuite(InvoiceSessionBeanTest.class);\n }", "public static Test suite() {\r\n return new TestSuite(ContestManagerBeanFailureTest.class);\r\n }", "public static Test suite() {\n return new TestSuite(ApplicationsManagerExceptionUnitTests.class);\n }", "public static Test suite() {\n \t\treturn new TestSuite(ProjectPreferencesTest.class);\n \t\t//\t\tTestSuite suite = new TestSuite();\n \t\t//\t\tsuite.addTest(new ProjectPreferencesTest(\"testLoadIsImport\"));\n \t\t//\t\treturn suite;\n \t}", "public void junitSuiteStarted(int numTests) { }", "public void junitSuiteStarted(int numTests) { }", "private Test emptyTest() {\n return new TestSuite();\n }", "public static junit.framework.Test suite() {\r\n return new JUnit4TestAdapter(ProjectTermsOfUseDaoImplStressTests.class);\r\n }", "public static void testIt () {\r\n\t\tjunit.textui.TestRunner.run (suite());\r\n\t}", "public static junit.framework.Test suite() {\n\t return new junit.framework.JUnit4TestAdapter(PfcTest.class);\n }", "public static junit.framework.Test suite() {\n return new JUnit4TestAdapter(HelperUtiliyTest.class);\n }", "public static void runAllTests() {\n\t\trunClientCode(SimpleRESTClientUtils.getCToFServiceURL());\n\t\trunClientCode(SimpleRESTClientUtils.getCToFServiceURL(new String [] {\"100\"}));\n\t}", "public static junit.framework.Test suite() {\n return new JUnit4TestAdapter(UserUnitTests.class);\n }", "public static junit.framework.Test suite() {\n TestSuite suite = new NbTestSuite();\n if (Utilities.isUnix()) return suite;\n String zipFile = \"C:\\\\Program Files\\\\Microsoft Visual Studio\\\\vss.zip\";\n if (!new File(zipFile).exists()) return suite; // This test suite can't run where zip with empty VSS repository is not prepared.\n suite.addTest(new RegularDevelopment(\"testCheckoutFile\"));\n suite.addTest(new RegularDevelopment(\"testModifyFile\"));\n suite.addTest(new RegularDevelopment(\"testViewDifferences\"));\n suite.addTest(new RegularDevelopment(\"testCheckinFile\"));\n suite.addTest(new RegularDevelopment(\"testViewHistory\"));\n suite.addTest(new RegularDevelopment(\"testGetMissingFile\"));\n suite.addTest(new RegularDevelopment(\"testUnlockFile\"));\n return suite;\n }", "public static Test suite() {\n TestSuite suite = new TestSuite();\n Properties props = new Properties();\n int count = 1;\n String path;\n URL url;\n \n try {\n props.load(TestPluginTokenizer.class.getResourceAsStream(CONFIG_FILE));\n } catch (Exception ex) {\n throw new ExtRuntimeException(ex);\n }\n \n while ((path = props.getProperty(PROP_PATH + count)) != null) {\n if ((url = TestPluginTokenizer.class.getResource(path)) != null) {\n path = url.getFile();\n }\n suite.addTest(new TestPluginTokenizer(\"testContentsParsing\", path));\n suite.addTest(new TestPluginTokenizer(\"testContentsFormatting\", path));\n count++;\n }\n return suite;\n }", "public static Test suite() {\n return new TestSuite(LocaleConvertUtilsTestCase.class);\n }", "public static Test suite() {\r\n return suite(ProjectServiceRemoteTests.class);\r\n }", "public static Test suite() {\n\n TestSuite suite = new TestSuite(BuildStatusTest.class);\n return suite;\n }", "@Test\n\tpublic static void runAllTheTests() {\n\t\ttestGetters();\n\t}", "private void doTests()\n {\n doDeleteTest(); // doSelectTest();\n }", "public static junit.framework.Test suite() {\r\n return new JUnit4TestAdapter(ProjectTermsOfUseDaoImplUnitTests.class);\r\n }", "public static Test suite() {\r\n return new TestSuite(TCAuthTokenUnitTest.class);\r\n }", "public static Test suite() {\r\n return new TestSuite(ExceptionTestCase.class);\r\n }", "public static void main(String args[]) {\n junit.textui.TestRunner.run(suite());\n }", "public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }", "@Test(enabled =true, groups={\"fast\",\"window.One\",\"unix.One\",\"release1.one\"})\n\tpublic void testOne(){\n\t\tSystem.out.println(\"In TestOne\");\n\t}", "@Test\n public void test() {\n\n testBookExample();\n // testK5();\n // testK3_3();\n }", "public void ExecuteTests() throws IOException{\r\n\t\t\r\n\t\tAutomationSuiteRunnerImpl testcaseinfo = new AutomationSuiteRunnerImpl();\r\n\t\ttestcaseinfo.GetTestCaseInformation();\r\n\t\tTestsBrowserList = testcaseinfo.getTestsBrowserList();\r\n\t\tTestsClassesList = testcaseinfo.getTestsClassesList();\r\n\t\tClassesMethodList = testcaseinfo.getClassesMethodList();\r\n\t\tTestsParamList = testcaseinfo.getTestsParamList();\r\n\t\tTestNGConfig = testcaseinfo.getTestNGConfig();\r\n\t\tList<XmlSuite> suites = new ArrayList<XmlSuite>();\r\n\t\t\r\n\t\tlogger.info(\"Generating TestNG.xml file\");\r\n\t\t\r\n\t\t/**\r\n\t\t * The below code creates testNG xmlSuite and sets the configuration\r\n\t\t */\r\n\t\tXmlSuite suite = new XmlSuite();\r\n\t\tsuite.setName(TestNGConfig.get(\"AutomationSuiteName\"));\r\n\t\t\r\n\t\tif(TestNGConfig.get(\"ParallelMode\").toString().equalsIgnoreCase(\"True\")) {\r\n\t\t\tsuite.setParallel(XmlSuite.ParallelMode.TESTS);\r\n\t\t\tsuite.setThreadCount(Integer.parseInt(TestNGConfig.get(\"ThreadCount\")));\r\n\t\t}\r\n\t\telse {\r\n\r\n\t\t\tsuite.setParallel(XmlSuite.ParallelMode.NONE);\r\n\t\t}\r\n\t\t\r\n\t\tsuite.setVerbose(Integer.parseInt(TestNGConfig.get(\"Verbose\")));\r\n\t\tif(TestNGConfig.get(\"PreserveOrder\").toString().equalsIgnoreCase(\"True\"))\r\n\t\t\tsuite.setPreserveOrder(Boolean.TRUE);\r\n\t\telse \r\n\t\t\tsuite.setPreserveOrder(Boolean.FALSE);\r\n\t\t\r\n\t\t\r\n\t\t//suite.addListener(\"frameworkcore.ReportingClass.ListenersImpl\");\r\n\t\t\r\n\t\t/**\r\n\t\t * The below code assigns the Test classes/mathods/parameters to the TestNG Suite\r\n\t\t */\r\n\t\tfor (String key : TestsBrowserList.keySet()){\r\n\t\t\tArrayList<XmlClass> classes = new ArrayList<XmlClass>();\r\n\t\t\tXmlTest test = new XmlTest(suite);\r\n\t\t\ttest.setName(key.toString());\r\n\t\t\tHashMap<String,String> browserinfo = new HashMap<String,String>();\r\n\t\t\tbrowserinfo.put(\"BrowserName\", TestsBrowserList.get(key).toString());\r\n\t\t\ttest.setParameters(browserinfo);\r\n\t\t\tSetParameters(test);\r\n\t\t\tCollection<String> classvalues = TestsClassesList.get(key);\r\n\t\t\tfor(String testclass : classvalues){\r\n\t\t\t\tXmlClass testClass = new XmlClass();\r\n\t\t testClass.setName(testclass);\r\n\t\t Collection<String> methodvalues = ClassesMethodList.get(testclass);\r\n\t\t ArrayList<XmlInclude> methodsToRun = new ArrayList<XmlInclude>();\r\n\t\t for(String method: methodvalues){\r\n\t\t \tif(method.toLowerCase().contains(\"tag\")||method.toLowerCase().contains(\"ignore\"))\r\n\t\t \t\tlogger.info(\"Method \" + method + \" will not run\" );\r\n\t\t \telse\r\n\t\t \t\tmethodsToRun.add(new XmlInclude(method));\r\n\t\t }\r\n\t\t testClass.setIncludedMethods(methodsToRun);\r\n\t\t \r\n\t\t classes.add(testClass);\r\n\t\t\t}\r\n\t\t\ttest.setXmlClasses(classes);\r\n\t\t}\r\n\t\t\r\n\t\tsuites.add(suite);\r\n\t\t\r\n\t\t/**\r\n\t\t * Writing the TestNG.xml information to a file\r\n\t\t */\r\n\t\t FileWriter writer;\r\n\t\t File TestNGFile = new File(\"TestNG.xml\");\r\n\t\t if(TestNGFile.exists())\t\t\t\t\t\t// Delete TestNG if exists\r\n\t\t\t TestNGFile.delete();\r\n\t\t \r\n\t\t\twriter = new FileWriter(TestNGFile);\r\n\t\t\t writer.write(suite.toXml());\r\n\t\t writer.flush();\r\n\t\t writer.close();\r\n\t\t logger.info(\"TestNG file Generated Successfully\");\r\n\t\t\r\n\t\tTestNG tng = new TestNG();\r\n\t\ttng.setXmlSuites(suites);\r\n\t\ttng.run(); \r\n\t\t\r\n\t}", "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 }", "@Test\n public void groupTest() {\n // TODO: test group\n }", "public static Test suite() {\n return new TestSuite(ConfigurationExceptionTest.class);\n }" ]
[ "0.82971126", "0.78900397", "0.7530529", "0.7496658", "0.74136525", "0.7400592", "0.73991066", "0.7371765", "0.7348839", "0.7332846", "0.7324961", "0.7324736", "0.7314256", "0.72957706", "0.7288881", "0.7273237", "0.72606945", "0.7258696", "0.7249223", "0.7211835", "0.72117716", "0.72096664", "0.71974295", "0.7183783", "0.7163922", "0.7163922", "0.7157247", "0.71390915", "0.7133903", "0.71328294", "0.7128652", "0.7126769", "0.71164876", "0.71126646", "0.70825976", "0.70803916", "0.704042", "0.70373285", "0.7029016", "0.7007092", "0.69651306", "0.6963054", "0.6960117", "0.69536364", "0.69427264", "0.69350123", "0.69215393", "0.6917407", "0.68988293", "0.68975466", "0.689701", "0.6896407", "0.6834384", "0.6830308", "0.6809813", "0.68036", "0.67895967", "0.6788914", "0.67806065", "0.6780163", "0.67799836", "0.67791855", "0.6766647", "0.6756245", "0.6751956", "0.67464876", "0.67400545", "0.6739361", "0.6727611", "0.6726977", "0.6724152", "0.6722566", "0.6717628", "0.6709149", "0.6709149", "0.670871", "0.67042947", "0.6694938", "0.6626411", "0.6625771", "0.6619288", "0.66117597", "0.66067564", "0.65872216", "0.6586252", "0.65739655", "0.6569918", "0.65627164", "0.6557945", "0.6536227", "0.65342414", "0.65333396", "0.65241265", "0.65109193", "0.6493521", "0.64719576", "0.64544225", "0.64535046", "0.64510643", "0.6445594" ]
0.724843
19
Calls performance interpretation and analysis. It launches a wizard that will eventually call the evaluation procedure (external tool).
public void run(IAction action) { if (selection == null || selection.isEmpty()) { return; } boolean saveNoConfirm = BuildAction.isSaveAllSet(); boolean savedOk = PerformanceRFPlugin.getDefault().getWorkbench() .saveAllEditors(!saveNoConfirm); if (!savedOk) { return; } /* check that all the files have the same extension */ String fileExtension = null; for (Iterator it = selection.iterator(); it.hasNext();) { IFile file = (IFile) it.next(); if (fileExtension == null) { fileExtension = file.getFileExtension(); } else if (!file.getFileExtension().equals(fileExtension)) { MessageDialog.openError(null, "Performance Analysis", "All the selected files must be of the same kind in order to perform batch analysis"); return; } } /* default to "no translation needed" if file is already ICM */ ITransformToIcm designToIcmTranslator = null; if (!fileExtension.equals("icm")) { // first check that there's a designToIcm translator for the selected kind of file List<DesignInputExtension> availableDesignInputs = PerformanceRFPlugin.getDefault() .getAvailableDesignInputs(); for (Iterator<DesignInputExtension> it = availableDesignInputs.iterator(); it.hasNext();) { DesignInputExtension designInput = it.next(); if (designInput.getFileExtension().equals(fileExtension)) { designToIcmTranslator = designInput.getTransformToIcmObject(); break; } } if (designToIcmTranslator == null) { String msg = Messages.getString("noDesignToIcmObject");//$NON-NLS-1$ MessageDialog.openError(null, "Performance Analysis", msg); return; } } IWorkbenchWindow wbw = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); // nothing should be written to the console until after the wizard is created. // this is because creating the wizard will create the translation to ICM, which // in the case of CCL, will potentially clear the console if the appropriate // user preference is set. Wizard wizard = (selection.size() > 1) ? new BatchPerfAnalysisWizard(selection, designToIcmTranslator) : new PerfAnalysisWizard((IFile) selection.getFirstElement(), designToIcmTranslator); WizardDialog dialog = new WizardDialog(wbw.getShell(), wizard); dialog.open(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void doTest() {\n\n constructTestPlan();\n calculator.start();\n resultViewer.start();\n\n // Run Test Plan\n getJmeter().configure(testPlanTree);\n ((StandardJMeterEngine)jmeter).run();\n }", "public static void run() {\n testAlgorithmOptimality();\n// BenchmarkGraphSets.testMapLoading();\n //testAgainstReferenceAlgorithm();\n //countTautPaths();\n// other();\n// testLOSScan();\n //testRPSScan();\n }", "public void runAnalysis ()\n\t{\n\t\tif (isBatchFile()) { runBatch(false); return; }\n\n\t\tfinal String modelText = editor.getText();\n\t\tString iterations = toolbar.getIterations();\n\t\tmodel = Model.compile (modelText, frame);\n\t\tif (model == null) return;\n\t\tTask task = model.getTask();\n\t\tfinal int n = (iterations.equals(\"\")) ? task.analysisIterations()\n\t\t\t\t: Integer.valueOf(iterations);\n\t\t(new SwingWorker<Object,Object>() {\n\t\t\tpublic Object doInBackground() {\n\t\t\t\tif (!core.acquireLock(frame)) return null;\n\t\t\t\tstop = false;\n\t\t\t\tupdate();\n\t\t\t\tclearOutput();\n\t\t\t\toutput (\"> (run-analysis \" + n + \")\\n\");\n\t\t\t\tif (model != null && model.getTask() != null) \n\t\t\t\t{\n\t\t\t\t\tTask[] tasks = new Task[n];\n\t\t\t\t\tfor (int i=0 ; !stop && i<n ; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tmodel = Model.compile (modelText, frame);\n\t\t\t\t\t\t//brainPanel.setVisible (false);\n\t\t\t\t\t\tshowTask (model.getTask());\n\t\t\t\t\t\tmodel.setParameter (\":real-time\", \"nil\");\n\t\t\t\t\t\tmodel.run();\n\t\t\t\t\t\tmodel.getTask().finish();\n\t\t\t\t\t\ttasks[i] = model.getTask();\n\t\t\t\t\t}\n\t\t\t\t\tif (!stop && model!=null)\n\t\t\t\t\t\tmodel.getTask().analyze (tasks, true);\n\t\t\t\t\t//model = null;\n\t\t\t\t\thideTask();\n\t\t\t\t}\n\t\t\t\tcore.releaseLock (frame);\n\t\t\t\tupdate();\n\t\t\t\treturn null;\n\t\t\t}\n }).execute();\n\t}", "private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}", "void analysisStarting();", "public static void main(String[] args) {\n\t\tTestingPerformanceCalculator obj= new TestingPerformanceCalculator(\"./data/gitInfoNew.txt\", \"data/Results/FinalResultSidTest1.txt\");\n\t\t//Read Gold set\n\t\tobj.goldStMap=obj.LoadGoldSet();\n\t\t//MiscUtility.showResult(10, obj.goldStMap);\n\t\t//Resd output file/ test result file\n\t\tobj.finalResult=obj.LoadTestingResult();\n\t\t//MiscUtility.showResult(20, obj.finalResult);\n\t\t\n\t\t\n\t\t//Create a ranked list\n\t\t//obj.produceRankedResult(10);\n\t\tArrayList<String> rankedFinalTestingResult=obj.produceRankedResult(10);\n\t\tContentWriter.writeContent(\"./data/testing1RankedResult.txt\", rankedFinalTestingResult);\n\t\t//call another class BLPerformanceCalc to compute\n\t\t\n\t\t\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tExecutor executor = new Executor(this.env);\n\n\t\t\t// control loop\n\t\t\t//String dataFileName = monitorLog.monitor();\n\t\t\t//AnalysisStatus analysisStatus = analyser.analyse(dataFileName, args);\n\t\t\t// AdaptationPlan adaptationPlan =\n\t\t\t// planner.selectPlan(analysisStatus);\n\t\t\t//executor.execute(adaptationPlan);\n\t\t\t//System.out.println(this.getClass()+\" **************** CHANGE **************\"+System.nanoTime());\n\t\t\texecutor.executeFake(this.env);\n\t\t\t//executeFake();\n\t\t}", "public void experimentAndPlotter(){\n\t\tLearningAgentFactory qLearningFactory = new LearningAgentFactory() {\n\n\t\t\tpublic String getAgentName() {\n\t\t\t\treturn \"LR = 1\";\n\t\t\t}\n\n\n\t\t\tpublic LearningAgent generateAgent() {\n\t\t\t\treturn new QLearning(domain, 0.99, hashingFactory, 0., 1.);\n\t\t\t}\n\t\t};\n\n\t\tLearningAgentFactory qLearningFactory2 = new LearningAgentFactory() {\n\n\t\t\tpublic String getAgentName() {\n\t\t\t\treturn \"LR = 0.5\";\n\t\t\t}\n\n\n\t\t\tpublic LearningAgent generateAgent() {\n\t\t\t\treturn new QLearning(domain, 0.99, hashingFactory, 0., 0.5);\n\t\t\t}\n\t\t};\n\n\n\t\tLearningAlgorithmExperimenter exp = new LearningAlgorithmExperimenter(\n\t\t\tenv, 10, 50, qLearningFactory, qLearningFactory2);\n\t\texp.setUpPlottingConfiguration(500, 250, 2, 1000,\n\t\t\t\tTrialMode.MOST_RECENT_AND_AVERAGE,\n\t\t\t\tPerformanceMetric.STEPS_PER_EPISODE,\n\t\t\t\tPerformanceMetric.AVERAGE_EPISODE_REWARD);\n\n\t\texp.startExperiment();\n\t\texp.writeStepAndEpisodeDataToCSV(\"expData\");\n\n\t}", "public static void main(String [] args)\n {\n runCalculations();\n }", "private void handleAnalysis()\n {\n try {\n InstanceInfo instances = scaler.getInstanceInfo(serviceRef);\n if (handleMemoryLoadIssues(instances)) {\n return;\n }\n governor.recordInstances(serviceRef, instances);\n ScalingAction action;\n if (firstRun) {\n LOG.info(\"Performing initial scaling checks for service {}\", serviceRef);\n action = handleFirstRun(instances);\n firstRun = false;\n } else {\n LOG.debug(\"Scaling checks for service {}\", serviceRef);\n action = analyser.analyseWorkload(instances);\n }\n\n action = governor.govern(serviceRef, action);\n\n switch (action.getOperation()) {\n case SCALE_UP:\n scaleUp(instances, action.getAmount());\n break;\n case SCALE_DOWN:\n scaleDown(instances, action.getAmount());\n break;\n case NONE:\n default:\n break;\n }\n } catch (ScalerException e) {\n LOG.warn(\"Failed analysis run for service {}\", serviceRef, e);\n }\n }", "@Override\r\n\tpublic void doWorkFlowAnalysis() {\n\t\t\r\n\t}", "@Override\n\tpublic void execute() {\n\t\tDMNModel model = getDmnRuntime().getModels().get(0); // assuming there is only one model in the KieBase\n\t\t\n\t\t// setting input data\n\t\tDMNContext dmnContext = createDmnContext(\n\t\t\t\tImmutablePair.of(\"customerData\", new CustomerData(\"Silver\", new BigDecimal(15)))\n\t\t);\n\t\t\n\t\t// executing decision logic\n\t\tDMNResult topLevelResult = getDmnRuntime().evaluateAll(model, dmnContext);\n\t\t\n\t\t// retrieving execution results\n\t\tSystem.out.println(\"--- results of evaluating all ---\");\n\t\ttopLevelResult.getDecisionResults().forEach(this::printAsJson);\n\t}", "void analysisPostponed();", "public void runExperiment() {\n\t\tevaluator = new Evaluator(trainingSet);\n\t\tevaluator.evaluateClassifiers(classifiers);\n\t}", "public static void main(final String[] args) {\n \tString enginePath = engines[8];\n\t\tEngineParameter eparams = new EngineParameter(enginePath);\n\n\t\tString url = \"http://files.grouplens.org/datasets/movielens/ml-1m.zip\";\n String folder = \"src/resources/main/data/ml-1m\";\n String modelPath = \"src/resources/main/crossValid/ml-1m/model/\";\n String recPath = \"src/resources/main/crossValid/ml-1m/recommendations/\";\n String dataFile = eparams.getDataSouceParams().getSourceLocation().get(0);\n int nFolds = N_FOLDS;\n \t\t\n System.out.println(\"Preparing splits...\");\n prepareSplits(url, nFolds, dataFile, folder, modelPath);\n \n System.out.println(\"Gathering recomendations...\");\n //recommend(nFolds, modelPath, recPath); // RiVal's original step.\n //orbsRecommend(nFolds, eparams, modelPath); // Based on RiVal' step\n mixedRecommend(nFolds, eparams, modelPath); // Mixed step\n \n //System.out.println(\"Preparing strategy...\");\n // the strategy files are (currently) being ignored\n //prepareStrategy(nFolds, modelPath, recPath, modelPath);\n\n System.out.println(\"Evaluating...\");\n evaluate(nFolds, modelPath, recPath);\n }", "public static void main (String[] anArgs) {\n\t\tGraderDemoerAndTester aDemoerAndTester = new ACMixedArithmeticGraderDemoerAndTester(anArgs);\r\n//\t\targs = anArgs;\r\n\t\tTracer.info(ACMixedArithmeticGraderDemoerAndTester.class, \"test\");\r\n\t\taDemoerAndTester.demoAndTest();\r\n\t\t\r\n//\t\taDemoerAndTester.demoAndTest();\r\n//\r\n//\t\tstartFirstSession();\r\n//\r\n//\t\tdoSteps();\r\n\r\n\t}", "long execute() throws EvaluationException\n\t\t{\n\t\t\tList<IQuery> queries = mParser.getQueries();\n\t\t\t\n\t\t\tif( queries.size() != 1 )\n\t\t\t\tthrow new RuntimeException( \"The input program must contain exactly one query.\" );\n\t\t\t\n\t\t\tIQuery query = queries.get( 0 );\n\t\t\tlong elapsedTime = -System.currentTimeMillis();\n\t\t\tfinal IKnowledgeBase mKB = KnowledgeBaseFactory.createKnowledgeBase( mParser.getFacts(), mParser.getRules() );\n\t\t\tmKB.execute( query );\n\t\t\telapsedTime += System.currentTimeMillis();\n\n\t\t\treturn elapsedTime;\n\t\t}", "public void runProgram() {\n\t\tJTextPane code = ((MinLFile) tabbedPane.getSelectedComponent()).CodeArea;\n\t\tminc.consolearea.setText(\"\");\n\t\tinterpretorMainMethod(code.getText(), 0);\n\t\tdouble_variables.clear();\n\t\tstring_variables.clear();\n\t\tfunctions.clear();\n\t}", "public void doCommandLine(){\n\t\t//parse arguments\n\t\tString help = System.getProperty(\"help\");\n\t\tif (help!=null){\n\t\t\tdoHelp();\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tboolean doAutomation = false;\n\t\tString numRuns = System.getProperty(\"runs\");\n\t\tString outputDir = System.getProperty(\"out\");\n\t\tString filePref = System.getProperty(\"prefix\");\n\t\tString numIters = System.getProperty(\"iters\");\n\t\tString params = System.getProperty(\"params\");\n\t\tString inFasta = System.getProperty(\"in\");\n\t\tString inCustomMatrix = System.getProperty(\"inCustom\");\n\t\tString distanceName = System.getProperty(\"distanceName\");\n\t\tString doPdf = System.getProperty(\"pdf\");\n\t\tString zoom = System.getProperty(\"zoom\");\n\t\tString UIScaling = System.getProperty(\"UIScaling\");\n\t\tString width = System.getProperty(\"width\");\n\t\tString height = System.getProperty(\"height\");\n\t\tString reference = System.getProperty(\"reference\");\n\t\tdoAutomation |= numRuns!=null;\n\t\tdoAutomation |= outputDir!=null;\n\t\tdoAutomation |= filePref!=null;\n\t\tdoAutomation |= numIters!=null;\n\t\tdoAutomation |= inFasta!=null;\n\t\tdoAutomation |= inCustomMatrix!=null;\n\t\tif (doAutomation){\n\t\t\t//Necessary params:\n\t\t\tif (outputDir==null){\n\t\t\t\tbatchError(\"-Dout must be specified.\");\n\t\t\t}\n\t\t\tif (inFasta==null){\n\t\t\t\tbatchError(\"-Din must be specified.\");\n\t\t\t}\n\t\t\t//Necessary, if not doing PDF\n\t\t\tif (doPdf==null){ //Pdf render doesn't require all this stuff.\n\t\t\t\tif (numRuns==null){\n\t\t\t\t\tbatchError(\"-Druns must be specified.\");\n\t\t\t\t}\n\t\t\t\tif (params==null){\n\t\t\t\t\tbatchError(\"-Dparams must be specified.\");\n\t\t\t\t}\n\t\t\t\tif (numIters==null){\n\t\t\t\t\tbatchError(\"-Diters must be specified.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnumRuns = \"0\";\n\t\t\t\tnumIters = \"0\";\n\t\t\t\tparams = null; //Use defaults\n\t\t\t}\n\t\t\t//Has a default / Optional:\n\t\t\tif (filePref==null){\n\t\t\t\tfilePref=\"dGbatch\";\n\t\t\t}\n\t\t\tif (zoom!=null){\n\t\t\t\tVIEW_SCALE_USER=max(1,new Float(zoom));\n\t\t\t}\n\t\t\tif (UIScaling != null) {\n\t\t\t\tthis.UIScaling = max(1, new Float(UIScaling));\n\t\t\t}\n\t\t\tif (width != null) {\n\t\t\t\tVIEW_WIDTH = max(1,new Integer(width));\n\t\t\t}\n\t\t\tif (height != null) {\n\t\t\t\tVIEW_HEIGHT = max(1,new Integer(height));\n\t\t\t}\n\t\t\tif (inCustomMatrix != null) {\n\t\t\t\tif (distanceName == null) {\n\t\t\t\t\tbatchError(\"-DdistanceName must be specified if -DinCustom used.\");\n\t\t\t\t}\n\t\t\t\tthis.distanceName = distanceName;\n\t\t\t}\n\t\t\t//Ok, do it.\n\t\t\trunScript(new Integer(numRuns),new Integer(numIters),params,outputDir,filePref,inFasta,inCustomMatrix,doPdf!=null,reference);\n\t\t} else {\n\t\t\t//If we get here, we didn't input any command line arguments.\n\t\t\tSystem.out.println(\"Dgraph can be automated: try adding -Dhelp to the arguments when running the program.\");\n\t\t}\n\t}", "public void execute() {\n if(isModified() && worker==null) {\n try {\n worker = new AnalyzeToolWorker();\n } catch (IOException ex) {\n setExecuting(false);\n ErrorDialog.displayIOExceptionDialog(toolName+\" Error\", \"Tool initialization failed.\", ex);\n return;\n }\n worker.start();\n }\n }", "void run() {\n\t\trunC();\n\t\trunPLMISL();\n\t\trunTolerance();\n\t\trunMatrix();\n\t}", "public void displayResults() {\r\n Preferences.debug(\" ******* FitMultiExponential ********* \\n\\n\", Preferences.DEBUG_ALGORITHM);\r\n dumpTestResults();\r\n }", "private void test() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\tBpmnModelInstance modelInstance = Bpmn.readModelFromFile(loadedFile);\n\t\tJsonEncoder jsonEncoder = new JsonEncoder(loadedFile.getName());\n\t\tBpmnBasicMetricsExtractor basicExtractor = new BpmnBasicMetricsExtractor(modelInstance, jsonEncoder);\n\t\tBpmnAdvancedMetricsExtractor advExtractor = new BpmnAdvancedMetricsExtractor(basicExtractor, jsonEncoder);\n\t\tlong loadTime = System.currentTimeMillis() - startTime;\n//\t\tSystem.out.println(\"Tempo load del file: \" + loadTime + \"ms\");\n\t\tbasicExtractor.runMetrics();\n\t\tlong basicTime = System.currentTimeMillis() - loadTime - startTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche di base: \" + basicTime + \"ms\");\n\t\tadvExtractor.runMetrics();\n\t\tlong advTime = System.currentTimeMillis() - basicTime - startTime - loadTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche avanzate: \" + advTime + \"ms\");\n\t\tjsonEncoder.exportJson();\n\t\tMySqlInterface db = new MySqlInterface();\n\t\tdb.connect();\n//\t\tdb.createTables(jsonEncoder);\n//\t\tdb.createAndInsertMetricsInfosTable();\n//\t\tdb.saveMetrics(jsonEncoder);\n//\t\tdb.closeConnection();\n\t}", "public abstract void performStep();", "private static void simpleRun(String [] args){\n\t\tString applicationPath = convertApplication(args[2], null);\n\t\tboolean testHardware = args[0].equals(\"-testCGRAVerilog\");\n\t\t\n\t\t\n\t\tboolean synthesis = false;\n\t\tif(args[0].equals(\"-testCGRAVerilog\") || args[3].equals(\"true\")){\n\t\t\tsynthesis = true;\n\t\t} else if (args[3].equals(\"false\")){\n\t\t\tsynthesis = false;\n\t\t} else{\n\t\t\tSystem.out.println(\"Synthesis parameter not set correctly: \" + args[3]+ \"\");\n\t\t\tSystem.out.println(\"Valid values are \\\"true\\\" and \\\"false\\\"\");\n\t\t\tSystem.out.println(\"Aborting...\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\tConfMan configManager = new ConfMan(args[1], applicationPath, synthesis);\n\t\t\n\t\tTrace simpleRunTrace = new Trace(System.out, System.in, \"\", \"\");\n\t\tif(configManager.getTraceActivation(\"config\")){\n\t\t\tsimpleRunTrace.setPrefix(\"config\");\n\t\t\tconfigManager.printConfig(simpleRunTrace);\n\t\t}\n\n\t\tDecimalFormatSymbols symbols = new DecimalFormatSymbols();\n\t\tsymbols.setGroupingSeparator(',');\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat formater = new DecimalFormat(\"#.000\", symbols);\n\t\t\n\t\tAmidarSimulationResult results = run(configManager, null, testHardware);\n\t\t\n\t\tif(configManager.getTraceActivation(\"results\")){\n\t\t\tsimpleRunTrace.setPrefix(\"results\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Simulated \"+applicationPath+\" - Synthesis \"+(configManager.getSynthesis()?\"ON\":\"OFF\"));\n\t\t\tsimpleRunTrace.println(\"Ticks: \"+results.getTicks());\n\t\t\tsimpleRunTrace.println(\"Bytecodes: \"+results.getByteCodes());\n\t\t\tsimpleRunTrace.println(\"Energy consumption: \"+formater.format(results.getEnergy()));\n\t\t\tsimpleRunTrace.println(\"Execution Time: \"+results.getExecutionDuration()+\" ms\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Loop Profiling\");\n\t\t\tresults.getProfiler().reportProfile(simpleRunTrace);\n\t\t\tsimpleRunTrace.printTableHeader(\"Kernel Profiling\");\n\t\t\tresults.getKernelProfiler().reportProfile(simpleRunTrace, results.getTicks());\n\t\t}\n\t\t\n\t\tif(testHardware){\n\t\t\tsimpleRunTrace.setPrefix(\"CGRA verilog test\");\n\t\t\tsimpleRunTrace.printTableHeader(\"Testing CGRA Verilog descrption\");\n\t\t\tAmidar core = results.getAmidarCore();\n\t\t\tCGRA myCGRA = (CGRA)core.functionalUnits[core.functionalUnits.length-1]; // CGRA is the last one\n\t\t\t\n\t\t VerilogGenerator gen = target.Processor.Instance.getGenerator();\n\t\t CgraModel model = myCGRA.getModel();\n\t\t model.finalizeCgra();\n\t\t simpleRunTrace.println(\"Generate Verilog...\");\n\t\t gen.printVerilogDescription(\"out\",model);\n\t\t TestbenchGeneratorAmidar tbgen = new TestbenchGeneratorAmidar((VerilogGeneratorAmidar) gen);\n\t\t StimulusAmidar[] stimuli = new StimulusAmidar[1];\n\t\t stimuli = myCGRA.getStimulus().toArray(stimuli);\n\t\t TestbenchContextGenerator tbcongen = new TestbenchContextGenerator(model);\n\t\t tbcongen.exportContext(myCGRA.getContextCopyPEs(), myCGRA.getContextCopyCBOX(), myCGRA.getContextCopyCCU());\n//\t\t for(Stimulus stim : stimuli){\n//\t\t \tSystem.out.println(stim);\n//\t\t }\n\t\t \n\t\t tbgen.exportAppAndPrintTestbench(stimuli);\n\t\t \n//\t\t tbgen.importAppAndPrintTestbench(\"SimpleTest.main\");\n\t\t TestbenchExecutor tbex = new TestbenchExecutor();\n\t\t \n\t\t if(tbex.runTestbench()){\n\t\t \tsimpleRunTrace.println(\"Run was successful - Cosimulation succeeded\");\n\t\t }\n\t\t else{\n\t\t \tConsistencyChecker sammi = new ConsistencyChecker();\n\t\t \tboolean mismatch = sammi.findRegfileMismatch();\n\t\t \tif(mismatch){\n\t\t \t\tsimpleRunTrace.println(\"Error(s) during Simulation. Something went wrong in the data path\");\n\t\t \t}\n\t\t \telse{\n\t\t \t\tsimpleRunTrace.println(\"Emulation / HDL missmatch. Maybe there's is something not equal concerning the communication or FSM.\");\n\t\t \t}\n\t\t }\n\t\t}\n\t\t\n\n\t}", "@Test(description = \"Test to validate the EMI feature with different tenure and interest rate\", priority = 0)\n\tpublic void UserStory2() throws HeadlessException, AWTException, IOException, InterruptedException\n\t{\n\t\tLoanCalculatorPage loan_cal = new LoanCalculatorPage();\n\t\tloan_cal.validateCalHomePage();\n\t\t//testLog.log(Status.INFO, \"Loan calculator page launched\");\n\n\t\t\n\t\tint testCaseID = 3;\n\t\t\n\t\t//Enter the values in calculator and validate output\n\t\tloan_cal.ValidateDetails(loan_cal.GetEMI(testCaseID));\n\t\t\n\t}", "@Test\n\tpublic void Reports_18961_execute() throws Exception {\n\t\tVoodooUtils.voodoo.log.info(\"Running \" + testName + \"...\");\n\n\t\t// Navigate to Advance Reports in navbar \n\t\tsugar().navbar.navToModule(ds.get(0).get(\"advance_report_name\"));\n \t\tnavigationCtrl.click();\n \t\t\n \t\t// Click on View Advance Report link\n \t\tviewAdvanceReportCtrl = new VoodooControl(\"a\", \"css\", \"[data-navbar-menu-item='LNK_LIST_REPORTMAKER']\");\n \t\tviewAdvanceReportCtrl.click();\n \t\tVoodooUtils.focusFrame(\"bwc-frame\");\n \t\t\n \t\t// click on list item\n \t\tnew VoodooControl(\"a\", \"css\", \"tr.oddListRowS1 > td:nth-child(3) a\").click();\n \t\tVoodooUtils.focusDefault();\n \t\tVoodooUtils.focusFrame(\"bwc-frame\");\n \t\t\n \t\t// Click to Select to add data format in report\n \t\tnew VoodooControl(\"input\", \"css\", \"#form [title='Select']\").click();\n \t\tVoodooUtils.focusWindow(1);\n \t\t\n \t\t// select data format in list\n \t\tnew VoodooControl(\"a\", \"css\", \"tr.oddListRowS1 td:nth-child(1) a\").click();\n \t\tVoodooUtils.focusWindow(0);\n \t\tVoodooUtils.focusFrame(\"bwc-frame\");\n \t\t\n \t\t// Click \"Edit\" of a \"Data Format\"\n \t\tnew VoodooControl(\"a\", \"css\", \"#contentTable tr.oddListRowS1 > td:nth-child(6) > slot > a:nth-child(3)\").click();\n \t\tVoodooUtils.focusDefault();\n \t\tVoodooUtils.focusFrame(\"bwc-frame\");\n \t\tnew VoodooControl(\"input\", \"id\", \"name\").assertEquals(ds.get(0).get(\"data_format_name\"), true);\n \t\tnew VoodooControl(\"input\", \"id\", \"query_name\").assertEquals(ds.get(0).get(\"query_name\"), true);\n \t\tnew VoodooControl(\"a\", \"css\", \"#Default_DataSets_Subpanel tr:nth-child(1) td:nth-child(4) a\").assertEquals(ds.get(0).get(\"report_name\"), true);\n \t\tVoodooUtils.focusDefault();\n\n\t\tVoodooUtils.voodoo.log.info(testName + \" complete.\");\n\t}", "public void processResults() {\r\n try {\r\n rm5 = new Process(new File(_corePath.RAPID_MINER_PROCESS_XML));\r\n IOContainer ioResult = rm5.run();\r\n ExampleSet resultSet;\r\n int num_rules = 0;\r\n if (ioResult.getElementAt(0) instanceof ExampleSet) {\r\n resultSet = (ExampleSet) ioResult.getElementAt(0);\r\n for (int i = 0; i <= resultSet.size() - 1; i++) {\r\n if ((resultSet.getExample(i).get(\"Premise Items\").equals(1)) && (resultSet.getExample(i).get(\"Conclusion Items\").equals(1))) {\r\n num_rules++;\r\n results += \"<ul><li title=\\\"Premise\\\">\" + resultSet.getExample(i).get(\"Premise\") + \"</li>\"\r\n + \"<li title=\\\"Conclusion\\\">\" + resultSet.getExample(i).get(\"Conclusion\") + \"</li>\"\r\n + \"<li title=\\\"Confidence\\\" class=\\\"metrics\\\">\" + String.format(\"%f%n\", resultSet.getExample(i).get(\"Confidence\")) + \"</li>\"\r\n + \"<li title=\\\"Conviction\\\" class=\\\"metrics\\\">\";\r\n\r\n if (resultSet.getExample(i).get(\"Conviction\").equals(\"Infinity\")) {\r\n results += resultSet.getExample(i).get(\"Conviction\");\r\n } else {\r\n results += String.format(\"%f%n\", resultSet.getExample(i).get(\"Conviction\"));\r\n }\r\n\r\n results += \"</li>\"\r\n + \"<li title=\\\"Gain\\\" class=\\\"metrics\\\">\" + String.format(\"%f%n\", resultSet.getExample(i).get(\"Gain\")) + \"</li>\"\r\n + \"<li title=\\\"Laplace\\\" class=\\\"metrics\\\">\" + String.format(\"%f%n\", resultSet.getExample(i).get(\"Laplace\")) + \"</li>\"\r\n + \"<li title=\\\"Lift\\\" class=\\\"metrics\\\">\" + String.format(\"%f%n\", resultSet.getExample(i).get(\"Lift\")) + \"</li>\"\r\n + \"<li title=\\\"Ps\\\" class=\\\"metrics\\\">\" + String.format(\"%f%n\", resultSet.getExample(i).get(\"Ps\")) + \"</li>\"\r\n + \"<li title=\\\"Total Support\\\" class=\\\"metrics\\\">\" + String.format(\"%f%n\", resultSet.getExample(i).get(\"Total Support\")) + \"</li><li class=\\\"num_rules\\\">\" + num_rules + \"</li></ul>\";\r\n } else {\r\n break;\r\n }\r\n }\r\n } else {\r\n results = \"No results found.\";\r\n }\r\n\r\n results = results.replace(\"[\", \"\");\r\n results = results.replace(\"]\", \"\");\r\n\r\n\r\n } catch (OperatorException ex) {\r\n Logger.getLogger(Core.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(Core.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (XMLException ex) {\r\n Logger.getLogger(Core.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "public abstract void interpret(EvaluationContext context);", "private void runRefactoring() {\r\n Refactoring refactoring = createRefactoring();\r\n\r\n // Update the code\r\n try {\r\n refactoring.run();\r\n } catch (RefactoringException re) {\r\n JOptionPane.showMessageDialog(null, re.getMessage(), \"Refactoring Exception\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n updateSummaries();\r\n\r\n // Update the GUIs\r\n ReloaderSingleton.reload();\r\n }", "public PerformanceHarness( boolean showPrograms ) throws IOException, ParserException, EvaluationException\n\t{\n\t\t// Ensure all the class files are loaded, memory allocated etc\n\t\tfor( String filename : mProgramFilenames )\n\t\t\tmPrograms.add( new Program( filename ) );\n\t\t\n\t\tpause1();\t\t\n\t\tfor( Program program : mPrograms )\n\t\t{\n\t\t\tprogram.execute();\n\t\t\tpause1();\n\t\t}\n\t\t\n\t\t// Clear everything out\n\t\tmPrograms.clear();\n\t\tpause1();\n\n\t\t// Reload\n\t\tfor( String filename : mProgramFilenames )\n\t\t\tmPrograms.add( new Program( filename ) );\n\n\t\t// Prepare the report header\n\t\tStringBuilder output = new StringBuilder();\n\t\t\n\t\toutput.append( \"IRIS Performance Harness\" ).append( NEW_LINE );\n\t\toutput.append( \"========================\" ).append( NEW_LINE );\n\t\tInetAddress localHost = InetAddress.getLocalHost();\n\t\toutput.append( \"At time: \" ).append( new Date() ).append( NEW_LINE );\n\t\toutput.append( \"On machine: \" ).append( localHost.getHostName() ).append( \" (\" ).append( localHost ).append( \")\" ).append( NEW_LINE );\n\t\t\n\t\tif( showPrograms )\n\t\t{\n\t\t\tfor( int p = 0; p < mPrograms.size(); ++p )\n\t\t\t{\n\t\t\t\tpause(1);\n\t\t\t\toutput.append( THIN_LINE );\n\t\t\t\toutput.append( \"Program \" ).append( p ).append( \" is:\" ).append( NEW_LINE );\n\t\t\t\toutput.append( mPrograms.get( p ).getProgram() ).append( NEW_LINE ).append( NEW_LINE );\n\t\t\t}\n\t\t}\n\t\t\n\t\toutput.append( THICK_LINE );\n\n\t\tpause1();\t\t\n\t\tfor( int p = 0; p < mPrograms.size(); ++p )\n\t\t{\n\t\t\toutput.append( \"Program \" ).append( p ).append( \": \" ).append( mPrograms.get( p ).execute() ).append( NEW_LINE );\n\t\t\tpause1();\n\t\t}\n\t\t\n\t\tSystem.out.println( output.toString() );\n\t}", "protected abstract R runStep();", "@Override\n public void doEvaluation(Individual sample, boolean isTrain) {\n mainEvaluator.doEvaluation(sample, isTrain);\n }", "public void performEvaluation(){\n if(validateExp(currentExp)){\n try {\n Double result = symbols.eval(currentExp);\n currentExp = Double.toString(result);\n calculationResult.onExpressionChange(currentExp,true);\n count=0;\n }catch (SyntaxException e) {\n calculationResult.onExpressionChange(\"Invalid Input\",false);\n e.printStackTrace();\n }\n }\n\n }", "public void experimenterAndPlotter() {\n\t\tfinal RewardFunction rf = new GoalBasedRF(this.goalCondition, 5., -0.1);\n\n\t\t/**\n\t\t * Create factories for Q-learning agent and SARSA agent to compare\n\t\t */\n\n\t\tLearningAgentFactory qLearningFactory = new LearningAgentFactory() {\n\n\t\t\t@Override\n\t\t\tpublic String getAgentName() {\n\t\t\t\treturn \"Q-learning\";\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic LearningAgent generateAgent() {\n\t\t\t\treturn new QLearning(domain, rf, tf, 0.99, hashingFactory, 0.3,\n\t\t\t\t\t\t0.1);\n\t\t\t}\n\t\t};\n\n\t\tLearningAgentFactory sarsaLearningFactory = new LearningAgentFactory() {\n\n\t\t\t@Override\n\t\t\tpublic String getAgentName() {\n\t\t\t\treturn \"SARSA\";\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic LearningAgent generateAgent() {\n\t\t\t\treturn new SarsaLam(domain, rf, tf, 0.99, hashingFactory, 0.0,\n\t\t\t\t\t\t0.1, 1.);\n\t\t\t}\n\t\t};\n\n\t\tStateGenerator sg = new ConstantStateGenerator(this.initialState);\n\n\t\tLearningAlgorithmExperimenter exp = new LearningAlgorithmExperimenter(\n\t\t\t\t(SADomain) this.domain, rf, sg, 10, 100, qLearningFactory,\n\t\t\t\tsarsaLearningFactory);\n\n\t\texp.setUpPlottingConfiguration(500, 250, 2, 1000,\n\t\t\t\tTrialMode.MOSTRECENTANDAVERAGE,\n\t\t\t\tPerformanceMetric.CUMULATIVESTEPSPEREPISODE,\n\t\t\t\tPerformanceMetric.AVERAGEEPISODEREWARD);\n\n\t\texp.startExperiment();\n\n\t\texp.writeStepAndEpisodeDataToCSV(\"expData\");\n\n\t}", "public static void main(String[] args) {\n\t\tresult obj = new result();\n\t\tobj.setstudent(\"penny\", 30);\n\t\tobj.setmarks(95, 85);\n\t\tobj.calculate();\n\t\tobj.showstudent();\n\t\tobj.showmarks();\n\t\tobj.showresult();\n\n\t}", "public void start() {\n\t\tPetriNetView pnmlData = ApplicationSettings.getApplicationView()\n\t\t\t\t.getCurrentPetriNetView();\n\t\t//if (pnmlData.getTokenViews().size() > 1) {\n\t\tif(pnmlData.getEnabledTokenClassNumber() > 1){\n\t\t\tExpander expander = new Expander(pnmlData);\n\t\t\tpnmlData = expander.unfold();\n\t\t\tJOptionPane.showMessageDialog(null, \"This is CGSPN. The analysis will only apply to default color (black)\",\n\t\t\t\t\t\"Information\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}\n\t\t// Build interface\n\t\tEscapableDialog guiDialog = new EscapableDialog(\n\t\t\t\tApplicationSettings.getApplicationView(), MODULE_NAME, true);\n\n\t\t// 1 Set layout\n\t\tContainer contentPane = guiDialog.getContentPane();\n\t\tcontentPane.setLayout(new BoxLayout(contentPane, BoxLayout.PAGE_AXIS));\n\n\t\t// 2 Add file browser\n\t\tsourceFilePanel = new PetriNetChooserPanel(\"Source net\", pnmlData);\n\t\tcontentPane.add(sourceFilePanel);\n\n\t\t// 3 Add results pane\n\t\tresults = new ResultsHTMLPane(pnmlData.getPNMLName());\n\t\tcontentPane.add(results);\n\n\t\t// 4 Add button's\n\t\tcontentPane.add(new ButtonBar(\"Analyse GSPN\", runAnalysis, guiDialog\n\t\t\t\t.getRootPane()));\n\n\t\t// 5 Make window fit contents' preferred size\n\t\tguiDialog.pack();\n\n\t\t// 6 Move window to the middle of the screen\n\t\tguiDialog.setLocationRelativeTo(null);\n\n\t\ttry {\n\t\t\tguiDialog.setVisible(true);\n\t\t} catch (NullPointerException e) {\n\t\t}\n\n\t}", "public void analysis(){\n\n\n this.outputFilename = \"PCAOutput\";\n if(this.fileOption==1){\n this.outputFilename += \".txt\";\n }\n else{\n this.outputFilename += \".xls\";\n }\n String message1 = \"Output file name for the analysis details:\";\n String message2 = \"\\nEnter the required name (as a single word) and click OK \";\n String message3 = \"\\nor simply click OK for default value\";\n String message = message1 + message2 + message3;\n String defaultName = this.outputFilename;\n this.outputFilename = Db.readLine(message, defaultName);\n this.analysis(this.outputFilename);\n }", "void evaluate()\n\t{\n\t\toperation.evaluate();\n\t}", "public void ExperimentResults() {\n\t\t/*\n\t\t * Creating a ScreenPresenter. To create other ResultsPresenter, the\n\t\t * better idea is to create a Factory.\n\t\t */\n\t\tResultPresenter presenter = new ScreenPresenter();\n\t\tpresenter.setText(evaluator.evalResults.resultsInText());\n\n\t}", "protected void screeningProcessing() throws TCWebException {\n try {\n DataAccessInt dAccess = Util.getDataAccess(Constants.DW_DATA_SOURCE, true);\n\n Request dr = new Request();\n dr.setContentHandle(\"coderProblemInfo\");\n dr.setProperty(\"cr\", getRequest().getParameter(Constants.USER_ID));\n dr.setProperty(\"rd\", getRequest().getParameter(Constants.ROUND_ID));\n dr.setProperty(\"pm\", getRequest().getParameter(Constants.PROBLEM_ID));\n\n Map map = dAccess.getData(dr);\n if (map == null)\n throw new ScreeningException(\"getData failed!\");\n\n ResultSetContainer result =\n (ResultSetContainer) map.get(\"coderProblemSolution\");\n if (result.getRowCount() == 0) {\n throw new ScreeningException(\"Error retrieving code submission.\");\n }\n\n SubmissionInfo sinfo = new SubmissionInfo();\n sinfo.setCode(result.getItem(0, \"submission_text\").toString());\n sinfo.setTestResults((ResultSetContainer) map.get(\"coderProblemTestResults\"));\n getRequest().setAttribute(\"submissionInfo\", sinfo);\n } catch (TCWebException e) {\n throw e;\n } catch (Exception e) {\n throw(new TCWebException(e));\n }\n\n setNextPage(Constants.TC_PROBLEM_RESULT_PAGE);\n setIsNextPageInContext(true);\n }", "public static void main(String[] args){\n\t\tSystem.setProperty(\"smartqa.debug\", \"false\");\n\t\ttry{\n\t\t\tList<Scenario> scenarios = parseScenario(args);\n\t\t\tfor(Scenario scenario : scenarios)\n\t\t\t\trunScenario(scenario);\n\t\t\t\n\t\t\tfor(Scenario scenario : scenarios)\n\t\t\t\tSystem.out.println(scenario);\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t\tthrow new SmartQAException(ex.getMessage());\n\t\t}\n\t}", "public void run() {\n\t // Create the ouput directories\n\t interfDir = new File(outDirName+\"/\"+modelName);\n\t interfDir.mkdirs();\n\t implDir = new File(outDirName+\"/\"+modelName);\n\t implDir.mkdirs();\n\t // Create the parseAll visitor interface\n\t createParseAllVisitorInterface(interfDir);\n\t // Create the parseAll visitor implementation\n\t createParseAllVisitorImplementation(implDir);\n\t // Create the evaluateAll visitor interface\n\t createEvaluateAllVisitorInterface(interfDir);\n\t // Create the evaluateAll visitor implementation\n\t createEvaluateAllVisitorImplementation(implDir);\n\t}", "public static void main(String[] args){\n //The driver of the methods created above\n //first display homeowork header\n homeworkHeader();\n //calls driver method\n System.out.println(\"Calling driver method:\");\n driver(true);//runs choice driver\n //when prompted for a choice input 9 to see test driver\n System.out.println(\"End calling of driver method\");\n \n }", "public void processAnalyze() throws ExtendedException {\n\t\tif (hlddFile == null) {\n\t\t\tthrow new ExtendedException(\"HLDD model file is missing\", ExtendedException.MISSING_FILE_TEXT);\n\t\t}\n\n\t\tint patternCount = applicationForm.getPatternCountForCoverage();\n\t\tboolean isRandom = applicationForm.isRandomCov();\n\t\tboolean isDoMeasureCoverage = applicationForm.isDoAnalyzeCoverage();\n\t\tString directive = applicationForm.getCoverageAnalyzerDirective();\n\n\t\t/* Collect execution string */\n\t\tList<String> commandList = new ArrayList<String>(5);\n\t\tcommandList.add(ApplicationForm.LIB_DIR + (Platform.isWindows() ? \"hlddsim.exe\" : \"hlddsim\"));\n\t\tif (isDoMeasureCoverage) {\n\t\t\tcommandList.add(\"-coverage\");\n\t\t\tcommandList.add(directive);\n\t\t}\n\t\tif (isRandom) {\n\t\t\tcommandList.add(\"-random\");\n\t\t\tcommandList.add(\"\" + patternCount);\n\t\t}\n\t\tcommandList.add(hlddFile.getAbsolutePath().replace(\".agm\", \"\"));\n\n\t\t/* Execute command */\n\t\tUIWithWorker.runUIWithWorker(\n\t\t\t\tnew CoverageAnalyzingUI(applicationForm.getFrame()),\n\t\t\t\tnew CoverageAnalyzingWorker(\n\t\t\t\t\t\tcommandList,\n\t\t\t\t\t\tSystem.err,\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tconsoleWriter\n\t\t\t\t)\n\t\t);\n\n\t\t/* showVHDLCoverage() is invoked in CoverageAnalyzingWorker after it (\"assert\") has completed its work */\n\t}", "@Override\r\n\t\t\tpublic Integer call() throws Exception {\n\t\t\t\ttry {\r\n\t\t\t\t\t// 获取参数的求解\r\n\t\t\t\t\tList<Route> routeList = markov.getRouteList();\r\n\r\n\t\t\t\t\tconstraintNameString.clear();\r\n\t\t\t\t\tpros.clear();\r\n\t\t\t\t\tnumbers.clear();\r\n\t\t\t\t\tfor (Route route : routeList) {\r\n\t\t\t\t\t\tconstraintNameString.add(route.getTcSequence());\r\n\t\t\t\t\t\tpros.add(route.getRouteProbability());\r\n\t\t\t\t\t\tnumbers.add(route.getNumber());\r\n\t\t\t\t\t\tactualPercentsDoubles.add(route.getActualPercent());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tStepThreeTabelPanel stepThreeTabelPanel = new StepThreeTabelPanel(constraintNameString,\r\n\t\t\t\t\t\t\tactualPercentsDoubles, pros, numbers);\r\n\t\t\t\t\tStepThreeTabelPanel testRoute = new StepThreeTabelPanel(constraintNameString, actualPercentsDoubles,\r\n\t\t\t\t\t\t\tpros, numbers);\r\n\r\n\t\t\t\t\tList<TCDetail> lists = DataBaseUtil.showTCDetailAll(\"select * from tcdetail\");\r\n\r\n\t\t\t\t\tmainFrame.getStepThreeTimeTabbedPane().getTestData().removeAll();\r\n\r\n\t\t\t\t\tCasePagePanel casePagePanel = new CasePagePanel(lists, mainFrame);\r\n\t\t\t\t\tmainFrame.getStepThreeNoTimeTabbedPane().getTestData().add(casePagePanel);\r\n\r\n\r\n\t\t\t\t\tJPanel TestDataPanel = new JPanel();\r\n\r\n\t\t\t\t\tint index = 0;\r\n\t\t\t\t\tif (lists.size() < 500) {\r\n\t\t\t\t\t\tindex = lists.size();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tindex = 500;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcasePagePanel.getCasePanel().add(new JPanel(),\r\n\t\t\t\t\t\t\tnew GBC(0, index).setFill(GBC.BOTH).setWeight(1, 1));\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int j = 0; j < index; j++) {\r\n\t\t\t\t\t\tStepThreeTabelPanel testTabelPanel = new StepThreeTabelPanel(lists.get(j).getTestCase(), 2,\r\n\t\t\t\t\t\t\t\tmainFrame);\r\n\t\t\t\t\t\tcasePagePanel.getCasePanel().add(testTabelPanel,\r\n\t\t\t\t\t\t\t\tnew GBC(0, j).setFill(GBC.BOTH).setWeight(1, 0));\r\n\t\t\t\t\t\tcasePagePanel.getCasePanel().repaint();\r\n\t\t\t\t\t\tmainFrame.getStepThreeNoTimeTabbedPane().getTestData().repaint();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tprogressBar.setValue(60 + (int) (((double) (j+1) / index) * 40));\r\n\r\n\t\t\t\t\t\tThread.sleep(10);\r\n\t\t\t\t\t\tmainFrame.renewPanel();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcasePagePanel.getPageTestField().setText(\"1\");\r\n\r\n\t\t\t\t\tmainFrame.getStepThreeNoTimeTabbedPane().getTestData().removeAll();\r\n\t mainFrame.getStepThreeNoTimeTabbedPane().getTestData().add(casePagePanel);\r\n\t mainFrame.renewPanel();\r\n\t \r\n//\t\t\t\t\tfor (Route route : routeList) {\r\n//\t\t\t\t\t\tmainFrame.getOutputinformation().geTextArea()\r\n//\t\t\t\t\t\t\t\t.append(\"\t\t\t测试序列:\" + testSequence + \"\t 路径概率(指标-可靠性可靠性测试数据生成比率\"\r\n//\t\t\t\t\t\t\t\t\t\t+ route.getActualPercent() + \"): \" + route.getRouteProbability() + \"\t此类用例包含\"\r\n//\t\t\t\t\t\t\t\t\t\t+ route.getNumber() + \"个\" + \"\\n\");\r\n//\r\n//\t\t\t\t\t\tint length = DisplayForm.mainFrame.getOutputinformation().geTextArea().getText().length();\r\n//\t\t\t\t\t\tDisplayForm.mainFrame.getOutputinformation().geTextArea().setCaretPosition(length);\r\n//\t\t\t\t\t\tThread.sleep(10);\r\n//\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbigDecimal = new BigDecimal(markov.getDeviation());\r\n\t\t\t\t\tString ii = bigDecimal.toPlainString();\r\n\t\t\t\t\tdouble d = Double.valueOf(ii);\r\n\t\t\t\t\t\r\n\t\t\t\t\ttopLabel.removeAll();\r\n\t\t\t\t\ttopLabel.setText(\"可靠性测试数据生成完成, 实际共生成\" + lists.size() + \"条!\" + \"可靠性测试用例数据库覆盖率:\"\r\n\t\t\t\t\t\t\t+ df.format(markov.getDbCoverage()) + \" 可靠性测试用例生成比率与使用模型实际使用概率平均偏差:\" + df.format(markov.getDeviation()));\r\n//\t\t\t\t\ttopLabel.setText(\"可靠性测试数据生成完成,共生成8379条,耗时36s!\" + \"Discriminant值:3.44EE-3\");\r\n\t\t\t\t\t\r\n\t mainFrame.getOutputinformation().geTextArea().append(\"指标:可靠性可靠性测试数据数据库覆盖率 = 覆盖的马尔可夫链路径/总的马尔可夫链路径\" + \"\\n\");\r\n\t\t\t\t\tint length = mainFrame.getOutputinformation().geTextArea().getText().length(); \r\n\t mainFrame.getOutputinformation().geTextArea().setCaretPosition(length);\r\n\t\t\t\t\t\r\n\t\t\t\t\tNoTimeTestCaseNode noTimeTestCaseLabel = new NoTimeTestCaseNode(ModelName + \"_自定义\", mainFrame);\r\n\t\t\t\t\tquota = \"可靠性测试数据生成完成, 实际共生成\" + lists.size() + \"条!\" + \"可靠性测试用例数据库覆盖率:\" + df.format(markov.getDbCoverage())\r\n\t\t\t\t\t\t\t+ \" 可靠性测试用例生成比率与使用模型实际使用概率平均偏差:\" + df.format(d);\r\n\t\t\t\t\tnoTimeTestCaseLabel.setQuota(quota);\r\n\t\t\t\t\tnoTimeTestCaseLabel.setTestRoute(testRoute);\r\n\t\t\t\t\tnoTimeTestCaseLabel.setCasePagePanel(casePagePanel);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getNoTimeCaseNodePanel()\r\n\t\t\t\t\t\t\t.insertCustomNodeLabel(noTimeTestCaseLabel, casePagePanel, testRoute, quota);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//保存指标\r\n\t\t\t\t\tTarget target = new Target();\r\n\t\t\t\t\tdouble Deviationalue = Double.valueOf(df.format(markov.getDbCoverage()));\r\n\t\t\t\t\tdouble CoverageRate = Double.valueOf(df.format(d));\r\n\t\t\t\t\ttarget.setCoverageRate(Deviationalue);\r\n\t\t\t\t\ttarget.setDeviationalue(CoverageRate);\r\n\t\t\t\t\tHibernateUtils hibernateUtils = RandomCase.hibernateUtils;\r\n\t\t\t\t\thibernateUtils.saveTCDetail(target);\r\n\r\n\t\t\t\t\tbutton.setEnabled(true);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getChoosePatternLabel().setEnabled(true);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getNoTimeModelLabel().setEnabled(true);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getNoTimeSeq().setEnabled(true);\r\n\t\t\t\t\tmainFrame.getStepThreeBottom().Enable();\r\n\t\t\t\t\t\r\n\t\t\t\t\tmainFrame.renewPanel();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\ttopLabel.removeAll();\r\n\t\t\t\t\ttopLabel.setText(\"生成可靠性测试数据出错!\");\r\n\r\n\t\t\t\t\tbutton.setEnabled(true);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getChoosePatternLabel().setEnabled(true);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getNoTimeModelLabel().setEnabled(true);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getNoTimeSeq().setEnabled(true);\r\n\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getChoosePatternLabel().setEnabled(true);\r\n\t\t\t\t\tmainFrame.getStepThreeBottom().Enable();\r\n\t\t\t\t\tmainFrame.renewPanel();\r\n\t\t\t\t}\r\n\t\t\t\treturn 1;\r\n\t\t\t}", "public static void main(String[] args) throws Exception {\n\n eProp.dev = true;\n try {\n //frames.PSConvert.exec();\n //wincalc();\n //query();\n //frame();\n //json();\n //uid();\n //script();\n //intersect();\n\n } catch (Exception e) {\n System.err.println(\"TEST-MAIN: \" + e);\n }\n }", "public static void main(String[] args) throws IOException {\n int activeThreshold = 300;\n //Activity.selectActive(\"st\", 6, activeThreshold);\n //Activity.selectActive(\"ri\", 6, activeThreshold);\n //Activity.selectActive(\"dw\", 9, activeThreshold);\n\n //Interaction.analysis(\"st\", 6);\n //Interaction.analysis(\"ri\", 6);\n\n //BehaviourIndicators.analysis(\"st\", 6);\n //BehaviourIndicators.analysis(\"ri\", 6);\n //BehaviourIndicators.analysis(\"dw\", 9);\n\n Engagement.analysis(\"st\",6);\n Engagement.analysis(\"ri\",6);\n //todo the data files for DW have to be adjusted to the ones of the other two to be able to run it\n //Engagement.analysis(\"dw\",9);\n\n //Motivation.analysis(\"ri\", 6);\n //Motivation.analysis(\"st\", 6);\n }", "@Override\n\tpublic void run( String arg )\n\t{\n\t\tfinal LoadParseQueryXML result = new LoadParseQueryXML();\n\n\t\tif ( !result.queryXML( \"Dataset Quality Estimation\", true, true, true, true, true ) )\n\t\t\treturn;\n\n\t\testimateFRC( result.getData(), SpimData2.getAllViewIdsSorted( result.getData(), result.getViewSetupsToProcess(), result.getTimePointsToProcess() ) );\n\t}", "private void startEvaluation(IPartialPageRequestHandler aTarget, MarkupContainer aForm )\n {\n chartPanel = new ChartPanel(MID_CHART_CONTAINER, \n LoadableDetachableModel.of(this::renderChart));\n chartPanel.setOutputMarkupPlaceholderTag(true);\n chartPanel.setOutputMarkupId(true);\n \n aForm.addOrReplace(chartPanel);\n aTarget.add(chartPanel);\n }", "protected abstract void analyzeSystem(PipelineData data) throws Exception;", "public void testPerformance() {\n \t}", "@Override\r\n\t\t\tpublic Integer call() throws Exception {\n\t\t\t\ttry {\r\n\t\t\t\t\tbutton.setEnabled(false);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getChoosePatternLabel().setEnabled(false);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getNoTimeModelLabel().setEnabled(false);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getNoTimeSeq().setEnabled(false);\r\n\t\t\t\t\tmainFrame.getStepThreeBottom().UnEnable();\r\n\t\t\t\t\tmainFrame.getStepThreeNoTimeTabbedPane().getTestData().removeAll();\r\n\t\t\t\t\t\r\n\t\t\t\t\tmarkov = mainFrame.getNoTimeSeqOperation1().getMarkov();\r\n\t\t\t\t\tdom = mainFrame.getNoTimeSeqOperation1().getDom();\r\n\t\t\t\t\troot = mainFrame.getNoTimeSeqOperation1().getRoot();\r\n\t\t\t\t\tPI = mainFrame.getNoTimeSeqOperation1().getPI();\r\n\t\t\t\t\tmin = mainFrame.getStepThreeLeftButton().getMin();\r\n\t\t\t\t\tminSeq = mainFrame.getNoTimeSeqOperation1().getMinSeq();\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\ttopLabel.removeAll();\r\n\t\t\t\t\ttopLabel.setText(\"正在生成可靠性测试数据(该过程需要较久时间,请耐心等待)....\");\r\n\t\t\t\t\tThread.sleep(150);\r\n\r\n\t\t\t\t\tCalculate.getAllTransValues(markov);\r\n\r\n\t\t\t\t\tnew BestAssign().assign(markov, root);\r\n\t\t\t\t\t\r\n\t\t\t\t\tmarkov.setDeviation(CalculateSimilarity.statistic(markov, PI));\r\n\r\n\t\t\t\t\tOutputFormat format = OutputFormat.createPrettyPrint();\r\n\r\n\t\t\t\t\twriter = new XMLWriter(\r\n\t\t\t\t\t\t\tnew FileOutputStream(mainFrame.getBathRoute() + \"/TestCase/\" + ModelName + \"_Custom#1.xml\"),\r\n\t\t\t\t\t\t\tformat);\r\n\t\t\t\t\twriter.write(dom);\r\n\t\t\t\t\twriter.close();\r\n\r\n\t\t\t\t\tmainFrame.renewPanel();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\ttopLabel.removeAll();\r\n\t\t\t\t\ttopLabel.setText(\"生成可靠性测试数据出错!\");\r\n\r\n\t\t\t\t\tbutton.setEnabled(true);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getChoosePatternLabel().setEnabled(true);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getNoTimeModelLabel().setEnabled(true);\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getNoTimeSeq().setEnabled(true);\r\n\r\n\t\t\t\t\tmainFrame.getStepThreeLeftButton().getChoosePatternLabel().setEnabled(true);\r\n\t\t\t\t\tmainFrame.getStepThreeBottom().Enable();\r\n\t\t\t\t\tmainFrame.renewPanel();\r\n\t\t\t\t}\r\n\t\t\t\treturn 1;\r\n\t\t\t}", "EntryPointResult evaluate(Object data, String entryPointName, EvaluationConfig evaluationConfig);", "public void runMape(int curSimTick){\n runMonitoring();\n runAnalysis();\n runPlanning();\n runExecution();\n }", "public static void main (String args[]){\r\n\t\tCalculator s = new Calculator();\r\n\t\ts.launchFrame();\r\n\t}", "private static void automate() {\n \tLOG.info(\"Begin automation task.\");\n \t\n \tcurrentOpticsXi = clArgs.clusteringOpticsXi;\n \tdouble opticsXiMax = (clArgs.clusteringOpticsXiMaxValue > ELKIClusterer.MAX_OPTICS_XI ? ELKIClusterer.MAX_OPTICS_XI : clArgs.clusteringOpticsXiMaxValue);\n \tcurrentOpticsMinPoints = clArgs.clusteringOpticsMinPts;\n \tint opticsMinPointsMax = clArgs.clusteringOpticsMinPtsMaxValue;\n \t\n \tLOG.info(\"optics-xi-start: {}, optics-xi-min-points-start: {}, optics-xi-step-size: {}, optics-min-points-step-size: {}\",\n \t\t\tnew Object[] { \n \t\t\t\tdf.format(currentOpticsXi), df.format(currentOpticsMinPoints), \n \t\t\t\tdf.format(clArgs.clusteringOpticsXiStepSize), df.format(clArgs.clusteringOpticsMinPtsStepSize)\n \t\t\t});\n \t\n \twhile (currentOpticsXi <= opticsXiMax) {\n \t\twhile (currentOpticsMinPoints <= opticsMinPointsMax) {\n \t\t\t// Run automation for each combination of opticsXi and opticsMinPoints\n \t\t\tLOG.info(\"Run automation with optics-xi: {}, optics-xi-min-points: {}\", \n \t\t\t\t\tdf.format(currentOpticsXi), df.format(currentOpticsMinPoints));\n \t\t\t\n \t\t\ttry {\n\t \t\t\t// Step 1: Clustering\n\t \t\t\tclustering(clArgs.clusteringInFile, clArgs.clusteringOutDir, currentOpticsXi, currentOpticsMinPoints);\n\t \t\t\t\n\t \t\t\t// Step 2: Build shared framework\n\t \t\t\tbuildFramework();\n\t \t\t\t\n\t \t\t\t// Step 3: Build user hierarchical graphs\n\t \t\t\tbuildHierarchicalGraphs();\n\t \t\t\t\n\t \t\t\t// Step 4: Calculate similarity between all users and create evaluation results afterwards\n\t \t\t\tcalculateSimilarity();\n \t\t\t} catch (Exception e) {\n\t\t\t\t\tLOG.error(\"An error occurred during the automation task. Jumping to the next pass.\", e);\n\t\t\t\t} finally {\n\t \t\t\t// Step 5: Clean up for the next run\n\t \t\t\tcleanAutomationResults();\n\t \t\t\t\n\t \t\t\t// Increase the currentOpticsMinPoints for the next run if desired\n\t \t\t\tif (clArgs.clusteringOpticsMinPtsStepSize > 0)\n\t \t\t\t\tcurrentOpticsMinPoints += clArgs.clusteringOpticsMinPtsStepSize;\n\t \t\t\telse\n\t \t\t\t\tbreak;\n\t\t\t\t}\n \t\t}\n \t\t// Reset current values\n \t\tcurrentOpticsMinPoints = clArgs.clusteringOpticsMinPts;\n \t\t\n \t\t// Increase currentOpticsXi for the next run if desired\n \t\tif (clArgs.clusteringOpticsXiStepSize > 0)\n\t\t\t\tcurrentOpticsXi += clArgs.clusteringOpticsXiStepSize;\n\t\t\telse\n\t\t\t\tbreak;\n \t}\n \t\n \tLOG.info(\"End automation task.\");\n }", "public boolean compute() throws Exception{\n \n String cmdLine;\n String voicedir = db.getProp(db.ROOTDIR);\n \n /* Run: perl hts/scripts/Training.pl hts/scripts/Config.pm (It can take several hours...)*/ \n cmdLine = db.getExternal(db.PERLPATH) + \"/perl \" + voicedir +\"hts/scripts/Training.pl \" + voicedir + \"hts/scripts/Config.pm\"; \n launchProcWithLogFile(cmdLine, \"\", voicedir);\n \n return true;\n }", "protected void execute() {\n \tTmSsAutonomous.getInstance().showAlgInfo();\n \tshowPreferenceSettings(); //P.println(\"[Preferences info TBD]\");\n }", "public static void main( String[] args )\n {\n DataSet ds1 = DataSetFactory.getTestDataSet(); //create the first test DataSet\n DataSet ds2 = DataSetFactory.getTestDataSet(); //create the second test DataSet\n new ViewManager(ds1, ViewManager.IMAGE);\n Operator op = new DataSetDivide( ds1, ds2, true );\n DataSet new_ds = (DataSet)op.getResult();\n new ViewManager(new_ds, ViewManager.IMAGE);\n }", "private void executeAlgo(SearchTestUtil.ALGO algo) {\n Stopwatch stopwatch = new Stopwatch(true);\n if (algo.equals(SearchTestUtil.ALGO.RECUIT)) assignementProblem.recuitAlgortihm();\n else assignementProblem.tabuAlgortihm();\n stopwatch.stop();\n System.out.print(\"\\t\" + algo.toString());\n System.out.print(\" Best \" + assignementProblem.getF().apply(assignementProblem.getOutCombination()));\n System.out.println(\" | Time \" + stopwatch.elapsedMs() + \" ms\");\n }", "public static void main(String[] args) throws Exception {\n if(args.length < 2) {\n System.out.println(\"Not enough parameters! java -jar programAnalysis.jar <Analysis> <Input file> \");\n return;\n }\n\n // Parse the analysis input\n String analysisString = args[0];\n\n // Get Analysis from factory\n GeneralAnalysisFactory analysisFactory = new GeneralAnalysisFactory();\n GeneralAnalysis analysis = analysisFactory.getInstance(analysisString);\n\n TheLangLexer lex = new TheLangLexer(new ANTLRFileStream(args[1]));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TheLangParser parser = new TheLangParser(tokens);\n ProgramGeneralAnalysisListener listener = new ProgramGeneralAnalysisListener(analysis);\n parser.addParseListener(listener);\n\n try {\n TheLangParser.ProgramContext parserResult = parser.program();\n\n BaseMutableTreeNode rootTree = listener.getRootTree();\n FlowGraph graph = new FlowGraph();\n\n Enumeration en = rootTree.preorderEnumeration();\n int i = 1;\n while (en.hasMoreElements()) {\n\n // Unfortunately the enumeration isn't genericised so we need to downcast\n // when calling nextElement():\n BaseMutableTreeNode node = (BaseMutableTreeNode) en.nextElement();\n ParserRuleContext object = (ParserRuleContext) node.getUserObject();\n\n if(BaseStatement.class.isAssignableFrom(node.getClass())) {\n BaseStatement statement = (BaseStatement) node;\n graph.processStatement(statement);\n\n System.out.println(\"label-\" + i++ + \": \" + object.getText());\n }\n\n }\n\n analysis.doAnalysis(graph);\n\n System.out.println(analysis.printResult());\n\n// CommonTree t = (CommonTree) parserResult.getTree();\n// CommonTree t2 = (CommonTree) t.getChild(0);\n// int startToken = t2.getTokenStartIndex();\n// int stopToken = t2.getTokenStopIndex();\n// CommonToken token = (CommonToken) t2.getToken();\n// System.out.println(token.getText());\n//\n// if (parserResult != null) {\n// CommonTree tree = (CommonTree) parserResult.tree;\n// System.out.println(tree.toStringTree());\n// }\n } catch (RecognitionException e) {\n e.printStackTrace();\n }\n\n }", "public void TestMain(){\n SampleStatements();\n TestMyPow();\n }", "public static void main (String[] args) {\n\n Config config = ConfigUtils.loadConfig(\"/home/gregor/git/matsim/examples/scenarios/pt-tutorial/0.config.xml\");\n// config.controler().setLastIteration(0);\n// config.plans().setHandlingOfPlansWithoutRoutingMode(PlansConfigGroup.HandlingOfPlansWithoutRoutingMode.useMainModeIdentifier);\n// Scenario scenario = ScenarioUtils.loadScenario(config);\n// Controler controler = new Controler(scenario);\n// controler.run();\n\n\n// Config config = this.utils.loadConfig(IOUtils.extendUrl(ExamplesUtils.getTestScenarioURL(\"pt-tutorial\"), \"0.config.xml\"));\n config.controler().setLastIteration(1);\n config.plans().setHandlingOfPlansWithoutRoutingMode(PlansConfigGroup.HandlingOfPlansWithoutRoutingMode.useMainModeIdentifier);\n\n\n// try {\n Controler controler = new Controler(config);\n// final EnterVehicleEventCounter enterVehicleEventCounter = new EnterVehicleEventCounter();\n// final StageActivityDurationChecker stageActivityDurationChecker = new StageActivityDurationChecker();\n// controler.addOverridingModule( new AbstractModule(){\n// @Override public void install() {\n// this.addEventHandlerBinding().toInstance( enterVehicleEventCounter );\n// this.addEventHandlerBinding().toInstance( stageActivityDurationChecker );\n// }\n// });\n controler.run();\n }", "@Given(\"prepare to Analysis\")\npublic void preanalysis(){\n}", "public static void main(String[] args) {\n\n experiment();\n }", "public static void main(String[] args) throws Exception {\n\n\t\t testDistance();\n\n\t\t //functionFitting();\n\t\t //testFunction();\n\t}", "public static void main(String[] args) {\n ExecuteParams executeParams1 = new ExecuteParams();\n ExecuteParams executeParams2 = new ExecuteParams();\n ExecuteParams executeParams30 = new ExecuteParams();\n ExecuteParams executeParams31 = new ExecuteParams();\n ExecuteParams executeParams32 = new ExecuteParams();\n ExecuteParams executeParams33 = new ExecuteParams();\n ExecuteParams executeParams34 = new ExecuteParams();\n ExecuteParams executeParams41 = new ExecuteParams();\n\n //*** PARAMS\n executeParams1.DeviationPredictor_CosineMetric();\n executeParams2.DeviationPredictor_PearsonMetric();\n executeParams30.DeviationPredictor_PearsonSignifianceWeightMetric(1);\n executeParams31.DeviationPredictor_PearsonSignifianceWeightMetric(5);\n executeParams32.DeviationPredictor_PearsonSignifianceWeightMetric(50);\n executeParams33.DeviationPredictor_PearsonSignifianceWeightMetric(100);\n executeParams34.DeviationPredictor_PearsonSignifianceWeightMetric(200);\n executeParams41.DeviationPredictor_JaccardMetric();\n //***\n\n computeOne(executeParams1);\n computeOne(executeParams2);\n computeOne(executeParams30,\"N = 1\");\n computeOne(executeParams31,\"N = 5\");\n computeOne(executeParams32,\"N = 50\");\n computeOne(executeParams33,\"N = 100\");\n computeOne(executeParams34,\"N = 200\");\n computeOne(executeParams41);\n }", "public void runIndividualSpreadsheetTests() {\r\n\r\n\t\t// Make a list of files to be analyzed\r\n\t\tString[] inputFiles = new String[] {\r\n//\t\t\t\t\"salesforecast_TC_IBB.xml\",\r\n//\t\t\t\t\"salesforecast_TC_2Faults.xml\",\r\n//\t\t\t\t\t\t\t\"salesforecast_TC_2FaultsHeavy.xml\",\r\n\t\t\t\t\"SemUnitEx1_DJ.xml\",\r\n\t\t\t\t\"SemUnitEx2_1fault.xml\",\r\n\t\t\t\t\"SemUnitEx2_2fault.xml\",\r\n//\t\t\t\t\"VDEPPreserve_1fault.xml\",\r\n//\t\t\t\t\"VDEPPreserve_2fault.xml\",\r\n//\t\t\t\t\t\t\t\"VDEPPreserve_3fault.xml\",\r\n//\t\t\t\t\"AZA4.xml\",\r\n//\t\t\t\t\"Consultant_form.xml\",\r\n//\t\t\t\t\"Hospital_Payment_Calculation.xml\",\r\n//\t\t\t\t\"Hospital_Payment_Calculation_v2.xml\",\r\n//\t\t\t\t\"Hospital_Payment_Calculation_C3.xml\",\r\n//\t\t\t\t\"11_or_12_diagnoses.xml\",\r\n//\t\t\t\t\"choco_loop.xml\",\r\n//\t\t\t\t\"Paper2.xml\",\r\n//\t\t\t\t\"Test_If.xml\",\r\n//\t\t\t\t\"Test_If2.xml\",\r\n\r\n\t\t};\r\n\r\n\t\tscenarios.add(new Scenario(executionMode.singlethreaded, pruningMode.on, PARALLEL_THREADS, CHOCO3));\r\n//\t\tscenarios.add(new Scenario(executionMode.levelparallel, pruningMode.on, 2, CHOCO3));\r\n//\t\tscenarios.add(new Scenario(executionMode.fullparallel, pruningMode.on, 1, CHOCO3));\r\n\t\tscenarios.add(new Scenario(executionMode.fullparallel, pruningMode.on, 2, CHOCO3));\r\n//\t\tscenarios.add(new Scenario(executionMode.fullparallel, pruningMode.on, 4, CHOCO3));\r\n//\t\tscenarios.add(new Scenario(executionMode.heuristic, pruningMode.on, 1, CHOCO3));\r\n\t\tscenarios.add(new Scenario(executionMode.heuristic, pruningMode.on, 2, CHOCO3));\r\n//\t\tscenarios.add(new Scenario(executionMode.heuristic, pruningMode.on, 4, CHOCO3));\r\n//\t\tscenarios.add(new Scenario(executionMode.heuristic, pruningMode.on, PARALLEL_THREADS, true));\r\n//\t\tscenarios.add(new Scenario(executionMode.hybrid, pruningMode.on, 1, CHOCO3));\r\n\t\tscenarios.add(new Scenario(executionMode.hybrid, pruningMode.on, 2, CHOCO3));\r\n//\t\tscenarios.add(new Scenario(executionMode.hybrid, pruningMode.on, 4, CHOCO3));\r\n//\t\tscenarios.add(new Scenario(executionMode.levelparallel, pruningMode.on, PARALLEL_THREADS, false));\r\n//\t\tscenarios.add(new Scenario(executionMode.fullparallel, pruningMode.on, PARALLEL_THREADS, false));\r\n//\t\tscenarios.add(new Scenario(executionMode.fullparallel, pruningMode.on, PARALLEL_THREADS, false));\r\n//\t\tscenarios.add(new Scenario(executionMode.heuristic,pruningMode.on,PARALLEL_THREADS*2));\r\n//\t\tscenarios.add(new Scenario(executionMode.heuristic,pruningMode.on,0));\r\n\r\n//\t\tinputFiles = new String[]{\"VDEPPreserve_3fault.xml\"};\r\n\r\n\r\n\t\t// Go through the files and run them in different scenarios\r\n\t\tfor (String inputfilename : inputFiles) {\r\n\t\t\trunScenarios(inputFileDirectory, inputfilename, logFileDirectory, scenarios);\r\n\t\t}\r\n\t}", "public abstract void execute(InputCalc input, Calculator calculator);", "private void runRefactoring() {\r\n Refactoring refactoring = createRefactoring();\r\n\r\n // Update the code\r\n try {\r\n refactoring.run();\r\n } catch (RefactoringException re) {\r\n JOptionPane.showMessageDialog(null, re.getMessage(), \"Refactoring Exception\",\r\n JOptionPane.ERROR_MESSAGE);\r\n } catch (Throwable thrown) {\r\n ExceptionPrinter.print(thrown, true);\r\n }\r\n\r\n followup(refactoring);\r\n }", "private void doExecute() throws MojoExecutionException {\n URL buildUrl;\n try {\n buildUrl = buildDirectory.toURI().toURL();\n getLog().info(\"build directory \" + buildUrl.toString());\n } catch (MalformedURLException e1) {\n throw new MojoExecutionException(\"Cannot build URL for build directory\");\n }\n ClassLoader loader = makeClassLoader();\n Properties properties = new Properties(project.getProperties());\n properties.setProperty(\"lenskit.eval.dataDir\", dataDir);\n properties.setProperty(\"lenskit.eval.analysisDir\", analysisDir);\n dumpClassLoader(loader);\n EvalConfigEngine engine = new EvalConfigEngine(loader, properties);\n \n try {\n File f = new File(script);\n getLog().info(\"Loading evalution script from \" + f.getPath());\n engine.execute(f);\n } catch (CommandException e) {\n throw new MojoExecutionException(\"Invalid evaluation script\", e);\n } catch (IOException e) {\n throw new MojoExecutionException(\"IO Exception on script\", e);\n }\n }", "public void runAlgorithm()\n\t{\n\t\tboolean done = false;\n while (!done)\n {\n switch (step)\n {\n case 1:\n step=stepOne(step);\n break;\n case 2:\n step=stepTwo(step);\n break;\n case 3:\n step=stepThree(step);\n break;\n case 4:\n step=stepFour(step);\n break;\n case 5:\n step=stepFive(step);\n break;\n case 6:\n step=stepSix(step);\n break;\n case 7:\n stepSeven(step);\n done = true;\n break;\n }\n }\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tLoadDataStore storeData = new LoadDataStore();\r\n\t\tDataAnalytics aData;\r\n\t\tMarketData[] md;\r\n\t\t\r\n\t\tSystem.out.println(\"Sourcing Data....\");\r\n\t\tstoreData.sourceData(args);\t\t//Read the Data into our application.\r\n\r\n\t\t/*Get the MarketData Array -- Pass it to DataAnalytics */\r\n\t\t\r\n\t\tmd=storeData.getMarketData();\r\n\t\tSystem.out.println(\"Market Data is Loaded....\");\t\r\n\t\t\r\n\t\t/*Start Analyzing the data*/\r\n\t\taData=new DataAnalytics(md);\t//Use the Constructor to pass in the data\r\n\t\tSystem.out.println(\"Analytical Engine Up ....\");\r\n\t\t\r\n\t\t\r\n\t\t//Lets bring up the GUI\r\n\t\tUISetup uiset = new UISetup(aData);\r\n\t\tSystem.out.println(\"User Inferace Up...\");\r\n\t\tSystem.out.println(\"System is Ready!\");\r\n\t}", "public static void main(String[] args) {\n System.out.println(\"Welcome to the Paint Estimator!\");\n\n Estimator estimator = new Estimator();\n estimator.getSquareFeet();\n estimator.getPaintPrice();\n estimator.calculatePaintAndLabor();\n\n estimator.INPUT.close(); //close scanner\n\n }", "@Override\n\tpublic void execute() {\n\t\tSystem.out.println(\"==STATISTICS FOR THE RESTAURANT==\");\n\t\tSystem.out.println(\"Most used Ingredients:\");\n\t\tmanager.printIngredients();\n\t\tSystem.out.println(\"Most ordered items:\");\n\t\tmanager.printMenuItems();\n\t\tSystem.out.println(\"==END STATISTICS==\");\n\t}", "public void evaluate(String trainFile, String validationFile, String testFile, String featureDefFile) {\n/* 710 */ List<RankList> train = readInput(trainFile);\n/* */ \n/* 712 */ List<RankList> validation = null;\n/* */ \n/* 714 */ if (!validationFile.isEmpty()) {\n/* 715 */ validation = readInput(validationFile);\n/* */ }\n/* 717 */ List<RankList> test = null;\n/* */ \n/* 719 */ if (!testFile.isEmpty()) {\n/* 720 */ test = readInput(testFile);\n/* */ }\n/* 722 */ int[] features = readFeature(featureDefFile);\n/* 723 */ if (features == null) {\n/* 724 */ features = FeatureManager.getFeatureFromSampleVector(train);\n/* */ }\n/* 726 */ if (normalize) {\n/* */ \n/* 728 */ normalize(train, features);\n/* 729 */ if (validation != null)\n/* 730 */ normalize(validation, features); \n/* 731 */ if (test != null) {\n/* 732 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 735 */ RankerTrainer trainer = new RankerTrainer();\n/* 736 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 738 */ if (test != null) {\n/* */ \n/* 740 */ double rankScore = evaluate(ranker, test);\n/* 741 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 743 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 745 */ System.out.println(\"\");\n/* 746 */ ranker.save(modelFile);\n/* 747 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }", "public void run() {\n run(ErisCasper.create());\n }", "public void run(String[] args) throws Exception\n {\n ArgParser parser = new ArgParser(args);\n determineEvalMethod(parser);\n }", "public void start() {\n\t\tString test = \".test\";\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(test);\n\t\t\tfos.write(2);\n\t\t\tfos.close();\n\t\t} \n\t\tcatch (Throwable e){\n\t\t\tJOptionPane.showMessageDialog(frame,\"Please run from a directory that has file-write access.\\n\",\"Write-Protected Directory\",JOptionPane.ERROR_MESSAGE);\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tdoCommandLine();\n\t\tif (scriptRenderFrames > 0){\n\t\t\tPRESETUP = true;\n\t\t}\n\t\twhile (!PRESETUP){\n\t\t\tPRESETUP = true;\n\t\t\t//Show a dialog with options for RUN_MODE\n\t\t\tString [] optionsStr = { \n\t\t\t\t\t\"Run DGraph\", \n\t\t\t\t\t\"Utility: Sequence list -> Fasta\", \n\t\t\t\t\t\"Utility: Fasta -> Sequence List\", \n\t\t\t\t\t\"Utility: Remove Duplicates from Sequence List\", \n\t\t\t\t\t\"Utility: Fasta -> List of headers\",\n\t\t\t\t\t\"Utility: Clustalw output -> Alignment score distance matrix. Note: Copy+paste whole clustalw output, especially 'pairwise alignment' section\",\n\t\t\t\t\t\"Utility: Fasta -> PD Score matrix: sliding window approach\",\n\t\t\t\t\t\"Utility: Fasta -> PD Score matrix: assume pre-aligned sequences\",\n\t\t\t\t\t\"Utility: DNA Fasta -> DNA Sequence Similarity matrix\",\n\t\t\t\t\t\"Utility: Find all pairs of aligned peptides in a list with PD Score under a threshold\",\n\t\t\t\t\t\"Utility: Jalview all pairwise sequeqnce alignments output -> Parwise alignment score list\",\n\t\t\t\t\t\"Utility: Reorder fasta sequences to match another file\",\n\t\t\t\t\t\"Utility: Fasta -> Line-numbered sequence headers\",\n\t\t\t};\n\t\t\tJRadioButton [] options = new JRadioButton[optionsStr.length];\n\t\t\tButtonGroup group = new ButtonGroup();\n\t\t\tJPanel pane = new JPanel();\n\t\t\tpane.setLayout(new GridLayout(0,1));\n\t\t\tfor(int k = 0; k < optionsStr.length;k++){\n\t\t\t\toptions[k] = new JRadioButton (optionsStr[k]);\n\t\t\t\tgroup.add(options[k]);\n\t\t\t\tpane.add(options[k]);\n\t\t\t}\n\t\t\toptions[0].setSelected(true);\n\n\t\t\tFrame holder = new Frame(\"DGraph - Initializing.\");\n\t\t\tholder.setSize(200,100);\n\t\t\tholder.setLocationRelativeTo(null);\n\t\t\tholder.setVisible(true);\n\t\t\tboolean shouldRun = JOptionPane.showOptionDialog(\n\t\t\t\t\tholder,\n\t\t\t\t\tpane,\n\t\t\t\t\t\"Select operation\",\n\t\t\t\t\tJOptionPane.OK_CANCEL_OPTION,\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE,null,null,null) == JOptionPane.OK_OPTION;\n\t\t\tif (!shouldRun) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tholder.setVisible(false);\n\n\t\t\tint choice = 0;\n\t\t\tfor(int k = 0; k < options.length; k++){\n\t\t\t\tif (options[k].isSelected()){\n\t\t\t\t\tchoice = k;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tRUN_MODE = choice-1; //0=-1\n\t\t\t\n\t\t\tif (RUN_MODE != -1){\n\t\t\t\trunUtility(RUN_MODE);\n\t\t\t\t//Go again.\n\t\t\t\tPRESETUP = false;\n\t\t\t}\n\t\t}\n\n\t\theadless = false;\n\t\t//Now do PApplet's start to get things rolling.\n\t\tsuper.start();\n\t}", "private static double simpleSpeedupRun(String [] args){\n\t\tString applicationPath = convertApplication(args[2], new String[] {\"1\", \"2\"});\n\t\tConfMan configManager;\n\n\t\tconfigManager = new ConfMan(args[1],applicationPath, false);\n\t\t\n\t\tTrace speedupTrace = new Trace(System.out, System.in, \"\", \"\");\n\t\tif(configManager.getTraceActivation(\"config\")){\n\t\t\tspeedupTrace.setPrefix(\"config\");\n\t\t\tconfigManager.printConfig(speedupTrace);\n\t\t}\n\t\tspeedupTrace.setPrefix(\"speedup\");\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Measuring simple speedup\");\n\t\tspeedupTrace.printTableHeader(\"Running without Synthesis\");\n\t\tAmidarSimulationResult resultsOFF = run(configManager, null, false);\n\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Running again with Synthesis\");\n\t\tconfigManager.setSynthesis(true);\n\t\tAmidarSimulationResult resultsON = run(configManager, null, false);\n\n\t\tdouble speedup = (double)resultsOFF.getTicks()/(double)resultsON.getTicks();\n\t\tdouble energySavings = (double)resultsON.getEnergy()/(double)resultsOFF.getEnergy();\n\n\t\tDecimalFormatSymbols symbols = new DecimalFormatSymbols();\n\t\tsymbols.setGroupingSeparator(',');\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat formater = new DecimalFormat(\"#0.000\", symbols);\n\n\t\tif(configManager.getTraceActivation(\"results\")){\n\t\t\tspeedupTrace.setPrefix(\"results\");\n\t\t\tspeedupTrace.printTableHeader(\"Simulated \"+applicationPath+\" - Simple Speedup Measurement\");\n\t\t\tspeedupTrace.println(\"Ticks without synthesis: \"+resultsOFF.getTicks());\n\t\t\tspeedupTrace.println(\"Ticks with synthesis: \"+resultsON.getTicks());\n\t\t\tspeedupTrace.println(\"Speedup: \"+formater.format(speedup));\n\t\t\tspeedupTrace.println();\n\t\t\tspeedupTrace.println(\"Energy without synthesis: \"+formater.format(resultsOFF.getEnergy()));\n\t\t\tspeedupTrace.println(\"Energy with synthesis: \"+formater.format(resultsON.getEnergy()));\n\t\t\tspeedupTrace.println(\"Energy savings: \"+formater.format((1-energySavings)*100) + \"%\");\n\t\t\t\n\t\t\tspeedupTrace.printTableHeader(\"Loop Profiling\");\n\t\t\tresultsON.getProfiler().reportProfile(speedupTrace);\n\t\t\tspeedupTrace.printTableHeader(\"Kernel Profiling\");\n\t\t\tresultsON.getKernelProfiler().reportProfile(speedupTrace, resultsON.getTicks());\n\t\t}\n\t\t\t\n\t\treturn speedup;\n\n\t}", "public final void evaluate() throws IOException {\n final ParserEvaluator evaluator = new ParserEvaluator(this.parser);\n evaluator.evaluate(this.testSamples);\n System.out.println(evaluator.getFMeasure());\n }", "public static void main(String[] args) {\n // if required - start the graphical output using -v parameter\n if (args.length > 0) {\n if (args[0].equals(\"-v\")) {\n visualize = true;\n }\n } else {\n // change this to true if you want to visualize always, disregarding parameters.\n visualize = false;\n }\n // stores references to animation windows\n LinkedList<Visualizator> windows = new LinkedList();\n // if true then create windows with graps.\n if (visualize) {\n createGUI(windows);\n }\n\n // list of results\n LinkedList results = new LinkedList();\n\n // data set name(s) are stored in this list. Typically, the data are expected to be in a \"$PATH/data-set/\" directory, where $PATH is the path to where the Alea directory is.\n // Therefore, this directory should contain both ./Alea and ./data-set directories. Files describing machines should be placed in a file named e.g., \"metacentrum.mwf.machines\".\n // Similarly machine failures (if simulated) should be placed in a file called e.g., \"metacentrum.mwf.failures\".\n // Please read carefully the copyright note when using public workload traces!\n //String data_sets[] = {\"SDSC-SP2.swf\", \"hpc2n.swf\", \"star.swf\", \"thunder.swf\", \"metacentrum.mwf\", \"meta2008.mwf\", \"atlas.swf\",};\n String data_sets[] = {\"metacentrum.mwf\"};\n\n // number of gridlets in data set\n //int total_gridlet[] = {59700, 202876, 96000, 121038, 103656, 187370, 42724,};\n int total_gridlet[] = {6, 6};\n // the weight of the fairness criteria in objective function\n int fairw[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n // set true to use failures\n failures = false;\n // set true to use specific job requirements\n reqs = true;\n // set true to use runtime estimates\n estimates = false;\n\n // set true to refine estimates using job avg. length\n useAvgLength = false;\n // set true to use last job length as a new runtime estimate\n useLastLength = false;\n // set true to use \"on demand\" schedule optimization when early job completions appear\n useEventOpt = false;\n\n // set true to use very imprecise estimates\n useUserPrecision = false;\n // set true to use Feitelson's deterministic f-model to generate runtime estimates\n useDurationPrecision = false;\n // if useDurationPrecision = true, then following number denotes the level of imprecison\n // 100 = 2 x real lenght, 400 = 5 x real length, 900 = 10x, 1900 = 20x, 4900 = 50x\n userPercentage = 4900;\n // the minimal length (in seconds) of gap in schedule since when the \"on demand\" optimization is executed\n gap_length = 10 * 60;\n // the weigh of fairness criterion\n fair_weight = 1;\n\n // use binary heap dat structure to represent schedule (generally faster solution)\n useHeap = true;\n\n\n //defines the name format of output files\n String problem = \"Result\";\n if (!failures && !reqs) {\n problem += \"Basic\";\n }\n if (reqs) {\n problem += \"R-\";\n }\n if (failures) {\n problem += \"F\";\n }\n if (estimates) {\n problem += \"-Estim\";\n } else {\n problem += \"-Exact\";\n }\n if (useAvgLength) {\n problem += \"-AvgL\";\n }\n if (useLastLength) {\n problem += \"-LastL\";\n }\n if (useEventOpt) {\n problem += \"-EventOpt\";\n }\n if (useUserPrecision) {\n problem += \"-UserPrec\" + userPercentage;\n }\n if (useDurationPrecision) {\n problem += \"-DurPrec\" + userPercentage;\n }\n\n // data sets are outside the project folder (i.e. in ../data-set/)\n data = true;\n // multiply the number of iterations of optimization techniques\n multiplicator = 1;\n // used to influence the frequency of job arrivals (mwf files only)\n double multiplier = 1.0;\n\n // used only when executed on a real cluster (do not change)\n path = \"estim100/\";\n meta = false;\n if (meta) {\n String date = \"-\" + new Date().toString();\n date = date.replace(\" \", \"_\");\n date = date.replace(\"CET_\", \"\");\n date = date.replace(\":\", \"-\");\n System.out.println(date);\n problem += date;\n }\n\n String user_dir = \"\";\n if (ExperimentSetup.meta) {\n user_dir = \"/scratch/xklusac/\" + path;\n } else {\n user_dir = System.getProperty(\"user.dir\");\n }\n try {\n Output out = new Output();\n out.deleteResults(user_dir + \"/jobs(\" + problem + \"\" + ExperimentSetup.algID + \").csv\");\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n // creates Result Collector\n ResultCollector result_collector = new ResultCollector(results, problem);\n\n\n // this cycle selects data set from data_sets[] list\n for (int set = 0; set <= 0; set++) {\n String prob = problem;\n fair_weight = fairw[set];\n if (useUserPrecision) {\n prob += \"-UserPrec\" + userPercentage;\n }\n max_estim = 0;\n result_collector.generateHeader(data_sets[set] + \"_\" + prob);\n prevAlgID = -1;\n\n // selects algorithm\n // write down the IDs of algorithm that you want to use (FCFS = 0, EDF = 1, EASY = 2, CONS = 4, PBS PRO = 5, BestGap = 10, BestGap+RandomSearch = 11, ...)\n int algorithms[] = {2};\n\n // select which algorithms from the algorithms[] list will be used.\n for (int sel_alg = 0; sel_alg <= 0; sel_alg++) {\n\n // reset values from previous iterations\n use_compresion = false;\n opt_alg = null;\n fix_alg = null;\n\n // get proper algorithm\n int alg = algorithms[sel_alg];\n int experiment_count = 1;\n name = data_sets[set];\n algID = alg;\n if (sel_alg > 0) {\n prevAlgID = algorithms[sel_alg - 1];\n }\n\n // used for output description\n String suff = \"\";\n // initialize the simulation - create the scheduler\n Scheduler scheduler = null;\n String scheduler_name = \"Alea_3.0_scheduler\";\n try {\n Calendar calendar = Calendar.getInstance();\n boolean trace_flag = false; // true means tracing GridSim events\n String[] exclude_from_file = {\"\"};\n String[] exclude_from_processing = {\"\"};\n String report_name = null;\n GridSim.init(entities, calendar, trace_flag, exclude_from_file, exclude_from_processing, report_name);\n scheduler = new Scheduler(scheduler_name, baudRate, entities, results, alg, data_sets[set], total_gridlet[set], suff, windows, result_collector, sel_alg);\n } catch (Exception ex) {\n Logger.getLogger(ExperimentSetup.class.getName()).log(Level.SEVERE, null, ex);\n }\n // this will set up the proper algorithm according to the algorithms[] list\n if (alg == 0) {\n policy = new FCFS(scheduler);\n suff = \"FCFS\";\n }\n if (alg == 1) {\n policy = new EDF(scheduler);\n suff = \"EDF\";\n }\n if (alg == 2) {\n policy = new EASY_Backfilling(scheduler);\n // fixed version of EASY Backfilling\n suff = \"EASY\";\n }\n if (alg == 4) {\n policy = new CONS(scheduler);\n use_compresion = true;\n suff = \"CONS+compression\";\n }\n // do not use PBS-PRO on other than \"metacentrum.mwf\" data - not enough information is available.\n if (alg == 5) {\n policy = new PBS_PRO(scheduler);\n suff = \"PBS-PRO\";\n }\n\n if (alg == 10) {\n policy = new BestGap(scheduler);\n suff = \"BestGap\";\n }\n if (alg == 11) {\n suff = \"BestGap+RandSearch(\" + multiplicator + \")\";\n policy = new BestGap(scheduler);\n opt_alg = new RandomSearch();\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n\n if (alg == 19) {\n suff = \"CONS+LS(\" + multiplicator + \")\";\n policy = new CONS(scheduler);\n opt_alg = new GapSearch();\n\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n if (alg == 20) {\n suff = \"CONS+RandSearch(\" + multiplicator + \")\";\n policy = new CONS(scheduler);\n opt_alg = new RandomSearch();\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n if (alg == 21) {\n suff = \"CONS-no-compress\";\n policy = new CONS(scheduler);\n if (useEventOpt) {\n fix_alg = new GapSearch();\n // instead of compression, use LS-based optimization on early job completion\n suff += \"-EventOptLS\";\n }\n }\n\n System.out.println(\"Now scheduling \" + total_gridlet[set] + \" jobs by: \" + suff + \", using \" + data_sets[set] + \" data set.\");\n\n suff += \"@\" + data_sets[set];\n\n // this cycle may be used when some modifications of one data set are required in multiple runs of Alea 3.0 over same data-set.\n for (int pass_count = 1; pass_count <= experiment_count; pass_count++) {\n\n try {\n // creates entities\n String job_loader_name = data_sets[set] + \"_JobLoader\";\n String failure_loader_name = data_sets[set] + \"_FailureLoader\";\n\n // creates all grid resources\n MachineLoader m_loader = new MachineLoader(10000, 3.0, data_sets[set]);\n rnd_seed = sel_alg;\n\n // creates 1 scheduler\n\n JobLoader job_loader = new JobLoader(job_loader_name, baudRate, total_gridlet[set], data_sets[set], maxPE, minPErating, maxPErating,\n multiplier, pass_count, m_loader.total_CPUs, estimates);\n if (failures) {\n FailureLoaderNew failure = new FailureLoaderNew(failure_loader_name, baudRate, data_sets[set], clusterNames, machineNames, 0);\n }\n // start the simulation\n System.out.println(\"Starting the Alea 3.0\");\n GridSim.startGridSimulation();\n } catch (Exception e) {\n System.out.println(\"Unwanted errors happened!\");\n System.out.println(e.getMessage());\n e.printStackTrace();\n System.out.println(\"Usage: java Test [time | space] [1-8]\");\n }\n\n System.out.println(\"=============== END OF TEST \" + pass_count + \" ====================\");\n // reset inner variables of the simulator\n Scheduler.load = 0.0;\n Scheduler.classic_load = 0.0;\n Scheduler.max_load = 0.0;\n Scheduler.classic_activePEs = 0.0;\n Scheduler.classic_availPEs = 0.0;\n Scheduler.activePEs = 0.0;\n Scheduler.availPEs = 0.0;\n Scheduler.requestedPEs = 0.0;\n Scheduler.last_event = 0.0;\n Scheduler.start_event = -10.0;\n Scheduler.runtime = 0.0;\n\n // reset internal SimJava variables to start new experiment with different job/gridlet setup\n Sim_system.setInComplete(true);\n // store results\n result_collector.generateResults(suff, experiment_count);\n result_collector.reset();\n results.clear();\n System.out.println(\"Max. estim has been used = \" + max_estim);\n System.gc();\n }\n }\n }\n // end of the whole simulation\n }", "protected void invokeResults() {\r\n\t\t// Create the intent.\r\n\t\tIntent plantResultsIntent = new Intent(this, PlantResultsActivity.class);\r\n\t\t\r\n\t\t// create a bundle to pass data to the results screen.\r\n\t\tBundle data = new Bundle();\r\n\t\tdata.putString(PLANT_SEARCH_TERM, actPlantName.getText().toString());\r\n\t\t// add the bundle to the intent\r\n\t\tplantResultsIntent.putExtras(data);\r\n\t\t// start the intent, and tell it we want results.\r\n\t\tstartActivityForResult(plantResultsIntent, \t1);\r\n\t}", "private static void runCalculations()\n {\n // TODO Create two different empty concurrent histograms\n\n // Create a sleep time simulator, it will sleep for 10 milliseconds in each call\n BaseSyncOpSimulator syncOpSimulator = new SyncOpSimulSleep(10);\n\n // List of threads\n List<Runner> runners = new LinkedList<>();\n\n // Create the threads and start them\n for (int i = 0; i < NUM_THREADS; i ++)\n {\n // TODO Pass the proper histograms\n final Runner runner = new Runner(syncOpSimulator, null, null);\n runners.add(runner);\n new Thread(runner).start();\n }\n\n // Wait for runners to finish\n runners.forEach(Runner::waitToFinish);\n\n // TODO Show the percentile distribution of the latency calculation of each executeOp call for all threads\n }", "public static void main(String[] args) {\n boolean firstUIActionOnProcess = 0==args.length || !args[0].equals(\"NotFirstUIActionOnProcess\") ;\n GLProfile.initSingleton();\n\n new Multisample().run(args);\n }", "public static void main(String[] args) {\n final int t = SYS_IN.nextInt(); // total test cases\n SYS_IN.nextLine();\n for (int ti = 0; ti < t; ti++) {\n evaluateCase();\n }\n SYS_IN.close();\n }", "@Override\r\n\tpublic void beforeInvocation(IInvokedMethod arg0, ITestResult arg1) {\n\t\tGenerateReports.starttest(crntclassname);\r\n\t}", "public static void main(String[] args) {\n\t\tnew Calc();\n\t}", "public void evaluate() {\r\n Statistics.evaluate(this);\r\n }", "public static void main(String[] args) {\n System.out.println(dynamicProgramming(100));\n }", "public static void main(String args[]) {\n IterativeTrainingPanel test = new IterativeTrainingPanel(null, null);\n // test.errorBar.setValue(5);\n SimpleFrame.displayPanel(test);\n }", "public static void main(String[] args) {\r\n\t\tTaskResultAnalysis analysis = extractArguments(args);\r\n\t\tif (analysis == null)\r\n\t\t\tdie(USAGE);\r\n\t\t// determine tool mode, invoke proper action\r\n\t\tif (analysis.directory != null)\r\n\t\t\tsearch(analysis);\r\n\t\telse analyze(analysis);\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\tString reportPath = \"d:/Experiment/ExperimentFeb/reports/LargeDatasets-Accuracy.csv\";\n\t\tString filePath =\"d:/Experiment/ExperimentFeb/temp1/\";\n\t\tAlgorunner(filePath, reportPath);\n\t\n\t}", "public void testExecute() {\n panel.execute();\n }", "@Test\n public void testRun_Complex_Execution() {\n // TODO: TBD - Exactly as done in Javascript\n }", "public SolutionSet execute() throws JMetalException, ClassNotFoundException, IOException {\n initialization();\n createInitialSwarm() ;\n evaluateSwarm();\n initializeLeaders() ;\n initializeParticlesMemory() ;\n updateLeadersDensityEstimator() ;\n\n while (!stoppingCondition()) {\n computeSpeed(iterations_, maxIterations_);\n computeNewPositions();\n perturbation();\n evaluateSwarm();\n updateLeaders() ;\n updateParticleMemory() ;\n updateLeadersDensityEstimator() ;\n iterations_++ ;\n }\n\n tearDown() ;\n return paretoFrontApproximation() ;\n }", "public void train()\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n System.out.println(\"Start Training ..\");\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Training Text %..\");\n\t\t\ttrainText();\n\n\t\t\tSystem.out.println(\"Training Complex %..\");\n\t\t\ttrainCombined();\n\n\t\t\tSystem.out.println(\"Training Feature %..\");\n\t\t\ttrainFeatures();\n\n\t\t\tSystem.out.println(\"Training Lexicon %..\");\n\t\t\t//trainLexicon();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void main(String[] args) { \n processDataFile();\n realtorLogImpl.traverseDisplay();\n System.out.println();\n propertyLogImpl.traverseDisplay();\n System.out.println();\n generateReport();\n }", "public double evaluate(boolean pSave) {\r\n \t\tdouble result = 0.0;\r\n \t\tEnumeration args = getAllArguments().elements();\r\n \t\twhile (args.hasMoreElements()) {\r\n \t\t\tArgument arg = (Argument) args.nextElement();\r\n \t\t\t// System.out.println(\"relevant argument: \" + arg.toString());\r\n \t\t\tresult += arg.evaluate();\r\n \t\t}\r\n \r\n \t\t// should we take into account anyone pre-supposing or opposing us?\r\n \t\tRationaleDB db = RationaleDB.getHandle();\r\n \t\tVector dependent = db.getDependentAlternatives(this, ArgType.OPPOSES);\r\n \t\tIterator depI = dependent.iterator();\r\n \t\twhile (depI.hasNext()) {\r\n \t\t\tAlternative depA = (Alternative) depI.next();\r\n \t\t\tif (depA.getStatus() == AlternativeStatus.ADOPTED) {\r\n \t\t\t\tresult += -10; // assume amount is MAX\r\n \t\t\t}\r\n \t\t}\r\n \t\tdependent = db.getDependentAlternatives(this, ArgType.PRESUPPOSES);\r\n \t\tdepI = dependent.iterator();\r\n \t\twhile (depI.hasNext()) {\r\n \t\t\tAlternative depA = (Alternative) depI.next();\r\n \t\t\tif (depA.getStatus() == AlternativeStatus.ADOPTED) {\r\n \t\t\t\tresult += 10; // assume amount is MAX\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// System.out.println(\"setting our evaluation = \" + new\r\n \t\t// Double(result).toString());\r\n \t\tsetEvaluation(result);\r\n \r\n \t\tif (pSave) {\r\n \t\t\t// /\r\n \t\t\t// TODO This was added to get the integrated editors\r\n \t\t\t// updating correctly, however would be better suited\r\n \t\t\t// in a seperate function which is then refactored\r\n \t\t\t// outward so other places in SEURAT use it.\r\n \t\t\tConnection conn = db.getConnection();\r\n \t\t\tStatement stmt = null;\r\n \t\t\tResultSet rs = null;\r\n \t\t\ttry {\r\n \t\t\t\tstmt = conn.createStatement();\r\n \r\n \t\t\t\t// TODO Function call here is really hacky, see\r\n \t\t\t\t// the function inDatabase()\r\n \t\t\t\tif (inDatabase()) {\r\n \t\t\t\t\tString updateParent = \"UPDATE alternatives \"\r\n \t\t\t\t\t\t+ \"SET evaluation = \"\r\n \t\t\t\t\t\t+ new Double(evaluation).toString() + \" WHERE \"\r\n \t\t\t\t\t\t+ \"id = \" + this.id + \" \";\r\n \t\t\t\t\tstmt.execute(updateParent);\r\n \r\n \t\t\t\t\t// Broadcast Notification That Score Has Been Recomputed\r\n \t\t\t\t\tm_eventGenerator.Updated();\r\n \t\t\t\t} else {\r\n \t\t\t\t\t// If The RationaleElement Wasn't In The Database There\r\n \t\t\t\t\t// Is No Reason To Attempt To Save The Evaluation Score\r\n \t\t\t\t\t// Or Broadcast A Notification About It\r\n \t\t\t\t}\r\n \t\t\t} catch (Exception e) {\r\n \t\t\t\tSystem.out.println(\"Exception while saving evaluation score to database\");\r\n \t\t\t} finally {\r\n \t\t\t\tRationaleDB.releaseResources(stmt, rs);\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn result;\r\n \t}" ]
[ "0.6009834", "0.59355694", "0.5933933", "0.5752558", "0.5668712", "0.5622393", "0.55479956", "0.55134743", "0.54724514", "0.5458775", "0.5427581", "0.53575885", "0.53532803", "0.5348194", "0.53459936", "0.53453416", "0.5334951", "0.5320842", "0.53183603", "0.5311886", "0.5302061", "0.5258844", "0.5249934", "0.5249043", "0.523159", "0.5216918", "0.5209908", "0.520187", "0.51978636", "0.51967746", "0.51966166", "0.51926684", "0.5183128", "0.517932", "0.5174129", "0.51638675", "0.51596457", "0.5149933", "0.51424253", "0.5140868", "0.51384556", "0.5136636", "0.5128644", "0.5128623", "0.5125975", "0.51253116", "0.5101026", "0.5092864", "0.50911134", "0.50908786", "0.5083208", "0.50788456", "0.50782", "0.50771964", "0.5071643", "0.5067857", "0.5067148", "0.5057105", "0.50519115", "0.5050511", "0.50449455", "0.5042456", "0.5041942", "0.50361264", "0.50249505", "0.50223494", "0.5019742", "0.50194", "0.50192535", "0.50181895", "0.5011449", "0.500427", "0.5004257", "0.49974677", "0.49926335", "0.4991132", "0.49905315", "0.4989292", "0.4982219", "0.49816796", "0.49808562", "0.4974213", "0.4973593", "0.4973513", "0.4969463", "0.4964458", "0.49628913", "0.49627265", "0.49589178", "0.49580076", "0.4955988", "0.49533713", "0.4944619", "0.49414006", "0.49371678", "0.49362895", "0.49353033", "0.49252158", "0.4922392", "0.4921567" ]
0.5215913
26
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { rootView = inflater.inflate(R.layout.fragment_home, container, false); return rootView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
/ access modifiers changed from: protected
public String readUtf16String(ByteBuffer byteBuffer) { try { return new String(NIOUtils.toArray(byteBuffer), "utf-16"); } catch (UnsupportedEncodingException unused) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "private TMCourse() {\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.6406691", "0.6402136", "0.6400287", "0.63977665", "0.63784796", "0.6373787", "0.63716805", "0.63680965", "0.6353791", "0.63344383", "0.6327005", "0.6327005", "0.63259363", "0.63079315", "0.6279023", "0.6271251", "0.62518364", "0.62254924", "0.62218183", "0.6213994", "0.6204108", "0.6195944", "0.61826825", "0.617686", "0.6158371", "0.6138765", "0.61224854", "0.6119267", "0.6119013", "0.61006695", "0.60922325", "0.60922325", "0.6086324", "0.6083917", "0.607071", "0.6070383", "0.6067458", "0.60568124", "0.6047576", "0.6047091", "0.60342956", "0.6031699", "0.6026248", "0.6019563", "0.60169774", "0.6014913", "0.6011912", "0.59969044", "0.59951806", "0.5994921", "0.599172", "0.59913194", "0.5985337", "0.59844744", "0.59678656", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.59647757", "0.59647757", "0.59616375", "0.5956373", "0.5952514", "0.59497356", "0.59454703", "0.5941018", "0.5934147", "0.5933801", "0.59318185", "0.5931161", "0.5929297", "0.5926942", "0.5925829", "0.5924853", "0.5923296", "0.5922199", "0.59202504", "0.5918595" ]
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent arg0) { try { no = Integer.parseInt(index.getText()); max = Double.parseDouble(threshold.getText()); getData(no, max); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } dpanel.repaint(); }
{ "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
Utility to retrieve a view displaying a single permission. This provides the old UI layout for permissions; it is only here for the device admin settings to continue to use.
public static View getPermissionItemView(Context context, CharSequence grpName, CharSequence description, boolean dangerous) { LayoutInflater inflater = (LayoutInflater)context.getSystemService( Context.LAYOUT_INFLATER_SERVICE); Drawable icon = context.getDrawable(dangerous ? R.drawable.ic_bullet_key_permission : R.drawable.ic_text_dot); return getPermissionItemViewOld(context, inflater, grpName, description, dangerous, icon); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int getLayoutId() {\n return R.layout.activity_permission;\n }", "String getPermission();", "abstract public void getPermission();", "public Permission getPermission() {\n return permission;\n }", "public String getPermission()\r\n {\r\n return permission;\r\n }", "public IPermissionActivity getPermissionActivity(long id);", "@Override\r\n\tpublic Permission getPermission(int id) {\n\t\treturn null;\r\n\t}", "public String getPermission() {\n return this.permission;\n }", "public String getView();", "public String getView();", "public int getPermission(Integer resourceId);", "public FacebookPermissionsE permission(){\n\t\treturn this.permission;\n\t}", "public ViewObjectImpl getDcmRoleTemplateView() {\r\n return (ViewObjectImpl)findViewObject(\"DcmRoleTemplateView\");\r\n }", "public String getFloodPerm() throws PermissionDeniedException;", "public Integer getPermission() {\n\t\treturn permission;\n\t}", "java.lang.String getPermissions(int index);", "@Override\r\n\tpublic AdminPermission getAdminPermission(int permissionid) {\n\t\treturn adminPermissionDao.selectByPrimaryKey(permissionid);\r\n\t}", "@Nullable\n Permission getPermissionTEMP(@NonNull String permName);", "public IPermissionOwner getPermissionOwner(long id);", "@Override\n\tprotected int getResourceLayoutId() {\n\t\treturn R.layout.admin;\n\t}", "public IPermissionActivity getPermissionActivity(long ownerId, String activityFname);", "public String getPermissionDescription() {\n return permissionDescription;\n }", "@Override\r\n\tpublic String permission() {\n\t\treturn Permissions.DEFAULT;\r\n\t}", "public void permission_check() {\n //Usage Permission\n if (!isAccessGranted()) {\n new LovelyStandardDialog(MainActivity.this)\n .setTopColorRes(R.color.colorPrimaryDark)\n .setIcon(R.drawable.ic_perm_device_information_white_48dp)\n .setTitle(getString(R.string.permission_check_title))\n .setMessage(getString(R.string.permission_check_message))\n .setPositiveButton(android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(android.provider.Settings.ACTION_USAGE_ACCESS_SETTINGS);\n startActivity(intent);\n }\n })\n .setNegativeButton(android.R.string.no, null)\n .show();\n }\n }", "public Integer getPermissionId() {\n return permissionId;\n }", "public Integer getPermissionId() {\n return permissionId;\n }", "private PermissionHelper() {}", "String getViewType();", "public int getPermission() {\r\n\t\treturn nPermission;\r\n\t}", "public static AngularPermission fetchByPrimaryKey(long permissionId) {\n\t\treturn getPersistence().fetchByPrimaryKey(permissionId);\n\t}", "int getPermissionRead();", "public String getPermissionName() {\n return permissionName;\n }", "PermissionType createPermissionType();", "public java.lang.String getView() {\n return view;\n }", "public java.lang.String getView() {\n return view;\n }", "public java.lang.String getView() {\n return view;\n }", "protected abstract int getLayoutViewId();", "public Integer getPermissionTypeId() {\n return permissionTypeId;\n }", "Permission selectByPrimaryKey(Integer id);", "public ViewIdentificator getView() {\r\n return view;\r\n }", "public static String applicationPermission() {\n return holder.format(\"applicationPermission\");\n }", "public abstract String getView();", "@Override\n\tpublic long getPermissionTypeId() {\n\t\treturn _permissionType.getPermissionTypeId();\n\t}", "public IPermissionActivity getPermissionActivity(String ownerFname, String activityFname);", "public T casePermission(Permission object) {\n\t\treturn null;\n\t}", "public DialogView getView() {\n // Create view lazily only once it's needed\n if (this.home3DAttributesView == null) {\n this.home3DAttributesView = this.viewFactory.createHome3DAttributesView(\n this.preferences, this); \n }\n return this.home3DAttributesView;\n }", "public ViewObjectImpl getDcmUserTemplateView() {\r\n return (ViewObjectImpl)findViewObject(\"DcmUserTemplateView\");\r\n }", "Permission selectByPrimaryKey(String id);", "com.google.ads.googleads.v6.resources.ClickView getClickView();", "public ViewLinkImpl getDcmRoleTemplateLnk() {\r\n return (ViewLinkImpl)findViewLink(\"DcmRoleTemplateLnk\");\r\n }", "public ViewObjectImpl getDcmCombinationView() {\r\n return (ViewObjectImpl)findViewObject(\"DcmCombinationView\");\r\n }", "PermissionService getPermissionService();", "Object getPerm(String name);", "String getViewClass();", "@Override\n @XmlTransient // Only for permission checks, don't serialize to XML\n public String getId() {\n return PERMISSION;\n }", "@Override\n\tprotected String getView() {\n\t\treturn SOTGView.CONTECT_VIEW;\n\t}", "@Override\n\tpublic ISettingsView getSettingsView() {\n\t\tLog.debug(\"getSettingsView is null ......................\");\n\t\treturn null;\n\t}", "public PermissionHandler getHandler() {\r\n return Permissions.Security;\r\n }", "private JMenu getMnuView() {\r\n\t\tif (mnuView == null) {\r\n\t\t\tmnuView = new JMenu();\r\n\t\t\tmnuView.setText(\"View\");\r\n\t\t\tmnuView.add(getMnuGoTo());\r\n\t\t\tmnuView.add(getSepView1());\r\n\t\t\tmnuView.add(getMniDebug());\r\n\t\t\tmnuView.add(getMniAutoRun());\r\n\t\t\tmnuView.add(getMniViewVXML());\r\n\t\t\tmnuView.add(getMniViewJS());\r\n\t\t}\r\n\t\treturn mnuView;\r\n\t}", "@OnShowRationale({Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_WIFI_STATE, Manifest.permission.CHANGE_WIFI_STATE})\n void showrequirepermission(final PermissionRequest request) {\n\n new AlertDialog.Builder(this)\n .setMessage(\"this app want to access Wifi\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n request.proceed();\n }\n })\n .setNegativeButton(\"Cancle\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n request.cancel();\n }\n })\n .show();\n\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n starnamed.x.wasm.v1beta1.Types.AccessConfig, starnamed.x.wasm.v1beta1.Types.AccessConfig.Builder, starnamed.x.wasm.v1beta1.Types.AccessConfigOrBuilder> \n getInstantiatePermissionFieldBuilder() {\n if (instantiatePermissionBuilder_ == null) {\n instantiatePermissionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n starnamed.x.wasm.v1beta1.Types.AccessConfig, starnamed.x.wasm.v1beta1.Types.AccessConfig.Builder, starnamed.x.wasm.v1beta1.Types.AccessConfigOrBuilder>(\n getInstantiatePermission(),\n getParentForChildren(),\n isClean());\n instantiatePermission_ = null;\n }\n return instantiatePermissionBuilder_;\n }", "public String getFloodPerm(String dpidStr) throws PermissionDeniedException;", "protected View getCompartmentView() {\n\t\tView view = (View) getDecoratorTarget().getAdapter(View.class);\r\n\t\tIterator it = view.getPersistedChildren().iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tView child = (View) it.next();\r\n\t\t\tif (child.getType().equals(DeployCoreConstants.HYBRIDLIST_SEMANTICHINT)) {\r\n\t\t\t\treturn child;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String getPermissionAdmin() {\n return permissionAdmin;\n }", "public IAuthorizationPrincipal getPrincipal(IPermission permission)\n throws AuthorizationException;", "ListView getManageAccountListView();", "public boolean isPermissionGranted(String permission){\n return true;\n// else\n// return false;\n }", "public starnamed.x.wasm.v1beta1.Types.AccessConfig getInstantiatePermission() {\n if (instantiatePermissionBuilder_ == null) {\n return instantiatePermission_ == null ? starnamed.x.wasm.v1beta1.Types.AccessConfig.getDefaultInstance() : instantiatePermission_;\n } else {\n return instantiatePermissionBuilder_.getMessage();\n }\n }", "public boolean checkPermission(Permission permission);", "@Override\n\tpublic View getView(String viewName) {\n\n\t\tint resourceID = context.getResources().getIdentifier(viewName, \"id\",\n\t\t\t\tcontext.getPackageName());\n\t\tviewObject = activity.findViewById(resourceID);\n\n\t\treturn viewObject;\n\t}", "public ViewObjectImpl getDcmTemplateCombinationView() {\r\n return (ViewObjectImpl)findViewObject(\"DcmTemplateCombinationView\");\r\n }", "@Override\n public void onClick(View view) {\n String platform = checkPlatform();\n if (platform.equals(\"Marshmallow\")) {\n Log.d(TAG, \"Runtime permission required\");\n //Step 2. check the permission\n boolean permissionStatus = checkPermission();\n if (permissionStatus) {\n //Permission already granted\n Log.d(TAG, \"Permission already granted\");\n } else {\n //Permission not granted\n //Step 3. Explain permission i.e show an explanation\n Log.d(TAG, \"Explain permission\");\n explainPermission();\n //Step 4. Request Permissions\n Log.d(TAG, \"Request Permission\");\n requestPermission();\n }\n\n } else {\n Log.d(TAG, \"onClick: Runtime permission not required\");\n }\n\n\n }", "@Override\n\tpublic int getResView() {\n\t\treturn \tR.layout.pop_level_list;\n\t}", "@RequestMapping(value = \"/getPermissionForUserMenu\", method = RequestMethod.GET)\n\tpublic ResponseEntity<?> getPermissionForUserMenu() throws JsonParseException, JsonMappingException, IOException {\n\t\tMap<String, Object> result = permissionAuthorize.getPermissionForUserMenu(SecurityUtil.getIdUser());\n\t\t// return.\n\t\treturn new ResponseEntity<Map<String, Object>>(result, HttpStatus.OK);\n\t}", "ViewMap<IBranchMapping> getView();", "public interface PolicyViewDisplay extends PolicyPageTemplateDisplay {\n\t\t\n\t\t/** The MI n_ scrollba r_ size. */\n\t\tpublic static int MIN_SCROLLBAR_SIZE = 5;\n\t\t\n\t\tButton getCancelButton();\n\n\t\tResourcesContentDisplay getResourceContentView();\n\n\t\tSubjectContentDisplay getSubjectContentView();\n\n\t\tvoid setPolicyDesc(String policyDesc);\n\n\t\tvoid setPolicyName(String policyName);\n\n\t\tvoid setPolicyType(String policyType);\n\n\t\tvoid setPolicyStatus(boolean enabled);\n\n\t\tvoid clear();\n\n\t\tvoid error(String msg);\n\n\t\tUserAction getSelectedAction();\n\n\t\tvoid setExtraFieldList(List<ExtraField> extraFieldList);\n\n\t\tvoid setExtraFieldAvailable(boolean available);\n\n\t}", "protected static View getView(String workspaceId, String modelId,\n String moduleId, String viewId) throws AnaplanAPIException {\n Module module = getModule(workspaceId, modelId, moduleId);\n\n if (module == null) {\n return null;\n }\n if (viewId == null || viewId.isEmpty()) {\n LOG.error(\"A view ID must be provided\");\n return null;\n }\n View view = module.getView(viewId);\n if (view == null) {\n LOG.error(\"View \\\"{}\\\" not found in workspace \\\"{}\\\", model \\\"{}\\\", module \\\"{}\\\"\",\n viewId, workspaceId, modelId, moduleId);\n }\n return view;\n }", "EpermissionDO selectByPrimaryKey(Long id);", "public PolicyPermission getPolicyPermission()\n {\n return this.perm;\n }", "public IPermissionOwner getPermissionOwner(String fname);", "public ViewObjectImpl getDcmTemplateView() {\r\n return (ViewObjectImpl)findViewObject(\"DcmTemplateView\");\r\n }", "public void setPermission(String permission)\r\n {\r\n this.permission = permission;\r\n }", "public com.tangosol.net.ClusterPermission getPermission()\n {\n return __m_Permission;\n }", "@Column(name = \"PERMISSION_ACCESS\")\n\tpublic String getPermissionAccess()\n\t{\n\t\treturn permissionAccess;\n\t}", "public static PermissionUtil getInstance() {\n return LazyHolder.permissionUtil;\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState)\n\t{\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.permission_details);\n\t}", "java.lang.String getView();", "@PreAuthorize(\"hasRole('ROLE_ADMIN') or (#pluginIdentifier == 'dictionaries') or (#pluginIdentifier == 'products' \"\n + \"and (#viewName != 'orders' and #viewName != 'order' or hasRole('ROLE_SUPERVISOR'))) or \"\n + \"(#pluginIdentifier == 'basic') or \"\n + \"(#pluginIdentifier == 'users' and #viewName == 'profile') or (#pluginIdentifier == 'core' and #viewName == 'systemInfo')\")\n ViewDefinition get(String pluginIdentifier, String viewName);", "public PermissionSet getPermissionSet() {\n return permissionSet;\n }", "public ViewObjectImpl getDcmTemplateCatView() {\r\n return (ViewObjectImpl)findViewObject(\"DcmTemplateCatView\");\r\n }", "public int getContentViewLayoutID() {\n return R.layout.activity_login_main;\n }", "Object getPerm(String name, Object def);", "@Override\r\n\tpublic Permission queryRootPermission() {\n\t\treturn permissionDao.queryRootPermission();\r\n\t}", "public java.lang.String getPermissions(int index) {\n return permissions_.get(index);\n }", "@Override\n public boolean shouldShowRequestPermissionRationale(@NonNull String permission) {\n return false;\n }", "@Override\n\tpublic java.lang.String getDescription() {\n\t\treturn _permissionType.getDescription();\n\t}", "@Override\n public void checkPermission(Permission perm) {\n }", "public java.lang.String getPermissions(int index) {\n return permissions_.get(index);\n }", "@Provides\n @Singleton\n public PermissionHandler providePermissionHandler() {\n return new PermissionHandler();\n }", "@Schema(description = \"(Write-Only) Id of permission set\")\n public Long getPermissionSetId() {\n return permissionSetId;\n }" ]
[ "0.6640611", "0.613677", "0.6057739", "0.596555", "0.5930721", "0.58285445", "0.5784083", "0.5753086", "0.5750457", "0.5750457", "0.5683477", "0.565173", "0.5591399", "0.5549618", "0.5506153", "0.5502605", "0.547272", "0.54684234", "0.54681385", "0.5459781", "0.5447416", "0.54255706", "0.54220045", "0.5418039", "0.53975827", "0.53975827", "0.5389695", "0.5388755", "0.53560287", "0.53436995", "0.5329303", "0.5326514", "0.5296477", "0.5262913", "0.5262913", "0.5262913", "0.52595687", "0.52525043", "0.5251265", "0.52490896", "0.52121323", "0.52075434", "0.5194739", "0.51932853", "0.5189708", "0.5189588", "0.5172703", "0.5167927", "0.51616883", "0.5159292", "0.51512414", "0.5137422", "0.5126423", "0.5100697", "0.5089713", "0.5086186", "0.50857544", "0.5081875", "0.507411", "0.5066003", "0.5065053", "0.5050432", "0.5048924", "0.50460565", "0.50349694", "0.5025315", "0.50184053", "0.5012639", "0.50077856", "0.49820822", "0.49779752", "0.49654624", "0.49652085", "0.4965177", "0.4961198", "0.49481502", "0.49430183", "0.49399018", "0.49357763", "0.4931961", "0.492382", "0.49234742", "0.4921302", "0.4919708", "0.4918928", "0.49186602", "0.49087015", "0.49043378", "0.48994458", "0.48951238", "0.48914447", "0.48875356", "0.48766539", "0.48711124", "0.487033", "0.48628366", "0.48613694", "0.48576078", "0.48554435", "0.48489362" ]
0.5965785
3
Retorna la ruta del archivo .xls de esilo de vida.
public String getRutaEstilo() { return rutaEstilo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String selectExcelFile (){\n\t\t\tfinal JFileChooser fc = new JFileChooser();\r\n\t\t\tfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\r\n\t\t\t\r\n\t\t\t//In response to a button click:\r\n\t\t\tint folderTarget = fc.showDialog(fc, \"Select Ecxel File\");\r\n\t\t\t\r\n\t\t\tString path =\"\";\r\n\t\t\tif (folderTarget == JFileChooser.APPROVE_OPTION){\r\n\t\t\t\tpath = fc.getSelectedFile().getAbsolutePath();\r\n\t\t\t\treturn path;\r\n\t\t\t} else if (folderTarget == JFileChooser.CANCEL_OPTION){\r\n\t\t\t\tfc.setVisible(false);\r\n\t\t\t}\t\r\n\t\t\treturn path;\r\n\t\t}", "public static void main(String[] args) throws IOException {\nFileInputStream f=new FileInputStream(\"D:\\\\AccuSelenium\\\\Ram\\\\TEST\\\\TestData\\\\LoginData.xls\");\nHSSFWorkbook w=new HSSFWorkbook(f);\nHSSFSheet s=w.getSheet(\"sheet1\");\nSystem.out.println(s.getRow(1));\n}", "void readExcel(File existedFile) throws Exception;", "public void gettingDesktopPath() {\n FileSystemView filesys = FileSystemView.getFileSystemView();\n File[] roots = filesys.getRoots();\n homePath = filesys.getHomeDirectory().toString();\n System.out.println(homePath);\n //checking if file existing on that location\n pathTo = homePath + \"\\\\SpisakReversa.xlsx\";\n }", "public final File getExcelFile() {\n\t\treturn excelFile;\n\t}", "public void guardarArchivoXLS(HSSFWorkbook libro)\r\n {\r\n JFileChooser fileChooserAlumnos = new JFileChooser();\r\n \r\n //filtro para ver solo archivos .xls\r\n fileChooserAlumnos.addChoosableFileFilter(new FileNameExtensionFilter(\"todos los archivos *.XLS\", \"xls\",\"XLS\"));\r\n int seleccion = fileChooserAlumnos.showSaveDialog(null);\r\n \r\n try{\r\n \t//comprueba si ha presionado el boton de aceptar\r\n if (seleccion == JFileChooser.APPROVE_OPTION){\r\n File archivoJFileChooser = fileChooserAlumnos.getSelectedFile();\r\n FileOutputStream archivo = new FileOutputStream(archivoJFileChooser+\".xls\");\r\n libro.write(archivo); \r\n JOptionPane.showMessageDialog(null,\"Se guardó correctamente el archivo\", \"Guardado exitoso!\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n }catch (Exception e){\r\n JOptionPane.showMessageDialog(null,\"Error al guardar el archivo!\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "private void gerarArquivoExcel() {\n\t\tFile currDir = getPastaParaSalvarArquivo();\n\t\tString path = currDir.getAbsolutePath();\n\t\t// Adiciona ao nome da pasta o nome do arquivo que desejamos utilizar\n\t\tString fileLocation = path.substring(0, path.length()) + \"/relatorio.xls\";\n\t\t\n\t\t// mosta o caminho que exportamos na tela\n\t\ttextField.setText(fileLocation);\n\n\t\t\n\t\t// Criação do arquivo excel\n\t\ttry {\n\t\t\t\n\t\t\t// Diz pro excel que estamos usando portguês\n\t\t\tWorkbookSettings ws = new WorkbookSettings();\n\t\t\tws.setLocale(new Locale(\"pt\", \"BR\"));\n\t\t\t// Cria uma planilha\n\t\t\tWritableWorkbook workbook = Workbook.createWorkbook(new File(fileLocation), ws);\n\t\t\t// Cria uma pasta dentro da planilha\n\t\t\tWritableSheet sheet = workbook.createSheet(\"Pasta 1\", 0);\n\n\t\t\t// Cria um cabeçario para a Planilha\n\t\t\tWritableCellFormat headerFormat = new WritableCellFormat();\n\t\t\tWritableFont font = new WritableFont(WritableFont.ARIAL, 16, WritableFont.BOLD);\n\t\t\theaderFormat.setFont(font);\n\t\t\theaderFormat.setBackground(Colour.LIGHT_BLUE);\n\t\t\theaderFormat.setWrap(true);\n\n\t\t\tLabel headerLabel = new Label(0, 0, \"Nome\", headerFormat);\n\t\t\tsheet.setColumnView(0, 60);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\theaderLabel = new Label(1, 0, \"Idade\", headerFormat);\n\t\t\tsheet.setColumnView(0, 40);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\t// Cria as celulas com o conteudo\n\t\t\tWritableCellFormat cellFormat = new WritableCellFormat();\n\t\t\tcellFormat.setWrap(true);\n\n\t\t\t// Conteudo tipo texto\n\t\t\tLabel cellLabel = new Label(0, 2, \"Elcio Bonitão\", cellFormat);\n\t\t\tsheet.addCell(cellLabel);\n\t\t\t// Conteudo tipo número (usar jxl.write... para não confundir com java.lang.number...)\n\t\t\tjxl.write.Number cellNumber = new jxl.write.Number(1, 2, 49, cellFormat);\n\t\t\tsheet.addCell(cellNumber);\n\n\t\t\t// Não esquecer de escrever e fechar a planilha\n\t\t\tworkbook.write();\n\t\t\tworkbook.close();\n\n\t\t} catch (IOException e1) {\n\t\t\t// Imprime erro se não conseguir achar o arquivo ou pasta para gravar\n\t\t\te1.printStackTrace();\n\t\t} catch (WriteException e) {\n\t\t\t// exibe erro se acontecer algum tipo de celula de planilha inválida\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void saveExcel() {\r\n\t\ttry {\r\n\t\t\tFileOutputStream fileOut = new FileOutputStream(Constant.EXCEL_PATH);\r\n\t\t\tworkBook.write(fileOut);\r\n\t\t\tfileOut.flush();\r\n\t\t\tfileOut.close();\r\n\t\t} catch (FileNotFoundException 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}", "public List<FileRow> getExcel_file() {\r\n\t\treturn excel_file;\r\n\t}", "@Override\n public void escribirExcel(String pathPlan, String pathDeex, String nombResa) throws Exception {\n LOGGER.info(\"Iniciando escritura del archivo en excel\");\n\n LOGGER.debug(\"Ruta de la plantilla {}\", pathPlan);\n LOGGER.debug(\"Ruta donde se va a escribir la plantilla {} \", pathDeex);\n\n //Archivo Origen\n File archOrig = null;\n //Archivo Destino\n File archDest = null;\n //ruta completa de la plantilla\n String pathDefi = pathDeex + File.separator + nombResa;\n //Registra del archivo de excel\n Row row = null;\n //Celda en el archivo de excel\n Cell cell;\n //Hoja de excel\n Sheet sheet = null;\n //Numero de hojas en el libro de excel\n int numberOfSheets;\n //Constantes\n final String NOMBRE_HOJA = \"RESULTADOS EVALUACION\";\n // Fila y columna para \n int fila = 0;\n int columna = 0;\n //Fila inicio evidencia\n int filaEvid;\n\n try {\n archOrig = new File(pathPlan);\n\n if (!archOrig.exists()) {\n LOGGER.debug(\"Plantilla no existe en la ruta {} \", pathPlan);\n throw new IOException(\"La plantilla no existe en la ruta \" + pathPlan);\n }\n\n archDest = new File(pathDeex);\n\n if (!archDest.exists()) {\n LOGGER.debug(\"Ruta no existe donde se va a depositar el excel {} , se va a crear\", pathDeex);\n archDest.mkdirs();\n }\n\n LOGGER.info(\"Ruta del archivo a crear {}\", pathDefi);\n archDest = new File(pathDefi);\n\n if (!archDest.exists()) {\n LOGGER.info(\"No existe el archivo en la ruta {}, se procede a la creacion \", pathDefi);\n archDest.createNewFile();\n } else {\n\n LOGGER.info(\"el archivo que se requiere crear, ya existe {} se va a recrear\", pathDefi);\n archDest.delete();\n LOGGER.info(\"archivo en la ruta {}, borrado\", pathDefi);\n archDest.createNewFile();\n\n LOGGER.info(\"archivo en la ruta {}, se vuelve a crear\", pathDefi);\n\n }\n\n LOGGER.info(\"Se inicia con la copia de la plantilla de la ruta {} a la ruta {} \", pathPlan, pathDefi);\n try (FileChannel archTror = new FileInputStream(archOrig).getChannel();\n FileChannel archTrDe = new FileOutputStream(archDest).getChannel();) {\n\n archTrDe.transferFrom(archTror, 0, archTror.size());\n\n LOGGER.info(\"Termina la copia del archivo\");\n\n } catch (Exception e) {\n LOGGER.info(\"Se genera un error con la transferencia {} \", e.getMessage());\n throw new Exception(\"Error [\" + e.getMessage() + \"]\");\n }\n\n LOGGER.info(\"Se inicia con el diligenciamiento del formato \");\n\n LOGGER.info(\"Nombre Archivo {}\", archDest.getName());\n if (!archDest.getName().toLowerCase().endsWith(\"xls\")) {\n throw new Exception(\"La plantilla debe tener extension xls\");\n }\n\n try (FileInputStream fis = new FileInputStream(archDest);\n Workbook workbook = new HSSFWorkbook(fis);\n FileOutputStream fos = new FileOutputStream(archDest);) {\n\n if (workbook != null) {\n numberOfSheets = workbook.getNumberOfSheets();\n LOGGER.debug(\"Numero de hojas {}\", numberOfSheets);\n\n LOGGER.info(\"Hoja seleccionada:{}\", NOMBRE_HOJA);\n sheet = workbook.getSheetAt(0);\n\n fila = 5;\n\n LOGGER.info(\"Se inicia con la escritura de las oportunidades de mejora\");\n\n LOGGER.info(\"Creando las celdas a llenar\");\n\n for (int numeFila = fila; numeFila < this.listOpme.size() + fila; numeFila++) {\n\n LOGGER.info(\"Fila {} \", numeFila);\n if (numeFila > 8) {\n\n copyRow(workbook, sheet, numeFila - 2, numeFila - 1);\n sheet.addMergedRegion(new CellRangeAddress(numeFila - 1, numeFila - 1, 1, 4));\n sheet.addMergedRegion(new CellRangeAddress(numeFila - 1, numeFila - 1, 6, 7));\n\n }\n\n }\n\n LOGGER.info(\"Terminando de llenar celdas\");\n LOGGER.info(\"Poblar registros desde {} \", fila);\n\n for (OptuMejo optuMejo : this.listOpme) {\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 1. Valor Capacitacion tecnica {}\", fila, optuMejo.getCapaTecn());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(1);\n\n cell.setCellValue(optuMejo.getCapaTecn());\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 6. Valor compromisos del area {}\", fila, optuMejo.getComporta());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(6);\n\n cell.setCellValue(optuMejo.getComporta());\n\n fila++;\n\n }\n LOGGER.info(\"Termino de poblar el registro hasta {} \", fila);\n //Ajustando los formulario\n if (fila > 8) {\n sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 6));\n } else {\n fila = 9;\n }\n\n /* sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 6));*/\n LOGGER.info(\"Fin de la escritura de las oportunidades de mejora\");\n\n LOGGER.info(\"Se inicia la escritura de las evidencias \");\n\n fila += 2;\n filaEvid = fila + 5;\n\n LOGGER.info(\"Se inicia la creacion de las celdas desde el registro {} \", fila);\n\n for (Evidenci evidenci : this.listEvid) {\n\n if (filaEvid < fila) {\n copyRow(workbook, sheet, fila - 1, fila);\n\n }\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 1. Valor Fecha {}\", fila, evidenci.getFecha());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(1);\n\n cell.setCellValue(evidenci.getFecha());\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 6. Valor compromisos del area {}\", fila, evidenci.getDescripc());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(2);\n\n cell.setCellValue(evidenci.getDescripc());\n\n sheet.addMergedRegion(new CellRangeAddress(fila, fila, 2, 6));\n\n fila++;\n\n }\n\n LOGGER.info(\"Fin de la escritura de las Evidencias\");\n\n LOGGER.info(\"Inicio de escritura de calificaciones\");\n //Ajustando los formulario - resultado\n\n /*sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));*/\n if (fila > filaEvid) {\n LOGGER.info(\"Fila a ejecutar {} \", fila);\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 2, fila + 2, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 3, fila + 3, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 4, fila + 4, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 6, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 2, fila + 4, 6, 7));\n //Firma del evaluado ajuste\n sheet.addMergedRegion(new CellRangeAddress(fila + 5, fila + 5, 1, 3));\n sheet.addMergedRegion(new CellRangeAddress(fila + 5, fila + 5, 4, 6));\n\n //Ajustando recursos\n sheet.addMergedRegion(new CellRangeAddress(fila + 6, fila + 6, 1, 7));\n\n sheet.addMergedRegion(new CellRangeAddress(fila + 8, fila + 8, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 10, fila + 10, 1, 7));\n\n } else {\n fila = filaEvid + 1;\n LOGGER.info(\"Fila a ejecutar {} \", fila);\n }\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor Excelente {}\", fila + 2, this.excelent);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 2);\n cell = row.getCell(2);\n\n cell.setCellValue((this.excelent != null ? this.excelent : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor satisfactorio {}\", fila + 3, this.satisfac);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 3);\n cell = row.getCell(2);\n\n cell.setCellValue((this.satisfac != null ? this.satisfac : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 3. Valor no satisfactorio {}\", fila + 4, this.noSatisf);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 4);\n cell = row.getCell(2);\n\n cell.setCellValue((this.noSatisf != null ? this.noSatisf : \"\"));\n\n //Ajustando Total Calificacion en Numero\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor total calificacion {}\", fila + 2, this.numeToca);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 2);\n cell = row.getCell(6);\n\n cell.setCellValue(this.numeToca);\n\n LOGGER.info(\"Fin de escritura de calificaciones\");\n\n LOGGER.info(\"Inicio de escritura de interposicion de recursos\");\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 7, this.siinRecu);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 7);\n cell = row.getCell(6);\n\n cell.setCellValue(\"SI:\" + (this.siinRecu != null ? this.siinRecu : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 7, this.noinRecu);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 7);\n cell = row.getCell(7);\n\n cell.setCellValue(\"NO:\" + (this.noinRecu != null ? this.noinRecu : \"\"));\n \n \n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 8, this.fech);\n \n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 8);\n cell = row.getCell(1);\n\n cell.setCellValue(\"FECHA:\" + (this.fech != null ? this.fech : \"\"));\n \n \n\n LOGGER.info(\"Fin de escritura de interposicion de recursos\");\n\n //Ajustando recursos\n workbook.write(fos);\n\n } else {\n throw new Exception(\"No se cargo de manera adecuada el archivo \");\n }\n\n } catch (Exception e) {\n System.out.println(\"\" + e.getMessage());\n }\n\n } catch (Exception e) {\n LOGGER.error(e.getMessage());\n throw new Exception(e.getMessage());\n }\n }", "public void getExportedBookDataXlsFileByUser(){\n File mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n //String pathName = mPath.getPath() + \"/\" + \"sample_wordbook_daum.xls\";\n //Manager_SystemControl.saveFileFromInputStream(databaseInputStream,pathName);\n\n final Manager_FileDialog managerFileDialog = new Manager_FileDialog(this, mPath, \".xls\");\n managerFileDialog.addFileListener(new Manager_FileDialog.FileSelectedListener() {\n public void fileSelected(File file) {\n managerFileDialog.removeFileListener(this);\n new LoadDaumXlsFile(WordListActivity.this,file.getPath()).execute();\n }\n });\n managerFileDialog.showDialog();\n }", "public String getXLSDirectory() {\n\t\treturn props.getProperty(ARGUMENT_XLS_DIRECTORY);\n\t}", "public String read_XL_Data(String path,String sheet,int row,int cell) throws EncryptedDocumentException, FileNotFoundException, IOException \r\n{\r\n\tString data=\"\";\r\n\r\n\tWorkbook wb = WorkbookFactory.create(new FileInputStream(path));\r\n\tdata=wb.getSheet(sheet).getRow(row).getCell(cell).toString();\r\n\t\r\n\treturn data;\r\n}", "public static void main(String[] args) {\n String filePath=\"C:\\\\down\\\\gogo.xls\";\r\n \r\n HSSFWorkbook workbook = new HSSFWorkbook(); // 새 엑셀 생성\r\n HSSFSheet sheet = workbook.createSheet(\"sheet1\"); // 새 시트(Sheet) 생성\r\n HSSFRow row = sheet.createRow(0); // 엑셀의 행은 0번부터 시작\r\n HSSFCell cell = row.createCell(0); // 행의 셀은 0번부터 시작\r\n cell.setCellValue(\"data\"); //생성한 셀에 데이터 삽입\r\n try {\r\n FileOutputStream fileoutputstream = new FileOutputStream(\"C:\\\\down\\\\gogo.xls\");\r\n workbook.write(fileoutputstream);\r\n fileoutputstream.close();\r\n System.out.println(\"엑셀파일생성성공\");\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n System.out.println(\"엑셀파일생성실패\");\r\n }\r\n\r\n}", "public static XSSFSheet setExcelFile() throws Exception {\n\n XSSFSheet ExcelWSheet;\n XSSFWorkbook ExcelWBook;\n XSSFRow Row;\n String Path;\n String SheetName;\n\n try {\n // Open the Excel file\n Path = fetchMyProperties(\"spreadsheet_path\");\n SheetName= fetchMyProperties(\"sheet_name\");\n FileInputStream ExcelFile = new FileInputStream(Path);\n\n // Access the required test data sheet\n ExcelWBook = new XSSFWorkbook(ExcelFile);\n ExcelWSheet = ExcelWBook.getSheet(SheetName);\n\n } catch (Exception e){\n throw (e);\n }\n return ExcelWSheet;\n }", "public String chooserFile(String def) {\r\n\t\tString res = \"\";\r\n\t\tString defpath = def;\r\n\t\tJFileChooser chooser = new JFileChooser();\r\n\t\tchooser.setCurrentDirectory(new File(defpath));\r\n\r\n\t\tchooser.setFileFilter(new javax.swing.filechooser.FileFilter() {\r\n\t\t\tpublic boolean accept(File f) {\r\n\t\t\t\treturn f.getName().toLowerCase().endsWith(\".xlsx\") || f.isDirectory();\r\n\t\t\t}\r\n\r\n\t\t\tpublic String getDescription() {\r\n\t\t\t\treturn \"Excel Mapping File\";\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tint r = chooser.showOpenDialog(new JFrame());\r\n\t\tif (r == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t//String name = chooser.getSelectedFile().getName();\r\n\t\t\tString path = chooser.getSelectedFile().getPath();\r\n\t\t\t//System.out.println(name + \"\\n\" + path);\r\n\t\t\tres = path;\r\n\t\t} else if (r == JFileChooser.CANCEL_OPTION) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"User cancelled operation. No file was chosen.\");\r\n\t\t} else if (r == JFileChooser.ERROR_OPTION) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"An error occured. No file was chosen.\");\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"Unknown operation occured.\");\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "String getFilepath();", "Excel getExcelInst();", "File getSaveLocation();", "Path getModBookFilePath();", "private XSSFSheet getExcelSheet(String filename) throws IOException {\n\tFile excelFile = new File(filename);\n\tFileInputStream excelInputStream = new FileInputStream(excelFile);\n\tXSSFWorkbook workBook = new XSSFWorkbook(excelInputStream);\n\tXSSFSheet hssfSheet = workBook.getSheetAt(FIRST_SHEET_ON_BOOK);\n\treturn hssfSheet;\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\t\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\t\t\t\t\".xls\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\t\t\t\t\"xls\"); // 파일 필터로 사용되는 확장자. *.xml 만 나열됨\r\n\t\t\t\t\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\t\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\r\n\t\t\t\t\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\t\t\t\t\tint ret = chooser.showSaveDialog(null);\r\n\t\t\t\t\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"저장경로를 선택하지 않으셨습니다.\", \"경고\",\r\n\t\t\t\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// 사용자가 파일을 선택하고 \"저장\" 버튼을 누른 경우\r\n\t\t\t\t\t\t\t\t//String saveFilePath = chooser.getSelectedFile().toString() + chooser.getFileFilter().getDescription(); // 파일 경로명을 알아온다.\t\t\t\t\r\n\t\t\t\t\t\t\t\tString saveFilePath = chooser.getSelectedFile().toString();\r\n\t\t\t\t\t\t\t\tif(saveFilePath.contains(\".xls\")){\r\n\t\t\t\t\t\t\t\t\tif(saveFilePath.endsWith(\"x\"))\r\n\t\t\t\t\t\t\t\t\t\tsaveFilePath = saveFilePath.replace(\"xlsx\", \"xls\");\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\tsaveFilePath = chooser.getSelectedFile().toString();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\tsaveFilePath = chooser.getSelectedFile().toString() + chooser.getFileFilter().getDescription();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tsaveToExcel(saveFilePath);\r\n\t\t\t\t\t\t\t}", "private Sheet getActualSheet() throws IOException{\r\n File file = new File(\"evidence.ods\");\r\n SpreadSheet spreadSheet = SpreadSheet.createFromFile(file);\r\n return spreadSheet.getSheet(spreadSheet.getSheetCount()-1);\r\n }", "String getFilePath();", "public static void main(String[] args) throws IOException, \n FileNotFoundException, ValidacionPS2, \n IllegalArgumentException, \n IllegalAccessException, URISyntaxException { \n ArchivoIO archivoIO = new ArchivoIO(); \n InputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n System.out.println(\"Introduce el path del archivo de excel.\");\n System.out.println(\"ejemplo: C:\\\\Users\\\\Laptop\\\\Downloads\\\\\"\n + \"archivo.xls: \");\n System.out.println(\"path: \");\n String path = br.readLine();\n ArrayList<LDL> datos = archivoIO.convertirExcelALDL(path);\n File f=archivoIO.escribirResultados(datos,path);\n System.out.println(\"Revise los resultados en la ruta:\\n\" \n + f.getAbsolutePath());\n isr.close();\n br.close(); \n }", "public void exportXLS() {\n\t\t// Create a Workbook\n\t\tWorkbook workbook = new HSSFWorkbook(); // new HSSFWorkbook() for\n\t\t\t\t\t\t\t\t\t\t\t\t// generating `.xls` file\n\n\t\t/*\n\t\t * CreationHelper helps us create instances of various things like DataFormat,\n\t\t * Hyperlink, RichTextString etc, in a format (HSSF, XSSF) independent way\n\t\t */\n\t\tCreationHelper createHelper = workbook.getCreationHelper();\n\n\t\t// Create a Sheet\n\t\tSheet sheet = workbook.createSheet(\"العقود\");\n\n\t\t// Create a Font for styling header cells\n\t\tFont headerFont = workbook.createFont();\n\t\theaderFont.setBold(true);\n\t\theaderFont.setFontHeightInPoints((short) 14);\n\t\theaderFont.setColor(IndexedColors.RED.getIndex());\n\n\t\t// Create a CellStyle with the font\n\t\tCellStyle headerCellStyle = workbook.createCellStyle();\n\t\theaderCellStyle.setFont(headerFont);\n\n\t\t// Create a Row\n\t\tRow headerRow = sheet.createRow(0);\n\n\t\tString[] columns = { \"الرقم\", \"رقم العقد \", \"تاريخ البداية\", \"تاريخ النهاية\", \"المستثمر\", \"حالة الفاتورة\" };\n\t\t// Create cells\n\t\tfor (int i = 0; i < columns.length; i++) {\n\t\t\tCell cell = headerRow.createCell(i);\n\t\t\tcell.setCellValue(columns[i]);\n\t\t\tcell.setCellStyle(headerCellStyle);\n\t\t}\n\n\t\t// Create Cell Style for formatting Date\n\t\tCellStyle dateCellStyle = workbook.createCellStyle();\n\t\tdateCellStyle.setDataFormat(createHelper.createDataFormat().getFormat(\"dd-MM-yyyy\"));\n\n\t\t// Create Other rows and cells with employees data\n\t\tint rowNum = 1;\n\t\tint num = 1;\n//\t\tfor (ContractDirect contObj : contractsDirectList) {\n//\t\t\tRow row = sheet.createRow(rowNum++);\n//\t\t\trow.createCell(0).setCellValue(num);\n//\t\t\trow.createCell(1).setCellValue(contObj.getContractNum());\n//\n//\t\t\tif (!tableHigriMode) {\n//\t\t\t\tCell date1 = row.createCell(2);\n//\t\t\t\tdate1.setCellValue(contObj.getStartContDate());\n//\t\t\t\tdate1.setCellStyle(dateCellStyle);\n//\t\t\t\tCell date2 = row.createCell(3);\n//\t\t\t\tdate2.setCellValue(contObj.getEndContDate());\n//\t\t\t\tdate2.setCellStyle(dateCellStyle);\n//\t\t\t} else {\n//\t\t\t\tCell date1 = row.createCell(2);\n//\t\t\t\tdate1.setCellValue(contObj.getStartDate());\n//\t\t\t\tdate1.setCellStyle(dateCellStyle);\n//\t\t\t\tCell date2 = row.createCell(3);\n//\t\t\t\tdate2.setCellValue(contObj.getEndDate());\n//\t\t\t\tdate2.setCellStyle(dateCellStyle);\n//\t\t\t}\n//\n//\t\t\tInvestor inv = (Investor) dataAccessService.findEntityById(Investor.class, contObj.getInvestorId());\n//\t\t\trow.createCell(4).setCellValue(inv.getName());\n//\t\t\trow.createCell(5).setCellValue(contObj.getPayStatusName());\n//\t\t\tnum++;\n//\t\t}\n\n\t\t// Resize all columns to fit the content size\n\t\tfor (int i = 0; i < columns.length; i++) {\n\t\t\tsheet.autoSizeColumn(i);\n\t\t}\n\n\t\t// Write the output to a file\n\n\t\ttry {\n\t\t\tString path = \"D:/العقود.xls\";\n\t\t\tFileOutputStream fileOut = new FileOutputStream(path);\n\t\t\tworkbook.write(fileOut);\n\t\t\tfileOut.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\t\ttry {\n\n\t\t\tworkbook.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\t// Closing the workbook\n\n\t}", "java.lang.String getFilePath();", "void writeExcel(File newFile) throws Exception;", "public String getAbsPath();", "public String[][] openExcelFile(String inputFilePath);", "@Override\n\tpublic Integer obtenerTamanioFilasArchivoExcel(final InputStream inputStreamArchivo) throws SICException {\n\t\tInteger tamanio = null;\n\t\tWorkbook workbook = null;\n\t\tSheet sheet = null;\n\t\ttry {\n\t\t\tif (inputStreamArchivo != null) {\n\t\t\t\tworkbook = WorkbookFactory.create(inputStreamArchivo);\n\t\t\t\tif (workbook != null) {\n\t\t\t\t\tsheet = workbook.getSheetAt(0);\n\t\t\t\t\ttamanio = sheet.getLastRowNum();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOG_SICV2.error(\"Error al obtener el tamanio de las filas del archivo. {}\", e.getMessage());\n\t\t\tthrow new SICException(\"Error al obtener el tamanio de las filas del archivo. {}\", e.getMessage());\n\t\t}\n\t\treturn tamanio;\n\t}", "public String excelScrFold() throws Exception \r\n\t\r\n\t{\n\t\t\t try{\t\t\t\t \r\n\t\t\t\t InputStream ExcelFileToRead = new FileInputStream(excelFilePath);\r\n\t\t\t\t\tXSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead);\r\n\t\t\t\t\t//XSSFWorkbook test = new XSSFWorkbook(); \r\n\t\t\t\t XSSFSheet sheet = wb.getSheetAt(0);\r\n\t\t\t\t XSSFRow row,rowvalue;\r\n\t\t\t\t Iterator<Row> rows = sheet.rowIterator();\r\n\t\t\t\t row = sheet.getRow(0);\r\n\t\t\t\t int i=0;\r\n\t\t\t\t int j=0;\r\n\t\t\t\t try {\r\n\t\t\t\t \t\r\n\t\t\t\t\t\t\tif(row.getCell(0).toString().equalsIgnoreCase(\"Release Number=\")){\r\n\t\t\t\t\t\t\tReleaseNum = row.getCell(1).toString().trim();\r\n\t\t\t\t\t\t\t//System.out.println(ReleaseNum);\r\n\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Incorrect format\");\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t } \r\n\t\t\t\t\t catch (NullPointerException e) \r\n\t\t\t\t\t {\r\n\t\t\t\t\t \tlogger.info(\"System Error: \"+e.toString());\r\n\t\t\t\t\t } \r\n\t\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t catch(Exception ioe) \r\n\t\t\t {\r\n\t\t\t\t logger.info(\"System Error: \"+ioe.toString());\r\n\t\t\t\t ioe.printStackTrace();\r\n\t\t\t }\t\t\t \r\n\t\t\t return ReleaseNum;\t \r\n\t}", "Path getFilePath();", "String getFile();", "String getFile();", "String getFile();", "File getWorkfile();", "@RequestMapping(\"/findingRate/downloadExcel/format\")\r\n\t@ResponseBody\r\n\tpublic String excelFormatDownload(\r\n\t\t\t@RequestParam(value = \"headingVal\") String headingVal,Principal principal){\r\n\t\t\r\n\t\tString retVal = \"-1\";\r\n\t\tString fileName = principal.getName()+new java.util.Date().getTime()+\".xls\";\r\n\t\tString filePath = uploadDirecotryPath + File.separator +\"excelfilecontent\" + File.separator;\r\n\t\tString tempHeadVal[] = headingVal.split(\",\");\r\n\t\t\r\n\t\t try {\r\n\t String filename = filePath+fileName;\r\n\t HSSFWorkbook workbook = new HSSFWorkbook();\r\n\t HSSFSheet sheet = workbook.createSheet(\"FirstSheet\"); \r\n\r\n\t HSSFRow rowhead = sheet.createRow((short)0);\r\n\t for(int i=0;i<tempHeadVal.length;i++){\r\n\t \t rowhead.createCell(i).setCellValue(tempHeadVal[i].toString());\r\n\t }\r\n\t \r\n\t FileOutputStream fileOut = new FileOutputStream(filename);\r\n\t workbook.write(fileOut);\r\n\t fileOut.close();\r\n\t workbook.close();\r\n\t retVal = fileName;\r\n\t } catch ( Exception ex ) {\r\n\t System.out.println(ex);\r\n\t retVal = \"-2\";\r\n\t }\r\n\t\t\r\n\t\treturn retVal;\r\n\t}", "@SuppressWarnings(\"resource\")\n\tpublic String init_excel(String excel_name_with_extension, Integer sheet_index_starting_from_0, Integer row_index_starting_from_0, Integer column_index_starting_from_0)\n\t\t\tthrows Exception {\n\n\t\tString folderPath = \"src//test//resources//TestData//\"; // keep excel in this folder path\n\t\tString element_Image = System.getProperty(\"user.dir\") + File.separator + folderPath + excel_name_with_extension;\n\n\t\tFile file = new File(element_Image);\n\t\tFileInputStream fis = new FileInputStream(file); // this contains raw data from the excel\n\t\tXSSFWorkbook workbook = new XSSFWorkbook(fis); // creating workbook\n\t\tXSSFSheet sheet = workbook.getSheetAt(sheet_index_starting_from_0); // getting the sheet from workbook\n\n\t\tString cellValue = sheet.getRow(row_index_starting_from_0).getCell(column_index_starting_from_0).getStringCellValue(); // fetching data from the\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// sheet\n\t\treturn cellValue;\n\t}", "private Workbook getWorkBook(String filename) throws java.io.IOException {\n CurrentFileName = filename;\n FileInputStream file = new FileInputStream(new File(filename));\n\n if (filename.endsWith(\".xlsx\") || filename.endsWith(\".xlsm\")) {\n return new XSSFWorkbook(file);\n\n } else if (filename.endsWith(\".xls\")) {\n return new HSSFWorkbook(file);\n }\n\n throw new IllegalArgumentException(filename + \" is not an Excel file\");\n\n }", "public static String GetLoLFolder() {\n\t\tFile file = null;\n String path = null;\n\t\ttry {\n\n JFileChooser chooser = new JFileChooser();\n chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n chooser.setDialogTitle(\"Please set your Location of \\\"lol.launcher.exe\\\"\");\n chooser.setBackground(Gui.myColor);\n chooser.setForeground(Color.LIGHT_GRAY);\n chooser.setFileFilter(new FileFilter() {\n public boolean accept(File f) {\n return f.getName().toLowerCase().endsWith(\"lol.launcher.exe\")\n || f.isDirectory();\n }\n\n public String getDescription() {\n return \"lol.launcher.exe(*.exe)\";\n }\n });\n int rueckgabeWert = chooser.showOpenDialog(null);\n if (rueckgabeWert == JFileChooser.APPROVE_OPTION) {\n file = chooser.getSelectedFile();\n if (file.getName().contains(\"lol.launcher.exe\")) {\n System.out.println(\"- Found League of Legends Installation\");\n path = chooser.getSelectedFile().getParent();\n File FilePath = new File(\"Path\");\n FileWriter writer;\n writer = new FileWriter(FilePath);\n writer.write(path);\n writer.flush();\n writer.close();\n } else {\n System.out\n .println(\"- No League of Legends Installation found :(\");\n path = \"No installation found\";\n }\n }\n } catch (IOException e)\n {\n logger.error(\"Write Error\");\n }\n\t\treturn path;\n\t}", "public void getRowCount() {\n\n try {\n\n String FILE = \"src/test/resources/Datasheet.xlsx\";\n String SHEET_NAME = \"Master\";\n XSSFWorkbook workbook = new XSSFWorkbook();\n\n }catch (Exception exp)\n {\n exp.printStackTrace();\n System.out.println(exp.getMessage());\n System.out.println(exp.getCause());\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tFile file = new File(\"C:\\\\Users\\\\Leonardo\\\\git\\\\repository5\\\\HandleExcelWithApachePoi\\\\src\\\\arquivo_excel.xls\");\r\n\t\t\r\n\t\tif (!file.exists()) {\r\n\t\t\tfile.createNewFile();\r\n\t\t}\r\n\t\t\r\n\t\tPessoa p1 = new Pessoa();\r\n\t\tp1.setEmail(\"[email protected]\");\r\n\t\tp1.setIdade(50);\r\n\t\tp1.setNome(\"Ricardo Edigio\");\r\n\t\t\r\n\t\tPessoa p2 = new Pessoa();\r\n\t\tp2.setEmail(\"[email protected]\");\r\n\t\tp2.setIdade(40);\r\n\t\tp2.setNome(\"Marcos Tadeu\");\r\n\t\t\r\n\t\tPessoa p3 = new Pessoa();\r\n\t\tp3.setEmail(\"[email protected]\");\r\n\t\tp3.setIdade(30);\r\n\t\tp3.setNome(\"Maria Julia\");\r\n\t\t\r\n\t\tList<Pessoa> pessoas = new ArrayList<Pessoa>();\r\n\t\tpessoas.add(p1);\r\n\t\tpessoas.add(p2);\r\n\t\tpessoas.add(p3);\r\n\t\t\r\n\t\t\r\n\t\tHSSFWorkbook hssfWorkbook = new HSSFWorkbook(); /*escrever na planilha*/\r\n\t\tHSSFSheet linhasPessoa = hssfWorkbook.createSheet(\"Planilha de pessoas\"); /*criar planilha*/\r\n\t\t\r\n\t\tint nlinha = 0;\r\n\t\tfor (Pessoa p : pessoas) {\r\n\t\t\tRow linha = linhasPessoa.createRow(nlinha ++); /*criando a linha na planilha*/\r\n\t\t\t\r\n\t\t\tint celula = 0;\r\n\t\t\t\r\n\t\t\tCell celNome = linha.createCell(celula ++); /*celula 1*/\r\n\t\t\tcelNome.setCellValue(p.getNome());\r\n\t\t\t\r\n\t\t\tCell celEmail = linha.createCell(celula ++); /*celula 2*/\r\n\t\t\tcelEmail.setCellValue(p.getEmail());\r\n\t\t\t\r\n\t\t\tCell celIdade = linha.createCell(celula ++); /*celula 3*/\r\n\t\t\tcelIdade.setCellValue(p.getIdade());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tFileOutputStream saida = new FileOutputStream(file);\r\n\t\thssfWorkbook.write(saida);\r\n\t\t\r\n\t\tsaida.flush();\r\n\t\tsaida.close();\r\n\t\t\r\n\t\tSystem.out.println(\"Planilha Criada com Sucesso!\");\r\n\t\t\r\n\t}", "java.lang.String getFileLoc();", "String getFullWorkfileName();", "private String getSelectedFile() {\r\n\t\tString file = \"\";\r\n\t\tIFile selectedFile = fileResource.getSelectedIFile();\r\n\t\tif (selectedFile != null) {\r\n\t\t\tIPath selectedPath = selectedFile.getLocation();\r\n\t\t\tif (selectedPath != null) {\r\n\t\t\t\tfile = selectedPath.toFile().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn file;\r\n\t}", "@Override\r\n\tprotected File generateReportFile() {\r\n\r\n\t\tFile tempFile = null;\r\n\r\n\t\tFileOutputStream fileOut = null;\r\n\t\ttry {\r\n\t\t\ttempFile = File.createTempFile(\"tmp\", \".\" + this.exportType.getExtension());\r\n\t\t\tfileOut = new FileOutputStream(tempFile);\r\n\t\t\tthis.workbook.write(fileOut);\r\n\t\t} catch (final IOException e) {\r\n\t\t\tLOGGER.warn(\"Converting to XLS failed with IOException \" + e);\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\tif (tempFile != null) {\r\n\t\t\t\ttempFile.deleteOnExit();\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tif (fileOut != null) {\r\n\t\t\t\t\tfileOut.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (final IOException e) {\r\n\t\t\t\tLOGGER.warn(\"Closing file to XLS failed with IOException \" + e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn tempFile;\r\n\t}", "public int read_XL_RowCount(String path,String sheet) throws EncryptedDocumentException, FileNotFoundException, IOException \r\n{\r\n\tint rc=0;\r\n\t\r\n\tWorkbook wb = WorkbookFactory.create(new FileInputStream(path));\r\n\trc=wb.getSheet(sheet).getLastRowNum();\r\n\t\r\n\t\r\n\treturn rc;\r\n}", "public String getXslFile() {\n return directory_path2;\n }", "public static void writeInFile(String fileName,String sheetName, String cntry, String menu,String subMenu,String subMenu_1,String ActualEng_Title,String Overridden_Title,String xmlURL) throws IOException {\n\r\n\t\tFile myFile = new File(\"./\" + fileName);\r\n\r\n\t\t//Create an object of FileInputStream class to read excel file\r\n\r\n\t\tFileInputStream inputStream = new FileInputStream(myFile);\r\n\r\n\t\tWorkbook myWorkbook = null;\r\n\r\n\t\t//Find the file extension by spliting file name in substring and getting only extension name\r\n\r\n\t\tString fileExtensionName = fileName.substring(fileName.indexOf(\".\"));\r\n\r\n\t\t//Check condition if the file is xlsx file\t\r\n\r\n\t\tif(fileExtensionName.equals(\".xlsx\")){\r\n\r\n\t\t\t//If it is xlsx file then create object of XSSFWorkbook class\r\n\r\n\t\t\tmyWorkbook = new XSSFWorkbook(inputStream);\r\n\t\t\tSystem.out.println(\"Extension of file \"+fileName +\" is .xlsx\");\r\n\r\n\t\t}\r\n\r\n\t\t//Check condition if the file is xls file\r\n\r\n\t\telse if(fileExtensionName.equals(\".xls\")){\r\n\r\n\t\t\t//If it is xls file then create object of XSSFWorkbook class\r\n\r\n\t\t\tmyWorkbook = new HSSFWorkbook(inputStream);\r\n\t\t\tSystem.out.println(\"Extension of file \"+fileName +\" is .xlx\");\r\n\r\n\t\t}\r\n\r\n\t\t//Read sheet inside the workbook by its name\r\n\r\n\t\tSheet mySheet = myWorkbook.getSheet(sheetName);\r\n\r\n\t\t//Find number of rows in excel file\r\n\r\n\t\tint rowCount = mySheet.getLastRowNum() - mySheet.getFirstRowNum();\r\n\r\n\r\n\t\tRow row = mySheet.getRow(0);\r\n\r\n\t\t//Create a new row and append it at last of sheet\r\n\r\n\t\tRow newRow = mySheet.createRow(rowCount+1);\r\n\r\n\r\n\t\t//Create a loop over the cell of newly created Row\r\n\t\tfor(int colCnt=0;colCnt<=6;colCnt++)\r\n\t\t{ \r\n\t\t\tCell cell = newRow.createCell(colCnt);\r\n\r\n\t\t\tif(colCnt==0)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(cntry);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==1)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(menu);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==2)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(subMenu);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==3)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(subMenu_1);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==4)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(ActualEng_Title);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==5)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(Overridden_Title);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==6)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(xmlURL);\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* for(int j = 0; j < row.getLastCellNum(); j++){\r\n\r\n\t //Fill data in row\r\n\r\n\t Cell cell = newRow.createCell(j);\r\n\r\n\t cell.setCellValue(\"test\");\r\n\r\n\t }*/\r\n\r\n\t\t//Close input stream\r\n\r\n\t\tinputStream.close();\r\n\r\n\t\t//Create an object of FileOutputStream class to create write data in excel file\r\n\r\n\t\tFileOutputStream opStream = new FileOutputStream(myFile);\r\n\r\n\t\t//write data in the excel file\r\n\r\n\t\tmyWorkbook.write(opStream);\r\n\t\t//close output stream\r\n\t\topStream.close();\r\n\t\t//\tfor(int i = 0;i<=objectArr.length-1;i++ ){\r\n\r\n\t\t// Cell cell = row.createCell(i);\r\n\t\t// cell.setCellValue(objectArr[i]);\r\n\r\n\t\t// }\r\n\r\n\t\t//File myFile = new File(\"./Controller.xlsx\");\r\n\t\t// FileOutputStream os = new FileOutputStream(myFile);\r\n\t\t//\tmyWorkBook.write(os);\r\n\t\tSystem.out.println(\"Controller Sheet Creation finished ...\");\r\n\t\t//\tos.close();\r\n\r\n\r\n\t}", "public abstract String getFileLocation();", "Path getContent(String filename);", "private File getFile()\n\t{\n\t\tFile file = null;\n\t\tString dirName = org.compiere.Compiere.getCompiereHome() + File.separator + \"data\" + File.separator + \"import\";\n\t\tlog.config(dirName);\n\t\tJFileChooser chooser = new JFileChooser(dirName);\n\t\tchooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n\t\tchooser.setMultiSelectionEnabled(false);\n\t\tchooser.setDialogTitle(Msg.translate(Env.getCtx(), \"LoadAccountingValues\"));\n\t\tchooser.addChoosableFileFilter(new ExtensionFileFilter(\"csv\", Msg.getMsg(Env.getCtx(), \"FileCSV\")));\n\t\t// Try selecting file\n\t\tfile = new File(dirName + File.pathSeparator + \"AccountingUS.csv\");\n\t\tif (file.exists())\n\t\t\tchooser.setSelectedFile(file);\n\n\t\t// Show it\n\t\tif (chooser.showOpenDialog(this.getParent()) == JFileChooser.APPROVE_OPTION)\n\t\t\tfile = chooser.getSelectedFile();\n\t\telse\n\t\t\tfile = null;\n\t\tchooser = null;\n\n\t\tif (file == null)\n\t\t\tbuttonLoadAcct.setText(Msg.translate(Env.getCtx(), \"LoadAccountingValues\"));\n\t\telse\n\t\t\tbuttonLoadAcct.setText(file.getAbsolutePath());\n\t\tconfirmPanel.getOKButton().setEnabled(file != null);\n\t\tm_frame.pack();\n\t\treturn file;\n\t}", "public String getFilePath() {\n\t\treturn Constants.CSV_DIR+getFileName();\n\t}", "public Workbook getWorkbook()\n {\n final Sheet sheet = getSheet();\n return ( sheet != null ? sheet.getWorkbook() : null );\n }", "@Override\r\n public void execute(Workbook workbook) {\n InputStream fileStream = this.getResourceStream(\"xlsx/Employee absence schedule.xlsx\");\r\n workbook.open(fileStream);\r\n }", "public static void main(String[] args) throws IOException {\n write2Excel(new File(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\test.xls\"));\n }", "String savedFile();", "public List<Element> getElementFromExcel(String inputFilePath);", "private File getIOFile() {\n \t\tIPath location = resource.getLocation();\n \t\tif(location!=null) {\n \t\t\treturn location.toFile();\n \t\t}\n \t\treturn null;\n \t}", "public ArrayList<String> getData(String testcaseName) throws IOException\n{\n//fileInputStream argument\nArrayList<String> a=new ArrayList<String>();\n\nFileInputStream fis=new FileInputStream(\"D://TestCases.xlsx\");\nXSSFWorkbook workbook=new XSSFWorkbook(fis);\n\nint sheets=workbook.getNumberOfSheets();\n}", "public static void main(String[] args) {\n\n\t\tXSSFWorkbook wb = new XSSFWorkbook(); //simulira excel file\n\t\tSheet sh = wb.createSheet(); \n\t\tRow row = sh.createRow(7);\n\t\tCell cell = row.createCell(9);\n\t\tcell.setCellValue(\"LALALA\");\n\t\t\n\t\tRow row1 = sh.createRow(5);\n\t\tCell cell1 = row1.createCell(5); // pazi na sintaksu! row1 cell1!\n\t\tcell1.setCellValue(124);\n\n\t\ttry {\n\t\t\tOutputStream os = new FileOutputStream(\"Izlazni.xlsx\"); // pravi konkretan fajl\n\t\t\twb.write(os); // upisuje sve iz workbooka u os fajl\n\t\t\twb.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Doslo je do greske.\"); // jedini nacin da se obezbedimo sa greskom\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public String getFilePath() {\n return getSourceLocation().getFilePath();\n }", "File getSaveFile();", "private static void showExcel(Experiment e1, ArrayList<Institution> bank) {\n\n\n\n\t\tfinal String INPUT_DIR=\"D:/Users/atsushi/Desktop/実験結果/\";\n\t\tWorkbook book=null;\n\n\t\ttry{\n\t\t\tbook = new HSSFWorkbook();\n\t\t\tFileOutputStream fileOut=new FileOutputStream(\"workbook.xls\");\n\t\t\tString safename=WorkbookUtil.createSafeSheetName(\"[OutPut]\");\n\t\t\tString safename1=WorkbookUtil.createSafeSheetName(\"[Bank]\");\n\t\t\tString safename2=WorkbookUtil.createSafeSheetName(\"[Firm]\");\n\t\t\tSheet sheet1=book.createSheet(safename);\n\t\t\tSheet sheet2=book.createSheet(safename1);\n\t\t\tSheet sheet3=book.createSheet(safename2);\n\t\t\tCreationHelper createHelper=book.getCreationHelper();\n\n\t\t\t//100タームごとに改行\n\t\t\tint rowterm=e1.getTerm()/100+1;\n\t\t\tint term=e1.getTerm();\n\t\t\tint xterm=100;\n\t\t\tint a=0,b=xterm-1;\n\t\t\t//if(e1.getTerm()>100) {xterm=100;a=0;b=xterm-1;}else {xterm=0;a=0;b=e1.getTerm()-1;}\n\t\t\tfor(int x=0;x<rowterm;x++){\n\t\t\tRow row = sheet1.createRow((short)x);//行\n\t\t\tRow row1=sheet1.createRow((short)(x+rowterm+2));\n\t\t\tRow row2=sheet1.createRow((short)(x+rowterm*2+2));\n\t\t\tRow row3=sheet1.createRow((short)(x+rowterm*3+2));\n\t\t\tRow row4=sheet1.createRow((short)(x+rowterm*4+2));\n\t\t\tRow row5=sheet1.createRow((short)(x+rowterm*5+2));\n\t\t\tRow row6=sheet1.createRow((short)(x+rowterm*6+2));\n\t\t\tRow row7=sheet1.createRow((short)(x+rowterm*7+2));\n\t\t\tRow row8=sheet1.createRow((short)(x+rowterm*8+2));\n\t\t\tRow row9=sheet1.createRow((short)(x+rowterm*9+2));\n\t\t\tRow row10=sheet1.createRow((short)(x+rowterm*10+2));\n\t\t\tRow row11=sheet1.createRow((short)(x+rowterm*11+2));\n\t\t\tRow row12=sheet1.createRow((short)(x+rowterm*12+2));\n\t\t\tRow row13=sheet1.createRow((short)(x+rowterm*11+2));\n\n\t\t\tint j=0;\n\t\t\tfor(j=a;j<=b;j++){\n\t\t\trow.createCell(j-(x*xterm)).setCellValue(e1.getAgrregateOP(j));\n\t\t\trow1.createCell(j-(x*xterm)).setCellValue(e1.getGrowthRateOP(j));\n\t\t\trow2.createCell(j-(x*xterm)).setCellValue(e1.getFailedFirm(j));\n\t\t\trow3.createCell(j-(x*xterm)).setCellValue(e1.getFailedFirmrate(j));\n\t\t\trow4.createCell(j-(x*xterm)).setCellValue(e1.getBadLoan(j));\n\t\t\trow5.createCell(j-(x*xterm)).setCellValue(e1.getAVGInterest(j));\n\t\t\trow6.createCell(j-(x*xterm)).setCellValue(e1.getMoneyStock(j));\n\t\t\trow7.createCell(j-(x*xterm)).setCellValue(e1.getCreditMoney(j));\n\t\t\trow8.createCell(j-(x*xterm)).setCellValue(e1.getResidual(j));\n\t\t\trow9.createCell(j-(x*xterm)).setCellValue(e1.getGrossDemand(j));\n\t\t\trow10.createCell(j-(x*xterm)).setCellValue(e1.getGrossSupply(j));\n\t\t\trow11.createCell(j-(x*xterm)).setCellValue(e1.getRejectFinancing(j));\n\n\n\t\t //cell.setCellValue(createHelper.createRichTextString(\"sample String\"));\n\t\t\t}\n\t\t\t/*\n\t\t\tfor(j=a;j<e1.getAliveBank();j++) {\n\t\t\t\trowx.createCell(j-(x*e1.getAliveBank())).setCellValue(e1.getBankCAR(j));\n\t\t\t}*/\n\t\t\tif(term>100){\n\t\t\tif(term-1>xterm+j){\n\t\t\t\tif(term-j-1>xterm){\n\t\t\t\t\ta=j;b=j+xterm-1;\n\t\t\t\t}}else{\n\t\t\t\t\ta=j;\n\t\t\t\t\tb=term-1;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t}\n\n\t\t\t//企業list\n\t\t\te1.setSortFirmK();\n\t\t\tint rowfirm=e1.getalivefirm()/100;\n\t\t\tint firmnode=e1.getalivefirm();\n\t\t\tint fn=100;\n\t\t\tint c=0,d=fn-1;\n\t\t\tint t=0;\n\n\t\t\tRow row00= sheet3.createRow((short)t);\n\t\t\trow00.createCell(0).setCellValue(\"総資産\");\n\t\t\tRow row02=sheet3.createRow((short)t+15);\n\t\t\trow02.createCell(0).setCellValue(\"取引先\");\n\t\t\tRow row04=sheet3.createRow((short)t+30);\n\t\t\trow04.createCell(0).setCellValue(\"Leverage\");\n\t\t\tRow row06=sheet3.createRow((short)t+45);\n\t\t\trow06.createCell(0).setCellValue(\"ChoiveLeverage\");\n\t\t\tRow row08=sheet3.createRow((short)t+60);\n\t\t\trow08.createCell(0).setCellValue(\"RejectOrder\");\n\t\t\tRow row010=sheet3.createRow((short)t+75);\n\t\t\trow010.createCell(0).setCellValue(\"NonBuffer\");\n\t\t\t\tfor(int x=0;x<rowfirm;x++){\n\t\t\t\t/*\n\t\t\t\t\tRow row0= sheet3.createRow((short)x);\n\t\t\t\t\trow0.createCell(0).setCellValue(\"総資産\");\n\t\t\t\t\t*/\n\t\t\t\t\tRow row1 = sheet3.createRow((short)x+1);//行\n\t\t\t\t\tRow row3 = sheet3.createRow((short)x+16);\n\t\t\t\t\tRow row5 = sheet3.createRow((short)x+31);\n\t\t\t\t\tRow row7 = sheet3.createRow((short)x+46);\n\t\t\t\t\tRow row9 =sheet3.createRow((short)x+61);\n\t\t\t\t\tRow row11 =sheet3.createRow((short)x+76);\n\t\t\t\tint j=0;\n\t\t\t\tfor(j=c;j<=d;j++){\n\t\t\t\t\t//System.out.print(d);\n\t\t\t\t\trow1.createCell(j-(x*fn)).setCellValue(e1.getFirmK(j));\n\t\t\t\t\trow3.createCell(j-(x*fn)).setCellValue(e1.getFirmCandidateNum(j));\n\t\t\t\t\trow5.createCell(j-(x*fn)).setCellValue(e1.getFirmLeverage(j));\n\t\t\t\t\trow7.createCell(j-(x*fn)).setCellValue(e1.getFirmnextLeverage(j));\n\t\t\t\t\trow9.createCell(j-(x*fn)).setCellValue(e1.getFirmRejectOrderNum(j));\n\t\t\t\t\trow11.createCell(j-(x*fn)).setCellValue(e1.getFirmNonBufferNum(j));\n\t\t\t\t}\n\n\t\t\t\tif(firmnode-1>fn+j){\n\t\t\t\t\tif(firmnode-j-1>fn){\n\t\t\t\t\t\tc=j;d=j+fn-1;\n\t\t\t\t\t}}else{\n\t\t\t\t\t\tc=j;\n\t\t\t\t\t\td=firmnode-1;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t/*\n\t\t\t\tif(rowfirm==0) {\n\t\t\t\t\tint x=0;\n\t\t\t\t\tRow row0= sheet3.createRow((short)x);\n\t\t\t\t\trow0.createCell(0).setCellValue(\"総資産\");\n\t\t\t\t\tRow row1 = sheet3.createRow((short)x);//行\n\t\t\t\t\tRow row2=sheet3.createRow((short)x+15);\n\t\t\t\t\trow2.createCell(0).setCellValue(\"取引先\");\n\t\t\t\t\tRow row3 = sheet3.createRow((short)x);\n\t\t\t\t\tRow row4=sheet3.createRow((short)x+30);\n\t\t\t\t\trow4.createCell(0).setCellValue(\"Leverate\");\n\t\t\t\t\tRow row5 = sheet3.createRow((short)x);\n\t\t\t\t\tRow row6=sheet3.createRow((short)x+45);\n\t\t\t\t\trow6.createCell(0).setCellValue(\"ChoiveLeverage\");\n\t\t\t\t\tRow row7 = sheet3.createRow((short)x);\n\t\t\t\t\t//Row row8 = sheet3.createRow((short)x);\n\t\t\t\t\t//Row row9=sheet3.createRow((short)x+20);\n\t\t\t\tfor(int i=0;i<firmnode;i++) {\n\t\t\t\t\trow1.createCell(i).setCellValue(e1.getFirmK(i));\n\t\t\t\t\trow3.createCell(i).setCellValue(e1.getFirmCandidateNum(i));\n\t\t\t\t\trow5.createCell(i).setCellValue(e1.getFirmLeverage(i));\n\t\t\t\t\trow7.createCell(i).setCellValue(e1.getFirmnextLeverage(i));\n\t\t\t\t\t//row4.createCell(i).setCellValue(e1.getFirmLevNowEvalue(i));\n\t\t\t\t}\n\t\t\t\t}\n*/\n\n\t\t\t//銀行リスト\n\n\t\t\tint banknode=e1.getAliveBank();\n\n\t\t\tfor(int x=0;x<1;x++) {\n\t\t\tRow row0=sheet2.createRow((short)x);\n\t\t\tRow row1=sheet2.createRow((short)x+2);\n\t\t\trow1.createCell(0).setCellValue(\"CAR\");\n\t\t\tRow row2=sheet2.createRow((short)x+3);\n\t\t\tRow row3=sheet2.createRow((short)x+4);\n\t\t\trow3.createCell(0).setCellValue(\"企業への貸付:IBloan:IBborrow\");\n\t\t\tRow row4=sheet2.createRow((short)x+5);\n\t\t\tRow row5=sheet2.createRow((short)x+6);\n\t\t\tRow row6=sheet2.createRow((short)x+7);\n\t\t\tRow row7=sheet2.createRow((short)x+8);\n\t\t\trow7.createCell(0).setCellValue(\"銀行資産規模K\");\n\t\t\tRow row8=sheet2.createRow((short)x+9);\n\t\t\tRow row9=sheet2.createRow((short)x+10);\n\t\t\trow9.createCell(0).setCellValue(\"銀行buffer\");\n\t\t\tRow row10=sheet2.createRow((short)x+11);\n\t\t\tRow row11=sheet2.createRow((short)x+12);\n\t\t\trow11.createCell(0).setCellValue(\"銀行総badloan\");\n\t\t\tRow row12=sheet2.createRow((short)x+13);\n\t\t\tRow row13=sheet2.createRow((short)x+14);\n\t\t\trow13.createCell(0).setCellValue(\"銀行residual\");\n\t\t\tRow row14=sheet2.createRow((short)x+15);\n\t\t\tRow row15=sheet2.createRow((short)x+16);\n\t\t\trow15.createCell(0).setCellValue(\"銀行総LFlistsize\");\n\t\t\tRow row16=sheet2.createRow((short)x+17);\n\t\t\tRow row17=sheet2.createRow((short)x+18);\n\t\t\trow17.createCell(0).setCellValue(\"銀行市場性資産\");\n\t\t\tRow row18=sheet2.createRow((short)x+19);\n\t\t\tRow row19=sheet2.createRow((short)x+20);\n\t\t\trow19.createCell(0).setCellValue(\"ClientNumber\");\n\t\t\tRow row20=sheet2.createRow((short)x+21);\n\n\t\t\tfor(int i=0;i<banknode;i++) {\n\t\t\trow0.createCell(i).setCellValue(e1.getBankId(i));\n\t\t\trow2.createCell(i).setCellValue(e1.getBankCAR(i));\n\t\t\trow4.createCell(i).setCellValue(e1.getBankLf(i));\n\t\t\trow5.createCell(i).setCellValue(e1.getBankLb(i));\n\t\t\trow6.createCell(i).setCellValue(e1.getBankBb(i));\n\t\t\trow8.createCell(i).setCellValue(e1.getBankK(i));\n\t\t\trow10.createCell(i).setCellValue(e1.getBankBuffer(i));\n\t\t\trow12.createCell(i).setCellValue(e1.getBankGrossBadLoan(i));\n\t\t\trow14.createCell(i).setCellValue(e1.getBankResidual(i));\n\t\t\trow16.createCell(i).setCellValue(e1.getBankLFSize(i));\n\t\t\trow18.createCell(i).setCellValue(e1.getBankLiqAsset(i));\n\t\t\trow20.createCell(i).setCellValue(e1.getBankClientNum(i));\n\t\t\t}\n\t\t\t/*\n\t\t\tfor(int i=0;i<bank.get(0).levlist.size();i++) {\n\t\t\t\trow18.createCell(i).setCellValue(e1.getBanklevlevelvalue(i));\n\t\t\t}\n\t\t\t*/\n\n\n\n\n\n\t\t\t}\n\t\t book.write(fileOut);\n\t\t //fileOut.close();\n\n\t\t // 1つ目のセルを作成 ※行と同じく、0からスタート\n\t\t //Cell a1 = row.createCell(0); // Excel上、「A1」の場所\n\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\n\n\t\t}\n\n\n\t}", "public static File createStatisticsFile(User currentUser){\n\t\t\n\t\t//TODO WHOLE APP TO USE ONE HREF.\n\t\t//final String href = \"http://localhost:9000/\";\n\t\t\n\t\ttry {\n\t\t\t// creates the \"excel sheet\" with its name;\n\t\t\tHSSFWorkbook workbook = new HSSFWorkbook();\n\t HSSFSheet sheet = workbook.createSheet(\"Statistics\"); \n\t String fileName = UUID.randomUUID().toString().replace(\"-\", \"\") + \".xls\";\n\t // creates the folder with the file name; \n\t new File(statsFilePath).mkdirs();\n\t File statisticFile = new File(statsFilePath +fileName);\n\t \n\t applyTheStringViewForStats(currentUser);\n\t\t\t \n\t //SETTING STYLE\n\t HSSFCellStyle style = workbook.createCellStyle();\n\t style.setBorderTop((short) 6); \n\t style.setBorderBottom((short) 1); \n\t style.setFillBackgroundColor(HSSFColor.GREY_80_PERCENT.index);\n\t style.setFillForegroundColor(HSSFColor.GREY_80_PERCENT.index);\n\t style.setFillPattern(HSSFColor.GREY_80_PERCENT.index);\n\t \n\t HSSFFont font = workbook.createFont();\n\t font.setFontName(HSSFFont.FONT_ARIAL);\n\t font.setFontHeightInPoints((short) 10);\n\t font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);\n\t font.setColor(HSSFColor.BLACK.index);\t \n\t style.setFont(font);\n\t style.setWrapText(true);\n\t \n\t //Header cells (the first header row) and added style !\n\t HSSFRow rowhead= sheet.createRow((short)0);\n\t \n\t HSSFCell bitpikId = rowhead.createCell(0);\n\t bitpikId.setCellValue(new HSSFRichTextString(\"BitPik id\"));\n\t bitpikId.setCellStyle(style);\n\t \n\t HSSFCell productName = rowhead.createCell(1);\n\t productName.setCellValue(new HSSFRichTextString(\"Ime proizvoda\"));\n\t productName.setCellStyle(style);\n\t \n\t HSSFCell productPrice = rowhead.createCell(2);\n\t productPrice.setCellValue(new HSSFRichTextString(\"Cijena\"));\n\t productPrice.setCellStyle(style);\n\t \n\t HSSFCell publishedDate = rowhead.createCell(3);\n\t publishedDate.setCellValue(new HSSFRichTextString(\"Datum objave\"));\n\t publishedDate.setCellStyle(style); \n\t \n\t HSSFCell isSold = rowhead.createCell(4);\n\t isSold.setCellValue(new HSSFRichTextString(\"Prodat artikal\"));\n\t isSold.setCellStyle(style); \n\t \n\t HSSFCell isSpecial = rowhead.createCell(5);\n\t isSpecial.setCellValue(new HSSFRichTextString(\"Izdvojen\"));\n\t isSpecial.setCellStyle(style); \n\t \n\t HSSFCell noOfClicks = rowhead.createCell(6);\n\t noOfClicks.setCellValue(new HSSFRichTextString(\"Br. pregleda\"));\n\t noOfClicks.setCellStyle(style); \n\t \n\t HSSFCell noOfComments = rowhead.createCell(7);\n\t noOfComments.setCellValue(new HSSFRichTextString(\"Br. komentara\"));\n\t noOfComments.setCellStyle(style);\n\t \n\t rowhead.setHeight((short)20);\n\t //Creating rows for each product from the list allProducts. \n\t // starting from the row (number 1.) - we generate each cell with its value;\n\t int rowIndex = 1;\n\t \n\t for (Product product: allProducts){\n\t\t \tHSSFRow row= sheet.createRow(rowIndex);\n\t\t \trow.createCell(0).setCellValue(product.id);\n\t\t row.createCell(1).setCellValue(product.name);\n\t\t row.createCell(2).setCellValue(product.price);\n\t\t row.createCell(3).setCellValue(product.publishedDate); \t \n\t\t row.createCell(4).setCellValue(product.statsProducts.isItSold); \t\n\t\t row.createCell(5).setCellValue(product.statsProducts.isItSpecial); \n\t\t \n\t\t row.createCell(6).setCellValue(product.statsProducts.noOfClicksS); \t\n\t\t Logger.info(\"noOfclicks Prod.\" +product.name + \" je > \" +product.statsProducts.noOfClicksS);\n\t\t row.createCell(7).setCellValue(product.statsProducts.noOfComments); \n\t\t Logger.info(\"noOfcomments Prod.\" +product.name + \" je > \" +product.statsProducts.noOfClicksS);\n\t\t rowIndex++;\n\t }\n\t \n\t //rowhead.setRowStyle(style);\n\t //auto-sizing all of the columns in the sheet generated;\n\t for(int i=0; i<8; i++){\n\t \t sheet.autoSizeColumn((short) i);\t\n\t }\t \n\t \n\t // putting the File in FileOutPutStream();\n\t FileOutputStream fileOut = new FileOutputStream(statisticFile);\n\t workbook.write(fileOut);\n\t fileOut.flush();\n\t fileOut.close();\n\t workbook.close();\n\t \n\t return statisticFile;\n\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\tLogger.error(\"Statistic file exception \", e );\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tLogger.error(\"IO exception\", e);\n\t\t} \n\t\treturn null;\n\t}", "public static String chooseFileLocation(){\n String fileLoc = new String();\n\n JFileChooser fc = new JFileChooser(\".\");\n fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n fc.showOpenDialog(null);\n fileLoc = fc.getSelectedFile().getAbsolutePath() + \"\\\\\";\n\n return fileLoc;\n }", "public void descargarArchivoVeri()throws SQLException, IOException {\n //conexion con el resultset\n st = cn.createStatement();\n\n // consulta de descarga el getId es la variable que utilizo para ubicarme en la base de datos\n ResultSet rs = st.executeQuery(\"select anexo_veri, nombre FROM anexoverificacion where idverificacion=\"+rt.getId());\ntry {\n \nrs.next();\n// pone en la variable el nombre del archivo de la base de datos\nnombre= rs.getString(\"nombre\");\n// inserta la ruta completa\nFile file = new File(rt.getPath()+nombre);\n// salida del archivo de flujo\nFileOutputStream output = new FileOutputStream(file);\nBlob archivo = rs.getBlob(1);\nInputStream inStream = archivo.getBinaryStream();\n// almacenamiento del tamaño y descarga byte a byte\nint length= -1;\nint size = (int) archivo.length();\nbyte[] buffer = new byte[size];\nwhile ((length = inStream.read(buffer)) != -1) {\noutput.write(buffer, 0, length);\nJOptionPane.showMessageDialog(null,\"El archivo se descargo correctamente\");\n// output.flush();\n\n}\n// inStream.close();\noutput.close();\n} catch (Exception ioe) {\nthrow new IOException(ioe.getMessage());\n}\n}", "public static int write_XL_Data(String path,String sheet,int row,int cell,int v) throws EncryptedDocumentException, FileNotFoundException, IOException \r\n{\r\n\t\r\n\tWorkbook wb=WorkbookFactory.create(new FileInputStream(path));\r\n\twb.getSheet(sheet).getRow(row).getCell(cell).setCellValue(v);\r\n\twb.write(new FileOutputStream(path));\r\n\treturn v;\r\n}", "@Test\r\n public void excel() throws EncryptedDocumentException, InvalidFormatException, FileNotFoundException, IOException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"E:\\\\Selenium\\\\Newfolder\\\\chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\t\t\r\n //get the excel sheet file location \r\n String filepath=\"E:\\\\Selenium\\\\SampleApplications\\\\ClearTripAppln\\\\DataSheet.xlsx\";\r\n\t \t\t\t\tWorkbook wb= WorkbookFactory.create(new FileInputStream(new File(filepath)));\r\n //get the sheet which needs read operation\r\n\t\t Sheet sh = wb.getSheet(\"sheet1\");\r\n\t\t \r\n\t String url =sh.getRow(0).getCell(1).getStringCellValue();\r\n\t System.out.println(url);\r\n\t driver.get(url);\r\n\t \r\n\t \t\t// Maximizing the window\r\n\t \t\tdriver.manage().window().maximize();\r\n\t \t\t\r\n\r\n\r\n\t\t }", "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "String getFileName();", "public String getOriginalFileName();", "public void exportarapolice(){\n gettableconteudo();\n conexao.Conectar();\n File f = null;\n try {\n conexao.sql = \"SELECT data, nomefile, arquivo FROM arquivo WHERE data = ?\"; \n conexao.ps = conexao.con.prepareStatement(conexao.sql); \n ps.setString(1, id1);\n ResultSet rs = ps.executeQuery(); \n if ( rs.next() ){ \n byte [] bytes = rs.getBytes(\"arquivo\"); \n String nome = rs.getString(\"nomefile\");\n f = new File(\"C:\\\\rubinhosis\\\\exportacoes\\\\\" + nome); \n FileOutputStream fos = new FileOutputStream( f);\n fos.write( bytes ); \n fos.close(); \n }\n rs.close(); \n ps.close(); \n \n \n } catch (SQLException ex) { \n ex.printStackTrace();\n }\n catch (IOException ex) {\n ex.printStackTrace();\n }\n\n}", "public static String getPath() {\n\t\t\n\t\tJFileChooser chooser = new JFileChooser();\n\t \tFileNameExtensionFilter filtroImagen =new FileNameExtensionFilter(\"*.TXT\", \"txt\");\n\t \tchooser.setFileFilter(filtroImagen);\n\t \tFile f = null;\n\t \t\n\t\ttry {\n\t\t\tf = new File(new File(\".\").getCanonicalPath());\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tString path = \"\";\n\t\t\n\t\ttry {\n\t\t\tchooser.setCurrentDirectory(f);\n\t\t\tchooser.setCurrentDirectory(null);\n\t\t\tchooser.showOpenDialog(null);\n\t \n\t\t\tpath = chooser.getSelectedFile().toString();\n\t\t}catch(Exception e) {\n\t\t\t\n\t\t}\n\t return path;\n\t}", "public String openFile() {\n\t\t\n\t\tString chosenFile = \"\";\n\t\treturn chosenFile;\n\t\t\n\t}", "public FileData export() {\n\t\ttry(Workbook workbook = createWorkbook();\n\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();) {\n\t\t\tsheet = workbook.createSheet();\n\t\t\tcreateRows();\n\t\t\tworkbook.write(outputStream);\n\t\t\treturn getExportedFileData(outputStream.toByteArray());\n\t\t} catch (IOException ex) {\n\t\t\tthrow new RuntimeException(\"error while exporting file\",ex);\n\t\t}\n\t}", "public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}", "public String getNombreArchivoAdjunto(){\r\n\t\treturn dato.getNombreArchivo() + \".pdf\";\r\n\t}", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "java.lang.String getFileName();", "public String getOutPutFilePath() {\n\t\t// Create the entire filename\n\t\tString fileName=FILE_OUT_PATH+ FILENAME + \"NO_LINE_NUMBERS\" + \".txt\";\t\n\t\treturn(fileName);\n\t}", "public static String read_XL_Data(String path,String sheet,int row,int cell)\n\t{\n\t\tString data=\"\";\n\t\ttry\n\t\t{\n\t\t Workbook wb = WorkbookFactory.create(new FileInputStream(path));\n\t\t data = wb.getSheet(sheet).getRow(row).getCell(cell).toString();\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn data;\n\t}", "private String getFile() {\r\n\t\tJFileChooser fileChooser = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\r\n\t\tfileChooser.setDialogTitle(\"Choose a file to open: \");\r\n\t\tfileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\r\n\t\tint success = fileChooser.showOpenDialog(null);\r\n\t\tif (success == JFileChooser.APPROVE_OPTION) {\r\n\t\t\tFile selectedFile = fileChooser.getSelectedFile();\r\n\t\t\tString fileName = selectedFile.getName();\r\n\t\t\treturn fileName;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "public void setExcelFile(String excelfilepath,String Sheetname) throws IOException {\n\t\t File file=new File(excelfilepath);\n\t\t FileInputStream inputstream=new FileInputStream(file);\n\t\t workbook =new XSSFWorkbook(inputstream);\n\t\t sheet =workbook.getSheet(Sheetname);\n\n\t}", "public void seleccionarArchivo(){\n JFileChooser j= new JFileChooser();\r\n FileNameExtensionFilter fi= new FileNameExtensionFilter(\"pdf\",\"pdf\");\r\n j.setFileFilter(fi);\r\n int se = j.showOpenDialog(this);\r\n if(se==0){\r\n this.txtCurriculum.setText(\"\"+j.getSelectedFile().getName());\r\n ruta_archivo=j.getSelectedFile().getAbsolutePath();\r\n }else{}\r\n }", "public static void main(String[] args) throws IOException {\n\t\tSystem.getProperty(\"user.dir\");\n\t\tFileOutputStream fileout = new FileOutputStream(\"C:\\\\Workspace\\\\Module7\\\\Workbook.xls\");\n\t\tHSSFWorkbook wb = new HSSFWorkbook();\n\t\t\n\t\t\n\t\t//creating sheet\n\t\t\n\t\tHSSFSheet sheet1 = wb.createSheet(\"First Sheet\");\n\t\tHSSFSheet sheet2 = wb.createSheet(\"Second sheet\");\n\t\t\n\t\t\n\t\t//Creating rows and cells\n\t\tfor (int i=0; i<100; i++)\n\t\t{\n\t\t\tHSSFRow row = sheet1.createRow(i);\n\t\t\tfor (int j=0; j<4; j++)\n\t\t\t{\n\t\t\t\tHSSFCell cell = row.createCell(j);\n\t\t\t\tcell.setCellValue(j);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\twb.write(fileout);\n\t\tfileout.close();\n\t\t\n\t\tString ProjectLocation = System.getProperty(\"user.dir\");\n\t\t\n\t\tSystem.out.println(ProjectLocation);\n\t\t\n\t\tFileOutputStream FO = new FileOutputStream (ProjectLocation + \"\\\\Playing.xls\");\n\t\tHSSFWorkbook wb2 = new HSSFWorkbook ();\n\t\t\n\t\tHSSFSheet sheet3 = wb.createSheet(\"new sheet\");\n\t\tHSSFRow row1 = sheet3.createRow(0);\n\t\trow1.createCell(0).setCellValue(true);\n\t\trow1.createCell(1).setCellValue(2);\n\t\t\n\t\t\n\t\twb2.write(FO);\n\t\tFO.close();\n\t\t\n\t /*HSSFWorkbook wb = new HSSFWorkbook();\n\t HSSFSheet sheet = wb.createSheet(\"new sheet\");\n\t HSSFRow row = sheet.createRow((short)2);\n\t row.createCell(0).setCellValue(1.1);\n\t row.createCell(1).setCellValue(new Date());\n\t row.createCell(2).setCellValue(Calendar.getInstance());\n\t row.createCell(3).setCellValue(\"a string\");\n\t row.createCell(4).setCellValue(true);\n\t row.createCell(5).setCellType(Cell.CELL_TYPE_ERROR);\n\n\t // Write the output to a file\n\t FileOutputStream fileOut = new FileOutputStream(\"workbook2.xls\");\n\t wb.write(fileOut);\n\t fileOut.close();*/\n\t\t}", "@Action(semantics = SemanticsOf.SAFE)\n public Blob download() {\n final String fileName = \"TurnoverRentBulkUpdate-\" + getProperty().getReference() + \"@\" + getYear() + \".xlsx\";\n final List<LeaseTermForTurnOverRentFixedImport> lineItems = getTurnoverRentLines();\n return excelService.toExcel(lineItems, LeaseTermForTurnOverRentFixedImport.class,\n LEASE_TERM_FOR_TURNOVER_RENT_SHEET_NAME, fileName);\n }", "public FileInputStream getFileInputStream(){\n\t\t//String filePath=System.getProperty((\"user.dir\")+\"\\\\src\\\\test\\\\java\\\\data\\\\userData.xlsx\");\n\t\tString filePath=System.getProperty(\"user.dir\")+\"/src/test/java/data/userData.xlsx\";\n\t\t//String filePath=System.getProperty((\"user.dir\")+\"src/test/java/data/userData.xlsx\");\n\t\tFile srcFile=new File(filePath);\n\t\ttry {\n\t\t\tfis=new FileInputStream(srcFile);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Test Data file not found.terminating process!! :Check file path of test data file\");\n\t\t}\n\n\t\treturn fis;\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\r\n\t\tFile fw = new File(\"C:\\\\Files\\\\work.xlsx\");//create file object\r\n\t\t//FileInputStream f = new FileInputStream(fw);//to create connection first create reader.\r\n\t\tXSSFWorkbook wb = new XSSFWorkbook(new FileInputStream(fw));//to go workbook we are using this class\r\n\t\t//XSSFSheet sht = new XSSFSheet();//to go to sheet\r\n\t\t//below line is for getting that sheet\r\n\t\tXSSFSheet sht1 = wb.getSheet(\"Test\");\r\n\t\tXSSFRow row = sht1.getRow(0);\r\nint a = row.getLastCellNum();\r\n\tSystem.out.println(a);\r\n\tfor(int i=0; i<=a ; i++) {\r\n\t\t\r\n\t\tint s = row.getFirstCellNum();\r\n\t\tSystem.out.println(s);\r\n\t\t\r\n\t\t}\r\n\t}" ]
[ "0.62969166", "0.6039299", "0.5994781", "0.590787", "0.58887875", "0.58523196", "0.5776759", "0.56569624", "0.5571349", "0.5546789", "0.5508456", "0.5505386", "0.5395932", "0.53776497", "0.5351138", "0.5331877", "0.53311443", "0.52739763", "0.5229806", "0.5183065", "0.5171295", "0.5150173", "0.51432717", "0.51220393", "0.5108201", "0.5104282", "0.5101956", "0.5095173", "0.50724894", "0.50593555", "0.50367916", "0.5035954", "0.4991065", "0.49785906", "0.49785906", "0.49785906", "0.49739924", "0.49663076", "0.49420804", "0.49311322", "0.49161774", "0.49149558", "0.49137205", "0.48997062", "0.48837358", "0.48728317", "0.4870588", "0.48647997", "0.48599982", "0.48453248", "0.48445544", "0.48248357", "0.48169652", "0.48152947", "0.4810038", "0.48081952", "0.48058152", "0.4779247", "0.47779366", "0.47743735", "0.4772504", "0.47701323", "0.47606218", "0.4744385", "0.47415352", "0.47338843", "0.47289103", "0.47161406", "0.47091538", "0.47047442", "0.4702835", "0.4698608", "0.4698608", "0.4698608", "0.4698608", "0.4698608", "0.46949813", "0.46916005", "0.4685321", "0.46783215", "0.46725544", "0.46722403", "0.46717688", "0.4663419", "0.4663419", "0.4663419", "0.4663419", "0.4663419", "0.4663419", "0.4663419", "0.4663419", "0.4663419", "0.4662335", "0.46612182", "0.46591073", "0.46505314", "0.4650458", "0.464692", "0.4642876", "0.46399143", "0.46334338" ]
0.0
-1
Cambia la ruta del archvo .xls de estilo de vida.
public void setRutaEstilo(String rutaEstilo) { this.rutaEstilo = rutaEstilo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void gerarArquivoExcel() {\n\t\tFile currDir = getPastaParaSalvarArquivo();\n\t\tString path = currDir.getAbsolutePath();\n\t\t// Adiciona ao nome da pasta o nome do arquivo que desejamos utilizar\n\t\tString fileLocation = path.substring(0, path.length()) + \"/relatorio.xls\";\n\t\t\n\t\t// mosta o caminho que exportamos na tela\n\t\ttextField.setText(fileLocation);\n\n\t\t\n\t\t// Criação do arquivo excel\n\t\ttry {\n\t\t\t\n\t\t\t// Diz pro excel que estamos usando portguês\n\t\t\tWorkbookSettings ws = new WorkbookSettings();\n\t\t\tws.setLocale(new Locale(\"pt\", \"BR\"));\n\t\t\t// Cria uma planilha\n\t\t\tWritableWorkbook workbook = Workbook.createWorkbook(new File(fileLocation), ws);\n\t\t\t// Cria uma pasta dentro da planilha\n\t\t\tWritableSheet sheet = workbook.createSheet(\"Pasta 1\", 0);\n\n\t\t\t// Cria um cabeçario para a Planilha\n\t\t\tWritableCellFormat headerFormat = new WritableCellFormat();\n\t\t\tWritableFont font = new WritableFont(WritableFont.ARIAL, 16, WritableFont.BOLD);\n\t\t\theaderFormat.setFont(font);\n\t\t\theaderFormat.setBackground(Colour.LIGHT_BLUE);\n\t\t\theaderFormat.setWrap(true);\n\n\t\t\tLabel headerLabel = new Label(0, 0, \"Nome\", headerFormat);\n\t\t\tsheet.setColumnView(0, 60);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\theaderLabel = new Label(1, 0, \"Idade\", headerFormat);\n\t\t\tsheet.setColumnView(0, 40);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\t// Cria as celulas com o conteudo\n\t\t\tWritableCellFormat cellFormat = new WritableCellFormat();\n\t\t\tcellFormat.setWrap(true);\n\n\t\t\t// Conteudo tipo texto\n\t\t\tLabel cellLabel = new Label(0, 2, \"Elcio Bonitão\", cellFormat);\n\t\t\tsheet.addCell(cellLabel);\n\t\t\t// Conteudo tipo número (usar jxl.write... para não confundir com java.lang.number...)\n\t\t\tjxl.write.Number cellNumber = new jxl.write.Number(1, 2, 49, cellFormat);\n\t\t\tsheet.addCell(cellNumber);\n\n\t\t\t// Não esquecer de escrever e fechar a planilha\n\t\t\tworkbook.write();\n\t\t\tworkbook.close();\n\n\t\t} catch (IOException e1) {\n\t\t\t// Imprime erro se não conseguir achar o arquivo ou pasta para gravar\n\t\t\te1.printStackTrace();\n\t\t} catch (WriteException e) {\n\t\t\t// exibe erro se acontecer algum tipo de celula de planilha inválida\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public void escribirExcel(String pathPlan, String pathDeex, String nombResa) throws Exception {\n LOGGER.info(\"Iniciando escritura del archivo en excel\");\n\n LOGGER.debug(\"Ruta de la plantilla {}\", pathPlan);\n LOGGER.debug(\"Ruta donde se va a escribir la plantilla {} \", pathDeex);\n\n //Archivo Origen\n File archOrig = null;\n //Archivo Destino\n File archDest = null;\n //ruta completa de la plantilla\n String pathDefi = pathDeex + File.separator + nombResa;\n //Registra del archivo de excel\n Row row = null;\n //Celda en el archivo de excel\n Cell cell;\n //Hoja de excel\n Sheet sheet = null;\n //Numero de hojas en el libro de excel\n int numberOfSheets;\n //Constantes\n final String NOMBRE_HOJA = \"RESULTADOS EVALUACION\";\n // Fila y columna para \n int fila = 0;\n int columna = 0;\n //Fila inicio evidencia\n int filaEvid;\n\n try {\n archOrig = new File(pathPlan);\n\n if (!archOrig.exists()) {\n LOGGER.debug(\"Plantilla no existe en la ruta {} \", pathPlan);\n throw new IOException(\"La plantilla no existe en la ruta \" + pathPlan);\n }\n\n archDest = new File(pathDeex);\n\n if (!archDest.exists()) {\n LOGGER.debug(\"Ruta no existe donde se va a depositar el excel {} , se va a crear\", pathDeex);\n archDest.mkdirs();\n }\n\n LOGGER.info(\"Ruta del archivo a crear {}\", pathDefi);\n archDest = new File(pathDefi);\n\n if (!archDest.exists()) {\n LOGGER.info(\"No existe el archivo en la ruta {}, se procede a la creacion \", pathDefi);\n archDest.createNewFile();\n } else {\n\n LOGGER.info(\"el archivo que se requiere crear, ya existe {} se va a recrear\", pathDefi);\n archDest.delete();\n LOGGER.info(\"archivo en la ruta {}, borrado\", pathDefi);\n archDest.createNewFile();\n\n LOGGER.info(\"archivo en la ruta {}, se vuelve a crear\", pathDefi);\n\n }\n\n LOGGER.info(\"Se inicia con la copia de la plantilla de la ruta {} a la ruta {} \", pathPlan, pathDefi);\n try (FileChannel archTror = new FileInputStream(archOrig).getChannel();\n FileChannel archTrDe = new FileOutputStream(archDest).getChannel();) {\n\n archTrDe.transferFrom(archTror, 0, archTror.size());\n\n LOGGER.info(\"Termina la copia del archivo\");\n\n } catch (Exception e) {\n LOGGER.info(\"Se genera un error con la transferencia {} \", e.getMessage());\n throw new Exception(\"Error [\" + e.getMessage() + \"]\");\n }\n\n LOGGER.info(\"Se inicia con el diligenciamiento del formato \");\n\n LOGGER.info(\"Nombre Archivo {}\", archDest.getName());\n if (!archDest.getName().toLowerCase().endsWith(\"xls\")) {\n throw new Exception(\"La plantilla debe tener extension xls\");\n }\n\n try (FileInputStream fis = new FileInputStream(archDest);\n Workbook workbook = new HSSFWorkbook(fis);\n FileOutputStream fos = new FileOutputStream(archDest);) {\n\n if (workbook != null) {\n numberOfSheets = workbook.getNumberOfSheets();\n LOGGER.debug(\"Numero de hojas {}\", numberOfSheets);\n\n LOGGER.info(\"Hoja seleccionada:{}\", NOMBRE_HOJA);\n sheet = workbook.getSheetAt(0);\n\n fila = 5;\n\n LOGGER.info(\"Se inicia con la escritura de las oportunidades de mejora\");\n\n LOGGER.info(\"Creando las celdas a llenar\");\n\n for (int numeFila = fila; numeFila < this.listOpme.size() + fila; numeFila++) {\n\n LOGGER.info(\"Fila {} \", numeFila);\n if (numeFila > 8) {\n\n copyRow(workbook, sheet, numeFila - 2, numeFila - 1);\n sheet.addMergedRegion(new CellRangeAddress(numeFila - 1, numeFila - 1, 1, 4));\n sheet.addMergedRegion(new CellRangeAddress(numeFila - 1, numeFila - 1, 6, 7));\n\n }\n\n }\n\n LOGGER.info(\"Terminando de llenar celdas\");\n LOGGER.info(\"Poblar registros desde {} \", fila);\n\n for (OptuMejo optuMejo : this.listOpme) {\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 1. Valor Capacitacion tecnica {}\", fila, optuMejo.getCapaTecn());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(1);\n\n cell.setCellValue(optuMejo.getCapaTecn());\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 6. Valor compromisos del area {}\", fila, optuMejo.getComporta());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(6);\n\n cell.setCellValue(optuMejo.getComporta());\n\n fila++;\n\n }\n LOGGER.info(\"Termino de poblar el registro hasta {} \", fila);\n //Ajustando los formulario\n if (fila > 8) {\n sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 6));\n } else {\n fila = 9;\n }\n\n /* sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 6));*/\n LOGGER.info(\"Fin de la escritura de las oportunidades de mejora\");\n\n LOGGER.info(\"Se inicia la escritura de las evidencias \");\n\n fila += 2;\n filaEvid = fila + 5;\n\n LOGGER.info(\"Se inicia la creacion de las celdas desde el registro {} \", fila);\n\n for (Evidenci evidenci : this.listEvid) {\n\n if (filaEvid < fila) {\n copyRow(workbook, sheet, fila - 1, fila);\n\n }\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 1. Valor Fecha {}\", fila, evidenci.getFecha());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(1);\n\n cell.setCellValue(evidenci.getFecha());\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 6. Valor compromisos del area {}\", fila, evidenci.getDescripc());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(2);\n\n cell.setCellValue(evidenci.getDescripc());\n\n sheet.addMergedRegion(new CellRangeAddress(fila, fila, 2, 6));\n\n fila++;\n\n }\n\n LOGGER.info(\"Fin de la escritura de las Evidencias\");\n\n LOGGER.info(\"Inicio de escritura de calificaciones\");\n //Ajustando los formulario - resultado\n\n /*sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));*/\n if (fila > filaEvid) {\n LOGGER.info(\"Fila a ejecutar {} \", fila);\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 2, fila + 2, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 3, fila + 3, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 4, fila + 4, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 6, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 2, fila + 4, 6, 7));\n //Firma del evaluado ajuste\n sheet.addMergedRegion(new CellRangeAddress(fila + 5, fila + 5, 1, 3));\n sheet.addMergedRegion(new CellRangeAddress(fila + 5, fila + 5, 4, 6));\n\n //Ajustando recursos\n sheet.addMergedRegion(new CellRangeAddress(fila + 6, fila + 6, 1, 7));\n\n sheet.addMergedRegion(new CellRangeAddress(fila + 8, fila + 8, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 10, fila + 10, 1, 7));\n\n } else {\n fila = filaEvid + 1;\n LOGGER.info(\"Fila a ejecutar {} \", fila);\n }\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor Excelente {}\", fila + 2, this.excelent);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 2);\n cell = row.getCell(2);\n\n cell.setCellValue((this.excelent != null ? this.excelent : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor satisfactorio {}\", fila + 3, this.satisfac);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 3);\n cell = row.getCell(2);\n\n cell.setCellValue((this.satisfac != null ? this.satisfac : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 3. Valor no satisfactorio {}\", fila + 4, this.noSatisf);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 4);\n cell = row.getCell(2);\n\n cell.setCellValue((this.noSatisf != null ? this.noSatisf : \"\"));\n\n //Ajustando Total Calificacion en Numero\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor total calificacion {}\", fila + 2, this.numeToca);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 2);\n cell = row.getCell(6);\n\n cell.setCellValue(this.numeToca);\n\n LOGGER.info(\"Fin de escritura de calificaciones\");\n\n LOGGER.info(\"Inicio de escritura de interposicion de recursos\");\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 7, this.siinRecu);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 7);\n cell = row.getCell(6);\n\n cell.setCellValue(\"SI:\" + (this.siinRecu != null ? this.siinRecu : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 7, this.noinRecu);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 7);\n cell = row.getCell(7);\n\n cell.setCellValue(\"NO:\" + (this.noinRecu != null ? this.noinRecu : \"\"));\n \n \n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 8, this.fech);\n \n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 8);\n cell = row.getCell(1);\n\n cell.setCellValue(\"FECHA:\" + (this.fech != null ? this.fech : \"\"));\n \n \n\n LOGGER.info(\"Fin de escritura de interposicion de recursos\");\n\n //Ajustando recursos\n workbook.write(fos);\n\n } else {\n throw new Exception(\"No se cargo de manera adecuada el archivo \");\n }\n\n } catch (Exception e) {\n System.out.println(\"\" + e.getMessage());\n }\n\n } catch (Exception e) {\n LOGGER.error(e.getMessage());\n throw new Exception(e.getMessage());\n }\n }", "public void guardarArchivoXLS(HSSFWorkbook libro)\r\n {\r\n JFileChooser fileChooserAlumnos = new JFileChooser();\r\n \r\n //filtro para ver solo archivos .xls\r\n fileChooserAlumnos.addChoosableFileFilter(new FileNameExtensionFilter(\"todos los archivos *.XLS\", \"xls\",\"XLS\"));\r\n int seleccion = fileChooserAlumnos.showSaveDialog(null);\r\n \r\n try{\r\n \t//comprueba si ha presionado el boton de aceptar\r\n if (seleccion == JFileChooser.APPROVE_OPTION){\r\n File archivoJFileChooser = fileChooserAlumnos.getSelectedFile();\r\n FileOutputStream archivo = new FileOutputStream(archivoJFileChooser+\".xls\");\r\n libro.write(archivo); \r\n JOptionPane.showMessageDialog(null,\"Se guardó correctamente el archivo\", \"Guardado exitoso!\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n }catch (Exception e){\r\n JOptionPane.showMessageDialog(null,\"Error al guardar el archivo!\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public static void main(String[] args) {\n String filePath=\"C:\\\\down\\\\gogo.xls\";\r\n \r\n HSSFWorkbook workbook = new HSSFWorkbook(); // 새 엑셀 생성\r\n HSSFSheet sheet = workbook.createSheet(\"sheet1\"); // 새 시트(Sheet) 생성\r\n HSSFRow row = sheet.createRow(0); // 엑셀의 행은 0번부터 시작\r\n HSSFCell cell = row.createCell(0); // 행의 셀은 0번부터 시작\r\n cell.setCellValue(\"data\"); //생성한 셀에 데이터 삽입\r\n try {\r\n FileOutputStream fileoutputstream = new FileOutputStream(\"C:\\\\down\\\\gogo.xls\");\r\n workbook.write(fileoutputstream);\r\n fileoutputstream.close();\r\n System.out.println(\"엑셀파일생성성공\");\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n System.out.println(\"엑셀파일생성실패\");\r\n }\r\n\r\n}", "public void exportXLS() {\n\t\t// Create a Workbook\n\t\tWorkbook workbook = new HSSFWorkbook(); // new HSSFWorkbook() for\n\t\t\t\t\t\t\t\t\t\t\t\t// generating `.xls` file\n\n\t\t/*\n\t\t * CreationHelper helps us create instances of various things like DataFormat,\n\t\t * Hyperlink, RichTextString etc, in a format (HSSF, XSSF) independent way\n\t\t */\n\t\tCreationHelper createHelper = workbook.getCreationHelper();\n\n\t\t// Create a Sheet\n\t\tSheet sheet = workbook.createSheet(\"العقود\");\n\n\t\t// Create a Font for styling header cells\n\t\tFont headerFont = workbook.createFont();\n\t\theaderFont.setBold(true);\n\t\theaderFont.setFontHeightInPoints((short) 14);\n\t\theaderFont.setColor(IndexedColors.RED.getIndex());\n\n\t\t// Create a CellStyle with the font\n\t\tCellStyle headerCellStyle = workbook.createCellStyle();\n\t\theaderCellStyle.setFont(headerFont);\n\n\t\t// Create a Row\n\t\tRow headerRow = sheet.createRow(0);\n\n\t\tString[] columns = { \"الرقم\", \"رقم العقد \", \"تاريخ البداية\", \"تاريخ النهاية\", \"المستثمر\", \"حالة الفاتورة\" };\n\t\t// Create cells\n\t\tfor (int i = 0; i < columns.length; i++) {\n\t\t\tCell cell = headerRow.createCell(i);\n\t\t\tcell.setCellValue(columns[i]);\n\t\t\tcell.setCellStyle(headerCellStyle);\n\t\t}\n\n\t\t// Create Cell Style for formatting Date\n\t\tCellStyle dateCellStyle = workbook.createCellStyle();\n\t\tdateCellStyle.setDataFormat(createHelper.createDataFormat().getFormat(\"dd-MM-yyyy\"));\n\n\t\t// Create Other rows and cells with employees data\n\t\tint rowNum = 1;\n\t\tint num = 1;\n//\t\tfor (ContractDirect contObj : contractsDirectList) {\n//\t\t\tRow row = sheet.createRow(rowNum++);\n//\t\t\trow.createCell(0).setCellValue(num);\n//\t\t\trow.createCell(1).setCellValue(contObj.getContractNum());\n//\n//\t\t\tif (!tableHigriMode) {\n//\t\t\t\tCell date1 = row.createCell(2);\n//\t\t\t\tdate1.setCellValue(contObj.getStartContDate());\n//\t\t\t\tdate1.setCellStyle(dateCellStyle);\n//\t\t\t\tCell date2 = row.createCell(3);\n//\t\t\t\tdate2.setCellValue(contObj.getEndContDate());\n//\t\t\t\tdate2.setCellStyle(dateCellStyle);\n//\t\t\t} else {\n//\t\t\t\tCell date1 = row.createCell(2);\n//\t\t\t\tdate1.setCellValue(contObj.getStartDate());\n//\t\t\t\tdate1.setCellStyle(dateCellStyle);\n//\t\t\t\tCell date2 = row.createCell(3);\n//\t\t\t\tdate2.setCellValue(contObj.getEndDate());\n//\t\t\t\tdate2.setCellStyle(dateCellStyle);\n//\t\t\t}\n//\n//\t\t\tInvestor inv = (Investor) dataAccessService.findEntityById(Investor.class, contObj.getInvestorId());\n//\t\t\trow.createCell(4).setCellValue(inv.getName());\n//\t\t\trow.createCell(5).setCellValue(contObj.getPayStatusName());\n//\t\t\tnum++;\n//\t\t}\n\n\t\t// Resize all columns to fit the content size\n\t\tfor (int i = 0; i < columns.length; i++) {\n\t\t\tsheet.autoSizeColumn(i);\n\t\t}\n\n\t\t// Write the output to a file\n\n\t\ttry {\n\t\t\tString path = \"D:/العقود.xls\";\n\t\t\tFileOutputStream fileOut = new FileOutputStream(path);\n\t\t\tworkbook.write(fileOut);\n\t\t\tfileOut.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\t\ttry {\n\n\t\t\tworkbook.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\t// Closing the workbook\n\n\t}", "public static void main(String[] args) throws IOException, \n FileNotFoundException, ValidacionPS2, \n IllegalArgumentException, \n IllegalAccessException, URISyntaxException { \n ArchivoIO archivoIO = new ArchivoIO(); \n InputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n System.out.println(\"Introduce el path del archivo de excel.\");\n System.out.println(\"ejemplo: C:\\\\Users\\\\Laptop\\\\Downloads\\\\\"\n + \"archivo.xls: \");\n System.out.println(\"path: \");\n String path = br.readLine();\n ArrayList<LDL> datos = archivoIO.convertirExcelALDL(path);\n File f=archivoIO.escribirResultados(datos,path);\n System.out.println(\"Revise los resultados en la ruta:\\n\" \n + f.getAbsolutePath());\n isr.close();\n br.close(); \n }", "@SuppressWarnings({ \"deprecation\", \"static-access\" })\n\tpublic void crearExcel(String nombreFichero,java.sql.Connection connection) throws SQLException {\n \tint contador=0;\n \t\n // Se crea el libro\n HSSFWorkbook libro = new HSSFWorkbook();\n\n // Se crea una hoja dentro del libro\n HSSFSheet hoja = libro.createSheet();\n\n // Se crea una fila dentro de la hoja\n HSSFRow fila = hoja.createRow(contador);\n\n // Se crea una celda dentro de la fila\n HSSFCell celda = fila.createCell((short) 0);\n // Se crea una celda dentro de la fila\n HSSFCell celda2 = fila.createCell((short) 1 );\n // Se crea una celda dentro de la fila\n HSSFCell celda3 = fila.createCell((short) 2 );\n // Se crea una celda dentro de la fila\n HSSFCell celda4 = fila.createCell((short) 3 );\n \n // Se crea el contenido de la celda y se mete en ella.\n HSSFRichTextString texto = new HSSFRichTextString(\"Área\");\n celda.setCellValue(texto);\n\n HSSFRichTextString texto2 = new HSSFRichTextString(\"Dimensión\");\n celda2.setCellValue(texto2);\n \n HSSFRichTextString texto3 = new HSSFRichTextString(\"Lema\");\n celda3.setCellValue(texto3);\n \n HSSFRichTextString texto4 = new HSSFRichTextString(\"Rasgos de Contenido\");\n celda4.setCellValue(texto4);\n \n ArrayList<idPalabra> misAreasAux=new ArrayList<idPalabra>();\n\t\t String areaAct=\"\";\n\t\t area misAreas=new area();\n\t\t misAreasAux=misAreas.devolverAreas(connection);\n\t\t Integer lemAct;\n\t\t \n //SE RECORREN TODAS LAS AREAS\n\t\t for(int i=0; i<misAreasAux.size();i++){\n\t\t\t\n\t\t\t //SE OBTIENE EL AREA ACTUAL\n\t\t\t areaAct=misAreasAux.get(i).getPalabra();\t\n\t\t\t ArrayList<idPalabra> misCategorias= new ArrayList<idPalabra>();\n\t\t\t categoria micategoria = new categoria();\n\t\t\t misCategorias=micategoria.consultarCategoriasConArea(areaAct, connection);\n\t\t\t //Si es 0 es que no hay categorias\n\t\t\t if(misCategorias.size()==0){\n\t\t\t\t contador=contador+1;\n\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t celda = fila.createCell((short) 0);\n\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\n\t\t\t } \n\t\t\t else{\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t//esto es que si tengo categorias\n\t\t\t\tfor(int j=0; j<misCategorias.size();j++){\n\t\t\t\t\t\n\t\t\t\t\t String catAct=misCategorias.get(j).getPalabra();\t\n\t\t\t\t\t//para cada categoria tengo que ver si tiene lemas\n\t\t\t\t\tArrayList<Integer> lemasAct=new ArrayList<Integer>();\n\t\t\t\t\tcategoriasLemas misLemas=new categoriasLemas();\n\t\t\t\t\tlemasAct=misLemas.consultarLemasdeunaCategoria(misCategorias.get(j).getId(),connection);\n\t\t\t\t\t//Si es 0 es que no tengo lemas asociados a dicha categoria\n\t\t\t\t\tif(lemasAct.size()==0){\n\t\t\t\t\t\t contador=contador+1;\n\t\t\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t\t\t celda = fila.createCell((short) 0);\n\t\t\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\t\t celda = fila.createCell((short) 1);\n\t\t\t\t\t\t celda.setCellValue(catAct);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//SI TIENE VARIOS LEMAS ASOCIADOS\n\t\t\t\t\t\tfor(int x=0; x<lemasAct.size();x++){\n\t\t\t\t\t\t\tlema miLema =new lema();\n\t\t\t\t\t\t\t lemAct=lemasAct.get(x);\t\n\t\t\t\t\t\t\tlemaRasgo misLemaRasgo= new lemaRasgo();\n\t\t\t\t\t\t\tArrayList<Integer> rasgos=new ArrayList<Integer>();\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\trasgos= misLemaRasgo.devolverRasgosDeLema(lemasAct.get(x),connection);\n\t\t\t\t\t\t\t//NO TIENE RASGOS\n\t\t\t\t\t\t\tif(rasgos.size()==0){\n\t\t\t\t\t\t\t\tcontador=contador+1;\n\t\t\t\t\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 0);\n\t\t\t\t\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 1);\n\t\t\t\t\t\t\t\t celda.setCellValue(catAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 2);\n\t\t\t\t\t\t\t\t celda.setCellValue(miLema.consultarUnLemaPorId(lemAct,connection));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//SI TIENE RASGOS\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tcontador++;\n\t\t\t\t\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t\t\t\t\tcelda = fila.createCell((short) 0);\n\t\t\t\t\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 1);\n\t\t\t\t\t\t\t\t celda.setCellValue(catAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 2);\n\t\t\t\t\t\t\t\t celda.setCellValue(miLema.consultarUnLemaPorId(lemAct,connection));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t int cont=3;\n\t\t\t\t\t\t\t\tfor(int k=0; k<rasgos.size();k++){\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\trasgocontenido mirasgo =new rasgocontenido();\n\t\t\t\t\t\t\t\t\tcelda = fila.createCell((short) cont);\n\t\t\t\t\t\t\t\t\tcelda.setCellValue(mirasgo.consultarRasgoPorId(rasgos.get(k),connection));\n\t\t\t\t\t\t\t\t\tcont++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t}//if rasgos\n\t\t\t\t\t\t}//if lemas\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t}//if categorias\n\t\t\t\t\t\t\n\n \n\t\t\t }\n\t\t }\n \n // Se salva el libro.\n try {\n FileOutputStream elFichero = new FileOutputStream(nombreFichero);\n libro.write(elFichero);\n elFichero.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tFile file = new File(\"C:\\\\Users\\\\Leonardo\\\\git\\\\repository5\\\\HandleExcelWithApachePoi\\\\src\\\\arquivo_excel.xls\");\r\n\t\t\r\n\t\tif (!file.exists()) {\r\n\t\t\tfile.createNewFile();\r\n\t\t}\r\n\t\t\r\n\t\tPessoa p1 = new Pessoa();\r\n\t\tp1.setEmail(\"[email protected]\");\r\n\t\tp1.setIdade(50);\r\n\t\tp1.setNome(\"Ricardo Edigio\");\r\n\t\t\r\n\t\tPessoa p2 = new Pessoa();\r\n\t\tp2.setEmail(\"[email protected]\");\r\n\t\tp2.setIdade(40);\r\n\t\tp2.setNome(\"Marcos Tadeu\");\r\n\t\t\r\n\t\tPessoa p3 = new Pessoa();\r\n\t\tp3.setEmail(\"[email protected]\");\r\n\t\tp3.setIdade(30);\r\n\t\tp3.setNome(\"Maria Julia\");\r\n\t\t\r\n\t\tList<Pessoa> pessoas = new ArrayList<Pessoa>();\r\n\t\tpessoas.add(p1);\r\n\t\tpessoas.add(p2);\r\n\t\tpessoas.add(p3);\r\n\t\t\r\n\t\t\r\n\t\tHSSFWorkbook hssfWorkbook = new HSSFWorkbook(); /*escrever na planilha*/\r\n\t\tHSSFSheet linhasPessoa = hssfWorkbook.createSheet(\"Planilha de pessoas\"); /*criar planilha*/\r\n\t\t\r\n\t\tint nlinha = 0;\r\n\t\tfor (Pessoa p : pessoas) {\r\n\t\t\tRow linha = linhasPessoa.createRow(nlinha ++); /*criando a linha na planilha*/\r\n\t\t\t\r\n\t\t\tint celula = 0;\r\n\t\t\t\r\n\t\t\tCell celNome = linha.createCell(celula ++); /*celula 1*/\r\n\t\t\tcelNome.setCellValue(p.getNome());\r\n\t\t\t\r\n\t\t\tCell celEmail = linha.createCell(celula ++); /*celula 2*/\r\n\t\t\tcelEmail.setCellValue(p.getEmail());\r\n\t\t\t\r\n\t\t\tCell celIdade = linha.createCell(celula ++); /*celula 3*/\r\n\t\t\tcelIdade.setCellValue(p.getIdade());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tFileOutputStream saida = new FileOutputStream(file);\r\n\t\thssfWorkbook.write(saida);\r\n\t\t\r\n\t\tsaida.flush();\r\n\t\tsaida.close();\r\n\t\t\r\n\t\tSystem.out.println(\"Planilha Criada com Sucesso!\");\r\n\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\nFileInputStream f=new FileInputStream(\"D:\\\\AccuSelenium\\\\Ram\\\\TEST\\\\TestData\\\\LoginData.xls\");\nHSSFWorkbook w=new HSSFWorkbook(f);\nHSSFSheet s=w.getSheet(\"sheet1\");\nSystem.out.println(s.getRow(1));\n}", "private static void showExcel(Experiment e1, ArrayList<Institution> bank) {\n\n\n\n\t\tfinal String INPUT_DIR=\"D:/Users/atsushi/Desktop/実験結果/\";\n\t\tWorkbook book=null;\n\n\t\ttry{\n\t\t\tbook = new HSSFWorkbook();\n\t\t\tFileOutputStream fileOut=new FileOutputStream(\"workbook.xls\");\n\t\t\tString safename=WorkbookUtil.createSafeSheetName(\"[OutPut]\");\n\t\t\tString safename1=WorkbookUtil.createSafeSheetName(\"[Bank]\");\n\t\t\tString safename2=WorkbookUtil.createSafeSheetName(\"[Firm]\");\n\t\t\tSheet sheet1=book.createSheet(safename);\n\t\t\tSheet sheet2=book.createSheet(safename1);\n\t\t\tSheet sheet3=book.createSheet(safename2);\n\t\t\tCreationHelper createHelper=book.getCreationHelper();\n\n\t\t\t//100タームごとに改行\n\t\t\tint rowterm=e1.getTerm()/100+1;\n\t\t\tint term=e1.getTerm();\n\t\t\tint xterm=100;\n\t\t\tint a=0,b=xterm-1;\n\t\t\t//if(e1.getTerm()>100) {xterm=100;a=0;b=xterm-1;}else {xterm=0;a=0;b=e1.getTerm()-1;}\n\t\t\tfor(int x=0;x<rowterm;x++){\n\t\t\tRow row = sheet1.createRow((short)x);//行\n\t\t\tRow row1=sheet1.createRow((short)(x+rowterm+2));\n\t\t\tRow row2=sheet1.createRow((short)(x+rowterm*2+2));\n\t\t\tRow row3=sheet1.createRow((short)(x+rowterm*3+2));\n\t\t\tRow row4=sheet1.createRow((short)(x+rowterm*4+2));\n\t\t\tRow row5=sheet1.createRow((short)(x+rowterm*5+2));\n\t\t\tRow row6=sheet1.createRow((short)(x+rowterm*6+2));\n\t\t\tRow row7=sheet1.createRow((short)(x+rowterm*7+2));\n\t\t\tRow row8=sheet1.createRow((short)(x+rowterm*8+2));\n\t\t\tRow row9=sheet1.createRow((short)(x+rowterm*9+2));\n\t\t\tRow row10=sheet1.createRow((short)(x+rowterm*10+2));\n\t\t\tRow row11=sheet1.createRow((short)(x+rowterm*11+2));\n\t\t\tRow row12=sheet1.createRow((short)(x+rowterm*12+2));\n\t\t\tRow row13=sheet1.createRow((short)(x+rowterm*11+2));\n\n\t\t\tint j=0;\n\t\t\tfor(j=a;j<=b;j++){\n\t\t\trow.createCell(j-(x*xterm)).setCellValue(e1.getAgrregateOP(j));\n\t\t\trow1.createCell(j-(x*xterm)).setCellValue(e1.getGrowthRateOP(j));\n\t\t\trow2.createCell(j-(x*xterm)).setCellValue(e1.getFailedFirm(j));\n\t\t\trow3.createCell(j-(x*xterm)).setCellValue(e1.getFailedFirmrate(j));\n\t\t\trow4.createCell(j-(x*xterm)).setCellValue(e1.getBadLoan(j));\n\t\t\trow5.createCell(j-(x*xterm)).setCellValue(e1.getAVGInterest(j));\n\t\t\trow6.createCell(j-(x*xterm)).setCellValue(e1.getMoneyStock(j));\n\t\t\trow7.createCell(j-(x*xterm)).setCellValue(e1.getCreditMoney(j));\n\t\t\trow8.createCell(j-(x*xterm)).setCellValue(e1.getResidual(j));\n\t\t\trow9.createCell(j-(x*xterm)).setCellValue(e1.getGrossDemand(j));\n\t\t\trow10.createCell(j-(x*xterm)).setCellValue(e1.getGrossSupply(j));\n\t\t\trow11.createCell(j-(x*xterm)).setCellValue(e1.getRejectFinancing(j));\n\n\n\t\t //cell.setCellValue(createHelper.createRichTextString(\"sample String\"));\n\t\t\t}\n\t\t\t/*\n\t\t\tfor(j=a;j<e1.getAliveBank();j++) {\n\t\t\t\trowx.createCell(j-(x*e1.getAliveBank())).setCellValue(e1.getBankCAR(j));\n\t\t\t}*/\n\t\t\tif(term>100){\n\t\t\tif(term-1>xterm+j){\n\t\t\t\tif(term-j-1>xterm){\n\t\t\t\t\ta=j;b=j+xterm-1;\n\t\t\t\t}}else{\n\t\t\t\t\ta=j;\n\t\t\t\t\tb=term-1;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t}\n\n\t\t\t//企業list\n\t\t\te1.setSortFirmK();\n\t\t\tint rowfirm=e1.getalivefirm()/100;\n\t\t\tint firmnode=e1.getalivefirm();\n\t\t\tint fn=100;\n\t\t\tint c=0,d=fn-1;\n\t\t\tint t=0;\n\n\t\t\tRow row00= sheet3.createRow((short)t);\n\t\t\trow00.createCell(0).setCellValue(\"総資産\");\n\t\t\tRow row02=sheet3.createRow((short)t+15);\n\t\t\trow02.createCell(0).setCellValue(\"取引先\");\n\t\t\tRow row04=sheet3.createRow((short)t+30);\n\t\t\trow04.createCell(0).setCellValue(\"Leverage\");\n\t\t\tRow row06=sheet3.createRow((short)t+45);\n\t\t\trow06.createCell(0).setCellValue(\"ChoiveLeverage\");\n\t\t\tRow row08=sheet3.createRow((short)t+60);\n\t\t\trow08.createCell(0).setCellValue(\"RejectOrder\");\n\t\t\tRow row010=sheet3.createRow((short)t+75);\n\t\t\trow010.createCell(0).setCellValue(\"NonBuffer\");\n\t\t\t\tfor(int x=0;x<rowfirm;x++){\n\t\t\t\t/*\n\t\t\t\t\tRow row0= sheet3.createRow((short)x);\n\t\t\t\t\trow0.createCell(0).setCellValue(\"総資産\");\n\t\t\t\t\t*/\n\t\t\t\t\tRow row1 = sheet3.createRow((short)x+1);//行\n\t\t\t\t\tRow row3 = sheet3.createRow((short)x+16);\n\t\t\t\t\tRow row5 = sheet3.createRow((short)x+31);\n\t\t\t\t\tRow row7 = sheet3.createRow((short)x+46);\n\t\t\t\t\tRow row9 =sheet3.createRow((short)x+61);\n\t\t\t\t\tRow row11 =sheet3.createRow((short)x+76);\n\t\t\t\tint j=0;\n\t\t\t\tfor(j=c;j<=d;j++){\n\t\t\t\t\t//System.out.print(d);\n\t\t\t\t\trow1.createCell(j-(x*fn)).setCellValue(e1.getFirmK(j));\n\t\t\t\t\trow3.createCell(j-(x*fn)).setCellValue(e1.getFirmCandidateNum(j));\n\t\t\t\t\trow5.createCell(j-(x*fn)).setCellValue(e1.getFirmLeverage(j));\n\t\t\t\t\trow7.createCell(j-(x*fn)).setCellValue(e1.getFirmnextLeverage(j));\n\t\t\t\t\trow9.createCell(j-(x*fn)).setCellValue(e1.getFirmRejectOrderNum(j));\n\t\t\t\t\trow11.createCell(j-(x*fn)).setCellValue(e1.getFirmNonBufferNum(j));\n\t\t\t\t}\n\n\t\t\t\tif(firmnode-1>fn+j){\n\t\t\t\t\tif(firmnode-j-1>fn){\n\t\t\t\t\t\tc=j;d=j+fn-1;\n\t\t\t\t\t}}else{\n\t\t\t\t\t\tc=j;\n\t\t\t\t\t\td=firmnode-1;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t/*\n\t\t\t\tif(rowfirm==0) {\n\t\t\t\t\tint x=0;\n\t\t\t\t\tRow row0= sheet3.createRow((short)x);\n\t\t\t\t\trow0.createCell(0).setCellValue(\"総資産\");\n\t\t\t\t\tRow row1 = sheet3.createRow((short)x);//行\n\t\t\t\t\tRow row2=sheet3.createRow((short)x+15);\n\t\t\t\t\trow2.createCell(0).setCellValue(\"取引先\");\n\t\t\t\t\tRow row3 = sheet3.createRow((short)x);\n\t\t\t\t\tRow row4=sheet3.createRow((short)x+30);\n\t\t\t\t\trow4.createCell(0).setCellValue(\"Leverate\");\n\t\t\t\t\tRow row5 = sheet3.createRow((short)x);\n\t\t\t\t\tRow row6=sheet3.createRow((short)x+45);\n\t\t\t\t\trow6.createCell(0).setCellValue(\"ChoiveLeverage\");\n\t\t\t\t\tRow row7 = sheet3.createRow((short)x);\n\t\t\t\t\t//Row row8 = sheet3.createRow((short)x);\n\t\t\t\t\t//Row row9=sheet3.createRow((short)x+20);\n\t\t\t\tfor(int i=0;i<firmnode;i++) {\n\t\t\t\t\trow1.createCell(i).setCellValue(e1.getFirmK(i));\n\t\t\t\t\trow3.createCell(i).setCellValue(e1.getFirmCandidateNum(i));\n\t\t\t\t\trow5.createCell(i).setCellValue(e1.getFirmLeverage(i));\n\t\t\t\t\trow7.createCell(i).setCellValue(e1.getFirmnextLeverage(i));\n\t\t\t\t\t//row4.createCell(i).setCellValue(e1.getFirmLevNowEvalue(i));\n\t\t\t\t}\n\t\t\t\t}\n*/\n\n\t\t\t//銀行リスト\n\n\t\t\tint banknode=e1.getAliveBank();\n\n\t\t\tfor(int x=0;x<1;x++) {\n\t\t\tRow row0=sheet2.createRow((short)x);\n\t\t\tRow row1=sheet2.createRow((short)x+2);\n\t\t\trow1.createCell(0).setCellValue(\"CAR\");\n\t\t\tRow row2=sheet2.createRow((short)x+3);\n\t\t\tRow row3=sheet2.createRow((short)x+4);\n\t\t\trow3.createCell(0).setCellValue(\"企業への貸付:IBloan:IBborrow\");\n\t\t\tRow row4=sheet2.createRow((short)x+5);\n\t\t\tRow row5=sheet2.createRow((short)x+6);\n\t\t\tRow row6=sheet2.createRow((short)x+7);\n\t\t\tRow row7=sheet2.createRow((short)x+8);\n\t\t\trow7.createCell(0).setCellValue(\"銀行資産規模K\");\n\t\t\tRow row8=sheet2.createRow((short)x+9);\n\t\t\tRow row9=sheet2.createRow((short)x+10);\n\t\t\trow9.createCell(0).setCellValue(\"銀行buffer\");\n\t\t\tRow row10=sheet2.createRow((short)x+11);\n\t\t\tRow row11=sheet2.createRow((short)x+12);\n\t\t\trow11.createCell(0).setCellValue(\"銀行総badloan\");\n\t\t\tRow row12=sheet2.createRow((short)x+13);\n\t\t\tRow row13=sheet2.createRow((short)x+14);\n\t\t\trow13.createCell(0).setCellValue(\"銀行residual\");\n\t\t\tRow row14=sheet2.createRow((short)x+15);\n\t\t\tRow row15=sheet2.createRow((short)x+16);\n\t\t\trow15.createCell(0).setCellValue(\"銀行総LFlistsize\");\n\t\t\tRow row16=sheet2.createRow((short)x+17);\n\t\t\tRow row17=sheet2.createRow((short)x+18);\n\t\t\trow17.createCell(0).setCellValue(\"銀行市場性資産\");\n\t\t\tRow row18=sheet2.createRow((short)x+19);\n\t\t\tRow row19=sheet2.createRow((short)x+20);\n\t\t\trow19.createCell(0).setCellValue(\"ClientNumber\");\n\t\t\tRow row20=sheet2.createRow((short)x+21);\n\n\t\t\tfor(int i=0;i<banknode;i++) {\n\t\t\trow0.createCell(i).setCellValue(e1.getBankId(i));\n\t\t\trow2.createCell(i).setCellValue(e1.getBankCAR(i));\n\t\t\trow4.createCell(i).setCellValue(e1.getBankLf(i));\n\t\t\trow5.createCell(i).setCellValue(e1.getBankLb(i));\n\t\t\trow6.createCell(i).setCellValue(e1.getBankBb(i));\n\t\t\trow8.createCell(i).setCellValue(e1.getBankK(i));\n\t\t\trow10.createCell(i).setCellValue(e1.getBankBuffer(i));\n\t\t\trow12.createCell(i).setCellValue(e1.getBankGrossBadLoan(i));\n\t\t\trow14.createCell(i).setCellValue(e1.getBankResidual(i));\n\t\t\trow16.createCell(i).setCellValue(e1.getBankLFSize(i));\n\t\t\trow18.createCell(i).setCellValue(e1.getBankLiqAsset(i));\n\t\t\trow20.createCell(i).setCellValue(e1.getBankClientNum(i));\n\t\t\t}\n\t\t\t/*\n\t\t\tfor(int i=0;i<bank.get(0).levlist.size();i++) {\n\t\t\t\trow18.createCell(i).setCellValue(e1.getBanklevlevelvalue(i));\n\t\t\t}\n\t\t\t*/\n\n\n\n\n\n\t\t\t}\n\t\t book.write(fileOut);\n\t\t //fileOut.close();\n\n\t\t // 1つ目のセルを作成 ※行と同じく、0からスタート\n\t\t //Cell a1 = row.createCell(0); // Excel上、「A1」の場所\n\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\n\n\t\t}\n\n\n\t}", "public void gettingDesktopPath() {\n FileSystemView filesys = FileSystemView.getFileSystemView();\n File[] roots = filesys.getRoots();\n homePath = filesys.getHomeDirectory().toString();\n System.out.println(homePath);\n //checking if file existing on that location\n pathTo = homePath + \"\\\\SpisakReversa.xlsx\";\n }", "public static void saveExcel() {\r\n\t\ttry {\r\n\t\t\tFileOutputStream fileOut = new FileOutputStream(Constant.EXCEL_PATH);\r\n\t\t\tworkBook.write(fileOut);\r\n\t\t\tfileOut.flush();\r\n\t\t\tfileOut.close();\r\n\t\t} catch (FileNotFoundException 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}", "public static void main(String[] args) {\n\n\t\tXSSFWorkbook wb = new XSSFWorkbook(); //simulira excel file\n\t\tSheet sh = wb.createSheet(); \n\t\tRow row = sh.createRow(7);\n\t\tCell cell = row.createCell(9);\n\t\tcell.setCellValue(\"LALALA\");\n\t\t\n\t\tRow row1 = sh.createRow(5);\n\t\tCell cell1 = row1.createCell(5); // pazi na sintaksu! row1 cell1!\n\t\tcell1.setCellValue(124);\n\n\t\ttry {\n\t\t\tOutputStream os = new FileOutputStream(\"Izlazni.xlsx\"); // pravi konkretan fajl\n\t\t\twb.write(os); // upisuje sve iz workbooka u os fajl\n\t\t\twb.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Doslo je do greske.\"); // jedini nacin da se obezbedimo sa greskom\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void main(String[] args) throws UnsupportedEncodingException, FileNotFoundException {\n InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(\"riddles.xls\");\n\t\t\n InputStream is = new FileInputStream(new File(\"C:\\\\Users\\\\sean\\\\workspace\\\\mlymoon\\\\src\\\\main\\\\resources\\\\riddles.xls\"));\n\t\tExcelUtil eu = new ExcelUtil();\n List<Object> ls = eu.importDataFromExcel(new Item(), in, \"riddles.xls\");\n for(Object item : ls){\n \t Item i = (Item) item;\n \t System.out.println(i.getAnswer()+\"##\"+i.getConundrum());\n }\n String[] excelHeader = { \"所属区域(地市)\", \"机房\", \"机架资源情况\", \n \t \"\", \"端口资源情况\", \"机位资源情况\", \"\", \"\", \"设备资源情况\", \n \t \"\", \"\", \"IP资源情况\", \"\", \"\", \"\", \"\", \"网络设备数\" };\n /*ApplicationContext context = \n\t new ClassPathXmlApplicationContext(\"appContext.xml\");\n\t CustomerService customerService = context.getBean(\"customerService\",CustomerService.class);\n List<Customer> customers=customerService.findAll(null, null);\n FileOutputStream fout = new FileOutputStream(\"I:/students.xls\"); \n\t\tExcelUtil eu = new ExcelUtil();\n\t\teu.exportDataToExcel(customers, excelHeader, \"dddddd\", fout);*/\n\t}", "@Override\n\tpublic void exportarData() {\n\t\tDate date=new Date();\n\t\tString nameFile=\"recaudado-\"+date.getTime()+\".xls\";\n\t\tTableToExcel.save(grid,nameFile);\n\t}", "public void descargarArchivoVeri()throws SQLException, IOException {\n //conexion con el resultset\n st = cn.createStatement();\n\n // consulta de descarga el getId es la variable que utilizo para ubicarme en la base de datos\n ResultSet rs = st.executeQuery(\"select anexo_veri, nombre FROM anexoverificacion where idverificacion=\"+rt.getId());\ntry {\n \nrs.next();\n// pone en la variable el nombre del archivo de la base de datos\nnombre= rs.getString(\"nombre\");\n// inserta la ruta completa\nFile file = new File(rt.getPath()+nombre);\n// salida del archivo de flujo\nFileOutputStream output = new FileOutputStream(file);\nBlob archivo = rs.getBlob(1);\nInputStream inStream = archivo.getBinaryStream();\n// almacenamiento del tamaño y descarga byte a byte\nint length= -1;\nint size = (int) archivo.length();\nbyte[] buffer = new byte[size];\nwhile ((length = inStream.read(buffer)) != -1) {\noutput.write(buffer, 0, length);\nJOptionPane.showMessageDialog(null,\"El archivo se descargo correctamente\");\n// output.flush();\n\n}\n// inStream.close();\noutput.close();\n} catch (Exception ioe) {\nthrow new IOException(ioe.getMessage());\n}\n}", "@Override\r\n\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\t\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\t\t\t\t\".xls\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\t\t\t\t\"xls\"); // 파일 필터로 사용되는 확장자. *.xml 만 나열됨\r\n\t\t\t\t\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\t\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\r\n\t\t\t\t\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\t\t\t\t\tint ret = chooser.showSaveDialog(null);\r\n\t\t\t\t\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"저장경로를 선택하지 않으셨습니다.\", \"경고\",\r\n\t\t\t\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// 사용자가 파일을 선택하고 \"저장\" 버튼을 누른 경우\r\n\t\t\t\t\t\t\t\t//String saveFilePath = chooser.getSelectedFile().toString() + chooser.getFileFilter().getDescription(); // 파일 경로명을 알아온다.\t\t\t\t\r\n\t\t\t\t\t\t\t\tString saveFilePath = chooser.getSelectedFile().toString();\r\n\t\t\t\t\t\t\t\tif(saveFilePath.contains(\".xls\")){\r\n\t\t\t\t\t\t\t\t\tif(saveFilePath.endsWith(\"x\"))\r\n\t\t\t\t\t\t\t\t\t\tsaveFilePath = saveFilePath.replace(\"xlsx\", \"xls\");\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\tsaveFilePath = chooser.getSelectedFile().toString();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\tsaveFilePath = chooser.getSelectedFile().toString() + chooser.getFileFilter().getDescription();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tsaveToExcel(saveFilePath);\r\n\t\t\t\t\t\t\t}", "public static String selectExcelFile (){\n\t\t\tfinal JFileChooser fc = new JFileChooser();\r\n\t\t\tfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\r\n\t\t\t\r\n\t\t\t//In response to a button click:\r\n\t\t\tint folderTarget = fc.showDialog(fc, \"Select Ecxel File\");\r\n\t\t\t\r\n\t\t\tString path =\"\";\r\n\t\t\tif (folderTarget == JFileChooser.APPROVE_OPTION){\r\n\t\t\t\tpath = fc.getSelectedFile().getAbsolutePath();\r\n\t\t\t\treturn path;\r\n\t\t\t} else if (folderTarget == JFileChooser.CANCEL_OPTION){\r\n\t\t\t\tfc.setVisible(false);\r\n\t\t\t}\t\r\n\t\t\treturn path;\r\n\t\t}", "@Override\r\n public void execute(Workbook workbook) {\n InputStream fileStream = this.getResourceStream(\"xlsx/Employee absence schedule.xlsx\");\r\n workbook.open(fileStream);\r\n }", "public void Ejecutar() throws IOException {\n\t\t// An excel file name. You can create a file name with a full\n\t\t// path information.\n\t\t//\n\t\tString filename = \"excel/bd.xls\";\n\t\t//\n\t\t// Create an ArrayList to store the data read from excel sheet.\n\t\t//\n\t\tList sheetData = new ArrayList();\n\t\tFileInputStream fis = null;\n\t\ttry {\n\t\t\t//\n\t\t\t// Create a FileInputStream that will be use to read the\n\t\t\t// excel file.\n\t\t\t//\n\t\t\tfis = new FileInputStream(filename);\n\t\t\t//\n\t\t\t// Create an excel workbook from the file system.\n\t\t\t//\n\t\t\tHSSFWorkbook workbook = new HSSFWorkbook(fis);\n\t\t\t//\n\t\t\t// Get the first sheet on the workbook.\n\t\t\t//\n\t\t\tHSSFSheet sheet = workbook.getSheetAt(0);\n\t\t\t//\n\t\t\t// When we have a sheet object in hand we can iterator on\n\t\t\t// each sheet's rows and on each row's cells. We store the\n\t\t\t// data read on an ArrayList so that we can printed the\n\t\t\t// content of the excel to the console.\n\t\t\t//\n\t\t\tIterator rows = sheet.rowIterator();\n\t\t\twhile (rows.hasNext()) {\n\t\t\t\tHSSFRow row = (HSSFRow) rows.next();\n\n\t\t\t\tIterator cells = row.cellIterator();\n\t\t\t\tList data = new ArrayList();\n\t\t\t\twhile (cells.hasNext()) {\n\t\t\t\t\tHSSFCell cell = (HSSFCell) cells.next();\n\t\t\t\t\t// System.out.println(\"Añadiendo Celda: \" + cell.toString());\n\t\t\t\t\tdata.add(cell);\n\t\t\t\t}\n\t\t\t\tsheetData.add(data);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (fis != null) {\n\t\t\t\tfis.close();\n\t\t\t}\n\t\t}\n\t\tshowExelData(sheetData);\n\n\t\t// impresion de matriz\n\t\t/*\n\t\t * for (int filas = 0; filas <fila; filas++) { for (int columna = 0; columna <\n\t\t * 4; columna++) { if(columna<3) {\n\t\t * \n\t\t * \n\t\t * }else { System.out.println(\"\"); }\n\t\t * \n\t\t * } }\n\t\t */\n\n\t\tint matriz2[][] = new int[fila][3];\n\n\t\tint numeroDeDatosMatriz = 0;\n\n\t\tfor (int filas = 0; filas < fila; filas++) {\n\t\t\tint validar = 0;\n\n\t\t\tfor (int recorrido = 0; recorrido < numeroDeDatosMatriz; recorrido++) {\n\t\t\t\tif (validar == 1) {\n\t\t\t\t\t// System.out.println(\"si encontro\");\n\t\t\t\t\t// break;\n\t\t\t\t}\n\n\t\t\t\t// System.out.print(matriz[filas][0]+\"|\");\n\t\t\t\t// System.out.println(matriz2[recorrido][0]+\"|\");\n\n\t\t\t\tif (matriz[filas][0] == matriz2[recorrido][0]) {\n\t\t\t\t\tmatriz2[recorrido][1] = matriz2[recorrido][1] + matriz[filas][1];\n\t\t\t\t\tmatriz2[recorrido][2] = matriz2[recorrido][2] + matriz[filas][2];\n\t\t\t\t\tvalidar = 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (validar == 0) {\n\t\t\t\tmatriz2[numeroDeDatosMatriz][0] = matriz[filas][0];\n\t\t\t\tmatriz2[numeroDeDatosMatriz][1] = matriz[filas][1];\n\t\t\t\tmatriz2[numeroDeDatosMatriz][2] = matriz[filas][2];\n\t\t\t\tnumeroDeDatosMatriz++;\n\n\t\t\t}\n\n\t\t\tif (validar == 1) {\n\t\t\t\tvalidar = 0;\n\t\t\t}\n\n\t\t}\n\t\t// impresion del contro general\n\t\t/*\n\t\t * \n\t\t * for (int filas = 0; filas <fila; filas++) { for (int columna = 0; columna <\n\t\t * 4; columna++) { if(columna<3) {\n\t\t * \n\t\t * System.out.print(matriz2[filas][columna]+\"|\"); }else {\n\t\t * System.out.println(\"\"); }\n\t\t * \n\t\t * } }\n\t\t */\n\t\t//////////// Pedir numero\n\t\t\n\t\tint numero = Integer.parseInt( JOptionPane.showInputDialog(\n\t\t\t null,\"¿Qué numeros con importe arriba de ?\",\n\t\t\t \"Petición \",\n\t\t\t JOptionPane.QUESTION_MESSAGE) );\n\t\t\n\t\t\n\t\t////////\n\t\tint matrizresultados[][] = new int[fila][2];\n\n\t\t// filtro primer lugar\n\n\t\tint numeroDeresultadosPrimerLugar = 0;\n\n\t\tfor (int filas = 0; filas < fila; filas++) {\n\t\t\tif (matriz2[filas][1] > numero) {\n\t\t\t\tmatrizresultados[numeroDeresultadosPrimerLugar][0] = matriz2[filas][0];\n\t\t\t\tmatrizresultados[numeroDeresultadosPrimerLugar][1] = matriz2[filas][1];\n\t\t\t\tnumeroDeresultadosPrimerLugar++;\n\t\t\t}\n\t\t}\n\n\t\tfor (int filas = 0; filas < numeroDeresultadosPrimerLugar; filas++) {\n\t\t\t// System.out.print(matrizresultados[filas][0]+\"|\");\n\t\t\t// System.out.println(matrizresultados[filas][1]);\n\t\t}\n\n\t\t//\n\n\t\t////////\n\n\t\t// System.out.println(\"///////////////////////////////////////////////\");\n\t\tint matrizresultadosSegundo[][] = new int[fila][2];\n\n\t\t// filtro primer lugar\n\n\t\tint numeroDeresultadosSegundoLugar = 0;\n\n\t\tfor (int filas = 0; filas < fila; filas++) {\n\t\t\tif (matriz2[filas][2] > numero) {\n\t\t\t\tmatrizresultadosSegundo[numeroDeresultadosSegundoLugar][0] = matriz2[filas][0];\n\t\t\t\tmatrizresultadosSegundo[numeroDeresultadosSegundoLugar][1] = matriz2[filas][2];\n\t\t\t\tnumeroDeresultadosSegundoLugar++;\n\t\t\t}\n\t\t}\n\n\t\tfor (int filas = 0; filas < numeroDeresultadosSegundoLugar; filas++) {\n\t\t\t// System.out.print(matrizresultadosSegundo[filas][0]+\"|\");\n\t\t\t// System.out.println(matrizresultadosSegundo[filas][1]);\n\t\t}\n\n\t\t//\n\n\t\tString textoArchivo = \"\";\n\n\t\tint numeroDeFilasCrearExcel = 0;\n\n\t\tfor (int lugar = 0; lugar < 2; lugar++) {\n\t\t\tif (lugar == 0) {\n\t\t\t\ttextoArchivo = \"Primeros lugares\";\n\t\t\t\tnumeroDeFilasCrearExcel = numeroDeresultadosPrimerLugar;\n\t\t\t} else {\n\t\t\t\ttextoArchivo = \"Segundos lugares\";\n\t\t\t\tnumeroDeFilasCrearExcel = numeroDeresultadosSegundoLugar;\n\t\t\t}\n\n\t\t\t/* La ruta donde se creará el archivo */\n\t\t\tString rutaArchivo = System.getProperty(\"user.home\") + \"/\" + textoArchivo + \".xls\";\n\t\t\t/* Se crea el objeto de tipo File con la ruta del archivo */\n\t\t\tFile archivoXLS = new File(rutaArchivo);\n\t\t\t/* Si el archivo existe se elimina */\n\t\t\tif (archivoXLS.exists())\n\t\t\t\tarchivoXLS.delete();\n\t\t\t/* Se crea el archivo */\n\t\t\tarchivoXLS.createNewFile();\n\n\t\t\t/* Se crea el libro de excel usando el objeto de tipo Workbook */\n\t\t\tWorkbook libro = new HSSFWorkbook();\n\t\t\t/* Se inicializa el flujo de datos con el archivo xls */\n\t\t\tFileOutputStream archivo = new FileOutputStream(archivoXLS);\n\n\t\t\t/*\n\t\t\t * Utilizamos la clase Sheet para crear una nueva hoja de trabajo dentro del\n\t\t\t * libro que creamos anteriormente\n\t\t\t */\n\t\t\tSheet hoja = libro.createSheet(textoArchivo+\" arriba de \" + numero);\n\n\t\t\t/* Hacemos un ciclo para inicializar los valores de 10 filas de celdas */\n\t\t\tfor (int f = 0; f < numeroDeFilasCrearExcel + 1; f++) {\n\t\t\t\t/* La clase Row nos permitirá crear las filas */\n\t\t\t\tRow fila = hoja.createRow(f);\n\n\t\t\t\t/* Cada fila tendrá 5 celdas de datos */\n\t\t\t\tfor (int c = 0; c < 2; c++) {\n\t\t\t\t\t/* Creamos la celda a partir de la fila actual */\n\t\t\t\t\tCell celda = fila.createCell(c);\n\n\t\t\t\t\t/* Si la fila es la número 0, estableceremos los encabezados */\n\t\t\t\t\tif (f == 0) {\n\t\t\t\t\t\tif (c == 0) {\n\t\t\t\t\t\t\tcelda.setCellValue(\"Numero Ganador\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcelda.setCellValue(textoArchivo+\" arriba de \" + numero);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif (lugar == 0) {\n\t\t\t\t\t\t\t/* Si no es la primera fila establecemos un valor */\n\t\t\t\t\t\t\tif(c==0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(matrizresultados[f - 1][c]<100) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcelda.setCellValue(\"0\" + matrizresultados[f - 1][c]);\n\t\t\t\t\t\t\t\t}else \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcelda.setCellValue(\"\" + matrizresultados[f - 1][c]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcelda.setCellValue(\"\" + matrizresultados[f - 1][c]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(c==0) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(matrizresultadosSegundo[f - 1][c]<100) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcelda.setCellValue(\"0\" + matrizresultadosSegundo[f - 1][c]);\n\t\t\t\t\t\t\t\t}else \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcelda.setCellValue(\"\" + matrizresultadosSegundo[f - 1][c]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcelda.setCellValue(\"\" + matrizresultadosSegundo[f - 1][c]);\n\t\t\t\t\t\t\t}\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\t/* Escribimos en el libro */\n\t\t\tlibro.write(archivo);\n\t\t\t/* Cerramos el flujo de datos */\n\t\t\tarchivo.close();\n\t\t\t/* Y abrimos el archivo con la clase Desktop */\n\t\t\tDesktop.getDesktop().open(archivoXLS);\n\n\t\t}\n\n\t}", "public void getExportedBookDataXlsFileByUser(){\n File mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n //String pathName = mPath.getPath() + \"/\" + \"sample_wordbook_daum.xls\";\n //Manager_SystemControl.saveFileFromInputStream(databaseInputStream,pathName);\n\n final Manager_FileDialog managerFileDialog = new Manager_FileDialog(this, mPath, \".xls\");\n managerFileDialog.addFileListener(new Manager_FileDialog.FileSelectedListener() {\n public void fileSelected(File file) {\n managerFileDialog.removeFileListener(this);\n new LoadDaumXlsFile(WordListActivity.this,file.getPath()).execute();\n }\n });\n managerFileDialog.showDialog();\n }", "void readExcel(File existedFile) throws Exception;", "public void abrirArchivo() {\r\n try {\r\n entrada = new Scanner(new File(\"estudiantes.txt\"));\r\n } // fin de try\r\n catch (FileNotFoundException fileNotFoundException) {\r\n System.err.println(\"Error al abrir el archivo.\");\r\n System.exit(1);\r\n } // fin de catch\r\n }", "public static File createStatisticsFile(User currentUser){\n\t\t\n\t\t//TODO WHOLE APP TO USE ONE HREF.\n\t\t//final String href = \"http://localhost:9000/\";\n\t\t\n\t\ttry {\n\t\t\t// creates the \"excel sheet\" with its name;\n\t\t\tHSSFWorkbook workbook = new HSSFWorkbook();\n\t HSSFSheet sheet = workbook.createSheet(\"Statistics\"); \n\t String fileName = UUID.randomUUID().toString().replace(\"-\", \"\") + \".xls\";\n\t // creates the folder with the file name; \n\t new File(statsFilePath).mkdirs();\n\t File statisticFile = new File(statsFilePath +fileName);\n\t \n\t applyTheStringViewForStats(currentUser);\n\t\t\t \n\t //SETTING STYLE\n\t HSSFCellStyle style = workbook.createCellStyle();\n\t style.setBorderTop((short) 6); \n\t style.setBorderBottom((short) 1); \n\t style.setFillBackgroundColor(HSSFColor.GREY_80_PERCENT.index);\n\t style.setFillForegroundColor(HSSFColor.GREY_80_PERCENT.index);\n\t style.setFillPattern(HSSFColor.GREY_80_PERCENT.index);\n\t \n\t HSSFFont font = workbook.createFont();\n\t font.setFontName(HSSFFont.FONT_ARIAL);\n\t font.setFontHeightInPoints((short) 10);\n\t font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);\n\t font.setColor(HSSFColor.BLACK.index);\t \n\t style.setFont(font);\n\t style.setWrapText(true);\n\t \n\t //Header cells (the first header row) and added style !\n\t HSSFRow rowhead= sheet.createRow((short)0);\n\t \n\t HSSFCell bitpikId = rowhead.createCell(0);\n\t bitpikId.setCellValue(new HSSFRichTextString(\"BitPik id\"));\n\t bitpikId.setCellStyle(style);\n\t \n\t HSSFCell productName = rowhead.createCell(1);\n\t productName.setCellValue(new HSSFRichTextString(\"Ime proizvoda\"));\n\t productName.setCellStyle(style);\n\t \n\t HSSFCell productPrice = rowhead.createCell(2);\n\t productPrice.setCellValue(new HSSFRichTextString(\"Cijena\"));\n\t productPrice.setCellStyle(style);\n\t \n\t HSSFCell publishedDate = rowhead.createCell(3);\n\t publishedDate.setCellValue(new HSSFRichTextString(\"Datum objave\"));\n\t publishedDate.setCellStyle(style); \n\t \n\t HSSFCell isSold = rowhead.createCell(4);\n\t isSold.setCellValue(new HSSFRichTextString(\"Prodat artikal\"));\n\t isSold.setCellStyle(style); \n\t \n\t HSSFCell isSpecial = rowhead.createCell(5);\n\t isSpecial.setCellValue(new HSSFRichTextString(\"Izdvojen\"));\n\t isSpecial.setCellStyle(style); \n\t \n\t HSSFCell noOfClicks = rowhead.createCell(6);\n\t noOfClicks.setCellValue(new HSSFRichTextString(\"Br. pregleda\"));\n\t noOfClicks.setCellStyle(style); \n\t \n\t HSSFCell noOfComments = rowhead.createCell(7);\n\t noOfComments.setCellValue(new HSSFRichTextString(\"Br. komentara\"));\n\t noOfComments.setCellStyle(style);\n\t \n\t rowhead.setHeight((short)20);\n\t //Creating rows for each product from the list allProducts. \n\t // starting from the row (number 1.) - we generate each cell with its value;\n\t int rowIndex = 1;\n\t \n\t for (Product product: allProducts){\n\t\t \tHSSFRow row= sheet.createRow(rowIndex);\n\t\t \trow.createCell(0).setCellValue(product.id);\n\t\t row.createCell(1).setCellValue(product.name);\n\t\t row.createCell(2).setCellValue(product.price);\n\t\t row.createCell(3).setCellValue(product.publishedDate); \t \n\t\t row.createCell(4).setCellValue(product.statsProducts.isItSold); \t\n\t\t row.createCell(5).setCellValue(product.statsProducts.isItSpecial); \n\t\t \n\t\t row.createCell(6).setCellValue(product.statsProducts.noOfClicksS); \t\n\t\t Logger.info(\"noOfclicks Prod.\" +product.name + \" je > \" +product.statsProducts.noOfClicksS);\n\t\t row.createCell(7).setCellValue(product.statsProducts.noOfComments); \n\t\t Logger.info(\"noOfcomments Prod.\" +product.name + \" je > \" +product.statsProducts.noOfClicksS);\n\t\t rowIndex++;\n\t }\n\t \n\t //rowhead.setRowStyle(style);\n\t //auto-sizing all of the columns in the sheet generated;\n\t for(int i=0; i<8; i++){\n\t \t sheet.autoSizeColumn((short) i);\t\n\t }\t \n\t \n\t // putting the File in FileOutPutStream();\n\t FileOutputStream fileOut = new FileOutputStream(statisticFile);\n\t workbook.write(fileOut);\n\t fileOut.flush();\n\t fileOut.close();\n\t workbook.close();\n\t \n\t return statisticFile;\n\t \n\t\t} catch (FileNotFoundException e) {\n\t\t\tLogger.error(\"Statistic file exception \", e );\t\t\t\n\t\t} catch (IOException e) {\n\t\t\tLogger.error(\"IO exception\", e);\n\t\t} \n\t\treturn null;\n\t}", "public void seleccionarArchivo(){\n JFileChooser j= new JFileChooser();\r\n FileNameExtensionFilter fi= new FileNameExtensionFilter(\"pdf\",\"pdf\");\r\n j.setFileFilter(fi);\r\n int se = j.showOpenDialog(this);\r\n if(se==0){\r\n this.txtCurriculum.setText(\"\"+j.getSelectedFile().getName());\r\n ruta_archivo=j.getSelectedFile().getAbsolutePath();\r\n }else{}\r\n }", "@Override\n\tpublic Integer obtenerTamanioFilasArchivoExcel(final InputStream inputStreamArchivo) throws SICException {\n\t\tInteger tamanio = null;\n\t\tWorkbook workbook = null;\n\t\tSheet sheet = null;\n\t\ttry {\n\t\t\tif (inputStreamArchivo != null) {\n\t\t\t\tworkbook = WorkbookFactory.create(inputStreamArchivo);\n\t\t\t\tif (workbook != null) {\n\t\t\t\t\tsheet = workbook.getSheetAt(0);\n\t\t\t\t\ttamanio = sheet.getLastRowNum();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOG_SICV2.error(\"Error al obtener el tamanio de las filas del archivo. {}\", e.getMessage());\n\t\t\tthrow new SICException(\"Error al obtener el tamanio de las filas del archivo. {}\", e.getMessage());\n\t\t}\n\t\treturn tamanio;\n\t}", "Excel getExcelInst();", "public void descargarArchivo()throws SQLException, IOException {\n //conexion con el resultset\n st = cn.createStatement();\n\n // consulta de descarga el getId es la variable que utilizo para ubicarme en la base de datos\n ResultSet rs = st.executeQuery(\"select anexo_justi, nombre FROM anexoitem where iditem=\"+rt.getId());\ntry {\n \nrs.next();\n// pone en la variable el nombre del archivo de la base de datos\nnombre= rs.getString(\"nombre\");\n// inserta la ruta completa\nFile file = new File(rt.getPath()+nombre);\n// salida del archivo de flujo\nFileOutputStream output = new FileOutputStream(file);\nBlob archivo = rs.getBlob(1);\nInputStream inStream = archivo.getBinaryStream();\n// almacenamiento del tamaño y descarga byte a byte\nint length= -1;\nint size = (int) archivo.length();\nbyte[] buffer = new byte[size];\nwhile ((length = inStream.read(buffer)) != -1) {\noutput.write(buffer, 0, length);\nJOptionPane.showMessageDialog(null,\"El archivo se descargo correctamente\");\n// output.flush();\n\n}\n// inStream.close();\noutput.close();\n} catch (Exception ioe) {\nthrow new IOException(ioe.getMessage());\n}\n}", "private void btExportIActionPerformed(java.awt.event.ActionEvent evt) {\n try{\n JFileChooser jFile=new JFileChooser();\n jFile.showSaveDialog(this);\n File saveFile=jFile.getSelectedFile();\n if(saveFile!=null){\n saveFile=new File(saveFile.toString()+\".xlsx\");\n Workbook wbi=new XSSFWorkbook();\n Sheet sheet=wbi.createSheet(\"Rekap data Imunisasi\");\n \n Row rowCol=sheet.createRow(0);\n for(int i=0;i<tbImunisasi.getColumnCount();i++){\n Cell sel=rowCol.createCell(i);\n sel.setCellValue(tbImunisasi.getColumnName(i));\n \n }\n for(int j=0;j<tbImunisasi.getRowCount();j++){\n Row rowImun=sheet.createRow(j+1);\n for(int k=0;k<tbImunisasi.getColumnCount();k++){\n Cell sel=rowImun.createCell(k);\n if(tbImunisasi.getValueAt(j,k)!=null){\n sel.setCellValue(tbImunisasi.getValueAt(j, k).toString());\n }\n }\n }\n FileOutputStream output=new FileOutputStream(new File(saveFile.toString()));\n wbi.write(output);\n wbi.close();\n output.close();\n openFile(saveFile.toString());\n }else{\n JOptionPane.showMessageDialog(null, \"Terjadi Error saat proses arsip\");\n }\n }catch(FileNotFoundException e){\n\n System.out.println(e);\n }catch (IOException io){\n System.out.println(io);\n }\n \n }", "public void getRowCount() {\n\n try {\n\n String FILE = \"src/test/resources/Datasheet.xlsx\";\n String SHEET_NAME = \"Master\";\n XSSFWorkbook workbook = new XSSFWorkbook();\n\n }catch (Exception exp)\n {\n exp.printStackTrace();\n System.out.println(exp.getMessage());\n System.out.println(exp.getCause());\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\treadFromFile(excelname);\n\t\t\t}", "public static XSSFSheet setExcelFile() throws Exception {\n\n XSSFSheet ExcelWSheet;\n XSSFWorkbook ExcelWBook;\n XSSFRow Row;\n String Path;\n String SheetName;\n\n try {\n // Open the Excel file\n Path = fetchMyProperties(\"spreadsheet_path\");\n SheetName= fetchMyProperties(\"sheet_name\");\n FileInputStream ExcelFile = new FileInputStream(Path);\n\n // Access the required test data sheet\n ExcelWBook = new XSSFWorkbook(ExcelFile);\n ExcelWSheet = ExcelWBook.getSheet(SheetName);\n\n } catch (Exception e){\n throw (e);\n }\n return ExcelWSheet;\n }", "public static void main(String[] args) throws FileNotFoundException,IOException, JXLException {\nFileOutputStream fo=new FileOutputStream(\"./testdata/testoutput.xls\");\r\nWritableWorkbook ww=Workbook.createWorkbook(fo);\r\nWritableSheet ws=ww.createSheet(\"testing\",0);\r\n//to move data into specific loationa using labels\r\nLabel a = new Label(0,0,\"Username\");//now the label store in ram loaction\r\n// to move data into specific location\r\nLabel b = new Label(1,0,\"password\");\r\nws.addCell(b);\r\n\r\nws.addCell(a);\r\nww.write();\r\nww.close();\r\n\t}", "public void analizarArchivo(){\n\t\ttry{\n\t\t\twhile((caracter = inputStream.read())!=-1){\n\t\t\t\testado = analizador.analizarSimbolo(caracter);\n\t\t\t\t//outputStream.write(analizador.simbolo);\n\t\t\t\thistoriaStream.write(formatoEstado(estado));\n\t\t\t\tif(estado == 18 ){//La palabra es web o ebay\n\t\t\t\t\toutputStream.write(\"Auto: Línea [\"+analizador.numero_lineas+\"] Palabra: ebay \\n\");\n\t\t\t\t}else if(estado == 146){\n\t\t\t\t\toutputStream.write(\"Auto: Línea [\"+analizador.numero_lineas+\"] Palabra: web \\n\");\n\t\t\t\t}\n\t\t\t\tif(analizador.isPalabra == true || analizador.isLinea == true){\n\t\t\t\t\thistoriaStream.write(\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Num. palabras: \"+analizador.numero_palabras+\" Numero líneas: \"+analizador.numero_lineas+\" Numero correctas: \"+analizador.numero_correctas);\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void exportarData() {\n\t\tDate date=new Date();\n\t\tString nameFile=\"client-\"+date.getTime()+\".xls\";\n\t\tTableToExcel.save(grid,nameFile);\n\t}", "void onActionFromExport() {\n\t\ttry {\n\t\t\tHSSFWorkbook document = new HSSFWorkbook();\n\t\t\tHSSFSheet sheet = ReportUtil.createSheet(document);\n\n\t\t\tsheet.setMargin((short) 0, 0.5);\n\t\t\tReportUtil.setColumnWidths(sheet, 0, 0.5, 1, 0.5, 2, 2, 3, 2, 3, 2, 4, 3, 5, 2, 6, 2, 7, 2, 8, 3, 9, 3, 10,\n\t\t\t\t\t3, 11, 2, 12, 2);\n\n\t\t\tMap<String, HSSFCellStyle> styles = ReportUtil.createStyles(document);\n\n\t\t\tint sheetNumber = 0;\n\t\t\tint rowIndex = 1;\n\t\t\tint colIndex = 1;\n\t\t\tLong index = 1L;\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2, messages.get(\"empList\"), styles.get(\"title\"), 5);\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, ++rowIndex, 1,\n\t\t\t\t\tmessages.get(\"date\") + \": \" + format.format(new Date()), styles.get(\"plain-left-wrap\"), 5);\n\t\t\trowIndex += 2;\n\n\t\t\t/* column headers */\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 1, messages.get(\"number-label\"),\n\t\t\t\t\tstyles.get(\"header-wrap\"));\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2, messages.get(\"firstname-label\"),\n\t\t\t\t\tstyles.get(\"header-wrap\"));\n\n\t\t\tif (lastname) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"lastname-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (origin1) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"persuasion-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (register) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"register-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (status) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"status-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (gender) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"gender-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (occ) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"occupation-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (birthday) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"birthDate-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (phoneNo) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"phoneNo-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (email) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"email-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (org) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"organization-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (appointment) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"appointment-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegree) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цэргийн цол\", styles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegreeStatus) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цолны статус\",\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegreeDate) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цол авсан огноо\",\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (TotalWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"TotalOrgWorkedYear-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (StateWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"stateWorkedYear-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"courtOrgTotalWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtMilitaryWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"CourtMilitaryWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtSimpleWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"CourtSimpleWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (familyCount) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"familyCount-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (childCount) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"childCount-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tReportUtil.setRowHeight(sheet, rowIndex, 3);\n\n\t\t\trowIndex++;\n\t\t\tif (listEmployee != null)\n\t\t\t\tfor (Employee empDTO : listEmployee) {\n\n\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\tlistEmployee.indexOf(empDTO) + 1 + \"\", styles.get(\"plain-left-wrap-border\"));\n\n\t\t\t\t\tif (lastname) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getLastname() != null) ? empDTO.getLastname() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++, empDTO.getFirstName(),\n\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\n\t\t\t\t\tif (origin1) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getOrigin().getName() != null) ? empDTO.getOrigin().getName() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (register) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getRegisterNo() != null) ? empDTO.getRegisterNo() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (status) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getEmployeeStatus() != null) ? empDTO.getEmployeeStatus().name() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (gender) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\tmessages.get((empDTO.getGender() != null) ? empDTO.getGender().toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (occ) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getOccupation() != null) ? empDTO.getOccupation().getName() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (birthday) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getBirthDate() != null) ? format.format(empDTO.getBirthDate()) : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (phoneNo) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getPhoneNo() != null) ? empDTO.getPhoneNo() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (email) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.geteMail() != null) ? empDTO.geteMail() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (org) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getOrganization() != null) ? empDTO.getOrganization().getName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (appointment) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getAppointment() != null) ? empDTO.getAppointment().getAppointmentName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegree) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? dao.getEmployeeMilitary(empDTO.getId()).getMilitary().getMilitaryName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegreeStatus) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? dao.getEmployeeMilitary(empDTO.getId()).getDegreeStatus().name() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegreeDate) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? format.format(dao.getEmployeeMilitary(empDTO.getId()).getOlgosonOgnoo())\n\t\t\t\t\t\t\t\t\t\t: \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (TotalWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getTotalOrgWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getTotalOrgWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\tif (StateWorkedYear) {\n\t\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t\t((getStateWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t\t? getStateWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (CourtWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtOrgTotalWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtOrgTotalWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (CourtMilitaryWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtMilitaryWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtMilitaryWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (CourtSimpleWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtSimpleWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtSimpleWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (familyCount) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex,\n\t\t\t\t\t\t\t\tcolIndex++, ((getFamilyCountExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getFamilyCountExport(empDTO.getId()) : \"0\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (childCount) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex,\n\t\t\t\t\t\t\t\tcolIndex++, ((getChildCountExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getChildCountExport(empDTO.getId()) : \"0\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tReportUtil.setRowHeight(sheet, rowIndex, 3);\n\t\t\t\t\trowIndex++;\n\t\t\t\t\tindex++;\n\t\t\t\t\tcolIndex = 1;\n\n\t\t\t\t}\n\n\t\t\trowIndex += 2;\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 1,\n\t\t\t\t\t\"ТАЙЛАН ГАРГАСАН: \" + \"..................................... / \"\n\t\t\t\t\t\t\t+ loginState.getEmployee().getLastname().charAt(0) + \".\"\n\t\t\t\t\t\t\t+ loginState.getEmployee().getFirstName() + \" /\",\n\t\t\t\t\tstyles.get(\"plain-left-wrap\"), 8);\n\t\t\trowIndex++;\n\n\t\t\tOutputStream out = response.getOutputStream(\"application/vnd.ms-excel\");\n\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"employeeList.xls\\\"\");\n\n\t\t\tdocument.write(out);\n\t\t\tout.close();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n\n insureExcelType(\"F:/AAA/QP2-04 附录 A 产品申请表 10.xlsx\");\n// String cellValueAt = getCellValueAt(15,8);\n// String cellValueAt1 = getCellValueAt(29,10);\n// String cellValueAt2 = getCellValueAt(30,10);\n// System.out.println(cellValueAt);\n// System.out.println(cellValueAt1);\n// System.out.println(cellValueAt2);\n\n// setCellValueAt(16, 10, new Date());\n// fileOutPut(\"F:/\",\"yyy.xlsx\");\n\n\n String path = \"F:\\\\壁纸\\\\timg (3).jpg\";\n setImg(path, 30, 34, 0, 4);\n\n// String cellValueAt = getCellValueAt(1, 27, 5);\n// System.out.println(cellValueAt);\n// setCellValueAt(1, 28, 5, new Date());\n fileOutPut(\"F:/\",\"yyy.xlsx\");\n\n }", "@Action(semantics = SemanticsOf.SAFE)\n public Blob download() {\n final String fileName = \"TurnoverRentBulkUpdate-\" + getProperty().getReference() + \"@\" + getYear() + \".xlsx\";\n final List<LeaseTermForTurnOverRentFixedImport> lineItems = getTurnoverRentLines();\n return excelService.toExcel(lineItems, LeaseTermForTurnOverRentFixedImport.class,\n LEASE_TERM_FOR_TURNOVER_RENT_SHEET_NAME, fileName);\n }", "private void abrirFichero() {\r\n\t\tJFileChooser abrir = new JFileChooser();\r\n\t\tFileNameExtensionFilter filtro = new FileNameExtensionFilter(\"obj\",\"obj\");\r\n\t\tabrir.setFileFilter(filtro);\r\n\t\tif(abrir.showOpenDialog(abrir) == JFileChooser.APPROVE_OPTION){\r\n\t\t\ttry {\r\n\t\t\t\tGestion.liga = (Liga) Gestion.abrir(abrir.getSelectedFile());\r\n\t\t\t\tGestion.setAbierto(true);\r\n\t\t\t\tGestion.setFichero(abrir.getSelectedFile());\r\n\t\t\t\tGestion.setModificado(false);\r\n\t\t\t\tfrmLigaDeFtbol.setTitle(Gestion.getFichero().getName());\r\n\t\t\t} catch (ClassNotFoundException | IOException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"No se ha podido abrir el fichero\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void grabarArchivo() {\n\t\tPrintWriter salida;\n\t\ttry {\n\t\t\tsalida = new PrintWriter(new FileWriter(super.salida));\n\t\t\tsalida.println(this.aDevolver);\n\t\t\tsalida.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void cargarArchivoAlumnos() {\n String aux = \"\";\n String texto = \"\";\n\n JFileChooser file = new JFileChooser();\n file.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n\n //Filtro\n FileNameExtensionFilter filtro = new FileNameExtensionFilter(\"*.XML\", \"xml\");\n\n file.setFileFilter(filtro);\n\n int seleccion = file.showOpenDialog(this);\n\n if (seleccion == JFileChooser.APPROVE_OPTION) {\n File fichero = file.getSelectedFile();\n\n insertarAlumnos(fichero.getPath());\n\n }\n }", "public String excelScrFold() throws Exception \r\n\t\r\n\t{\n\t\t\t try{\t\t\t\t \r\n\t\t\t\t InputStream ExcelFileToRead = new FileInputStream(excelFilePath);\r\n\t\t\t\t\tXSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead);\r\n\t\t\t\t\t//XSSFWorkbook test = new XSSFWorkbook(); \r\n\t\t\t\t XSSFSheet sheet = wb.getSheetAt(0);\r\n\t\t\t\t XSSFRow row,rowvalue;\r\n\t\t\t\t Iterator<Row> rows = sheet.rowIterator();\r\n\t\t\t\t row = sheet.getRow(0);\r\n\t\t\t\t int i=0;\r\n\t\t\t\t int j=0;\r\n\t\t\t\t try {\r\n\t\t\t\t \t\r\n\t\t\t\t\t\t\tif(row.getCell(0).toString().equalsIgnoreCase(\"Release Number=\")){\r\n\t\t\t\t\t\t\tReleaseNum = row.getCell(1).toString().trim();\r\n\t\t\t\t\t\t\t//System.out.println(ReleaseNum);\r\n\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Incorrect format\");\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t } \r\n\t\t\t\t\t catch (NullPointerException e) \r\n\t\t\t\t\t {\r\n\t\t\t\t\t \tlogger.info(\"System Error: \"+e.toString());\r\n\t\t\t\t\t } \r\n\t\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t catch(Exception ioe) \r\n\t\t\t {\r\n\t\t\t\t logger.info(\"System Error: \"+ioe.toString());\r\n\t\t\t\t ioe.printStackTrace();\r\n\t\t\t }\t\t\t \r\n\t\t\t return ReleaseNum;\t \r\n\t}", "public String getNombreArchivoAdjunto(){\r\n\t\treturn dato.getNombreArchivo() + \".pdf\";\r\n\t}", "@Override\r\n\tpublic String getArchivoZul() {\n\r\n\t\tif (archivoZul != null) {\r\n\t\t\treturn super.getArchivoZul();\r\n\t\t} else {\r\n\r\n\t\t\t// Resuelvo el nombre del Archivo que va a mostrarse para el objeto\r\n\t\t\tString objectZulFile = BASE_PATH + \"/viewNothing.zul\";\r\n\r\n\t\t\tif (objeto != null) {\r\n\t\t\t\t\r\n\t\t\t\tString className = objeto.getClass().getSimpleName();\r\n\t\t\t\tString numeroZulFile = \"\";\r\n\t\t\t\tif (numero > 0) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnumeroZulFile = numero.toString();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (OperacionHelper.getType(getOperacion()).equals(OperationType.INCLUIR) || OperacionHelper.getType(getOperacion()).equals(OperationType.MODIFICAR)) {\r\n\r\n\t\t\t\t\tobjectZulFile = BASE_PATH + \"/edit\" + \"/edit\" + className\r\n\t\t\t\t\t\t\t+ numeroZulFile + \".zul\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t} else if (OperacionHelper.getType(getOperacion()).equals(\r\n\t\t\t\t\t\tOperationType.BUSCAR)) {\r\n\r\n\t\t\t\t\tobjectZulFile = BASE_PATH + \"/views\" + \"/view\" + className\r\n\t\t\t\t\t\t\t+ numeroZulFile + \".zul\";\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn objectZulFile;\r\n\r\n\t\t}\r\n\r\n\t}", "private Sheet getActualSheet() throws IOException{\r\n File file = new File(\"evidence.ods\");\r\n SpreadSheet spreadSheet = SpreadSheet.createFromFile(file);\r\n return spreadSheet.getSheet(spreadSheet.getSheetCount()-1);\r\n }", "public void toExcelFromRequest(HttpServletRequest request,\n HttpServletResponse response) throws IOException {\n \n String tituloReporte = request.getParameter(\"tituloReporte\");\n String tipoReporte = request.getParameter(\"tipoReporte\");\n String nombreReporte = request.getParameter(\"nombreReporte\");\n String nombreRuta = request.getParameter(\"nombreRuta\");\n String idRuta = request.getParameter(\"idRuta\");\n String fechaInicio = request.getParameter(\"fechaInicio\");\n String fechaFinal = request.getParameter(\"fechaFinal\");\n String meta = request.getParameter(\"meta\");\n String metaReal = request.getParameter(\"metaReal\");\n String listaVehPlaca = request.getParameter(\"listaVehiculosPlaca\");\n \n ParametrosReporte pr = new ParametrosReporte();\n \n if (pr != null) {\n pr.setTituloReporte(tituloReporte);\n pr.setTipoReporte(Restriction.getNumber(tipoReporte));\n pr.setNombreReporte(nombreReporte);\n pr.setNombreRuta(nombreRuta);\n pr.setIdRuta(Restriction.getNumber(idRuta));\n pr.setFechaInicioStr(fechaInicio);\n pr.setFechaFinalStr(fechaFinal);\n pr.setMeta(Restriction.getNumber(meta));\n pr.setMeta_real(Restriction.getRealNumber(metaReal));\n pr.setListaVehiculosPlaca(listaVehPlaca);\n \n PrintOutExcel poe = new PrintOutExcel();\n poe.print(request, response, pr);\n }\n \n /*\n HttpSession session = request.getSession();\n ParametrosReporte pr = (ParametrosReporte) session.getAttribute(\"parametrosReporte\");\n \n if (pr != null) {\n \n // Reporte editable XLS \n ReporteUtilExcel rue = new ReporteUtilExcel(); \n pr.setTipoReporte(Restriction.getNumber(tipoReporte));\n pr.setNombreReporte(nombreReporte);\n \n MakeExcel rpte = rue.crearReporte(pr.getTipoReporte(), false, pr); \n String nombreArchivo = pr.getNombreReporte() + \".xls\"; \n\n //response.setContentType(\"application/vnd.ms-excel\");\n response.setContentType(\"application/ms-excel\"); \n response.setHeader(\"Content-Disposition\", \"attachment; filename=\"+nombreArchivo);\n\n HSSFWorkbook file = rpte.getExcelFile();\n file.write(response.getOutputStream()); \n response.flushBuffer();\n response.getOutputStream().close(); \n }\n */\n }", "public HSSFWorkbook generateExcel(String inicio, String fin, String empleado, String cargo, String nomdep, Vector<String> dias) {\r\n\r\n // Initialize rowIndex\r\n rowIndex = 0;\r\n\r\n // New Workbook\r\n workbook = new HSSFWorkbook();\r\n\r\n // Generate fonts\r\n headerFont = createFont(HSSFColor.WHITE.index, (short) 12, true);\r\n headerFont1 = createFont(HSSFColor.WHITE.index, (short) 17, true);\r\n headerFont2 = createFont(HSSFColor.WHITE.index, (short) 12, true);\r\n contentFont = createFont(HSSFColor.BLACK.index, (short) 11, false);\r\n contentFont2 = createFont(HSSFColor.BLACK.index, (short) 11, false);\r\n\r\n // Generate styles\r\n headerStyle1 = createStyle(headerFont1, HSSFCellStyle.ALIGN_CENTER, HSSFColor.BLUE.index, false, HSSFColor.BLACK.index);\r\n headerStyle2 = createStyle(headerFont2, HSSFCellStyle.ALIGN_CENTER, HSSFColor.BLUE.index, false, HSSFColor.BLACK.index);\r\n contentStyle2 = createStyle(contentFont2, HSSFCellStyle.ALIGN_LEFT, HSSFColor.WHITE.index, false, HSSFColor.BLACK.index);\r\n headerStyle = createStyle(headerFont, HSSFCellStyle.ALIGN_CENTER, HSSFColor.LIGHT_BLUE.index, false, HSSFColor.DARK_BLUE.index);\r\n oddRowStyle = createStyle(contentFont, HSSFCellStyle.ALIGN_LEFT, HSSFColor.WHITE.index, false, HSSFColor.WHITE.index);\r\n evenRowStyle = createStyle(contentFont, HSSFCellStyle.ALIGN_LEFT, HSSFColor.LIGHT_TURQUOISE.index, false, HSSFColor.GREY_25_PERCENT.index);\r\n\r\n // New sheet\r\n HSSFSheet sheet = workbook.createSheet(\"PERCEPCIONES Y DEDUCCIONES\");\r\n HSSFRow headerRow1 = sheet.createRow(rowIndex++);\r\n \r\n HSSFCell headerCell1 = null;\r\n\r\n if (nomdep.contains(\"-SELECCIONE UNA OPCION-\")) {\r\n headerCell1 = headerRow1.createCell(0);\r\n headerCell1.setCellStyle(headerStyle1);\r\n headerCell1.setCellValue(\"PERCEPCIONES Y DEDUCCIONES \" + inicio + \"/\" + fin);\r\n } else {\r\n headerCell1 = headerRow1.createCell(0);\r\n headerCell1.setCellStyle(headerStyle1);\r\n headerCell1.setCellValue(\"PERCEPCIONES Y DEDUCCIONES \" + inicio + \"/\" + fin + \" \" + nomdep);\r\n }\r\n\r\n CellRangeAddress re = new CellRangeAddress(0, 0, 0, 3);\r\n sheet.addMergedRegion(re);\r\n\r\n \r\n\r\n // Table content\r\n HSSFRow contentRow = null;\r\n HSSFCell contentCell = null;\r\n\r\n // Obtain table content values\r\n List<List<String>> contentRowValues = PercepcionesReport.getContentnombres(nomdep, dias);\r\n for (List<String> rowValues : contentRowValues) {\r\n // Table header\r\n HSSFRow headerRow = sheet.createRow(rowIndex++);\r\n List<String> headerValues = PercepcionesReport.getHeadersnom();\r\n\r\n HSSFCell headerCell = null;\r\n for (int i = 0; i < headerValues.size(); i++) {\r\n headerCell = headerRow.createCell(i);\r\n headerCell.setCellStyle(headerStyle2);\r\n headerCell.setCellValue(headerValues.get(i));\r\n }\r\n // At each row creation, rowIndex must grow one unit\r\n contentRow = sheet.createRow(rowIndex++);\r\n for (int i = 0; i < rowValues.size(); i++) {\r\n contentCell = contentRow.createCell(i);\r\n contentCell.setCellValue(rowValues.get(i));\r\n // Style depends on if row is odd or even\r\n contentCell.setCellStyle(contentStyle2);\r\n }\r\n HSSFRow headerRow4 = sheet.createRow(rowIndex++);\r\n List<String> headerValues4 = PercepcionesReport.getHeaders();\r\n\r\n HSSFCell headerCell4 = null;\r\n for (int i = 0; i < headerValues4.size(); i++) {\r\n headerCell4 = headerRow4.createCell(i);\r\n headerCell4.setCellStyle(headerStyle);\r\n headerCell4.setCellValue(headerValues4.get(i));\r\n }\r\n // Autosize columns\r\n for (int i = 0; i < headerValues4.size(); sheet.autoSizeColumn(i++));\r\n \r\n String idemp=rowValues.get(0);\r\n for (int dia = 0; dia < dias.size(); dia++) {\r\n String fecha=dias.elementAt(dia);\r\n List<List<String>> contentRowValues2 = PercepcionesReport.getContent(idemp, fecha);\r\n for (List<String> rowValues2 : contentRowValues2) {\r\n // At each row creation, rowIndex must grow one unit\r\n contentRow = sheet.createRow(rowIndex++);\r\n for (int i = 0; i < rowValues2.size(); i++) {\r\n contentCell = contentRow.createCell(i);\r\n contentCell.setCellValue(rowValues2.get(i));\r\n // Style depends on if row is odd or even\r\n contentCell.setCellStyle(rowIndex % 2 == 0 ? oddRowStyle : evenRowStyle);\r\n }\r\n }\r\n }\r\n// Autosize columns\r\n for (int i = 0; i < headerValues.size(); sheet.autoSizeColumn(i++));\r\n }\r\n HSSFRow headerRow00 = sheet.createRow(rowIndex++);\r\n String datos = empleado + \" \" + cargo;\r\n String da[] = new String[5];\r\n da[1] = \"Realizado por\";\r\n da[2] = \"Fecha y Hora\";\r\n da[3] = datos;\r\n da[4] = fecha();\r\n\r\n HSSFCell headerCell00 = null;\r\n for (int i = 1; i < 3; i++) {\r\n headerCell00 = headerRow00.createCell(i);\r\n headerCell00.setCellStyle(headerStyle);\r\n headerCell00.setCellValue(da[i]);\r\n }\r\n HSSFRow headerRow000 = sheet.createRow(rowIndex++);\r\n HSSFCell headerCell000 = null;\r\n for (int i = 1; i < 3; i++) {\r\n\r\n headerCell000 = headerRow000.createCell(i);\r\n headerCell000.setCellStyle(oddRowStyle);\r\n headerCell000.setCellValue(da[i + 2]);\r\n }\r\n \r\n\r\n return workbook;\r\n }", "public static void main(String[] args) throws IOException {\n\t\tSystem.getProperty(\"user.dir\");\n\t\tFileOutputStream fileout = new FileOutputStream(\"C:\\\\Workspace\\\\Module7\\\\Workbook.xls\");\n\t\tHSSFWorkbook wb = new HSSFWorkbook();\n\t\t\n\t\t\n\t\t//creating sheet\n\t\t\n\t\tHSSFSheet sheet1 = wb.createSheet(\"First Sheet\");\n\t\tHSSFSheet sheet2 = wb.createSheet(\"Second sheet\");\n\t\t\n\t\t\n\t\t//Creating rows and cells\n\t\tfor (int i=0; i<100; i++)\n\t\t{\n\t\t\tHSSFRow row = sheet1.createRow(i);\n\t\t\tfor (int j=0; j<4; j++)\n\t\t\t{\n\t\t\t\tHSSFCell cell = row.createCell(j);\n\t\t\t\tcell.setCellValue(j);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\twb.write(fileout);\n\t\tfileout.close();\n\t\t\n\t\tString ProjectLocation = System.getProperty(\"user.dir\");\n\t\t\n\t\tSystem.out.println(ProjectLocation);\n\t\t\n\t\tFileOutputStream FO = new FileOutputStream (ProjectLocation + \"\\\\Playing.xls\");\n\t\tHSSFWorkbook wb2 = new HSSFWorkbook ();\n\t\t\n\t\tHSSFSheet sheet3 = wb.createSheet(\"new sheet\");\n\t\tHSSFRow row1 = sheet3.createRow(0);\n\t\trow1.createCell(0).setCellValue(true);\n\t\trow1.createCell(1).setCellValue(2);\n\t\t\n\t\t\n\t\twb2.write(FO);\n\t\tFO.close();\n\t\t\n\t /*HSSFWorkbook wb = new HSSFWorkbook();\n\t HSSFSheet sheet = wb.createSheet(\"new sheet\");\n\t HSSFRow row = sheet.createRow((short)2);\n\t row.createCell(0).setCellValue(1.1);\n\t row.createCell(1).setCellValue(new Date());\n\t row.createCell(2).setCellValue(Calendar.getInstance());\n\t row.createCell(3).setCellValue(\"a string\");\n\t row.createCell(4).setCellValue(true);\n\t row.createCell(5).setCellType(Cell.CELL_TYPE_ERROR);\n\n\t // Write the output to a file\n\t FileOutputStream fileOut = new FileOutputStream(\"workbook2.xls\");\n\t wb.write(fileOut);\n\t fileOut.close();*/\n\t\t}", "public int xlsWriter(List<CeoMypageDto> datas, String fileName, CeoMypageDto ceoDto )\n\t{\n\t\tint flag = 1;\n\t\tint startRow =2;\n\t\tint startCol =1;\n\t\t//workbook생성\n\t\tHSSFWorkbook workBook = new HSSFWorkbook();\n\t\t\n\t\t//work sheet생성\n\t\tif(fileName.equals(\"\"))fileName=\"sheet1\";\n\t\tHSSFSheet workSheet = workBook.createSheet(fileName);\n\t\t\n\t\t//행생성\n\t\tHSSFRow row = workSheet.createRow(startRow);\n\t\tHSSFRow row1 = workSheet.createRow(startRow+1);\n\t\tHSSFRow row2 = workSheet.createRow(startRow+2);\n\t\t\n\t\t//cell생성\n\t\tHSSFCell cell;\n\t\t\n\t\t//스타일 설정\n\n\n\t\t//스타일 객체 생성 \n\t\tHSSFCellStyle styleHd = workBook.createCellStyle(); //제목 스타일\n\t\tHSSFCellStyle styleBody = workBook.createCellStyle(); //내용 스타일\n\n\n\t\t//제목 폰트\n\t\tHSSFFont font = workBook.createFont();\n\t\tfont.setFontHeightInPoints((short)12);\n\t\tfont.setBoldweight((short)font.BOLDWEIGHT_BOLD);\n\n\t\t//제목 스타일에 폰트 적용, 정렬\n\t\tstyleHd.setFont(font);\n\t\tstyleHd.setAlignment(HSSFCellStyle.ALIGN_CENTER);\n\t\tstyleHd.setVerticalAlignment (HSSFCellStyle.VERTICAL_CENTER);\n styleHd.setFillBackgroundColor(HSSFColor.SKY_BLUE.index);\n styleHd.setFillForegroundColor(HSSFColor.SKY_BLUE.index);\n \n \n\t\tstyleHd.setFillPattern(CellStyle.SOLID_FOREGROUND);\n\t\t\n\t\t//날짜부분\n\t\tcell = row.createCell(startCol);\n\t\tcell.setCellValue(ceoDto.getSTART_DATE());\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row.createCell(startCol+2);\n\t\tcell.setCellValue(ceoDto.getEND_DATE());\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\t//검색어, 페이지넘 부분 \n\t\tcell = row1.createCell(startCol);\n\t\tcell.setCellValue(ceoDto.getSEARCH().replace(\"%\", \"\"));\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row1.createCell(startCol+2);\n\t\tcell.setCellValue(ceoDto.getPAGE_NUM());\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t// 제목부분 \n\t\tcell = row2.createCell(startCol);\n\t\tcell.setCellValue(\"분류\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+1);\n\t\tcell.setCellValue(\"상품이름\");\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+2);\n\t\tcell.setCellValue(\"구매색상\");\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+3);\n\t\tcell.setCellValue(\"구매사이즈\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+4);\n\t\tcell.setCellValue(\"구매자\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+5);\n\t\tcell.setCellValue(\"상품수량\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\n\t\tcell = row2.createCell(startCol+6);\n\t\tcell.setCellValue(\"재고\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\n\t\tcell = row2.createCell(startCol+7);\n\t\tcell.setCellValue(\"실제 구매가격\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\n\t\tcell = row2.createCell(startCol+8);\n\t\tcell.setCellValue(\"구매시간\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+9);\n\t\tcell.setCellValue(\"배송상태\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\n\n\n\t\t\n\t\tfor(int i=0;i<datas.size();i++)\n\t\t{\n\t\t\tCeoMypageDto vo = (CeoMypageDto)datas.get(i);\n\t\t\trow = workSheet.createRow(i+(startRow+3));\n\t\t \t\n\t\t\tcell = row.createCell(startCol+0);\n\t\t\tcell.setCellValue(vo.getITEM());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+1);\n\t\t\tcell.setCellValue(vo.getPRO_NAME());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+2);\n\t\t\tcell.setCellValue(vo.getSEL_COLOR());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+3);\n\t\t\tcell.setCellValue(vo.getSEL_SIZE());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+4);\n\t\t\tcell.setCellValue(vo.getUSER_ID());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+5);\n\t\t\tcell.setCellValue(vo.getSEL_NUM());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+6);\n\t\t\tcell.setCellValue(vo.getSTOCK());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+7);\n\t\t\tcell.setCellValue(vo.getFINAL_PRICE());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+8);\n\t\t\tcell.setCellValue(vo.getSELTIME());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+9);\n\t\t\tcell.setCellValue(vo.getDEL_STEP());\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor (int i=0;i<4;i++) \n\t\t{ \n\t\t\tworkSheet.autoSizeColumn(i);\n\t\t\tworkSheet.setColumnWidth(i, (workSheet.getColumnWidth(i))+512 ); //이건 자동으로 조절 하면 너무 딱딱해 보여서 자동조정한 사이즈에 (short)512를 추가해 주니 한결 보기 나아졌다.\n\t\t}\n\t\tworkSheet.setColumnWidth(0, 200);\n\t\t\n\t\t\n\t\tFile file=new File(PATH+fileName+\"_\"+ExcelUtil.getPK()+\".xls\" );\n\t\tFileOutputStream fo = null;\n\t\ttry{\n\t\t\tfo = new FileOutputStream(file);\n\t\t\tworkBook.write(fo);\n\t\t}catch(FileNotFoundException fnf){\n\t\t\tflag = -1;\n\t\t\tfnf.printStackTrace();\n\t\t\t\n\t\t}catch(IOException io){\n\t\t\tflag = -1;\n\t\t\tio.printStackTrace();\n\t\t}finally{\n\t\t\ttry{\n\t\t\t\t\n\t\t\t\tif(workBook!=null)workBook.close();\n\t\t\t\tif(fo!=null)fo.close();\n\t\t\t\t\n\t\t\t}catch(IOException io){\n\t\t\t\tflag = -1;\n\t\t\t\tio.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn flag;\n\t}", "public GestorArchivos(String numeroArchivo)\r\n {\r\n this.rutaArchivoEntrada = new File(\"archivostexto/in/in\" + numeroArchivo + \".txt\").getAbsolutePath().replace(\"\\\\\", \"/\");\r\n this.rutaArchivoSalida = new File(\"archivostexto/out/out\" + numeroArchivo + \".txt\").getAbsolutePath().replace(\"\\\\\", \"/\");\r\n }", "public static void main(String[] args) throws IOException {\n FileInputStream fi=new FileInputStream(\"C:\\\\Users\\\\SURENDRA\\\\Documents\\\\msexel1.xlsx\");\r\n Workbook wb= new XSSFWorkbook(fi);\r\n // wb.createSheet(\"MIN5\");\r\n \r\n \r\n FileOutputStream fo=new FileOutputStream(\"C:\\\\Users\\\\SURENDRA\\\\Documents\\\\msexel2.xlsx\");\r\n wb.write(fo);\r\n wb.close();\r\n fi.close();\r\n fo.close();\r\n \r\n \r\n\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}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n fltrPrd = \" \";\r\n fltrStat = \" \";\r\n fltrPkr = AppParms.ALL;\r\n fltrPtk = AppParms.ALL;\r\n ImageView ivDetail = new ImageView(new Image(getClass().getResourceAsStream(\"/res/excel.png\")));\r\n ivDetail.setFitHeight(15);\r\n ivDetail.setFitWidth(15);\r\n btnExport.setGraphic(ivDetail);\r\n }", "public ManejadorArch(String Usuario) {\n initComponents();\n \n NombreUs = Usuario;\n vertical[ver]=\"\\\\\";\n ver++;\n //modelo.addRow();\n if (Usuario.equals(\"admin\")) {\n Rutax = \"\\\\\";\n Rutay =Ruta;\n }else{\n Rutax = \"\\\\\";\n Rutay =Ruta;\n }\n //path actual para crear archivos y crear carpetas\n \n if (Usuario.equals(\"admin\")) {\n // this.jFileChooser1.setCurrentDirectory(new java.io.File(Ruta));\n }else{\n // this.jFileChooser1.setCurrentDirectory(new java.io.File(Ruta+Usuario));\n }\n \n if (Usuario.equals(\"admin\")) {\n this.jb_cargausuarios.setVisible(true);\n this.jb_reporteusuarios.setVisible(true);\n }else{\n this.jb_cargausuarios.setVisible(false);\n this.jb_reporteusuarios.setVisible(false);\n }\n }", "protected void generarReporte(String fileNameOut){\n LinkedList datos;\n LinkedList listaHojas;\n frmHoja tmpSheet;\n Clases.Dato tmpDato;\n int numRows = 0;\n int numCols = 0;\n try{\n sw = new FileWriter(fileNameOut,true);\n //obtener lista de hojas desde el workplace\n listaHojas = wp.getListaHojas();\n\n //escribir encabezado de HTML a stream\n sw.write(\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\">\\n\");\n sw.write(\"<html>\\n<head>\\n<meta content=\\\"text/html; charset=ISO-8859-1\\\" http-equiv=\\\"content-type\\\">\\n\");\n sw.write(\"<title>JExcel</title>\\n\");\n sw.write(\"</head>\\n<body>\\n\");\n sw.write(\"<big><span style=\\\"font-weight: bold;\\\">Hoja generada por JExcel</span></big><br>\\n\");\n sw.write(\"<small>Universidad Mariano Gálvez de Guatemala</small><br>\\n<br>\\n\");\n sw.write(\"<small>Extensión Morales Izabal</small><br>\\n<br>\\n\");\n sw.write(\"<small>(C) Amy C. Leiva - 4890-15-</small><br>\\n<br>\\n\");\n // Iterar sobre cada hoja en listaSheets\n for (int i = 0; i < listaHojas.size();i++){\n // obtener maximo numero de datos\n tmpSheet = (frmHoja) listaHojas.get(i);\n\n numRows = tmpSheet.getHoja().getRowCount();\n numCols = tmpSheet.getHoja().getColumnCount();\n sw.write(\"<table style=\\\"text-align: left; width: 100%;\\\" border=\\\"1\\\" cellpadding=\\\"2\\\" cellspacing=\\\"2\\\">\\n\");\n sw.write(\"<tbody>\\n\");\n sw.write(\" <tr> <td colspan=\\\"4\\\" rowspan=\\\"1\\\"><big><span style=\\\"font-weight: bold;\\\">\");\n sw.write(\"Nombre de la Hoja: \" + tmpSheet.getId());\n sw.write(\"</span></big></td>\\n</tr>\\n\");\n sw.write(\" <tr><td>Fila</td><td>Columna</td><td>Expresi&oacute;n</td> <td>Valor Num&eacute;rico</td> </tr>\\n\");\n // obtener lista de datos desde matriz\n if( tmpSheet.getHoja().getTabla().estaVacia() == false){ // si la tabla tiene datos\n datos = tmpSheet.getHoja().getTabla().getSubset(1,1,numCols,numRows);\n //escribir tabla con datos generados\n for (int j = 0; j < datos.size();j++){\n tmpDato = (Clases.Dato) datos.get(j); \n sw.write(\"<tr>\\n\");\n sw.write(\"<td>\" + tmpDato.getRow() + \"</td>\\n\");\n sw.write(\"<td>\" + tmpDato.getCol() + \"</td>\\n\");\n sw.write(\"<td>\" + tmpDato.getExpr() + \"</td>\\n\");\n sw.write(\"<td>\" + tmpDato.eval() + \"</td>\\n\");\n sw.write(\"</tr>\\n\");\n }\n }\n else{\n sw.write(\"<tr><td colspan=\\\"4\\\" rowspan=\\\"1\\\"> Hoja Vacia... </td></tr>\");\n }\n sw.write(\" </tbody></table>\\n<br><br><br>\");\n // sw.write();\n // sw.write();\n }\n //escribir fin de datos\n sw.write(\"</body></html>\");\n //escribir a archivo de salida\n sw.close();\n }\n catch(Exception e){\n System.out.println(\"No se pudo guardar archivo:\" + e);\n }\n \n }", "public void exportarapolice(){\n gettableconteudo();\n conexao.Conectar();\n File f = null;\n try {\n conexao.sql = \"SELECT data, nomefile, arquivo FROM arquivo WHERE data = ?\"; \n conexao.ps = conexao.con.prepareStatement(conexao.sql); \n ps.setString(1, id1);\n ResultSet rs = ps.executeQuery(); \n if ( rs.next() ){ \n byte [] bytes = rs.getBytes(\"arquivo\"); \n String nome = rs.getString(\"nomefile\");\n f = new File(\"C:\\\\rubinhosis\\\\exportacoes\\\\\" + nome); \n FileOutputStream fos = new FileOutputStream( f);\n fos.write( bytes ); \n fos.close(); \n }\n rs.close(); \n ps.close(); \n \n \n } catch (SQLException ex) { \n ex.printStackTrace();\n }\n catch (IOException ex) {\n ex.printStackTrace();\n }\n\n}", "static void LeerArchivo(){ \r\n \t//iniciamos el try y si no funciona se hace el catch\r\n\r\n try{ \r\n \t//se crea un objeto br con el archivo de txt\r\n \tBufferedReader br = new BufferedReader( \r\n \tnew FileReader(\"reporte.txt\")\r\n );\r\n String s;\r\n //Mientras haya una linea de texto se imprime\r\n while((s = br.readLine()) != null){ \r\n System.out.println(s);\r\n }\r\n //se cierra el archivo de texto\r\n br.close(); \r\n } catch(Exception ex){\r\n \t//si no funciona se imprime el error\r\n System.out.println(ex); \r\n }\r\n }", "public final File getExcelFile() {\n\t\treturn excelFile;\n\t}", "public String getUs1120sheet() {\n\n return this.us1120sheet;\n }", "public void gettableconteudo(){\n \n int selecionada = jtablearquivos.getSelectedRow();\n if (selecionada == -1) {\n JOptionPane.showMessageDialog(null,\" Arquivo não selecionado corretamente !\");\n } \n String id = jtablearquivos.getValueAt(selecionada, 0).toString();\n id1 = id;\n String titulo = jtablearquivos.getValueAt(selecionada, 1).toString();\n titulo1 = titulo;\n \n \n \n }", "public String chooserFile(String def) {\r\n\t\tString res = \"\";\r\n\t\tString defpath = def;\r\n\t\tJFileChooser chooser = new JFileChooser();\r\n\t\tchooser.setCurrentDirectory(new File(defpath));\r\n\r\n\t\tchooser.setFileFilter(new javax.swing.filechooser.FileFilter() {\r\n\t\t\tpublic boolean accept(File f) {\r\n\t\t\t\treturn f.getName().toLowerCase().endsWith(\".xlsx\") || f.isDirectory();\r\n\t\t\t}\r\n\r\n\t\t\tpublic String getDescription() {\r\n\t\t\t\treturn \"Excel Mapping File\";\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tint r = chooser.showOpenDialog(new JFrame());\r\n\t\tif (r == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t//String name = chooser.getSelectedFile().getName();\r\n\t\t\tString path = chooser.getSelectedFile().getPath();\r\n\t\t\t//System.out.println(name + \"\\n\" + path);\r\n\t\t\tres = path;\r\n\t\t} else if (r == JFileChooser.CANCEL_OPTION) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"User cancelled operation. No file was chosen.\");\r\n\t\t} else if (r == JFileChooser.ERROR_OPTION) {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"An error occured. No file was chosen.\");\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(this, \"Unknown operation occured.\");\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "void writeExcel(File newFile) throws Exception;", "public static void main(String[] args) throws NullPointerException, Exception {\nFile f = new File(\"C:\\\\Users\\\\Mohit_Shobhit\\\\Music\\\\Book2xlsx.xlsx\");\r\n\tFileInputStream fi= new FileInputStream(f);\r\nXSSFWorkbook xs= new XSSFWorkbook(fi);\r\nXSSFSheet xt=xs.getSheet(\"Sheet1\");\r\n\tint r=xt.getPhysicalNumberOfRows();\r\n\tfor(int i=0;i<=r;i++)\r\n\t{\r\n\t\tXSSFRow xr=xt.getRow(i);\r\n\t\tfor(int j=0;j<xr.getPhysicalNumberOfCells();j++) \r\n\t\t{\r\n\t\t\tXSSFCell x=xr.getCell(j);\r\n\t\t\tSystem.out.println(x.getStringCellValue());\r\n\t\t}\r\n\t}\r\n\t}", "private void init() {\n this.excelSpreadSheetWorkBookDestination = excelSource.copyTo(DirectoryReference.TARGETDIRECTORY\n .getFileFromDirectory(new StringBuilder()\n .append(\"PARSED-\")\n .append(\"java-developer-philly-rubric-template_\")\n .append(System.nanoTime())\n .append(\".xlsx\")\n .toString()));\n }", "public void writeShortSolutionExcel(String file) \n\t{\n\t\t\n\t\t//setup excel file\n\t\tint rowCounter = 0;\n\t\tXSSFWorkbook workbook = new XSSFWorkbook(); // create a book\n\t\tXSSFSheet sheet = workbook.createSheet(\"Sheet1\");// create a sheet\n\t\tXSSFRow curRow = sheet.createRow(rowCounter); // create a row\n\t\t\n\t\t//Problem info\n\t\tcurRow.createCell(0).setCellValue(\"File: \");\n\t\tcurRow.createCell(1).setCellValue(file);\n\t\tcurRow.createCell(2).setCellValue(\"Num Depots: \");\n\t\tcurRow.createCell(3).setCellValue(ProblemInfo.numDepots);\n\t\tcurRow.createCell(4).setCellValue(\"Num Pick Up Points: \");\n\t\tcurRow.createCell(5).setCellValue(ProblemInfo.numCustomers);\n\t\tcurRow.createCell(6).setCellValue(\"Num Trucks: \");\n\t\tcurRow.createCell(7).setCellValue(ProblemInfo.numTrucks);\n\t\tcurRow.createCell(8).setCellValue(\"Processing Time: \");\n\t\tcurRow.createCell(9).setCellValue((endTime - startTime) / 1000);\n\t\tcurRow.createCell(10).setCellValue(\"seconds\");\n\t\t\n\t\t//next row\n\t\trowCounter++;\n\t\tcurRow = sheet.createRow(rowCounter);\n\t\t\n\t\t\n\t\tcurRow.createCell(0).setCellValue(\"Total Demand =\");\n\t\tcurRow.createCell(1).setCellValue(mainDepots.getAttributes().getTotalDemand());\n\t\tcurRow.createCell(2).setCellValue(\"Total Distance =\");\n\t\tcurRow.createCell(3).setCellValue(mainDepots.getAttributes().getTotalDistance());\n\t\tcurRow.createCell(4).setCellValue(\"Total Travel Time =\");\n\t\tcurRow.createCell(5).setCellValue(mainDepots.getAttributes().getTotalTravelTime());\n\t\tcurRow.createCell(6).setCellValue(\"Total Cost = \");\n\t\tcurRow.createCell(7).setCellValue(Math.round(mainDepots.getAttributes().getTotalCost()*100.0)/100.0);\n\t\t\t\n\t\trowCounter++;\n\t\tcurRow = sheet.createRow(rowCounter);\n\t\t\t\n\t\tDepot depotHead = mainDepots.getHead();\n\t\tDepot depotTail = mainDepots.getTail();\n\t\t\n\t\t//Truck header info\n\t\tcurRow.createCell(0).setCellValue(\"Truck #\");\n\t\tcurRow.createCell(1).setCellValue(\"MaxCap:\");\n\t\tcurRow.createCell(2).setCellValue(\"Demand:\");\n\t\t\n\t\t//loop through Depots, trucks, nodes\n\t\twhile (depotHead != depotTail) \n\t\t{\n\t\t\tTruck truckHead = depotHead.getMainTrucks().getHead();\n\t\t\tTruck truckTail = depotHead.getMainTrucks().getTail();\n\t\t\t\n\t\t\t//print truck data\n\t\t\twhile (truckHead != truckTail) \n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\trowCounter++;\n\t\t\t\t\tcurRow = sheet.createRow(rowCounter);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcurRow.createCell(1).setCellValue(truckHead.getTruckType().getMaxCapacity());\n\t\t\t\t\tcurRow.createCell(0).setCellValue(truckHead.getTruckNum());\n\t\t\t\t\tcurRow.createCell(2).setCellValue(truckHead.getAttributes().getTotalDemand());\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tNodes nodesHead = truckHead.getMainNodes().getHead().getNext();\n\t\t\t\t\tNodes nodesTail = truckHead.getMainNodes().getTail();\n\t\t\t\t\t\n\t\t\t\t\trowCounter++;\n\t\t\t\t\tcurRow = sheet.createRow(rowCounter);\n\t\t\t\t\t\n\t\t\t\t\tcurRow.createCell(0).setCellValue(\"ROUTE:\");\n\t\t\t\t\tint cellCount = 1;\n\t\t\t\t\t\n\t\t\t\t\t//print rout data\n\t\t\t\t\twhile (nodesHead != nodesTail) \n\t\t\t\t\t{\n\t\t\t\t\t\tcurRow.createCell(cellCount).setCellValue(nodesHead.getIndex());\n\n\t\t\t\t\t\tcellCount++;\n\t\t\t\t\t\tnodesHead = nodesHead.getNext();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcellCount = 0;\n\t\t\t\t}\n\t\t\t\tcatch(NullPointerException ex)\n\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Null truck types detected\");\n\t\t\t\t\t\trowCounter--;\n\t\t\t\t}\n\t\t\t\t\ttruckHead = truckHead.getNext();\n\t\t\t}\n\t\t\tdepotHead = depotHead.getNext();\n\t\t}\n\t\t\t \n\t\t\trowCounter +=2;\n\t\t\tcurRow = sheet.createRow(rowCounter);\n\t\t\t\n\t\t\tcurRow.createCell(0).setCellValue(\"optimization Info\");\n\t\t\t\n\t\t\trowCounter ++;\n\t\t\tcurRow = sheet.createRow(rowCounter);\n\t\t\t\n\t\t\t//print Optimization information\n\t\t\tfor (int i = 0; i < optInformation.size(); i++) \n\t\t\t{\n\t\t\t\tcurRow.createCell(i).setCellValue(optInformation.elementAt(i).toString());\n\t\t\t}\n\t\t\t\n\t\t\ttry \n\t\t {\n\t\t\t\tFileOutputStream fout = new FileOutputStream(new File(ProblemInfo.outputPath + file + \"_short.xlsx\"));\n\t\t \tworkbook.write(fout); \n\t\t fout.close();\n\t\t } \n\t\t catch (Exception e) \n\t\t { \n\t\t e.printStackTrace(); \n\t\t } \n\t}", "public static void main(String args[]) throws WorkSheetNotFoundException, CellNotFoundException, FileNotFoundException, IOException{\r\n /*\r\n //Test 1 - Creating empty XLS\r\n FileOutputStream fo=new FileOutputStream(\"Result.xls\");\r\n WorkBookHandle h=new WorkBookHandle();\r\n WorkSheetHandle y = h.getWorkSheet(\"Sheet1\");\r\n y.add(\"aa\", \"A1\");\r\n h.writeBytes(fo);\r\n fo.close();\r\n */ \r\n \r\n }", "public static void main(String[] args) throws IOException {\n write2Excel(new File(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\test.xls\"));\n }", "public static void main(String[] args) throws IOException {\n\t\t\r\n\t\tFile fw = new File(\"C:\\\\Files\\\\work.xlsx\");//create file object\r\n\t\t//FileInputStream f = new FileInputStream(fw);//to create connection first create reader.\r\n\t\tXSSFWorkbook wb = new XSSFWorkbook(new FileInputStream(fw));//to go workbook we are using this class\r\n\t\t//XSSFSheet sht = new XSSFSheet();//to go to sheet\r\n\t\t//below line is for getting that sheet\r\n\t\tXSSFSheet sht1 = wb.getSheet(\"Test\");\r\n\t\tXSSFRow row = sht1.getRow(0);\r\nint a = row.getLastCellNum();\r\n\tSystem.out.println(a);\r\n\tfor(int i=0; i<=a ; i++) {\r\n\t\t\r\n\t\tint s = row.getFirstCellNum();\r\n\t\tSystem.out.println(s);\r\n\t\t\r\n\t\t}\r\n\t}", "public static void writeInFile(String fileName,String sheetName, String cntry, String menu,String subMenu,String subMenu_1,String ActualEng_Title,String Overridden_Title,String xmlURL) throws IOException {\n\r\n\t\tFile myFile = new File(\"./\" + fileName);\r\n\r\n\t\t//Create an object of FileInputStream class to read excel file\r\n\r\n\t\tFileInputStream inputStream = new FileInputStream(myFile);\r\n\r\n\t\tWorkbook myWorkbook = null;\r\n\r\n\t\t//Find the file extension by spliting file name in substring and getting only extension name\r\n\r\n\t\tString fileExtensionName = fileName.substring(fileName.indexOf(\".\"));\r\n\r\n\t\t//Check condition if the file is xlsx file\t\r\n\r\n\t\tif(fileExtensionName.equals(\".xlsx\")){\r\n\r\n\t\t\t//If it is xlsx file then create object of XSSFWorkbook class\r\n\r\n\t\t\tmyWorkbook = new XSSFWorkbook(inputStream);\r\n\t\t\tSystem.out.println(\"Extension of file \"+fileName +\" is .xlsx\");\r\n\r\n\t\t}\r\n\r\n\t\t//Check condition if the file is xls file\r\n\r\n\t\telse if(fileExtensionName.equals(\".xls\")){\r\n\r\n\t\t\t//If it is xls file then create object of XSSFWorkbook class\r\n\r\n\t\t\tmyWorkbook = new HSSFWorkbook(inputStream);\r\n\t\t\tSystem.out.println(\"Extension of file \"+fileName +\" is .xlx\");\r\n\r\n\t\t}\r\n\r\n\t\t//Read sheet inside the workbook by its name\r\n\r\n\t\tSheet mySheet = myWorkbook.getSheet(sheetName);\r\n\r\n\t\t//Find number of rows in excel file\r\n\r\n\t\tint rowCount = mySheet.getLastRowNum() - mySheet.getFirstRowNum();\r\n\r\n\r\n\t\tRow row = mySheet.getRow(0);\r\n\r\n\t\t//Create a new row and append it at last of sheet\r\n\r\n\t\tRow newRow = mySheet.createRow(rowCount+1);\r\n\r\n\r\n\t\t//Create a loop over the cell of newly created Row\r\n\t\tfor(int colCnt=0;colCnt<=6;colCnt++)\r\n\t\t{ \r\n\t\t\tCell cell = newRow.createCell(colCnt);\r\n\r\n\t\t\tif(colCnt==0)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(cntry);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==1)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(menu);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==2)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(subMenu);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==3)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(subMenu_1);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==4)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(ActualEng_Title);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==5)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(Overridden_Title);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==6)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(xmlURL);\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* for(int j = 0; j < row.getLastCellNum(); j++){\r\n\r\n\t //Fill data in row\r\n\r\n\t Cell cell = newRow.createCell(j);\r\n\r\n\t cell.setCellValue(\"test\");\r\n\r\n\t }*/\r\n\r\n\t\t//Close input stream\r\n\r\n\t\tinputStream.close();\r\n\r\n\t\t//Create an object of FileOutputStream class to create write data in excel file\r\n\r\n\t\tFileOutputStream opStream = new FileOutputStream(myFile);\r\n\r\n\t\t//write data in the excel file\r\n\r\n\t\tmyWorkbook.write(opStream);\r\n\t\t//close output stream\r\n\t\topStream.close();\r\n\t\t//\tfor(int i = 0;i<=objectArr.length-1;i++ ){\r\n\r\n\t\t// Cell cell = row.createCell(i);\r\n\t\t// cell.setCellValue(objectArr[i]);\r\n\r\n\t\t// }\r\n\r\n\t\t//File myFile = new File(\"./Controller.xlsx\");\r\n\t\t// FileOutputStream os = new FileOutputStream(myFile);\r\n\t\t//\tmyWorkBook.write(os);\r\n\t\tSystem.out.println(\"Controller Sheet Creation finished ...\");\r\n\t\t//\tos.close();\r\n\r\n\r\n\t}", "public static void main(String[] args)throws Exception {\n\t\t\r\n\t\tFileInputStream inFile = new FileInputStream(\"C:\\\\Users\\\\vshadmin\\\\Desktop\\\\Book1.xlsx\");\r\n\t\tXSSFWorkbook book = new XSSFWorkbook(inFile);\r\n\t\tXSSFSheet sheet = book.getSheet(\"Sheet1\");\r\n\t\t\r\n\t//\tsheet.getRow(2).getCell(1).setCellValue(\"LNT\");\r\n\t//\tsheet.getRow(2).getCell(1).setCellValue(\"LNT\");\r\n\t\t//sheet.createRow(3).createCell(2).setCellValue(\"LNT\");\r\n\t\t\r\n\t\t\r\n\t\tFileOutputStream op = new FileOutputStream(\"C:\\\\Users\\\\vshadmin\\\\Desktop\\\\Book1.xlsx\");\r\n\t\tbook.write(op);\r\n\t}", "public List<FileRow> getExcel_file() {\r\n\t\treturn excel_file;\r\n\t}", "private void Start() throws Exception, Throwable{\n \n POI poi = new POI();\n \n \n\n try //( InterfaceCon = orcTST.GetConnSession())\n {\n //Коннектимся к базам\n if (InterfaceCon == null)\n { \n //Ходим в фаил с коннектами получае параметры коннектимся к ORACLE \n InterfaceCon = OraConFile.get_connect_from_file(\"INTERFACE\");\n }\n\n \n //Работа авто шедулера, ставим отчеты в очередь по достижении определенного периода\n CallableStatement callableStatement = InterfaceCon.prepareCall(\"{call REPORTS_WORK.AUTO_SHEDULER }\");\n callableStatement.executeUpdate();\n callableStatement.close();\n\n \n \n //Коннект к базе по умолчанию \n v_REP_ID = 0; \n v_PC_OPER_ID =0 ; \n //\n // System.out.println(\"Проверка очереди отчетов!\");\n //\n Statement pst_param1 = InterfaceCon.createStatement();\n String query = \"SELECT to_number(pcp.value) as REP_ID, pc.id as OPER_ID \" +\n \" FROM PC_OPER pc , Pc_Oper_Params pcp \" +\n \" WHERE pc.op_status in ('ENTRY') \" +\n \" AND pc.op_code = 'CREATE_REPORT' \" +\n \" and pc.id = pcp.oid_pc_oper \" +\n \" and pcp.param = 'REP_ID' \" +\n \" and rownum = 1 \" +\n \" and pc.id not in (select t.oid_pc_oper as ID from REPORTS_RESULT t where t.oid_pc_oper = pc.id)\" ;\n \n //Получаем заказ отчета\n ResultSet resultSet1 = pst_param1.executeQuery(query) ;\n //Получаем заказ отчета\n while (resultSet1.next())\n {\n v_REP_ID = resultSet1.getInt(\"REP_ID\");\n v_PC_OPER_ID = resultSet1.getInt(\"OPER_ID\");\n } \n //Закрываем открытые курсоры, ORA-01000: количество открытых курсоров превысило допустимый максимум\n pst_param1.close();\n resultSet1.close();\n \n \n if ( v_REP_ID != 0 && v_PC_OPER_ID != 0)\n {\n //Создаем новый поток обработки отчета \n new Thread(() -> {\n try {\n //\n System.out.println(\"Обработка заказа \"+v_PC_OPER_ID+ \" начата\");\n //\n oper_log.set_log(v_PC_OPER_ID,\"Обработка заказа \"+v_PC_OPER_ID+ \" начата\");\n poi.GetblobExcel(v_REP_ID, v_PC_OPER_ID);\n \n //\n System.out.println(\"Обработка заказа \"+v_PC_OPER_ID+ \" завершена!!!!\");\n //\n oper_log.set_log(v_PC_OPER_ID,\"Обработка заказа \"+v_PC_OPER_ID+ \" завершена!!!!\");\n // orcTST.close(); \n v_REP_ID = 0;\n v_PC_OPER_ID =0 ;\n } catch (Throwable ex) {\n System.out.println(\"ошибка !!!!\"+ex.toString());\n \n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex.toString());\n try {\n oper_log.set_log( v_PC_OPER_ID,\"Ошибка! - \" + ex.toString());\n } catch (Throwable ex1) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex1);\n }\n\n }\n }).start(); \n } \n \n } catch (Exception e) { \n System.out.println(\"Ошибка в методе Start с ошибкой\" +e.toString()); \n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, e.toString());\n try( Connection InterfaceCon1 = OraConFile.get_connect_from_file(\"INTERFACE\");)\n {\n InterfaceCon = null;\n try (CallableStatement callableStatement = InterfaceCon1.prepareCall(\"{call PC_OPER_WORK.PC_OPER_ERR (?, ?) }\")) {\n callableStatement.setInt(1, v_PC_OPER_ID);\n callableStatement.setString(2, e.toString());\n callableStatement.executeUpdate();\n }\n InterfaceCon1.close();\n InterfaceCon.close();\n } catch (Exception ex) \n { \n InterfaceCon = null; \n System.out.println(\"Ошибка в методе Start при попытке записать ошибку в базу с ошибкой\"+ex.toString()); \n \n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex.toString()); \n \n }\n } \n \n /* IMINCIDENTS inc = new IMINCIDENTS();\n IMPROBLEMS imp = new IMPROBLEMS();\n IMTASKS imt = new IMTASKS();\n RONTRANS rt = new RONTRANS();\n RONINKAS ron = new RONINKAS();\n AUDITMP am = new AUDITMP();\n AUDITFUNC af = new AUDITFUNC();\n AUDITACTION aa = new AUDITACTION();\n Ronevent rone = new Ronevent();\n LASTSTATUS last = new LASTSTATUS();*/\n /* new Thread(() -> {\n try {\n inc.take_IMINCIDENTS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start(); \n new Thread(() -> {\n try {\n imp.take_IMPROBLEMS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start(); \n new Thread(() -> {\n try {\n imt.take_IMTASKS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start(); \n new Thread(() -> {\n try {\n rt.take_RONTRANS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start(); \n new Thread(() -> {\n try {\n ron.take_RONINKAS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n am.take_AUDITMP();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n af.take_AUDITFUNC();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n aa.take_AUDITACTION();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n rone.take_Ronevent();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n last.take_LASTSTATUS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();*/\n }", "public void intializeExcel(String path) throws Exception{\n//\t\topen a input stream\n\t\t fis = new FileInputStream(path);\n\n\t\t//create a workbook object\n\t\t wb = new XSSFWorkbook(fis);\n\t\t\n\t}", "private int actualYear() throws IOException{\r\n try {\r\n return Integer.parseInt(getActualSheet().getName());\r\n } catch (NumberFormatException e) {\r\n System.err.println(\"You have to start year first\");\r\n return 0;\r\n }\r\n }", "public void readXlsx(String year, String month) throws IOException {\n XSSFWorkbook xssfWorkbook;\n XSSFSheet sheet;\n File dir = new File(\"C:\\\\Munka\\\\\" + year.trim() + month.trim());\n File[] directoryListing = dir.listFiles();\n if (directoryListing != null) {\n for (File xlsxFile : directoryListing) {\n try (InputStream fileInputStream = new FileInputStream(xlsxFile)) {\n xssfWorkbook = new XSSFWorkbook(fileInputStream);\n sheet = xssfWorkbook.getSheetAt(0);\n iterateXlsRow(sheet);\n } catch (NullPointerException e) {\n System.out.println(\"Hiba történt!\");\n }\n }\n }\n this.directory = month;\n this.year = year;\n }", "private int create(int row) throws FileNotFoundException {\n\t\tXSSFRow row0 = in.createRow(row);\r\n\t\tXSSFCell cell0row0 = row0.createCell(0);\r\n\t\t\r\n\t\tcell0row0.setCellValue(\"col_lookupName\");\r\n\r\n\t\tXSSFCell cell1row0 = row0.createCell(1);\r\n\t\t\r\n\t\tcell1row0.setCellValue(\"col_lookupType\");\r\n\r\nXSSFCell cell2row0 = row0.createCell(2);\r\n\t\t\r\n\t\tcell2row0.setCellValue(\"col_lookupTable\");\r\n\t\t\r\n\t\t\r\nXSSFCell cell3row0 = row0.createCell(3);\r\n\t\t\r\n\t\tcell3row0.setCellValue(\"col_lookupColumn\");\r\n\t\t\r\n\t\t\r\nXSSFCell cell4row0 = row0.createCell(4);\r\n\t\t\r\n\t\tcell4row0.setCellValue(\"\");\t\r\n\t\t\r\nXSSFCell cell5row0 = row0.createCell(5);\r\n\t\t\r\n\t\tcell5row0.setCellValue(\"\");\t\r\n\t\t\r\nXSSFCell cell6row0 = row0.createCell(6);\r\n\t\t\r\ncell6row0.setCellValue(\"Col_Constraints\");\r\n\r\n\r\nXSSFCell cell7row0 = row0.createCell(7);\r\n\r\ncell7row0.setCellValue(\"\");\r\n\r\n\r\n\r\nXSSFCell cell8row0 = row0.createCell(8);\r\n\r\ncell8row0.setCellValue(\"\");\r\n\r\n\t\t\r\n\t\r\nXSSFCell cell9row0 = row0.createCell(9);\r\n\r\ncell9row0.setCellValue(\"\");\r\n\r\n\r\nXSSFCell cell10row0 = row0.createCell(10);\r\n\r\ncell10row0.setCellValue(\"Col_Pagination\");\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t// Placing column headings below the row.\r\n\t\tXSSFRow row1 = in.createRow(1);\r\n\t\tXSSFCell cell3row1 = row1.createCell(3);\r\n\t\t\r\n\t\tcell3row1.setCellValue(\"Col_desplayName\");\r\n\r\n\t\tXSSFCell cell4row1 = row1.createCell(4);\r\n\t\t\r\n\t\tcell4row1.setCellValue(\"Col_columnName\");\r\n\r\n\t\tXSSFCell cell5row1 = row1.createCell(5);\r\n\t\r\n\t\tcell5row1.setCellValue(\"Col_searchable\");\r\n\r\n\t\tXSSFCell cell6row1 = row1.createCell(6);\r\n\t\r\n\t\tcell6row1.setCellValue(\"Col_constraintColumn\");\r\n\r\n\t\tXSSFCell cell7row1 = row1.createCell(7);\r\n\t\t\r\n\t\tcell7row1.setCellValue(\"Col_constraintOperator\");\r\n\r\n\t\tXSSFCell cell8row1 = row1.createCell(8);\r\n\t\t\r\n\t\tcell8row1.setCellValue(\"Col_constraintValue\");\r\n\r\n\t\tXSSFCell cell9row1 = row1.createCell(9);\r\n\t\t\r\n\t\tcell9row1.setCellValue(\"Col_parameterName\");\r\n\r\n\t\tXSSFCell cell10row1 = row1.createCell(10);\r\n\t\t\r\n\t\tcell10row1.setCellValue(\"Col_allowed\");\r\n\t\t\r\n\t\t\r\nXSSFCell cell11row1 = row1.createCell(11);\r\n\t\t\r\n\t\tcell11row1.setCellValue(\"Col_recordsPerPage\");\r\n\t\t\r\n\t\t\r\n\t\tin.addMergedRegion(new CellRangeAddress(0,0,3,5));\r\n\t\tin.addMergedRegion(new CellRangeAddress(0,0,6,9));\r\n\t\tin.addMergedRegion(new CellRangeAddress(0,0,10,11));\r\n\t\t\r\n\t\t\r\n\t\tin.autoSizeColumn(0);\r\n\t\tin.autoSizeColumn(1);\r\n\t\tin.autoSizeColumn(2);\r\n\t\tin.autoSizeColumn(3);\r\n\t\tin.autoSizeColumn(4);\r\n\t\tin.autoSizeColumn(5);\r\n\t\tin.autoSizeColumn(6);\r\n\t\tin.autoSizeColumn(7);\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t FileOutputStream outputStream = new FileOutputStream(\"D://jsonFormatRAHULKADYANbyRAHULKADYAN.xlsx\");\r\n try {\r\n\t\t\tworkbook.write(outputStream);\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 /* try {\r\n\t//\t\tworkbook.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\t\r\n\t\t\r\n\t\t\r\n\r\n\t\treturn row;\r\n\t}", "private String setFichero(enumFicheros fichero)\n\t{\n\t\tswitch(fichero)\n\t\t{\n\t\tcase FICHERO_INFO_RANURA1:\n\t\t{\n\t\t\treturn fichero_info_ranura1;\n\t\t}\n\t\tcase FICHERO_INFO_RANURA2:\n\t\t{\n\t\t\treturn fichero_info_ranura2;\n\t\t}\n\t\tcase FICHERO_INFO_RANURA3:\n\t\t{\n\t\t\treturn fichero_info_ranura3;\n\t\t}\n\t\tcase FICHERO_PJ_RANURA1:\n\t\t{\n\t\t\treturn fichero_pj_ranura1;\n\t\t}\n\t\tcase FICHERO_PJ_RANURA2:\n\t\t{\n\t\t\treturn fichero_pj_ranura2;\n\t\t}\n\t\tcase FICHERO_PJ_RANURA3:\n\t\t{\n\t\t\treturn fichero_pj_ranura3;\n\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static void main(String[] args) throws IOException {\n\t\tFile m=new File(\"C:\\\\Users\\\\raja sekar\\\\eclipse-workspace\\\\MavenDay1\\\\MavenProject\\\\testdata\\\\Arun.xlsx\");\n\t\tFileInputStream stream=new FileInputStream(m);\n\t\t\n\t\t//Workbook\n\t\tWorkbook w=new XSSFWorkbook(stream);\n\t\t//Sheet\n\t\tSheet s=w.createSheet(\"List1\");\n\t\t//Row\n\t\tRow r=s.createRow(3);\n\t\t//Cell\n\t\tCell c=r.createCell(3);\n\t\tc.setCellValue(\"Ganesh\");\n\t\t\n\t\tFileOutputStream o=new FileOutputStream(m);\n\t\tw.write(o);\n\t\tSystem.out.println(\"Success\");\n\t\t}", "public void writeExcel(String file_name, String path, DepartmentDto department,\n StageDto stage) throws FileNotFoundException, IOException {\n\n List<SlotDto> slots = null;\n\n try {\n\n //create workbook to generate .xls file\n XSSFWorkbook workbook = new XSSFWorkbook();\n XSSFSheet sheet = workbook.createSheet(file_name);\n\n\n // Create a Font for styling header cells\n Font headerFont = workbook.createFont();\n headerFont.setBold(false);\n headerFont.setFontHeightInPoints((short) 14);\n headerFont.setColor(IndexedColors.BLACK.getIndex());\n\n\n Font headerFont2 = workbook.createFont();\n headerFont2.setBold(true);\n headerFont2.setFontHeightInPoints((short) 14);\n headerFont2.setColor(IndexedColors.DARK_BLUE.getIndex());\n\n Font headerFont1 = workbook.createFont();\n headerFont1.setBold(true);\n headerFont1.setFontHeightInPoints((short) 14);\n headerFont1.setColor(IndexedColors.DARK_BLUE.getIndex());\n\n CellStyle headerCellStyle3 = workbook.createCellStyle();\n headerCellStyle3.setFont(headerFont1);\n headerCellStyle3.setAlignment(HorizontalAlignment.LEFT);\n\n // Create a CellStyle with the font\n CellStyle headerCellStyle = workbook.createCellStyle();\n headerCellStyle.setFont(headerFont2);\n headerCellStyle.setFillForegroundColor(IndexedColors.SKY_BLUE.getIndex());\n headerCellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n headerCellStyle.setAlignment(HorizontalAlignment.CENTER);\n\n // Create a CellStyle with the font\n CellStyle headerCellStyle2 = workbook.createCellStyle();\n headerCellStyle2.setFont(headerFont);\n headerCellStyle2.setFillForegroundColor(IndexedColors.WHITE.getIndex());\n headerCellStyle2.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n headerCellStyle2.setAlignment(HorizontalAlignment.LEFT);\n\n\n // Create a CellStyle with the font for day\n CellStyle headerCellStyle1 = workbook.createCellStyle();\n headerCellStyle1.setFont(headerFont);\n headerCellStyle1.setFillForegroundColor(IndexedColors.LIGHT_YELLOW.getIndex());\n headerCellStyle1.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n headerCellStyle1.setAlignment(HorizontalAlignment.LEFT);\n\n\n // get arraylist of slots of schedule\n slots = new ArrayList<>();\n slots = slotBao.viewSlotsOfSchedule(stage, department);\n\n\n //create all rows\n for (int r = 0; r < 30; r++) {\n // Create a Row\n XSSFRow headerRow = sheet.createRow(r);\n\n // Create all cells in row and set their style\n for (int i = 0; i < 9; i++) {\n Cell cell = headerRow.createCell(i);\n\n if ((i == 0 && r > 2) || r == 3 || r == 4)\n cell.setCellStyle(headerCellStyle);\n else if (r > 4)\n cell.setCellStyle(headerCellStyle2);\n else if (r < 3)\n cell.setCellStyle(headerCellStyle3);\n\n\n }\n\n }\n\n // create row and cell to set the schedule department\n sheet.getRow(0)\n .getCell(0)\n .setCellValue(department.getName());\n sheet.getRow(0)\n .getCell(1)\n .setCellValue(department.getCode());\n\n // create row and cell to set the academic year\n sheet.getRow(1)\n .getCell(0)\n .setCellValue(\"Academic year\");\n sheet.getRow(1)\n .getCell(1)\n .setCellValue(stage.getNumber());\n\n\n // create row and cells to set the term of schedule\n sheet.getRow(2)\n .getCell(0)\n .setCellValue(\"Term\");\n sheet.getRow(2)\n .getCell(1)\n .setCellValue(slots.get(0).getTerm());\n\n // create rows and cells to set time slots number and day\n sheet.getRow(3)\n .getCell(0)\n .setCellValue(\"Time slot\");\n sheet.getRow(3)\n .getCell(1)\n .setCellValue(\"Slot 1\");\n sheet.getRow(3)\n .getCell(3)\n .setCellValue(\"Slot 2\");\n sheet.getRow(3)\n .getCell(5)\n .setCellValue(\"Slot 3\");\n sheet.getRow(3)\n .getCell(7)\n .setCellValue(\"Slot 4\");\n\n\n // ceate row and cells to set start and end time of slots\n sheet.getRow(4)\n .getCell(1)\n .setCellValue(\"F 09:00-T 10:20\");\n sheet.getRow(4)\n .getCell(3)\n .setCellValue(\"F 10:30-T 12:00\");\n sheet.getRow(4)\n .getCell(5)\n .setCellValue(\"F 12:20-T 01:50\");\n sheet.getRow(4)\n .getCell(7)\n .setCellValue(\"F 2:00-T 03:30\");\n\n\n //set days\n sheet.getRow(5)\n .getCell(0)\n .setCellValue(\"Sunday\");\n sheet.getRow(10)\n .getCell(0)\n .setCellValue(\"Monday\");\n sheet.getRow(15)\n .getCell(0)\n .setCellValue(\"Tuesday\");\n sheet.getRow(20)\n .getCell(0)\n .setCellValue(\"Wednesday\");\n sheet.getRow(25)\n .getCell(0)\n .setCellValue(\"Thursday\");\n\n\n // Resize all columns to fit the content size\n for (int i = 0; i < 9; i++) {\n sheet.autoSizeColumn(i);\n }\n\n\n // loop to get slot of indexed day and time slot\n for (int i = 0; i < slots.size(); i++) {\n\n //define slot day\n int r = -1;\n\n if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Sunday\"))\n r = 5;\n else if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Monday\"))\n r = 10;\n else if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Tuesday\"))\n r = 15;\n else if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Wednesday\"))\n r = 20;\n else if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Thursday\"))\n r = 25;\n\n\n int cell = slots.get(i).getNum() * 2 - 1;\n\n // set style for cells\n if ((r % 2 == 0 && (cell == 1 || cell == 2 || cell == 5 || cell == 6)) ||\n (r % 2 != 0 && (cell == 3 || cell == 4 || cell == 7 || cell == 8))) {\n\n sheet.getRow(r)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n\n sheet.getRow(r + 1)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r + 1)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n\n sheet.getRow(r + 2)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r + 2)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n\n sheet.getRow(r + 3)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r + 3)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n\n sheet.getRow(r + 4)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r + 4)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n }\n\n // set course name and code of slot\n sheet.getRow(r)\n .getCell(cell)\n .setCellValue(slots.get(i)\n .getCourse()\n .getName());\n sheet.getRow(r)\n .getCell(cell + 1)\n .setCellValue(slots.get(i)\n .getCourse()\n .getCode());\n\n // set type of slot\n sheet.getRow(r + 2)\n .getCell(cell)\n .setCellValue(slots.get(i).getSlot_type());\n\n // set location of slot\n sheet.getRow(r + 3)\n .getCell(cell)\n .setCellValue(slots.get(i)\n .getLocation()\n .getName());\n\n\n // check slot type then set plt of slot\n if (slots.get(i)\n .getSlot_type()\n .equals(\"LECTURE\")) {\n sheet.getRow(r + 3)\n .getCell(cell + 1)\n .setCellValue(slots.get(i)\n .getCourse()\n .getPlt_lecture()\n .getCode());\n }\n if (slots.get(i)\n .getSlot_type()\n .equals(\"SECTION\")) {\n sheet.getRow(r + 3)\n .getCell(cell + 1)\n .setCellValue(slots.get(i)\n .getCourse()\n .getPlt_section()\n .getCode());\n }\n\n\n // set student number of slot\n sheet.getRow(r + 4)\n .getCell(cell)\n .setCellValue(\"Student number\");\n sheet.getRow(r + 4)\n .getCell(cell + 1)\n .setCellValue(slots.get(i).getStudent_number());\n\n /*\n * set staff of slot then check if members > 1\n * then concatenate all members' names\n * and set to cell */\n String staff = slots.get(i)\n .getStaff()\n .get(0)\n .getPosition() + \"/\" + slots.get(i)\n .getStaff()\n .get(0)\n .getName();\n\n /*\n * set staff user email of slot then check if members > 1\n * then concatenate all members' emails\n * and set to cell */\n String[] email = slots.get(i)\n .getStaff()\n .get(0)\n .getUser()\n .getEmail()\n .split(\"@\", 2);\n String user = email[0];\n\n\n for (int j = 1; j < slots.get(i)\n .getStaff()\n .size(); j++) {\n staff = staff + \" # \" + slots.get(i)\n .getStaff()\n .get(j)\n .getPosition() + \"/\" + slots.get(i)\n .getStaff()\n .get(j)\n .getName();\n\n String[] _email = slots.get(i)\n .getStaff()\n .get(j)\n .getUser()\n .getEmail()\n .split(\"@\", 2);\n user = user + \" # \" + _email[0];\n }\n\n sheet.getRow(r + 1)\n .getCell(cell)\n .setCellValue(staff);\n sheet.getRow(r + 1)\n .getCell(cell + 1)\n .setCellValue(user);\n\n }\n\n\n // write data to the file\n\n FileOutputStream fileOut = new FileOutputStream(path + \"\\\\\" + file_name);\n workbook.write(fileOut);\n fileOut.close();\n\n\n // Closing the workbook\n workbook.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }", "public void WriteToolVersion () {\n\t\tHSSFRow row = sheet.createRow((short)rowIndex++);\n\t\tHSSFCell cell = row.createCell(0);\n\t\tWrite(\"Java Mestra Tool\",cell,cellStyles.getCellStyle(CellStylesEnum.ArialEightCellStyle));\n//\t\tHSSFRichTextString strRT = new HSSFRichTextString(\"Java Mestra Tool\");\n//\t\tcell.setCellValue(strRT);\n//\t\tcell.setCellStyle(ArialEightCellStyle);\n\n\t\tMestraToolVersion mestraToolVersion = new MestraToolVersion();\n\t\tcell = row.createCell(1);\n\t\tHSSFRichTextString strRT = new HSSFRichTextString(mestraToolVersion.getMestraToolVersion());\n\t\tcell.setCellValue(strRT);\n\t\tcell.setCellStyle(cellStyles.getCellStyle(CellStylesEnum.ArialEightCellStyle));\n\n\t\trow = sheet.createRow((short)rowIndex++);\n\t\tcell = row.createCell(0);\n\t\tstrRT = new HSSFRichTextString(\"Files Analysed\");\n\t\tcell.setCellValue(strRT);\n\t\tcell.setCellStyle(cellStyles.getCellStyle(CellStylesEnum.ArialEightCellStyle));\n\n\t\tDate now = new Date();\n\t\tString strDate = DateFormat.getDateInstance().format(now);\n\t\tcell = row.createCell(1);\n\t\tstrRT = new HSSFRichTextString(strDate);\n\t\tcell.setCellValue(strRT);\n\t\tcell.setCellStyle(cellStyles.getCellStyle(CellStylesEnum.ArialEightCellStyle));\n\n\t\tString strTime = DateFormat.getTimeInstance().format(now);\n\t\tcell = row.createCell(2);\n\t\tstrRT = new HSSFRichTextString(strTime);\n\t\tcell.setCellValue(strRT);\n\t\tcell.setCellStyle(cellStyles.getCellStyle(CellStylesEnum.ArialEightCellStyle));\n\n\t}", "public void WriteFileName(MestraFile mestraFile) {\n\t\tHSSFRow row = sheet.createRow((short)rowIndex++);\n\n\t\t// Create a cell and put a value in it.\n\t\tint cellIndex = 0;\n\t\tHSSFCell cell = row.createCell(cellIndex++);\n\n\t\tHSSFRichTextString strRT = new HSSFRichTextString(mestraFile.getStrFileType());\n\t\tcell.setCellValue(strRT);\n\t\tcell.setCellStyle(cellStyles.getCellStyle(CellStylesEnum.ArialEightCellStyle));\n\n\t\tcell = row.createCell(cellIndex++);\n\t\tString FileName = \"file:\\\\\" + mestraFile.getLongFileName();\n\t\tstrRT = new HSSFRichTextString(FileName);\n\t\tcell.setCellValue(strRT);\n\t\tcell.setCellStyle(cellStyles.getCellStyle(CellStylesEnum.ArialEightCellStyle));\n\n\t\tif (mestraFile.isWordExtractionFailed()) {\n\t\t\tcell = row.createCell(cellIndex++);\n\t\t\tString ErrorMessage = \"Word Extraction Failed!\";\n\t\t\tstrRT = new HSSFRichTextString(ErrorMessage);\n\t\t\tcell.setCellValue(strRT);\n\t\t\tcell.setCellStyle(cellStyles.getCellStyle(CellStylesEnum.ArialEightRedBackGroundCellStyle));\n\t\t}\n\n\t\t//cell = row.createCell((short)cellIndex++);\n\t\t//String formulae = \"HYPERLINK(file://\"+ mestraFile.getLongFileName()+\")\";\n\t\t//cell.setCellType(HSSFCell.CELL_TYPE_FORMULA);\n\t\t//cell.setCellFormula(formulae);\n\n\t\t// if the file is a SSS we add a row listing all the CSCI impacted by the SSS Requirements\n\t\tif\t(mestraFile.IsSSS()) {\n\n\t\t\trow = sheet.createRow((short)rowIndex++);\n\t\t\tcellIndex = 0;\n\t\t\tcell = row.createCell(cellIndex++);\n\t\t\tstrRT = new HSSFRichTextString(\"Impacted CSCI List\");\n\t\t\tcell.setCellValue(strRT);\n\t\t\tcell.setCellStyle(cellStyles.getCellStyle(CellStylesEnum.ArialEightCellStyle));\n\n\t\t\tif (mestraFile.getSSS_FileAllocationList() != null) {\n\t\t\t\t\n\t\t\t\tIterator<Map.Entry<String, CSCI_Allocation>> Iter = mestraFile.getSSS_FileAllocationList().iterator();\n\t\t\t\twhile (Iter.hasNext()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcell = row.createCell(cellIndex++);\n\t\t\t\t\t\t\n\t\t\t\t\t\tMap.Entry<String, CSCI_Allocation> entry = Iter.next();\n\t\t\t\t\t\tCSCI_Allocation aCSCI_Allocation = entry.getValue();\n\n\t\t\t\t\t\tstrRT = new HSSFRichTextString(aCSCI_Allocation.getCSCI_Name());\n\t\t\t\t\t\tcell.setCellValue(strRT);\n\t\t\t\t\t\t// check if the CSCI exists in the configuration file\n\t\t\t\t\t\tif (aCSCI_Allocation.isCSCI_NameExisting() == false) {\n\t\t\t\t\t\t\tcell.setCellStyle(cellStyles.getCellStyle(CellStylesEnum.ArialEightYellowBackGroundCellStyle));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tcell.setCellStyle(cellStyles.getCellStyle(CellStylesEnum.ArialEightCellStyle));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (RuntimeException e) {\n\t\t\t\t\t\tlogger.log(Level.SEVERE , e.getLocalizedMessage());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t}\n\n\t\t\trow = sheet.createRow((short)rowIndex++);\n\t\t\tcellIndex = 0;\n\t\t\tcell = row.createCell(cellIndex++);\n\t\t\tstrRT = new HSSFRichTextString(\"Nbr ref\");\n\t\t\tcell.setCellValue(strRT);\n\t\t\tcell.setCellStyle(cellStyles.getCellStyle(CellStylesEnum.ArialEightCellStyle));\n\n\t\t\tif (mestraFile.getSSS_FileAllocationList() != null) {\n\t\t\t\t\n\t\t\t\tIterator<Map.Entry<String, CSCI_Allocation>> Iter = mestraFile.getSSS_FileAllocationList().iterator();\n\t\t\t\twhile (Iter.hasNext()) {\n\n\t\t\t\t\tMap.Entry<String, CSCI_Allocation> entry = Iter.next();\n\t\t\t\t\tCSCI_Allocation aCSCI_Allocation = entry.getValue();\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcell = row.createCell(cellIndex++);\n\t\t\t\t\t\tint NbrRef = aCSCI_Allocation.getNbrReferences();\n\t\t\t\t\t\tcell.setCellValue(NbrRef);\n\t\t\t\t\t\tcell.setCellStyle(cellStyles.getCellStyle(CellStylesEnum.ArialEightCellStyle));\n\t\t\t\t\t}\n\t\t\t\t\tcatch (RuntimeException e) {\n\t\t\t\t\t\tlogger.log(Level.SEVERE , e.getLocalizedMessage());\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "private void importData() {\n Sheet sheet;\n Row row;\n int lastRowNum;\n // Discover how many sheets there are in the workbook....\n int numSheets = this.workbook.getNumberOfSheets();\n // and then iterate through them.\n for (int i = 0; i < numSheets; i++) {\n\n // Get a reference to a sheet and check to see if it contains\n // any rows.\n sheet = this.workbook.getSheetAt(i);\n if (sheet.getPhysicalNumberOfRows() > 0) {\n lastRowNum = sheet.getLastRowNum();\n for (int j = 1; j <= lastRowNum; j++) {\n row = sheet.getRow(j);\n this.rowToRenddet(row);\n }\n }\n }\n }", "public void abrirRelatorioParcelasConvenio(Object convenio, Object periodo) {\n InputStream inputStream = getClass().getResourceAsStream(\"RelatorioParcelasConvenio.jasper\");\r\n\r\n Map<String, Object> parametros = new HashMap<String, Object>();\r\n\r\n parametros.put(\"CONVENIO\", convenio);\r\n parametros.put(\"PERIODO\", periodo);\r\n\r\n try {\r\n // abre o relatório\r\n ReportUtils.openReport(\"Relatório de Parcelas por Convênio\", inputStream, parametros, ConnectionFactory.getConnection());\r\n } catch (JRException exc) {\r\n exc.printStackTrace();\r\n }\r\n\r\n }", "@Test\r\n public void excel() throws EncryptedDocumentException, InvalidFormatException, FileNotFoundException, IOException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"E:\\\\Selenium\\\\Newfolder\\\\chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\t\t\r\n //get the excel sheet file location \r\n String filepath=\"E:\\\\Selenium\\\\SampleApplications\\\\ClearTripAppln\\\\DataSheet.xlsx\";\r\n\t \t\t\t\tWorkbook wb= WorkbookFactory.create(new FileInputStream(new File(filepath)));\r\n //get the sheet which needs read operation\r\n\t\t Sheet sh = wb.getSheet(\"sheet1\");\r\n\t\t \r\n\t String url =sh.getRow(0).getCell(1).getStringCellValue();\r\n\t System.out.println(url);\r\n\t driver.get(url);\r\n\t \r\n\t \t\t// Maximizing the window\r\n\t \t\tdriver.manage().window().maximize();\r\n\t \t\t\r\n\r\n\r\n\t\t }", "public void Leer() throws FileNotFoundException\n {\n // se crea una nueva ruta en donde se va a ir a leer el archivo\n String ruta = new File(\"datos.txt\").getAbsolutePath(); \n archivo=new File(ruta); \n }", "private void redirectExport()\r\n {\r\n String viewId = Pages.getViewId(FacesContext.getCurrentInstance());\r\n String baseName = Pages.getCurrentBaseName();\r\n DocumentData documentData = new ByteArrayDocumentData(baseName, excelWorkbook.getDocumentType(), excelWorkbook.getBytes());\r\n String id = DocumentStore.instance().newId();\r\n String url = DocumentStore.instance().preferredUrlForContent(baseName, excelWorkbook.getDocumentType().getExtension(), id);\r\n url = Manager.instance().encodeConversationId(url, viewId);\r\n DocumentStore.instance().saveData(id, documentData);\r\n try\r\n {\r\n FacesContext.getCurrentInstance().getExternalContext().redirect(url);\r\n }\r\n catch (IOException e)\r\n {\r\n throw new ExcelWorkbookException(Interpolator.instance().interpolate(\"Could not redirect to #0\", url), e);\r\n }\r\n }", "public static int write_XL_Data(String path,String sheet,int row,int cell,int v) throws EncryptedDocumentException, FileNotFoundException, IOException \r\n{\r\n\t\r\n\tWorkbook wb=WorkbookFactory.create(new FileInputStream(path));\r\n\twb.getSheet(sheet).getRow(row).getCell(cell).setCellValue(v);\r\n\twb.write(new FileOutputStream(path));\r\n\treturn v;\r\n}", "@RequestMapping(\"/findingRate/downloadExcel/format\")\r\n\t@ResponseBody\r\n\tpublic String excelFormatDownload(\r\n\t\t\t@RequestParam(value = \"headingVal\") String headingVal,Principal principal){\r\n\t\t\r\n\t\tString retVal = \"-1\";\r\n\t\tString fileName = principal.getName()+new java.util.Date().getTime()+\".xls\";\r\n\t\tString filePath = uploadDirecotryPath + File.separator +\"excelfilecontent\" + File.separator;\r\n\t\tString tempHeadVal[] = headingVal.split(\",\");\r\n\t\t\r\n\t\t try {\r\n\t String filename = filePath+fileName;\r\n\t HSSFWorkbook workbook = new HSSFWorkbook();\r\n\t HSSFSheet sheet = workbook.createSheet(\"FirstSheet\"); \r\n\r\n\t HSSFRow rowhead = sheet.createRow((short)0);\r\n\t for(int i=0;i<tempHeadVal.length;i++){\r\n\t \t rowhead.createCell(i).setCellValue(tempHeadVal[i].toString());\r\n\t }\r\n\t \r\n\t FileOutputStream fileOut = new FileOutputStream(filename);\r\n\t workbook.write(fileOut);\r\n\t fileOut.close();\r\n\t workbook.close();\r\n\t retVal = fileName;\r\n\t } catch ( Exception ex ) {\r\n\t System.out.println(ex);\r\n\t retVal = \"-2\";\r\n\t }\r\n\t\t\r\n\t\treturn retVal;\r\n\t}", "public ExcelUtils(String path, ExcelType tipo) throws FileNotFoundException, IOException {\n\t\tthis(path, 0, tipo);\n\t}", "public static void getnumberofrow() {\n\t\tString dataFilePath = \"Resources/[3DBroadCastSales]-Script_Result.xlsx\";\n\t\tFile datafile = new File(dataFilePath);\n\t\tString fullpath = datafile.getAbsolutePath();\n\t\tSheet firstSheet = null;\n\t\ttry {\n\t\t\tSystem.out.println(\"full path \" + datafile.getAbsolutePath() + \" con \" + datafile.getCanonicalPath());\n\t\t\tFileInputStream inputStream = new FileInputStream(new File(fullpath));\n\t\t\tWorkbook workbook = new XSSFWorkbook(inputStream);\n\t\t\tfirstSheet = workbook.getSheetAt(1);\n\t\t\tint noofrow = firstSheet.getLastRowNum();\n\t\t\tSystem.out.println(\"Number of rows :\" + noofrow);\n\t\t\tinputStream.close();\n\t\t\tfor (int i = 1; i < noofrow; i++) {\n\t\t\t\tSheetResultcellupdatetoskipped(i);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t}\n\n\t}", "public void parsingExcel() {\n theresFile = new File(pathTo).exists();\n if (theresFile) {\n try {\n FileInputStream myxls = new FileInputStream(pathTo);\n Workbook workbook = WorkbookFactory.create(myxls);\n //getting the sheet at index zero\n Sheet sheet = workbook.getSheetAt(0);\n int lastRow = sheet.getLastRowNum();\n System.out.println(\"currentID: \" + currentID);\n Row row2 = sheet.createRow(lastRow + 1);\n Data data = new Data(currentID++, jTextField1.getText(), jTextField2.getText(),\n jTextFieldModel.getText(), jTextFieldSerialN.getText(),\n Integer.parseInt(jTextFieldComments.getText()), jTextAreaDescription.getText());\n\n for (int i = 0; i < 7; i++) {\n Cell cell4 = row2.createCell(i);\n switch (i) {\n case 0:\n cell4.setCellValue(data.getID());\n break;\n case 1:\n cell4.setCellValue((String) data.getName());\n break;\n case 2:\n cell4.setCellValue((String) data.getDevice());\n break;\n case 3:\n cell4.setCellValue((String) data.getDeviceModel());\n break;\n case 4:\n cell4.setCellValue((String) data.getSerialNumber());\n break;\n case 5:\n cell4.setCellValue((int) data.getOptional());\n break;\n case 6:\n cell4.setCellValue((String) data.getDecription());\n break;\n }\n\n }\n FileOutputStream outputStream = new FileOutputStream(pathTo);\n workbook.write(outputStream);\n workbook.close();\n } catch (IOException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n } catch (EncryptedDocumentException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n if (jTextFieldComments.getText().equals(\"\") || jTextFieldComments.getText().equals(null)) {\n JOptionPane.showMessageDialog(null, \"Morate uneti količinu\");\n } else {\n try {\n Data data = new Data(1, jTextField1.getText(), jTextField2.getText(),\n jTextFieldModel.getText(), jTextFieldSerialN.getText(),\n Integer.parseInt(jTextFieldComments.getText()), jTextAreaDescription.getText());\n writtingExcelFile(makingExcelWorkbook(data));\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n\n// try {\n// FileInputStream myxls = new FileInputStream(pathTo);\n// HSSFWorkbook studentsSheet = new HSSFWorkbook(myxls);\n// HSSFSheet worksheet = studentsSheet.getSheetAt(0);\n// int lastRow = worksheet.getLastRowNum();\n// System.out.println(lastRow);\n// Row row = worksheet.createRow(++lastRow);\n// row.createCell(1).setCellValue(\"Dr.Hola\");\n// myxls.close();\n// FileOutputStream output_file =new FileOutputStream(new File(\"poi-testt.xls\")); \n// //write changes\n// studentsSheet.write(output_file);\n// output_file.close();\n// System.out.println(\" is successfully written\");\n// } catch (Exception e) {\n// }\n }", "public void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\tFile file = new File(Environment.getExternalStorageDirectory().toString() + \"/学生会/学生会.xls\");\n\t\t\t\tString s = String.valueOf(file.exists());\n\t\t\t\t\n\t\t\t\tToast.makeText(MainActivity.this, s, Toast.LENGTH_SHORT).show();\n\t\t\t\t\n\t\t\t\tSystem.out.println(Environment.getExternalStorageDirectory().getAbsolutePath().toString());\n\t\t\t\t\n\t\t\t\tToast.makeText(MainActivity.this, \"信息初始化...\", Toast.LENGTH_SHORT).show();\n\t\t\t\tinit();\n\t\t\t\tToast.makeText(MainActivity.this, \"初始化完成\", Toast.LENGTH_SHORT).show();\n\t\t\t\tIntent begin = new Intent(MainActivity.this, SelectLevel.class);\n\t\t\t\tbegin.putExtra(\"union\", union);\n\t\t\t\tstartActivity(begin);\n//\t\t\t\t m\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n//\t\t\t\tFile file = new File(Environment.getExternalStorageDirectory().toString());\n//\t\t\t\tFile[] files = file.listFiles();\n\t\t\t\t\n\t\t\t}", "public static void main(String[] args) throws Exception {\n File source= new File(\"C:/Development/DataFiles/LoginData.xlsx\");\r\n FileInputStream fis = new FileInputStream(source);\r\n XSSFWorkbook wb = new XSSFWorkbook(fis);\r\n\tXSSFSheet sh = wb.getSheetAt(0);\r\n//\tString data0= sh.getRow(1).getCell(1).getStringCellValue();\r\n//\tSystem.out.println( data0);\r\n\tint rowcount=sh.getLastRowNum();\r\n\t//string colcount=sh.col\r\n\t//System.out.println( colcount);\r\n/*\tfor (int i=0;i<=rowcount;i++)\r\n\t{\r\n\t\tString data1= sh.getRow(i).getCell(0).getStringCellValue();\r\n\t\tif (data1==\"end\")\r\n\t\t\t{\r\n\t\t\t\t\tsh.getRow(i+1);\r\n\t\t\t}\r\n\t\t\r\n\t\tSystem.out.println(data1);\r\n\t\tSystem.out.println();\r\n\t}*/\r\n\t\r\n\tfor (@SuppressWarnings(\"rawtypes\") org.apache.poi.ss.usermodel.Sheet sh1 : wb ) {\r\n for (Row row : sh) {\r\n for (Cell cell : row) {\r\n // Do something here\r\n }\r\n }\r\n }\r\n\twb.close();\r\n\t}", "public static void main(String[] args) {\n Module module = ActivatorToolBox.simpleLink(new BaseDBActivator(),\n new ConfigurationActivator(),\n new StandaloneModeActivator(),\n new ModuleHealActivator(),\n new StateServiceActivator(),\n new ChartBaseActivator(),\n new SchedulerActivator(),\n new ReportBaseActivator(),\n new RestrictionActivator(),\n new ReportActivator(),\n new WriteActivator());\n SimpleWork.supply(CommonOperator.class, new CommonOperatorImpl());\n String envpath = \"//Applications//FineReport10_325//webapps//webroot//WEB-INF\";\n SimpleWork.checkIn(envpath);\n I18nResource.getInstance();\n module.start();\n\n\n ResultWorkBook rworkbook = null;\n try {\n // read the workbook\n TemplateWorkBook workbook = TemplateWorkBookIO.readTemplateWorkBook(\"//doc//Primary//Parameter//Parameter.cpt\");\n // get the parameters and set value\n Parameter[] parameters = workbook.getParameters();\n parameters[0].setValue(\"华东\");\n // define a parameter map to execute the workbook\n java.util.Map parameterMap = new java.util.HashMap();\n for (int i = 0; i < parameters.length; i++) {\n parameterMap.put(parameters[i].getName(), parameters[i]\n .getValue());\n }\n\n FileOutputStream outputStream;\n\n // unaltered export to xls\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//ExcelExport.xls\"));\n ExcelExporter excel = new ExcelExporter();\n excel.setVersion(true);\n excel.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n // unaltered export to xlsx\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//ExcelExport.xlsx\"));\n StreamExcel2007Exporter excel1 = new StreamExcel2007Exporter();\n excel.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n // full page export to xls\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//PageExcelExport.xls\"));\n PageExcelExporter page = new PageExcelExporter(ReportUtils.getPaperSettingListFromWorkBook(workbook.execute(parameterMap,new WriteActor())));\n page.setVersion(true);\n page.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n // full page export to xlsx\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//PageExcelExport.xlsx\"));\n PageExcel2007Exporter page1 = new PageExcel2007Exporter(ReportUtils.getPaperSettingListFromWorkBook(rworkbook));\n page1.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n // page to sheet export to xls\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//PageSheetExcelExport.xls\"));\n PageToSheetExcelExporter sheet = new PageToSheetExcelExporter(ReportUtils.getPaperSettingListFromWorkBook(workbook.execute(parameterMap,new WriteActor())));\n sheet.setVersion(true);\n sheet.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n // page to sheet export to xlsx\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//PageSheetExcelExport.xlsx\"));\n PageToSheetExcel2007Exporter sheet1 = new PageToSheetExcel2007Exporter(ReportUtils.getPaperSettingListFromWorkBook(rworkbook));\n sheet1.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n // Large data volume export to xls\n outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//LargeExcelExport.zip\"));\n LargeDataPageExcelExporter large = new LargeDataPageExcelExporter(ReportUtils.getPaperSettingListFromWorkBook(workbook.execute(parameterMap,new WriteActor())), true);\n\n // Large data volume export to xlsx\n // outputStream = new FileOutputStream(new File(\"//Users//susie//Downloads//LargeExcelExport.xlsx\"));\n // LargeDataPageExcel2007Exporter large = new LargeDataPageExcel2007Exporter(ReportUtils.getPaperSettingListFromWorkBook(rworkbook), true);\n large.export(outputStream, workbook.execute(parameterMap,new WriteActor()));\n\n outputStream.close();\n module.stop();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@VTID(15)\n excel.Range getLocation();", "public static void main(String[] args) throws IOException {\n\t\t\r\n\t\tString path=\"C:\\\\Users\\\\Tahmina\\\\eclipse-workspace\\\\Excel\\\\data\\\\study.xlsx\";\r\n\t\tFile f=new File(path);\r\n\t\tFileInputStream fis=new FileInputStream(f);\r\n\t\tXSSFWorkbook wb=new XSSFWorkbook(fis);\r\n\t\t\r\n\t\tXSSFSheet wbs= wb.getSheetAt(0);\r\n\t\tRow r0=wbs.getRow(0);\r\n\t\tCell c0=r0.getCell(0);\r\n\t\t\r\n\t\tSystem.out.println(c0);\r\n\t\t\r\n\t\tfis.close();\r\n\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\t \n\t\tFileOutputStream fileOut1 = new FileOutputStream(\"D:\\\\Test9.xls\");\n\t\tWorkbook wb1 = new XSSFWorkbook();\t\t\n\t\t\n\t\tSheet s2=wb1.createSheet(\"Abi\");\n\t\tSystem.out.println(\"File created\");\n\t\tRow r1=s2.createRow(0);\n\t\tCell c1 = r1.createCell(0);\n\t\tc1.setCellValue(\"Java\");\n\t\twb1.write(fileOut1);\n\t\tSystem.out.println(\"Dhandapani Branch\");\n\t\t}", "public void iniciarValores(){\r\n //Numero de campos da linha, do arquivo de saida filtrado\r\n this.NUM_CAMPOS = 106;\r\n this.ID = 0; //numero da ficha\r\n this.NUM_ARQUIVOS = 2070;\r\n\r\n this.MIN_INDICE = 1; //indice do cadastro inicial\r\n this.MAX_INDICE = 90; //indice do cadastro final\r\n this.NUM_INDICES = 90; //quantidade de cadastros lidos em cada arquivo\r\n }", "@SuppressWarnings(\"resource\")\n\tpublic String init_excel(String excel_name_with_extension, Integer sheet_index_starting_from_0, Integer row_index_starting_from_0, Integer column_index_starting_from_0)\n\t\t\tthrows Exception {\n\n\t\tString folderPath = \"src//test//resources//TestData//\"; // keep excel in this folder path\n\t\tString element_Image = System.getProperty(\"user.dir\") + File.separator + folderPath + excel_name_with_extension;\n\n\t\tFile file = new File(element_Image);\n\t\tFileInputStream fis = new FileInputStream(file); // this contains raw data from the excel\n\t\tXSSFWorkbook workbook = new XSSFWorkbook(fis); // creating workbook\n\t\tXSSFSheet sheet = workbook.getSheetAt(sheet_index_starting_from_0); // getting the sheet from workbook\n\n\t\tString cellValue = sheet.getRow(row_index_starting_from_0).getCell(column_index_starting_from_0).getStringCellValue(); // fetching data from the\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// sheet\n\t\treturn cellValue;\n\t}", "public static List<InputDto> readXLSXFile(File file) throws Exception {\n List<InputDto> inputDtos = new ArrayList<>();\n\n Integer i = 0;\n InputStream ExcelFileToRead = new FileInputStream(file);\n XSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead);\n\n XSSFWorkbook test = new XSSFWorkbook();\n\n XSSFSheet sheet = wb.getSheetAt(0);\n XSSFRow row;\n XSSFCell cell;\n\n Iterator rows = sheet.rowIterator();\n// ss = new String[sheet.getLastRowNum()];\n sheet.getLastRowNum();\n while (rows.hasNext()) {\n InputDto input = new InputDto();\n row = (XSSFRow) rows.next();\n Iterator cells = row.cellIterator();\n if (row.getRowNum() == 0) {\n continue; //just skip the rows if row number is 0 or 1\n }\n String s = \"\";\n while (cells.hasNext()) {\n cell = (XSSFCell) cells.next();\n\n if (cell.getCellType() == HSSFCell.CELL_TYPE_STRING) {\n// System.out.print(cell.getStringCellValue() + \" \");\n s += cell.getStringCellValue().trim() + \"|\";\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {\n// System.out.print(cell.getNumericCellValue() + \" \");\n s += cell.getRawValue().trim() + \"|\";\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_BLANK) {\n// System.out.print(cell.getNumericCellValue() + \" \");\n s += cell.getStringCellValue().trim() + \"|\";\n }\n /*else {\n //U Can Handel Boolean, Formula, Errors\n }*/\n }\n if (!s.equals(\"\") && s.split(\"\\\\|\").length == 8) {\n input.setLoadName(s.split(\"\\\\|\")[6]);\n input.setLoadSize(s.split(\"\\\\|\")[1]);\n input.setLoadDate(s.split(\"\\\\|\")[0]);\n input.setLoadPath(s.split(\"\\\\|\")[4]);\n input.setLoadType(s.split(\"\\\\|\")[2]);\n input.setCicsName(s.split(\"\\\\|\")[5]);\n input.setRowId(s.split(\"\\\\|\")[7]);\n System.out.println(input.getRowId());\n inputDtos.add(input);\n// ss[i] = s;\n\n } else {\n throw new Exception(\"EXCEL DATA IS NOT COMPELETED\");\n }\n i++;\n }\n\n return inputDtos;\n }", "Path getModBookFilePath();", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser chooser = new JFileChooser();\r\n\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\r\n\t\t\t\t\t\t\"Excel Files\", // 파일 이름에 창에 출력될 문자열\r\n\t\t\t\t\t\t\"xls\"); // 파일 필터로 사용되는 확장자. *.xml 만 나열됨\r\n\t\t\t\tchooser.setFileFilter(filter); // 파일 다이얼로그에 파일 필터 설정\r\n\t\t\t\tchooser.setMultiSelectionEnabled(false);//다중 선택 불가\r\n\r\n\t\t\t\t// 파일 다이얼로그 출력\r\n\t\t\t\tint ret = chooser.showOpenDialog(null);\r\n\t\t\t\tif (ret != JFileChooser.APPROVE_OPTION) { // 사용자가 창을 강제로 닫았거나 취소\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 버튼을 누른 경우\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"파일을 선택하지 않았습니다\", \"경고\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// 사용자가 파일을 선택하고 \"열기\" 버튼을 누른 경우\r\n\t\t\t\tString readFilePath = chooser.getSelectedFile().getPath(); // 파일 경로명을 알아온다.\t\t\t\t\r\n\t\t\t\tShowPatientInfo_K showPatientInfo = new ShowPatientInfo_K(readFilePath);\r\n\t\t\t}" ]
[ "0.68498826", "0.6325387", "0.61913884", "0.6004878", "0.58654", "0.5818627", "0.58176714", "0.5742719", "0.57207495", "0.56764597", "0.56563896", "0.56293344", "0.5610383", "0.55703795", "0.55551124", "0.55549544", "0.55393165", "0.55235946", "0.54567415", "0.54347605", "0.5428322", "0.53959334", "0.5391476", "0.5377854", "0.535763", "0.5347438", "0.5344258", "0.5326947", "0.5271895", "0.52600235", "0.5240019", "0.52328366", "0.520765", "0.52022594", "0.5201998", "0.51971895", "0.51850986", "0.5178369", "0.51742905", "0.5168332", "0.51405156", "0.51320946", "0.5122919", "0.5122114", "0.5114644", "0.5108828", "0.5105642", "0.50931996", "0.50902736", "0.50897527", "0.50683135", "0.5050783", "0.5044753", "0.5037888", "0.5036301", "0.5034451", "0.5032927", "0.50135595", "0.50016737", "0.49933112", "0.49901247", "0.49852607", "0.49818328", "0.4963413", "0.49588004", "0.4954933", "0.4949537", "0.49485537", "0.49485302", "0.4934212", "0.49329978", "0.4932598", "0.49203807", "0.49154985", "0.4912502", "0.49025267", "0.49012792", "0.49008852", "0.48935437", "0.48895156", "0.48871404", "0.48862547", "0.4881937", "0.48719376", "0.48701844", "0.4866625", "0.4862051", "0.4856685", "0.4856442", "0.4855405", "0.48524383", "0.48493904", "0.48448572", "0.48393217", "0.48357004", "0.482264", "0.48163918", "0.48092654", "0.47986394", "0.47985208", "0.47954905" ]
0.0
-1
Creates a CSV file from an existing .xls file.
public void echoAsCSV(String path) { try { excel2csv.echoAsCSV(path); } catch (Exception e) { e.printStackTrace(); JOptionPane.showMessageDialog(this, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CSV createCSV();", "void writeExcel(File newFile) throws Exception;", "public void createCSV() {\n\t\t// Need to integrate CSV calling logic\n\t}", "public ValidationInfo createCsv() {\n LocaleModule lm = LocaleManager.getInstance().getModule(LocaleModuleResource.Main);\n\n ValidationInfo vi = new ValidationInfo();\n if (_rows == null || _rows.size() == 0) {\n vi.setMessageWarning(lm.getString(\"general_export_nothing\"));\n return vi;\n }\n\n String fullFilePath = getFileName();\n\n StringBuilder sb = new StringBuilder();\n\n //create header\n String headerRow = _rows.get(0).createCsvRow(true);\n\n sb.append(headerRow + System.lineSeparator());\n\n try {\n //create rows\n for (Exportable e : _rows) {\n String rowString = e.createCsvRow(false);\n sb.append(rowString + System.lineSeparator());\n }\n\n //Output\n String strContent = sb.toString();\n Utils.writeFile(strContent, fullFilePath);\n\n vi.setMessageSuccess(String.format(lm.getString(\"general_export_success\"),\n _rows.size(), fullFilePath));\n } catch (Exception ex) {\n vi.setMessageError(lm.getString(\"general_export_error\"));\n }\n\n //open\n Utils.openFolder(fullFilePath);\n\n return vi;\n }", "@Override\n public File importCSV(String query) {\n String retorno = executeQuery(query);\n File file = new File(\"export.csv\");\n try {\n file.createNewFile();\n if(file.exists()){\n try (Writer writer = new FileWriter(file)) {\n writer.append(retorno);\n writer.flush();\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n return file;\n }", "public void exportXLS() {\n\t\t// Create a Workbook\n\t\tWorkbook workbook = new HSSFWorkbook(); // new HSSFWorkbook() for\n\t\t\t\t\t\t\t\t\t\t\t\t// generating `.xls` file\n\n\t\t/*\n\t\t * CreationHelper helps us create instances of various things like DataFormat,\n\t\t * Hyperlink, RichTextString etc, in a format (HSSF, XSSF) independent way\n\t\t */\n\t\tCreationHelper createHelper = workbook.getCreationHelper();\n\n\t\t// Create a Sheet\n\t\tSheet sheet = workbook.createSheet(\"العقود\");\n\n\t\t// Create a Font for styling header cells\n\t\tFont headerFont = workbook.createFont();\n\t\theaderFont.setBold(true);\n\t\theaderFont.setFontHeightInPoints((short) 14);\n\t\theaderFont.setColor(IndexedColors.RED.getIndex());\n\n\t\t// Create a CellStyle with the font\n\t\tCellStyle headerCellStyle = workbook.createCellStyle();\n\t\theaderCellStyle.setFont(headerFont);\n\n\t\t// Create a Row\n\t\tRow headerRow = sheet.createRow(0);\n\n\t\tString[] columns = { \"الرقم\", \"رقم العقد \", \"تاريخ البداية\", \"تاريخ النهاية\", \"المستثمر\", \"حالة الفاتورة\" };\n\t\t// Create cells\n\t\tfor (int i = 0; i < columns.length; i++) {\n\t\t\tCell cell = headerRow.createCell(i);\n\t\t\tcell.setCellValue(columns[i]);\n\t\t\tcell.setCellStyle(headerCellStyle);\n\t\t}\n\n\t\t// Create Cell Style for formatting Date\n\t\tCellStyle dateCellStyle = workbook.createCellStyle();\n\t\tdateCellStyle.setDataFormat(createHelper.createDataFormat().getFormat(\"dd-MM-yyyy\"));\n\n\t\t// Create Other rows and cells with employees data\n\t\tint rowNum = 1;\n\t\tint num = 1;\n//\t\tfor (ContractDirect contObj : contractsDirectList) {\n//\t\t\tRow row = sheet.createRow(rowNum++);\n//\t\t\trow.createCell(0).setCellValue(num);\n//\t\t\trow.createCell(1).setCellValue(contObj.getContractNum());\n//\n//\t\t\tif (!tableHigriMode) {\n//\t\t\t\tCell date1 = row.createCell(2);\n//\t\t\t\tdate1.setCellValue(contObj.getStartContDate());\n//\t\t\t\tdate1.setCellStyle(dateCellStyle);\n//\t\t\t\tCell date2 = row.createCell(3);\n//\t\t\t\tdate2.setCellValue(contObj.getEndContDate());\n//\t\t\t\tdate2.setCellStyle(dateCellStyle);\n//\t\t\t} else {\n//\t\t\t\tCell date1 = row.createCell(2);\n//\t\t\t\tdate1.setCellValue(contObj.getStartDate());\n//\t\t\t\tdate1.setCellStyle(dateCellStyle);\n//\t\t\t\tCell date2 = row.createCell(3);\n//\t\t\t\tdate2.setCellValue(contObj.getEndDate());\n//\t\t\t\tdate2.setCellStyle(dateCellStyle);\n//\t\t\t}\n//\n//\t\t\tInvestor inv = (Investor) dataAccessService.findEntityById(Investor.class, contObj.getInvestorId());\n//\t\t\trow.createCell(4).setCellValue(inv.getName());\n//\t\t\trow.createCell(5).setCellValue(contObj.getPayStatusName());\n//\t\t\tnum++;\n//\t\t}\n\n\t\t// Resize all columns to fit the content size\n\t\tfor (int i = 0; i < columns.length; i++) {\n\t\t\tsheet.autoSizeColumn(i);\n\t\t}\n\n\t\t// Write the output to a file\n\n\t\ttry {\n\t\t\tString path = \"D:/العقود.xls\";\n\t\t\tFileOutputStream fileOut = new FileOutputStream(path);\n\t\t\tworkbook.write(fileOut);\n\t\t\tfileOut.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\t\ttry {\n\n\t\t\tworkbook.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\t// Closing the workbook\n\n\t}", "public void testCreateNewFile() {\n List<SheetDataDto> data = new ArrayList<SheetDataDto>();\n RowDataDto headerRow = new RowDataDto();\n headerRow.getCells().add(new CellDataDto(\"Col 1\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 2\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 3\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 4\", CellDataTypeEnum.TEXT));\n\n SheetDataDto sheet1 = new SheetDataDto();\n sheet1.setName(\"First sheet\");\n sheet1.setHeaderRow(headerRow);\n\n RowDataDto row1 = new RowDataDto();\n row1.getCells().add(new CellDataDto(1d, CellDataTypeEnum.NUMBER));\n row1.getCells().add(new CellDataDto(\"IF(A2 > 0, \\\"1\\\", \\\"0\\\")\", CellDataTypeEnum.FORMULAR));\n row1.getCells().add(new CellDataDto(\"123456789\", CellDataTypeEnum.NUMBER));\n row1.getCells().add(new CellDataDto(new Date(), CellDataTypeEnum.DATE));\n\n sheet1.getRows().add(row1);\n data.add(sheet1);\n\n excelExportingService.exportToExcel(\"t1.xls\", data, false, ExcelFormatTypeEnum.XLS);\n excelExportingService.exportToExcel(\"t1.xlsx\", data, false, ExcelFormatTypeEnum.XLSX);\n }", "public void exportToCSV();", "public static void csvMake() throws ClassNotFoundException, SQLException, IOException{\n\t\tClass.forName(\"org.h2.Driver\");\n\t\tConnection conn = DriverManager.getConnection(DB, user, pass);\n\t\tCSV newFile = new CSV();\n\t\tnewFile.make(conn);\n\t\tconn.close();\n\t}", "void createCsv(String location);", "public void dataFileCreate() {\r\n\t\tString COMMA_DELIMITER = \",\";\r\n\t\tString NEW_LINE_SEPERATOR = \"\\n\";\r\n\t\tString FILE_HEADER = \"Title,First Name,Last Name,Email,Phone Number\";\r\n\t\ttry {\r\n\t\t\tList<Customer> dataList = new ArrayList<Customer>();\r\n\t\t\tdataList.add(\r\n\t\t\t\t\tnew Customer(title, customerFirstName, customerLastName, custromerEmailId, customerPhoneNumber));\r\n\r\n\t\t\tFileWriter fileWriter = new FileWriter(\"CustomerDetails.csv\");\r\n\t\t\tBufferedWriter bufferWriter = new BufferedWriter(fileWriter);\r\n\t\t\tbufferWriter.append(FILE_HEADER);\r\n\r\n\t\t\tfor (Customer c : dataList) {\r\n\t\t\t\tbufferWriter.write(NEW_LINE_SEPERATOR);\r\n\t\t\t\tbufferWriter.write(c.getTitle());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getFirstName());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getLastName());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(c.getEmailAddress());\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t\tbufferWriter.write(String.valueOf(c.getPhone()));\r\n\t\t\t\tbufferWriter.write(COMMA_DELIMITER);\r\n\t\t\t}\r\n\r\n\t\t\tbufferWriter.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 File createNewFile(String filename){\n try {\n File outputFile = new File(filename + \".csv\");\n\n //Creates File\n outputFile.createNewFile();\n\n return outputFile;\n\n } catch (IOException ex) {\n Logger.getLogger(CSVWriter.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n }", "void readExcel(File existedFile) throws Exception;", "public static void main(String[] args) throws IOException {\n write2Excel(new File(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\test.xls\"));\n }", "public void createXLS(String fileName){\r\n FileOutputStream fo = null;\r\n int totalColumns;\r\n try {\r\n WorkBookHandle h=new WorkBookHandle();\r\n WorkSheetHandle sheet1 = h.getWorkSheet(\"Sheet1\");\r\n \r\n int currentRow=1;\r\n char currentColumn;\r\n int underSessions;\r\n for(StudentResult i:(List<StudentResult>)results){\r\n if(results.indexOf(i)==0){\r\n sheet1.add(\"Register No.\", \"A1\");\r\n sheet1.add(\"Name of Student\", \"B1\");\r\n currentColumn='C';\r\n for(ExamResult j:i.subjectResults){\r\n sheet1.add(j.subCode, String.valueOf(currentColumn)+String.valueOf(currentRow));\r\n currentColumn++;\r\n }\r\n sheet1.add(\"SGPA\", String.valueOf(currentColumn)+String.valueOf(currentRow));\r\n currentColumn++;\r\n sheet1.add(\"No. of Under-sessions\", String.valueOf(currentColumn)+String.valueOf(currentRow));\r\n totalColumns=currentColumn;\r\n }\r\n \r\n currentRow++;\r\n sheet1.add(i.regNo,\"A\"+String.valueOf(currentRow));\r\n sheet1.add(i.studentName,\"B\"+String.valueOf(currentRow));\r\n currentColumn='C';\r\n underSessions=0;\r\n for(ExamResult j:i.subjectResults){\r\n sheet1.add(j.grade, String.valueOf(currentColumn)+String.valueOf(currentRow));\r\n if(MainFrame1.UNDER_SESION_GRADES.contains(j.grade)){\r\n underSessions++;\r\n } \r\n currentColumn++;\r\n }\r\n sheet1.add(i.averageGradePoint, String.valueOf(currentColumn)+String.valueOf(currentRow));\r\n currentColumn++;\r\n sheet1.add(underSessions, String.valueOf(currentColumn)+String.valueOf(currentRow)); \r\n }\r\n fo = new FileOutputStream(\"Result.xls\");\r\n h.writeBytes(fo);\r\n fo.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(SpreadSheetCreator.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (WorkSheetNotFoundException ex) {\r\n Logger.getLogger(SpreadSheetCreator.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n try {\r\n fo.close();\r\n } catch (IOException ex) {\r\n Logger.getLogger(SpreadSheetCreator.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }", "public static File createFile(String filename){\n try {\n File outputFile = new File(filename + \".csv\");\n\n //Prevent File Overwrite\n int tmp = 1;\n while (outputFile.exists()){\n outputFile = new File(filename + \".csv\" + \".\" + tmp);\n tmp++;\n }\n\n //Creates File\n outputFile.createNewFile();\n\n return outputFile;\n\n } catch (IOException ex) {\n Logger.getLogger(CSVWriter.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n }", "public static void main(String[] args) {\n String filePath=\"C:\\\\down\\\\gogo.xls\";\r\n \r\n HSSFWorkbook workbook = new HSSFWorkbook(); // 새 엑셀 생성\r\n HSSFSheet sheet = workbook.createSheet(\"sheet1\"); // 새 시트(Sheet) 생성\r\n HSSFRow row = sheet.createRow(0); // 엑셀의 행은 0번부터 시작\r\n HSSFCell cell = row.createCell(0); // 행의 셀은 0번부터 시작\r\n cell.setCellValue(\"data\"); //생성한 셀에 데이터 삽입\r\n try {\r\n FileOutputStream fileoutputstream = new FileOutputStream(\"C:\\\\down\\\\gogo.xls\");\r\n workbook.write(fileoutputstream);\r\n fileoutputstream.close();\r\n System.out.println(\"엑셀파일생성성공\");\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n System.out.println(\"엑셀파일생성실패\");\r\n }\r\n\r\n}", "public void writeDataToCsv(String filename , ArrayList<TestDataInstance> inputData) {\n \n String header = \"\";\n \n File outFile = null;\n int dataCount = 0;\n try {\n outFile = new File(filename);\n \n FileWriter fw = new FileWriter(outFile);\n \n BufferedWriter bw = new BufferedWriter(fw);\n \n bw.write(header);\n \n for(TestDataInstance data : inputData) {\n bw.newLine();\n bw.write(data.toSamiamCsvString());\n dataCount++;\n }\n \n System.out.println(\"Written \" + dataCount + \" rows of data to SAMIAM CSV format @ \" + filename);\n \n } catch(Exception e) {\n e.printStackTrace();\n }\n \n }", "public void testExportToStream() throws FileNotFoundException {\n List<SheetDataDto> data = new ArrayList<SheetDataDto>();\n RowDataDto headerRow = new RowDataDto();\n headerRow.getCells().add(new CellDataDto(\"Col 1\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 2\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 3\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 4\", CellDataTypeEnum.TEXT));\n\n SheetDataDto sheet1 = new SheetDataDto();\n sheet1.setName(\"First sheet\");\n sheet1.setHeaderRow(headerRow);\n\n RowDataDto row1 = new RowDataDto();\n row1.getCells().add(new CellDataDto(1d, CellDataTypeEnum.NUMBER));\n row1.getCells().add(new CellDataDto(\"IF(A2 > 0, \\\"1\\\", \\\"0\\\")\", CellDataTypeEnum.FORMULAR));\n row1.getCells().add(new CellDataDto(\"123456789\", CellDataTypeEnum.NUMBER));\n row1.getCells().add(new CellDataDto(new Date(), CellDataTypeEnum.DATE));\n\n sheet1.getRows().add(row1);\n data.add(sheet1);\n\n OutputStream out1 = new FileOutputStream(new File(\"t2-out.xls\"));\n excelExportingService.exportToExcel(null, out1, data, ExcelFormatTypeEnum.XLS);\n\n InputStream in2 = getClass().getResourceAsStream(\"/exportData/t2-in.xlsx\");\n OutputStream out2 = new FileOutputStream(new File(\"t2-out.xlsx\"));\n sheet1.setName(\"Append Sheet\");\n sheet1.setSheetIndex(0);\n excelExportingService.exportToExcel(in2, out2, data, ExcelFormatTypeEnum.XLSX);\n }", "public void openCSVStream() {\n\t\ttry {\n\t\t\twriter = new CSVWriter(new FileWriter(getCSVFolder() + File.separator + getFileName() + \".csv\"), ',');\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tprotected File generateReportFile() {\r\n\r\n\t\tFile tempFile = null;\r\n\r\n\t\tFileOutputStream fileOut = null;\r\n\t\ttry {\r\n\t\t\ttempFile = File.createTempFile(\"tmp\", \".\" + this.exportType.getExtension());\r\n\t\t\tfileOut = new FileOutputStream(tempFile);\r\n\t\t\tthis.workbook.write(fileOut);\r\n\t\t} catch (final IOException e) {\r\n\t\t\tLOGGER.warn(\"Converting to XLS failed with IOException \" + e);\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\tif (tempFile != null) {\r\n\t\t\t\ttempFile.deleteOnExit();\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tif (fileOut != null) {\r\n\t\t\t\t\tfileOut.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (final IOException e) {\r\n\t\t\t\tLOGGER.warn(\"Closing file to XLS failed with IOException \" + e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn tempFile;\r\n\t}", "public static void writeNewCSV(Calendar cal) {\n\n try {\n\n BufferedWriter bw = null;\n\n String fileString = \"P5Calendar.csv\";\n String fileLine = \"\";\n\n FileWriter fw = new FileWriter(fileString, true);\n bw = new BufferedWriter(fw);\n\n ArrayList<Activity> activities = cal.getActivities();\n\n int lastElement = activities.size();\n Activity activity = activities.get(lastElement - 1);\n bw.write(activity.Year + \",\" + activity.Month + \",\" + activity.Name + \",\" + activity.Roles.name + \" \" + \"(\"\n + activity.Roles.subRole + \")\" + \"\\n\");\n\n bw.close();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n }", "public void createCsvFile(String fileName) { \n \n try { \n \n fileWriter = new FileWriter(fileName); \n \n //Write the CSV file header \n fileWriter.append(FILE_HEADER.toString()); \n \n //Add a new line separator after the header \n fileWriter.append(NEW_LINE_SEPARATOR); \n \n System.out.println(\"CSV file was created successfully !!!\"); \n \n } catch (Exception e) { \n \n System.out.println(\"Error in CsvFileWriter !!!\"); \n e.printStackTrace(); \n \n } finally { \n \n try {\n \n fileWriter.flush(); \n //fileWriter.close(); \n \n } catch (IOException e) { \n \n System.out.println(\"Error while flushing/closing fileWriter !!!\"); \n e.printStackTrace(); \n } \n \n } \n \n}", "public void outputToCSV() throws FileNotFoundException, UnsupportedEncodingException {\n PrintWriter writer = new PrintWriter(\"test_data.csv\", \"UTF-8\");\n\n //For every object in array list, print surname, initials and extension, separated by commmas\n for (int i=0; i<toArrayList().size(); i++) {\n writer.println(toArrayList().get(i).getSurname() + \",\" + toArrayList().get(i).getInitials() + \",\" +\n toArrayList().get(i).getExtension());\n }\n writer.close();\n }", "public void generateCSV(numList l) {\r\n\t\tFile file = new File(\"E:\\\\altruism results/\" + filename + \".csv\"); //the storage path of the csv file\r\n\t\ttry {\r\n\t\t\tif (file.exists() == false) {\r\n\t\t\t\tfile.createNewFile();\r\n\t\t\t}\r\n\t\t\tFileWriter fw = new FileWriter(file);\r\n\t\t\tBufferedWriter writer = new BufferedWriter(fw);\r\n\t\t\twriter.write(\"altruism,selfish\\r\\n\");\r\n\t\t\tfor (int i = 0; i < numList.TIME; i++) {\r\n\t\t\t\twriter.write(l.aList[i] + \",\");\r\n\t\t\t\twriter.write(l.sList[i] + \"\\r\\n\");\r\n\t\t\t}\r\n\r\n\t\t\twriter.flush();\r\n\t\t\twriter.close();\r\n\t\t\tfw.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main (String[] args) throws FileNotFoundException, IOException {\n\t\tFile fil1 = new File(\"C:\\\\Users\\\\Vasanth\\\\Desktop\\\\parse.txt\");\r\n\t\tHashMap<String, String> map = new HashMap<String, String>();\r\n\t\tString[] parts;\r\n\t\tScanner myReader = new Scanner(fil1);\r\n\t\twhile (myReader.hasNextLine())\r\n\t\t{\r\n\t\t\tString data = myReader.nextLine();\r\n\t\t\tif (!data.contains(\"record\"))\r\n\t\t\t{\r\n\t\t\t\tdata.replaceAll(\"^\\\"|\\\"$\", \"\");\r\n\t\t\t\tparts = data.split(\" +\");\t\t\t\r\n\t\t\t\tString key = parts[0].trim();\r\n\t\t\t\tString value = parts[1].trim();\t\t\t\t\r\n\t\t\t\tmap.put(key, value);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Ignoring as it doesnt hold a key value pair\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Writing Hashmap to excel & csv\r\n\t\tXSSFWorkbook wb = new XSSFWorkbook();\r\n\t\tXSSFSheet sh = wb.createSheet(\"Test Data\");\r\n\t\tint rowno = 0;\t\r\n\t\tfor(Map.Entry entry:map.entrySet())\r\n\t\t{\r\n\t\t\tXSSFRow row = sh.createRow(rowno++);\r\n\t\t\trow.createCell(0).setCellValue((String)entry.getKey());\r\n\t\t\trow.createCell(1).setCellValue((String)entry.getValue());\r\n\t\t}\t\t\r\n\t\twb.write(new FileOutputStream(\".\\\\Datafiles\\\\hashtoexcel.xlsx\"));\r\n\t\twb.write(new FileOutputStream(\".\\\\Datafiles\\\\hashexcel.csv\")); \r\n\t\twb.close();\r\n\t\t}", "private void gerarArquivoExcel() {\n\t\tFile currDir = getPastaParaSalvarArquivo();\n\t\tString path = currDir.getAbsolutePath();\n\t\t// Adiciona ao nome da pasta o nome do arquivo que desejamos utilizar\n\t\tString fileLocation = path.substring(0, path.length()) + \"/relatorio.xls\";\n\t\t\n\t\t// mosta o caminho que exportamos na tela\n\t\ttextField.setText(fileLocation);\n\n\t\t\n\t\t// Criação do arquivo excel\n\t\ttry {\n\t\t\t\n\t\t\t// Diz pro excel que estamos usando portguês\n\t\t\tWorkbookSettings ws = new WorkbookSettings();\n\t\t\tws.setLocale(new Locale(\"pt\", \"BR\"));\n\t\t\t// Cria uma planilha\n\t\t\tWritableWorkbook workbook = Workbook.createWorkbook(new File(fileLocation), ws);\n\t\t\t// Cria uma pasta dentro da planilha\n\t\t\tWritableSheet sheet = workbook.createSheet(\"Pasta 1\", 0);\n\n\t\t\t// Cria um cabeçario para a Planilha\n\t\t\tWritableCellFormat headerFormat = new WritableCellFormat();\n\t\t\tWritableFont font = new WritableFont(WritableFont.ARIAL, 16, WritableFont.BOLD);\n\t\t\theaderFormat.setFont(font);\n\t\t\theaderFormat.setBackground(Colour.LIGHT_BLUE);\n\t\t\theaderFormat.setWrap(true);\n\n\t\t\tLabel headerLabel = new Label(0, 0, \"Nome\", headerFormat);\n\t\t\tsheet.setColumnView(0, 60);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\theaderLabel = new Label(1, 0, \"Idade\", headerFormat);\n\t\t\tsheet.setColumnView(0, 40);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\t// Cria as celulas com o conteudo\n\t\t\tWritableCellFormat cellFormat = new WritableCellFormat();\n\t\t\tcellFormat.setWrap(true);\n\n\t\t\t// Conteudo tipo texto\n\t\t\tLabel cellLabel = new Label(0, 2, \"Elcio Bonitão\", cellFormat);\n\t\t\tsheet.addCell(cellLabel);\n\t\t\t// Conteudo tipo número (usar jxl.write... para não confundir com java.lang.number...)\n\t\t\tjxl.write.Number cellNumber = new jxl.write.Number(1, 2, 49, cellFormat);\n\t\t\tsheet.addCell(cellNumber);\n\n\t\t\t// Não esquecer de escrever e fechar a planilha\n\t\t\tworkbook.write();\n\t\t\tworkbook.close();\n\n\t\t} catch (IOException e1) {\n\t\t\t// Imprime erro se não conseguir achar o arquivo ou pasta para gravar\n\t\t\te1.printStackTrace();\n\t\t} catch (WriteException e) {\n\t\t\t// exibe erro se acontecer algum tipo de celula de planilha inválida\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public FileData export() {\n\t\ttry(Workbook workbook = createWorkbook();\n\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();) {\n\t\t\tsheet = workbook.createSheet();\n\t\t\tcreateRows();\n\t\t\tworkbook.write(outputStream);\n\t\t\treturn getExportedFileData(outputStream.toByteArray());\n\t\t} catch (IOException ex) {\n\t\t\tthrow new RuntimeException(\"error while exporting file\",ex);\n\t\t}\n\t}", "public void CreateTestResultFile()\n\t{ \n\t\tDate dNow = new Date( );\n\t\tSimpleDateFormat ft =new SimpleDateFormat (\"MMddYYYY\");\n\t\t\n\t\ttry \n\t\t{\n\t\t\tFileOutputStream fos = new FileOutputStream(System.getProperty(\"user.dir\")+\"//PG HealthCheck List_\"+ft.format(dNow)+\".xls\");\n\t HSSFWorkbook workbook = new HSSFWorkbook();\n\t HSSFSheet worksheet = workbook.createSheet(\"PG Functionality - Country\");\n\t HSSFRow row1 = worksheet.createRow(0);\n\t row1.createCell(0).setCellValue(\"Availability of Data\");\n\t HSSFRow row = worksheet.createRow(1);\n\t row.createCell(0).setCellValue(\"Testcase\");\n\t row.createCell(1).setCellValue(\"TestRunStatus\");\n\t row.createCell(2).setCellValue(\"Remarks\");\n\t workbook.write(fos);\n\t fos.close();\n\t \t \n\t } \n\t\tcatch (Exception e)\n\t {\n\t \te.printStackTrace();\n\t }\n\t\t\t\n\t\t\n\t}", "public static void writeCSV(Calendar cal) {\n\n try {\n\n BufferedWriter bw = null;\n\n String fileString = \"P5Calendar.csv\";\n String fileLine = \"\";\n\n FileWriter fw = new FileWriter(fileString, false);\n bw = new BufferedWriter(fw);\n\n ArrayList<Activity> activities = cal.getActivities();\n\n for (int j = 0; j < 1; j++) {\n bw.write(\"Year\" + \",\" + \"Month\" + \",\" + \"Activity\" + \",\" + \"Role\" + \"\\n\");\n }\n\n for (int i = 0; i < activities.size(); i++) {\n Activity activity = activities.get(i);\n bw.append(activity.Year + \",\" + activity.Month + \",\" + activity.Name + \",\" + activity.Roles);\n }\n\n bw.close();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n\n }", "private static void createCSV(String filename, ArrayList<Long> sizes, ArrayList<Long> times){\n File csv = new File(\"\"+filename);\n try {\n if(csv.createNewFile()) {\n PrintWriter file = new PrintWriter(new FileWriter(csv));\n file.print(\"Size (n)\");\n for (Long size : sizes)\n file.print(\",\" + size);\n file.print(\"\\nTimes (ms)\");\n for(Long time:times)\n file.print(\",\"+time);\n file.println();\n file.close();\n\n } else {\n Scanner fileReader = new Scanner(csv);\n String currentSizes = fileReader.nextLine();\n int size=currentSizes.split(\",\").length-1;\n if(size<sizes.size()){\n for(int i=size;i<sizes.size();i++)\n currentSizes+=\",\"+sizes.get(i);\n currentSizes+=\"\\n\";\n while(fileReader.hasNextLine())\n currentSizes+=fileReader.nextLine()+\"\\n\";\n FileWriter writer = new FileWriter(csv);\n writer.write(currentSizes);\n writer.close();\n }\n\n PrintWriter file = new PrintWriter(new FileWriter(csv,true));\n file.print(\"Times (ms)\");\n for(Long time:times)\n file.print(\",\"+time);\n file.println();\n file.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void createCSVOutput() {\n\t\tFile file = new File(\"rejectedByEsteticalRestructurationRejector.csv\"); \n\t\t\n\t\t//test if the file already exist\n\t\tif(file.exists()) {\n\t\t\tSystem.out.println(\"le fichier rejectedByEstheticalRestructurationRejector.csv existe deja\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\t//create the different column for the CSV file\n\t\tString[] titles = { \"before\" , \"after\", \"id\"};\n\t\ttry {\n\t\t\toutputFile = new CsvFileWriter(file, '\\t', titles);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "@Override\n\tpublic void exportToCSV() {\n\n\t}", "public static void main(String args[]) throws WorkSheetNotFoundException, CellNotFoundException, FileNotFoundException, IOException{\r\n /*\r\n //Test 1 - Creating empty XLS\r\n FileOutputStream fo=new FileOutputStream(\"Result.xls\");\r\n WorkBookHandle h=new WorkBookHandle();\r\n WorkSheetHandle y = h.getWorkSheet(\"Sheet1\");\r\n y.add(\"aa\", \"A1\");\r\n h.writeBytes(fo);\r\n fo.close();\r\n */ \r\n \r\n }", "public FileOutputStream generateFinance14Report(List<Finance14Dto> Finance14DtoList,String fileName) throws IOException, ClassNotFoundException, SQLException {\n\t\tFile file=new File(fileName);\n\n\t\tString sheetName = \"Sheet1\";// name of sheet\n\n//\t\tResultSet resultSet = getDatabase(villageId,yearmonth);\n\t\tXSSFWorkbook workbook = new XSSFWorkbook(); \n\t XSSFSheet spreadsheet = workbook\n\t \t .createSheet(sheetName);\n\t \t XSSFRow row=spreadsheet.createRow(1);\n\t \t /* XSSFRow row1 = spreadsheet.createRow(2);*/\n\t \t XSSFCell cell;\n\t \t cell=row.createCell(1);\n\t \t cell.setCellValue(\"vid\");\n\t \t cell=row.createCell(2);\n\t \t cell.setCellValue(\"month\");\n\t \t cell=row.createCell(3);\n\t \t cell.setCellValue(\"year\");\n\t \t cell=row.createCell(4);\n\t \t cell.setCellValue(\"Total work\");\n\t \t cell=row.createCell(5);\n\t \t cell.setCellValue(\"Works approved\");\n\t \t cell=row.createCell(6);\n\t \t cell.setCellValue(\"Project not started\");\n\t \t cell=row.createCell(7);\n\t \t cell.setCellValue(\"Progress\");\n\t \t cell=row.createCell(8);\n\t \t cell.setCellValue(\"Completed\");\n\t \t cell=row.createCell(9);\n\t \t cell.setCellValue(\"Grant allocated\");\n\t \t cell=row.createCell(10);\n\t \t cell.setCellValue(\"Amount spent\");\n\t \t /* cell=row.createCell(11);\n\t \t cell.setCellValue(\"entry date\");*/\n\t \t \n\t \t int i=2;\n\t \t for(Finance14Dto finance14Dto:Finance14DtoList)\n//\t \t while(resultSet.next())\n\t \t {\n\t \t row=spreadsheet.createRow(i);\n\t \t /* row1=spreadsheet.createRow(i+1);*/\n\t \t cell=row.createCell(1);\n\t \t cell.setCellValue(finance14Dto.getVillageId());\n\t \t cell=row.createCell(2);\n\t \t cell.setCellValue(finance14Dto.getMonth());\n\t \t cell=row.createCell(3);\n\t \t cell.setCellValue(finance14Dto.getYear());\n//\t \t /* spreadsheet.addMergedRegion(new CellRangeAddress(3, 3, 4, 4));*/\n\t \t cell=row.createCell(4);\n\t \t cell.setCellValue(finance14Dto.getTotalWork());\n\t \t cell=row.createCell(5);\n\t \t cell.setCellValue(finance14Dto.getWorksApproved());\n\t \t cell=row.createCell(6);\n\t \t cell.setCellValue(finance14Dto.getProjectNotStarted());\n\t \t cell=row.createCell(7);\n\t \t cell.setCellValue(finance14Dto.getProgress());\n\t \t cell=row.createCell(8);\n\t \t cell.setCellValue(finance14Dto.getCompleted());\n\t \t cell=row.createCell(9);\n\t \t cell.setCellValue(finance14Dto.getGrantAllocated());\n\t \t cell=row.createCell(10);\n\t \t cell.setCellValue(finance14Dto.getAmountSpent());\n\t \t /*cell=row.createCell(11);\n\t \t cell.setCellValue(finance14Dto.getEntryDate());*/\n\t \t i++;\n\t \t }\n\t \t FileOutputStream out = new FileOutputStream(\n\t \t file);\n\t \t workbook.write(out);\n\t \t out.close();\n\t \t System.out.println(\n\t \t \"exceldatabase.xlsx written successfully\");\n\t \t \n\t \treturn out;\n\t}", "private void writeCSVToFile(List<String[]> dataRows, String filepath) {\n try {\n FileWriter output = new FileWriter(filepath);\n CSVWriter csvWriter = new CSVWriter(output);\n\n csvWriter.writeAll(dataRows);\n\n csvWriter.close();\n\n System.out.println(\"Your order has been succesfully sent to Foodora\");\n\n } catch (IOException e) {\n System.out.println(\"Could not write to Foodora output file\");\n }\n\n }", "private void storeToCsvFile( final File aSelectedFile, final Asm45DataSet aAnalysisResult )\n {\n try\n {\n final CsvExporter exporter = ExportUtils.createCsvExporter( aSelectedFile );\n\n exporter.setHeaders( \"index\", \"clocks\", \"block\", \"address\", \"value\", \"bus grant\", \"type\", \"event\" );\n\n final List<Asm45Data> dataSet = aAnalysisResult.getData();\n for ( int i = 0; i < dataSet.size(); i++ )\n {\n final Asm45Data ds = dataSet.get( i );\n exporter.addRow( Integer.valueOf( i ), Integer.valueOf( ds.getClocks() ),\n StringUtils.integerToHexString( ds.getBlock(), 2 ), StringUtils.integerToHexString( ds.getAddress(), 4 ),\n StringUtils.integerToHexString( ds.getValue(), 4 ), ds.getBusGrant() ? \"X\" : \"-\", ds.getType(),\n ds.getEvent() );\n }\n\n exporter.close();\n }\n catch ( final IOException exception )\n {\n // Make sure to handle IO-interrupted exceptions properly!\n if ( !HostUtils.handleInterruptedException( exception ) )\n {\n LOG.log( Level.WARNING, \"CSV export failed!\", exception );\n }\n }\n }", "public void guardarArchivoXLS(HSSFWorkbook libro)\r\n {\r\n JFileChooser fileChooserAlumnos = new JFileChooser();\r\n \r\n //filtro para ver solo archivos .xls\r\n fileChooserAlumnos.addChoosableFileFilter(new FileNameExtensionFilter(\"todos los archivos *.XLS\", \"xls\",\"XLS\"));\r\n int seleccion = fileChooserAlumnos.showSaveDialog(null);\r\n \r\n try{\r\n \t//comprueba si ha presionado el boton de aceptar\r\n if (seleccion == JFileChooser.APPROVE_OPTION){\r\n File archivoJFileChooser = fileChooserAlumnos.getSelectedFile();\r\n FileOutputStream archivo = new FileOutputStream(archivoJFileChooser+\".xls\");\r\n libro.write(archivo); \r\n JOptionPane.showMessageDialog(null,\"Se guardó correctamente el archivo\", \"Guardado exitoso!\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n }catch (Exception e){\r\n JOptionPane.showMessageDialog(null,\"Error al guardar el archivo!\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public static void writeInFile(String fileName,String sheetName, String cntry, String menu,String subMenu,String subMenu_1,String ActualEng_Title,String Overridden_Title,String xmlURL) throws IOException {\n\r\n\t\tFile myFile = new File(\"./\" + fileName);\r\n\r\n\t\t//Create an object of FileInputStream class to read excel file\r\n\r\n\t\tFileInputStream inputStream = new FileInputStream(myFile);\r\n\r\n\t\tWorkbook myWorkbook = null;\r\n\r\n\t\t//Find the file extension by spliting file name in substring and getting only extension name\r\n\r\n\t\tString fileExtensionName = fileName.substring(fileName.indexOf(\".\"));\r\n\r\n\t\t//Check condition if the file is xlsx file\t\r\n\r\n\t\tif(fileExtensionName.equals(\".xlsx\")){\r\n\r\n\t\t\t//If it is xlsx file then create object of XSSFWorkbook class\r\n\r\n\t\t\tmyWorkbook = new XSSFWorkbook(inputStream);\r\n\t\t\tSystem.out.println(\"Extension of file \"+fileName +\" is .xlsx\");\r\n\r\n\t\t}\r\n\r\n\t\t//Check condition if the file is xls file\r\n\r\n\t\telse if(fileExtensionName.equals(\".xls\")){\r\n\r\n\t\t\t//If it is xls file then create object of XSSFWorkbook class\r\n\r\n\t\t\tmyWorkbook = new HSSFWorkbook(inputStream);\r\n\t\t\tSystem.out.println(\"Extension of file \"+fileName +\" is .xlx\");\r\n\r\n\t\t}\r\n\r\n\t\t//Read sheet inside the workbook by its name\r\n\r\n\t\tSheet mySheet = myWorkbook.getSheet(sheetName);\r\n\r\n\t\t//Find number of rows in excel file\r\n\r\n\t\tint rowCount = mySheet.getLastRowNum() - mySheet.getFirstRowNum();\r\n\r\n\r\n\t\tRow row = mySheet.getRow(0);\r\n\r\n\t\t//Create a new row and append it at last of sheet\r\n\r\n\t\tRow newRow = mySheet.createRow(rowCount+1);\r\n\r\n\r\n\t\t//Create a loop over the cell of newly created Row\r\n\t\tfor(int colCnt=0;colCnt<=6;colCnt++)\r\n\t\t{ \r\n\t\t\tCell cell = newRow.createCell(colCnt);\r\n\r\n\t\t\tif(colCnt==0)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(cntry);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==1)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(menu);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==2)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(subMenu);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==3)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(subMenu_1);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==4)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(ActualEng_Title);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==5)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(Overridden_Title);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==6)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(xmlURL);\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* for(int j = 0; j < row.getLastCellNum(); j++){\r\n\r\n\t //Fill data in row\r\n\r\n\t Cell cell = newRow.createCell(j);\r\n\r\n\t cell.setCellValue(\"test\");\r\n\r\n\t }*/\r\n\r\n\t\t//Close input stream\r\n\r\n\t\tinputStream.close();\r\n\r\n\t\t//Create an object of FileOutputStream class to create write data in excel file\r\n\r\n\t\tFileOutputStream opStream = new FileOutputStream(myFile);\r\n\r\n\t\t//write data in the excel file\r\n\r\n\t\tmyWorkbook.write(opStream);\r\n\t\t//close output stream\r\n\t\topStream.close();\r\n\t\t//\tfor(int i = 0;i<=objectArr.length-1;i++ ){\r\n\r\n\t\t// Cell cell = row.createCell(i);\r\n\t\t// cell.setCellValue(objectArr[i]);\r\n\r\n\t\t// }\r\n\r\n\t\t//File myFile = new File(\"./Controller.xlsx\");\r\n\t\t// FileOutputStream os = new FileOutputStream(myFile);\r\n\t\t//\tmyWorkBook.write(os);\r\n\t\tSystem.out.println(\"Controller Sheet Creation finished ...\");\r\n\t\t//\tos.close();\r\n\r\n\r\n\t}", "private static void generateCsvFileWithFinalData(File path) // String sFileName\n {\n String COMMA_DELIMITER = \",\";\n String NEW_LINE_SEPARATOR = \"\\n\";\n try\n {\n // String path to our created output data file\n String finalFilePath = String.valueOf(path.getParent()) + \"\\\\test.csv\";\n FileWriter writer = new FileWriter(finalFilePath);\n\n for (Player player : sortedFinalPlayerList) {\n writer.append(player.getLastName());\n writer.append(COMMA_DELIMITER);\n writer.append(player.getFirstName());\n writer.append(COMMA_DELIMITER);\n writer.append(player.getCountry());\n writer.append(COMMA_DELIMITER);\n writer.append(String.valueOf(player.getLongCommSubsCounter()));\n writer.append(NEW_LINE_SEPARATOR);\n }\n\n //generate whatever data you want\n writer.flush();\n writer.close();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "public static void saveExcel() {\r\n\t\ttry {\r\n\t\t\tFileOutputStream fileOut = new FileOutputStream(Constant.EXCEL_PATH);\r\n\t\t\tworkBook.write(fileOut);\r\n\t\t\tfileOut.flush();\r\n\t\t\tfileOut.close();\r\n\t\t} catch (FileNotFoundException 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}", "public static void convertLasToCsv(LasFile lasFile, File destination) throws IOException\n {\n List<LasCurve> curves = lasFile.getCurves();\n\n List<Unit> units = new ArrayList<Unit>();\n List<String> curveNames = new ArrayList<String>();\n List<List<Object>> columns = new ArrayList<List<Object>>();\n\n for (LasCurve curve : curves) {\n String curveName = curve.getName();\n Unit from = um.findUnit(curve.getUnit());\n curveNames.add(curveName);\n units.add(from);\n\n Mnemonic curveDefaults = Mnemonic.get(curveName);\n Unit to = null;\n if (curveDefaults != null) {\n to = curveDefaults.getUnit();\n }\n List<Object> column = new ArrayList<Object>();\n\n for (int i = 0; i < curve.getNValues(); i++) {\n Object value = curve.getValue(i);\n if (value == null) {\n column.add(null);\n continue;\n }\n Double val = Double.parseDouble(value.toString());\n if (from != null && to != null && !from.equals(to))\n val = UnitManager.convert(from, to, val);\n column.add(val);\n }\n\n columns.add(column);\n }\n\n CSV csv = new CSV(curveNames, columns);\n csv.save(destination);\n }", "public void csv() throws IOException {\n\t\t\n\t\tSystem.out.println(); //spacing\\\n\t\tFileWriter f;\n\t\t\n\t\tif (bundle.getString(\"csvName\").endsWith(\".csv\")) {\n\t\t\tf = new FileWriter(bundle.getString(\"csvName\"));\n\t\t}\n\t\t\n\t\telse {\n\t\t\tf = new FileWriter(bundle.getString(\"csvName\") + \".csv\");\n\t\t}\n\t\t\n\t\tPrintWriter p = new PrintWriter(f);\n\t\tObject[][] input = {revisionsToo, flowOfTime};\n\t\tCSVWork(input, p, f);\n\t\t\n\t\tObject[][] nextInput = {revisions, ratings};\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tnextInput[1] = irrelevants;\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tnextInput[1] = relevants;\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tnextInput[0] = intervals;\n\t\tnextInput[1] = commits;\n\t\tCSVWork(nextInput, p, f);\n\t\t\n\t\tspecialCSV(existsHere, p);\n\t\t\n\t\tp.flush();\n\t\tp.close();\n\t\tf.close();\n\t}", "public static void writeCSV(Collection<? extends CSVable> src, File to) throws IOException {\r\n\t\tfinal String SYSTEM_LINE_END = System.getProperty(\"line.separator\");\r\n\t\t\r\n\t\tFileWriter fw = null;\r\n\t\tBufferedWriter bw = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Create the file if it doesn't exist yet\r\n\t\t\tif ( ! to.exists() ) {\r\n\t\t\t\tto.createNewFile();\r\n\t\t\t}\r\n\r\n\t\t\tfw = new FileWriter(to.getAbsoluteFile(), false);\r\n\t\t\tbw = new BufferedWriter(fw);\r\n\r\n\t\t\tsynchronized (src) {\r\n\t\t\t\tfor ( CSVable obj : src ) {\r\n\t\t\t\t\tbw.write(obj.toCSVRow() + SYSTEM_LINE_END);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif (bw != null) {\r\n\t\t\t\t\tbw.close();\r\n\t\t\t\t}\r\n\t\t\t\tif (fw != null) {\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (IOException e) {\r\n\t\t\t\tSystem.err.println(\"I'm having really bad luck today - I couldn't even close the CSV file!\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "String[] toCSV() throws Exception;", "public static int create(EcoSystem system){\n \n \n XSSFWorkbook workbook = new XSSFWorkbook();\n XSSFSheet sheet = workbook.createSheet(\"Customer Details\");\n\n //Custom font style for header\n CellStyle cellStyle = sheet.getWorkbook().createCellStyle();\n Font font = sheet.getWorkbook().createFont();\n font.setBold(true);\n cellStyle.setFont(font);\n \n int rowCount = 0;\n int columnCount1 = 0;\n \n //Creating header row\n \n String s[] = {\"CUSTOMER ID\",\"CUSTOMER NAME\",\"CONTACT NO.\",\"EMAIL ID\",\"USAGE(Gallons)\",\"BILLING DATE\",\"TOTAL BILL($)\"};\n Row row1 = sheet.createRow(++rowCount);\n for(String s1 : s){\n Cell header = row1.createCell(++columnCount1);\n header.setCellValue(s1);\n header.setCellStyle(cellStyle);\n }\n \n \n \n for(Network network : system.getNetworkList()){\n for(Enterprise enterprise : network.getEnterpriseDirectory().getEnterpriseList()){\n if(enterprise instanceof WaterEnterprise){\n for(Organization organization : enterprise.getOrganizationDirectory().getOrganizationList()){\n if(organization instanceof CustomerOrganization){\n for(Employee employee : organization.getEmployeeDirectory().getEmployeeList()){\n Customer customer = (Customer) employee;\n Row row = sheet.createRow(++rowCount);\n int columnCount = 0;\n for(int i = 0 ; i<7 ; i++ ){\n Cell cell = row.createCell(++columnCount);\n if(i==0){\n cell.setCellValue(customer.getId());\n }\n else if(i == 1){\n cell.setCellValue(customer.getName());\n }\n else if(i == 2){\n cell.setCellValue(customer.getContactNo());\n }\n else if(i == 3){\n cell.setCellValue(customer.getEmailId());\n }\n else if(i == 4){\n cell.setCellValue(customer.getTotalUsageVolume());\n }\n else if(i == 5){\n if(customer.getBillingDate() != null)\n cell.setCellValue(String.valueOf(customer.getBillingDate()));\n else\n cell.setCellValue(\"Bill Not yet available\");\n }\n else if(i == 6){\n if(customer.getTotalBill() != 0)\n cell.setCellValue(customer.getTotalBill());\n else\n cell.setCellValue(\"Bill Not yet available\");\n }\n }\n }\n }\n }\n }\n }\n }\n \n \n try (FileOutputStream outputStream = new FileOutputStream(\"Customer_details.xlsx\")) {\n workbook.write(outputStream);\n } catch (FileNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"File not found\");\n return 0;\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"IOException\");\n return 0;\n }\n return 1;\n }", "public static void convertLisToCsv(LisFile lisFile, File destination) throws IOException\n {\n List<LisCurve> curves = lisFile.getCurves();\n List<Unit> units = new ArrayList<Unit>();\n List<String> curveNames = new ArrayList<String>();\n List<List<Object>> columns = new ArrayList<List<Object>>();\n\n for (LisCurve curve : curves) {\n String curveName = curve.getName();\n Unit from = um.findUnit(curve.getUnit());\n curveNames.add(curveName);\n units.add(from);\n\n Mnemonic curveDefaults = Mnemonic.get(curveName);\n Unit to = null;\n if (curveDefaults != null) {\n to = curveDefaults.getUnit();\n }\n List<Object> column = new ArrayList<Object>();\n\n for (int i = 0; i < curve.getNValues(); i++) {\n Object value = curve.getValue(i);\n if (value == null) {\n column.add(null);\n continue;\n }\n Double val = Double.parseDouble(value.toString());\n if (from != null && to != null && !from.equals(to))\n val = UnitManager.convert(from, to, val);\n column.add(val);\n }\n\n columns.add(column);\n }\n\n CSV csv = new CSV(curveNames, columns);\n csv.save(destination);\n }", "public void writeToCsv(String fileName) throws Exception {\n\tFileWriter writer=new FileWriter(fileName);\n\n\twriter.append(Integer.toString(this.gen));\n\twriter.append('\\n');\n\n\tfor(int i=0;i<popSize;i++) {\n\t writer.append(getBna(i));\n\t writer.append('\\n');\n\t}\n\twriter.close();\n }", "public static void main(String[] args) throws IOException {\n\t\tFile file = new File(\"C:\\\\Users\\\\Leonardo\\\\git\\\\repository5\\\\HandleExcelWithApachePoi\\\\src\\\\arquivo_excel.xls\");\r\n\t\t\r\n\t\tif (!file.exists()) {\r\n\t\t\tfile.createNewFile();\r\n\t\t}\r\n\t\t\r\n\t\tPessoa p1 = new Pessoa();\r\n\t\tp1.setEmail(\"[email protected]\");\r\n\t\tp1.setIdade(50);\r\n\t\tp1.setNome(\"Ricardo Edigio\");\r\n\t\t\r\n\t\tPessoa p2 = new Pessoa();\r\n\t\tp2.setEmail(\"[email protected]\");\r\n\t\tp2.setIdade(40);\r\n\t\tp2.setNome(\"Marcos Tadeu\");\r\n\t\t\r\n\t\tPessoa p3 = new Pessoa();\r\n\t\tp3.setEmail(\"[email protected]\");\r\n\t\tp3.setIdade(30);\r\n\t\tp3.setNome(\"Maria Julia\");\r\n\t\t\r\n\t\tList<Pessoa> pessoas = new ArrayList<Pessoa>();\r\n\t\tpessoas.add(p1);\r\n\t\tpessoas.add(p2);\r\n\t\tpessoas.add(p3);\r\n\t\t\r\n\t\t\r\n\t\tHSSFWorkbook hssfWorkbook = new HSSFWorkbook(); /*escrever na planilha*/\r\n\t\tHSSFSheet linhasPessoa = hssfWorkbook.createSheet(\"Planilha de pessoas\"); /*criar planilha*/\r\n\t\t\r\n\t\tint nlinha = 0;\r\n\t\tfor (Pessoa p : pessoas) {\r\n\t\t\tRow linha = linhasPessoa.createRow(nlinha ++); /*criando a linha na planilha*/\r\n\t\t\t\r\n\t\t\tint celula = 0;\r\n\t\t\t\r\n\t\t\tCell celNome = linha.createCell(celula ++); /*celula 1*/\r\n\t\t\tcelNome.setCellValue(p.getNome());\r\n\t\t\t\r\n\t\t\tCell celEmail = linha.createCell(celula ++); /*celula 2*/\r\n\t\t\tcelEmail.setCellValue(p.getEmail());\r\n\t\t\t\r\n\t\t\tCell celIdade = linha.createCell(celula ++); /*celula 3*/\r\n\t\t\tcelIdade.setCellValue(p.getIdade());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tFileOutputStream saida = new FileOutputStream(file);\r\n\t\thssfWorkbook.write(saida);\r\n\t\t\r\n\t\tsaida.flush();\r\n\t\tsaida.close();\r\n\t\t\r\n\t\tSystem.out.println(\"Planilha Criada com Sucesso!\");\r\n\t\t\r\n\t}", "public String createCsv(@NonNull List<String> csvHeaders,\n @NonNull List<List<Serializable>> reports) {\n return \"\";\n }", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tXSSFWorkbook xlwb = new XSSFWorkbook();\n\t\t\n\t\tXSSFSheet sht = xlwb.createSheet(\"Firstsheet\");\n\t\t\n\t\tRow row0 = sht.createRow(0);\n\t\n\tCell Cela = row0.createCell(0);\n\tCell Celb = row0.createCell(1);\n\t\n\tCela.setCellValue(\"this is first cell value\");\n\t\n\tCelb.setCellValue(\"this is 2nd cell value\");\n\t\n\tFile f = new File(\"D:\\\\Personal\\\\Learning\\\\PatriceFiles\\\\Excel\\\\Excelfile.xlsx\");\n\t\n\t\tFileOutputStream fo = new FileOutputStream(f);\n\t\t\n\t\txlwb.write(fo);\n\t\n\tSystem.out.println(\"Excel File Created\");\n\t\t\n\t}", "@Override\n\tpublic void exportarData() {\n\t\tDate date=new Date();\n\t\tString nameFile=\"recaudado-\"+date.getTime()+\".xls\";\n\t\tTableToExcel.save(grid,nameFile);\n\t}", "public static void generateExcelFileByTemplate(String template, OutputStream os, String[][] data, int startRow, int startColumn) {\n\n InputStream in = ExcelUtil.class.getResourceAsStream(template);\n\n try {\n Workbook wb = new HSSFWorkbook(in);\n Sheet sheet = wb.getSheetAt(0);\n for (int i = startRow, rowCursor = 0; i < data.length; i++, rowCursor++) {\n Row row = sheet.createRow(i);\n for (int j = startColumn, colCursor = 0; j < data[i].length; j++, colCursor++) {\n Cell cell = row.createCell(j);\n cell.setCellValue(data[rowCursor][colCursor]);\n }\n }\n wb.write(os);\n wb.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void createNewSheet(SXSSFSheet sheet, int rowNum, int countColumns, ResultSet result, SXSSFWorkbook workbook) throws SQLException {\n ResultSetMetaData metaDataColumns = result.getMetaData();\n sheet.setAutobreaks(true);\n sheet.setAutoFilter(new CellRangeAddress(0, rowNum, 0, countColumns - 1));\n// sheet.autoSizeColumn(0);\n sheet.setFitToPage(true);\n // Creamos un nuevo ROW para el header\n SXSSFRow header = sheet.createRow(rowNum);\n System.out.println(\"Add Header\");\n for (int colHeader = 1; colHeader <= countColumns; colHeader++) {\n // Creamos una nueva celda para cada una de las celdas\n SXSSFCell cellHeader = header.createCell(colHeader - 1);\n // agregamos el valor de la celda\n cellHeader.setCellValue(metaDataColumns.getColumnName(colHeader).toUpperCase());\n }\n rowNum++;\n // Verificamos si hay datos\n System.out.println(\"Add Row Data\");\n while (result.next()) {\n // Creamos un nuevo ROW para los cada nueva fila del resultSet\n SXSSFRow data = sheet.createRow(rowNum);\n // Recorremos los datos de las columnas\n for (int rowdata = 1; rowdata <= countColumns; rowdata++) {\n // Creamos una nueva celda para cada una de las celdas\n SXSSFCell cellData = data.createCell(rowdata - 1);\n // agregamos el valor de la celda\n Object object = result.getObject(rowdata);\n if (object == null) {\n cellData.setCellValue(\"\");\n } else {\n switch (metaDataColumns.getColumnType(rowdata)) {\n case Types.BOOLEAN:\n cellData.setCellValue((boolean) object);\n break;\n case Types.DATE:\n cellData.setCellValue((Date) object);\n case Types.TIMESTAMP_WITH_TIMEZONE:\n cellData.setCellValue((Date) object);\n break;\n case Types.NUMERIC:\n cellData.setCellValue(((BigDecimal) object).doubleValue());\n break;\n case Types.FLOAT:\n cellData.setCellValue(((Float) object).doubleValue());\n break;\n case Types.INTEGER:\n cellData.setCellValue(((Integer) object).doubleValue());\n break;\n case Types.SMALLINT:\n cellData.setCellValue(((Integer) object).doubleValue());\n break;\n case Types.BIGINT:\n cellData.setCellValue(((Long) object).doubleValue());\n break;\n default:\n cellData.setCellValue(object + \"\");\n break;\n }\n }\n }\n // Incrementamos el contador de registros\n rowNum++;\n // Imprimimos cada 10000 registros procesados\n if ((rowNum % 10000) == 0) {\n System.out.println(\"Procesando \" + rowNum);\n }\n // Validamos el maximo de registros que soporta excel 2007\n // Creamos una nueva hoja para los siguinetes registros\n if ((rowNum % 1048570) == 0) {\n // creamos una nueva hoja\n sheet = workbook.createSheet(name + (workbook.getNumberOfSheets() + 1));\n // enviamos a llenar la hoja\n createNewSheet(sheet, 0, countColumns, result, workbook);\n }\n }\n }", "@Override\n\tpublic void exportarData() {\n\t\tDate date=new Date();\n\t\tString nameFile=\"client-\"+date.getTime()+\".xls\";\n\t\tTableToExcel.save(grid,nameFile);\n\t}", "@Override\n public void exportToFile(SpreadsheetTable focusOwner) {\n try {\n File dire = new File(dir);\n File file = new File(dire, filename);\n\n FileWriter writer = new FileWriter(file, false);\n int start = 0;\n if (this.header) {\n start++;\n }\n\n this.selectedCells = focusOwner.getSelectedCells();\n\n for (int i = start; i < selectedCells.length; i++) {\n for (int j = 0; j < selectedCells[i].length; j++) {\n if (j != 0) {\n writer.append(delimiter);\n }\n writer.append(selectedCells[i][j].getContent());\n }\n writer.append('\\r');\n writer.append('\\n');\n }\n writer.flush();\n writer.close();\n } catch (IOException e) {\n System.out.println(\"Error exporting file!\");\n }\n }", "public void writeToCsv(ArrayList<Invoice> items) throws IOException {\n String[] header = {\"ID\", \"Items\", \"Subtotal\", \"State\", \"CreatedAt\", \"CompletedAt\", \"StaffID\", \"TableID\", \"Total\", \"AmountPaid\", \"PaymentType\", \"Receipt\"};\n BufferedWriter csvFile = FileIOHelper.getFileBufferedWriter(this.orderCsv);\n ArrayList<String[]> toWrite = new ArrayList<>();\n toWrite.add(header);\n items.forEach((i) -> toWrite.add(i.toCsv()));\n writeToCsvFile(toWrite, csvFile);\n }", "@Test\n public void CreateFile() throws Exception {\n createFile(\"src\\\\TestSuite\\\\SampleFiles\\\\supervisor.xlsx\",\n readTemplateXLSX(\"src\\\\TestSuite\\\\SampleFiles\\\\template_supervisor.xlsx\"));\n File file = new File(\"src\\\\TestSuite\\\\SampleFiles\\\\supervisor.xlsx\");\n Assert.assertTrue(file.exists());\n }", "public WriteExcelXLS(String filePath) {\n\t\tsuper(filePath);\n\t\tthis.book = new HSSFWorkbook();\n\t\tthis.sheet = book.createSheet(\"Teste\");\n\t\tthis.cstyle = new CellStyleList(book);\n\t}", "public static List<InputDto> readXLSXFile(File file) throws Exception {\n List<InputDto> inputDtos = new ArrayList<>();\n\n Integer i = 0;\n InputStream ExcelFileToRead = new FileInputStream(file);\n XSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead);\n\n XSSFWorkbook test = new XSSFWorkbook();\n\n XSSFSheet sheet = wb.getSheetAt(0);\n XSSFRow row;\n XSSFCell cell;\n\n Iterator rows = sheet.rowIterator();\n// ss = new String[sheet.getLastRowNum()];\n sheet.getLastRowNum();\n while (rows.hasNext()) {\n InputDto input = new InputDto();\n row = (XSSFRow) rows.next();\n Iterator cells = row.cellIterator();\n if (row.getRowNum() == 0) {\n continue; //just skip the rows if row number is 0 or 1\n }\n String s = \"\";\n while (cells.hasNext()) {\n cell = (XSSFCell) cells.next();\n\n if (cell.getCellType() == HSSFCell.CELL_TYPE_STRING) {\n// System.out.print(cell.getStringCellValue() + \" \");\n s += cell.getStringCellValue().trim() + \"|\";\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {\n// System.out.print(cell.getNumericCellValue() + \" \");\n s += cell.getRawValue().trim() + \"|\";\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_BLANK) {\n// System.out.print(cell.getNumericCellValue() + \" \");\n s += cell.getStringCellValue().trim() + \"|\";\n }\n /*else {\n //U Can Handel Boolean, Formula, Errors\n }*/\n }\n if (!s.equals(\"\") && s.split(\"\\\\|\").length == 8) {\n input.setLoadName(s.split(\"\\\\|\")[6]);\n input.setLoadSize(s.split(\"\\\\|\")[1]);\n input.setLoadDate(s.split(\"\\\\|\")[0]);\n input.setLoadPath(s.split(\"\\\\|\")[4]);\n input.setLoadType(s.split(\"\\\\|\")[2]);\n input.setCicsName(s.split(\"\\\\|\")[5]);\n input.setRowId(s.split(\"\\\\|\")[7]);\n System.out.println(input.getRowId());\n inputDtos.add(input);\n// ss[i] = s;\n\n } else {\n throw new Exception(\"EXCEL DATA IS NOT COMPELETED\");\n }\n i++;\n }\n\n return inputDtos;\n }", "public void deleteCSV(Activity activity) {\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"P5Calendar.csv\"));\n String myLine = br.readLine();\n\n while (myLine != null) {\n\n // read new line\n myLine = br.readLine();\n\n }\n } catch (IOException e) {\n\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tWorkbook workbook = new XSSFWorkbook(); \n\t\t\n /* CreationHelper helps us create instances of various things like DataFormat, \n Hyperlink, RichTextString etc, in a format (HSSF, XSSF) independent way */\n\t\tCreationHelper createHelper = workbook.getCreationHelper();\n \n\t\t// Create a sheet\n\t\tSheet sheet = workbook.createSheet(\"Employee\");\n\t\t\n\t\t// create a font for styling header cells\n\t\tFont headerFont =workbook.createFont();\n\t\theaderFont.setBold(true);\n\t\theaderFont.setFontHeightInPoints((short)14);\n\t\theaderFont.setColor(IndexedColors.RED.getIndex());\n\t\t\n\t\t// Create a cellStyle with font \n\t\tCellStyle headerCellStyle=workbook.createCellStyle();\n\t\theaderCellStyle.setFont(headerFont);\n\t\t\n\t\t// Create a row \n\t\tRow headerRow = sheet.createRow(0);\n\t\t\n\t\t// create cell\n\t\tfor(int i=0; i<columns.length; i++){\n\t\t\t\tCell cell=headerRow.createCell(i);\n\t\t\t\tcell.setCellValue(columns[i]);\n\t\t\t\tcell.setCellStyle(headerCellStyle);\n\t\t}\n\t\t\n\t\tCellStyle dateCellStyle = workbook.createCellStyle();\n\t\tdateCellStyle.setDataFormat(createHelper.createDataFormat().getFormat(\"dd-MM-yyyy\"));\n\t\t\n\t\t// Create Other rows and cells with employees data\n\t\tint rowNum=(sheet.getLastRowNum()+1);\n\t\tfor(Employee employee : employees){\n\t\t\tint cellNum = 0;\n\t\t\tRow row=sheet.createRow(rowNum++);\n\t\t\trow.createCell(cellNum++).setCellValue(employee.getName());\n\t\t\trow.createCell(cellNum++).setCellValue(employee.getEmail());\n\t\t\t\n\t\t\tCell dateOfBirthCell=row.createCell(cellNum++);\n\t\t\tdateOfBirthCell.setCellValue(employee.getDateOfBirth());\n\t\t\tdateOfBirthCell.setCellStyle(dateCellStyle);\n\t\t\t\n\t\t\trow.createCell(cellNum).setCellValue(employee.getSalary());\n\t\t\t\n\t\t\t// Resize all columns to fit the content size\n\t for(int i = 0; i < columns.length; i++) {\n\t sheet.autoSizeColumn(i);\n\t }\n\t\t\t\t\n\t\t}\n\t\t\n // Write the output to the file\n\t\t\n OutputStream outputStream=new \n\t\t\t\t\tFileOutputStream(\"C:\\\\Users\\\\gauravd\\\\Downloads\\\\poi-generated-file.xlsx\");\n\t\t\tworkbook.write(outputStream);\n\t\t\t\n\t\t\toutputStream.close();\n\t\t\tworkbook.close();\n\t\t\tSystem.out.println(\"Writer Completed\");\n\t\t\t\n\t}", "public void selectAndExportEXCEL(String queue, String path)\n\t{\n\t\t\n\t\tWorkbook wb = new XSSFWorkbook();\n\t\tSheet sheet = wb.createSheet(\"new sheet\");\n\t\tint rowCount = 0;\n\n\t\tResultSet rs = select(queue);\n\n\t\ttry \n\t\t{\n\t\t\tResultSetMetaData metaData = rs.getMetaData();\n\t\t\tint count = metaData.getColumnCount();\n\n\t\t\t// excel row for head info\n\t\t\tRow headRow = sheet.createRow(rowCount++);\n\t\t\t\n\t\t\tfor(int i = 1; i <= count; i++)\n\t\t\t{\n\t\t\t\theadRow.createCell(i - 1).setCellValue(metaData.getColumnLabel(i));\n\t\t\t}\n\n\t\t\t// main data\n\t\t\twhile (rs.next())\n\t\t\t{\n\t\t\t\tRow row = sheet.createRow(rowCount++);\n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < rs.getMetaData().getColumnCount(); i++)\n\t\t\t\t{\n\t\t\t\t\trow.createCell(i).setCellValue(rs.getString(i + 1));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tFileOutputStream fileOut = new FileOutputStream(path);\n\t\t\twb.write(fileOut);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tMessages.showError(e.getMessage());\n\t\t} \n\t\tcatch (FileNotFoundException e) \n\t\t{\n\t\t\t// for FileOutputStream fileOut = new FileOutputStream\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\t// for wb.write(fileOut);\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tMessages.showError(e.getMessage());\n\t\t}\n\t}", "public void writeExcel(String file_name, String path, DepartmentDto department,\n StageDto stage) throws FileNotFoundException, IOException {\n\n List<SlotDto> slots = null;\n\n try {\n\n //create workbook to generate .xls file\n XSSFWorkbook workbook = new XSSFWorkbook();\n XSSFSheet sheet = workbook.createSheet(file_name);\n\n\n // Create a Font for styling header cells\n Font headerFont = workbook.createFont();\n headerFont.setBold(false);\n headerFont.setFontHeightInPoints((short) 14);\n headerFont.setColor(IndexedColors.BLACK.getIndex());\n\n\n Font headerFont2 = workbook.createFont();\n headerFont2.setBold(true);\n headerFont2.setFontHeightInPoints((short) 14);\n headerFont2.setColor(IndexedColors.DARK_BLUE.getIndex());\n\n Font headerFont1 = workbook.createFont();\n headerFont1.setBold(true);\n headerFont1.setFontHeightInPoints((short) 14);\n headerFont1.setColor(IndexedColors.DARK_BLUE.getIndex());\n\n CellStyle headerCellStyle3 = workbook.createCellStyle();\n headerCellStyle3.setFont(headerFont1);\n headerCellStyle3.setAlignment(HorizontalAlignment.LEFT);\n\n // Create a CellStyle with the font\n CellStyle headerCellStyle = workbook.createCellStyle();\n headerCellStyle.setFont(headerFont2);\n headerCellStyle.setFillForegroundColor(IndexedColors.SKY_BLUE.getIndex());\n headerCellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n headerCellStyle.setAlignment(HorizontalAlignment.CENTER);\n\n // Create a CellStyle with the font\n CellStyle headerCellStyle2 = workbook.createCellStyle();\n headerCellStyle2.setFont(headerFont);\n headerCellStyle2.setFillForegroundColor(IndexedColors.WHITE.getIndex());\n headerCellStyle2.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n headerCellStyle2.setAlignment(HorizontalAlignment.LEFT);\n\n\n // Create a CellStyle with the font for day\n CellStyle headerCellStyle1 = workbook.createCellStyle();\n headerCellStyle1.setFont(headerFont);\n headerCellStyle1.setFillForegroundColor(IndexedColors.LIGHT_YELLOW.getIndex());\n headerCellStyle1.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n headerCellStyle1.setAlignment(HorizontalAlignment.LEFT);\n\n\n // get arraylist of slots of schedule\n slots = new ArrayList<>();\n slots = slotBao.viewSlotsOfSchedule(stage, department);\n\n\n //create all rows\n for (int r = 0; r < 30; r++) {\n // Create a Row\n XSSFRow headerRow = sheet.createRow(r);\n\n // Create all cells in row and set their style\n for (int i = 0; i < 9; i++) {\n Cell cell = headerRow.createCell(i);\n\n if ((i == 0 && r > 2) || r == 3 || r == 4)\n cell.setCellStyle(headerCellStyle);\n else if (r > 4)\n cell.setCellStyle(headerCellStyle2);\n else if (r < 3)\n cell.setCellStyle(headerCellStyle3);\n\n\n }\n\n }\n\n // create row and cell to set the schedule department\n sheet.getRow(0)\n .getCell(0)\n .setCellValue(department.getName());\n sheet.getRow(0)\n .getCell(1)\n .setCellValue(department.getCode());\n\n // create row and cell to set the academic year\n sheet.getRow(1)\n .getCell(0)\n .setCellValue(\"Academic year\");\n sheet.getRow(1)\n .getCell(1)\n .setCellValue(stage.getNumber());\n\n\n // create row and cells to set the term of schedule\n sheet.getRow(2)\n .getCell(0)\n .setCellValue(\"Term\");\n sheet.getRow(2)\n .getCell(1)\n .setCellValue(slots.get(0).getTerm());\n\n // create rows and cells to set time slots number and day\n sheet.getRow(3)\n .getCell(0)\n .setCellValue(\"Time slot\");\n sheet.getRow(3)\n .getCell(1)\n .setCellValue(\"Slot 1\");\n sheet.getRow(3)\n .getCell(3)\n .setCellValue(\"Slot 2\");\n sheet.getRow(3)\n .getCell(5)\n .setCellValue(\"Slot 3\");\n sheet.getRow(3)\n .getCell(7)\n .setCellValue(\"Slot 4\");\n\n\n // ceate row and cells to set start and end time of slots\n sheet.getRow(4)\n .getCell(1)\n .setCellValue(\"F 09:00-T 10:20\");\n sheet.getRow(4)\n .getCell(3)\n .setCellValue(\"F 10:30-T 12:00\");\n sheet.getRow(4)\n .getCell(5)\n .setCellValue(\"F 12:20-T 01:50\");\n sheet.getRow(4)\n .getCell(7)\n .setCellValue(\"F 2:00-T 03:30\");\n\n\n //set days\n sheet.getRow(5)\n .getCell(0)\n .setCellValue(\"Sunday\");\n sheet.getRow(10)\n .getCell(0)\n .setCellValue(\"Monday\");\n sheet.getRow(15)\n .getCell(0)\n .setCellValue(\"Tuesday\");\n sheet.getRow(20)\n .getCell(0)\n .setCellValue(\"Wednesday\");\n sheet.getRow(25)\n .getCell(0)\n .setCellValue(\"Thursday\");\n\n\n // Resize all columns to fit the content size\n for (int i = 0; i < 9; i++) {\n sheet.autoSizeColumn(i);\n }\n\n\n // loop to get slot of indexed day and time slot\n for (int i = 0; i < slots.size(); i++) {\n\n //define slot day\n int r = -1;\n\n if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Sunday\"))\n r = 5;\n else if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Monday\"))\n r = 10;\n else if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Tuesday\"))\n r = 15;\n else if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Wednesday\"))\n r = 20;\n else if (slots.get(i)\n .getDay()\n .equalsIgnoreCase(\"Thursday\"))\n r = 25;\n\n\n int cell = slots.get(i).getNum() * 2 - 1;\n\n // set style for cells\n if ((r % 2 == 0 && (cell == 1 || cell == 2 || cell == 5 || cell == 6)) ||\n (r % 2 != 0 && (cell == 3 || cell == 4 || cell == 7 || cell == 8))) {\n\n sheet.getRow(r)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n\n sheet.getRow(r + 1)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r + 1)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n\n sheet.getRow(r + 2)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r + 2)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n\n sheet.getRow(r + 3)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r + 3)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n\n sheet.getRow(r + 4)\n .getCell(cell)\n .setCellStyle(headerCellStyle1);\n sheet.getRow(r + 4)\n .getCell(cell + 1)\n .setCellStyle(headerCellStyle1);\n }\n\n // set course name and code of slot\n sheet.getRow(r)\n .getCell(cell)\n .setCellValue(slots.get(i)\n .getCourse()\n .getName());\n sheet.getRow(r)\n .getCell(cell + 1)\n .setCellValue(slots.get(i)\n .getCourse()\n .getCode());\n\n // set type of slot\n sheet.getRow(r + 2)\n .getCell(cell)\n .setCellValue(slots.get(i).getSlot_type());\n\n // set location of slot\n sheet.getRow(r + 3)\n .getCell(cell)\n .setCellValue(slots.get(i)\n .getLocation()\n .getName());\n\n\n // check slot type then set plt of slot\n if (slots.get(i)\n .getSlot_type()\n .equals(\"LECTURE\")) {\n sheet.getRow(r + 3)\n .getCell(cell + 1)\n .setCellValue(slots.get(i)\n .getCourse()\n .getPlt_lecture()\n .getCode());\n }\n if (slots.get(i)\n .getSlot_type()\n .equals(\"SECTION\")) {\n sheet.getRow(r + 3)\n .getCell(cell + 1)\n .setCellValue(slots.get(i)\n .getCourse()\n .getPlt_section()\n .getCode());\n }\n\n\n // set student number of slot\n sheet.getRow(r + 4)\n .getCell(cell)\n .setCellValue(\"Student number\");\n sheet.getRow(r + 4)\n .getCell(cell + 1)\n .setCellValue(slots.get(i).getStudent_number());\n\n /*\n * set staff of slot then check if members > 1\n * then concatenate all members' names\n * and set to cell */\n String staff = slots.get(i)\n .getStaff()\n .get(0)\n .getPosition() + \"/\" + slots.get(i)\n .getStaff()\n .get(0)\n .getName();\n\n /*\n * set staff user email of slot then check if members > 1\n * then concatenate all members' emails\n * and set to cell */\n String[] email = slots.get(i)\n .getStaff()\n .get(0)\n .getUser()\n .getEmail()\n .split(\"@\", 2);\n String user = email[0];\n\n\n for (int j = 1; j < slots.get(i)\n .getStaff()\n .size(); j++) {\n staff = staff + \" # \" + slots.get(i)\n .getStaff()\n .get(j)\n .getPosition() + \"/\" + slots.get(i)\n .getStaff()\n .get(j)\n .getName();\n\n String[] _email = slots.get(i)\n .getStaff()\n .get(j)\n .getUser()\n .getEmail()\n .split(\"@\", 2);\n user = user + \" # \" + _email[0];\n }\n\n sheet.getRow(r + 1)\n .getCell(cell)\n .setCellValue(staff);\n sheet.getRow(r + 1)\n .getCell(cell + 1)\n .setCellValue(user);\n\n }\n\n\n // write data to the file\n\n FileOutputStream fileOut = new FileOutputStream(path + \"\\\\\" + file_name);\n workbook.write(fileOut);\n fileOut.close();\n\n\n // Closing the workbook\n workbook.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }", "@RequestMapping(\"/generatecsv\")\r\n\tpublic String generateCsvFile() throws CsvDataTypeMismatchException, CsvRequiredFieldEmptyException {\r\n\r\n\t\tList<FinalCritExtDTO> list = service.generateDataForCsvFile();\r\n\r\n\t\tif (Objects.nonNull(list) && !list.isEmpty()) {\r\n\t\t\tlogger.info(\"data fetched from db and mapped of size \" + list.size());\r\n\t\t\twriter.writeDataAtOnce(list);\r\n\t\t} else\r\n\t\t\tlogger.info(\"No records found in db to be written\");\r\n\t\tlogger.debug(\"File successfully generated\");\r\n\t\treturn \"SUCCESS\";\r\n\t}", "private OSPARRecords parseExcelFile(String excelFilePath) {\n\n\t\ttry {\n\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tbuilder.setPrettyPrinting();\n\t\t\tGson gson = builder.create();\n\t\t\t\n\t\t\t\n\t\t\tOSPARRecords or = new OSPARRecords();\n\n\t\t\tFile file = new File(excelFilePath);\n\t\t\tFileInputStream inputStream = new FileInputStream(new File(excelFilePath));\n\n\t\t\tWorkbook workbook = new HSSFWorkbook(inputStream);\n\t\t\tSheet firstSheet = workbook.getSheetAt(0);\n\n\t\t\tint row = 0;\n\n\t\t\tDataFormatter formatter = new DataFormatter();\n\t\t\t\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\tRow nextRow = firstSheet.getRow(row);\n\n\t\t\t\tif (nextRow == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString value=nextRow.getCell(0)+\"\";\n\t\t\t\t\n\t\t\t\tif (value.equals(\"\")) {\n\t\t\t\t\t\n\t\t\t\t\tString v3=nextRow.getCell(3)+\"\";\n\t\t\t\t\t\n\t\t\t\t\tif (!v3.equals(\"Source/Reference\")) {\n\t\t\t\t\t\tSystem.out.println(excelFilePath+\"\\t\"+or.CasNo+\"\\t\"+v3+\"\\t\"+value);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\trow++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (value.equals(\"null\")) break;\n\t\t\t\t\n\t\t\t\tfloat fvalue=Float.parseFloat(value);\n\t\t\t\tDecimalFormat decform=new DecimalFormat(\"0.0\");\n\t\t\t\tString svalue=decform.format(fvalue);\n\t\t\t\t\n//\t\t\t\tSystem.out.println(or.CasNo+\"\\t\"+svalue);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tdata_field df = createDataField(nextRow);\n\t\t\t\t\n\t\t\t\tif (df.Value.equals(\"\") && df.Source_Reference.equals(\"\")) {\n\t\t\t\t\trow++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\tif (svalue.equals(\"0.0\")) \n\t\t\t\t\tor.Name=df.Value;\n\t\t\t\tif (svalue.equals(\"1.1\"))\n\t\t\t\t\tor.CasNo=convertCAS(df.Value);\n\t\t\t\tif (svalue.equals(\"1.2\"))\n\t\t\t\t\tor.EINECS=df.Value;\n\t\t\t\tif (svalue.equals(\"1.3\"))\n\t\t\t\t\tor.Synonym=df.Value;\n\t\t\t\tif (svalue.equals(\"1.4\"))\n\t\t\t\t\tor.Group_Function=df.Value;\n\t\t\t\tif (svalue.equals(\"1.5\"))\n\t\t\t\t\tor.Initial_Selection=df.Value;\n\t\t\t\tif (svalue.equals(\"1.6\"))\n\t\t\t\t\tor.Prioritized_For_Action=df.Value;\n\n\t\t\t\tif (svalue.equals(\"2.1\"))\n\t\t\t\t\tor.Molecular_weight.add(df);\n\t\t\t\tif (svalue.equals(\"2.2\"))\n\t\t\t\t\tor.Water_Solubility.add(df);\n\t\t\t\tif (svalue.equals(\"2.3\"))\n\t\t\t\t\tor.Vapor_Pressure.add(df);\n\n\t\t\t\tif (svalue.equals(\"3.1\"))\n\t\t\t\t\tor.Abiotic_OH_Oxidation_t1_2_d.add(df);\n\t\t\t\tif (svalue.equals(\"3.2\"))\n\t\t\t\t\tor.Photolysis_t1_2_d.add(df);\n\t\t\t\tif (svalue.equals(\"3.3\"))\n\t\t\t\t\tor.Ready_Biodegradability.add(df);\n\t\t\t\tif (svalue.equals(\"3.4\"))\n\t\t\t\t\tor.Halflife.add(df);\n\t\t\t\tif (svalue.equals(\"3.5\"))\n\t\t\t\t\tor.Inherent_Biodegradability.add(df);\n\t\t\t\tif (svalue.equals(\"3.6\"))\n\t\t\t\t\tor.Biodeg_QSAR.add(df);\n\t\t\t\t\n\t\t\t\tif (svalue.equals(\"4.1\"))\n\t\t\t\t\tor.logKow.add(df);\n\t\t\t\tif (svalue.equals(\"4.2\"))\n\t\t\t\t\tor.Bcf.add(df);\n\n\t\t\t\tif (svalue.equals(\"5.1\"))\n\t\t\t\t\tor.Acute_toxicity_algae.add(df);\n\t\t\t\tif (svalue.equals(\"5.2\"))\n\t\t\t\t\tor.Acute_toxicity_daphnia.add(df);\n\t\t\t\tif (svalue.equals(\"5.3\"))\n\t\t\t\t\tor.Acute_toxicity_fish.add(df);\n\t\t\t\tif (svalue.equals(\"5.4\"))\n\t\t\t\t\tor.Chronic_toxicity_daphnia.add(df);\n\t\t\t\tif (svalue.equals(\"5.5\"))\n\t\t\t\t\tor.Chronic_toxicity_fish.add(df);\n\t\t\t\tif (svalue.equals(\"5.6\"))\n\t\t\t\t\tor.Aquatox_QSAR.add(df);\n\t\t\t\tif (svalue.equals(\"5.7\"))\n\t\t\t\t\tor.Aquatic_toxicity_Other.add(df);\n\n\n\t\t\t\tif (svalue.equals(\"6.1\"))\n\t\t\t\t\tor.Acute_toxicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.2\"))\n\t\t\t\t\tor.Carcinogenicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.3\"))\n\t\t\t\t\tor.Chronic_toxicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.4\"))\n\t\t\t\t\tor.Mutagenicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.5\"))\n\t\t\t\t\tor.Reprotoxicity.add(df);\n\n\n\t\t\t\tif (svalue.equals(\"7.1\"))\n\t\t\t\t\tor.Production_Volume.add(df);\n\t\t\t\tif (svalue.equals(\"7.2\"))\n\t\t\t\t\tor.Use_Industry_Category.add(df);\n\t\t\t\tif (svalue.equals(\"7.3\"))\n\t\t\t\t\tor.Use_in_articles.add(df);\n\t\t\t\tif (svalue.equals(\"7.4\"))\n\t\t\t\t\tor.Environm_Occur_Measured.add(df);\n\t\t\t\tif (svalue.equals(\"7.5\"))\n\t\t\t\t\tor.Environm_Occur_Modelled.add(df);\n\n\t\t\t\tif (svalue.equals(\"8.1\"))\n\t\t\t\t\tor.Dir_67_548_EEC_Classification.add(df);\n\t\t\t\tif (svalue.equals(\"8.2\"))\n\t\t\t\t\tor.Reg_793_93_EEC_Existing_substances.add(df);\n\t\t\t\tif (svalue.equals(\"8.3\"))\n\t\t\t\t\tor.Dir_2000_60_EEC_WFD.add(df);\n\t\t\t\tif (svalue.equals(\"8.4\"))\n\t\t\t\t\tor.Dir_76_769_EEC_M_U.add(df);\n\t\t\t\tif (svalue.equals(\"8.5\"))\n\t\t\t\t\tor.Dir_76_464_EEC_water.add(df);\n\t\t\t\tif (svalue.equals(\"8.6\"))\n\t\t\t\t\tor.Dir_91_414_EEC_ppp.add(df);\n\t\t\t\tif (svalue.equals(\"8.7\"))\n\t\t\t\t\tor.Dir_98_8_EEC_biocid.add(df);\n\n\t\t\t\tif (svalue.equals(\"9.1\"))\n\t\t\t\t\tor.Hazard_assessment_OECD.add(df);\n\t\t\t\tif (svalue.equals(\"9.2\"))\n\t\t\t\t\tor.Other_risk_assessments.add(df);\n\n\t\t\t\trow++;\n\n\t\t\t}\n\n\t\t\tinputStream.close();\n\t\t\treturn or;\n\t\t\t\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\nFileInputStream f=new FileInputStream(\"D:\\\\AccuSelenium\\\\Ram\\\\TEST\\\\TestData\\\\LoginData.xls\");\nHSSFWorkbook w=new HSSFWorkbook(f);\nHSSFSheet s=w.getSheet(\"sheet1\");\nSystem.out.println(s.getRow(1));\n}", "@RequestMapping(\"exportToExcel\")\n public void exportFundamentalsToExcel(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\n log.debug(\"Requested exporting data to excel.\");\n\n TradingAidCommand jshData = getJshData();\n\n // create a new file\n FileOutputStream outExcel = new FileOutputStream(\"workbook\");\n // create a new workbook\n HSSFWorkbook workbook = new HSSFWorkbook();\n // create a new sheet\n HSSFSheet sheet = workbook.createSheet();\n\n sheet.setDefaultColumnWidth(7);\n\n // create header row\n HSSFRow header = sheet.createRow(0);\n header.createCell(0).setCellValue(\"Horse\");\n header.createCell(1).setCellValue(\"9am\");\n header.createCell(2).setCellValue(\"MovAM\");\n header.createCell(3).setCellValue(\"60min\");\n header.createCell(4).setCellValue(\"Mov60\");\n header.createCell(5).setCellValue(\"30min\");\n header.createCell(6).setCellValue(\"Mov30\");\n header.createCell(7).setCellValue(\"15min\");\n header.createCell(8).setCellValue(\"Mov15\");\n header.createCell(9).setCellValue(\"5min\");\n header.createCell(10).setCellValue(\"Mov5\");\n header.createCell(11).setCellValue(\"3min\");\n header.createCell(12).setCellValue(\"Mov3\");\n header.createCell(13).setCellValue(\"2min\");\n header.createCell(14).setCellValue(\"Mov2\");\n header.createCell(15).setCellValue(\"1min\");\n header.createCell(16).setCellValue(\"Mov1\");\n header.createCell(17).setCellValue(\"Mean\");\n header.createCell(18).setCellValue(\"321\");\n header.createCell(19).setCellValue(\"Result\");\n header.createCell(20).setCellValue(\"CPR\");\n header.createCell(21).setCellValue(\"NPTips\");\n header.createCell(22).setCellValue(\"Naps\");\n header.createCell(23).setCellValue(\"Stars\");\n header.createCell(24).setCellValue(\"Jockey\");\n header.createCell(25).setCellValue(\"Wins\");\n header.createCell(26).setCellValue(\"R\");\n header.createCell(27).setCellValue(\"Rs\");\n header.createCell(28).setCellValue(\"Mov9-60\");\n header.createCell(29).setCellValue(\"FP\");\n header.createCell(30).setCellValue(\"C\");\n header.createCell(31).setCellValue(\"D\");\n header.createCell(32).setCellValue(\"CD\");\n header.createCell(33).setCellValue(\"HG\");\n header.createCell(34).setCellValue(\"Trainer\");\n header.createCell(35).setCellValue(\"Wins\");\n header.createCell(36).setCellValue(\"R\");\n header.createCell(37).setCellValue(\"Rs\");\n\n int rowIndex = 1;\n for (JSHRaceCommand race : jshData.getRaces()) {\n\n HSSFRow row = sheet.createRow(rowIndex);\n HSSFCell cell = row.createCell(0);\n cell.setCellValue(race.getGeneralInfo());\n sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 0, 37));\n\n rowIndex++;\n\n int runnerFavPos = 1;\n for (JSHRunnerCommand runner : race.getRunners()) {\n row = sheet.createRow(rowIndex);\n row.createCell(0).setCellValue(runner.getHorseName());\n row.createCell(1).setCellValue(runner.getPrice9());\n row.createCell(2).setCellValue(runner.getMov9to11());\n row.createCell(3).setCellValue(runner.getPrice60());\n row.createCell(4).setCellValue(runner.getMov60());\n row.createCell(5).setCellValue(runner.getPrice30());\n row.createCell(6).setCellValue(runner.getMov30());\n row.createCell(7).setCellValue(runner.getPrice15());\n row.createCell(8).setCellValue(runner.getMov15());\n row.createCell(9).setCellValue(runner.getPrice5());\n row.createCell(10).setCellValue(runner.getMov5());\n row.createCell(11).setCellValue(runner.getPrice3());\n row.createCell(12).setCellValue(runner.getMov3());\n row.createCell(13).setCellValue(runner.getPrice2());\n row.createCell(14).setCellValue(runner.getMov2());\n row.createCell(15).setCellValue(runner.getPrice1());\n row.createCell(16).setCellValue(runner.getMov1());\n row.createCell(17).setCellValue(runner.getMean());\n row.createCell(18).setCellValue(runner.getMov3to1());\n row.createCell(19).setCellValue(runner.getResult());\n row.createCell(20).setCellValue(runner.getCpr());\n row.createCell(21).setCellValue(runner.getNptips());\n row.createCell(22).setCellValue(runner.getNaps());\n row.createCell(23).setCellValue(runner.getStars());\n row.createCell(24).setCellValue(runner.getJockey());\n row.createCell(25).setCellValue(runner.getJockeyWins());\n row.createCell(26).setCellValue(runner.getJockeyRideNo());\n row.createCell(27).setCellValue(runner.getJockeyRides());\n row.createCell(28).setCellValue(runner.getMov9to60());\n row.createCell(29).setCellValue(runnerFavPos++);\n row.createCell(30).setCellValue(runner.getCourse());\n row.createCell(31).setCellValue(runner.getDistance());\n row.createCell(32).setCellValue(runner.getDistanceAndCourse());\n row.createCell(33).setCellValue(runner.getHeadGear());\n row.createCell(34).setCellValue(runner.getTrainer());\n row.createCell(35).setCellValue(runner.getTrainerWins());\n row.createCell(36).setCellValue(runner.getTrainerRunnerNo());\n row.createCell(37).setCellValue(runner.getTrainerRunners());\n\n rowIndex++;\n }\n\n }\n\n for (int i = 0; i < 37; i++) {\n sheet.autoSizeColumn(i);\n }\n\n // Movement formatting\n HSSFSheetConditionalFormatting conditionalFormattingLayer = sheet.getSheetConditionalFormatting();\n HSSFConditionalFormattingRule blueRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.GT, \"5\");\n HSSFConditionalFormattingRule greenRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.BETWEEN, \"2.5\", \"5\");\n HSSFConditionalFormattingRule yellowRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.BETWEEN, \"0.01\", \"2.5\");\n HSSFConditionalFormattingRule orangeRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.BETWEEN, \"-2.5\", \"-0.01\");\n HSSFConditionalFormattingRule pinkRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.LT, \"-2.5\");\n\n HSSFPatternFormatting blueFormatting = blueRule.createPatternFormatting();\n blueFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.BLUE.getIndex());\n\n HSSFPatternFormatting greenFormatting = greenRule.createPatternFormatting();\n greenFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.GREEN.getIndex());\n\n HSSFPatternFormatting yellowFormatting = yellowRule.createPatternFormatting();\n yellowFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.YELLOW.getIndex());\n\n HSSFPatternFormatting orangeFormatting = orangeRule.createPatternFormatting();\n orangeFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.ORANGE.getIndex());\n\n HSSFPatternFormatting pinkFormatting = pinkRule.createPatternFormatting();\n pinkFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.PINK.getIndex());\n\n HSSFPalette palette = workbook.getCustomPalette();\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.BLUE.getIndex(), (byte) 153, (byte) 204, (byte) 255);\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.GREEN.getIndex(), (byte) 204, (byte) 255, (byte) 204);\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.YELLOW.getIndex(), (byte) 255, (byte) 255, (byte) 153);\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.ORANGE.getIndex(), (byte) 255, (byte) 204, (byte) 153);\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.PINK.getIndex(), (byte) 255, (byte) 153, (byte) 204);\n\n int lastRowNum = sheet.getLastRowNum();\n\n CellRangeAddress[] basicMovementCellRangeAddresses = {\n\n // 9-11 Movement\n new CellRangeAddress(1, lastRowNum, 2, 2),\n // 60 min Movement\n new CellRangeAddress(1, lastRowNum, 4, 4),\n // 30 min Movement\n new CellRangeAddress(1, lastRowNum, 6, 6),\n // 15 min Movement\n new CellRangeAddress(1, lastRowNum, 8, 8),\n // 5 min Movement\n new CellRangeAddress(1, lastRowNum, 10, 10),\n // 3 min Movement\n new CellRangeAddress(1, lastRowNum, 12, 12),\n // 2 min Movement\n new CellRangeAddress(1, lastRowNum, 14, 14),\n // 1 min Movement\n new CellRangeAddress(1, lastRowNum, 16, 16),\n // Mean\n new CellRangeAddress(1, lastRowNum, 17, 17),\n // 3-1 Movement\n new CellRangeAddress(1, lastRowNum, 18, 18),\n };\n\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, blueRule);\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, greenRule);\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, yellowRule);\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, orangeRule);\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, pinkRule);\n\n\n // Movement 9 to 60 formatting\n HSSFConditionalFormattingRule mov9to60LessThanZeroRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.LT, \"0\");\n HSSFFontFormatting mov9to60LessThanZeroFormatting = mov9to60LessThanZeroRule.createFontFormatting();\n mov9to60LessThanZeroFormatting.setFontColorIndex(HSSFColor.HSSFColorPredefined.RED.getIndex());\n CellRangeAddress[] mov9to60CellRange = {new CellRangeAddress(1, lastRowNum, 28, 28)};\n conditionalFormattingLayer.addConditionalFormatting(mov9to60CellRange, mov9to60LessThanZeroRule);\n\n // CPR Formatting\n HSSFConditionalFormattingRule cprRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.LT, \"0\");\n HSSFFontFormatting cprFormatting = cprRule.createFontFormatting();\n cprFormatting.setFontColorIndex(HSSFColor.HSSFColorPredefined.RED.getIndex());\n CellRangeAddress[] cprCellRange = {new CellRangeAddress(1, lastRowNum, 20, 20)};\n conditionalFormattingLayer.addConditionalFormatting(cprCellRange, cprRule);\n\n // Result formatting\n HSSFConditionalFormattingRule winnerRule = conditionalFormattingLayer.createConditionalFormattingRule(\"EXACT($T1, \\\"Won\\\")\");\n HSSFConditionalFormattingRule placedRule = conditionalFormattingLayer.createConditionalFormattingRule(\"EXACT($T1, \\\"Placed\\\")\");\n\n HSSFPatternFormatting winnerFormatting = winnerRule.createPatternFormatting();\n winnerFormatting.setFillBackgroundColor(IndexedColors.BRIGHT_GREEN.getIndex());\n\n HSSFPatternFormatting placedFormatting = placedRule.createPatternFormatting();\n placedFormatting.setFillBackgroundColor(IndexedColors.LEMON_CHIFFON.getIndex());\n\n palette.setColorAtIndex(IndexedColors.BRIGHT_GREEN.getIndex(), (byte) 62, (byte) 213, (byte) 120);\n palette.setColorAtIndex(IndexedColors.LEMON_CHIFFON.getIndex(), (byte) 242, (byte) 218, (byte) 193);\n\n CellRangeAddress[] resultCellRange = {\n // Horse name\n new CellRangeAddress(1, lastRowNum, 0, 0),\n // Result\n new CellRangeAddress(1, lastRowNum, 19, 19),\n // Jockey\n new CellRangeAddress(1, lastRowNum, 24, 24),\n // Trainer\n new CellRangeAddress(1, lastRowNum, 34, 34)\n\n };\n\n conditionalFormattingLayer.addConditionalFormatting(resultCellRange, winnerRule);\n conditionalFormattingLayer.addConditionalFormatting(resultCellRange, placedRule);\n\n // Writing the file into Http response\n workbook.write(outExcel);\n\n response.setContentType(\"application/octet-stream\");\n DateFormat dateFormat = new SimpleDateFormat(\"yyyyMMdd\");\n Date today = new Date();\n response.setHeader(\"Content-disposition\", \"attachment; filename=\" + \"trading-aid-\" + dateFormat.format(today) + \".xls\");\n\n FileInputStream inputStream = new FileInputStream(new File(\"workbook\"));\n\n OutputStream outputStream = response.getOutputStream();\n\n byte[] buffer = new byte[1024];\n int bytesRead = -1;\n while ((bytesRead = inputStream.read(buffer)) != -1) { // write bytes read from the input stream into the output stream\n outputStream.write(buffer, 0, bytesRead);\n }\n\n outputStream.flush();\n\n log.debug(\"Data export to excel successful.\");\n\n }", "private void openCsvDialog(){\n JFileChooser aFileChooser = new JFileChooser();\n aFileChooser.setFileFilter(new MyFileFilterCSV());\n if (lastUsedFileCSV != null){\n aFileChooser.setCurrentDirectory(lastUsedFileCSV.getParentFile());\n aFileChooser.setSelectedFile(lastUsedFileCSV);\n }else{\n File file = new File(aFileChooser.getCurrentDirectory(), dataset.getName()+\".csv\");\n aFileChooser.setSelectedFile(file);\n }\n int r = aFileChooser.showSaveDialog(this);\n if (r == JFileChooser.APPROVE_OPTION){\n setCursor(new Cursor(Cursor.WAIT_CURSOR));\n File file = aFileChooser.getSelectedFile();\n if(!MyUtilities.isCSVFile(file)){\n file = MyUtilities.getCSVFile(file);\n }\n lastUsedFileCSV = file;\n String sep = getCSVSeparator();\n PrintWriter writer = null;\n try{\n writer = new PrintWriter(new BufferedWriter (new OutputStreamWriter(new FileOutputStream(file), \"utf-8\")));\n // header\n String s = \"\";\n for(int j=0; j<dataset.getListDataHeader().length; j++){\n s += dataset.getListDataHeader()[j] == null? \"\" : dataset.getListDataHeader()[j].getValue();\n if(j <dataset.getListDataHeader().length -1)\n s+= sep;\n }\n writer.println(s);\n // data\n Data[][] data = dataset.getData();\n int nbR = dataset.getNbRows();\n int nbC = dataset.getNbCol();\n for(int i=0; i<nbR; i++){\n s = \"\";\n for(int j=0; j<nbC; j++){\n if(data[i][j] != null){\n if(data[i][j].isDoubleValue()){\n if(!Double.isNaN(data[i][j].getDoubleValue()))\n s += NumberFormat.getNumberInstance(getLocale()).format(data[i][j].getDoubleValue());\n }else{\n s += data[i][j].getValue();\n }\n }\n if(j <nbC -1)\n s+= sep;\n }\n writer.println(s);\n }\n //log\n\t\tdataProcessToolPanel.logExportCSV(dataset, file.getPath());\n }catch (IOException e){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(new CopexReturn(getBundleString(\"MSG_ERROR_CSV\"), false), getBundleString(\"TITLE_DIALOG_ERROR\"));\n }\n finally{\n if (writer != null)\n try{\n writer.close();\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }catch (Exception e){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(new CopexReturn(getBundleString(\"MSG_ERROR_CSV\"), false), getBundleString(\"TITLE_DIALOG_ERROR\"));\n }\n }\n }\n }", "@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tif(filename==null){\n\t\t\t\t\t\t\tcommond.setToast( getApplication().getString(R.string.dilog_digtool_empty));\n\t\t\t\t\t\t}\n\t\t\t\t\t Xlsmake xls=new Xlsmake(xyz);\n\t\t\t\t try {\n xls.toxls(fname);\n commond.setToast( getApplication().getString(R.string.dilog_export_success));\n //Toast.makeText(getApplicationContext(), \"导出成功\", Toast.LENGTH_SHORT).show();\n } catch (RowsExceededException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n commond.setToast( getApplication().getString(R.string.dilog_export_fail));\n //Toast.makeText(getApplicationContext(), \"导出失败\", Toast.LENGTH_LONG).show();\n return ;\n } catch (WriteException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n commond.setToast( getApplication().getString(R.string.dilog_export_fail));\n //Toast.makeText(getApplicationContext(), \"导出失败\", Toast.LENGTH_LONG).show();\n return ;\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n commond.setToast( getApplication().getString(R.string.dilog_export_fail));\n //Toast.makeText(getApplicationContext(), \"导出失败\", Toast.LENGTH_LONG).show();\n return ;\n }\n\t\t\t\t}", "public static SpreadsheetConversionResult convertOdsToCSV(Path workbookFile, Path csvFile) throws IOException {\n return OdsConverter.convertToCSV(workbookFile, csvFile);\n }", "public void createCsvFile(String filePath, String []courses) {\n\t\tLogger.info(\"Creating CSV file containing the text: \");\n\t\tfor (int i=0;i<courses.length;i++){\n\t\t\tLogger.info(courses[i]);\n\t\t}\n\t\tFileWriter os;\n\t\ttry {\n\t\t\tos = new FileWriter(filePath);\n\t\t\tfor (int i=0;i<(courses.length)-1;i++){\n\t\t\t\tos.write(courses[i]);\n\t\t\t\tos.write(System.getProperty(\"line.separator\"));\n\t\t\t}\n\t\t\tos.write(courses[(courses.length)-1]);\n\t\t\t//os.write(fileContent2);\n\t\t\tos.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void exportFiles()\n\t{\n\t\tloading.setVisibility(View.VISIBLE);\n\t\t\n\t\t// Report String\n\t\t//----------------\n\t\tString reportString = \"Date,Location Latitude, Location Longitude,Vehicle,Description\\n\";\t\n\t\t\n\t\tStringBuilder reportBuilder = new StringBuilder();\n\t\treportBuilder.append(reportString);\n\t\t\n\t\tString objectString = \"\"+ \n\t\t\t\tincident.getDate()+\",\" +\n\t\t\t\tincident.getLatitude() + \",\" +\n\t\t\t\tincident.getLongitude()+\",\" +\n\t\t\t\tincident.getVehicleReg()+\",\" +\n\t\t\t\tincident.getDescription()+\",\" + \"\\n\";\n\t\t\n\t\treportBuilder.append(objectString);\n\t\t\n\t\t// Witnesses String\n\t\t//----------------\n\t\tString witnessString = \"witnessName,witnessEmail,witnessNumber,witnessStatement\\n\";\n\t\t\n\t\tStringBuilder witnessesBuilder = new StringBuilder();\n\t\twitnessesBuilder.append(witnessString);\n\t\t\n\t\tfor(int i=0; i<incident.getWitnesses().size(); i++)\n\t\t{\n\t\t\tobjectString = \"\"+ \n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessName\")+\",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessEmail\") + \",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessNumber\")+\",\" +\n\t\t\t\t\tincident.getWitnesses().get(i).get(\"witnessStatement\")+\",\" + \"\\n\";\n\t\t\t\n\t\t\twitnessesBuilder.append(objectString);\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Create file\n\t\t//===========================================\n\t\t// Incident Report\n\t\t//-------------------------------------------------\n\t\tfinal File reportFile = new File(getFilesDir() + \"/\" + \"incident_report.csv\");\n\t\treportFile.setReadable(true,false);\n\t\t\n\t\tif( reportFile != null )\n\t\t{\n\t\t try \n\t\t {\n\t\t \tFileOutputStream fOut = openFileOutput(\"incident_report.csv\", Context.MODE_WORLD_READABLE);\n\t\t \tOutputStreamWriter osw = new OutputStreamWriter(fOut); \n\t\t \tosw.write(reportBuilder.toString());\n\t\t\t\tosw.flush();\n\t\t\t\tosw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Witnesses file\n\t\t//-------------------------------------------------\n\t\tfinal File witnessesFile = new File(getFilesDir() + \"/\" + \"witnesses.csv\");\n\t\twitnessesFile.setReadable(true,false);\n\t\t\n\t\tif( witnessesFile != null )\n\t\t{\n\t\t try \n\t\t {\n\t\t \tFileOutputStream fOut = openFileOutput(\"witnesses.csv\", Context.MODE_WORLD_READABLE);\n\t\t \tOutputStreamWriter osw = new OutputStreamWriter(fOut); \n\t\t \tosw.write(witnessesBuilder.toString());\n\t\t\t\tosw.flush();\n\t\t\t\tosw.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//-------------------------------------------------\n\t\t\n\t\t// Media files\n\t\t//-------------------------------------------------\t\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"DCIncident\");\n\t\tquery.getInBackground(incident.getId(),new GetCallback<ParseObject>() \n\t\t{\n\t\t\t@Override\n\t\t\tpublic void done(final ParseObject parseIncident, ParseException e) \n\t\t\t{\n\t\t\t\tif(e == null)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t// Get number of photos attached\n\t\t\t\t\tParseQuery<ParseObject> queryPhotos = parseIncident.getRelation(\"incidentPhotos\").getQuery();\n\t\t\t\t\tqueryPhotos.findInBackground(new FindCallback<ParseObject>()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void done(List<ParseObject> parsePhotos, ParseException e) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tArrayList<byte[]> bytes = new ArrayList<byte[]>();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int i=0; i<parsePhotos.size(); i++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Get photo from the parse\n\t\t\t\t\t\t\t\tParseFile photo = (ParseFile) parsePhotos.get(i).get(\"photoFile\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tbytes.add(photo.getData());\n\t\t\t\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tphotoFiles = AssetsUtilities.saveIncidentPhoto(ReviewReportActivity.this, bytes);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Video\n\t\t\t\t\t\t\tParseFile parseVideo = (ParseFile) parseIncident.get(\"incidentVideo\");\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(parseVideo != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tparseVideo.getDataInBackground(new GetDataCallback()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void done(byte[] data, ParseException e) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(e == null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// Save file\n\t\t\t\t\t\t\t\t\t\t\tvideoFile = AssetsUtilities.saveIncidentVideo(ReviewReportActivity.this,data);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfinishSendingEmail(reportFile, witnessesFile);\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\telse\n\t\t\t\t\t\t\t\tfinishSendingEmail(reportFile, witnessesFile);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public static ByteArrayInputStream toexcelEduEmpReport(List<USEduEmpReportEntity> eduempreportlist) {\r\n\r\n\t\ttry (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {\r\n\t\t\tSheet sheet = workbook.createSheet(CommonConstants.SHEET);\r\n\r\n\t\t\t// Header\r\n\t\t\tRow headerRow = sheet.createRow(0);\r\n\r\n\t\t\tfor (int col = 0; col < CommonConstants.EDU_EMP_REPORT_HEADER.length; col++) {\r\n\t\t\t\tCell cell = headerRow.createCell(col);\r\n\t\t\t\tcell.setCellValue(CommonConstants.EDU_EMP_REPORT_HEADER[col]);\r\n\t\t\t}\r\n\r\n\t\t\tint rowIdx = 1;\r\n\t\t\tlogger.info(eduempreportlist);\r\n\t\t\tfor (USEduEmpReportEntity excel : eduempreportlist) {\r\n\t\t\t\tfor (int i = 0; i < excel.getCom().length; i++) {\r\n\t\t\t\t\tRow row = sheet.createRow(rowIdx++);\r\n\t\t\t\t\tif (excel.getRefid() != null)\r\n\t\t\t\t\t\trow.createCell(0).setCellValue(excel.getRefid());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trow.createCell(0).setCellValue(\" \");\r\n\t\t\t\t\tif (excel.getMiddlename() != null)\r\n\t\t\t\t\t\trow.createCell(1).setCellValue(\r\n\t\t\t\t\t\t\t\texcel.getFirstname() + \" \" + excel.getMiddlename() + \" \" + excel.getLastname());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trow.createCell(1).setCellValue(excel.getFirstname() + \" \" + excel.getLastname());\r\n\t\t\t\t\tif (excel.getDoctDegree() != null)\r\n\t\t\t\t\t\trow.createCell(2).setCellValue(excel.getDoctDegree());\r\n\t\t\t\t\telse if (excel.getMasterDegree() != null)\r\n\t\t\t\t\t\trow.createCell(2).setCellValue(excel.getMasterDegree());\r\n\t\t\t\t\telse if (excel.getBachDegree() != null)\r\n\t\t\t\t\t\trow.createCell(2).setCellValue(excel.getBachDegree());\r\n\t\t\t\t\telse if (excel.getAssDegree() != null)\r\n\t\t\t\t\t\trow.createCell(2).setCellValue(excel.getAssDegree());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trow.createCell(2).setCellValue(\" \");\r\n\t\t\t\t\tif (excel.getTotalExp() != null)\r\n\t\t\t\t\t\trow.createCell(3).setCellValue(excel.getTotalExp());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trow.createCell(3).setCellValue(\" \");\r\n\t\t\t\t\tif (excel.getRelExp() != null)\r\n\t\t\t\t\t\trow.createCell(4).setCellValue(excel.getRelExp());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trow.createCell(4).setCellValue(\" \");\r\n\t\t\t\t\tString[] strCom = excel.getCom();\r\n\t\t\t\t\tif (strCom[i] != null)\r\n\t\t\t\t\t\trow.createCell(5).setCellValue(strCom[i]);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trow.createCell(5).setCellValue(\" \");\r\n\t\t\t\t\tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"MM-dd-yyyy\");\r\n\t\t\t\t\tDate[] dateFrom = excel.getComFrom();\r\n\t\t\t\t\tString dateFrom1 = simpleDateFormat.format(dateFrom[i]);\r\n\t\t\t\t\tif (dateFrom1 != null)\r\n\t\t\t\t\t\trow.createCell(6).setCellValue(dateFrom1);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trow.createCell(6).setCellValue(\" \");\r\n\t\t\t\t\tDate[] dateTo = excel.getComTo();\r\n\t\t\t\t\tString dateTo1 = simpleDateFormat.format(dateTo[i]);\r\n\t\t\t\t\tif (dateTo1 != null)\r\n\t\t\t\t\t\trow.createCell(7).setCellValue(dateTo1);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trow.createCell(7).setCellValue(\" \");\r\n\t\t\t\t\tif (excel.getExTCSEmp() != null)\r\n\t\t\t\t\t\trow.createCell(8).setCellValue(excel.getExTCSEmp());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trow.createCell(8).setCellValue(\" \");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tworkbook.write(out);\r\n\t\t\treturn new ByteArrayInputStream(out.toByteArray());\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());\r\n\t\t}\r\n\t}", "private Result outputCsv(Request request, Entry entry) throws Exception {\r\n Result result = getCsvResult(request, entry);\r\n result.setReturnFilename(\r\n IOUtil.stripExtension(getStorageManager().getFileTail(entry))\r\n + \".csv\");\r\n result.setMimeType(\"text/csv\");\r\n\r\n return result;\r\n }", "private void CreateNewFile() {\n\tcheckState();\n\t\n\tif (CanR=CanW=true)\n\t{\n\t\t\n\t\ttry {\n\t\t root = Environment.getExternalStorageDirectory();\n\t\t \n\t\t if (root.canWrite()){\n\t\t gpxfile = new File(root, \"Speed_SD.csv\");\n\t\t gpxwriter = new FileWriter(gpxfile,true);\n\t\t out = new BufferedWriter(gpxwriter);\nout.append(\"\"+\",\"+\"\"+\",\"+\"\");\n\t\t out.newLine();\n\t\t }\n\t\t} catch (IOException e) {\n\t\t //Log.e(, \"Could not write file \" + e.getMessage());\ne.printStackTrace();\n\t\t\n\t}\n\t\t\n}\n\t\t}", "protected void generarReporte(String fileNameOut){\n LinkedList datos;\n LinkedList listaHojas;\n frmHoja tmpSheet;\n Clases.Dato tmpDato;\n int numRows = 0;\n int numCols = 0;\n try{\n sw = new FileWriter(fileNameOut,true);\n //obtener lista de hojas desde el workplace\n listaHojas = wp.getListaHojas();\n\n //escribir encabezado de HTML a stream\n sw.write(\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\">\\n\");\n sw.write(\"<html>\\n<head>\\n<meta content=\\\"text/html; charset=ISO-8859-1\\\" http-equiv=\\\"content-type\\\">\\n\");\n sw.write(\"<title>JExcel</title>\\n\");\n sw.write(\"</head>\\n<body>\\n\");\n sw.write(\"<big><span style=\\\"font-weight: bold;\\\">Hoja generada por JExcel</span></big><br>\\n\");\n sw.write(\"<small>Universidad Mariano Gálvez de Guatemala</small><br>\\n<br>\\n\");\n sw.write(\"<small>Extensión Morales Izabal</small><br>\\n<br>\\n\");\n sw.write(\"<small>(C) Amy C. Leiva - 4890-15-</small><br>\\n<br>\\n\");\n // Iterar sobre cada hoja en listaSheets\n for (int i = 0; i < listaHojas.size();i++){\n // obtener maximo numero de datos\n tmpSheet = (frmHoja) listaHojas.get(i);\n\n numRows = tmpSheet.getHoja().getRowCount();\n numCols = tmpSheet.getHoja().getColumnCount();\n sw.write(\"<table style=\\\"text-align: left; width: 100%;\\\" border=\\\"1\\\" cellpadding=\\\"2\\\" cellspacing=\\\"2\\\">\\n\");\n sw.write(\"<tbody>\\n\");\n sw.write(\" <tr> <td colspan=\\\"4\\\" rowspan=\\\"1\\\"><big><span style=\\\"font-weight: bold;\\\">\");\n sw.write(\"Nombre de la Hoja: \" + tmpSheet.getId());\n sw.write(\"</span></big></td>\\n</tr>\\n\");\n sw.write(\" <tr><td>Fila</td><td>Columna</td><td>Expresi&oacute;n</td> <td>Valor Num&eacute;rico</td> </tr>\\n\");\n // obtener lista de datos desde matriz\n if( tmpSheet.getHoja().getTabla().estaVacia() == false){ // si la tabla tiene datos\n datos = tmpSheet.getHoja().getTabla().getSubset(1,1,numCols,numRows);\n //escribir tabla con datos generados\n for (int j = 0; j < datos.size();j++){\n tmpDato = (Clases.Dato) datos.get(j); \n sw.write(\"<tr>\\n\");\n sw.write(\"<td>\" + tmpDato.getRow() + \"</td>\\n\");\n sw.write(\"<td>\" + tmpDato.getCol() + \"</td>\\n\");\n sw.write(\"<td>\" + tmpDato.getExpr() + \"</td>\\n\");\n sw.write(\"<td>\" + tmpDato.eval() + \"</td>\\n\");\n sw.write(\"</tr>\\n\");\n }\n }\n else{\n sw.write(\"<tr><td colspan=\\\"4\\\" rowspan=\\\"1\\\"> Hoja Vacia... </td></tr>\");\n }\n sw.write(\" </tbody></table>\\n<br><br><br>\");\n // sw.write();\n // sw.write();\n }\n //escribir fin de datos\n sw.write(\"</body></html>\");\n //escribir a archivo de salida\n sw.close();\n }\n catch(Exception e){\n System.out.println(\"No se pudo guardar archivo:\" + e);\n }\n \n }", "public static void writeToCsv(String path, String content) {\n File csvFile = new File(path);\n try (PrintWriter pw = new PrintWriter(csvFile)) {\n pw.println(content);\n } catch (IOException e) {\n System.out.println(e.getStackTrace());\n }\n }", "public CSVExporter() {\n super(NAME, CONTENTTYPE);\n }", "public static void writeExcelFileForSingleFields(String ruleDataExcelSheetFilePath, List rowDataArr_ForIndividual,String editionYear,int fieldNumber,String state,String realPath,String fieldName,int recentRuleId) throws InvalidFormatException {\n int rowCount = 1;\r\n boolean sheetDupCheck=false;\r\n String fieldNames[]=fieldName.split(\"-\");\r\n String fieldNameValue=fieldNames[0];\r\n try {\r\n \t XSSFWorkbook workbook ;\r\n // \tFile file = new File(\"D:\\\\latest\\\\SOUTH DAKOTA_BUFFALO_5_5.xlsx\");\r\n \t File file = new File(realPath+MappingConstants.EXCELFULEFORRULESCREATION+\".xlsx\"); \r\n \tif (file.exists() == false) {\r\n \t\tworkbook = new XSSFWorkbook();\r\n \t\t XSSFSheet sheet = workbook.createSheet(state+\"_\"+editionYear+\"_\"+fieldNumber);\r\n\t\t//\t Row row1 = sheet.createRow(0);\r\n\t\t//\t Cell cell1 = row1.createCell(0);\r\n\t\t//\t cell1.setCellValue(\"Rule Id:\"+recentRuleId);\r\n \t\t\tfor (int i=0; i<rowDataArr_ForIndividual.size(); i++) {\r\n \t\t\t\tList rowDataList = (ArrayList)rowDataArr_ForIndividual.get(i);\r\n \t\t\t Row row = sheet.createRow(rowCount);\r\n \t\t\t int columnCount = 0;\r\n \t\t\t for (int j = 0; j < rowDataList.size(); j++) {\r\n \t\t\t \tObject colObj = rowDataList.get(j);\r\n \t\t\t Cell cell = row.createCell(columnCount);\r\n \t\t\t CellUtil.setAlignment(cell, workbook, CellStyle.ALIGN_CENTER);\r\n \t\t\t if (colObj instanceof String) {\r\n \t\t\t cell.setCellValue((String) colObj);\r\n \t\t\t } else if (colObj instanceof Integer) {\r\n \t\t\t cell.setCellValue((Integer) colObj);\r\n \t\t\t }\r\n \t\t\t columnCount++;\r\n \t\t\t }\r\n \t\t\t rowCount++;\r\n \t\t\t}\r\n \t\t\tFileOutputStream outputStream = new FileOutputStream(file);\r\n \t\t\tworkbook.write(outputStream);\r\n \t}\r\n \telse{\r\n \t\tint sheetOfDup=0;\r\n \t\tint lastRowInSheet=0;\r\n \t\tfinal InputStream is = new FileInputStream(file);\r\n \t\tworkbook = new XSSFWorkbook(is);\r\n \t\tint noOfSheets=workbook.getNumberOfSheets();\r\n \t\tfor(int sheetCount=0;noOfSheets>sheetCount;sheetCount++){\r\n \t\t\tString sheetOfType = workbook.getSheetAt(sheetCount).getSheetName();\r\n \t\t\tlastRowInSheet = workbook.getSheetAt(sheetCount).getLastRowNum();\r\n \t\t\tif(sheetOfType.equals(state+\"_\"+editionYear+\"_\"+fieldNumber)){\r\n \t\t\t\t sheetDupCheck=true;\r\n \t\t\t\tsheetOfDup=sheetCount;\r\n \t\t\t\tlastRowInSheet=lastRowInSheet+1;\r\n \t\t\t\t break;\r\n \t\t\t}\r\n \t\t\telse{\r\n \t\t\t\tsheetDupCheck=false;\r\n \t\t\t}\r\n \t\t}\r\n \t\t if(sheetDupCheck){\r\n \t\t\tXSSFSheet sheetToAddData= workbook.getSheetAt(sheetOfDup);\r\n\t \t\t\t Row row1 = sheetToAddData.createRow(lastRowInSheet);\r\n\t \t\t\t Cell cell1 = row1.createCell(0);\r\n\t \t\t\t cell1.setCellValue(MappingConstants.ruleIdInExcel+recentRuleId);\r\n\t \t\t\t lastRowInSheet++;\r\n\t\t\t\tfor (int i=0; i<rowDataArr_ForIndividual.size(); i++) {\r\n\t\t\t\t\t\tList rowDataList = (ArrayList)rowDataArr_ForIndividual.get(i);\r\n\t\t\t\t\t\t/*int colOfLastInserted= workbook.getSheetAt(sheetOfDup).;*/\r\n\t\t\t\t\t Row row = sheetToAddData.createRow(lastRowInSheet);\r\n\t\t\t\t\t int columnCount = 0;\r\n\t\t\t\t\t\t for (int j = 0; j < rowDataList.size(); j++) {\r\n\t\t\t\t\t\t \tObject colObj = rowDataList.get(j);\r\n\t\t\t\t\t\t Cell cell = row.createCell(columnCount);\r\n\t\t\t\t\t\t CellUtil.setAlignment(cell, workbook, CellStyle.ALIGN_CENTER);\r\n\t\t\t\t\t\t if (colObj instanceof String) {\r\n\t\t\t\t\t\t cell.setCellValue((String) colObj);\r\n\t\t\t\t\t\t } else if (colObj instanceof Integer) {\r\n\t\t\t\t\t\t cell.setCellValue((Integer) colObj);\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t columnCount++;\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t lastRowInSheet++;\r\n\t\t\t\t}\r\n\t\t\t\tFileOutputStream outputStream = new FileOutputStream(file);\r\n\t\t\t\tworkbook.write(outputStream);\r\n \t\t}\r\n \t\telse{\r\n \t\t\tXSSFSheet sheet = workbook.createSheet(state+\"_\"+editionYear+\"_\"+fieldNumber);\r\n \t\t Row row1 = sheet.createRow(0);\r\n\t \t\t\t Cell cell1 = row1.createCell(0);\r\n\t \t\t\t cell1.setCellValue(\"Rule Id:\"+recentRuleId);\r\n\t\t\t\tfor (int i=0; i<rowDataArr_ForIndividual.size(); i++) {\r\n\t\t\t\t\t\tList rowDataList = (ArrayList)rowDataArr_ForIndividual.get(i);\r\n\t\t\t\t\t Row row = sheet.createRow(rowCount);\r\n\t\t\t\t\t int columnCount = 0;\r\n\t\t\t\t\t\t for (int j = 0; j < rowDataList.size(); j++) {\r\n\t\t\t\t\t\t \tObject colObj = rowDataList.get(j);\r\n\t\t\t\t\t\t Cell cell = row.createCell(columnCount);\r\n\t\t\t\t\t\t CellUtil.setAlignment(cell, workbook, CellStyle.ALIGN_CENTER);\r\n\t\t\t\t\t\t if (colObj instanceof String) {\r\n\t\t\t\t\t\t cell.setCellValue((String) colObj);\r\n\t\t\t\t\t\t } else if (colObj instanceof Integer) {\r\n\t\t\t\t\t\t cell.setCellValue((Integer) colObj);\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t columnCount++;\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t rowCount++;\r\n\t\t\t\t}\r\n\t\t\t\tFileOutputStream outputStream = new FileOutputStream(file);\r\n\t\t\t\tworkbook.write(outputStream);\r\n \t\t}\r\n \t}\r\n \t\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t}", "public void saveAsCsv() {\n\n try(BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(\"saves/data.csv\"))){\n for(Publication book : library){\n StringBuilder stringBuilder = new StringBuilder();\n\n stringBuilder.append(\"\\\"\").append(book.getClass().getSimpleName()).append(\"\\\"\"); // type\n stringBuilder.append(\",\"); // delimiter\n stringBuilder.append(\"\\\"\").append(book.getTitle()).append(\"\\\"\"); // title\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getAuthor().toString()).append(\"\\\"\"); // author\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getPages()).append(\"\\\"\"); // pages\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getIsbn()).append(\"\\\"\"); // isbn\n stringBuilder.append(\",\");\n stringBuilder.append(\"\\\"\").append(book.getReleaseYear()).append(\"\\\"\"); // year\n stringBuilder.append(\"\\n\");\n\n bufferedWriter.write(stringBuilder.toString()); // creates a line of one publication information and puts it to file\n }\n } catch (IOException e){\n System.out.println(\"IOException occurred: \" + e.getMessage());\n }\n }", "public String[][] openExcelFile(String inputFilePath);", "public static void main(String[] args)throws Exception {\n\t\t\r\n\t\tFileInputStream inFile = new FileInputStream(\"C:\\\\Users\\\\vshadmin\\\\Desktop\\\\Book1.xlsx\");\r\n\t\tXSSFWorkbook book = new XSSFWorkbook(inFile);\r\n\t\tXSSFSheet sheet = book.getSheet(\"Sheet1\");\r\n\t\t\r\n\t//\tsheet.getRow(2).getCell(1).setCellValue(\"LNT\");\r\n\t//\tsheet.getRow(2).getCell(1).setCellValue(\"LNT\");\r\n\t\t//sheet.createRow(3).createCell(2).setCellValue(\"LNT\");\r\n\t\t\r\n\t\t\r\n\t\tFileOutputStream op = new FileOutputStream(\"C:\\\\Users\\\\vshadmin\\\\Desktop\\\\Book1.xlsx\");\r\n\t\tbook.write(op);\r\n\t}", "void onActionFromExport() {\n\t\ttry {\n\t\t\tHSSFWorkbook document = new HSSFWorkbook();\n\t\t\tHSSFSheet sheet = ReportUtil.createSheet(document);\n\n\t\t\tsheet.setMargin((short) 0, 0.5);\n\t\t\tReportUtil.setColumnWidths(sheet, 0, 0.5, 1, 0.5, 2, 2, 3, 2, 3, 2, 4, 3, 5, 2, 6, 2, 7, 2, 8, 3, 9, 3, 10,\n\t\t\t\t\t3, 11, 2, 12, 2);\n\n\t\t\tMap<String, HSSFCellStyle> styles = ReportUtil.createStyles(document);\n\n\t\t\tint sheetNumber = 0;\n\t\t\tint rowIndex = 1;\n\t\t\tint colIndex = 1;\n\t\t\tLong index = 1L;\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2, messages.get(\"empList\"), styles.get(\"title\"), 5);\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, ++rowIndex, 1,\n\t\t\t\t\tmessages.get(\"date\") + \": \" + format.format(new Date()), styles.get(\"plain-left-wrap\"), 5);\n\t\t\trowIndex += 2;\n\n\t\t\t/* column headers */\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 1, messages.get(\"number-label\"),\n\t\t\t\t\tstyles.get(\"header-wrap\"));\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2, messages.get(\"firstname-label\"),\n\t\t\t\t\tstyles.get(\"header-wrap\"));\n\n\t\t\tif (lastname) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"lastname-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (origin1) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"persuasion-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (register) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"register-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (status) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"status-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (gender) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"gender-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (occ) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"occupation-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (birthday) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"birthDate-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (phoneNo) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"phoneNo-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (email) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"email-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (org) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"organization-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (appointment) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"appointment-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegree) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цэргийн цол\", styles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegreeStatus) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цолны статус\",\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegreeDate) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цол авсан огноо\",\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (TotalWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"TotalOrgWorkedYear-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (StateWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"stateWorkedYear-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"courtOrgTotalWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtMilitaryWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"CourtMilitaryWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtSimpleWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"CourtSimpleWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (familyCount) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"familyCount-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (childCount) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"childCount-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tReportUtil.setRowHeight(sheet, rowIndex, 3);\n\n\t\t\trowIndex++;\n\t\t\tif (listEmployee != null)\n\t\t\t\tfor (Employee empDTO : listEmployee) {\n\n\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\tlistEmployee.indexOf(empDTO) + 1 + \"\", styles.get(\"plain-left-wrap-border\"));\n\n\t\t\t\t\tif (lastname) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getLastname() != null) ? empDTO.getLastname() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++, empDTO.getFirstName(),\n\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\n\t\t\t\t\tif (origin1) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getOrigin().getName() != null) ? empDTO.getOrigin().getName() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (register) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getRegisterNo() != null) ? empDTO.getRegisterNo() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (status) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getEmployeeStatus() != null) ? empDTO.getEmployeeStatus().name() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (gender) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\tmessages.get((empDTO.getGender() != null) ? empDTO.getGender().toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (occ) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getOccupation() != null) ? empDTO.getOccupation().getName() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (birthday) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getBirthDate() != null) ? format.format(empDTO.getBirthDate()) : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (phoneNo) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getPhoneNo() != null) ? empDTO.getPhoneNo() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (email) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.geteMail() != null) ? empDTO.geteMail() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (org) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getOrganization() != null) ? empDTO.getOrganization().getName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (appointment) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getAppointment() != null) ? empDTO.getAppointment().getAppointmentName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegree) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? dao.getEmployeeMilitary(empDTO.getId()).getMilitary().getMilitaryName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegreeStatus) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? dao.getEmployeeMilitary(empDTO.getId()).getDegreeStatus().name() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegreeDate) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? format.format(dao.getEmployeeMilitary(empDTO.getId()).getOlgosonOgnoo())\n\t\t\t\t\t\t\t\t\t\t: \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (TotalWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getTotalOrgWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getTotalOrgWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\tif (StateWorkedYear) {\n\t\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t\t((getStateWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t\t? getStateWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (CourtWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtOrgTotalWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtOrgTotalWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (CourtMilitaryWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtMilitaryWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtMilitaryWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (CourtSimpleWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtSimpleWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtSimpleWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (familyCount) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex,\n\t\t\t\t\t\t\t\tcolIndex++, ((getFamilyCountExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getFamilyCountExport(empDTO.getId()) : \"0\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (childCount) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex,\n\t\t\t\t\t\t\t\tcolIndex++, ((getChildCountExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getChildCountExport(empDTO.getId()) : \"0\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tReportUtil.setRowHeight(sheet, rowIndex, 3);\n\t\t\t\t\trowIndex++;\n\t\t\t\t\tindex++;\n\t\t\t\t\tcolIndex = 1;\n\n\t\t\t\t}\n\n\t\t\trowIndex += 2;\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 1,\n\t\t\t\t\t\"ТАЙЛАН ГАРГАСАН: \" + \"..................................... / \"\n\t\t\t\t\t\t\t+ loginState.getEmployee().getLastname().charAt(0) + \".\"\n\t\t\t\t\t\t\t+ loginState.getEmployee().getFirstName() + \" /\",\n\t\t\t\t\tstyles.get(\"plain-left-wrap\"), 8);\n\t\t\trowIndex++;\n\n\t\t\tOutputStream out = response.getOutputStream(\"application/vnd.ms-excel\");\n\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"employeeList.xls\\\"\");\n\n\t\t\tdocument.write(out);\n\t\t\tout.close();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void exportCSV(ActionEvent actionEvent) {\n\t\tLOGGER.info(\"Exportando ficheros CSV\");\n\t\ttry {\n\t\t\tDirectoryChooser dir = new DirectoryChooser();\n\t\t\tFile file = new File(ConfigHelper.getProperty(\"csvFolderPath\", \"./\"));\n\t\t\tif (file.exists() && file.isDirectory()) {\n\t\t\t\tdir.setInitialDirectory(file);\n\t\t\t}\n\n\t\t\tFile selectedDir = dir.showDialog(controller.getStage());\n\t\t\tif (selectedDir != null) {\n\t\t\t\tCSVBuilderAbstract.setPath(selectedDir.toPath());\n\t\t\t\tCharsets charset = controller.getMainConfiguration().getValue(MainConfiguration.GENERAL, \"charset\");\n\t\t\t\tCSVExport.run(charset.get());\n\t\t\t\tUtilMethods.infoWindow(I18n.get(\"message.export_csv_success\") + selectedDir.getAbsolutePath());\n\t\t\t\tConfigHelper.setProperty(\"csvFolderPath\", selectedDir.getAbsolutePath());\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(\"Error al exportar ficheros CSV.\", e);\n\t\t\tUtilMethods.errorWindow(I18n.get(\"error.savecsvfiles\"), e);\n\t\t}\n\t}", "public static ByteArrayInputStream entityToExcel(List<ExcelModel> exceldownload) {\r\n\r\n\t\ttry (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {\r\n\t\t\tSheet sheet = workbook.createSheet(CommonConstants.SHEET);\r\n\r\n\t\t\t// Header\r\n\t\t\tRow headerRow = sheet.createRow(0);\r\n\r\n\t\t\tfor (int col = 0; col < CommonConstants.HEADERs.length; col++) {\r\n\t\t\t\tCell cell = headerRow.createCell(col);\r\n\t\t\t\tcell.setCellValue(CommonConstants.HEADERs[col]);\r\n\t\t\t}\r\n\r\n\t\t\tint rowIdx = 1;\r\n\r\n\t\t\tfor (ExcelModel excel : exceldownload) {\r\n\t\t\t\tRow row = sheet.createRow(rowIdx++);\r\n\r\n\t\t\t\trow.createCell(0).setCellValue(excel.getFirstname());\r\n\t\t\t\trow.createCell(1).setCellValue(excel.getMiddlename());\r\n\t\t\t\trow.createCell(2).setCellValue(excel.getLastname());\r\n\t\t\t\trow.createCell(3).setCellValue(excel.getEmailid());\r\n\t\t\t\trow.createCell(4).setCellValue(excel.getCreatePassword());\r\n\r\n\t\t\t}\r\n\r\n\t\t\tworkbook.write(out);\r\n\t\t\treturn new ByteArrayInputStream(out.toByteArray());\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());\r\n\t\t}\r\n\t}", "@RequestMapping(\"/userExcelExport.action\")\r\n @Secured(\"ROLE_ADMIN\")\r\n public void export(HttpServletResponse response) throws IOException {\n \r\n List<User> users = userService.findAll();\r\n\r\n response.setContentType(\"application/vnd.ms-excel\");\r\n response.setHeader(\"extension\", \"xls\");\r\n\r\n OutputStream out = response.getOutputStream();\r\n\r\n Workbook workbook = new HSSFWorkbook();\r\n CreationHelper createHelper = workbook.getCreationHelper();\r\n\r\n CellStyle headerStyle = workbook.createCellStyle();\r\n Font headerFont = workbook.createFont();\r\n headerFont.setFontHeightInPoints((short)10);\r\n headerFont.setBoldweight(Font.BOLDWEIGHT_BOLD);\r\n headerStyle.setFont(headerFont);\r\n\r\n Sheet sheet = workbook.createSheet();\r\n\r\n sheet.setColumnWidth(0, 20 * 256);\r\n sheet.setColumnWidth(1, 20 * 256);\r\n sheet.setColumnWidth(2, 20 * 256);\r\n\r\n Row row = sheet.createRow(0);\r\n\r\n Cell c = row.createCell(0);\r\n c.setCellStyle(headerStyle);\r\n c.setCellValue(createHelper.createRichTextString(\"Username\"));\r\n\r\n c = row.createCell(1);\r\n c.setCellStyle(headerStyle);\r\n c.setCellValue(createHelper.createRichTextString(\"First Name\"));\r\n\r\n c = row.createCell(2);\r\n c.setCellStyle(headerStyle);\r\n c.setCellValue(createHelper.createRichTextString(\"Last Name\"));\r\n\r\n int rowNo = 1;\r\n for (User user : users) {\r\n row = sheet.createRow(rowNo);\r\n\r\n c = row.createCell(0);\r\n c.setCellValue(createHelper.createRichTextString(user.getUserName()));\r\n\r\n c = row.createCell(1);\r\n c.setCellValue(createHelper.createRichTextString(user.getFirstName()));\r\n\r\n c = row.createCell(2);\r\n c.setCellValue(createHelper.createRichTextString(user.getName()));\r\n\r\n rowNo++;\r\n }\r\n\r\n workbook.write(out);\r\n\r\n out.close();\r\n\r\n }", "public void ifFileExistsAndCreate() {\n DbHelper dbHelper = new DbHelper(context);\n File file = new File(directory_path);\n if (!file.exists()) {\n file.mkdirs();\n }\n SQLiteToExcel sqliteToExcel2 = new SQLiteToExcel(context, dbHelper.getDatabaseName(), directory_path);\n sqliteToExcel2.exportAllTables(fileName, new SQLiteToExcel.ExportListener() {\n\n @Override\n public void onStart() {\n Log.d(\"start\", \"Started Exported\");\n\n }\n\n @Override\n public void onCompleted(String filePath) {\n Log.d(\"succesfully\", \"Successfully Exported\");\n }\n\n @Override\n public void onError(Exception e) {\n Log.d(\"error\", e.getMessage());\n\n }\n });\n }", "public static String[][] writeXL(String fPathe, String fSheet) throws Exception{\n\t\n\t\tFile outFile = new File(fPath);\n\t\tHSSFWorkbook WB = new HSSFWorkbook();\n\t\tHSSFSheet osSheet = WB.createSheet(fSheet);\n\t\tint xR_TS = xData.length;\n\t\tint xC_TS = xData[0].length;\n\t\tfor (int myrow =0; myrow < xR_TS; myrow++) {\n\t\t\tHSSFRow row = osheet.createRow(myrow);\n\t\t}\n\t\t//System.out.println(\"Total Rows in Excel are \" + xRows);)\n}", "public writeXLSX(String s) throws IOException {\n this.fileName = s;\n wb = new XSSFWorkbook();\n sheet = wb.createSheet(\"Sorting Algorithm Runtimes\");\n }", "public void writeToCsv()\r\n {\r\n //listeye urunler eklendiginde cagrılacak (Products.csv)\r\n PrintWriter pWrite = null;\r\n try {\r\n pWrite = new PrintWriter(new File(\"Products.csv\"));\r\n }\r\n catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n StringBuilder sBuilder = new StringBuilder();\r\n for (Product theProduct : allProducts ) {\r\n if (theProduct.getSize() == null && theProduct.getGender()!= null){\r\n sBuilder.append(theProduct.getName() + \";\" + theProduct.getPrice() + \";\"\r\n + theProduct.getGender() + \";\" + theProduct.getTag() + \";\"\r\n + theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n else if(theProduct.getGender() == null && theProduct.getSize() == null){\r\n sBuilder.append( theProduct.getName() + \";\" + theProduct.getPrice() + \";\"\r\n + theProduct.getTag() + \";\"+\r\n theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n else {\r\n sBuilder.append( theProduct.getName() + \";\" + theProduct.getPrice() + \";\" + theProduct.getSize() + \";\"\r\n + (theProduct).getGender() + \";\" + theProduct.getTag() + \";\"\r\n + theProduct.getContent() + \";\" + theProduct.getNumberOfProduct() + \"\\n\");\r\n }\r\n\r\n }\r\n pWrite.write(sBuilder.toString());\r\n pWrite.flush();\r\n pWrite.close();\r\n }", "public static SpreadsheetConversionResult convertExcelToCSV(Path workbookFile, Path csvFile) throws IOException {\n try {\n long lines = ExcelConverter.convert(workbookFile, new CsvSpreadsheetConsumer(new FileWriter(csvFile.toFile())));\n return new SpreadsheetConversionResult(workbookFile, csvFile, ',','\"', (int) lines);\n } catch (InvalidFormatException e) {\n throw new IOException(e);\n }\n }", "private void writeCsv(float[] vals, String stimulus, PrintWriter outfile) throws FileNotFoundException {\n for (int i = 0; i < vals.length; i++) {\n outfile.append(vals[i] + \",\");\n }\n outfile.append(stimulus);\n outfile.append(\"\\n\");\n\n }", "public void WriteDataToExcel(String SheetName,int RowNumber,int ColumnNumber,String Value)\n\t{\t \n\t\tDate dNow = new Date( );\n\t\tSimpleDateFormat ft =new SimpleDateFormat (\"MMddYYYY\");\n\t\t\n\t\t try\n\t\t {\n\t\t\t FileInputStream fstream = new FileInputStream(System.getProperty(\"user.dir\")+\"//TestResult_\"+ft.format(dNow)+\".xls\");\n\t\t\t org.apache.poi.ss.usermodel.Workbook wb = (org.apache.poi.ss.usermodel.Workbook)WorkbookFactory.create(fstream); \n\t\t\t Sheet sheet =(Sheet)wb.getSheetAt(0); \n\t\t\t Row row = (Row)((org.apache.poi.ss.usermodel.Sheet)sheet).getRow(RowNumber); \n\t\t\t Cell cell=row.createCell(ColumnNumber);\n\t\t\t cell.setCellValue(Value);\n\t\t\t FileOutputStream fileout=new FileOutputStream(System.getProperty(\"user.dir\")+\"//PG HealthCheck List_\"+ft.format(dNow)+\".xls\");\n\t\t\t wb.write(fileout);\n\t\t\t fileout.close();\n\t\t }\n\t\t catch (Exception e){//Catch exception if any\n\t\t\t assertTrue(false);\n\t\t }\t\t\n\t}", "public void validarExportXLS() throws IOException {\n exportXLS_NF();\n }", "@SuppressWarnings(\"deprecation\")\r\n\tpublic static void writeRowInExcel(String[] dataToWrite, String ExcelFile) throws IOException {\n\t\tFileInputStream fis = new FileInputStream(ExcelFile);\r\n\t\tXSSFWorkbook workbook = new XSSFWorkbook(fis);\r\n\t\tXSSFSheet sheet = workbook.getSheetAt(0);\r\n\t\ttry {\r\n\t\t\t String[] header = {\"Company Name\", \"Prev. Close\", \"Open Price\"};\r\n\t\t\t for (int i = 0; i<=9;i++){\r\n\t\t\t\t String[] separateData = dataToWrite[i].split(\",\");\r\n\t\t\t\t XSSFCell cell0 = sheet.getRow(i).createCell(0);\r\n\t\t\t\t XSSFCell cell1 = sheet.getRow(i).createCell(1);\r\n\t\t\t\t XSSFCell cell2 = sheet.getRow(i).createCell(2);\r\n\t\t\t\t \r\n\t\t\t\t if (i==0) {\r\n\t\t\t\t\t cell0.setCellValue(header[0]);\r\n\t\t\t\t\t cell1.setCellValue(header[1]);\r\n\t\t\t\t\t cell2.setCellValue(header[2]);\r\n\t\t\t\t }\r\n\t\t\t\t else {\r\n\t\t\t\t\t cell0.setCellValue(separateData[0]);\r\n\t\t\t\t\t cell1.setCellValue(separateData[1]);\r\n\t\t\t\t\t cell2.setCellValue(separateData[2]);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t} catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tworkbook.close();\r\n\t\t}\r\n\t}", "@Override\n public void escribirExcel(String pathPlan, String pathDeex, String nombResa) throws Exception {\n LOGGER.info(\"Iniciando escritura del archivo en excel\");\n\n LOGGER.debug(\"Ruta de la plantilla {}\", pathPlan);\n LOGGER.debug(\"Ruta donde se va a escribir la plantilla {} \", pathDeex);\n\n //Archivo Origen\n File archOrig = null;\n //Archivo Destino\n File archDest = null;\n //ruta completa de la plantilla\n String pathDefi = pathDeex + File.separator + nombResa;\n //Registra del archivo de excel\n Row row = null;\n //Celda en el archivo de excel\n Cell cell;\n //Hoja de excel\n Sheet sheet = null;\n //Numero de hojas en el libro de excel\n int numberOfSheets;\n //Constantes\n final String NOMBRE_HOJA = \"RESULTADOS EVALUACION\";\n // Fila y columna para \n int fila = 0;\n int columna = 0;\n //Fila inicio evidencia\n int filaEvid;\n\n try {\n archOrig = new File(pathPlan);\n\n if (!archOrig.exists()) {\n LOGGER.debug(\"Plantilla no existe en la ruta {} \", pathPlan);\n throw new IOException(\"La plantilla no existe en la ruta \" + pathPlan);\n }\n\n archDest = new File(pathDeex);\n\n if (!archDest.exists()) {\n LOGGER.debug(\"Ruta no existe donde se va a depositar el excel {} , se va a crear\", pathDeex);\n archDest.mkdirs();\n }\n\n LOGGER.info(\"Ruta del archivo a crear {}\", pathDefi);\n archDest = new File(pathDefi);\n\n if (!archDest.exists()) {\n LOGGER.info(\"No existe el archivo en la ruta {}, se procede a la creacion \", pathDefi);\n archDest.createNewFile();\n } else {\n\n LOGGER.info(\"el archivo que se requiere crear, ya existe {} se va a recrear\", pathDefi);\n archDest.delete();\n LOGGER.info(\"archivo en la ruta {}, borrado\", pathDefi);\n archDest.createNewFile();\n\n LOGGER.info(\"archivo en la ruta {}, se vuelve a crear\", pathDefi);\n\n }\n\n LOGGER.info(\"Se inicia con la copia de la plantilla de la ruta {} a la ruta {} \", pathPlan, pathDefi);\n try (FileChannel archTror = new FileInputStream(archOrig).getChannel();\n FileChannel archTrDe = new FileOutputStream(archDest).getChannel();) {\n\n archTrDe.transferFrom(archTror, 0, archTror.size());\n\n LOGGER.info(\"Termina la copia del archivo\");\n\n } catch (Exception e) {\n LOGGER.info(\"Se genera un error con la transferencia {} \", e.getMessage());\n throw new Exception(\"Error [\" + e.getMessage() + \"]\");\n }\n\n LOGGER.info(\"Se inicia con el diligenciamiento del formato \");\n\n LOGGER.info(\"Nombre Archivo {}\", archDest.getName());\n if (!archDest.getName().toLowerCase().endsWith(\"xls\")) {\n throw new Exception(\"La plantilla debe tener extension xls\");\n }\n\n try (FileInputStream fis = new FileInputStream(archDest);\n Workbook workbook = new HSSFWorkbook(fis);\n FileOutputStream fos = new FileOutputStream(archDest);) {\n\n if (workbook != null) {\n numberOfSheets = workbook.getNumberOfSheets();\n LOGGER.debug(\"Numero de hojas {}\", numberOfSheets);\n\n LOGGER.info(\"Hoja seleccionada:{}\", NOMBRE_HOJA);\n sheet = workbook.getSheetAt(0);\n\n fila = 5;\n\n LOGGER.info(\"Se inicia con la escritura de las oportunidades de mejora\");\n\n LOGGER.info(\"Creando las celdas a llenar\");\n\n for (int numeFila = fila; numeFila < this.listOpme.size() + fila; numeFila++) {\n\n LOGGER.info(\"Fila {} \", numeFila);\n if (numeFila > 8) {\n\n copyRow(workbook, sheet, numeFila - 2, numeFila - 1);\n sheet.addMergedRegion(new CellRangeAddress(numeFila - 1, numeFila - 1, 1, 4));\n sheet.addMergedRegion(new CellRangeAddress(numeFila - 1, numeFila - 1, 6, 7));\n\n }\n\n }\n\n LOGGER.info(\"Terminando de llenar celdas\");\n LOGGER.info(\"Poblar registros desde {} \", fila);\n\n for (OptuMejo optuMejo : this.listOpme) {\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 1. Valor Capacitacion tecnica {}\", fila, optuMejo.getCapaTecn());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(1);\n\n cell.setCellValue(optuMejo.getCapaTecn());\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 6. Valor compromisos del area {}\", fila, optuMejo.getComporta());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(6);\n\n cell.setCellValue(optuMejo.getComporta());\n\n fila++;\n\n }\n LOGGER.info(\"Termino de poblar el registro hasta {} \", fila);\n //Ajustando los formulario\n if (fila > 8) {\n sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 6));\n } else {\n fila = 9;\n }\n\n /* sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 6));*/\n LOGGER.info(\"Fin de la escritura de las oportunidades de mejora\");\n\n LOGGER.info(\"Se inicia la escritura de las evidencias \");\n\n fila += 2;\n filaEvid = fila + 5;\n\n LOGGER.info(\"Se inicia la creacion de las celdas desde el registro {} \", fila);\n\n for (Evidenci evidenci : this.listEvid) {\n\n if (filaEvid < fila) {\n copyRow(workbook, sheet, fila - 1, fila);\n\n }\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 1. Valor Fecha {}\", fila, evidenci.getFecha());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(1);\n\n cell.setCellValue(evidenci.getFecha());\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 6. Valor compromisos del area {}\", fila, evidenci.getDescripc());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(2);\n\n cell.setCellValue(evidenci.getDescripc());\n\n sheet.addMergedRegion(new CellRangeAddress(fila, fila, 2, 6));\n\n fila++;\n\n }\n\n LOGGER.info(\"Fin de la escritura de las Evidencias\");\n\n LOGGER.info(\"Inicio de escritura de calificaciones\");\n //Ajustando los formulario - resultado\n\n /*sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));*/\n if (fila > filaEvid) {\n LOGGER.info(\"Fila a ejecutar {} \", fila);\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 2, fila + 2, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 3, fila + 3, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 4, fila + 4, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 6, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 2, fila + 4, 6, 7));\n //Firma del evaluado ajuste\n sheet.addMergedRegion(new CellRangeAddress(fila + 5, fila + 5, 1, 3));\n sheet.addMergedRegion(new CellRangeAddress(fila + 5, fila + 5, 4, 6));\n\n //Ajustando recursos\n sheet.addMergedRegion(new CellRangeAddress(fila + 6, fila + 6, 1, 7));\n\n sheet.addMergedRegion(new CellRangeAddress(fila + 8, fila + 8, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 10, fila + 10, 1, 7));\n\n } else {\n fila = filaEvid + 1;\n LOGGER.info(\"Fila a ejecutar {} \", fila);\n }\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor Excelente {}\", fila + 2, this.excelent);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 2);\n cell = row.getCell(2);\n\n cell.setCellValue((this.excelent != null ? this.excelent : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor satisfactorio {}\", fila + 3, this.satisfac);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 3);\n cell = row.getCell(2);\n\n cell.setCellValue((this.satisfac != null ? this.satisfac : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 3. Valor no satisfactorio {}\", fila + 4, this.noSatisf);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 4);\n cell = row.getCell(2);\n\n cell.setCellValue((this.noSatisf != null ? this.noSatisf : \"\"));\n\n //Ajustando Total Calificacion en Numero\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor total calificacion {}\", fila + 2, this.numeToca);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 2);\n cell = row.getCell(6);\n\n cell.setCellValue(this.numeToca);\n\n LOGGER.info(\"Fin de escritura de calificaciones\");\n\n LOGGER.info(\"Inicio de escritura de interposicion de recursos\");\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 7, this.siinRecu);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 7);\n cell = row.getCell(6);\n\n cell.setCellValue(\"SI:\" + (this.siinRecu != null ? this.siinRecu : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 7, this.noinRecu);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 7);\n cell = row.getCell(7);\n\n cell.setCellValue(\"NO:\" + (this.noinRecu != null ? this.noinRecu : \"\"));\n \n \n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 8, this.fech);\n \n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 8);\n cell = row.getCell(1);\n\n cell.setCellValue(\"FECHA:\" + (this.fech != null ? this.fech : \"\"));\n \n \n\n LOGGER.info(\"Fin de escritura de interposicion de recursos\");\n\n //Ajustando recursos\n workbook.write(fos);\n\n } else {\n throw new Exception(\"No se cargo de manera adecuada el archivo \");\n }\n\n } catch (Exception e) {\n System.out.println(\"\" + e.getMessage());\n }\n\n } catch (Exception e) {\n LOGGER.error(e.getMessage());\n throw new Exception(e.getMessage());\n }\n }", "String toCSVString();", "public static void writeCsvFile(List<Person> currentState, Path exportPath) {\n requireNonNull(currentState);\n File dir = new File(exportPath.toString());\n dir.mkdirs();\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yy HH-mm-ss\");\n Date date = new Date();\n String exportUniqueName = \"export[\" + dateFormat.format(date) + \"].csv\";\n Path exportFilePath = Paths.get(exportPath.toString() , exportUniqueName);\n try {\n FileUtil.createIfMissing(exportFilePath);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n try {\n serializeObjectToCsvFile(exportFilePath, currentState);\n } catch (IOException e) {\n logger.warning(\"Error writing from CsvFile file \" + exportFilePath);\n }\n }", "public static void WriteToACsv(AddressbookModel addressbook,String addressbookname){\n final String COMMA_DELIMITER = \",\";\n final String LINE_SEPARATOR = \"\\n\";\n String PATH=\"C:\\\\Users\\\\Srikar\\\\IdeaProjects\\\\Addressbook\\\\src\\\\com\\\\mphasis\\\\data\"+\"\\\\\"+addressbookname;\n final String HEADER = \"Firstname,LastName,Address,City,Pincode,Number\";\n List personList=addressbook.getAddressbook();\n FileWriter fileWriter=null;\n try{\n fileWriter=new FileWriter(PATH);\n fileWriter.append(HEADER);\n fileWriter.append(\"\\n\");\n Iterator it=personList.iterator();\n while (it.hasNext()){\n Person person=(Person) it.next();\n fileWriter.append(person.getFirstname());\n fileWriter.append(COMMA_DELIMITER);\n fileWriter.append(person.getLastname());\n fileWriter.append(COMMA_DELIMITER);\n fileWriter.append(person.getAddress());\n fileWriter.append(COMMA_DELIMITER);\n fileWriter.append(person.getCity());\n fileWriter.append(COMMA_DELIMITER);\n fileWriter.append(person.getZip());\n fileWriter.append(COMMA_DELIMITER);\n fileWriter.append(person.getPhone());\n fileWriter.append(LINE_SEPARATOR);\n }\n }\n catch(Exception ee)\n {\n ee.printStackTrace();\n }\n finally\n {\n try\n {\n fileWriter.close();\n }\n catch(IOException ie)\n {\n System.out.println(\"Error occured while closing the fileWriter\");\n ie.printStackTrace();\n }\n }\n }" ]
[ "0.6314278", "0.61188906", "0.59262586", "0.5886206", "0.5866505", "0.58076406", "0.578237", "0.5744841", "0.5631995", "0.5533357", "0.5526156", "0.55125016", "0.54739714", "0.53779495", "0.5342013", "0.53415155", "0.5333642", "0.5331727", "0.530804", "0.52852464", "0.5275489", "0.52667415", "0.52462065", "0.5240198", "0.5232494", "0.52257156", "0.52145094", "0.5210653", "0.5208971", "0.51852304", "0.51728874", "0.512744", "0.51042205", "0.509064", "0.5083442", "0.5040885", "0.5033245", "0.5009984", "0.4983109", "0.49725777", "0.49514437", "0.4949997", "0.4948572", "0.4946426", "0.49190202", "0.49173114", "0.4914702", "0.49103138", "0.49073327", "0.490557", "0.49040306", "0.4882489", "0.48775396", "0.4865543", "0.48516074", "0.48515442", "0.48482782", "0.4847958", "0.48441073", "0.48372546", "0.48290148", "0.48263252", "0.48197913", "0.48169142", "0.48137918", "0.48117247", "0.48066717", "0.4806304", "0.4804249", "0.4803986", "0.4803005", "0.47943997", "0.47942102", "0.47859538", "0.47854024", "0.47805035", "0.4779118", "0.4778421", "0.4768815", "0.47650632", "0.47605267", "0.47556838", "0.47541246", "0.47525308", "0.47352514", "0.47350097", "0.4724009", "0.4719458", "0.47140962", "0.47067308", "0.47050232", "0.47027904", "0.47020328", "0.4695367", "0.46937296", "0.4689498", "0.468479", "0.46771705", "0.4676843", "0.4673646" ]
0.5205087
29
Crea un archivo en word con el reporte generado.
public void crearReporte() { JFileChooser chooser = new JFileChooser("reporte.doc"); chooser.addChoosableFileFilter(new FileFilter() { @Override public String getDescription() { return "*.doc"; } @Override public boolean accept(File f) { if (f.isDirectory()) { return false; } String s = f.getName(); return s.endsWith(".doc"); } }); int res = chooser.showSaveDialog(this); if(res == JFileChooser.APPROVE_OPTION) { File file = chooser.getSelectedFile(); @SuppressWarnings("unused") Java2Word word = new Java2Word(this, file); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void CreateReport() {\n\t\tString fileName = new SimpleDateFormat(\"'Rest_Country_Report_'YYYYMMddHHmm'.html'\").format(new Date());\n\t\tString path = \"Report/\" + fileName;\n\t\treport = new ExtentReports(path);\n\t}", "protected void generarReporte(String fileNameOut){\n LinkedList datos;\n LinkedList listaHojas;\n frmHoja tmpSheet;\n Clases.Dato tmpDato;\n int numRows = 0;\n int numCols = 0;\n try{\n sw = new FileWriter(fileNameOut,true);\n //obtener lista de hojas desde el workplace\n listaHojas = wp.getListaHojas();\n\n //escribir encabezado de HTML a stream\n sw.write(\"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD HTML 4.01 Transitional//EN\\\">\\n\");\n sw.write(\"<html>\\n<head>\\n<meta content=\\\"text/html; charset=ISO-8859-1\\\" http-equiv=\\\"content-type\\\">\\n\");\n sw.write(\"<title>JExcel</title>\\n\");\n sw.write(\"</head>\\n<body>\\n\");\n sw.write(\"<big><span style=\\\"font-weight: bold;\\\">Hoja generada por JExcel</span></big><br>\\n\");\n sw.write(\"<small>Universidad Mariano Gálvez de Guatemala</small><br>\\n<br>\\n\");\n sw.write(\"<small>Extensión Morales Izabal</small><br>\\n<br>\\n\");\n sw.write(\"<small>(C) Amy C. Leiva - 4890-15-</small><br>\\n<br>\\n\");\n // Iterar sobre cada hoja en listaSheets\n for (int i = 0; i < listaHojas.size();i++){\n // obtener maximo numero de datos\n tmpSheet = (frmHoja) listaHojas.get(i);\n\n numRows = tmpSheet.getHoja().getRowCount();\n numCols = tmpSheet.getHoja().getColumnCount();\n sw.write(\"<table style=\\\"text-align: left; width: 100%;\\\" border=\\\"1\\\" cellpadding=\\\"2\\\" cellspacing=\\\"2\\\">\\n\");\n sw.write(\"<tbody>\\n\");\n sw.write(\" <tr> <td colspan=\\\"4\\\" rowspan=\\\"1\\\"><big><span style=\\\"font-weight: bold;\\\">\");\n sw.write(\"Nombre de la Hoja: \" + tmpSheet.getId());\n sw.write(\"</span></big></td>\\n</tr>\\n\");\n sw.write(\" <tr><td>Fila</td><td>Columna</td><td>Expresi&oacute;n</td> <td>Valor Num&eacute;rico</td> </tr>\\n\");\n // obtener lista de datos desde matriz\n if( tmpSheet.getHoja().getTabla().estaVacia() == false){ // si la tabla tiene datos\n datos = tmpSheet.getHoja().getTabla().getSubset(1,1,numCols,numRows);\n //escribir tabla con datos generados\n for (int j = 0; j < datos.size();j++){\n tmpDato = (Clases.Dato) datos.get(j); \n sw.write(\"<tr>\\n\");\n sw.write(\"<td>\" + tmpDato.getRow() + \"</td>\\n\");\n sw.write(\"<td>\" + tmpDato.getCol() + \"</td>\\n\");\n sw.write(\"<td>\" + tmpDato.getExpr() + \"</td>\\n\");\n sw.write(\"<td>\" + tmpDato.eval() + \"</td>\\n\");\n sw.write(\"</tr>\\n\");\n }\n }\n else{\n sw.write(\"<tr><td colspan=\\\"4\\\" rowspan=\\\"1\\\"> Hoja Vacia... </td></tr>\");\n }\n sw.write(\" </tbody></table>\\n<br><br><br>\");\n // sw.write();\n // sw.write();\n }\n //escribir fin de datos\n sw.write(\"</body></html>\");\n //escribir a archivo de salida\n sw.close();\n }\n catch(Exception e){\n System.out.println(\"No se pudo guardar archivo:\" + e);\n }\n \n }", "public void makeReport() throws IOException{\n File report = new File(\"Report.txt\");\n BufferedWriter reportWriter = new BufferedWriter(new FileWriter(report));\n BufferedReader bookReader = new BufferedReader(new FileReader(\"E-Books.txt\"));\n String current;\n while((current = bookReader.readLine()) != null ){\n String[] tokens = current.split(\",\");\n reportWriter.write(tokens[0].trim()+\" for \"+tokens[1].trim()+\" with redemption Code \"+tokens[2].trim()+\n \" is assigned to \"+tokens[4].trim()+\" who is in \"+tokens[5].trim()+\" grade.\");\n reportWriter.write(System.lineSeparator());\n reportWriter.flush();\n }\n reportWriter.close();\n bookReader.close();\n new reportWindow();\n }", "private void createDOCDocument(String from, File file) throws Exception {\n\t\tPOIFSFileSystem fs = new POIFSFileSystem(Thread.currentThread().getClass().getResourceAsStream(\"/poi/template.doc\"));\n\t\tHWPFDocument doc = new HWPFDocument(fs);\n\t\n\t\tRange range = doc.getRange();\n\t\tParagraph par1 = range.getParagraph(0);\n\t\n\t\tCharacterRun run1 = par1.insertBefore(from, new CharacterProperties());\n\t\trun1.setFontSize(11);\n\t\tdoc.write(new FileOutputStream(file));\n\t}", "public boolean writeWordFile() throws Exception {\n\n InputStream is = null;\n FileOutputStream fos = null;\n\n // 1 Cannot find source file, return false\n File inputFile = new File(this.inputPath);\n if (!inputFile.exists()) {\n return false;\n }\n\n File outputFile = new File(this.outputPath);\n // 2 If the target path does not exist, create a new path\n if (!outputFile.getParentFile().exists()) {\n outputFile.getParentFile().mkdirs();\n }\n\n try {\n\n // 3 Write html file content to doc file\n is = new FileInputStream(inputFile);\n POIFSFileSystem poifs = new POIFSFileSystem();\n DirectoryEntry directory = poifs.getRoot();\n directory.createDocument(\n \"WordDocument\", is);\n\n fos = new FileOutputStream(this.outputPath);\n poifs.writeFilesystem(fos);\n\n System.out.println(\"Conversion of word files is complete!\");\n\n return true;\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fos != null) {\n fos.close();\n }\n if (is != null) {\n is.close();\n }\n }\n\n return false;\n }", "public void write() throws IOException {\n\t\tfinal String timeLog = LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd_HH-mm-ss\"));\n\t\tfinal File file = new File(\"wordsaurier-document-\" + timeLog + \".txt\");\n\t\t\n\n\t\ttry (OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) {\n\t\t\t\n\n\t\t\t\n\t\t\twriter.write(\"Wordsaurier document\\r\\n\");\n\t\t\twriter.write(this.documentSpecification.toString() + \"\\r\\n\");\n\t\t\twriter.write(\"---------------------\\r\\n\");\n\t\t\twriter.write(this.document.getContent());\n\t\t\tLOG.info(\"document was written to {}\", file.getCanonicalPath());\n\t\t\t\n\t\t} catch (final IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "private void generarDocP(){\n generarPdf(this.getNombre());\n }", "public void createFiles() {\r\n try {\r\n FileWriter file = new FileWriter(registerNumber + \".txt\");\r\n file.write(\"Name : \" + name + \"\\n\");\r\n file.write(\"Surname : \" + surname + \"\\n\");\r\n file.write(\"Registration Number : \" + registerNumber + \"\\n\");\r\n file.write(\"Position : \" + position + \"\\n\");\r\n file.write(\"Year of Start : \" + yearOfStart + \"\\n\");\r\n file.write(\"Total Salary : \" + Math.round(totalSalary) + \".00 TL\" +\"\\n\");\r\n file.close();\r\n }\r\n catch(IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void xuLyLuuHoaHoaDon(){\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setFileFilter(new FileFilter() {\n @Override\n public boolean accept(File file) {\n return file.getAbsolutePath().endsWith(\".txt\");\n }\n\n @Override\n public String getDescription() {\n return \".txt\";\n }\n });\n fileChooser.setFileFilter(new FileFilter() {\n @Override\n public boolean accept(File file) {\n return file.getAbsolutePath().endsWith(\".doc\");\n }\n\n @Override\n public String getDescription() {\n return \".doc\";\n }\n });\n int flag = fileChooser.showSaveDialog(null);\n if(flag == JFileChooser.APPROVE_OPTION){\n File file = fileChooser.getSelectedFile();\n try {\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(new FileOutputStream(file), Charset.forName(\"UTF-8\"));\n PrintWriter printWriter = new PrintWriter(outputStreamWriter);\n String lineTieuDe1 = \"----------------Phiếu Thanh Toán-----------------------\";\n String lineMaPTT = \"+Mã Phiếu Thanh Toán: \" + txtMaPTT.getText();\n String lineMaPDK = \"+Mã Phiếu Đăng Ký: \" + cbbMaPDK.getSelectedItem().toString();\n String lineSoThang = \"+Số Tháng: \" + txtSoThang.getText()+\"|\";\n String lineNgayTT = \"+Ngày Thanh Toán: \" + txtNgayTT.getText();\n String lineTienPhong = \"+Tiền Phòng: \" + txtTongTien.getText();\n String lineTienDV = \"+Tiền Dịch Vụ: \"+txtThanhToanTongCong.getText();\n String lineTieuDe2 = \"--------------------------------------------------------\";\n String lineTienPhaiTra =\"+Tiền Phải Trả: \" + txtTienPhaiTra.getText()+\" \";\n String lineTieuDe3 = \"--------------------------------------------------------\";\n \n printWriter.println(lineTieuDe1);\n printWriter.println(lineMaPTT);\n printWriter.println(lineMaPDK);\n printWriter.println(lineSoThang);\n printWriter.println(lineNgayTT);\n printWriter.println(lineTienPhong);\n printWriter.println(lineTienDV);\n printWriter.println(lineTieuDe2);\n printWriter.println(lineTienPhaiTra);\n printWriter.println(lineTieuDe3);\n \n printWriter.close();\n outputStreamWriter.close();\n \n } catch (Exception e) {\n e.printStackTrace();\n }\n JOptionPane.showMessageDialog(null, \"Đã lưu\");\n }\n \n }", "public static void reportes(){\n try {\n /**Variable necesaria para abrir el archivo creado*/\n Desktop pc=Desktop.getDesktop();\n /**Variables para escribir el documento*/\n File f=new File(\"Reporte_salvajes.html\");\n FileWriter w=new FileWriter(f);\n BufferedWriter bw=new BufferedWriter(w);\n PrintWriter pw=new PrintWriter(bw);\n \n /**Se inicia el documento HTML*/\n pw.write(\"<!DOCTYPE html>\\n\");\n pw.write(\"<html>\\n\");\n pw.write(\"<head>\\n\");\n pw.write(\"<title>Reporte de los Pokemons Salvajes</title>\\n\");\n pw.write(\"<style type=\\\"text/css\\\">\\n\" +\n \"body{\\n\" +\n \"background-color:rgba(117, 235, 148, 1);\\n\" +\n \"text-align: center;\\n\" +\n \"font-family:sans-serif;\\n\" +\n \"}\\n\"\n + \"table{\\n\" +\n\"\t\t\tborder: black 2px solid;\\n\" +\n\"\t\t\tborder-collapse: collapse;\\n\" +\n\" }\\n\"\n + \"#td1{\\n\" +\n\" border: black 2px solid;\\n\"\n + \" background-color: skyblue;\\n\" +\n\" }\\n\" +\n\" #td2{\\n\" +\n\" border: black 2px solid;\\n\"\n + \" background-color: white;\\n\" +\n\" }\\n\"\n +\"</style>\");\n pw.write(\"<meta charset=\\\"utf-8\\\">\");\n pw.write(\"</head>\\n\");\n /**Inicio del cuerpo*/\n pw.write(\"<body>\\n\");\n /**Título del reporte*/\n pw.write(\"<h1>Reporte de los Pokemons Salvajes</h1>\\n\");\n /**Fecha en que se genero el reporte*/\n pw.write(\"<h3>Documento Creado el \"+fecha.get(Calendar.DAY_OF_MONTH)+\n \"/\"+((int)fecha.get(Calendar.MONTH)+1)+\"/\"+fecha.get(Calendar.YEAR)+\" a las \"\n +fecha.get(Calendar.HOUR)+\":\"+fecha.get(Calendar.MINUTE)+\":\"+fecha.get(Calendar.SECOND)+\"</h3>\\n\");\n \n pw.write(\"<table align=\\\"center\\\">\\n\");\n //Se escriben los títulos de las columnas\n pw.write(\"<tr>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[0]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[1]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[2]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[3]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[4]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[5]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td1\\\">\"+pokemon.Titulo[6]+\"</td>\\n\");\n pw.write(\"</tr>\\n\");\n for (int i = 0; i < pokemon.ingresados; i++) {\n //Se determina si el pokemon es salvaje\n if(pokemon.Capturado[i]==false){\n pw.write(\"<tr>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.Id[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.Tipo[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.Nombre[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.Vida[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">\"+pokemon.ptAt[i]+\"</td>\\n\");\n pw.write(\"<td id=\\\"td2\\\">Salvaje</td>\\n\");\n //Se determina si el pokemon esta vivo o muerto\n String estado;\n if (pokemon.Estado[i]==true) {\n estado=\"Vivo\";\n }else{estado=\"Muerto\";}\n pw.write(\"<td id=\\\"td2\\\">\"+estado+\"</td>\\n\");\n pw.write(\"</tr>\\n\");\n }\n }\n pw.write(\"</table><br>\\n\");\n \n pw.write(\"</body>\\n\");\n pw.write(\"</html>\\n\");\n /**Se finaliza el documento HTML*/\n \n /**Se cierra la capacidad de escribir en el documento*/ \n pw.close();\n /**Se cierra el documento en el programa*/\n bw.close();\n /**Se abre el documento recien creado y guardado*/\n pc.open(f);\n } catch (Exception e) {\n System.err.println(\"Asegurese de haber realizado las actividades previas \"\n + \"relacionadas\");\n }\n }", "private void reportToFile() {\n try {\n fileWriter = new FileWriter(\"GameStats.txt\");\n fileWriter.write(reportContent);\n fileWriter.close();\n }\n catch (IOException ioe) {\n System.err.println(\"IO Exception thrown while trying to write to file GameStats.txt\");\n }\n }", "@Override\r\n\tprotected File generateReportFile() {\r\n\r\n\t\tFile tempFile = null;\r\n\r\n\t\tFileOutputStream fileOut = null;\r\n\t\ttry {\r\n\t\t\ttempFile = File.createTempFile(\"tmp\", \".\" + this.exportType.getExtension());\r\n\t\t\tfileOut = new FileOutputStream(tempFile);\r\n\t\t\tthis.workbook.write(fileOut);\r\n\t\t} catch (final IOException e) {\r\n\t\t\tLOGGER.warn(\"Converting to XLS failed with IOException \" + e);\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\tif (tempFile != null) {\r\n\t\t\t\ttempFile.deleteOnExit();\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tif (fileOut != null) {\r\n\t\t\t\t\tfileOut.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (final IOException e) {\r\n\t\t\t\tLOGGER.warn(\"Closing file to XLS failed with IOException \" + e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn tempFile;\r\n\t}", "public static void createFile(String name)\n {\n file = new File(name);\n try\n {\n if(file.exists())\n {\n file.delete();\n file.createNewFile();\n }else file.createNewFile();\n \n fileWriter = new FileWriter(file);\n fileWriter.append(\"Generation, \");\n fileWriter.append(\"Fitness, \");\n fileWriter.append(\"Average\\n\");\n \n }catch (IOException e) \n {\n System.out.println(e);\n }\n \n }", "private void createScheduleFile() {\n try {\n File scheduleFile = new File(filePath, \"schedule.txt\");\n// FileWriter fw = new FileWriter(scheduleFile);\n\n OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(scheduleFile), StandardCharsets.UTF_8);\n osw.write(\"SCHEDULE:\\n\" + schedule);\n osw.close();\n\n System.out.println(\"schedule.txt successfully created.\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void generateReport(){\n String fileOutput = \"\";\n fileOutput += allCustomers()+\"\\n\";\n fileOutput += getNoAccounts()+\"\\n\";\n fileOutput += getTotalDeposits()+\"\\n\";\n fileOutput += accountsOfferingLoans()+\"\\n\";\n fileOutput += accountsReceivingLoans()+\"\\n\";\n fileOutput += customersOfferingLoans()+\"\\n\";\n fileOutput += customersReceivingLoans()+\"\\n\";\n System.out.println(fileOutput);\n writeToFile(fileOutput);\n }", "public static void createResponseReportTxt(String fileName) {\r\n\t\t\ttry {\r\n\t\t\tConnector con = new Connector();\r\n\t\t\tcon.connect();\r\n\t\t\t\r\n\t\t\tResultSet resultSet = con.MakeQuery(\"SELECT \\\"studentEmail\\\" FROM \\\"\" + fileName+\"\\\"\");\r\n\t\t\t\r\n\t\t\twhile(resultSet.next()) {\r\n\t\t\t\tString email = resultSet.getString(1);\r\n\t\t\t\temail = email.substring(0, 6);\r\n\t\t\t\tString userHomePath = System.getProperty(\"user.home\");\r\n\t\t\t\tFile gradeReport = new File(userHomePath+\"\\\\Documents\\\\Reports\\\\Responses\\\\\"+fileName+ email+\".answers.txt\");\r\n\t\t\t\tif (gradeReport.createNewFile()){\r\n\t\t \t}else{\r\n\t\t \t}\r\n\t\t\t}\r\n\t \t\t \r\n\t\t\t//Change file to where ever Harris wants\r\n\t\t\t//userHomePath is the default user default account \r\n\t\t\t//Ex. C:\\Users\\as12660\r\n\t\t\r\n\t \t} catch (IOException e) {\r\n\t \t\te.printStackTrace();\r\n\t \t} catch (Exception ie) {\r\n\t \t\tie.printStackTrace();\r\n\t\t}\r\n\t}", "private void createWinnerScheduleFile() {\n try {\n File scheduleFile = new File(filePath, \"winners.txt\");\n\n OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(scheduleFile), StandardCharsets.UTF_8);\n osw.write(\"WINNERS:\\n\" + winnerSchedule);\n osw.close();\n\n System.out.println(\"winners.txt successfully created.\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void CreateTestResultFile()\n\t{ \n\t\tDate dNow = new Date( );\n\t\tSimpleDateFormat ft =new SimpleDateFormat (\"MMddYYYY\");\n\t\t\n\t\ttry \n\t\t{\n\t\t\tFileOutputStream fos = new FileOutputStream(System.getProperty(\"user.dir\")+\"//PG HealthCheck List_\"+ft.format(dNow)+\".xls\");\n\t HSSFWorkbook workbook = new HSSFWorkbook();\n\t HSSFSheet worksheet = workbook.createSheet(\"PG Functionality - Country\");\n\t HSSFRow row1 = worksheet.createRow(0);\n\t row1.createCell(0).setCellValue(\"Availability of Data\");\n\t HSSFRow row = worksheet.createRow(1);\n\t row.createCell(0).setCellValue(\"Testcase\");\n\t row.createCell(1).setCellValue(\"TestRunStatus\");\n\t row.createCell(2).setCellValue(\"Remarks\");\n\t workbook.write(fos);\n\t fos.close();\n\t \t \n\t } \n\t\tcatch (Exception e)\n\t {\n\t \te.printStackTrace();\n\t }\n\t\t\t\n\t\t\n\t}", "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 }", "public static void genArchivoTokens(){\r\n\t\tString path = AnManager.getPath() + File.separator +\"Resultados Grupo81\" + File.separator+ \"Tokens.txt\";\r\n\t\tFile f = new File(path);\r\n\t\tf.getParentFile().mkdirs(); \r\n\t\ttry {\r\n\t\t\tf.delete(); //Eliminamos si existe algo antes\r\n\t\t\tf.createNewFile();\r\n\t\t} catch (IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Fallo al crear archivo tokens\");\r\n\t\t}\r\n\t}", "void createFile()\n {\n //Check if file already exists\n try {\n File myObj = new File(\"src/main/java/ex45/exercise45_output.txt\");\n if (myObj.createNewFile()) {\n System.out.println(\"File created: \" + myObj.getName());// created\n } else {\n System.out.println(\"File already exists.\"); //exists\n }\n //Error check\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "public void createPdf(String filePath) throws DocumentException, FileNotFoundException, BadElementException, IOException, SQLException {\r\n Calendar date = Calendar.getInstance();\r\n String dato;\r\n dato = \"\"+date.get(Calendar.YEAR)+\"-\"+MyUtil.p0(date.get(Calendar.MONTH)+1)+\"-\"+MyUtil.p0((date.get(Calendar.DAY_OF_MONTH)))+\"-\";\r\n \r\n String name = fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getFirstName() +\" \"+ fal.getFiremanById(model.getTimeSheet(0).getEmployeeId()).getLastName();\r\n fileName = dato + name + \".pdf\";\r\n \r\n Document document = new Document();\r\n PdfWriter.getInstance(document, new FileOutputStream(filePath+fileName));\r\n document.open();\r\n addContent(document);\r\n document.close();\r\n\r\n }", "public void exportPuzzle (Puzzle puzzle) {\n if (puzzle != null && puzzle.getNumWords () > 0) {\n if (chooser.showSaveDialog (null) == JFileChooser.APPROVE_OPTION) {\n File newFile = chooser.getSelectedFile ();\n try {\n FileWriter writer = new FileWriter (newFile + \" puzzle.html\");\n writer.write (puzzle.export (true));\n writer.close ();\n writer = new FileWriter (newFile + \" solution.html\");\n writer.write (puzzle.export (false));\n writer.close ();\n } catch (IOException e) {\n JOptionPane.showMessageDialog (null, \"File IO Exception\\n\" + e.getLocalizedMessage (), \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }\n } else {\n JOptionPane.showMessageDialog (null, \"Please Generate a Puzzle before Exporting\", \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }", "void createReport() {\n\n // report about purple flowers\n println(\"\\nPurple flower distribution: \");\n for (int i = 0; i < 6; i++) {\n println(i + (i==5?\"+\":\"\") + \": \" + numPurpleFlowers[i]);\n }\n // report about missing treasures\n println(\"Missing treasure count: \" + missingTreasureCount);\n\n println(\"\\nGenerated \" + caveGenCount + \" sublevels.\");\n println(\"Total run time: \" + (System.currentTimeMillis()-startTime)/1000.0 + \"s\");\n\n out.close();\n }", "public void generateWordDocument(String directory, String nameOfTheDocument) throws Exception{\n\t\t\n\t\t//Create empty document (instance of Document classe from Apose.Words)\n\t\tDocument doc = new Document();\n\t\t\n\t\t//Every word document have section, so now we are creating section\n\t\tSection section = new Section(doc);\n\t\tdoc.appendChild(section);\n\t\t\n\t\tsection.getPageSetup().setPaperSize(PaperSize.A4);\n\t\tsection.getPageSetup().setHeaderDistance (35.4); // 1.25 cm\n\t\tsection.getPageSetup().setFooterDistance (35.4); // 1.25 cm\n\t\t\n\t\t//Crating the body of section\n\t\tBody body = new Body(doc);\n\t\tsection.appendChild(body);\n\t\t\n\t\t//Crating paragraph\n\t\tParagraph paragraph = new Paragraph(doc);\n\t\t\n\t\tparagraph.getParagraphFormat().setStyleName(\"Heading 1\");\n\t\tparagraph.getParagraphFormat().setAlignment(ParagraphAlignment.CENTER);\n\t\t//Crating styles\n\t\tStyle style = doc.getStyles().add(StyleType.PARAGRAPH, \"Style1\");\n\t\tstyle.getFont().setSize(24);\n\t\tstyle.getFont().setBold(true);\n\t\tstyle.getFont().setColor(Color.RED);\n\t\t//paragraph.getParagraphFormat().setStyle(style);\n\t\tbody.appendChild(paragraph);\n\t\t\n\t\tStyle styleForIntroduction = doc.getStyles().add(StyleType.PARAGRAPH, \"Style2\");\n\t\tstyle.getFont().setSize(40);\n\t\tstyle.getFont().setBold(false);\n\t\tstyle.getFont().setItalic(true);\n\t\tstyle.getFont().setColor(Color.CYAN);\n\t\t\n\t\tStyle styleForText = doc.getStyles().add(StyleType.PARAGRAPH, \"Style3\");\n\t\tstyle.getFont().setSize(15);\n\t\tstyle.getFont().setBold(false);\n\t\tstyle.getFont().setItalic(false);\n\t\tstyle.getFont().setColor(Color.BLACK);\n\t\t\n\t\t//Crating run of text\n\t\tRun textRunHeadin1 = new Run(doc);\n\t\ttry {\n\t\t\ttextRunHeadin1.setText(\"Probni test fajl\" + \"\\r\\r\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tparagraph.appendChild(textRunHeadin1);\n\t\t\n\t\t\n\t\t//Creating paragraph1 for every question in list\n\t\tfor (Question question : questions) {\n\t\t\t\n\t\t\t\n\t\t\t\t//Paragraph for Instruction Question\n\t\t\t\tParagraph paragraphForInstruction = new Paragraph(doc);\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setStyleName(\"Heading 1\");\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setAlignment(ParagraphAlignment.LEFT);\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setStyle(styleForIntroduction);\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setStyleName(\"Heading 3\");\n\t\t\t\t\n\t\t\t\tRun runIntroduction = new Run(doc);\n\t\t\t\t\n\t\t\t\trunIntroduction.getFont().setColor(Color.BLUE);\n\t\t\t\ttry {\n\t\t\t\t\trunIntroduction.setText(((Question)question).getTextInstructionForQuestion()+\"\\r\");\n\t\t\t\t} catch (Exception 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\tparagraphForInstruction.appendChild(runIntroduction);\n\t\t\t\tbody.appendChild(paragraphForInstruction);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Paragraph for Question\n\t\t\t\tParagraph paragraphForQuestion = new Paragraph(doc);\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setStyleName(\"Heading 1\");\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setAlignment(ParagraphAlignment.LEFT);\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setStyle(styleForText);\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setStyleName(\"Normal\");\n\t\t\t\t\n\t\t\t\tRun runText = new Run(doc);\n\t\t\t\tif(question instanceof QuestionBasic){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionBasic)question).toStringForDocument()+\"\\r\");\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tif(question instanceof QuestionFillTheBlank){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionFillTheBlank)question).toStringForDocument());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tif(question instanceof QuestionMatching){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionMatching)question).toStringForDocument());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tif(question instanceof QuestionTrueOrFalse){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionTrueOrFalse)question).toStringForDocument());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tparagraphForQuestion.appendChild(runText);\n\t\t\t\tbody.appendChild(paragraphForQuestion);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tdoc.save(directory + nameOfTheDocument +\".doc\");\n\t}", "static void CrearArchivo(Vector productos, Vector clientes){ \r\n \ttry{ //iniciamos el try y si no funciona se hace el catch\r\n BufferedWriter bw = new BufferedWriter(\r\n \t\t//Iniciamos el archivo adentro de bw que es un objeto.\r\n new FileWriter(\"reporte.txt\") );\r\n //creamos un producto auxiliar\r\n Producto p; \r\n //mientas existan productos se escribe lo siguiente en el archivo\r\n for(int x = 0; x < productos.size(); x++){ \r\n \t//impresiones de nombre,codigo,stock,precio en el archivo\r\n \tp = (Producto) productos.elementAt(x);\r\n bw.write(\"Nombre del producto: \" + p.getNombre() + \"\\n\"); \r\n bw.write(\"Codigo del producto: \" + p.getCodigo() + \"\\n\");\r\n bw.write(\"Tamaño del stock: \" + p.getStock() + \"\\n\");\r\n bw.write(\"Precio: \" + p.getPrecio() + \"\\n\");\r\n \r\n \r\n }\r\n //creamos un cliente auxiliar\r\n Cliente c;\r\n //mientas existan clientes se escribe lo siguiente en el archivo\r\n for(int x = 0; x < clientes.size(); x++){ \r\n \tc = (Cliente) clientes.elementAt(x);\r\n \t//impresiones de nombre,telefono,cantidad y total en el archivo\r\n bw.write(\"Nombre del cliente: \" + c.getname() + \"\\n\");\r\n bw.write(\"Numero de telefono: \" + c.getTelefono() + \"\\n\"); \r\n bw.write(\"Cantidad de compra: \" + c.getCantidad() + \"\\n\");\r\n bw.write(\"Total de compra: \" + c.getTotal() + \"\\n\");\r\n \r\n \r\n }\r\n // Cerrar archivo al finalizar\r\n bw.close();\r\n System.out.println(\"¡Archivo creado con éxito!\");\r\n //si no funciona imprime el error\r\n } catch(Exception ex){ \r\n System.out.println(ex);\r\n }\r\n }", "public void crearPDF()\r\n\t{\r\n\t\tif (!new File(ruta).exists())\r\n\t\t\t(new File(ruta)).mkdirs();\r\n\r\n\t\tFile[] files = (new File(ruta)).listFiles();\r\n\t\tString ruta = \"\";\r\n\t\tif (files.length == 0) {\r\n\t\t\truta = this.ruta + huesped + \"0\" + \".pdf\";\r\n\t\t} else {\r\n\t\t\tString path = files[files.length - 1].getAbsolutePath();\r\n\t\t\tString num = path.substring(path.length() - 5, path.length() - 4);\r\n\r\n\t\t\truta = this.ruta + huesped + (Integer.parseInt(num) + 1) + \".pdf\";\r\n\t\t}\r\n\r\n\t\tSimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/YYYY\");\r\n\t\t\r\n\t\tcabecera = \"\\n\"+\"Resonance Home\" + \"\\n\"+ \r\n \"Armenia, Quindio\" + \"\\n\" + \r\n \"Colombia\" + \"\\n\\n\" + \r\n\t\t\t\t\"Fecha \" + reserva.getFecha().toString() + \"\\n\\n\\n\";\r\n\t\tcontenido = \"Reserva de hospedaje: \"+ reserva.getHospedaje().getId() + \"\\n\" + \r\n \t\"Titulo del Hospedaje: \" + reserva.getHospedaje().getTitulo() + \" \" + \"\\n\" +\r\n \t\"Dirección: \" + reserva.getHospedaje().getDireccion().getDireccion() + \", \" + reserva.getHospedaje().getDireccion().toString() + \"\\n\" +\r\n\t\t\t\t\"Anfitrion: \" + nombreAnfitrion + \"\\n\" + \"Correo: \" + emailAnfitrion + \"\\n\\n\\n\" + \"Huesped: \"\r\n\t\t\t\t+ nombreHuesped + \"\\n\" +\r\n \t\"Metodo de pago: \" + reserva.getTarjeta().getNumeroT() + \" Tarjeta de credito\" + \"\\n\\n\" +\r\n \tformato.format(reserva.getFechaInicial()) + \" hasta \"+ formato.format(reserva.getFechaFinal()) +\"\\n\\n\" +\r\n \t\"Descripcion\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalor\" + \"\\n\\n\" + \r\n\t\t\t\t\"Huespedes\" + \"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"\r\n\t\t\t\t+ reserva.getNumeroHuespedes() + \"\\n\" +\r\n\t\t\t\t\"Alojamiento\" + \"\t\t\t\t\t\t\t\t\t\t\t\t\t \" + precioCompleto + \"\\n\"\r\n\t\t\t\t+ \"Tarifa de limpieza\" + \"\t\t\t\t \t \" + precioLimpieza + \"\\n\" + \"Comision por servicio\"\r\n\t\t\t\t+ \"\t\t\t\t\t\" + precioComision + \"\\n\\n\";\r\n\t\tpiePagina = \"TOTAL \" + \" \" + \"$ \" + reserva.getValor() + \"\\n\" ;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFileOutputStream archivo = new FileOutputStream(ruta);\r\n\t\t\tDocument doc = new Document(PageSize.A5, 10, 10, 10, 10);\r\n\t\t\tPdfWriter.getInstance(doc, archivo);\r\n\t\t\tdoc.open();\r\n\t\t\tdoc.add(obtenerCabecera(cabecera));\r\n\t\t\tdoc.add(obtenerContenido(contenido));\r\n\t\t\tdoc.add(obtenerPiePagina(piePagina));\r\n\t\t\tdoc.close();\r\n\t\t\tthis.ruta = ruta;\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(\"\" + e);\r\n\t\t}\r\n\r\n\t}", "private void saveResourceFile()\r\n\t{\t\r\n\t\tFile file = null;\r\n\t\tFileWriter fw = null;\r\n\t\t//File complete = null;//New file for the completed list\r\n\t\t//FileWriter fw2 = null;//Can't use the same filewriter to do both the end task and the complted products.\r\n\t\ttry{\r\n\t\t\tfile = new File(outFileName);\r\n\t\t\tfile.createNewFile();\r\n\t\t\tfw = new FileWriter(outFileName,true);\r\n\t\t\tfor(FactoryObject object : mFObjects)\r\n\t\t\t{\r\n\t\t\t\tif(object instanceof FactoryReporter) {\r\n\t\t\t\t\t((FactoryReporter)object).report(fw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(ioe.getMessage());\r\n\t\t\tif(file != null) {\r\n\t\t\t\tfile.delete();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif(fw != null) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.out.println(\"Failed to close the filewriter!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void writeWord(XWPFDocument document, String fileName) throws IOException {\n\t\tFileOutputStream out = new FileOutputStream(new File(fileName));\n\t\tdocument.write(out);\n\t\tout.close();\n\t}", "private static void createFile(String fileType) throws Exception {\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd-HH-mm-ss\");\n LocalDateTime now = LocalDateTime.now();\n File xmlFile = new File(System.getProperty(\"user.dir\")+\"/data/saved/\"+dtf.format(now) + fileType + \".xml\");\n OutputFormat out = new OutputFormat();\n out.setIndent(5);\n FileOutputStream fos = new FileOutputStream(xmlFile);\n XML11Serializer serializer = new XML11Serializer(fos, out);\n serializer.serialize(xmlDoc);\n\n }", "private void buildReport() throws IOException {\n try (InputStream template = Thread.currentThread().getContextClassLoader().getResourceAsStream(TEMPLATE_DIR + \"/\" + TEMPLATE_NAME)) {\n reportDoc = Jsoup.parse(template, null, \"\");\n Element diffReportContainer = reportDoc.select(\".diffReport\").first();\n Element diffResultTable = diffReportContainer.select(\".diffResult\").first().clone();\n\n diffReportContainer.empty();\n\n for (SimpleImmutableEntry<String, List<File>> diffResult : fileDiffResults) {\n diffReportContainer.appendChild(getDiffTable(diffResultTable, diffResult));\n }\n }\n }", "public static void createSaveFile( )\n {\n try\n {\n new File( \"data\" ).mkdirs( );\n PrintWriter writer = new PrintWriter( \"data/\" + Game.instance.getCurrentSaveFile( ).SAVEFILENAME + \".txt\", \"UTF-8\" );\n writer.println( \"dkeys: \" + Game.START_DIAMOND_KEY_COUNT );\n writer.close( );\n }\n catch ( IOException e )\n {\n e.printStackTrace( );\n System.exit( 1 );\n }\n }", "@Override\n void createReport(final Format reportFormat,\n final long start, final long end) {\n makeBriefReport(reportFormat, \"Informe breu\", start, end);\n writeToFile();\n getFormat().finishPrinting();\n }", "private static BufferedWriter createFileWriter(String filePath) {\n String[] pathComponents = filePath.split(\"/data/\");\n //to avoid heavy nesting in output, replace nested directory with filenames\n\n String output = pathComponents[0] + \"/out/rule_comparisons/\" + pathComponents[1].replace(\"/\",\"-\");\n\n File file = new File(output);\n try {\n //create file in this location if one does not exist\n if (!file.exists()) {\n file.createNewFile();\n }\n return new BufferedWriter(new FileWriter(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void generarDoc(){\n generarDocP();\n }", "public void setup_report() {\n try {\n output = new PrintWriter(new FileWriter(filename));\n } catch (IOException ioe) {}\n }", "Report createReport();", "public void writeToGameFile(String fileName) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element game = doc.createElement(\"Game\");\n rootElement.appendChild(game);\n\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(\"001\"));\n game.appendChild(id);\n Element stories = doc.createElement(\"Stories\");\n game.appendChild(stories);\n\n for (int i = 1; i < 10; i++) {\n Element cap1 = doc.createElement(\"story\");\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(\"Mwheels\"));\n Element text = doc.createElement(\"Text\");\n text.appendChild(doc.createTextNode(\"STEP \" + i + \":\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eu.\"));\n cap1.appendChild(image);\n cap1.appendChild(text);\n stories.appendChild(cap1);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.GAME_FILE_DIR + fileName + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException | TransformerException pce) {\n pce.printStackTrace();\n }\n\n }", "public static void makeText(double[] numbers){\r\n\t\tPrintWriter outStream = null;\r\n\t\ttry {\r\n\t\t\toutStream = new PrintWriter(new FileOutputStream(\"textFile.txt\"));\r\n\t\t} catch(FileNotFoundException e){\r\n\t\t\tSystem.out.println(\"Error opening the file\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\tfor (double x : AvgAndStanDev.tehNumbs){\r\n\t\t\toutStream.println(x);\r\n\t\t}\r\n\t\tSystem.out.println(\"Text File Created\");\r\n\t\toutStream.close();\t\t//Important to close so that we can re-open later\r\n\t}", "public void generate(File file) throws IOException;", "private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}", "public void filecreate(String Response_details) throws IOException\n\t{\n\t\tFileWriter myWriter = new FileWriter(\"D://Loadtime.txt\",true);\n\t\tmyWriter.write(Response_details+System.lineSeparator());\n\t\tmyWriter.close();\n\t\tSystem.out.println(\"Successfully wrote to the file.\");\n\t\t\n\t\t\n\t}", "public static void ExportToFile() throws IOException {\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"Data/dictionary.txt\"));\r\n for (Word word : Dictionary.dictionaryList) {\r\n writer.write(String.format(\"%s\\t%s\\n\", word.getWord(), word.getWordMeaning()));\r\n }\r\n writer.close();\r\n }", "public File generateFile()\r\n {\r\n return generateFile(null);\r\n }", "private void gerarArquivoExcel() {\n\t\tFile currDir = getPastaParaSalvarArquivo();\n\t\tString path = currDir.getAbsolutePath();\n\t\t// Adiciona ao nome da pasta o nome do arquivo que desejamos utilizar\n\t\tString fileLocation = path.substring(0, path.length()) + \"/relatorio.xls\";\n\t\t\n\t\t// mosta o caminho que exportamos na tela\n\t\ttextField.setText(fileLocation);\n\n\t\t\n\t\t// Criação do arquivo excel\n\t\ttry {\n\t\t\t\n\t\t\t// Diz pro excel que estamos usando portguês\n\t\t\tWorkbookSettings ws = new WorkbookSettings();\n\t\t\tws.setLocale(new Locale(\"pt\", \"BR\"));\n\t\t\t// Cria uma planilha\n\t\t\tWritableWorkbook workbook = Workbook.createWorkbook(new File(fileLocation), ws);\n\t\t\t// Cria uma pasta dentro da planilha\n\t\t\tWritableSheet sheet = workbook.createSheet(\"Pasta 1\", 0);\n\n\t\t\t// Cria um cabeçario para a Planilha\n\t\t\tWritableCellFormat headerFormat = new WritableCellFormat();\n\t\t\tWritableFont font = new WritableFont(WritableFont.ARIAL, 16, WritableFont.BOLD);\n\t\t\theaderFormat.setFont(font);\n\t\t\theaderFormat.setBackground(Colour.LIGHT_BLUE);\n\t\t\theaderFormat.setWrap(true);\n\n\t\t\tLabel headerLabel = new Label(0, 0, \"Nome\", headerFormat);\n\t\t\tsheet.setColumnView(0, 60);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\theaderLabel = new Label(1, 0, \"Idade\", headerFormat);\n\t\t\tsheet.setColumnView(0, 40);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\t// Cria as celulas com o conteudo\n\t\t\tWritableCellFormat cellFormat = new WritableCellFormat();\n\t\t\tcellFormat.setWrap(true);\n\n\t\t\t// Conteudo tipo texto\n\t\t\tLabel cellLabel = new Label(0, 2, \"Elcio Bonitão\", cellFormat);\n\t\t\tsheet.addCell(cellLabel);\n\t\t\t// Conteudo tipo número (usar jxl.write... para não confundir com java.lang.number...)\n\t\t\tjxl.write.Number cellNumber = new jxl.write.Number(1, 2, 49, cellFormat);\n\t\t\tsheet.addCell(cellNumber);\n\n\t\t\t// Não esquecer de escrever e fechar a planilha\n\t\t\tworkbook.write();\n\t\t\tworkbook.close();\n\n\t\t} catch (IOException e1) {\n\t\t\t// Imprime erro se não conseguir achar o arquivo ou pasta para gravar\n\t\t\te1.printStackTrace();\n\t\t} catch (WriteException e) {\n\t\t\t// exibe erro se acontecer algum tipo de celula de planilha inválida\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "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}", "private void createExecutableFile() throws IOException {\r\n //if (report.getErrorList() == null)\r\n //{\r\n System.out.println(\"Currently generating the executable file.....\");\r\n executableFile = new File(sourceName + \".lst\");\r\n // if creating the lst file is successful, then you can start to write in the lst file\r\n executableFile.delete();\r\n if (executableFile.createNewFile()) {\r\n writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(sourceName + \".asm\"), \"utf-8\")); //create an object to write into the lst file\r\n\r\n String [] hex = generate.split(\" \");\r\n\r\n for (int index = 0; index < hex.length; index++) {\r\n String hex1 = hex[index].trim();\r\n System.out.println(hex1);\r\n\r\n int i = Integer.parseInt(hex1, 16);\r\n String bin = Integer.toBinaryString(i);\r\n System.out.println(bin);\r\n\r\n writer.write(bin); // once the instruction is converted to binary it is written into the exe file\r\n }\r\n\r\n writer.close();\r\n\r\n }\r\n }", "public void CreatFileXML(HashMap<String, List<Detail>> wordMap, String fileName ) throws ParserConfigurationException, TransformerException {\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument doc = dBuilder.newDocument();\n\t\t\n\t\t//root element\n\t\tElement rootElement = doc.createElement(\"Words\");\n\t\tdoc.appendChild(rootElement);\n\t\t\n\t\tSet<String> keyset = wordMap.keySet();\n\t\tfor(String key : keyset) {\n\t\t\t\n\t\t\t// Load List of detail from HashMap\n\t\t\tList<Detail> values = wordMap.get(key);\n\t\t\t\n\t\t\tfor (Detail detail : values) {\n\t\t\t\n\t\t\t\t//LexicalEntry element\n\t\t\t\tElement LexicalEntry = doc.createElement(\"LexicalEntry\");\n\t\t\t\trootElement.appendChild(LexicalEntry);\n\t\t\t\t\n\t\t\t\t//HeadWord element\n\t\t\t\tElement HeadWord = doc.createElement(\"HeadWord\");\n\t\t\t\tHeadWord.appendChild(doc.createTextNode(key));\n\t\t\t\tLexicalEntry.appendChild(HeadWord);\n\t\t\t\t\n\t\t\t\t//Detail element\n\t\t\t\tElement Detail = doc.createElement(\"Detail\");\n\t\t\t\t\n\t\t\t\t// WordType element\n\t\t\t\tElement WordType = doc.createElement(\"WordType\");\n\t\t\t\tWordType.appendChild(doc.createTextNode(detail.getTypeWord()));\n\t\t\t\t\n\t\t\t\t// CateWord element\n\t\t\t\tElement CateWord = doc.createElement(\"CateWord\");\n\t\t\t\tCateWord.appendChild(doc.createTextNode(detail.getCateWord()));\n\t\t\t\t\n\t\t\t\t// SubCateWord element\n\t\t\t\tElement SubCateWord = doc.createElement(\"SubCateWord\");\n\t\t\t\tSubCateWord.appendChild(doc.createTextNode(detail.getSubCateWord()));\n\t\t\t\t\n\t\t\t\t// VerbPattern element\n\t\t\t\tElement VerbPattern = doc.createElement(\"VerbPattern\");\n\t\t\t\tVerbPattern.appendChild(doc.createTextNode(detail.getVerbPattern()));\n\t\t\t\t\n\t\t\t\t// CateMean element\n\t\t\t\tElement CateMean = doc.createElement(\"CateMean\");\n\t\t\t\tCateMean.appendChild(doc.createTextNode(detail.getCateMean()));\n\t\t\t\t\n\t\t\t\t// Definition element\n\t\t\t\tElement Definition = doc.createElement(\"Definition\");\n\t\t\t\tDefinition.appendChild(doc.createTextNode(detail.getDefinition()));\n\t\t\t\t\n\t\t\t\t// Example element\n\t\t\t\tElement Example = doc.createElement(\"Example\");\n\t\t\t\tExample.appendChild(doc.createTextNode(detail.getExample()));\n\t\t\t\t\n\t\t\t\t// Put in Detail Element\n\t\t\t\tDetail.appendChild(WordType);\n\t\t\t\tDetail.appendChild(CateWord);\n\t\t\t\tDetail.appendChild(SubCateWord);\n\t\t\t\tDetail.appendChild(VerbPattern);\n\t\t\t\tDetail.appendChild(CateMean);\n\t\t\t\tDetail.appendChild(Definition);\n\t\t\t\tDetail.appendChild(Example);\n\t\t\t\t\n\t\t\t\t// Add Detail into LexicalEntry\n\t\t\t\tLexicalEntry.appendChild(Detail);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// write the content into xml file\n\t\tTransformerFactory tfmFactory = TransformerFactory.newInstance();\n\t\tTransformer transformer = tfmFactory.newTransformer();\n\t\tDOMSource source = new DOMSource(doc);\n\t\tStreamResult result = new StreamResult(new File(\"F://GitHUB/ReadXML/data/\" + fileName));\n\t\ttransformer.transform(source, result);\n\t\t\n//\t\t// output testing\n//\t\tStreamResult consoleResult = new StreamResult(System.out);\n// transformer.transform(source, consoleResult);\n\t}", "private void createFile(String outputData, File file) {\n try {\n FileWriter writer = new FileWriter(file);\n writer.write(outputData);\n writer.close();\n } catch (IOException e) {\n e.getSuppressed();\n }\n }", "public void nuevoReporteProductos(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteProductos.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE PRODUCTOS\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }", "@Test\n public void CreateFile() throws Exception {\n createFile(\"src\\\\TestSuite\\\\SampleFiles\\\\supervisor.xlsx\",\n readTemplateXLSX(\"src\\\\TestSuite\\\\SampleFiles\\\\template_supervisor.xlsx\"));\n File file = new File(\"src\\\\TestSuite\\\\SampleFiles\\\\supervisor.xlsx\");\n Assert.assertTrue(file.exists());\n }", "private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "public static void createFile(String file) throws FileNotFoundException {\n\t\tif(!file.contains(\".txt\")) {\n\t\t\tthrow new IllegalArgumentException(\"Wrong format\"); \n\t\t}\n\t\tPrintWriter pw = new PrintWriter(file);\n\t\tpw.close();\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tFileWriter arquivo;\n\t\t\n\t\ttry{\t\n\t\t\tarquivo = new FileWriter(\"C:\\\\Users\\\\Usuário\\\\Downloads\\\\resultado.txt\");\n\t\t\tarquivo.write(\"Escrevendo conteúdo de texto:\\nGustavo Soares\\nPROVA DE AEDS\\n10 de dezembro de 2020\");\n\t\t\tarquivo.close();\n\t\t}\n\t\tcatch(FileNotFoundException fe) {\n\t\t\tSystem.out.println(\"Erro: \" + fe.getMessage());\n\t\t}\n\t\tcatch(IOException io) {\n\t\t\tSystem.out.println(\"Erro: \" + io.getMessage());\n\t\t}\n\n\t}", "@Override\n\tpublic void actionPerformed (ActionEvent e)\n\t{\n\t\n\t\t// Create the File Save dialog.\n\t\tFileDialog fd = new FileDialog(\n\t\t\tAppContext.cartogramWizard, \n\t\t\t\"Save Computation Report As...\", \n\t\t\tFileDialog.SAVE);\n\n\t\tfd.setModal(true);\n\t\tfd.setBounds(20, 30, 150, 200);\n\t\tfd.setVisible(true);\n\t\t\n\t\t// Get the selected File name.\n\t\tif (fd.getFile() == null)\n\t\t\treturn;\n\t\t\n\t\tString path = fd.getDirectory() + fd.getFile();\n\t\tif (path.endsWith(\".txt\") == false)\n\t\t\tpath = path + \".txt\";\n\t\t\n\t\t\n\t\t// Write the report to the file.\n\t\ttry\n\t\t{\n\t\t\tBufferedWriter out = new BufferedWriter(new FileWriter(path));\n\t\t\tout.write(AppContext.cartogramWizard.getCartogram().getComputationReport());\n\t\t\tout.close();\n\t\t} \n\t\tcatch (IOException exc)\n\t\t{\n\t\t}\n\n\t\t\n\t\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 }", "public String createDefaultSaveFileName()\r\n {\r\n StringBuffer SaveFileNameBuffer = new StringBuffer(\"grep\");\r\n\r\n // Add the date to the file name.\r\n GregorianCalendar NowCalendar = new GregorianCalendar();\r\n int Year = NowCalendar.get(Calendar.YEAR);\r\n int Month = NowCalendar.get(Calendar.MONTH) + 1;\r\n int Day = NowCalendar.get(Calendar.DAY_OF_MONTH);\r\n SaveFileNameBuffer.append(Year);\r\n if (Month < 10)\r\n SaveFileNameBuffer.append('0');\r\n SaveFileNameBuffer.append(Month);\r\n if (Day < 10)\r\n SaveFileNameBuffer.append('0');\r\n SaveFileNameBuffer.append(Day);\r\n\r\n // Add the search pattern to the file name (excluding illegal characters).\r\n String SearchPatternString = SearchPatternField.getText();\r\n for (int CharIndex = 0; CharIndex < SearchPatternString.length(); CharIndex++)\r\n {\r\n char CurrentChar = SearchPatternString.charAt(CharIndex);\r\n if (Character.isJavaIdentifierPart(CurrentChar) )\r\n SaveFileNameBuffer.append(CurrentChar);\r\n }\r\n\r\n SaveFileNameBuffer.append(\".txt\");\r\n return (SaveFileNameBuffer.toString() );\r\n }", "void createReport(Report report);", "public static void CreateFile(){\n try{\n new File(\"wipimages\").mkdir();\n logscommissions.createNewFile();\n }catch(Exception e){\n e.printStackTrace();\n System.out.println(\"CreateFile Failed\\n\");\n }\n }", "public static void WriteToFile(){\r\n try {\r\n File file = new File(\"output.txt\");\r\n file.createNewFile();\r\n \r\n FileWriter fw = new FileWriter(file.getAbsoluteFile());\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n String[] FinalBoard = new String[Board.ReportBoardValues().length];\r\n FinalBoard = Board.ReportBoardValues();\r\n for(int i = 0; i < Board.ReportBoardValues().length; i++){\r\n bw.write(FinalBoard[i]);\r\n bw.newLine();\r\n }\r\n bw.close();\r\n fw.close();\r\n \r\n }\r\n catch (IOException e) {\r\n System.out.println (\"Output error\");\r\n }\r\n }", "public void nuevoReporteVentasMueble(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteVentasMueble.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE VENTAS POR MUEBLE\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }", "public void saveReport() {\n\t\ttry {\n\t\t\tPrintWriter out = new PrintWriter(new FileOutputStream(reportFile));\n\t\t\tout.println(record.reportToString());\n\t\t\tout.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public String generarReporte (HttpServletRequest request,\n HttpServletResponse response) throws IOException {\n Empresa empresaSesion = (Empresa)request.getSession().getAttribute(\"emp\");\n String simbolo_moneda;\n \n if (empresaSesion != null && empresaSesion.getSimboloMoneda() != null && \n !empresaSesion.getSimboloMoneda().isEmpty()) {\n simbolo_moneda = empresaSesion.getSimboloMoneda();\n } else {\n simbolo_moneda = \"$\";\n }\n \n // Se restauran variables iniciadas\n ReporteUtil.restaurarValores();\n \n String tipoReporte = request.getParameter(\"tipoReporte\");\n String fechaInicio = request.getParameter(\"fechaInicio\");\n String fechaFinal = request.getParameter(\"fechaFinal\");\n String placa = request.getParameter(\"splaca\"); // id,placa,numInterno\n String mplaca = request.getParameter(\"smplaca_v\");\n String esteDia = request.getParameter(\"esteDia\");\n String tipoArchivo = request.getParameter(\"tipoArchivo\");\n String ruta = request.getParameter(\"sruta\");\n String mruta = request.getParameter(\"smruta_v\");\n String malarma = request.getParameter(\"smalarma_v\");\n String base = request.getParameter(\"sbase\");\n String idLiquidador = request.getParameter(\"sliquidador\");\n String meta = request.getParameter(\"smeta\");\n String mconductor = request.getParameter(\"smconductor_v\"); \n \n boolean dia_actual = verificarDiaActual(fechaInicio, fechaFinal);\n \n// Etiquetas etiquetas = null;\n// etiquetas = LiquidacionBD.searchTags();\n ConfiguracionLiquidacion etiquetas = obtenerEtiquetasLiquidacionPerfil(request);\n \n if (etiquetas != null) {\n ReporteUtil.establecerEtiquetas(etiquetas);\n } \n \n //String reportesPath = \"D:\\\\rdw\\\\\"; \n \n // En caso de estar sobre un SO_WIN, se quita ultimo delimitador\n String reportesPath = getServletContext().getRealPath(\"\");\n if (reportesPath.endsWith(\"\\\\\")) {\n reportesPath = reportesPath.substring(0, reportesPath.length()-1); \n }\n \n Map<String,String> h = new HashMap<String,String>();\n \n h.put(\"tipoReporte\", tipoReporte);\n h.put(\"fechaInicio\", fechaInicio);\n h.put(\"fechaFinal\", fechaFinal); \n h.put(\"tipoArchivo\", tipoArchivo);\n h.put(\"path\", reportesPath); \n \n \n // Informacion de usuario en sesion\n HttpSession session = request.getSession(); \n Usuario u = (Usuario) session.getAttribute(\"login\");\n \n h.put(\"idUsuario\", \"\" + u.getId());\n h.put(\"nombreUsuario\", u.getNombre() +\" \"+ u.getApellido());\n h.put(\"usuarioPropietario\", (u.esPropietario()) ? \"1\" : \"0\");\n \n // Nombre y titulo del reporte\n String nt[] = nombreReporte(tipoReporte, dia_actual).split(\":\");\n \n // Verifica si se considera una o todas las rutas\n // para reportes nivel_ocupacion, despachador, descripcion ruta,\n // cumplimiento ruta por conductor\n int ntp = Integer.parseInt(tipoReporte);\n if (ntp == 5 || ntp == 14 || ntp == 16) {\n if (!ruta.equals(\"0\")) { // Se elige una ruta\n nt[0] += \"_X1Ruta\";\n h.put(\"unaRuta\", \"t\");\n } else {\n h.put(\"unaRuta\", \"f\");\n }\n } \n if (ntp == 25) {\n String una_ruta = (!ruta.equals(\"0\")) ? \"t\" : \"f\";\n h.put(\"unaRuta\", una_ruta);\n }\n \n h.put(\"nombreReporte\", nt[0]);\n h.put(\"tituloReporte\", nt[1]);\n \n // Verifica si es reporte gerencia, gerencia x vehiculo para incluir\n // todos los vehiculos o todas las rutas\n ReporteUtil.incluirTotalidadRutas = false;\n ReporteUtil.incluirTotalidadVehiculos = false;\n ReporteUtil.incluirVehiculosPropietario = false;\n \n if (ntp == 15) {\n ReporteUtil.incluirTotalidadVehiculos = true; \n } else if (ntp == 18) {\n ReporteUtil.incluirTotalidadRutas = true;\n } else if (ntp == 11) {\n if (u.esPropietario()) { \n ReporteUtil.incluirVehiculosPropietario = true;\n } else {\n ReporteUtil.incluirTotalidadVehiculos = true; \n }\n }\n \n // Verifica si es reporte ruta x vehiculo para generar\n // reporte desde codigo\n if (ntp == 3) { \n ReporteUtil.desdeCodigo = true;\n } else {\n ReporteUtil.desdeCodigo = false;\n }\n \n // Verifica si es reporte ruta x vehiculo, vehiculo x ruta, despachador\n // para establecer un dia en parametro fecha y no un rango\n if (ntp == 3 || ntp == 11 || ntp == 16) {\n h.put(\"fechaFinal\", fechaInicio);\n } \n \n // No se necesitan fechas para reporte estadistico y descripcion ruta\n if (ntp == 13 || ntp == 14) {\n h.put(\"fechaInicio\", \"\");\n h.put(\"fechaFinal\", \"\");\n }\n \n // Eleccion de reportes gerencia segun empresa\n if (ntp == 15 || ntp == 18) {\n String empresa = u.getNombreEmpresa();\n String nombre_reporte = h.get(\"nombreReporte\");\n if (ReporteUtil.esEmpresa(empresa, ReporteUtil.EMPRESA_FUSACATAN)) {\n nombre_reporte += \"Fusa\";\n h.put(\"nombreReporte\", nombre_reporte);\n } \n }\n \n // Reportes de liquidacion\n if (ntp == 19 || ntp == 20 || ntp == 21 || ntp == 22) { \n h.put(\"fechaInicio\", fechaInicio + \" 00:00:00\");\n h.put(\"fechaFinal\", fechaFinal + \" 23:59:59\");\n \n //System.out.println(\"---> \"+EtiquetasLiquidacion.getEtq_total1() );\n /*SI EL REPORTE ES LIQUIDACION POR LIQUIDADOR SE MODIFICA EL NOMBRE SI LA EMPRESA ES DIFERENTE DE NEIVA*/\n if (ntp == 21) {\n if ((u.getNombreEmpresa().equalsIgnoreCase(\"FUSACATAN\")) || \n (u.getNombreEmpresa().equalsIgnoreCase(\"TIERRA GRATA\")) || \n (u.getNombreEmpresa().equalsIgnoreCase(\"Tierragrata\"))) {\n h.put(\"nombreReporte\", \"Reporte_LiquidacionXLiquidador_new_dcto\"); \n }\n }\n \n if (tipoArchivo.equals(\"w\")) {\n Usuario liquidador = UsuarioBD.getById(Restriction.getNumber(idLiquidador));\n if (liquidador != null) { \n String nom = liquidador.getNombre();\n String ape = liquidador.getApellido(); \n h.put(\"idUsuarioLiquidador\", idLiquidador);\n h.put(\"nombresUsuarioLiquidador\", ape + \" \" + nom);\n }\n } else {\n h.put(\"idUsuario\", idLiquidador);\n }\n } \n \n if (ntp == 23 || ntp == 24 || ntp == 25) {\n h.put(\"meta\", \"\" + meta);\n if (tipoArchivo.equals(\"r\")) {\n ReporteUtil.reporteWeb = true;\n }\n }\n \n if (ntp == 26 || ntp == 27) {\n h.put(\"fechaInicio\", fechaInicio);\n h.put(\"fechaFinal\", fechaFinal);\n ReporteUtil.reporteWeb = true;\n } \n \n // ======================= Verificacion de campos ======================\n \n // Id, placa, numeroInterno vehiculo\n if (placa.indexOf(\",\") >= 0) {\n h.put(\"idVehiculo\", placa.split(\",\")[0]);\n h.put(\"placa\", placa.split(\",\")[1]);\n h.put(\"numInterno\", placa.split(\",\")[2]);\n h.put(\"capacidad\", placa.split(\",\")[3]);\n ReporteUtil.incluirVehiculo = true;\n } else\n ReporteUtil.incluirVehiculo = false;\n \n // Id de multiples vehiculos\n if (mplaca != \"\" || mplaca.indexOf(\",\") >= 0) {\n h.put(\"strVehiculos\", mplaca);\n h.put(\"strVehiculosPlaca\", id2placa(mplaca));\n ReporteUtil.incluirVehiculos = true;\n } else\n ReporteUtil.incluirVehiculos = false;\n \n // Id ruta y nombre ruta\n if (ruta.indexOf(\",\") >= 0) {\n String arrayRuta[] = ruta.split(\",\");\n h.put(\"idRuta\", arrayRuta[0]);\n h.put(\"nombreRuta\", arrayRuta[1]);\n ReporteUtil.incluirRuta = true;\n } else \n ReporteUtil.incluirRuta = false;\n \n // Id ruta \n if (mruta != \"\" || mruta.indexOf(\",\") >= 0) {\n h.put(\"strRutas\", mruta);\n ReporteUtil.incluirRutas = true;\n } else\n ReporteUtil.incluirRutas = false;\n \n // Id alarma\n if (malarma != \"\" || malarma.indexOf(\",\") >= 0) {\n h.put(\"strAlarmas\", malarma);\n ReporteUtil.incluirAlarma = true;\n } else \n ReporteUtil.incluirAlarma = false; \n \n // Id base, nombre\n if (base.indexOf(\",\") >= 0) {\n String arrayBase[] = base.split(\",\");\n h.put(\"idBase\", arrayBase[0]);\n h.put(\"nombreBase\", arrayBase[1]);\n ReporteUtil.incluirBase = true;\n } else \n ReporteUtil.incluirBase = false; \n \n // Se verifica y establece parametros de empresa\n Empresa emp = EmpresaBD.getById(u.getIdempresa()); \n if (emp != null) {\n h.put(\"nombreEmpresa\", emp.getNombre());\n h.put(\"nitEmpresa\", emp.getNit());\n h.put(\"idEmpresa\", \"\" + emp.getId());\n } else {\n request.setAttribute(\"msg\", \"* Usuario no tiene relaci&oacute;n y/o permisos adecuados con la empresa.\");\n request.setAttribute(\"msgType\", \"alert alert-warning\");\n return \"/app/reportes/generaReporte.jsp\";\n }\n \n int id_ruta = Restriction.getNumber(h.get(\"idRuta\")); \n String pplaca = \"'\" + h.get(\"placa\") + \"'\";\n \n // Se verifica si existe despacho para cruzar sus datos,\n // en caso contrario se extrae los datos unicamente desde tabla info. registradora\n if (ntp == 3) {\n if (!DespachoBD.existe_planilla_en(fechaInicio, pplaca)) {\n ReporteUtil.desdeCodigo = true; \n h.put(\"nombreReporte\", \"reporte_RutaXVehiculo2\");\n h.put(\"cruzarDespacho\", \"0\"); \n } else {\n ReporteUtil.desdeCodigo = false; // Reporte con cruce despacho es dinamico\n h.put(\"cruzarDespacho\", \"1\"); \n }\n }\n if (ntp == 11) {\n if (!DespachoBD.existe_planilla_en(fechaInicio, id_ruta)) {\n h.put(\"nombreReporte\", \"reporte_VehiculosXRuta\");\n h.put(\"cruzarDespacho\", \"0\"); \n } else {\n h.put(\"cruzarDespacho\", \"1\");\n }\n }\n \n if (ntp == 30) {\n h.put(\"fechaInicio\", fechaInicio);\n h.put(\"fechaFinal\", fechaFinal);\n h.put(\"strConductores\", mconductor);\n ReporteUtil.reporteWeb = true;\n \n // Se verifica que exista una configuracion de desempeno activa\n ConfCalificacionConductor ccc = CalificacionConductorBD.confCalificacionConductor();\n if (ccc == null) {\n request.setAttribute(\"msg\", \"* No existe ninguna configuraci&oacute;n de desempe&ntilde;o registrada. Por favor registre una.\");\n request.setAttribute(\"msgType\", \"alert alert-warning\");\n request.setAttribute(\"result_error\", \"1\");\n return \"/app/reportes/generaReporte.jsp\";\n }\n }\n \n // Creacion de reporte\n JasperPrint print = null;\n if (tipoArchivo.equals(\"r\")) {\n \n // Reporte de solo lectura << PDF / Web >>\n ReporteUtil rpt;\n \n if (ReporteUtil.reporteWeb) { \n ReporteWeb rptw = new ReporteWeb(h, request, response);\n return rptw.generarReporteWeb(ntp); \n \n } else if (ReporteUtil.desdeCodigo) {\n rpt = new ReporteUtil(h);\n print = rpt.generarReporteDesdeCodigo(Integer.parseInt(h.get(\"tipoReporte\")), simbolo_moneda);\n \n } else {\n rpt = new ReporteUtil(h);\n print = rpt.generarReporte(simbolo_moneda);\n }\n \n } else {\n \n // Reporte editable << XLS >>\n ReporteUtilExcel rue = new ReporteUtilExcel();\n MakeExcel rpte = rue.crearReporte(ntp, dia_actual, h, u, etiquetas);\n \n // Restablece placa de reportes que no necesitan\n restablecerParametro(\"placa\", ntp, h);\n String splaca = h.get(\"placa\");\n splaca = (splaca == null || splaca == \"\") ? \"\" : \"_\" + splaca;\n String nombreArchivo = h.get(\"nombreReporte\") + splaca + \".xls\";\n \n //response.setContentType(\"application/vnd.ms-excel\");\n response.setContentType(\"application/ms-excel\"); \n response.setHeader(\"Content-Disposition\", \"attachment; filename=\"+nombreArchivo);\n \n HSSFWorkbook file = rpte.getExcelFile();\n file.write(response.getOutputStream()); \n response.flushBuffer();\n response.getOutputStream().close();\n \n return \"/app/reportes/generaReporte.jsp\";\n }\n \n // Impresion de reporte de solo lectura PDF\n if (print != null) {\n \n try { \n // Se comprueba existencia de datos en el reporte obtenido\n boolean hayDatos = true;\n List<JRPrintPage> pp = print.getPages(); \n if (pp.size() > 0) {\n JRPrintPage ppp = pp.get(0);\n if (ppp.getElements().size() <= 0) \n hayDatos = false; \n } else \n hayDatos = false;\n \n if (!hayDatos) {\n request.setAttribute(\"msg\", \"* Ning&uacute;n dato obtenido en el reporte.\");\n request.setAttribute(\"msgType\", \"alert alert-warning\");\n request.setAttribute(\"data_reporte\", \"1\");\n return \"/app/reportes/generaReporte.jsp\";\n }\n \n byte[] bytes = JasperExportManager.exportReportToPdf(print);\n \n // Inicia descarga del reporte\n response.setContentType(\"application/pdf\");\n response.setContentLength(bytes.length);\n ServletOutputStream outStream = response.getOutputStream();\n outStream.write(bytes, 0, bytes.length);\n outStream.flush();\n outStream.close();\n \n } catch (JRException e) {\n System.err.println(e);\n } catch (IOException e) {\n System.err.println(e);\n } \n }\n return \"/app/reportes/generaReporte.jsp\";\n }", "boolean createReport(String lang, String reportId, String fileName, Object... params) throws Exception;", "private void createFile(String fileName, String content) throws IOException {\n File file = new File(fileName);\n if (!file.exists()) {\n file.createNewFile();\n }\n FileWriter fileWriter = new FileWriter(fileName, false);\n fileWriter.append(content);\n fileWriter.close();\n }", "public File createOutputSpreadsheet(String year) throws IOException {\n\t\tFile body = new File();\n\t\tDateFormat df = new SimpleDateFormat(\"h:mm a MM/dd\");\n\t body.setTitle(\"SEODA Output \" + year + \" Created at \"+df.format(new Date()));\n\t body.setDescription(year + \" SEODA Command Line output document. SEODA \" + Unpacker.getVersionTxt());\n\t body.setMimeType(\"application/vnd.google-apps.spreadsheet\");\n\n\t File file = drive.files().insert(body).execute();\n\t \n\t return file;\n\t}", "private void toFile(OutputData data) {\n if(data == null) {\r\n JOptionPane.showMessageDialog(this, \"Dane wynikowe nie zostały jeszcze umieszczone w pamieci\");\r\n return;\r\n }\r\n\r\n // Sprawdzenie sciezki zapisu\r\n String filePath = this.outputFileSelector.getPath();\r\n if(filePath.length() <= 5) {\r\n JOptionPane.showMessageDialog(this, \"Nie można zapisać wyniku w wybranej lokacji!\");\r\n return;\r\n }\r\n\r\n // Zapisujemy plik na dysk\r\n try{\r\n PrintWriter writer = new PrintWriter(filePath, \"UTF-8\");\r\n OutputDataFormatter odf = new OutputDataFormatter(this.outputData);\r\n\r\n String userPattern = this.outputFormatPanel.getPattern();\r\n writer.write(odf.getParsedString(userPattern.length() < 2 ? defaultFormatting : userPattern));\r\n\r\n writer.close();\r\n } catch (IOException e) {\r\n JOptionPane.showMessageDialog(this, \"Wystąpił błąd IO podczas zapisu.\");\r\n }\r\n\r\n }", "public void testCreate () throws IOException {\n\t PDDocument document = new PDDocument(); \r\n\t \r\n\t //Saving the document\r\n\t document.save(\"./my_doc.pdf\");\r\n\t \r\n\t System.out.println(\"PDF created\"); \r\n\t \r\n\t //Closing the document \r\n\t document.close();\r\n\t}", "static void LeerArchivo(){ \r\n \t//iniciamos el try y si no funciona se hace el catch\r\n\r\n try{ \r\n \t//se crea un objeto br con el archivo de txt\r\n \tBufferedReader br = new BufferedReader( \r\n \tnew FileReader(\"reporte.txt\")\r\n );\r\n String s;\r\n //Mientras haya una linea de texto se imprime\r\n while((s = br.readLine()) != null){ \r\n System.out.println(s);\r\n }\r\n //se cierra el archivo de texto\r\n br.close(); \r\n } catch(Exception ex){\r\n \t//si no funciona se imprime el error\r\n System.out.println(ex); \r\n }\r\n }", "public void generateAndwriteToFile() {\n List<GeneratedJavaFile> gjfs = generate();\n if (gjfs == null || gjfs.size() == 0) {\n return;\n }\n for (GeneratedJavaFile gjf : gjfs) {\n writeToFile(gjf);\n }\n }", "public void generatePDF(String directory, String nameOfTheDocument) throws Exception{\n\t\t\n\t\t//Create empty document (instance of Document classe from Apose.Words)\n\t\tDocument doc = new Document();\n\t\t\n\t\t//Every word document have section, so now we are creating section\n\t\tSection section = new Section(doc);\n\t\tdoc.appendChild(section);\n\t\t\n\t\tsection.getPageSetup().setPaperSize(PaperSize.A4);\n\t\tsection.getPageSetup().setHeaderDistance (35.4); // 1.25 cm\n\t\tsection.getPageSetup().setFooterDistance (35.4); // 1.25 cm\n\t\t\n\t\t//Crating the body of section\n\t\tBody body = new Body(doc);\n\t\tsection.appendChild(body);\n\t\t\n\t\t//Crating paragraph\n\t\tParagraph paragraph = new Paragraph(doc);\n\t\t\n\t\tparagraph.getParagraphFormat().setStyleName(\"Heading 1\");\n\t\tparagraph.getParagraphFormat().setAlignment(ParagraphAlignment.CENTER);\n\t\t//Crating styles\n\t\tStyle style = doc.getStyles().add(StyleType.PARAGRAPH, \"Style1\");\n\t\tstyle.getFont().setSize(24);\n\t\tstyle.getFont().setBold(true);\n\t\tstyle.getFont().setColor(Color.RED);\n\t\t//paragraph.getParagraphFormat().setStyle(style);\n\t\tbody.appendChild(paragraph);\n\t\t\n\t\tStyle styleForIntroduction = doc.getStyles().add(StyleType.PARAGRAPH, \"Style2\");\n\t\tstyle.getFont().setSize(40);\n\t\tstyle.getFont().setBold(false);\n\t\tstyle.getFont().setItalic(true);\n\t\tstyle.getFont().setColor(Color.CYAN);\n\t\t\n\t\tStyle styleForText = doc.getStyles().add(StyleType.PARAGRAPH, \"Style3\");\n\t\tstyle.getFont().setSize(15);\n\t\tstyle.getFont().setBold(false);\n\t\tstyle.getFont().setItalic(false);\n\t\tstyle.getFont().setColor(Color.BLACK);\n\t\t\n\t\t//Crating run of text\n\t\tRun textRunHeadin1 = new Run(doc);\n\t\ttry {\n\t\t\ttextRunHeadin1.setText(\"Probni test fajl\" + \"\\r\\r\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tparagraph.appendChild(textRunHeadin1);\n\t\t\n\t\t\n\t\t//Creating paragraph1 for every question in list\n\t\tfor (Question question : questions) {\n\t\t\t\n\t\t\t\n\t\t\t\t//Paragraph for Instruction Question\n\t\t\t\tParagraph paragraphForInstruction = new Paragraph(doc);\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setStyleName(\"Heading 1\");\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setAlignment(ParagraphAlignment.LEFT);\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setStyle(styleForIntroduction);\n\t\t\t\tparagraphForInstruction.getParagraphFormat().setStyleName(\"Heading 3\");\n\t\t\t\t\n\t\t\t\tRun runIntroduction = new Run(doc);\n\t\t\t\t\n\t\t\t\trunIntroduction.getFont().setColor(Color.BLUE);\n\t\t\t\ttry {\n\t\t\t\t\trunIntroduction.setText(((Question)question).getTextInstructionForQuestion()+\"\\r\");\n\t\t\t\t} catch (Exception 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\tparagraphForInstruction.appendChild(runIntroduction);\n\t\t\t\tbody.appendChild(paragraphForInstruction);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Paragraph for Question\n\t\t\t\tParagraph paragraphForQuestion = new Paragraph(doc);\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setStyleName(\"Heading 1\");\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setAlignment(ParagraphAlignment.LEFT);\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setStyle(styleForText);\n\t\t\t\tparagraphForQuestion.getParagraphFormat().setStyleName(\"Normal\");\n\t\t\t\t\n\t\t\t\tRun runText = new Run(doc);\n\t\t\t\tif(question instanceof QuestionBasic){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionBasic)question).toStringForDocument()+\"\\r\");\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tif(question instanceof QuestionFillTheBlank){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionFillTheBlank)question).toStringForDocument());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tif(question instanceof QuestionMatching){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionMatching)question).toStringForDocument());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tif(question instanceof QuestionTrueOrFalse){\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\trunText.setText(((QuestionTrueOrFalse)question).toStringForDocument());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tparagraphForQuestion.appendChild(runText);\n\t\t\t\tbody.appendChild(paragraphForQuestion);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tdoc.save(directory + nameOfTheDocument +\".pdf\");\n\t\t\n\t}", "public void nuevoReporteVentasFecha(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteVentasFecha.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE VENTAS POR FECHA\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }", "static public void main(String args[]) throws IOException, DocumentException, XMPException {\n File file = new File(DEST);\n file.getParentFile().mkdirs();\n new Sample06_Zugferd().createPdf(DEST);\n }", "private void writeSizeReport()\n {\n Writer reportOut = null;\n try\n {\n reportOut = new BufferedWriter(new OutputStreamWriter(\n new FileOutputStream(sizeReportFile), \"UTF8\"));\n reportOut.write(report.generate());\n reportOut.flush();\n }\n catch (Exception e)\n {\n // TODO: report a problem\n throw new RuntimeException(e);\n }\n finally\n {\n if (reportOut != null)\n try\n {\n reportOut.close();\n }\n catch (IOException e)\n {\n // ignore\n }\n }\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 }", "private void outputExtraFile(String datasetName, Field[] selects,\r\n\t\t\tString fileName) {\r\n\t\tFile f = new File(fileName + \".xml\");\r\n\t\ttry {\r\n\t\t\tFileWriter fw = new FileWriter(f);\r\n\t\t\tSystem.out.println (\"Encoding\"+fw.getEncoding());\r\n\t\t\tString str = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\";\r\n\t\t\tfw.write(str);\r\n\t\t\tstr = \"<Extra><Datasets><Dataset><id>\" + datasetName\r\n\t\t\t\t\t+ \"</id><Fields>\";\r\n\t\t\tfw.write(str);\r\n\t\t\tfor (int i = 0; i < selects.length; i++) {\r\n\t\t\t\tfw.write(\"<Field>\");\r\n\t\t\t\t// Output the Label of Field.\r\n\t\t\t\tstr = \"<label>\" + selects[i].label.getBytes(\"UTF-8\") + \"</label>\";\r\n\t\t\t\tfw.write(str);\r\n\t\t\t\t// Output the ID of Field.\r\n\t\t\t\tstr = \"<name>field\" + (i + 1) + \"</name>\";\r\n\t\t\t\tfw.write(str);\r\n\t\t\t\tfw.write(\"</Field>\");\r\n\t\t\t}\r\n\t\t\tstr = \"</Fields></Dataset></Datasets></Extra>\";\r\n\t\t\tfw.write(str);\r\n\t\t\tfw.flush();\r\n\t\t\tfw.close();\r\n\t\t\t/* Output the Log */\r\n\t\t\tSystem.out.println(\"CARA LOG: Generate Extra \" + fileName\r\n\t\t\t\t\t+ \" successfully.\");\r\n\t\t} catch (FileNotFoundException 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}", "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 }", "public void toFile (String nameFile)\n {\n //definir dados\n int i, j;\n int lin;\n int col;\n FILE arquivo;\n\n //obter dimensoes\n lin = lines();\n col = columns();\n\n //verificar se as dimensoes sao validas\n if( lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Tamanho(s) invalido(s). \");\n } //end\n else\n {\n //verificar se tabela e' valida\n if( table == null )\n {\n IO.println(\"ERRO: Matriz invalida. \" );\n } //end\n else\n {\n arquivo = new FILE(FILE.OUTPUT, nameFile);\n arquivo.println(\"\"+ lin);\n arquivo.println(\"\"+ col);\n\n //pecorre para preencher a matriz\n for( i = 0; i < lin; i++)\n {\n for(j = 0; j < col; j++)\n {\n arquivo.println(\"\" + table[ i ][ j ]);\n } //end repetir\n } //end repetir\n //fechar arquivo (indispensavel)\n arquivo.close();\n } //end se\n } //end se\n }", "public void generarReporteTablaAmortiDetalles(String sAccionBusqueda,List<TablaAmortiDetalle> tablaamortidetallesParaReportes) throws Exception {\n\t\tLong iIdUsuarioSesion=0L;\t\r\n\t\t\r\n\t\t\r\n\t\tif(usuarioActual==null) {\r\n\t\t\tthis.usuarioActual=new Usuario();\r\n\t\t}\r\n\t\t\r\n\t\tiIdUsuarioSesion=usuarioActual.getId();\r\n\t\t\r\n\t\tString sPathReportes=\"\";\r\n\t\t\r\n\t\tInputStream reportFile=null;\r\n\t\tInputStream imageFile=null;\r\n\t\t\t\r\n\t\timageFile=AuxiliarImagenes.class.getResourceAsStream(\"LogoReporte.jpg\");\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\tString sPathReporteFinal=\"\";\r\n\t\t\r\n\t\tif(!esReporteAccionProceso) {\r\n\t\t\tif(!this.sTipoReporte.equals(\"RELACIONES\")) {//!isEsReporteRelaciones\r\n\t\t\t\tif(!this.esReporteDinamico) {\r\n\t\t\t\t\tsPathReporteFinal=\"TablaAmortiDetalle\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsPathReporteFinal=this.sPathReporteDinamico;\r\n\t\t\t\t\treportFile = new FileInputStream(sPathReporteFinal);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsPathReporteFinal=\"TablaAmortiDetalleMasterRelaciones\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\r\n\t\t\t\t//sPathReportes=reportFile.getPath().replace(\"TablaAmortiDetalleMasterRelacionesDesign.jasper\", \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t\tsPathReporteFinal=\"TablaAmortiDetalle\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\t\r\n\t\t}\r\n\t\t\r\n\t\tif(reportFile==null) {\r\n\t\t\tthrow new JRRuntimeException(sPathReporteFinal+\" no existe\");\r\n\t\t}\r\n\t\t\r\n\t\tString sUsuario=\"\";\r\n\t\t\r\n\t\tif(usuarioActual!=null) {\r\n\t\t\tsUsuario=usuarioActual.getuser_name();\r\n\t\t}\r\n\t\t\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"usuario\", sUsuario);\r\n\t\t\r\n\t\tparameters.put(\"titulo\", Funciones.GetTituloSistemaReporte(this.parametroGeneralSg,this.moduloActual,this.usuarioActual));\r\n\t\tparameters.put(\"subtitulo\", \"Reporte De Tabla Amortizacion Detalles\");\t\t\r\n\t\tparameters.put(\"busquedapor\", TablaAmortiDetalleConstantesFunciones.getNombreIndice(sAccionBusqueda)+sDetalleReporte);\r\n\t\t\r\n\t\t\r\n\t\tif(this.sTipoReporte.equals(\"RELACIONES\")) {//isEsReporteRelaciones\r\n\t\t\tparameters.put(\"SUBREPORT_DIR\", sPathReportes);\r\n\t\t}\r\n\t\t\r\n\t\tparameters.put(\"con_grafico\", this.conGraficoReporte);\r\n\t\t\r\n\t\tJasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile);\r\n\t\t\t\t\r\n\t\tthis.cargarDatosCliente();\r\n\t\t\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\t\t\r\n\t\t\r\n\t\tif(this.sTipoReporte.equals(\"RELACIONES\")) {//isEsReporteRelaciones\r\n\t\t\t\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t//FK DEBERIA TRAERSE DE ANTEMANO\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\t//CLASSES PARA REPORTES OBJETOS RELACIONADOS\r\n\t\tif(!this.sTipoReporte.equals(\"RELACIONES\")) {//!isEsReporteRelaciones\r\n\t\t\tclasses=new ArrayList<Classe>();\r\n\t\t}\r\n\t\t\r\n\t\tJRBeanArrayDataSource jrbeanArrayDataSourceTablaAmortiDetalle=null;\r\n\t\t\r\n\t\tif(this.sTipoReporteExtra!=null && !this.sTipoReporteExtra.equals(\"\")) {\r\n\t\t\tTablaAmortiDetalleConstantesFunciones.S_TIPOREPORTE_EXTRA=this.sTipoReporteExtra;\r\n\t\t} else {\r\n\t\t\tTablaAmortiDetalleConstantesFunciones.S_TIPOREPORTE_EXTRA=\"\";\r\n\t\t}\r\n\t\t\r\n\t\tjrbeanArrayDataSourceTablaAmortiDetalle=new JRBeanArrayDataSource(TablaAmortiDetalleJInternalFrame.TraerTablaAmortiDetalleBeans(tablaamortidetallesParaReportes,classes).toArray());\r\n\t\t\r\n\t\tjasperPrint = JasperFillManager.fillReport(jasperReport,parameters,jrbeanArrayDataSourceTablaAmortiDetalle);\r\n\t\t\t\t\r\n\t\t\r\n\t\tString sPathDest=Constantes.SUNIDAD_ARCHIVOS+\":/\"+Constantes.SCONTEXTSERVER+\"/\"+TablaAmortiDetalleConstantesFunciones.SCHEMA+\"/reportes\";\r\n\t\t\r\n\t\tFile filePathDest = new File(sPathDest);\r\n\t\t\r\n\t\tif(!filePathDest.exists()) {\r\n\t\t\tfilePathDest.mkdirs();\t\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\tString sDestFileName=sPathDest+\"/\"+TablaAmortiDetalleConstantesFunciones.CLASSNAME;\r\n\t\t\t\t\r\n\t\tif(this.sTipoArchivoReporte==\"VISUALIZAR\") {\r\n\t\t\tJasperViewer jasperViewer = new JasperViewer(jasperPrint,false) ;\r\n\t\t\tjasperViewer.setVisible(true) ; \r\n\r\n\t\t} else if(this.sTipoArchivoReporte==\"HTML\"||this.sTipoArchivoReporte==\"PDF\"||this.sTipoArchivoReporte==\"XML\") {\t\r\n\t\t\t//JasperFillManager.fillReportToFile(reportFile.getAbsolutePath(),parameters, new JRBeanArrayDataSource(TablaAmortiDetalleBean.TraerTablaAmortiDetalleBeans(tablaamortidetallesParaReportes).toArray()));\r\n\t\t\t\t\t\t\t\r\n\t\t\tif(this.sTipoArchivoReporte==\"HTML\") {\r\n\t\t\t\tsDestFileName+=\".html\";\r\n\t\t\t\tJasperExportManager.exportReportToHtmlFile(jasperPrint,sDestFileName);\r\n\t\t\t\t\t\r\n\t\t\t} else if(this.sTipoArchivoReporte==\"PDF\") {\r\n\t\t\t\tsDestFileName+=\".pdf\";\r\n\t\t\t\tJasperExportManager.exportReportToPdfFile(jasperPrint,sDestFileName);\r\n\t\t\t} else {\r\n\t\t\t\tsDestFileName+=\".xml\";\r\n\t\t\t\tJasperExportManager.exportReportToXmlFile(jasperPrint,sDestFileName, false);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t} else if(this.sTipoArchivoReporte==\"WORD\"||this.sTipoArchivoReporte==\"EXCEL\") {\r\n\t\t\t\t\r\n\t\t\tif(this.sTipoArchivoReporte==\"WORD\") {\r\n\t\t\t\tsDestFileName+=\".rtf\";\r\n\t\t\t\t\t\r\n\t\t\t\tJRRtfExporter exporter = new JRRtfExporter();\r\n\t\t\r\n\t\t\t\texporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);\r\n\t\t\t\texporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sDestFileName);\r\n\t\t\r\n\t\t\t\texporter.exportReport();\r\n\t\t\t\t\r\n\t\t\t} else\t{\r\n\t\t\t\tsDestFileName+=\".xls\";\r\n\t\t\t\t\t\r\n\t\t\t\tJRXlsExporter exporterXls = new JRXlsExporter();\r\n\t\t\r\n\t\t\t\texporterXls.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);\r\n\t\t\t\texporterXls.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sDestFileName);\r\n\t\t\t\texporterXls.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);\r\n\t\t\r\n\t\t\t\texporterXls.exportReport();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else if(this.sTipoArchivoReporte==\"EXCEL2\"||this.sTipoArchivoReporte==\"EXCEL2_2\") {\r\n\t\t\t//sDestFileName+=\".xlsx\";\r\n\t\t\t\r\n\t\t\tif(this.sTipoReporte.equals(\"NORMAL\")) {\r\n\t\t\t\tthis.generarExcelReporteTablaAmortiDetalles(sAccionBusqueda,sTipoArchivoReporte,tablaamortidetallesParaReportes);\r\n\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"FORMULARIO\")){\r\n\t\t\t\tthis.generarExcelReporteVerticalTablaAmortiDetalles(sAccionBusqueda,sTipoArchivoReporte,tablaamortidetallesParaReportes,false);\r\n\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"DINAMICO\")){\r\n\t\t\t\t\r\n\t\t\t\tif(this.sTipoReporteDinamico.equals(\"NORMAL\")) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.jButtonGenerarExcelReporteDinamicoTablaAmortiDetalleActionPerformed(null);\r\n\t\t\t\t\t//this.generarExcelReporteTablaAmortiDetalles(sAccionBusqueda,sTipoArchivoReporte,tablaamortidetallesParaReportes);\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t} else if(this.sTipoReporteDinamico.equals(\"FORMULARIO\")){\r\n\t\t\t\t\tthis.generarExcelReporteVerticalTablaAmortiDetalles(sAccionBusqueda,sTipoArchivoReporte,tablaamortidetallesParaReportes,true);\r\n\t\t\t\t\r\n\t\t\t\t} else if(this.sTipoReporteDinamico.equals(\"RELACIONES\")){\r\n\t\t\t\t\tthis.generarExcelReporteRelacionesTablaAmortiDetalles(sAccionBusqueda,sTipoArchivoReporte,tablaamortidetallesParaReportes,true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"RELACIONES\")){\r\n\t\t\t\tthis.generarExcelReporteRelacionesTablaAmortiDetalles(sAccionBusqueda,sTipoArchivoReporte,tablaamortidetallesParaReportes,false);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(this.sTipoArchivoReporte==\"HTML\"||this.sTipoArchivoReporte==\"PDF\"||this.sTipoArchivoReporte==\"XML\"||this.sTipoArchivoReporte==\"WORD\"||this.sTipoArchivoReporte==\"EXCEL\") {\t\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(this,\"REPORTE \"+sDestFileName+\" GENERADO SATISFACTORIAMENTE\",\"REPORTES \",JOptionPane.INFORMATION_MESSAGE);\r\n\t\t}\r\n\t}", "public void BotonExportarPDF(String nomRep) {\n //ABRIR CUADRO DE DIALOGO PARA GUARDAR EL ARCHIVO \n JFileChooser fileChooser = new JFileChooser();\n fileChooser.addChoosableFileFilter(new FileNameExtensionFilter(\"todos los archivos *.PDF\", \"pdf\", \"PDF\"));//filtro para ver solo archivos .pdf\n int seleccion = fileChooser.showSaveDialog(null);\n try {\n if (seleccion == JFileChooser.APPROVE_OPTION) {//comprueba si ha presionado el boton de aceptar\n File JFC = fileChooser.getSelectedFile();\n String PATH = JFC.getAbsolutePath();//obtenemos la direccion del archivo + el nombre a guardar\n try (PrintWriter printwriter = new PrintWriter(JFC)) {\n printwriter.print(\"src\\\\Reportes\\\\\" + nomRep + \".jasper\");\n }\n this.ReportePDF(\"src\\\\Reportes\\\\\" + nomRep + \".jasper\", PATH);//mandamos como parametros la ruta del archivo a compilar y el nombre y ruta donde se guardaran \n //comprobamos si a la hora de guardar obtuvo la extension y si no se la asignamos\n if (!(PATH.endsWith(\".pdf\"))) {\n File temp = new File(PATH + \".pdf\");\n JFC.renameTo(temp);//renombramos el archivo\n }\n JOptionPane.showMessageDialog(null, \"Esto puede tardar unos segundos, espere porfavor\", \"Estamos Generando el Reporte\", JOptionPane.WARNING_MESSAGE);\n JOptionPane.showMessageDialog(null, \"Documento Exportado Exitosamente!\", \"Guardado exitoso!\", JOptionPane.INFORMATION_MESSAGE);\n }\n } catch (FileNotFoundException | HeadlessException e) {//por alguna excepcion salta un mensaje de error\n JOptionPane.showMessageDialog(null, \"Error al Exportar el archivo!\", \"Oops! Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public static void generateReport()\n\t{\n\t\tlong time=System.currentTimeMillis();\n\t\tString reportPath=System.getProperty(\"user.dir\")+\"//automationReport//Report\"+time+\".html\";\n\t\t\n\t\thtmlreporter=new ExtentHtmlReporter(reportPath);\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlreporter);\n\t\t\n\t\tString username=System.getProperty(\"user.name\");\n\t\tString osname=System.getProperty(\"os.name\");\n\t\tString browsername=CommonFunction.readPropertyFile(\"Browser\");\n\t\tString env=CommonFunction.readPropertyFile(\"Enviornment\");\n\t\t\n\t\t\n\t\textent.setSystemInfo(\"User Name\", username);\n\t\textent.setSystemInfo(\"OS Name\", osname);\n\t\textent.setSystemInfo(\"Browser Name\", browsername);\n\t\textent.setSystemInfo(\"Enviornment\", env);\n\t\t\n\t\t\n\t\thtmlreporter.config().setDocumentTitle(\"Automation Report\");\n\t\thtmlreporter.config().setTheme(Theme.STANDARD);\n\t\thtmlreporter.config().setChartVisibilityOnOpen(true);\n \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public void createPdf(String filename)\n throws SQLException, DocumentException, IOException {\n \t// Create a database connection\n DatabaseConnection connection = new HsqldbConnection(\"filmfestival\");\n // step 1\n Document document = new Document(PageSize.A4.rotate());\n // step 2\n PdfWriter.getInstance(document, new FileOutputStream(filename));\n // step 3\n document.open();\n // step 4\n document.add(getTable(connection));\n // step 5\n document.close();\n // close the database connection\n connection.close();\n }", "public static void WriteFile(){\n String[] linha;\n FileWriter writer;\n try{\n writer = new FileWriter(logscommissions, true);\n PrintWriter printer = new PrintWriter(writer);\n linha = ManageCommissionerList.ReturnsCommissionerListInString(ManageCommissionerList.comms.size()-1);\n for(int i=0;i<19;i++){\n printer.append(linha[i]+ \"\\n\");\n }\n printer.close();\n }catch(Exception e){\n e.printStackTrace();\n System.out.println(\"Unable to read file\\n\");\n }\n try{\n Commissions temp = ManageCommissionerList.comms.get(ManageCommissionerList.comms.size()-1);\n BufferedImage img = temp.GetWipImage();\n File fl = new File(\"wipimages/wip\" + temp.GetCommissionTitle() + temp.GetUniqueID() + \".jpg\");\n ImageIO.write(img, \"jpg\", fl);\n }catch (Exception e){\n e.printStackTrace();\n System.out.printf(\"Failure to write image file\");\n }\n \n }", "private void createFile(PonsFileFactory ponsFileFactory, Profile profile){\n moveX(profile);\n ponsFileFactory.setProfile(profile);\n String text = ponsFileFactory.createPonsFile();\n String profileName = profile.getName();\n WriteFile.write(text,pathTextField.getText() + \"/\" + profileName.substring(0,profileName.indexOf(\".\")));\n }", "public void gerarCupom(String cliente, String vendedor,List<Produto> produtos, float totalVenda ) throws IOException {\r\n \r\n File arquivo = new File(\"cupomFiscal.txt\");\r\n String produto =\" \"; \r\n if(arquivo.exists()){\r\n System.out.println(\"Arquivo localizado com sucessso\");\r\n }else{\r\n System.out.println(\"Arquivo não localizado, será criado outro\");\r\n arquivo.createNewFile();\r\n } \r\n \r\n for(Produto p: produtos){\r\n produto += \" \"+p.getQtd()+\" \"+ p.getNome()+\" \"+p.getMarca()+\" \"+ p.getPreco()+\"\\n \";\r\n }\r\n \r\n \r\n \r\n FileWriter fw = new FileWriter(arquivo, true);\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n \r\n \r\n bw.write(\" \"+LOJA);\r\n bw.newLine();\r\n bw.write(\"---------------------------------------\");\r\n bw.newLine();\r\n bw.write(\"CLIENTE CPF\");\r\n bw.newLine();\r\n bw.write(cliente);\r\n bw.newLine();\r\n bw.write(\"---------------------------------------\");\r\n bw.newLine();\r\n bw.write(DateCustom.dataHora());\r\n bw.newLine();\r\n bw.write(\" CUPOM FISCAL \");\r\n bw.newLine();\r\n bw.write(\"QTD DESCRIÇÃO PREÇO\");\r\n bw.newLine();\r\n bw.write(produto);\r\n bw.newLine(); \r\n bw.write(\"---------------------------------------\");\r\n bw.newLine();\r\n bw.write(\"TOTAL R$ \" + totalVenda);\r\n bw.newLine();\r\n bw.write(\"---------------------------------------\");\r\n bw.newLine();\r\n bw.write(\"Vendedor \" + vendedor);\r\n bw.newLine();\r\n bw.newLine();\r\n bw.close();\r\n fw.close();\r\n }", "public void saveFile() {\n\t\tPrintWriter output = null;\n\t\ttry {\n\t\t\toutput = new PrintWriter(\"/Users/katejeon/Documents/Spring_2020/CPSC_35339/avengers_project/game_result.txt\");\n\t\t\toutput.println(textArea.getText());\n\t\t\toutput.flush();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File doesn't exist.\");\n\t\t} finally {\n\t\t\toutput.close();\n\t\t}\n\t}", "public static void generateReport() {\n PrintImpl printer = new PrintImpl(realtorLogImpl, propertyLogImpl);\n printer.generateReport(REQUESTS_FILE);\n }", "public void crearNotaDeVenta (HistorialVentas ventas){\r\n String currentDate = this.dateFormat.format(this.date);\r\n try{\r\n this.writer = new PrintWriter(\"cierre_\" + currentDate + \".txt\", \"UTF-8\");\r\n this.writer.println(\"Historial ventas\");\r\n for(int i = 0; i < ventas.size(); i++) {\r\n //ventas.size se refiere al historial de ventas, es para recorrer lo que ya se tiene \r\n this.writer.println( (i+1) + \") Clave de venta: \" + ventas.getVentaAt(i).getClave());\r\n this.writer.println(\"Precio: \" + ventas.getVentaAt(i).getPrecio() + \"\\t\" + \"Cantidad: \" + ventas.getVentaAt(i).getCantidad());\r\n this.writer.println(\"Importe: \" + ventas.getVentaAt(i).getImporte());\r\n this.writer.println(\"Descripción: \");\r\n this.writer.println(ventas.getVentaAt(i).getDescripcion());\r\n this.writer.println(\"----------------------------------------------------------------\");\r\n }//en esta parte del codigo se esta imprimiendo en el documento la informacion introducida de la venta\r\n this.writer.close();\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, \"Whoops something went horribly wrong\");\r\n }\r\n }", "public void nuevoReporteVentasCiudad(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteVentasCiudad.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE VENTAS POR CIUDAD\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }", "public static void exportToFile() throws Exception {\n String fileName = \"Prova.txt\";\n try (PrintWriter outputStream = new PrintWriter(new FileWriter(fileName))) {\n List<Libro> libroList = Biblioteca.getRepo().getListaLibri();\n Iterator<Libro> libri = libroList.iterator();\n\n while (libri.hasNext()) {\n String sLibro = convertToString(libri.next());\n outputStream.println(sLibro);\n }\n }\n }", "public void write(String uniquewords)\n\t{\n\t\t\n\t\t//we have a scanner function\n\t\tSet<String> writeUserWord = totalOccurence.keySet();\n\t\t\n\t\t//this will begin to run\n\t\ttry\n\t\t{\n\t\t\t//we have a format function\n\t\t\tFormatter printOut = new Formatter(new File(uniquewords));\n\t\t\t\n\t\t\t//we used a enhanced for loop to simplify the code\n\t\t\tfor(String string : writeUserWord)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tprintOut.format(\"%s\\t-- %d%n\", string, totalOccurence.get(string));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//we then need to close out the resources used in the program.\n\t\t\tprintOut.close();\n\t\t\tprintOut.flush(); \n\t\t\t\n\t\t//we have a catch in place for any issues\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\t//system print out if any error occurs\n\t\t\tSystem.out.println(\"Unfourtantly an issue occured with the creation of the file!\");\n\t\t\tSystem.out.println(e);\n\t\t}\t\n\t}", "public void generateLogFile() {\n\t\tFileOperations operator = new FileOperations(path);\n\t\toperator.writeFile(buildLogContent());\n\t}", "private void writeToDictionary() throws IOException {\n\n File file = new File(filePathDictionaryAuto);\n\n if (file.delete()) {\n file.createNewFile();\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n if (word.length() != 1) {\n writePrintStream(dictionaryTerms.get(word) + \" \" + word, filePathDictionaryAuto);\n }\n }\n } else {\n System.out.println(\"Error in dictionary file\");\n }\n System.out.println(\"Dictionary updated\");\n\n }", "public void PdfCreate() {\n\t\t\n\t\tDocument document = new Document();\n\t\ttry {\n\t\t\tPdfWriter.getInstance(document, new FileOutputStream(outputFileName));\n\t\t\tList<String> lineBlockAsString = new ArrayList<String>();\n\t\t\tint FORMAT = 0;\n\t\t\tint SIZE = 13;\n\t\t\tthis.lineblocksSIZE = 0;\n\t\t\tdocument.open();\n\t\t\t//Read all the Lineblocks and get the Format and Style from each one\n\n\t\t\tfor(LineBlock lineblock : lineBlocks) {\n\t\t\t\tPhrase phrase = new Phrase();\n\t\t\t\t\n\t\t\t\tFORMAT = 0;\n\t\t\t\tSIZE = 13;\n\t\t\t\t\n\t\t\t\tswitch (lineblock.getFormat()) {\n\t\t\t\t\n\t\t\t\t\tcase BOLD:\n\t\t\t\t\t\tFORMAT = Font.BOLD;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase ITALICS:\n\t\t\t\t\t\tFORMAT = Font.ITALIC;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tFORMAT = Font.NORMAL;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tswitch (lineblock.getStyle()) {\n\t\t\t\t\t\n\t\t\t\t\tcase OMITTED: \n\t\t\t\t\t\tFORMAT = Font.UNDEFINED;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\tcase H1:\n\t\t\t\t\t\tSIZE = 16;\n\t\t\t\t\t\tFORMAT = Font.BOLD;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase H2:\n\t\t\t\t\t\tSIZE = 16;\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(FORMAT == Font.UNDEFINED) //omit rule\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t//write inside the outputFileName.pdf based on the input Ruleset\n\t\t\t\tthis.lineblocksSIZE ++;\n\t\t\t\tFont font = new Font(FontFamily.TIMES_ROMAN, SIZE, FORMAT);\n\t\t\t\tlineBlockAsString = lineblock.getLines();\n\t\t\t\tfor(String line : lineBlockAsString) {\n\t\t\t\t\tChunk chunk = new Chunk(line, font);\t\t\t\t\n\t\t\t\t\tphrase.add(chunk);\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\tParagraph p = new Paragraph();\n\t\t\t\tp.add(phrase);\n\t\t\t\tdocument.add(p);\n\t\t\t\tdocument.add(Chunk.NEWLINE);\n\t\t\t}\n\t\t} catch (FileNotFoundException | DocumentException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tdocument.close();\n\t}", "@Override\r\n\tpublic void createFile(FacebookClient fbClient, ITable table,\r\n\t\t\tString outputFile) {\n\t}", "@Test\r\n public void exportGeneratorName() throws Exception\r\n {\n Document doc = new Document();\r\n \r\n // Use https://docs.aspose.com/words/net/generator-or-producer-name-included-in-output-documents/ to know how to check the result.\r\n OoxmlSaveOptions saveOptions = new OoxmlSaveOptions(); { saveOptions.setExportGeneratorName(false); }\r\n \r\n doc.save(getArtifactsDir() + \"OoxmlSaveOptions.ExportGeneratorName.docx\", saveOptions);\r\n //ExEnd\r\n }", "protected void genWriter() {\n\t\t\n\t\tfixWriter_h();\n\t\tfixWriter_cpp();\n\t}", "FileContent createFileContent();", "public void writeFile() {\n\t\ttry {\n\t\t\tFile dir = Environment.getExternalStorageDirectory();\n\t\t\tFile myFile = new File(dir.toString() + File.separator + FILENAME);\n\t\t\tLog.i(\"MyMovies\", \"SeSus write : \" + myFile.toString());\n\t\t\tmyFile.createNewFile();\n\t\t\tFileOutputStream fOut = new FileOutputStream(myFile);\n\t\t\tOutputStreamWriter myOutWriter = \n\t\t\t\t\tnew OutputStreamWriter(fOut);\n\t\t\tfor (Map.Entry<String, ValueElement> me : hm.entrySet()) {\n\t\t\t\tString refs = (me.getValue().cRefMovies>0? \"MOVIE\" : \"\");\n\t\t\t\trefs += (me.getValue().cRefBooks>0? \"BOOK\" : \"\");\n\t\t\t\tString line = me.getKey() + DELIMITER + me.getValue().zweiteZeile \n\t\t\t\t\t\t //+ DELIMITER\n\t\t\t\t\t\t //+ me.getValue().count\n\t\t\t\t\t \t+ DELIMITER\n\t\t\t\t\t \t+ refs\n\t\t\t\t\t \t + System.getProperty(\"line.separator\");\n\t\t\t\t//Log.i(\"MyMovies\", \"SeSus extracted : \" + line);\n\t\t\t\tmyOutWriter.write(line);\n\t\t\t}\n\t\t\tmyOutWriter.close();\n\t\t\tfOut.close();\n\t\t} catch (IOException e) {\n\t\t\t//\n\t\t\tLog.i(\"MyMovies\", \"SeSus write Exception : \");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void execute() throws XDocletException {\n\t\tsetPublicId(DD_PUBLICID_20);\n\t\tsetSystemId(DD_SYSTEMID_20);\n\n\t\t// will not work .... dumper.xdt does not exist\n\t\t/*\n\t\tsetTemplateURL(getClass().getResource(\"resources/dumper.xdt\"));\n\t\tsetDestinationFile(\"dump\");\n\t\tSystem.out.println(\"Generating dump\");\n\t\tstartProcess();\n\t\t*/\n\n\n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_EJB_JAR_XML_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"ejb-jar.xml\");\n\t\tSystem.out.println(\"Generating ejb-jar.xml\");\n\t\tstartProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_BND_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_BND_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_BND_FILE_NAME);\n startProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_FILE_NAME);\n startProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_PME_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_PME_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_PME_FILE_NAME);\n startProcess();\n\n /*\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_ACCESS_BEAN_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_ACCESS_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_ACCESS_FILE_NAME);\n startProcess();\n */\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_MAPXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tstartProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_DBXMI_TEMPLATE_FILE));\n setDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n System.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n startProcess();\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_SCHXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tstartProcess();\n\t\t\n\t\tCollection classes = getXJavaDoc().getSourceClasses();\n\t\tfor (ClassIterator i = XCollections.classIterator(classes); i.hasNext();) {\n\t\t\tXClass clazz = i.next();\n\t\t\t//System.out.print(\">> \" + clazz.getName());\n\t\t\t// check tag ejb:persistence + sub tag table-name\n\t\t\tXTag tag = clazz.getDoc().getTag(\"ejb:persistence\");\n\t\t\tif (tag != null) {\n\t\t\t\tString tableName = tag.getAttributeValue(\"table-name\");\n\t\t\t\t//System.out.println(\"ejb:persistence table-name = '\" + tableName + \"'\");\n\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\tSystem.out.println(\"Generating \" + destinationFileName);\n\t\t\t\t\n\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_TBLXMI_TEMPLATE_FILE));\n\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\tsetHavingClassTag(\"ejb:persistence\");\n\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\tstartProcess();\n\t\t\t}\n\t\t\t// Now, check for relationships \n\t\t\tfor (Iterator methods = clazz.getMethods().iterator(); methods.hasNext();) {\n\t\t\t\tXMethod method = (XMethod)methods.next();\n\t\t\t\tif (method.getDoc().hasTag(\"websphere:relation\")) {\n\t\t\t\t\tString tableName = method.getDoc().getTagAttributeValue(\"websphere:relation\",\"table-name\");\n\t\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_RELATIONSHIP_TBLXMI_TEMPLATE_FILE));\n\t\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\t\tsetCurrentMethod(method);\n\t\t\t\t\tSystem.out.println(\"\\tGenerating M-M Relationship table: \" + destinationFileName);\n\t\t\t\t\tstartProcess();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\n\t\t}\n\n/*\n if (atLeastOneCmpEntityBeanExists()) {\n setTemplateURL(getClass().getResource(WEBSPHERE_SCHEMA_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_SCHEMA_FILE_NAME);\n startProcess();\n }\n*/\n }" ]
[ "0.6455374", "0.62996936", "0.61234385", "0.6055205", "0.58897364", "0.58721733", "0.58425546", "0.5825953", "0.5739604", "0.5683702", "0.5683092", "0.56711453", "0.5668986", "0.56474996", "0.5630607", "0.56267405", "0.5619436", "0.5606576", "0.56049246", "0.55910534", "0.55826634", "0.5572288", "0.55134976", "0.54946095", "0.5492647", "0.54902506", "0.54842055", "0.5452209", "0.54318196", "0.5429985", "0.54287004", "0.5424369", "0.54102224", "0.540509", "0.5389042", "0.5371729", "0.5369434", "0.53616554", "0.5357629", "0.5343451", "0.53422177", "0.53408724", "0.5340207", "0.53252083", "0.530816", "0.5295131", "0.5290528", "0.52898544", "0.5281267", "0.52809083", "0.526819", "0.52676404", "0.52644175", "0.52537477", "0.5250441", "0.52302426", "0.5227232", "0.5225294", "0.52252674", "0.52252305", "0.52241755", "0.5218096", "0.52126956", "0.5208987", "0.52027225", "0.52010584", "0.51968753", "0.5194388", "0.5189404", "0.5171601", "0.5168198", "0.51599574", "0.5155836", "0.5154055", "0.5151537", "0.51495874", "0.51477796", "0.51399773", "0.513747", "0.51288474", "0.51272684", "0.51251453", "0.51232785", "0.51178294", "0.51121944", "0.511084", "0.51040554", "0.51016665", "0.50905395", "0.5088006", "0.5085946", "0.5084257", "0.50831985", "0.5078312", "0.50752133", "0.50728667", "0.5070993", "0.5066999", "0.50535136", "0.50392014" ]
0.7965329
0
Created by kerimc on 23.05.2017.
public interface MovieRepository extends MongoRepository<Movie, String> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private void poetries() {\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 protected void getExras() {\n }", "@Override\n public void init() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n void init() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n protected void initialize() \n {\n \n }", "private void init() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@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 anularFact() {\n\t\t\r\n\t}", "@Override\n public void init() {}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "public void mo38117a() {\n }", "@Override\n public void memoria() {\n \n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "Petunia() {\r\n\t\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "private void m50366E() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public Pitonyak_09_02() {\r\n }", "private void init() {\n\n\n\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}" ]
[ "0.59097016", "0.57285655", "0.57277936", "0.5635474", "0.5635474", "0.5618113", "0.55863255", "0.55747837", "0.551148", "0.55110353", "0.5490617", "0.5488304", "0.5481071", "0.54807013", "0.54771256", "0.54748505", "0.5467344", "0.5459799", "0.54528075", "0.5449432", "0.54350936", "0.5428168", "0.54279923", "0.54279923", "0.54279923", "0.54279923", "0.54279923", "0.54269075", "0.5418809", "0.54116887", "0.54071534", "0.54030657", "0.54030657", "0.54030657", "0.54030657", "0.54030657", "0.54030657", "0.53880775", "0.5368115", "0.53630704", "0.53559375", "0.53553414", "0.5350751", "0.5350751", "0.5335659", "0.5334697", "0.53320515", "0.53320515", "0.533202", "0.533202", "0.5330362", "0.5330362", "0.5330362", "0.5330158", "0.5320686", "0.5314074", "0.5307598", "0.5307598", "0.5307598", "0.53040093", "0.529702", "0.5295025", "0.52901655", "0.5288882", "0.5288721", "0.5288721", "0.5288721", "0.52691615", "0.52628064", "0.5256207", "0.524455", "0.5237429", "0.52369833", "0.5228746", "0.52270156", "0.5215904", "0.5215538", "0.5204071", "0.5191928", "0.5191928", "0.5181591", "0.5170438", "0.5170438", "0.5170438", "0.5170438", "0.5170438", "0.5170438", "0.5170438", "0.5168919", "0.5168769", "0.51619077", "0.51619077", "0.5155103", "0.5153331", "0.5149892", "0.514821", "0.5147908", "0.5147908", "0.5147908", "0.514623", "0.514578" ]
0.0
-1
Creates the recipe for getting chainmail boots
private void createRecipe(Plugin plugin) { NamespacedKey nk = new NamespacedKey(plugin, "AC_CHAINMAIL_BOOTS_A"); ShapedRecipe recipe = new ShapedRecipe(nk, new ItemStack(Material.CHAINMAIL_BOOTS, 1)); recipe.shape("C C", "C C", " "); recipe.setIngredient('C', Material.CHAIN); Bukkit.addRecipe(recipe); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void buildBootstrap() {\n String command = \"-prod -mac -o2 rom -strip:d j2me imp\";\n if (includeDebugger) {\n command += \" debugger\";\n }\n command += \" -- translator\";\n builder(command);\n }", "private ClientBootstrap createPeerBootStrap() {\n\n if (workerThreads == 0) {\n execFactory = new NioClientSocketChannelFactory(\n Executors.newCachedThreadPool(groupedThreads(\"onos/pcc\", \"boss-%d\")),\n Executors.newCachedThreadPool(groupedThreads(\"onos/pcc\", \"worker-%d\")));\n return new ClientBootstrap(execFactory);\n } else {\n execFactory = new NioClientSocketChannelFactory(\n Executors.newCachedThreadPool(groupedThreads(\"onos/pcc\", \"boss-%d\")),\n Executors.newCachedThreadPool(groupedThreads(\"onos/pcc\", \"worker-%d\")),\n workerThreads);\n return new ClientBootstrap(execFactory);\n }\n }", "private static void performChefComputeServiceBootstrapping(Properties properties) throws \n IOException, InstantiationException, IllegalAccessException, \n NoSuchMethodException, IllegalArgumentException, InvocationTargetException {\n String rsContinent = DataStoreFactory.findProperty(properties, MemStore.class.getDeclaredConstructor().newInstance(), \n RS_CONTINENT, \"rackspace-cloudservers-us\");\n String rsUser = DataStoreFactory.findProperty(properties, MemStore.class.getDeclaredConstructor().newInstance(), RS_USERNAME, \"asf-gora\");\n String rsApiKey = DataStoreFactory.findProperty(properties, MemStore.class.getDeclaredConstructor().newInstance(), RS_APIKEY, null);\n String rsRegion = DataStoreFactory.findProperty(properties, MemStore.class.getDeclaredConstructor().newInstance(), RS_REGION, \"DFW\");\n String client = DataStoreFactory.findProperty(properties, MemStore.class.getDeclaredConstructor().newInstance(), CHEF_CLIENT, System.getProperty(\"user.name\"));\n String organization = DataStoreFactory.findProperty(properties, MemStore.class.getDeclaredConstructor().newInstance(), CHEF_ORGANIZATION, null);\n String pemFile = System.getProperty(\"user.home\") + \"/.chef/\" + client + \".pem\";\n String credential = Files.toString(new File(pemFile), Charsets.UTF_8);\n\n // Provide the validator information to let the nodes to auto-register themselves\n // in the Chef server during bootstrap\n String validator = organization + \"-validator\";\n String validatorPemFile = System.getProperty(\"user.home\") + \"/.chef/\" + validator + \".pem\";\n String validatorCredential = Files.toString(new File(validatorPemFile), Charsets.UTF_8);\n\n Properties chefConfig = new Properties();\n chefConfig.put(ChefProperties.CHEF_VALIDATOR_NAME, validator);\n chefConfig.put(ChefProperties.CHEF_VALIDATOR_CREDENTIAL, validatorCredential);\n\n // Create the connection to the Chef server\n ChefApi chefApi = ContextBuilder.newBuilder(new ChefApiMetadata())\n .endpoint(\"https://api.opscode.com/organizations/\" + organization)\n .credentials(client, credential)\n .overrides(chefConfig)\n .buildApi(ChefApi.class);\n\n // Create the connection to the compute provider. Note that ssh will be used to bootstrap chef\n ComputeServiceContext computeContext = ContextBuilder.newBuilder(rsContinent)\n .endpoint(rsRegion)\n .credentials(rsUser, rsApiKey)\n .modules(ImmutableSet.<Module> of(new SshjSshClientModule()))\n .buildView(ComputeServiceContext.class);\n\n // Group all nodes in both Chef and the compute provider by this group\n String group = \"jclouds-chef-goraci\";\n\n // Set the recipe to install and the configuration values to override\n String recipe = \"apache2\";\n JsonBall attributes = new JsonBall(\"{\\\"apache\\\": {\\\"listen_ports\\\": \\\"8080\\\"}}\");\n\n // Check to see if the recipe you want exists\n List<String> runlist = null;\n Iterable< ? extends CookbookVersion> cookbookVersions =\n chefApi.chefService().listCookbookVersions();\n if (any(cookbookVersions, CookbookVersionPredicates.containsRecipe(recipe))) {\n runlist = new RunListBuilder().addRecipe(recipe).build();\n }\n for (Iterator<String> iterator = runlist.iterator(); iterator.hasNext();) {\n String string = (String) iterator.next();\n LOG.info(string);\n }\n\n // Update the chef service with the run list you wish to apply to all nodes in the group\n // and also provide the json configuration used to customize the desired values\n BootstrapConfig config = BootstrapConfig.builder().runList(runlist).attributes(attributes).build();\n chefApi.chefService().updateBootstrapConfigForGroup(group, config);\n\n // Build the script that will bootstrap the node\n Statement bootstrap = chefApi.chefService().createBootstrapScriptForGroup(group);\n\n TemplateBuilder templateBuilder = computeContext.getComputeService().templateBuilder();\n templateBuilder.options(runScript(bootstrap));\n // Run a node on the compute provider that bootstraps chef\n try {\n Set< ? extends NodeMetadata> nodes =\n computeContext.getComputeService().createNodesInGroup(group, 1, templateBuilder.build());\n for (NodeMetadata nodeMetadata : nodes) {\n LOG.info(\"<< node %s: %s%n\", nodeMetadata.getId(),\n concat(nodeMetadata.getPrivateAddresses(), nodeMetadata.getPublicAddresses()));\n }\n } catch (RunNodesException e) {\n throw new RuntimeException(e.getMessage());\n }\n\n // Release resources\n chefApi.close();\n computeContext.close();\n\n }", "BlockchainFactory getBlockchainFactory();", "@Override\n public void postBootSetup() {\n }", "@Override\n public void setupRecipes()\n {\n\n }", "public Path createBootclasspath() {\r\n return getCommandLine().createBootclasspath(getProject()).createPath();\r\n }", "@Override\n\tpublic void initRecipes()\n\t{\n\n\t}", "public ArmPayPlanConfigBootStrap() {\n }", "public void send_setup()\n {\n out.println(\"chain_setup\");\n }", "@Override\n\tpublic void createBootstrapJar() throws IOException {\n\t\t\n\t}", "private ActorSystemBootstrapTools() {}", "public abstract Address getBootImageStart();", "private static void boot() {\n\t\tEJB3StandaloneBootstrap.boot(null);\r\n\r\n\t\t// Deploy custom stateless beans (datasource, mostly)\r\n\t\tEJB3StandaloneBootstrap.deployXmlResource(\"META-INF/superStar-beans.xml\");\r\n\r\n\t\t// Deploy all EJBs found on classpath (slow, scans all)\r\n\t\t// EJB3StandaloneBootstrap.scanClasspath();\r\n\r\n\t\t// Deploy all EJBs found on classpath (fast, scans only build\r\n\t\t// directory)\r\n\t\t// This is a relative location, matching the substring end of one of\r\n\t\t// java.class.path locations!\r\n\t\t// Print out System.getProperty(\"java.class.path\") to understand\r\n\t\t// this...\r\n\t\tEJB3StandaloneBootstrap.scanClasspath(\"SuperStar/build\".replace(\"/\", File.separator));\r\n\t}", "private ClientBootstrap() {\r\n init();\r\n }", "public static BasicBootstrap getBootstrap()\n {\n return Ejb3McRegistrarTestCase.bootstrap;\n }", "private void bootstrap() throws LoginFailedException {\n\t\ttry {\n\t\t\tInetAddress bootstrapAddress = InetAddress.getByName(BOOTSTRAP_ADDRESS);\n\t\t\tFutureBootstrap bootstrap = peer.peer().bootstrap().inetAddress(bootstrapAddress).ports(BOOTSTRAP_PORT).start();\n\t\t\tbootstrap.addListener(new BaseFutureAdapter<FutureBootstrap>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void operationComplete(FutureBootstrap future) throws Exception {\n\t\t\t\t\tif (future.isSuccess()) {\n\t\t\t\t\t\tSystem.out.println(\"Successfully bootstrapped to server!\");\n\n\t\t\t\t\t\tbyte[] peerData = peerInfo.toByteArray();\n\t\t\t\t\t\tData dataToStore = new Data(peerData);\n\t\t\t\t\t\tdataToStore.ttlSeconds(USER_DATA_TTL);\n\t\t\t\t\t\tPutBuilder userDataPut = peer.put(peerInfo.getUsernameKey()).data(dataToStore);\n\t\t\t\t\t\tuserDataUploader = new JobScheduler(peer.peer());\n\t\t\t\t\t\tuserDataUploader.start(userDataPut, (USER_DATA_TTL/6) * 1000, -1, new AutomaticFuture() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void futureCreated(BaseFuture future) {\n\t\t\t\t\t\t\t\tfuture.addListener(new BaseFutureAdapter<FuturePut>() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void operationComplete(FuturePut future) throws Exception {\n\t\t\t\t\t\t\t\t\t\tif(future.isSuccess()) {\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Added data to DHT for peer \" + peerInfo.getUsername());\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tSystem.err.println(\"Failed adding data to DHT for peer \" + peerInfo.getUsername() + \"!\");\n\t\t\t\t\t\t\t\t\t\t\tSystem.err.println(future.failedReason());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\tdelegate.didLogin(peerInfo, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(\"Failed to bootstrap!\");\n\t\t\t\t\t\tSystem.err.println(\"Reason is \" + future.failedReason());\n\t\t\t\t\t\tif (delegate != null) {\n\t\t\t\t\t\t\tdelegate.didLogin(null, P2PLoginError.BOOTSTRAP_ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t});\n\t\t} catch (UnknownHostException uhe) {\n\t\t\tSystem.err.println(\"Invalid host specified: \" + BOOTSTRAP_ADDRESS + \"!\");\n\t\t\tif (delegate != null) {\n\t\t\t\tdelegate.didLogin(null, P2PLoginError.BOOTSTRAP_ERROR);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}", "CdapStartAppStep createCdapStartAppStep();", "public static void main(java.lang.String[] args) throws java.lang.Exception {\n java.lang.System.out.println(\"Bootstrapping mutant\");\n java.net.URL bootstrapURL = org.apache.ant.init.ClassLocator.getClassLocationURL(org.apache.ant.bootstrap.Bootstrap.class);\n java.net.URL builderURL = new java.net.URL(bootstrapURL, \"../builder/\");\n java.net.URL toolsJarURL = org.apache.ant.init.ClassLocator.getToolsJarURL();\n java.net.URL[] urls = new java.net.URL[]{ builderURL, toolsJarURL };\n java.lang.ClassLoader builderLoader = new java.net.URLClassLoader(urls);\n // org.apache.ant.init.LoaderUtils.dumpLoader(System.out,\n // builderLoader);\n java.lang.Class builderClass = java.lang.Class.forName(\"org.apache.ant.builder.Builder\", true, builderLoader);\n final java.lang.Class[] param = new java.lang.Class[]{ java.lang.Class.forName(\"[Ljava.lang.String;\") };\n final java.lang.reflect.Method main = builderClass.getMethod(\"main\", param);\n final java.lang.Object[] argument = new java.lang.Object[]{ args };\n main.invoke(null, argument);\n }", "@Override\n\tpublic void initialize(Bootstrap<MicroServicioRequerimientosConfig> bootstrap) {\n\t\t\n\t}", "void systemBoot();", "@OnThread(Tag.Any)\n private void bootBluej()\n {\n initializeBoot();\n try {\n URLClassLoader runtimeLoader = new URLClassLoader(runtimeClassPath, bootLoader);\n \n // Construct a bluej.Main object. This starts BlueJ \"proper\".\n Class<?> mainClass = Class.forName(\"bluej.Main\", true, runtimeLoader);\n mainClass.getDeclaredConstructor().newInstance();\n \n } catch (ClassNotFoundException | InstantiationException | NoSuchMethodException \n | InvocationTargetException | IllegalAccessException exc) {\n throw new RuntimeException(exc);\n }\n }", "private void realBootstrap() {\r\n\t\tString inputMsg = \"{\"\r\n\t\t\t\t+ \"'id': 0, \"\r\n\t\t\t\t+ \"'players': [\"\r\n\t\t\t\t+ \"{'id': 0, 'name': 'TestPlayer0'}, \"\r\n\t\t\t\t+ \"{'id': 1, 'name': 'TestPlayer1'},\"\r\n\t\t\t\t+ \"{'id': 2, 'name': 'TestPlayer2'},\"\r\n\t\t\t\t+ \"{'id': 3, 'name': 'TestPlayer3'},\"\r\n\t\t\t\t+ \"{'id': 4, 'name': 'TestPlayer4'},\"\r\n\t\t\t\t+ \"{'id': 5, 'name': 'TestPlayer5'},\"\r\n\t\t\t\t+ \"{'id': 6, 'name': 'TestPlayer6'},\"\r\n\t\t\t\t+ \"{'id': 7, 'name': 'TestPlayer7'},\"\r\n\t\t\t\t+ \"],\"\r\n\t\t\t\t+ \" 'playerId': 0\"\r\n\t\t\t\t+ \"}\";\r\n\t\tclient.processingMsg(new JSONObject(inputMsg));\r\n\t}", "com.google.protobuf.ByteString\n getBootclasspathBytes(int index);", "private static void generateDemoWorklistItems()\n throws IllegalStarteventException, DefinitionNotFoundException {\n\n // TODO why not use the getBuilder-method? special reason?\n // Building the ProcessDefintion\n BpmnProcessDefinitionBuilder builder = BpmnProcessDefinitionBuilder.newBuilder();\n\n Node startNode, node1, node2, endNode;\n\n startNode = BpmnCustomNodeFactory.createBpmnNullStartNode(builder);\n\n // Building Node1\n int[] ints = {1, 1};\n node1 = BpmnCustomNodeFactory.createBpmnAddNumbersAndStoreNode(builder, \"result\", ints);\n\n // Building Node2\n node2 = BpmnCustomNodeFactory.createBpmnPrintingVariableNode(builder, \"result\");\n\n endNode = BpmnNodeFactory.createBpmnEndEventNode(builder);\n\n BpmnNodeFactory.createControlFlowFromTo(builder, startNode, node1);\n BpmnNodeFactory.createControlFlowFromTo(builder, node1, node2);\n BpmnNodeFactory.createControlFlowFromTo(builder, node2, endNode);\n\n builder.setDescription(\"description\").setName(\"Demoprocess with Email start event\");\n\n BpmnProcessDefinitionModifier.decorateWithDefaultBpmnInstantiationPattern(builder);\n ProcessDefinition def = builder.buildDefinition();\n DeploymentBuilder deploymentBuilder = ServiceFactory.getRepositoryService().getDeploymentBuilder();\n deploymentBuilder.addProcessDefinition(def);\n\n Deployment deployment = deploymentBuilder.buildDeployment();\n ServiceFactory.getRepositoryService().deployInNewScope(deployment);\n \n // Create a mail adapater event here.\n EventCondition subjectCondition = null;\n try {\n subjectCondition = new MethodInvokingEventCondition(MailAdapterEvent.class, \"getMessageTopic\", \"Hallo\");\n\n builder.createStartTrigger(new ImapEmailProcessStartEvent(subjectCondition, null), node1);\n\n ServiceFactory.getRepositoryService().activateProcessDefinition(def.getID());\n } catch (JodaEngineRuntimeException e) {\n LOGGER.error(e.getMessage(), e);\n }\n }", "com.google.protobuf.ByteString\n getBootclasspathBytes(int index);", "public void initBMessageReceipts(){\n List<BUser> readers;\n readers = getBThreadUsers();\n\n // Do not init for public threads.\n if(this.getThread().getType() == com.braunster.chatsdk.dao.BThread.Type.Public\n || this.getThread().getType() == com.braunster.chatsdk.dao.BThread.Type.PublicPrivate) return;\n\n // If no readers, why should there be receipts?\n if (readers.isEmpty()){ return; }\n\n // add all users in the chat other than yourself\n for (BUser reader : readers) {\n if (getBUserSender().equals(reader)) continue;\n createUserReadReceipt(reader, none);\n }\n this.update();\n }", "public Builder addBootclasspathBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n ensureBootclasspathIsMutable();\n bootclasspath_.add(value);\n onChanged();\n return this;\n }", "SiteWriterTemplate startBunch() throws Exception;", "private ClassLoader createBootClassLoader(ClassLoader hostClassLoader) throws MojoExecutionException {\n \n Set<URL> bootClassPath = artifactHelper.resolve(\"org.codehaus.fabric3\", \"fabric3-test-runtime\", runtimeVersion, Artifact.SCOPE_RUNTIME, \"jar\");\n return new URLClassLoader(bootClassPath.toArray(new URL[] {}), hostClassLoader);\n \n }", "java.lang.String getBootclasspath(int index);", "java.lang.String getBootclasspath(int index);", "public abstract NestedSet<Artifact> bootclasspath();", "public static void main(String[] args) {\n Blockchain.startApp();\n }", "private void initializeBoot()\n {\n bootLoader = getClass().getClassLoader();\n\n // Get the home directory of the Java implementation we're being run by\n javaHomeDir = new File(System.getProperty(\"java.home\"));\n\n try {\n runtimeClassPath = getKnownJars(getBluejLibDir(), runtimeJars, false, numBuildJars);\n runtimeUserClassPath = getKnownJars(getBluejLibDir(), userJars, true, numUserBuildJars);\n }\n catch (Exception exc) {\n exc.printStackTrace();\n }\n }", "private static ChainedProperties getChainedProperties() {\n return new ChainedProperties(\"packagebuilder.conf\", BRMSPackageBuilder.class.getClassLoader(), // pass this as it searches currentThread anyway\n false);\n }", "private void startBootstrapServices() {\n traceBeginAndSlog(\"StartWatchdog\");\n Watchdog watchdog = Watchdog.getInstance();\n watchdog.start();\n traceEnd();\n if (MAPLE_ENABLE) {\n this.mPrimaryZygotePreload = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$UyrPns7R814gZEylCbDKhe8It4.INSTANCE, \"PrimaryZygotePreload\");\n }\n Slog.i(TAG, \"Reading configuration...\");\n traceBeginAndSlog(\"ReadingSystemConfig\");\n SystemServerInitThreadPool.get().submit($$Lambda$YWiwiKm_Qgqb55C6tTuq_n2JzdY.INSTANCE, \"ReadingSystemConfig\");\n traceEnd();\n traceBeginAndSlog(\"StartInstaller\");\n this.installer = (Installer) this.mSystemServiceManager.startService(Installer.class);\n traceEnd();\n traceBeginAndSlog(\"DeviceIdentifiersPolicyService\");\n this.mSystemServiceManager.startService(DeviceIdentifiersPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"UriGrantsManagerService\");\n this.mSystemServiceManager.startService(UriGrantsManagerService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartActivityManager\");\n ActivityTaskManagerService atm = this.mSystemServiceManager.startService(ActivityTaskManagerService.Lifecycle.class).getService();\n this.mActivityManagerService = ActivityManagerService.Lifecycle.startService(this.mSystemServiceManager, atm);\n this.mActivityManagerService.setSystemServiceManager(this.mSystemServiceManager);\n this.mActivityManagerService.setInstaller(this.installer);\n this.mWindowManagerGlobalLock = atm.getGlobalLock();\n traceEnd();\n traceBeginAndSlog(\"StartPowerManager\");\n try {\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(\"com.android.server.power.HwPowerManagerService\");\n } catch (RuntimeException e) {\n Slog.w(TAG, \"create HwPowerManagerService failed\");\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(PowerManagerService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartThermalManager\");\n this.mSystemServiceManager.startService(ThermalManagerService.class);\n traceEnd();\n try {\n Slog.i(TAG, \"PG Manager service\");\n this.mPGManagerService = PGManagerService.getInstance(this.mSystemContext);\n } catch (Throwable e2) {\n reportWtf(\"PG Manager service\", e2);\n }\n traceBeginAndSlog(\"InitPowerManagement\");\n this.mActivityManagerService.initPowerManagement();\n traceEnd();\n traceBeginAndSlog(\"StartRecoverySystemService\");\n this.mSystemServiceManager.startService(RecoverySystemService.class);\n traceEnd();\n RescueParty.noteBoot(this.mSystemContext);\n traceBeginAndSlog(\"StartLightsService\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.lights.LightsServiceBridge\");\n } catch (RuntimeException e3) {\n Slog.w(TAG, \"create LightsServiceBridge failed\");\n this.mSystemServiceManager.startService(LightsService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSidekickService\");\n if (SystemProperties.getBoolean(\"config.enable_sidekick_graphics\", false)) {\n this.mSystemServiceManager.startService(WEAR_SIDEKICK_SERVICE_CLASS);\n }\n traceEnd();\n traceBeginAndSlog(\"StartDisplayManager\");\n this.mDisplayManagerService = (DisplayManagerService) this.mSystemServiceManager.startService(DisplayManagerService.class);\n traceEnd();\n try {\n this.mSystemServiceManager.startService(\"com.android.server.security.HwSecurityService\");\n Slog.i(TAG, \"HwSecurityService start success\");\n } catch (Exception e4) {\n Slog.e(TAG, \"can't start HwSecurityService service\");\n }\n traceBeginAndSlog(\"WaitForDisplay\");\n this.mSystemServiceManager.startBootPhase(100);\n traceEnd();\n String cryptState = (String) VoldProperties.decrypt().orElse(\"\");\n if (ENCRYPTING_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Detected encryption in progress - only parsing core apps\");\n this.mOnlyCore = true;\n } else if (ENCRYPTED_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Device encrypted - only parsing core apps\");\n this.mOnlyCore = true;\n }\n HwBootCheck.bootSceneEnd(100);\n HwBootFail.setBootTimer(false);\n HwBootCheck.bootSceneStart(105, 900000);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_start\", (int) SystemClock.elapsedRealtime());\n }\n traceBeginAndSlog(\"StartPackageManagerService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"packagemanagermain\");\n this.mPackageManagerService = PackageManagerService.main(this.mSystemContext, this.installer, this.mFactoryTestMode != 0, this.mOnlyCore);\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n this.mFirstBoot = this.mPackageManagerService.isFirstBoot();\n this.mPackageManager = this.mSystemContext.getPackageManager();\n Slog.i(TAG, \"Finish_StartPackageManagerService\");\n traceEnd();\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_ready\", (int) SystemClock.elapsedRealtime());\n HwBootCheck.addBootInfo(\"[bootinfo]\\nisFirstBoot: \" + this.mFirstBoot + \"\\nisUpgrade: \" + this.mPackageManagerService.isUpgrade());\n HwBootCheck.bootSceneStart(101, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n }\n HwBootCheck.bootSceneEnd(105);\n if (!this.mOnlyCore && !SystemProperties.getBoolean(\"config.disable_otadexopt\", false)) {\n traceBeginAndSlog(\"StartOtaDexOptService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"moveab\");\n OtaDexoptService.main(this.mSystemContext, this.mPackageManagerService);\n } catch (Throwable th) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n throw th;\n }\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n }\n traceBeginAndSlog(\"StartUserManagerService\");\n this.mSystemServiceManager.startService(UserManagerService.LifeCycle.class);\n traceEnd();\n traceBeginAndSlog(\"InitAttributerCache\");\n AttributeCache.init(this.mSystemContext);\n traceEnd();\n traceBeginAndSlog(\"SetSystemProcess\");\n this.mActivityManagerService.setSystemProcess();\n traceEnd();\n traceBeginAndSlog(\"InitWatchdog\");\n watchdog.init(this.mSystemContext, this.mActivityManagerService);\n traceEnd();\n this.mDisplayManagerService.setupSchedulerPolicies();\n traceBeginAndSlog(\"StartOverlayManagerService\");\n this.mSystemServiceManager.startService(new OverlayManagerService(this.mSystemContext, this.installer));\n traceEnd();\n traceBeginAndSlog(\"StartSensorPrivacyService\");\n this.mSystemServiceManager.startService(new SensorPrivacyService(this.mSystemContext));\n traceEnd();\n if (SystemProperties.getInt(\"persist.sys.displayinset.top\", 0) > 0) {\n this.mActivityManagerService.updateSystemUiContext();\n ((DisplayManagerInternal) LocalServices.getService(DisplayManagerInternal.class)).onOverlayChanged();\n }\n this.mSensorServiceStart = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$oG4I04QJrkzCGs6IcMTKU2211A.INSTANCE, START_SENSOR_SERVICE);\n } catch (Throwable th2) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n throw th2;\n }\n }", "@Override\n protected TsArtifact composeApplication() {\n final TsQuarkusExt extH = new TsQuarkusExt(\"ext-h\");\n install(extH);\n final TsQuarkusExt extIConditional = new TsQuarkusExt(\"ext-i-conditional\");\n extIConditional.setDependencyCondition(extH);\n install(extIConditional);\n\n final TsQuarkusExt extGConditional = new TsQuarkusExt(\"ext-g-conditional\");\n\n final TsQuarkusExt extA = new TsQuarkusExt(\"ext-a\");\n extA.setConditionalDeps(extGConditional);\n\n final TsQuarkusExt extB = new TsQuarkusExt(\"ext-b\");\n extB.addDependency(extA);\n\n final TsQuarkusExt extC = new TsQuarkusExt(\"ext-c\");\n extC.addDependency(extB);\n\n final TsQuarkusExt extD = new TsQuarkusExt(\"ext-d\");\n extD.addDependency(extB);\n\n final TsQuarkusExt extEConditional = new TsQuarkusExt(\"ext-e-conditional\");\n extEConditional.setDependencyCondition(extB);\n install(extEConditional);\n\n final TsQuarkusExt extF = new TsQuarkusExt(\"ext-f\");\n extF.setConditionalDeps(extEConditional, extIConditional);\n\n extGConditional.setDependencyCondition(extC);\n extGConditional.addDependency(extF);\n install(extGConditional);\n\n addToExpectedLib(extA.getRuntime());\n addToExpectedLib(extB.getRuntime());\n addToExpectedLib(extC.getRuntime());\n addToExpectedLib(extD.getRuntime());\n addToExpectedLib(extEConditional.getRuntime());\n addToExpectedLib(extF.getRuntime());\n addToExpectedLib(extGConditional.getRuntime());\n\n return TsArtifact.jar(\"app\")\n .addManagedDependency(platformDescriptor())\n .addManagedDependency(platformProperties())\n .addDependency(extC)\n .addDependency(extD);\n }", "public void boot() throws Exception {\n HazelcastInstance hz = Hazelcast.newHazelcastInstance();\n\n // setup the hazelcast idempontent repository which we will use in the route\n HazelcastIdempotentRepository repo = new HazelcastIdempotentRepository(hz, \"camel\");\n\n main = new Main();\n main.enableHangupSupport();\n // bind the hazelcast repository to the name myRepo which we refer to from the route\n main.bind(\"myRepo\", repo);\n // add the route and and let the route be named BAR and use a little delay when processing the files\n main.addRouteBuilder(new FileConsumerRoute(\"BAR\", 100));\n main.run();\n }", "public com.google.protobuf.ByteString\n getBootclasspathBytes(int index) {\n return bootclasspath_.getByteString(index);\n }", "private Boot(Properties props, final FXPlatformSupplier image)\n {\n commandLineProps = null;\n }", "CdapDeployAppStep createCdapDeployAppStep();", "protected void bootstrap() throws KikahaException {\n\t\ttry {\n\t\t\tval deploymentContext = createDeploymentContext();\n\t\t\trunDeploymentHooks(deploymentContext);\n\t\t\tdeployWebResourceFolder(deploymentContext);\n\t\t\tthis.deploymentContext = deploymentContext;\n\t\t} catch (final ServiceProviderException cause) {\n\t\t\tthrow new KikahaException(cause);\n\t\t}\n\t}", "public com.google.protobuf.ByteString\n getBootclasspathBytes(int index) {\n return bootclasspath_.getByteString(index);\n }", "public void boot() throws Exception {\n main = new Main();\n // add routes\n main.addRouteBuilder(this.getRouteBuilder());\n // add event listener\n main.addMainListener(this.getMainListener(getClass()));\n // run until you terminate the JVM\n System.out.println(\"Starting Camel. Use ctrl + c to terminate the JVM.\\n\");\n main.run();\n }", "CdapCreateAppStep createCdapCreateAppStep();", "static void setParentClassLoader(ClassLoader bootStrap, BaseManager baseMgr,\n DeploymentRequest req) throws ConfigException, IOException {\n\n List allClassPaths = new ArrayList();\n \n // system class loader \n List systemClasspath = baseMgr.getSystemCPathPrefixNSuffix();\n if (systemClasspath.size() > 0) {\n allClassPaths.addAll(systemClasspath);\n }\n\n // common class loader\n List commonClassPath = getCommonClasspath(baseMgr);\n if (commonClassPath.size() > 0) {\n allClassPaths.addAll(commonClassPath);\n }\n\n // shared class loader\n // Some explanation on the special handling below:\n // Per the platform specification, connector classes are to be availble\n // to all applications, i.e. a connector deployed to target foo should\n // be available to apps deployed on foo (and not target bar). In that\n // case, we will need to figure out all connector module deployed to \n // the target on which the application is deployed. Resolving the\n // classpath accordlingly. \n String targetString = req.getResourceTargetList();\n List<String> targets = null;\n if (targetString != null) {\n // get the accurate list of targets from client\n targets = DeploymentServiceUtils.getTargetNamesFromTargetString(\n targetString); \n } else {\n // get all the targets of this domain\n targets = new ArrayList<String>(); \n ConfigContext configContext = AdminService.getAdminService(\n ).getAdminContext().getAdminConfigContext();\n\n Server[] servers = ServerHelper.getServersInDomain(configContext); \n for (Server server: servers) {\n targets.add(server.getName());\n } \n Cluster[] clusters = ClusterHelper.getClustersInDomain(\n configContext); \n for (Cluster cluster: clusters) {\n targets.add(cluster.getName());\n } \n }\n\n for (String target: targets) {\n List sharedClassPath = \n baseMgr.getSharedClasspath(true, target);\n if (sharedClassPath.size() > 0) {\n allClassPaths.addAll(sharedClassPath);\n }\n }\n\n ClassLoader parentClassLoader = \n getClassLoader(allClassPaths, bootStrap, null);\n\n // sets the parent class loader\n req.setParentClassLoader(parentClassLoader);\n\n // sets the class path for the class loader\n req.setParentClasspath(allClassPaths);\n }", "public static void main(String[] args) {\n /* Generate the email factory */\n EMailGenerationSystem generateEmail = new EmailFactory();\n \n /* Generate the email for business customer.*/\n System.out.println(\"---This is the start of the email for\"\n + \" Business Customer.---\"); \n generateEmail.generateEmail(\"Business\"); /* Generate email. */\n System.out.println(\"\\n\"); /* separate the test cases */\n \n /* Generate the email for frequent customer.*/\n System.out.println(\"---This is the start of the email for \"\n + \"Frequent Customer.---\"); \n generateEmail.generateEmail(\"Frequent\"); /* Generate email. */\n System.out.println(\"\\n\");/* separate the test cases */\n \n /* Generate the email for new customer.*/\n System.out.println(\"---This is the start of the email for \"\n + \"New Customer.---\"); \n generateEmail.generateEmail(\"New\"); /* Generate email. */\n System.out.println(\"\\n\");/* separate the test cases */\n \n /* Generate the email for returning customer.*/\n System.out.println(\"---This is the start of the email for \"\n + \"Returning Customer.---\"); \n generateEmail.generateEmail(\"returning\"); /* Generate email. */\n System.out.println(\"\\n\");/* separate the test cases */\n \n /* Generate the email for vip customer.*/\n System.out.println(\"---This is the start of the email for\"\n + \" VIP Customer.---\"); \n generateEmail.generateEmail(\"VIP\"); /* Generate email. */\n System.out.println(\"\\n\");/* separate the test cases */\n \n /* Generate the email for mispelling. The message will print out indicating error.*/\n System.out.println(\"---This is the start of the email for email \"\n + \" generation failure.---\"); \n generateEmail.generateEmail(\"custumer\"); /* Generate email. */\n }", "@Override\n public void initialize(Bootstrap<AppConfig> bootstrap) {\n bootstrap.setConfigurationSourceProvider(\n new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(),\n new EnvironmentVariableSubstitutor(false)\n )\n );\n \n bootstrap.addBundle(new FlywayBundle<AppConfig>() {\n \n @Override\n public DataSourceFactory getDataSourceFactory(AppConfig configuration) {\n return configuration.getDataSourceFactory();\n }\n \n @Override\n public FlywayFactory getFlywayFactory(AppConfig configuration) {\n return configuration.getFlywayFactory();\n }\n });\n }", "public BootStrapInfo start(IBrowserManager theMgr, Window parentFrame,\n BootStrapManager bootMgr) {\n try {\n this.bootMgr = bootMgr;\n this.theMgr = theMgr;\n // check to make sure that ArmCreditCardPlans.cfg exists and its not in the backup\n File armPaymentConfig = new File(FileMgr.getLocalFile(\"config\",\n \"ArmCreditCardPlans.cfg\"));\n if (!armPaymentConfig.exists()) {\n File fileBackup = new File(FileMgr.getLocalFile(\"config\",\n \"ArmCreditCardPlans.bkup\"));\n if (fileBackup.exists()) {\n fileBackup.renameTo(armPaymentConfig);\n }\n else {\n // no files, so delete date from last configuration download\n File fileDate = new File(FileMgr.getLocalFile(\"repository\"\n , \"ARMANI_PAY_PLAN_CONFIG_DOWNLOAD_DATE\"));\n fileDate.delete();\n }\n }\n if (!theMgr.isOnLine()) {\n return new BootStrapInfo(this.getClass().getName());\n }\n bootMgr.setBootStrapStatus(\n \"Checking armani pay plan configurations download date\");\n Date date = (Date) theMgr.getGlobalObject(\n \"ARMANI_PAY_PLAN_CONFIG_DOWNLOAD_DATE\");\n if (date == null || DateUtil.isDateAtLeastHoursOld(date, 12)\n // Needed for offline scenario.\n ) {\n downloadFile();\n }\n }\n catch (Exception ex) {\n System.out.println(\"Exception PaymentPlanConfigBootStrap.start()->\" + ex);\n ex.printStackTrace();\n LoggingServices.getCurrent().logMsg(this.getClass().getName(), \"start\",\n \"Exception\"\n , \"See Exception\",\n LoggingServices.MAJOR, ex);\n }\n return new BootStrapInfo(this.getClass().getName());\n }", "public void bootConsumer() throws Exception {\n\t\tmain = new Main();\r\n\t\t// bind MyBean into the registry\r\n\t\tmain.bind(\"foo\", new AsimpleBean());\r\n\t\t// add routes\r\n\t\tmain.addRouteBuilder(new SubRouteBuilder());\r\n\r\n\t\t// add event listener\r\n\t\tmain.addMainListener(new SubEvents());\r\n\t\t// run until you terminate the JVM\r\n\t\tSystem.out.println(\"Starting Camel. Use ctrl + c to terminate the JVM.\\n\");\r\n\t\tmain.run();\r\n\t}", "@Override\n public void initialize(Bootstrap<KafkaExampleConfiguration> bootstrap) {\n bootstrap.addBundle(ConfigurationSubstitutionBundle.builder().build());\n bootstrap.addBundle(kafka);\n }", "private Map<String, Object> collectBzlGlobals() {\n ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder();\n TopLevelBootstrap topLevelBootstrap =\n new TopLevelBootstrap(\n new FakeBuildApiGlobals(),\n new FakeSkylarkAttrApi(),\n new FakeSkylarkCommandLineApi(),\n new FakeSkylarkNativeModuleApi(),\n new FakeSkylarkRuleFunctionsApi(Lists.newArrayList(), Lists.newArrayList()),\n new FakeStructProviderApi(),\n new FakeOutputGroupInfoProvider(),\n new FakeActionsInfoProvider(),\n new FakeDefaultInfoProvider());\n AndroidBootstrap androidBootstrap =\n new AndroidBootstrap(\n new FakeAndroidSkylarkCommon(),\n new FakeApkInfoProvider(),\n new FakeAndroidInstrumentationInfoProvider(),\n new FakeAndroidDeviceBrokerInfoProvider(),\n new FakeAndroidResourcesInfoProvider(),\n new FakeAndroidNativeLibsInfoProvider());\n AppleBootstrap appleBootstrap = new AppleBootstrap(new FakeAppleCommon());\n ConfigBootstrap configBootstrap =\n new ConfigBootstrap(new FakeConfigSkylarkCommon(), new FakeConfigApi(),\n new FakeConfigGlobalLibrary());\n CcBootstrap ccBootstrap = new CcBootstrap(new FakeCcModule());\n JavaBootstrap javaBootstrap =\n new JavaBootstrap(\n new FakeJavaCommon(),\n new FakeJavaInfoProvider(),\n new FakeJavaProtoCommon(),\n new FakeJavaCcLinkParamsProvider.Provider());\n PlatformBootstrap platformBootstrap = new PlatformBootstrap(new FakePlatformCommon());\n PyBootstrap pyBootstrap =\n new PyBootstrap(new FakePyInfoProvider(), new FakePyRuntimeInfoProvider());\n RepositoryBootstrap repositoryBootstrap =\n new RepositoryBootstrap(new FakeRepositoryModule(Lists.newArrayList()));\n TestingBootstrap testingBootstrap =\n new TestingBootstrap(\n new FakeTestingModule(),\n new FakeCoverageCommon(),\n new FakeAnalysisFailureInfoProvider(),\n new FakeAnalysisTestResultInfoProvider());\n\n topLevelBootstrap.addBindingsToBuilder(envBuilder);\n androidBootstrap.addBindingsToBuilder(envBuilder);\n appleBootstrap.addBindingsToBuilder(envBuilder);\n ccBootstrap.addBindingsToBuilder(envBuilder);\n configBootstrap.addBindingsToBuilder(envBuilder);\n javaBootstrap.addBindingsToBuilder(envBuilder);\n platformBootstrap.addBindingsToBuilder(envBuilder);\n pyBootstrap.addBindingsToBuilder(envBuilder);\n repositoryBootstrap.addBindingsToBuilder(envBuilder);\n testingBootstrap.addBindingsToBuilder(envBuilder);\n\n return envBuilder.build();\n }", "public NestedSet<Artifact> bootclasspath() {\n return bootclasspath;\n }", "@Override\n\tpublic void startHook() {\n\t\tMethod execmethod = RefInvoke.findMethodExact(\n \"java.lang.ProcessBuilder\", ClassLoader.getSystemClassLoader(),\n \"start\");\n\t\thookhelper.hookMethod(execmethod, new AbstractBehaviorHookCallBack() {\n\t\t\t@Override\n\t\t\tpublic void descParam(HookParam param) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Create New Process ->\");\n\t\t\t\tProcessBuilder pb = (ProcessBuilder) param.thisObject;\n\t\t\t\tList<String> cmds = pb.command();\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tfor(int i=0 ;i <cmds.size(); i++){\n\t\t\t\t sb.append(\"CMD\"+i+\":\"+cmds.get(i)+\" \");\n\t\t\t\t}\n\t\t\t\tLogger.log_behavior(ProcessBuilderHook.class.getName(), \"Command\" + sb.toString());\n\t\t\t}\n\t\t});\n\t}", "private void setupLauncherClassLoader() throws Exception {\n ClassLoader extCL = ClassLoader.getSystemClassLoader().getParent();\n ClassPathBuilder cpb = new ClassPathBuilder(extCL);\n\n try {\n addFrameworkJars(cpb);\n addJDKToolsJar(cpb);\n findDerbyClient(cpb);\n File moduleDir = bootstrapFile.getParentFile();\n cpb.addGlob(moduleDir, additionalJars);\n this.launcherCL = cpb.create();\n } catch (IOException e) {\n throw new Error(e);\n }\n Thread.currentThread().setContextClassLoader(launcherCL);\n }", "@Override\r\n\tprotected void setup() {\n\t\tgetContentManager().registerLanguage(codec);\r\n\t\tgetContentManager().registerOntology(ontology);\r\n\t\t\r\n\t\tObject[] args = getArguments();\r\n\t\tif(args != null && args.length > 0) {\r\n\t\t\tbroker = (Broker)args[0];\r\n\t\t} else {\r\n\t\t\tbroker = new Broker(\"Broker\");\r\n\t\t}\r\n\t\t\r\n\t\tProgramGUI.getInstance().printToLog(broker.hashCode(), getLocalName(), \"created\", Color.GREEN.darker());\r\n\t\t\r\n\t\t// Register in the DF\r\n\t\tDFRegistry.register(this, BROKER_AGENT);\r\n\t\t\r\n\t\tsubscribeToRetailers();\r\n\t\tquery();\r\n\t\tpurchase();\r\n\t}", "CdapCreateAppWithConfigStep createCdapCreateAppWithConfigStep();", "public abstract Address getBootImageEnd();", "public Builder addAllBootclasspath(\n java.lang.Iterable<java.lang.String> values) {\n ensureBootclasspathIsMutable();\n com.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, bootclasspath_);\n onChanged();\n return this;\n }", "Chain createChain();", "public static void setupAllCrds(KubeClusterResource cluster) {\n cluster.createCustomResources(TestUtils.CRD_KAFKA);\n cluster.createCustomResources(TestUtils.CRD_KAFKA_CONNECT);\n cluster.createCustomResources(TestUtils.CRD_KAFKA_CONNECT_S2I);\n cluster.createCustomResources(TestUtils.CRD_KAFKA_MIRROR_MAKER);\n cluster.createCustomResources(TestUtils.CRD_KAFKA_MIRROR_MAKER_2);\n cluster.createCustomResources(TestUtils.CRD_KAFKA_BRIDGE);\n cluster.createCustomResources(TestUtils.CRD_TOPIC);\n cluster.createCustomResources(TestUtils.CRD_KAFKA_USER);\n cluster.createCustomResources(TestUtils.CRD_KAFKA_CONNECTOR);\n cluster.createCustomResources(TestUtils.CRD_KAFKA_REBALANCE);\n\n waitForCrd(cluster, \"kafkas.kafka.strimzi.io\");\n waitForCrd(cluster, \"kafkaconnects2is.kafka.strimzi.io\");\n waitForCrd(cluster, \"kafkaconnects.kafka.strimzi.io\");\n waitForCrd(cluster, \"kafkamirrormaker2s.kafka.strimzi.io\");\n waitForCrd(cluster, \"kafkamirrormakers.kafka.strimzi.io\");\n waitForCrd(cluster, \"kafkabridges.kafka.strimzi.io\");\n waitForCrd(cluster, \"kafkatopics.kafka.strimzi.io\");\n waitForCrd(cluster, \"kafkausers.kafka.strimzi.io\");\n waitForCrd(cluster, \"kafkaconnectors.kafka.strimzi.io\");\n waitForCrd(cluster, \"kafkarebalances.kafka.strimzi.io\");\n }", "@Override\n public Bootstrap boot() throws BootstrapException\n {\n Crypto.getProperty(Crypto.KEY_MATERIAL_PROVIDER);\n\n CryptoFactory.getInstance();\n\n return this;\n }", "public Bootstrap() {\r\n\t\t//Create or load UserList\r\n\t\tuserList = new CopyOnWriteArrayList<User>();\r\n\t\ttry {\r\n\t\t\tuserList = importUserList();\r\n\t\t} catch (FileNotFoundException e){\r\n\t\t\t\r\n\t\t} catch (IOException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.ip_adresse = StaticFunctions.loadPeerIp();\t\t\t//Load ip-address\r\n\t\t\r\n\t\t//Create a new Zone\r\n\t\tcreateZone(new Point(0.0, 0.0), new Point(1.0, 1.0));\t//initialize zone\r\n\t}", "protected void appendSuiteCreatorCommand(StringBuffer buffer, String bootstrapSuitePath) {\n buffer.append(getSquawkExecutable());\n if (verbose) {\n buffer.append(\" -verbose\");\n }\n// buffer.append(\" -J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999\");\n buffer.append(\" -J-Djava.awt.headless=true\");\n// buffer.append(\" -veryverbose\");\n if (bootstrapSuitePath != null) {\n buffer.append(\" -Xboot:\");\n buffer.append(bootstrapSuitePath);\n }\n if (suiteCreatorDebug) {\n buffer.append(\" com.sun.squawk.debugger.sda.SDA\");\n }\n buffer.append(\" com.sun.squawk.SuiteCreator\");\n }", "private <B, I> void _start() throws Exception\n {\n bootstrap.bindBean(ApplicationDescriptor.class, null, descriptor);\n\n // Bind the application context\n bootstrap.declareBean(ApplicationContext.class, null, InternalApplicationContext.class);\n\n //\n bootstrap.setFilter(new BeanFilter()\n {\n public <T> boolean acceptBean(Class<T> beanType)\n {\n if (beanType.getName().startsWith(\"org.juzu.\") || beanType.getAnnotation(Export.class) != null)\n {\n return false;\n }\n else\n {\n // Do that better with a meta annotation that describe Juzu annotation\n // that veto beans\n for (Method method : beanType.getMethods())\n {\n if (method.getAnnotation(View.class) != null || method.getAnnotation(Action.class) != null || method.getAnnotation(Resource.class) != null)\n {\n return false;\n }\n }\n return true;\n }\n }\n });\n\n // Bind the scopes\n for (Scope scope : Scope.values())\n {\n bootstrap.addScope(scope);\n }\n\n // Bind the controllers\n for (ControllerDescriptor controller : descriptor.getControllers())\n {\n bootstrap.declareBean(controller.getType(), null, (Class)null);\n }\n\n // Bind the templates\n for (TemplateDescriptor template : descriptor.getTemplates())\n {\n bootstrap.declareBean(Template.class, null, template.getType());\n }\n\n //\n Class<?> s = descriptor.getPackageClass();\n\n // Bind the bean bindings\n Bindings bindings = s.getAnnotation(Bindings.class);\n if (bindings != null)\n {\n for (Binding binding : bindings.value())\n {\n Class<?> type = binding.value();\n Class<?> implementation = binding.implementation();\n if (MetaProvider.class.isAssignableFrom(implementation))\n {\n MetaProvider mp = (MetaProvider)implementation.newInstance();\n Provider provider = mp.getProvider(type);\n bootstrap.bindProvider(type, null, provider);\n }\n else if (Provider.class.isAssignableFrom(implementation))\n {\n Method m = implementation.getMethod(\"get\");\n ArrayList<Annotation> qualifiers = null;\n for (Annotation annotation : m.getAnnotations())\n {\n if (annotation.annotationType().getAnnotation(Qualifier.class) != null)\n {\n if (qualifiers == null)\n {\n qualifiers = new ArrayList<Annotation>();\n }\n qualifiers.add(annotation);\n }\n }\n bootstrap.declareProvider(type, qualifiers, (Class)implementation);\n }\n else\n {\n if (implementation == Object.class)\n {\n implementation = null;\n }\n bootstrap.declareBean((Class)type, null, (Class)implementation);\n }\n }\n }\n\n //\n List<Class<? extends Plugin>> plugins = descriptor.getPlugins();\n\n // Declare the plugins\n for (Class<? extends Plugin> pluginType : plugins)\n {\n bootstrap.declareBean(pluginType, null, null);\n }\n\n //\n InjectManager<B, I> manager = bootstrap.create();\n\n //\n B contextBean = manager.resolveBean(ApplicationContext.class);\n I contextInstance = manager.create(contextBean);\n \n // Get plugins\n ArrayList<Plugin> p = new ArrayList<Plugin>();\n for (Class<? extends Plugin> pluginType : plugins)\n {\n B pluginBean = manager.resolveBean(pluginType);\n I pluginInstance = manager.create(pluginBean);\n Object o = manager.get(pluginBean, pluginInstance);\n p.add((Plugin)o);\n }\n\n //\n this.context = (InternalApplicationContext)manager.get(contextBean, contextInstance);\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tBeanBuilder.Building();\r\n\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\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private void bootstrap() {\n\t\t// configure default values\n\t\t// maxPoolSize = 5;\n\t\tthis.parserPool.setMaxPoolSize(50);\n\t\t// coalescing = true;\n\t\tthis.parserPool.setCoalescing(true);\n\t\t// expandEntityReferences = false;\n\t\tthis.parserPool.setExpandEntityReferences(false);\n\t\t// ignoreComments = true;\n\t\tthis.parserPool.setIgnoreComments(true);\n\t\t// ignoreElementContentWhitespace = true;\n\t\tthis.parserPool.setIgnoreElementContentWhitespace(true);\n\t\t// namespaceAware = true;\n\t\tthis.parserPool.setNamespaceAware(true);\n\t\t// schema = null;\n\t\tthis.parserPool.setSchema(null);\n\t\t// dtdValidating = false;\n\t\tthis.parserPool.setDTDValidating(false);\n\t\t// xincludeAware = false;\n\t\tthis.parserPool.setXincludeAware(false);\n\n\t\tMap<String, Object> builderAttributes = new HashMap<>();\n\t\tthis.parserPool.setBuilderAttributes(builderAttributes);\n\n\t\tMap<String, Boolean> parserBuilderFeatures = new HashMap<>();\n\t\tparserBuilderFeatures.put(\"http://apache.org/xml/features/disallow-doctype-decl\", TRUE);\n\t\tparserBuilderFeatures.put(XMLConstants.FEATURE_SECURE_PROCESSING, TRUE);\n\t\tparserBuilderFeatures.put(\"http://xml.org/sax/features/external-general-entities\", FALSE);\n\t\tparserBuilderFeatures.put(\"http://apache.org/xml/features/validation/schema/normalized-value\", FALSE);\n\t\tparserBuilderFeatures.put(\"http://xml.org/sax/features/external-parameter-entities\", FALSE);\n\t\tparserBuilderFeatures.put(\"http://apache.org/xml/features/dom/defer-node-expansion\", FALSE);\n\t\tthis.parserPool.setBuilderFeatures(parserBuilderFeatures);\n\n\t\ttry {\n\t\t\tthis.parserPool.initialize();\n\t\t}\n\t\tcatch (ComponentInitializationException x) {\n\t\t\tthrow new Saml2Exception(\"Unable to initialize OpenSaml v3 ParserPool\", x);\n\t\t}\n\n\t\ttry {\n\t\t\tInitializationService.initialize();\n\t\t}\n\t\tcatch (InitializationException e) {\n\t\t\tthrow new Saml2Exception(\"Unable to initialize OpenSaml v3\", e);\n\t\t}\n\n\t\tXMLObjectProviderRegistry registry;\n\t\tsynchronized (ConfigurationService.class) {\n\t\t\tregistry = ConfigurationService.get(XMLObjectProviderRegistry.class);\n\t\t\tif (registry == null) {\n\t\t\t\tregistry = new XMLObjectProviderRegistry();\n\t\t\t\tConfigurationService.register(XMLObjectProviderRegistry.class, registry);\n\t\t\t}\n\t\t}\n\n\t\tregistry.setParserPool(this.parserPool);\n\t}", "@Override\n public void initialize(Bootstrap<TwitterLabConfiguration> bootstrap) {\n }", "@Override\n\tpublic KBase createKB() {\n\t\treturn BnetDistributedKB.create(this);\n\t}", "@Override\n public void initialize(Bootstrap<SkyeWorkerConfiguration> bootstrap) {\n this.bootstrap = bootstrap;\n }", "public static void addRecipes() {\n\t\tModLoader.addRecipe(new ItemStack(blockWirelessR, 1), new Object[] {\n\t\t\t\t\"IRI\", \"RLR\", \"IRI\", Character.valueOf('I'), Item.ingotIron,\n\t\t\t\tCharacter.valueOf('R'), Item.redstone, Character.valueOf('L'),\n\t\t\t\tBlock.lever });\n\t\tModLoader.addRecipe(new ItemStack(blockWirelessT, 1), new Object[] {\n\t\t\t\t\"IRI\", \"RTR\", \"IRI\", Character.valueOf('I'), Item.ingotIron,\n\t\t\t\tCharacter.valueOf('R'), Item.redstone, Character.valueOf('T'),\n\t\t\t\tBlock.torchRedstoneActive });\n\t}", "public void bootstrap() {\n EntityManager em = CONNECTION_FACTORY.getConnection();\n List<CaixaItemTipo> cits = new ArrayList<>();\n cits.add(CaixaItemTipo.LANCAMENTO_MANUAL);\n cits.add(CaixaItemTipo.DOCUMENTO);\n cits.add(CaixaItemTipo.ESTORNO);\n cits.add(CaixaItemTipo.TROCO);\n \n cits.add(CaixaItemTipo.SUPRIMENTO);\n cits.add(CaixaItemTipo.SANGRIA);\n \n cits.add(CaixaItemTipo.CONTA_PROGRAMADA);\n //cits.add(CaixaItemTipo.PAGAMENTO_DOCUMENTO); 2019-06-10 generalizado com tipo 2\n cits.add(CaixaItemTipo.TRANSFERENCIA);\n \n cits.add(CaixaItemTipo.FUNCIONARIO);\n \n \n em.getTransaction().begin();\n for(CaixaItemTipo cit : cits){\n if(findById(cit.getId()) == null){\n em.persist(cit);\n } else {\n em.merge(cit);\n }\n }\n em.getTransaction().commit();\n\n em.close();\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"下面制造汽车和汽车的各个部件...\");\n\t\t\n\t\tMap<String,Object> carProperties = new HashMap<>();\n\t\tcarProperties.put(HasModel.PROPERTY,\"300SL\"); //这里就是动态(on the fly)为汽没有车添加属性了。\n\t\tcarProperties.put(HasPrice.PROPERTY,100000L);\n\t\t\n\t\t//注意,要创建的wheel这个更是动态的,没有预先给汽车设计wheel这个属性\n\t\t//实际,汽车类里一个属性都没有,如果不使用这个方式,那么还要设计一个wheel类,wheel类下又有至少下面的两个属性(Model和Price)\n\t\t//这里一定要突出事先并不知道汽车到需要什么属性,也只有到了程序运行时(on the fly)才知道\n\t\tMap<String,Object> wheelProperties = new HashMap<>();\n\t\twheelProperties.put(HasType.PROPERTY, \"wheel\");\n\t\twheelProperties.put(HasModel.PROPERTY, \"15C\");\n\t\twheelProperties.put(HasPrice.PROPERTY, 100L);\n\t\t\n\t\tMap<String, Object> doorProperties = new HashMap<>();\n\t\tdoorProperties.put(HasType.PROPERTY, \"door\");\n\t\tdoorProperties.put(HasModel.PROPERTY, \"Lambo\");\n\t\tdoorProperties.put(HasPrice.PROPERTY, 300L);\n\n\t\tcarProperties.put(HasParts.PROPERTY, Arrays.asList(wheelProperties,doorProperties));\n\t\t\n\t\tCar car = new Car(carProperties);\n\t\t\n\t\tSystem.out.println(\"下面我们已经创建好的汽车:\");\n\t\tSystem.out.println(\" -> model:\"+car.getModel().get());\n\t\tSystem.out.println(\" -> price:\"+car.getPrice().get());\n\t\tSystem.out.println(\"汽车的其它部件:\");\n\t\tcar.getParts().forEach(p -> System.out.println(\"->\"+p.getType().get()+\",\"+p.getModel().get()+\",\"+p.getPrice().get()));\n\t}", "TargetChain createTargetChain();", "java.util.List<java.lang.String>\n getBootclasspathList();", "BeanConfiguration deploy(Supplier<? extends Assembly> supplier, Wirelet... wirelets);", "public AbstractBootstrap()\n {\n }", "public static void registerMachineRecipes()\n {\n ThermalExpansionHelper.addTransposerFill(10000, new ItemStack(BlockFrame.instance, 1, 0), new ItemStack(BlockFrame.instance, 1, BlockFrame.REDSTONE_INTERFACE), new FluidStack(FluidRegistry.getFluidID(\"redstone\"), 200), false);\n ThermalExpansionHelper.addTransposerFill(10000, new ItemStack(ItemBlankUpgrade.instance, 1, 0), new ItemStack(ItemUpgrade.instance, 1, 0), new FluidStack(FluidRegistry.getFluidID(\"redstone\"), 200), false);\n\n ThermalExpansionHelper.addTransposerFill(15000, new ItemStack(BlockFrame.instance, 1, 0), new ItemStack(BlockFrame.instance, 1, BlockFrame.NETWORK_INTERFACE), new FluidStack(FluidRegistry.getFluidID(\"ender\"), 125), false);\n ThermalExpansionHelper.addTransposerFill(15000, new ItemStack(ItemBlankUpgrade.instance, 1, 1), new ItemStack(ItemUpgrade.instance, 1, 1), new FluidStack(FluidRegistry.getFluidID(\"ender\"), 125), false);\n\n ThermalExpansionHelper.addTransposerFill(25000, new ItemStack(BlockStabilizerEmpty.instance, 1, 0), new ItemStack(BlockStabilizer.instance, 1, 0), new FluidStack(FluidRegistry.getFluidID(\"ender\"), 150), false);\n }", "void createRecipe(Recipe recipe) throws ServiceFailureException;", "public KafkaBacksideEnvironment() {\n\t\tConfigPullParser p = new ConfigPullParser(\"kafka-props.xml\");\n\t\tproperties = p.getProperties();\n\t\tconnectors = new HashMap<String, IPluginConnector>();\n\t\t//chatApp = new SimpleChatApp(this);\n\t\t//mainChatApp = new ChatApp(this);\n\t\t//elizaApp = new ElizaApp(this);\n\t\tbootPlugins();\n\t\t//TODO other stuff?\n\t\tSystem.out.println(\"Booted\");\n\t\t//Register a shutdown hook so ^c will properly close things\n\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\t\t public void run() { shutDown(); }\n\t\t});\n\t}", "public Arguments create() throws IOException {\r\n Arguments args = new Arguments();\r\n ArrayList vmArgs = new ArrayList();\r\n \r\n // Start empty framework\r\n if (clean) {\r\n // Remove bundle directories\r\n File[] children = workDir.listFiles();\r\n for (int i=0; i<children.length; i++) {\r\n if (children[i].isDirectory() && children[i].getName().startsWith(\"bundle\")) {\r\n deleteDir(children[i]);\r\n }\r\n }\r\n }\r\n \r\n // Create system properties file\r\n File systemPropertiesFile = new File(workDir, \"system.properties\");\r\n Path path = new Path(systemPropertiesFile.getAbsolutePath());\r\n vmArgs.add(\"-Doscar.system.properties=\"+path.toString());\r\n \r\n // Set bundle cache dir\r\n writeProperty(systemPropertiesFile, PROPERTY_CACHE_DIR, new Path(workDir.getAbsolutePath()).toString(), false);\r\n \r\n // Set start level\r\n writeProperty(systemPropertiesFile, PROPERTY_STARTLEVEL, Integer.toString(startLevel), true);\r\n \r\n // System properties\r\n if (systemProperties != null) {\r\n for(Iterator i=systemProperties.entrySet().iterator();i.hasNext();) {\r\n Map.Entry entry = (Map.Entry) i.next();\r\n writeProperty(systemPropertiesFile, (String) entry.getKey(), (String) entry.getValue(), true);\r\n }\r\n }\r\n\r\n // Add bundle\r\n StringBuffer autoStart = new StringBuffer(\"\");\r\n StringBuffer autoInstall = new StringBuffer(\"\");\r\n for (Iterator i=bundles.entrySet().iterator();i.hasNext();) {\r\n Map.Entry entry = (Map.Entry) i.next();\r\n Integer level = (Integer) entry.getKey();\r\n \r\n // Add bundle install entries for this start level\r\n ArrayList l = (ArrayList) entry.getValue();\r\n autoStart.setLength(0);\r\n autoInstall.setLength(0);\r\n for (Iterator j = l.iterator() ; j.hasNext() ;) {\r\n BundleElement e = (BundleElement) j.next();\r\n if (e.getLaunchInfo().getMode() == BundleLaunchInfo.MODE_START) {\r\n if (autoStart.length()>0) {\r\n autoStart.append(\" \");\r\n }\r\n autoStart.append(\"file:\");\r\n autoStart.append(new Path(e.getBundle().getPath()).toString());\r\n } else {\r\n if (autoInstall.length()>0) {\r\n autoInstall.append(\" \");\r\n }\r\n autoInstall.append(\"file:\");\r\n autoInstall.append(new Path(e.getBundle().getPath()).toString());\r\n }\r\n }\r\n if (autoInstall.length()>0) {\r\n writeProperty(systemPropertiesFile, PROPERTY_AUTO_INSTALL+level, autoInstall.toString(), true);\r\n }\r\n if (autoStart.length()>0) {\r\n writeProperty(systemPropertiesFile, PROPERTY_AUTO_START+level, autoStart.toString(), true);\r\n }\r\n }\r\n \r\n args.setVMArguments((String[]) vmArgs.toArray(new String[vmArgs.size()]));\r\n return args;\r\n }", "@Create\n public void create()\n {\n \n log.debug(\"Creating users and mailboxes\");\n //MailboxService ms = MMJMXUtil.getMBean(\"meldware.mail:type=MailboxManager,name=MailboxManager\", MailboxService.class);\n AdminTool at = MMJMXUtil.getMBean(\"meldware.mail:type=MailServices,name=AdminTool\", AdminTool.class);\n \n for (MeldwareUser meldwareUser : getUsers())\n {\n at.createUser(meldwareUser.getUsername(), meldwareUser.getPassword(), meldwareUser.getRoles());\n // TODO This won't work on AS 4.2\n /*Mailbox mbox = ms.createMailbox(meldwareUser.getUsername());\n for (String alias : meldwareUser.getAliases())\n {\n ms.createAlias(mbox.getId(), alias);\n }*/\n log.debug(\"Created #0 #1 #2\", meldwareUser.isAdministrator() ? \"administrator\" : \"user\", meldwareUser.getUsername(), meldwareUser.getAliases() == null || meldwareUser.getAliases().size() == 0 ? \"\" : \"with aliases \" + meldwareUser.getAliases());\n }\n }", "@Override\r\n\tpublic void registerRecipes()\r\n\t{\n\r\n\t}", "@Override\n public void initialize(Bootstrap bootstrap) {\n }", "public ClassLoader getBootClassLoader ()\n {\n return bootLoader;\n }", "private void configureForBoot (Map<String, Collection<?>> beans)\n {\n customerAttributeList = new ArrayList<String>();\n population = minCount + generator.nextInt(Math.abs(maxCount - minCount));\n log.info(\"Configuring \" + population + \" customers for class \"\n + this.getName());\n\n // Prepare for the joins\n ArrayList<SocialGroup> groupList =\n new ArrayList<SocialGroup>(groups.values());\n double cgProbability = 0.0;\n for (SocialGroup group : groupList) {\n cgProbability += classGroups.get(group.getId()).getProbability();\n }\n ArrayList<CarType> carList = new ArrayList<CarType>(carTypes.values());\n double ccProbability = 0.0;\n for (CarType car : carList) {\n ClassCar cc = classCars.get(car.getName());\n if (null != cc) {\n ccProbability += cc.getProbability();\n }\n else {\n log.info(\"Car type {} not configured for {}\",\n car.getName(), this.getName());\n }\n }\n\n for (int i = 0; i < population; i++) {\n // pick a random social group\n SocialGroup thisGroup = pickGroup(groupList, cgProbability);\n ClassGroup groupDetails = classGroups.get(thisGroup.getId());\n // pick a gender\n String gender = \"female\";\n if (generator.nextDouble() < groupDetails.getMaleProbability()) {\n gender = \"male\";\n }\n // pick a random car\n CarType car = pickCar(carList, ccProbability);\n // name format is class.groupId.gender.carName.index\n String customerName = this.name + \"_\" + i;\n // The extra character at the end of the attribute string is padding,\n // due to the fact that XStream seems to drop the last character\n // of the last attribute.\n String attributes = thisGroup.getId() + \".\" + gender\n + \".\" + car.getName() + \".x\";\n customerAttributeList.add(attributes);\n instantiateCustomer(beans, thisGroup, gender, car, customerName);\n }\n }", "public Builder addBootclasspath(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureBootclasspathIsMutable();\n bootclasspath_.add(value);\n onChanged();\n return this;\n }", "@Override\n public ChainMetaData onChain(ChainMetaData source) {\n if (USER_TEMPLATE.equals(source.getTemplate())) {\n return new ChainMetaData(source);\n }\n ChainMetaData oldChain = findChainsByTemplate(source.getTemplate());\n if (oldChain == null) {\n throw new RuntimeException(\n \"Fail to build binary provider config. Reason couldn't find chain with id: \" + source.getTemplate());\n } else {\n oldChain.setTemplate(source.getTemplate());\n }\n return null;\n }", "public boolean getBoot() {\n return boot;\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 }", "java.util.List<java.lang.String>\n getBootclasspathList();", "@Override\n public void initialize()\n {\n super.initialize();\n log.info(\"Initialize \" + name);\n Map<String, Collection<?>> beans;\n generator = service.getRandomSeedRepo().\n getRandomSeed(\"EvSocialClass-\" + name, 1, \"initialize\");\n\n Config.recycle();\n config = Config.getInstance();\n config.configure(service.getServerConfiguration());\n\n beans = config.getBeans();\n unpackBeans(beans);\n\n // Create and set up the customer instances\n evCustomers = new ArrayList<EvCustomer>();\n if (null == customerAttributeList) {\n // boot session - dynamic configuration\n configureForBoot(beans);\n }\n else {\n // sim session - restore from boot record\n configureForSim(beans);\n }\n }", "public void startup() throws MbStartupException {\r\n //start up MbModule\r\n super.startup();\r\n\r\n //get all room objects from the data repository\r\n DataRepository.DataList list = dataRepository.getList(\"roomobjects\");\r\n if (list!=null) {\r\n Iterator items = list.items();\r\n while (items.hasNext()) {\r\n DataRepository.DataListItem item = (DataRepository.DataListItem)items.next();\r\n String name = (String)item.getField(\"name\");\r\n String address = (String)item.getField(\"nodename\");\r\n \r\n String bytes = (String)item.getField(\"byte\");\r\n String[] bytearray = bytes.split(\",\");\r\n UByte[] b = new UByte[bytearray.length];\r\n for (int i = 0; i < bytearray.length; i++) {\r\n \tb[i] = UByte.parseUByte(bytearray[i]);\r\n }\r\n //UByte b = UByte.parseUByte((String)item.getField(\"byte\"));\r\n \r\n boolean pub = ((String)item.getField(\"public\")).equals(\"true\");\r\n String remotebtn = item.containsField(\"remotebutton\") ? (String)item.getField(\"remotebutton\") : \"\";\r\n roomObjects.put(name, new GenRoomObject(name, address, b, remotebtn, pub));\r\n }\r\n }\r\n //no room objects found in data repository\r\n else {\r\n _info.println(\"roomobjects-list is missing. no room objects defined!\");\r\n }\r\n\r\n //if we have any room objects\r\n if (!roomObjects.isEmpty()) {\r\n //lets send requests for their remote control buttons\r\n MbPacket p = new MbPacket();\r\n p.setDestination(new MbLocation(\"self\", \"RemoteControl\"));\r\n Iterator it = roomObjects.keySet().iterator();\r\n while (it.hasNext()) {\r\n String key = (String) it.next();\r\n GenRoomObject o = (GenRoomObject) roomObjects.get(key);\r\n if (o != null) {\r\n p.appendContents(\" <buttonrequest button=\\\"\" + o.remoteButton + \"\\\" module=\\\"\" + name() + \"\\\" />\");\r\n }\r\n }\r\n sendPacket(p);\r\n }\r\n }", "public java.lang.String getBootclasspath(int index) {\n return bootclasspath_.get(index);\n }", "public CCA2KPABEmsk Setup(Type type){\n\t\tStdOut.println(\"Setup: System Setup.\");\n\t\tElement alpha = pairing.getZr().newRandomElement().getImmutable();\n\t\tCCA2KPABEmsk msk = new CCA2KPABEmsk(alpha);\n\t\tthis.pp = new CCA2KPABEpp(pairing, type, alpha);\n\t\treturn msk;\n\t}", "public static void main(String[] args)throws Exception {\n\t\tnew recipes().run();\r\n\t}", "private static DatacenterBroker createBroker(){\n\n\t\tDatacenterBroker broker = null;\n\t\ttry {\n\t\t\tbroker = new DatacenterBroker(\"Broker\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\treturn broker;\n\t}", "public static void main(String[] args) {\n\t\tFileSystemResource res = new FileSystemResource(\"src/com/nt/cfgs/applicationContext.xml\");\r\n\t\t// crrate IOC container \r\n\t\tXmlBeanFactory factory = new XmlBeanFactory(res);\r\n\t\t//get target Spring bean class object from factoryObject\r\n\t\tWishMessageGenerator generator = (WishMessageGenerator) factory.getBean(\"wishMessageGenerator\");\r\n\t\tWishMessageGenerator generator2 = (WishMessageGenerator) factory.getBean(\"wmsg1\");\r\n\t\tWishMessageGenerator generator3 = (WishMessageGenerator) factory.getBean(\"wmsg2\");\r\n\t\tSystem.out.println(generator2.hashCode()+\" \"+generator3.hashCode()+\" \"+generator.hashCode());\r\n\t\tWishMessageGenerator generator4 = (WishMessageGenerator) factory.getBean(\"don1\");\r\n\t\tWishMessageGenerator generator5 = (WishMessageGenerator) factory.getBean(\"don2\");\r\n\t\tWishMessageGenerator generator6 = (WishMessageGenerator) factory.getBean(\"don3\");\r\n\t\tWishMessageGenerator generator7 = (WishMessageGenerator) factory.getBean(\"don4\");\r\n\t\tSystem.out.println(generator4.hashCode()+\" \"+generator5.hashCode()+\" \"+generator6.hashCode()+\" \"+generator7.hashCode());\r\n\t\t//invoke the b.logic\r\n\t\tSystem.out.println(\"result \"+ generator.generateWishMessage(\"Sushant\"));\r\n\t}", "public static void main(String[] args) {\n new MessageProcessorWithRetry();\n new EmailHelperWithRetry();\n\n }" ]
[ "0.61963016", "0.583467", "0.537734", "0.5152054", "0.5108931", "0.50150174", "0.49725056", "0.4897565", "0.48948953", "0.48818815", "0.48189726", "0.48044756", "0.47922066", "0.4788862", "0.473023", "0.46889946", "0.46884736", "0.46500716", "0.464736", "0.46458146", "0.46352583", "0.45888034", "0.45882705", "0.45429724", "0.45337373", "0.4502436", "0.44878694", "0.44833162", "0.44758254", "0.4474864", "0.4466908", "0.4466908", "0.44559827", "0.4454515", "0.4454154", "0.44168004", "0.44093397", "0.44074306", "0.44028866", "0.43889838", "0.43472278", "0.43450522", "0.43354443", "0.43338972", "0.432011", "0.43132243", "0.4311542", "0.43068728", "0.43040937", "0.42953503", "0.42877", "0.42692158", "0.42654946", "0.42623854", "0.4262349", "0.42615983", "0.42578378", "0.42557424", "0.42551267", "0.4249466", "0.42473653", "0.42452118", "0.4242279", "0.42395326", "0.42320862", "0.42297426", "0.4229089", "0.42239538", "0.42182872", "0.41858524", "0.41798034", "0.41758227", "0.4167499", "0.41645217", "0.41541117", "0.41524094", "0.4146689", "0.41433135", "0.41294858", "0.4126037", "0.4125885", "0.41247845", "0.41141266", "0.41136873", "0.41089875", "0.41066924", "0.41045895", "0.4102677", "0.41013223", "0.40988144", "0.40961537", "0.40945622", "0.40923327", "0.40920764", "0.40874207", "0.40826026", "0.40824875", "0.40816316", "0.40780726", "0.40736052" ]
0.5324539
3
TODO Autogenerated method stub
public static void main(String[] args) { int little = 0; int zero = 1; int one = 0; int big = 0; int total = 0; for (int i = 0; i<12;i++){ big += one; one = zero; zero = big; } total = big+one+zero; little = zero+one; // System.out.println(zero); // System.out.println(one); System.out.println(little); System.out.println(big); System.out.println(total); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.bbva.mzic.sendmoneymovements.facade.v01.dto
public ObjectFactory() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private DTOFactory() {\r\n \t}", "public static Factory factory() {\n return ext_accdt::new;\n }", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public static Factory factory() {\n return ext_dbf::new;\n }", "DTMCFactory getDTMCFactory();", "ObjectFactoryGenerator objectFactoryGenerator();", "public com.vodafone.global.er.decoupling.binding.request.DrmObjectType createDrmObjectType()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.DrmObjectTypeImpl();\n }", "public interface PurchaseDTOFactory {\n\n PurchaseDTO createNotExpiredPurchaseDTO();\n PurchaseDTO createExpiredPurchaseDTO();\n\n}", "private ObjectFactory createObjectFactory(String objectFactoryNamespace)\r\n throws CockpitConfigurationException {\r\n try {\r\n return new ObjectFactory(new ConfigManagerSpecificationFactory(objectFactoryNamespace));\r\n } catch (IllegalReferenceException e) {\r\n throw new CockpitConfigurationException(\r\n \"IllegalReferenceException occurs while creating ObjectFactory instance using namespace \"\r\n + objectFactoryNamespace, e);\r\n } catch (SpecificationConfigurationException e) {\r\n throw new CockpitConfigurationException(\r\n \"SpecificationConfigurationException occurs while creating ObjectFactory instance using namespace \"\r\n + objectFactoryNamespace, e);\r\n }\r\n }", "@Override\n protected ObjectFactory initObjectFactory() {\n try {\n BeanManager bm = (BeanManager) new InitialContext().lookup(\"java:comp/BeanManager\");\n Set<Bean<?>> beans = bm.getBeans(CdiObjectFactory.class);\n Bean<CdiObjectFactory> beanType = (Bean<CdiObjectFactory>) beans.iterator().next();\n CreationalContext<CdiObjectFactory> ctx = bm.createCreationalContext(beanType);\n CdiObjectFactory objFactory = (CdiObjectFactory) bm.getReference(beanType, CdiObjectFactory.class, ctx);\n objFactory.init(this);\n return objFactory;\n } catch (Exception ex) {\n throw new RuntimeException(ex);\n }\n }", "public ObjectFactory() {\r\n\t}", "XUMLRTFactory getXUMLRTFactory();", "public ObjectFactory() {\n\t}", "public interface IoT_metamodelFactory extends EFactory {\n\t/**\n\t * The singleton instance of the factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tIoT_metamodelFactory eINSTANCE = ioT_metamodel.impl.IoT_metamodelFactoryImpl.init();\n\n\t/**\n\t * Returns a new object of class '<em>Thing</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Thing</em>'.\n\t * @generated\n\t */\n\tThing createThing();\n\n\t/**\n\t * Returns a new object of class '<em>Virtual Thing</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Virtual Thing</em>'.\n\t * @generated\n\t */\n\tVirtualThing createVirtualThing();\n\n\t/**\n\t * Returns a new object of class '<em>Physical Thing</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Physical Thing</em>'.\n\t * @generated\n\t */\n\tPhysicalThing createPhysicalThing();\n\n\t/**\n\t * Returns a new object of class '<em>Fog</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Fog</em>'.\n\t * @generated\n\t */\n\tFog createFog();\n\n\t/**\n\t * Returns a new object of class '<em>Fog Node</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Fog Node</em>'.\n\t * @generated\n\t */\n\tFogNode createFogNode();\n\n\t/**\n\t * Returns a new object of class '<em>Device</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Device</em>'.\n\t * @generated\n\t */\n\tDevice createDevice();\n\n\t/**\n\t * Returns a new object of class '<em>Actuator</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Actuator</em>'.\n\t * @generated\n\t */\n\tActuator createActuator();\n\n\t/**\n\t * Returns a new object of class '<em>Tag</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Tag</em>'.\n\t * @generated\n\t */\n\tTag createTag();\n\n\t/**\n\t * Returns a new object of class '<em>Rule</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Rule</em>'.\n\t * @generated\n\t */\n\tRule createRule();\n\n\t/**\n\t * Returns a new object of class '<em>External Sensor</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>External Sensor</em>'.\n\t * @generated\n\t */\n\tExternalSensor createExternalSensor();\n\n\t/**\n\t * Returns a new object of class '<em>Device Actuator</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Device Actuator</em>'.\n\t * @generated\n\t */\n\tDeviceActuator createDeviceActuator();\n\n\t/**\n\t * Returns a new object of class '<em>External Actuator</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>External Actuator</em>'.\n\t * @generated\n\t */\n\tExternalActuator createExternalActuator();\n\n\t/**\n\t * Returns a new object of class '<em>Action</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Action</em>'.\n\t * @generated\n\t */\n\tAction createAction();\n\n\t/**\n\t * Returns a new object of class '<em>Device State</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Device State</em>'.\n\t * @generated\n\t */\n\tDeviceState createDeviceState();\n\n\t/**\n\t * Returns a new object of class '<em>Composite State</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Composite State</em>'.\n\t * @generated\n\t */\n\tCompositeState createCompositeState();\n\n\t/**\n\t * Returns a new object of class '<em>Transition</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Transition</em>'.\n\t * @generated\n\t */\n\tTransition createTransition();\n\n\t/**\n\t * Returns a new object of class '<em>Digital Artifact</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Digital Artifact</em>'.\n\t * @generated\n\t */\n\tDigital_Artifact createDigital_Artifact();\n\n\t/**\n\t * Returns a new object of class '<em>Active Digital Artifact</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Active Digital Artifact</em>'.\n\t * @generated\n\t */\n\tActive_Digital_Artifact createActive_Digital_Artifact();\n\n\t/**\n\t * Returns a new object of class '<em>Passive Digital Artifact</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Passive Digital Artifact</em>'.\n\t * @generated\n\t */\n\tPassive_Digital_Artifact createPassive_Digital_Artifact();\n\n\t/**\n\t * Returns a new object of class '<em>User</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>User</em>'.\n\t * @generated\n\t */\n\tUser createUser();\n\n\t/**\n\t * Returns a new object of class '<em>Human User</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Human User</em>'.\n\t * @generated\n\t */\n\tHuman_User createHuman_User();\n\n\t/**\n\t * Returns a new object of class '<em>Communicator</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Communicator</em>'.\n\t * @generated\n\t */\n\tCommunicator createCommunicator();\n\n\t/**\n\t * Returns a new object of class '<em>Port</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Port</em>'.\n\t * @generated\n\t */\n\tPort createPort();\n\n\t/**\n\t * Returns a new object of class '<em>Information Resource</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Information Resource</em>'.\n\t * @generated\n\t */\n\tInformationResource createInformationResource();\n\n\t/**\n\t * Returns a new object of class '<em>On Device Resource</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>On Device Resource</em>'.\n\t * @generated\n\t */\n\tOn_Device_Resource createOn_Device_Resource();\n\n\t/**\n\t * Returns a new object of class '<em>Network Resource</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Network Resource</em>'.\n\t * @generated\n\t */\n\tNetwork_Resource createNetwork_Resource();\n\n\t/**\n\t * Returns a new object of class '<em>Device Resource</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Device Resource</em>'.\n\t * @generated\n\t */\n\tDevice_Resource createDevice_Resource();\n\n\t/**\n\t * Returns a new object of class '<em>Service Resource</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Service Resource</em>'.\n\t * @generated\n\t */\n\tService_Resource createService_Resource();\n\n\t/**\n\t * Returns a new object of class '<em>Property</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Property</em>'.\n\t * @generated\n\t */\n\tProperty createProperty();\n\n\t/**\n\t * Returns a new object of class '<em>VM</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>VM</em>'.\n\t * @generated\n\t */\n\tVM createVM();\n\n\t/**\n\t * Returns a new object of class '<em>Container</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Container</em>'.\n\t * @generated\n\t */\n\tContainer createContainer();\n\n\t/**\n\t * Returns a new object of class '<em>Analytics Engine</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Analytics Engine</em>'.\n\t * @generated\n\t */\n\tAnalytics_Engine createAnalytics_Engine();\n\n\t/**\n\t * Returns a new object of class '<em>Cloud</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Cloud</em>'.\n\t * @generated\n\t */\n\tCloud createCloud();\n\n\t/**\n\t * Returns a new object of class '<em>Database</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Database</em>'.\n\t * @generated\n\t */\n\tDatabase createDatabase();\n\n\t/**\n\t * Returns a new object of class '<em>Policy Repository</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Policy Repository</em>'.\n\t * @generated\n\t */\n\tPolicy_Repository createPolicy_Repository();\n\n\t/**\n\t * Returns a new object of class '<em>Reference Monitor</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Reference Monitor</em>'.\n\t * @generated\n\t */\n\tReference_Monitor createReference_Monitor();\n\n\t/**\n\t * Returns a new object of class '<em>Authorizor</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Authorizor</em>'.\n\t * @generated\n\t */\n\tAuthorizor createAuthorizor();\n\n\t/**\n\t * Returns a new object of class '<em>Information</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Information</em>'.\n\t * @generated\n\t */\n\tInformation createInformation();\n\n\t/**\n\t * Returns a new object of class '<em>Data Streams</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Data Streams</em>'.\n\t * @generated\n\t */\n\tDataStreams createDataStreams();\n\n\t/**\n\t * Returns a new object of class '<em>Atomic Data</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Atomic Data</em>'.\n\t * @generated\n\t */\n\tAtomicData createAtomicData();\n\n\t/**\n\t * Returns a new object of class '<em>Data Stream Attributes</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Data Stream Attributes</em>'.\n\t * @generated\n\t */\n\tDataStreamAttributes createDataStreamAttributes();\n\n\t/**\n\t * Returns a new object of class '<em>Atomic Data Attributes</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Atomic Data Attributes</em>'.\n\t * @generated\n\t */\n\tAtomicDataAttributes createAtomicDataAttributes();\n\n\t/**\n\t * Returns a new object of class '<em>Fog Services</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Fog Services</em>'.\n\t * @generated\n\t */\n\tFog_Services createFog_Services();\n\n\t/**\n\t * Returns a new object of class '<em>Operations</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Operations</em>'.\n\t * @generated\n\t */\n\tOperations createOperations();\n\n\t/**\n\t * Returns a new object of class '<em>Java Evaluator</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Java Evaluator</em>'.\n\t * @generated\n\t */\n\tJavaEvaluator createJavaEvaluator();\n\n\t/**\n\t * Returns a new object of class '<em>Entity</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Entity</em>'.\n\t * @generated\n\t */\n\tEntity createEntity();\n\n\t/**\n\t * Returns a new object of class '<em>Script Evaluator</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Script Evaluator</em>'.\n\t * @generated\n\t */\n\tScriptEvaluator createScriptEvaluator();\n\n\t/**\n\t * Returns a new object of class '<em>Device Sensor</em>'.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return a new object of class '<em>Device Sensor</em>'.\n\t * @generated\n\t */\n\tDeviceSensor createDeviceSensor();\n\n\t/**\n\t * Returns the package supported by this factory.\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @return the package supported by this factory.\n\t * @generated\n\t */\n\tIoT_metamodelPackage getIoT_metamodelPackage();\n\n}", "public static MovimentiCcService creaOggettoServiceImpl() {\n\t\tMovimentiCcServiceImpl serviceImpl = new MovimentiCcServiceImpl();\r\n\t\t// crea un oggetto FactoryImpl\r\n\t\tMovimentoCcFactoryImpl movimentoCcFactoryImpl = new MovimentoCcFactoryImpl();\r\n\t\t// risolve la dipendenza \r\n\t\tserviceImpl.setMovimentoCcFactory(movimentoCcFactoryImpl);\r\n\t\treturn serviceImpl;\r\n\t}", "public OBStoreFactory getFactory();", "public SchemaDto() {\n }", "private ObjectFactory() { }", "private EntityFactory() {}", "public ObjectifyFactory factory() {\n return ofy().factory();\n }", "SchemaBuilder withFactory(String factoryClassName);", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.68009305", "0.6140619", "0.6004398", "0.6004398", "0.6004398", "0.5990481", "0.5976223", "0.59636223", "0.59258544", "0.58992904", "0.58829737", "0.58713967", "0.5869426", "0.58608925", "0.5859021", "0.58196557", "0.5798423", "0.57809556", "0.57629853", "0.57529527", "0.57485735", "0.5744369", "0.5742624", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156", "0.57405156" ]
0.0
-1
Update the player stats by processing the attributes of the provided message
public synchronized static void updatePlayerStats(Message message) { String profileId = message.getHeader().getProfileId(); PlayerStats playerStats = playerStatsMap.getOrDefault(profileId, new PlayerStats(profileId)); playerStats.logInteractionDate(message.getHeader().getServerDate()); if (message.getHeader().getEventType().equals("context.stop.MATCH")) playerStats.incrementNumOfMatchesPlayed(); if (message.getHeader().getEventType().equals("custom.RoundWin")) playerStats.incrementNumOfRoundWins(); if (message.getHeader().getEventType().equals("custom.player.MatchWin")) playerStats.incrementNumOfMatchWins(); playerStatsMap.put(profileId, playerStats); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Response updatePlayerStats(String jsonMessage);", "void onUpdate(Message message);", "public abstract void update(Message message);", "public void updateStats( ) {\r\n\t\tperseverance = owner.perseverance;\r\n\t\tobservation = owner.observation;\r\n\t\tintellect = owner.intellect;\r\n\t\tnegotiation = owner.negotiation;\r\n\t\ttact = owner.tact;\r\n\t\tstrength = owner.strength;\r\n\r\n\t\txCoord = owner.xCoord;\r\n\t\tyCoord = owner.yCoord;\r\n\r\n\t\tmaxHealth = 2400 + ( perseverance * 200 );\r\n\r\n\t\thealth = maxHealth;\r\n\r\n\t\tsetDamages( );\r\n\t}", "void update(String message, Command command, String senderNickname);", "public static void getStatus( Player player ) {\n Tools.Prt( player, ChatColor.GREEN + \"=== Premises Messages ===\", programCode );\n Messages.PlayerMessage.keySet().forEach ( ( gn ) -> {\n String mainStr = ChatColor.YELLOW + Messages.PlayerMessage.get( gn );\n mainStr = mainStr.replace( \"%player%\", ChatColor.AQUA + \"%player%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%message%\", ChatColor.AQUA + \"%message%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%tool%\", ChatColor.AQUA + \"%tool%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%digs%\", ChatColor.AQUA + \"%digs%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%nowDurability%\", ChatColor.AQUA + \"%nowDurability%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%targetDurability%\", ChatColor.AQUA + \"%targetDurability%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%score%\", ChatColor.AQUA + \"%score%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%AreaCode%\", ChatColor.AQUA + \"%AreaCode%\" + ChatColor.YELLOW );\n Tools.Prt( player, ChatColor.WHITE + gn + \" : \" + mainStr, programCode );\n } );\n Tools.Prt( player, ChatColor.GREEN + \"=========================\", programCode );\n }", "public void updateScore(JsonObject inputMsg) {\n\t\tString name = format(inputMsg.get(\"ScoredPlayer\").toString());\n\t\tfor (int i = 0; i < playerList.size(); i++) {\n\t\t\tif (playerList.get(i).getPlayerName().equals(name)) {\n\t\t\t\tplayerList.get(i).setPlayerScore(playerList.get(i).getPlayerScore()\n\t\t\t\t\t\t+ Integer.parseInt(format(inputMsg.get(\"Score\").toString())));\n\t\t\t\tscoreBoard[i].setText(\"Player: \" + playerList.get(i).getPlayerName() + \"\\t\"\n\t\t\t\t\t\t+ \"Score: \" + playerList.get(i).getPlayerScore());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public void update(String message) {\r\n send(message);\r\n }", "public void process(Player player) {\n if (playerPacketId != -1) {\n updatePlayer(player, createUpdate(true));\n }\n if (npcPacketId != -1) {\n updateMobs(player, createUpdate(false));\n }\n //grounditem update\n }", "void update(T message);", "@Override\n public void playerAttributeChange() {\n\n Logger.info(\"HUD Presenter: playerAttributeChange\");\n view.setLives(String.valueOf(player.getLives()));\n view.setMoney(String.valueOf(player.getMoney()));\n setWaveCount();\n }", "private void processMessage(String message)\n {\n String card, strLabel;\n int nc;\n JLabel lbCard;\n switch(message.trim()) {\n case Player.HIT : \n card = player.hitting();\n nc = player.getHand().size();\n strLabel = \"player\" + player.getNumber() + \"_C\" + nc;\n lbCard = (JLabel) serverGUI.getComponentByName(strLabel);\n lbCard.setVisible(true);\n lbCard.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/ufc/smd/italoboss/socketjack/images/\" \n + card + \".png\")));\n break;\n \n case Player.STAND : \n player.standing();\n break;\n \n case Player.DOUBLE : \n card = player.doublingDown();\n nc = player.getHand().size();\n strLabel = \"player\" + player.getNumber() + \"_C\" + nc;\n lbCard = (JLabel) serverGUI.getComponentByName(strLabel);\n lbCard.setVisible(true);\n lbCard.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/br/ufc/smd/italoboss/socketjack/images/\" \n + card + \".png\")));\n break;\n }\n }", "public void update() {\n\t\tVec2 newPos = calculatePos();\n\t\t/* energy bar */\n\t\tfloat newEnergy = actor.getEnergy();\n\t\tfloat maxEnergy = actor.getEnergyLimit();\n\t\tenergy.setPosition(newPos.getX(), newPos.getY() + paddingHealth / Application.s_Viewport.getX(), newEnergy,\n\t\t\t\tmaxEnergy);\n\t\t/* health bar */\n\t\tfloat newHealth = actor.getHealth();\n\t\tfloat maxHealth = actor.getHealthLimit();\n\t\thealth.setPosition(newPos.getX(), newPos.getY() + paddingEnergy / Application.s_Viewport.getX(), newHealth,\n\t\t\t\tmaxHealth);\n\t\t/* name label */\n\t\tplayerName.setPosition(newPos.getX(), newPos.getY() + paddingName / Application.s_Viewport.getY());\n\t}", "public void update() {\n\t\t//Indicate that data is fetched\n\t\tactivity.showProgressBar();\n\t\n\t\tPlayer currentPlayer = dc.getCurrentPlayer();\n\t\tactivity.updatePlayerInformation(\n\t\t\t\tcurrentPlayer.getName(),\n\t\t\t\tgetGlobalRanking(),\n\t\t\t\tcurrentPlayer.getGlobalScore(),\n\t\t\t\tcurrentPlayer.getPlayedGames(),\n\t\t\t\tcurrentPlayer.getWonGames(),\n\t\t\t\tcurrentPlayer.getLostGames(),\n\t\t\t\tcurrentPlayer.getDrawGames());\n\n\t\tactivity.hideProgressBar();\n\t}", "public void updatePlayerScoreForUsername(String username) {\n for (Player P : fliegeScore.getPlayers()) {\n if (P.getPlayerName().compareTo(username) == 0) {\n P.setScore(P.getScore() + 1);\n }\n }\n }", "public void update(Player player) {\n\t\t\n\t}", "void updatePlayer(Player player);", "private void updateStats()\n\t{\n\n\t\tint[] temp = simulation.getStatValue();\n\t\tfor(int i = 0; i < temp.length; i++)\n\t\t{\n\t\t\tthis.statsValues[i].setText(Integer.toString(temp[i]));\n\t\t}\n\t\t\n\t\tint[] temp2 = simulation.getNumberInEachLine();\n\t\tfor(int i = 0; i < temp2.length; i++)\n\t\t{\n\t\t\tthis.eatValues[i].setText(Integer.toString(temp2[i]));\n\t\t}\n\t}", "public void process() {\n\t\ttime--;\n\t\tif (time <= 0) {\n\t\t\tend(false);\n\t\t\treturn;\n\t\t}\n\t\tfor (Player p : getPlayers()) {\n\t\t\t// Check if p is not null and make sure they are active\n\t\t\tif (Objects.nonNull(p) && p.isActive()) {\n\t\t\t\t// Here we will send interfaces, update the score, notify\n\t\t\t\t// players of\n\t\t\t\t// what is going on in the game etc.\n\t\t\t\tp.send(new SendMessage(\"Active\"));\n\t\t\t}\n\t\t}\n\t}", "public void updateClientPokemonStats(int i)\n\t{\n\t\tif(m_pokemon[i] != null)\n\t\t{\n\t\t\tString data = m_pokemon[i].getHealth() + \",\" + m_pokemon[i].getStat(0) + \",\" + m_pokemon[i].getStat(1) + \",\" + m_pokemon[i].getStat(2) + \",\" + m_pokemon[i].getStat(3) + \",\"\n\t\t\t\t\t+ m_pokemon[i].getStat(4) + \",\" + m_pokemon[i].getStat(5);\n\t\t\tServerMessage message = new ServerMessage(ClientPacket.POKE_STATUS_UPDATE);\n\t\t\tmessage.addInt(i);\n\t\t\tmessage.addString(data);\n\t\t\tgetSession().Send(message);\n\t\t}\n\t}", "public abstract void onBakestatsCommand(Player player);", "abstract void updateMessage(String msg);", "public void announceToPlayers(String message)\n\t{\n\t\tfor (Creature temp : getCharactersInside())\n\t\t{\n\t\t\tif (temp instanceof PlayerInstance)\n\t\t\t{\n\t\t\t\t((PlayerInstance) temp).sendMessage(message);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void onUpdate(String currentTime, int percent) {\n\t\tMessage msg = new Message();\n\t\tmsg.what = UPDATE_DURATION;\n\t\tmsg.obj = currentTime;\n\t\tmsg.arg1 = percent;\n\t\tmHandler.sendMessage(msg);\t// Send message\n\t}", "@Override\n\tpublic void processMessage(Message message) {\n\t\t\n\t}", "@Override\r\n public void handleMessage (Message inputMessage) {\n OnUpdatePlayerSubscription.OnUpdatePlayer updatePlayer = response.data().onUpdatePlayer();\r\n\r\n Log.i(TAG, \"updated user is \" + updatePlayer.toString() + \" session id is \" + sessionId);\r\n //checking if the updated player is in this session\r\n if(updatePlayer.session().id().equals(sessionId)){\r\n boolean contains = false;\r\n\r\n //checking if the updated player is in the current player list\r\n for(Player player : players){\r\n\r\n // if we have a match update players lat/long\r\n if(updatePlayer.id().equals(player.getId())){\r\n List<LatLng> bananasList = new LinkedList<>();\r\n bananasList.add(new LatLng(response.data().onUpdatePlayer().lat(),\r\n response.data().onUpdatePlayer().lon()));\r\n player.setLocations(bananasList); // sets location for the player\r\n player.setIt(updatePlayer.isIt());\r\n contains = true;\r\n }\r\n }\r\n\r\n //if the player is in the session, but not in the player list, then make a new player and add them to the players list and add a marker\r\n if(contains == false){\r\n Marker marker = mMap.addMarker(new MarkerOptions()\r\n .position(new LatLng(updatePlayer.lat(), updatePlayer.lon()))\r\n .title(updatePlayer.username()));\r\n Circle circle = mMap.addCircle(new CircleOptions()\r\n .center(new LatLng(updatePlayer.lat(), updatePlayer.lon()))\r\n .radius(tagDistance)\r\n .fillColor(Color.TRANSPARENT)\r\n .strokeWidth(3));\r\n\r\n marker.setIcon(playerpin);\r\n circle.setStrokeColor(notItColor);\r\n\r\n Player newPlayer = new Player();\r\n newPlayer.setId(updatePlayer.id());\r\n newPlayer.setIt(false);\r\n newPlayer.setMarker(marker);\r\n newPlayer.setCircle(circle);\r\n newPlayer.setUsername(updatePlayer.username());\r\n List<LatLng> potatoes = new LinkedList<>();\r\n potatoes.add(new LatLng(updatePlayer.lat(), updatePlayer.lon()));\r\n newPlayer.setLocations(potatoes);\r\n\r\n //adding player to the list of players in the game\r\n players.add(newPlayer);\r\n }\r\n }\r\n// for(Player player : players) {\r\n// if(response.data().onUpdatePlayer().id().equals(player.getId())) {\r\n// // if true (we have a match) update players lat/long\r\n// List<LatLng> bananasList = new LinkedList<>();\r\n// bananasList.add(new LatLng(response.data().onUpdatePlayer().lat(),\r\n// response.data().onUpdatePlayer().lon()));\r\n// player.setLocations(bananasList); // sets location for the player\r\n// //Might have been causing the starting point to move\r\n//// player.getCircle().setCenter(player.getLastLocation());\r\n//// player.getMarker().setPosition(player.getLastLocation());\r\n// }\r\n// }\r\n }", "@Override\n public void handleMessage(Message m) {\n int gameState = Integer.valueOf(m.getText());\n System.out.println(\"Got authoritative game state \" + gameState + \" from server. Updating local state now...\");\n this.gameState = gameState;\n }", "public abstract Scoreboard update(Player player);", "public void processMessage(Chat chat, Message message)\n {\n }", "public Player updatePlayer(Player player);", "protected void apply() {\r\n\t\tplayer.setAutoRoll(autoroll);\r\n\t\tplayer.setMission(mission);\r\n\t\tplayer.setState(state);\r\n\t\tplayer.getCards().setArtillery(cards.getArtillery());\r\n\t\tplayer.getCards().setCavalry(cards.getCavalry());\r\n\t\tplayer.getCards().setInfantry(cards.getInfantry());\r\n\t\tplayer.getCards().setJokers(cards.getJokers());\r\n\t\tMember member = player.getMember();\r\n\t\tif(score == Score.WIN) {\r\n\t\t\tmember.setScore(member.getScore() + player.getGame().getPlayers().size() - 1);\r\n\t\t\tmember.setWins(member.getWins() + 1);\r\n\t\t} else if(score == Score.LOSS) {\r\n\t\t\tmember.setScore(member.getScore() - 1);\r\n\t\t\tmember.setLosses(member.getLosses() + 1);\r\n\t\t}\r\n\t}", "public void updateMessage(Messenger handler, int stage){\n try {\n messageContent.put(\"stage\", stage);\n messageContent.put(\"totalSongs\", songsToTransfer);\n messageContent.put(\"songsMatched\", songsFound);\n messageContent.put(\"songsNotMatched\", songsNotFound);\n messageContent.put(\"playlistsCreated\", playlistsFinished);\n\n msg = new Message();\n msg.obj = messageContent;\n msg.what = STATUS_RUNNING;\n handler.send(msg);\n } catch (JSONException | RemoteException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void updateStats() {\n if (isEnglish) {\n String moves = NUM_MOVES + presenter.getNumMoves();\n String time = TIME_LEFT + presenter.getTimeLeft();\n String points = POINTS + presenter.getPoints();\n painterTextViewMoves.setText(moves);\n painterTextViewTime.setText(time);\n painterTextViewPoints.setText(points);\n } else {\n String moves = NUM_MOVES_CHINESE + presenter.getNumMoves();\n String time = TIME_LEFT_CHINESE + presenter.getTimeLeft();\n String points = POINTS_CHINESE + presenter.getPoints();\n painterTextViewTime.setText(time);\n painterTextViewMoves.setText(moves);\n painterTextViewPoints.setText(points);\n }\n }", "private void processMessage(Message message) {\n log(\"\");\n log(\"\");\n// log(\"recon list: \" + reconciliation);\n log(\"message\", message);\n\n switch (message.type) {\n // Response from server when registering\n case \"accepted\":\n accepted = true;\n\n // lobby leader, this user sets the info for all users.\n if (message.stringData != null && message.stringData.equals(\"leader\")) {\n\n LobbySettings lobbySettings = new LobbySettings();\n if (requestedGameType != null)\n lobbySettings.updateType(requestedGameType);\n log(\"req points\", requestedMapCntrlPoints);\n lobbySettings.setMap(requestedMapCntrlPoints);\n\n sendLobbySettingsToServer(lobbySettings);\n }\n\n if (message.name != name) {\n name = message.name;\n System.out.println(\"Name rejected. New name: \" + name);\n }\n\n break;\n // Resend register message\n case \"rejected\":\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n sendRegisterMessage();\n break;\n // the first game message from the server\n case \"initialUpdate\":\n EntityHandler eh = message.entityHandler;\n game.entityHandler = eh;\n game.modelLayer.setEntities(eh);\n game.lobbySettings = message.lobbySettings;\n game.timeRemaining = message.timeRemaining;\n game.teamsList = message.teamsList;\n game.tankID = message.stringData;\n game.teamID = message.teamID;\n tankToUsernameMap = message.tankToNameMap;\n log(String.format(\"We are '%s' on team %d.\", message.stringData, message.teamID));\n\n // TODO this is the shit\n game.map.loadMap(message.lobbySettings.getMap());\n game.setupTerrainFlag = true;\n\n started = true;\n\n game.postConnect();\n log(\"game started!!\");\n break;\n // main update case\n case \"update\":\n if (!started)\n return;\n\n log(\"received new entity handler\");\n\n EntityHandler serverEntityHandler = message.entityHandler;\n game.entityHandler = serverEntityHandler;\n tankToHeldLength = message.tankToHeldLength;\n game.modelLayer.setEntities(serverEntityHandler);\n\n game.entityHandler.constrainTanks(game.map);\n game.entityHandler.constrainCrates(game.map);\n game.entityHandler.constrainTurrets(game.tankID, Input.cursorPos);\n\n game.timeRemaining = message.timeRemaining;\n\n double serverPacketNumber = message.packetNum;\n log(\"server packet:\" + serverPacketNumber + \", last packet we sent:\" + packetNum);\n\n int i = 0;\n while (i < reconciliation.size()) {\n Message reconMessage = reconciliation.get(i);\n\n if (reconMessage.packetNum <= serverPacketNumber) {\n log(\"reconcile!, m packet:\" + reconMessage.packetNum + \"<= server packet:\" + serverPacketNumber);\n reconciliation.remove(i);\n } else {\n log(\"server lagging behind, apply inputs again for packet: \" + reconMessage.packetNum);\n\n Integer[] keysPressed = reconMessage.keysPressed;\n double mouseHeldTime = reconMessage.mouseHeldTime;\n reconciliationUpdate(keysPressed, mouseHeldTime);\n i++;\n }\n }\n break;\n case \"endUpdate\":\n if (!started)\n return;\n\n log(\"received final entity handler\");\n accepted = false;\n started = false;\n ended = true;\n game.entityHandler = message.entityHandler;\n game.modelLayer.setEntities(message.entityHandler);\n game.entityHandler.constrainTanks(game.map);\n game.entityHandler.constrainTurrets(game.tankID, Input.cursorPos);\n game.setEndOfGame(); // assuming we are in online mode\n break;\n case \"debug\":\n String str = message.stringData;\n log(str);\n testMessages.add(message);\n break;\n default:\n error(\"unknown type: \" + message.type);\n break;\n }\n }", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public void updatePlayer(Player player) {\n Duration playDuration = Duration.ofMinutes(player.getStatistic(Statistic.PLAY_ONE_MINUTE) / 20 / 60);\n int hoursPlayed = Math.toIntExact(playDuration.toHours());\n this.objective.getScore(player.getName()).setScore(hoursPlayed);\n }", "public void updateScore(int score){ bot.updateScore(score); }", "public void addPlayerToStats(Player player) {\n\t\tfindForPlayer(player);\n\t}", "public void changeStats(gameCharacter toAffect);", "@Override\r\n\tpublic void update(WechatMember member) {\n\t\t\r\n\t}", "private void updateTamingProcess() {\n\n if (!mseEntity.isTameable())\n return;\n\n int tamingIncrease = mseEntity.updateHunger();\n if (tamingIncrease > 0) {\n mseEntity.eatAnimation();\n }\n\n int tamingProgress = tamingHandler.getTamingProgress();\n tamingProgress += tamingIncrease;\n tamingHandler.setTamingProgress(tamingProgress);\n if (tamingProgress < 0)\n tamingProgress = 0;\n if (tamingProgress >= mseEntity.getMaxTamingProgress())\n tamingHandler.setSuccessfullyTamed();\n\n }", "public void processMessage()\n {\n \tif(messageContents.getMessage().containsCommand())\n {\n \tCommand command = new Command(messageContents);\n CommandProcessor commandProcessor = new CommandProcessor(joeBot, command);\n commandProcessor.processCommand();\n }\n else\n {\n Speech speech = new Speech(messageContents);\n SpeechProcessor speechProcessor = new SpeechProcessor(joeBot, speech);\n speechProcessor.processSpeech();\n }\n }", "public synchronized void parseMessage(GameMessage message) {\t\n\t\tswitch(message.getType()) {\n\t\tcase CardGameMessage.PLAYER_LIST:\n\t\t\tthis.playerID = message.getPlayerID();\n\t\t\tif(playerName == \"Guest\") playerName += \" \" + this.playerID;\n\t\t\tplayerList.get(this.playerID).setName(playerName);\n\t\t\ttable.setActivePlayer(playerID);\n\t\t\ttable.isPresent(this.playerID, true);\n\t\t\tfor(int i = 0; i < 4; i++) {\n\t\t\t\tif(i==this.playerID)continue;\n\t\t\t\t\n\t\t\t\tString s = ((String[])message.getData())[i];\n\t\t\t\tif (s != null) {\n\t\t\t\t\tplayerList.get(i).setName(s);\n\t\t\t\t\ttable.isPresent(i, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttable.repaint();\n\t\t\tsendMessage(new CardGameMessage(CardGameMessage.JOIN, -1, playerName));\n\t\t\tbreak;\n\t\t\t\n\t\tcase CardGameMessage.JOIN:\n\t\t\t\n\t\t\tif(message.getPlayerID() == playerID) {\n\t\t\t\tsendMessage(new CardGameMessage(CardGameMessage.READY, -1, null));\n\t\t\t} else {\n\t\t\t\tplayerList.get(message.getPlayerID()).setName((String)message.getData());\n\t\t\t\ttable.isPresent(message.getPlayerID(), true);\n\t\t\t\ttable.repaint();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase CardGameMessage.FULL:\n\t\t\ttable.printMsg(\"Cannot Join. Server /\" + serverIP + \":\" + serverPort + \" is full.\");\n\t\t\ttable.repaint();\n\t\t\ttry {\n\t\t\t\tsock.close();\n\t\t\t\tsock = null;\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tbreak;\n\t\t\n\t\tcase CardGameMessage.QUIT:\n\t\t\ttable.printMsg(playerList.get(message.getPlayerID()).getName() + \" (\" +(String)message.getData() + \") quit the game.\\n\\n\");\n\t\t\tplayerList.get(message.getPlayerID()).setName(\"\");\n\t\t\ttable.isPresent(message.getPlayerID(), false);\n\t\t\tif(!endOfGame()) {\n\t\t\t\tfor(int i = 0; i < 4; i++) {\n\t\t\t\t\tplayerList.get(i).removeAllCards();\n\t\t\t\t}\n\t\t\t\ttable.disable();\n\t\t\t}\n\t\t\ttable.repaint();\n\t\t\tsendMessage(new CardGameMessage(CardGameMessage.READY, -1, null));\n\t\t\tbreak;\n\t\t\n\t\tcase CardGameMessage.READY:\n\t\t\ttable.printMsg(playerList.get(message.getPlayerID()).getName() + \" is Ready.\");\n\t\t\ttable.repaint();\n\t\t\tbreak;\n\t\t\n\t\tcase CardGameMessage.START:\n\t\t\tstart((BigTwoDeck)message.getData());\n\t\t\ttable.printMsg(\"Game has started.\\n\\n\");\n\t\t\ttable.printMsg(playerList.get(currentIdx).getName() + \"'s turn:\");\n\t\t\tif(playerID == currentIdx) table.enable();\n\t\t\telse table.disable();\n\t\t\ttable.repaint();\n\t\t\tbreak;\n\t\t\n\t\tcase CardGameMessage.MOVE:\n\t\t\tcheckMove(message.getPlayerID(),(int[]) message.getData());\n\t\t\ttable.repaint();\n\t\t\tbreak;\n\t\t\n\t\tcase CardGameMessage.MSG:\n\t\t\ttable.chatMsg((String)message.getData());\n\t\t\ttable.repaint();\n\t\t\tbreak;\n\t\t}\n\t}", "public void update(){\n\t\tupdatePlayerPosition();\n\t\thandleCollisions();\n\t}", "public void updatePlayerHealthUI() {\n CharSequence text = String.format(\"Score: %d\", getscore());\n scoreLabel.setText(text);\n }", "protected boolean processWhisper(String username, String titles, int rating, int gameNumber, String message){return false;}", "public void setSyntheticSpeechAttributes(String message,JLabel statuslbl,JProgressBar progressBar, String voice, double rate, int pitchStart, int pitchEnd){\n\t\tthis.message = message;\n\t\tthis.progressBar=progressBar;\n\t\tthis.statuslbl=statuslbl;\n\t\tthis.voice=voice;\n\t\tthis.rate=rate;\n\t\tthis.pitchStart=pitchStart;\n\t\tthis.pitchEnd=pitchEnd;\n\t}", "abstract void updatePlayer();", "@Override\n public void processPlayer(Player sender, CDPlayer playerData, String[] args) {\n }", "@Override\n public void update(ModelUpdate message) {\n calledMethods.add(\"update: \" + message.getEventType());\n }", "private void updateStats(Player player, Stats stats) {\n if (this.statsScoreboards != null) {\n GameListener.this.statsScoreboards.get(player).updateStats(player, stats);\n }\n }", "public void processMessage(String message);", "public void updatePlayer(Player player) {\n\t\t// update the flag GO TO JAIL in Player class\n\t}", "public void updateInfo(Player p, boolean isFirst) {\r\n\t\tif (p.isDead() || p.isFree()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Updating player info\");\r\n\t\t\r\n\t\t// Build embed with all stats\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tembed.setColor(p.getColor());\r\n\t\tembed.setTitle(\"**\"+Utils.getName(p.getPlayerID(),guild)+\"**'s Information\");\r\n\t\tembed.addField(\"Health :heart:\",\"``\"+p.getHealth()+\"``\", true);\r\n\t\tembed.addField(\"Board Clank :warning:\",\"``\"+p.getClankOnBoard()+\"``\", true);\r\n\t\tembed.addField(\"Bag Clank :briefcase:\",\"``\"+p.getClankInBag()+\"``\", true);\r\n\t\tembed.addField(\"**Skill** :diamond_shape_with_a_dot_inside:\",\"``\"+p.getSkill()+\"``\",true);\r\n\t\tembed.addField(\"**Boots** :boot:\",\"``\"+p.getBoots()+\"``\",true);\r\n\t\tembed.addField(\"**Swords** :crossed_swords:\",\"``\"+p.getSwords()+\"``\",true);\r\n\t\tembed.addField(\"Gold :moneybag:\",\"``\"+p.getGold()+\"``\",true);\r\n\t\t//embed.addField(\"Room [\"+ p.getCurrentRoom() + \"] :door:\",\"``\"+Utils.arrayToString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\"``\",true);\r\n\t\tembed.addField(\"Room [\"+ p.getCurrentRoom() + \"] :door:\",Utils.arrayToEmojiString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()]),true);\r\n\t\tif (p.getTeleports() > 0) {\r\n\t\t\tif (GlobalVars.teleportRoomsPerRoom[p.getCurrentRoom()].length > 0) {\r\n\t\t\t\t//embed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\"``\"+\r\n\t\t\t\t//\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\" ┃ \"+\r\n\t\t\t\t//\t\tUtils.arrayToString(GlobalVars.teleportRoomsPerRoom[p.getCurrentRoom()])+\"``\",true);\r\n\t\t\t\tembed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\r\n\t\t\t\t\t\tUtils.arrayToEmojiString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\"┃\"+\r\n\t\t\t\t\t\tUtils.arrayToEmojiString(GlobalVars.teleportRoomsPerRoom[p.getCurrentRoom()],GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()].length),true);\r\n\t\t\t} else {\r\n\t\t\t\t//embed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\"``\"+\r\n\t\t\t\t//\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()])+\"``\",true);\r\n\t\t\t\tembed.addField(p.getTeleports() + \"x **Teleport(s)** :crystal_ball:\",\r\n\t\t\t\t\t\tUtils.arrayToEmojiString(GlobalVars.adjacentRoomsPerRoom[p.getCurrentRoom()]),true);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tembed.addField(\"\",\"\",true);\r\n\t\t}\r\n\t\t\r\n\t\t// Set history as footer\r\n\t\tString history = \"\";\r\n\t\tfor (int i = p.getHistory().size()-1; i >= 0; i--) {\r\n\t\t\thistory += p.getHistory().get(i) + \" / \";\r\n\t\t}\r\n\t\tembed.setFooter(history, null);\r\n\t\t\r\n\t\tif (isFirst) {\r\n\t\t\tgameChannel.sendMessage(embed.build()).queueAfter(5000, TimeUnit.MILLISECONDS);\r\n\t\t} else {\r\n\t\t\tgameChannel.editMessageById(infoID, embed.build()).queue();\r\n\t\t\tupdateReactionsInfo(); // To allow for hiding rooms that can't be moved into\r\n\t\t}\r\n\t}", "@Override\n\tpublic void requestHandle(IPlayer player, IMessage message) {\n\t\t\n\t}", "public void updatePlayerPanel()\n {\n playerInfoPanel.updateLabel();\n }", "public HealthUpdateMessage(char playerId, char health)\n\t{\n\t\tsuper(TYPE_HEALTH_UPDATE);\n\t\t\n\t\tthis.playerId = playerId;\n\t\tthis.health = health;\n\t}", "public void onMessage(Message msg) \n {\n try {\n TextMessage update = (TextMessage)msg;\n\n /*\n * SAMPLE UPDATE XML:\n <updates>\n <update>\n <symbol>SUNW</symbol>\n <datetime>2006-09-20T13:59:25.993-04:00</datetime>\n <price>4.9500</price>\n </update>\n </updates>\n */\n\n // To preserve memory when running within a no-heap realtime thread\n // (NHRT) the XML String is walked manually, without the use of\n // a DOM or SAX parser that would otherwise create lots of objects\n //\n String sUpdate = update.getText();\n int start = 0;\n boolean fParse = true;\n while ( fParse )\n {\n int sBegin = sUpdate.indexOf(SYMBOL_TAG, start);\n if ( sBegin < 0 )\n break;\n \n int sEnd = sUpdate.indexOf(SYMBOL_END_TAG, sBegin);\n String symbol = sUpdate.substring(sBegin+(SYMBOL_TAG.length()), sEnd);\n\n int pBegin = sUpdate.indexOf(PRICE_TAG, start);\n int pEnd = sUpdate.indexOf(PRICE_END_TAG, pBegin);\n String price = sUpdate.substring(pBegin+(PRICE_TAG.length()), pEnd);\n start = pEnd;\n \n onUpdate(symbol, price );\n }\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n\t}", "@Override\n\t\t\tpublic void run() \n\t\t\t{\n\t\t\t\tsummaryPanel.updatePlayerStatus(player.getPlayerId());\n\t\t\t}", "private void sendUpdateMessage() {\n Hyperium.INSTANCE.getHandlers().getGeneralChatHandler().sendMessage(\n \"A new version of Particle Addon is out! Get it at https://api.chachy.co.uk/download/ParticleAddon/\" + ChachyMod.INSTANCE.getVersion(() -> \"ParticleAddon\"));\n }", "private void calculatePlayerStats(int pos) {\r\n\r\n initializeStatisticVariables();\r\n StatistisDAO statDAO = new StatistisDAO(Statistics.this);\r\n DAOUtilities daoUtil = new DAOUtilities(Statistics.this);\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n BagDAO bagDAO = new BagDAO(Statistics.this);\r\n\r\n Player player = new Player();\r\n long id = playerDAO.readIDFromName(players.get(pos));\r\n player.setID(id);\r\n\r\n averageScore = daoUtil.getAverageAdjustedScorePlayer(player);\r\n averagePlusMinus = averageScore - 72;\r\n averageFront9Score = daoUtil.getAverageAdjustedFrontNineScorePlayer(player);\r\n averageFront9PlusMinus = averageFront9Score - 36;\r\n averageBack9Score = daoUtil.getAverageAdjustedBackNineScorePlayer(player);\r\n averageBack9PlusMinus = averageBack9Score - 36;\r\n averageHoleScore = averageScore / 18;\r\n averageHolePlusMinus = averageHoleScore - 4;\r\n\r\n\r\n // get the number of each holes\r\n numberOfPar3Holes = statDAO.getNHolesPar(3, player);\r\n numberOfPar4Holes = statDAO.getNHolesPar(4, player);\r\n numberOfPar5Holes = statDAO.getNHolesPar(5, player);\r\n numberOfHoles = numberOfPar3Holes\r\n + numberOfPar4Holes\r\n + numberOfPar5Holes;\r\n\r\n // get the hole stats\r\n float nfairwayholes = numberOfPar4Holes + numberOfPar5Holes;\r\n fairways = nfairwayholes<=0 ? 0 : statDAO.getNFairways(player) / nfairwayholes * 100.;\r\n if (numberOfHoles > 0) {\r\n girs = statDAO.getNGiR(player) / (float) numberOfHoles * 100.;\r\n chips = statDAO.getNumofChips(player) / (float) numberOfHoles;\r\n putts = statDAO.getNumofPutts(player) / (float) numberOfHoles;\r\n penalties = statDAO.getNumofPenalties(player) / (float) numberOfHoles * 18.;\r\n }\r\n\r\n // get the counts for par 3's\r\n if (numberOfPar3Holes > 0) {\r\n par3Girs = statDAO.getNGiR(3, player) / (float)numberOfPar3Holes * 100.;\r\n par3Chips = statDAO.getNumofChips(3, player) / (float) numberOfPar3Holes;\r\n par3Putts = statDAO.getNumofPutts(3, player) / (float) numberOfPar3Holes;\r\n par3Penalties = statDAO.getNumofPenalties(3, player) / (float) numberOfPar3Holes;\r\n }\r\n par3EagleCount = statDAO.getNHolesParScore(3, -2, player);\r\n par3BirdieCount = statDAO.getNHolesParScore(3, -1, player);\r\n par3ParCount = statDAO.getNHolesParScore(3, 0, player);\r\n par3BogeyCount = statDAO.getNHolesParScore(3, 1, player);\r\n par3DoubleBogeyCount = statDAO.getNHolesParScore(3, 2, player);\r\n par3TripleBogeyCount = statDAO.getNHolesParScore(3, 3, player);\r\n par3QuadBogeyPlusCount = statDAO.getNHolesParGreaterThanScore(3, 4, player);\r\n\r\n // get the counts for par 4's\r\n if (numberOfPar4Holes > 0) {\r\n par4Fairways = statDAO.getNFairways(4, player) / (float) numberOfPar4Holes * 100.;\r\n par4Girs = statDAO.getNGiR(4, player) / (float) numberOfPar4Holes * 100.;\r\n par4Chips = statDAO.getNumofChips(4, player) / (float) numberOfPar4Holes;\r\n par4Putts = statDAO.getNumofPutts(4, player) / (float) numberOfPar4Holes;\r\n par4Penalties = statDAO.getNumofPenalties(4, player) / (float) numberOfPar4Holes;\r\n }\r\n par4AlbatrossCount = statDAO.getNHolesParScore(4, -3, player);\r\n par4EagleCount = statDAO.getNHolesParScore(4, -2, player);\r\n par4BirdieCount = statDAO.getNHolesParScore(4, -1, player);\r\n par4ParCount = statDAO.getNHolesParScore(4, 0, player);\r\n par4BogeyCount = statDAO.getNHolesParScore(4, 1, player);\r\n par4DoubleBogeyCount = statDAO.getNHolesParScore(4, 2, player);\r\n par4TripleBogeyCount = statDAO.getNHolesParScore(4, 3, player);\r\n par4QuadBogeyPlusCount = statDAO.getNHolesParGreaterThanScore(4, 4, player);\r\n\r\n // get the counts for the par 5's\r\n if (numberOfPar5Holes > 0) {\r\n par5Fairways = statDAO.getNFairways(5, player) / (float) numberOfPar5Holes * 100.;\r\n par5Girs = statDAO.getNGiR(5, player) / (float) numberOfPar5Holes * 100.;\r\n par5Putts = statDAO.getNumofPutts(5, player) / (float) numberOfPar5Holes;\r\n par5Chips = statDAO.getNumofChips(5, player) / (float) numberOfPar5Holes;\r\n par5Penalties = statDAO.getNumofPenalties(5, player) / (float) numberOfPar5Holes;\r\n }\r\n par5AlbatrossCount = statDAO.getNHolesParScore(5, -3, player);\r\n par5EagleCount = statDAO.getNHolesParScore(5, -2, player);\r\n par5BirdieCount = statDAO.getNHolesParScore(5, -1, player);\r\n par5ParCount = statDAO.getNHolesParScore(5, 0, player);\r\n par5BogeyCount = statDAO.getNHolesParScore(5, 1, player);\r\n par5DoubleBogeyCount = statDAO.getNHolesParScore(5, 2, player);\r\n par5TripleBogeyCount = statDAO.getNHolesParScore(5, 3, player);\r\n par5QuadBogeyPlusCount = statDAO.getNHolesParGreaterThanScore(5, 4, player);\r\n\r\n // sum various scores\r\n albatrossCount = par4AlbatrossCount + par5AlbatrossCount;\r\n eagleCount = par3EagleCount + par4EagleCount + par5EagleCount;\r\n birdieCount = par3BirdieCount + par4BirdieCount + par5BirdieCount;\r\n parCount = par3ParCount + par4ParCount + par5ParCount;\r\n bogeyCount = par3BogeyCount + par4BogeyCount + par5BogeyCount;\r\n doubleBogeyCount = par3DoubleBogeyCount\r\n + par4DoubleBogeyCount\r\n + par5DoubleBogeyCount;\r\n tripleBogeyCount = par3TripleBogeyCount\r\n + par4TripleBogeyCount\r\n + par5TripleBogeyCount;\r\n quadBogeyPlusCount = par3QuadBogeyPlusCount\r\n + par4QuadBogeyPlusCount\r\n + par5QuadBogeyPlusCount;\r\n\r\n\r\n clubs = bagDAO.readClubsInBag(player);\r\n // Remove the putter\r\n int idx = 0;\r\n int pidx = -1;\r\n for (Club club : clubs) {\r\n if (club.getClub().equals(\"Putter\"))\r\n pidx = idx;\r\n idx++;\r\n }\r\n if (pidx >= 0)\r\n clubs.remove(pidx);\r\n // Fill the distances and accuracy\r\n for (Club club : clubs) {\r\n club.setAvgDist(statDAO.getClubAvgDist(player, club));\r\n club.setAccuracy(statDAO.getClubAccuracy(player, club, (float) 10));\r\n }\r\n\r\n\r\n // get the number of rounds played\r\n int courseCount = 0;\r\n\t\t//Calls the method that displays the stats on the screen\r\n\t\tfillInList(courseCount++);\r\n\t}", "@Override\n public void handleMessage(WebSocketSession session, WebSocketMessage<?> message) {\n listener.update(String.valueOf(message.getPayload()));\n }", "private void broadcast(ArrayList<Integer> update){\n for (Player p : players.values()){\n p.sendModel(update);\n }\n }", "public void computeItemStats()\n\t{\n\t\tfor(Entry<String,Item> item: urgotItems.getItems().entrySet())\n\t\t{\n\t\t\t// Add every item stat value.\n\t\t\titem.getValue().addItemStats(urgot);\n\t\t}\n\t\t\n\t\tfor(Entry<String,Item> item: urgotItems.getItems().entrySet())\n\t\t{\n\t\t\t// Add passives after all stats have been added.\n\t\t\titem.getValue().applyPassive(urgot);\n\t\t}\n\t}", "@Override\n\tpublic void onSetMessageAttributes(EMMessage message) {\n\n\t}", "@Override\n\tpublic void update() {\n\n\t\ttimer++;\n\t\tupdatePlayer();\n\t\tupdateScreen();\n\t\tupdateLives();\n\n\t}", "@Override\n public void update() {\n updateHealth();\n updateActiveWeapon();\n updateAmmunition();\n updateWaveCounter();\n updateReloading();\n }", "private void setPlayerInformations() {\n\t\t\t\n\t\t\t\n\t\t}", "void doUpdate() {\n\t\tdrawPlayer(backBufferContext, context);\n\t\tcheckForInteractions();\n\t}", "private void updatePlayersWorth(){\n for (Player e : playerList) {\n e.setPlayerWorth(getTotalShareValue(e) + e.getFunds());\n }\n }", "public void addNewPlayerStatsToStats(String username) throws IOException{\r\n\t\tScanner statsReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tint numberOfPlayers = statsReader.nextInt();\r\n\t\tPlayerStats[] statsDirectory = new PlayerStats[numberOfPlayers];\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tPlayerStats tempPlayerStats = new PlayerStats();\r\n\t\t\t/* load temporary stats object with stats */\r\n\t\t\treadPlayerStats(tempPlayerStats, statsReader);\r\n\t\t\t/* add new stats object to directory */\r\n\t\t\tstatsDirectory[count] = tempPlayerStats;\r\n\t\t}\r\n\t\t\r\n\t\tstatsReader.close();\r\n\t\t/* rewrite the statistics file with user stats reset */\r\n\t\tFileWriter writer = new FileWriter(\"statistics.txt\");\r\n\t\tBufferedWriter statsWriter = new BufferedWriter(writer);\r\n\t\tnumberOfPlayers++;\r\n\t\tInteger numPlayers = numberOfPlayers;\r\n\t\tstatsWriter.write(numPlayers.toString()); // write the number of players\r\n\t\tstatsWriter.write(\"\\n\");\r\n\t\tfor(int count = 0; count < numberOfPlayers - 1; count++) { // - 1 because numberOfPlayers was incremented\r\n\t\t\tstatsWriter.write(statsDirectory[count].playerStatsToString()); // write player to statistics.txt\r\n\t\t}\r\n\t\t/* add new entry with 0s at end */\r\n\t\t\tInteger zero = 0;\r\n\t\t\tstatsWriter.write(username);\r\n\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(int count = 0; count < 5; count++) {\r\n\t\t\t\tstatsWriter.write(zero.toString());\r\n\t\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\tstatsWriter.close();\r\n\t}", "public abstract double sentimentScore(Message message);", "void update(Member member);", "void sendUpdatePlayer(int x, int y, int color, byte tool);", "private void updateBonusStats(double percentage) {\n baseStats.setHealth((int) (baseStats.getHealth() * percentage));\n baseStats.setStrength((int) (baseStats.getStrength() * percentage));\n baseStats.setDexterity((int) (baseStats.getDexterity() * percentage));\n baseStats.setIntelligence((int) (baseStats.getIntelligence() * percentage));\n }", "public void processMessage(String s, Player plr){\r\n\t\t\t\t\r\n\t\tPattern p = Pattern.compile(\"#\");\r\n\t String[] items = p.split(s);\t\r\n\t \r\n \tString cmd = items[0]; \t\r\n \r\n \tif(cmd.equals(\"NAME\")){\r\n \t\tsetPlayerName(items, plr);\r\n \t}else if(cmd.equals(\"CRGM\")){\r\n \t\tcreateGame(items);\r\n \t}else if(cmd.equals(\"JOGM\")){\r\n \t\tjoinGame(items, plr);\r\n \t}else if(cmd.equals(\"DISCONNECT\")){\r\n \t\tremovePlayer(plr);\r\n \t}else\r\n \t\treturn;\r\n }", "public HealthUpdateMessage(byte[] message, InetSocketAddress source) throws Exception\n\t{\n\t\tsuper(message, source);\n\t\t\n if (message[1] != TYPE_PLAYER_DEATH)\n throw new InvalidParameterException(String.format(\"The byte array passed to the HealthUpdateMessage class is NOT a health update message. Message code is 0x%02x.\", message[1]));\n \n // Skip the header\n ByteArrayInputStream in = new ByteArrayInputStream(message, MESSAGE_HEADER_SIZE, message.length-MESSAGE_HEADER_SIZE);\n // Player id\n playerId = ByteStreamUtils.readChar(in);\n // Health\n health = ByteStreamUtils.readChar(in);\n\t}", "@Override\n\t\tpublic void onMessage(String msg) {\n\t\t\tif(msg.equals(\"update\")) {\n\t\t\t\tAuctionList al = new AuctionList();\n\t\t\t\tal.refreshAuction();\n\t\t\t}\n\t\t\tfor (ChatWebSocket member : webSockets) {\n\t\t try {\n\t\t member.connection.sendMessage(msg);\n\t\t \n\t\t } catch(IOException e) {\n\t\t \te.printStackTrace();\n\t\t }\n\t\t }\n\t\t}", "public void setPlayerAttributes(String title, Player p) {\t\n\t\tname_Class.setText(title);\n\t\tcurrentHp.setText(p.getHP()+\"/\"+p.getMaxHP());\n\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\tString outDMG = Integer.toString(p.getDMG());\n\t\tgdmg.setText(outDMG);\n\t\tString outEV = Integer.toString(p.getEV());\n\t\tgev.setText(outEV);\n\t\tthis.p=p.copy();\n\t}", "public void resetPlayerStatsInStats(String username) throws IOException{\r\n\t\tScanner statsReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tint numberOfPlayers;\r\n\t\tboolean found = false; // used to determine if username is in statistics.txt\r\n\t\tnumberOfPlayers = statsReader.nextInt();\r\n\t\tPlayerStats[] statsDirectory = new PlayerStats[numberOfPlayers];\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tPlayerStats tempPlayerStats = new PlayerStats();\r\n\t\t\t/* load temporary stats object with stats */\r\n\t\t\treadPlayerStats(tempPlayerStats, statsReader);\r\n\t\t\t/* add new stats object to directory */\r\n\t\t\tstatsDirectory[count] = tempPlayerStats;\r\n\t\t}\r\n\t\t\r\n\t\tstatsReader.close();\r\n\t\t\r\n\t\t/* update the stats of the two players */\r\n\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\tif((statsDirectory[index].username).equals(username) == true) { // modify first player stats\r\n\t\t\t\tresetPlayerStats(statsDirectory[index]);\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(found) {\r\n\t\t\t/* rewrite the statistics file with user stats reset */\r\n\t\t\tFileWriter writer = new FileWriter(\"statistics.txt\");\r\n\t\t\tBufferedWriter statsWriter = new BufferedWriter(writer);\r\n\t\t\tInteger numPlayers = numberOfPlayers;\r\n\t\t\tstatsWriter.write(numPlayers.toString()); // write the number of players\r\n\t\t\tstatsWriter.write(\"\\n\");\r\n\t\t\t\r\n\t\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\t\tstatsWriter.write(statsDirectory[count].playerStatsToString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tstatsWriter.close();\r\n\t\t}\r\n\t\t// else if username was not found in statistics.txt, do not make changes\r\n\t}", "public void updatePlayerPoints() {\n setText(Integer.toString(owner.getPlayerPoints()) + \" points\");\n }", "public void processMessage(DeviceMateMessage m);", "@Override\r\n public void processMessage(INTENT intent, Object... parameters) {\n if(parameters[0] instanceof UUID){\r\n Entity e = EntityManager.getInstance().getEntity((UUID)parameters[0]);\r\n if(e.has(TeamComponent.class)){\r\n teamCaptures[e.get(TeamComponent.class).getTeamNumber() - 1]++;\r\n System.out.println(e.getName() + \" captured the flag for TEAM \" + e.get(TeamComponent.class).getTeamNumber() +\r\n \"\\r\\n\" + \"The score is \" + Arrays.toString(teamCaptures));\r\n if(numCaps == teamCaptures[e.get(TeamComponent.class).getTeamNumber() -1]){\r\n System.out.println(\"******************** WINNER WINNER CHICKEN DINNER ********************\");\r\n MessageManager.getInstance().addMessage(INTENT.WIN_COND_MET);\r\n }\r\n }else{\r\n //requires team component\r\n return;\r\n }\r\n }\r\n }", "public void onMessage(Message message) {\n gameManager.onMessage(message);\n }", "private void settingsChanged(String message)\n\t{\n\t\tif ( game.getGameState() == GameState.LOBBY )\n\t\t\tgame.broadcastMessage(game.hostPlayer + message);\n\t}", "public void modifyStats(Stats s) {\n\r\n\t}", "public void updateTwoPlayersStatsInStats(PlayerStats stats1, PlayerStats stats2) throws IOException {\r\n\t\tScanner statsReader = new Scanner(new BufferedReader(new FileReader(\"statistics.txt\")));\r\n\t\tint numberOfPlayers;\r\n\t\tnumberOfPlayers = statsReader.nextInt();\r\n\t\tPlayerStats[] statsDirectory = new PlayerStats[numberOfPlayers];\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tPlayerStats tempPlayerStats = new PlayerStats();\r\n\t\t\t/* load temporary stats object with stats */\r\n\t\t\treadPlayerStats(tempPlayerStats, statsReader);\r\n\t\t\t/* add new stats object to directory */\r\n\t\t\tstatsDirectory[count] = tempPlayerStats;\r\n\t\t}\r\n\t\t\r\n\t\tstatsReader.close();\r\n\t\t\r\n\t\t/* update the stats of the two players */\r\n\t\tfor(int index = 0; index < numberOfPlayers; index++) {\r\n\t\t\tif((statsDirectory[index].username).equals(stats1.username) == true) { // modify first player stats\r\n\t\t\t\tsetPlayerStats(statsDirectory[index], stats1);\r\n\t\t\t}\r\n\t\t\telse if((statsDirectory[index].username).equals(stats2.username) == true) { // modify second player stats\r\n\t\t\t\tsetPlayerStats(statsDirectory[index], stats2);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/* rewrite the statistics file with updated user stats */\r\n\t\tFileWriter writer = new FileWriter(\"statistics.txt\");\r\n\t\tBufferedWriter statsWriter = new BufferedWriter(writer);\r\n\t\tInteger numPlayers = numberOfPlayers;\r\n\t\tstatsWriter.write(numPlayers.toString()); // write the number of players\r\n\t\tstatsWriter.write(\"\\n\");\r\n\t\t\r\n\t\tfor(int count = 0; count < numberOfPlayers; count++) {\r\n\t\t\tstatsWriter.write(statsDirectory[count].playerStatsToString()); // write player to statistics.txt\r\n\t\t}\r\n\t\t\r\n\t\tstatsWriter.close();\r\n\t}", "public void upgradeStats()\n {\n reload-=1;\n damage*=2;\n range+=50;\n }", "private void updatePlayerList() \n\t{\n\t\tplayerStatus.clear();\n\n\t\tfor(Player thisPlayer: players) // Add the status of each player to the default list model.\n\t\t{\n\t\t\tplayerStatus.addElement(thisPlayer.toString());\n\t\t}\n\n\t}", "public void updateFields(MessageUpdate msg) {\n System.out.println(\"Updating board.\");\n\n if (msg.getOrigin().i != msg.getDestination().i || msg.getOrigin().j != msg.getDestination().j) {\n Color color = gameService.getPieceColor(msg.getOrigin().i, msg.getOrigin().j);\n\n gameService.setPieceColor(msg.getDestination().i, msg.getDestination().j, color);\n gameService.setPieceColor(msg.getOrigin().i, msg.getOrigin().j, null);\n\n gameService.repaintPanel();\n System.out.println(\"Board repainted.\");\n }\n\n checkIfMyTurn(msg.isCurrPlayer());\n }", "public void updateMessage(Message message){\n Tag Tag = null;\n db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(databaseValues.STORY_COLUMN_NAME2, message.getMessage());\n values.put(databaseValues.STORY_COLUMN_NAME3, message.getMessageType());\n values.put(databaseValues.STORY_COLUMN_NAME4, message.getPicture());\n db.update(databaseValues.TABLE_NAME3,values,\"Username=?\",new String[]{message.username});\n }", "public void updateReactionsInfo() {\r\n\t\t((TextChannel) gameChannel).clearReactionsById(infoID).queue();\r\n\t\t\r\n\t\t// Grab\r\n\t\tString item = mapContents[currentPlayer.getCurrentRoom()];\r\n\t\tif (item != null) {\r\n\t\t\tif (item.startsWith(\"Artifact\") && currentPlayer.count(\"Artifact\") <= currentPlayer.count(\"Backpack\")) {\r\n\t\t\t\tgameChannel.addReactionById(infoID, GlobalVars.emojis.get(\"scroll\")).queue();\r\n\r\n\t\t\t} else if (item.startsWith(\"MonkeyIdol\") && !currentPlayer.getAlreadyPickedUpMonkeyIdol()) {\r\n\t\t\t\tgameChannel.addReactionById(infoID, GlobalVars.emojis.get(\"monkey_face\")).queue();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Movement\r\n\t\tint totalRooms = GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()].length;\r\n\t\tif (currentPlayer.getTeleports() > 0 ) {\r\n\t\t\tgameChannel.addReactionById(infoID, GlobalVars.emojis.get(\"crystal_ball\")).queue();\r\n\t\t\tif (hasLinkedCommand() && linkedCommand.equals(\"tp \")) {\r\n\t\t\t\ttotalRooms += GlobalVars.teleportRoomsPerRoom[currentPlayer.getCurrentRoom()].length;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgameChannel.addReactionById(infoID, GlobalVars.emojis.get(\"link\"));\r\n\t\tfor (int i = 0; i < totalRooms; i++) {\r\n\t\t\t// Later, don't show rooms that can't be moved to\r\n\t\t\tgameChannel.addReactionById(infoID, Utils.numToLetterEmojis[i]).queue();\r\n\t\t}\r\n\t\t\r\n//\t\tif (currentPlayer.getSwords() > 0 && ???) {\r\n//\t\t\tint effect = GlobalVars.effectsPerPath[oldRoom][room];\r\n//\t\t\tif (GlobalVars.effectsPerPath[room][oldRoom] > 0) {\r\n//\t\t\t\teffect = GlobalVars.effectsPerPath[room][oldRoom];\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t}\r\n\t}", "public void updateScore() {\n\n Main.rw.readFile();\n setScore(Main.rw.getStackInfo());\n\n\n }", "@Override\n public void update() {\n if (Screen.checkState(GameState.RUNNING)) {\n healthToDraw = getPlayer().getHealth();\n maxHealthToDraw = getPlayer().getMaxHealth();\n minesToDraw = getPlayer().getCurrentMines();\n maxMinesToDraw = getPlayer().getMaxMines();\n currentLevelToDraw = Screen.getRoomHandler().getCurrentLevel();\n defenseToDraw = getPlayer().getDefense();\n speedToDraw = getPlayer().getSpeed();\n rangeToDraw = getPlayer().getSmallPlayerRange();\n damageToDraw = getPlayer().getPlayerDamage();\n playerRings = getPlayer().getRings();\n skillsToDraw = new Skill[4];\n for (int i = 0; i < getPlayer().getSkills().size(); i++) {\n if ( i < 4) {\n skillsToDraw[i] = getPlayer().getSkills().get(i);\n }\n }\n }\n }", "public synchronized void update() {\n localMemberHealth.setHeartbeat(localMemberHealth.getHeartbeat() + 1);\n long currentTime = System.currentTimeMillis();\n List<MemberHealth> removals = new ArrayList<>();\n for (MemberHealth memberHealth : memberHealths) {\n if (currentTime - memberHealth.getLastSeen() > 5500) {\n removals.add(memberHealth);\n } else if (currentTime - memberHealth.getLastSeen() > 2750) {\n if (!memberHealth.hasFailed() && !memberHealth.hasLeft()) {\n memberHealth.setHasFailed(true);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has failed\");\n }\n } else {\n if (memberHealth.hasFailed()) {\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has rejoined\");\n }\n memberHealth.setHasFailed(false);\n }\n }\n for (MemberHealth memberHealth : removals) {\n memberHealths.remove(memberHealth);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has been removed\");\n }\n }", "@Override\n public void run() {\n for(MessageManager temp : plugin.playerBossBars.values()){\n if(temp.bossBar.getPlayers().size() > 0){\n temp.advanceBar();\n\n BossBarMessage currentMessage = temp.getCurrentMessageObject();\n temp.bossBar.setTitle(currentMessage.barMessage);\n temp.bossBar.setColor(currentMessage.barColor);\n temp.bossBar.setStyle(currentMessage.barStyle);\n }\n }\n }", "private static void initStatistics(Player p){\n }", "public void printPlayerStat(Player player);", "public void update() {\n\t\tImage background_buffer = createImage(stats.getWidth(),\n\t\t\t\tstats.getHeight());\n\t\tGraphics background_buffer_graphics = background_buffer.getGraphics();\n\t\t// updates the stats on screen\n\t\tbackground_buffer_graphics.drawString(\n\t\t\t\t\"Current Move: \" + (model.isWhiteToPlay() ? \"White\" : \"Black\"),\n\t\t\t\t5, 20);\n\t\tbackground_buffer_graphics.drawString(\"White Points: \"\n\t\t\t\t+ (((Game) model).getBoard().getWhiteScore()), 20, 125);\n\t\tbackground_buffer_graphics.drawString(\"Black Points: \"\n\t\t\t\t+ (((Game) model).getBoard().getBlackScore()), 20, 145);\n\n\t\tImage wc = null;\n\t\tImage bc = null;\n\t\t//\n\t\ttry {\n\t\t\twc = ImageIO.read(new File((\"images/white_piece.png\")));\n\t\t\tbc = ImageIO.read(new File((\"images/black_piece.png\")));\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (model.isWhiteToPlay()) {\n\t\t\tbackground_buffer_graphics.drawImage(wc, 25, 30, null, null);\n\n\t\t} else {\n\t\t\tbackground_buffer_graphics.drawImage(bc, 25, 30, null, null);\n\n\t\t}\n\n\t\tstats.getGraphics().drawImage(background_buffer, 0, 0, null);\n\n\t}", "@Override\n public void update() {\n updateBuffs();\n }" ]
[ "0.71247184", "0.62506074", "0.61119837", "0.60652083", "0.5967826", "0.59249306", "0.59007263", "0.58830905", "0.58470625", "0.57969904", "0.57377625", "0.5681893", "0.5663838", "0.5645453", "0.5624583", "0.56079876", "0.5599012", "0.5593807", "0.55520535", "0.5533755", "0.5522321", "0.5518858", "0.5505127", "0.5491202", "0.5488019", "0.5485526", "0.5465981", "0.5459304", "0.5451959", "0.54438394", "0.54326785", "0.5418793", "0.54172677", "0.54081476", "0.5404829", "0.540476", "0.5401045", "0.53885096", "0.53849906", "0.5372865", "0.5344446", "0.53382343", "0.5335317", "0.533183", "0.5323062", "0.53042907", "0.5304036", "0.52914244", "0.52900606", "0.5282641", "0.527347", "0.52704626", "0.52571225", "0.5249465", "0.523521", "0.52281547", "0.5200078", "0.5198488", "0.5191099", "0.518334", "0.5174002", "0.51705134", "0.51676404", "0.51574045", "0.5134035", "0.51339513", "0.51322293", "0.5129708", "0.5129437", "0.51235896", "0.51208144", "0.51186824", "0.5115679", "0.5113015", "0.51123106", "0.51085", "0.5105746", "0.5103557", "0.5102316", "0.5101165", "0.50970376", "0.5095503", "0.50910026", "0.50894326", "0.5087466", "0.5086601", "0.50819474", "0.50807315", "0.5074782", "0.5073347", "0.5072677", "0.5067704", "0.5064113", "0.5059405", "0.5053972", "0.505327", "0.5044416", "0.50442266", "0.50379837", "0.50340104" ]
0.7104052
1
Setea todos los valores excepto putoA y puntoB
public void setValues(RutaParams params){ this.costo = params.costo; this.tiempoVuelo = params.tiempoVuelo; this.piloto =encriptar(params.piloto); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPuntoDeVenta(PuntoDeVenta puntoDeVenta)\r\n/* 145: */ {\r\n/* 146:166 */ this.puntoDeVenta = puntoDeVenta;\r\n/* 147: */ }", "void setPosiblesValores(int[] valores);", "private void setValoresDoAluno(String[] nomes, int[]notas, int[]conceitos)\n\t{\n\t\tif( nomes.length > 0 && notas.length > 0)\n\t\t{\n\t\t\tfor(int a=0; a < nomes.length || a < numMaxDeAluno; a++)\n\t\t\t{\n\t\t\t\tgradeNomes[a] = nomes[a];\n\t\t\t\tgradeNotas[a] = notas[a];\n\t\t\t\tgradeConceitos[a] = conceitos[a];\n\t\t\t}\n\t\t}\n\t}", "public void setPuntoInteres(final PuntoInteres puntoInteres) {\n\t\tthis.puntoInteres = puntoInteres;\n\t}", "public void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }", "static void setTxp(int i, int j){txp1=i;txp2=j;}", "public void setPapeles(int avenida, int calle, int cant);", "public void setBunga(int tipeBunga){\n }", "public static boolean vaihdaTaulukot(int[] taulu1, int[] taulu2) {\n int valitaulu[] = new int[taulu1.length];\n \n if (taulu1.length == taulu2.length) {\t/*\n for (int i=0; i< taulu1.length; i++) {\n valitaulu[i] = taulu1[i];\n }\n taulu1 = taulu2;*/\n\n System.arraycopy(taulu1, 0, valitaulu, 0, taulu1.length);\n //System.out.println(\"Valitaulu : (pitäisi alkaa 1:llä) \" + tauluMerkkijonoksi(valitaulu));\n System.arraycopy(taulu2, 0, taulu1, 0, taulu1.length);\n //System.out.println(\"Taulu1 : (pitäisi alkaa 10:llä) \" + tauluMerkkijonoksi(taulu1));\n System.arraycopy(valitaulu, 0, taulu2, 0, taulu1.length);\n \n //System.out.println(\"Taulu2 : (pitäisi alkaa 1:llä) \" + tauluMerkkijonoksi(taulu2));\n \n //taulu2 = valitaulu;\n }\n return true;\n }", "private void limpiarValores(){\n\t\tpcodcia = \"\";\n\t\tcedula = \"\";\n\t\tcoduser = \"\";\n\t\tcluser = \"\";\n\t\tmail = \"\";\n\t\taudit = \"\";\n\t\tnbr = \"\";\n\t\trol = \"\";\n\t}", "private void limpiarCampos() {\n\t\tthis.campoClave.setText(\"\");\n\t\tthis.campoClaveNueva.setText(\"\");\n\t\tthis.campoClaveRepita.setText(\"\");\n\t}", "public void darCoordenadasIniciales() \r\n\t{\t\r\n\t\tint coordenadasX = 0;\r\n\t\tint coordenadasY = 1;\r\n\t\tint orientacion = 2;\r\n\t\t\r\n\t\tfor (int x = 0; x<palabras.size();x++) \r\n\t\t{\r\n\t\t\tpalabras.get(x).get(0).setX(Integer.parseInt(manejadorArchivos.getPalabras().get(coordenadasX)));\r\n\t\t\tpalabras.get(x).get(0).setY(Integer.parseInt(manejadorArchivos.getPalabras().get(coordenadasY)));\r\n\t\t\tpalabras.get(x).get(0).setOrientacion(manejadorArchivos.getPalabras().get(orientacion));\r\n\t\t\t\r\n\t\t\t coordenadasX = coordenadasX +4;\r\n\t\t\t coordenadasY = coordenadasY + 4;\r\n\t\t\t orientacion = orientacion + 4;\r\n\t\t}\r\n\t}", "private void limparCampos() {\n\t\ttxtCidade.setText(\"\");\n\t\tlblId.setText(\"0\");\n\t\tcboEstado.getSelectionModel().select(0);\n\t}", "public void limpacampos() {\n textFieldMarca.setText(null);\n textFieldModelo.setText(null);\n jtcor.setText(null);\n jfano.setText(null);\n comboBoxCombustivel.setSelectedIndex(-1);\n textFormattedValor.setText(null);\n comboBoxPortas.setSelectedIndex(-1);\n textFieldChassi.setText(null);\n jfplaca.setText(null);\n textFormattedPlaca.setText(null);\n textFieldTipo.setSelectedIndex(-1);\n textFieldStatus.setText(\"Disponível\");\n }", "public void setPuntos(int puntaje) {\n this.puntos = puntaje;\n }", "public void tukarData() {\n this.temp = this.data1;\n this.data1 = this.data2;\n this.data2 = this.temp;\n }", "private void setPrecioVentaBaterias() throws Exception {\n\t\tRegisterDomain rr = RegisterDomain.getInstance();\n\t\tlong idListaPrecio = this.selectedDetalle.getListaPrecio().getId();\n\t\tString codArticulo = this.selectedDetalle.getArticulo().getCodigoInterno();\t\t\n\t\tArticuloListaPrecioDetalle lista = rr.getListaPrecioDetalle(idListaPrecio, codArticulo);\n\t\tString formula = this.selectedDetalle.getListaPrecio().getFormula();\n\t\tif (lista != null && formula == null) {\n\t\t\tthis.selectedDetalle.setPrecioGs(this.selectedCondicion.isCondicionContado()? lista.getPrecioGs_contado() : lista.getPrecioGs_credito());\n\t\t} else {\n\t\t\tdouble costo = this.selectedDetalle.getArticulo().getCostoGs();\n\t\t\tint margen = this.selectedDetalle.getListaPrecio().getMargen();\n\t\t\tdouble precio = ControlArticuloCosto.getPrecioVenta(costo, margen);\n\t\t\t\n\t\t\t// formula lista precio mayorista..\n\t\t\tif (idListaPrecio == 2 && formula != null) {\n\t\t\t\tArticuloListaPrecio distribuidor = (ArticuloListaPrecio) rr.getObject(ArticuloListaPrecio.class.getName(), 1);\n\t\t\t\tArticuloListaPrecioDetalle precioDet = rr.getListaPrecioDetalle(distribuidor.getId(), codArticulo);\n\t\t\t\tif (precioDet != null) {\n\t\t\t\t\tdouble cont = precioDet.getPrecioGs_contado();\n\t\t\t\t\tdouble cred = precioDet.getPrecioGs_credito();\n\t\t\t\t\tdouble formulaCont = cont + Utiles.obtenerValorDelPorcentaje(precioDet.getPrecioGs_contado(), 10);\n\t\t\t\t\tdouble formulaCred = cred + Utiles.obtenerValorDelPorcentaje(precioDet.getPrecioGs_credito(), 10);\n\t\t\t\t\tthis.selectedDetalle.setPrecioGs(this.selectedCondicion.isCondicionContado()? formulaCont : formulaCred);\n\t\t\t\t} else {\n\t\t\t\t\tmargen = distribuidor.getMargen();\n\t\t\t\t\tdouble precioGs = ControlArticuloCosto.getPrecioVenta(costo, margen);\n\t\t\t\t\tdouble formula_ = precioGs + Utiles.obtenerValorDelPorcentaje(precioGs, 10);\n\t\t\t\t\tthis.selectedDetalle.setPrecioGs(formula_);\n\t\t\t\t}\n\n\t\t\t// formula lista precio minorista..\n\t\t\t} else if (idListaPrecio == 3 && formula != null) {\n\t\t\t\tArticuloListaPrecio distribuidor = (ArticuloListaPrecio) rr.getObject(ArticuloListaPrecio.class.getName(), 1);\n\t\t\t\tArticuloListaPrecioDetalle precioDet = rr.getListaPrecioDetalle(distribuidor.getId(), codArticulo);\n\t\t\t\tif (precioDet != null) {\n\t\t\t\t\tdouble cont = precioDet.getPrecioGs_contado() + Utiles.obtenerValorDelPorcentaje(precioDet.getPrecioGs_contado(), 10);\n\t\t\t\t\tdouble cred = precioDet.getPrecioGs_credito() + Utiles.obtenerValorDelPorcentaje(precioDet.getPrecioGs_credito(), 10);\n\t\t\t\t\tdouble formulaCont = (cont * 1.15) / 0.8;\n\t\t\t\t\tdouble formulaCred = (cred * 1.15) / 0.8;\n\t\t\t\t\tthis.selectedDetalle.setPrecioGs(this.selectedCondicion.isCondicionContado()? formulaCont : formulaCred);\n\t\t\t\t} else {\n\t\t\t\t\tmargen = distribuidor.getMargen();\n\t\t\t\t\tdouble precioGs = ControlArticuloCosto.getPrecioVenta(costo, margen);\n\t\t\t\t\tdouble formula_ = ((precioGs + Utiles.obtenerValorDelPorcentaje(precioGs, 10)) * 1.15) / 0.8;\n\t\t\t\t\tthis.selectedDetalle.setPrecioGs(formula_);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tthis.selectedDetalle.setPrecioGs(precio);\n\t\t\t}\t\t\n\t\t}\n\t}", "public void setPuntoEmision(String puntoEmision)\r\n/* 129: */ {\r\n/* 130:217 */ this.puntoEmision = puntoEmision;\r\n/* 131: */ }", "public void setPuertas(int puerta) {\n\t\t\r\n\t}", "public void hallarPerimetroEscaleno() {\r\n this.perimetro = this.ladoA+this.ladoB+this.ladoC;\r\n }", "private void inicializaValores(){\n /**\n * Reinicia los valores de las variables.\n */\n ce.setVariables();\n valorA.setText(null);\n valorB.setText(null);\n valorC.setText(null);\n x1.setText(null);\n x2.setText(null);\n \n }", "public void limpiarPuntos() {\n \tpuntos.clear();\n }", "public void distribuirAportes1(){\n\n if(null == comprobanteSeleccionado.getAporteuniversidad()){\n System.out.println(\"comprobanteSeleccionado.getAporteuniversidad() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getAporteorganismo()){\n System.out.println(\"comprobanteSeleccionado.getAporteorganismo() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getMontoaprobado()){\n System.out.println(\"comprobanteSeleccionado.getMontoaprobado() >> NULO\");\n }\n\n try{\n if(comprobanteSeleccionado.getAporteuniversidad().floatValue() > 0f){\n comprobanteSeleccionado.setAporteorganismo(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad()));\n comprobanteSeleccionado.setAportecomitente(BigDecimal.ZERO);\n }\n } catch(NullPointerException npe){\n System.out.println(\"Error de NullPointerException\");\n npe.printStackTrace();\n }\n\n }", "public void distribuirAportes2(){\n\n if(comprobanteSeleccionado.getAporteorganismo().floatValue() > 0f){\n comprobanteSeleccionado.setAportecomitente(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo())));\n }\n }", "private void limpaCampos() {\r\n\t\tnome.setText(\"\");\r\n\t\tsituacao.setSelectedIndex(0);\r\n\t\tidade.setText(\"\");\r\n\t\terroNome.setText(\"\");\r\n\t\terroIdade.setText(\"\");\r\n\t}", "private void deshabilitarCamposCrear() {\n txtCodBockFoto.setEnabled(false);\n txtCodBockFoto.setText(\"\");\n\n txtCodPromotor.setEnabled(false);\n txtCodPromotor.setText(\"\");\n txtDNIPromotor.setText(\"\");\n\n //limpiarListaCrear();\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 static void setUserHintValues()\n {\n int hintValueNum=1; //Número de casillas que son reveladas al inicio de la partida.\n \n switch(GameManager.getGameLevel())\n {\n case 1: hintValueNum = 9;\n break;\n case 2: hintValueNum = 6;\n break;\n case 3: hintValueNum = 3;\n break;\n }\n \n int row; //Número de fila.\n int col; //Número de columna.\n boolean isSet; //Define si el valor de la casilla ya ha sido inicializado anteriormente.\n \n for (int i = 0; i < hintValueNum; i++)\n {\n isSet=false;\n do{\n row = (int) (Math.random() * 4);\n col = (int) (Math.random() * 4);\n \n if (playerBoardPos[row][col]==0)\n {\n //Inicializa algunas posiciones aleatorias para las pistas iniciales del tablero del jugador.\n playerBoardPos[row][col] = boardPos[row][col]; \n isDefaultPos[row][col]=true;\n isSet=true;\n }\n }while (isSet==false);\n }\n }", "public Rettangolo(Punto p1, Punto p2) {\r\n // pre: p1!=null && p2!=null\r\n this.vbs = p1;\r\n this.vad = p2;\r\n }", "private void kasvata() {\n T[] uusi = (T[]) new Object[this.arvot.length * 3 / 2 + 1];\n for (int i = 0; i < this.arvot.length; i++) {\n uusi[i] = this.arvot[i];\n }\n this.arvot = uusi;\n }", "public void mutacioni(Individe individi, double probabiliteti) {\n int gjasaPerNdryshim = (int) ((1 / probabiliteti) * Math.random());\r\n if (gjasaPerNdryshim == 1) {\r\n int selectVetura1 = (int) (Math.random() * individi.pikatEVeturave.length);//selekton veturen e pare\r\n int selectPikenKamioni1 = (int) (Math.random() * individi.pikatEVeturave[selectVetura1].size());//selekton piken e vetures tpare\r\n if (pikatEVeturave[selectVetura1].size() == 0) {\r\n return;\r\n }\r\n Point pika1 = individi.pikatEVeturave[selectVetura1].get(selectPikenKamioni1);//pika 1\r\n\r\n int selectVetura2 = (int) (Math.random() * individi.pikatEVeturave.length);//selekton veturen e dyte\r\n int selectPikenKamioni2 = (int) (Math.random() * individi.pikatEVeturave[selectVetura2].size());//selekton piken e vetures tdyte\r\n if (pikatEVeturave[selectVetura2].size() == 0) {\r\n return;\r\n }\r\n Point pika2 = individi.pikatEVeturave[selectVetura2].get(selectPikenKamioni2);//pika 2\r\n\r\n individi.pikatEVeturave[selectVetura2].set(selectPikenKamioni2, pika1);//i ndrron vendet ketyre dy pikave\r\n individi.pikatEVeturave[selectVetura1].set(selectPikenKamioni1, pika2);\r\n }\r\n\r\n }", "private void LimpiarCampos(){\n \n txtClave.setText(null);\n txtNombre.setText(null);\n txtPaterno.setText(null);\n txtMaterno.setText(null);\n txtTelefono.setText(null);\n txtCorreo.setText(null);\n cbxGenero.setSelectedIndex(0);\n cbxRol.setSelectedIndex(0);\n }", "protected void setP1P2(byte[] p1p2) {\n\tsetP1(p1p2[0]);\n\tsetP2(p1p2[1]);\n }", "private void preencherCampos(){\n if (!TextUtils.isEmpty(usuario.getPhotoUrl())){\n Picasso.with(EditarUsuarioPerfilActivity.this).load(usuario.getPhotoUrl()).transform(new CircleTransform()).into(imgPerfilUser);\n }else{\n Picasso.with(EditarUsuarioPerfilActivity.this).load(R.drawable.ic_empresa_new).transform(new CircleTransform()).into(imgPerfilUser);\n }\n\n\n editNome.setText(usuario.getNome());\n editEmail.setText(usuario.getEmail());\n editrelefoneCel.setText(usuario.getTelefoneCel());\n editTelefoneResidencial.setText(usuario.getTelefoneResidencial());\n textUserEditHabilidades.setText(textUserEditHabilidades.getText().toString());\n editCEP.setText(usuario.getCEP());\n editPais.setText(usuario.getPais());\n editEstado.setText(usuario.getEstado());\n editCidade.setText(usuario.getCidade());\n editBairro.setText(usuario.getBairro());\n editRua.setText(usuario.getRua());\n editNumero.setText(usuario.getNumero());\n editComplemento.setText(usuario.getComplemento());\n }", "public void setar_campos()\n {\n int setar = tblCliNome.getSelectedRow();\n txtCliId.setText(tblCliNome.getModel().getValueAt(setar, 0).toString());\n txtCliNome.setText(tblCliNome.getModel().getValueAt(setar, 1).toString());\n txtCliRua.setText(tblCliNome.getModel().getValueAt(setar, 2).toString());\n txtCliNumero.setText(tblCliNome.getModel().getValueAt(setar, 3).toString());\n txtCliComplemento.setText(tblCliNome.getModel().getValueAt(setar, 4).toString());\n txtCliBairro.setText(tblCliNome.getModel().getValueAt(setar, 5).toString());\n txtCliCidade.setText(tblCliNome.getModel().getValueAt(setar, 6).toString());\n txtCliUf.setText(tblCliNome.getModel().getValueAt(setar, 7).toString());\n txtCliFixo.setText(tblCliNome.getModel().getValueAt(setar, 8).toString());\n txtCliCel.setText(tblCliNome.getModel().getValueAt(setar, 9).toString());\n txtCliMail.setText(tblCliNome.getModel().getValueAt(setar, 10).toString());\n txtCliCep.setText(tblCliNome.getModel().getValueAt(setar, 11).toString());\n \n // A LINHA ABAIXO DESABILITA O BOTÃO ADICIONAR PARA QUE O CADASTRO NÃO SEJA DUPLICADO\n btnAdicionar.setEnabled(true);\n \n }", "private void actualizaPuntuacion() {\n if(cambiosFondo <= 10){\n puntos+= 1*0.03f;\n }\n if(cambiosFondo > 10 && cambiosFondo <= 20){\n puntos+= 1*0.04f;\n }\n if(cambiosFondo > 20 && cambiosFondo <= 30){\n puntos+= 1*0.05f;\n }\n if(cambiosFondo > 30 && cambiosFondo <= 40){\n puntos+= 1*0.07f;\n }\n if(cambiosFondo > 40 && cambiosFondo <= 50){\n puntos+= 1*0.1f;\n }\n if(cambiosFondo > 50) {\n puntos += 1 * 0.25f;\n }\n }", "@Override\n\tpublic void procesar() throws WrongValuesException, ExcEntradaInconsistente {\n\n\t}", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "public void LimpiarCampos() {\n\n txtIdAsignarPer.setText(\"\");\n txtNombreusu.setText(\"\");\n pswConfCont.setText(\"\");\n combPerf.setSelectedItem(\"\");\n pswContra.setText(\"\");\n txtDocumento.setText(\"\");\n }", "void imprimeValores(){\n System.out.println(\"coordenada del raton:(\"+pratonl[0][0]+\",\"+pratonl[0][1]+\")\");\n System.out.println(\"coordenada del queso:(\"+pquesol[0][0]+\",\"+pquesol[0][1]+\")\");\n imprimeCalculos();//imprime la diferencia entre las X y las Y de las coordenadas\n movimiento();\n }", "public updateAresta_args(updateAresta_args other) {\n __isset_bitfield = other.__isset_bitfield;\n this.vertice1 = other.vertice1;\n this.vertice2 = other.vertice2;\n this.peso = other.peso;\n this.direcionado = other.direcionado;\n if (other.isSetDescricao()) {\n this.descricao = other.descricao;\n }\n }", "void setData(int x,int y)\n\t{\n\ta=x;\n\tb=y;\n\t}", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "private void limpaCampos() {\n txtNome.setText(\"\");\n txtRG.setText(\"\");\n txtFCpf.setText(\"\");\n txtFNascimento.setText(\"\");\n txtEmail.setText(\"\");\n txtFCelular.setText(\"\");\n txtFTelefone.setText(\"\");\n txtRua.setText(\"\");\n txtComplemento.setText(\"\");\n txtFCep.setText(\"\");\n txtBairro.setText(\"\");\n txtCidade.setText(\"\");\n }", "public void setPrenotazione(Set<Prenotazione> aPrenotazione) {\n prenotazione = aPrenotazione;\n }", "public void limpiarCampos() {\n\t\ttema = new Tema();\n\t\ttemaSeleccionado = new Tema();\n\t\tmultimedia = new Multimedia();\n\t}", "@Test\r\n\tpublic void testGetPeliBalorazioNormalizatuak() {\n\t\tBektorea bek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == -2.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.25);\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -0.5);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 0.75);\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Baztezbestekoa erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(bek.getBalioa(e3.getId()) == 1.75);\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t\r\n\t\t// Normalizazioa Zsore erabiliz egiten dugu\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Zscore());\r\n\t\t\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.0000\");\r\n\t\t\r\n\t\t// p1 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p1.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"1,2247\"));\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"-1,6398\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p2.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 4);\r\n\t\tassertTrue(df.format(bek.getBalioa(e1.getId())).equals(\"-1,2247\"));\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == 1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",1491\"));\r\n\t\tassertTrue(bek.getBalioa(e4.getId()) == 0);\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p3.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e2.getId()) == -1);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\",4472\"));\r\n\t\tassertFalse(bek.bektoreanDago(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak eta balorazio normalizautak (Zscore erabiliz) itzuli\r\n\t\tbek = BalorazioenMatrizea.getBalorazioenMatrizea().getPeliBalorazioNormalizatuak(p4.getPelikulaId());\r\n\t\tassertTrue(bek.luzera() == 2);\r\n\t\tassertTrue(bek.getBalioa(e1.getId()) == 0);\r\n\t\tassertTrue(df.format(bek.getBalioa(e3.getId())).equals(\"1,0435\"));\r\n\t\tassertFalse(bek.bektoreanDago(e2.getId()));\r\n\t\t\r\n\t\tBalorazioenMatrizea.getBalorazioenMatrizea().erreseteatu();\r\n\t\tNormalizazioKalkulua.getNormalizazioKalkulua().normalizazioMotaAldatu(new Batezbestekoa());\r\n\t\t\r\n\t}", "public void setPagamento(Set<Pagamento> aPagamento) {\n pagamento = aPagamento;\n }", "public void muovi() {\n\n for (int i = punti; i > 0; i--) {\n x[i] = x[(i - 1)];\n y[i] = y[(i - 1)];\n }\n\n if (sinistra) {\n x[0] -= DIMENSIONE_PUNTO;\n }\n\n if (destra) {\n x[0] += DIMENSIONE_PUNTO;\n }\n\n if (su) {\n y[0] -= DIMENSIONE_PUNTO;\n }\n\n if (giu) {\n y[0] += DIMENSIONE_PUNTO;\n }\n }", "public void ganarDineroPorAutomoviles() {\n for (Persona p : super.getMundo().getListaDoctores()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaAlbaniles()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaHerreros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n for (Persona p : super.getMundo().getListaCocineros()) {\n for (Vehiculo v : p.getVehiculos()) {\n v.puedeGanarInteres();\n v.setPuedeGanarInteres(false);\n }\n }\n }", "private void limpiarCampos() {\n campoNombre.setText(\"\");\n campoNumLibro.setText(\"\");\n campoNumPagina.setText(\"\");\n }", "private void actualizarCampos(){\n obtenerPreguntasConRespuestas();\n actualizarRespuestasActuales();\n \n _opcionMultiple.actualizarPregunta(obtenerPregunta());\n _opcionMultiple.actualizarOpcion1(\"<html>\"+_respuestasActuales.get(0).getRespuesta()+\"</html>\");\n _opcionMultiple.actualizarOpcion2(\"<html>\"+_respuestasActuales.get(1).getRespuesta()+\"</html>\");\n _opcionMultiple.actualizarOpcion3(\"<html>\"+_respuestasActuales.get(2).getRespuesta()+\"</html>\");\n _opcionMultiple.actualizarOpcion4(\"<html>\"+_respuestasActuales.get(3).getRespuesta()+\"</html>\");\n \n if(_respuestaUsuario.size()>_posicion){\n _opcionMultiple.limpiarSelecciones();\n int numeroRespuesta = _respuestasActuales.indexOf(_respuestaUsuario.get(_posicion));\n _opcionMultiple.selecionarOpcion(numeroRespuesta);\n }else{\n _opcionMultiple.limpiarSelecciones();\n }\n }", "public void setMotivoLlamadoAtencion(MotivoLlamadoAtencion motivoLlamadoAtencion)\r\n/* 119: */ {\r\n/* 120:127 */ this.motivoLlamadoAtencion = motivoLlamadoAtencion;\r\n/* 121: */ }", "private void resetaPadraoEFundo() {\r\n\t\tdiferencaDeFundoATopo = new BigDecimal(0);\r\n\t\t\r\n\t\tif (!isNovoFundo) {\r\n\t\t\tvalorDoFundoAnterior = new BigDecimal(0);\r\n\t\t}\r\n\r\n\t\tvalorDoTopo = new BigDecimal(0);\r\n\t\tultimoFoiTopo = false;\r\n\t\t\r\n\t\tvalorDoFundo = valorCorrente;\r\n\t\tultimoFoiFundo = true;\r\n\t\t\r\n\t\tcorrecaoCorrente = new BigDecimal(0);\r\n\t\tformouPivoDeCompra = false;\r\n\t\tentrouNoRangeDeInicio = false;\r\n\t\testaNoRangeDeLimite = false;\r\n\t\tformadoSegundoTopo = false;\r\n\t\tformadoTopoRelevante = false;\r\n\t\tformouSegundoFundo = false;\r\n\t}", "@Transactional\n private void cutAllIdCOMPEMTbCOMPETENCIASEMCARGOSsAssignments(TbCOMPETENCIASEMOCIONAISEntity tbCOMPETENCIASEMOCIONAIS) {\n \tgetEntityManager()\n .createQuery(\"UPDATE TbCOMPETENCIASEMCARGOS c SET c.idCOMPEM = NULL WHERE c.idCOMPEM = :p\")\n .setParameter(\"p\", tbCOMPETENCIASEMOCIONAIS).executeUpdate();\n }", "public void setAll(int IDCUENTACONTABLEIn,\r\n String DECOMPARENDOIn,\r\n String CODIGOCUENTAIn,\r\n String NOMBRECUENTAIn,\r\n int VIGENCIAINICIALIn,\r\n int VIGENCIAFINALIn,\r\n String FILTROPORFECHASIn,\r\n int IDTARIFAIn,\r\n int IDCONCEPTOIn,\r\n String NOMBRECONCEPTOIn,\r\n int IDITEMIn,\r\n double VALORPAGOIn,\r\n String FECHAPAGOIn,\r\n int VIGENCIAIn) {\r\n this.IDCUENTACONTABLE = IDCUENTACONTABLEIn;\r\n this.DECOMPARENDO = DECOMPARENDOIn;\r\n this.CODIGOCUENTA = CODIGOCUENTAIn;\r\n this.NOMBRECUENTA = NOMBRECUENTAIn;\r\n this.VIGENCIAINICIAL = VIGENCIAINICIALIn;\r\n this.VIGENCIAFINAL = VIGENCIAFINALIn;\r\n this.FILTROPORFECHAS = FILTROPORFECHASIn;\r\n this.IDTARIFA = IDTARIFAIn;\r\n this.IDCONCEPTO = IDCONCEPTOIn;\r\n this.NOMBRECONCEPTO = NOMBRECONCEPTOIn;\r\n this.IDITEM = IDITEMIn;\r\n this.VALORPAGO = VALORPAGOIn;\r\n this.FECHAPAGO = FECHAPAGOIn;\r\n this.VIGENCIA = VIGENCIAIn;\r\n }", "private void preenchePosicoes(List<Par<Integer,Integer>> posicoes, \n\t\t\tEstadoAmbiente estado) {\n\t\tfor (Par<Integer,Integer> p : posicoes) {\n\t\t\tthis.quadricula[p.primeiro()][p.segundo()] = estado;\n\t\t}\n\t}", "public void VaciarPila()\n {\n this.tope = 0;\n }", "public abstract void setearEstadosPropuests(String estado, String propuesta, String fechaCambio) throws ParseException;", "public void pausarDisparos() {\n\t\tpausarDisparo = !pausarDisparo;\n\t}", "private void vaciarCampos() {\n\t\t// TODO Auto-generated method stub\n\t\ttxtCedula.clear();\n\t\ttxtNombre.clear();\n\t\ttxtApellidos.clear();\n\t\ttxtTelefono.clear();\n\t\ttxtCorreo.clear();\n\t\ttxtDireccion.clear();\n\t\ttxtUsuario.clear();\n\t\ttxtContrasenia.clear();\n\t}", "private void controladorAtras(Controlador controlador){\n this.contAtras = controlador.getAtras();\n registro.setControlAtras(contAtras);\n login.setControlAtras(contAtras);\n }", "public void darCoordenadas() {\r\n\t\t\r\n\t\tfor(int x = 0; x<palabras.size(); x++) {\r\n\t\t\t\r\n\t\t\tif (palabras.get(x).get(0).getOrientacion().equals(\"V\")) {\r\n\t\t\t\tint coordenadaX = palabras.get(x).get(0).getX();\r\n\t\t\t\tint coordenadaY = palabras.get(x).get(0).getY();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 1; y < palabras.get(x).size(); y++) \r\n\t\t\t\t{\r\n\t\t\t\t\tcoordenadaY++;\r\n\t\t\t\t\tpalabras.get(x).get(y).setX(coordenadaX);\r\n\t\t\t\t\tpalabras.get(x).get(y).setY(coordenadaY);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (palabras.get(x).get(0).getOrientacion().equals(\"H\") ) {\r\n\t\t\t\t\r\n\t\t\t\tint coordenadaX = palabras.get(x).get(0).getX();\r\n\t\t\t\tint coordenadaY = palabras.get(x).get(0).getY();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 1; y < palabras.get(x).size(); y++) \r\n\t\t\t\t{\r\n\t\t\t\t\tcoordenadaX++;\r\n\t\t\t\t\tpalabras.get(x).get(y).setX(coordenadaX);\r\n\t\t\t\t\tpalabras.get(x).get(y).setY(coordenadaY);\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}", "void union(int a, int b) {\n int aParent = find(a); // find parent of a\n int bParent = find(b); // find parent of b\n\n // here we are everytime setting the parent of a_set as b_set in union\n // set the parent of all a as parent of b\n childToParentMap.put(aParent, bParent);\n }", "public void attrito(){\n yCord[0]+=4;\n yCord[1]+=4;\n yCord[2]+=4;\n //e riaggiorna i propulsori (che siano attivati o no) ricalcolandoli sulla base delle coordinate dell'astronave, cambiate\n aggiornaPropulsori();\n \n }", "private void mueveObjetos()\n {\n // Mueve las naves Ufo\n for (Ufo ufo : ufos) {\n ufo.moverUfo();\n }\n \n // Cambia el movimiento de los Ufos\n if (cambiaUfos) {\n for (Ufo ufo : ufos) {\n ufo.cambiaMoverUfo();\n }\n cambiaUfos = false;\n }\n\n // Mueve los disparos y los elimina los disparos de la nave Guardian\n if (disparoGuardian.getVisible()) {\n disparoGuardian.moverArriba();\n if (disparoGuardian.getPosicionY() <= 0) {\n disparoGuardian.setVisible(false);\n }\n }\n\n // Dispara, mueve y elimina los disparos de las naves Ufo\n disparaUfo();\n if (disparoUfo.getVisible()) {\n disparoUfo.moverAbajo();\n if (disparoUfo.getPosicionY() >= altoVentana) {\n disparoUfo.setVisible(false);\n }\n }\n\n // Mueve la nave Guardian hacia la izquierda\n if (moverIzquierda) {\n guardian.moverIzquierda();\n }\n // Mueve la nave Guardian hacia la derecha\n if (moverDerecha) {\n guardian.moverDerecha();\n }\n // Hace que la nave Guardian dispare\n if (disparar) {\n disparaGuardian();\n }\n }", "public void setButacas(int butacas) {\r\n\t\tthis.butacas = butacas;\r\n\t}", "public void aggiornaPropulsori(){\n xPropulsore1=new int[]{xCord[0],xCord[0]};\n yPropulsore1=new int[]{yCord[0],yCord[0]+15}; \n xPropulsore2=new int[]{xCord[2],xCord[2]}; \n yPropulsore2=new int[]{yCord[2],yCord[2]+15};\n \n }", "private void esvaziaMensageiro() {\n\t\tMensageiro.arquivo=null;\n\t\tMensageiro.lingua = linguas.indexOf(lingua);\n\t\tMensageiro.linguas=linguas;\n\t\tMensageiro.nomeArquivo=null;\n\t}", "public void cleararrays(){\n condicional.clear();\n parametro1.clear();\n parametro2.clear();\n }", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "public void setAnio(int p) { this.anio = p; }", "public void ordenarXPuntajeSeleccion() {\r\n\t\tfor (int i = 0; i < datos.size()-1; i++) {\r\n\t\t\tJugador menor = datos.get(i);\r\n\t\t\tint cual = i;\r\n\t\t\tfor (int j = i + 1; j < datos.size(); j++ ) {\r\n\t\t\t\tif(datos.get(j).compareTo(menor) < 0) {\r\n\t\t\t\t\tmenor = datos.get(j);\r\n\t\t\t\t\tcual = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tJugador temp = datos.get(i);\r\n\t\t\tdatos.set(i, menor);\r\n\t\t\tdatos.set(cual, temp);\r\n\t\t}\r\n\t}", "@Override\n public void set(Voluntario a) {\n if (a==null) a=new Voluntario();\n \n txtNome.setText(a.getNome());\n DateFormat df = new SimpleDateFormat(\"dd/mm/yyyy\");\n txtDataN.setText(df.format(a.getDataNascimento().getTime()));\n txtNacionalidade.setText(a.getNacionalidadeIndiv());\n txtProfissao.setText(a.getProfissao());\n txtMorada.setText(a.getMorada());\n txtCodPostal.setText(a.getCodigoPostal());\n txtLocalidade.setText(a.getLocalidade());\n txtTelefone.setText(a.getTelefone());\n txtTelemovel.setText(a.getTelemovel());\n txtEmail.setText(a.getEmail());\n txtNif.setText(a.getNif()+\"\");\n txtHabilit.setText(a.getHabilitacoes());\n txtConhecimentosL.setText(a.getConhecimentosLing());\n txtFormComp.setText(a.getFormacaoComp());\n txtExpV.setText(a.getExperienciaVolunt());\n txtConhecimentosC.setText(a.getConhecimentosConstr());\n txtDispon.setText(a.getDisponibilidade());\n txtComoConheceu.setText(a.getComoConheceu());\n checkReceberInfo.setSelected(a.getReceberInfo());\n checkIsParceiro.setSelected(a.isParceiro()); \n \n voluntario = a;\n }", "public void resetValor();", "private void Mueve() {\n\t\tpaleta1.Mueve_paletas();\n\t\tpaleta2.Mueve_paletas();\n\t\tpelota.Mueve_pelota();\n\t}", "public void prepararDados() {\n\t\tatribuiPrimeiroAnoCasoAnoEstejaNulo();\n\t\t\n\t\tsalvarOuAtualizar(alunosMilitarPraca);\n\t\tsalvarOuAtualizar(alunosMilitarOficial);\n\t\t\n\t\tinit();\n\t\thabilitaBotao=false;\n\t}", "public void controlla_bersaglio() {\n\n if ((x[0] == bersaglio_x) && (y[0] == bersaglio_y)) {\n punti++;\n posiziona_bersaglio();\n }\n }", "private void limpiarCampos() {\n datoCriterio1.setText(\"\");\n ((DefaultTableModel)this.jTable1.getModel()).setRowCount(0);\n jBConcretarAccion.setEnabled(false);\n jBCancelar.setEnabled(false);\n jLObjetoSeleccionado.setText(\"\");\n this.unObjetoSeleccionado = null;\n }", "public void actualiza(){\r\n //pregunto si se presiono una tecla de dirección\r\n if(bTecla) {\r\n int iX = basPrincipal.getX();\r\n int iY = basPrincipal.getY();\r\n if(iDir == 1) {\r\n iY -= getHeight() / iMAXALTO;\r\n }\r\n if(iDir == 2) {\r\n iX += getWidth() / iMAXANCHO;\r\n }\r\n if(iDir == 3) {\r\n iY += getHeight() / iMAXALTO;\r\n }\r\n if(iDir == 4) {\r\n iX -= getWidth() / iMAXANCHO;\r\n }\r\n //limpio la bandera\r\n bTecla = false;\r\n \r\n //asigno posiciones en caso de no salirme\r\n if(iX >= 0 && iY >= 0 && iX + basPrincipal.getAncho() <= getWidth()\r\n && iY + basPrincipal.getAlto() <= getHeight()) {\r\n basPrincipal.setX(iX);\r\n basPrincipal.setY(iY);\r\n } \r\n }\r\n \r\n //Muevo los chimpys\r\n for(Base basChimpy : lklChimpys) {\r\n basChimpy.setX(basChimpy.getX() - iAceleracion);\r\n }\r\n \r\n //Muevo los diddys\r\n for(Base basDiddy : lklDiddys) {\r\n basDiddy.setX(basDiddy.getX() + iAceleracion);\r\n }\r\n\r\n }", "public void setApellidos(String p) { this.apellidos = p; }", "@Override\n protected void elaboraParametri() {\n super.elaboraParametri();\n titoloPagina = TITOLO_PAGINA;\n }", "public void decida(){\n int vecinasVivas=vecinos();\n if(vecinasVivas==3 && estadoActual=='m'){\n estadoSiguiente='v';\n }else if((estadoActual=='v' && vecinasVivas==2) || (estadoActual=='v' && vecinasVivas==3)){\n estadoSiguiente='v';\n }else if(vecinasVivas<2 || vecinasVivas>3){\n estadoSiguiente='m';\n }\n }", "private void atualizarBotoes() {\r\n\t\tbtIncluir.setDisable(cliente.getId() != null);\r\n\t\tbtAlterar.setDisable(cliente.getId() == null);\r\n\t\tbtExcluir.setDisable(cliente.getId() == null);\r\n\t}", "public void setLongitudDeDecimales(int longitudDeDecimales) {\n try{\n if(this.tipoDeDatos == null){\n throw new ExcepcionPersonalizada(\n \"No has definido el tipo de dato del campo.\",\n this,\n \"setLongitudDeDecimales\");\n }else if(this.tipoDeDatos.equals(\"varchar\")){\n throw new ExcepcionPersonalizada(\n \"El campo esta definido como tipo varchar.\",\n this,\n \"setLongitudDeDecimales\");\n }else if(this.tipoDeDatos.equals(\"int\")){\n throw new ExcepcionPersonalizada(\n \"El campo esta definido como tipo int.\",\n this,\n \"setLongitudDeDecimales\");\n }else if(this.tipoDeDatos.equals(\"date\")){\n throw new ExcepcionPersonalizada(\n \"El campo esta definido como tipo date.\",\n this,\n \"setLongitudDeDecimales\");\n }else if(!this.tipoDeDatos.equals(\"float\") && !this.tipoDeDatos.equals(\"decimal\")){\n throw new ExcepcionPersonalizada(\n \"El campo es diferente de float y decimal .\",\n this,\n \"setLongitudDeDecimales\");\n \n }\n } catch (ExcepcionPersonalizada ex) {\n Logger.getLogger(ParametrosDeCampo.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n this.longitudDeDecimales = longitudDeDecimales;\n }", "@Override\n public void setPrimeraEntrada(Componente entrada) {\n if(Name.equals(\"NOT\")){\n Entrada1=entrada;\n Entrada2=entrada;\n }else {\n this.Entrada1 = entrada;\n }\n }", "public void asignarAutomovilPersona(){\r\n persona.setAutomovil(automovil);\r\n }", "private Pares(){\n\t\t\tprimero=null;\n\t\t\tsegundo=null;\n\t\t\tdistancia=0;\n\t\t}", "@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}", "private void aretes_aO(){\n\t\tthis.cube[40] = this.cube[7]; \n\t\tthis.cube[7] = this.cube[25];\n\t\tthis.cube[25] = this.cube[46];\n\t\tthis.cube[46] = this.cube[34];\n\t\tthis.cube[34] = this.cube[40];\n\t}", "void setPosiblesTipos(String[] tipos);", "public void imprimirBilletes()\n {\n maquina1.insertarDinero(800);\n maquina2.insertarDinero(800);\n maquina1.imprimirTicket();\n maquina2.imprimirTicket();\n }", "private void setNums(double altura, double lado2, double lado3){\r\n \r\n this.altura = altura;\r\n this.lado2 = lado2;\r\n this.lado3 = lado3;\r\n \r\n \r\n }", "private void desHabCampos(boolean hab) {\r\n\t\tlbl_Oferta.setEnabled(hab);\r\n\t\ttxArea_descripcion.setEditable(hab);\r\n\t\ttxField_lugar.setEditable(hab);\r\n\t\ttxField_experiencia.setEditable(hab);\r\n\t\tcombo_contrato.setEditable(hab);\r\n\t\ttxField_sueldoMax.setEditable(hab);\r\n\t\ttxField_sueldoMin.setEditable(hab);\r\n\t\ttxArea_aspectosImpres.setEditable(hab);\r\n\t\ttxArea_aspectosValorar.setEditable(hab);\r\n\t\tpa_conocimientos.setEnabled(hab);\r\n\t\ttxField_Empresa.setEnabled(false);\r\n\t\tpa_conocimientos.getBtn_anadir().setEnabled(hab);\r\n\t\tpa_conocimientos.getBtn_eliminar().setEnabled(hab);\r\n\t}", "public void limpar() {\n\t\talunosMilitarPraca.setId(null);\n\t\talunosMilitarPraca.setMasculino(null);\n\t\talunosMilitarPraca.setFeminino(null);\n\t\t\n\t\talunosMilitarOficial.setId(null);\n\t\talunosMilitarOficial.setMasculino(null);\n\t\talunosMilitarOficial.setFeminino(null);\n\t}", "@Override\r\n public void hallarPerimetro() {\r\n this.perimetro = this.ladoA*3;\r\n }", "public void normaliza() {\n switch (o) {\n case SurEste:\n setPos(getX()+1, getY());\n o = OrientacionArista.NorOeste;\n break;\n case SurOeste: \n setPos(getX(), getY()+1);\n o = OrientacionArista.NorEste;\n break;\n case Oeste: \n setPos(getX()-1, getY()+1);\n o = OrientacionArista.Este;\n break;\n }\n }", "public void setSeguros(Set<Integer> seguros){\n\tthis.seguros.clear();\n\tfor(Integer i : seguros){\n\t this.seguros.add(i);\n\t}\n }", "private void resetParams() {\n lowerYear = 1999;\n upperYear = 2020;\n yearRestriction = false;\n\n lowerProblem = 1;\n upperProblem = 60;\n problemRestriction = false;\n partTwo = false;\n }", "public void setPresupuesto(Presupuesto presupuesto) {\n this.presupuesto = presupuesto;\n Cliente cliente = presupuesto.getCliente();\n\n nroPresupuestoField.setText(String.valueOf(presupuesto.getNroPresupuesto()));\n cuitField.setText(cliente.getCuit());\n denominacionField.setText(cliente.getDenominacion());\n String ci = cliente.getCondicionIva();\n if(ci!= null){\n \tif(ci.startsWith(\"RI\")){\n \tthis.condicionIvaField.setText(\"Responsable Inscripto\");\n }\n else if(ci.startsWith(\"EX\")){\n \tthis.condicionIvaField.setText(\"Exento\");\n }\n else if(ci.startsWith(\"MO\")){\n \tthis.condicionIvaField.setText(\"Monotributista\");\n }\n else if(ci.startsWith(\"NR\")){\n \tthis.condicionIvaField.setText(\"No Responsable\");\n }\n else if(ci.startsWith(\"CF\")){\n \tthis.condicionIvaField.setText(\"Consumidor Final\");\n }\n }\n \n alicuotaChoiceBox.setItems(FXCollections.observableArrayList(\"0%\",\"10,5%\",\"21%\"));\n \n Float ali = presupuesto.getAlicuota();\n if(ali!= null){\n \tif(ali == 0.0){\n \talicuotaChoiceBox.setValue(\"0%\");\n }\n else if(ali == 10.5){\n \talicuotaChoiceBox.setValue(\"10,5%\");\n }\n else if(ali == 21.0){\n \talicuotaChoiceBox.setValue(\"21%\");\n }\n else{\n \talicuotaChoiceBox.setValue(\"\");\n }\n }\n \n mesChoiceBox.setItems(FXCollections.observableArrayList(Presupuesto.getMeses()));\n\t\t\n\t\t//TODO: elegir el mes actual de los presupuestos\n\t\tint mesesito = presupuesto.getMes() -1 ;\n\t\tmesChoiceBox.getSelectionModel().select(mesesito);\n \n subtotalField.setText(String.valueOf(presupuesto.getSubtotal()));\n montoTotalField.setText(String.valueOf(recalcularMonto(presupuesto.getAlicuota())));\n \n conceptosTable.setItems(presupuesto.getConceptosObservables());\n conceptoColumn.setCellValueFactory(\n\t\t\tcellData -> cellData.getValue().getConceptoProperty());\n \n\t\tmontoColumn.setCellValueFactory(\n\t\t\tcellData -> cellData.getValue().getMontoConceptoStringProperty());\n \n }" ]
[ "0.6087289", "0.5963612", "0.58709973", "0.58558095", "0.5647372", "0.5636565", "0.5605473", "0.55280316", "0.55067056", "0.54396105", "0.54326856", "0.5415851", "0.54080373", "0.53799313", "0.5378942", "0.53734475", "0.5347046", "0.53334326", "0.5329599", "0.53265786", "0.5324533", "0.5313566", "0.5302216", "0.52958196", "0.5287572", "0.52839655", "0.52827907", "0.52604586", "0.5251081", "0.5236197", "0.5234936", "0.5232048", "0.52190226", "0.52099425", "0.52096176", "0.5205009", "0.52013797", "0.51926607", "0.51889884", "0.5136316", "0.51256907", "0.51231784", "0.510906", "0.51056623", "0.51042336", "0.51006144", "0.5098269", "0.5090059", "0.50892556", "0.508326", "0.50796944", "0.5079136", "0.5077924", "0.50692457", "0.5068154", "0.506596", "0.50612104", "0.50587213", "0.50500286", "0.50418866", "0.5037719", "0.50322187", "0.5023512", "0.50218886", "0.50208336", "0.50204474", "0.50178295", "0.5016795", "0.500252", "0.50017655", "0.49883837", "0.49827254", "0.4981348", "0.49739194", "0.49710575", "0.49705413", "0.49644917", "0.4955471", "0.4953973", "0.4947757", "0.4943535", "0.49425665", "0.49401543", "0.49286976", "0.4921364", "0.49203616", "0.4917987", "0.49159375", "0.49130037", "0.48994723", "0.48920786", "0.4891053", "0.48896787", "0.48874348", "0.48835614", "0.48830166", "0.48815534", "0.4877021", "0.48712847", "0.4870327" ]
0.5488474
9
/ Computes the AGI for the user. Takes in the String entries from the W2 Income, Interest Income, and UI/Alaska Dividends Income fields, converts them to BigDecimals, adds them, and rounds them up to the nearest dollar. Then converts them back to a string and passes it to the AGI TextField in the main program. That AGI TextField is then called in subsequent methods.
public String returnAGI(String w2income, String interestIncome, String UIAndAlaskaIncome){ BigDecimal w2inc = new BigDecimal(w2income); BigDecimal intInc = new BigDecimal(interestIncome); BigDecimal UIAndAlaskaInc = new BigDecimal(UIAndAlaskaIncome); BigDecimal totalIncome = w2inc.add(intInc.add(UIAndAlaskaInc)); totalIncome = totalIncome.setScale(0, RoundingMode.HALF_UP); return totalIncome.toPlainString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String computeTaxableIncome(String AGIField, String exemptionEntry){\n int totalAGI = Integer.parseInt(AGIField);\n int totalDeduction = Integer.parseInt(exemptionEntry);\n String taxInc;\n \n if((totalAGI - totalDeduction) > 0){\n taxInc = Integer.toString(totalAGI - totalDeduction);\n } else {\n taxInc = Integer.toString(0);\n }\n \n return taxInc;\n\n }", "public void calculateInterest(ActionEvent event) {\n try {\n double startkapital = Double.parseDouble(initialCapitalTextField.getText());\n double zinssatz = Double.parseDouble(interestRateTextField.getText());\n double laufzeit = Double.parseDouble(runningTimeTextField.getText());\n double zinsenOhneStartkapitalUndHoch = (1 + zinssatz / 100);\n double zinsenOhneStartkapitalMitHoch = Math.pow(zinsenOhneStartkapitalUndHoch, laufzeit);\n double zinsen = (zinsenOhneStartkapitalMitHoch * startkapital) - startkapital;\n\n interestLabel.setText(String.valueOf(zinsen));\n } catch (NumberFormatException e) {\n Alert alert = new Alert(Alert.AlertType.ERROR, \"Ungültige oder fehlende Eingabe\");\n alert.show();\n }\n }", "public void calc() {\n /*\n * Creates BigDecimals for each Tab.\n */\n BigDecimal registerSum = new BigDecimal(\"0.00\");\n BigDecimal rouleauSum = new BigDecimal(\"0.00\");\n BigDecimal coinageSum = new BigDecimal(\"0.00\");\n BigDecimal billSum = new BigDecimal(\"0.00\");\n /*\n * Iterates over all TextFields, where the User might have entered values into.\n */\n for (int i = 0; i <= 7; i++) {\n /*\n * If i <= 1 is true, we still have registerFields to add to their BigDecimal.\n */\n if (i <= 1) {\n try {\n /*\n * Stores the Text of the RegisterField at the index i with all non-digit characters.\n */\n String str = registerFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n /*\n * Creates a new BigDecimal, that is created by getting the Factor of the current \n * RegisterField and multiplying this with the input.\n */\n BigDecimal result = getFactor(i, FactorType.REGISTER).multiply(new BigDecimal(str));\n /*\n * Displays the result of the multiplication above in the associated Label.\n */\n registerLabels.get(i).setText(result.toString().replace('.', ',') + \"€\");\n /*\n * Adds the result of the multiplication to the BigDecimal for the RegisterTab.\n */\n registerSum = registerSum.add(result);\n } catch (NumberFormatException nfe) {\n //If the Input doesn't contain any numbers at all, a NumberFormatException is thrown, \n //but we don't have to do anything in this case\n }\n }\n /*\n * If i <= 4 is true, we still have rouleauFields to add to their BigDecimal.\n */\n if (i <= 4) {\n try {\n /*\n * See Documentation for the registerFields for Information.\n */\n String str = rouleauFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n BigDecimal sum = getFactor(i, FactorType.ROULEAU).multiply(new BigDecimal(str));\n rouleauLabels.get(i).setText(sum.toString().replace('.', ',') + \"€\");\n rouleauSum = rouleauSum.add(sum);\n } catch (NumberFormatException nfe) {\n //See above.\n }\n }\n /*\n * If i <= 6 is true, we still have billFields to add to their BigDecimal.\n */\n if (i <= 6) {\n try {\n /*\n * See Documentation for the registerFields for Information.\n */\n String str = billFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n BigDecimal sum = getFactor(i, FactorType.BILL).multiply(new BigDecimal(str));\n billLabels.get(i).setText(sum.toString().replace('.', ',') + \"€\");\n billSum = billSum.add(sum);\n } catch (NumberFormatException nfe) {\n //See above.\n }\n }\n /*\n * We have 8 coinageFields, so since the for-condition is 0 <= i <=7, we don't have to check \n * if i is in range and can simply calculate it's sum.\n */\n try {\n /*\n * See Documentation for the registerFields for Information.\n */\n String str = coinageFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n BigDecimal sum = getFactor(i, FactorType.COINAGE).multiply(new BigDecimal(str));\n coinageLabels.get(i).setText(sum.toString().replace('.', ',') + \"€\");\n coinageSum = coinageSum.add(sum);\n } catch (NumberFormatException nfe) {\n //See above.\n }\n }\n /*\n * Displays all results in the associated Labels.\n */\n sumLabels.get(0).setText(registerSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(1).setText(rouleauSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(2).setText(coinageSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(3).setText(billSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(4).setText(billSum.add(coinageSum).add(rouleauSum).add(registerSum).toString()\n .replace('.', ',') + \"€\");\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter the investment amounth: \");\n\t\tdouble investment = input.nextDouble();\n\t\tSystem.out.println(\"Enter annual interest rate ( in percentage e.g. 3.5%) : \");\n\t\tdouble interestRate = input.nextDouble();\n\t\tSystem.out.println(\"Enter number of years: \");\n\t\tdouble numberOfYears = input.nextDouble();\n\t\t\n\t\tdouble acumulatedValue = investment * Math.pow(( 1 + (interestRate /1200) ),(numberOfYears * 12));\n\t\t\n\t\tSystem.out.println(\"Acumulated value is: \" + acumulatedValue);\n\t}", "public void updateInterest(){\n //Caculate when all fields are available\n String amountStr = amountInput.getText().toString();\n String yieldStr = annualizedYieldInput.getText().toString();\n String bankStr = bankInput.getText().toString();\n\n if (mStartDate!=null && mEndDate!=null\n && !Utils.isNullOrEmpty(amountStr)\n && !Utils.isNullOrEmpty(yieldStr)\n && !Utils.isNullOrEmpty(bankStr)){\n\n float days = Utils.getDiffDays(mStartDate,mEndDate);\n mAmount = Float.valueOf(amountStr);\n mYield = Float.valueOf(yieldStr);\n\n //Caculate the value\n mInterest = mAmount * (mYield/100)*(days/ Constants.DAYS_OF_ONE_YEAR);\n mInterest = Utils.roundFloat(mInterest);\n //Update the interest in UI\n expectedInterestInput.setText(Utils.formatFloat(mInterest));\n Log.d(Constants.LOG_TAG, \"start = \" + mStartDate.toString() + \"\\nend = \" + mEndDate.toString()\n + \"\\ndays = \" + days + \"\\namount = \" + mAmount + \"\\nyield = \" + mYield + \"\\ninterest = \" + mInterest);\n }\n }", "public void gpa() {\n System.out.print(\"Enter a letter grade: \");\n in.nextLine();\n String letterGrade = in.nextLine().toUpperCase();\n final double A_VALUE = 4.0;\n final double B_VALUE = 3.0;\n final double C_VALUE = 2.0;\n final double D_VALUE = 1.0;\n final double F_VALUE = 0.0;\n double gpaValue;\n final double GPA_ADJUST = 0.33;\n\n switch (letterGrade) {\n case \"A+\":\n gpaValue = A_VALUE;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n case \"A\":\n gpaValue = A_VALUE;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n case \"A-\":\n gpaValue = A_VALUE - GPA_ADJUST;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n case \"B+\":\n gpaValue = B_VALUE + GPA_ADJUST;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n case \"B\":\n gpaValue = B_VALUE;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n case \"B-\":\n gpaValue = B_VALUE - GPA_ADJUST;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n case \"C+\":\n gpaValue = C_VALUE + GPA_ADJUST;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n case \"C\":\n gpaValue = C_VALUE;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n case \"C-\":\n gpaValue = C_VALUE - GPA_ADJUST;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n case \"D+\":\n gpaValue = D_VALUE + GPA_ADJUST;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n case \"D\":\n gpaValue = D_VALUE;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n case \"D-\":\n gpaValue = D_VALUE - GPA_ADJUST;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n case \"F\":\n gpaValue = F_VALUE;\n System.out.printf(\"\\nYour GPA is %.2f.\\n\", gpaValue);\n break;\n default:\n System.out.println(\"\\nThat's not a valid letter grade.\\n\");\n break;\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 }", "@Override\n public void actionPerformed(ActionEvent e) {\n double costPerCreditHour = ((Number) costPerCreditHourField.getValue()).doubleValue();\n double bookCostPerSemester = ((Number) bookCostPerSemField.getValue()).doubleValue();\n double roomAndBoardCost = ((Number) roomAndBoardPerMonthField.getValue()).doubleValue();\n double foodCostPerMonth = ((Number) foodCostPerMonthField.getValue()).doubleValue();\n double travelCostPerMonth = ((Number) travelCostPerMonthField.getValue()).doubleValue();\n\n int monthsInASemester = ((Number) monthsInASemesterField.getValue()).intValue();\n int fullTimeHours = ((Number) fullTimeHoursField.getValue()).intValue();\n int partTimeHours = ((Number) partTimeHoursField.getValue()).intValue();\n int semestersInAYear = ((Number) semestersInAYearField.getValue()).intValue();\n int hoursInADegree = ((Number) hoursInADegreeField.getValue()).intValue();\n\n double fullTimeTuition = fullTimeHours * costPerCreditHour;\n double partTimeTuition = partTimeHours * costPerCreditHour;\n double roomAndBoard = roomAndBoardCost * monthsInASemester;\n double travel = travelCostPerMonth * monthsInASemester;\n double food = foodCostPerMonth * monthsInASemester;\n double fullTimeTotal = 0;\n double partTimeTotal = 0;\n partTimeTotal += partTimeTuition + roomAndBoard + travel + food;\n fullTimeTotal += fullTimeTuition + roomAndBoard + travel + food;\n\n //clear the output area\n outputArea.setText(\"\");\n\n outputArea.append(\"FULL TIME COST PER SEMESTER\"+\"\\t\" +\"PART TIME COST PER SEMESTER\\n\");\n outputArea.append(\"TUITION: $\" + fullTimeTuition +\"\\t\\t\" + \"TUITION: $\" + partTimeTuition +\"\\n\");\n outputArea.append(\"ROOM AND BOARD: $\" + roomAndBoard + \"\\t\\t\" + \"ROOM AND BOARD: $\" + roomAndBoard + \"\\n\");\n outputArea.append(\"TRAVEL: $\" + travel + \"\\t\\t\" + \"TRAVEL: $\" + travel + \"\\n\");\n outputArea.append(\"FOOD: $\" + food + \"\\t\\t\" + \"FOOD: $\" + food + \"\\n\");\n outputArea.append(\"BOOKS: $\" + bookCostPerSemester + \"\\t\\t\" + \"BOOKS: $\" + bookCostPerSemester + \"\\n\");\n outputArea.append(\"TOTAL COST: $\" + fullTimeTotal + \"\\t\\t\" + \"TOTAL COST: $\" + partTimeTotal + \"\\n\");\n outputArea.append(\"\\nTIME COST PER DEGREE\\n\");\n outputArea.append(\"TIME FOR \" + hoursInADegree + \" HRS @ FULL TIME: \" + (double)(hoursInADegree / fullTimeHours) + \" SEMESTERS\\n\");\n outputArea.append(\"TIME FOR \" + hoursInADegree + \" HRS @ FULL TIME: \" + ((double)(hoursInADegree / fullTimeHours)) / semestersInAYear + \" YEARS\\n\");\n outputArea.append(\"TIME FOR \" + hoursInADegree + \" HRS @ PART TIME: \" + (double)(hoursInADegree / partTimeHours) + \" SEMESTERS\\n\");\n outputArea.append(\"TIME FOR \" + hoursInADegree + \" HRS @ PART TIME: \" + ((double)(hoursInADegree / partTimeHours)) / semestersInAYear + \" YEARS\\n\");\n\n\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\t\n\t\t{\n\t\t\t\n\t\t\tSystem.out.print(\"Enter the amount of oil ordered, in gallons: \"); //output to ask user test oil\n\t\t\tdouble oil = in.nextDouble(); //program waits and asks user for input\n\t\t\n\n\t\t\n\t\tif (oil >= 100) //if statement for oil greater than equal to 100\n\t\t{\n\t\t\tint discount = 1; //Displays prompt if user enters a value 100 or greater\n\t\t\tdouble pricePerGallon = 325.00;\n\t\t\tdouble pricePerGallon2 = 3.25;\n\t\t\tSystem.out.println(\"Number of gallons ordered: \" + oil + \" - $\" + pricePerGallon);\n\t\t\tSystem.out.println(\"Discount: \" + discount + \"% - $\" + pricePerGallon2);\n\t\t\tdouble total = pricePerGallon - pricePerGallon2;\n\t\t\tSystem.out.println(\"Your total charge is: $\" + total);\n\t\t}\n\t\telse if (oil >= 200) //if statement for oil greater than or equal to 200\n\t\t{\n\t\t int discount2 = 2; //Displays prompt if user enters a value of 200 or greater\n\t\t\tdouble pricePerGallon = 650.00;\n\t\t\tdouble pricePerGallon2 = 6.50;\n\t\t\tSystem.out.println(\"Number of gallons ordered: \" + oil + \" - $\" + pricePerGallon);\n\t\t\tSystem.out.println(\"Discount: \" + discount2 + \"% - $\" + pricePerGallon2);\n\t\t\tdouble total = pricePerGallon - pricePerGallon2;\n\t\t\tSystem.out.println(\"Your total charge is: $\" + total);\n\t\t}\n\t\telse if (oil >= 300) //if statement for oil greater than or equal to 300\n\t\t{\n\t\t\tint discount3 = 3; //Displays prompt if user enters a value 300 or greater\n\t\t\tdouble pricePerGallon = 975.00;\n\t\t\tdouble pricePerGallon2 = 9.75;\n\t\t\tSystem.out.println(\"Number of gallons ordered: \" + oil + \" - $\" + pricePerGallon);\n\t\t\tSystem.out.println(\"Discount: \" + discount3 + \"% - $\" + pricePerGallon2);\n\t\t\tdouble total = pricePerGallon - pricePerGallon2;\n\t\t\tSystem.out.println(\"Your total charge is: $\" + total);\n\t\t}\n\t\telse if (oil >= 400) //if statement for oil greater than or equal to 400\n\t\t{\n\t\t\tint discount4 = 4; //Displays prompt if user enters a value 400 or greater\n\t\t\tdouble pricePerGallon = 1300.00;\n\t\t\tdouble pricePerGallon2 = 13;\n\t\t\tSystem.out.println(\"Number of gallons ordered: \" + oil + \" - $\" + pricePerGallon);\n\t\t\tSystem.out.println(\"Discount: \" + discount4 + \"% - $\" + pricePerGallon2);\n\t\t\tdouble total = pricePerGallon - pricePerGallon2;\n\t\t\tSystem.out.println(\"Your total charge is: $\" + total);\n\t\t}\n\t\telse if (oil >= 500) //if statement for oil greater than or equal to 500\n\t\t{\n\t\t\tint discount5 = 5; //Displays prompt if user enters a value 500 or greater\n\t\t\tdouble pricePerGallon = 1625.00;\n\t\t\tdouble pricePerGallon2 = 16.25;\n\t\t\tSystem.out.println(\"Number of gallons ordered: \" + oil + \" - $\" + pricePerGallon);\n\t\t\tSystem.out.println(\"Discount: \" + discount5 + \"% - $\" + pricePerGallon2);\n\t\t\tdouble total = pricePerGallon - pricePerGallon2;\n\t\t\tSystem.out.println(\"Your total charge is: $\" + total);\n\t\t}\n\t\telse \n\t\t{\n\t\t\tSystem.out.print(\"Have a great day\"); //Displays message if the input of oil is less than 100 \n\t\t}\n\t\t\n\t\t}\n\t\t}", "public static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\") // Note that without this, input is never closed\n\t\tScanner input = new Scanner(System.in); // This will be to process input\n\t\t\n\t\t// Declare the new variables for the program\n\t\tdouble replacement_cost, min_insurance; // Declare the needed variables\n\t\t\t\n\t\t// Instantiate the program\n\t\tSystem.out.println(\"Welcome to the insurance calculation program!\");\n\t\tSystem.out.println(\"This program takes the replacement cost of your building, and then determines the minimum\");\n\t\tSystem.out.println(\"amount of insurance that you should purchase for the property!\");\n\t\t\n\t\t// Gather the inputs from the users\n\t\tSystem.out.println(\"What is the total replacement cost of the building that you own?\");\n\t\treplacement_cost = input.nextDouble(); // Pull in the next double\n\t\t\t\n\t\t// Calculate the replacement costs\n\t\tmin_insurance = replacement_cost * 0.8;\n\t\t\t\n\t\t// Return the output to the user\n\t\tSystem.out.println(\"Your building has a replacement cost of \" + format(replacement_cost));\n\t\tSystem.out.println(\"We recommend that you get at least \" + format(min_insurance) +\" dollars in insurance for your property!\");\t\t\t\n\t}", "public void cal_AdjustedFuelMoist(){\r\n\tADFM=0.9*FFM+0.5+9.5*Math.exp(-BUO/50);\r\n}", "public static void main(String[] args) {\n Scanner kb = new Scanner(System.in);\n System.out.print(\"Enter investment amount: \");\n double amountInvested = kb.nextDouble();\n System.out.print(\"Enter the annual interest rate in percentage: \");\n double annualInterestRate = kb.nextDouble();\n double monthlyInterestRate = (annualInterestRate / 100) / 12;\n System.out.print(\"Enter the number of years: \");\n int numberOfYears = kb.nextInt();\n\n //Calculate future investment value w/ given formula\n double futureInvestmentValue = amountInvested \n * Math.pow(1 + monthlyInterestRate, numberOfYears * 12);\n\n //Display resulting future investment amount on the console\n System.out.println(\"Accumulated value is $\" \n + (int)(futureInvestmentValue * 100) / 100.0);\n\n }", "private void CalculateJButtonActionPerformed(java.awt.event.ActionEvent evt) { \n // read the inputs and calculate payment of loan\n //constants for max values, and number of comoundings per year\n final double MAX_AMOUNT = 100000000;\n final double MAX_INTEREST_RATE = 100;\n final int COUMPOUNDINGS = 12;\n final double MAX_YEARS = 50;\n final double PERIOD_INTEREST = COUMPOUNDINGS * 100;\n String errorMessage = \"Please enter a positive number for all required fields\"\n + \"\\nLoan amount must be in reange (0, \" + MAX_AMOUNT + \"]\"\n + \"\\nInterest rate must be in range [0, \" + MAX_INTEREST_RATE + \"]\"\n + \"\\nYears must be in range [0, \" + MAX_INTEREST_RATE + \"]\";\n \n counter++;\n CounterJTextField.setText(String.valueOf(counter));\n \n //get inputs\n double amount = Double.parseDouble(PrincipalJTextField.getText());\n double rate = Double.parseDouble(RateJTextField.getText());\n double years = Double.parseDouble(YearsJTextField.getText());\n \n //calculate paymets using formula\n double payment = (amount * rate/PERIOD_INTEREST)/\n (1 - Math.pow((1 + rate/PERIOD_INTEREST),\n years * (-COUMPOUNDINGS)));\n double interest = years * COUMPOUNDINGS * payment - amount;\n \n //displays results\n DecimalFormat dollars = new DecimalFormat(\"$#,##0.00\");\n\n PaymentJTextField.setText(dollars.format(payment));\n InterestJTextField.setText(dollars.format(interest));\n \n }", "public static void main_refineSearch(){\n System.out.println(\"Enter a company to filter for: \");\n String companyFilter = input.nextLine();\n System.out.println(\"Enter a skill to filter for: \");\n String skillFilter = input.nextLine();\n System.out.println(\"Enter a college to filter for: \");\n String collegeFilter = input.nextLine();\n System.out.println(\"Enter the minimum GPA to filter for: \");\n String gpaString = input.nextLine();\n double gpaFilter;\n if(gpaString.equals(\"\")){\n gpaFilter = 0;\n }\n else {\n gpaFilter = Double.parseDouble(gpaString);\n if(gpaFilter > 4.0 || gpaFilter < 0.0) {\n System.out.println(\"Invalid GPA.\");\n main_menu();\n }\n }\n\n try{\n table.refineSearch(table, companyFilter, skillFilter,\n collegeFilter, gpaFilter);\n } catch (ApplicantNotFoundException ex){\n System.out.println(ex);\n main_menu();\n }\n\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 actionPerformed(ActionEvent e) {\n\t\t\t\tdouble investment = Double.parseDouble(Inv_amount.getText());\r\n\t\t\t\tdouble years = Double.parseDouble(YEARS.getText());\r\n\t\t\t\tdouble annual_interest_rate = Double.parseDouble(RATE.getText());\r\n\t\t\t\tCalculate total = new Calculate();\r\n\t\t\t\tcalc_total = total.get_future(investment, years, annual_interest_rate);\r\n\t\t\t\tFUTURE.setText(\"$\" +calc_total);\t\r\n\t\t\t}", "public void handleAddition() {\n\t\tString tempCryptoCurrency = cryptoCurrency.getText().toUpperCase();\n\t\t\n\t\tboolean notValid = !isCryptoInputValid(tempCryptoCurrency);\n\t\t\n\t\tif(notValid) {\n\t\t\ttempCryptoCurrency = null;\n\t\t}\n\t\t\n\t\t// is set to false in case a textField is empty \n\t\tboolean inputComplete = true;\n\t\t\n\t\t// Indicates whether the portfolio actually contains the number of coins to be sold\n\t\tboolean sellingAmountOk = true;\n\t\t\n\t\t/*\n\t\t * If the crypto currency is to be sold, a method is called that \n\t\t * checks whether the crypto currency to be sold is in the inventory at all.\n\t\t */\n\t\tif(type.getValue().toString() == \"Verkauf\" && cryptoCurrency.getText() != null ) {\t\n\t\t\tif(numberOfCoins.getText() == null || numberOfCoins.getText().isEmpty() || Double.valueOf(numberOfCoins.getText()) == 0.0) {\n\t\t\t\tsellingAmountOk = false;\n\t\t\t}else {\n\t\t\t\tsellingAmountOk = cryptoCurrencyAmountHold(Double.valueOf(numberOfCoins.getText()), cryptoCurrency.getText().toUpperCase());\n\t\t\t}\n\t\t\t\n\t\t} \n\t\t\n\t\t\n\t\tList<TextField> labelList = new ArrayList<>();\n\t\t\n\t\t// list of textFields which should be validate for input\n\t\tlabelList.add(price);\n\t\tlabelList.add(numberOfCoins);\n\t\tlabelList.add(fees);\n\t\t\t\n\t\t// validates if the textField input is empty\n\t\tfor (TextField textField : labelList) {\n\t\t\t\n\t\t\tif (textField.getText().trim().isEmpty()) {\n\t\t\t\tinputComplete = false;\n\t\t\t}\n\t\t\t\n\t\t\tif (validateFieldInput(textField.getText()) == false){\n\t\t\t\tinputComplete = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Logic to differentiate whether a warning is displayed or not.\n\t\tif (sellingAmountOk == false) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Eingabefehler\");\n\t\t\talert.getDialogPane().getStylesheets().add(getClass().getResource(\"Style.css\").toExternalForm());\n\t\t\talert.getDialogPane().getStyleClass().add(\"dialog-pane\");\n\t\t\talert.setHeaderText(\"Ungueltige Anzahl, bitte korrigieren\");\n\t\t\talert.showAndWait();\n\t\t}else if (inputComplete == false) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Eingabefehler\");\n\t\t\talert.getDialogPane().getStylesheets().add(getClass().getResource(\"Style.css\").toExternalForm());\n\t\t\talert.getDialogPane().getStyleClass().add(\"dialog-pane\");\n\t\t\talert.setHeaderText(\"Eingabe ist unvollstaendig oder ungueltig\");\n\t\t\talert.showAndWait();\n\t\t} else if (tempCryptoCurrency == null) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Eingabefehler\");\n\t\t\talert.getDialogPane().getStylesheets().add(getClass().getResource(\"Style.css\").toExternalForm());\n\t alert.getDialogPane().getStyleClass().add(\"dialog-pane\");\n\t\t\talert.setHeaderText(\"Symbol fuer Coin existiert nicht\");\n\t\t\talert.showAndWait();\n\t\t}\n\t\telse {\n\t\t\t// if no type is entered, \"Kauf\" is automatically set\n\t\t\tif (type.getValue() == null){\n\t\t\t\ttype.setValue(\"Kauf\");\n\t\t\t}\n\t\t\t\n\t\t\tif (datePicker.getValue() == null) {\n\t\t\t\tdatePicker.setValue(LocalDate.now());\n\t\t\t}\n\n\t\t\t// Calls a method for calculating the total\n\t\t\tDouble tempTotal = calculateTotal(type.getValue().toString(), Double.valueOf(price.getText()),\n\t\t\t\t\tDouble.valueOf(numberOfCoins.getText()), Double.valueOf(fees.getText()));\n\n\t\t\tDouble tempNbrOfCoins = Double.valueOf(numberOfCoins.getText());\n\n\t\t\t\n\t\t\tif (type.getValue().toString() == \"Verkauf\") {\n\t\t\t\ttempNbrOfCoins = tempNbrOfCoins * -1;\n\t\t\t}\n\n\t\t\tif (transaction == null) {\n\t\t\t\tsaveTransaction(Double.valueOf(price.getText()), fiatCurrency.getText(), datePicker.getValue(), tempCryptoCurrency,\n\t\t\t\t\t\ttype.getValue().toString(), tempNbrOfCoins, Double.valueOf(fees.getText()), tempTotal);\n\t\t\t} else {\n\t\t\t\tupdateTransaction(transaction, Double.valueOf(price.getText()), fiatCurrency.getText(), datePicker.getValue(),\n\t\t\t\t\t\ttempCryptoCurrency, type.getValue().toString(), tempNbrOfCoins, Double.valueOf(fees.getText()),\n\t\t\t\t\t\ttempTotal);\n\t\t\t}\n\t\t\tmainApp.openPortfolioDetailView();\n\n\t\t\t/*\n\t\t\t * Sets the transaction to zero to know whether to add a new transaction or\n\t\t\t * update an existing transaction when opening next time the dialog.\n\t\t\t */\n\t\t\tthis.transaction = null;\n\n\t\t}\n\t}", "private final void taxCalculations(){\n\r\n hraDeduction = totalHRA - 0.1*basicIncome;\r\n ltaDeduction = totalLTA - 0.7*totalLTA;\r\n\r\n //exemptions\r\n fundsExemption = fundsIncome - 150000; //upto 1.5 lakhs are exempted under IT Regulation 80C\r\n\r\n grossIncome = basicIncome + totalHRA + totalLTA + totalSpecialAl + fundsIncome ;\r\n\r\n totalDeduction = hraDeduction + ltaDeduction;\r\n\r\n totalTaxableIncome = grossIncome - (totalDeduction + fundsExemption);\r\n\r\n taxLiability = 0.05 * (totalTaxableIncome - 250000) + 0.2*(totalTaxableIncome - 500000);\r\n\r\n taxToPay = (cessPercent*taxLiability)/100 + taxLiability;\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint a = Integer.parseInt(field.getText());\n\t\t\t\tint b = Integer.parseInt(field2.getText());\n\t\t\t\tint c = a+b;\n\t\t\t\tlabel.setText(\"Value is: \" + c);\n\t\t\t}", "private void initiateEarnBlueEssenceFields(JFrame frame) {\r\n JLabel q1 = new JLabel(\"Add amount to mainAccount or altAccount?\");\r\n new Label(q1);\r\n// q1.setPreferredSize(new Dimension(750, 100));\r\n// q1.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(q1);\r\n\r\n JTextField account = new JTextField();\r\n new TextField(account);\r\n// account.setPreferredSize(new Dimension(750, 100));\r\n// account.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(account);\r\n\r\n JLabel q2 = new JLabel(\"Amount of Blue Essence Earned\");\r\n new Label(q2);\r\n// q2.setPreferredSize(new Dimension(750, 100));\r\n// q2.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(q2);\r\n\r\n JTextField amount = new JTextField();\r\n new TextField(amount);\r\n// amount.setPreferredSize(new Dimension(750, 100));\r\n// amount.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(amount);\r\n\r\n ImageIcon icon = new ImageIcon(\"./data/be.JPG\");\r\n JLabel label = new JLabel(icon);\r\n label.setPreferredSize(new Dimension(750, 100));\r\n frame.add(label);\r\n\r\n initiateEarnBlueEssenceEnter(frame, account, amount);\r\n }", "public void input() {\r\n System.out.print(\"Enter your employee ID number: \");\r\n ID = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your Gross Pay: \");\r\n grosspay = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your State Tax: \");\r\n Statetax = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your Federal Tax: \");\r\n Fedtax = enter.nextDouble(); }", "public void gpaConverter() {\r\n\t\tdouble numGPA = this.getNumGrade();\r\n\t\ttry {\r\n\t\t\tif (numGPA >= 4.0) {\r\n\t\t\t\tthis.letterGrade = \"A\"; }\r\n\t\t\tif (3.7 <= numGPA && numGPA < 4.0) {\r\n\t\t\t\tthis.letterGrade = \"A-\"; \r\n\t\t\t}\r\n\t\t\tif (3.3 <= numGPA && numGPA < 3.7) {\r\n\t\t\t\tthis.letterGrade = \"B+\";\r\n\t\t\t}\r\n\t\t\tif (3.0 <= numGPA && numGPA < 3.3) {\r\n\t\t\t\tthis.letterGrade = \"B\";\r\n\t\t\t}\r\n\t\t\tif (2.7 <= numGPA && numGPA < 3.0) {\r\n\t\t\t\tthis.letterGrade = \"B-\";\r\n\t\t\t}\r\n\t\t\tif (2.3 <= numGPA && numGPA < 2.7) {\r\n\t\t\t\tthis.letterGrade = \"C+\";\r\n\t\t\t}\r\n\t\t\tif (2.0 <= numGPA && numGPA < 2.3) {\r\n\t\t\t\tthis.letterGrade = \"C\";\r\n\t\t\t}\r\n\t\t\tif (1.7 <= numGPA && numGPA < 2.0) {\r\n\t\t\t\tthis.letterGrade = \"C-\";\r\n\t\t\t}\r\n\t\t\tif (1.3 <= numGPA && numGPA < 1.7) {\r\n\t\t\t\tthis.letterGrade = \"D+\";\r\n\t\t\t}\r\n\t\t\tif (1.0 <= numGPA && numGPA < 1.3) {\r\n\t\t\t\tthis.letterGrade = \"D\";\r\n\t\t\t}\r\n\t\t\tif (0.7 <= numGPA && numGPA < 1.0) {\r\n\t\t\t\tthis.letterGrade = \"D-\";\r\n\t\t\t}\r\n\t\t\tif (0.0 <= numGPA && numGPA < 0.7) {\r\n\t\t\t\tthis.letterGrade = \"F\";\r\n\t\t\t} \r\n\t\t}\r\n\t\tcatch (InputMismatchException e) {\r\n\t\t\tSystem.out.print(\"Input Mismatch Exception \");\r\n\t\t}\r\n\t\tcatch (NumberFormatException e) {\r\n\t\t\tSystem.out.print(\"Number Format Exception \");\r\n\t\t}\r\n\t\tcatch (Exception e) {}\r\n\t}", "private void billing_calculate() {\r\n\r\n // need to search patient before calculating amount due\r\n if (billing_fullNameField.equals(\"\")){\r\n JOptionPane.showMessageDialog(this, \"Must search for a patient first!\\nGo to the Search Tab.\",\r\n \"Need to Search Patient\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n if (MainGUI.pimsSystem.lookUpAppointmentDate(currentPatient).equals(\"\")){\r\n JOptionPane.showMessageDialog(this, \"No Appointment to pay for!\\nGo to Appointment Tab to make one.\",\r\n \"Nothing to pay for\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n // patient has been searched - get info from patient info panel\r\n else {\r\n\r\n currentPatient = MainGUI.pimsSystem.patient_details\r\n (pInfo_lastNameTextField.getText(), Integer.parseInt(pInfo_ssnTextField.getText()));\r\n // patient has a policy, amount due is copay: $50\r\n // no policy, amount due is cost amount\r\n double toPay = MainGUI.pimsSystem.calculate_charge(currentPatient, billing_codeCB.getSelectedItem().toString());\r\n billing_amtDueField.setText(\"$\" + doubleToDecimalString(toPay));\r\n\r\n\r\n\r\n JOptionPane.showMessageDialog(this, \"Amount Due Calculated.\\nClick \\\"Ok\\\" to go to Payment Form\",\r\n \"Calculate\", JOptionPane.DEFAULT_OPTION);\r\n\r\n paymentDialog.setVisible(true);\r\n }\r\n\r\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e)\r\n\t{\r\n\tdouble investment = Double.parseDouble(txtInv.getText());\r\n\tint year = Integer.parseInt(txtYr.getText());\r\n\tdouble interest = Double.parseDouble(txtRt.getText());\r\n\tif(e.getSource() == btnCal)\r\n\t{\r\n\tdouble res = invest * Math.pow((1 + interest/100), (year));\r\n\tSystem.out.println((10000 *\r\n\tMath.pow((3.25 + 1),36)));\r\n\ttxtRes.setText(String.valueOf(res));\r\n\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner myobj4 = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Input the value of Principal amount in $\");\r\n\t\tfloat P = myobj4.nextFloat();\r\n\t\t\r\n\t\tSystem.out.println(\"Input the value of time of interest in years\");\r\n\t\tfloat T = myobj4.nextFloat();\r\n\t\t\r\n\t\tSystem.out.println(\"Rate of interest %\");\r\n\t\tfloat R = myobj4.nextFloat();\r\n\t\t\r\n\t\tmyobj4.close();\r\n\t\t\r\n\t\tfloat Simple_Interest = P*T*R/100;\r\n\t\tSystem.out.println(\"Simple interest for \"+P+\"$ for \"+T+\" years and Rate of interest \"+R+\" % is \"+ Simple_Interest + \" $\");\r\n\t\t\r\n\t}", "public void femaleHightWeeks(){\n DatabaseAccess databaseAccess = DatabaseAccess.getInstance(getApplicationContext());////gets database instances\n databaseAccess.open();// opens the database connection\n etAge_h = findViewById(R.id.et_Hage);// gets the id of the editText_wAge(from the xml layout using this method\n BH = Double.parseDouble(etB_h.getText().toString());//BW is birth_weight changes the string value of user input to double\n CH = Double.parseDouble(etC_h.getText().toString());//CW is current_weight changes the string value of user input to double\n\n Age_week = etAge_h.getText().toString();//get text from user input in age text editer\n Age_w = Integer.valueOf(Age_week);//convert the string value of age_week in to integer\n\n if(Age_w<=13)//if age given in the input is less than or equal to 13 weeks\n {\n\n String p1st = databaseAccess.getGhw1p(Age_week);//we used the getGhw1p method to get 1%\n String p3rd = databaseAccess.getGhw3p(Age_week);//we used thegetgetGhw3p method to get 3%\n String p15th = databaseAccess.getGhw15p(Age_week);//we used the getGhw15P method to get 15%\n String p50th = databaseAccess.getGhw50p(Age_week);//we used the getGhw50p method to get 50%\n String p85th = databaseAccess.getGhw85p(Age_week);//we used the getGhw85p method to get 85%\n String p97th = databaseAccess.getGhw97p(Age_week);//we used the getGhw97p method to get 97%\n p1 = Double.parseDouble(p1st);//changes the string value of 1st % weight in kg to double type\n p3 = Double.parseDouble(p3rd);//changes the string value of 3% weight in kg to double type\n p15 = Double.parseDouble(p15th);//changes the string value of 15% weight in kg to double type\n p50 = Double.parseDouble(p50th);//changes the string value of 50% weight in kg to double type\n p85 = Double.parseDouble(p85th);//changes the string value of 85% weight in kg to double type\n p97 = Double.parseDouble(p97th);//changes the string value of 97% weight in kg to double type\n switch (Age_week) {\n case \"0\": {//case 0 is when age is given 0 week\n if (BH <= p1)//if BH Hight input is less than 1%\n {\n setContentView(R.layout.activity_result);//sets the content view to another layout the results will be displayed on activity_result layout.\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2\n tv.setText(\" growth rate is : 0 %\" );//sets text to the textviw tv\n GraphView g = findViewById(R.id.graph);//gets the id for graph\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {//creates line graph with datapoint series\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//sets title for the result\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setDataPointsRadius(10);//sets dataPoint radius to 10\n series4.setThickness(8);//sets dataPoint thickness to 8\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else if (BH >p1 &&BH <= p3)//if BH birth hight input is greater than 1% and less than or equal to 3 %\n {\n AG = (BH - p1);// AG Average gain is equal to BH mines the value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the value of 3% minus the value fo 1%\n GPW = (AG) / AGPW;// GPW gain per week rate is equal to the ratio of calculated Average gain per standard Average gain per week\n PercentH = (GPW * 0.02)+0.01; // Percentile Hight result\n setContentView(R.layout.activity_result); //sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {//creates line graph with datapoint series\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//sets title for the result\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (BH > p3 && BH <= p15)//if BH(birth hight) input is greater than 3% and less than or equal to 15 %\n {\n AG = (BH - p3);// AG Average gain is equal to BH minus the value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW; // AGPW;GPW gain per week rate is equal to the ratio of calculated Average gain per standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else if (BH > p15 && BH <= p50)//if BH(birth hight) input is greater than 15% and less than or equal to 50 %\n {\n AG = (BH - p15);// AG Average gain is equal to BH minus WHO standard value of value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain per standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n\n }\n else if (BH > p50 && BH <=p85)//if BH(birth hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (BH - p50);// AG Average gain is equal to BH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else if (BH > p85 && BH <=p97)//if BH(birth hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (BH - p85);// AG Average gain is equal to BH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_w, BH)});//gets the datapoint x,y values from user input age and birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n }\n break;\n case \"1\": //case 1 is when the given age is 1 week\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(0, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n\n break;\n case \"2\": //case 2 is when the given age is 2 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(0, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"3\": //case 3 is when the given age is 3 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(0, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n\n break;\n case \"4\": //case 4 is when the given age is 4 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(0, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(0, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"5\": //case 1 is when the given age is 1 week\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(1, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"6\": //case 6 is when the given age is 6 weeks\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(1, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"7\": //case 7 is when the given age is 7 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n { new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(1, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"8\": //case 8 is when the given age is 8 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(1, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(1, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"9\": //case 9 is when the given age is 9 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(2, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"10\": //case 10 is when the given age is 10 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(2, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"11\": //case 11 is when the given age is 11 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(2, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"12\": //case 12 is when the given age is 12 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(2, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\");//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(2, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n case \"13\": //case 13 is when the given age is 13 weekS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(3, CH)});//gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(3, CH)});//gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(3, CH)});//gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per week equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(3, CH)});//gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(3, CH)});//gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(3, CH)});//gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(3, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is set to 3 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n }\n break;\n }\n }\n\n else{\n\n Toast.makeText(getApplicationContext(),\"Fill Age In Months \",Toast.LENGTH_LONG).show();//pop up message\n }\n databaseAccess.close();//database connection closed\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n txt_inputtax = new javax.swing.JTextField();\n txt_inputinvestment = new javax.swing.JTextField();\n txt_inputbuyworth = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n txt_inputtax1 = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jButton3 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextPane1 = new javax.swing.JTextPane();\n jLabel5 = new javax.swing.JLabel();\n txt_inputinvestment1 = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jButton4 = new javax.swing.JButton();\n txt_inputinvestment2 = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jScrollPane2 = new javax.swing.JScrollPane();\n coinsoutput = new javax.swing.JTextPane();\n jScrollPane3 = new javax.swing.JScrollPane();\n jTextPane3 = new javax.swing.JTextPane();\n jLabel8 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jLabel10 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n txt_inputtax.setText(\"1.49\");\n txt_inputtax.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_inputtaxActionPerformed(evt);\n }\n });\n\n txt_inputinvestment.setHorizontalAlignment(javax.swing.JTextField.LEFT);\n txt_inputinvestment.setEnabled(false);\n txt_inputinvestment.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_inputinvestmentActionPerformed(evt);\n }\n });\n\n txt_inputbuyworth.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_inputbuyworthActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Calculate Profit\");\n jButton1.setEnabled(false);\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Clear\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Buy Tax (%)\");\n\n jLabel2.setText(\"Investment value (€)\");\n\n jLabel3.setText(\"Coin value on purchase (€)\");\n\n txt_inputtax1.setText(\"1.49\");\n txt_inputtax1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_inputtax1ActionPerformed(evt);\n }\n });\n\n jLabel4.setText(\"Sell Tax (%)\");\n\n jButton3.setText(\"Calculate Investment\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n jTextPane1.setEditable(false);\n jScrollPane1.setViewportView(jTextPane1);\n\n jLabel5.setText(\"Coins :\");\n\n txt_inputinvestment1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_inputinvestment1ActionPerformed(evt);\n }\n });\n\n jLabel6.setText(\"Amount of coins sold\");\n\n jButton4.setFont(new java.awt.Font(\"Dialog\", 1, 8)); // NOI18N\n jButton4.setText(\"Max\");\n jButton4.setEnabled(false);\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n txt_inputinvestment2.setEnabled(false);\n txt_inputinvestment2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_inputinvestment2ActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Coin value on sale (€)\");\n\n coinsoutput.setEditable(false);\n jScrollPane2.setViewportView(coinsoutput);\n\n jTextPane3.setEditable(false);\n jScrollPane3.setViewportView(jTextPane3);\n\n jLabel8.setText(\"Sell value :\");\n\n jLabel9.setText(\"Profit :\");\n\n jLabel10.setFont(new java.awt.Font(\"Dialog\", 2, 10)); // NOI18N\n jLabel10.setText(\"Diogo Silva, 2021\");\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(jButton3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(txt_inputinvestment2, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txt_inputbuyworth)\n .addComponent(txt_inputtax)\n .addComponent(txt_inputinvestment1)\n .addComponent(txt_inputinvestment, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txt_inputtax1, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4))))\n .addGroup(layout.createSequentialGroup()\n .addGap(13, 13, 13)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel7)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton4)))\n .addGap(0, 0, Short.MAX_VALUE))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jButton2))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8)\n .addComponent(jLabel9))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel10)\n .addGap(0, 0, Short.MAX_VALUE))\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(txt_inputtax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1)\n .addComponent(txt_inputtax1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txt_inputinvestment1, 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.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txt_inputbuyworth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton3)\n .addComponent(jLabel5)))\n .addComponent(jScrollPane2, 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.LEADING)\n .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txt_inputinvestment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(txt_inputinvestment2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel8)\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)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel9)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(18, 18, 18)\n .addComponent(jButton2)\n .addGap(29, 29, 29)\n .addComponent(jLabel10))\n );\n\n pack();\n }", "public static void main(String[] args) {\n\n final byte mounthsInYyears = 12; // mounts in years\n final byte ofPresentage = 100; // total presentage\n\n String input=null, inputs=null, inputsi=null;\n int myPrincipal = 0;\n float annualInterstRate=0, actuallRate=0, periodInMounths=0, period=0;\n boolean err=true;\n\n // running the program \n\n do{\n try{\n input = JOptionPane.showInputDialog(\"principal (1K shekels - 1M shekels): \");\n myPrincipal = Integer.parseInt(input);\n err=false;\n\n while (myPrincipal<1_000 || myPrincipal>1_000_000) { // create while loop becuse we check our condition until it works\n JOptionPane.showMessageDialog(null,\"Error, your principal should be a number between 1K to 1M! \"); // printing error line\n myPrincipal = Integer.parseInt(JOptionPane.showInputDialog(\"principal (1K shekels - 1M shekels): \")); // adding again the input line\n if (myPrincipal>1000 && myPrincipal<1000000) // declare our condition\n break; // if the condition will work we will break out of the loop\n }\n\n }catch(NumberFormatException e){\n e.printStackTrace();\n }\n }while(err);\n \n do{\n try{\n err = true;\n inputs = JOptionPane.showInputDialog(\"Annual Interst Rate: \");\n annualInterstRate = Float.parseFloat(inputs);\n err=false;\n while (annualInterstRate<0 || annualInterstRate>30) { // create while loop becuse we check our condition until it works\n JOptionPane.showMessageDialog(null,\"Error,enter a number between 0 to 30!\"); // printing error line\n annualInterstRate = Float.parseFloat(JOptionPane.showInputDialog(\"Annual Interst Rate: \"));\n if (myPrincipal>0 && myPrincipal<=30) // declare our condition\n break; // if the condition will work we will break out of the loop\n } \n actuallRate = annualInterstRate/(ofPresentage*mounthsInYyears); // creting new calculated variable \n\n }catch(NumberFormatException e){\n e.printStackTrace();\n }\n }while(err);\n\n do{\n try{\n err = true;\n inputsi = JOptionPane.showInputDialog(\"Period (Years):\");\n period = Float.parseFloat(inputsi);\n err=false;\n while (period<0 || period>30) { // create while loop becuse we check our condition until it works\n JOptionPane.showMessageDialog(null,\"Error,enter a number between 0 to 30!\"); // printing error line\n period = Float.parseFloat(JOptionPane.showInputDialog(\"Period (Years):\"));\n if (period>0 && period<=30) // declare our condition\n break; // if the condition will work we will break out of the loop\n }\n periodInMounths = period*mounthsInYyears; // creting new calculated variable\n\n }catch(NumberFormatException e){\n e.printStackTrace();\n }\n }while(err);\n \n // calculations\n float parenthesisValue = 1 + actuallRate;\n double parenthesisValuePower = Math.pow(parenthesisValue, periodInMounths);\n double Mortgage = myPrincipal * ((actuallRate * parenthesisValuePower)/(parenthesisValuePower -1 ));\n \n // formating statements\n NumberFormat currency = NumberFormat.getCurrencyInstance();\n String result = currency.format(Mortgage);\n \n JOptionPane.showMessageDialog(null, \"The Mortgage is \" + result); \n\n }", "public void changeText()\n {\n Double base = 1.0;\n Double exponent = 0.0;\n\n try\n {\n /*get the values of the text inputs and set them to their respective variable, converting them to\n a double*/\n base = Double.parseDouble(txtBase.getText());\n exponent = Double.parseDouble(txtExponent.getText());\n }\n catch (NumberFormatException e) {\n /*On NumberFormatException, do nothing. Suppresses errors in the console which we do not need to\n know about, this is an expected and solved issue.*/\n }\n\n //calculate the new result, based on the current values of exponent and base, then set it to the output.\n Double result = Math.pow(base, exponent);\n lblResult.setText(result.toString());\n }", "public static void main(String[] args) {\n\t\tdouble usd = 32.73;\n\t\tdouble eur = 37.84;\n\t\tdouble jpy = 28.35;\n\t\tdouble calusd = 0;\n\t\tdouble caleur = 0;\n\t\tdouble caljpy = 0;\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\n\t\tString in = JOptionPane.showInputDialog(\"Enter Baht :\");\n\t\tdouble nBaht = Integer.parseInt(in);\n\t\t\n\t\tString intype = JOptionPane.showInputDialog(\"usd = 1,eur = 2 ,jpy = 3 : \");\n\t\tint check = Integer.parseInt(intype);\n\t\tswitch (check) {\n\t\tcase 1:\n\t\t\tcalusd = Double.parseDouble(df.format(nBaht/usd));\n\t\t\tJOptionPane.showMessageDialog(null, calusd,\"USD\",JOptionPane.INFORMATION_MESSAGE);\n\t\t\tbreak;\t\n\t\tcase 2:\n\t\t\tcaleur = Double.parseDouble(df.format(nBaht/eur));\n\t\t\tJOptionPane.showMessageDialog(null, caleur,\"EUR\",JOptionPane.INFORMATION_MESSAGE);\n\t\t\tbreak;\t\t\n\t\tcase 3:\n\t\t\tcaljpy = Double.parseDouble(df.format(nBaht/jpy));\n\t\t\tJOptionPane.showMessageDialog(null, caljpy,\"JPY\",JOptionPane.INFORMATION_MESSAGE);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tJOptionPane.showMessageDialog(null, \"Currency not supported\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\tbreak;\n\t\t}\t\t\t\n\t}", "public static void main(String[] args) {\n\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Please enter amount of your purchase: \");\r\n\t\tdouble amountOfPurchase = scan.nextDouble();\r\n\t\tdouble stateTax = amountOfPurchase * 0.04;\r\n\t\tdouble countyTax = amountOfPurchase * 0.02;\r\n\t\tdouble totalSalesTax = stateTax + countyTax;\r\n\t\tdouble totalOfSale = amountOfPurchase + totalSalesTax;\r\n\t\tSystem.out.println(\"The amount of purchase: \" + amountOfPurchase + \"\\nThe state sales tax: \" + stateTax\r\n\t\t\t\t+ \"\\nThe county sales tax: \" + countyTax + \"\\nThe total sales tax: \" + totalSalesTax\r\n\t\t\t\t+ \"\\nThe total of sales: \" + totalOfSale);\r\n\r\n\t}", "public void actionPerformed(ActionEvent e)\r\n\t\t{\t//Fields\r\n\t\t\tString gallonsInput, milesInput;\r\n\t\t\tdouble gallons, miles;\r\n\t\t\tdouble mpg;\r\n\t\t\t\r\n\t\t\tgallonsInput = gallonsField.getText();\r\n\t\t\tmilesInput = milesField.getText();\r\n\t\t\t\r\n\t\t\tgallons = Double.parseDouble(gallonsInput);\r\n\t\t\tmiles = Double.parseDouble(milesInput);\r\n\t\t\t\r\n\t\t\tmpg = miles/gallons;\r\n\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(null, mpg + \" miles per gallon\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n System.out.print(\"Enter principle (long): \");\n long p = in.nextLong();\n System.out.print(\"Enter annual interest rate (double): \");\n double r = in.nextDouble();\n System.out.print(\"Enter number of times interest is compounded per year (int): \");\n int n = in.nextInt();\n System.out.print(\"Enter number of years invested (int): \");\n int t = in.nextInt();\n double a = compoundInterest(p, r, n, t);\n System.out.println(\"Compound interest including principal: \" + a);\n }", "public static void main(String[] args) {\n Scanner input=new Scanner(System.in);\n System.out.println(\"Enter investment amount: \");\n double inverstmentAmount=input.nextDouble();\n System.out.println(\"Enter annual interest rate in percentage:\");\n double rate=input.nextDouble();\n rate=rate/100/12;\n System.out.println(\"Enter number of years:\");\n double years=input.nextDouble();\n\n double furtureMoney= inverstmentAmount*(Math.pow((1+rate), years*12));\n System.out.println(furtureMoney);\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}", "private void updateGPA(Double calculate_gpa) {\n tableHomeFrame.updateGPA(calculate_gpa);\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( input_symbol == '+' || input_symbol == '-' || input_symbol == '*' || input_symbol == '/'){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// get result(String)\n\t\t\t\t\t\t\t\tget_result = txt_showresult.getText();\n\t\t\t\t\t\t\t\tresult = Double.parseDouble(get_result);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcalculate_equal();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public void guru() {\n\t\tGenerator solve = new Generator();\n\t\tsolve.guru();\n\t\tAnswer = solve.getEquationResult();\n\t\tTextView Equation = (TextView) findViewById(R.id.textView3);\n\t\tEquation.setText(solve.getEquation());\n\t}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the driving distance: \");\r\n\t\tdouble distance = input.nextDouble();\r\n\t\tSystem.out.println(\"Enter miles per gallon: \");\r\n\t\tdouble MPG = input.nextDouble();\r\n\t\tSystem.out.println(\"Enter price per gallon: \");\r\n\t\tdouble PPG = input.nextDouble();\r\n\t\tdouble costOfDriving = (distance / MPG) * PPG; \r\n\t\tSystem.out.println(\"The cost of driving is $\" \r\n\t\t\t\t+ (double)(int)(costOfDriving * 100) / 100);\r\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 }", "@Override\n public void handle(ActionEvent event) {\n double mealCost;\n double tax;\n double tip;\n double totalCost;\n double totalBill;\n mealCost = Double.parseDouble(numm1.getText());\n bill.setMealCost(mealCost);\n tax=bill.tax();\n numm2.setText(Double.toString(tax)+\"$\");\n tip=bill.tip();\n numm3.setText(Double.toString(tip)+\"$\");\n totalBill=bill.totalBill();\n numm4.setText(Double.toString(totalBill)+\"$\");\n \n }", "public void calcAction(View v) \n\t{\n\t\ttry\n\t\t{\n\t\t\tString initial = size.getText().toString(); /* the following gets user input, in order to do calculations */\n\t\t\tString end = \"Nothing\"; /* This is the default text in case the unexpected happens */\n\t\t\tunit = selection.getSelectedItem().toString(); /* this gets the unit of measure that the user specifies */\n\t\tdouble convert = Double.parseDouble(initial); /* this converts the size input to numerical data, in order for calculations to be done */\n\t\t\tcapacity.setStorage(convert); /* send input to external class */\n\t\t\tDecimalFormat twop = new DecimalFormat(\"#.##\"); /* created new object, in order to format output to display two decimal places at most */\n\n\t\t\t/* the following conditional statement reads the unit of measure specify by the user, puts the data into the proper formula, and returns the results */\n\n\t\t\tif (unit.equals(\"KB\")) // runs if user specifies KB\n\t\t\t{\n\t\t\t\tend = twop.format(capacity.getKB());\n\t\t\t}\n\n\t\t\telse if (unit.equals(\"MB\")) /* runs if user specifies MB */\n\t\t\t{\n\t\t\t\tend = twop.format(capacity.getMB());\n\t\t\t}\n\n\t\t\telse if (unit.equals(\"GB\")) /* runs if user specifies GB */\n\t\t\t{\n\t\t\t\tend = twop.format(capacity.getGB());\n\t\t\t}\n\n\t\t\telse if (unit.equals(\"TB\")) /* runs if user specifies TB */\n\t\t\t{\n\t\t\t\tend = twop.format(capacity.getTB());\n\t\t\t}\n\n\t\t\telse if (unit.equals(\"PB\")) /* runs if user specifies PB */\n\t\t\t{\n\t\t\t\tend = twop.format(capacity.getPB());\n\t\t\t}\n\n\t\t\telse if (unit.equals(\"EB\")) /* runs if user specifies EB */\n\t\t\t{\n\t\t\t\tend = twop.format(capacity.getEB());\n\t\t\t}\n\n\t\t\telse if (unit.equals(\"ZB\")) /* runs if user specifies ZB */\n\t\t\t{\n\t\t\t\tend = twop.format(capacity.getZB());\n\t\t\t}\n\n\t\t\telse if (unit.equals(\"YB\")) /* runs if user specifies YB */\n\t\t\t{\n\t\t\t\tend = twop.format(capacity.getYB());\n\t\t\t}\n\n\t\t\telse; // send default text, if unexpected happens.\n\n\t\t\tresult.setText(end); // display results\n\t\t}\n\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\tAlertDialog.Builder m = new AlertDialog.Builder(this);\n\t\t\tm.setTitle(R.string.error); // set dialog title\n\t\t\tm.setMessage(R.string.error_message).setCancelable(true).setPositiveButton(R.string.ok, new DialogInterface.OnClickListener()\n\t\t\t{\n\t\t\t\tpublic void onClick(DialogInterface dialog, int id)\n\t\t\t\t{\n\t\t\t\t\tdialog.cancel();\n\t\t\t\t}\n\t\t\t});\n\t\t\tm.create();\n\t\t\tm.show();\n\t\t}\t\n\t}", "public void calcular() {\n int validar, c, d, u;\n int contrasena = 246;\n c = Integer.parseInt(spiCentenas.getValue().toString());\n d = Integer.parseInt(spiDecenas.getValue().toString());\n u = Integer.parseInt(spiUnidades.getValue().toString());\n validar = c * 100 + d * 10 + u * 1;\n //Si es igual se abre.\n if (contrasena == validar) {\n etiResultado.setText(\"Caja Abierta\");\n }\n //Si es menor nos indica que es mas grande\n if (validar < contrasena) {\n etiResultado.setText(\"El número secreto es mayor\");\n }\n //Si es mayot nos indica que es mas pequeño.\n if (validar > contrasena) {\n etiResultado.setText(\"El número secreto es menor\");\n }\n }", "public double getGPA(){\n if (grade == \"F-\")\n gpa =0.0 ;\n else if (grade == \"D\")\n gpa =1.0 ;\n else if (grade == \"C\")\n gpa =2.0 ;\n else if (grade == \"C+\")\n gpa =2.5 ;\n else if (grade == \"B\")\n gpa =3.0 ;\n else if (grade == \"B\")\n gpa =3.5 ;\n else if (grade == \"A\")\n gpa =4.0 ;\n return gpa;\n}", "private void calcPrice() {\n double itemPrice = 0;\n \n //get price of burger (base)\n if (singleRad.isSelected())\n {\n itemPrice = 3.50;\n }\n else \n {\n itemPrice = 4.75;\n }\n \n //check options add to item price\n if(cheeseCheckbox.isSelected())\n itemPrice = itemPrice += 0.50;\n if(baconCheckbox.isSelected())\n itemPrice = itemPrice += 1.25;\n if(mealCheckbox.isSelected())\n itemPrice = itemPrice += 4.00;\n \n //include the quantity for the item price\n int quantity= 1;\n if (quantityTextField.getText().equals(\"\"))\n quantityTextField.setText(\"1\");\n quantity = Integer.parseInt(quantityTextField.getText());\n itemPrice = itemPrice * quantity;\n\n \n //show the price no $ symbol\n \n itemPriceTextField.setText(d2.format(itemPrice));\n }", "public static void main(String[] args) {\n Scanner userInput = new Scanner(System.in);\n System.out.println(\"Please enter 3 numbers.\");\n int a = userInput.nextInt();\n int b = userInput.nextInt();\n int c = userInput.nextInt();\n\n System.out.println(\"Myavarage is\" + findAvarage(a, b, c));\n }", "public static void main(String[] args) {\n\n System.out.print(\"Input an annual interest rate: \");\n float annualInterestRate = getNumber();\n \n System.out.print(\"Input a starting principal: \");\n float principal = getNumber();\n \n System.out.print(\"Input total years in fund: \");\n float yearsInFund = getNumber();\n \n System.out.print(\"Quarterly, monthly or daily? \");\n String answer = getInput();\n \n System.out.println(\"\");\n \n \n \n float currentBalance = principal;\n int year = 2017;\n float quarterlyInterestMultiplier = (1 + (annualInterestRate/4) /100);\n System.out.println(\"q\" + quarterlyInterestMultiplier);\n float monthlyInterestMultiplier = (1 + (annualInterestRate/12) /100);\n System.out.println(\"q\" + monthlyInterestMultiplier);\n float dailyInterestMultiplier = (1 + (annualInterestRate/365) /100);\n System.out.println(\"q\" + dailyInterestMultiplier);\n // System.out.println(monthlyInterestMultiplier);\n \n \n for (int i = 0; i < yearsInFund; i++) {\n \n if (answer.equals(\"quarterly\")) {\n float pastBalance = currentBalance;\n System.out.println(\"The current year is: \" + year);\n System.out.println(\"Current principal is: \" + currentBalance);\n for (int j = 0; j < 4; j++) {\n currentBalance *= quarterlyInterestMultiplier;\n }\n System.out.println(\"Total anticipated interest is: \" + (currentBalance - pastBalance));\n System.out.println(\"Expected principal at the end of \" + year + \" is: \" + currentBalance);\n System.out.println(\"\");\n year++;\n } else if (answer.equals(\"monthly\")) {\n for (int k = 0; k < 12; k++) {\n switch (k) {\n case 0:\n System.out.println(\"The current month is January \" + year);\n break;\n case 1:\n System.out.println(\"The current month is February \" + year);\n break;\n case 2:\n System.out.println(\"The current month is March \" + year);\n break;\n case 3:\n System.out.println(\"The current month is April \" + year);\n break;\n case 4:\n System.out.println(\"The current month is May \" + year);\n break;\n case 5:\n System.out.println(\"The current month is June \" + year);\n break;\n case 6:\n System.out.println(\"The current month is July \" + year);\n break;\n case 7:\n System.out.println(\"The current month is August \" + year);\n break;\n case 8:\n System.out.println(\"The current month is September \" + year);\n break;\n case 9:\n System.out.println(\"The current month is October \" + year);\n break;\n case 10:\n System.out.println(\"The current month is November \" + year);\n break;\n case 11:\n System.out.println(\"The current month is December \" + year);\n break;\n default:\n }\n float pastBalance = currentBalance;\n System.out.println(\"The current principal is: \" + currentBalance);\n currentBalance *= monthlyInterestMultiplier;\n System.out.println(\"Total anticipated interest is: \" + (currentBalance - pastBalance));\n System.out.println(\"Expected principal at the end of this month is: \" + currentBalance);\n System.out.println(\"\");\n }\n year++;\n } else if (answer.equals(\"daily\")) {\n for (int l = 0; l < 365; l++) {\n System.out.println(\"Today is day \" + (l+1) + \", \" + year);\n float pastBalance = currentBalance;\n System.out.println(\"The current principal is: \" + currentBalance);\n currentBalance *= dailyInterestMultiplier;\n System.out.println(\"Total anticipated interest by the end of day is: \" + (currentBalance - pastBalance));\n System.out.println(\"Expected principal at the end of the day is: \" + currentBalance);\n System.out.println(\"\");\n }\n year++;\n }\n \n }\n \n System.out.println(currentBalance);\n \n }", "public static void main(String[] args) {\n\n // DataType variableName = Data;\n\n double HourlyRate= 55;\n double stateTaxRate= 0.04;\n double federalTaxRate= 0.22;\n byte weeklyHours= 40;\n byte totalWeeks=52;\n\n // salary=hourlyRate * weeklyHours * 52\n double salary = HourlyRate * weeklyHours * totalWeeks; //salary before tax\n\n //stateTax=salary * stateTaxRate\n double stateTax=salary * stateTaxRate;\n\n // federalTax= salary * federaltaxRate\n double federalTax= salary * federalTaxRate;\n\n //salaryAfterTax = salary - stateTax - fedaralTax\n double salaryAfterTax = salary - (stateTax + federalTax);\n\n System.out.println(\"Your salary is: $\"+salary); //concatenation\n\n /*\n System.out.println(\"9\" + 3); // 93->concatenation\n System.out.println(9+\"3\"); // 93-> concatenation\n System.out.println(9 + 3); // 12-> addition */\n\n\n System.out.println(\"State Tax is: $\"+stateTax);\n System.out.println(\"Federal Tax is: $\"+ federalTax);\n System.out.println(\"Total Tax is: $\" + (federalTax + stateTax) );\n System.out.println(\"Your salary after tax is: $\"+salaryAfterTax);\n\n\n\n\n\n\n\n\n\n }", "public static void main(String[] args) {\n\r\n computeAward(name, gpa); //passes name and gpa to computeAward method\r\n\r\n }", "public static void main(String[] args) {\n\t\tdouble iva=0.21;\n\t\tString precio=JOptionPane.showInputDialog(\"Introduce el precio:\");\n\t\tdouble precioFinal=(Double.parseDouble(precio)*iva)+Double.parseDouble(precio);\n\t\t\n\t\tJOptionPane.showMessageDialog(null,\"el iva en este producto es: \" \n\t\t+ Double.parseDouble(precio)*iva);\n\t\t\n\t\tJOptionPane.showMessageDialog(null,\"el precio final con iva es: \" \n\t\t+ precioFinal);\n\n\n\t}", "public static double normalizedGPA()\n {\n System.out.println(\"\\t Overall GPA?\");\n double overallGPA = console.nextDouble();\n System.out.println(\"\\t Max GPA?\");\n double maxGPA = console.nextDouble();\n System.out.println(\"\\t Transcript Multiplier? \");\n double transcriptMultiplier = console.nextDouble();\n double calculations = (overallGPA/maxGPA)*100*transcriptMultiplier;\n return calculations;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t String number = tfNumber.getText();\n\t\t Float a = new Float(number);\n\t\t \n\t\t boolean allRight = new TestJDBC().amend_money(name, a);\n\t\t if(allRight) {\n\t\t \tnew Gui().customer_frame(name);\n\t\t \tJFrame f2 = Judge.showOK(number+\"yuan havd been added in your acount!\");\n\t\t \tf2.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\t \tf2.setVisible(true);\n\t\t }else {\n\t\t \tnew Gui().customer_frame(name);\n\t\t \tJFrame f2 = Judge.showNO(\"Fail to add money,there must be something wrong!\");\n\t\t \tf2.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\t \tf2.setVisible(true);\n\t\t }\n\t\t f1.dispose();\n\t\t \n\t\t\t}", "public static void main(String[] args) {\n\t\t\t\r\n\r\n\t\t\tScanner sc = new Scanner(System.in);\r\n\r\n\t\t\tSystem.out.println(\"Bitte geben Sie ihr Körpergewicht in KG an: \");\r\n\t\t\tdouble Gewicht = sc.nextDouble();\r\n\t\t\tSystem.out.print(\"Bitte geben Sie ihre Körpergröße in m an: \");\r\n\t\t\tdouble Groesse = sc.nextDouble();\r\n\t\t\tSystem.out.print(\"Bitte geben Sie ihr Alter an: \");\r\n\t\t\tdouble Alter = sc.nextDouble();\r\n\t\t\t\r\n\t\t\tdouble BMI = Gewicht/(Groesse*Groesse);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Der BMI Beträgt \" + BMI);\r\n\t\t\tSystem.out.println(\"__________________________\");\r\n\r\n\t\tif (Alter >= 19 && Alter <= 24) {\r\n\t\t\tif (BMI >= 19 && BMI <= 24) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 19) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 24) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (Alter >= 25 && Alter <= 34) {\r\n\t\t\tif (BMI >= 20 && BMI <= 25) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 20) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 25) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (Alter >= 35 && Alter <= 44) {\r\n\t\t\tif (BMI >= 21 && BMI <= 26) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 21) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 26) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (Alter >= 45 && Alter <= 54) {\r\n\t\t\tif (BMI >= 22 && BMI <= 27) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 22) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 27) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (Alter >= 55 && Alter <= 64) {\r\n\t\t\tif (BMI >= 23 && BMI <= 28) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 23) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 28) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (Alter >= 64) {\r\n\t\t\tif (BMI >= 24 && BMI <= 29) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 24) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 29) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t}", "private void calculate () {\n try {\n char[] expression = expressionView.getText().toString().trim().toCharArray();\n String temp = expressionView.getText().toString().trim();\n for (int i = 0; i < expression.length; i++) {\n if (expression[i] == '\\u00D7')\n expression[i] = '*';\n if (expression[i] == '\\u00f7')\n expression[i] = '/';\n if (expression[i] == '√')\n expression[i] = '²';\n }\n if (expression.length > 0) {\n Balan balan = new Balan();\n double realResult = balan.valueMath(String.copyValueOf(expression));\n int naturalResult;\n String finalResult;\n if (realResult % 1 == 0) {\n naturalResult = (int) Math.round(realResult);\n finalResult = String.valueOf(naturalResult);\n } else\n finalResult = String.valueOf(realResult);\n String error = balan.getError();\n // check error\n if (error != null) {\n mIsError = true;\n resultView.setText(error);\n if (error == \"Error div 0\")\n resultView.setText(\"Math Error\");\n } else { // show result\n expressionView.setText(temp);\n resultView.setText(finalResult);\n }\n }\n } catch (Exception e) {\n Toast.makeText(this,e.toString(),Toast.LENGTH_LONG);\n }\n }", "public void femaleHightMonths(){\n {\n DatabaseAccess databaseAccess = DatabaseAccess.getInstance(getApplicationContext());////gets database instances\n databaseAccess.open();// opens the database connection\n etAge_h = findViewById(R.id.et_Hage);;// gets the id of the editText_wAge(from the xml layout using this method\n BH = Double.parseDouble(etB_h.getText().toString());//BW is birth_weight changes the string value of user input to double\n CH = Double.parseDouble(etC_h.getText().toString());//CW is current_weight changes the string value of user input to double\n\n Age_month = etAge_h.getText().toString();//get text from user input in age text editer\n Age_m = Integer.valueOf(Age_month);//convert the string value of age_week in to integer\n if(Age_m<=13)//if age given in the input is less than or equal to 13 weeks\n {\n\n String p1st = databaseAccess.getGhm1p(Age_month);//we used the getGhm1p method to get 1%\n String p3rd = databaseAccess.getGhm3p(Age_month);//we used the getGhm3p method to get 3%\n String p15th = databaseAccess.getGhm15p(Age_month);//we used the getGhm15p method to get 15%\n String p50th = databaseAccess.getGhm50p(Age_month);//we used the getGhm50p method to get 50%\n String p85th = databaseAccess.getGhm85p(Age_month);//we used the getGhm85p method to get 85%\n String p97th = databaseAccess.getGhm97p(Age_month);//we used the getGhm97p method to get 97%\n p1 = Double.parseDouble(p1st);//changes the string value of 1st % weight in kg to double type\n p3 = Double.parseDouble(p3rd);//changes the string value of 3% weight in kg to double type\n p15 = Double.parseDouble(p15th);//changes the string value of 15% weight in kg to double type\n p50 = Double.parseDouble(p50th);//changes the string value of 50% weight in kg to double type\n p85 = Double.parseDouble(p85th);//changes the string value of 85% weight in kg to double type\n p97 = Double.parseDouble(p97th);//changes the string value of 97% weight in kg to double type\n switch (Age_month) {\n case \"0\": {//case 0 is when age is given 0\n if (BH <= p1)//if BH Hight input is less than 1%\n {\n setContentView(R.layout.activity_result);//sets the content view to another layout the results will be displayed on activity_result layout.\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2\n tv.setText(\" growth rate is : 0 %\" );//sets text to the textviw tv\n GraphView g = findViewById(R.id.graph);//gets the id for graph\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {//creates line graph with datapoint series\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//sets title for the result\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setDataPointsRadius(10);//sets dataPoint radius to 10\n series4.setThickness(8);//sets dataPoint thickness to 8\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else if (BH >p1 &&BH <= p3)//if BH birth hight input is greater than 1% and less than or equal to 3 %\n {\n AG = (BH - p1);// AG Average gain is equal to BH mines the value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the value of 3% minus the value fo 1%\n GPW = (AG) / AGPW;// GPW gain per month rate is equal to the ratio of calculated Average gain per standard Average gain per month\n PercentH = (GPW * 0.02)+0.01; // Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {//creates line graph with datapoint series\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//sets title for the result\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (BH > p3 && BH <= p15)//if BH(birth hight) input is greater than 3% and less than or equal to 15 %\n {\n AG = (BH - p3);// AG Average gain is equal to BH minus the value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG)/AGPW; // AGPW;GPW gain per month rate is equal to the ratio of calculated Average gain per standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n }\n else if (BH > p15 && BH <= p50)//if BH(birth hight) input is greater than 15% and less than or equal to 50 %\n {\n AG = (BH - p15);// AG Average gain is equal to BH minus WHO standard value of value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain per standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls Hight to age growth chart\n\n }\n else if (BH > p50 && BH <=p85)//if BH(birth hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (BH - p50);// AG Average gain is equal to BH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (BH > p85 && BH <=p97)//if BH(birth hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (BH - p85);// AG Average gain is equal to BH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, BH)});//gets the datapoint x,y values from user input age and birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"100%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"1\": //case 1 is when the given age is 1 month\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is given user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per week equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to user input age,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n\n break;\n case \"2\": //case 2 is when the given age is 2 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO boys hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"3\": //case 3 is when the given age is 3 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per week equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user imput age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n\n break;\n case \"4\": //case 4 is when the given age is 4 MONTHS\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per week equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"5\": //case 5 is when the given age is 5 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO gight hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per week equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per week\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to 0 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value form user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"6\": //case 6 is when the given age is 6 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"7\": //case 7 is when the given age is 7 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n { new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hightto age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls weight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"8\": //case 8 is when the given age is 8 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to 1 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO gight hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"9\": //case 9 is when the given age is 9 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"10\": //case 10 is when the given age is 10 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"11\": //case 11 is when the given age is 11 months\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value fromu user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n case \"12\": //case 12 is when the given age is 12 month\n {\n if (CH <= p1)//If current_hight input is less than or equal to WHO standard value of 1%\n {\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 0 %\" );//seta text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setTitle(\"0%\");//seta text to textview tv\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH >p1 &&CH <= p3)//if CH(current_hight) input is greater than 1% and less than or equal to 3%\n {\n AG = (CH - p1);// AG Average gain is equal to CH minus WHO standard value of 1%\n AGPW = p3-p1;//AGPW is Who standard average gain per month equal to the WHO Standard value of 3% minus 1%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.02)+0.01;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n\n else if (CH > p3 && CH <= p15)//if CH(current_hight) input is greater than 3% and less than or equal to 15%\n {\n AG = (CH - p3);// AG Average gain is equal to CH minus WHO standard value of 3%\n AGPW = p15-p3;//AGPW is Who standard average gain per month equal to the WHO Standard value of 15% minus 3%\n GPW = (AG) / AGPW;//GPW gain per week rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.03;// Percentile Hight result\n\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//seta text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value is set to 2 because WHO Standard growth chart uses age in months ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p15 && CH <= p50)//if CH(current_hight) input is greater than 15% and less than or equal to 50%\n {\n AG = (CH - p15);// AG Average gain is equal to CH minus WHO standard value of 15%\n AGPW = p50-p15;//AGPW is Who standard average gain per month equal to the WHO Standard value of 50% minus 15%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.15;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//seta text to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n\n }\n else if (CH > p50 && CH <=p85)//if CH(current_hight) input is greater than 50% and less than or equal to 85%\n {\n AG = (CH - p50);// AG Average gain is equal to CH minus WHO standard value of 50%\n AGPW = p85-p50;//AGPW is Who standard average gain per month equal to the WHO Standard value of 85% minus 50%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.35)+0.5;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[]//creates line graph with datapoint series arry\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value fromuser input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else if (CH > p85 && CH <=p97)//if CH(current_hight) input is greater than 85% and less than or equal to 97%\n {\n AG = (CH - p85);// AG Average gain is equal to CH minus WHO standard value of 85%\n AGPW = p97-p85;//AGPW is Who standard average gain per month equal to the WHO Standard value of 97% minus 85%\n GPW = (AG) / AGPW;//GPW gain per month rate is equal to the ratio of calculated Average gain and standard Average gain per month\n PercentH = (GPW * 0.12)+0.85;// Percentile Hight result\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : \" + String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n GraphView g = findViewById(R.id.graph); //gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] //creates line graph with datapoint series araay\n {\n new DataPoint(Age_m, CH)});//gets the datapoint x value from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(String.valueOf(rate.format(PercentH)));//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n else {\n //when the given CH is greater than WHO standard value of 97%\n setContentView(R.layout.activity_result);//sets content view to activity_result so that the result will be displayed on this other layout\n TextView tv = findViewById(R.id.result_h);//gets the id for textView_R2 from activity_result layout\n tv.setText(\" growth rate is : 100 %\" );//set a text to textview tv\n GraphView g = findViewById(R.id.graph);//gets the id for the graph from activity_result layout\n LineGraphSeries<DataPoint> series4 = new LineGraphSeries<>(new DataPoint[] {\n new DataPoint(Age_m, CH)}); //creates line graph with datapoint series array\n //gets the datapoint x value is from user input age ,y values from user input birth_hight\n g.addSeries(series4);//add the data point series in the graph\n series4.setColor(Color.BLACK);//sets the line graph color to black\n series4.setDrawDataPoints(true);//shows datapoints on the graph\n series4.setTitle(\"100%\");//set a text using string value of the result to textview tv\n graphGirlsH();//WHO girls hight to age growth chart\n }\n }\n break;\n\n }\n }\n\n else{\n\n Toast.makeText(getApplicationContext(),\"The app is valid for Age up to 12 months \",Toast.LENGTH_LONG).show();//pop up message\n }\n databaseAccess.close();//database connection closed\n }\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n \tNumberFormat intFormat = NumberFormat.getInstance();\n NumberFormatter formatter = new NumberFormatter(intFormat);\n formatter.setValueClass(Integer.class);\n formatter.setMinimum(1);\n formatter.setMaximum(9999999);\n formatter.setAllowsInvalid(false);\n // If you want the value to be committed on each keystroke instead of focus lost\n formatter.setCommitsOnValidEdit(true);\n \n \n NumberFormat doubleFormat = NumberFormat.getInstance();\n NumberFormatter dformatter = new NumberFormatter(doubleFormat);\n dformatter.setValueClass(Double.class);\n dformatter.setMinimum(1.0);\n dformatter.setMaximum(100000.0);\n dformatter.setAllowsInvalid(false);\n // If you want the value to be committed on each keystroke instead of focus lost\n dformatter.setCommitsOnValidEdit(true);\n \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 accountNumberField = new JFormattedTextField(formatter);\n \n ifscField = new javax.swing.JTextField();\n amountField = new JFormattedTextField(dformatter);\n passwordField = new javax.swing.JPasswordField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Calibri\", 0, 24)); // NOI18N\n jLabel1.setText(\"FUNDS TRANSFER \");\n\n jLabel2.setFont(new java.awt.Font(\"Times New Roman\", 0, 17)); // NOI18N\n jLabel2.setText(\"A/C Number\");\n\n jLabel3.setFont(new java.awt.Font(\"Times New Roman\", 0, 17)); // NOI18N\n jLabel3.setText(\"IFSC Code\");\n\n jLabel4.setFont(new java.awt.Font(\"Times New Roman\", 0, 17)); // NOI18N\n jLabel4.setText(\"Amount\");\n\n jLabel5.setFont(new java.awt.Font(\"Arial\", 1, 18)); // NOI18N\n jLabel5.setText(\"Re-enter Password \");\n\n jButton1.setFont(new java.awt.Font(\"Gadugi\", 1, 14)); // NOI18N\n jButton1.setText(\"OKAY\");\n\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n okayActionPerformed(evt);\n }\n });\n \n jButton2.setFont(new java.awt.Font(\"Gadugi\", 1, 14)); // NOI18N\n jButton2.setText(\"EXIT\");\n \n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n FundsTransferScreen.this.dispose();\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(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(292, 292, 292))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(176, 176, 176)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel5))\n .addGap(86, 86, 86)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(passwordField)\n .addComponent(amountField, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)\n .addComponent(ifscField)\n .addComponent(accountNumberField)))\n .addGroup(layout.createSequentialGroup()\n .addGap(255, 255, 255)\n .addComponent(jButton1)\n .addGap(151, 151, 151)\n .addComponent(jButton2)))\n .addContainerGap(255, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(54, 54, 54)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(accountNumberField, 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(jLabel3)\n .addComponent(ifscField, 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(jLabel4)\n .addComponent(amountField, 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(jLabel5)\n .addComponent(passwordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 47, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(41, 41, 41))\n );\n\n pack();\n }", "public static void main(String[] args) {\n\t\t\n\t\tint CarInsurance = 370+170;\n\t\tint HealthInsurancePlusCollege = 1400+170;\n\t\tint aptFees = 650;\n\t\tint perHour = 90 ;\n\t\tint interestRate = 16;\n\t\tint insource = perHour * 160 *(100-interestRate)/100 ;\n\t\tint trainFee = 150;\n\t\tint MonthlyFoodAndExpense = 500;\n\t\tint LoanPaymentMonthly = 800;\n\t\tint save = insource - (CarInsurance + HealthInsurancePlusCollege + aptFees + trainFee + MonthlyFoodAndExpense + LoanPaymentMonthly);\n\n\t\tSystem.out.print(\"Salary = \"+ insource + \" yearly Salary = \" +insource * 12 +\" Saved money = \" + save + \", In year = \" + save *12);\n\n\n\t}", "public void actionPerformed(ActionEvent a){\r\n\r\n\r\n\t\ttry{\r\n\t\t\t\t/* |-------- Handling Exceptions ---------| */\r\n\r\n\r\n\t\t\tif(a.getSource()==num0){\r\n\t\t\t\tvalue+=0;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num1){\r\n\t\t\t\tvalue+=1;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num2){\r\n\t\t\t\tvalue+=2;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num3){\r\n\t\t\t\tvalue+=3;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num4){\r\n\t\t\t\tvalue+=4;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num5){\r\n\t\t\t\tvalue+=5;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num6){\r\n\t\t\t\tvalue+=6;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num7){\r\n\t\t\t\tvalue+=7;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num8){\r\n\t\t\t\tvalue+=8;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num9){\r\n\t\t\t\tvalue+=9;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t\tif (a.getSource() == bAdd){\r\n\t\t\t\tv1 = Double.parseDouble( tField.getText() );\r\n\t\t\t\tctr=0;\r\n\t\t\t\to = '+';\r\n\t\t\t\tvalue=\"\";\r\n\t\t\t\ttField.setText(\"\" +value);\r\n\t\t\t}\r\n\r\n\t\t\tif (a.getSource() == bSub){\r\n\t\t\t\t\tv1 = Double.parseDouble( tField.getText() );\r\n\t\t\t\t\tctr=0;\r\n\t\t\t\t\to = '-';\r\n\t\t\t\t\tvalue=\"\";\r\n\t\t\t\t\ttField.setText(\"\" +value);\r\n\t\t\t}\r\n\r\n\t\t\tif (a.getSource() == bMul){\r\n\t\t\t\t\tv1 = Double.parseDouble( tField.getText() );\r\n\t\t\t\t\tctr=0;\r\n\t\t\t\t\to = 'x';\r\n\t\t\t\t\tvalue=\"\";\r\n\t\t\t\t\ttField.setText(\"\" +value);\r\n\t\t\t}\r\n\r\n\t\t\tif (a.getSource() == bDiv){\r\n\t\t\t\t\tv1 = Double.parseDouble( tField.getText() );\r\n\t\t\t\t\tctr=0;\r\n\t\t\t\t\to = '/';\r\n\t\t\t\t\tvalue=\"\";\r\n\t\t\t\t\ttField.setText(\"\" +value);\r\n\t\t\t}\r\n\r\n\t\t\tif (a.getSource() == bPer){\r\n\t\t\t\t\tv1 = Double.parseDouble( tField.getText() );\r\n\t\t\t\t\tctr=0;\r\n\t\t\t\t\tvalue=\"\";\r\n\t\t\t\t\tanswer = (v1/100);\r\n\t\t\t\t\ttField.setText(\"\" +answer);\r\n\t\t\t}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t/* |-- EQUALS ACTION --| */\r\n\r\n\t\t\tif(a.getSource()==equals){\r\n\t\t\t\t\t\tvalue=\"\";\r\n\t\t\t\t\t\tv2 = Double.parseDouble(tField.getText());\r\n\r\n\t\t\t\t\tif(o=='+'){\r\n\t\t\t\t\t\tctr=0;\r\n\t\t\t\t\t\tanswer = v1 + v2;\r\n\t\t\t\t\t\ttField.setText(\"\" +answer);\r\n\t\t\t\t\t\tvalue=\"\"; v1=null; v2=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(o=='-'){\r\n\t\t\t\t\t\tctr=0;\r\n\t\t\t\t\t\tanswer = v1 - v2;\r\n\t\t\t\t\t\ttField.setText(\"\" +answer);\r\n\t\t\t\t\t\tvalue=\"\"; v1=null; v2=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(o=='x'){\r\n\t\t\t\t\t\tctr=0;\r\n\t\t\t\t\t\tanswer = v1 * v2;\r\n\t\t\t\t\t\ttField.setText(\"\" +answer);\r\n\t\t\t\t\t\tvalue=\"\"; v1=null; v2=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(o=='/'){\r\n\t\t\t\t\t\tctr=0;\r\n\t\t\t\t\t\tanswer = v1 / v2;\r\n\t\t\t\t\t\ttField.setText(\"\" +answer);\r\n\t\t\t\t\t\tvalue=\"\"; v1=null; v2=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(o=='%'){\r\n\t\t\t\t\t\tctr=0;\r\n\t\t\t\t\t\tanswer = v1 % v2;\r\n\t\t\t\t\t\ttField.setText(\"\" +answer);\r\n\t\t\t\t\t\tvalue=\"\"; v1=null; v2=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{}\r\n\t\t\t}\r\n\r\n\t\t/* |-- EQUALS ACTION --| */\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t/*\t|-- Clear --| */\r\n\t\t\tif(a.getSource()==clear){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tv1=null;\r\n\t\t\t\tv2=null;\r\n\t\t\t\tvalue=\"\";\r\n\t\t\t\tanswer=0.;\r\n\t\t\t\ttField.setText(\"0.\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(a.getSource()==bCE){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue=\"\";\r\n\t\t\t\ttField.setText(\"0.\");\r\n\t\t\t}\r\n\r\n\r\n\t\t\t/*\t|-- Point --| */\r\n\t\t\tif(a.getSource() == bDot){\r\n\t\t\t\tif(ctr==0){\r\n\t\t\t\t\t\tvalue+=\".\";\r\n\t\t\t\t\t\tctr+=1;\r\n\t\t\t\t\t\ttField.setText(\"\" +value);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.print(\"\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t/* |-- Back Space --| */\r\n\t\t\tif(a.getSource() == backspace){\r\n\t\t\t\t\tvalue = value.substring(0, value.length()-1 );\r\n\t\t\t\t\ttField.setText(\"\" +value);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t/* |-- Square Root --| */\r\n\t\t\tif(a.getSource() == bSqrt){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.sqrt(Double.parseDouble( tField.getText() ) );\r\n\t\t\t\ttField.setText(\"\" +v1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* |-- Sine --| */\r\n\t\t\tif(a.getSource() == bSin){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.sin( Math.toRadians(Double.parseDouble( tField.getText() ) ));\r\n\t\t\t\ttField.setText(\"sin\"+ tField.getText()+\"=\" +v1);\r\n\t\t\t}\r\n\r\n\t\t\t/* |-- Cosine --| */\r\n\t\t\tif(a.getSource() == bCos){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.cos( Math.toRadians(Double.parseDouble( tField.getText() ) ));\r\n\t\t\t\ttField.setText(\"cos\"+ tField.getText()+\"=\" +v1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* |-- Tan --| */\r\n\t\t\tif(a.getSource() == bTan){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.tan( Math.toRadians(Double.parseDouble( tField.getText() ) ));\r\n\t\t\t\ttField.setText(\"tan\"+ tField.getText()+\"=\" +v1);\r\n\t\t\t}\r\n\r\n\t\t\t/* |--Cosecant --| */\r\n\t\t\tif(a.getSource() == bCosec){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.sin( Math.toRadians(Double.parseDouble( tField.getText() ) ));\r\n\t\t\t\ttField.setText(\"cosec\"+ tField.getText()+\"=\" +(1/v1));\r\n\t\t\t}\r\n\r\n\t\t\t/* |-- Secant --| */\r\n\t\t\tif(a.getSource() == bSec){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.cos( Math.toRadians(Double.parseDouble( tField.getText() ) ));\r\n\t\t\t\ttField.setText(\"sec\"+ tField.getText()+\"=\" +(1/v1));\r\n\t\t\t}\r\n\r\n\t\t\t/* |-- Cot --| */\r\n\t\t\tif(a.getSource() == bCot){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.tan( Math.toRadians(Double.parseDouble( tField.getText() ) ));\r\n\t\t\t\ttField.setText(\"cot\"+ tField.getText()+\"=\" +(1/v1));\r\n\t\t\t}\r\n\r\n\t\t\t/* |-- Integer --| */\r\n\t\t\tif(a.getSource() == bInt){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tNumberConverted = ( Double.parseDouble(tField.getText()) * -1 );\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\ttField.setText(\"\" +NumberConverted);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t/* |-- Reciprocal --| */\r\n\t\t\tif(a.getSource() == bFrac){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tDouble NumberContainer = ( 1 / Double.parseDouble(\r\ntField.getText() ) );\r\n\t\t\t\ttField.setText(\"\" +NumberContainer);\r\n\t\t\t}\r\n\r\n\r\n\t// ------------ Menu Item Actions ------------ //\r\n\r\n\t\t\tif(a.getSource() == fmi1){\r\n\t\t\t\tcv = tField.getText();\r\n\t\t\t}\r\n\r\n\t\t\tif(a.getSource() == fmi2){\r\n\t\t\t\ttField.setText(\"\" +cv);\r\n\t\t\t}\r\n\r\n\t\t\tif(a.getSource() == fmi3){\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\r\n\t\t}\t// End of Try\r\n\r\n\r\n/* |-------- Attempting To Catch Runtime Errors ---------| */\r\n\r\n\t\tcatch(StringIndexOutOfBoundsException str){}\r\n\t\tcatch(NumberFormatException nfe){}\r\n\t\tcatch(NullPointerException npe){}\r\n\r\n\t}", "private void totalPrice() {\n double totalPrice;\n \n String stu = studentSubTotal.getText();\n stu = stu.substring(1);\n double stuTotal = Double.parseDouble(stu);\n\n String adult = adultSubTotal.getText();\n adult = adult.substring(1);\n double adultTotal = Double.parseDouble(adult);\n\n String senior = seniorSubTotal.getText();\n senior = senior.substring(1);\n double seniorTotal = Double.parseDouble(senior);\n\n totalPrice = stuTotal + adultTotal + seniorTotal;\n NumberFormat gbp = NumberFormat.getCurrencyInstance(Locale.UK);\n String totalStr = String.valueOf(gbp.format(totalPrice));\n totalPriceTextField.setText(totalStr);\n\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the value of principle, time and rate respectively:\");\r\n\t\tfloat p =input.nextFloat();\r\n\t\tfloat t =input.nextFloat();\r\n\t\tfloat r=input.nextFloat();\r\n\t\tfloat si;\r\n\t\tsi=(p*t*r)/100;\r\n\t\tSystem.out.println(\"The required simple interest is \"+si);\r\n\r\n\t}", "private void calculate() {\n Log.d(\"MainActivity\", \"inside calculate method\");\n\n try {\n if (billAmount == 0.0);\n throw new Exception(\"\");\n }\n catch (Exception e){\n Log.d(\"MainActivity\", \"bill amount cannot be zero\");\n }\n // format percent and display in percentTextView\n textViewPercent.setText(percentFormat.format(percent));\n\n if (roundOption == 2) {\n tip = Math.ceil(billAmount * percent);\n total = billAmount + tip;\n }\n else if (roundOption == 3){\n tip = billAmount * percent;\n total = Math.ceil(billAmount + tip);\n }\n else {\n // calculate the tip and total\n tip = billAmount * percent;\n\n //use the tip example to do the same for the Total\n total = billAmount + tip;\n }\n\n // display tip and total formatted as currency\n //user currencyFormat instead of percentFormat to set the textViewTip\n tipAmount.setText(currencyFormat.format(tip));\n\n //use the tip example to do the same for the Total\n totalAmount.setText(currencyFormat.format(total));\n\n double person = total/nPeople;\n perPerson.setText(currencyFormat.format(person));\n }", "@Step\n\tpublic String airmileCalculator(String numericRange) throws Exception {\n\t\tString[] range = numericRange.split(\";\");\n\t\tString firstBonus = this.getElement(rewardCalculatorFirstYrBonus).getText();\n\t\tfirstBonus = firstBonus.substring(0, firstBonus.length() - 1);\n\t\tString calculatedValue = \"\";\n\t\tint calculatedAmt;\n\t\tString retrievedValue = \"\";\n\t\tString errorLog = \"\";\n\t\tfirstBonus = firstBonus.replace(\",\", \"\");\n\t\t\n\t\tfor (int i = 0; i < range.length; i++) {\n\t\t\trange[i] = range[i].trim();\n\t\t}\n\t\ttry {\n\t\t\tfor(String testRange : range) {\n\t\t\t\tSystem.out.println (testRange);\n\t\t\t\tif (testRange.contains(\"-\")) {\n\t\t\t\t\tfor (int j = Integer.parseInt(testRange.split(\"-\")[0]); j <= Integer.parseInt(testRange.split(\"-\")[1]); j++) {\n\n\t\t\t\t\t\tcalculatedAmt = (j*12)/10;\n\t\t\t\t\t\tcalculatedAmt += Integer.parseInt(firstBonus);\n\t\t\t\t\t\tcalculatedValue = String.valueOf(calculatedAmt); //Equation: 3000 + monthly usage * 12 months; at a conversion of 1 Mile per $10 spent\n\n\t\t\t\t\t\tthis.setText(rewardCalculatorInput, String.valueOf(j));\n\t\t\t\t\t\t\n\t\t\t\t\t\tretrievedValue = this.getElement(rewardCalculatorEarnedMiles).getText();\n\t\t\t\t\t\tretrievedValue = retrievedValue.replace(\",\", \"\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ((j <=10000 && Integer.parseInt(calculatedValue) != Integer.parseInt(retrievedValue)) || j > 10000 && Integer.parseInt(retrievedValue) != 15000) {\n\t\t\t\t\t\t\terrorLog = errorLog +\"\\n\" + \"Value does not match at $\" + j + \". Expected: [\" + calculatedValue + \"]; Actual: [\" + retrievedValue + \"]\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//Do Nothing\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\t//try {\n\t\t\t\t\t\t//Integer.parseInt(testRange); //Test if the value is an integer\n\t\t\t\t\t\tcalculatedValue = String.valueOf(Integer.valueOf(firstBonus) + (Integer.valueOf(testRange) * 12)/10); //Equation: 3000 + monthly usage * 12 months; at a conversion of 1 Mile per $10 spent\n\t\t\t\t\t\tthis.setText(rewardCalculatorInput, testRange);\n\t\t\t\t\t\t\n\t\t\t\t\t\tretrievedValue = this.getElement(rewardCalculatorEarnedMiles).getText();\n\t\t\t\t\t\tretrievedValue = retrievedValue.replace(\",\", \"\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (Integer.parseInt(calculatedValue) != Integer.parseInt(retrievedValue) || Integer.parseInt(testRange) > 10000 && Integer.parseInt(retrievedValue) != 15000) {\n\t\t\t\t\t\t\terrorLog = errorLog + \"Value does not match at $\" + testRange + \". Expected: [\" + calculatedValue + \"]; Actual: [\" + retrievedValue + \"]\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//Do Nothing\n\t\t\t\t\t\t}\n\t\t\t\t\t//} catch (NumberFormatException e) {\n\t\t\t\t\t//\terrorLog = errorLog +\"\\n\" + \"Range Item: \" + testRange + \" is not a range or numeric integer. Item Skipped\";\n\t\t\t\t\t//}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Throwable t) {\n\t\t\tLOG.ERROR(t.getMessage(), this.browserName);\n\t\t\tthrow new Exception(t.getMessage());\n\t\t}\n\t\treturn errorLog.trim();\n\t}", "public static void main(String[] args) {\n \n// scanner\n Scanner myScanner;\n myScanner = new Scanner( System.in );\n \n// user inputs\n System.out.print(\n \"Enter the number of Big Macs(an interger > 0): \"); // asking user for the number of Big Macs\n int nBigMacs = myScanner.nextInt(); // declare that input as an interger nBigMacs\n \n System.out.print(\"Enter the cost per Big Mac as\"+ \n \" a double (in the form xx.xx) :\"); // prompts for the cost of 1 Big Mac\n double bigMac$ = myScanner.nextDouble(); //declaration of the Big Mac cost as a variable\n \n System.out.print(\n \"Enter the percent tax as a whole number (xx): \"); // prompts user for tax percent\n double taxRate = myScanner.nextDouble(); // decleration of tax rate\n taxRate/=100; // converts whole number to a usable proportion\n \n// eeclare variables for output and calculation\n double cost$;\n int dollars,dimes, pennies; // make variables for dollars, dimes, and pennies for storing digits\n cost$=nBigMacs*bigMac$*(1+taxRate); //calculation for the cost of all Big Macs\n dollars=(int)cost$; //gets dollars as a whole interger\n dimes=(int)(cost$*10)%10; //isolates one digit after the decimal place\n pennies=(int)(cost$*100)%10; //isolates the second degit after the decimal place\n \n// print results\n System.out.println(\"The total cost of \"+nBigMacs+\" Big Macs, at $\"+bigMac$+\" per Big Mac, with a sales tax of \"+(int)(taxRate*100) + \"%, is $\"+dollars+'.'+dimes+pennies);\n \n }", "public static void main(String[] args) {\n Scanner in = new Scanner (System.in);\n System.out.print(\"Enter your final average [0-100]: \");\n double finalGrade;\n finalGrade = in.nextDouble();\n Grade finalLetter;\n if(finalGrade >= Grade.A.Min())\n {\n finalLetter = Grade.A;\n }\n else if (finalGrade >= Grade.B.Min())\n {\n finalLetter = Grade.B;\n }\n else if (finalGrade >= Grade.C.Min())\n {\n finalLetter = Grade.C;\n }\n else if(finalGrade >= Grade.D.Min())\n {\n finalLetter = Grade.D;\n }\n else\n {\n finalLetter = Grade.F;\n }\n System.out.printf (\"A final average of %f translates to a letter grade of %s\\n\", finalGrade, finalLetter);\n }", "@Override\n public int accion() {\n return this.alcance*2/3*3;\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t\tdouble mile = Double.parseDouble(tmile.getText());\n//\t\t\t\t\tdouble km = Double.parseDouble(tkilometer.getText());\n\t\t\t\t\tdouble p = Double.parseDouble(tpound.getText());\n//\t\t\t\t\tdouble kg = Double.parseDouble(tkilogram.getText());\n\t\t\t\t\tdouble gal = Double.parseDouble(tgallon.getText());\n//\t\t\t\t\tdouble lit = Double.parseDouble(tlitre.getText());\n\t\t\t\t\tdouble f = Double.parseDouble(tfahren.getText());\n//\t\t\t\t\tdouble c = Double.parseDouble(tcelcius.getText());\n\t\t\t\t\t\n\t\t\t\t\tdouble convertedkm = Math.round((mile / 1.6) * 100.0)/100.0 ;\n\t\t\t\t\tdouble convertedkg = Math.round((p / 0.45) *100.0)/100.0;\n\t\t\t\t\tdouble convertedlit = Math.round((gal / 3.78)*100.0)/100.0;\n\t\t\t\t\tdouble convertedc = Math.round(((f - 32) / 1.8)*100.0)/100.0;\n\t\t\t\t\t\n\t\t\t\t\t\n//\t\t\t\t\tdouble convertedmile = km * 1.6;\n//\t\t\t\t\tdouble convertedpound = kg * 0.45;\n//\t\t\t\t\tdouble convertedg = lit * 3.78;\n//\t\t\t\t\tdouble convertedf = (1.8 * c) + 32;\n//\t\t\t\t\t\n\t\t\t\t\ttkilometer.setText(Double.toString(convertedkm));\n\t\t\t\t\ttkilogram.setText(Double.toString(convertedkg));\n\t\t\t\t\ttlitre.setText(Double.toString(convertedlit));\n\t\t\t\t\ttcelcius.setText(Double.toString(convertedc));\n\t\t\t\t\t\n//\t\t\t\t\ttmile.setText(Double.toString(convertedkm));\n//\t\t\t\t\ttpound.setText(Double.toString(convertedpound));\n//\t\t\t\t\ttgallon.setText(Double.toString(convertedg));\n//\t\t\t\t\ttfahren.setText(Double.toString(convertedf));\n\t\t\t\t}", "public static void main(String[] args){\n int emp_id;\n String emp_name;\n float basic_salary,HRA ,DA,TA,PF,Gross;\n\n Scanner scanner = new Scanner(System.in);\n emp_id = scanner.nextInt();\n System.out.println(\"Input employee id : \");\n\n emp_name = scanner.next();\n System.out.println(\"Input employee name: \");\n\n basic_salary = scanner.nextFloat();\n System.out.println(\"Input employee basic salary\");\n HRA = (basic_salary*10)/100;\n DA = (basic_salary*8)/100;\n TA = (basic_salary*9)/100;\n PF = (basic_salary*20)/100;\n Gross = (basic_salary + HRA + TA + DA - PF);\n\n System.out.println(\"HRA 10% of basic salary:\" +HRA);\n System.out.println(\"DA 8% of basic salary:\" +DA);\n System.out.println(\"TA 9% of basic salary:\" +TA);\n System.out.println(\"PF 20% of basic salary:\" +PF);\n System.out.println(\"Gross basic salary + HRA + DA + TA - PF :\" + Gross);\n\n\n }", "public abstract double calculateAppraisalPrice();", "public static void main(String[] args) {\n\t\tScanner keyboard = new Scanner(System.in);\r\n\t\t\r\n\t\t//declaring variables\r\n\t\tdouble input, state, county, taxtotal, total;\r\n\t\t\r\n\t\t//get input\r\n\t\tSystem.out.println(\"Enter the cost: \");\r\n\t\tinput = keyboard.nextDouble();\r\n\t\t\r\n\t\t//calculate taxes\r\n\t\tstate = input * 0.055;\r\n\t\tcounty = input * 0.02;\r\n\t\t\r\n\t\ttaxtotal = state + county;\r\n\t\t\r\n\t\ttotal = input + taxtotal;\r\n\t\t\r\n\t\t//show results to display on screen\r\n\t\tSystem.out.println(\"When spending $\" + input + \" on a purchase, the state tax would be $\" + state + \" , county tax would be $\" + county + \" which combines to be $\" + taxtotal + \" , and the total cost would be $\" + total);\r\n\t\t\r\n\t\t\r\n\t\t//close keyboard input\r\n\t\tkeyboard.close();\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tdouble grossPay;\n\t\tdouble netPay;\n\t\tString employeeName;\n\t\tdouble totalDeductions;\n\t\tdouble federalTaxRate = 0.15;\n\t\tdouble stateTaxRate = 0.035;\n\t\tdouble ssTaxRate = 0.0575;\n\t\tdouble medTaxRate = 0.0275;\n\t\tdouble pensionPlanRate = 0.05;\n\t\tdouble healthInsuranceDeduction = 75.00;\n\t\tdouble federalTaxDeduction;\n\t\tdouble stateTaxDeduction;\n\t\tdouble ssTaxDeduction;\n\t\tdouble medTaxDeduction;\n\t\tdouble pensionPlanDeduction;\n\t\t\n\t\t// Gather employees gross pay and name from user\n\t\tSystem.out.println(\"Enter employees name: \");\n\t\temployeeName = scan.nextLine();\n\t\tSystem.out.println(\"Enter employees gross pay: \");\n\t\tgrossPay = scan.nextDouble();\n\t\t\n\t\t// Apply tax deductions to get net pay\n\t\t// Federal Tax\n\t\tfederalTaxDeduction = grossPay * federalTaxRate;\n\t\t// State Tax\n\t\tstateTaxDeduction = grossPay * stateTaxRate;\n\t\t// Social Security Tax\n\t\tssTaxDeduction = grossPay * ssTaxRate;\n\t\t// Medicare/Medicaid Tax\n\t\tmedTaxDeduction = grossPay * medTaxRate;\n\t\t// Pension Plan\n\t\tpensionPlanDeduction = grossPay * pensionPlanRate;\n\t\t// Apply deductions to get net pay\n\t\ttotalDeductions = (healthInsuranceDeduction + federalTaxDeduction\n\t\t\t\t+ stateTaxDeduction + ssTaxDeduction + medTaxDeduction \n\t\t\t\t+ pensionPlanDeduction);\n\t\t\n\t\tnetPay = grossPay - totalDeductions;\n\t\t\n\t\t// Output each deduction as well as net pay\n\t\tSystem.out.println(\"\\n\" + employeeName);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Gross Amount:\", grossPay);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Federal Tax:\", federalTaxDeduction);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"State Tax:\", stateTaxDeduction);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Social Security Tax:\", ssTaxDeduction);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Medicare/Medicaid Tax:\", medTaxDeduction);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Pension Plan:\", pensionPlanDeduction);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Health Insurance:\", healthInsuranceDeduction);\n\t\tSystem.out.printf(\"%-30s $ %10.2f %n\" , \"Net Pay:\", netPay);\n\t}", "public static void main(String[] args) {\n double carMiles;\n double carHalon;\n double carCost;\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Введите пробег автомобиля в американских милях:\");\n carMiles = sc.nextInt();\n\n System.out.println(\"Введите расход топлива автомобиля в галонах на милю:\");\n carHalon = sc.nextInt();\n\n System.out.println(\"Введите стоимость автомобиля $:\");\n carCost = sc.nextInt();\n\n //перевод в европейскую систему\n System.out.println(\"Пробег автомобиля: \" + carMiles * 1.61 + \"км\"); //формул: http://www.for6cl.uznateshe.ru/mili-v-kilometry/\n\n System.out.println(\"Расход топлива автомобиля: \" + ( 378.5 / ( carHalon * 1.609 )) + \" литров на 100 км\" ); // формула: https://planetcalc.ru/4357/\n\n System.out.println(\"Стоимость автомобиля: \" + carCost * 28.3 + \" грн\");\n\n\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel5 = new javax.swing.JLabel();\n txtBasea = new javax.swing.JTextField();\n txtAlturaa = new javax.swing.JTextField();\n txtBasep = new javax.swing.JTextField();\n btnArea = new javax.swing.JButton();\n btnPerimetro = new javax.swing.JButton();\n txtRa = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n txtRp = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n txtAlturap = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel5.setText(\"Base\");\n\n btnArea.setText(\"Calcular area\");\n\n btnPerimetro.setText(\"Calcular perimetro\");\n\n jLabel1.setText(\"Area de un triangulo\");\n\n jLabel2.setText(\"Perimetro de un triangulo\");\n\n jLabel3.setText(\"Base\");\n\n jLabel4.setText(\"Altura\");\n\n jLabel6.setText(\"Altura\");\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 .addGap(50, 50, 50)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addGap(18, 18, 18)\n .addComponent(txtBasea))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(txtAlturaa, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(btnArea))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnPerimetro)\n .addComponent(jLabel2)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(jLabel6))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(txtAlturap)\n .addComponent(txtBasep, javax.swing.GroupLayout.DEFAULT_SIZE, 67, Short.MAX_VALUE))))\n .addContainerGap(48, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(67, 67, 67)\n .addComponent(txtRa, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtRp, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(106, 106, 106))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(jLabel5)\n .addComponent(txtBasea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtBasep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(20, 20, 20)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(txtAlturaa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtAlturap, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGap(42, 42, 42)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnArea)\n .addComponent(btnPerimetro))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtRa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtRp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(32, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void amount() {\n \t\tfloat boxOHamt=boxOH*.65f*48f;\n \t\tSystem.out.printf(boxOH+\" boxes of Oh Henry ($0.65 x 48)= $%4.2f \\n\",boxOHamt);\n \t\tfloat boxCCamt=boxCC*.80f*48f;\n \t\tSystem.out.printf(boxCC+\" boxes of Coffee Crisp ($0.80 x 48)= $%4.2f \\n\", boxCCamt);\n \t\tfloat boxAEamt=boxAE*.60f*48f;\n \t\tSystem.out.printf(boxAE+\" boxes of Aero ($0.60 x 48)= $%4.2f \\n\", boxAEamt);\n \t\tfloat boxSMamt=boxSM*.70f*48f;\n \t\tSystem.out.printf(boxSM+\" boxes of Smarties ($0.70 x 48)= $%4.2f \\n\", boxSMamt);\n \t\tfloat boxCRamt=boxCR*.75f*48f;\n \t\tSystem.out.printf(boxCR+\" boxes of Crunchies ($0.75 x 48)= $%4.2f \\n\",boxCRamt);\n \t\tSystem.out.println(\"----------------------------------------------\");\n \t\t//display the total prices\n \t\tsubtotal=boxOHamt+boxCCamt+boxAEamt+boxSMamt+boxCRamt;\n \t\tSystem.out.printf(\"Sub Total = $%4.2f \\n\", subtotal);\n \t\ttax=subtotal*.07f;\n \t\tSystem.out.printf(\"Tax = $%4.2f \\n\", tax);\n \t\tSystem.out.println(\"==============================================\");\n \t\ttotal=subtotal+tax;\n \t\tSystem.out.printf(\"Amount Due = $%4.2f \\n\", total);\n \t}", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n \n String emp1, emp2,emp3;\n int hours1, hours2, hours3;\n int xhours1, xhours2, xhours3;\n double rate1, rate2, rate3;\n double gross1, gross2, gross3;\n \n System.out.print(\"Enter first employee: \");\n emp1 = input.next();\n System.out.print(\"Enter second employee: \");\n emp2 = input.next();\n System.out.print(\"Enter third employee: \");\n emp3 = input.next();\n \n System.out.print(\"Enter the normal hours worked by \" + emp1+\" is: \");\n hours1 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by \"+ emp1+\" is: \");\n xhours1 = input.nextInt();\n System.out.print(\"Enter the rate for \" + emp1 + \" is: \");\n rate1 = input.nextDouble();\n gross1 = ((hours1*rate1) + (xhours1*(rate1/2)));\n System.out.printf(\"The gross pay for %s is %.2f\\n\",emp1,gross1);\n \n \n System.out.print(\"Enter the normal hours worked by: \" + emp2);\n hours2 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by: \"+ emp2);\n xhours2 = input.nextInt();\n System.out.print(\"Enter the rate for : \"+ emp2);\n rate2 = input.nextDouble();\n gross2 = ((hours2*rate2) + (xhours2*(rate2/2)));\n System.out.printf(\"The gross pay for %s is: %2\\n\",emp2, gross2);\n \n \n System.out.print(\"Enter the normal hours worked by: \" + emp3);\n hours3 = input.nextInt();\n System.out.print(\"Enter the extra hours worked by: \" + emp3);\n xhours3 = input.nextInt();\n System.out.print(\"Enter the rate for: \" + emp3);\n rate3 = input.nextDouble();\n gross3 = ((hours3*rate3) + (xhours3*(rate3/2)));\n System.out.printf(\"The gross pay for %s is %.2f\\n: \",emp3, gross3);\n }", "@FXML\r\n private void calculateButtonPressed(ActionEvent event) {\r\n try{\r\n BigDecimal amount = new BigDecimal(amountTextField.getText());\r\n BigDecimal tip = amount.multiply(tipPercentage);\r\n BigDecimal total = amount.add(tip);\r\n \r\n tipTextField.setText(currency.format(tip));\r\n totalTextField.setText(currency.format(total));\r\n }\r\n catch(NumberFormatException ex){\r\n amountTextField.setText(\"Enter amount\");\r\n amountTextField.selectAll();\r\n amountTextField.requestFocus();\r\n }\r\n }", "private void initiateBlueEssencePurchaseFields(JFrame frame) {\r\n JLabel q5 = new JLabel(\"Make purchase for mainAccount or altAccount?\");\r\n// q5.setPreferredSize(new Dimension(1000, 100));\r\n// q5.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n new Label(q5);\r\n frame.add(q5);\r\n\r\n JTextField account = new JTextField();\r\n// account.setPreferredSize(new Dimension(1000, 100));\r\n// account.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n new TextField(account);\r\n frame.add(account);\r\n\r\n JLabel q6 = new JLabel(\"Name of the champion you wish to purchase?\");\r\n// q6.setPreferredSize(new Dimension(1000, 100));\r\n// q6.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n new Label(q6);\r\n frame.add(q6);\r\n\r\n JTextField name = new JTextField();\r\n// name.setPreferredSize(new Dimension(1000, 100));\r\n// name.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n new TextField(name);\r\n frame.add(name);\r\n\r\n ImageIcon icon = new ImageIcon(\"./data/shopicon.JPG\");\r\n JLabel label = new JLabel(icon);\r\n label.setPreferredSize(new Dimension(750, 100));\r\n frame.add(label);\r\n\r\n initiateBlueEssencePurchaseEnter(frame, account, name);\r\n }", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\r\n\t\tDouble CSE1,CSE2,CSE3,CSE4,CSE5,SUM,AVG;\r\n\t\t\tString name;\r\n\t\t\tSystem.out.println(\"NAME: \");\r\n\t\t\tname=s.next();\r\n\t\tSystem.out.println(\"COMPUTER APPLICATION\");\r\n\t\tCSE1=s.nextDouble();\r\n\t\tSystem.out.println(\"COMPUTER SYSTEM\");\r\n\t\tCSE2=s.nextDouble();\r\n\t\tSystem.out.println(\"OOP2\");\r\n\t\tCSE3=s.nextDouble();\r\n\t\tSystem.out.println(\"COMMUNICATION SKIILS\");\r\n\t\tCSE4=s.nextDouble();\r\n\t\tSystem.out.println(\"WEB DESIGN\");\r\n\t\tCSE5=s.nextDouble();\r\n\t\tSUM = CSE1+CSE2+CSE3+CSE4+CSE5;\r\n\t\tSystem.out.println(\"SUM = \"+SUM);\r\n\t\tAVG = SUM/5;\r\n\t\tSystem.out.println(\"AVERAGE = \"+AVG);\r\n\t\t\r\n\t\tif(AVG>=85){\r\n\t\t\tSystem.out.println(\"GRADE = A\");\r\n\t\t}else{\r\n\t\t\tif(AVG>=75){\r\n\t\t\t\tSystem.out.println(\"GRADE = B\");\r\n\t\t\t}else{\r\n\t\t\t\tif(AVG>=65){\r\n\t\t\t\t\tSystem.out.println(\"GRADE = C\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(AVG>=50){\r\n\t\t\t\t\t\tSystem.out.println(\"GRADE = D\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(AVG<=49){\r\n\t\t\t\t\t\t\tSystem.out.println(\"GRADE = F\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void operation() {\n\t\t\n\t\tswitch(calculation){\n\t\t\tcase 1:\n\t\t\t\ttotal = num + Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\ttotal = num - Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\ttotal = num * Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\ttotal = num / (Double.parseDouble(textField.getText()));\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t}", "public void computeGPAById()\r\n {\r\n Scanner input=new Scanner(System.in);\r\n System.out.println(\"Enter number of terms: \");\r\n term=input.nextInt();\r\n double gpa,total;\r\n \r\n for(int i=0; i<term; i++){\r\n \r\n System.out.println(\"Enter number of subjects in \"+(i+1)+\" th term : \");\r\n int n=input.nextInt();\r\n gpa=0.0; total=0.0;\r\n for(int j=0; j< n; j++){\r\n System.out.println(\"Enter Credit & Grade of Subject No:\" +(j+1)+\" \");\r\n Creditsandgrades[i][j][0]=input.nextDouble(); //credit\r\n Creditsandgrades[i][j][1]=input.nextDouble();\r\n gpa+= Creditsandgrades[i][j][0]* Creditsandgrades[i][j][1];\r\n total+= Creditsandgrades[i][j][0];\r\n }\r\n Gpa[i]=gpa/total;\r\n System.out.println(\"GPA in \" +(i+1)+ \" term : \"+ Gpa[i]+\"\\n\"); \r\n }\r\n \r\n \r\n }", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n System.out.println(\"Enter a chemical equation\");\n String e=sc.nextLine();\n e=e.trim();\n String E=e;\n StringHandling obj=new StringHandling(E);\n obj.removeSpaces();\n obj.display();\n obj.balance();\n \n obj.display();\n obj.findReactants();\n obj.findProducts();\n \n \n }", "public static double avgCalculator (String gender, int age, double bmi) {\n double avg = 0;\n\n // AGES: 5 , 6 , 7, 8 , 9 , 10 , 11, 12, 13, 14, 15, 16, 17, 18, 19\n double [] boyBMIavg = {15.3, 15.3, 15.5, 15.8, 16.1, 16.5, 17.0, 17.6, 18.3, 19.1, 19.8, 20.6, 21.2, 21.8, 22.2};\n double [] girlBMIavg = {15.2, 15.3, 15.4, 15.7, 16.1, 16.7, 17.3, 18.1, 18.9, 19.6, 20.3, 20.6, 21.1, 21.3, 21.4};\n \n // C H I L D R E N \n if (age < 19) { \n if (gender.equals(\"male\")) { \n avg = boyBMIavg [age -5]; // the bmi of an average boy based on age is retrieved from the array\n }\n else if (gender.equals(\"female\")) { \n avg = girlBMIavg [age -5]; // the bmi of an average girl based on age is retrieved from the array\n }\n else {\n System.out.println(\"error in gender value\"); // in case the gender value is not 'male' or 'female', sorry nonbinaries\n }\n }\n\n // A D U L T S \n else { \n if (gender.equals(\"male\")) {\n avg = 26.5; // the bmi of an average adult male is 26.5 \n }\n else if (gender.equals(\"female\")) {\n avg = 26.6; // the bmi of an average adult female is 26.6\n }\n else {\n System.out.println(\"error in gender value\"); // in case the gender value is not 'male' or 'female', sorry nonbinaries\n }\n }\n\n System.out.println(\"The average BMI for \" + gender + \"s at the age of \" + age + \" is about \" + avg ); // announces average\n \n //compares user to average\n double diff = 0; // the difference of user vs average is preset to zero\n\n // HIGHER BMI THAN AVERAGE\n if (bmi > avg) {\n diff = bmi - avg; // difference is calculated\n if (diff <= 0.5) { // if they are within .5 of the average, it is considered close enough\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is only a little higher than the average, \" + avg );\n System.out.println(\"You're doing pretty well :)\");\n }\n else { // if the gap is large, it is announced\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is much larger than the average, \" + avg + \", with a difference of \" + String.valueOf(diff).substring(0, 3));\n System.out.println(\"In comparison to the average, you're a little overweight.\");\n }\n }\n\n // LOWER BMI THAN AVERAGE\n else if (bmi < avg) {\n diff = avg - bmi; // difference is calculated\n if (diff <= 0.5) { // if they are within .5 of the average, it is considered close enough\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is only a little lower than the average, \" + avg );\n System.out.println(\"You're doing pretty well :)\");\n }\n else { // if the gap is large, it is announced\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is much smaller than the average, \" + avg + \", with a difference of \" + String.valueOf(diff).substring(0, 3));\n System.out.println(\"In comparison to the average, you're a little underweight.\");\n } \n }\n\n // SAME BMI AS AVERAGE\n else { // if the difference is zero\n System.out.println(\"Your BMI, \" + String.valueOf(bmi).substring(0, 2) + \", is the exact same as the average, \" + avg );\n System.out.println(\"You're doing great :)\");\n }\n return avg;\n }", "public void jumlahgajianggota(){\n \n jmlha = Integer.valueOf(txtha.getText());\n jmlharga = Integer.valueOf(txtharga.getText());\n jmlanggota = Integer.valueOf(txtanggota.getText());\n \n if (jmlanggota == 0){\n txtgajianggota.setText(\"0\");\n }else{\n jmltotal = jmlharga * jmlha;\n hasil = jmltotal / jmlanggota;\n txtgajianggota.setText(Integer.toString(hasil)); \n }\n\n \n }", "public static void main(String[] args) {\n\t\t\nScanner scan = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"iki sayi giriniz\");\n\t\tdouble sayi1 = scan.nextDouble();\n\t\tdouble sayi2 = scan.nextDouble();\n\t\n\t\tSystem.out.println(\"Toplama=\" + (sayi1+sayi2));\n\t\tSystem.out.println(\"Cikarma=\" + (sayi1-sayi2));\n\t\tSystem.out.println(\"Carpma=\" + sayi1*sayi2);\n\t\tSystem.out.println(\"Bolme=\" + sayi1/sayi2);\n\n\t\tscan.close();\n\t\t\n\t}", "public static void main(String args[]) {\n\n Scanner scanner = new Scanner (System.in);\n\n //PROMPT user for number of miles\n System.out.println(\"Please enter the number of miles traveled:\");\n double miles = scanner.nextDouble();\n\n //PROMPT user to enter the number of gallons used\n System.out.println(\"Please enter the number of gallons used:\");\n double gallons = scanner.nextInt();\n\n double mileage = miles/gallons;\n\n //PRINT mileage\n System.out.println(\"The mileage for this vehicle is \" + mileage + \".\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n }", "private void addOperands() {\n\n\t\tif (text_Operand3.getText().isEmpty()) {\n\t\t\ttext_Operand3.setText(\"5\");\n\t\t}\n\t\tif (text_Operand4.getText().isEmpty()) {\n\t\t\ttext_Operand4.setText(\"5\");\n\t\t}\n\n\t\t/*\n\t\t * It will pass the value to the bussiness logic so trhat the further logics can\n\t\t * be performed on them.\n\t\t */\n\n\t\tif (conversionIsRequired(comboBox1.getSelectionModel().getSelectedItem(),\n\t\t\t\tcomboBox2.getSelectionModel().getSelectedItem())) {\n\t\t\tdouble op1 = Double.parseDouble(text_Operand1.getText());\n\t\t\tdouble op1et = Double.parseDouble(text_Operand3.getText());\n\t\t\tperform.setOperand1(String.valueOf(op1 * theFactor));\n\t\t\tperform.setOperand3(String.valueOf(op1et * theFactor));\n\t\t} else {\n\t\t\tAlert a = new Alert(AlertType.WARNING);\n\t\t\ta.setContentText(\"Addition Not Possible\");\n\t\t\ta.show();\n\t\t\treturn;\n\t\t}\n\n\t\tcomboBoxRes.getSelectionModel().select(comboBox2.getSelectionModel().getSelectedItem());\n\t\t// Check to see if both operands are defined and valid\n\t\tif (binaryOperandIssues()) // If there are issues with the operands, return\n\t\t\treturn; // without doing the computation\n\n\t\t// If the operands are defined and valid, request the business logic method to\n\t\t// do the addition and return the\n\t\t// result as a String. If there is a problem with the actual computation, an\n\t\t// empty string is returned\n\t\tString theAnswer = perform.addition(); // Call the business logic add method\n\t\tlabel_errResult.setText(\"\"); // Reset any result error messages from before\n\t\tString theAnswer1 = perform.addition1(); // Call the business logic add method\n\t\tlabel_errResulterr.setText(\"\"); // Reset any result error messages from before\n\t\tif (theAnswer.length() > 0 || theAnswer1.length() > 0) { // Check the returned String to see if it is okay\n\t\t\ttext_Result.setText(theAnswer); // If okay, display it in the result field and\n\t\t\tlabel_Result.setText(\"Sum\"); // change the title of the field to \"Sum\".\n\t\t\ttext_Resulterr.setText(theAnswer1); // If okay, display it in the result field.\n\t\t\tlabel_Result.setLayoutX(100);\n\t\t\tlabel_Result.setLayoutY(345);\n\t\t} else { // Some error occurred while doing the addition.\n\t\t\ttext_Result.setText(\"\"); // Do not display a result if there is an error.\n\t\t\tlabel_Result.setText(\"Result\"); // Reset the result label if there is an error.\n\t\t\tlabel_errResult.setText(perform.getResultErrorMessage()); // Display the error message.\n\t\t\ttext_Resulterr.setText(\"\"); // Do not display a result if there is an error.\n\t\t\tlabel_errResulterr.setText(perform.getResulterrErrorMessage()); // Display the error message.\n\t\t}\n\t}", "public float calculatePrice(Airline flight, String type, int baggage);", "public abstract double calculateTax();", "private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n double x=Double.parseDouble(jTextField3.getText());\n double y=Double.parseDouble(jTextField4.getText());\n jTextField8.setText(x*y+\"\");\n }", "public void get_UserInput(){\r\n\t Scanner s = new Scanner(System.in);\r\n\t // get User inputs \r\n\t System.out.println(\"Please enter a number for Dry (double):\");\r\n\t DRY = s.nextDouble();\r\n\t System.out.println(\"Please enter a number for Wet (double):\");\r\n\t WET = s.nextDouble(); \r\n\t System.out.println(\"Please enter a number for ISNOW (double):\");\r\n\t ISNOW = s.nextDouble();\r\n\t System.out.println(\"Please enter a number for Wind(double):\");\r\n\t WIND = s.nextDouble(); \r\n\t System.out.println(\"Please enter a number for BUO (double):\");\r\n\t BUO = s.nextDouble();\r\n\t System.out.println(\"Please enter a number for Iherb (int):\");\r\n\t IHERB = s.nextInt(); \r\n\t System.out.println(\"****Data for parameters are collected****.\");\r\n\t System.out.println(\"Data for parameters are collected.\");\r\n\t dry=DRY;\r\n\t wet=WET;\r\n}", "public static void main(String[] args) {\r\n // calculate how much it would cost to purchase different quantities of computer parts\n String name;\n System.out.println(\"Welcome! Enter which computer parts you would like to purchase along with a quantity:\");\n System.out.println(\"How many Chromebook Chargers would you like?:\");\n // Creates a Scanner used for input\n Scanner input = new Scanner(System.in);\n int chromebookCharger = input.nextInt();\n\n\n System.out.println(\"How many Replacement Motherboards would you like?:\"); \n int replacementMotherboard = input.nextInt();\n \n System.out.println(\"How many Computer Mouses would you like?:\");\n int computerMouse = input.nextInt();\n\n double Subtotal = (chromebookCharger*34.99 + replacementMotherboard*127.50 + computerMouse*18.00);\n\n double Tax = (1.13);\n\n // declare and calculate the quotient\n System.out.println(Subtotal*1.13);\n\n\n\n \r\n \r\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tansStri=\"\"+ans;\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='+';\r\n\t\t\t\ttf2.setText(\"+\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n mid = Mid.getText();\n bid=Bid.getText();\n days=Integer.parseInt(late.getText());\n if(days > 1 && days <10)\n {\n Fine= 50.0;\n }\n else if( days >10 && days <20)\n {\n Fine=100.0;\n \n \n }\n else if(days >20 && days < 30)\n {\n Fine = 200.0;\n }\n else\n {\n Fine= 0.0;\n }\n Fine=Fine*days;\n add();\n // fine.setText(fine.getText( Fine));\n }", "public static void main(String[] args) throws IOException {\n InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n BufferedReader in = new BufferedReader(reader);\n String line;\n while ((line = in.readLine()) != null) {\n \n List<String> InputStringList = Arrays.asList(line.split(\"~\"));\n double total_amount = Double.parseDouble(InputStringList.get(0));\n double total_years = Double.parseDouble(InputStringList.get(1));\n double annual_interest_rate = Double.parseDouble(InputStringList.get(2));\n double down_payment = Double.parseDouble(InputStringList.get(3));\n\n double total_months = total_years*12;\n double monthly_interest_rate = annual_interest_rate/(100*12);\n double monthly_payment = (monthly_interest_rate*(total_amount-down_payment))/(1-Math.pow(1+monthly_interest_rate,-(total_years*12)));\n double total_payback = monthly_payment*total_months;\n double interst_payment = total_payback-total_amount+down_payment;\n \n double round_mp_to_2dp = Math.round(monthly_payment*100.0)/100.0;\n long round_ip = Math.round(interst_payment);\n System.out.println(\"$\"+round_mp_to_2dp+\"~$\"+round_ip);\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString str = e.getActionCommand();\n\t\tString ans = resultField.getText();\n\t\tString ans2 = resultField2.getText();\n\t\tdouble result;\n\t\t\n\t\tif(str ==\"0\" || str ==\"1\" || str == \"2\"|| str== \"3\" ||\n\t\t\t\tstr == \"4\"|| str == \"5\" || str == \"6\" || str == \"7\"|| str == \"8\" || str == \"9\" || str ==\".\"){\n\t\t resultField.setText(ans + str);\n\t\t resultField2.setText(ans2 + str);\n\t\t}\n\t\tif(str == \"+\" || str == \"-\" || str == \"*\" || str == \"/\")\n\t\t{\n\t\t\toper = ans;\n\t\t\top = str;\n\t\t\tresultField.setText(\"\");\n\t\t\tresultField2.setText(ans2 + str);\n\t\t}\n\t\tif(str == \"x^2\"){\n\t\t\tresultField.setText(\"\"+Double.parseDouble(ans)*Double.parseDouble(ans));\n\t\t\tresultField2.setText(ans2 + \"^2\");\n\t\t}\n\t\tif(str == \"sqrt\")\n\t\t{\n\t\t\tresultField.setText(\"\"+Math.sqrt(Double.parseDouble(ans)));\n\t\t\tresultField2.setText(ans2 + \"^1/2\");\n\t\t}\n\t\tif(str == \"1/X\")\n\t\t{\n\t\t\tresultField.setText(\"\"+1/(Double.parseDouble(ans)));\n\t\t\tresultField2.setText(\"1/(\" + ans2 + \")\");\n\t\t}\n\t\tif(str==\"+/-\")\n\t\t{\n\t\t\tresultField.setText(\"\"+-1*(Double.parseDouble(ans)));\n\t\t\tresultField.setText(\"-1*(\"+ans2+\")\");\n\t\t}\n\n\t\tif(str==\"=\")\n\t\t{\n\t\t\tchar c=op.charAt(0);\n\t\t\tswitch(c)\n\t\t\t{\n\t\t\tcase '+':\n\t\t\t\tresult=Double.parseDouble(oper) + Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '-':\n\t\t\t\tresult=Double.parseDouble(oper) - Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '*':\n\t\t\t\tresult=Double.parseDouble(oper) * Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '/':\n\t\t\t\tresult=Double.parseDouble(oper) / Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(str == \"C\")\n\t\t{\n\t\t\tresultField.setText(\"\");\n\t\t\tresultField2.setText(\"\");\n\t\t}\n\t\t\n\t\tif(str == \"Backspace\")\n\t\t{\n\t\t\tString temp=resultField.getText();\n\t\t\ttemp=temp.substring(0,temp.length()-1);\n\t\t\tresultField.setText(temp);\n\t\t\tString temp2=resultField2.getText();\n\t\t\ttemp2 = temp2.substring(0,temp2.length()-1);\n\t\t\tresultField2.setText(temp2);\n\t\t\t\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\tString input = \"30000~10~6~5000\";\r\n\t\t\r\n\t\tString[] values = input.split(\"~\");\r\n\t\t\r\n\t\tint loan = Integer.parseInt(values[0]);\r\n\t\tint year = Integer.parseInt(values[1]);\r\n\t\tint annualRate = Integer.parseInt(values[2]);\r\n\t\tint downpayment = Integer.parseInt(values[3]);\r\n\t\t\r\n\t\tint interestLoan = loan - downpayment;\r\n\t\t\r\n\t\tdouble month = year * 12;\r\n\t\tdouble montlyRate = (double)annualRate / 1200;\r\n\t\tDecimalFormat format = new DecimalFormat(\"#.00\");\r\n\t\tdouble interest = ((interestLoan * montlyRate)/ (1 - Math.pow((1 + montlyRate),-month)));\r\n\t\t\r\n\t\tSystem.out.println(format.format(interest));\r\n\t}", "public void onbtnClick(View view){\n EditText edtNum1= (EditText)findViewById(R.id.edtNum1);\n EditText edtNum2= (EditText)findViewById(R.id.edtNum2);\n EditText edtNum3= (EditText)findViewById(R.id.edtNum3);\n\n //get the integer number of string\n int num1=Integer.parseInt(edtNum1.getText().toString());\n int num2=Integer.parseInt(edtNum2.getText().toString());\n int num3=Integer.parseInt(edtNum3.getText().toString());\n\n //calculate the result\n\n //calculate the total of three numbers and assign to TOTAL variable\n int total=num1+num2+num3;\n\n //calculate the average of three numbers and assign to AVERAGE variable\n float average=total/3;\n\n //call getFinalGrade\n char finalGrade=getFinalGrade(average);\n\n //assign the result to the result components\n\n //find txtTotal, txtAverage, txtFinalGrade\n TextView txtTotal=(TextView)findViewById(R.id.txtTotal);\n TextView txtAverage=(TextView)findViewById(R.id.txtAverage);\n TextView txtFinalGrade=\n (TextView)findViewById(R.id.txtFinalGrade);\n\n //assign the total, average, final grade variables to txtTotal, txtAverage, txtFinalGrade\n txtTotal.setText(Integer.toString(total));\n txtAverage.setText(Float.toString(average));\n txtFinalGrade.setText(Character.toString(finalGrade));\n\n}", "private void calcularResultado() {\r\n\tdouble dinero=0;\r\n\tdinero=Double.parseDouble(pantalla.getText());\r\n\tresultado=dinero/18.5;\r\n\t\tpantalla.setText(\"\" + resultado);\r\n\t\toperacion = \"\";\r\n\t}", "private void calculIron(double frac, Double ironA, Double ironB) {\n int indice;\n int indice2;\n String fracs;\n String As;\n String Bs;\n double frac1 = 0;\n double frac2 = 0;\n double A1 = 0;\n double A2 = 0;\n double B1 = 0;\n double B2 = 0;\n BufferedReader lecture = null;\n String line;\n lecture = new BufferedReader(new InputStreamReader(\n getClass().getResourceAsStream(dbaFile)));\n\n try {\n while (((line = lecture.readLine()) != null) && (line != \"\") && \n (frac2 < frac)) {\n indice = line.indexOf(\",\"); \n indice2 = line.lastIndexOf(\",\"); \n fracs = line.substring(0, indice);\n Bs = line.substring(indice + 1, indice2);\n As = line.substring(indice2 + 1, line.length());\n\n try {\n frac2 = Double.parseDouble(fracs);\n B2 = Double.parseDouble(Bs);\n A2 = Double.parseDouble(As);\n } catch (NumberFormatException exce) {\n }\n\n ;\n\n if (frac2 < frac) {\n frac1 = frac2;\n A1 = A2;\n B1 = B2;\n }\n }\n } catch (IOException ex) {\n }\n\n if (frac2 > frac) {\n ironA = new Double(A1 +\n (((A2 - A1) * (frac - frac1)) / (frac2 - frac1)));\n ironB = new Double(B1 +\n (((B2 - B1) * (frac - frac1)) / (frac2 - frac1)));\n } else {\n ironA = new Double(A2);\n ironB = new Double(B2);\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='/';\r\n\t\t\t\ttf2.setText(\"/\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "private void addInt() {\n this.polyAddSolve();\n this.iaa = this.aadd * (1.0 / 4.0);\n this.iba = this.badd * (1.0 / 3.0);\n this.ica = this.cadd * (1.0 / 2.0);\n this.ida = this.dadd;\n String int1 = null, int2 = \"\", int3 = \"\", int4 = \"\";\n int inta = 0, intb = 0, intc = 0, intd = 0;\n if (this.adddegree == 3) {\n int1 = \"Sf(x) = \" + this.iaa + \"x^4 \";\n if (this.badd == 0) {\n intb = 1;\n } else {\n if (this.badd > 0) {\n int2 = \"+ \" + this.iba + \"x^3 \";\n\n } else {\n int2 = \"- \" + -this.iba + \"x^3 \";\n }\n }\n if (this.cadd == 0) {\n intc = 1;\n } else {\n if (this.cadd > 0) {\n int3 = \"+ \" + this.ica + \"x^2 \";\n } else {\n int3 = \"- \" + -this.ica + \"x^2 \";\n }\n }\n if (this.dadd == 0) {\n intd = 1;\n } else {\n if (this.dadd > 0) {\n int4 = \"+ \" + this.ida + \"x \";\n } else {\n int4 = \"- \" + -this.ida + \"x \";\n }\n }\n if (intb == 0 && intc == 0 && intd == 0) {\n this.addintegral = int1 + int2 + int3 + int4 + \"+ C\";\n }\n if (intb == 0 && intc == 0 && intd == 1) {\n this.addintegral = int1 + int2 + int3 + \"+ C\";\n }\n if (intb == 0 && intc == 1 && intd == 1) {\n this.addintegral = int1 + int2 + \"+ C\";\n }\n if (intb == 1 && intc == 1 && intd == 1) {\n this.addintegral = int1 + \"+ C\";\n }\n if (intb == 1 && intc == 0 && intd == 0) {\n this.addintegral = int1 + int3 + int4 + \"+ C\";\n }\n if (intb == 1 && intc == 0 && intd == 1) {\n this.addintegral = int1 + int3 + \"+ C\";\n }\n if (intb == 1 && intc == 1 && intd == 0) {\n this.addintegral = int1 + int4 + \"+ C\";\n }\n\n }\n if (this.adddegree == 2) {\n int1 = \"Sf(x) = \" + this.iba + \"x^3 \";\n if (this.cadd == 0) {\n intc = 1;\n } else {\n if (this.cadd > 0) {\n int2 = \"+ \" + this.ica + \"x^2 \";\n } else {\n int2 = \"- \" + -this.ica + \"x^2 \";\n }\n }\n\n if (this.dadd == 0) {\n intd = 1;\n } else {\n if (this.dadd > 0) {\n int3 = \"+ \" + this.ida + \"x \";\n } else {\n int3 = \"- \" + -this.ida + \"x \";\n }\n }\n if (intc == 0 && intd == 0) {\n this.addintegral = int1 + int2 + int3 + \"+ C\";\n }\n if (intc == 0 && intd == 1) {\n this.addintegral = int1 + int2 + \"+ C\";\n }\n if (intc == 1 && intd == 0) {\n this.addintegral = int1 + int3 + \"+ C\";\n }\n if (intc == 1 && intd == 1) {\n this.addintegral = int1 + \"+ C\";\n }\n }\n if (this.adddegree == 1) {\n int1 = \"Sf(x) = \" + this.ica + \"x^2 \";\n if (this.ida == 0) {\n intd = 1;\n\n } else {\n if (this.ida > 0) {\n int2 = \"+ \" + this.ida + \"x \";\n } else {\n int2 = \"- \" + -this.ida + \"x \";\n }\n }\n if (intd == 0) {\n this.addintegral = int1 + int2 + \"+ C\";\n } else {\n this.addintegral = int1 + int2 + \"+ C\";\n }\n\n }\n if (this.adddegree == 0) {\n this.addintegral = \"Sf(x) = \" + this.ida + \"x + C\";\n }\n }" ]
[ "0.6291878", "0.5922975", "0.58646256", "0.58168125", "0.57927614", "0.57594395", "0.56858534", "0.55096996", "0.54948545", "0.5468101", "0.54662865", "0.54259455", "0.5395109", "0.5372015", "0.5346718", "0.528735", "0.52852416", "0.526476", "0.5244044", "0.5226618", "0.52153", "0.52070934", "0.5202915", "0.5200751", "0.51923597", "0.5168298", "0.51389", "0.51349634", "0.5133962", "0.5128092", "0.51009953", "0.5100846", "0.5100267", "0.5098999", "0.50937307", "0.5092086", "0.509107", "0.50601566", "0.50531787", "0.50497204", "0.50435257", "0.5035699", "0.50340873", "0.5027253", "0.50151056", "0.5012523", "0.5009449", "0.5006586", "0.500245", "0.49950737", "0.49737883", "0.49657738", "0.49637306", "0.49614963", "0.49577397", "0.49553207", "0.4948247", "0.49477363", "0.4944749", "0.49441433", "0.49435997", "0.4942725", "0.4937065", "0.4932245", "0.49319616", "0.4923894", "0.4916473", "0.49157715", "0.4915657", "0.49151647", "0.49145398", "0.49013475", "0.48977354", "0.48965085", "0.48936886", "0.4889886", "0.4888849", "0.48871142", "0.48851368", "0.48829815", "0.4881634", "0.4881558", "0.48747247", "0.4870218", "0.48698968", "0.48692966", "0.486879", "0.48685268", "0.48593777", "0.48588338", "0.48536557", "0.4853466", "0.4851502", "0.4845876", "0.48439515", "0.48295397", "0.48290086", "0.48282284", "0.48256966", "0.48206678" ]
0.69664574
0
/ Computes the user's taxable income by taking the AGI of the user from the AGI field and the total deduction amount from the exemptionAmountEntry field, subtracting the exemption amount from the AGI, and returning the result as a string, which will be placed in the taxableIncome TextField.
public String computeTaxableIncome(String AGIField, String exemptionEntry){ int totalAGI = Integer.parseInt(AGIField); int totalDeduction = Integer.parseInt(exemptionEntry); String taxInc; if((totalAGI - totalDeduction) > 0){ taxInc = Integer.toString(totalAGI - totalDeduction); } else { taxInc = Integer.toString(0); } return taxInc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final void taxCalculations(){\n\r\n hraDeduction = totalHRA - 0.1*basicIncome;\r\n ltaDeduction = totalLTA - 0.7*totalLTA;\r\n\r\n //exemptions\r\n fundsExemption = fundsIncome - 150000; //upto 1.5 lakhs are exempted under IT Regulation 80C\r\n\r\n grossIncome = basicIncome + totalHRA + totalLTA + totalSpecialAl + fundsIncome ;\r\n\r\n totalDeduction = hraDeduction + ltaDeduction;\r\n\r\n totalTaxableIncome = grossIncome - (totalDeduction + fundsExemption);\r\n\r\n taxLiability = 0.05 * (totalTaxableIncome - 250000) + 0.2*(totalTaxableIncome - 500000);\r\n\r\n taxToPay = (cessPercent*taxLiability)/100 + taxLiability;\r\n }", "public double calcTax() {\n\t\treturn 0.2 * calcGrossWage() ;\n\t}", "public int totalEffetInventaire() {\n\t\tint limiteInventaire = 0;\n\t\tif (bonusForce >0) limiteInventaire+= bonusForce;\n\t\tif (bonusDefense >0) limiteInventaire+= bonusDefense;\n\t\tif (bonusVie >0) limiteInventaire+= bonusVie;\n\t\tif (bonusEsquive >0) limiteInventaire+= bonusEsquive;\n\t\tif (bonusInventaire >0) limiteInventaire+= bonusInventaire;\n\t\treturn limiteInventaire*3/4;\n\t}", "double getTaxAmount();", "public String returnAGI(String w2income, String interestIncome, String UIAndAlaskaIncome){\n \n BigDecimal w2inc = new BigDecimal(w2income);\n BigDecimal intInc = new BigDecimal(interestIncome);\n BigDecimal UIAndAlaskaInc = new BigDecimal(UIAndAlaskaIncome);\n BigDecimal totalIncome = w2inc.add(intInc.add(UIAndAlaskaInc));\n \n totalIncome = totalIncome.setScale(0, RoundingMode.HALF_UP);\n \n return totalIncome.toPlainString();\n }", "public abstract double calculateTax();", "@Override\n public double calcTaxes() {\n return getCost() * 0.07;\n }", "double getTax();", "public double taxCalc(int income1, int income2, int income3, int income4, int income5) {\n int[] arr = {income1, income2, income3, income4, income5};\n double taxTotal = 0.0;\n for (int i = 0; i < arr.length; i++) {\n taxTotal += (double) (arr[i] * 7 / 100);\n }\n return taxTotal;\n }", "public static double singleTax(double income) {\n\t //all values and calculations based off of 1040 form.\n double tax; //initializing tax, will be returned in the end.\n if (income < 0){ //determine whether income is negative.\n tax = 0;\n } else if (income > 0 && income <= 9275){\n tax = income * 0.1; //decimal is the tax rate for associated income\n } else if (income > 9275 && income <= 37650){\n tax = income * 0.15; \n } else if (income > 37650 && income <= 91150){\n tax = income * 0.25;\n } else if (income > 91150 && income <= 190150){\n tax = income * 0.28 - 6963.25; //incorperates reimbursment at higher incomes\n } else if (income > 190150 && income <= 413350){\n tax = income * 0.33 - 16470.75;\n } else if (income > 413350 && income <= 415050){\n tax = income * 0.35 - 24737.75;\n } else {\n tax = income * 0.396 - 43830.05;\n }\n tax = Math.round(tax * 100.0)/100.0; //rounds tax to nearest cent.\n return tax; //returns tax as value to main\n\t}", "public double taxPaying() {\r\n double tax;\r\n if (profit == true) {\r\n tax = revenue / 10.00;\r\n }\r\n\r\n else\r\n tax = revenue / 2.00;\r\n return tax;\r\n }", "public double getIncomeTotal(){\n\t\tdouble incomeTotal = (((Number)(salaryFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(socialSecurityFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(utilityFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(unemploymentFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(disabilityFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(foodStampsFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(childSupportFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(otherIncomeFTF.getValue())).doubleValue()\n\t\t\t\t+ ((Number)(tanfFTF.getValue())).doubleValue() );\n\t\t\n\t\treturn incomeTotal;\n\t}", "public String getTaxCalculated()\n\t{\n\t\twaitForVisibility(taxCalculated);\n\t\treturn taxCalculated.getText();\n\t}", "public abstract void calcuteTax(Transfer aTransfer);", "public double getTax() {\r\n\r\n return getSubtotal() * 0.06;\r\n\r\n }", "public float calculate_benefits() {\r\n\t\tfloat calculate = 0.0f;\r\n\t\tcalculate = this.getActivity() * this.getAntiquity() + 100;\r\n\t\treturn calculate;\r\n\t}", "public double calcAnnualIncome()\r\n {\r\n return ((hourlyWage * hoursPerWeek * weeksPerYear) * (1 - deductionsRate));\r\n }", "public int getTax(){\n int tax=0;\n if(this.salary<this.LOWER_LIMIT){\n tax=this.taxableSalary/100*10;\n }else if(this.salary<this.UPPER_LIMIT){\n tax=this.taxableSalary/100*22;\n }else{\n tax=this.UPPER_LIMIT/100*22 + (this.taxableSalary-this.UPPER_LIMIT)/100*40;\n }\n return tax;\n }", "public int getAnnualIncome() {\n return annualIncome;\n }", "public double getIncome() throws BankException {\n throw new BankException(\"This account does not support this feature\");\n }", "public Double getTax();", "void addIncomeToBudget();", "public int calculateTax() {\n int premium = calculateCost();\n return (int) Math.round(premium * vehicle.getType().getTax(surety.getSuretyType()));\n }", "public BigDecimal getLBR_DIFAL_TaxAmtICMSUFRemet();", "public void tvqTax() {\n TextView tvqView = findViewById(R.id.checkoutPage_TVQtaxValue);\n tvqTaxTotal = beforeTaxTotal * 0.09975;\n tvqView.setText(String.format(\"$%.2f\", tvqTaxTotal));\n }", "public double getIncome() {\n\n return gross;\n }", "static double tax( double salary ){\n\n return salary*10/100;\n\n }", "public double useTax() {\n \n return super.useTax() + getValue()\n * PER_AXLE_TAX_RATE * getAxles();\n }", "int getBonusMoney();", "public void calc() {\n /*\n * Creates BigDecimals for each Tab.\n */\n BigDecimal registerSum = new BigDecimal(\"0.00\");\n BigDecimal rouleauSum = new BigDecimal(\"0.00\");\n BigDecimal coinageSum = new BigDecimal(\"0.00\");\n BigDecimal billSum = new BigDecimal(\"0.00\");\n /*\n * Iterates over all TextFields, where the User might have entered values into.\n */\n for (int i = 0; i <= 7; i++) {\n /*\n * If i <= 1 is true, we still have registerFields to add to their BigDecimal.\n */\n if (i <= 1) {\n try {\n /*\n * Stores the Text of the RegisterField at the index i with all non-digit characters.\n */\n String str = registerFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n /*\n * Creates a new BigDecimal, that is created by getting the Factor of the current \n * RegisterField and multiplying this with the input.\n */\n BigDecimal result = getFactor(i, FactorType.REGISTER).multiply(new BigDecimal(str));\n /*\n * Displays the result of the multiplication above in the associated Label.\n */\n registerLabels.get(i).setText(result.toString().replace('.', ',') + \"€\");\n /*\n * Adds the result of the multiplication to the BigDecimal for the RegisterTab.\n */\n registerSum = registerSum.add(result);\n } catch (NumberFormatException nfe) {\n //If the Input doesn't contain any numbers at all, a NumberFormatException is thrown, \n //but we don't have to do anything in this case\n }\n }\n /*\n * If i <= 4 is true, we still have rouleauFields to add to their BigDecimal.\n */\n if (i <= 4) {\n try {\n /*\n * See Documentation for the registerFields for Information.\n */\n String str = rouleauFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n BigDecimal sum = getFactor(i, FactorType.ROULEAU).multiply(new BigDecimal(str));\n rouleauLabels.get(i).setText(sum.toString().replace('.', ',') + \"€\");\n rouleauSum = rouleauSum.add(sum);\n } catch (NumberFormatException nfe) {\n //See above.\n }\n }\n /*\n * If i <= 6 is true, we still have billFields to add to their BigDecimal.\n */\n if (i <= 6) {\n try {\n /*\n * See Documentation for the registerFields for Information.\n */\n String str = billFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n BigDecimal sum = getFactor(i, FactorType.BILL).multiply(new BigDecimal(str));\n billLabels.get(i).setText(sum.toString().replace('.', ',') + \"€\");\n billSum = billSum.add(sum);\n } catch (NumberFormatException nfe) {\n //See above.\n }\n }\n /*\n * We have 8 coinageFields, so since the for-condition is 0 <= i <=7, we don't have to check \n * if i is in range and can simply calculate it's sum.\n */\n try {\n /*\n * See Documentation for the registerFields for Information.\n */\n String str = coinageFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n BigDecimal sum = getFactor(i, FactorType.COINAGE).multiply(new BigDecimal(str));\n coinageLabels.get(i).setText(sum.toString().replace('.', ',') + \"€\");\n coinageSum = coinageSum.add(sum);\n } catch (NumberFormatException nfe) {\n //See above.\n }\n }\n /*\n * Displays all results in the associated Labels.\n */\n sumLabels.get(0).setText(registerSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(1).setText(rouleauSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(2).setText(coinageSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(3).setText(billSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(4).setText(billSum.add(coinageSum).add(rouleauSum).add(registerSum).toString()\n .replace('.', ',') + \"€\");\n }", "double taxReturn() {\n\t\tdouble ddv = 0;\n\t\tif (d == 'A') {\n\t\t\tddv = 18;\n\t\t} else if (d == 'B') {\n\t\t\tddv = 5;\n\t\t}\n\t\t\n\t\tif (ddv = 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tdouble percent = price / 100.0;\n\t\tdouble tax = ddv * percent;\n\t\treturn tax / 100.0 * 15.0;\n\t}", "BigDecimal getTax();", "public double calculateTax(double amount){\n return (amount*TAX_4_1000)/1000;\n }", "public static void extract_money(){\n TOTALCMONEY = TOTALCMONEY - BALANCERETRIEVE; //the total cashier money equals the total cashier money minus the retrieve request\r\n BALANCE = BALANCE - BALANCERETRIEVE; //the user balance equals the account minus the retrieve request\r\n }", "public double taxCharged (){\n return discountedPrice() * taxRate;\n }", "@Override\n public int accion() {\n return this.alcance*2/3*3;\n }", "public double countIncome() {\n\n double income = 0;\n for (int i = 0; i < budget.getIncome().size(); i++) {\n income += budget.getIncome().get(i).getAmount();\n }\n\n return income;\n }", "public void setIncomeTotal(){\n\t\tincomeOutput.setText(\"$\" + getIncomeTotal());\n\t\tnetIncomeOutput.setText(\"$\" + (getIncomeTotal() - getExpensesTotal()));\n\t}", "public void afterTax() {\n TextView afterView = findViewById(R.id.checkoutPage_afterTaxValue);\n afterTaxTotal = beforeTaxTotal + tpsTaxTotal + tvqTaxTotal;\n afterView.setText(String.format(\"$%.2f\", afterTaxTotal));\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 }", "private void CalculateTotalAmount() {\r\n\r\n double dSubTotal = 0, dTaxTotal = 0, dModifierAmt = 0, dServiceTaxAmt = 0, dOtherCharges = 0, dTaxAmt = 0, dSerTaxAmt = 0, dIGSTAmt=0, dcessAmt=0, dblDiscount = 0;\r\n float dTaxPercent = 0, dSerTaxPercent = 0;\r\n\r\n // Item wise tax calculation ----------------------------\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n TableRow RowItem = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n if (RowItem.getChildAt(0) != null) {\r\n\r\n TextView ColTaxType = (TextView) RowItem.getChildAt(13);\r\n TextView ColAmount = (TextView) RowItem.getChildAt(5);\r\n TextView ColDisc = (TextView) RowItem.getChildAt(9);\r\n TextView ColTax = (TextView) RowItem.getChildAt(7);\r\n TextView ColModifierAmount = (TextView) RowItem.getChildAt(14);\r\n TextView ColServiceTaxAmount = (TextView) RowItem.getChildAt(16);\r\n TextView ColIGSTAmount = (TextView) RowItem.getChildAt(24);\r\n TextView ColcessAmount = (TextView) RowItem.getChildAt(26);\r\n TextView ColAdditionalCessAmt = (TextView) RowItem.getChildAt(29);\r\n TextView ColTotalCessAmount = (TextView) RowItem.getChildAt(30);\r\n dblDiscount += Double.parseDouble(ColDisc.getText().toString());\r\n dTaxTotal += Double.parseDouble(ColTax.getText().toString());\r\n dServiceTaxAmt += Double.parseDouble(ColServiceTaxAmount.getText().toString());\r\n dIGSTAmt += Double.parseDouble(ColIGSTAmount.getText().toString());\r\n// dcessAmt += Double.parseDouble(ColcessAmount.getText().toString()) + Double.parseDouble(ColAdditionalCessAmt.getText().toString());\r\n dcessAmt += Double.parseDouble(ColTotalCessAmount.getText().toString());\r\n dSubTotal += Double.parseDouble(ColAmount.getText().toString());\r\n\r\n }\r\n }\r\n // ------------------------------------------\r\n\r\n // Bill wise tax Calculation -------------------------------\r\n Cursor crsrtax = dbBillScreen.getTaxConfig(1);\r\n if (crsrtax.moveToFirst()) {\r\n dTaxPercent = crsrtax.getFloat(crsrtax.getColumnIndex(\"TotalPercentage\"));\r\n dTaxAmt += dSubTotal * (dTaxPercent / 100);\r\n }\r\n Cursor crsrtax1 = dbBillScreen.getTaxConfig(2);\r\n if (crsrtax1.moveToFirst()) {\r\n dSerTaxPercent = crsrtax1.getFloat(crsrtax1.getColumnIndex(\"TotalPercentage\"));\r\n dSerTaxAmt += dSubTotal * (dSerTaxPercent / 100);\r\n }\r\n // -------------------------------------------------\r\n\r\n dOtherCharges = Double.valueOf(tvOthercharges.getText().toString());\r\n //String strTax = crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\"));\r\n if (crsrSettings.moveToFirst()) {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) {\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxTotal + dServiceTaxAmt + dOtherCharges+dcessAmt));\r\n } else {\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxAmt + dSerTaxAmt + dOtherCharges+dcessAmt));\r\n }\r\n } else {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) {\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dOtherCharges));\r\n\r\n } else {\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dOtherCharges));\r\n }\r\n }\r\n tvDiscountAmount.setText(String.format(\"%.2f\", dblDiscount));\r\n }\r\n }", "float getBonusExp();", "public double getincome()\n\t{\n\t\treturn this.income;\n\t}", "public int getIncome() {\n\t\treturn income;\n\t}", "public void cal_AdjustedFuelMoist(){\r\n\tADFM=0.9*FFM+0.5+9.5*Math.exp(-BUO/50);\r\n}", "public double getGrossWage(){\r\n\t return (salary + addings);\r\n }", "@Override\r\n\tpublic double calculatePremium(ApplicationInsurance applicationInsurance) {\n\t\t\r\n\t\treturn this.iApplicationInsuranceDao.calculatePremium(applicationInsurance);\r\n\t\r\n\t}", "double getTotalProfit();", "public double getAmountEarned(){\r\n return getSalary() + getBonus() + getCommission() * getNumSales();\r\n }", "double applyTax(double price);", "public BigDecimal getLBR_DIFAL_TaxAmtICMSUFDest();", "private void CalculateTotalAmount()\n {\n double dSubTotal = 0,dTaxTotal = 0, dModifierAmt = 0, dServiceTaxAmt = 0, dOtherCharges = 0, dTaxAmt = 0, dSerTaxAmt = 0;\n float dTaxPercent = 0, dSerTaxPercent = 0;\n double dTotalBillAmount_for_reverseTax =0;\n double dIGSTAmt =0, dcessAmt =0;\n // Item wise tax calculation ----------------------------\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++)\n {\n TableRow RowItem = (TableRow) tblOrderItems.getChildAt(iRow);\n if (RowItem.getChildAt(0) != null)\n {\n TextView ColQuantity = (TextView) RowItem.getChildAt(3);\n TextView ColRate = (TextView) RowItem.getChildAt(4);\n TextView ColTaxType = (TextView) RowItem.getChildAt(13);\n TextView ColAmount = (TextView) RowItem.getChildAt(5);\n TextView ColDisc = (TextView) RowItem.getChildAt(9);\n TextView ColTax = (TextView) RowItem.getChildAt(7);\n TextView ColModifierAmount = (TextView) RowItem.getChildAt(14);\n TextView ColServiceTaxAmount = (TextView) RowItem.getChildAt(16);\n TextView ColIGSTAmount = (TextView) RowItem.getChildAt(24);\n TextView ColcessAmount = (TextView) RowItem.getChildAt(26);\n TextView ColTaxValue = (TextView) RowItem.getChildAt(28);\n dTaxTotal += Double.parseDouble(ColTax.getText().toString());\n dServiceTaxAmt += Double.parseDouble(ColServiceTaxAmount.getText().toString());\n dIGSTAmt += Double.parseDouble(ColIGSTAmount.getText().toString());\n dcessAmt += Double.parseDouble(ColcessAmount.getText().toString());\n if (crsrSettings!=null && crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) // forward tax\n {\n dSubTotal += Double.parseDouble(ColAmount.getText().toString());\n }\n else // reverse tax\n {\n double qty = ColQuantity.getText().toString().equals(\"\")?0.00 : Double.parseDouble(ColQuantity.getText().toString());\n double baseRate = ColRate.getText().toString().equals(\"\")?0.00 : Double.parseDouble(ColRate.getText().toString());\n dSubTotal += (qty*baseRate);\n dTotalBillAmount_for_reverseTax += Double.parseDouble(ColAmount.getText().toString());\n }\n\n }\n }\n // ------------------------------------------\n // Bill wise tax Calculation -------------------------------\n Cursor crsrtax = db.getTaxConfigs(1);\n if (crsrtax.moveToFirst()) {\n dTaxPercent = crsrtax.getFloat(crsrtax.getColumnIndex(\"TotalPercentage\"));\n dTaxAmt += dSubTotal * (dTaxPercent / 100);\n }\n Cursor crsrtax1 = db.getTaxConfigs(2);\n if (crsrtax1.moveToFirst()) {\n dSerTaxPercent = crsrtax1.getFloat(crsrtax1.getColumnIndex(\"TotalPercentage\"));\n dSerTaxAmt += dSubTotal * (dSerTaxPercent / 100);\n }\n // -------------------------------------------------\n\n dOtherCharges = Double.valueOf(textViewOtherCharges.getText().toString());\n //String strTax = crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\"));\n if (crsrSettings.moveToFirst()) {\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) // forward tax\n {\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\"))\n {\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxTotal + dServiceTaxAmt + dOtherCharges+dcessAmt));\n }\n else\n {\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxAmt + dSerTaxAmt + dOtherCharges+dcessAmt));\n }\n }\n else // reverse tax\n {\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) // item wise\n {\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvBillAmount.setText(String.format(\"%.2f\", dTotalBillAmount_for_reverseTax + dOtherCharges));\n\n }\n else\n {\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\n tvTaxTotal.setText(String.format(\"%.2f\", dTaxTotal));\n tvServiceTaxTotal.setText(String.format(\"%.2f\", dServiceTaxAmt));\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\n\n if (chk_interstate.isChecked()) // interstate\n {\n tvIGSTValue.setTextColor(Color.WHITE);\n tvTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvServiceTaxTotal.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n } else {\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\n tvTaxTotal.setTextColor(Color.WHITE);\n tvServiceTaxTotal.setTextColor(Color.WHITE);\n }\n tvBillAmount.setText(String.format(\"%.2f\", dTotalBillAmount_for_reverseTax + dOtherCharges));\n }\n }\n }\n }", "public double getNetIncome() {\n\t\tDouble netIncome = 0.00;\n\t\tfor (HashMap.Entry<Integer, Bill> entry : ab.entrySet()) {\n\t\t\tnetIncome += entry.getValue().getDiscountedPrice();\n\t\t\t\n\t\t}//for\n\t\treturn netIncome;\n\t}", "public void calculateInterest(ActionEvent event) {\n try {\n double startkapital = Double.parseDouble(initialCapitalTextField.getText());\n double zinssatz = Double.parseDouble(interestRateTextField.getText());\n double laufzeit = Double.parseDouble(runningTimeTextField.getText());\n double zinsenOhneStartkapitalUndHoch = (1 + zinssatz / 100);\n double zinsenOhneStartkapitalMitHoch = Math.pow(zinsenOhneStartkapitalUndHoch, laufzeit);\n double zinsen = (zinsenOhneStartkapitalMitHoch * startkapital) - startkapital;\n\n interestLabel.setText(String.valueOf(zinsen));\n } catch (NumberFormatException e) {\n Alert alert = new Alert(Alert.AlertType.ERROR, \"Ungültige oder fehlende Eingabe\");\n alert.show();\n }\n }", "public double getNetIncome(){\n\t\tdouble netIncome = getIncomeTotal() - getExpensesTotal();\n\t\tif(netIncome < 0){\n\t\t\tnetIncomeOutput.setForeground(Color.RED);\n\t\t}\n\t\treturn netIncome;\n\t}", "public float getPayableAmount() {\n /**\n * { var_description }.\n */\n float dscnt = NUM3 * coupon;\n /**\n * { item_description }.\n */\n return (getTotalAmount() * (1f - dscnt)) * NUM5;\n }", "public float calculateTax(String state, Integer flatRate);", "public void amount() {\n \t\tfloat boxOHamt=boxOH*.65f*48f;\n \t\tSystem.out.printf(boxOH+\" boxes of Oh Henry ($0.65 x 48)= $%4.2f \\n\",boxOHamt);\n \t\tfloat boxCCamt=boxCC*.80f*48f;\n \t\tSystem.out.printf(boxCC+\" boxes of Coffee Crisp ($0.80 x 48)= $%4.2f \\n\", boxCCamt);\n \t\tfloat boxAEamt=boxAE*.60f*48f;\n \t\tSystem.out.printf(boxAE+\" boxes of Aero ($0.60 x 48)= $%4.2f \\n\", boxAEamt);\n \t\tfloat boxSMamt=boxSM*.70f*48f;\n \t\tSystem.out.printf(boxSM+\" boxes of Smarties ($0.70 x 48)= $%4.2f \\n\", boxSMamt);\n \t\tfloat boxCRamt=boxCR*.75f*48f;\n \t\tSystem.out.printf(boxCR+\" boxes of Crunchies ($0.75 x 48)= $%4.2f \\n\",boxCRamt);\n \t\tSystem.out.println(\"----------------------------------------------\");\n \t\t//display the total prices\n \t\tsubtotal=boxOHamt+boxCCamt+boxAEamt+boxSMamt+boxCRamt;\n \t\tSystem.out.printf(\"Sub Total = $%4.2f \\n\", subtotal);\n \t\ttax=subtotal*.07f;\n \t\tSystem.out.printf(\"Tax = $%4.2f \\n\", tax);\n \t\tSystem.out.println(\"==============================================\");\n \t\ttotal=subtotal+tax;\n \t\tSystem.out.printf(\"Amount Due = $%4.2f \\n\", total);\n \t}", "public static void total(double income, double expense){\n double dailyIncome = difference(income / DAYS_IN_MONTH);\n double dailyExpense = difference(expense / DAYS_IN_MONTH);\n \n System.out.println(\"Total income = $\" + income + \" ($\" + dailyIncome + \"/day)\" );\n System.out.println(\"Total expenses = $\" + expense + \" ($\" + dailyExpense + \"/day)\");\n System.out.println();\n }", "@Override\t\n\tpublic double getTax() {\n\t\treturn 0;\n\t}", "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 }", "public double totalInsuranceCost(){\n double cost=0;\n for(InsuredPerson i: insuredPeople){\n cost+=i.getInsuranceCost();\n\n }\n return cost;\n\n }", "public static double getTotal(double tuition, double gnsf, double erf){\r\n double total = 0;\r\n total = tuition + gnsf + erf;\r\n return total;\r\n }", "public String calculateTotalPriceInsurance(final InsuranceDetailsCriteria formBean,\r\n final ExtraFacility extraFacility)\r\n {\r\n final List<Price> extraPrices = extraFacility.getPrices();\r\n BigDecimal total = BigDecimal.ZERO;\r\n \r\n for (final String personType : formBean.getSelected().values())\r\n {\r\n for (final Price eachPriceModel : extraPrices)\r\n {\r\n if (StringUtils.equalsIgnoreCase(eachPriceModel.getPriceProfile().getPersonType()\r\n .toString(), personType.trim()))\r\n {\r\n total = total.add(eachPriceModel.getRate().getAmount());\r\n break;\r\n }\r\n }\r\n }\r\n return total.toString();\r\n }", "double getUnpaidAmount();", "@Override\n\tprotected double calcularImpuestoVehiculo() {\n\t\treturn this.getValor() * 0.003;\n\t}", "public static double normalizedGPA()\n {\n System.out.println(\"\\t Overall GPA?\");\n double overallGPA = console.nextDouble();\n System.out.println(\"\\t Max GPA?\");\n double maxGPA = console.nextDouble();\n System.out.println(\"\\t Transcript Multiplier? \");\n double transcriptMultiplier = console.nextDouble();\n double calculations = (overallGPA/maxGPA)*100*transcriptMultiplier;\n return calculations;\n }", "public float calculate_salary() {\r\n\t\tfloat calculate = 1000 + this.calculate_benefits();\r\n\t\treturn calculate;\r\n\t}", "@Override\r\n\tpublic int getPayCheque() {\n\t\treturn profit+annuelSalary;\r\n\t\t\r\n\t}", "public Double calculateTax(Employee employee) {\n\n Double tax = 0.0;\n\n if ( employee != null ) {\n\n Double salary = employee.getSalary();\n if ( salary > 0 ) {\n\n if ( salary < 500000 ) {\n\n tax = salary * 0.05;\n } else if ( salary > 500000 && salary < 1000000 ) {\n\n tax = salary * 0.1;\n } else {\n\n tax = salary * 0.2;\n }\n }\n }\n\n return tax;\n }", "public abstract String withdrawAmount(double amountToBeWithdrawn);", "TotalInvoiceAmountType getTotalInvoiceAmount();", "@Override\n public double calcCost() {\n return calcSalesFee()+calcTaxes();\n }", "@Override\n\tpublic double getTax() {\n\t\treturn 0.04;\n\t}", "public BigDecimal getIncludedTaxDifference()\r\n\t{\r\n\t\treturn m_amount.subtract(m_includedTax);\r\n\t}", "public int updateIncome(Income income) {\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\n\n // DataType variableName = Data;\n\n double HourlyRate= 55;\n double stateTaxRate= 0.04;\n double federalTaxRate= 0.22;\n byte weeklyHours= 40;\n byte totalWeeks=52;\n\n // salary=hourlyRate * weeklyHours * 52\n double salary = HourlyRate * weeklyHours * totalWeeks; //salary before tax\n\n //stateTax=salary * stateTaxRate\n double stateTax=salary * stateTaxRate;\n\n // federalTax= salary * federaltaxRate\n double federalTax= salary * federalTaxRate;\n\n //salaryAfterTax = salary - stateTax - fedaralTax\n double salaryAfterTax = salary - (stateTax + federalTax);\n\n System.out.println(\"Your salary is: $\"+salary); //concatenation\n\n /*\n System.out.println(\"9\" + 3); // 93->concatenation\n System.out.println(9+\"3\"); // 93-> concatenation\n System.out.println(9 + 3); // 12-> addition */\n\n\n System.out.println(\"State Tax is: $\"+stateTax);\n System.out.println(\"Federal Tax is: $\"+ federalTax);\n System.out.println(\"Total Tax is: $\" + (federalTax + stateTax) );\n System.out.println(\"Your salary after tax is: $\"+salaryAfterTax);\n\n\n\n\n\n\n\n\n\n }", "public String getTotalFareAmt()\n\t{\n\n\t\tString totalamt = totalFareAmount.getText().replaceAll(\"[Rs ,]\", \"\");\n\n\t\treturn String.valueOf(totalamt);\n\t}", "public Integer getExpenseAmount() {\r\n return expenseAmount;\r\n }", "public abstract double getTaxValue(String country);", "public void tpsTax() {\n TextView tpsView = findViewById(R.id.checkoutPage_TPStaxValue);\n tpsTaxTotal = beforeTaxTotal * 0.05;\n tpsView.setText(String.format(\"$%.2f\", tpsTaxTotal));\n }", "public static void printTotalDeductions() throws Exception\r\n\t{\r\n\t\tFile file=new File(\"Data/Peopledetails.txt\");\r\n\t\tfs=new Scanner(file);\r\n\t\tfs.useDelimiter(\",|\\\\r\\n\");\r\n\t\t\r\n\t\t//Print out headers for table\r\n\t\tSystem.out.printf(\"\\n\\n%10s%10s%15s\\n\\n\",\"Total Tax\",\"Total NI\", \"Total Pension\");\r\n\t\t\r\n\t\ttotaltax=0;\r\n\t\ttotalni=0;\r\n\t\ttotalpen=0;\r\n\t\t\r\n\t\twhile (fs.hasNext())\r\n\t\t{\r\n\t\t\tid=fs.nextInt();\r\n\t\t\tfname=fs.next();\r\n\t\t\tsname=fs.next();\r\n\t\t\tgen=fs.next();\r\n\t\t\thrate=fs.nextDouble();\r\n\t\t\thrs=fs.nextDouble();\r\n\t\t\t\r\n\t\t\tgross=hrs*hrate;\r\n\t\t\t\r\n\t\t\t//Calculates the overtime\r\n\t\t\tif(hrs>40)\r\n\t\t\t{\r\n\t\t\t\totime=hrs-40;\r\n\t\t\t\tstandard=40;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\totime=0;\r\n\t\t\t\tstandard=hrs;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgross=(standard*hrate+otime*hrate*1.5);\r\n\t\t\t\r\n\t\t\t//Calculates the annual gross in order to calculate the income tax per week\r\n\t\t\tannualgross=gross*52;\r\n\t\t\t\r\n\t\t\t//Calculates Income Tax\r\n\t\t\tdouble p,b,h,a;\r\n\t\t\t\r\n\t\t\tif(annualgross<=12500)\r\n\t\t\t{\r\n\t\t\t\tp=0;\r\n\t\t\t\tb=0;\r\n\t\t\t\th=0;\r\n\t\t\t\ta=0;\r\n\t\t\t}\r\n\t\t\telse if(annualgross>12500 && annualgross<=50000)\r\n\t\t\t{\r\n\t\t\t\tp = 12500;\r\n\t\t\t\tb = annualgross - 12500;\r\n\t\t\t\th = 0;\r\n\t\t\t\ta = 0;\r\n\r\n\t\t\t}\r\n\t\t\telse if(annualgross>50000 && annualgross<=150000)\r\n\t\t\t{\r\n\t\t\t\tp = 12500;\r\n\t\t\t b = 37500;\r\n\t\t\t h = annualgross - 50000;\r\n\t\t\t a = 0;\r\n\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t p = 12500;\r\n\t\t b = 37500;\r\n\t\t h = 100000;\r\n\t\t a = annualgross - 150000;\r\n\r\n\t\t\t}\r\n\t\t\ttax= (p * 0 + b * 0.2 + h * 0.4 + a * 0.45)/52;\r\n\t\t\t\r\n\t\t\t//Calculates National Insurance Contribution\r\n\t\t\tif(annualgross>8500 && annualgross<50000)\r\n\t\t\t{\r\n\t\t\t\tnirate=0.12;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tnirate=0.02;\r\n\t\t\t}\r\n\t\t\tnitax=gross*nirate;\r\n\t\t\t\r\n\t\t\t//Calculates Pension Contribution\r\n\t\t\tif(annualgross<27698)\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.074;\r\n\t\t\t}\r\n\t\t\telse if(annualgross>=27698 && annualgross<37285)\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.086;\r\n\t\t\t}\r\n\t\t\telse if(annualgross>=37285 && annualgross<44209)\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.096;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tpenrate=0.117;\r\n\t\t\t}\r\n\t\t\tpension=gross*penrate;\r\n\t\t\r\n\t\t\t//Calculates all income tax\r\n\t\t\ttotaltax=totaltax+tax;\r\n\t\t\t//Calculates all national insurance tax\r\n\t\t\ttotalni=totalni+nitax;\r\n\t\t\t//Calculates all pension contributions\r\n\t\t\ttotalpen=totalpen+pension;\r\n\t\t}\r\n\t\tSystem.out.printf(\"%10.2f%10.2f%15.2f\\n\", totaltax,totalni,totalpen);\r\n\t\tfs.close();\r\n\t}", "public double promedioAlum(){\n setProm((getC1() + getC2() + getC3() + getC4()) / 4);\n return getProm();\n }", "private void updateTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(inputtedAmount);\n int categoryId = mCategory != null ? mCategory.getId() : 0;\n String description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n // Less: Repayment, More: Lend\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n\n boolean isDebtValid = true;\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n\n } // End DebtType() == Category.EnumDebt.LESS\n if(isDebtValid) {\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n Debt debt = mDbHelper.getDebtByTransactionId(mTransaction.getId());\n debt.setCategoryId(mCategory.getId());\n debt.setAmount(amount);\n debt.setPeople(tvPeople.getText().toString());\n\n int debtRow = mDbHelper.updateDebt(debt);\n if(debtRow == 1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } else {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) mTransaction.getId());\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } // End create new Debt\n\n } // End Update transaction OK\n } // End isDebtValid\n\n } else { // CATEGORY NORMAL\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n LogUtils.logLeaveFunction(Tag);\n }", "public void addIncomeAmount(KualiDecimal incomeAmount) {\n this.incomeAmount = this.incomeAmount.add(incomeAmount); \n this.totalNumberOfTransactionLines++;\n \n }", "public BigDecimal getLBR_TaxReliefAmt();", "public JSONObject getAdvanceForGSTR3BTaxable(JSONObject reqParams) throws JSONException, ServiceException {\n String companyId=reqParams.optString(\"companyid\");\n JSONObject jSONObject = new JSONObject();\n double taxableAmountAdv = 0d;\n double IGSTAmount = 0d;\n double CGSTAmount = 0d;\n double SGSTAmount = 0d;\n double CESSAmount = 0d;\n reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n if (reqParams.optBoolean(\"at\")) {\n /**\n * Get Advance for which invoice not linked yet\n */\n\n reqParams.put(\"at\", true);\n List<Object> receiptList = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n JSONArray bulkData = gSTR1DeskeraServiceDao.createJsonForAdvanceDataFetchedFromDB(receiptList, reqParams);\n Map<String, JSONArray> advanceMap = AccountingManager.getSortedArrayMapBasedOnJSONAttribute(bulkData, GSTRConstants.receiptadvanceid);\n for (String advdetailkey : advanceMap.keySet()) {\n double rate = 0d;\n JSONArray adDetailArr = advanceMap.get(advdetailkey);\n JSONObject advanceobj = adDetailArr.getJSONObject(0);\n taxableAmountAdv += advanceobj.optDouble(GSTRConstants.receiptamount) - advanceobj.optDouble(GSTRConstants.receipttaxamount);\n for (int index = 0; index < adDetailArr.length(); index++) {\n JSONObject invdetailObj = adDetailArr.getJSONObject(index);\n String defaultterm = invdetailObj.optString(GSTRConstants.defaultterm);\n\n /**\n * Iterate applied GST and put its Percentage and Amount\n * accordingly\n */\n double termamount = invdetailObj.optDouble(GSTRConstants.termamount);\n double taxrate = invdetailObj.optDouble(GSTRConstants.taxrate);\n /**\n * calculate tax amount by considering partial case\n */\n termamount = (advanceobj.optDouble(GSTRConstants.receiptamount) - advanceobj.optDouble(GSTRConstants.receipttaxamount)) * invdetailObj.optDouble(GSTRConstants.taxrate) / 100;\n if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n }\n }\n }\n\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// List<Object> AdvData = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvData) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// IGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// CGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n// CESSAmount += termamount;\n// }\n// }\n } else {\n /**\n * Get Advance for which invoice isLinked\n */\n reqParams.put(\"atadj\", true);\n List<Object> receiptList = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n JSONArray bulkData = gSTR1DeskeraServiceDao.createJsonForAdvanceDataFetchedFromDB(receiptList, reqParams);\n Map<String, JSONArray> advanceMap = AccountingManager.getSortedArrayMapBasedOnJSONAttribute(bulkData, GSTRConstants.receiptadvanceid);\n for (String advdetailkey : advanceMap.keySet()) {\n double rate = 0d;\n JSONArray adDetailArr = advanceMap.get(advdetailkey);\n JSONObject advanceobj = adDetailArr.getJSONObject(0);\n taxableAmountAdv += advanceobj.optDouble(GSTRConstants.adjustedamount);\n for (int index = 0; index < adDetailArr.length(); index++) {\n JSONObject invdetailObj = adDetailArr.getJSONObject(index);\n String defaultterm = invdetailObj.optString(GSTRConstants.defaultterm);\n\n /**\n * Iterate applied GST and put its Percentage and Amount\n * accordingly\n */\n double termamount = invdetailObj.optDouble(GSTRConstants.termamount);\n double taxrate = invdetailObj.optDouble(GSTRConstants.taxrate);\n /**\n * calculate tax amount by considering partial case\n */\n termamount = advanceobj.optDouble(GSTRConstants.adjustedamount) * invdetailObj.optDouble(GSTRConstants.taxrate) / 100;\n if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n IGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n CGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n SGSTAmount += termamount;\n } else if (defaultterm.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n CESSAmount += termamount;\n }\n }\n }\n\n// reqParams.put(\"entitycolnum\", reqParams.optString(\"receiptentitycolnum\"));\n// reqParams.put(\"entityValue\", reqParams.optString(\"receiptentityValue\"));\n// List<Object> AdvDataLinked = accEntityGstDao.getAdvanceDetailsInSql(reqParams);\n// for (Object object : AdvDataLinked) {\n// Object[] data = (Object[]) object;\n// String term = data[1].toString();\n// double termamount = (Double) data[0];\n// taxableAmountAdv = (Double) data[2];\n// if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputIGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// IGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCGST\").toString())) {\n// taxableAmountAdv += (Double) data[2];\n// CGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputSGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputUTGST\").toString())) {\n// SGSTAmount += termamount;\n// } else if (term.equalsIgnoreCase(LineLevelTerms.GSTName.get(\"OutputCESS\").toString())) {\n// CESSAmount += termamount;\n// }\n// }\n }\n\n jSONObject.put(\"taxableamt\", authHandler.formattedAmount(taxableAmountAdv,companyId));\n jSONObject.put(\"igst\", authHandler.formattedAmount(IGSTAmount,companyId));\n jSONObject.put(\"cgst\", authHandler.formattedAmount(CGSTAmount,companyId));\n jSONObject.put(\"sgst\", authHandler.formattedAmount(SGSTAmount,companyId));\n jSONObject.put(\"csgst\", authHandler.formattedAmount(CESSAmount,companyId));\n jSONObject.put(\"totaltax\", authHandler.formattedAmount(IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n jSONObject.put(\"totalamount\", authHandler.formattedAmount(taxableAmountAdv+IGSTAmount+CGSTAmount+SGSTAmount+CESSAmount,companyId));\n return jSONObject;\n }", "public double calculateReimbursement (Reimburse reimburseEntry);", "int getBonusExp();", "int getBonusExp();", "@Override\n public void calcularIntGanado() {\n intGanado = saldo;\n for(int i = 0; i < plazoInv; i++){\n intGanado += inve * 12;\n intGanado += intGanado * (intAnual / 100);\n }\n intGanado = intGanado - (inve + saldo);\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter the investment amounth: \");\n\t\tdouble investment = input.nextDouble();\n\t\tSystem.out.println(\"Enter annual interest rate ( in percentage e.g. 3.5%) : \");\n\t\tdouble interestRate = input.nextDouble();\n\t\tSystem.out.println(\"Enter number of years: \");\n\t\tdouble numberOfYears = input.nextDouble();\n\t\t\n\t\tdouble acumulatedValue = investment * Math.pow(( 1 + (interestRate /1200) ),(numberOfYears * 12));\n\t\t\n\t\tSystem.out.println(\"Acumulated value is: \" + acumulatedValue);\n\t}", "Money getDiscountValue();", "public double calculateTax() {\n taxSubtotal = (saleAmount * SALESTAXRATE);\n\n return taxSubtotal;\n }", "public BigDecimal getTaxAmtPriceLimit();", "public Money getInterestDue();", "public void beforeTax() {\n TextView beforeView = findViewById(R.id.checkoutPage_beforeTaxValue);\n beforeView.setText(String.format(\"$%.2f\", beforeTaxTotal));\n }", "abstract protected BigDecimal getBasicTaxRate();", "public String countIncomes() throws IOException{ \r\n return \"Incomes: \" + getActualSheet().getCellAt(\"B1\").getTextValue() + \"\\n\";\r\n }", "public static double income(Scanner console) {\n System.out.print(\"How many categories of income? \");\n \n double numIncomes = console.nextDouble();\n double totalIncome = 0; \n String type = \"income\";\n\n for (int i = 1; i<= numIncomes; i++) {\n System.out.print(\" Next income amount? $\");\n totalIncome += userInput(console, type); \n }\n System.out.println();\n \n return difference(totalIncome);\n }" ]
[ "0.6298944", "0.5830608", "0.57712275", "0.56278604", "0.5545341", "0.5544181", "0.54969764", "0.5444604", "0.5394714", "0.53600484", "0.5348911", "0.53457683", "0.5343903", "0.53027076", "0.528146", "0.5270856", "0.5268674", "0.52486026", "0.52322793", "0.5224331", "0.5221174", "0.5209189", "0.518398", "0.5176654", "0.5167262", "0.5163205", "0.5157072", "0.5136803", "0.5112697", "0.5101702", "0.50869954", "0.5076175", "0.5072998", "0.50612897", "0.5043809", "0.5026504", "0.50252855", "0.5014831", "0.5002591", "0.50019777", "0.4993536", "0.49878627", "0.4986053", "0.49810195", "0.49792644", "0.4977142", "0.49757847", "0.49695307", "0.4967139", "0.49636123", "0.49630594", "0.49629748", "0.49622318", "0.49572313", "0.49538004", "0.49518305", "0.4945989", "0.4934359", "0.49190786", "0.4917281", "0.49126795", "0.49081215", "0.49079093", "0.4900006", "0.48959097", "0.48906267", "0.48864686", "0.48826176", "0.48781583", "0.48686686", "0.48648587", "0.4863868", "0.48628426", "0.48582307", "0.48557377", "0.4848891", "0.4843045", "0.48392078", "0.48373458", "0.48352522", "0.48320603", "0.4824837", "0.4824749", "0.4817509", "0.48087054", "0.4805503", "0.48021472", "0.48008797", "0.48000818", "0.48000818", "0.47980103", "0.47971368", "0.47932172", "0.4786696", "0.4785484", "0.47794345", "0.47781083", "0.4776071", "0.47755644", "0.477324" ]
0.8372615
0
/ Computes user's total payments and credits by taking the withholdings entered by the user and the calculated EIC as strings. Converts them to BigDecimals for rounding purposes, adds them together, and returns the sum as a string to the totalPaymentsAndCreditsField.
public String calcTotalPaymentsAndCredits(String withholding, String EIC){ BigDecimal withHoldings = new BigDecimal(withholding); BigDecimal calculatedEIC = new BigDecimal(EIC); BigDecimal totalPaymentsAndCredits = withHoldings.add(calculatedEIC); totalPaymentsAndCredits = totalPaymentsAndCredits.setScale(0, RoundingMode.HALF_UP); return totalPaymentsAndCredits.toPlainString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 void calc() {\n /*\n * Creates BigDecimals for each Tab.\n */\n BigDecimal registerSum = new BigDecimal(\"0.00\");\n BigDecimal rouleauSum = new BigDecimal(\"0.00\");\n BigDecimal coinageSum = new BigDecimal(\"0.00\");\n BigDecimal billSum = new BigDecimal(\"0.00\");\n /*\n * Iterates over all TextFields, where the User might have entered values into.\n */\n for (int i = 0; i <= 7; i++) {\n /*\n * If i <= 1 is true, we still have registerFields to add to their BigDecimal.\n */\n if (i <= 1) {\n try {\n /*\n * Stores the Text of the RegisterField at the index i with all non-digit characters.\n */\n String str = registerFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n /*\n * Creates a new BigDecimal, that is created by getting the Factor of the current \n * RegisterField and multiplying this with the input.\n */\n BigDecimal result = getFactor(i, FactorType.REGISTER).multiply(new BigDecimal(str));\n /*\n * Displays the result of the multiplication above in the associated Label.\n */\n registerLabels.get(i).setText(result.toString().replace('.', ',') + \"€\");\n /*\n * Adds the result of the multiplication to the BigDecimal for the RegisterTab.\n */\n registerSum = registerSum.add(result);\n } catch (NumberFormatException nfe) {\n //If the Input doesn't contain any numbers at all, a NumberFormatException is thrown, \n //but we don't have to do anything in this case\n }\n }\n /*\n * If i <= 4 is true, we still have rouleauFields to add to their BigDecimal.\n */\n if (i <= 4) {\n try {\n /*\n * See Documentation for the registerFields for Information.\n */\n String str = rouleauFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n BigDecimal sum = getFactor(i, FactorType.ROULEAU).multiply(new BigDecimal(str));\n rouleauLabels.get(i).setText(sum.toString().replace('.', ',') + \"€\");\n rouleauSum = rouleauSum.add(sum);\n } catch (NumberFormatException nfe) {\n //See above.\n }\n }\n /*\n * If i <= 6 is true, we still have billFields to add to their BigDecimal.\n */\n if (i <= 6) {\n try {\n /*\n * See Documentation for the registerFields for Information.\n */\n String str = billFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n BigDecimal sum = getFactor(i, FactorType.BILL).multiply(new BigDecimal(str));\n billLabels.get(i).setText(sum.toString().replace('.', ',') + \"€\");\n billSum = billSum.add(sum);\n } catch (NumberFormatException nfe) {\n //See above.\n }\n }\n /*\n * We have 8 coinageFields, so since the for-condition is 0 <= i <=7, we don't have to check \n * if i is in range and can simply calculate it's sum.\n */\n try {\n /*\n * See Documentation for the registerFields for Information.\n */\n String str = coinageFields.get(i).getText().replaceAll(\"\\\\D\", \"\");\n BigDecimal sum = getFactor(i, FactorType.COINAGE).multiply(new BigDecimal(str));\n coinageLabels.get(i).setText(sum.toString().replace('.', ',') + \"€\");\n coinageSum = coinageSum.add(sum);\n } catch (NumberFormatException nfe) {\n //See above.\n }\n }\n /*\n * Displays all results in the associated Labels.\n */\n sumLabels.get(0).setText(registerSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(1).setText(rouleauSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(2).setText(coinageSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(3).setText(billSum.toString().replace('.', ',') + \"€\");\n sumLabels.get(4).setText(billSum.add(coinageSum).add(rouleauSum).add(registerSum).toString()\n .replace('.', ',') + \"€\");\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 }", "private void getSum() {\n double sum = 0;\n for (int i = 0; i < remindersTable.getRowCount(); i++) {\n sum = sum + parseDouble(remindersTable.getValueAt(i, 3).toString());\n }\n String rounded = String.format(\"%.2f\", sum);\n ledgerTxtField.setText(rounded);\n }", "public static void extract_money(){\n TOTALCMONEY = TOTALCMONEY - BALANCERETRIEVE; //the total cashier money equals the total cashier money minus the retrieve request\r\n BALANCE = BALANCE - BALANCERETRIEVE; //the user balance equals the account minus the retrieve request\r\n }", "private void totalPrice() {\n double totalPrice;\n \n String stu = studentSubTotal.getText();\n stu = stu.substring(1);\n double stuTotal = Double.parseDouble(stu);\n\n String adult = adultSubTotal.getText();\n adult = adult.substring(1);\n double adultTotal = Double.parseDouble(adult);\n\n String senior = seniorSubTotal.getText();\n senior = senior.substring(1);\n double seniorTotal = Double.parseDouble(senior);\n\n totalPrice = stuTotal + adultTotal + seniorTotal;\n NumberFormat gbp = NumberFormat.getCurrencyInstance(Locale.UK);\n String totalStr = String.valueOf(gbp.format(totalPrice));\n totalPriceTextField.setText(totalStr);\n\n }", "public static BigDecimal calcTotalMoney()\n {\n SharedPreferences defaultSP;\n defaultSP = PreferenceManager.getDefaultSharedPreferences(MainActivity.mActivity);\n manualTime = Integer.valueOf(defaultSP.getString(\"moneyMode\", \"4\"));\n boolean plus = PolyApplication.plus;\n PolyApplication app = ((PolyApplication) MainActivity.mActivity.getApplication());\n\n if(!plus)\n {\n\n if (manualTime == 4 && app.user.getMeals() > 0)\n {\n today.setToNow();\n int minutes = (today.hour * 60) + today.minute;\n if (minutes >= 420 && minutes <= 599)\n {\n money = mealWorth[0];\n } else if (minutes >= 600 && minutes <= 1019)\n {\n money = mealWorth[1];\n } else if (minutes >= 1020 && minutes <= 1214)\n {\n money = mealWorth[2];\n } else\n {\n money = mealWorth[3];\n }\n return money.subtract(moneySpent).setScale(2);\n } else if(app.user.getMeals() > 0)\n {\n return mealWorth[manualTime].subtract(moneySpent).setScale(2);\n }\n else\n {\n return new BigDecimal(0.00).subtract(moneySpent).setScale(2);\n }\n }\n else\n {\n return ((PolyApplication) MainActivity.mActivity.getApplication()).user.getPlusDollars().subtract(moneySpent);\n }\n }", "public double sumMoney(){\n\t\tdouble result = 0;\n\t\tfor(DetailOrder detail : m_DetailOrder){\n\t\t\tresult += detail.calMoney();\n\t\t}\n\t\tif(exportOrder == true){\n\t\t\tresult = result * 1.1;\n\t\t}\n\t\treturn result;\n\t}", "public Double amountDueForPayment() {\n DecimalFormat df = new DecimalFormat(\"#.##\");\n int numGroupMembers = AppVariables.currentUser.getGroup().getGroupMembers().size();\n\n // if payment made by current user, should be amount owed\n // which is the payment amount - (payment amount) / #groupmembers\n if (username.equals(AppVariables.currentUser.getUsername())) {\n return Double.valueOf(df.format(amountSpent- amountSpent/numGroupMembers));\n }\n\n return Double.valueOf(df.format(amountSpent/numGroupMembers));\n\n\n }", "private void billing_calculate() {\r\n\r\n // need to search patient before calculating amount due\r\n if (billing_fullNameField.equals(\"\")){\r\n JOptionPane.showMessageDialog(this, \"Must search for a patient first!\\nGo to the Search Tab.\",\r\n \"Need to Search Patient\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n if (MainGUI.pimsSystem.lookUpAppointmentDate(currentPatient).equals(\"\")){\r\n JOptionPane.showMessageDialog(this, \"No Appointment to pay for!\\nGo to Appointment Tab to make one.\",\r\n \"Nothing to pay for\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n // patient has been searched - get info from patient info panel\r\n else {\r\n\r\n currentPatient = MainGUI.pimsSystem.patient_details\r\n (pInfo_lastNameTextField.getText(), Integer.parseInt(pInfo_ssnTextField.getText()));\r\n // patient has a policy, amount due is copay: $50\r\n // no policy, amount due is cost amount\r\n double toPay = MainGUI.pimsSystem.calculate_charge(currentPatient, billing_codeCB.getSelectedItem().toString());\r\n billing_amtDueField.setText(\"$\" + doubleToDecimalString(toPay));\r\n\r\n\r\n\r\n JOptionPane.showMessageDialog(this, \"Amount Due Calculated.\\nClick \\\"Ok\\\" to go to Payment Form\",\r\n \"Calculate\", JOptionPane.DEFAULT_OPTION);\r\n\r\n paymentDialog.setVisible(true);\r\n }\r\n\r\n }", "public BigDecimal getPayAmt();", "public KualiDecimal getCurrencyTotal(CashDrawer drawer);", "public KualiDecimal getCoinTotal(CashDrawer drawer);", "public BigDecimal getSumOfOutstanding(){\n\t\t BigDecimal a = new BigDecimal(0);\r\n//\t\t int outstandingIndex = 0;\r\n//\t\t for (int i=0 ; i<mColumnNames.length ; i++){\r\n//\t\t\t if (mColumnNames[i].equals(DBService.OUTSTANDING)){\r\n//\t\t\t\t outstandingIndex = i;\r\n//\t\t\t\t break;\r\n//\t\t\t }\r\n//\t\t }\r\n\t\t \r\n\t\t for (int i=0 ; i<getRowCount() ; i++){\r\n\t\t\t float value = (Float)getValueAt(i, 11);\r\n\t\t\t \r\n\t\t\t if (value != 0){\r\n\t\t\t\t BigDecimal b = new BigDecimal(value);\r\n\t\t\t\t a = a.add(b);\r\n\t\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t return a;\r\n\t }", "public double getCharges()\r\n {\r\n //variables\r\n double charges = 0.0;\r\n double parts = 0.0;\r\n double hours = 0.0;\r\n\r\n //get user input and change double\r\n parts = Double.parseDouble(chargeField.getText());\r\n hours = Double.parseDouble(hourField.getText());\r\n\r\n //math for charges\r\n charges = hours * LABOR_RATE + parts;\r\n return charges;\r\n }", "public double calcTotalCredit(){\n double credit = 0;\n \n credit += course1.isPassed() ? course1.getCredit() : 0;\n credit += course2.isPassed() ? course2.getCredit() : 0;\n credit += course3.isPassed() ? course3.getCredit() : 0;\n \n return credit;\n }", "private void calculate() {\n Log.d(\"MainActivity\", \"inside calculate method\");\n\n try {\n if (billAmount == 0.0);\n throw new Exception(\"\");\n }\n catch (Exception e){\n Log.d(\"MainActivity\", \"bill amount cannot be zero\");\n }\n // format percent and display in percentTextView\n textViewPercent.setText(percentFormat.format(percent));\n\n if (roundOption == 2) {\n tip = Math.ceil(billAmount * percent);\n total = billAmount + tip;\n }\n else if (roundOption == 3){\n tip = billAmount * percent;\n total = Math.ceil(billAmount + tip);\n }\n else {\n // calculate the tip and total\n tip = billAmount * percent;\n\n //use the tip example to do the same for the Total\n total = billAmount + tip;\n }\n\n // display tip and total formatted as currency\n //user currencyFormat instead of percentFormat to set the textViewTip\n tipAmount.setText(currencyFormat.format(tip));\n\n //use the tip example to do the same for the Total\n totalAmount.setText(currencyFormat.format(total));\n\n double person = total/nPeople;\n perPerson.setText(currencyFormat.format(person));\n }", "TotalInvoiceAmountType getTotalInvoiceAmount();", "BigDecimal getTotal();", "BigDecimal getTotal();", "public void amount() {\n \t\tfloat boxOHamt=boxOH*.65f*48f;\n \t\tSystem.out.printf(boxOH+\" boxes of Oh Henry ($0.65 x 48)= $%4.2f \\n\",boxOHamt);\n \t\tfloat boxCCamt=boxCC*.80f*48f;\n \t\tSystem.out.printf(boxCC+\" boxes of Coffee Crisp ($0.80 x 48)= $%4.2f \\n\", boxCCamt);\n \t\tfloat boxAEamt=boxAE*.60f*48f;\n \t\tSystem.out.printf(boxAE+\" boxes of Aero ($0.60 x 48)= $%4.2f \\n\", boxAEamt);\n \t\tfloat boxSMamt=boxSM*.70f*48f;\n \t\tSystem.out.printf(boxSM+\" boxes of Smarties ($0.70 x 48)= $%4.2f \\n\", boxSMamt);\n \t\tfloat boxCRamt=boxCR*.75f*48f;\n \t\tSystem.out.printf(boxCR+\" boxes of Crunchies ($0.75 x 48)= $%4.2f \\n\",boxCRamt);\n \t\tSystem.out.println(\"----------------------------------------------\");\n \t\t//display the total prices\n \t\tsubtotal=boxOHamt+boxCCamt+boxAEamt+boxSMamt+boxCRamt;\n \t\tSystem.out.printf(\"Sub Total = $%4.2f \\n\", subtotal);\n \t\ttax=subtotal*.07f;\n \t\tSystem.out.printf(\"Tax = $%4.2f \\n\", tax);\n \t\tSystem.out.println(\"==============================================\");\n \t\ttotal=subtotal+tax;\n \t\tSystem.out.printf(\"Amount Due = $%4.2f \\n\", total);\n \t}", "private String money() {\r\n\t\tint[] m =tile.getAgentMoney();\r\n\t\tString out =\"Agent Money: \\n\";\r\n\t\tint total=0;\r\n\t\tint square=(int)Math.sqrt(m.length);\r\n\t\tif(square*square<m.length) {\r\n\t\t\tsquare++;\r\n\t\t}\r\n\t\tfor(int i=0; i<m.length;) {\r\n\t\t\tfor(int j=0; j<square; j++) {\r\n\t\t\t\tif(i<m.length) {\r\n\t\t\t\t\tout=out.concat(String.format(\"%8s\", m[i]+\"\"));\r\n\t\t\t\t\ttotal=total+m[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tj=square;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tout=out.concat(\"\\n\");\r\n\t\t}\r\n\t\tout=out.concat(\"Agent Total: \"+total);\r\n\t\tint companyTotal=0;\r\n\t\tout=out.concat(\"\\n\\nCompany Money: \\n\");\r\n\t\tm=tile.getCompanyMoney();\r\n\t\tsquare=(int)Math.sqrt(m.length);\r\n\t\tif(square*square<m.length) {\r\n\t\t\tsquare++;\r\n\t\t}\r\n\t\tfor(int i=0; i<m.length;) {\r\n\t\t\tfor(int j=0; j<square; j++) {\r\n\t\t\t\tif(i<m.length) {\r\n\t\t\t\t\tout=out.concat(String.format(\"%8s\", m[i]));\r\n\t\t\t\t\tcompanyTotal=companyTotal+m[i];\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tj=square;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tout=out.concat(\"\\n\");\r\n\t\t}\r\n\t\tout=out.concat(\"Company Total: \"+companyTotal);\r\n\t\tout=out.concat(\"\\nTotal total: \"+(total+companyTotal));\r\n\t\tif(total+companyTotal!=tile.getPeopleSize()*tile.getAverageMoney()) {\r\n\t\t\tSTART=false;\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "public void getCredit(){\n System.out.println(\"Total Credit: \" +\"£\" + getUserMoney());\n }", "public void calculateAmount() {\n totalAmount = kurv.calculateTotalAmount() + \" DKK\";\n headerPrice.setText(totalAmount);\n }", "public double calculateNet(){\r\n double total = 0;\r\n for (Map.Entry<String, Account[]> list : allAccounts.entrySet()){\r\n Account[] accountList = list.getValue();\r\n String accountName = list.getKey();\r\n for (Account account : accountList){\r\n if (account == null){\r\n break;\r\n }\r\n if (accountName.equals(\"CreditCard\") || accountName.equals(\"LineOfCredit\")){\r\n total -= account.getCurrentBalance();\r\n } else{\r\n total += account.getCurrentBalance();\r\n }\r\n }\r\n }\r\n return Double.valueOf(twoDec.format(total));\r\n }", "public double calculatePayment (int hours);", "public BigDecimal getTotalCashPayment() {\n return totalCashPayment;\n }", "public void calcPrecioTotal() {\n try {\n float result = precioUnidad * Float.parseFloat(unidades.getText().toString());\n prTotal.setText(String.valueOf(result) + \"€\");\n }catch (Exception e){\n prTotal.setText(\"0.0€\");\n }\n }", "public void handleAddition() {\n\t\tString tempCryptoCurrency = cryptoCurrency.getText().toUpperCase();\n\t\t\n\t\tboolean notValid = !isCryptoInputValid(tempCryptoCurrency);\n\t\t\n\t\tif(notValid) {\n\t\t\ttempCryptoCurrency = null;\n\t\t}\n\t\t\n\t\t// is set to false in case a textField is empty \n\t\tboolean inputComplete = true;\n\t\t\n\t\t// Indicates whether the portfolio actually contains the number of coins to be sold\n\t\tboolean sellingAmountOk = true;\n\t\t\n\t\t/*\n\t\t * If the crypto currency is to be sold, a method is called that \n\t\t * checks whether the crypto currency to be sold is in the inventory at all.\n\t\t */\n\t\tif(type.getValue().toString() == \"Verkauf\" && cryptoCurrency.getText() != null ) {\t\n\t\t\tif(numberOfCoins.getText() == null || numberOfCoins.getText().isEmpty() || Double.valueOf(numberOfCoins.getText()) == 0.0) {\n\t\t\t\tsellingAmountOk = false;\n\t\t\t}else {\n\t\t\t\tsellingAmountOk = cryptoCurrencyAmountHold(Double.valueOf(numberOfCoins.getText()), cryptoCurrency.getText().toUpperCase());\n\t\t\t}\n\t\t\t\n\t\t} \n\t\t\n\t\t\n\t\tList<TextField> labelList = new ArrayList<>();\n\t\t\n\t\t// list of textFields which should be validate for input\n\t\tlabelList.add(price);\n\t\tlabelList.add(numberOfCoins);\n\t\tlabelList.add(fees);\n\t\t\t\n\t\t// validates if the textField input is empty\n\t\tfor (TextField textField : labelList) {\n\t\t\t\n\t\t\tif (textField.getText().trim().isEmpty()) {\n\t\t\t\tinputComplete = false;\n\t\t\t}\n\t\t\t\n\t\t\tif (validateFieldInput(textField.getText()) == false){\n\t\t\t\tinputComplete = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Logic to differentiate whether a warning is displayed or not.\n\t\tif (sellingAmountOk == false) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Eingabefehler\");\n\t\t\talert.getDialogPane().getStylesheets().add(getClass().getResource(\"Style.css\").toExternalForm());\n\t\t\talert.getDialogPane().getStyleClass().add(\"dialog-pane\");\n\t\t\talert.setHeaderText(\"Ungueltige Anzahl, bitte korrigieren\");\n\t\t\talert.showAndWait();\n\t\t}else if (inputComplete == false) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Eingabefehler\");\n\t\t\talert.getDialogPane().getStylesheets().add(getClass().getResource(\"Style.css\").toExternalForm());\n\t\t\talert.getDialogPane().getStyleClass().add(\"dialog-pane\");\n\t\t\talert.setHeaderText(\"Eingabe ist unvollstaendig oder ungueltig\");\n\t\t\talert.showAndWait();\n\t\t} else if (tempCryptoCurrency == null) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Eingabefehler\");\n\t\t\talert.getDialogPane().getStylesheets().add(getClass().getResource(\"Style.css\").toExternalForm());\n\t alert.getDialogPane().getStyleClass().add(\"dialog-pane\");\n\t\t\talert.setHeaderText(\"Symbol fuer Coin existiert nicht\");\n\t\t\talert.showAndWait();\n\t\t}\n\t\telse {\n\t\t\t// if no type is entered, \"Kauf\" is automatically set\n\t\t\tif (type.getValue() == null){\n\t\t\t\ttype.setValue(\"Kauf\");\n\t\t\t}\n\t\t\t\n\t\t\tif (datePicker.getValue() == null) {\n\t\t\t\tdatePicker.setValue(LocalDate.now());\n\t\t\t}\n\n\t\t\t// Calls a method for calculating the total\n\t\t\tDouble tempTotal = calculateTotal(type.getValue().toString(), Double.valueOf(price.getText()),\n\t\t\t\t\tDouble.valueOf(numberOfCoins.getText()), Double.valueOf(fees.getText()));\n\n\t\t\tDouble tempNbrOfCoins = Double.valueOf(numberOfCoins.getText());\n\n\t\t\t\n\t\t\tif (type.getValue().toString() == \"Verkauf\") {\n\t\t\t\ttempNbrOfCoins = tempNbrOfCoins * -1;\n\t\t\t}\n\n\t\t\tif (transaction == null) {\n\t\t\t\tsaveTransaction(Double.valueOf(price.getText()), fiatCurrency.getText(), datePicker.getValue(), tempCryptoCurrency,\n\t\t\t\t\t\ttype.getValue().toString(), tempNbrOfCoins, Double.valueOf(fees.getText()), tempTotal);\n\t\t\t} else {\n\t\t\t\tupdateTransaction(transaction, Double.valueOf(price.getText()), fiatCurrency.getText(), datePicker.getValue(),\n\t\t\t\t\t\ttempCryptoCurrency, type.getValue().toString(), tempNbrOfCoins, Double.valueOf(fees.getText()),\n\t\t\t\t\t\ttempTotal);\n\t\t\t}\n\t\t\tmainApp.openPortfolioDetailView();\n\n\t\t\t/*\n\t\t\t * Sets the transaction to zero to know whether to add a new transaction or\n\t\t\t * update an existing transaction when opening next time the dialog.\n\t\t\t */\n\t\t\tthis.transaction = null;\n\n\t\t}\n\t}", "BigDecimal calculateDailyIncome(List<Instruction> instructions);", "public Money getEstCalculatedCADTotal() {\r\n if (this.moneyCADConverter== null)\r\n throw new IllegalStateException(\"This method requires a 'MoneyCADConverter' implementation available\");\r\n //intialize the CalculCAD amount\r\n estCalculatedCADTotal = Money.getCAD(0.00);\r\n for (ListIterator iter = poLineItems.listIterator() ; iter.hasNext() ;) {\r\n PoLineItem linetemp = (PoLineItem)iter.next();\r\n Money lineSubTotal = linetemp.getListPrice().multiply(linetemp.getQuantity());\r\n \r\n if (!lineSubTotal.getCurrency().equals(Currency.getInstance(\"CAD\"))){\r\n //convert into CAD currency\r\n lineSubTotal = moneyCADConverter.convertToCAD(lineSubTotal);\r\n }\r\n estCalculatedCADTotal= estCalculatedCADTotal.add(lineSubTotal);\r\n }\r\n return estCalculatedCADTotal;\r\n }", "public double calcTotal(){\n\t\tdouble total; // amount to be returned\n\t\t\n\t\t// add .50 cents for any milk that isn't whole or skim, and .35 cents for flavoring\n\t\tif ((milk != \"whole\" && milk != \"skim\") && flavor != \"no\"){\n\t\t\tcost += 0.85;\t\n\t\t}\n\t\t\n\t\t// add .35 cents for flavoring\n\t\telse if (flavor != \"no\"){\n\t\t\tcost += 0.35;\t\n\t\t}\n\t\t\n\t\t// add .50 cents for milk that isn't whole or skim\n\t\telse if (milk != \"whole\" && milk != \"skim\"){\n\t\t\tcost += 0.50;\n\t\t}\n\t\t\n\t\telse{\n\t\t}\n\t\t\n\t\t// add .50 cents for extra shot of espresso\n\t\tif (extraShot != false){\n\t\t\ttotal = cost + 0.50;\n\t\t}\n\t\telse\n\t\t\ttotal = cost;\n\t\t\n\t\treturn total;\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 BigDecimal calculateTotal() {\r\n BigDecimal orderTotal = BigDecimal.ZERO;\r\n \r\n final Iterator<Item> iterator = myShoppingCart.keySet().iterator();\r\n \r\n while (iterator.hasNext()) {\r\n final BigDecimal currentOrderPrice = myShoppingCart.get(iterator.next());\r\n \r\n orderTotal = orderTotal.add(currentOrderPrice);\r\n }\r\n \r\n //if membership take %10 off the total cost\r\n if (myMembership) {\r\n if (orderTotal.compareTo(new BigDecimal(\"25.00\")) == 1) { //myOrderTotal > $25\r\n final BigDecimal discount = DISCOUNT_RATE.multiply(orderTotal); \r\n orderTotal = orderTotal.subtract(discount);\r\n }\r\n }\r\n \r\n return orderTotal.setScale(2, RoundingMode.HALF_EVEN);\r\n }", "@WebMethod public float addMoney(Account user,String e, float amount) throws NullParameterException, IncorrectPaymentFormatException, UserNotInDBException, NoPaymentMethodException, PaymentMethodNotFound;", "public double totalInsuranceCost(){\n double cost=0;\n for(InsuredPerson i: insuredPeople){\n cost+=i.getInsuranceCost();\n\n }\n return cost;\n\n }", "private CharSequence calculateTotalPrice() {\n float totalPrice = 0.0f;\n totalPrice += UserScreen.fishingRodQuantity * 25.50;\n totalPrice += UserScreen.hockeyStickQuantity * 99.99;\n totalPrice += UserScreen.runningShoesQuantity * 85.99;\n totalPrice += UserScreen.proteinBarQuantity * 5.25;\n totalPrice += UserScreen.skatesQuantity * 50.79;\n return Float.toString(totalPrice);\n }", "public double totalFee(){\n return (this.creditHours*this.feePerCreditHour)-this.scholarshipAmount+((this.healthInsurancePerAnnum*4)/12);\n }", "public BigDecimal getTotalEarnings() {\n totalEarnings = new BigDecimal(0);\n for(BigDecimal earnings: earningsList){\n totalEarnings = totalEarnings.add(earnings);\n }\n return totalEarnings.setScale(2, RoundingMode.HALF_UP);\n }", "BigDecimal getSumOfTransactionsRest(TransferQuery query);", "public double precioFinal(){\r\n \r\n double plus = 0;\r\n \r\n switch(consumoElectrico){\r\n case 'A':\r\n plus +=100;\r\n break;\r\n case 'B':\r\n plus += 80;\r\n break;\r\n case 'C':\r\n plus +=60;\r\n break;\r\n case 'D':\r\n plus +=50;\r\n break;\r\n case 'E':\r\n plus+=30;\r\n break;\r\n case 'F':\r\n plus+=10;\r\n break;\r\n \r\n }\r\n \r\n \r\n if(peso>=0 && peso<=19){\r\n plus+=10;\r\n }else if(peso >=20 && peso<= 49){\r\n plus+=50;\r\n }else if(peso >= 50 && peso<=79){\r\n plus+=80;\r\n }else if(peso>=80){\r\n plus+=100;\r\n }\r\n return precioBase+plus;\r\n }", "public String getSum();", "public double calTotalAmount(){\n\t\tdouble result=0;\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tresult += this.cd.get(i).getPrice();\n\t\t}\n\t\treturn result;\n\t}", "@Step\n public String getBetSum(){\n return actionWithWebElements.getTextFromElementSum(betSum);\n }", "public String getTotalDeposits(){\n double sum = 0;\n for(Customer record : bank.getName2CustomersMapping().values()){\n for(Account acc: record.getAccounts()){\n sum += acc.getOpeningBalance();\n }\n }\n return \"Total deposits: \"+sum;\n }", "@Override\n\tpublic double sumMoney() {\n\t\treturn ob.sumMoney();\n\t}", "public String toString () {\r\n // write out amount of cash\r\n String stuffInWallet = \"The total amount of Bills in your wallet is: $\" + getAmountInBills() + \"\\n\" +\r\n \"The total amount of Coins in your wallet is: $\" + getAmountInCoins() + \"\\n\";\r\n\r\n // add in the charge (credit and debit) cards\r\n // for each element in the chargeCards list, calls its toString method\r\n for ( int i = 0; i < chargeCards.size(); i++ ) {\r\n stuffInWallet += chargeCards.get( i ) + \"\\n\";\r\n }\r\n\r\n for ( int i = 0; i < idCards.size(); i++ ) {\r\n stuffInWallet += idCards.get( i ) + \"\\n\";\r\n }\r\n\r\n return stuffInWallet;\r\n }", "@Override\n\tpublic String accumulate(String enteredAmount) throws IllegalArgumentException, StringIndexOutOfBoundsException {\n\t\t\t\n\t\t//look for leading zeroes\n\t\tif (enteredAmount.startsWith(\"0\"))\n\t\t throw new IllegalArgumentException(CalculatorConstants.LEADING_ZERO);\n\t\t\t\n\t\t//look for bad operators\n\t\tif (enteredAmount.startsWith(\"/\") // all of these\n\t\t\t|| enteredAmount.startsWith(\"x\") // are input\n\t\t\t|| enteredAmount.startsWith(\"*\")) // errors.\n\t\t\tthrow new IllegalArgumentException(CalculatorConstants.ONLY_ADD);\n\t\t\t\n\t\t//Look for null/empty strings\n\t\tenteredAmount = enteredAmount.trim();\n\t\t\n\t\tif ((enteredAmount == null) // bad parm!\n\t\t\t|| (enteredAmount.length() == 0)) // bad parm!\n\t\t\tthrow new IllegalArgumentException(CalculatorConstants.MISSING_AMOUNT);\n\t\t\t\n\t\t\t//Make +/- strings more lenient\n\t\tif (enteredAmount.startsWith(\"+ \")\n\t\t\t|| enteredAmount.startsWith(\"- \"))\t\t\t\t\n\t\t\tenteredAmount = enteredAmount.substring(0,1) + enteredAmount.substring(1).trim();\n\t\t\t\n\t\t//check decimals\n\t\tif (enteredAmount.contains(\".\")){\n\t\t\tint periodOffset = enteredAmount.indexOf(\".\");\n\t\t\tString decimalPortion = enteredAmount.substring(periodOffset+1);\n\t\t\tif (decimalPortion.length() != 2) \n\t\t\t\tthrow new IllegalArgumentException(CalculatorConstants.TWO_DECIMALS);\n\t\t}\n\t\t\t\n\t\t//attempt to parse string into double\n\t\tdouble amount;\n\t\ttry{\n\t\t\tamount = Double.parseDouble(enteredAmount);\n\t\t}\n\t\t//catch NaN\n\t\tcatch(NumberFormatException nfe){\n\t\t\tthrow new IllegalArgumentException(CalculatorConstants.NOT_NUMERIC);\n\t\t}\n\t\t//accumulate into total\n\t\ttotal = total + amount;\n\t\t\t\n\t\tString newTotal = String.valueOf(total);\n\t\t\t\n\t\t//add trailing 0's or round up if necessary for new total\n\t\tif (newTotal.contains(\".\")){\n\t\t\tint periodOffset = newTotal.indexOf(\".\");\n\t\t\tString decimalPortion = newTotal.substring(periodOffset+1);\n\t\t\t\t\n\t\t\tif (decimalPortion.length() == 0)\n\t\t\t\tnewTotal += \"00\";\n\t\t\tif (decimalPortion.length() == 1)\n\t\t\t\tnewTotal += \"0\";\n\t\t\tif (decimalPortion.length() > 2){\n\t\t\t\ttotal += .005; // round up \n\t\t\t\tnewTotal = String.valueOf(total);\n\t\t\t\tperiodOffset = newTotal.indexOf(\".\");\n\t\t\t\tnewTotal = newTotal.substring(0,periodOffset+3);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn newTotal;\n\t}", "public String getWalletTotal() {\n return \"$\" + wallet.getMoney();\n }", "public double getTotalPayments(){return this.total;}", "public void calculatePayment() {}", "public String getAmountCredited() {\n\t\twaitForControl(driver, LiveGuru99.WithdrawallPage.GET_AMOUNT_DEPOSIT, timeWait);\n\t\tString amount = getText(driver, LiveGuru99.WithdrawallPage.GET_AMOUNT_DEPOSIT);\n\t\treturn amount;\n\t}", "@Override\r\n\tpublic double getBalance() {\n\t\treturn (super.getBalance()+cashcredit);\r\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getCapitalPayed();", "BigDecimal getSumaryTechoCveFuente(BudgetKeyEntity budgetKeyEntity);", "public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}", "public String determineFormattedSumString(int a, int b);", "public int calculateCost() {\n int premium = surety.calculatePremium(insuredValue);\n SuretyType suretyType = surety.getSuretyType();\n int commission = (int) Math.round(premium * vehicle.getCommission(suretyType));\n return premium + commission;\n }", "private void calcCoins() {\n\t\tint changeDueRemaining = (int) Math.round((this.changeDue - (int) this.changeDue) * 100);\n\n\t\tif (changeDueRemaining >= 25) {\n\t\t\tthis.quarter += changeDueRemaining / 25;\n\t\t\tchangeDueRemaining = changeDueRemaining % 25;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.dime += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.nickel += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.penny += changeDueRemaining / 1;\n\t\t}\n\t}", "@Override\n\tpublic BigDecimal getSumActualInComeAmount(Map<String, Object> params)\n\t\t\tthrows ServiceException {\n\t\treturn cashTransactionDtlMapper.getSumActualInComeAmount(params);\n\t}", "public double returnBoxCost(double cardGradeCost, double colourOptPercent, double reinfPercent, double sealablePercent){\n\t\tdouble sum = cardGradeCost + ((cardGradeCost * colourOptPercent) / 100) + ((cardGradeCost * reinfPercent) / 100)\n\t\t\t\t+ ((cardGradeCost * sealablePercent) / 100); \n\t\tdouble computeTotal = 0.00;\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"##.##\");\t\n\t\t\n\t\ttry{\n\t\t\tcomputeTotal = Double.valueOf(df.format(sum));\n\t\t\t}catch(NumberFormatException nme){\n\t\t\t\t\n\t\t\t}\n\t\treturn computeTotal;\n\t}", "public double getBankMoney(){\n double total = 0.0;\n for(Coin c : bank){\n total += c.getValue();\n }\n return total;\n }", "public double CalculateTotalCompensation(){\r\n\t\tsetTotalCompensation(getCommission() + getBaseSalary());\r\n\t\treturn getTotalCompensation();\r\n\t}", "@Override \r\n public double getPaymentAmount() \r\n { \r\n return getQuantity() * getPricePerItem(); // calculate total cost\r\n }", "public String addDecimal();", "private void calculateCommissionAmount(PrintItinerary itinerary) {\n\t\tdouble commissionAmount = 0.0;\n\n\t\t// calculate commissionAmount for hotels\n\t\tcommissionAmount = commissionAmount\n\t\t\t\t+ calculateCommissionAmountHotels(itinerary);\n\n\t\t// calculate commissionAmount for flights\n\t\tcommissionAmount = commissionAmount\n\t\t\t\t+ calculateCommissionAmountFlights(itinerary);\n\n\t\t// calculate commissionAmount for vehicles\n\t\tcommissionAmount = commissionAmount\n\t\t\t\t+ calculateCommissionAmountVehicles(itinerary);\n\n\t\t// calculate commissionAmount for package\n\t\tcommissionAmount = commissionAmount\n\t\t\t\t+ calculateCommissionAmountPackage(itinerary);\n\n\t\t// calculate commissionAmount for multidest package\n\t\tcommissionAmount = commissionAmount\n\t\t\t\t+ calculateCommissionAmountMultPackage(itinerary);\n\n\t\t// set commission amount\n\t\titinerary.getBookingHeader().setBaseCommission(commissionAmount);\n\n\t}", "private static void recalculateSummary(Sheet sheet, Payment payment) {\r\n BigDecimal income =(BigDecimal) sheet.getCellAt(\"B1\").getValue();\r\n BigDecimal expense = (BigDecimal) sheet.getCellAt(\"B2\").getValue();\r\n BigDecimal sum = (BigDecimal) sheet.getCellAt(\"B3\").getValue();\r\n \r\n if (payment.getType() == PaymentType.INCOME){\r\n sum = sum.add(payment.getAmount());\r\n income = income.add(payment.getAmount());\r\n } else if (payment.getType() == PaymentType.EXPENSE){\r\n sum = sum.subtract(payment.getAmount());\r\n expense = expense.add(payment.getAmount());\r\n }\r\n \r\n sheet.getCellAt(\"B1\").setValue(income);\r\n sheet.getCellAt(\"B2\").setValue(expense);\r\n sheet.getCellAt(\"B3\").setValue(sum);\r\n }", "BigDecimal getAmount();", "public String getTotalAmountOfTicketFlight()\n\t{\n\t\tint sum;\n\n\t\tint departurePriceAtbottom = Integer.parseInt(getDepartureFlightPriceAtBottom().replaceAll(\"[Rs ,]\", \"\"));\n\t\tint returnPriceAtbottom = Integer.parseInt(getReturnFlightPriceAtBottom().replaceAll(\"[Rs ,]\", \"\"));\n\t\t\n\t\twaitForSeconds(5);\n\n\t\tif(driver.getPageSource().contains(\"Return trip discount\")) {\n\t\t\tint dAmount = Integer.parseInt(discountTagAmount.getText().replaceAll(\"[Rs ]\", \"\"));\n\t\t\tsum = (departurePriceAtbottom + returnPriceAtbottom)- dAmount;\n\n\t\t}\n\t\telse \n\t\t{\n\n\t\t\tsum = departurePriceAtbottom + returnPriceAtbottom;\n\t\t}\n\n\n\t\treturn String.valueOf(sum);\n\t}", "BigDecimal calculateTotalPrice(Order order);", "private void CalculateTotalAmount() {\r\n\r\n double dSubTotal = 0, dTaxTotal = 0, dModifierAmt = 0, dServiceTaxAmt = 0, dOtherCharges = 0, dTaxAmt = 0, dSerTaxAmt = 0, dIGSTAmt=0, dcessAmt=0, dblDiscount = 0;\r\n float dTaxPercent = 0, dSerTaxPercent = 0;\r\n\r\n // Item wise tax calculation ----------------------------\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n TableRow RowItem = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n if (RowItem.getChildAt(0) != null) {\r\n\r\n TextView ColTaxType = (TextView) RowItem.getChildAt(13);\r\n TextView ColAmount = (TextView) RowItem.getChildAt(5);\r\n TextView ColDisc = (TextView) RowItem.getChildAt(9);\r\n TextView ColTax = (TextView) RowItem.getChildAt(7);\r\n TextView ColModifierAmount = (TextView) RowItem.getChildAt(14);\r\n TextView ColServiceTaxAmount = (TextView) RowItem.getChildAt(16);\r\n TextView ColIGSTAmount = (TextView) RowItem.getChildAt(24);\r\n TextView ColcessAmount = (TextView) RowItem.getChildAt(26);\r\n TextView ColAdditionalCessAmt = (TextView) RowItem.getChildAt(29);\r\n TextView ColTotalCessAmount = (TextView) RowItem.getChildAt(30);\r\n dblDiscount += Double.parseDouble(ColDisc.getText().toString());\r\n dTaxTotal += Double.parseDouble(ColTax.getText().toString());\r\n dServiceTaxAmt += Double.parseDouble(ColServiceTaxAmount.getText().toString());\r\n dIGSTAmt += Double.parseDouble(ColIGSTAmount.getText().toString());\r\n// dcessAmt += Double.parseDouble(ColcessAmount.getText().toString()) + Double.parseDouble(ColAdditionalCessAmt.getText().toString());\r\n dcessAmt += Double.parseDouble(ColTotalCessAmount.getText().toString());\r\n dSubTotal += Double.parseDouble(ColAmount.getText().toString());\r\n\r\n }\r\n }\r\n // ------------------------------------------\r\n\r\n // Bill wise tax Calculation -------------------------------\r\n Cursor crsrtax = dbBillScreen.getTaxConfig(1);\r\n if (crsrtax.moveToFirst()) {\r\n dTaxPercent = crsrtax.getFloat(crsrtax.getColumnIndex(\"TotalPercentage\"));\r\n dTaxAmt += dSubTotal * (dTaxPercent / 100);\r\n }\r\n Cursor crsrtax1 = dbBillScreen.getTaxConfig(2);\r\n if (crsrtax1.moveToFirst()) {\r\n dSerTaxPercent = crsrtax1.getFloat(crsrtax1.getColumnIndex(\"TotalPercentage\"));\r\n dSerTaxAmt += dSubTotal * (dSerTaxPercent / 100);\r\n }\r\n // -------------------------------------------------\r\n\r\n dOtherCharges = Double.valueOf(tvOthercharges.getText().toString());\r\n //String strTax = crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\"));\r\n if (crsrSettings.moveToFirst()) {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) {\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxTotal + dServiceTaxAmt + dOtherCharges+dcessAmt));\r\n } else {\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxAmt + dSerTaxAmt + dOtherCharges+dcessAmt));\r\n }\r\n } else {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) {\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dOtherCharges));\r\n\r\n } else {\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dOtherCharges));\r\n }\r\n }\r\n tvDiscountAmount.setText(String.format(\"%.2f\", dblDiscount));\r\n }\r\n }", "public String getTotalPayment() {\n return totalPayment;\n }", "@Override\n public double earnings() {\n return salary + commission + quantity;\n }", "public double getCEMENTAmount();", "public void calculate(View v) {\n EditText inputBill = findViewById(R.id.inputBill);\n EditText inputTipPercent = findViewById(R.id.inputTipPercent);\n String num1Str = inputBill.getText().toString();\n String num2Str = inputTipPercent.getText().toString();\n\n // multiply Bill by Tip to get Tip in dollars\n double num1 = Double.parseDouble(num1Str);\n double num2 = Double.parseDouble(num2Str);\n double tipInDollar = num1 * (num2 / 100);\n double total = num1 + tipInDollar;\n\n // show tip in dollars\n TextView lblTipAmount = findViewById(R.id.lblTipAmount);\n lblTipAmount.setText(String.valueOf(tipInDollar));\n\n // show total price with tip included\n TextView lblTotalAmount = findViewById(R.id.lblTotalAmount);\n lblTotalAmount.setText(String.valueOf(total));\n }", "public java.math.BigDecimal getTotalDebit()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TOTALDEBIT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getBigDecimalValue();\n }\n }", "public double getCredits(User user) throws Exception;", "public boolean calcularTotal() {\r\n double dou_debe = 0;\r\n double dou_haber = 0;\r\n for (int i = 0; i < tab_tabla2.getTotalFilas(); i++) {\r\n try {\r\n if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_debe)) {\r\n dou_debe += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n } else if (tab_tabla2.getValor(i, \"ide_cnlap\").equals(p_con_lugar_haber)) {\r\n dou_haber += Double.parseDouble(tab_tabla2.getValor(i, \"valor_cndcc\"));\r\n }\r\n } catch (Exception e) {\r\n }\r\n }\r\n eti_suma_debe.setValue(\"TOTAL DEBE : \" + utilitario.getFormatoNumero(dou_debe));\r\n eti_suma_haber.setValue(\"TOTAL HABER : \" + utilitario.getFormatoNumero(dou_haber));\r\n\r\n double dou_diferencia = Double.parseDouble(utilitario.getFormatoNumero(dou_debe)) - Double.parseDouble(utilitario.getFormatoNumero(dou_haber));\r\n eti_suma_diferencia.setValue(\"DIFERENCIA : \" + utilitario.getFormatoNumero(dou_diferencia));\r\n if (dou_diferencia != 0.0) {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold;color:red\");\r\n } else {\r\n eti_suma_diferencia.setStyle(\"font-size: 14px;font-weight: bold\");\r\n return true;\r\n }\r\n return false;\r\n }", "public String centsToDollar() {\n return partieEntier + \".\" +\n String.format(\"%02d\", partieFractionnaire) + \"$\";\n }", "public static int totalCreditHours(){\n int total = 0; //stores total credit hours\n for (int credit: courseCredithourList){\n total += credit;\n }\n return total;\n }", "private String getBillPrice() {\n double cost = 0.00;\n\n for (MenuItem item : bill.getItems()) {\n cost += (item.getPrice() * item.getQuantity());\n cost += item.getExtraIngredientPrice();\n cost -= item.getRemovedIngredientsPrice();\n }\n\n return String.format(\"%.2f\", cost);\n }", "public String calculateTotalPriceInsurance(final InsuranceDetailsCriteria formBean,\r\n final ExtraFacility extraFacility)\r\n {\r\n final List<Price> extraPrices = extraFacility.getPrices();\r\n BigDecimal total = BigDecimal.ZERO;\r\n \r\n for (final String personType : formBean.getSelected().values())\r\n {\r\n for (final Price eachPriceModel : extraPrices)\r\n {\r\n if (StringUtils.equalsIgnoreCase(eachPriceModel.getPriceProfile().getPersonType()\r\n .toString(), personType.trim()))\r\n {\r\n total = total.add(eachPriceModel.getRate().getAmount());\r\n break;\r\n }\r\n }\r\n }\r\n return total.toString();\r\n }", "private String formatUsNumber(Editable text) {\n\t\tStringBuilder cashAmountBuilder = null;\n\t\tString USCurrencyFormat = text.toString();\n//\t\tif (!text.toString().matches(\"^\\\\$(\\\\d{1,3}(\\\\,\\\\d{3})*|(\\\\d+))(\\\\.\\\\d{2})?$\")) { \n\t\t\tString userInput = \"\" + text.toString().replaceAll(\"[^\\\\d]\", \"\");\n\t\t\tcashAmountBuilder = new StringBuilder(userInput);\n\n\t\t\twhile (cashAmountBuilder.length() > 3 && cashAmountBuilder.charAt(0) == '0') {\n\t\t\t\tcashAmountBuilder.deleteCharAt(0);\n\t\t\t}\n\t\t\twhile (cashAmountBuilder.length() < 3) {\n\t\t\t\tcashAmountBuilder.insert(0, '0');\n\t\t\t}\n\t\t\tcashAmountBuilder.insert(cashAmountBuilder.length() - 2, '.');\n\t\t\tUSCurrencyFormat = cashAmountBuilder.toString();\n\t\t\tUSCurrencyFormat = Util.getdoubleUSPriceFormat(Double.parseDouble(USCurrencyFormat));\n\n//\t\t}\n\t\tif(\"0.00\".equals(USCurrencyFormat)){\n\t\t\treturn \"\";\n\t\t}\n\t\tif(!USCurrencyFormat.contains(\"$\"))\n\t\t\treturn \"$\"+USCurrencyFormat;\n\t\treturn USCurrencyFormat;\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount getAmount();", "public Integer calculateSum() {\n logger.debug(\"Calculating and returning the sum of expenses.\");\n return listOfTargets.stream().map(T::getAmount).reduce(0, Integer::sum);\n }", "private void updateTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(inputtedAmount);\n int categoryId = mCategory != null ? mCategory.getId() : 0;\n String description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n // Less: Repayment, More: Lend\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n\n boolean isDebtValid = true;\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n\n } // End DebtType() == Category.EnumDebt.LESS\n if(isDebtValid) {\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n Debt debt = mDbHelper.getDebtByTransactionId(mTransaction.getId());\n debt.setCategoryId(mCategory.getId());\n debt.setAmount(amount);\n debt.setPeople(tvPeople.getText().toString());\n\n int debtRow = mDbHelper.updateDebt(debt);\n if(debtRow == 1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } else {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) mTransaction.getId());\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } // End create new Debt\n\n } // End Update transaction OK\n } // End isDebtValid\n\n } else { // CATEGORY NORMAL\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n LogUtils.logLeaveFunction(Tag);\n }", "private void CalculateJButtonActionPerformed(java.awt.event.ActionEvent evt) { \n // read the inputs and calculate payment of loan\n //constants for max values, and number of comoundings per year\n final double MAX_AMOUNT = 100000000;\n final double MAX_INTEREST_RATE = 100;\n final int COUMPOUNDINGS = 12;\n final double MAX_YEARS = 50;\n final double PERIOD_INTEREST = COUMPOUNDINGS * 100;\n String errorMessage = \"Please enter a positive number for all required fields\"\n + \"\\nLoan amount must be in reange (0, \" + MAX_AMOUNT + \"]\"\n + \"\\nInterest rate must be in range [0, \" + MAX_INTEREST_RATE + \"]\"\n + \"\\nYears must be in range [0, \" + MAX_INTEREST_RATE + \"]\";\n \n counter++;\n CounterJTextField.setText(String.valueOf(counter));\n \n //get inputs\n double amount = Double.parseDouble(PrincipalJTextField.getText());\n double rate = Double.parseDouble(RateJTextField.getText());\n double years = Double.parseDouble(YearsJTextField.getText());\n \n //calculate paymets using formula\n double payment = (amount * rate/PERIOD_INTEREST)/\n (1 - Math.pow((1 + rate/PERIOD_INTEREST),\n years * (-COUMPOUNDINGS)));\n double interest = years * COUMPOUNDINGS * payment - amount;\n \n //displays results\n DecimalFormat dollars = new DecimalFormat(\"$#,##0.00\");\n\n PaymentJTextField.setText(dollars.format(payment));\n InterestJTextField.setText(dollars.format(interest));\n \n }", "private double calculateTotal() {\n Log.d(\"Method\", \"calculateTotal()\");\n\n double extras = 0;\n CheckBox cb = (CheckBox) findViewById(R.id.whipped_checkbox_view);\n\n if (cb.isChecked()) {\n extras = coffeeCount * 0.75;\n }\n return (coffeeCount * coffeePrice) + extras;\n }", "private double calculateTotal(){\r\n double total = 0;\r\n for(int i = 0; i < orderList.size(); i++){\r\n total += orderList.getOrder(i).calculatePrice();\r\n }\r\n return total;\r\n }", "Double getTotalSpent();", "double getPaidAmount();", "private void calculateCosts() {\r\n lb_CubicSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_Volume)) + \" €\");\r\n lb_MaterialCostSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_Price)) + \" €\");\r\n lb_CuttingTimeSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingHours)) + \" €\");\r\n lb_CuttingCostSum.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingPrice)) + \" €\");\r\n lb_TotalCosts.setText(UtilityFormat.getStringForLabel(getColmunSum(tc_CuttingPrice) + getColmunSum(tc_Price)) + \" €\");\r\n\r\n ModifyController.getInstance().setProject_constructionmaterialList(Boolean.TRUE);\r\n }", "@Override\n public String toString() {\n return \"\" + currency + amount;\n }", "public Money getTotalBalance();", "@Override\r\n\tpublic void operateAmount(String AccountID, BigDecimal amount) {\n\r\n\t}", "public BigDecimal getLineNetAmt();", "public double getAmountEarned(){\r\n return getSalary() + getBonus() + getCommission() * getNumSales();\r\n }", "private int getTotalPrice() {\n int unitPrice = 0;\n if (((CheckBox) findViewById(R.id.whipped_cream_checkbox)).isChecked()) {\n unitPrice += Constants.PRICE_TOPPING_WHIPPED_CREAM;\n }\n\n if (((CheckBox) findViewById(R.id.chocolate_checkbox)).isChecked()) {\n unitPrice += Constants.PRICE_TOPPING_CHOCOLATE;\n }\n\n unitPrice += Constants.PRICE_PER_COFFEE;\n return getNumberOfCoffees() * unitPrice;\n }", "org.adscale.format.opertb.AmountMessage.Amount getCampaignprice();", "public double getBillTotal(){\n\t\treturn user_cart.getBillTotal();\n\t}" ]
[ "0.5837125", "0.5815607", "0.57370085", "0.57100046", "0.5609428", "0.5603803", "0.5537133", "0.5453616", "0.53906715", "0.53546107", "0.5345832", "0.53452337", "0.53066134", "0.5302656", "0.5301789", "0.5242933", "0.5217284", "0.5209975", "0.52033484", "0.52033484", "0.51984906", "0.51978266", "0.51960367", "0.5181092", "0.51703167", "0.515465", "0.5151075", "0.5136324", "0.5115046", "0.51030695", "0.5081472", "0.5071355", "0.506218", "0.5044468", "0.50377536", "0.50064164", "0.4989374", "0.49862742", "0.49838537", "0.49632624", "0.49561942", "0.49557793", "0.49554262", "0.49517748", "0.49460128", "0.49451715", "0.4934287", "0.49319074", "0.49316615", "0.49303427", "0.49227634", "0.49149048", "0.49080217", "0.48981822", "0.48963436", "0.4891246", "0.48909265", "0.48844036", "0.48833048", "0.48763263", "0.48713747", "0.48497194", "0.4831186", "0.4826464", "0.48250812", "0.48226735", "0.48206657", "0.48175144", "0.480851", "0.48075", "0.48065114", "0.48000187", "0.4793576", "0.47923288", "0.47903913", "0.47864786", "0.47841808", "0.47777474", "0.4777161", "0.4772816", "0.47677705", "0.47664163", "0.4761602", "0.47582552", "0.4757697", "0.47575334", "0.47557008", "0.4753926", "0.475092", "0.47483507", "0.47454426", "0.47441113", "0.47427964", "0.47406277", "0.4740264", "0.47367826", "0.4734426", "0.47325358", "0.47307515", "0.47291875" ]
0.800371
0
/store and return values for Pin, User Id and Balance
public void StoreData(DataStore ds) { ((DataStore2)ds).setPin(); System.out.println("Account 2:The set PIN is " + ((DataStore2)ds).getPin() ); ((DataStore2)ds).setUid(); System.out.println("Account 2:The set User ID is " + ((DataStore2)ds).getUid() ); ((DataStore2)ds).setBalance(); System.out.println("Account 2:The Balance is " + ((DataStore2)ds).getBalance() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void saveData()\n\t{\n ssaMain.d1.pin = ssaMain.tmp_pin1;\n ssaMain.d1.balance = ssaMain.tmp_balance1;\n System.out.println(\"Your account has been established successfully.\");\n\t}", "public String getBalanceInfo(String request,String user);", "private int getOrInit(String userId, HashMap<String, Integer> balance) {\n if (balance.containsKey(userId)) {\n return balance.get(userId);\n } else {\n return 1000;\n }\n }", "public long getBalance() {\n\t\n\treturn balance;\n}", "public int getBalance()\n {\n return balance;\n }", "public double getBalance()\n \n {\n \n return balance;\n \n }", "@Override\r\n\tpublic void saveCurrentBalance(Double btcprice, Double balance, Long userId) {\r\n\t\taccountDataDao.saveCurrentBalance(btcprice, balance, userId);\t\t\r\n\t}", "public ResultSet retBalance(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"Select balance from account where accno=\"+userid+\"\");\r\n\treturn rs;\r\n}", "private int getBalance() throws SQLException {\n\t\tgetBalanceStatement.clearParameters();\n\t\tgetBalanceStatement.setString(1, this.username);\n\t\tResultSet result = getBalanceStatement.executeQuery();\n\t\tresult.next();\n\t\tint out = result.getInt(1);\n\t\tresult.close();\n\t\treturn out;\n\t}", "public int getBankAccount() {\n return bankAccount;\n }", "public double getBalance(){\n return balance;\r\n }", "public int getBalance() {\n return balance;\n }", "public int getBalance() {\n return balance;\n }", "public void readAccountInfo(String AccountID, int PIN) {\n\t\t//get information from the database\n\t\tmysqlDWC sql = new mysqlDWC();\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsql.Connection();\n\t\tthis.AccountID=sql.GetAccountInfo(AccountID).AccountID;\n\t\tthis.PIN=PIN;\n\t\tthis.CardNo=sql.GetAccountInfo(AccountID).CardNo;\n\t\tthis.CustomerEmail=sql.GetAccountInfo(AccountID).CustomerEmail;\n\t}", "double getBalance();", "double getBalance();", "private double getBalance() { return balance; }", "public int getBalance() {\n return this.balance;\n\n }", "public double getBalance(){\n return balance;\n }", "public AmountOfMoney getCashRegisterBalance(){\n return cashRegister.getBalance();\n }", "UserAccount createUserAccount(User user, double amount);", "public void wire(String accountNumber,int bankNumber, String toAccountNumber, int amount) {\n\t\t\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll, lp, ls, mm, nn;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\tint tolastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tls = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tls.setInt(1, lastBalance);\n\t\tls.setString(2, accountNumber.toString());\n\t\tls.executeUpdate();\n\t\t\n\t\t\n\t\t\n\t\t//to account\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql3 = \"select bankName from bank where bankNumber=?\";\n\t\tll= (PreparedStatement) conn.prepareStatement(sql3);\n\t\tll.setString(1, String.valueOf(bankNumber).toString());\n\t\tResultSet rs3 = ll.executeQuery();\n\t\tString toname = \"\";\n\t\twhile(rs3.next()) { \n\t\t\ttoname=rs3.getString(\"bankName\");\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tString sql4 = \"select balance,userId from \"+toname+\" where accountNumber=?\";\n\t\tpp= (PreparedStatement) conn.prepareStatement(sql4);\n\t\tpp.setString(1, accountNumber.toString());\n\t\tResultSet rs4 = pp.executeQuery();\n\t\tint tonowBalance = 0;\n\t\tString toid = \"\";\n\t\twhile(rs4.next()) { \n\t\t\ttonowBalance=rs4.getInt(\"balance\");\n\t\t\ttoid = rs4.getString(\"userId\");\n\t\t}\n\t\t\n\t\ttolastBalance = tonowBalance + amount;\n\t\t//System.out.println(lastBalance);\n\t\tString sql5 = \"UPDATE \"+toname+\" SET balance=? where accountNumber=?\";\n\t\tlp = (PreparedStatement) conn.prepareStatement(sql5);\n\t\tlp.setInt(1, tolastBalance);\n\t\tlp.setString(2, toAccountNumber.toString());\n\t\tlp.executeUpdate();\n\t\t\n\t\t\n\t\t//log\n\t\tString logs = \"wired : \"+ amount+\" to \"+toAccountNumber+\"/ balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tmm = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tmm.setString(1, logs);\n\t\tmm.executeUpdate();\n\t\tSystem.out.println(\"You wired $\"+String.valueOf(amount));\n\t\t\n\t\tString logs1 = \"get : \"+ amount+\" from \" +accountNumber+ \"/ balance: \"+String.valueOf(tolastBalance);\n\t\tString sql12 = \"insert into \"+toid+\" (log) values (?)\";\n\t\tnn = (PreparedStatement) conn.prepareStatement(sql12);\n\t\tnn.setString(1, logs1);\n\t\tnn.executeUpdate();\n\t\tSystem.out.println(\"You got $\"+String.valueOf(amount));\n\t\t\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t}", "public double getBalance(){\n return balance;\n }", "void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }", "public int balance(String accountNumber, String userId) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\ttry{\n\t\t\t//connect to database\n\t\t\tconn=DriverManager.getConnection(url, username, password);\n\t\t\tString sql = \"select balance from \"+this.name+\" where accountNumber=?\";\n\t\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\t\tps.setString(1, accountNumber.toString());\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tint nowBalance = 0;\n\t\t\twhile(rs.next()) { \n\t\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\t}\n\t\t\t\n\t\t\tString logs = \"Checked balance: \"+String.valueOf(nowBalance);\n\t\t\tString sql1 = \"insert into \"+userId+\" (log) values (?)\";\n\t\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\t\tpp.setString(1, logs);\n\t\t\tpp.executeUpdate();\n\t\t\t\n\t\t\treturn nowBalance;\n\t\t} catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\t\n\t}", "private void mStoreCustomerPassbookData(int iCustId, double dblCustCreditAmount, String strBillNo) {\r\n Cursor cursorCustomerData = null;\r\n try {\r\n cursorCustomerData = db.getCustomer(iCustId);\r\n if (cursorCustomerData != null && cursorCustomerData.getCount() > 0) {\r\n if (cursorCustomerData.moveToFirst()) {\r\n //if (cursorCustomerData.getDouble(cursorCustomerData.getColumnIndex(DatabaseHandler.KEY_OpeningBalance)) > 0) {\r\n CustomerPassbookBean customerPassbookBean = new CustomerPassbookBean();\r\n customerPassbookBean.setStrCustomerID(cursorCustomerData.getInt(cursorCustomerData.getColumnIndex(DatabaseHandler.KEY_CustId)) + \"\");\r\n customerPassbookBean.setStrName(cursorCustomerData.getString(cursorCustomerData.getColumnIndex(DatabaseHandler.KEY_CustName)));\r\n customerPassbookBean.setStrPhoneNo(cursorCustomerData.getString(cursorCustomerData.getColumnIndex(DatabaseHandler.KEY_CustContactNumber)));\r\n customerPassbookBean.setDblOpeningBalance(0);\r\n customerPassbookBean.setDblDepositAmount(0);\r\n customerPassbookBean.setDblDepositAmount(dblCustCreditAmount);\r\n //double dblTotalAmountFromCustPassbookDB = getCustomerPassbookAvailableAmount(customerPassbookBean.getStrCustomerID(), customerPassbookBean.getStrPhoneNo());\r\n double dblTotalDepositAmount = getCustomerPassbookTotalDepositAndOpeningAmount(customerPassbookBean.getStrCustomerID(), customerPassbookBean.getStrPhoneNo());\r\n double dblTotalCrdeitAmount = getCustomerPassbookTotalCreditAmount(customerPassbookBean.getStrCustomerID(), customerPassbookBean.getStrPhoneNo());\r\n //double dblTotalAmountFinal = (Double.parseDouble(String.format(\"%.2f\", dblCustCreditAmount)) + Math.abs(dblTotalAmountFromCustPassbookDB));\r\n double dblTotalAmountFinal;\r\n dblTotalAmountFinal = dblTotalCrdeitAmount - (dblTotalDepositAmount + customerPassbookBean.getDblDepositAmount());\r\n customerPassbookBean.setDblTotalAmount(Double.parseDouble(String.format(\"%.2f\", (dblTotalAmountFinal))));\r\n if (trainingMode)\r\n customerPassbookBean.setStrDescription(Constants.BILL_NO + \" : TM\" + strBillNo);\r\n else\r\n customerPassbookBean.setStrDescription(Constants.BILL_NO + \" : \" + strBillNo);\r\n\r\n Date date1 = new Date();\r\n try {\r\n date1 = new SimpleDateFormat(\"dd-MM-yyyy\").parse(BUSINESS_DATE);\r\n } catch (Exception e) {\r\n Log.e(TAG, \"\" + e);\r\n Log.e(TAG, \"\" + e);\r\n }\r\n customerPassbookBean.setStrDate(\"\" + date1.getTime());\r\n customerPassbookBean.setDblCreditAmount(0);\r\n customerPassbookBean.setDblPettyCashTransaction(dblCustCreditAmount);\r\n customerPassbookBean.setDblRewardPoints(0);\r\n try {\r\n //Commented for git push purpose\r\n db.addCustomerPassbook(customerPassbookBean);\r\n } catch (Exception ex) {\r\n Log.i(TAG, \"Inserting data into customer passbook in billing screen: \" + ex.getMessage());\r\n }\r\n // }\r\n }\r\n } else {\r\n Log.i(TAG, \"No customer data selected for storing customer passbook in billing screen.\");\r\n }\r\n } catch (Exception ex) {\r\n Log.i(TAG, \"Unable to store the customer passbook data in billing screen.\" + ex.getMessage());\r\n } finally {\r\n if (cursorCustomerData != null) {\r\n cursorCustomerData.close();\r\n }\r\n }\r\n }", "public long getBalance() {\n return this.balance;\n }", "double getBalance(UUID name);", "public SPResponse getProfileBalance(User user, Object[] params) {\n \n String userCompany = user.getCompanyId();\n \n Company company = companyFactory.getCompany(userCompany);\n SPResponse profileResponse = new SPResponse();\n \n if (company != null && company.getFeatureList().contains(SPFeature.Prism)) {\n ProfileBalance profileBalance = spectrumFactory.getProfileBalance(userCompany, false);\n \n LOG.debug(\"PRofile Balance returened is \" + profileBalance);\n \n profileResponse.add(\"profileBalance\", profileBalance);\n profileResponse.isSuccess();\n } else {\n LOG.debug(\"User \" + user.getId() + \" does not have access to Prism\");\n profileResponse.addError(new SPException(\"User does not have access to Prism\"));\n \n }\n \n return profileResponse;\n }", "int deposit(int id, int amount, int accountType) {\n int idCompare; // will contain the ID needed\n double accountBalance = 0;\n String account; // 0 = chequing, 1 = savings\n\n // If the accountType is 0, then it's a Chequing account the user wants to deposit to, if it's 1 then\n // it's savings\n account = accountType == 0 ? \"UserBalanceC\" : \"UserBalanceS\";\n\n // Look into the account number and user balance for the deposit\n String sql = \"SELECT AccountNum, \" + account + \" FROM CashiiDB2\";\n\n try {\n rs = st.executeQuery(sql);\n while (rs.next()) {\n idCompare = rs.getInt(\"AccountNum\"); // grab the id to compare with after\n\n // If the ID turns about to be the one that's needed, get the balance and add the amount needed\n if (idCompare == id) {\n accountBalance = rs.getDouble(account);\n accountBalance += amount;\n break;\n } else\n return -1;\n }\n // Run the operation to update the balance only for the user's account\n updateAccount(id, accountBalance, account);\n } catch (java.sql.SQLException e) {\n e.printStackTrace();\n }\n System.out.println(\"AMOUNT: \" + accountBalance);\n return 1;\n }", "public Integer getBalance() {\n return balance;\n }", "public Integer getBalance() {\n return balance;\n }", "public double getBalance(){\n return balance;\n }", "public int getBalance() {\n return total_bal;\n }", "protected void initUserAccount(String userServer, long userId, String userName, String balanceId) {\r\n\t\tDataCollection.remove(userServer, \"finance\", \"bill_\" + userId, new BasicDBObject());\r\n\t\tBasicDBObject oField = null;\r\n\t\tif (StringUtil.isEmpty(balanceId)) {\r\n\t\t\toField = new BasicDBObject().append(\"balance\", 0).append(\"income\", 0).append(\"withdraw\", 0).append(\"timestamp\", System.currentTimeMillis())\r\n\t\t\t\t\t.append(\"userId\", userId).append(\"userName\", userName);\r\n\t\t} else {\r\n\t\t\toField = new BasicDBObject().append(\"_id\", new ObjectId(balanceId)).append(\"balance\", 0).append(\"income\", 0).append(\"withdraw\", 0)\r\n\t\t\t\t\t.append(\"timestamp\", System.currentTimeMillis()).append(\"userId\", userId).append(\"userName\", userName);\r\n\t\t}\r\n\t\tbalanceId = DataCollection.insert(userServer, \"finance\", \"bill_\" + userId, oField).toString();\r\n\t\tDataCollection.createIndex(userServer, \"finance\", \"bill_\" + userId, \"keyIdx\", new BasicDBObject().append(\"shortId\", 1), false);\r\n\t\tString sql = \"update user set balance=0,income=0,withdraw=0,income_total=0,withdraw_total=0,sms_count=0,balance_id=? where user_id=?\";\r\n\t\tDataSet.update(Const.defaultMysqlServer, Const.defaultMysqlDB, sql, new String[] { balanceId, String.valueOf(userId) });\r\n\t}", "@Override\r\n\tpublic Map<String, List<NewAccount>> Accountlist(int UserID) throws SQLException {\n\t\tList<NewAccount> accounts = createAccountDao.Accountlist(UserID);\r\n\t\tSystem.out.println(\"[CreateAccountDaoImp][save] New account save status : \" + accounts);\r\n\t\tList<NewAccount> loanAccounts = new ArrayList<NewAccount>();\r\n\t\tList<NewAccount> savingAccount = new ArrayList<NewAccount>();\r\n\t\tList<NewAccount> creditAccount = new ArrayList<NewAccount>();\r\n\t\tMap<String, List<NewAccount>> accountsMap = new HashMap<String, List<NewAccount>>();\r\n\r\n\t\t// Account Sorting\r\n\t\tfor (int i = 0; i < accounts.size(); i++) {\r\n\t\t\t\r\n\t\t\tif (accounts.get(i).getAccountType().equals(\"Loans\")) {\r\n\t\t\t\t\r\n\t\t\t\tloanAccounts.add(accounts.get(i));\r\n\t\t\t\t\r\n\t\t\t} else if (accounts.get(i).getAccountType().equals(\"Accounts\")) {\r\n\t\t\t\t\r\n\t\t\t\tsavingAccount.add(accounts.get(i));\r\n\t\t\t\t\r\n\t\t\t} else if (accounts.get(i).getAccountType().equals(\"Cards\")) {\r\n\t\t\t\tcreditAccount.add(accounts.get(i));\r\n\t\t\t}\r\n\t\t\t// credit //accountsMap.put(\"loan\",accounts.get(i));\r\n\t\t}\r\n\t\taccountsMap.put(\"loanAccount\", loanAccounts);\r\n\t\taccountsMap.put(\"savingsAccount\", savingAccount);\r\n\t\taccountsMap.put(\"creditAccount\", creditAccount);\r\n\t\tSet<String> key = accountsMap.keySet();\r\n\t\tIterator<String> iterator = key.iterator();\r\n\t/*\twhile (iterator.hasNext()) {\r\n\t\t\tString accountType = iterator.next();\r\n\r\n\t\t\tSystem.out.println(\"----------------------\" + accountType + \"------------------------\");\r\n\t\t\tSystem.out.println(\"|------------\" + accountsMap.get(accountType) + \"---------------|\");\r\n\t\t\tSystem.out.println(\"-----------------End of first Account Type-------------------\");\r\n\t\t}*/\r\n\r\n\t\treturn accountsMap;\r\n\t}", "public double getBalance(){\n return this.balance;\r\n }", "public void getBalance() {\n\t\tSystem.out.println(\"Balance in Savings account is\" + balance);\n\t\t//return balance;\n\t}", "public String transaction_pay(int reservationId) {\r\n\t\ttry {\r\n\t\t\tif (username == null){\r\n\t\t\t\treturn \"Cannot pay, not logged in\\n\";\r\n\t\t\t}\r\n\t\t\tbeginTransaction();\r\n\t\t\t\r\n\t\t\t//query for the user balance \r\n\t\t\tcheckBalanceStatement.clearParameters();\r\n\t\t\tcheckBalanceStatement.setString(1, username);\r\n\t\t\tResultSet b = checkBalanceStatement.executeQuery();\r\n\t\t\tb.next();\r\n\t\t\tint user_balance = b.getInt(\"balance\");\r\n\t\t\t\r\n\t\t\t//get the price of the first flight\r\n\t\t\tunpaidReservationStatement.clearParameters();\r\n\t\t\tunpaidReservationStatement.setString(1, username);\r\n\t\t\tunpaidReservationStatement.setInt(2, reservationId);\r\n\t\t\tResultSet unpaid = unpaidReservationStatement.executeQuery();\r\n\t\t\t\r\n\t\t\tint total_price = 0;\r\n\t\t\tif (!unpaid.next()){\r\n\t\t\t\trollbackTransaction();\r\n\t\t\t\treturn \"Cannot find unpaid reservation \"+reservationId+\" under user: \"+username+\"\\n\";\r\n\t\t\t} else {\r\n\t\t\t\t//unpaid.next() ?? maybe not sure\r\n\r\n\t\t\t\tint fid1 = unpaid.getInt(\"fid1\");\r\n\t\t\t\tint fid2 = unpaid.getInt(\"fid2\");\r\n\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\tcheckPriceStatement.setInt(1, fid1);\r\n\t\t\t\tResultSet p1 = checkPriceStatement.executeQuery();\r\n\t\t\t\tp1.next();\r\n\t\t\t\ttotal_price += p1.getInt(\"price\");\r\n\t\t\t\tp1.close();\r\n\t\t\t\t\r\n\t\t\t\t//unpaidReservationStatement2.clearParameters();\r\n\t\t\t\t//unpaidReservationStatement2.setString(1, username);\r\n\t\t\t\t//unpaidReservationStatement2.setInt(2, reservationId);\r\n\t\t\t\t//ResultSet second = unpaidReservationStatement2.executeQuery();\r\n\t\t\t\tif (fid2 != 0){\r\n\t\t\t\t\t//second fid is not null\r\n\t\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\t\tcheckPriceStatement.setInt(1, fid2);\r\n\t\t\t\t\tResultSet p2 = checkPriceStatement.executeQuery();\r\n\t\t\t\t\tp2.next();\r\n\t\t\t\t\ttotal_price += p2.getInt(\"price\");\r\n\t\t\t\t\tp2.close();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (total_price > user_balance){\r\n\t\t\t\t\trollbackTransaction();\r\n\t\t\t\t\treturn \"User has only \"+user_balance+\" in account but itinerary costs \"+total_price+\"\\n\";\r\n\t\t\t\t} else {\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdatePaidStatement.clearParameters();\r\n\t\t\t\t\tupdatePaidStatement.setString(1, \"true\");\r\n\t\t\t\t\tupdatePaidStatement.setInt(2, reservationId);\r\n\t\t\t\t\tupdatePaidStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdateBalanceStatement.clearParameters();\r\n\t\t\t\t\tupdateBalanceStatement.setInt(1, (user_balance-total_price));\r\n\t\t\t\t\tupdateBalanceStatement.setString(2, username);\r\n\t\t\t\t\tupdateBalanceStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tcommitTransaction();\r\n\t\t\t\t\treturn \"Paid reservation: \"+reservationId+\" remaining balance: \"+(user_balance-total_price)+\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\t//rollbackTransaction();\r\n\t\t\treturn \"Failed to pay for reservation \" + reservationId + \"\\n\";\r\n\t\t}\r\n }", "public double getBalance(){\r\n\t\treturn balance;\r\n\t}", "public double getBalance()\n {\n return balance;\n }", "private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\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 }", "public void deposit(String accountNumber, int amount) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tlastBalance = nowBalance + amount;\n\t\t//System.out.println(lastBalance);\n\t\t\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tpp.setInt(1, lastBalance);\n\t\tpp.setString(2, accountNumber.toString());\n\t\tpp.executeUpdate();\n\t\t\n\t\tString logs = \"deposit : \"+ amount+\" / balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tll = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tll.setString(1, logs);\n\t\tll.executeUpdate();\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t}", "public double selectCurrentBalance(int choice, String getUser);", "public double getBalance(){\n return balance.getBalance();\n }", "public double getBalance()\r\n\t{\r\n\t\treturn balance;\t\t\r\n\t}", "@Override\r\n public void storePin() {\n DataStoreGP1 data = (DataStoreGP1) ds;\r\n data.pin = data.temp_p;\r\n System.out.println(\"Pin has been saved successfully..\");\r\n }", "int insert(BankUserInfo record);", "int insert(BankUserInfo record);", "public double getBalance(){\n\t\treturn balance;\n\t}", "public double getBal() {\n\t\t return balance;\r\n\t }", "protected double getTotalBalance()\r\n {\r\n return totalBalance;\r\n }", "public interface AccountService\n{\n /**\n * Retrieves current balance or zero if addAmount() method was not called before for specified id\n *\n * @param id balance identifier\n */\n Long getAmount(Integer id) throws Exception;\n /**\n * Increases balance or set if addAmount() method was called first time\n * @param id balance identifier\n * @param value positive or negative value, which must be added to current balance\n */\n Long addAmount(Integer id, Long value) throws Exception;\n}", "public static void extract_money(){\n TOTALCMONEY = TOTALCMONEY - BALANCERETRIEVE; //the total cashier money equals the total cashier money minus the retrieve request\r\n BALANCE = BALANCE - BALANCERETRIEVE; //the user balance equals the account minus the retrieve request\r\n }", "public abstract int getBalancesRead();", "interface Transaction {\n int BALANCE = 500;\n //Storing Balance\n Object transaction(Object input);\n}", "public double getBalance() {\n return balance;\n }", "@Override\r\n\t\t\tpublic Account payAmount(String MobileNo, String accountBalance) throws RechargeException {\r\n\t\t\t\t// TODO \r\n\t\t\t\tAccount dto=dao.payAmount(MobileNo, accountBalance);\r\n\t\t\t\tif(dto==null)\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new RechargeException(\"cannot rechrge as given mobile no does not exist\");\r\n\t\t\t\t}\r\n\t\t\t\treturn dto;\r\n\t\t\t}", "public static void deposit(){\n TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited\r\n BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited\r\n }", "public String getAccountInfo(){\n NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();\n return \"Account No : \" + accountNo +\n \"\\nName : \" + name +\n \"\\nBalance : \" + currencyFormat.format(balance);\n }", "@Override\r\n\tpublic int signUp(userData user) {\n\t\tString pwd = user.getUser_pwd();\r\n\t\tSystem.out.println(user.getUser_phone()+\" get \"+ pwd + \"key:\"+user.getKey()+\" phone:\"+user.getUser_phone());\r\n\t\tpwd = MD5.md5_salt(pwd);\r\n\t\tSystem.out.println(user.getUser_phone()+\" final: \"+ pwd);\r\n\t\tHashMap<String,String> t = new HashMap();\r\n\t\tt.put(\"key\", user.getKey());\r\n\t\tt.put(\"value\", user.getUser_phone());\r\n\t\tString phone = AES.decode(t);\r\n\t\tSystem.out.println(\"phone:\"+phone+\" identity:\"+user.getIdentity()+\"final: \"+ pwd);\r\n\t\tuser_table u = new user_table();\r\n\t\tu.setUserphone(phone);\r\n\t\tu.setIdentity(user.getIdentity());\r\n\t\tu.setUserpwd(pwd);\r\n\t\ttry {\r\n\t\t\ttry{\r\n\t\t\t\tuser_table chong = this.userRespository.findById(phone).get();\r\n\t\t\t\treturn -1;\r\n\t\t\t}catch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tthis.userRespository.save(u);\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t}catch (Exception e)\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t}", "public int[] getSecretNumber() {\r\n \r\n //Return Value\r\n return secretNumber;\r\n \r\n }", "public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}", "@Override \n public String toString() {\n return \"SavingAccount{\" +\n \"interestRate=\" + interestRate +\n \", accountHolder='\" + accountHolder + '\\'' +\n \", accountNum=\" + accountNum +\n \", balance=\" + balance +\n '}';\n }", "public int getBalance() {\n\t\treturn balance;\n\t}", "public void GetInterest() {\n\t\tSystem.out.println(\"balance=\"+bal);\r\n\t\tinterest_rate=((bal/100)*10);\r\n\t\t\r\n\t\tSystem.out.println(\"Interest :- \"+ interest_rate);\r\n\t\tbal=(int) (bal+interest_rate);\r\n\t\tSystem.out.println(\"Balance after interest:- \"+bal );\r\n\t}", "public Account(){\n this.id = 0;\n this.balance = 0;\n this.annualInterestRate = 0;\n this.dateCreated = new Date();\n }", "public void withdraw(String accountNumber, int amount) {\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\t\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tpp = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tpp.setInt(1, lastBalance);\n\t\tpp.setString(2, accountNumber.toString());\n\t\tpp.executeUpdate();\n\t\t\n\t\tString logs = \"withdraw : \"+ amount+\" / balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tll = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tll.setString(1, logs);\n\t\tll.executeUpdate();\n\t\tSystem.out.println(\"Ypu got $\"+String.valueOf(amount));\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t\t\n\t}", "public BankAccount(int balance) {\n\n this.balance = balance;\n\n }", "@Override\n public BigDecimal getBalance(String customerId, EMCUserData userData) {\n BigDecimal outstandingDebit = null;\n\n //Get total outstanding credits for customer, which existed at atDate\n EMCQuery query = new EMCQuery(enumQueryTypes.SELECT, DebtorsOpenTransactions.class);\n query.addFieldAggregateFunction(\"debit\", \"SUM\");\n query.addFieldAggregateFunction(\"debitAmountSettled\", \"SUM\");\n query.addFieldAggregateFunction(\"credit\", \"SUM\");\n query.addFieldAggregateFunction(\"creditAmountSettled\", \"SUM\");\n\n //Customer is optional.\n if (customerId != null) {\n query.addAnd(\"customerId\", customerId);\n }\n\n query.addAnd(\"transactionDate\", Functions.nowDate(), EMCQueryConditions.LESS_THAN_EQ);\n\n Object[] debitTotals = (Object[]) util.executeSingleResultQuery(query, userData);\n\n if (debitTotals != null) {\n BigDecimal totalDebit = debitTotals[0] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[0];\n BigDecimal totalDebitSettled = debitTotals[1] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[1];\n BigDecimal totalCredit = debitTotals[2] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[2];\n BigDecimal totalCreditSettled = debitTotals[3] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[3];\n outstandingDebit = totalDebit.subtract(totalDebitSettled);\n totalCredit = totalCredit.subtract(totalCreditSettled);\n outstandingDebit = outstandingDebit.subtract(totalCredit);\n }\n return outstandingDebit;\n }", "public BigDecimal getUserId() {\r\n return userId;\r\n }", "public Double getBalance() {\r\n return balance;\r\n }", "public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }", "public int getPropertyBalance();", "public String getBalance() {\n return this.balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public double getBalance() {\n return balance;\n }", "public User(){\n nomorAkun = 0;\n pin = 0;\n saldo = 0;\n }", "public User(int userId, String login, int passwordHash, int userType,\n double userBalance) {\n this.userId = userId;\n this.login = login;\n this.passwordHash = passwordHash;\n this.userType = userType;\n this.userBalance = userBalance;\n }", "private int getWallet() {\n\t\treturn wallet;\n\t}", "void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}", "public int makeNewAccount(int balance){\n int generated_id = 0;\n\n try {\n accountLock.lock();\n executeNewAccount(generated_id = currentAccountId++, balance, rawDataSource.getConnection());\n accountLock.unlock();\n\n cache.add(new Account(generated_id, balance));\n\n operationLock.lock();\n logNewAccount(currentOperationId, generated_id, balance);\n currentOperationId++;\n operationLock.unlock();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return generated_id;\n }", "double getBalance() {\n\t\treturn balance;\n\t}", "private void updateUserAccount() {\n final UserDetails details = new UserDetails(HomeActivity.this);\n //Get Stored User Account\n final Account user_account = details.getUserAccount();\n //Read Updates from Firebase\n final Database database = new Database(HomeActivity.this);\n DatabaseReference user_ref = database.getUserReference().child(user_account.getUser().getUser_id());\n user_ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //Read Account Balance\n String account_balance = dataSnapshot.child(Database.USER_ACC_BALANCE).getValue().toString();\n //Read Expire date\n String expire_date = dataSnapshot.child(Database.USER_ACC_SUB_EXP_DATE).getValue().toString();\n //Read Bundle Type\n String bundle_type = dataSnapshot.child(Database.USER_BUNDLE_TYPE).getValue().toString();\n //Attach new Values to the Account Object\n user_account.setBalance(Double.parseDouble(account_balance));\n //Attach Expire date\n user_account.setExpire_date(expire_date);\n //Attach Bundle Type\n user_account.setBundle_type(bundle_type);\n //Update Local User Account\n details.updateUserAccount(user_account);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n //No Implementation\n }\n });\n }", "private void addUserPoint() {\n\n String userRefEmail = edtEmailPengguna.getText().toString().replace('.', '_');\n final int poin = Integer.parseInt(tvPoinTransaksi.getText().toString());\n\n final DatabaseReference userDataRef = FirebaseDatabase.getInstance().getReference().child(\"Users\").child(userRefEmail);\n userDataRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n String userCurrentPoint = Objects.requireNonNull(dataSnapshot.child(\"point\").getValue()).toString();\n\n int finalPoint = Integer.parseInt(userCurrentPoint) + poin;\n userDataRef.child(\"point\").setValue(finalPoint);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n });\n }", "public boolean transferAmount(String id,String sourceAccount,String targetAccount,int amountTransfer) throws SQLException {\n\t\n\tConnection con = null;\n\tcon = DatabaseUtil.getConnection();\n\tint var=0;\n\tint var2=0;\n\tPreparedStatement ps1 = null;\n\tPreparedStatement ps2 = null;\n\tPreparedStatement ps3 = null;\n\tPreparedStatement ps4 = null;\n\tResultSet rs1 = null;\n\tResultSet rs2 = null;\n\tResultSet rs3 = null;\n\tResultSet rs4 = null;\n\tboolean flag=false;\n\n\tcon = DatabaseUtil.getConnection();\n\t\n\t//Account account=new Account();\n\tps1=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps1.setInt(1,Integer.parseInt(id));\n\tps1.setString(2,targetAccount);\n\trs1=ps1.executeQuery();\n\t\n\twhile (rs1.next()) {\n\t var = rs1.getInt(1);\n\t \n\t if (rs1.wasNull()) {\n\t System.out.println(\"id is null\");\n\t }\n\t}\n\t\n\tint targetAmount=var+amountTransfer;\n\tSystem.out.println(\"target amount \"+targetAmount);\n\t//System.out.println(\"very good\");\n\tps2=con.prepareStatement(\"select Balance from CustomerAccount_RBM where SSN_ID=? and Account_Type=?\");\n\tps2.setInt(1,Integer.parseInt(id));\n\tps2.setString(2,sourceAccount);\n\trs2=ps2.executeQuery();\n\t\n\twhile (rs2.next()) {\n\t var2 = rs2.getInt(1);\n\t //System.out.println(\"id=\" + var);\n\t if (rs2.wasNull()) {\n\t System.out.println(\"name is null\");\n\t }\n\t}\n\t\n\tint sourceAmount=var2-amountTransfer;\n\tSystem.out.println(\"source amount\"+ sourceAmount);\n\tif(sourceAmount<0 ) {\n\t\tSystem.out.println(\"Unable to tranfer\");\n\t}else {\n\t\tflag=true;\n\t\tps3=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps3.setInt(1,sourceAmount);\n\t\tps3.setString(2,sourceAccount);\n\t\t//System.out.println(\"hey\");\n\t\trs3=ps3.executeQuery();\n\t\t\n\t\tps4=con.prepareStatement(\"update CustomerAccount_RBM set Balance=? where Account_Type=?\");\n\t\tps4.setInt(1,targetAmount);\n\t\tps4.setString(2,targetAccount);\n\t\trs4=ps4.executeQuery();\n\t\t//System.out.println(\"Transfer Dao1\");\n\t}\n\tDatabaseUtil.closeConnection(con);\n\tDatabaseUtil.closeStatement(ps1);\n\tDatabaseUtil.closeStatement(ps2);\n\tDatabaseUtil.closeStatement(ps3);\n\tDatabaseUtil.closeStatement(ps4);\n\treturn flag;\n}", "@Override\n\tpublic String execute() throws Exception {\n\t\tSystem.out.println(\"in execute of payment\"+p);\n\t\tmap.put(\"users1\", p);\n\t\t\n\t/*int i=dao.AddUserPassangerInfo(p);\n\tSystem.out.println(i);\n\t*/if(p!=null)\n\t\treturn SUCCESS;\n\treturn ERROR;\n\t\t\n\t\t\n\t}", "public boolean withdraw(long id, String password, String currency, double amount);", "public double getCredits(User user) throws Exception;", "public void addValue(JsonObject block, HashMap<String, Integer> balance){\n JsonArray transactions = block.get(\"Transactions\").getAsJsonArray();\n int N = transactions.size();\n String minerId = block.get(\"MinerID\").getAsString();\n getOrInit(minerId, balance);\n for (int i=0; i<N; i++) {\n \tJsonObject Tx = transactions.get(i).getAsJsonObject();\n \tint current = getOrInit(minerId, balance);\n \tbalance.put(minerId, current + Tx.get(\"MiningFee\").getAsInt());\n }\n return;\n }", "public float getBalance() {\n return balance;\n }", "@Override\n public void onSuccess(final Account account) {\n userid = account.getId();\n user = getApplicationContext().getSharedPreferences(\"USER_INFO\", Context.MODE_PRIVATE);\n editor = user.edit();\n editor.clear();\n editor.putString(\"ID\", userid);\n editor.commit();\n\n }", "public double getBalance() \n\t{\n\t\treturn balance;\n\t\t\n\t}", "protected void proccesValues() {\n Users user = new Users();\n user.setName(bean.getName());\n user.setSurname(bean.getSurname());\n user.setUsername(bean.getUsername());\n StrongPasswordEncryptor passwordEncryptor = new StrongPasswordEncryptor();\n String encryptedPassword = passwordEncryptor.encryptPassword(bean.getPassword());\n user.setPassword(encryptedPassword);\n \n usersService.persist(user);\n Notification.show(msgs.getMessage(INFO_REGISTERED), Notification.Type.ERROR_MESSAGE);\n resetValues();\n UI.getCurrent().getNavigator().navigateTo(ViewLogin.NAME);\n }", "@GetMapping(\"/balance/{id}\")\n public Integer getBalance(@PathVariable(\"id\") String id){\n System.out.println(id);\n\n HashMap<Integer,Integer> dataStore = new HashMap<>();\n dataStore.put(1,10);\n dataStore.put(2,20);\n\n return dataStore.get(Integer.parseInt(id));\n }", "int insertGenDetail(Integer uid, Integer merid, Double paymoney, Double sendmoney, Double tomoney, Double balance, Double topupbalance, Double givebalance, String ordernum, Date createTime, Integer paysource, String remark);", "User getUserInformation(Long user_id);" ]
[ "0.5998756", "0.57673943", "0.5725607", "0.56967235", "0.5641954", "0.5608339", "0.5580005", "0.5558105", "0.55420804", "0.54818994", "0.5466331", "0.5465188", "0.5465188", "0.5458388", "0.5456114", "0.5456114", "0.54501873", "0.54336816", "0.54325527", "0.5413618", "0.54085124", "0.5402481", "0.53942376", "0.5379884", "0.5370429", "0.5341945", "0.53374326", "0.53339344", "0.5330389", "0.5309825", "0.53096646", "0.53096646", "0.5305773", "0.53049415", "0.530385", "0.52906805", "0.52847093", "0.52380484", "0.51952434", "0.5176276", "0.5173363", "0.5171368", "0.5157308", "0.515167", "0.5141449", "0.5094812", "0.5092716", "0.5085838", "0.5085353", "0.5085353", "0.50853074", "0.50819373", "0.50724036", "0.50674933", "0.5060621", "0.5059876", "0.50591785", "0.5056239", "0.5053863", "0.5047612", "0.50419873", "0.50419754", "0.5037541", "0.50328684", "0.50317156", "0.5013257", "0.5012244", "0.5004007", "0.50001854", "0.4999941", "0.49914885", "0.498616", "0.4982181", "0.49789926", "0.49789473", "0.4977315", "0.49735734", "0.49735734", "0.49735734", "0.49735734", "0.49728614", "0.49690917", "0.49557984", "0.4947341", "0.49413985", "0.49402094", "0.493656", "0.49361944", "0.49334607", "0.49305022", "0.49262688", "0.49235928", "0.49229416", "0.49193957", "0.4912539", "0.4911872", "0.49111253", "0.4909496", "0.49069983", "0.49064502" ]
0.5102506
45
A radio button was selected, so update the index.
public void handleEvent(final Event event) { if (button.getSelection() && button.equals(event.widget)) { _index = Integer.parseInt(button.getData().toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void goToSelectedQuestion(int questionindex){\n radioGroup.setEnabled(true);\n saveAnswer();\n mQuestionIndex = questionindex;\n unSelectRadioButtons();\n updateQuestion();\n\n loadRadioButtonSelection();\n\n\n }", "public void radioButtonChenged() {\n if (this.radioButtons.getSelectedToggle().equals(this.btn1))\r\n radioButtonlabel.setText(\"You selected table 1\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn2))\r\n radioButtonlabel.setText(\"You selected table 2\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn3))\r\n radioButtonlabel.setText(\"You selected table 3\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn4))\r\n radioButtonlabel.setText(\"You selected table 4\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn5))\r\n radioButtonlabel.setText(\"You selected table 5\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn6))\r\n radioButtonlabel.setText(\"You selected table 6\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn7))\r\n radioButtonlabel.setText(\"You selected table 7\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn8))\r\n radioButtonlabel.setText(\"You selected table 8\");\r\n\r\n }", "public void setCheck(int Index)\n\t{\t\t\n\t\tif(Index < members.size)\n\t\t\tonChange((FlxRadioButton) members.get(Index));\n\t}", "@Override\r\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n pos=rg.indexOfChild(findViewById(checkedId));\r\n\r\n\r\n\r\n //Method 2 For Getting Index of RadioButton\r\n pos1=rg.indexOfChild(findViewById(rg.getCheckedRadioButtonId()));\r\n\r\n\r\n\r\n switch (pos)\r\n {\r\n case 0 :\r\n layout_Firm.setVisibility(View.GONE);\r\n layout_Firmno.setVisibility(View.GONE);\r\n type=\"Proprietorship\";\r\n break;\r\n case 1 :\r\n layout_Firm.setVisibility(View.VISIBLE);\r\n layout_Firmno.setVisibility(View.VISIBLE);\r\n type=\"Partnership\";\r\n break;\r\n\r\n\r\n default :\r\n //The default selection is RadioButton 1\r\n layout_Firm.setVisibility(View.GONE);\r\n layout_Firmno.setVisibility(View.GONE);\r\n type=\"Proprietorship\";\r\n break;\r\n }\r\n }", "private void onClickRadioButton() {\n radioGroupChoice.setOnCheckedChangeListener(this);\n }", "static int getIndexSelected() {\n return indexSelected;\n }", "public int getCheckedIndex() {\n // run through the array of radio buttons, returning when we find\n // a checked one\n for (int i = 0; i < radioButtons.length; i++) {\n if (radioButtons[i].isChecked()) {\n return i;\n }\n }\n\n // return -1 if none were checked\n return -1;\n }", "private void updateQuestion(){\n mchoice1.setChecked(false);\n mchoice2.setChecked(false);\n mchoice3.setChecked(false);\n mchoice4.setChecked(false);\n\n if (mQuestonNumber < mQuizLibrary.getLength()){\n //menset setiap textview dan radiobutton untuk diubah jadi pertanyaan\n sQuestion.setText(mQuizLibrary.getQuestion(mQuestonNumber));\n //mengatur opsi sesuai pada optional A\n mchoice1.setText(mQuizLibrary.getChoice(mQuestonNumber, 1)); //Pilihan Ganda ke 1\n //mengatur opsi sesuai pada optional B\n mchoice2.setText(mQuizLibrary.getChoice(mQuestonNumber, 2)); //Pilihan Ganda ke 2\n //mengatur opsi sesuai pada optional C\n mchoice3.setText(mQuizLibrary.getChoice(mQuestonNumber, 3)); //Pilihan Ganda ke 3\n //mengatur opsi sesuai pada optional D\n mchoice4.setText(mQuizLibrary.getChoice(mQuestonNumber, 4)); //Pilihan Ganda ke 4\n\n manswer = mQuizLibrary.getCorrect(mQuestonNumber);\n //untuk mengkoreksi jawaban yang ada di class QuizBank sesuai nomor urut\n mQuestonNumber++; //update pertanyaan\n }else{\n Toast.makeText(Quiz.this, \"ini pertanyaan terakhir\", Toast.LENGTH_LONG).show();\n Intent i = new Intent (Quiz.this, HighestScore.class);\n i.putExtra(\"score\", mScore); //UNTUK MENGIRIM NILAI KE activity melalui intent\n startActivity(i);\n }\n }", "@Override\n public void onClick(View v) {\n RadioGroup rg = (RadioGroup) view.findViewById(R.id.choicesGroup);\n View rb = rg.findViewById(rg.getCheckedRadioButtonId());\n quizActivity.showAnswer(rg.indexOfChild(rb));\n }", "protected void onChange(FlxRadioButton RadioButton)\n\t{\n\t\t// Break if it's already selected.\n\t\tif(_current == RadioButton)\n\t\t{\n\t\t\tRadioButton.setActive(true);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tFlxRadioButton object;\n\t\tfor(int i = 0; i < members.size; i++)\n\t\t{\n\t\t\tobject = members.get(i);\n\t\t\tobject.setActive(false);\n\t\t}\n\t\tRadioButton.setActive(true);\n\t\t_current = RadioButton;\n\t\tif(onChange != null)\n\t\t\tonChange.callback();\n\t}", "@Override\n\n // The flow will come here when\n // any of the radio buttons in the radioGroup\n // has been clicked\n\n // Check which radio button has been clicked\n public void onCheckedChanged(RadioGroup group,\n int checkedId) {\n RadioButton\n radioButton\n = (RadioButton) group\n .findViewById(checkedId);\n }", "@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n int position = (Integer) group.getTag();\n\n //select radio button depending on Tag value\n switch(checkedId){\n case R.id.radioButton4:\n //set grade value to the ArrayList element\n gradeList.get(position).setGrade(2);\n\n break;\n case R.id.radioButton3:\n gradeList.get(position).setGrade(3);\n\n break;\n case R.id.radioButton2:\n gradeList.get(position).setGrade(4);\n\n break;\n case R.id.radioButton:\n gradeList.get(position).setGrade(5);\n\n break;\n }\n }", "public void actionPerformed(ActionEvent e) {\n JRadioButton radioButton = (JRadioButton) MainUi.map.get(\"xiaoGuoDengSuCaiTypeButton\");\r\n JList suCai_list = (JList) MainUi.map.get(\"suCai_list\");\r\n JList suCaiLightType = (JList) MainUi.map.get(\"suCaiLightType\");\r\n if (suCai_list.getSelectedIndex() != -1) {\r\n String suCaiName = suCai_list.getSelectedValue().toString();\r\n if (!radioButton.isSelected()) {\r\n int suCaiNum = Integer.valueOf(suCaiName.split(\"--->\")[1]).intValue();\r\n new DongZuoSuCaiEditUI().show(suCaiName, suCaiNum);\r\n } else {\r\n int denKuNum = suCaiLightType.getSelectedIndex();\r\n int suCaiNum = Integer.valueOf(suCaiName.split(\"--->\")[1]).intValue();\r\n\r\n new SuCaiEditUI().show(suCaiName, suCaiNum, denKuNum);\r\n }\r\n }\r\n }", "private int getSelectedIndex() {\n if (group.getSelectedToggle() == null) {\n return -1;\n }\n return options.indexOf(((RadioButton) group.getSelectedToggle()).getText());\n }", "@Override\n public void onCheckedChanged(RadioGroup radioGroup, @IdRes int checked) {\n }", "@Override\n public void onCheckedChanged(RadioGroup radioGroup, int i) {\n if(i == acceptButton.getId()){\n order.setStatus(Order.STATE_APPROVED);\n }\n //If deny Radio Button clicked\n if(i == denyButton.getId()){\n order.setStatus(Order.STATE_REJECTED);\n }\n //Updating order status in database\n changeOrderStatus(order);\n }", "public void onClick(View v) {\n\t\t\t\tint selectedId = radioGroup.getCheckedRadioButtonId();\n\t \n\t\t\t\t// find the radiobutton by returned id\n\t\t\t radioButton = (RadioButton) findViewById(selectedId);\n\t\t\t if(selectedId ==R.id.radio3){\n\t\t\t \t\n\t\t\t \tint myNum = Integer.parseInt(MainActivity.points);\n\t\t\t \tmyNum += 5;\n\t\t\t \tMainActivity.points = String.valueOf(myNum);\n\t\t\t \tIntent intent=new Intent(Test.this,Star.class);\n\t\t\t \tstartActivity(intent);\n\t\t\t \t\n\t\t\t \t\tToast.makeText(Test.this,\n\t\t\t \t\t\"Correct Answer\", Toast.LENGTH_SHORT).show();\n\t\t\t \t\t}\n\t\t\t else{\n\t\t\t \tToast.makeText(Test.this,\n\t\t\t\t \t\t\"Try Again\", Toast.LENGTH_SHORT).show();\n\t\t\t }\n\t\t\t }", "private void sequentialRadioActionPerformed() {//GEN-FIRST:event_sequentialRadioActionPerformed\r\n randomRadio.setSelected(false);\r\n controller.OnOrderSelection(Album.SlideshowOrder.SEQUENTIAL);\r\n\r\n }", "@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n pos = radioGroup.indexOfChild(findViewById(checkedId));\n switch (pos) {\n case 1:\n\n Status_id = 0;\n new getStudentList().execute();\n // Toast.makeText(getApplicationContext(), \"1\"+Status_id,Toast.LENGTH_SHORT).show();\n break;\n case 2:\n\n Status_id = 1;\n // Toast.makeText(getApplicationContext(), \"2\"+Status_id, Toast.LENGTH_SHORT).show();\n break;\n\n default:\n //The default selection is RadioButton 1\n Status_id = 1;\n new getStudentList().execute();\n // Toast.makeText(getApplicationContext(), \"3\"+Status_id,Toast.LENGTH_SHORT).show();\n break;\n }\n }", "@Override\n public void onCheckedChanged(RadioGroup radioGroup, int i) {\n if (i == R.id.radio1 || i == R.id.radio2 || i == R.id.radio3 || i == R.id.radio4)\n // then the \"Next button\" activated to direct us, to the next question\n nextButtonQuest1.setEnabled(true);\n }", "private void btnNext_click(ActionEvent e) {\n\t\tString stuAnswer = \"\";\r\n\t\tif (rdoItemA.isSelected()) {\r\n\t\t\tstuAnswer = \"A\";\r\n\t\t}\r\n\t\tif (rdoItemB.isSelected()) {\r\n\t\t\tstuAnswer = \"B\";\r\n\t\t}\r\n\t\tif (rdoItemC != null) {\r\n\t\t\tif (rdoItemC.isSelected()) {\r\n\t\t\t\tstuAnswer = \"C\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (rdoItemD != null) {\r\n\t\t\tif (rdoItemD.isSelected()) {\r\n\t\t\t\tstuAnswer = \"D\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!stuAnswer.isEmpty()) {\r\n\t\t\tExamItem bean = eiList.get(questionNO - 1);\r\n\r\n\t\t\tif (bean.getStuAnswer() == null || !bean.getStuAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\tbean.setStuAnswer(stuAnswer);\r\n\t\t\t\tif (bean.getStdAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\t\tbean.setMarkResult(1l);\r\n\t\t\t\t\tbean.setGainScore(bean.getStdScore());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbean.setMarkResult(0l);\r\n\t\t\t\t\tbean.setGainScore(0l);\r\n\t\t\t\t}\r\n\t\t\t\texamItemService.update(bean);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (questionNO == questionNum) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"这是最后一题。\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tquestionNO++;\r\n\t\tinitData();\r\n\t}", "@Override\n public void onClick(View view) {\n\n if(choicesRG.getCheckedRadioButtonId() == questionList.get(currentQuestionIndex).getAnswerIndex())\n correctAnswers++;\n\n Log.d(\"test\", \"Submitted: \" + Integer.toString(choicesRG.getCheckedRadioButtonId()));\n\n currentQuestionIndex++;\n if(currentQuestionIndex < questionList.size()) {\n loadQuestion(questionList.get(currentQuestionIndex));\n }\n else{\n //go to stats activity\n Intent statsIntent = new Intent(TriviaActivity.this, StatsActivity.class);\n Log.d(\"test\", \"Initiate Stats Activity\");\n //Log.d(\"test\", \"Correct Answers: \" + correctAnswers + \"/\" + questionList.size());\n statsIntent.putExtra(MainActivity.PERCENT_KEY, (double)correctAnswers/(double)questionList.size());\n Log.d(\"test\", \"Sending double: \" + (double)correctAnswers/(double)questionList.size());\n statsIntent.putExtra(MainActivity.QUESTION_LIST_KEY, questionList);\n finish();\n startActivity(statsIntent);\n }\n\n\n }", "public void onClick(View view){\n RadioButton answer = (RadioButton) view;\n if (answer.getText() == manswer) {\n mScore = mScore + 1;\n Toast.makeText(Quiz.this, \"Correct\", Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(Quiz.this, \"InCorrect\", Toast.LENGTH_LONG).show();\n }\n updateScore(mScore);\n updateQuestion();\n\n }", "@Override\n public void onClick(View v) {\n\n if(radio_g.getCheckedRadioButtonId()==-1)\n {\n Toast.makeText(getApplicationContext(), \"Please select one choice\", Toast.LENGTH_SHORT).show();\n return;\n }\n RadioButton uans = (RadioButton) findViewById(radio_g.getCheckedRadioButtonId());\n String ansText = uans.getText().toString();\n\n if(ansText.equals(answers[flag])) {\n correct1++;\n\n }\n else {\n wrong1++;\n\n }\n\n flag++;\n\n // if (score != null)\n //score.setText(\"\"+correct1);\n\n if(flag<questions.length)\n {\n tv.setText(questions[flag]);\n rb1.setText(opt[flag*5]);\n rb2.setText(opt[(flag*5)+1]);\n rb3.setText(opt[(flag*5)+2]);\n rb4.setText(opt[(flag*5)+3]);\n rb5.setText(opt[(flag*5)+4]);\n\n }\n else\n {\n marks1=correct1;\n Intent intent = new Intent(getApplicationContext(),sC2.class);\n startActivity(intent);\n }\n\n radio_g.clearCheck();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent cb_e) {\n\t\t\t\tinx4 = cb[4].getSelectedIndex();\n\t\t\t}", "@Override\n public void onIndicatorSelected(int index) {\n setSelect(index);\n }", "protected void setChoice(int index) {\n\t\tchoiceOption = getOption(index);\n\t}", "@Override\n public void onClick(View v) {\n\n if(radio_g.getCheckedRadioButtonId()==-1)\n {\n Toast.makeText(getApplicationContext(), \"Please select one choice\", Toast.LENGTH_SHORT).show();\n return;\n }\n RadioButton uans = (RadioButton) findViewById(radio_g.getCheckedRadioButtonId());\n String ansText = uans.getText().toString();\n// Toast.makeText(getApplicationContext(), ansText, Toast.LENGTH_SHORT).show();\n if(ansText.equals(answers[flag])) {\n correct++;\n }\n else {\n wrong++;\n }\n\n flag++;\n if(flag<questions.length)\n {\n textView.setText(questions[flag]);\n rb1.setText(opt[flag*4]);\n rb2.setText(opt[flag*4 +1]);\n rb3.setText(opt[flag*4 +2]);\n rb4.setText(opt[flag*4 +3]);\n }\n else\n {\n marks=correct;\n Intent in = new Intent(getApplicationContext(),Cpp_Result.class);\n startActivity(in);\n }\n radio_g.clearCheck();\n }", "public void reset() {\n JRadioButton resetButton = (JRadioButton) getComponent(selected);\n resetButton.setSelected(true);\n }", "public void reset() {\n JRadioButton resetButton = (JRadioButton) getComponent(selected);\n resetButton.setSelected(true);\n }", "@Override\n public void onClick(View v) {\n progress = progress + 1;\n progressBar.setProgress(progress);\n\n //Check if radio button is checked. If is checked then we have to compare the answer:\n RadioButton answer = (RadioButton) findViewById(radioGroup.getCheckedRadioButtonId());\n //if current question equals to identified answer\n if (currentQuest1.getANSWER().equals(answer.getText())) {\n //then upgrade the score/points by 100\n score = score + 100;\n }\n\n //if is not checked then:\n radioGroup.clearCheck();\n //we can't go to the next question\n nextButtonQuest1.setEnabled(false);\n\n if (questionIncrease < 11) {\n //Quiz have only 10 questions. When all questions are answered then the quiz terminate\n if (questionIncrease == 10) {\n //setting the text inside the \"Next\" button to \"End Quiz\". The quiz ended !\n nextButtonQuest1.setText(\"End Quiz\");\n }\n\n //Get the number of questionIncrease (it show where are we inside the quiz) for entry of the created List and load it to currentQuest1\n currentQuest1 = questList1.get(list.get(questionIncrease));\n\n //Method who updates the View of Quiz Structure\n setQuizStructureView();\n\n //The quiz have been finished, so the timer must be ended\n /* } else {\n timer.onFinish();\n timer.cancel();\n }*/\n }\n }", "public void onCheckedChanged(RadioGroup arg0, int id) {\n\t\tRadioButton rb = (RadioButton) findViewById(id);\n\t\t/*\n\t\tswitch(id){\n\t\t\t/*\n\t\tcase R.id.radioButton1:\n\t\t\tpositionSelected = 0;\n\t\t\tbreak;\n\n\t\tcase R.id.radioButton2:\n\t\t\tpositionSelected = 0;\n\t\t\tbreak;\n\t\tcase R.id.radioButton3:\n\t\t\tpositionSelected = 1;\n\t\t\tbreak;\t\t\t\n\t\t}*/\n\t\tif (id == R.id.radioButton2)\n\t\t\tpositionSelected = 0;\n\t\telse if (id == R.id.radioButton3)\n\t\t\tpositionSelected = 1;\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent cb_e) {\n\t\t\t\tinx5 = cb[5].getSelectedIndex();\n\t\t\t}", "private void setRadioButtonState() {\n if (selectedAnswerOne.equals(\"ONE\")) {\n questionOneAnswerOne.setChecked(true);\n }\n if (selectedAnswerOne.equals(\"TWO\")) {\n questionOneAnswerTwo.setChecked(true);\n }\n if (selectedAnswerOne.equals(\"THREE\")) {\n questionOneAnswerThree.setChecked(true);\n }\n if (selectedAnswerOne.equals(\"FOUR\")) {\n questionOneAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerTwo.equals(\"ONE\")) {\n questionTwoAnswerOne.setChecked(true);\n }\n if (selectedAnswerTwo.equals(\"TWO\")) {\n questionTwoAnswerTwo.setChecked(true);\n }\n if (selectedAnswerTwo.equals(\"THREE\")) {\n questionTwoAnswerThree.setChecked(true);\n }\n if (selectedAnswerTwo.equals(\"FOUR\")) {\n questionTwoAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerThree.equals(\"ONE\")) {\n questionThreeAnswerOne.setChecked(true);\n }\n if (selectedAnswerThree.equals(\"TWO\")) {\n questionThreeAnswerTwo.setChecked(true);\n }\n if (selectedAnswerThree.equals(\"THREE\")) {\n questionThreeAnswerThree.setChecked(true);\n }\n if (selectedAnswerThree.equals(\"FOUR\")) {\n questionThreeAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerFour.equals(\"ONE\")) {\n questionFourAnswerOne.setChecked(true);\n }\n if (selectedAnswerFour.equals(\"TWO\")) {\n questionFourAnswerTwo.setChecked(true);\n }\n if (selectedAnswerFour.equals(\"THREE\")) {\n questionFourAnswerThree.setChecked(true);\n }\n if (selectedAnswerFour.equals(\"FOUR\")) {\n questionFourAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerFive.equals(\"ONE\")) {\n questionFiveAnswerOne.setChecked(true);\n }\n if (selectedAnswerFive.equals(\"TWO\")) {\n questionFiveAnswerTwo.setChecked(true);\n }\n if (selectedAnswerFive.equals(\"THREE\")) {\n questionFiveAnswerThree.setChecked(true);\n }\n if (selectedAnswerFive.equals(\"FOUR\")) {\n questionFiveAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerSix.equals(\"ONE\")) {\n questionSixAnswerOne.setChecked(true);\n }\n if (selectedAnswerSix.equals(\"TWO\")) {\n questionSixAnswerTwo.setChecked(true);\n }\n if (selectedAnswerSix.equals(\"THREE\")) {\n questionSixAnswerThree.setChecked(true);\n }\n if (selectedAnswerSix.equals(\"FOUR\")) {\n questionSixAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerSeven.equals(\"ONE\")) {\n questionSevenAnswerOne.setChecked(true);\n }\n if (selectedAnswerSeven.equals(\"TWO\")) {\n questionSevenAnswerTwo.setChecked(true);\n }\n if (selectedAnswerSeven.equals(\"THREE\")) {\n questionSevenAnswerThree.setChecked(true);\n }\n if (selectedAnswerSeven.equals(\"FOUR\")) {\n questionSevenAnswerFour.setChecked(true);\n }\n }", "public void onLoadMenuRadioSelected();", "void onChange_placeholder_xjal(ShapeRadioButtonGroup oldValue) {}", "private void randomRadioActionPerformed() {//GEN-FIRST:event_randomRadioActionPerformed\r\n sequentialRadio.setSelected(false);\r\n controller.OnOrderSelection(Album.SlideshowOrder.RANDOM);\r\n }", "public void imageOnClick(View v)\n {\n radioButtonIndicator = getSharedPreferences(MY_PREFERENCES, MODE_PRIVATE);\n\n int savedRadioIndex = radioButtonIndicator.getInt(RADIO_BUTTON_CHECKED, 0);\n Log.i(\"radioButtons\", \"Saved index = \" +savedRadioIndex);\n\n dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.fragment_filter_food);\n\n\n Button okButton = (Button)dialog.findViewById(R.id.btnOk);\n\n rg = (RadioGroup)dialog.findViewById(R.id.radioGroup);\n\n RadioButton radioButtonChecked = (RadioButton) rg.getChildAt(savedRadioIndex);\n radioButtonChecked.setChecked(true);\n\n //Dismiss the dialog on ok button press\n okButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(v.getId() == R.id.btnOk)\n {\n index = rg.indexOfChild(dialog.findViewById(rg.getCheckedRadioButtonId()));\n Log.i(\"radioButtons\",\"Current index is: \" + index);\n SharedPreferences.Editor editor = radioButtonIndicator.edit();\n editor.putInt(RADIO_BUTTON_CHECKED, index);\n editor.apply();\n dialog.dismiss();\n if(index == 0)\n {\n sortArrayList();\n }\n else\n {\n reverseSortArrayList();\n }\n }\n }\n });\n\n //Show the dialog\n dialog.show();\n }", "public void onRadioButtonClicked4(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button7:\n if (checked)\n\n weeklyInformation.radiobutton7(radioButton7.getText().toString());\n\n break;\n case R.id.R_button8:\n if (checked)\n\n weeklyInformation.radiobutton8(radioButton8.getText().toString());\n\n break;\n }\n }", "private void reloadAccountTypeRadioButtons() {\n accountTypeStandardJRadioButton.setSelected(true);\n }", "@Override\n public void onRadioButtonChoice(int choice) {\n mRadioButtonChoice = choice;\n Toast.makeText(this, \"Choice is:\"+\n Integer.toString(choice), Toast.LENGTH_SHORT).show();\n }", "public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }", "public void setIndex(int index) { this.index = index; }", "public void radioSelect(ActionEvent e)\n\t{\n\t\tString rep=\"\";\n\t\tif(rdoOui.isSelected())\n\t\t\trep=\"Oui\";\n\t\telse if(rdoNon.isSelected())\n\t\t\trep=\"Non\";\n\t\telse\n\t\t\trep=\"Peut être\";\n\t\tlblRadio.setText(rep);\n\t}", "void onExamAnswerClick(int index);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent cb_e) {\n\t\t\t\tinx0 = cb[0].getSelectedIndex();\n\t\t\t}", "@Override\n public void valueChanged(javax.swing.event.ListSelectionEvent e)\n {\n this.choice = e.getFirstIndex();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent cb_e) {\n\t\t\t\tinx3 = cb[3].getSelectedIndex();\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent cb_e) {\n\t\t\t\tinx1 = cb[1].getSelectedIndex();\n\t\t\t}", "private void repaintRow(int index, boolean value){\n\t\ttry{\n\t\t\tView temp=PollSelectionTable.this.getChildAt(index);\n\t\t\tCheckBox cbTemp=(CheckBox)temp.findViewById(R.id.chk);\n\t\t\tTextView txtTemp=(TextView)temp.findViewById(R.id.txtChoice);\n\t\t\tcbTemp.setChecked(value);\n\t\t\ttxtTemp.setTextColor(value?getResources().getColor(R.color.green_slider):getResources().getColor(R.color.gray));\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void onRadioButtonClicked(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.decimal1:\n if (checked)\n selected1=\"decimal1\";\n toDecimal();\n Log.i(\"check\",\"checking decimal1\");\n break;\n case R.id.binary1:\n if (checked)\n selected1=\"binary1\";\n toDecimal();\n break;\n case R.id.useless1:\n if (checked)\n selected1=\"none\";\n toDecimal();\n break;\n }\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n stList.get(position).setSelected(isChecked);\n }", "public void editRadio(int index,String newUrl, String newName) {\n radioList.set(index, new Radio(newUrl, newName));\n rewriteXmlSource();\n }", "@Override\n public void onClick(View v) {\n int selectedId = radioGroup.getCheckedRadioButtonId();\n\n\n int selectedRadioButtonID = radioGroup.getCheckedRadioButtonId();\n checkedStateExperience = tvExpYrs.getText().toString();\n\n switch (selectedRadioButtonID) {\n case R.id.radioButton1:\n checkStatesButton = \"1\";\n\n\n\n String str = checkedStateExperience;\n String strNew = str.replace(\"+\", \"\");\n getFullData(mlat, mlng, prefManager.getApikey(), query, rad, strNew);\n\n break;\n case R.id.radioButton2:\n checkStatesButton = \"2\";\n String ast = checkedStateExperience;\n String nnew = ast.replace(\"+\", \"\");\n\n getData(mlat, mlng, prefManager.getApikey(), query, rad, nnew);\n\n break;\n\n }\n\n\n bts.dismiss();\n\n }", "public void onRadioButtonClicked(View view) {\n\t\tboolean checked = ((RadioButton) view).isChecked();\r\n\r\n\t\t// Check which radio button was clicked\r\n\t\tswitch (view.getId()) {\r\n\t\tcase R.id.rBtnF:\r\n\t\t\tif (checked)\r\n\t\t\t\tnewSex = 'F';\r\n\t\t\tbreak;\r\n\t\tcase R.id.rBtnM:\r\n\t\t\tif (checked)\r\n\t\t\t\tnewSex = 'M';\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void onRadioButtonClicked2(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button3:\n if (checked)\n\n weeklyInformation.radiobutton3(radioButton3.getText().toString());\n\n break;\n case R.id.R_button4:\n if (checked)\n\n weeklyInformation.radiobutton4(radioButton4.getText().toString());\n\n break;\n }\n }", "@Override\r\n\t\t\tpublic void onCheckedChanged(RadioGroup arg0, int arg1) {\n\t\t\t\tfinal int index=arg0.indexOfChild(arg0.findViewById(arg1));\r\n\t\t\t\tx.task().post(new Runnable(){\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\tToast.makeText(x.app(), Constant.ADDRESS_LIST[index], Toast.LENGTH_SHORT).show();\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}", "public void onRadioButtonClicked(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.developer:\n if (checked)\n changeSpinnerOptions(\"Developer\");\n break;\n case R.id.tester:\n if (checked)\n changeSpinnerOptions(\"Tester\");\n break;\n }\n }", "public void actionPerformed( ActionEvent e )\r\n {\n JRadioButton b = new JRadioButton();\r\n radioGroup.add( b );\r\n b.setSelected( true );\r\n radioGroup.remove( b );\r\n }", "public void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.radio_button0:\n\t\t\tmPager.setCurrentItem(0);\n\t\t\tbreak;\n\t\tcase R.id.radio_button1:\n\t\t\tmPager.setCurrentItem(1);\n\t\t\tbreak;\n\t\tcase R.id.radio_button2:\n\t\t\tmPager.setCurrentItem(2);\n\t\t\tbreak;\n\t\tcase R.id.radio_button3:\n\t\t\tmPager.setCurrentItem(3);\n\t\t\tbreak;\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e)\n {\n if (yesRadio.isSelected())\n {\n parent.unlockNextButton();\n }\n else\n {\n parent.lockNextButton();\n }\n }", "@Override\r\n\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\r\n\t}", "public void onRadioButtonClicked(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.radio_administrative:\n if (checked)\n KeyID=0;\n break;\n case R.id.radio_guest:\n if (checked)\n KeyID=1;\n break;\n }\n }", "public void onRadioButtonClicked6(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button11:\n if (checked)\n\n weeklyInformation.radiobutton11(radioButton11.getText().toString());\n\n break;\n case R.id.R_button12:\n if (checked)\n\n weeklyInformation.radiobutton12(radioButton12.getText().toString());\n\n break;\n }\n }", "@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n if (checkedId == R.id.rbtSPAText) {\n\n setRbtValue(cSP, rbtQuestionAText, 1);\n } else if (checkedId == R.id.rbtSPBText) {\n\n setRbtValue(cSP, rbtQuestionBText, 2);\n } else if (checkedId == R.id.rbtSPCText) {\n\n setRbtValue(cSP, rbtQuestionCText, 3);\n } else if (checkedId == R.id.rbtSPDText) {\n\n setRbtValue(cSP, rbtQuestionDText, 4);\n }\n }", "public void mostrarPregunta(int indicePregunta){\n etiquetaTituloPregunta.setText(preguntas.get(indicePregunta).getTitulo());\n\n //Llenamos con el modelo los radio buttons\n for (int i = 0; i < radios.size(); i++) {\n radios.get(i).setText(preguntas.get(indicePregunta).getOpciones()[i].getTitulo());\n }\n\n}", "private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n}", "public native void setSelectedIndex(int index);", "private void addListenerRadioGroup() {\n int selectedID = radioGroupJenisKel.getCheckedRadioButtonId();\n\n //Mencari radio Button\n radioButtonJenisKel = (RadioButton) findViewById(selectedID);\n }", "public void questionFourRadioButtons(View view){\n // Is the button now checked?\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.question_4_radio_button_1:\n if (checked)\n // Incorrect answer\n break;\n case R.id.question_4_radio_button_2:\n if (checked)\n // Correct answer, add one point\n break;\n case R.id.question_4_radio_button_3:\n if (checked)\n // Incorrect answer\n break;\n case R.id.question_4_radio_button_4:\n if (checked)\n // Incorrect answer\n break;\n }\n }", "@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n switch (checkedId) {\n case R.id.rbBeer:\n Answer.setText(\"2\");\n break;\n case R.id.rbBeer5:\n Answer.setText(\"2\");\n break;\n case R.id.rbCider:\n Answer.setText(\"3\");\n break;\n case R.id.rbWine:\n Answer.setText(\"2\");\n break;\n case R.id.rbSpirits:\n Answer.setText(\"1\");\n break;\n case R.id.rbPops:\n Answer.setText(\"1\");\n break;\n }\n\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent cb_e) {\n\t\t\t\tinx2 = cb[2].getSelectedIndex();\n\t\t\t}", "public void onRadioButtonClicked7(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button13:\n if (checked)\n\n weeklyInformation.radiobutton13(radioButton13.getText().toString());\n\n break;\n case R.id.R_button14:\n if (checked)\n\n weeklyInformation.radiobutton14(radioButton14.getText().toString());\n\n break;\n }\n }", "public void setNumComboBox() {\n\t\tint numAnswers = testGenerator.getNumAnswers(questionNo);\n\t\tanswerChoiceList.removeActionListener(this);\n\t\tif(numAnswers == 2) {\n\t\t\tanswerChoiceList.setSelectedIndex(0);\n\t\t} else if(numAnswers == 3) {\n\t\t\tanswerChoiceList.setSelectedIndex(1);\n\t\t} else if(numAnswers == 4) {\n\t\t\tanswerChoiceList.setSelectedIndex(2);\n\t\t}\n\t\tanswerChoiceList.addActionListener(this);\n\t}", "public void onRadioButtonClicked5(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button9:\n if (checked)\n\n weeklyInformation.radiobutton9(radioButton9.getText().toString());\n\n break;\n case R.id.R_button10:\n if (checked)\n\n weeklyInformation.radiobutton10(radioButton10.getText().toString());\n\n break;\n }\n }", "@Override\n\t\t\tpublic void onCheckedChanged(RadioGroup arg0, int arg1) {\n\t\t\t\tswitch (arg1) {\n\t\t\t\tcase R.id.main_btn1:\n\t\t\t\t\tviewPager.setCurrentItem(0, false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase R.id.main_btn2:\n\t\t\t\t\tviewPager.setCurrentItem(1, false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase R.id.main_btn3:\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "@Override\n public void setQuestion(Question question) {\n super.setQuestion(question);\n\n options = ((MultipleChoiceQuestionResponse) question.getCorrectAnswer()).getChoices();\n for (int i = 0; i < options.size(); i ++) {\n String option = options.get(i);\n RadioButton button = new RadioButton(option);\n button.setToggleGroup(group);\n\n button.setLayoutY(i * 30);\n choices.getChildren().add(button);\n }\n }", "public void onRadioButtonClicked(View view) {\n\t boolean checked = ((RadioButton) view).isChecked();\n\t \n\t switch(view.getId()) {\n\t case R.id.continous:\n\t if (checked)\n\t \tusecase = 1; \n\t break;\n\t case R.id.segmented:\n\t if (checked)\n\t \tusecase = 0;\n\t break;\n\t }\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tint newSelectedIndex = colors.indexOf(v.getTag());\n\t\t\t\t\n\t\t\t\tif(newSelectedIndex >= 0) {\n\t\t\t\t\tint lastSelectedIndex = selectedIndex;\n\t\t\t\t\tselectedIndex = newSelectedIndex;\n\t\t\t\t\t\n\t\t\t\t\tupdateColorItemView(lastSelectedIndex);\n\t\t\t\t\tupdateColorItemView(selectedIndex);\n\t\t\t\t\t\n\t\t\t\t\tupdateSeekBars();\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onCheckedChanged(RadioGroup group,\n int checkedId) {\n switch (checkedId) {\n case R.id.juzz: {\n\n int i = selected.size();\n for (int j = 0; j < i; j++) {\n selected.remove(0);\n }\n i = selected_ayah_from.size();\n for (int j = 0; j < i; j++) {\n selected_ayah_from.remove(0);\n }\n i = selected_ayah_to.size();\n for (int j = 0; j < i; j++) {\n selected_ayah_to.remove(0);\n }\n\n new SelectJuzzDialog(context, \"parah\");\n\n break;\n }\n case R.id.surah: {\n int i = selected.size();\n for (int j = 0; j < i; j++) {\n selected.remove(0);\n }\n i = selected_ayah_from.size();\n for (int j = 0; j < i; j++) {\n selected_ayah_from.remove(0);\n }\n i = selected_ayah_to.size();\n for (int j = 0; j < i; j++) {\n selected_ayah_to.remove(0);\n }\n new SelectJuzzDialog(context, \"surah\");\n break;\n }\n case R.id.ayah: {\n int i = selected.size();\n for (int j = 0; j < i; j++) {\n selected.remove(0);\n }\n i = selected_ayah_from.size();\n for (int j = 0; j < i; j++) {\n selected_ayah_from.remove(0);\n }\n i = selected_ayah_to.size();\n for (int j = 0; j < i; j++) {\n selected_ayah_to.remove(0);\n }\n new SelectJuzzDialog(context, \"ayah\");\n break;\n }\n default:\n\n break;\n }\n }", "@Override\n\tpublic void setValueIndex(int index) {\n\t\t\n\t}", "public void setOpenQuestion(int index) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\tif (openQuestion != index){\n\t\t\t\topenQuestion = index;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\topenQuestion = -1;\n\t\t\t}\n\t\t\tthis.notifyDataSetChanged();\n\t\t}", "public void selectSurvey(int index) {\n selectedSurvey = activeTargetedSurveys.get(index);\n }", "@Override\n\t\tpublic void onCheckedChanged(RadioGroup arg0, int arg1) {\n\t\t\tswitch (arg1) {\n\t\t\tcase R.id.foot_home:\n\t\t\t\tpos = 0;\n\t\t\t\tbreak;\n\t\t\tcase R.id.foot_menu:\n\t\t\t\tpos = 1;\n\t\t\t\tbreak;\n\t\t\tcase R.id.foot_friends:\n\t\t\t\tpos = 2;\n\t\t\t\tbreak;\n\t\t\tcase R.id.foot_mine:\n\t\t\t\tpos = 3;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpager.setCurrentItem(pos);\n\t\t}", "private void sortedEdgeJRadioButtonMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sortedEdgeJRadioButtonMenuItemActionPerformed\n sortedJRadioButton.setSelected(true);\n calculateJButton.doClick();\n// methodJLabel.setText(\"Sorted Edge\");\n// clearStats();\n }", "public void onRadioButtonClicked1(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button1:\n if (checked)\n\n weeklyInformation.radiobutton1(radioButton1.getText().toString());\n\n break;\n case R.id.R_button2:\n if (checked)\n\n weeklyInformation.radiobutton2(radioButton2.getText().toString());\n\n break;\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n checkedItems[which] = isChecked;\n // Get the current focused item\n //String currentItem = colorsList.get(which);\n }", "private void checkSingleChoice(){\n \t\t\t\n \t\t\t// get selected radio button from radioGroup\n \t\t\tint selectedId = radioGroup.getCheckedRadioButtonId();\n \t\t\t\n \t\t\tRadioButton selectedButton = (RadioButton)getView().findViewById(selectedId);\n \t\t\t\n \t\t\tif(selectedButton!=null){\n \t\t\t\t\n \t\t\t\tString choice = selectedButton.getTag().toString();\n \t\t\t\tString choiceText = selectedButton.getText().toString();\n \t\t\t\t\n \t\t\t\t// TESTING ONLY\n \t\t\t\tint qid = eventbean.getQid();\n \t\t\t\tLog.v(\"schoice\",\"QID=\"+qid+\"/Choice=\"+choice);\n \t\t\t\t\n \t\t\t\t//setting the response for that survey question\n \t\t\t\teventbean.setChoiceResponse(choice+\".\"+choiceText);\n \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t}", "private void updateQuestion() {\r\n\r\n //The code below resets the option\r\n mOption1.setVisibility(View.VISIBLE);\r\n mOption2.setVisibility(View.VISIBLE);\r\n mOption3.setVisibility(View.VISIBLE);\r\n mNext.setVisibility(View.INVISIBLE);\r\n\r\n int questionSize = 12;\r\n\r\n if (mQuestionNumber < questionSize) {\r\n\r\n mQuestionView.setText((questionsDB.getQuestion(mQuestionNumber)));\r\n mOption1.setText(questionsDB.getChoice1(mQuestionNumber));\r\n mOption2.setText(questionsDB.getChoice2(mQuestionNumber));\r\n mOption3.setText(questionsDB.getChoice3(mQuestionNumber));\r\n\r\n mAnswer = questionsDB.getCorrectAnswer(mQuestionNumber);\r\n mQuestionNumber++;\r\n timeLeftInMillis = COUNTDOWN_IN_MILLIS;\r\n startCountDown();\r\n\r\n\r\n } else {\r\n displayScore();\r\n }\r\n\r\n }", "@Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n pChecked[which] = isChecked;\n }", "@Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n pChecked[which] = isChecked;\n }", "public void setIndex(int index){\r\n \tthis.index = index;\r\n }", "static void setIndexSelected(int index) {\n if (index != -1) {\n if (index >= deviceDetails.size()) {\n throw new IllegalArgumentException(String.format(\n \"Index of device exceeds device count. Currently requesting %d, but only have%d\",\n index, deviceDetails.size()));\n }\n BluetoothConnection.setServerMac(deviceDetails.get(index).getMacAddress());\n } else {\n BluetoothConnection.setServerMac(null);\n }\n indexSelected = index;\n }", "@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n View radioButton = group.findViewById(checkedId);\n int index = group.indexOfChild(radioButton);\n\n switch (index) {\n case 0: // first button\n mText.setVisibility(View.VISIBLE);\n mEdit.setVisibility(View.VISIBLE);\n break;\n case 1: // secondbutton\n info1=\"no\";\n mText.setVisibility(View.INVISIBLE);\n mEdit.setVisibility(View.INVISIBLE);\n break;\n }\n }", "public void setSelection (int index) {\r\n\tcheckWidget();\r\n\tsetSelection (index, false);\r\n}", "public int getSelectedShapeIndex(){\n return this.selectedShapeIndex;\n}", "public void onRadioButtonClicked3(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button5:\n if (checked)\n\n weeklyInformation.radiobutton5(radioButton5.getText().toString());\n\n break;\n case R.id.R_button6:\n if (checked)\n\n weeklyInformation.radiobutton6(radioButton6.getText().toString());\n\n break;\n }\n }", "@Override\n\t\t\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\t\t\tString answer = cursor.getString(cursor\n\t\t\t\t\t\t\t.getColumnIndex(\"answer\"));\n\t\t\t\t\tbtnA.setClickable(false);\n\t\t\t\t\tbtnB.setClickable(false);\n\t\t\t\t\tbtnC.setClickable(false);\n\t\t\t\t\tbtnD.setClickable(false);\n\t\t\t\t\timg_ROW.setVisibility(View.INVISIBLE);\n\t\t\t\t\tswitch (checkedId) {\n\t\t\t\t\tcase R.id.btnA:\n\t\t\t\t\t\tif (answer.equals(\"A\")) {\n\t\t\t\t\t\t\t// Toast.makeText(ZhangjielianxiActivity.this,\n\t\t\t\t\t\t\t// \"回答正确\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tzhangjiejiexi.setText(cursor.getString(cursor\n\t\t\t\t\t\t\t\t\t.getColumnIndex(\"jiexi\")));\n\t\t\t\t\t\t\timg_ROW.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\timg_ROW.setImageResource(R.drawable.dui);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * ContentValues cv=new ContentValues();\n\t\t\t\t\t\t\t * cv.put(\"isWrong\", 1);\n\t\t\t\t\t\t\t * writeDatabase.update(\"zhangjielianxi\", cv,\n\t\t\t\t\t\t\t * \"question='\"+questionString+\"'\", null);\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tint flag = 1;\n\t\t\t\t\t\t\tif (cursor2 != null && cursor2.getCount() != 0) {\n\t\t\t\t\t\t\t\tfor (cursor2.moveToFirst(); !cursor2\n\t\t\t\t\t\t\t\t\t\t.isAfterLast(); cursor2.moveToNext()) {\n\t\t\t\t\t\t\t\t\tif (cursor2.getString(\n\t\t\t\t\t\t\t\t\t\t\tcursor2.getColumnIndex(\"question\"))\n\t\t\t\t\t\t\t\t\t\t\t.equals(questionString))\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\t\tflag = 0;\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\tif (1 == flag)\n\t\t\t\t\t\t\t\tInsertWrongtable();\n\t\t\t\t\t\t\tbtnA.setTextColor(Color.RED);\n\t\t\t\t\t\t\timg_ROW.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\timg_ROW.setImageResource(R.drawable.cuo);\n\t\t\t\t\t\t\tzhangjiejiexi.setText(cursor.getString(cursor\n\t\t\t\t\t\t\t\t\t.getColumnIndex(\"jiexi\")));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase R.id.btnB:\n\t\t\t\t\t\tif (answer.equals(\"B\")) {\n\t\t\t\t\t\t\t// Toast.makeText(ZhangjielianxiActivity.this,\n\t\t\t\t\t\t\t// \"回答正确\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tzhangjiejiexi.setText(cursor.getString(cursor\n\t\t\t\t\t\t\t\t\t.getColumnIndex(\"jiexi\")));\n\t\t\t\t\t\t\timg_ROW.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\timg_ROW.setImageResource(R.drawable.dui);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint flag = 1;\n\t\t\t\t\t\t\tif (cursor2 != null && cursor2.getCount() != 0) {\n\t\t\t\t\t\t\t\tfor (cursor2.moveToFirst(); !cursor2\n\t\t\t\t\t\t\t\t\t\t.isAfterLast(); cursor2.moveToNext()) {\n\t\t\t\t\t\t\t\t\tif (cursor2.getString(\n\t\t\t\t\t\t\t\t\t\t\tcursor2.getColumnIndex(\"question\"))\n\t\t\t\t\t\t\t\t\t\t\t.equals(questionString))\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\t\tflag = 0;\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\tif (1 == flag)\n\t\t\t\t\t\t\t\tInsertWrongtable();\n\t\t\t\t\t\t\tbtnB.setTextColor(Color.RED);\n\t\t\t\t\t\t\timg_ROW.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\timg_ROW.setImageResource(R.drawable.cuo);\n\t\t\t\t\t\t\tzhangjiejiexi.setText(cursor.getString(cursor\n\t\t\t\t\t\t\t\t\t.getColumnIndex(\"jiexi\")));\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase R.id.btnC:\n\t\t\t\t\t\tif (answer.equals(\"C\")) {\n\t\t\t\t\t\t\t// Toast.makeText(ZhangjielianxiActivity.this,\n\t\t\t\t\t\t\t// \"回答正确\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tzhangjiejiexi.setText(cursor.getString(cursor\n\t\t\t\t\t\t\t\t\t.getColumnIndex(\"jiexi\")));\n\t\t\t\t\t\t\timg_ROW.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\timg_ROW.setImageResource(R.drawable.dui);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint flag = 1;\n\t\t\t\t\t\t\tif (cursor2 != null && cursor2.getCount() != 0) {\n\t\t\t\t\t\t\t\tfor (cursor2.moveToFirst(); !cursor2\n\t\t\t\t\t\t\t\t\t\t.isAfterLast(); cursor2.moveToNext()) {\n\t\t\t\t\t\t\t\t\tif (cursor2.getString(\n\t\t\t\t\t\t\t\t\t\t\tcursor2.getColumnIndex(\"question\"))\n\t\t\t\t\t\t\t\t\t\t\t.equals(questionString))\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\t\tflag = 0;\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\tif (1 == flag)\n\t\t\t\t\t\t\t\tInsertWrongtable();\n\t\t\t\t\t\t\tbtnC.setTextColor(Color.RED);\n\t\t\t\t\t\t\timg_ROW.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\timg_ROW.setImageResource(R.drawable.cuo);\n\t\t\t\t\t\t\tzhangjiejiexi.setText(cursor.getString(cursor\n\t\t\t\t\t\t\t\t\t.getColumnIndex(\"jiexi\")));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase R.id.btnD:\n\t\t\t\t\t\tif (answer.equals(\"D\")) {\n\t\t\t\t\t\t\t// Toast.makeText(ZhangjielianxiActivity.this,\n\t\t\t\t\t\t\t// \"回答正确\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tzhangjiejiexi.setText(cursor.getString(cursor\n\t\t\t\t\t\t\t\t\t.getColumnIndex(\"jiexi\")));\n\t\t\t\t\t\t\timg_ROW.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\timg_ROW.setImageResource(R.drawable.dui);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint flag = 1;\n\t\t\t\t\t\t\tif (cursor2 != null && cursor2.getCount() != 0) {\n\t\t\t\t\t\t\t\tfor (cursor2.moveToFirst(); !cursor2\n\t\t\t\t\t\t\t\t\t\t.isAfterLast(); cursor2.moveToNext()) {\n\t\t\t\t\t\t\t\t\tif (cursor2.getString(\n\t\t\t\t\t\t\t\t\t\t\tcursor2.getColumnIndex(\"question\"))\n\t\t\t\t\t\t\t\t\t\t\t.equals(questionString))\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\t\tflag = 0;\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\tif (1 == flag)\n\t\t\t\t\t\t\t\tInsertWrongtable();\n\t\t\t\t\t\t\tbtnD.setTextColor(Color.RED);\n\t\t\t\t\t\t\timg_ROW.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\timg_ROW.setImageResource(R.drawable.cuo);\n\t\t\t\t\t\t\tzhangjiejiexi.setText(cursor.getString(cursor\n\t\t\t\t\t\t\t\t\t.getColumnIndex(\"jiexi\")));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}", "private void toggleSelectedAlgorithm(int index) {\n if (selected[index] == true) {\n selected[index] = false;\n } else {\n selected[index] = true;\n }\n }", "public int getAddRemoveChoice() {\n\t\treturn radioButtonState;\n\t}", "private static void updateSelectedRadioButtonInGroup(String actionCommand, ButtonGroup btnGroup) {\n for (Enumeration<AbstractButton> buttonIt = btnGroup.getElements(); buttonIt.hasMoreElements();) {\n AbstractButton button = buttonIt.nextElement();\n button.setSelected(button.getActionCommand().equals(actionCommand));\n }\n }" ]
[ "0.65963167", "0.63820124", "0.622459", "0.6210517", "0.6201149", "0.6107021", "0.60312843", "0.6026558", "0.60005283", "0.5996725", "0.5992636", "0.59898376", "0.596909", "0.5953486", "0.59186184", "0.5912168", "0.58728415", "0.5857753", "0.5855339", "0.5845827", "0.5827152", "0.58153486", "0.58100784", "0.5794981", "0.57896686", "0.5778495", "0.5769866", "0.576146", "0.5760405", "0.5760405", "0.57534957", "0.57374763", "0.5709435", "0.57037586", "0.5673672", "0.56652105", "0.56578857", "0.564907", "0.564567", "0.5640724", "0.56397915", "0.5631676", "0.5621586", "0.5612177", "0.5610393", "0.560207", "0.5601777", "0.5584615", "0.5571527", "0.5565739", "0.55601084", "0.5555827", "0.5545752", "0.55433786", "0.55390495", "0.5538378", "0.5523054", "0.551975", "0.55197114", "0.5513872", "0.5511166", "0.55109674", "0.5502611", "0.54990995", "0.54959625", "0.5495836", "0.549439", "0.54916394", "0.548145", "0.5465576", "0.54655266", "0.54609406", "0.54557246", "0.54522836", "0.5449181", "0.54449093", "0.5434746", "0.54347247", "0.5426836", "0.5423243", "0.54173595", "0.5410319", "0.54067445", "0.5404441", "0.54008", "0.5395928", "0.5395697", "0.53946", "0.53918916", "0.53893507", "0.53893507", "0.5386828", "0.53840876", "0.53833246", "0.5381099", "0.5379441", "0.5373757", "0.5371667", "0.53640324", "0.5363883", "0.5358724" ]
0.0
-1
Created by al on 13.08.16.
@PerListFragment @Component(modules={FragmentListModule.class}, dependencies = {AppComponent.class}) public interface ListFragmentComponent { void inject(ListFragment fragment); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "private void init() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\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}", "private void m50366E() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public 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 void init() {\n }", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {}", "private void strin() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private void init() {\n\n\n\n }", "public void mo6081a() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "public void mo55254a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n public void initialize() { \n }", "protected void mo6255a() {\n }", "private Rekenhulp()\n\t{\n\t}" ]
[ "0.5802845", "0.57955176", "0.5682294", "0.5609961", "0.5607497", "0.5607497", "0.55505157", "0.5537575", "0.553539", "0.55353886", "0.552886", "0.55130416", "0.5506695", "0.5505629", "0.5504156", "0.5496037", "0.5482984", "0.54745686", "0.54745686", "0.54745686", "0.54745686", "0.54745686", "0.5452211", "0.5445707", "0.54391515", "0.54372644", "0.542871", "0.5404909", "0.5402374", "0.53956693", "0.53848535", "0.5382294", "0.53706497", "0.53659654", "0.5362581", "0.5362581", "0.53612715", "0.5360933", "0.53605294", "0.5353539", "0.5353439", "0.53320646", "0.5313883", "0.5313883", "0.5313883", "0.53039116", "0.53039116", "0.53039116", "0.529212", "0.529212", "0.529212", "0.52912045", "0.52908456", "0.52908456", "0.52908385", "0.52908385", "0.52908385", "0.52908385", "0.52908385", "0.52908385", "0.52908385", "0.5286094", "0.5283095", "0.52826285", "0.5282084", "0.52807426", "0.52807426", "0.5280096", "0.5277046", "0.5272034", "0.5250302", "0.5244204", "0.5239696", "0.5239696", "0.5239696", "0.5239696", "0.5239696", "0.5239696", "0.52382517", "0.5236335", "0.5232936", "0.5225319", "0.52234805", "0.52128434", "0.5209922", "0.5206685", "0.5206101", "0.52039397", "0.52021027", "0.5195465", "0.5195465", "0.5175164", "0.51732445", "0.5168629", "0.51619744", "0.51564616", "0.5156026", "0.5152001", "0.5147566", "0.513471", "0.51238585" ]
0.0
-1
Takes a chunk of text (anything from a single String representing an entire document to pasted in text, to simply a seemingly single sentence) and breaks it up into seperate sentences where necessary. It does this by: Finding the "true" end of sentence Not splitting up at EOS characters in quotes Checking for sentences ending in a quoted sentence Ignoring abbreviations as ends of sentences Ignoring ellipses as ends of sentences
public ArrayList<String> makeSentences(String text) { /* * Quick check so we're not trying to split up an empty * String. This only happens right before the user types * at the end of a document and we don't have anything to * split, so return. */ if (text.equals("")) { ArrayList<String> sents = new ArrayList<String>(); sents.add(""); return sents; } /** * Because the eosTracker isn't initialized until the TaggedDocument is, * it won't be ready until near the end of DocumentProcessor, in which * case we want to set it to the correct */ this.eosTracker = main.editorDriver.taggedDoc.eosTracker; this.editorDriver = main.editorDriver; ArrayList<String> sents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES); ArrayList<String> finalSents = new ArrayList<String>(ANONConstants.EXPECTED_NUM_OF_SENTENCES); boolean mergeNext = false; boolean mergeWithLast = false; boolean forceNoMerge = false; int currentStart = 1; int currentStop = 0; String temp; /** * replace unicode format characters that will ruin the regular * expressions (because non-printable characters in the document still * take up indices, but you won't know they're there untill you * "arrow" though the document and have to hit the same arrow twice to * move past a certain point. Note that we must use "Cf" rather than * "C". If we use "C" or "Cc" (which includes control characters), we * remove our newline characters and this screws up the document. "Cf" * is "other, format". "Cc" is "other, control". Using "C" will match * both of them. */ text = text.replaceAll("\u201C","\""); text = text.replaceAll("\u201D","\""); text = text.replaceAll("\\p{Cf}",""); int lenText = text.length(); int index = 0; int buffer = editorDriver.sentIndices[0]; String safeString = ""; Matcher abbreviationFinder = ABBREVIATIONS_PATTERN.matcher(text); //================ SEARCHING FOR ABBREVIATIONS ================ while (index < lenText-1 && abbreviationFinder.find(index)) { index = abbreviationFinder.start(); try { int abbrevLength = index; while (text.charAt(abbrevLength) != ' ') { abbrevLength--; } if (ABBREVIATIONS.contains(text.substring(abbrevLength+1, index+1))) { eosTracker.setIgnore(index+buffer, true); } } catch (Exception e) {} index++; } Matcher sent = EOS_chars.matcher(text); boolean foundEOS = sent.find(currentStart); // xxx TODO xxx take this EOS character, and if not in quotes, swap it for a permanent replacement, and create and add an EOS to the calling TaggedDocument's eosTracker. /* * We want to check and make sure that the EOS character (if one was found) is not supposed to be ignored. If it is, we will act like we did not * find it. If there are multiple sentences with multiple EOS characters passed it will go through each to check, foundEOS will only be true if * an EOS exists in "text" that would normally be an EOS character and is not set to be ignored. */ index = 0; if (foundEOS) { try { while (index < lenText-1 && sent.find(index)) { index = sent.start(); if (!eosTracker.sentenceEndAtIndex(index+buffer)) { foundEOS = false; } else { foundEOS = true; break; } index++; } } catch (IllegalStateException e) {} } //We need to reset the Matcher for the code below sent = EOS_chars.matcher(text); sent.find(currentStart); Matcher sentEnd; Matcher citationFinder; boolean hasCitation = false; int charNum = 0; int lenTemp = 0; int lastQuoteAt = 0; int lastParenAt = 0; boolean foundQuote = false; boolean foundParentheses = false; boolean isSentence; boolean foundAtLeastOneEOS = foundEOS; /** * Needed otherwise when the user has text like below: * This is my sentence one. This is "My sentence?" two. This is the last sentence. * and they begin to delete the EOS character as such: * This is my sentence one. This is "My sentence?" two This is the last sentence. * Everything gets screwed up. This is because the operations below operate as expected only when there actually is an EOS character * at the end of the text, it expects it there in order to function properly. Now usually if there is no EOS character at the end it wouldn't * matter since the while loop and !foundAtLeastOneEOS conditional are executed properly, BUT as you can see the quotes, or more notably the EOS character inside * the quotes, triggers this initial test and thus the operation breaks. This is here just to make sure that does not happen. */ String trimmedText = text.trim(); int trimmedTextLength = trimmedText.length(); //We want to make sure that if there is an EOS character at the end that it is not supposed to be ignored boolean EOSAtSentenceEnd = true; if (trimmedTextLength != 0) { EOSAtSentenceEnd = EOS.contains(trimmedText.substring(trimmedTextLength-1, trimmedTextLength)) && eosTracker.sentenceEndAtIndex(editorDriver.sentIndices[1]-1); } else { EOSAtSentenceEnd = false; } //Needed so that if we are deleting abbreviations like "Ph.D." this is not triggered. if (!EOSAtSentenceEnd && (editorDriver.taggedDoc.watchForEOS == -1)) EOSAtSentenceEnd = true; while (foundEOS == true) { currentStop = sent.end(); //We want to make sure currentStop skips over ignored EOS characters and stops only when we hit a true EOS character try { while (!eosTracker.sentenceEndAtIndex(currentStop+buffer-1) && currentStop != lenText) { sent.find(currentStop+1); currentStop = sent.end(); } } catch (Exception e) {} temp = text.substring(currentStart-1,currentStop); lenTemp = temp.length(); lastQuoteAt = 0; lastParenAt = 0; foundQuote = false; foundParentheses = false; for(charNum = 0; charNum < lenTemp; charNum++){ if (temp.charAt(charNum) == '\"') { lastQuoteAt = charNum; if (foundQuote == true) foundQuote = false; else foundQuote = true; } if (temp.charAt(charNum) == '(') { lastParenAt = charNum; if (foundParentheses) foundParentheses = false; else foundParentheses = true; } } if (foundQuote == true && ((temp.indexOf("\"",lastQuoteAt+1)) == -1)) { // then we found an EOS character that shouldn't split a sentence because it's within an open quote. if ((currentStop = text.indexOf("\"",currentStart +lastQuoteAt+1)) == -1) { currentStop = text.length(); // if we can't find a closing quote in the rest of the input text, then we assume the author forgot to put a closing quote, and act like it's at the end of the input text. } else{ currentStop +=1; mergeNext=true;// the EOS character we are looking for is not in this section of text (section being defined as a substring of 'text' between two EOS characters.) } } safeString = text.substring(currentStart-1,currentStop); if (foundParentheses && ((temp.indexOf(")", lastParenAt+1)) == -1)) { if ((currentStop = text.indexOf(")", currentStart + lastParenAt + 1)) == -1) currentStop = text.length(); else { currentStop += 1; mergeNext = true; } } safeString = text.substring(currentStart-1,currentStop); if (foundQuote) { sentEnd = SENTENCE_QUOTE.matcher(text); isSentence = sentEnd.find(currentStop-2); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).) if (isSentence == true) { // If it seems that the text looks like this: He said, "Hello." Then she said, "Hi." // Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, "Hello.") currentStop = text.indexOf("\"",sentEnd.start())+1; safeString = text.substring(currentStart-1,currentStop); forceNoMerge = true; mergeNext = false; } } if (foundParentheses) { sentEnd = SENTENCE_PARENTHESES.matcher(text); isSentence = sentEnd.find(currentStop-2); if (isSentence == true) { currentStop = text.indexOf(")", sentEnd.start()) + 1; safeString = text.substring(currentStart-1, currentStop); forceNoMerge = true; mergeNext = false; } } // now check to see if there is a CITATION after the sentence (doesn't just apply to quotes due to paraphrasing) // The rule -- at least as of now -- is if after the EOS mark there is a set of parenthesis containing either one word (name) or a name and numbers (name 123) || (123 name) || (123-456 name) || (name 123-456) || etc.. citationFinder = CITATION.matcher(text.substring(currentStop)); hasCitation = citationFinder.find(); // -2 so that we match the EOS character before the quotes (not -1 because currentStop is one greater than the last index of the string -- due to the way substring works, which is includes the first index, and excludes the end index: [start,end).) if (hasCitation == true) { // If it seems that the text looks like this: He said, "Hello." Then she said, "Hi." // Then we want to split this up into two sentences (it's possible to have a sentence like this: He said, "Hello.") currentStop = text.indexOf(")",citationFinder.start()+currentStop)+1; safeString = text.substring(currentStart-1,currentStop); mergeNext = false; } if (mergeWithLast) { mergeWithLast=false; String prev=sents.remove(sents.size()-1); safeString=prev+safeString; } if (mergeNext && !forceNoMerge) {//makes the merge happen on the next pass through mergeNext=false; mergeWithLast=true; } else { forceNoMerge = false; finalSents.add(safeString); } sents.add(safeString); //// xxx xxx xxx return the safeString_subbedEOS too!!!! if (currentStart < 0 || currentStop < 0) { Logger.logln(NAME+"Something went really wrong making sentence tokens.", LogOut.STDERR); ErrorHandler.fatalProcessingError(null); } currentStart = currentStop+1; if (currentStart >= lenText) { foundEOS = false; continue; } foundEOS = sent.find(currentStart); } if (!foundAtLeastOneEOS || !EOSAtSentenceEnd) { ArrayList<String> wrapper = new ArrayList<String>(1); wrapper.add(text); return wrapper; } return finalSents; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static ArrayList<String> split_sentences(String inputText){\n ArrayList<String> sentences = new ArrayList<>();\n Pattern p = Pattern.compile(\"[^.!?\\\\s][^.!?]*(?:[.!?](?!['\\\"]?\\\\s|$)[^.!?]*)*[.!?]?['\\\"]?(?=\\\\s|$)\", Pattern.MULTILINE | Pattern.COMMENTS);\n Matcher match = p.matcher(inputText);\n while (match.find()) {\n sentences.add(match.group());\n }\n return sentences;\n }", "private String removeFalseEndOfSentence(String s) {\n // Don't split at e.g. \"U. S. A.\":\n s = abbrev1.matcher(s).replaceAll(\"$1\");\n // Don't split at e.g. \"U.S.A.\": \n s = abbrev2.matcher(s).replaceAll(\"$1\");\n // Don't split after a white-space followed by a single letter followed\n // by a dot followed by another whitespace.\n // e.g. \" p. \"\n s = abbrev3.matcher(s).replaceAll(\"$1$2\");\n // Don't split at \"bla bla... yada yada\" \n s = abbrev4.matcher(s).replaceAll(\"$1$2\");\n // Don't split [.?!] when the're quoted:\n s = abbrev5.matcher(s).replaceAll(\"$1\");\n\n // Don't split at abbreviations, treat them case insensitive\n s = ABREVLIST_PATTERN.matcher(s).replaceAll(\"$1\");\n\n //a special list of abbrevs used at the end of sentence\n s = ENDABREVLIST_PATTERN.matcher(s).replaceAll(\"$1$3\");\n \n // Don't break after quote unless there's a capital letter:\n // e.g.: \"That's right!\" he said.\n s = abbrev6.matcher(s).replaceAll(\"$1$2\");\n\n // fixme? not sure where this should occur, leaving it commented out:\n // don't break: text . . some more text.\n // text=~s/(\\s\\.\\s)$EOS(\\s*)/$1$2/sg;\n\n // e.g. \"Das ist . so.\" -> assume one sentence\n s = abbrev7.matcher(s).replaceAll(\"$1\");\n\n // e.g. \"Das ist . so.\" -> assume one sentence\n s = abbrev8.matcher(s).replaceAll(\"$1\");\n \n s = ELLIPSIS.matcher(s).replaceAll(\"$1$3\");\n \n s = s.replaceAll(\"(\\\\d+\\\\.) \" + EOS + \"([\\\\p{L}&&[^\\\\p{Lu}]]+)\", \"$1 $2\");\n\n // z.B. \"Das hier ist ein(!) Satz.\"\n s = s.replaceAll(\"\\\\(([!?]+)\\\\) \" + EOS, \"($1) \");\n return s;\n }", "private String firstSentenceSplitting(String s) {\n // Double new-line means a new sentence:\n s = paragraph.matcher(s).replaceAll(\"$1\" + EOS);\n // Punctuation followed by whitespace means a new sentence:\n s = punctWhitespace.matcher(s).replaceAll(\"$1\" + EOS);\n // New (compared to the perl module): Punctuation followed by uppercase followed\n // by non-uppercase character (except dot) means a new sentence:\n s = punctUpperLower.matcher(s).replaceAll(\"$1\" + EOS + \"$2\");\n // Break also when single letter comes before punctuation:\n s = letterPunct.matcher(s).replaceAll(\"$1\" + EOS);\n return s;\n }", "public static List<List<String[]>> getLinesAsPOSSentences(String text) {\n\t\tStringBuilder sentenceSB = new StringBuilder();\n\t\tchar[] chars;\n\t\tchars = text.toCharArray();\n\t\tList<List<String[]>> lines = new ArrayList<List<String[]>>();\n\t\tList<String[]> words = new ArrayList<String[]>();\n\t\twords.add(new String[] {\"<s>\",\"BOS\"});\n\t\tfor (int i=0; i<chars.length; i++) {\n\t\t\tif (chars[i] == '\\n' || chars[i] == '\\r') {\n\t\t\t\tif (sentenceSB.length() > 0) {\n//\t\t\t\t\tSystem.out.println(\"Adding word: \"+sentenceSB.toString());\n\t\t\t\t\tString word = sentenceSB.toString();\n\t\t\t\t\tString[] splitWord = splitLastChar(word, '/');\n\t\t\t\t\tif (splitWord.length > 1) {\n//\t\t\t\t\t\tsplitWord[0] = escapeChar(splitWord[0], '/');\n\t\t\t\t\t\twords.add(splitWord);\n\t\t\t\t\t} else {\n\t\t\t\t\t\twords.add(new String[] {word, word});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (words.size() > 1) {\n//\t\t\t\t\tSystem.out.println(\"Adding line: \"+words);\n\t\t\t\t\twords.add(new String[] {\"<\\\\/s>\",\"EOS\"});\n\t\t\t\t\tlines.add(words);\n\t\t\t\t}\n\t\t\t\twords = new ArrayList<String[]>();\n\t\t\t\twords.add(new String[] {\"<s>\",\"BOS\"});\n\t\t\t\tsentenceSB.setLength(0);\n\t\t\t} else if (chars[i] == ' ') {\n\t\t\t\tif (sentenceSB.length() > 0) {\n\t\t\t\t\tString word = sentenceSB.toString();\n\t\t\t\t\tString[] splitWord = splitLastChar(word, '/');\n\t\t\t\t\tif (splitWord.length > 1) {\n//\t\t\t\t\t\tsplitWord[0] = escapeChar(splitWord[0], '/');\n\t\t\t\t\t\twords.add(splitWord);\n\t\t\t\t\t} else {\n\t\t\t\t\t\twords.add(new String[] {word, word});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsentenceSB.setLength(0);\n\t\t\t} else {\n\t\t\t\tsentenceSB.append(chars[i]);\n\t\t\t}\n\t\t}\n\t\tif (sentenceSB.length() > 0) {\n\t\t\tString word = sentenceSB.toString();\n\t\t\tString[] splitWord = splitLastChar(word, '/');\n\t\t\tif (splitWord.length > 1) {\n\t\t\t\tsplitWord[0] = escapeChar(splitWord[0], '/');\n\t\t\t\twords.add(splitWord);\n\t\t\t} else {\n\t\t\t\twords.add(new String[] {word, word});\n\t\t\t}\n\t\t}\n\t\tif (words.size() > 1) {\n\t\t\twords.add(new String[] {\"<\\\\/s>\",\"EOS\"});\n//\t\t\tSystem.out.print(\"Adding line: \");\n//\t\t\tfor (String[] token : words) {\n//\t\t\t\tSystem.out.print(\"(\"+token[0]+\",\"+token[1]+\")\"+\" \");\n//\t\t\t}\n//\t\t\tSystem.out.println();\n\t\t\tlines.add(words);\n\t\t}\n\t\tsentenceSB.setLength(0);\n\t\treturn lines;\n\t}", "public ArrayList<Sentence> sentenceDetector(BreakIterator bi,\r\n\t\t\tString text) {\r\n\t\tArrayList<Sentence> sentences = new ArrayList<Sentence>();\r\n\t\tbi.setText(text);\r\n\r\n\t\tint lastIndex = bi.first();\r\n\t\twhile (lastIndex != BreakIterator.DONE) {\r\n\t\t\tint firstIndex = lastIndex;\r\n\t\t\tlastIndex = bi.next();\r\n\r\n\t\t\tif (lastIndex != BreakIterator.DONE) {\r\n\t\t\t\tSentence s = new Sentence(text.substring(firstIndex, lastIndex));\r\n\t\t\t\ts.tokenizeSentence();\r\n\t\t\t\tsentences.add(s);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sentences;\r\n\t}", "public static List<Sentence> setUpSentences(String textStr) {\n\t\tList<Sentence> sentences= new ArrayList<Sentence>();\n\t\tint tokenBegin= 0;\n\t\tint sentBegin= 0;\n\t\tint charIndex=0;\n\t\tint sentCount= 0;\n\t\tint tokenCount;\n\t\tint textLen= textStr.length();\n\t\twhile(charIndex<textLen){\n\t\t\tList<Token> tokens= new ArrayList<Token>();\n\t\t\ttokenCount=0;\n\t\t\twhile(charIndex<textLen&& textStr.charAt(charIndex)!= '.'){\n\t\t\t\tif(textStr.charAt(charIndex)== ' '){\n\t\t\t\t\tif(textStr.charAt(charIndex-1)!= '.'){\n\t\t\t\t\t\taddToken(textStr, tokenBegin, charIndex, tokenCount,\n\t\t\t\t\t\t\t\ttokens);\n\t\t\t\t\t\ttokenBegin= charIndex+1;\n\t\t\t\t\t\ttokenCount++;\n\t\t\t\t\t}else\n\t\t\t\t\t\ttokenBegin++;\n\t\t\t\t}\n\t\t\t\tcharIndex++;\n\t\t\t}\n\t\t\t//add last token\n\t\t\tint end= Math.min(charIndex+1, textLen);\n\t\t\taddToken(textStr, tokenBegin, end, tokenCount, tokens);\n\t\t\ttokenBegin=charIndex+1;\n\t\t\t//add sentence \n\t\t\taddSentence(textStr, sentences, sentBegin, sentCount, tokens, end);\n\t\t\t\n\t\t\tsentCount++;\n\t\t\tsentBegin= charIndex+2;\n\t\t\tcharIndex++;\n\t\t}\n\t\t\n\t\treturn sentences;\n\t}", "public static void main(String[] args) {\n String textString = \"Hello, world! I am program.\";\n\n\n// System.out.println(Arrays.toString(\"a;b;c;d\".split(\"(?=;)\")));\n// String[] split = \"a;b;c;d\".split(\"(?=\\\\p{Punct}\\s?)|\\s\");\n /*String[] split = \"a;b;c;d\".split(\"(?=\\\\p{Punct}\\s?)\");\n System.out.println(Arrays.toString(split));*/\n// String[] split1 = \"Hello, world!\".split(\"(?=\\\\p{Punct}\\s?)|\\s\");\n /*String[] split1 = \"Hello, world!\".split(\"(?=(\\\\p{Punct}\\s?))\");\n System.out.println(Arrays.toString(split1));*/\n// System.out.println(Arrays.toString(\"a;b;c;d\".split(\"((?<=;)|(?=;))\")));\n\n// String[] sentenceElementStrings = sentenceString.split(\"(?=\\\\p{Punct}\\s?)|\\s\");\n// System.out.println(\"Hello world! \\\\I am program.\");\n Text text = new Text(textString);\n\n System.out.println(\"Original text:\\n\" + text);\n\n text.swapFirstAndLastWordsInSentences();\n\n System.out.println(\"Text after swapping:\\n\" + text);\n }", "public static List<List<String>> getLinesAsSentences(String text) {\n\t\tif (sb == null) {\n\t\t\tsb = new StringBuilder();\n\t\t}\n\t\tchar[] chars;\n\t\tchars = text.toCharArray();\n\t\tList<List<String>> lines = new ArrayList<List<String>>();\n\t\tList<String> words = new ArrayList<String>();\n\t\twords.add(\"<s>\");\n\t\tfor (int i=0; i<chars.length; i++) {\n\t\t\tif (chars[i] == '\\n' || chars[i] == '\\r') {\n\t\t\t\tif (sb.length() > 0) {\n//\t\t\t\t\tSystem.out.println(\"Adding word: \"+sb.toString());\n\t\t\t\t\twords.add(sb.toString());\n\t\t\t\t}\n\t\t\t\tif (words.size() > 1) {\n//\t\t\t\t\tSystem.out.println(\"Adding line: \"+words);\n\t\t\t\t\twords.add(\"</s>\");\n\t\t\t\t\tlines.add(words);\n\t\t\t\t}\n\t\t\t\twords = new ArrayList<String>();\n\t\t\t\twords.add(\"<s>\");\n\t\t\t\tsb.setLength(0);\n\t\t\t} else if (chars[i] == ' ') {\n\t\t\t\tif (sb.length() > 0) {\n\t\t\t\t\twords.add(sb.toString());\n\t\t\t\t}\n\t\t\t\tsb.setLength(0);\n\t\t\t} else {\n\t\t\t\tsb.append(chars[i]);\n\t\t\t}\n\t\t}\n\t\tif (sb.length() > 0) {\n\t\t\tif (sb.length() > 0) {\n\t\t\t\twords.add(sb.toString());\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}\n\t\tif (words.size() > 1) {\n//\t\t\tSystem.out.println(\"Adding line: \"+words);\n\t\t\twords.add(\"</s>\");\n\t\t\tlines.add(words);\n\t\t}\n\t\tsb.setLength(0);\n\t\treturn lines;\n\t}", "private List<String> getSentences(String paragraph) {\n BreakIterator breakIterator = BreakIterator.getSentenceInstance(Locale.US);\n breakIterator.setText(paragraph);\n List<String> sentences = new ArrayList<>();\n int start = breakIterator.first();\n for (int end = breakIterator.next(); end != breakIterator.DONE; start = end, end = breakIterator.next()) {\n sentences.add(paragraph.substring(start, end));\n }\n return sentences;\n }", "Stream<CharSequence> toSentences(CharSequence text);", "public String extractRelevantSentences(String paragraph, Collection<String> terms, boolean lemmatised, int maxSentenceLength) {\n String result = \"\";\n boolean checkSentenceLength = (maxSentenceLength != -1);\n\n // Create an empty Annotation just with the given text\n document = new Annotation(paragraph);\n // Run Annotators on this text\n pipeline.annotate(document);\n\n // Use map to track sentences so that a sentence is not returned twice\n sentences = new HashMap();\n int key = 0;\n for (CoreMap coreMap : document.get(CoreAnnotations.SentencesAnnotation.class)) {\n String string = coreMap.toString();\n if (checkSentenceLength)// if checking sentences, skip is sentence is long\n if (StringOps.getWordLength(string) > maxSentenceLength)\n continue;\n sentences.put(key, coreMap.toString());\n key++;\n }\n\n Set keySet = sentences.keySet();\n Set<Integer> returnedSet = new HashSet();\n Iterator keyIterator = keySet.iterator();\n // These are all the sentences in this document\n while (keyIterator.hasNext()) {\n int id = (int) keyIterator.next();\n String content = sentences.get(id);\n // This is the current sentence\n String thisSentence = content;\n // Select sentence if it contains any of the terms and is not already returned\n for (String t : terms) {\n if (!returnedSet.contains(id)) { // ensure sentence not already used\n String label = StringOps.stemSentence(t, true);\n if (StringUtils.contains(StringOps.stemSentence(thisSentence, false), label)\n || StringUtils.contains(StringOps.stemSentence(StringOps.stripAllParentheses(thisSentence), false), label)) { // lookup stemmed strings\n result = result + \" \" + thisSentence.trim(); // Concatenate new sentence\n returnedSet.add(id);\n }\n }\n }\n }\n\n if (lemmatised && null != result) {\n result = lemmatise(result);\n }\n\n return result;\n }", "public String[] breakSentence(String data) {\n sentences = myCategorizer.sentDetect(data);\n return sentences;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tString[] testSentence = new String[]{\r\n\t\t\t\t\"西三旗硅谷先锋小区半地下室出租,便宜可合租硅谷工信处女干事每月经过下属科室都要亲口交代24口交换机等技术性器件的安装工作\",\r\n\t\t\t\t\"这是一个伸手不见五指的黑夜。我叫孙悟空,我爱北京,我爱Python和C++。\",\r\n\t\t\t \"我不喜欢日本和服。\",\r\n\t\t\t \"雷猴回归人间。\",\r\n\t\t\t \"工信处女干事每月经过下属科室都要亲口交代24口交换机等技术性器件的安装工作\",\r\n\t\t\t \"我需要廉租房\",\r\n\t\t\t \"永和服装饰品有限公司\",\r\n\t\t\t \"我爱北京天安门\",\r\n\t\t\t \"abc\",\r\n\t\t\t \"隐马尔可夫\",\r\n\t\t\t \"雷猴是个好网站\",\r\n\t\t\t \"“Microsoft”一词由“MICROcomputer(微型计算机)”和“SOFTware(软件)”两部分组成\",\r\n\t\t\t \"草泥马和欺实马是今年的流行词汇\",\r\n\t\t\t \"伊藤洋华堂总府店\",\r\n\t\t\t \"中国科学院计算技术研究所\",\r\n\t\t\t \"罗密欧与朱丽叶\",\r\n\t\t\t \"我购买了道具和服装\",\r\n\t\t\t \"PS: 我觉得开源有一个好处,就是能够敦促自己不断改进,避免敞帚自珍\",\r\n\t\t\t \"湖北省石首市\",\r\n\t\t\t \"湖北省十堰市\",\r\n\t\t\t \"总经理完成了这件事情\",\r\n\t\t\t \"电脑修好了\",\r\n\t\t\t \"做好了这件事情就一了百了了\",\r\n\t\t\t \"人们审美的观点是不同的\",\r\n\t\t\t \"我们买了一个美的空调\",\r\n\t\t\t \"线程初始化时我们要注意\",\r\n\t\t\t \"一个分子是由好多原子组织成的\",\r\n\t\t\t \"祝你马到功成\",\r\n\t\t\t \"他掉进了无底洞里\",\r\n\t\t\t \"中国的首都是北京\",\r\n\t\t\t \"孙君意\",\r\n\t\t\t \"外交部发言人马朝旭\",\r\n\t\t\t \"领导人会议和第四届东亚峰会\",\r\n\t\t\t \"在过去的这五年\",\r\n\t\t\t \"还需要很长的路要走\",\r\n\t\t\t \"60周年首都阅兵\",\r\n\t\t\t \"你好人们审美的观点是不同的\",\r\n\t\t\t \"买水果然后去世博园\",\r\n\t\t\t \"但是后来我才知道你是对的\",\r\n\t\t\t \"存在即合理\",\r\n\t\t\t \"的的的的的在的的的的就以和和和\",\r\n\t\t\t \"I love你,不以为耻,反以为rong\",\r\n\t\t\t \"hello你好人们审美的观点是不同的\",\r\n\t\t\t \"很好但主要是基于网页形式\",\r\n\t\t\t \"hello你好人们审美的观点是不同的\",\r\n\t\t\t \"为什么我不能拥有想要的生活\",\r\n\t\t\t \"后来我才\",\r\n\t\t\t \"此次来中国是为了\",\r\n\t\t\t \"使用了它就可以解决一些问题\",\r\n\t\t\t \",使用了它就可以解决一些问题\",\r\n\t\t\t \"其实使用了它就可以解决一些问题\",\r\n\t\t\t \"好人使用了它就可以解决一些问题\",\r\n\t\t\t \"是因为和国家\",\r\n\t\t\t \"老年搜索还支持\",\r\n\t\t\t \"干脆就把那部蒙人的闲法给废了拉倒!RT @laoshipukong : 27日,全国人大常委会第三次审议侵权责任法草案,删除了有关医疗损害责任“举证倒置”的规定。在医患纠纷中本已处于弱势地位的消费者由此将陷入万劫不复的境地。 \",\r\n\t\t\t \"他说的确实在理\",\r\n\t\t\t \"长春市长春节讲话\",\r\n\t\t\t \"结婚的和尚未结婚的\",\r\n\t\t\t \"结合成分子时\",\r\n\t\t\t \"旅游和服务是最好的\",\r\n\t\t\t \"这件事情的确是我的错\",\r\n\t\t\t \"供大家参考指正\",\r\n\t\t\t \"哈尔滨政府公布塌桥原因\",\r\n\t\t\t \"我在机场入口处\",\r\n\t\t\t \"邢永臣摄影报道\",\r\n\t\t\t \"BP神经网络如何训练才能在分类时增加区分度?\",\r\n\t\t\t \"南京市长江大桥\",\r\n\t\t\t \"应一些使用者的建议,也为了便于利用NiuTrans用于SMT研究\",\r\n\t\t\t \"长春市长春药店\",\r\n\t\t\t \"邓颖超生前最喜欢的衣服\",\r\n\t\t\t \"胡锦涛是热爱世界和平的政治局常委\",\r\n\t\t\t \"程序员祝海林和朱会震是在孙健的左面和右面, 范凯在最右面.再往左是李松洪\",\r\n\t\t\t \"一次性交多少钱\",\r\n\t\t\t \"两块五一套,三块八一斤,四块七一本,五块六一条\",\r\n\t\t\t \"小和尚留了一个像大和尚一样的和尚头\",\r\n\t\t\t \"我是中华人民共和国公民;我爸爸是共和党党员; 地铁和平门站\",\r\n\t\t\t \"张晓梅去人民医院做了个B超然后去买了件T恤\",\r\n\t\t\t \"AT&T是一件不错的公司,给你发offer了吗?\",\r\n\t\t\t \"C++和c#是什么关系?11+122=133,是吗?PI=3.14159\",\r\n\t\t\t \"你认识那个和主席握手的的哥吗?他开一辆黑色的士。\",\r\n\t\t\t \"枪杆子中出政权\",\r\n\t\t\t \"张三风同学走上了不归路\",\r\n\t\t\t \"阿Q腰间挂着BB机手里拿着大哥大,说:我一般吃饭不AA制的。\",\r\n\t\t\t \"在1号店能买到小S和大S八卦的书,还有3D电视。\"\r\n\r\n\t\t};\r\n\t\t\r\n\t\tSegment app = new Segment();\r\n\t\t\r\n\t\tfor(String sentence : testSentence)\r\n\t\t\tSystem.out.println(app.cut(sentence));\r\n\t}", "private String getSplitCapitalPeriodSent(String text) {\n\t\t\r\n\t\tString testString = text;\r\n\t\t\r\n\t\t/*\r\n\t\ttestString = testString.replaceAll(\"\\\\·\", \".\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t// https://d5gate.ag5.mpi-sb.mpg.de/ClausIEGate/ClausIEGate?inputtext=Optimal+temperature+and+pH+for+growth+are+25%E2%80%9330+%CB%9AC+and+pH+7%2C+respectively.&processCcAllVerbs=true&processCcNonVerbs=true&type=true&go=Extract\r\n\t\ttestString = testString.replaceAll(\"\\\\s?\\\\·\\\\s?\", \".\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t\r\n\t\ttestString = testString.replaceAll(\"–\", \"-\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t// https://d5gate.ag5.mpi-sb.mpg.de/ClausIEGate/ClausIEGate?inputtext=Optimal+temperature+and+pH+for+growth+are+25%E2%80%9330+%CB%9AC+and+pH+7%2C+respectively.&processCcAllVerbs=true&processCcNonVerbs=true&type=true&go=Extract\r\n\t\ttestString = testString.replaceAll(\"\\\\s?-\\\\s?\", \"-\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t*/\r\n\t\t\r\n\t\t// System.out.println(\"testString::Before::\" + testString);\r\n\t\t\r\n\t\tString targetPatternString = \"(\\\\s[A-Z]\\\\.\\\\s)\";\r\n\t\tPattern pattern = Pattern.compile(targetPatternString);\r\n\t\tMatcher matcher = pattern.matcher(testString);\r\n\t\t\r\n\t\twhile (matcher.find()) {\r\n\t\t\t// System.out.println(\"Whloe Sent::\" + matcher.group());\r\n\t\t\t// System.out.println(\"Part 1::\" + matcher.group(1));\r\n\t\t\t// System.out.println(\"Part 2::\" + matcher.group(2));\r\n\t\t\t// System.out.println(\"Part 3::\" + matcher.group(3));\r\n\t\t\t\r\n\t\t\tString matchString = matcher.group(1);\r\n\t\t\t\r\n\t\t\tString newMatchString = \"\";\r\n\t\t\tfor ( int j = 0; j < matchString.length(); j++ ) {\r\n\t\t\t\tnewMatchString += matchString.substring(j, j+1) + \" \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"getSplitCapitalPeriodSent::OriginalSent::\" + text);\r\n\t\t\tSystem.out.println(\"matchString:: \" + matchString);\r\n\t\t\tSystem.out.println(\"newMatchString:: \" + newMatchString);\r\n\t\t\t\r\n\t\t\tlog(LogLevel.INFO, \"getSplitCapitalPeriodSent::OriginalSent::\" + text);\r\n\t\t\tlog(LogLevel.INFO, \"matchString:: \" + matchString);\r\n\t\t\tlog(LogLevel.INFO, \"newMatchString:: \" + newMatchString);\r\n\t\t\t\r\n\t\t\ttestString = testString.replaceAll(matcher.group(1), newMatchString);\r\n\t\t\t\r\n\t\t\t// String matchResult = matcher.group(1);\r\n\t\t\t// System.out.println(\"matchResult::\" + matchResult);\r\n\t\t}\r\n\t\t\r\n\t\t// System.out.println(\"testString::After::\" + testString);\r\n\t\t\r\n\t\treturn testString;\r\n\t\t\r\n\t}", "public static void main(String[] args){\n \tString tempStringLine;\n\n\t\t /* SCANNING IN THE SENTENCE */\n // create a queue called sentenceQueue to temporary store each line of the text file as a String.\n MyLinkedList sentenceList = new MyLinkedList();\n\n // integer which keeps track of the index position for each new sentence string addition.\n int listCount = 0;\n\n // create a new file by opening a text file.\n File file2 = new File(\"testEmail2.txt\");\n try {\n\n \t// create a new scanner 'sc' for the newly allocated file.\n Scanner sc = new Scanner(file2);\n\n // while there are still lines within the file, continue.\n while (sc.hasNextLine()) {\n\n \t// save each line within the file to the String 'tempStringLine'.\n \ttempStringLine = sc.nextLine();\n\n \t// create a new BreakIterator called 'sentenceIterator' to break the 'tempStringLine' into sentences.\n BreakIterator sentenceIterator = BreakIterator.getSentenceInstance();\n\n // Set a new text string 'tempStringLine' to be scanned.\n sentenceIterator.setText(tempStringLine);\n\n // save the first index boundary in the integer 'start'.\n // The iterator's current position is set to the first text boundary.\n int start = sentenceIterator.first();\n\n // save the boundary following the current boundary in the integer 'end'.\n for(int end = sentenceIterator.next();\n\n \t// while the end integer does not equal 'BreakIterator.DONE' or the end of the boundary.\n \tend != BreakIterator.DONE;\n\n \t// set the start integer equal to the end integer. Set the end integer equal to the next boundary.\n \tstart = end, end = sentenceIterator.next()){\n\n \t// create a substring of tempStringLine of the start and end boundsries, which are just Strings of\n \t// each sentence.\n \tsentenceList.add(listCount,tempStringLine.substring(start, end));\n\n \t// add to the count.\n \tlistCount++;\n }\n }\n\n // close the scanner 'sc'.\n sc.close(); \n\n // if the file could not be opened, throw a FileNotFoundException.\n }catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n\t\tsentenceProcessor one = new sentenceProcessor(sentenceList);\n\t\tString[] names = one.findNames();\n System.out.println(\"Speaker \" + names[0]);\n System.out.println(\"Subject \" + names[1]);\n\t}", "public String[] prepareText(String text) {\n\n Properties props = new Properties();\n\n props.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner\");\n StanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\n //apply\n Annotation document = new Annotation(text);\n pipeline.annotate(document);\n\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n ArrayList<String> result = new ArrayList<>();\n\n for (CoreMap sentence : sentences) {\n\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n // this is the text of the token\n String word = token.get(CoreAnnotations.LemmaAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(PartOfSpeechAnnotation.class);\n // this is the NER label of the token\n String ne = token.get(CoreAnnotations.NamedEntityTagAnnotation.class);\n\n if (!StringUtils.isStopWord(word)) {\n result.add(word);\n }\n\n }\n\n }\n String[] result_ar = new String[result.size()];\n\n return result.toArray(result_ar);\n }", "boolean hasIsEndOfSentence();", "private void openNlpSentSplitter(String source) throws InvalidFormatException, IOException {\n\t\tString paragraph = \"Hi. How are you? This is Mike. This is Elvis A. A cat in the hat. The type strain is KOPRI 21160T (= KCTC 23670T= JCM 18092T), isolated from a soil sample collected near the King Sejong Station on King George Island, Antarctica. The DNA G+ C content of the type strain is 30.0 mol%.\";\r\n\r\n\t\tInputStream modelIn = new FileInputStream(source);\r\n\r\n\t\ttry {\r\n\t\t // SentenceModel model = new SentenceModel(modelIn);\r\n\t\t\t// InputStream is = new FileInputStream(myConfiguration.getOpenNLPTokenizerDir());\r\n\t\t\t\r\n\t\t\tSentenceModel model = new SentenceModel(modelIn);\r\n\t\t\tSentenceDetectorME sdetector = new SentenceDetectorME(model);\r\n\t\t\tString sentences[] = sdetector.sentDetect(paragraph);\r\n\t\t\tfor ( int i = 0; i < sentences.length; i++ ) {\r\n\t\t\t\tSystem.out.println(sentences[i]);\r\n\t\t\t}\r\n\t\t\tmodelIn.close();\t\t \r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t if (modelIn != null) {\r\n\t\t try {\r\n\t\t modelIn.close();\r\n\t\t }\r\n\t\t catch (IOException e) {\r\n\t\t }\r\n\t\t }\r\n\t\t}\r\n\t}", "String[] splitSentenceWords() {\n\t\t\tint i=0;\n\t\t\tint j=0;\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\t\t\t\n\t\t\t\tString[] allWords = wordPattern.split(purePattern.matcher(sentence).replaceAll(\" \"));//.split(\"(?=\\\\p{Lu})|(\\\\_|\\\\,|\\\\.|\\\\s|\\\\n|\\\\#|\\\\\\\"|\\\\{|\\\\}|\\\\@|\\\\(|\\\\)|\\\\;|\\\\-|\\\\:|\\\\*|\\\\\\\\|\\\\/)+\");\n\t\t\tfor(String word : allWords) {\n\t\t\t\tif(word.length()>2) {\n\t\t\t\t\twords.add(word.toLowerCase());\n\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\treturn (String[])words.toArray(new String[words.size()]);\n\t\t\n\t\t}", "public static void main(String[] args) throws FileNotFoundException {\n\n Scanner readFile = new Scanner(new File(\"sentences.txt\"));\n \n //Boolean to make sure parameters fit the finalized tokens\n boolean okay = true; \n \n while (readFile.hasNext()) {\n Stemmer s = new Stemmer();\n String token = readFile.next();\n okay = true;\n \n //Section to ensure no numerics\n if (token.contains(\"1\") || token.contains(\"2\"))\n okay = false;\n else if (token.contains(\"3\")||token.contains(\"4\"))\n okay = false;\n else if (token.contains(\"5\")||token.contains(\"6\"))\n okay = false;\n else if (token.contains(\"7\")||token.contains(\"8\"))\n okay = false;\n else if (token.contains(\"9\")||token.contains(\"0\"))\n okay = false;\n else {\n \n //remove characters\n token = token.replace(\"\\,\", \" \");\n token = token.replace(\"\\.\", \" \");\n token = token.replace(\"\\\"\", \" \");\n token = token.replace(\"\\(\", \" \");\n token = token.replace(\"\\)\", \" \");\n token = token.replace(\"'s\", \" \");\n token = token.trim();\n token = token.toLowerCase();\n }\n \n //Giant hard coded section to remove numerics\n if (token.compareTo(\"a\")==0)\n okay=false;\n if (token.compareTo(\"able\")==0)\n okay=false;\n if (token.compareTo(\"about\")==0)\n okay=false;\n if (token.compareTo(\"across\")==0)\n okay=false;\n if (token.compareTo(\"after\")==0)\n okay=false;\n if (token.compareTo(\"all\")==0)\n okay=false;\n if (token.compareTo(\"almost\")==0)\n okay=false;\n if (token.compareTo(\"also\")==0)\n okay=false;\n if (token.compareTo(\"am\")==0)\n okay=false;\n if (token.compareTo(\"among\")==0)\n okay=false;\n if (token.compareTo(\"an\")==0)\n okay=false;\n if (token.compareTo(\"and\")==0)\n okay=false;\n if (token.compareTo(\"any\")==0)\n okay=false;\n if (token.compareTo(\"are\")==0)\n okay=false;\n if (token.compareTo(\"as\")==0)\n okay=false;\n if (token.compareTo(\"at\")==0)\n okay=false;\n if (token.compareTo(\"be\")==0)\n okay=false;\n if (token.compareTo(\"because\")==0)\n okay=false;\n if (token.compareTo(\"been\")==0)\n okay=false;\n if (token.compareTo(\"but\")==0)\n okay=false;\n if (token.compareTo(\"by\")==0)\n okay=false;\n if (token.compareTo(\"can\")==0)\n okay=false;\n if (token.compareTo(\"cannot\")==0)\n okay=false;\n if (token.compareTo(\"could\")==0)\n okay=false;\n if (token.compareTo(\"dear\")==0)\n okay=false;\n if (token.compareTo(\"did\")==0)\n okay=false;\n if (token.compareTo(\"do\")==0)\n okay=false;\n if (token.compareTo(\"does\")==0)\n okay=false;\n if (token.compareTo(\"either\")==0)\n okay=false;\n if (token.compareTo(\"else\")==0)\n okay=false;\n if (token.compareTo(\"ever\")==0)\n okay=false;\n if (token.compareTo(\"every\")==0)\n okay=false;\n if (token.compareTo(\"for\")==0)\n okay=false;\n if (token.compareTo(\"from\")==0)\n okay=false;\n if (token.compareTo(\"get\")==0)\n okay=false;\n if (token.compareTo(\"got\")==0)\n okay=false;\n if (token.compareTo(\"had\")==0)\n okay=false;\n if (token.compareTo(\"has\")==0)\n okay=false;\n if (token.compareTo(\"have\")==0)\n okay=false;\n if (token.compareTo(\"he\")==0)\n okay=false;\n if (token.compareTo(\"her\")==0)\n okay=false;\n if (token.compareTo(\"hers\")==0)\n okay=false;\n if (token.compareTo(\"him\")==0)\n okay=false;\n if (token.compareTo(\"his\")==0)\n okay=false;\n if (token.compareTo(\"how\")==0)\n okay=false;\n if (token.compareTo(\"however\")==0)\n okay=false;\n if (token.compareTo(\"i\")==0)\n okay=false;\n if (token.compareTo(\"if\")==0)\n okay=false;\n if (token.compareTo(\"in\")==0)\n okay=false;\n if (token.compareTo(\"into\")==0)\n okay=false;\n if (token.compareTo(\"is\")==0)\n okay=false;\n if (token.compareTo(\"it\")==0)\n okay=false;\n if (token.compareTo(\"its\")==0)\n okay=false;\n if (token.compareTo(\"just\")==0)\n okay=false;\n if (token.compareTo(\"least\")==0)\n okay=false;\n if (token.compareTo(\"let\")==0)\n okay=false;\n if (token.compareTo(\"like\")==0)\n okay=false;\n if (token.compareTo(\"likely\")==0)\n okay=false;\n if (token.compareTo(\"may\")==0)\n okay=false;\n if (token.compareTo(\"me\")==0)\n okay=false;\n if (token.compareTo(\"might\")==0)\n okay=false;\n if (token.compareTo(\"most\")==0)\n okay=false;\n if (token.compareTo(\"must\")==0)\n okay=false;\n if (token.compareTo(\"my\")==0)\n okay=false;\n if (token.compareTo(\"neither\")==0)\n okay=false;\n if (token.compareTo(\"no\")==0)\n okay=false;\n if (token.compareTo(\"nor\")==0)\n okay=false;\n if (token.compareTo(\"not\")==0)\n okay=false;\n if (token.compareTo(\"of\")==0)\n okay=false;\n if (token.compareTo(\"off\")==0)\n okay=false;\n if (token.compareTo(\"often\")==0)\n okay=false;\n if (token.compareTo(\"on\")==0)\n okay=false;\n if (token.compareTo(\"only\")==0)\n okay=false;\n if (token.compareTo(\"or\")==0)\n okay=false;\n if (token.compareTo(\"other\")==0)\n okay=false;\n if (token.compareTo(\"our\")==0)\n okay=false;\n if (token.compareTo(\"own\")==0)\n okay=false;\n if (token.compareTo(\"rather\")==0)\n okay=false;\n if (token.compareTo(\"said\")==0)\n okay=false;\n if (token.compareTo(\"say\")==0)\n okay=false;\n if (token.compareTo(\"says\")==0)\n okay=false;\n if (token.compareTo(\"she\")==0)\n okay=false;\n if (token.compareTo(\"should\")==0)\n okay=false;\n if (token.compareTo(\"since\")==0)\n okay=false;\n if (token.compareTo(\"so\")==0)\n okay=false;\n if (token.compareTo(\"some\")==0)\n okay=false;\n if (token.compareTo(\"than\")==0)\n okay=false;\n if (token.compareTo(\"that\")==0)\n okay=false;\n if (token.compareTo(\"the\")==0)\n okay=false;\n if (token.compareTo(\"their\")==0)\n okay=false;\n if (token.compareTo(\"them\")==0)\n okay=false;\n if (token.compareTo(\"then\")==0)\n okay=false;\n if (token.compareTo(\"there\")==0)\n okay=false;\n if (token.compareTo(\"these\")==0)\n okay=false;\n if (token.compareTo(\"they\")==0)\n okay=false;\n if (token.compareTo(\"this\")==0)\n okay=false;\n if (token.compareTo(\"tis\")==0)\n okay=false;\n if (token.compareTo(\"to\")==0)\n okay=false;\n if (token.compareTo(\"too\")==0)\n okay=false;\n if (token.compareTo(\"twas\")==0)\n okay=false;\n if (token.compareTo(\"us\")==0)\n okay=false;\n if (token.compareTo(\"wants\")==0)\n okay=false;\n if (token.compareTo(\"was\")==0)\n okay=false;\n if (token.compareTo(\"we\")==0)\n okay=false;\n if (token.compareTo(\"were\")==0)\n okay=false;\n if (token.compareTo(\"what\")==0)\n okay=false;\n if (token.compareTo(\"when\")==0)\n okay=false;\n if (token.compareTo(\"where\")==0)\n okay=false;\n if (token.compareTo(\"which\")==0)\n okay=false;\n if (token.compareTo(\"while\")==0)\n okay=false;\n if (token.compareTo(\"who\")==0)\n okay=false;\n if (token.compareTo(\"whom\")==0)\n okay=false;\n if (token.compareTo(\"why\")==0)\n okay=false;\n if (token.compareTo(\"will\")==0)\n okay=false;\n if (token.compareTo(\"with\")==0)\n okay=false;\n if (token.compareTo(\"would\")==0)\n okay=false;\n if (token.compareTo(\"yet\")==0)\n okay=false;\n if (token.compareTo(\"you\")==0)\n okay=false;\n if (token.compareTo(\"your\")==0)\n okay=false;\n \n //Stemming process\n if(okay){\n s.add(token.toCharArray(),token.length());\n s.stem();\n token = s.toString();\n }\n \n //to make sure there are no duplicates\n if (tokenList.contains(token))\n okay = false;\n \n //Finalizing tokens\n if (okay)\n tokenList.add(token);\n \n\n }\n //System.out.println(i);\n System.out.println(tokenList.size());\n System.out.println(tokenList);\n readFile.close();\n \n Scanner readFile2 = new Scanner(new File(\"sentences.txt\"));\n \n \n //intializing TDMatrix\n int[][] tdm = new int[46][tokenList.size()];\n int i = 0;\n int j = 0;\n \n while (i<46){\n j=0;\n while (j < tokenList.size()){\n tdm[i][j]=0;\n j++;\n }\n i++;\n }\n \n String str;\n i=0;\n while (readFile2.hasNextLine()) {\n str=readFile2.nextLine();\n \n j=0;\n while (j<tokenList.size()){\n while ((str.contains(tokenList.get(j)))){\n tdm[i][j]++;\n str = str.replaceFirst(tokenList.get(j), \"***\");\n }\n j++;\n }\n \n i++;\n }\n \n i=0;\n while (i<46){\n j=0;\n while (j<tokenList.size()){\n System.out.print(tdm[i][j] + \" \");\n j++;\n }\n System.out.println(\"\");\n i++;\n }\n \n readFile.close();\n }", "public Set<String> getSentences(String input) {\n Set<String> output = new HashSet();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // All the sentences in this document\n List<CoreMap> docSentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n for (CoreMap sentence : docSentences) {\n // traverse words in the current sentence\n output.add(sentence.toString());\n }\n\n return output;\n }", "public List<String> splitWordList(final String text) {\n\t\tList<String> result = new ArrayList<>();\n\t\tif (text == null)\n\t\t\treturn result;\n\n\t\tString t = text + \"⁋\";\n\t\tt = t.replace('\\n', '⁋');\n\t\tt = REFERENCE_PATTERN.matcher(t).replaceAll(\"\");\n\t\tt = SUPERSCRIPT_PATTERN.matcher(t).replaceAll(\"\"); //TODO: Extract sense!\n\t\tt = HTML_REMOVER.matcher(t).replaceAll(\"\");\n\t\tt = t.replace(\"&quot;\", \"\\\"\");\n\t\tt = t.replace(\",\", \"⁋,\");\n\t\tt = t.replace(\";\", \"⁋;\");\n\t\t//System.out.println(t);\n\t\t//t = BRACKETED_DELIMITER.matcher(t).replaceAll(\"$1$2$3$4$5$6\");\n\t\t//t = ESCAPE_DELIMITER1.matcher(t).replaceAll(\"$1$2\");\n\t\t//t = ESCAPE_DELIMITER2.matcher(t).replaceAll(\"$1$2\");\n\t\t//t = ESCAPE_DELIMITER3.matcher(t).replaceAll(\"$1$2\");\n\t\tt = escapeDelimiters(t);\t\t\t\n\t\t//System.out.println(t);\n\t\tt = t.replace(\"⁋;\", \"⁋\");\n\t\tt = t.replace(\"⁋,\", \"⁋\");\n\t\tt = t.replace(\"]] or [[\", \"]]⁋[[\");\n\t\tt = t.replace(\"]] and [[\", \"]]⁋[[\");\n\t\tt = t.replace(\" - \", \"⁋\");\n\t\t//t = t.replace(\" / \", \"⁋\");\n\t\tint j = t.indexOf(\" / \"); // Use ' / ' only as a delimiter if there are at least two of them!\n\t\tif (j >= 0) {\n\t\t\tj = t.indexOf(\" / \", j);\n\t\t\tif (j >= 0) {\n\t\t\t\tt = t.replace(\" / \", \"⁋\");\n\t\t\t\t//System.out.println(t);\n\t\t\t}\n\t\t}\n\t\t//System.out.println(t);\n\t\tint delim;\n\t\tdo {\n\t\t\tdelim = t.indexOf('⁋');\n\t\t\tif (delim >= 0) {\n\t\t\t\tString word = t.substring(0, delim);\n\t\t\t\tif (word.length() > 0) {\n\t\t\t\t\t// Normalize the word.\n\t\t\t\t\tword = word.trim();\n\t\t\t\t\tif (word.toLowerCase().startsWith(\"see also\"))\n\t\t\t\t\t\tword = word.substring(8).trim();\n\t\t\t\t\tif (word.toLowerCase().startsWith(\"see\"))\n\t\t\t\t\t\tword = word.substring(3).trim();\n\t\t\t\t\tif (word.startsWith(\":\"))\n\t\t\t\t\t\tword = word.substring(1).trim();\n\t\t\t\t\tword = deWikify(word).trim();\n\t\t\t\t\tword = removeBrackets(word).trim();\n\t\t\t\t\tword = removeTemplates(word).trim();\n\t\t\t\t\tword = removeComments(word).trim();\n\t\t\t\t\tif (word.toLowerCase().startsWith(\"see also\"))\n\t\t\t\t\t\tword = word.substring(8).trim();\n\t\t\t\t\tif (word.toLowerCase().startsWith(\"see\"))\n\t\t\t\t\t\tword = word.substring(3).trim();\n\t\t\t\t\tif (word.startsWith(\":\"))\n\t\t\t\t\t\tword = word.substring(1).trim();\n\t\t\t\t\tif (word.endsWith(\".\"))\n\t\t\t\t\t\tword = word.substring(0, word.length() - 1).trim();\n\t\t\t\t\tif (word.endsWith(\",\"))\n\t\t\t\t\t\tword = word.substring(0, word.length() - 1).trim();\n\t\t\t\t\t\n\t\t\t\t\t// Check for slashes.\n\t\t\t\t\tword = word.replace(\" / \", \"/\");\n\t\t\t\t\tword = word.replace(\"/ \", \"/\");\n\t\t\t\t\tint i = word.indexOf('/');\n\t\t\t\t\tif (word.length() > 0) {\n\t\t\t\t\t\tif (i >= 0 && word.indexOf(' ') < 0) {\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tresult.add(word.substring(0, i));\n\t\t\t\t\t\t\t\tword = word.substring(i + 1);\n\t\t\t\t\t\t\t\ti = word.indexOf('/');\n\t\t\t\t\t\t\t} while (i >= 0);\n\t\t\t\t\t\t\tresult.add(word);\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tresult.add(word);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tt = t.substring(delim + 1);\n\t\t\t}\n\t\t} while (delim >= 0);\n\t\treturn result;\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t\tList<Paragraph> paragraphs = new ArrayList<Paragraph>();\n\t\tList<Paragraph> paragraphsWithNoSentences = new ArrayList<Paragraph>();\n\t\t\n\t\tScanner sc = null, sc1 = null;\n\t\ttry {\n\t\t\tsc = new Scanner(new File(\"testsearchtext.txt\"));\n\t\t\tsc1 = new Scanner(new File(\"testsearchentity.txt\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsc.useDelimiter(\"[.]\");\n\t\tsc1.useDelimiter(\"[|]\");\n\t\t\n\t\tList<Sentence> sentences = new ArrayList<Sentence>();\n\t\tint sCount = 0;\n\t\tint pCount = 0;\n\t\twhile(sc.hasNext()){\n\t\t\tString temp = sc.next().trim();\n\n\t\t\tif(sCount > 0 && (sCount%10 == 0 || !sc.hasNext())){\n\t\t\t\tParagraph p = new Paragraph(pCount);\n\t\t\t\tparagraphsWithNoSentences.add(p);\n\t\t\t\t\n\t\t\t\tp = new Paragraph(pCount);\n\t\t\t\tp.setSentences(sentences);\n\t\t\t\tparagraphs.add(p);\n\t\t\t\tpCount++;\n\t\t\t\t\n\t\t\t\tsentences = new ArrayList<Sentence>();\n\t\t\t}\n\t\t\t\n\t\t\tif(!temp.equals(\"\"))\n\t\t\t\tsentences.add(new Sentence((sCount%10), temp));\n\t\t\t\n\t\t\tsCount++;\n\t\t}\n\t\t\n\t\tList<Entity> entities = new ArrayList<Entity>();\n\t\tint currType = -1; \n\t\twhile(sc1.hasNext()){\n\t\t\tString temp = sc1.next().trim();\n\t\t\tif(temp.equals(\"place\")){currType = Entity.PLACE;} else\n\t\t\tif(temp.equals(\"url\")){currType = Entity.URL;} else\n\t\t\tif(temp.equals(\"email\")){currType = Entity.EMAIL;} else\n\t\t\tif(temp.equals(\"address\")){currType = Entity.ADDRESS;} \n\t\t\telse{\n\t\t\t\tentities.add(new Entity(currType, temp));\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSource s = new Source(\"testsearchtext.txt\", \"testsearchtext.txt\");\n\t\tpt1 = new ProcessedText(s, paragraphs, null); \n\t\t\n\t\ts = new Source(\"testsearchtext1.txt\", \"testsearchtext1.txt\");\n\t\tpt2 = new ProcessedText(s, paragraphsWithNoSentences, null); \n\t\t\n\t\tpt3 = new ProcessedText();\n\t\tpt3.setParagraphs(paragraphs);\n\t\t\n\t\tpt4 = new ProcessedText();\n\t\ts = new Source(\"testsearchtext2.txt\", \"testsearchtext2.txt\");\n\t\tpt4.setMetadata(s);\n\t\t\n\t\ts = new Source(\"testsearchtext3.txt\", \"testsearchtext3.txt\");\n\t\tpt5 = new ProcessedText(s, paragraphs, entities); \n\t\t\n\t\ts = new Source(\"testsearchtext4.txt\", \"testsearchtext4.txt\");\n\t\tpt6 = new ProcessedText(s, null, entities); \n\t}", "default Stream<CharSequence> parseTextToWords(CharSequence text) {\n return toSentences(text).filter(s -> s.length() > 0).flatMap(this::toWords);\n }", "public static String split(String sentence) {\n StringBuilder result = new StringBuilder();\n int i = 0; // use for create lines <= 4 words\n for (String word : sentence.split(\" \")) {\n result.append(word).append(\" \");\n ++i;\n if (i == 4) {\n result.append(\"\\n\");\n i = 0;\n }\n }\n return result.toString();\n }", "public static List<String> devideSentenceIntoWords(String sentence) {\n\n String[] wordArray = sentence.toLowerCase().split(\" \");\n return Arrays.stream(wordArray)\n .map(String::trim)\n .filter(w -> !w.replace(CharacterUtils.WORD_DEVIDER, \"\").trim().isEmpty())\n .collect(Collectors.toList());\n }", "@Override\n\tprotected Map<Object, Object> rawTextParse(CharSequence text) {\n\n\t\tStanfordCoreNLP pipeline = null;\n\t\ttry {\n\t\t\tpipeline = pipelines.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tAnnotation document = new Annotation(text.toString());\n\t\tpipeline.annotate(document);\n\t\tMap<Object, Object> sentencesMap = new LinkedHashMap<Object, Object>();//maintain sentence order\n\t\tint id = 0;\n\t\tList<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n\t\tfor (CoreMap sentence : sentences) {\n\t\t\tStringBuilder processedText = new StringBuilder();\n\t\t\tfor (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n\t\t\t\tString word = token.get(CoreAnnotations.TextAnnotation.class);\n\t\t\t\tString lemma = token.get(CoreAnnotations.LemmaAnnotation.class);\n\t\t\t\tString pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n\t\t\t\t//todo this should really happen after parsing is done, because using lemmas might confuse the parser\n\t\t\t\tif (config().isUseLowercaseEntries()) {\n\t\t\t\t\tword = word.toLowerCase();\n\t\t\t\t\tlemma = lemma.toLowerCase();\n\t\t\t\t}\n\t\t\t\tif (config().isUseLemma()) {\n\t\t\t\t\tword = lemma;\n\t\t\t\t}\n\t\t\t\tprocessedText.append(word).append(POS_DELIMITER).append(lemma).append(POS_DELIMITER).append(pos).append(TOKEN_DELIM);\n //inserts a TOKEN_DELIM at the end too\n\t\t\t}\n\t\t\tsentencesMap.put(id, processedText.toString().trim());//remove the single trailing space\n\t\t\tid++;\n\t\t}\n\t\ttry {\n\t\t\tpipelines.put(pipeline);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn sentencesMap;\n\t}", "boolean getIsEndOfSentence();", "Stream<CharSequence> toWords(CharSequence sentence);", "public List<String> getAllSentences(String input) {\n List<String> output = new ArrayList();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // All the sentences in this document\n List<CoreMap> docSentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n for (CoreMap sentence : docSentences) {\n // traverse words in the current sentence\n output.add(sentence.toString());\n }\n\n return output;\n }", "private void textilizeNonBlankLine () {\n StringBuffer blockMod = new StringBuffer();\n int startPosition = 0;\n int textPosition = 0;\n leftParenPartOfURL = false;\n attributeType = 0;\n klass = new StringBuffer();\n id = new StringBuffer();\n style = new StringBuffer();\n language = new StringBuffer();\n String imageTitle = \"\";\n String imageURL = \"\";\n int endOfImageURL = -1;\n boolean doublePeriod = false;\n int periodPosition = line.indexOf (\".\");\n if (periodPosition >= 0) {\n textPosition = periodPosition + 1;\n if (textPosition < line.length()) {\n if (line.charAt (textPosition) == '.') {\n doublePeriod = true;\n textPosition++;\n }\n if (textPosition < line.length()\n && line.charAt (textPosition) == ' ') {\n textPosition++;\n textIndex = 0;\n while (textIndex < periodPosition\n && (Character.isLetterOrDigit (textChar()))) {\n blockMod.append (textChar());\n textIndex++;\n } // end while more letters and digits\n if (blockMod.toString().equals (\"p\")\n || blockMod.toString().equals (\"bq\")\n || blockMod.toString().equals (\"h1\")\n || blockMod.toString().equals (\"h2\")\n || blockMod.toString().equals (\"h3\")\n || blockMod.toString().equals (\"h4\")\n || blockMod.toString().equals (\"h5\")\n || blockMod.toString().equals (\"h6\")) {\n // look for attributes\n collectAttributes (periodPosition);\n } else {\n blockMod = new StringBuffer();\n textPosition = 0;\n }\n } // end if space follows period(s)\n } // end if not end of line following first period\n } // end if period found\n\n // Start processing at the beginning of the line\n textIndex = 0;\n\n // If we have a block modifier, then generate appropriate HTML\n if (blockMod.length() > 0) {\n lineDelete (textPosition);\n closeOpenBlockQuote();\n closeOpenBlock();\n doLists();\n if (blockMod.toString().equals (\"bq\")) {\n lineInsert (\"<blockquote><p\");\n context.blockQuoting = true;\n } else {\n lineInsert (\"<\" + blockMod.toString());\n }\n if (klass.length() > 0) {\n lineInsert (\" class=\\\"\" + klass.toString() + \"\\\"\");\n }\n lineInsert (\">\");\n if (doublePeriod) {\n context.nextBlock = blockMod.toString();\n } else {\n context.nextBlock = \"p\";\n }\n }\n\n // See if line starts with one or more list characters\n if (blockMod.length() <= 0) {\n while (textIndex < line.length()\n && (textChar() == '*'\n || textChar() == '#'\n || textChar() == ';')) {\n listChars.append (textChar());\n textIndex++;\n }\n if (listChars.length() > 0\n && (textIndex >= line.length()\n || ((! Character.isWhitespace (textChar()))\n && (textChar() != '(')))) {\n listChars = new StringBuffer();\n textIndex = 0;\n }\n int firstSpace = line.indexOf (\" \", textIndex);\n if (listChars.length() > 0) {\n collectAttributes (firstSpace);\n }\n }\n int endDelete = textIndex;\n if (endDelete < line.length()\n && Character.isWhitespace (line.charAt (endDelete))) {\n endDelete++;\n }\n\n if (listChars.length() > 0) {\n lineDelete (0, endDelete);\n }\n doLists();\n if (listChars.length() > 0\n && listChars.charAt(listChars.length() - 1) == ';') {\n lastDefChar = ';';\n } else {\n lastDefChar = ' ';\n }\n\n // See if this line contains a link alias\n if ((blockMod.length() <= 0)\n && ((line.length() - textIndex) >= 4)\n && (textChar() == '[')) {\n int rightBracketIndex = line.indexOf (\"]\", textIndex);\n if (rightBracketIndex > (textIndex + 1)) {\n linkAlias = true;\n String alias = line.substring (textIndex + 1, rightBracketIndex);\n String url = line.substring (rightBracketIndex + 1);\n lineDelete (line.length() - textIndex);\n lineInsert (\"<a alias=\\\"\" + alias + \"\\\" href=\\\"\" + url + \"\\\"> </a>\");\n }\n }\n\n // If no other instructions, use default start for a new line\n if (blockMod.length() <= 0 \n && listChars.length() <= 0\n & (! linkAlias)) {\n // This non-blank line does not start with a block modifier or a list char\n if (context.lastLineBlank) {\n if (context.nextBlock.equals (\"bq\")) {\n lineInsert (\"<p>\");\n } else {\n closeOpenBlockQuote();\n lineInsert (\"<\" + context.nextBlock + \">\");\n }\n } else {\n lineInsert (\"<br />\");\n }\n }\n\n // Now examine the rest of the line\n char last = ' ';\n char c = ' ';\n char next = ' ';\n leftParenPartOfURL = false;\n resetLineIndexArray();\n while (textIndex <= line.length()) {\n // Get current character, last character and next character\n last = c;\n if (textIndex < line.length()) {\n c = textChar();\n } else {\n c = ' ';\n }\n if ((textIndex + 1) < line.length()) {\n next = line.charAt (textIndex + 1);\n } else {\n next = ' ';\n }\n \n // ?? means a citation\n if (c == '?' && last == '?') {\n if (ix [CITATION] >= 0) {\n replaceWithHTML (CITATION, 2);\n } else {\n ix [CITATION] = textIndex - 1;\n textIndex++;\n }\n }\n else\n // __ means italics\n if (c == '_' && last == '_' && ix [QUOTE_COLON] < 0) {\n if (ix [ITALICS] >= 0) {\n replaceWithHTML (ITALICS, 2);\n } else {\n ix [ITALICS] = textIndex - 1;\n textIndex++;\n }\n }\n else\n // ** means bold\n if (c == '*' && last == '*') {\n if (ix [BOLD] >= 0) {\n replaceWithHTML (BOLD, 2);\n } else {\n ix [BOLD] = textIndex - 1;\n textIndex++;\n }\n }\n else\n // _ means emphasis\n if (c == '_' && next != '_' && ix [QUOTE_COLON] < 0) {\n if (ix [EMPHASIS] >= 0) {\n replaceWithHTML (EMPHASIS, 1);\n } else {\n ix [EMPHASIS] = textIndex;\n textIndex++;\n }\n }\n else\n // * means strong\n if (c == '*' && next != '*') {\n if (ix [STRONG] >= 0) {\n replaceWithHTML (STRONG, 1);\n } else {\n ix [STRONG] = textIndex;\n textIndex++;\n }\n }\n else\n // Exclamation points surround image urls\n if (c == '!' && Character.isLetter(next)\n && ix [QUOTE_COLON] < 0 && ix [EXCLAMATION] < 0) {\n // First exclamation point : store its location and move on\n ix [EXCLAMATION] = textIndex;\n textIndex++;\n }\n else\n // Second exclamation point\n if (c == '!'\n && ix [QUOTE_COLON] < 0 && ix [EXCLAMATION] >= 0) {\n // Second exclamation point\n imageTitle = \"\";\n endOfImageURL = textIndex;\n if (last == ')' && ix [EXCLAMATION_LEFT_PAREN] > 0) {\n ix [EXCLAMATION_RIGHT_PAREN] = textIndex - 1;\n endOfImageURL = ix [EXCLAMATION_LEFT_PAREN];\n imageTitle = line.substring\n (ix [EXCLAMATION_LEFT_PAREN] + 1, ix [EXCLAMATION_RIGHT_PAREN]);\n }\n imageURL = line.substring (ix [EXCLAMATION] + 1, endOfImageURL);\n // Delete the image url, title and parentheses,\n // but leave exclamation points for now.\n lineDelete (ix [EXCLAMATION] + 1, textIndex - ix [EXCLAMATION] - 1);\n String titleString = \"\";\n if (imageTitle.length() > 0) {\n titleString = \" title=\\\"\" + imageTitle + \"\\\" alt=\\\"\" + imageTitle + \"\\\"\";\n }\n lineInsert (ix [EXCLAMATION] + 1,\n \"<img src=\\\"\" + imageURL + \"\\\"\" + titleString + \" />\");\n if (next == ':') {\n // Second exclamation followed by a colon -- look for url for link\n ix [QUOTE_COLON] = textIndex;\n ix [LAST_QUOTE] = ix [EXCLAMATION];\n } else {\n lineDelete (ix [EXCLAMATION], 1);\n lineDelete (textIndex, 1);\n }\n ix [EXCLAMATION] = -1;\n ix [EXCLAMATION_LEFT_PAREN] = -1;\n ix [EXCLAMATION_RIGHT_PAREN] = -1;\n textIndex++;\n } // end if second exclamation point\n else\n // Parentheses within exclamation points enclose the image title\n if (c == '(' && ix [EXCLAMATION] > 0 ) {\n ix [EXCLAMATION_LEFT_PAREN] = textIndex;\n textIndex++;\n }\n else\n // Double quotation marks surround linked text\n if (c == '\"' && ix [QUOTE_COLON] < 0) {\n if (next == ':'\n && ix [LAST_QUOTE] >= 0\n && textIndex > (ix [LAST_QUOTE] + 1)) {\n ix [QUOTE_COLON] = textIndex;\n } else {\n ix [LAST_QUOTE] = textIndex;\n }\n textIndex++;\n }\n else\n // Flag a left paren inside of a url\n if (c == '(' && ix [QUOTE_COLON] > 0) {\n leftParenPartOfURL = true;\n textIndex++;\n }\n else\n // Space may indicate end of url\n if (Character.isWhitespace (c)\n && ix [QUOTE_COLON] > 0\n && ix [LAST_QUOTE] >= 0\n && textIndex > (ix [QUOTE_COLON] + 2)) {\n int endOfURL = textIndex - 1;\n // end of url is last character of url\n // do not include any trailing punctuation at end of url\n int backup = 0;\n while ((endOfURL > (ix [QUOTE_COLON] + 2))\n && (! Character.isLetterOrDigit (line.charAt(endOfURL)))\n && (! ((line.charAt(endOfURL) == ')') && (leftParenPartOfURL)))\n && (! (line.charAt(endOfURL) == '/'))) {\n endOfURL--;\n backup++;\n }\n String url = line.substring (ix [QUOTE_COLON] + 2, endOfURL + 1);\n // insert the closing anchor tag\n lineInsert (endOfURL + 1, \"</a>\");\n // Delete the quote, colon and url from the line\n lineDelete (ix [QUOTE_COLON], endOfURL + 1 - ix [QUOTE_COLON]);\n // insert the beginning of the anchor tag\n lineDelete (ix [LAST_QUOTE], 1);\n lineInsert (ix [LAST_QUOTE], \"<a href=\\\"\" + url + \"\\\">\");\n // Reset the pointers\n ix [QUOTE_COLON] = -1;\n ix [LAST_QUOTE] = -1;\n leftParenPartOfURL = false;\n // Increment the index to the next character\n if (backup > 0) {\n textIndex = textIndex - backup;\n } else {\n textIndex++;\n }\n }\n else\n // Look for start of definition\n if ((c == ':' || c == ';')\n && Character.isWhitespace(last)\n && Character.isWhitespace(next)\n && listChars.length() > 0\n && (lastDefChar == ';' || lastDefChar == ':')) {\n lineDelete (textIndex - 1, 3);\n lineInsert (closeDefinitionTag (lastDefChar)\n + openDefinitionTag (c));\n lastDefChar = c;\n }\n /* else\n // -- means an em dash\n if (c == '-' && last == '-') {\n textIndex--;\n lineDelete (2);\n lineInsert (\"&#8212;\");\n } */ else {\n textIndex++;\n }\n }// end while more characters to examine\n\n context.lastLineBlank = false;\n\n }", "private String compactDescription(String sentence) {\n if (StringUtils.isNotEmpty(sentence)) {\n if (StringUtils.contains(sentence, \".\")) {\n return StringUtils.substringBefore(sentence, \".\") + \".\";\n } else {\n return sentence;\n }\n }\n return sentence;\n }", "java.lang.String getNewSentence();", "private void splitText(ArrayList<TextLayout> chunks, String str){\n if(str.length() == 0){\n str = \" \";\n }\n FontRenderContext frc = getFontRenderContext();\n TextLayout textLayout = new TextLayout(str,\n TEXT_FONT, frc);\n Rectangle2D textRect = textLayout.getBounds();\n // does text need to be split?\n if(textRect.getWidth() > TEXT_WIDTH){\n\n AttributedString asText = new AttributedString(str);\n asText.addAttribute(TextAttribute.FONT, TEXT_FONT);\n AttributedCharacterIterator asItr = asText.getIterator();\n\n int start = asItr.getBeginIndex();\n int end = asItr.getEndIndex();\n\n LineBreakMeasurer line = new LineBreakMeasurer(asItr, frc);\n line.setPosition(start);\n // Get lines from lineMeasurer until the entire\n // paragraph has been displayed.\n while (line.getPosition() < end) {\n\n // Retrieve next layout.\n // width = maximum line width\n TextLayout layout = line.nextLayout(TEXT_WIDTH);\n chunks.add(layout);\n }\n }\n else{\n chunks.add(textLayout);\n }\n }", "private static boolean[] splitIntoTokens (String blockString, int blockStart, boolean lastBlock) {\n\tchar[] block = blockString.toCharArray();\n\tint blockLength = block.length;\n\tboolean[] newToken = new boolean[blockLength+1];\n\tnewToken[blockLength] = true;\n\t// except for \".\" , make any non-alphanumeric a separate token\n\tfor (int i=0; i<blockLength; i++) {\n\t\tchar c = block[i];\n\t\tif (!(Character.isLetterOrDigit(c) || c =='.')) {\n\t\t\tnewToken[i] = true;\n\t\t\tnewToken[i+1] = true;\n\t\t}\n\t}\n\t// make ``, '', --, and ... single tokens\n\tfor (int i=0; i<blockLength-1; i++) {\n\t\tchar c = block[i];\n\t\tif ((c == '`' || c == '\\'' || c == '-') && c == block[i+1]\n\t\t && newToken[i]) {\n\t\t\tnewToken[i+1] = false;\n\t\t}\n\t}\n\tfor (int i=0; i<blockLength-2; i++) {\n\t\tif (block[i] == '.' && block[i+1] == '.' &&\n\t\t block[i+2] == '.' && newToken[i]) {\n\t\t\tnewToken[i+1] = false;\n\t\t\tnewToken[i+2] = false;\n\t\t}\n\t}\n\t// make comma a separate token unless surrounded by digits\n\tfor (int i=1; i<blockLength-2; i++) {\n\t\tif (block[i] == ',' && Character.isDigit(block[i-1]) &&\n\t\t Character.isDigit(block[i+1])) {\n\t\t\tnewToken[i] = false;\n\t\t\tnewToken[i+1] = false;\n\t\t}\n\t}\n\t// make period a separate token if this is the last block\n\t// [of a sentence] and the period is final or followed by [\"'}>)] or ''\n\t// Note that this may split off the period even if the token is an\n\t// abbreviation.\n\tif (lastBlock) {\n\t\tif (block[blockLength-1] == '.') {\n\t\t\tnewToken[blockLength-1] = true;\n\t\t} else if (blockLength > 1 && block[blockLength-2] == '.' &&\n\t\t \"\\\"'}>)\".indexOf(block[blockLength-1]) >= 0) {\n\t\t newToken[blockLength-2] = true;\n\t\t} else if (blockLength > 2 && block[blockLength-3] == '.' &&\n\t\t block[blockLength-2] == '\\'' &&\n\t\t block[blockLength-1] == '\\'') {\n\t\t newToken[blockLength-3] = true;\n\t\t}\n\t}\n\t// split off standard 2 and 3-character suffixes ('s, n't, 'll, etc.)\n\tfor (int i=0; i<blockLength-2; i++) {\n\t\tif (newToken[i+3] && suffixes3.contains(blockString.substring(i,i+3))){\n\t\t\tnewToken[i] = true;\n\t\t\tnewToken[i+1] = false;\n\t\t\tnewToken[i+2] = false;\n\t\t}\n\t}\n\tfor (int i=0; i<blockLength-1; i++) {\n\t\tif (newToken[i+2] && suffixes2.contains(blockString.substring(i,i+2))){\n\t\t\tnewToken[i] = true;\n\t\t\tnewToken[i+1] = false;\n\t\t}\n\t}\n\t// make &...; a single token (probable XML escape sequence)\n\tfor (int i=0; i<blockLength-1; i++) {\n\t\tif (block[i] == '&') {\n\t\t\tfor (int j=i+1; j<blockLength; j++) {\n\t\t\t\tif (block[j] == ';') {\n\t\t\t\t\tfor (int k=i+1; k<=j; k++) {\n\t\t\t\t\t\tnewToken[k] = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfor (int i=0; i<blockLength; i++) {\n\t\tInteger tokenEnd = specialTokenEnd.get(blockStart + i);\n\t\tif (tokenEnd != null) {\n\t\t\tnewToken[i] = true;\n\t\t\tfor (int j=i+1; j<blockLength && j+blockStart < tokenEnd; j++) {\n\t\t\t\tnewToken[j] = false;\n\t\t\t}\n\t\t}\n\t}\n\treturn newToken;\n}", "private String composeMarkedSentence(String source) {\n \tString charstates=\"\";\r\n \ttry{\r\n \t\tint ct=0;\r\n \t\tStatement stmt = conn.createStatement();\r\n \t\tStatement stmt1 = conn.createStatement();\r\n \t\tStatement stmt2 = conn.createStatement();\r\n\t ResultSet rs = stmt.executeQuery(\"select * from marked_simpleseg where source='\"+source+\"'\");\r\n\t \twhile(rs.next()){\r\n\t \t\tct+=1;\r\n\t \t}\r\n\t\t\tif(ct==1){\r\n\t\t\t\tResultSet rs1 = stmt1.executeQuery(\"select * from marked_simpleseg where source='\"+source+\"'\");\r\n\t\t\t\twhile(rs1.next()){\r\n\t\t\t\t\tString str=rs1.getString(3);\r\n\t\t\t\t\tPattern pattern1 = Pattern.compile(\"[a-zA-Z\\\\_]+=\\\"[\\\\w±\\\\+\\\\–\\\\-\\\\.:/\\\\_;x´X\\\\×\\\\s,]+\\\"\");\r\n\t \tMatcher matcher = pattern1.matcher(str);\r\n\t \twhile ( matcher.find()){\r\n\t \t\tint i=matcher.start();\r\n\t \t\tint j=matcher.end();\r\n\t \t\tcharstates=charstates.concat(str.subSequence(i,j).toString()+\" \");\r\n\t }\r\n\t \tmatcher.reset();\r\n\t\t\t\t}\r\n\t\t\t\thasSeg = 0;\r\n\t\t\t}\r\n\t\t\telse if(ct>1){\r\n\t\t\t\tResultSet rs2 = stmt2.executeQuery(\"select * from marked_simpleseg where source='\"+source+\"'\");\r\n\t\t\t\twhile(rs2.next()){\r\n\t\t\t\t\tcharstates=charstates.concat(rs2.getString(3));\r\n\t\t\t\t}\r\n\t\t\t\thasSeg = 1;\r\n\t\t\t}\r\n \t}catch (Exception e)\r\n {\r\n \t\tStringWriter sw = new StringWriter();PrintWriter pw = new PrintWriter(sw);e.printStackTrace(pw);LOGGER.error(ApplicationUtilities.getProperty(\"CharaParser.version\")+System.getProperty(\"line.separator\")+sw.toString());\r\n }\r\n \treturn charstates;\r\n\t}", "private Spannable applyWordMarkup(String text) {\n SpannableStringBuilder ssb = new SpannableStringBuilder();\n int languageCodeStart = 0;\n int untranslatedStart = 0;\n\n int textLength = text.length();\n for (int i = 0; i < textLength; i++) {\n char c = text.charAt(i);\n if (c == '.') {\n if (++i < textLength) {\n c = text.charAt(i);\n if (c == '.') {\n ssb.append(c);\n } else if (c == 'c') {\n languageCodeStart = ssb.length();\n } else if (c == 'C') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.language_code_tag),\n languageCodeStart, ssb.length(), 0);\n languageCodeStart = ssb.length();\n } else if (c == 'u') {\n untranslatedStart = ssb.length();\n } else if (c == 'U') {\n ssb.setSpan(new TextAppearanceSpan(BrowseWordsActivity.this,\n R.style.untranslated_word),\n untranslatedStart, ssb.length(), 0);\n untranslatedStart = ssb.length();\n } else if (c == '0') {\n Resources res = getResources();\n ssb.append(res.getString(R.string.no_translations));\n }\n }\n } else\n ssb.append(c);\n }\n\n return ssb;\n }", "public abstract void overallSentences(long ms, int n);", "@Override\n\tprotected void testForTrailingText() {\n\t\tif (this.thisSentence.length() > 0) {\n\t\t\tthis.trailingSentence = true;\n\t\t\tsaveToken();\n\t\t\tsaveSentence();\n\t\t} else {\n\t\t\t//The tentative sentence must be saved (and cleared) - Notify the processor of this new sentence\n\t\t\tgetProcessor().processNlSentence(this.tentativeSentence);\n\t\t\tthis.tentativeSentence = null;\n\t\t}\n\t}", "@Override\n\tprotected void handleSingleQuote() {\n\n\t\tif (this.trackSingleQuotes) {\n\t\t\tboolean ignoreThisQuote = false;\n\n\t\t\tif (!this.inSingleQuotes) {\n\t\t\t\tif (!this.lastCharTokenDelim) {\n\t\t\t\t\t//We are not in single quotes and the last character was not a word delimiter...\n\t\t\t\t\t//This is therefore probably an apostrophe and should be ignored\n\t\t\t\t\tignoreThisQuote = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!ignoreThisQuote) {\n\t\t\t\tthis.inQuotes = !this.inQuotes;\n\t\t\t}\n\n\t\t\t//If no longer in single quotes this indicates the end of a sentence if the last char was a sentence delimiter\n\t\t\tif (!ignoreThisQuote && !this.inSingleQuotes) {\n\t\t\t\ttestForQuotedEndOfSentence();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\npublic Object produceValue(Annotation np, Document doc)\r\n{\n SortedSet<Integer> quoteLocations = new TreeSet<Integer>();\r\n Pattern p = Pattern.compile(\"\\\"|''|``|\\u201C|\\u201D\");\r\n\r\n String text = doc.getText();\r\n Matcher m = p.matcher(text);\r\n\r\n boolean inQuote = false;\r\n while (m.find()) {\r\n int start = m.start();\r\n if (inQuote && (text.substring(start).startsWith(\"``\") || text.substring(start).startsWith(\"\\u201C\"))) {\r\n // We have an opening quote; Make sure the previous quote is closed\r\n quoteLocations.add((start - 1));\r\n inQuote = false;\r\n }\r\n quoteLocations.add((start));\r\n inQuote = !inQuote;\r\n }\r\n // System.out.println(\"Quote locations: \"+quoteLocations);\r\n\r\n // Figure out which noun corresponds to which quote\r\n AnnotationSet sent = doc.getAnnotationSet(Constants.SENT);\r\n Iterator<Integer> quoteIter = quoteLocations.iterator();\r\n HashMap<Integer, Annotation> reporters = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> companies = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> sentReporter = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> compReporter = new HashMap<Integer, Annotation>();\r\n int counter = 1;\r\n while (quoteIter.hasNext()) {\r\n int qStart = quoteIter.next();\r\n if (!quoteIter.hasNext()) {\r\n break;\r\n }\r\n int qEnd = quoteIter.next() + 1;\r\n\r\n AnnotationSet sentences = sent.getOverlapping(qStart, qEnd);\r\n\r\n // Three cases for the size of the sentences set\r\n Annotation match, compMatch;\r\n if (sentences.size() < 1) {\r\n System.out.println(\"Quote is not covered by any sentence:\");\r\n int beg = qStart - 15;\r\n beg = beg < 0 ? 0 : beg;\r\n int en = qStart + 15;\r\n en = en >= text.length() ? text.length() - 1 : en;\r\n System.out.println(Utils.getAnnotText(beg, en, text));\r\n System.out.println(\"Position \" + qStart);\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n // throw new RuntimeException(\"Quote is not covered by any sentence\");\r\n }\r\n else if (sentences.size() == 1) {\r\n Annotation s = sentences.getFirst();\r\n // System.out.println(\"Sent: \"+Utils.getAnnotText(s, text));\r\n if (s.properCovers(qStart, qEnd)) {\r\n match = findReporter(qStart, qEnd, s, doc);\r\n compMatch = findCompany(qStart, qEnd, s, doc);\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n }\r\n else {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n sentReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), compMatch);\r\n }\r\n else {\r\n // The quoted string spans more than one sentence.\r\n Annotation beg = sentences.getFirst();\r\n // System.out.println(\"First sent: \"+Utils.getAnnotText(beg, text));\r\n Annotation end = sentences.getLast();\r\n // System.out.println(\"Last sent: \"+Utils.getAnnotText(end, text));\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n if (beg.getStartOffset() < qStart) {\r\n match = findReporter(qStart, qEnd, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, beg, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot()) && qEnd < end.getEndOffset()) {\r\n match = findReporter(qStart, qEnd, end, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n sentReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), match);\r\n sentReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), compMatch);\r\n compReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), compMatch);\r\n\r\n }\r\n reporters.put(counter, match);\r\n companies.put(counter, compMatch);\r\n counter += 2;\r\n\r\n // System.out.println(\"Quote: \"+Utils.getAnnotText(qStart, qEnd, text));\r\n // if(!match.equals(Annotation.getNullAnnot())){\r\n // System.out.println(\"Match: \"+Utils.getAnnotText(match, text));\r\n // }else{\r\n // System.out.println(\"no match!\");\r\n // }\r\n }\r\n int initial = quoteLocations.size();\r\n\r\n AnnotationSet nps = doc.getAnnotationSet(Constants.NP);\r\n for (Annotation a : nps.getOrderedAnnots()) {\r\n int s = a.getStartOffset();\r\n quoteLocations = quoteLocations.tailSet(s);\r\n int numQuotes = initial - quoteLocations.size();\r\n\r\n // System.err.println(numQuotes);\r\n if (numQuotes % 2 == 0) {\r\n a.setProperty(this, -1);\r\n a.setProperty(Property.AUTHOR, Annotation.getNullAnnot());\r\n a.setProperty(Property.COMP_AUTHOR, Annotation.getNullAnnot());\r\n }\r\n else {\r\n a.setProperty(this, numQuotes);\r\n a.setProperty(Property.AUTHOR, reporters.get(numQuotes));\r\n a.setProperty(Property.COMP_AUTHOR, companies.get(numQuotes));\r\n // if(FeatureUtils.isPronoun(a, annotations, text)&&FeatureUtils.getPronounPerson(FeatureUtils.getText(a,\r\n // text))==1\r\n // &&FeatureUtils.NumberEnum.SINGLE.equals(FeatureUtils.getNumber(a, annotations, text))){\r\n // Annotation repo = reporters.get(new Integer(numQuotes));\r\n // if(repo==null||repo.equals(Annotation.getNullAnnot())){\r\n // Annotation thisSent = sent.getOverlapping(a).getFirst();\r\n // System.out.println(\"*** No author in \"+Utils.getAnnotText(thisSent, text+\"***\"));\r\n // }\r\n // }\r\n }\r\n }\r\n // System.out.println(\"End of inquote\");\r\n\r\n return np.getProperty(this);\r\n}", "private static List<String> simpleTokenize (String text) {\r\n\r\n // Do the no-brainers first\r\n String splitPunctText = splitEdgePunct(text);\r\n\r\n int textLength = splitPunctText.length();\r\n \r\n // BTO: the logic here got quite convoluted via the Scala porting detour\r\n // It would be good to switch back to a nice simple procedural style like in the Python version\r\n // ... Scala is such a pain. Never again.\r\n\r\n // Find the matches for subsequences that should be protected,\r\n // e.g. URLs, 1.0, U.N.K.L.E., 12:53\r\n Matcher matches = Protected.matcher(splitPunctText);\r\n //Storing as List[List[String]] to make zip easier later on \r\n List<List<String>> bads = new ArrayList<List<String>>();\t//linked list?\r\n List<Pair<Integer,Integer>> badSpans = new ArrayList<Pair<Integer,Integer>>();\r\n while(matches.find()){\r\n // The spans of the \"bads\" should not be split.\r\n if (matches.start() != matches.end()){ //unnecessary?\r\n List<String> bad = new ArrayList<String>(1);\r\n bad.add(splitPunctText.substring(matches.start(),matches.end()));\r\n bads.add(bad);\r\n badSpans.add(new Pair<Integer, Integer>(matches.start(),matches.end()));\r\n }\r\n }\r\n\r\n // Create a list of indices to create the \"goods\", which can be\r\n // split. We are taking \"bad\" spans like \r\n // List((2,5), (8,10)) \r\n // to create \r\n /// List(0, 2, 5, 8, 10, 12)\r\n // where, e.g., \"12\" here would be the textLength\r\n // has an even length and no indices are the same\r\n List<Integer> indices = new ArrayList<Integer>(2+2*badSpans.size());\r\n indices.add(0);\r\n for(Pair<Integer,Integer> p:badSpans){\r\n indices.add(p.first);\r\n indices.add(p.second);\r\n }\r\n indices.add(textLength);\r\n\r\n // Group the indices and map them to their respective portion of the string\r\n List<List<String>> splitGoods = new ArrayList<List<String>>(indices.size()/2);\r\n for (int i=0; i<indices.size(); i+=2) {\r\n String goodstr = splitPunctText.substring(indices.get(i),indices.get(i+1));\r\n List<String> splitstr = Arrays.asList(goodstr.trim().split(\" \"));\r\n splitGoods.add(splitstr);\r\n }\r\n\r\n // Reinterpolate the 'good' and 'bad' Lists, ensuring that\r\n // additonal tokens from last good item get included\r\n List<String> zippedStr= new ArrayList<String>();\r\n int i;\r\n for(i=0; i < bads.size(); i++) {\r\n zippedStr = addAllnonempty(zippedStr,splitGoods.get(i), true);\r\n zippedStr = addAllnonempty(zippedStr,bads.get(i), false);\r\n }\r\n zippedStr = addAllnonempty(zippedStr,splitGoods.get(i), true);\r\n \r\n // BTO: our POS tagger wants \"ur\" and \"you're\" to both be one token.\r\n // Uncomment to get \"you 're\"\r\n /*ArrayList<String> splitStr = new ArrayList<String>(zippedStr.size());\r\n for(String tok:zippedStr)\r\n \tsplitStr.addAll(splitToken(tok));\r\n zippedStr=splitStr;*/\r\n \r\n return zippedStr;\r\n }", "private static String spellPunctuation(String string) {\n\t\tchar[] in = string.toCharArray();\n\t\tStringBuilder out = new StringBuilder();\n\t\t\n\t\tchar b = 0; //previous\n\t\tchar c = 0; //current\n\t\tchar d = 0; //next\n\t\tint n = in.length;\n\t\t\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tc = in[i];\n\t\t\t\n\t\t\tif (i+1 < n) {\n\t\t\t\td = in[i+1];\n\t\t\t}\n\t\t\t\n\t\t\tswitch (c) {\n\t\t\t\tcase ',':\n\t\t\t\t\tif (d != ' ') {\n\t\t\t\t\t\tout.append(\" comma \");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tout.append(\" comma\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '.':\n\t\t\t\t\tif (d == ' ') { //skip periods at the end of sentences\n\t\t\t\t\t\t//skip\n\t\t\t\t\t}\n\t\t\t\t\telse { //keep number with a decimal intact\n\t\t\t\t\t\tout.append(c);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase ';':\n\t\t\t\t\tout.append(\" semicolon\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase ':':\n\t\t\t\t\tout.append(\" colon\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\\u201c':\n\t\t\t\t\tout.append(\"begin quote \");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\\u201d':\n\t\t\t\t\tout.append(\" end quote\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\"':\n\t\t\t\t\tif (b == ' ') { //previous is space; start string\n\t\t\t\t\t\tout.append(\"begin quote \");\n\t\t\t\t\t}\n\t\t\t\t\telse if (c == ' ') { //next is space; end string\n\t\t\t\t\t\tout.append(\" end quote\");\n\t\t\t\t\t}\n\t\t\t\t\telse { //mid-word\n\t\t\t\t\t\tout.append(\" double quote \");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '\\'': //single quote\n\t\t\t\tcase '\\u2019': //apostrophe\n\t\t\t\t\tif (b == ' ') { //previous is space; start string\n\t\t\t\t\t\tout.append(\"begin quote \");\n\t\t\t\t\t}\n\t\t\t\t\telse if (c == ' ') { //next is space; end string\n\t\t\t\t\t\tout.append(\" end quote\");\n\t\t\t\t\t}\n\t\t\t\t\telse { //mid-word\n\t\t\t\t\t\t//contraction apostrophe is ignored; don't -> dont\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '%':\n\t\t\t\t\tout.append(\" percent\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tout.append(c);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tb = c;\n\t\t}\n\t\t\n\t\treturn out.toString();\n\t}", "public void testGetComplexText() throws Exception {\n \t\tXWPFWordExtractor extractor = \n \t\t\tnew XWPFWordExtractor(xmlB);\n \t\textractor.getText();\n \t\t\n \t\tString text = extractor.getText();\n \t\tassertTrue(text.length() > 0);\n \t\t\n \t\tchar euro = '\\u20ac';\n \t\tSystem.err.println(\"'\"+text.substring(text.length() - 20) + \"'\");\n \t\t\n \t\t// Check contents\n \t\tassertTrue(text.startsWith(\n \t\t\t\t\" \\n(V) ILLUSTRATIVE CASES\\n\\n\"\n \t\t));\n\t\tassertTrue(text.endsWith(\n \t\t\t\t\"As well as gaining \"+euro+\"90 from child benefit increases, he will also receive the early childhood supplement of \"+euro+\"250 per quarter for Vincent for the full four quarters of the year.\\n\\n\\n\\n \\n\\n\\n\"\n \t\t));\n \t\t\n \t\t// Check number of paragraphs\n \t\tint ps = 0;\n \t\tchar[] t = text.toCharArray();\n \t\tfor (int i = 0; i < t.length; i++) {\n \t\t\tif(t[i] == '\\n') { ps++; }\n \t\t}\n\t\tassertEquals(79, ps);\n \t}", "public Builder clearIsEndOfSentence() {\n bitField0_ = (bitField0_ & ~0x00000008);\n isEndOfSentence_ = false;\n onChanged();\n return this;\n }", "public String truncateSentence(String s, int k) {\n int j = 0;\n String res = \"\";\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ' ') {\n j++;\n }\n if (j == k) {\n res = s.substring(0, i);\n break;\n }\n }\n if (j < k) {\n return s;\n }\n return res;\n }", "private void processContentEn() {\n if (this.content == null || this.content.equals(\"\")) {\r\n _logger.error(\"{} - The sentence is null or empty\", this.traceId);\r\n }\r\n\r\n // process input using ltp(Segmentation, POS, DP, SRL)\r\n this.nlp = new NLP(this.content, this.traceId, this.setting);\r\n }", "private static String getCorrespondingNEPosSegment(String textConcept, CustomXMLRepresentation nePosText, boolean isConcept) {\n\n\t\tString output = \"\";\n\n\t\t//textConcept = textConcept.replaceAll(\"\\\\p{Punct} \",\" $0 \");\n\t\t/*textConcept = textConcept.replaceAll(\"[.]\",\". \").replaceAll(\"[,]\",\", \").replaceAll(\"[']\",\"' \")\n\t\t\t\t.replaceAll(\"[\\\\[]\",\" [ \" ).replaceAll(\"[\\\\]]\",\" ] \").replaceAll(\"[(]\", \" ( \").replaceAll(\"[)]\",\" ) \")\n\t\t\t\t.replaceAll(\"[<]\", \" < \").replaceAll(\"[>]\", \" > \");*/\n\t\t//textConcept = textConcept.replaceAll(\"[\\\\.,']\",\"$0 \").replaceAll(\"[\\\\[\\\\](){}!@#$%^&*+=]\",\" $0 \");\n\t\ttextConcept = textConcept.replaceAll(\"[']\",\"$0 \").replaceAll(\"[\\\\[\\\\](){}!@#$%^&*+=]\",\" $0 \");\n\t\tString[] lemmas = textConcept.split(\" \");\n\t\tArrayList<String> wordList = new ArrayList(Arrays.asList(lemmas));\n\n\t\tnePosText.escapeXMLCharacters();\n\n\t\tboolean goOn = true;\n\t\t//while wordList is not empty, repeat\n\t\twhile(wordList.size()>0 && goOn){\n\n\t\t\tDocument docNePos = null;\n\t\t\ttry {\n\t\t\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\t\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n\t\t\t\tInputStream streamNePos = new ByteArrayInputStream(nePosText.getXml().getBytes(StandardCharsets.UTF_8));\n\t\t\t\tdocNePos = docBuilder.parse(streamNePos);\n\t\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t\tSystem.err.print(\"KIndex :: Pipeline.getCorrespondingNEPosSegment() Could not create a document text.\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tNodeList npSegments = docNePos.getElementsByTagName(\"content\").item(0).getChildNodes(); // concept or text segments (children of content)\n\n\t\t\tfor (int i = 0; i < npSegments.getLength(); i++) {\n\t\t\t\tNode n = npSegments.item(i);\n\t\t\t\tif (n.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\tElement segment = (Element) n;\n\t\t\t\t\tString tag = segment.getNodeName();\n\t\t\t\t\tString stLemma = (segment.hasAttribute(\"lemma\")) ? segment.getAttribute(\"lemma\") : \"\";\n\t\t\t\t\tString lemma = segment.getTextContent();\n\n\t\t\t\t\t//Debug\n\t\t\t\t\t//if (wordList.get(0).equals(\"take\")){\n\t\t\t\t\t//\tSystem.out.println(\"take!\");\n\t\t\t\t\t//}\n\n\t\t\t\t\tif ((wordList.size() == 0) && (tag.equals(\"Punctuation\"))){\n\t\t\t\t\t\toutput += lemma + \" \" ;\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tint initSize = wordList.size();\n\t\t\t\t\tint initXMLSize = nePosText.getXml().length();\n\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").equals(\"\")){\n\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (tag.equals(\"ne\")){\n\t\t\t\t\t\tString NEtype = segment.getAttribute(\"type\");\n\t\t\t\t\t\tNodeList NEchildren = segment.getChildNodes();\n\t\t\t\t\t\t//if this text segment is concept, do not add the NamedEntity tag.\n\t\t\t\t\t\tString NEstring = (isConcept) ? \"\" : \"<ne type=\\\"\" + NEtype + \"\\\">\";\n\t\t\t\t\t\tfor (int c = 0; c < NEchildren.getLength(); c++) {\n\t\t\t\t\t\t\tNode child = NEchildren.item(c);\n\t\t\t\t\t\t\tif (child.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\t\tElement Echild = (Element) child;\n\t\t\t\t\t\t\t\tString Ctag = Echild.getNodeName();\n\t\t\t\t\t\t\t\tString OrigLemma = Echild.getAttribute(\"lemma\");\n\t\t\t\t\t\t\t\tString Clemma = Echild.getTextContent();\n\t\t\t\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase())) {\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (!Clemma.equals(\"\")){\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\tif (wordList.get(0).contains(Clemma)){\n\t\t\t\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replace(Clemma,\"\"));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\tString ClemmaRemaining = Clemma.replaceAll(\"[^\\\\x00-\\\\x7F]\", \"\"); //replace all non-ascii characters\n\t\t\t\t\t\t\t\t\t\twhile (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\t\tClemmaRemaining = ClemmaRemaining.replace(wordList.get(0),\" \");\n\t\t\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t\t\t\tif (Clemma.endsWith(wordList.get(0))){\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\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\tClemmaRemaining = (ClemmaRemaining.startsWith(\" \")) ? ClemmaRemaining.replace(\" \",\"\") : ClemmaRemaining;\n\t\t\t\t\t\t\t\t\t\tif ((!ClemmaRemaining.equals(\"\")) && wordList.get(0).startsWith(ClemmaRemaining)){\n\t\t\t\t\t\t\t\t\t\t\twordList.set(0, wordList.get(0).replace(ClemmaRemaining,\"\"));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/*else if (Clemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\t\t\tif (Clemma.endsWith(wordList.get(0))) {\n\t\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\" + OrigLemma + \"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t/*else if ((!Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase().equals(\"\")) &&\n\t\t\t\t\t\t\t\t\t\twordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().contains(Clemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").replaceAll(\" \",\"\").toLowerCase())){\n\t\t\t\t\t\t\t\t\tNEstring += \"<\" + Ctag + \" lemma=\\\"\"+OrigLemma+\"\\\">\" + Clemma + \"</\" + Ctag + \"> \";\n\t\t\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replace(OrigLemma,\"\"));\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\tNEstring += (isConcept) ? \"\" : \"</ne>\";\n\t\t\t\t\t\toutput += NEstring;\n\t\t\t\t\t\tNEstring = (isConcept) ? \"<ne type=\\\"\" + NEtype + \"\\\">\" + NEstring + \"</ne>\" : NEstring;\n\t\t\t\t\t\tnePosText.removeElement(NEstring);\n\n\t\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\t\tif (wordList.size() == initSize && NEstring.length() == initXMLSize){\n\t\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1200 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(tag.equals(\"NoPOS\") || tag.equals(\"Punctuation\")){\n\t\t\t\t\t\t//output += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\toutput += lemma + \" \" ;\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(lemma.toLowerCase())){\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\t\telse if (nePosText.getXml().length() == initXMLSize){\n\t\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1201 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma +\"\\r\\n nePosText: \"+ nePosText.getXml();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().equals(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())) {\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//we have the example of \"Cannot\" -> <MD>Can</MD><RB>not</RB>\n\t\t\t\t\t//in that case, in the first loop the first lemma will be added\n\t\t\t\t\t//in second loop the lemma will be added and wordList.get(0) will be removed\n\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().contains(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\tif (wordList.get(0).startsWith(lemma)){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replaceFirst(Pattern.quote(lemma),\"\"));\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().startsWith(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.set(0,wordList.get(0).replaceFirst(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\"),\"\"));\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).endsWith(lemma)){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase().endsWith(lemma.replaceAll(\"[^a-zA-Z0-9 ]\", \"\").toLowerCase())){\n\t\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\t\twordList.remove(0);\n\t\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\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\telse if (lemma.contains(wordList.get(0))){\n\t\t\t\t\t\twhile(lemma.contains(wordList.get(0))){\n\t\t\t\t\t\t\tif (lemma.endsWith(wordList.get(0))) {\n\t\t\t\t\t\t\t\twordList.remove(0);\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\twordList.remove(0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.size() == 0){\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\telse if (lemma.contains(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))){\n\t\t\t\t\t\twhile(lemma.contains(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))){\n\t\t\t\t\t\t\tif (lemma.endsWith(wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\"))) {\n\t\t\t\t\t\t\t\twordList.remove(0);\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\twordList.remove(0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutput += \"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \"> \";\n\t\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+stLemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t\t\tif (wordList.size() == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//avoid infinite loop\n\t\t\t\t\tif (wordList.size() == initSize){\n\t\t\t\t\t\treturn \"--ERROR-- \\r\\n Error: 1202 \\r\\n In word:\" + wordList.get(0) + \", lemma:\"+lemma;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{ //if n.getNodeType() != Node.ELEMENT_NODE\n\t\t\t\t\tif (npSegments.getLength() == 1){\n\t\t\t\t\t\tgoOn = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wordList.size()>0 && wordList.get(0).replaceAll(\"[^a-zA-Z0-9 ]\", \"\").equals(\"\")){\n\t\t\t\twordList.remove(0);\n\t\t\t}\n\n\t\t\tif(npSegments.getLength() == 0 && wordList.size() == 1){\n\t\t\t\twordList.remove(0);\n\t\t\t}\n\t\t}\n\n\t\t//in case wordList is empty but the next element in nePosText is punctuation, this element has to be added in output\n\t\tDocument docNePos = null;\n\t\ttry {\n\t\t\tDocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n\t\t\tInputStream streamNePos = new ByteArrayInputStream(nePosText.getXml().getBytes(StandardCharsets.UTF_8));\n\t\t\tdocNePos = docBuilder.parse(streamNePos);\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\tSystem.err.print(\"KIndex :: Pipeline.getCorrespondingNEPosSegment() Could not create a document text.\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tNodeList npSegments = docNePos.getElementsByTagName(\"content\").item(0).getChildNodes(); // concept or text segments (children of content)\n\t\tfor (int i = 0; i < npSegments.getLength(); i++) {\n\t\t\tNode n = npSegments.item(i);\n\t\t\tif (n.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\tElement segment = (Element) n;\n\t\t\t\tString tag = segment.getNodeName();\n\t\t\t\tString lemma = segment.getTextContent();\n\t\t\t\tif (tag.equals(\"Punctuation\")){\n\t\t\t\t\toutput += lemma + \" \";\n\t\t\t\t\tnePosText.removeElement(\"<\" + tag + \" lemma=\\\"\"+lemma+\"\\\">\" + lemma + \"</\" + tag + \">\");\n\t\t\t\t}\n\t\t\t\tbreak; // it will break after the first time an element will be checked\n\t\t\t}\n\t\t}\n\n\n\n\t\treturn output;\n\t}", "public String getSentencesWithTerms(String paragraph, Collection<String> terms, boolean lemmatised) {\n String result = \"\";\n\n // Create an empty Annotation just with the given text\n document = new Annotation(paragraph);\n // Run Annotators on this text\n pipeline.annotate(document);\n\n // Use map to track sentences so that a sentence is not returned twice\n sentences = new HashMap();\n int key = 0;\n for (CoreMap coreMap : document.get(CoreAnnotations.SentencesAnnotation.class)) {\n sentences.put(key, coreMap.toString());\n key++;\n }\n\n Set keySet = sentences.keySet();\n Set<Integer> returnedSet = new HashSet();\n Iterator keyIterator = keySet.iterator();\n // These are all the sentences in this document\n while (keyIterator.hasNext()) {\n int id = (int) keyIterator.next();\n String content = sentences.get(id);\n // This is the current sentence\n String thisSentence = content;\n // Select sentence if it contains any of the terms and is not already returned\n for (String t : terms) {\n if (!returnedSet.contains(id)) { // ensure sentence not already used\n String label = lemmatise(t.toLowerCase().replaceAll(\"\\\\s+\", \" \").trim());\n if (StringUtils.contains(lemmatise(thisSentence.toLowerCase()).replaceAll(\"\\\\s+\", \" \"), label)\n || StringUtils.contains(lemmatise(StringOps.stripAllParentheses(thisSentence.toLowerCase())).replaceAll(\"\\\\s+\", \" \"), label)) { // lookup lemmatised strings\n result = result + \" \" + thisSentence.trim(); // Concatenate new sentence\n returnedSet.add(id);\n }\n }\n }\n }\n\n if (null != result && lemmatised) {\n result = lemmatise(result);\n }\n\n return result;\n }", "public static String parseDescription(String sentence) {\n int spaceIndex = sentence.indexOf(' ');\n String description = sentence.substring(spaceIndex + 1);\n return description;\n }", "public abstract void substitutedSentences(long ms, int n);", "public String buildSentence() {\n\t\tSentence sentence = new Sentence();\n\t\t\n\t\t//\tLaunch calls to all child services, using Observables \n\t\t//\tto handle the responses from each one:\n\t\tList<Observable<Word>> observables = createObservables();\n\t\t\n\t\t//\tUse a CountDownLatch to detect when ALL of the calls are complete:\n\t\tCountDownLatch latch = new CountDownLatch(observables.size());\n\t\t\n\t\t//\tMerge the 5 observables into one, so we can add a common subscriber:\n\t\tObservable.merge(observables)\n\t\t\t.subscribe(\n\t\t\t\t//\t(Lambda) When each service call is complete, contribute its word\n\t\t\t\t//\tto the sentence, and decrement the CountDownLatch:\n\t\t\t\t(word) -> {\n\t\t\t\t\tsentence.add(word);\n\t\t\t\t\tlatch.countDown();\n\t\t }\n\t\t);\n\t\t\n\t\t//\tThis code will wait until the LAST service call is complete:\n\t\twaitForAll(latch);\n\n\t\t//\tReturn the completed sentence:\n\t\treturn sentence.toString();\n\t}", "static ArrayList<String> tag(ArrayList<String> rawWords){\n\t\tArrayList<String> outSentence = new ArrayList<String>();\n\t\t//String[][] chart = new String[rawWords.size()][rawWords.size()];\n\t\tfor(int i = 0; i<rawWords.size(); i++){\n\t\t\tString[] entry = rawWords.get(i).split(\"\\\\s+\");\n\t\t\tString word = entry[0];\n\t\t\tString pos = entry[1];\n\t\t\tSystem.out.println(word);\n\t\t\tif((pos.equals(\"NNP\")||word.equals(\"tomorrow\"))&&rawWords.get(i-1).split(\"\\\\s+\")[0].equals(\"due\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tint j = i+1;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"NN\")||next.equals(\"NNP\")||next.equals(\"NNS\")||next.equals(\"NNPS\")||next.equals(\"CD\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}\n\t\t\telse if (pos.equals(\"CD\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\tint j = i+1;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tif((rawWords.get(j).split(\"\\\\s\")[1].equals(\"CC\")&&rawWords.get(j-1).split(\"\\\\s\")[1].equals(\"CD\")&&rawWords.get(j+1).split(\"\\\\s\")[1].equals(\"CD\"))||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NN\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNP\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"NNPS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"CD\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"CD\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"%\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tif(rawWords.get(j).split(\"\\\\s\")[0].equals(\"to\")&&rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"up\")){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if(rawWords.get(j).split(\"\\\\s\")[1].equals(\"#\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"PRP$\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJ\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJR\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"JJS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"$\")){\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t}\n\t\t\t\t\telse if(rawWords.get(j).split(\"\\\\s\")[1].equals(\"POS\")||rawWords.get(j).split(\"\\\\s\")[1].equals(\"DT\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"approximately\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"around\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"almost\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"about\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[0].equals(\"as\")&&(rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"many\")||rawWords.get(j-1).split(\"\\\\s\")[0].equals(\"much\"))&&rawWords.get(j-2).split(\"\\\\s\")[0].equals(\"as\")){\n\t\t\t\t\t\tbeginning-=3;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[1].equals(\"VBN\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"RB\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s\")[1].equals(\"VBN\")&&j>1&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\")&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"RB\")))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if((rawWords.get(j).split(\"\\\\s\")[1].equals(\"RBR\")||rawWords.get(j).split(\"\\\\s\")[0].equals(\"not\"))&&rawWords.get(j+1).split(\"\\\\s+\")[1].equals(\"JJ\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse{\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\n\t\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t\t}\n\t\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t\t}\n\t\t\t\t\ti=ending;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*else if(pos.equals(\"CD\")&&rawWords.get(i-1).split(\"\\\\s+\")[0].equals(\"$\")&&rawWords.get(i-2).split(\"\\\\s+\")[1].equals(\"IN\")){\n\t\t\t\tint beginning=i;\n\t\t\t\tint ending = i;\n\t\t\t\tint j=i+1;\n\t\t\t\tboolean endingFound = false;\n\t\t\t\twhile(!endingFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"CD\")){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendingFound = true;\n\t\t\t\t}\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tString prior=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tString priorWord = rawWords.get(j).split(\"\\\\s\")[0];\n\t\t\t\t\tif(prior.equals(\"$\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (rawWords.get(j).split(\"\\\\s+\")[0].equals(\"as\")&&rawWords.get(j-1).split(\"\\\\s+\")[0].equals(\"much\")&&rawWords.get(j-2).split(\"\\\\s+\")[0].equals(\"as\")){\n\t\t\t\t\t\tbeginning -=3;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t\tj -=3;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"IN\")){\n\t\t\t\t\t\tbeginning --;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}*/\n\t\t\t//else if(pos.equals(arg0))\n\t\t\telse if(pos.equals(\"PRP\")||pos.equals(\"WP\")||word.equals(\"those\")||pos.equals(\"WDT\")){\n\t\t\t\tint beginning = i;\n\t\t\t\t//int ending = i;\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t}\n\t\t\telse if(word.equals(\"anywhere\")&&rawWords.get(i+1).split(\"\\\\s+\")[0].equals(\"else\")){\n\t\t\t\toutSentence.add(\"anywhere\\tB-NP\");\n\t\t\t\toutSentence.add(\"else\\tI-NP\");\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t/*else if (word.equals(\"same\")&&rawWords.get(i-1).split(\"\\\\s\")[0].equals(\"the\")){\n\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\tString nounGroupLine = \"the\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tnounGroupLine = \"same\\tI-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t}*/\n\t\t\telse if(pos.equals(\"NN\")||pos.equals(\"NNS\")||pos.equals(\"NNP\")||pos.equals(\"NNPS\")||pos.equals(\"CD\")/*||pos.equals(\"PRP\")*/||pos.equals(\"EX\")||word.equals(\"counseling\")||word.equals(\"Counseling\")){\n\t\t\t\tint beginning = i;\n\t\t\t\tint ending = i;\n\t\t\t\tboolean endFound = false;\n\t\t\t\tint j = i+1;\n\t\t\t\twhile(!endFound){\n\t\t\t\t\tString next=rawWords.get(j).split(\"\\\\s\")[1];\n\t\t\t\t\tif(next.equals(\"NN\")||next.equals(\"NNS\")||next.equals(\"NNP\")||next.equals(\"NNPS\")||next.equals(\"CD\")||(next.equals(\"CC\")&&rawWords.get(j-1).split(\"\\\\s\")[1].equals(rawWords.get(j+1).split(\"\\\\s\")[1]))){\n\t\t\t\t\t\tending++;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tendFound = true;\n\t\t\t\t}\n\t\t\t\tboolean beginningFound = false;\n\t\t\t\tj = i-1;\n\t\t\t\twhile(!beginningFound){\n\t\t\t\t\tString[] pArray = rawWords.get(j).split(\"\\\\s+\");\n\t\t\t\t\tString prior = pArray[1];\n\t\t\t\t\tif(j>2 &&prior.equals(rawWords.get(j-2).split(\"\\\\s+\")[1])&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"CC\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\"))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if(prior.equals(\"JJ\")||prior.equals(\"JJR\")||prior.equals(\"JJS\")||prior.equals(\"PRP$\")||prior.equals(\"RBS\")||prior.equals(\"$\")||prior.equals(\"RB\")||prior.equals(\"NNP\")||prior.equals(\"NNPS\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBN\")&&j>1&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\",\")&&(rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-2).split(\"\\\\s+\")[1].equals(\"RB\")))){\n\t\t\t\t\t\tbeginning-=2;\n\t\t\t\t\t\tj-=2;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBN\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"RB\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if (prior.equals(\"VBG\")&&j>0&&(rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJR\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"JJ\")||rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"PRP$\"))){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if((prior.equals(\"RBR\")||pArray[0].equals(\"not\"))&&rawWords.get(j+1).split(\"\\\\s+\")[1].equals(\"JJ\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if((pArray[0].equals(\"Buying\")||pArray[0].equals(\"buying\"))&&rawWords.get(j+1).split(\"\\\\s+\")[0].equals(\"income\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse if(pArray[0].equals(\"counseling\")||pArray[0].equals(\"Counseling\")){\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tj--;\n\t\t\t\t\t\tif(rawWords.get(j).split(\"\\\\s+\")[1].equals(\"NN\")){\n\t\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\t\tj--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if (prior.equals(\"DT\")||prior.equals(\"POS\")){\n\t\t\t\t\t\t//j--;\n\t\t\t\t\t\tbeginning--;\n\t\t\t\t\t\tif(!rawWords.get(j-1).split(\"\\\\s+\")[1].equals(\"DT\"))\n\t\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tj--;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tbeginningFound = true;\n\t\t\t\t}\n\t\t\t\twhile(beginning<outSentence.size()){\n\t\t\t\t\toutSentence.remove(outSentence.size()-1);\n\t\t\t\t}\n\t\t\t\tString nounGroupLine = rawWords.get(beginning).split(\"\\\\s+\")[0]+\"\\tB-NP\";\n\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\tfor(int index = beginning+1; index<=ending; index++){\n\t\t\t\t\tnounGroupLine = rawWords.get(index).split(\"\\\\s+\")[0]+\"\\tI-NP\";\n\t\t\t\t\toutSentence.add(nounGroupLine);\n\t\t\t\t}\n\t\t\t\ti=ending;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tString outLine = word+\"\\tO\";\n\t\t\t\toutSentence.add(outLine);\n\t\t\t}\n\t\t}\n\t\toutSentence.remove(0);\n\t\toutSentence.remove(outSentence.size()-1);\n\t\toutSentence.add(\"\");\n\t\treturn outSentence;\n\t}", "public static List<Sentence> parseDesc(String desc){\n\t\ttry{\n\t\t\tif(sentenceDetector == null)\n\t\t\t\tsentenceDetector = new SentenceDetectorME(new SentenceModel(new FileInputStream(\"en-sent.bin\")));\n\t\t\tif(tokenizer == null)\n\t\t\t\ttokenizer = new TokenizerME(new TokenizerModel(new FileInputStream(\"en-token.bin\")));\n\t\t\tif(tagger == null)\n\t\t\t\ttagger = new POSTaggerME(new POSModel(new FileInputStream(\"en-pos-maxent.bin\")));\n\t\t\tif(chunker == null)\n\t\t\t\tchunker = new ChunkerME(new ChunkerModel(new FileInputStream(\"en-chunker.bin\")));\n\t\t} catch(InvalidFormatException ex) {\n\t\t\tex.printStackTrace();\n\t\t} catch(FileNotFoundException ex){\n\t\t\tex.printStackTrace();\n\t\t} catch(IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tList<Sentence> sentenceList = new LinkedList();\n\t\tString[] sentences = sentenceDetector.sentDetect(desc);\t\t\n\t\tfor(String s : sentences) {\n\t\t\tString[] tokens = tokenizer.tokenize(s);\n\t\t\tString[] posTags = tagger.tag(tokens);\n\t\t\tString[] chunks = chunker.chunk(tokens, posTags);\n\t\t\tList<String> ner = new LinkedList();\n\t\t\tList<String> lemma = new ArrayList();\n\t\t\tfor(String str : tokens) {\n\t\t\t\tlemma.add(str.toLowerCase());\n\t\t\t\tner.add(\"O\"); //assume everything is an object\n\t\t\t}\n\t\t\t\n\t\t\tSentence sentence = new Sentence (Arrays.asList(tokens), lemma, Arrays.asList(posTags), Arrays.asList(chunks), ner, s);\n\t\t\tsentenceList.add(sentence);\n\t\t}\n\t\t\n\t\treturn sentenceList;\n\t}", "@Override\n\tpublic void process(JCas aJCas) throws AnalysisEngineProcessException {\n\t\tString text = aJCas.getDocumentText();\n\n\t\t// create an empty Annotation just with the given text\n\t\tAnnotation document = new Annotation(text);\n//\t\tAnnotation document = new Annotation(\"Barack Obama was born in Hawaii. He is the president. Obama was elected in 2008.\");\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document); \n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\t HelperDataStructures hds = new HelperDataStructures();\n\n\t\t\n\t\t//SPnew language-specific settings:\n\t\t//SPnew subject tags of the parser\n\t\t HashSet<String> subjTag = new HashSet<String>(); \n\t\t HashSet<String> dirObjTag = new HashSet<String>(); \n\t\t //subordinate conjunction tags\n\t\t HashSet<String> compTag = new HashSet<String>(); \n\t\t //pronoun tags\n\t\t HashSet<String> pronTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> passSubjTag = new HashSet<String>();\n\t\t HashSet<String> apposTag = new HashSet<String>(); \n\t\t HashSet<String> verbComplementTag = new HashSet<String>(); \n\t\t HashSet<String> infVerbTag = new HashSet<String>(); \n\t\t HashSet<String> relclauseTag = new HashSet<String>(); \n\t\t HashSet<String> aclauseTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> compLemma = new HashSet<String>(); \n\t\t HashSet<String> coordLemma = new HashSet<String>(); \n\t\t HashSet<String> directQuoteIntro = new HashSet<String>(); \n\t\t HashSet<String> indirectQuoteIntroChunkValue = new HashSet<String>();\n\t\t \n//\t\t HashSet<String> finiteVerbTag = new HashSet<String>();\n\t\t \n\n\t\t //OPEN ISSUES PROBLEMS:\n\t\t //the subject - verb relation finding does not account for several specific cases: \n\t\t //opinion verbs with passive subjects as opinion holder are not accounted for,\n\t\t //what is needed is a marker in the lex files like PASSSUBJ\n\t\t //ex: Obama is worried/Merkel is concerned\n\t\t //Many of the poorer countries are concerned that the reduction in structural funds and farm subsidies may be detrimental in their attempts to fulfill the Copenhagen Criteria.\n\t\t //Some of the more well off EU states are also worried about the possible effects a sudden influx of cheap labor may have on their economies. Others are afraid that regional aid may be diverted away from those who currently benefit to the new, poorer countries that join in 2004 and beyond. \n\t\t// Does not account for infinitival constructions, here again a marker is needed to specify\n\t\t //subject versus object equi\n\t\t\t//Christian Noyer was reported to have said that it is ok.\n\t\t\t//Reuters has reported Christian Noyer to have said that it is ok.\n\t\t //Obama is likely to have said.. \n\t\t //Several opinion holder- opinion verb pairs in one sentence are not accounted for, right now the first pair is taken.\n\t\t //what is needed is to run through all dependencies. For inderect quotes the xcomp value of the embedded verb points to the \n\t\t //opinion verb. For direct quotes the offsets closest to thwe quote are relevant.\n\t\t //a specific treatment of inverted subjects is necessary then. Right now the\n\t\t //strategy relies on the fact that after the first subj/dirobj - verb pair the\n\t\t //search is interrupted. Thus, if the direct object precedes the subject, it is taken as subject.\n\t\t // this is the case in incorrectly analysed inverted subjeects as: said Zwickel on Monday\n\t\t //coordination of subject not accounted for:employers and many economists\n\t\t //several subject-opinion verbs:\n\t\t //Zwickel has called the hours discrepancy between east and west a \"fairness gap,\" but employers and many economists point out that many eastern operations have a much lower productivity than their western counterparts.\n\t\t if (language.equals(\"en\")){\n \t subjTag.add(\"nsubj\");\n \t subjTag.add(\"xsubj\");\n \t subjTag.add(\"nmod:agent\");\n \t \n \t dirObjTag.add(\"dobj\"); //for inverted subject: \" \" said IG metall boss Klaus Zwickel on Monday morning.\n \t \t\t\t\t\t\t//works only with break DEPENDENCYSEARCH, otherwise \"Monday\" is nsubj \n \t \t\t\t\t\t\t//for infinitival subject of object equi: Reuters reports Obama to have said\n \tpassSubjTag.add(\"nsubjpass\");\n \tapposTag.add(\"appos\");\n \trelclauseTag.add(\"acl:relcl\");\n \taclauseTag.add(\"acl\");\n \t compTag.add(\"mark\");\n \t pronTag.add(\"prp\");\n \thds.pronTag.add(\"prp\");\n \tcompLemma.add(\"that\");\n \tcoordLemma.add(\"and\");\n \tverbComplementTag.add(\"ccomp\");\n \tverbComplementTag.add(\"parataxis\");\n\n \tinfVerbTag.add(\"xcomp\"); //Reuters reported Merkel to have said\n \tinfVerbTag.add(\"advcl\");\n \tdirectQuoteIntro.add(\":\");\n \tindirectQuoteIntroChunkValue.add(\"SBAR\");\n \thds.objectEqui.add(\"report\");\n \thds.objectEqui.add(\"quote\");\n \thds.potentialIndirectQuoteTrigger.add(\"say\");\n// \thds.objectEqui.add(\"confirm\");\n// \thds.subjectEqui.add(\"promise\");\n// \thds.subjectEqui.add(\"quote\");\n// \thds.subjectEqui.add(\"confirm\");\n }\n\t\t \n\t\t boolean containsSubordinateConjunction = false;\n\t\t\n\t\t \n\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tSystem.out.println(\"PREPROCESSING..\");\n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\t//SP Map offsets to NER\n\t\t\t\tList<NamedEntity> ners = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tNamedEntity.class, sentenceAnn);\n\t\t\t\tfor (NamedEntity ne : ners){\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.getCoveredText().toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.casTypeCode);\n\t\t\t\t\t//Person is 71, Location is 213, Organization is 68 geht anders besser siehe unten\n\t\t\t\t\tint nerStart = ne\n\t\t\t\t\t\t\t.getBegin();\n\t\t\t\t\tint nerEnd = ne.getEnd();\n//\t\t\t\t\tSystem.out.println(\"NER: \" + ne.getCoveredText() + \" \" + nerStart + \"-\" + nerEnd ); \n\t\t\t\t\tString offsetNer = \"\" + nerStart + \"-\" + nerEnd;\n\t\t\t\t\thds.offsetToNer.put(offsetNer, ne.getCoveredText());\n//\t\t\t\t\tNer.add(offsetNer);\n\t\t\t\t\thds.Ner.add(offsetNer);\n//\t\t\t\t\tSystem.out.println(\"NER: TYPE \" +ne.getValue().toString());\n\t\t\t\t\tif (ne.getValue().equals(\"PERSON\")){\n\t\t\t\t\t\thds.NerPerson.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t\telse if (ne.getValue().equals(\"ORGANIZATION\")){\n\t\t\t\t\t\thds.NerOrganization.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//DBpediaLink info: map offsets to links\n\t\t\t\tList<DBpediaResource> dbpeds = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tDBpediaResource.class, sentenceAnn);\n\t\t\t\tfor (DBpediaResource dbped : dbpeds){\n//\t\t\t\t\t\n//\t\t\t\t\tint dbStart = dbped\n//\t\t\t\t\t\t\t.getBegin();\n//\t\t\t\t\tint dbEnd = dbped.getEnd();\n\t\t\t\t\t// not found if dbpedia offsets are wrongly outside than sentences\n//\t\t\t\t\tSystem.out.println(\"DBPED SENT: \" + sentenceAnn.getBegin()+ \"-\" + sentenceAnn.getEnd() ); \n//\t\t\t\t\tString offsetDB = \"\" + dbStart + \"-\" + dbEnd;\n//\t\t\t\t\thds.labelToDBpediaLink.put(dbped.getLabel(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getLabel() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t\thds.dbpediaSurfaceFormToDBpediaLink.put(dbped.getCoveredText(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getCoveredText() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//SP Map offsets to lemma of opinion verb/noun; parser does not provide lemma\n\t\t\t\t for (CoreLabel token: sentence.get(TokensAnnotation.class)) {\n//\t\t\t\t\t System.out.println(\"LEMMA \" + token.lemma().toString());\n\t\t\t\t\t int beginTok = token.beginPosition();\n\t\t\t\t\t int endTok = token.endPosition();\n\t\t\t\t\t String offsets = \"\" + beginTok + \"-\" + endTok;\n\t\t\t\t\t hds.offsetToLemma.put(offsets, token.lemma().toString());\n\t\t\t\t\t \n\t\t\t\t\t \t if (opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t \n//\t\t\t \t System.out.println(\"offsetToLemmaOfOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\t\t\t\t\t \t if (passive_opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfPassiveOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n//\t\t\t \t System.out.println(\"offsetToLemmaOfPassiveOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\n\t\t\t\t } \n\n\t\t\t//SPnew parser\n\t\t\tTree tree = sentence.get(TreeAnnotation.class);\n\t\t\tTreebankLanguagePack tlp = new PennTreebankLanguagePack();\n\t\t\tGrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();\n\t\t\tGrammaticalStructure gs = gsf.newGrammaticalStructure(tree);\n\t\t\tCollection<TypedDependency> td = gs.typedDependenciesCollapsed();\n\n\t\t\t \n//\t\t\tSystem.out.println(\"TYPEDdep\" + td);\n\t\t\t\n\t\t\tObject[] list = td.toArray();\n//\t\t\tSystem.out.println(list.length);\n\t\t\tTypedDependency typedDependency;\nDEPENDENCYSEARCH: for (Object object : list) {\n\t\t\ttypedDependency = (TypedDependency) object;\n//\t\t\tSystem.out.println(\"DEP \" + typedDependency.dep().toString()+ \n//\t\t\t\t\t\" GOV \" + typedDependency.gov().toString()+ \n//\t\t\t\" :: \"+ \" RELN \"+typedDependency.reln().toString());\n\t\t\tString pos = null;\n String[] elements;\n String verbCand = null;\n int beginVerbCand = -5;\n\t\t\tint endVerbCand = -5;\n\t\t\tString offsetVerbCand = null;\n\n if (compTag.contains(typedDependency.reln().toString())) {\n \tcontainsSubordinateConjunction = true;\n// \tSystem.out.println(\"subordConj \" + typedDependency.dep().toString().toLowerCase());\n }\n \n else if (subjTag.contains(typedDependency.reln().toString())){\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \t\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tfor (HashMap.Entry<String, String> entry : hds.offsetToLemma.entrySet()) {\n//\t\t\t\t String key = entry.getKey();\n//\t\t\t\t Object value = entry.getValue();\n//\t\t\t\t System.out.println(\"OFFSET \" + key + \" LEMMA \" + value);\n//\t\t\t\t // FOR LOOP\n//\t\t\t\t}\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"SUBJCHAINHEAD1\");\n\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\tSystem.out.println(\"verbCand \" + verbCand);\n\t\t\t\t//hack for subj after obj said Zwickel (obj) on Monday morning (subj)\n\t\t\t\tif (language.equals(\"en\") \n\t\t\t\t\t\t&& hds.predicateToObject.containsKey(offsetVerbCand)\n\t\t\t\t\t\t){\n// \t\tSystem.out.println(\"CONTINUE DEP\");\n \t\tcontinue DEPENDENCYSEARCH;\n \t}\n\t\t\t\telse {\n\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n\t\t\t\t}\n }\n //Merkel is concerned\n else if (passSubjTag.contains(typedDependency.reln().toString())){\n \t//Merkel was reported\n \t//Merkel was concerned\n \t//Merkel was quoted\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n////\t\t\t\t\tSystem.out.println(\"LEMMA verbCand \" + verbCandLemma);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n \t\n \tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n// \tSystem.out.println(\"SUBJCHAINHEAD2\");\n \t//Merkel is concerned\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfPassiveOpinionVerb,\n \t\t\thds);\n }\n //Meanwhile, the ECB's vice-president, Christian Noyer, was reported at the start of the week to have said that the bank's future interest-rate moves\n// would depend on the behavior of wage negotiators as well as the pace of the economic recovery.\n\n else if (apposTag.contains(typedDependency.reln().toString())){\n \t\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tString appo = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tint beginAppo = typedDependency.dep().beginPosition();\n\t\t\t\tint endAppo = typedDependency.dep().endPosition();\n\t\t\t\tString offsetAppo = \"\" + beginAppo + \"-\" + endAppo;\n\t\t\t\t\n// \tSystem.out.println(\"APPOSITION1 \" + subjCand + \"::\"+ appo + \":\" + offsetSubjCand + \" \" + offsetAppo);\n \thds.subjectToApposition.put(offsetSubjCand, offsetAppo);\n }\n else if (relclauseTag.contains(typedDependency.reln().toString())){\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tverbCand = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.dep().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.dep().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\tString subjCandPos = null;\n\t\t\t\tif (hds.predicateToSubject.containsKey(offsetVerbCand)){\n\t\t\t\t\t\n\t\t\t\t\tif (subjCand.matches(\".+?/.+?\")) { \n\t\t\t\t\t\telements = subjCand.split(\"/\");\n\t\t\t\t\t\tsubjCand = elements[0];\n\t\t\t\t\t\tsubjCandPos = elements[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tString del = hds.predicateToSubject.get(offsetVerbCand);\n\t\t\t\t\thds.predicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToPredicate.remove(del);\n\t\t\t\t\thds.normalPredicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToNormalPredicate.remove(del);\n//\t\t\t\t\tSystem.out.println(\"REMOVE RELPRO \" + verbCand + \"/\" + hds.offsetToLemma.get(del));\n\t\t\t\t\thds.predicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToPredicate.put( offsetSubjCand, offsetVerbCand);\n\t\t\t\t\thds.normalPredicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToNormalPredicate.put( offsetSubjCand, offsetVerbCand);\n//\t\t\t\t\tSystem.out.println(\"RELCLAUSE \" + subjCand + \"::\" + \":\" + verbCand);\n\t\t\t\t\thds.offsetToSubjectHead.put(offsetSubjCand,subjCand);\n\t\t\t\t\thds.SubjectHead.add(offsetSubjCand);\n\t\t\t\t\t\n\t\t\t\t\tif (subjCandPos != null && hds.pronTag.contains(subjCandPos)){\n\t\t\t\t\t\thds.PronominalSubject.add(offsetSubjCand);\n\t\t\t\t\t}\n\t\t\t\t}\n \t\n \t\n }\n \n else if (dirObjTag.contains(typedDependency.reln().toString())\n \t\t){\n \tstoreRelations(typedDependency, hds.predicateToObject, hds.ObjectToPredicate, hds);\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\t\n\t\t\t\tString objCand = typedDependency.dep().toString().toLowerCase();\n \tint beginObjCand = typedDependency.dep().beginPosition();\n \tint endObjCand = typedDependency.dep().endPosition();\n \tString offsetObjCand = \"\" + beginObjCand + \"-\" + endObjCand;\n \tString objCandPos;\n \tif (objCand.matches(\".+?/.+?\")) { \n\t\t\t\t\telements = objCand.split(\"/\");\n\t\t\t\t\tobjCand = elements[0];\n\t\t\t\t\tobjCandPos = elements[1];\n//\t\t\t\t\tSystem.out.println(\"PRON OBJ \" + objCandPos);\n\t\t\t\t\tif (pronTag.contains(objCandPos)){\n\t\t\t\t\thds.PronominalSubject.add(offsetObjCand);\n\t\t\t\t\t}\n\t\t\t\t\t}\n// \tSystem.out.println(\"DIROBJ STORE ONLY\");\n \t//told Obama\n \t//said IG metall boss Klaus Zwickel\n \t// problem: pointing DO\n \t//explains David Gems, pointing out the genetically manipulated species.\n \t if (language.equals(\"en\") \n \t\t\t\t\t\t&& !hds.normalPredicateToSubject.containsKey(offsetVerbCand)\n \t\t\t\t\t\t){\n// \t\t System.out.println(\"INVERSE SUBJ HACK ENGLISH PREDTOOBJ\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t }\n }\n //was reported to have said\n else if (infVerbTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.mainToInfinitiveVerb, hds.infinitiveToMainVerb, hds);\n// \tSystem.out.println(\"MAIN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n else if (aclauseTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.nounToInfinitiveVerb, hds.infinitiveVerbToNoun, hds);\n// \tSystem.out.println(\"NOUN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n \n \n\n\t\t\t}\n\t\t\t\n//\t\t\tSemanticGraph dependencies = sentence.get(CollapsedCCProcessedDependenciesAnnotation.class);\n//\t\t\tSystem.out.println(\"SEM-DEP \" + dependencies);\t\n\t\t}\n\t\t\n\n\t\tMap<Integer, edu.stanford.nlp.dcoref.CorefChain> corefChains = document.get(CorefChainAnnotation.class);\n\t\t \n\t\t if (corefChains == null) { return; }\n\t\t //SPCOPY\n\t\t for (Entry<Integer, edu.stanford.nlp.dcoref.CorefChain> entry: corefChains.entrySet()) {\n//\t\t System.out.println(\"Chain \" + entry.getKey() + \" \");\n\t\t \tint chain = entry.getKey();\n\t\t String repMenNer = null;\n\t\t String repMen = null;\n\t\t String offsetRepMenNer = null;\n\n\t\t List<IaiCorefAnnotation> listCorefAnnotation = new ArrayList<IaiCorefAnnotation>();\n\t\t \n\t\t for (CorefMention m : entry.getValue().getMentionsInTextualOrder()) {\n\t\t \tboolean corefMentionContainsNer = false;\n\t\t \tboolean repMenContainsNer = false;\n\n//\t\t \n\n\t\t\t\t// We need to subtract one since the indices count from 1 but the Lists start from 0\n\t\t \tList<CoreLabel> tokens = sentences.get(m.sentNum - 1).get(TokensAnnotation.class);\n\t\t // We subtract two for end: one for 0-based indexing, and one because we want last token of mention not one following.\n//\t\t System.out.println(\" \" + m + \", i.e., 0-based character offsets [\" + tokens.get(m.startIndex - 1).beginPosition() +\n//\t\t \", \" + tokens.get(m.endIndex - 2).endPosition() + \")\");\n\t\t \n\t\t int beginCoref = tokens.get(m.startIndex - 1).beginPosition();\n\t\t\t\t int endCoref = tokens.get(m.endIndex - 2).endPosition();\n\t\t\t\t String offsetCorefMention = \"\" + beginCoref + \"-\" + endCoref;\n\t\t\t\t String corefMention = m.mentionSpan;\n\n\t\t\t\t CorefMention RepresentativeMention = entry.getValue().getRepresentativeMention();\n\t\t\t\t repMen = RepresentativeMention.mentionSpan;\n\t\t\t\t List<CoreLabel> repMenTokens = sentences.get(RepresentativeMention.sentNum - 1).get(TokensAnnotation.class);\n//\t\t\t\t System.out.println(\"REPMEN ANNO \" + \"\\\"\" + repMen + \"\\\"\" + \" is representative mention\" +\n// \", i.e., 0-based character offsets [\" + repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition() +\n//\t\t \", \" + repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition() + \")\");\n\t\t\t\t int beginRepMen = repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition();\n\t\t\t\t int endRepMen = repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition();\n\t\t\t\t String offsetRepMen = \"\" + beginRepMen + \"-\" + endRepMen;\n\t\t \t \n\t\t\t\t//Determine repMenNer that consists of largest NER (Merkel) to (Angela Merkel)\n\t\t\t\t //and \"Chancellor \"Angela Merkel\" to \"Angela Merkel\"\n\t\t \t //Further reduction to NER as in \"Chancellor Angela Merkel\" to \"Angela Merkel\" is\n\t\t\t\t //done in determineBestSubject. There, Chunk information and subjectHead info is available.\n\t\t\t\t //Chunk info and subjectHead info is used to distinguish \"Chancellor Angela Merkel\" to \"Angela Merkel\"\n\t\t\t\t //from \"The enemies of Angela Merkel\" which is not reduced to \"Angela Merkel\"\n\t\t\t\t //Problem solved: The corefMentions of a particular chain do not necessarily have the same RepMenNer (RepMen) \n\t\t\t\t // any more: Chancellor Angela Merkel repMenNer Chancellor Angela Merkel , then Angela Merkel has RepMenNer Angela Merkel\n\t\t\t\t if (offsetRepMenNer != null && hds.Ner.contains(offsetRepMenNer)){\n//\t\t\t\t\t System.out.println(\"NEWNer.contains(offsetRepMenNer)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetRepMen != null && hds.Ner.contains(offsetRepMen)){\n\t\t\t\t\t repMenNer = repMen;\n\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\tSystem.out.println(\"NEWNer.contains(offsetRepMen)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetCorefMention != null && hds.Ner.contains(offsetCorefMention)){\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"Ner.contains(offsetCorefMention)\");\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t corefMentionContainsNer = offsetsContainAnnotation(offsetCorefMention,hds.Ner);\n\t\t\t\t\t repMenContainsNer = offsetsContainAnnotation(offsetRepMen,hds.Ner);\n//\t\t\t\t\t System.out.println(\"ELSE Ner.contains(offsetCorefMention)\");\n\t\t\t\t }\n\t\t\t\t //Determine repMenNer that contains NER\n\t\t\t\t\tif (repMenNer == null){\n\t\t\t\t\t\tif (corefMentionContainsNer){\n\t\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (repMenContainsNer){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT2\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//no NER:\n\t\t\t\t\t\t//Pronoun -> repMen is repMenNer\n\t\t\t\t\t\telse if (hds.PronominalSubject.contains(offsetCorefMention) && repMen != null){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT3\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//other no NER: corefMention is repMenNer because it is closer to original\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"DEFAULT4\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \n \t IaiCorefAnnotation corefAnnotation = new IaiCorefAnnotation(aJCas);\n\t\t\t\n\t\t\t\t\t\n\n\n\t\t\t\t\tcorefAnnotation.setBegin(beginCoref);\n\t\t\t\t\tcorefAnnotation.setEnd(endCoref);\n\t\t\t\t\tcorefAnnotation.setCorefMention(corefMention);\n\t\t\t\t\tcorefAnnotation.setCorefChain(chain);\n\t\t\t\t\t//done below\n//\t\t\t\t\tcorefAnnotation.setRepresentativeMention(repMenNer);\n//\t\t\t\t\tcorefAnnotation.addToIndexes(); \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlistCorefAnnotation.add(corefAnnotation);\n\t\t\t\t\t\n//\t\t\t\t\tdone below:\n//\t\t\t\t\t offsetToRepMen.put(offsetCorefMention, repMenNer);\n//\t\t\t\t\t RepMen.add(offsetCorefMention);\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t }//end coref mention\n//\t\t System.out.println(\"END Chain \" + chain );\n//\t\t System.out.println(listCorefAnnotation.size());\n\t\t String offsetCorefMention = null;\n\t\t for (int i = 0; i < listCorefAnnotation.size(); i++) {\n\t\t \tIaiCorefAnnotation corefAnnotation = listCorefAnnotation.get(i);\n\t\t \tcorefAnnotation.setRepresentativeMention(repMenNer);\n\t\t \tcorefAnnotation.addToIndexes();\n\t\t \toffsetCorefMention = \"\" + corefAnnotation.getBegin() + \"-\" + corefAnnotation.getEnd();\n\t\t\t\t\thds.offsetToRepMen.put(offsetCorefMention, repMenNer);\n\t\t\t\t\thds.RepMen.add(offsetCorefMention);\n\t\t\t\t\t//COREF\n//\t\t\t\t\tSystem.out.println(\"Chain \" + corefAnnotation.getCorefChain());\n//\t\t\t\t\tSystem.out.println(\"corefMention \" + corefAnnotation.getCorefMention() + offsetCorefMention);\n//\t\t\t\t\tSystem.out.println(\"repMenNer \" + repMenNer);\n\t\t }\n\t\t } //end chains\n\n\n//\t\t System.out.println(\"NOW quote finder\");\n\n\n\t\t\n\t\t///* quote finder: begin find quote relation and quotee\n\t\t// direct quotes\n\t\t\n\t\t\n\t\tString quotee_left = null;\n\t\tString quotee_right = null; \n\t\t\n\t\tString representative_quotee_left = null;\n\t\tString representative_quotee_right = null; \n\t\t\n\t\tString quote_relation_left = null;\n\t\tString quote_relation_right = null;\n\t\t\n\t\tString quoteType = null;\n\t\tint quoteeReliability = 5;\n\t\tint quoteeReliability_left = 5;\n\t\tint quoteeReliability_right = 5;\n\t\tint quotee_end = -5;\n\t\tint quotee_begin = -5;\n\t\t\n\t\tboolean quoteeBeforeQuote = false;\n\n\n\t\n\t\t\n\t\t// these are all the quotes in this document\n\t\tList<CoreMap> quotes = document.get(QuotationsAnnotation.class);\n\t\tfor (CoreMap quote : quotes) {\n\t\t\tif (quote.get(TokensAnnotation.class).size() > 5) {\n\t\t\t\tQuoteAnnotation annotation = new QuoteAnnotation(aJCas);\n\n\t\t\t\tint beginQuote = quote.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endQuote = quote.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(quote.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tannotation.setBegin(beginQuote);\n\t\t\t\tannotation.setEnd(endQuote);\n\t\t\t\tannotation.addToIndexes();\n//\t\t\t}\n//\t\t}\n//\t\t\n//\t\tList<Q> newQuotes = document.get(QuotationsAnnotation.class);\t\t\n//\t\tfor (CoreMap annotation : newQuotes) {\n//\t\t\t\tif (1==1){\n//\t\t\t\tRe-initialize markup variables since they are also used for indirect quotes\n\t\t\t\tquotee_left = null;\n\t\t\t\tquotee_right = null; \n\t\t\t\t\n\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\n\t\t\t\tquote_relation_left = null;\n\t\t\t\tquote_relation_right = null;\n\t\t\t\tquoteeReliability = 5;\n\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\tquotee_end = -5;\n\t\t\t\tquotee_begin = -5;\n\t\t\t\tquoteType = \"direct\";\n\t\t\t\tquoteeBeforeQuote = false;\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> directQuoteTokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tToken.class, annotation);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n\t\t\t\t\n \n//\t\t\t\tfor (Token aFollowToken: followTokens){\n//\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\tChunk.class, aFollowToken);\n \n//direct quote quotee right:\n\t\t\t\t\n\t for (Token aFollow2Token: followTokens){\n\t\t\t\t\t List<SentenceAnnotation> sentencesFollowQuote = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t SentenceAnnotation.class, aFollow2Token);\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t for (SentenceAnnotation sentenceFollowsQuote: sentencesFollowQuote){\n\t\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tChunk.class, sentenceFollowsQuote);\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT\");\n\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"RIGHT\", \n\t\t\t\t\tchunks, hds, annotation);\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_right = quote_annotation_result[0];\n\t\t\t representative_quotee_right = quote_annotation_result[1];\n\t\t\t quote_relation_right = quote_annotation_result[2];\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_right = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t //Will Throw exception!\n\t\t\t //do something! anything to handle the exception.\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_right = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT RESULT quotee \" + quotee_right + \" representative_quotee \" + representative_quotee_right\n//\t\t\t\t\t+ \" quote_relation \" + quote_relation_right);\n\t\t \n\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> precedingTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n for (Token aPrecedingToken: precedingTokens){ \n \t\n \tif (directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString()) \n \t\t\t|| compLemma.contains(aPrecedingToken.getLemma().getValue().toString())) {\n// \t\tSystem.out.println(\"Hello, World lemma found\" + aPrecedingToken.getLemma().getValue());\n \t\tquoteeBeforeQuote = true;\n \t}\n \t\tList <NamedEntity> namedEntities = null;\n \t\tList <Token> tokens = null;\n \t\tList<Chunk> chunks = null;\n \t\t\n\t\t\t\t List<Sentence> precedingSentences = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken, 1);\n\t\t\t\t \n\t\t\t\t\t\tif (precedingSentences.isEmpty()){\n\t\t\t\t\t\t\tList<Sentence> firstSentence;\n\t\t\t\t \tfirstSentence = JCasUtil.selectCovering(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken);\n\n\t\t\t\t \tfor (Sentence aSentence: firstSentence){\n\t\t\t\t \t\t\n\n\t\t\t\t\t\t\t\tchunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\tChunk.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t \t\tnamedEntities = JCasUtil.selectCovered(aJCas,\n\t \t \t\tNamedEntity.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\ttokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\n\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t else {\t\n\t\t\t\t \tfor (Sentence aSentence: precedingSentences){\n//\t\t\t\t \t\tSystem.out.println(\"Hello, World sentence\" + aSentence);\n\t\t\t\t \t\tchunks = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tChunk.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\tnamedEntities = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tNamedEntity.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\ttokens = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence, aPrecedingToken);\n\t\t\t\t \t}\n\t\t\t\t }\n \t\n//\t\t\t\t \n//\t\t\t\t\t\tSystem.out.println(\"DIRECT QUOTE LEFT\");\n\t\t\t\t\t\tString[] quote_annotation_direct_left = determine_quotee_and_quote_relation(\"LEFT\", chunks,\n\t\t\t\t\t\t\t\t hds, annotation\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t );\n//\t\t\t\t\t\tSystem.out.println(\"QUOTE ANNOTATION \" + quote_annotation_direct_left.length);\t\t\n\t\tif (quote_annotation_direct_left.length>=4){\n//\t\t\tSystem.out.println(\"QUOTE ANNOTATION UPDATE \" + quote_annotation_direct_left[0] +\n//\t\t\t\t\t\" \" + quote_annotation_direct_left[1] + \" \" +\n//\t\t\t\t\tquote_annotation_direct_left[2]);\n\t\t quotee_left = quote_annotation_direct_left[0];\n\t\t representative_quotee_left = quote_annotation_direct_left[1];\n\t\t quote_relation_left = quote_annotation_direct_left[2];\n\t\t try {\n\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t} catch (NumberFormatException e) {\n\t\t //Will Throw exception!\n\t\t //do something! anything to handle the exception.\n\t\t\tquoteeReliability = -5;\n\t\t\tquoteeReliability_left = -5;\n\t\t\t}\t\t\t\t\t \n\t\t }\n//\t\tSystem.out.println(\"DIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t+ \" quote_relation \" + quote_relation_left);\n\t\t//no subject - predicate quotee quote_relation, quote introduced with colon: \n\t\tif (quotee_left == null && quote_relation_left == null && representative_quotee_left == null \n\t\t&& directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString())){\n//\t\t\tSystem.out.println(\"NER DIRECT QUOTE LEFT COLON\");\n\t\t\tString quoteeCandOffset = null; \n\t\t\tString quoteeCandText = null;\n\t\t if (namedEntities.size() == 1){\n \t \tfor (NamedEntity ne : namedEntities){\n// \t \t\tSystem.out.println(\"ONE NER \" + ne.getCoveredText());\n \t \t\tquoteeCandText = ne.getCoveredText();\n\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\tquotee_end = ne.getEnd();\n\t\t\t\t\tquotee_begin = ne.getBegin();\n\t\t\t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n\t\t\t\t\tquoteeReliability = 1;\n\t\t\t\t\tquoteeReliability_left = 1;\n \t }\n \t }\n \t else if (namedEntities.size() > 1) {\n \t \tint count = 0;\n \t \tString quotee_cand = null;\n// \t \tSystem.out.println(\"Hello, World ELSE SEVERAL NER\");\n \t \tfor (NamedEntity ner : namedEntities){\n// \t \t\tSystem.out.println(\"Hello, World NER TYPE\" + ner.getValue());\n \t \t\tif (ner.getValue().equals(\"PERSON\")){\n \t \t\t\tcount = count + 1;\n \t \t\t\tquotee_cand = ner.getCoveredText();\n \t \t\t\tquotee_end = ner.getEnd();\n \t \t\t\tquotee_begin = ner.getBegin();\n \t \t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n \t \t\t\t\n// \t \t\t\tSystem.out.println(\"Hello, World FOUND PERSON\" + quotee_cand);\n \t \t\t}\n \t \t}\n \t \tif (count == 1){ // there is exactly one NER.PERSON\n// \t \t\tSystem.out.println(\"ONE PERSON, SEVERAL NER \" + quotee_cand);\n \t \t\t\tquoteeCandText = quotee_cand;\n\t\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\t\tquoteeReliability = 3;\n\t\t\t\t\t\tquoteeReliability_left = 3;\n \t \t}\n \t }\n\t\t if(quoteeCandOffset != null && quoteeCandText != null ){\n//\t\t \t quotee_left = quoteeCandText;\n\t\t \t String result [] = determineBestRepMenSubject(\n\t\t \t\t\t quoteeCandOffset,quoteeCandOffset, quoteeCandText, hds);\n\t\t \t if (result.length>=2){\n\t\t \t\t quotee_left = result [0];\n\t\t \t\t representative_quotee_left = result [1];\n//\t\t \t System.out.println(\"RESULT2 NER quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left);\n\t\t \t }\n\t\t }\n\t\t}\n }\n\t\t\n \n\n\t\t\t\t\n\t\t\t\tif (quotee_left != null && quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"TWO QUOTEES\");\n\t\t\t\t\t\n\t\t\t\t\tif (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\") \n\t\t\t\t\t\t|| \tdirectQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t|| directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"PUNCT \" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\",\")){\n//\t\t\t\t\t\tSystem.out.println(\"COMMA \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse if (!directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"NO PUNCT \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n//\t\t\t\t\t\tSystem.out.println(\"UNCLEAR LEFT RIGHT \" + quotee_left + quote_relation_left + quote + quotee_right + quote_relation_right);\n\t\t\t\t\tannotation.setQuotee(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteRelation(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (quoteeBeforeQuote == true){\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_left != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE LEFT\" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE RIGHT FOUND\" + quotee_right + \" QUOTE RELATION \" + quote_relation_right + \":\" + quoteeReliability_right);\n\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_left != null ){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"NO QUOTEE FOUND\" + quote + quote_relation_left + quote_relation_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_right != null){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t}\n\t\t\t\telse if (quoteType != null){\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"Hello, World NO QUOTEE and NO QUOTE RELATION FOUND\" + quote);\n\t\t\t\t}\n\t\t\t\tif (annotation.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\tSystem.out.println(\"NOW!!\" + annotation.getRepresentativeQuoteeMention());\n\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(annotation.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\tannotation.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(annotation.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\tSystem.out.println(\"DBPRED FOUND\" + annotation.getRepresentativeQuoteeMention() + \" URI: \" + annotation.getQuoteeDBpediaUri());\n\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\t\n\t\t\t\n\t\t} //for direct quote\n\t\t\n\t\t// annotate indirect quotes: opinion verb + 'that' ... until end of sentence: said that ...\n\n//\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class); //already instantiated above\nINDIRECTQUOTE:\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tif (sentence.get(TokensAnnotation.class).size() > 5) { \n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n//\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t \tint indirectQuoteBegin = -5;\n\t\t\t\tint indirectQuoteEnd = -5;\n\t\t\t\tboolean subsequentDirectQuoteInstance = false;\n\t\t\t\t\n\t\t\t\tList<Chunk> chunksIQ = JCasUtil.selectCovered(aJCas,\n\t\t\t\tChunk.class, sentenceAnn);\n\t\t\t\tList<Chunk> chunksBeforeIndirectQuote = null;\n\t\t\t\t\n\t\t\t\tint index = 0;\nINDIRECTCHUNK:\tfor (Chunk aChunk : chunksIQ) {\n\t\t\t\t\tindex++;\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE CHUNK VALUE \" + aChunk.getChunkValue().toString());\n//\t\t\t\t\tif (aChunk.getChunkValue().equals(\"SBAR\")) {\n\t\t\t\t\tif(indirectQuoteIntroChunkValue.contains(aChunk.getChunkValue())){\n//\t\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE INDEX \" + \"\" + index);\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<Token> tokensSbar = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tToken.class, aChunk);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (Token aTokenSbar : tokensSbar){\n//\t\t\t\t\t\t\tString that = \"that\";\n\t\t\t\t\t\t\tif (compLemma.contains(aTokenSbar.getLemma().getCoveredText())){\n\t\t\t\t\t\t// VP test: does that clause contain VP?\n//\t\t\t\t\t\t\t\tSystem.out.println(\"TOK1\" + aTokenSbar.getLemma().getCoveredText());\n//\t\t\t \tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//NEW\n//\t\t\t\t\t\t\t\tif (LANGUAGE == \"en\")\n\t\t\t\t\t\t\t\tList<Token> precedingSbarTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\t\t\t\t\tToken.class, aChunk, 1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (Token aPrecedingSbarToken: precedingSbarTokens){ \n//\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOK2\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \tif (coordLemma.contains(aPrecedingSbarToken.getLemma().getValue().toString())){\n//\t\t\t\t \t\tSystem.out.println(\"TOKK\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t \t\tint k = 0;\n\t\t\t\t \tSAY:\tfor (Chunk chunkBeforeAndThat : chunksBeforeIndirectQuote){\n//\t\t\t\t \t\t\txxxx\n\t\t\t\t \t\tk++;\n\t\t\t\t \t\t\tif (chunkBeforeAndThat.getChunkValue().equals(\"VP\")){\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\tList<Token> tokensInVp = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToken.class, chunkBeforeAndThat);\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Token aTokenInVp : tokensInVp){\n//\t\t\t\t\t\t\t\t\t\t\t\t\tString and;\n//\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOKK\" + aTokenInVp.getLemma().getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (aTokenInVp.getLemma().getValue().equals(\"say\")){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY OLD\" + indirectQuoteBegin + \":\" + sentenceAnn.getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, k);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindirectQuoteBegin = chunksBeforeIndirectQuote.get(chunksBeforeIndirectQuote.size()-1).getEnd()+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY NEW\" + indirectQuoteBegin + \":\" );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak SAY;\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\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\t\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\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuoteChunk = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class, aChunk);\n\t\t\t\t\t\t\t\tif (coveringDirectQuoteChunk.isEmpty()){\n//\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t indirectQuote.setBegin(indirectQuoteBegin);\n//\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t indirectQuoteEnd = sentenceAnn.getEnd();\n\t\t\t\t\t\t\t\t indirectQuote.setEnd(indirectQuoteEnd);\n\t\t\t\t\t\t\t\t indirectQuote.addToIndexes();\n\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = false;\n//\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FALSE\");\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t List<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tToken.class, indirectQuote, 1);\n\t\t\t\t\t\t\t\t for (Token aFollow3Token: followTokens){\n\t\t\t\t\t\t\t\t\t List<QuoteAnnotation> subsequentDirectQuotes = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class,aFollow3Token);\n\t\t\t\t\t\t\t\t\t if (!subsequentDirectQuotes.isEmpty()){\n\t\t\t\t\t\t\t\t\t\t for (QuoteAnnotation subsequentDirectQuote: subsequentDirectQuotes){\n\t\t\t\t\t\t\t\t\t\t\t if (subsequentDirectQuote.getRepresentativeQuoteeMention() != null\n\t\t\t\t\t\t\t\t\t\t\t\t && subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")){\n//\t\t\t\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FOUND\"); \n\t\t\t\t\t\t\t\t\t\t\t hds.subsequentDirectQuote = subsequentDirectQuote;\n\t\t\t\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = true;\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t break INDIRECTCHUNK;\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\t\n\t\t\t\t}\n\t\t\t\t\tif (indirectQuoteBegin >= 0 && indirectQuoteEnd >= 0){\n//\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuote = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n//\t\t\t\t\t\tif (coveringDirectQuote.isEmpty()){\n////\t\t\t\t\t\t\t\n//\t\t\t\t\t\tindirectQuote.addToIndexes();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//indirect quote is covered by direct quote and therefore discarded\n//\t\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n//\t\t\t\t\t\t}\n\t\t\t\t\tList<QuoteAnnotation> coveredDirectQuotes = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n\t\t\t\t\tfor (QuoteAnnotation coveredDirectQuote : coveredDirectQuotes){\n//\t\t\t\t\t\tSystem.out.println(\"Hello, World covered direct quote\" + coveredDirectQuote.getCoveredText());\n\t\t\t\t\t\t//delete coveredDirectQuoteIndex\n\t\t\t\t\t\tcoveredDirectQuote.removeFromIndexes();\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\t//no indirect quote in sentence\n\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n\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\tRe-initialize markup variables since they are also used for direct quotes\n\t\t\t\t\t\tquotee_left = null;\n\t\t\t\t\t\tquotee_right = null; \n\t\t\t\t\t\t\n\t\t\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquote_relation_left = null;\n\t\t\t\t\t\tquote_relation_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquoteType = \"indirect\";\n\t\t\t\t\t\tquoteeReliability = 5;\n\t\t\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\t\t\tquotee_end = -5;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\tif (chunksBeforeIndirectQuote != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"chunksBeforeIndirectQuote FOUND!! \");\n\t\t\t\t\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"LEFT\", chunksBeforeIndirectQuote,\n\t\t\t\t\t\t\t\t\t hds, indirectQuote\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_left = quote_annotation_result[0];\n\t\t\t representative_quotee_left = quote_annotation_result[1];\n\t\t\t quote_relation_left = quote_annotation_result[2];\n//\t\t\t System.out.println(\"INDIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t\t + \" QUOTE RELATION \" + quote_relation_left);\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_left = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n\t\t\t\n\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\tif (quotee_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t\tindirectQuote.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\t\tindirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//indirect quote followed by direct quote:\n\t\t\t\t\t\t\t//the quotee and quote relation of the indirect quote are copied to the direct quote \n\t\t\t\t\t\t\t//Genetic researcher Otmar Wiestler hopes that the government's strict controls on genetic research \n\t\t\t\t\t\t\t//will be relaxed with the advent of the new ethics commission. \n\t\t\t\t\t\t\t//\"For one thing the government urgently needs advice, because of course it's such an extremely \n\t\t\t\t\t\t\t//complex field. And one of the reasons Chancellor Schröder formed this new commission was without \n\t\t\t\t\t\t\t//a doubt to create his own group of advisors.\"\n\n\t\t\t\t\t\t\tif (subsequentDirectQuoteInstance == true\n\t\t\t\t\t\t\t\t&&\thds.subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuotee().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuoteRelation().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t\t){\n//\t\t\t\t\t\t\t\tSystem.out.println(\"SUBSEQUENT UNCLEAR DIR QUOTE FOUND!!\"); \n\t\t\t\t\t\t\t\tint begin = hds.subsequentDirectQuote.getBegin();\n\t\t\t\t\t\t\t\tint end = hds.subsequentDirectQuote.getEnd();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteType(\"direct\");\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteeReliability(quoteeReliability_left + 2);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.addToIndexes();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE \" + quotee_left + quote_relation_left + quoteeReliability);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (quote_relation_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (quoteType != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE NOT FOUND\" + quote_relation_left);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (indirectQuote.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"NOW!!\" + indirectQuote.getRepresentativeQuoteeMention());\n\t\t\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(indirectQuote.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\t\t\tindirectQuote.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\t\t\tSystem.out.println(\"DBPEDIA \" + indirectQuote.getRepresentativeQuoteeMention() + \" URI: \" + hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t }\n//\t\t\t} //for chunk\n//\t\t\t\tsay without that\n//\t\t\t}\t\t\n\t\t} //Core map sentences indirect quotes\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n Pattern pattern = Pattern.compile(\"\\\\b(\\\\w+)(\\\\W+\\\\1\\\\b)+\",Pattern.CASE_INSENSITIVE);\r\n\r\n Scanner in = new Scanner(System.in);\r\n int numSentences = Integer.parseInt(in.nextLine());\r\n \r\n while (numSentences-- > 0) {\r\n String input = in.nextLine();\r\n \r\n Matcher matcher = pattern.matcher(input);\r\n \r\n while (matcher.find()) \r\n input = input.replaceAll(matcher.group(),matcher.group(1));\r\n // Prints the modified sentence.\r\n System.out.println(input);\r\n }\r\n \r\n in.close();\r\n }", "public boolean wordBreak(String s, List<String> wordDict) {\n boolean[] dp = new boolean[s.length()]; \n for (int i = 0; i <s.length(); i++) {\n if (wordDict.contains(s.substring(0, i+1))) {\n dp[i] = true;\n continue;\n }\n for (int k = 0; k < i; k++) {\n if (dp[k] && wordDict.contains(s.substring(k+1, i+1))) {\n dp[i] = true;\n System.out.println(i + \" \" +dp[i]);\n break;\n }\n }\n \n }\n return dp[s.length()-1];\n }", "public void computeParagraph(){\r\n\r\n\t\tstrBuff = new StringBuffer();\r\n\r\n\t\t//For else for ER2 rule of inserting the first letter of my last name twice before each consonant\r\n\t\tfor(int i = 0; i < paragraph.length(); i++){\r\n\r\n\t\t\tif(paragraph.charAt(i) == 'a' || paragraph.charAt(i) == 'e' || paragraph.charAt(i) == 'i'\r\n\t\t\t\t|| paragraph.charAt(i) == 'o' || paragraph.charAt(i) == 'u' || paragraph.charAt(i) == 'A'\r\n\t\t\t\t|| paragraph.charAt(i) == 'E' || paragraph.charAt(i) == 'I' || paragraph.charAt(i) == 'O'\r\n\t\t\t\t|| paragraph.charAt(i) == 'U' || paragraph.charAt(i) == ' ' || paragraph.charAt(i) == '.'\r\n\t\t\t\t|| paragraph.charAt(i) == '!' || paragraph.charAt(i) == '?'){\r\n\t\t\t\tstrBuff.append(paragraph.charAt(i));\r\n\t\t\t}\r\n\r\n\t\t\telse{\r\n\t\t\t\tstrBuff.append(\"OO\");\r\n\t\t\t\tstrBuff.append(paragraph.charAt(i));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tnewParagraph = strBuff.toString();\r\n\r\n\t\tcount = 0;\r\n\r\n\t\t//For for ER2 rule of counting the number of characters in the initial text excluding the number of vowels\r\n\t\tfor(int i = 0; i < paragraph.length(); i++){\r\n\t\t\tif(paragraph.charAt(i) != 'a' && paragraph.charAt(i) != 'e' && paragraph.charAt(i) != 'i'\r\n\t\t\t\t&& paragraph.charAt(i) != 'o' && paragraph.charAt(i) != 'u' && paragraph.charAt(i) != 'A'\r\n\t\t\t\t&& paragraph.charAt(i) != 'E' && paragraph.charAt(i) != 'I' && paragraph.charAt(i) != 'O'\r\n\t\t\t\t&& paragraph.charAt(i) != 'U'){\r\n\t\t\t\t\tcount++;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t}", "public List<String> sentenceSplit(String input)\n {\n return InputNormalizer.sentenceSplit(this.sentenceSplitters, input);\n }", "public String getCandidateSentences(HashMap<String, String> tripleDataMap) {\n String subUri = tripleDataMap.get(\"subUri\");\n String objUri = tripleDataMap.get(\"objUri\");\n String subLabel = tripleDataMap.get(\"subLabel\");\n String objLabel = tripleDataMap.get(\"objLabel\");\n\n String[] subArticleSentences = getSentencesOfArticle(getArticleForURI(subUri));\n String[] objArticleSentences = getSentencesOfArticle(getArticleForURI(objUri));\n String sentencesCollectedFromSubjArticle = null;\n String sentencesCollectedFromObjArticle = null;\n String sentence = null;\n if (subArticleSentences != null)\n sentencesCollectedFromSubjArticle = getSentencesHavingLabels(subLabel, objLabel, subArticleSentences);\n\n if (objArticleSentences != null)\n sentencesCollectedFromObjArticle = getSentencesHavingLabels(subLabel, objLabel, objArticleSentences);\n\n if (sentencesCollectedFromSubjArticle != null && sentencesCollectedFromObjArticle != null) {\n if (sentencesCollectedFromSubjArticle.length() <= sentencesCollectedFromObjArticle.length())\n sentence = sentencesCollectedFromSubjArticle;\n else\n sentence = sentencesCollectedFromObjArticle;\n } else if (sentencesCollectedFromSubjArticle != null) {\n sentence = sentencesCollectedFromSubjArticle;\n } else {\n sentence = sentencesCollectedFromObjArticle;\n }\n return sentence;\n }", "public void firstSem2b(){\n chapter = \"firstSem2b\";\n String firstSem2b = \"You decide that you'd better stay here and unpack, so your roommate goes ahead without you. In\" +\n \" no time at all, you've got everything arranged like you want it - the strand of Christmas lights, the band \" +\n \"posters, the pictures of you and your high school friends being cool. You decide you'd better go grab some food, \" +\n \"so you walk outside into the sunlight. Look around?\\t\";\n getTextIn(firstSem2b);\n }", "Stream<CharSequence> toParagraphs(CharSequence text);", "static Set<NLMeaning> extractMeanings(NLText nlText) {\n\t\tSet<NLMeaning> meanings = new HashSet();\n\t\t\n\t\tList<NLSentence> sentences = nlText.getSentences();\n\t\tNLSentence firstSentence = sentences.iterator().next();\n\t\tList<NLToken> tokens = firstSentence.getTokens();\n\t\tList<NLMultiWord> multiWords = firstSentence.getMultiWords();\n\t\tList<NLNamedEntity> namedEntities = firstSentence.getNamedEntities();\n\t\t\n\t\t// Add meanings of all tokens that are not part of multiwords or NEs\n\t\tIterator<NLToken> itToken = tokens.iterator();\n\t\twhile (itToken.hasNext()) {\n\t\t\tSet<NLMeaning> tokenMeanings = getTokenMeanings(itToken.next());\n\t\t\tif (tokenMeanings != null) {\n\t\t\t\tmeanings.addAll(tokenMeanings);\t\t\t\n\t\t\t}\n//\t\t\tNLToken token = itToken.next();\n//\t\t\tboolean hasMultiWords = token.getMultiWords() != null && !token.getMultiWords().isEmpty();\n//\t\t\tboolean hasNamedEntities = token.getNamedEntities() != null && !token.getNamedEntities().isEmpty();\n//\t\t\tif (!hasMultiWords && !hasNamedEntities) {\n//\t\t\t\tif (token.getMeanings() == null || token.getMeanings().isEmpty()) {\n//\t\t\t\t\t// This is a hack to handle a bug where the set of meanings\n//\t\t\t\t\t// is empty but there is a selected meaning.\n//\t\t\t\t\t\n//\t\t\t\t\tNLMeaning selectedMeaning = token.getSelectedMeaning();\n//\t\t\t\t\tif (selectedMeaning != null) {\n//\t\t\t\t\t\tmeanings.add(selectedMeaning);\n//\t\t\t\t\t}\n//\t\t\t\t} else {\n//\t\t\t\t\tmeanings.addAll(token.getMeanings());\n//\t\t\t\t}\n//\t\t\t}\n\t\t}\n\t\t\n\t\t// Add meanings of multiwords and NEs\n\t\tIterator<NLMultiWord> itMultiWord = multiWords.iterator();\n\t\twhile (itMultiWord.hasNext()) {\n\t\t\tNLMultiWord multiWord = itMultiWord.next();\n\t\t\tmeanings.addAll(multiWord.getMeanings());\n\t\t}\n\t\tIterator<NLNamedEntity> itNamedEntity = namedEntities.iterator();\n\t\twhile (itNamedEntity.hasNext()) {\n\t\t\tNLNamedEntity namedEntity = itNamedEntity.next();\n\t\t\tmeanings.addAll(namedEntity.getMeanings());\n\t\t}\n\t\t\n\t\treturn meanings;\n\t}", "public abstract void insertedSentences(long ms, int n);", "public synchronized void process() \n\t{\n\t\t// for each word in a line, tally-up its frequency.\n\t\t// do sentence-segmentation first.\n\t\tCopyOnWriteArrayList<String> result = textProcessor.sentenceSegmementation(content.get());\n\t\t\n\t\t// then do tokenize each word and count the terms.\n\t\ttextProcessor.tokenizeAndCount(result);\n\t}", "public static void textQueries(List<String> sentences, List<String> queries) {\n // Write your code here\n for(String q: queries){\n boolean a = false;\n int i=0;\n for(String s: sentences){\n if(Arrays.asList(s.split(\" \")).containsAll(Arrays.asList(q.split(\" \")))){\n System.out.print(i+\" \");\n a = true;\n }\n i++;\n }\n if(!a)\n System.out.println(-1);\n else\n System.out.println(\"\");\n }\n \n }", "public static ArrayList<String> wordTokenizer(String sentence){\n \n ArrayList<String> words = new ArrayList<String>();\n String[] wordsArr = sentence.replaceAll(\"\\n\", \" \").toLowerCase().split(\" \");\n \n for(String s : wordsArr){\n \n if(s.trim().compareTo(\"\") != 0)\n words.add(s.trim());\n \n }\n \n return words;\n \n }", "private void textilize () {\n\n textIndex = 0;\n int textEnd = line.length() - 1;\n listChars = new StringBuffer();\n linkAlias = false;\n while (textIndex < line.length()\n && (Character.isWhitespace(textChar()))) {\n textIndex++;\n }\n while (textEnd >= 0\n && textEnd >= textIndex\n && Character.isWhitespace (line.charAt (textEnd))) {\n textEnd--;\n }\n boolean blankLine = (textIndex >= line.length());\n if (blankLine) {\n textilizeBlankLine();\n }\n else\n if ((textIndex > 0)\n || ((line.length() > 0 )\n && (line.charAt(0) == '<'))) {\n // First character is white space of the beginning of an html tag:\n // Doesn't look like textile... process it without modification.\n }\n else\n if (((textEnd - textIndex) == 3)\n && line.substring(textIndex,textEnd + 1).equals (\"----\")) {\n // && (line.substring(textIndex, (textEnd + 1)).equals (\"----\")) {\n textilizeHorizontalRule(textIndex, textEnd);\n } else {\n textilizeNonBlankLine();\n };\n }", "public String translateSentence(String sentence)\n {\n // store the punctuation in a variable.\n String punc = sentence.substring(sentence.length() - 1);\n // Use split to tokenize the sentence as per spec.\n String[] words = sentence.split(\" \");\n int lastIdx = words.length - 1;\n // Replace the punctuation in the last word with nothing, we'll add it later at the end.\n words[lastIdx] = words[lastIdx].replace(punc, \"\");\n\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < words.length; i++)\n {\n // for the first word, we want to lowercase it and capitalize only the first letter.\n if (i == 0)\n {\n sb.append(convertToLatin(words[i].toLowerCase()) + \" \");\n }\n else\n {\n sb.append(convertToLatin(words[i]) + \" \");\n }\n }\n // Trim off the last space and add the punctuation.\n String sent = sb.toString().substring(0, sb.toString().length() - 1) + punc;\n sent = sent.substring(0, 1).toUpperCase() + sent.substring(1);\n return sent;\n }", "private void processArticle(String rawArticleText, Article article, Context context) throws IOException, InterruptedException {\n if (!rawArticleText.trim().isEmpty()) {\n String[] splitSentences = rawArticleText.split(\"\\\\.\\\\s\");\n PriorityQueue<Sentence> sortedSentences = new PriorityQueue<>();\n\n for (int sentenceIndex = 0; sentenceIndex < splitSentences.length; sentenceIndex++) {\n String rawSentence = splitSentences[sentenceIndex];\n Double sentenceTfIdf = getSentenceTfIdf(rawSentence, article);\n sortedSentences.add(new Sentence(sentenceTfIdf, rawSentence, sentenceIndex));\n }\n\n String summary = topOrderedSentences(sortedSentences);\n context.write(new IntWritable(article.id), new Text(summary));\n }\n }", "speech_formatting.SegmentedTextOuterClass.TokenSegment.BreakLevel getBreakLevel();", "private static String trimWhiteSpace(String sentence) {\n\t\tsentence = sentence.replaceAll(\"[^a-zA-Z]\", \" \");\n//\t\tsentence = sentence.replaceAll(\"\\n\", \" \");\n//\t\tsentence = sentence.replaceAll(\"\\t\", \" \");\n// sentence = sentence.replaceAll(\"\\\\.\", \" \");\n// sentence = sentence.replaceAll(\",\", \" \");\n \n//\t\tint length;\n//\t\tdo {\n//\t\t\tlength = sentence.length();\n//\t\t\tsentence = sentence.replaceAll(\" \", \" \");\n//\n//\t\t} while (sentence.length() < length);\n\t\treturn sentence;\n\t}", "public String get_last_sentence() {\r\n\t\ttry {\r\n\t\t\tint numBytes = SerialSubsystem.serial.getBytesReceived();\r\n\t\t\tif (numBytes >= 5) { // minimum valid sentence\r\n\t\t\t\tbyte readBytes[] = SerialSubsystem.serial.read(numBytes);\r\n\t\t\t\tString sentence= new String(readBytes);\r\n\t\t\t\tint end= sentence.lastIndexOf('\\n');\r\n\t\t\t\tif (end >= 4) { // minimum valid sentence length\r\n\t\t\t\t\t// strip bytes received past end of sentence\r\n\t\t\t\t\tsentence = sentence.substring(0, end);\r\n\t\t\t\t\t// find end of preceding sentence\r\n\t\t\t\t\tint start = sentence.lastIndexOf('<');\r\n\t\t\t\t\tif ((start >= 0) && (end > start+1)) {\r\n\t\t\t\t\t\treturn sentence.substring(start+1, end);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n protected List<Term> segSentence(char[] sentence)\n {\n WordNet wordNetAll = new WordNet(sentence);\n ////////////////生成词网////////////////////\n generateWordNet(wordNetAll);\n ///////////////生成词图////////////////////\n// System.out.println(\"构图:\" + (System.currentTimeMillis() - start));\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"粗分词网:\\n%s\\n\", wordNetAll);\n }\n// start = System.currentTimeMillis();\n List<Vertex> vertexList = viterbi(wordNetAll);\n// System.out.println(\"最短路:\" + (System.currentTimeMillis() - start));\n\n if (config.useCustomDictionary)\n {\n if (config.indexMode > 0)\n combineByCustomDictionary(vertexList, this.dat, wordNetAll);\n else combineByCustomDictionary(vertexList, this.dat);\n }\n\n if (HanLP.Config.DEBUG)\n {\n System.out.println(\"粗分结果\" + convert(vertexList, false));\n }\n\n // 数字识别\n if (config.numberQuantifierRecognize)\n {\n mergeNumberQuantifier(vertexList, wordNetAll, config);\n }\n\n // 实体命名识别\n if (config.ner)\n {\n WordNet wordNetOptimum = new WordNet(sentence, vertexList);\n int preSize = wordNetOptimum.size();\n if (config.nameRecognize)\n {\n PersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.translatedNameRecognize)\n {\n TranslatedPersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.japaneseNameRecognize)\n {\n JapanesePersonRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.placeRecognize)\n {\n PlaceRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (config.organizationRecognize)\n {\n // 层叠隐马模型——生成输出作为下一级隐马输入\n wordNetOptimum.clean();\n vertexList = viterbi(wordNetOptimum);\n wordNetOptimum.clear();\n wordNetOptimum.addAll(vertexList);\n preSize = wordNetOptimum.size();\n OrganizationRecognition.recognition(vertexList, wordNetOptimum, wordNetAll);\n }\n if (wordNetOptimum.size() != preSize)\n {\n vertexList = viterbi(wordNetOptimum);\n if (HanLP.Config.DEBUG)\n {\n System.out.printf(\"细分词网:\\n%s\\n\", wordNetOptimum);\n }\n }\n }\n\n // 如果是索引模式则全切分\n if (config.indexMode > 0)\n {\n return decorateResultForIndexMode(vertexList, wordNetAll);\n }\n\n // 是否标注词性\n if (config.speechTagging)\n {\n speechTagging(vertexList);\n }\n\n return convert(vertexList, config.offset);\n }", "public static String getRandomText(int wordCount, int paragraphs) {\n StringBuilder sb = new StringBuilder();\n int wordSize = 0;\n String[] parts = new String[] {};\n int i = 1000;\n\n while (wordSize < wordCount) {\n if (i >= parts.length) {\n i = 0;\n parts = getRandomIpsumBlock().split(\" \");\n }\n sb.append(parts[i]);\n if (wordSize + 1 < wordCount) {\n sb.append(\" \");\n } else if (!parts[i].endsWith(\".\")) {\n sb.append(\".\");\n }\n i++;\n wordSize++;\n }\n\n String text = sb.toString();\n ArrayList<Integer> dots = findAll(text, \".\");\n\n for (int j = 0; j < paragraphs - 1; j++) {\n if (dots.size() <= 2) {\n break;\n }\n\n int randomIndex = RandomNumberGenerator.getRandomInt(0, dots.size() - 1);\n Integer index = dots.get(randomIndex);\n text = insert(text, index + 2, \"\\n\\n\");\n\n for (int k = randomIndex + 1; k < dots.size(); k++) {\n dots.set(k, dots.get(k) + 2);\n }\n dots.remove(randomIndex);\n\n\n\n }\n\n return text.replaceAll(\",\\\\.\", \"\\\\.\");\n }", "public void splitString() {\n\t\t\tString sentence = \"I am studying\";\n\t\t\tString[] strings = sentence.split(\" \");\n\t\t\tSystem.out.println(\"Length is \" + strings.length);\n\n\n\t\t\tfor (int index = 0; index < strings.length; index++)\n\t\t\t\tSystem.out.println(strings[index]);\n\t\t}", "public interface StringBasic01 {\n\n\t/**\n\t * Palindrome is a String which give the same result by reading from left to right and from right to left.\n\t * Example: \"aabaa\" is a palindrome.\n\t * \"mom\" is a palindrome\n\t * \"radar\" is a palindrome\n\t * etc.\n\t * Using charAt(int position) function of Java String to check if a input String is palindrome\n\t *\n\t */\n\tstatic boolean isPalindrome(String s) {\n\t\tint i = 0, j = s.length() - 1;\n\t\twhile (i < j) {\n\t\t\tif (s.charAt(i) != s.charAt(j))\n\t\t\t\treturn false;\n\t\t\t++i;\n\t\t\t--j;\n\t\t}\n\t\treturn true;\n\t}\n\n\t\t/**\n\t\t * Given a paragraph of text, calculate how many sentences included in the paragraph.\n\t\t ** Example: paragraph = \"I have 2 pets, a cat and a dog. The cat's name is Milo. The dog's name is Ricky\";\n\t\t ** return should be 3.\n\t\t *\n\t\t * @param paragraph of text\n\t\t * @return the number of sentences\n\t\t * (Suggest: Using split function of String).\n\t\t */\n\n\t\tstatic int sentenceCount(String paragraph) {\n\t\t\tif (paragraph != null && !paragraph.isEmpty()) {\n\t\t\t\treturn paragraph.split(\"\\\\.\").length;\n\t\t\t}\n\t\t\telse return 0;\n\t\t}\n\n\t\t/**\n\t\t * Given a paragraph of text, which unfortunately contains bad writing style:\n\t\t * error1: each sentence doesn't begin with a capital letter\n\t\t * error2: there is space between commas and previous letter, like \"2 pets , a cat \"\n\t\t * error3: there is no space between commas and the next letter, like \"2 pets,a cat \"\n\t\t * error4: there is space between period and previous letter, like \"a dog .\"\n\t\t * error5: there is more than one space between words, like \"a dog\"\n\t\t * Write code to correct the paragraph.\n\t\t ** Example: paragraph = \"i have 2 pets , a cat and a dog. the cat's name is Milo . the dog's name is Ricky\"\n\t\t ** output = \"I have 2 pets, a cat and a dog. The cat's name is Milo. The dog's name is Ricky\"\n\t\t *\n\t\t * @param paragraph of wrong text\n\t\t * @return corrected paragraph\n\t\t * Suggest: using some of followings: split, replace, toUpperCase.\n\t\t */\n\t\tstatic String correctParagraph(String paragraph) {\n\n\t\t\tString newText = paragraph.replaceAll(\"\\\\s{2,}+\", \" \");\n\n\t\t\tnewText = newText.replaceAll(\"\\\\s+,\", \",\");\n\t\t\tnewText = newText.replaceAll(\"\\\\s+\\\\.\", \".\");\n\n\n\t\t\tString firstLetter = newText.substring(0, 1).toUpperCase();\n\t\t\tnewText = firstLetter + newText.substring(1);\n\n\t\t\tString[] sentences = newText.split(\"\\\\.\");\n\t\t\tfor(int i = 0; i < sentences.length; i++){\n\t\t\t\tString temp = sentences[i].trim();\n\t\t\t\tfirstLetter = temp.substring(0, 1).toUpperCase();\n\t\t\t\tsentences[i] = firstLetter + temp.substring(1);\n\t\t\t}\n\t\t\tStringBuilder newParagraph = new StringBuilder(sentences[0]);\n\t\t\tfor(int i = 1; i < sentences.length; i++){\n\t\t\t\tnewParagraph.append(\". \").append(sentences[i]);\n\t\t\t}\n\t\t\tnewText = newParagraph.append(\".\").toString();\n\n\t\t\treturn newText;\n\t\t}\n\n /**\n * Given an article and a keyword. Find how many times the key words appear in the articles\n * Example:\n * article = \"Business Insider teamed up with Zillow's rental site, HotPads, to find the\n * median rent for a one-bedroom apartment in each of the 49 US metro areas with the largest\n * populations (as determined by Zillow). We also used Data USA to find the median household\n * income in each of these areas.\n *\n * The data was compiled using HotPad's Repeat Rent Index. Each of the one-bedroom apartments\n * analyzed in the study has been listed for rent on HotPads for longer than a month.\"\n * keyword = \"one-bedroom\".\n * Because the word \"one-bedroom\" appears twice in the paragraph, therefore:\n * countAppearances should return 2.\n * @param article: String. like a newspaper article\n * @param keyword: keyword to find in the articles\n * @return the number of appearances\n * Suggest: use method indexOf\n */\n\n\n\tstatic int countAppearances(String article, String keyword) {\n\t\tif(keyword.isEmpty()){\n\t\t\treturn 0;\n\t\t}\n\t\tString newArticle = article.replace(keyword, \"\");\n\t\treturn (article.length() - newArticle.length())/keyword.length();\n\t}\n\n\n}", "public void firstSem10a(){\n chapter = \"firstSem10a\";\n String firstSem10a = \"There's a commotion outside your room - your door looks like it's been smashed down, and your RA is standing outside, looking \" +\n \"distressed. You can hear a shout from inside - your roommate - and sounds of a struggle. \\\"Get in there and help!\\\" you shout to the RA, \" +\n \"but he just shakes his head. \\\"Sorry, I can't. I'm anti-violence. You can't fight hate with hate, you know.\\\"\\tPushing past him, you \" +\n \"run into your room to see your roommate grappling with a large beast. THE beast. It is real. What do you want to do?\";\n getTextIn(firstSem10a);\n }", "private Sentence parseSentence(Sentence s) throws Exception {\n\t\tif(s == null)\n\t\t\treturn null;\n\t\treturn (useParser)?textTools.parseSentence(s):s;\n\t}", "public void firstSem10c(){\n chapter = \"firstSem10c\";\n String firstSem10c = \"Shocked, you wander around your very empty dorm room, staring at the broken glass. You spy a scrap of paper nearby - it's \" +\n \"a part of the Dave Grohl poster. How can he still be smiling at a time like this? \\\"Man, I'm sorry,\\\" your RA says again. \\\"That sucks. \" +\n \"I can help you clean up the glass and stuff. You want Insomnia Cookie or anything? On me. Well, partially. I only have like ten dollars.\\\" \" +\n \"You nod, only half-listening. \\\"Yeah.\\\" you say finally. \\\"Cookies would be good.\\\"\\n\\t LATER...\\n\";\n getTextIn(firstSem10c);\n }", "private void makeLines(LayoutContext lc) {\n //String s = new String(text);\n boolean isLastLine = false;\n int tries = 0;\n int curWidth, wordWidth, lineStart, wordEnd, wordStart, newWidth, textLen, beg, maxM2, spaceW;\n curWidth = lineStart = wordEnd = beg = 0;\n char[] text = this.text;\n textLen = text.length;\n maxM2 = textLen - 2;\n spaceW = fm.charWidth(' ');\n boolean glue = false;\n\n do {\n beg = wordEnd;\n\n // find next word\n for (wordStart = beg;; wordStart++) {\n if (wordStart >= textLen) // trailing blanks?\n {\n if (tries > 0) // guich@tc114_81\n {\n lc.disjoin();\n addLine(lineStart, wordEnd, false, lc, false);\n tries = 0;\n }\n wordEnd = wordStart;\n isLastLine = true;\n break;\n }\n if (text[wordStart] != ' ') // is this the first non-space char?\n {\n wordEnd = wordStart;\n do {\n if (++wordEnd >= textLen) {\n isLastLine = true;\n break;\n }\n } while (text[wordEnd] != ' ' && text[wordEnd] != '/'); // loop until the next space/slash char\n // use slashes as word delimiters (useful for URL addresses).\n if (maxM2 > wordEnd && text[wordEnd] == '/' && text[wordEnd + 1] != '/') {\n wordEnd++;\n }\n break;\n }\n }\n if (!lc.atStart() && wordStart > 0 && text[wordStart - 1] == ' ') {\n wordStart--;\n }\n wordWidth = fm.stringWidth(text, wordStart, wordEnd - wordStart);\n if (curWidth == 0) {\n lineStart = beg = wordStart; // no spaces at start of a line\n newWidth = wordWidth;\n } else {\n newWidth = curWidth + wordWidth;\n }\n\n if (lc.x + newWidth <= lc.maxWidth) {\n curWidth = newWidth + spaceW;\n } else // split: line length now exceeds the maximum allowed\n {\n //if (text[wordStart] == ' ') {wordStart++; wordWidth -= spaceW;}\n if (curWidth > 0) {\n // At here, wordStart and wordEnd refer to the word that overflows. So, we have to stop at the previous word\n wordEnd = wordStart;\n if (text[wordEnd - 1] == ' ') {\n wordEnd--;\n }\n if (DEBUG) {\n Vm.debug(\"1. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + \"\\\": \" + curWidth + \" \" + isLastLine);\n }\n addLine(lineStart, wordEnd, true, lc, glue);\n curWidth = 0;\n isLastLine = false; // must recompute the last line, since there's at least a word left.\n } else if (!lc.atStart()) // case of \"this is a text at the end <b>oftheline</b>\" -> oftheline will overflow the screen\n {\n if (++tries == 2) {\n break;\n }\n if (DEBUG) {\n Vm.debug(\"2 \" + isLastLine);\n }\n // Nothing was gathered in, but the current line has characters left by a previous TextSpan. This occurs only once.\n addLine(0, 0, false, lc, glue);\n curWidth = 0;\n isLastLine = false; // must recompute the last line, since there's at least a word left.\n } else {\n // Rare case where we both have nothing gathered in, and the physical line is empty. Had this not been made, then we\n // woud have generated an extra-line at the top of the block.\n if (DEBUG) {\n Vm.debug(\"3. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + '\"');\n }\n if (lineStart != wordEnd) {\n addLine(lineStart, wordEnd, true, lc, glue);\n }\n }\n glue = true;\n }\n } while (!isLastLine);\n\n if (wordEnd != lineStart) {\n //curWidth = fm.stringWidth(text, lineStart, wordEnd-lineStart);\n boolean split = lc.x + curWidth > lc.maxWidth && style.hasInitialValues() && style.isDisjoint;\n if (DEBUG) {\n Vm.debug(\"4. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + \"\\\" \" + split);\n }\n addLine(lineStart, wordEnd, split, lc, glue);\n }\n }", "protected abstract String[] tokenizeImpl(String text);", "private void parseEntities() {\n // See: https://github.com/twitter/twitter-text/tree/master/java\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractCashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractHashtagsWithIndices(getText()));\n entities.addExtractedEntities(TweetEntityAbstract.entitiesExtractor.extractMentionedScreennamesWithIndices(getText()));\n }", "@Test(timeout = 4000)\n public void test57() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confus with th key that appear in th cit command and at th begin of th databas entr.\");\n assertEquals(\"us for alphab, cro refer, and creat a label when th ``author'' inform is mi. th field should not be confus with th key that appear in th cit command and at th begin of th datab entr.\", string0);\n }", "@Override\n\tpublic void runFromSentence(TokenizedSentence sentence) \n\t{\n\t\t\n\t}", "public String getSentencesWithTerm(String paragraph, String term, boolean lemmatised) {\n String result = \"\";\n\n // Create an empty Annotation just with the given text\n document = new Annotation(paragraph);\n // Run Annotators on this text\n pipeline.annotate(document);\n\n // Use map to track sentences so that a sentence is not returned twice\n sentences = new HashMap();\n int key = 0;\n for (CoreMap coreMap : document.get(CoreAnnotations.SentencesAnnotation.class)) {\n sentences.put(key, coreMap.toString());\n key++;\n }\n\n Set keySet = sentences.keySet();\n Set<Integer> returnedSet = new HashSet();\n Iterator keyIterator = keySet.iterator();\n // These are all the sentences in this document\n while (keyIterator.hasNext()) {\n int id = (int) keyIterator.next();\n String content = sentences.get(id);\n // This is the current sentence\n String thisSentence = content;\n // Select sentence if it contains term and is not already returned\n if (!returnedSet.contains(id)) { // ensure sentence not already used\n String label = lemmatise(term);\n if (StringUtils.contains(lemmatise(thisSentence.toLowerCase()), label)\n || StringUtils.contains(lemmatise(StringOps.stripAllParentheses(thisSentence.toLowerCase())), label)) { // lookup lemmatised strings\n result = result + \" \" + thisSentence.trim(); // Concatenate new sentence\n returnedSet.add(id);\n }\n }\n }\n\n if (null != result && lemmatised) {\n result = lemmatise(result);\n }\n\n return result;\n }", "private java.util.ArrayList<String> textSplit(String splitted) {\n java.util.ArrayList<String> returned = new java.util.ArrayList<String>();\n String relatedSeparator = this.getLineSeparator(splitted);\n String[] pieces = splitted.split(relatedSeparator + relatedSeparator);\n String rstr = \"\";\n for (int cpiece = 0; cpiece < pieces.length; cpiece++) {\n String cstr = pieces[cpiece];\n if (rstr.length() + cstr.length() > maxLength) {\n if (!rstr.isEmpty()) {\n returned.add(rstr);\n rstr = cstr;\n }\n else {\n returned.add(cstr);\n }\n }\n else {\n if (rstr.equals(\"\")) {\n rstr = cstr;\n }\n else {\n rstr = rstr + lineSeparator + lineSeparator + cstr;\n }\n }\n if (cpiece == pieces.length - 1) {\n returned.add(rstr);\n }\n }\n return returned;\n }", "public static void main(String[] args) throws Exception {\n\t\tTSNodeLabel structure = new TSNodeLabel(\"(S (NP (NNP Mary)) (VP-H (VBZ-H is) (VP (VBG-H singing) (NP (DT an) (JJP (JJ old) (CC and) (JJ beautiful)) (NN-H song)))))\");\n\t\tchunkSentence(structure);\n\t}", "public Map<String, String> partsOfSpeech(String input) {\n Map<String, String> output = new HashMap();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n document.get(CoreAnnotations.TokensAnnotation.class).stream().forEach((token) -> {\n // this is the text of the token\n String word = token.get(CoreAnnotations.TextAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n output.put(word, pos);\n });\n\n return output;\n }", "void getNextWord () \n\t\t\tthrows IOException, FileNotFoundException {\n \n\t\tcontext.word.setLength(0);\n \n // Build the next entity\n while ((context.entityCharCount > 0)\n && (! atEnd)) {\n getNextCharacter();\n }\n \n // See if the word starts with white space\n boolean startingWhiteSpaceForWord\n = (htmlChar.whiteSpace \n && (context.fieldType == HTMLContext.TEXT)\n && (! context.preformatted));\n \n // Capture leading whitespace if appropriate\n if (htmlChar.whiteSpace\n && context.fieldType == HTMLContext.TEXT\n && (context.field.length() > 0\n || context.preformatted)) {\n context.word.append (htmlChar.character);\n }\n \n // If we're dealing with preformatted text, \n // then capture all leading white space\n if (context.preformatted && context.fieldType == HTMLContext.TEXT) {\n while (htmlChar.whiteSpace && (! atEnd)) {\n context.word.append (htmlChar.character);\n getNextCharacter();\n }\n }\n \n // Now skip any remaining white space\n while (((htmlChar.whiteSpace) \n || context.entityCharCount > 0)\n && (! atEnd)) {\n getNextCharacter();\n }\n \n // See if we've got got a quoted attribute value\n\t\tif (context.fieldType == HTMLContext.ATTRIBUTE_VALUE\n && (! htmlChar.translatedEntity)) {\n if (htmlChar.character == GlobalConstants.DOUBLE_QUOTE) {\n context.quoted = true;\n context.startQuoteChar = GlobalConstants.DOUBLE_QUOTE;\n }\n else\n if (htmlChar.character == GlobalConstants.SINGLE_QUOTE) {\n context.quoted = true;\n context.startQuoteChar = GlobalConstants.SINGLE_QUOTE;\n }\n\t\t}\n \n // Now capture the word's content\n\t\twhile (! htmlChar.endsWord) {\n\t\t\tcontext.word.append (htmlChar.character);\n\t\t\tdo {\n getNextCharacter();\n } while ((context.entityCharCount > 0) && (! atEnd));\n\t\t}\n \n\t\tif (context.quoted\n && (! htmlChar.translatedEntity)\n\t\t\t\t&& htmlChar.character == context.startQuoteChar) {\n\t\t\tcontext.word.append (htmlChar.character);\n context.quoted = false;\n\t\t\tdo {\n getNextCharacter();\n } while ((context.entityCharCount > 0) && (! atEnd));\n\t\t}\n if (startingWhiteSpaceForWord\n && context.fieldType == HTMLContext.TEXT\n && context.word.length() > 0\n && (! Character.isWhitespace (context.word.charAt (0)))) {\n context.word.insert (0, ' ');\n }\n\t}", "boolean break_word (ArrayList<String> strings, int index, String word) {\n boolean withWord = false;\n if (dictionary.contains(word)) {\n strings.add(word);\n if (index == sentence.length()) {\n System.out.println (strings);\n return true;\n }\n withWord = break_word(new ArrayList<String>(strings), index, \"\");\n strings.remove(strings.size() - 1);\n }\n if (index == sentence.length())\n return false;\n word += sentence.charAt(index);\n return break_word(new ArrayList<String>(strings), index+1, word) || withWord;\n }", "public boolean isClosedSentence() {\n FreeVariableDetector fvd = new FreeVariableDetector(this.wffTree);\n GroundSentenceDeterminer gsd = new GroundSentenceDeterminer(this.wffTree);\n return fvd.getFreeVariables().isEmpty() && !gsd.isGroundSentence();\n }", "public String breakUp(String m){\n int arrSize = (int)(m.length()/35 + 0.5);\n\n String[] bySpace = m.split(\" \",0);\n String realMessage = \"\";\n int size = 0;\n for(int i = 0; i < bySpace.length;i++){\n size += bySpace[i].length();\n if(size > 35){\n size = 0;\n realMessage += \"\\n\";\n }\n realMessage += bySpace[i];\n }\n return realMessage;\n }", "public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }", "private void getSentenceTense(String pos)\n\t{\n\t\tif (pos.equalsIgnoreCase(\"VBD\")) // I ate pizza. \n\t\t\tSentenceTenseDirection = Tense_Direction.PAST; \n\t\tif (pos.equalsIgnoreCase(\"VB\"))\tTenseFlag=true; \n\t\tif (pos.equalsIgnoreCase(\"MD\"))\tModalFlag=true; \n\t\tif ((TenseFlag == true) && (ModalFlag==true)) // I will eat pizza. \n\t\t\tSentenceTenseDirection = Tense_Direction.FUTURE; \n\t\tif (((TenseFlag == true) && (ModalFlag==false)) || (pos.equalsIgnoreCase(\"VBP\"))) // I eat pizza. \n\t\t\tSentenceTenseDirection = Tense_Direction.PRESENT;\n\t\t\n\t\t// ============== Get Type of Tense: Simple, Continuous, Perfect, Perfect Continuous\n\t\tif (pos.equalsIgnoreCase(\"VBG\")) \n\t\t{\n\t\t\tContinuousFlag=true;\n\t\t\tSentenceTenseModifier = Tense_Modifier.CONTINUOUS; // Continuous: eating, smoking, ...\n\t\t}\n\t\t\n\t\tif (pos.equalsIgnoreCase(\"VBN\"))\n\t\t{\n\t\t\tPerfectFlag=true;\n\t\t\tSentenceTenseModifier = Tense_Modifier.PERFECT; // Perfect: eaten \n\t\t}\n\t\t\n\t\tif ((ContinuousFlag==true) && (PerfectFlag==true))\n\t\t{\n\t\t\tPerfectContinuousFlag = true;\n\t\t\tPerfectFlag = false;\n\t\t\tContinuousFlag = false;\n\t\t\tSentenceTenseModifier = Tense_Modifier.PERFECT_CONTINUOUS; // I will have been eating pizza. \n\t\t}\n\t\t\n\t\tif ((PerfectFlag || ContinuousFlag || PerfectContinuousFlag)) {} else // Perfect Simple: I ate pizza. \n\t\t\tSentenceTenseModifier = Tense_Modifier.SIMPLE; \n\t\n\t}", "@Test\n void nlpPipeline() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n assertFalse(sentences.isEmpty());\n }", "public static void extractGroups(CoNLLPart part) {\n\t\tHashMap<String, Integer> chainMap = EMUtil.formChainMap(part\n\t\t\t\t.getChains());\n\t\tArrayList<Mention> allMentions = EMUtil.extractMention(part);\n\t\tCollections.sort(allMentions);\n\t\tEMUtil.assignNE(allMentions, part.getNameEntities());\n\t\tfor (int i = 0; i < allMentions.size(); i++) {\n\t\t\tMention m = allMentions.get(i);\n\n\t\t\tif (m.gram == EMUtil.Grammatic.subject && m.start == m.end\n\t\t\t\t\t&& part.getWord(m.end).posTag.equals(\"PN\")) {\n\t\t\t}\n\n\t\t\tif (m.gram == EMUtil.Grammatic.subject\n\t\t\t\t\t&& EMUtil.pronouns.contains(m.extent)\n\t\t\t// && chainMap.containsKey(m.toName())\n\t\t\t) {\n\t\t\t\tArrayList<Mention> ants = new ArrayList<Mention>();\n\t\t\t\tint corefCount = 0;\n\t\t\t\tfor (int j = i - 1; j >= 0; j--) {\n\t\t\t\t\tMention ant = allMentions.get(j);\n\t\t\t\t\tants.add(ant);\n\t\t\t\t\tant.MI = Context.calMI(ant, m);\n\t\t\t\t\tboolean coref = isCoref(chainMap, m, ant);\n\t\t\t\t\tif (coref) {\n\t\t\t\t\t\tcorefCount++;\n\t\t\t\t\t}\n\t\t\t\t\tif (m.s.getSentenceIdx() - ant.s.getSentenceIdx() > 2) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tCollections.sort(ants);\n\t\t\t\tCollections.reverse(ants);\n\n\t\t\t\tif (corefCount == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (Mention ant : ants) {\n\t\t\t\t\tant.isBest = false;\n\t\t\t\t}\n\n\t\t\t\tApplyEM.findBest(m, ants);\n\n\t\t\t\tif (ants.size() > maxAnts) {\n\t\t\t\t\tmaxAnts = ants.size();\n\t\t\t\t}\n\t\t\t\tString origPro = m.extent;\n\n\t\t\t\tString ext = m.extent;\n\t\t\t\tif (map.containsKey(ext)) {\n\t\t\t\t\tmap.put(ext, map.get(ext) + 1);\n\t\t\t\t} else {\n\t\t\t\t\tmap.put(ext, 1);\n\t\t\t\t}\n\t\t\t\tStringBuilder ysb = new StringBuilder();\n\t\t\t\tfor (int h = 0; h < EMUtil.pronounList.size(); h++) {\n\t\t\t\t\tm.extent = EMUtil.pronounList.get(h);\n\t\t\t\t\tgenerateInstance(part, chainMap, m, ants,\n\t\t\t\t\t\t\tcorefCount, origPro, h, ysb);\n\t\t\t\t}\n\t\t\t\tfor (int k = ants.size() * EMUtil.pronounList.size(); k < 840; k++) {\n\t\t\t\t\tysb.append(\"@ 0 NOCLASS 1 # \");\n\t\t\t\t}\n\t\t\t\tyasmet10.add(ysb.toString());\n\t\t\t\tm.extent = origPro;\n\t\t\t}\n\t\t}\n\t}", "Stream<List<Term>> toSentences(List<Integer> intText, List<Term> termText);", "public String questionsDependingOnWordLength(String bigWord) throws Exception{\n\t\tString s = \"\";\n\t\tString sentence = \"\";\n\t\ttry{\n\t\t\tif(bigWord.length() < 3){//if less than 3\n\t\t\t\ts = \"Is there something else you would like to discuss?\";\n\n\t\t\t}\n\t\t\telse if(bigWord.length() == 3){\n\t\t\t\ts = \"Why do you feel \\\"\" + bigWord + \"\\\" is important?\";\n\t\t\t}\n\t\t\telse if(bigWord.length() == 4){\n\t\t\t\ts = \"OK tell more about \\\"\" + bigWord + \"\\\"\";\n\t\t\t}\n\t\t\telse if(bigWord.length() == 5){ \n\t\t\t\ts = \"How does \\\"\" + bigWord + \"\\\" affect you?\";\n\t\t\t}\n\t\t\telse if(bigWord.length() > 5){//if greater than 5\n\t\t\t\ts = \"We seem to be making great progress with \\\"\"+ bigWord + \"\\\"\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthrow new Exception(\"Invalid input!\");\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){\n\t\t\ts = e.getMessage();\n\t\t}\n\n\t\treturn s;\n\t}", "public void run(){\n\t\ttry{\n\t\t\t// lock text up to the end of sentence\n\t\t\tstartScan();\n\t\t\tfor(int i=0;i<sentences.length;i++)\n\t\t\t\tprocessSentence(parseSentence(sentences[i]));\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\t\n\t\t}finally {\n\t\t\ttry{\n\t\t\t\tstopScan();\n\t\t\t}catch(Exception ex){\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7004307", "0.68297416", "0.63618267", "0.6243614", "0.60550916", "0.6033613", "0.60321283", "0.5949673", "0.5874586", "0.5808802", "0.5771706", "0.5769263", "0.57160354", "0.56863713", "0.56329197", "0.55792093", "0.54541314", "0.5437523", "0.53625983", "0.53468645", "0.53463656", "0.5341568", "0.53351116", "0.53336966", "0.5324564", "0.5270198", "0.52408314", "0.5238429", "0.5237141", "0.52331936", "0.5232834", "0.51494795", "0.514143", "0.5077708", "0.5071397", "0.50454295", "0.5041755", "0.50229794", "0.49859744", "0.49774984", "0.4943441", "0.49203393", "0.49138305", "0.49042916", "0.48619223", "0.48615617", "0.4854252", "0.4852957", "0.484185", "0.48336256", "0.48168144", "0.4816709", "0.48098862", "0.4809433", "0.4801836", "0.47929314", "0.47844124", "0.47702658", "0.47484323", "0.47428414", "0.47398454", "0.47371718", "0.47283378", "0.47221592", "0.47175038", "0.47152224", "0.47086865", "0.46949342", "0.46898535", "0.46857777", "0.4681955", "0.46814972", "0.4681211", "0.4680883", "0.46803638", "0.46738324", "0.46735647", "0.4668543", "0.46658614", "0.4662329", "0.46610883", "0.46445754", "0.46394145", "0.4624197", "0.4614006", "0.46058062", "0.46034697", "0.46034282", "0.46019152", "0.4598038", "0.45978788", "0.45887288", "0.45864013", "0.45843947", "0.4581146", "0.458014", "0.45701662", "0.45659572", "0.45654857", "0.45506153" ]
0.7405917
0
This is really ugly
protected static String[] parseVideoUrl(String url) { Pattern youtubePattern1 = Pattern.compile("youtube\\.com\\/watch\\?v=([^&#]+)"); Pattern youtubePattern2 = Pattern.compile("youtu\\.be\\/([^&#]+)"); Pattern youtubePlaylist = Pattern.compile("youtube\\.com\\/playlist\\?list=([^&#]+)"); Pattern twitchPattern = Pattern.compile("twitch\\.tv\\/([^&#]+)"); Pattern justintvPattern = Pattern.compile("justin\\.tv\\/([^&#]+)"); Pattern livestreamPattern = Pattern.compile("livestream\\.com\\/([^&#]+)"); Pattern ustreamPattern = Pattern.compile("ustream\\.tv\\/([^&#]+)"); Pattern vimeoPattern = Pattern.compile("vimeo\\.com\\/([^&#]+)"); Pattern dailymotionPattern = Pattern.compile("dailymotion\\.com\\/video\\/([^&#]+)"); Pattern soundcloudPattern = Pattern.compile("soundcloud\\.com\\/([^&#]+)"); Pattern googlePattern = Pattern.compile("docs\\.google\\.com\\/file\\/d\\/(.*?)\\/edit"); Matcher matcher1 = youtubePattern1.matcher(url); Matcher matcher2 = youtubePattern2.matcher(url); Matcher matcher3 = youtubePlaylist.matcher(url); Matcher matcher4 = twitchPattern.matcher(url); Matcher matcher5 = justintvPattern.matcher(url); Matcher matcher6 = livestreamPattern.matcher(url); Matcher matcher7 = ustreamPattern.matcher(url); Matcher matcher8 = vimeoPattern.matcher(url); Matcher matcher9 = dailymotionPattern.matcher(url); Matcher matcher10 = soundcloudPattern.matcher(url); Matcher matcher11 = googlePattern.matcher(url); if (matcher1.find()) { return new String[]{matcher1.group(1), "yt"}; } if (matcher2.find()) { return new String[]{matcher2.group(1), "yt"}; } if (matcher3.find()) { return new String[]{matcher3.group(1), "yp"}; } if (matcher4.find()) { return new String[]{matcher4.group(1), "tw"}; } if (matcher5.find()) { return new String[]{matcher5.group(1), "jt"}; } if (matcher6.find()) { return new String[]{matcher6.group(1), "li"}; } if (matcher7.find()) { return new String[]{matcher7.group(1), "us"}; } if (matcher8.find()) { return new String[]{matcher8.group(1), "vm"}; } if (matcher9.find()) { return new String[]{matcher9.group(1), "dm"}; } if (matcher10.find()) { return new String[]{url, "sc"}; } if (matcher11.find()) { return new String[]{matcher11.group(1), "gd"}; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_4270() {}", "private void kk12() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private void poetries() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract String mo9239aw();", "private SBomCombiner()\n\t{}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private final java.lang.String B(java.util.Map<java.lang.String, ? extends java.lang.Object> r11) {\n /*\n r10 = this;\n r11 = r11.entrySet();\n r11 = (java.lang.Iterable) r11;\n r0 = new java.util.ArrayList;\n r0.<init>();\n r0 = (java.util.Collection) r0;\n r11 = r11.iterator();\n L_0x0011:\n r1 = r11.hasNext();\n if (r1 == 0) goto L_0x004e;\n L_0x0017:\n r1 = r11.next();\n r2 = r1;\n r2 = (java.util.Map.Entry) r2;\n r3 = r2.getKey();\n r3 = (java.lang.CharSequence) r3;\n r3 = r3.length();\n r4 = 1;\n r5 = 0;\n if (r3 <= 0) goto L_0x002e;\n L_0x002c:\n r3 = 1;\n goto L_0x002f;\n L_0x002e:\n r3 = 0;\n L_0x002f:\n if (r3 == 0) goto L_0x0047;\n L_0x0031:\n r2 = r2.getValue();\n r2 = r2.toString();\n r2 = (java.lang.CharSequence) r2;\n r2 = r2.length();\n if (r2 <= 0) goto L_0x0043;\n L_0x0041:\n r2 = 1;\n goto L_0x0044;\n L_0x0043:\n r2 = 0;\n L_0x0044:\n if (r2 == 0) goto L_0x0047;\n L_0x0046:\n goto L_0x0048;\n L_0x0047:\n r4 = 0;\n L_0x0048:\n if (r4 == 0) goto L_0x0011;\n L_0x004a:\n r0.add(r1);\n goto L_0x0011;\n L_0x004e:\n r0 = (java.util.List) r0;\n r1 = r0;\n r1 = (java.lang.Iterable) r1;\n r11 = \"&\";\n r2 = r11;\n r2 = (java.lang.CharSequence) r2;\n r3 = 0;\n r4 = 0;\n r5 = 0;\n r6 = 0;\n r11 = com.iqoption.core.connect.http.Http$urlEncode$2.baR;\n r7 = r11;\n r7 = (kotlin.jvm.a.b) r7;\n r8 = 30;\n r9 = 0;\n r11 = kotlin.collections.u.a(r1, r2, r3, r4, r5, r6, r7, r8, r9);\n r11 = r10.ft(r11);\n return r11;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.core.connect.http.c.B(java.util.Map):java.lang.String\");\n }", "public abstract String mo13682d();", "public abstract String mo41079d();", "private void m50366E() {\n }", "String processing();", "public abstract int mo9754s();", "abstract String mo1748c();", "protected abstract Set method_1559();", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "private void level7() {\n }", "private static java.lang.String a(java.lang.String r5, java.util.Map r6, boolean r7) {\n /*\n r2 = F;\n r3 = new java.lang.StringBuilder;\n r0 = r5.length();\n r3.<init>(r0);\n r0 = 0;\n r1 = r0;\n L_0x000d:\n r0 = r5.length();\n if (r1 >= r0) goto L_0x0035;\n L_0x0013:\n r4 = r5.charAt(r1);\n r0 = java.lang.Character.toUpperCase(r4);\n r0 = java.lang.Character.valueOf(r0);\n r0 = r6.get(r0);\n r0 = (java.lang.Character) r0;\n if (r0 == 0) goto L_0x002c;\n L_0x0027:\n r3.append(r0);\t Catch:{ RuntimeException -> 0x003a }\n if (r2 == 0) goto L_0x0031;\n L_0x002c:\n if (r7 != 0) goto L_0x0031;\n L_0x002e:\n r3.append(r4);\t Catch:{ RuntimeException -> 0x003c }\n L_0x0031:\n r0 = r1 + 1;\n if (r2 == 0) goto L_0x003e;\n L_0x0035:\n r0 = r3.toString();\n return r0;\n L_0x003a:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x003c }\n L_0x003c:\n r0 = move-exception;\n throw r0;\n L_0x003e:\n r1 = r0;\n goto L_0x000d;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, java.util.Map, boolean):java.lang.String\");\n }", "public abstract String mo118046b();", "public abstract String mo11611b();", "public abstract String mo83558a(Object obj);", "protected java.util.List x (java.lang.String r19){\n /*\n r18 = this;\n r0 = r18;\n r2 = r0.K;\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\n r2 = (java.util.List) r2;\n if (r2 == 0) goto L_0x000f;\n L_0x000e:\n return r2;\n L_0x000f:\n r12 = java.util.Collections.emptyList();\n r2 = r18.bp();\n r3 = r18.TaskHandler(r19);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r4 = r2.setDrawable(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n if (r4 != 0) goto L_0x0026;\n L_0x0021:\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0026:\n r13 = r2.getScaledMaximumFlingVelocity(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r14 = new java.io.ByteArrayOutputStream;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r2 = 2048; // 0x800 float:2.87E-42 double:1.0118E-320;\n r14.<creatCallTask>(r2);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13, r14);\t Catch:{ all -> 0x00f2 }\n r2 = r14.toByteArray();\t Catch:{ all -> 0x00f2 }\n r2 = com.duokan.kernel.DkUtils.decodeSimpleDrm(r2);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r4 = \"UTF-8\";\n r3.<creatCallTask>(r2, r4);\t Catch:{ all -> 0x00f2 }\n r2 = new org.json.JSONObject;\t Catch:{ all -> 0x00f2 }\n r2.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n if (r2 != 0) goto L_0x0055;\n L_0x004a:\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0055:\n r3 = \"pictures\";\n r15 = com.duokan.reader.common.getPhysicalYPixels.setDrawable(r2, r3);\t Catch:{ all -> 0x00f2 }\n r16 = new java.util.ArrayList;\t Catch:{ all -> 0x00f2 }\n r2 = r15.length();\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.<creatCallTask>(r2);\t Catch:{ all -> 0x00f2 }\n r2 = 0;\n L_0x0067:\n r3 = r15.length();\t Catch:{ all -> 0x00f2 }\n if (r2 >= r3) goto L_0x00d0;\n L_0x006d:\n r3 = r15.getJSONObject(r2);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_md5\";\n r7 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_url\";\n r6 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_size\";\n r8 = r3.getLong(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"width\";\n r10 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"height\";\n r11 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r4 = \".\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r2);\t Catch:{ all -> 0x00f2 }\n r4 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r17 = \"file:///stuffs/\";\n r0 = r17;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r7);\t Catch:{ all -> 0x00f2 }\n r3 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n r3 = r18;\n r3 = r3.setDrawable(r4, r5, r6, r7, r8, r10, r11);\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.add(r3);\t Catch:{ all -> 0x00f2 }\n r2 = r2 + 1;\n goto L_0x0067;\n L_0x00d0:\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r1 = r16;\n r2.putIfAbsent(r0, r1);\t Catch:{ all -> 0x00f2 }\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\t Catch:{ all -> 0x00f2 }\n r2 = (java.util.List) r2;\t Catch:{ all -> 0x00f2 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n r18.bq();\n goto L_0x000e;\n L_0x00f2:\n r2 = move-exception;\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n throw r2;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n L_0x00fa:\n r2 = move-exception;\n r2 = r12;\n L_0x00fc:\n r18.bq();\n goto L_0x000e;\n L_0x0101:\n r2 = move-exception;\n r18.bq();\n throw r2;\n L_0x0106:\n r3 = move-exception;\n goto L_0x00fc;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.domain.bookshelf.jv.MyContextWrapper(java.lang.String):java.util.List\");\n }", "public abstract Object mo26777y();", "public abstract void mo70713b();", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public abstract String mo41086i();", "java.lang.String getField1286();", "private java.lang.String a(java.lang.String r6, com.google.b5 r7, com.google.e5 r8, java.lang.String r9) {\n /*\n r5 = this;\n r2 = F;\n r0 = r7.e();\n r1 = r5.o;\n r3 = r7.i();\n r1 = r1.a(r3);\n r3 = r1.matcher(r6);\n r1 = \"\";\n r1 = com.google.e5.NATIONAL;\t Catch:{ RuntimeException -> 0x0092 }\n if (r8 != r1) goto L_0x004b;\n L_0x001b:\n if (r9 == 0) goto L_0x004b;\n L_0x001d:\n r1 = r9.length();\t Catch:{ RuntimeException -> 0x0096 }\n if (r1 <= 0) goto L_0x004b;\n L_0x0023:\n r1 = r7.d();\t Catch:{ RuntimeException -> 0x0096 }\n r1 = r1.length();\t Catch:{ RuntimeException -> 0x0096 }\n if (r1 <= 0) goto L_0x004b;\n L_0x002d:\n r1 = r7.d();\n r4 = f;\n r1 = r4.matcher(r1);\n r1 = r1.replaceFirst(r9);\n r4 = z;\n r0 = r4.matcher(r0);\n r0 = r0.replaceFirst(r1);\n r1 = r3.replaceAll(r0);\n if (r2 == 0) goto L_0x009c;\n L_0x004b:\n r1 = r7.k();\n r4 = com.google.e5.NATIONAL;\t Catch:{ RuntimeException -> 0x0098 }\n if (r8 != r4) goto L_0x006b;\n L_0x0053:\n if (r1 == 0) goto L_0x006b;\n L_0x0055:\n r4 = r1.length();\t Catch:{ RuntimeException -> 0x009a }\n if (r4 <= 0) goto L_0x006b;\n L_0x005b:\n r4 = z;\n r4 = r4.matcher(r0);\n r1 = r4.replaceFirst(r1);\n r1 = r3.replaceAll(r1);\n if (r2 == 0) goto L_0x009c;\n L_0x006b:\n r0 = r3.replaceAll(r0);\n L_0x006f:\n r1 = com.google.e5.RFC3966;\n if (r8 != r1) goto L_0x0091;\n L_0x0073:\n r1 = p;\n r1 = r1.matcher(r0);\n r2 = r1.lookingAt();\n if (r2 == 0) goto L_0x0086;\n L_0x007f:\n r0 = \"\";\n r0 = r1.replaceFirst(r0);\n L_0x0086:\n r0 = r1.reset(r0);\n r1 = \"-\";\n r0 = r0.replaceAll(r1);\n L_0x0091:\n return r0;\n L_0x0092:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0094 }\n L_0x0094:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0096 }\n L_0x0096:\n r0 = move-exception;\n throw r0;\n L_0x0098:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x009a }\n L_0x009a:\n r0 = move-exception;\n throw r0;\n L_0x009c:\n r0 = r1;\n goto L_0x006f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, com.google.b5, com.google.e5, java.lang.String):java.lang.String\");\n }", "java.lang.String getField1853();", "String getIfBegin();", "private stendhal() {\n\t}", "java.lang.String getField1753();", "java.lang.String getField1786();", "static int size_of_xri(String passed){\n\t\treturn 2;\n\t}", "public abstract String mo9751p();", "@Override\n\tpublic void jugar() {}", "public abstract String mo24851a(String str);", "abstract int pregnancy();", "public abstract String mo9238av();", "static int size_of_ori(String passed){\n\t\treturn 2;\n\t}", "@Override\n protected void getExras() {\n }", "public abstract void mo2624j();", "java.lang.String getField1729();", "java.lang.String getField1886();", "void method0() {\nprivate static final String ELEMENT_N = \"element_n\";\nprivate static final String ELEMENT_R = \"element_r\";\nprivate static final String ATTRIBUTE_N = \"attribute_n\";\nprivate static final String ATTRIBUTE_R = \"attribute_r\";\nprivate static int ATTIDX_COUNT = 0;\npublic static final int ATTIDX_ABSTRACT = ATTIDX_COUNT++;\npublic static final int ATTIDX_AFORMDEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_BASE = ATTIDX_COUNT++;\npublic static final int ATTIDX_BLOCK = ATTIDX_COUNT++;\npublic static final int ATTIDX_BLOCKDEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_DEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_EFORMDEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_FINAL = ATTIDX_COUNT++;\npublic static final int ATTIDX_FINALDEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_FIXED = ATTIDX_COUNT++;\npublic static final int ATTIDX_FORM = ATTIDX_COUNT++;\npublic static final int ATTIDX_ID = ATTIDX_COUNT++;\npublic static final int ATTIDX_ITEMTYPE = ATTIDX_COUNT++;\npublic static final int ATTIDX_MAXOCCURS = ATTIDX_COUNT++;\npublic static final int ATTIDX_MEMBERTYPES = ATTIDX_COUNT++;\npublic static final int ATTIDX_MINOCCURS = ATTIDX_COUNT++;\npublic static final int ATTIDX_MIXED = ATTIDX_COUNT++;\npublic static final int ATTIDX_NAME = ATTIDX_COUNT++;\npublic static final int ATTIDX_NAMESPACE = ATTIDX_COUNT++;\npublic static final int ATTIDX_NAMESPACE_LIST = ATTIDX_COUNT++;\npublic static final int ATTIDX_NILLABLE = ATTIDX_COUNT++;\npublic static final int ATTIDX_NONSCHEMA = ATTIDX_COUNT++;\npublic static final int ATTIDX_PROCESSCONTENTS = ATTIDX_COUNT++;\npublic static final int ATTIDX_PUBLIC = ATTIDX_COUNT++;\npublic static final int ATTIDX_REF = ATTIDX_COUNT++;\npublic static final int ATTIDX_REFER = ATTIDX_COUNT++;\npublic static final int ATTIDX_SCHEMALOCATION = ATTIDX_COUNT++;\npublic static final int ATTIDX_SOURCE = ATTIDX_COUNT++;\npublic static final int ATTIDX_SUBSGROUP = ATTIDX_COUNT++;\npublic static final int ATTIDX_SYSTEM = ATTIDX_COUNT++;\npublic static final int ATTIDX_TARGETNAMESPACE = ATTIDX_COUNT++;\npublic static final int ATTIDX_TYPE = ATTIDX_COUNT++;\npublic static final int ATTIDX_USE = ATTIDX_COUNT++;\npublic static final int ATTIDX_VALUE = ATTIDX_COUNT++;\npublic static final int ATTIDX_ENUMNSDECLS = ATTIDX_COUNT++;\npublic static final int ATTIDX_VERSION = ATTIDX_COUNT++;\npublic static final int ATTIDX_XML_LANG = ATTIDX_COUNT++;\npublic static final int ATTIDX_XPATH = ATTIDX_COUNT++;\npublic static final int ATTIDX_FROMDEFAULT = ATTIDX_COUNT++;\n//public static final int ATTIDX_OTHERVALUES = ATTIDX_COUNT++; \npublic static final int ATTIDX_ISRETURNED = ATTIDX_COUNT++;\nprivate static final XIntPool fXIntPool = new XIntPool();\n// constants to return \nprivate static final XInt INT_QUALIFIED = fXIntPool.getXInt(SchemaSymbols.FORM_QUALIFIED);\nprivate static final XInt INT_UNQUALIFIED = fXIntPool.getXInt(SchemaSymbols.FORM_UNQUALIFIED);\nprivate static final XInt INT_EMPTY_SET = fXIntPool.getXInt(XSConstants.DERIVATION_NONE);\nprivate static final XInt INT_ANY_STRICT = fXIntPool.getXInt(XSWildcardDecl.PC_STRICT);\nprivate static final XInt INT_ANY_LAX = fXIntPool.getXInt(XSWildcardDecl.PC_LAX);\nprivate static final XInt INT_ANY_SKIP = fXIntPool.getXInt(XSWildcardDecl.PC_SKIP);\nprivate static final XInt INT_ANY_ANY = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_ANY);\nprivate static final XInt INT_ANY_LIST = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_LIST);\nprivate static final XInt INT_ANY_NOT = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_NOT);\nprivate static final XInt INT_USE_OPTIONAL = fXIntPool.getXInt(SchemaSymbols.USE_OPTIONAL);\nprivate static final XInt INT_USE_REQUIRED = fXIntPool.getXInt(SchemaSymbols.USE_REQUIRED);\nprivate static final XInt INT_USE_PROHIBITED = fXIntPool.getXInt(SchemaSymbols.USE_PROHIBITED);\nprivate static final XInt INT_WS_PRESERVE = fXIntPool.getXInt(XSSimpleType.WS_PRESERVE);\nprivate static final XInt INT_WS_REPLACE = fXIntPool.getXInt(XSSimpleType.WS_REPLACE);\nprivate static final XInt INT_WS_COLLAPSE = fXIntPool.getXInt(XSSimpleType.WS_COLLAPSE);\nprivate static final XInt INT_UNBOUNDED = fXIntPool.getXInt(SchemaSymbols.OCCURRENCE_UNBOUNDED);\n// used to store the map from element name to attribute list \n// for 14 global elements \nprivate static final Hashtable fEleAttrsMapG = new Hashtable(29);\n// for 39 local elememnts \nprivate static final Hashtable fEleAttrsMapL = new Hashtable(79);\n// used to initialize fEleAttrsMap \n// step 1: all possible data types \n// DT_??? >= 0 : validate using a validator, which is initialized staticly \n// DT_??? < 0 : validate directly, which is done in \"validate()\" \nprotected static final int DT_ANYURI = 0;\nprotected static final int DT_ID = 1;\nprotected static final int DT_QNAME = 2;\nprotected static final int DT_STRING = 3;\nprotected static final int DT_TOKEN = 4;\nprotected static final int DT_NCNAME = 5;\nprotected static final int DT_XPATH = 6;\nprotected static final int DT_XPATH1 = 7;\nprotected static final int DT_LANGUAGE = 8;\n// used to store extra datatype validators \nprotected static final int DT_COUNT = DT_LANGUAGE + 1;\nprivate static final XSSimpleType[] fExtraDVs = new XSSimpleType[DT_COUNT];\nprotected static final int DT_BLOCK = -1;\nprotected static final int DT_BLOCK1 = -2;\nprotected static final int DT_FINAL = -3;\nprotected static final int DT_FINAL1 = -4;\nprotected static final int DT_FINAL2 = -5;\nprotected static final int DT_FORM = -6;\nprotected static final int DT_MAXOCCURS = -7;\nprotected static final int DT_MAXOCCURS1 = -8;\nprotected static final int DT_MEMBERTYPES = -9;\nprotected static final int DT_MINOCCURS1 = -10;\nprotected static final int DT_NAMESPACE = -11;\nprotected static final int DT_PROCESSCONTENTS = -12;\nprotected static final int DT_USE = -13;\nprotected static final int DT_WHITESPACE = -14;\nprotected static final int DT_BOOLEAN = -15;\nprotected static final int DT_NONNEGINT = -16;\nprotected static final int DT_POSINT = -17;\n// used to resolver namespace prefixes \nprotected XSDHandler fSchemaHandler = null;\n// used to store symbols. \nprotected SymbolTable fSymbolTable = null;\n// used to store the mapping from processed element to attributes \nprotected Hashtable fNonSchemaAttrs = new Hashtable();\n// temprory vector, used to hold the namespace list \nprotected Vector fNamespaceList = new Vector();\n// whether this attribute appeared in the current element \nprotected boolean[] fSeen = new boolean[ATTIDX_COUNT];\nprivate static boolean[] fSeenTemp = new boolean[ATTIDX_COUNT];\n// the following part implements an attribute-value-array pool. \n// when checkAttribute is called, it calls getAvailableArray to get \n// an array from the pool; when the caller is done with the array, \n// it calls returnAttrArray to return that array to the pool. \n// initial size of the array pool. 10 is big enough \nstatic final int INIT_POOL_SIZE = 10;\n// the incremental size of the array pool \nstatic final int INC_POOL_SIZE = 10;\n// the array pool \nObject[][] fArrayPool = new Object[INIT_POOL_SIZE][ATTIDX_COUNT];\n// used to clear the returned array \n// I think System.arrayCopy is more efficient than setting 35 fields to null \nprivate static Object[] fTempArray = new Object[ATTIDX_COUNT];\n// current position of the array pool (# of arrays not returned) \nint fPoolPos = 0;\n}", "public abstract void mo27385c();", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "java.lang.String getField1186();", "java.lang.String getField1829();", "public String limpiar()\r\n/* 509: */ {\r\n/* 510:529 */ return null;\r\n/* 511: */ }", "private java.lang.String c(java.lang.String r7) {\n /*\n r6 = this;\n r2 = \"\";\n r0 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n if (r0 == 0) goto L_0x0050;\n L_0x0006:\n r0 = new java.lang.StringBuilder;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = java.lang.String.valueOf(r7);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0.<init>(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = \".\";\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r6.e;\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.append(r1);\t Catch:{ FileNotFoundException -> 0x0052 }\n r0 = r0.toString();\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x001f:\n r1 = r6.d;\t Catch:{ FileNotFoundException -> 0x0052 }\n r1 = r1.openFileInput(r0);\t Catch:{ FileNotFoundException -> 0x0052 }\n L_0x0025:\n r3 = new java.io.BufferedReader;\n r4 = new java.io.InputStreamReader;\n r0 = r1;\n r0 = (java.io.InputStream) r0;\n r5 = \"UTF-8\";\n r5 = java.nio.charset.Charset.forName(r5);\n r4.<init>(r0, r5);\n r3.<init>(r4);\n r0 = new java.lang.StringBuffer;\n r0.<init>();\n L_0x003d:\n r4 = r3.readLine();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n if (r4 != 0) goto L_0x0061;\n L_0x0043:\n r0 = r0.toString();\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007d }\n r1.close();\t Catch:{ IOException -> 0x007d }\n r3.close();\t Catch:{ IOException -> 0x007d }\n L_0x004f:\n return r0;\n L_0x0050:\n r0 = r7;\n goto L_0x001f;\n L_0x0052:\n r0 = move-exception;\n r0 = r6.d;\t Catch:{ IOException -> 0x005e }\n r0 = r0.getAssets();\t Catch:{ IOException -> 0x005e }\n r1 = r0.open(r7);\t Catch:{ IOException -> 0x005e }\n goto L_0x0025;\n L_0x005e:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0061:\n r0.append(r4);\t Catch:{ IOException -> 0x0065, all -> 0x0073 }\n goto L_0x003d;\n L_0x0065:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x0070 }\n r1.close();\t Catch:{ IOException -> 0x0070 }\n r3.close();\t Catch:{ IOException -> 0x0070 }\n r0 = r2;\n goto L_0x004f;\n L_0x0070:\n r0 = move-exception;\n r0 = r2;\n goto L_0x004f;\n L_0x0073:\n r0 = move-exception;\n r1 = (java.io.InputStream) r1;\t Catch:{ IOException -> 0x007f }\n r1.close();\t Catch:{ IOException -> 0x007f }\n r3.close();\t Catch:{ IOException -> 0x007f }\n L_0x007c:\n throw r0;\n L_0x007d:\n r1 = move-exception;\n goto L_0x004f;\n L_0x007f:\n r1 = move-exception;\n goto L_0x007c;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.a.b.b.c(java.lang.String):java.lang.String\");\n }", "protected boolean func_70041_e_() { return false; }", "String extractParameters ();", "private Combined() {}", "abstract String mo1747a(String str);", "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: */ }", "java.lang.String getField1653();", "static int type_of_xthl(String passed){\n\t\treturn 1;\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "java.lang.String getField1781();", "public void test17() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "java.lang.String getField1773();", "public abstract void mo6549b();", "public void mo21877s() {\n }", "int a(java.lang.String r8, com.google.ho r9, java.lang.StringBuilder r10, boolean r11, com.google.ae r12) {\n /*\n r7 = this;\n r1 = 0;\n r0 = r8.length();\t Catch:{ RuntimeException -> 0x0009 }\n if (r0 != 0) goto L_0x000b;\n L_0x0007:\n r0 = r1;\n L_0x0008:\n return r0;\n L_0x0009:\n r0 = move-exception;\n throw r0;\n L_0x000b:\n r2 = new java.lang.StringBuilder;\n r2.<init>(r8);\n r0 = J;\n r3 = 25;\n r0 = r0[r3];\n if (r9 == 0) goto L_0x001c;\n L_0x0018:\n r0 = r9.a();\n L_0x001c:\n r0 = r7.a(r2, r0);\n if (r11 == 0) goto L_0x0025;\n L_0x0022:\n r12.a(r0);\t Catch:{ RuntimeException -> 0x0040 }\n L_0x0025:\n r3 = com.google.aw.FROM_DEFAULT_COUNTRY;\t Catch:{ RuntimeException -> 0x0042 }\n if (r0 == r3) goto L_0x005e;\n L_0x0029:\n r0 = r2.length();\t Catch:{ RuntimeException -> 0x003e }\n r1 = 2;\n if (r0 > r1) goto L_0x0044;\n L_0x0030:\n r0 = new com.google.ao;\t Catch:{ RuntimeException -> 0x003e }\n r1 = com.google.dk.TOO_SHORT_AFTER_IDD;\t Catch:{ RuntimeException -> 0x003e }\n r2 = J;\t Catch:{ RuntimeException -> 0x003e }\n r3 = 26;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x003e }\n r0.<init>(r1, r2);\t Catch:{ RuntimeException -> 0x003e }\n throw r0;\t Catch:{ RuntimeException -> 0x003e }\n L_0x003e:\n r0 = move-exception;\n throw r0;\n L_0x0040:\n r0 = move-exception;\n throw r0;\n L_0x0042:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x003e }\n L_0x0044:\n r0 = r7.a(r2, r10);\n if (r0 == 0) goto L_0x0050;\n L_0x004a:\n r12.a(r0);\t Catch:{ RuntimeException -> 0x004e }\n goto L_0x0008;\n L_0x004e:\n r0 = move-exception;\n throw r0;\n L_0x0050:\n r0 = new com.google.ao;\n r1 = com.google.dk.INVALID_COUNTRY_CODE;\n r2 = J;\n r3 = 24;\n r2 = r2[r3];\n r0.<init>(r1, r2);\n throw r0;\n L_0x005e:\n if (r9 == 0) goto L_0x00d2;\n L_0x0060:\n r0 = r9.L();\n r3 = java.lang.String.valueOf(r0);\n r4 = r2.toString();\n r5 = r4.startsWith(r3);\n if (r5 == 0) goto L_0x00d2;\n L_0x0072:\n r5 = new java.lang.StringBuilder;\n r3 = r3.length();\n r3 = r4.substring(r3);\n r5.<init>(r3);\n r3 = r9.X();\n r4 = r7.o;\n r6 = r3.g();\n r4 = r4.a(r6);\n r6 = 0;\n r7.a(r5, r9, r6);\n r6 = r7.o;\n r3 = r3.f();\n r3 = r6.a(r3);\n r6 = r4.matcher(r2);\t Catch:{ RuntimeException -> 0x00ca }\n r6 = r6.matches();\t Catch:{ RuntimeException -> 0x00ca }\n if (r6 != 0) goto L_0x00af;\n L_0x00a5:\n r4 = r4.matcher(r5);\t Catch:{ RuntimeException -> 0x00cc }\n r4 = r4.matches();\t Catch:{ RuntimeException -> 0x00cc }\n if (r4 != 0) goto L_0x00bb;\n L_0x00af:\n r2 = r2.toString();\t Catch:{ RuntimeException -> 0x00ce }\n r2 = r7.a(r3, r2);\t Catch:{ RuntimeException -> 0x00ce }\n r3 = com.google.dz.TOO_LONG;\t Catch:{ RuntimeException -> 0x00ce }\n if (r2 != r3) goto L_0x00d2;\n L_0x00bb:\n r10.append(r5);\t Catch:{ RuntimeException -> 0x00d0 }\n if (r11 == 0) goto L_0x00c5;\n L_0x00c0:\n r1 = com.google.aw.FROM_NUMBER_WITHOUT_PLUS_SIGN;\t Catch:{ RuntimeException -> 0x00d0 }\n r12.a(r1);\t Catch:{ RuntimeException -> 0x00d0 }\n L_0x00c5:\n r12.a(r0);\n goto L_0x0008;\n L_0x00ca:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00cc }\n L_0x00cc:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00ce }\n L_0x00ce:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x00d0 }\n L_0x00d0:\n r0 = move-exception;\n throw r0;\n L_0x00d2:\n r12.a(r1);\n r0 = r1;\n goto L_0x0008;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.a(java.lang.String, com.google.ho, java.lang.StringBuilder, boolean, com.google.ae):int\");\n }", "public void smell() {\n\t\t\n\t}", "java.lang.String getField1873();", "java.lang.String getField1728();", "@Override\n public void perish() {\n \n }", "java.lang.String getField1726();", "java.lang.String getField1229();", "java.lang.String getField1784();", "public abstract void mo56925d();", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n String[] stringArray0 = new String[1];\n String string0 = SQLUtil.join((String) null, \"\", stringArray0, \"org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet\", \":\", stringArray0);\n assertEquals(\"org.apache.derby.impl.sql.execute.IndexRowToBaseRowResultSet as : on .null = :.null\", string0);\n }", "java.lang.String getField1727();", "java.lang.String getField1486();", "java.lang.String getField1386();", "java.lang.String getField1881();", "public abstract long mo9229aD();", "void mo57277b();", "java.lang.String getField1273();", "public void method_191() {}", "public void test19() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "java.lang.String getField1737();", "public void test18() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "private static Object Stringbuilder() {\n\t\treturn null;\n\t}", "java.lang.String getField1353();", "java.lang.String getField1586();", "static int size_of_ani(String passed){\n\t\treturn 2;\n\t}", "static int type_of_inx(String passed){\n\t\treturn 1;\n\t}", "@Override\n public void toogleFold() {\n }", "java.lang.String getField1253();", "java.lang.String getField1752();", "private void gobble(Iterator<String> iter) {\n }" ]
[ "0.5382889", "0.5262014", "0.5227632", "0.5162291", "0.5135646", "0.5109942", "0.5101215", "0.5011547", "0.49778506", "0.4936246", "0.49050707", "0.4853225", "0.4852657", "0.4848148", "0.48410192", "0.4832602", "0.48306772", "0.48288628", "0.4827722", "0.48105535", "0.48102164", "0.4801721", "0.48016408", "0.47907627", "0.4767746", "0.47659126", "0.4756681", "0.4754967", "0.47339103", "0.47235265", "0.47035885", "0.4692523", "0.46922296", "0.4688979", "0.46877775", "0.4681114", "0.4672973", "0.46650234", "0.46624067", "0.4659635", "0.46587563", "0.46572953", "0.4656491", "0.46463472", "0.46392822", "0.46392536", "0.46352586", "0.46351454", "0.46337378", "0.4625878", "0.46177438", "0.46158895", "0.46121034", "0.45972785", "0.45968342", "0.45953348", "0.45935023", "0.45902044", "0.45888516", "0.4587842", "0.45877877", "0.45862028", "0.45861468", "0.4585778", "0.45856827", "0.45851597", "0.45841703", "0.45778084", "0.45774934", "0.45756602", "0.45745522", "0.45744464", "0.45674133", "0.45654777", "0.45648533", "0.4564518", "0.4563086", "0.45619214", "0.45607162", "0.45596573", "0.4558437", "0.45582074", "0.45570368", "0.455698", "0.45561525", "0.4554489", "0.45542815", "0.4552872", "0.45483777", "0.45478255", "0.45451427", "0.4543109", "0.45402342", "0.45397744", "0.45397565", "0.45396313", "0.4538263", "0.4537701", "0.45376536", "0.4536246", "0.4536108" ]
0.0
-1
User can pass in any object that needs to be accessed once the NonBlocking Web service call is finished and appropriate method of this CallBack is called.
public RayTracerCallbackHandler(Object clientData){ this.clientData = clientData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void callbackCall() {\n\t\t\t}", "public WebserviceCallbackHandler(){\n this.clientData = null;\n }", "public UrbrWSServiceCallbackHandler(){\r\n this.clientData = null;\r\n }", "public ApplicationManagementServiceCallbackHandler(){\n this.clientData = null;\n }", "public WebserviceCallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "public Response callback() throws Exception;", "@Override\r\n\tpublic Response invoke() {\n\t\treturn null;\r\n\t}", "public PartnerAPICallbackHandler(){\n this.clientData = null;\n }", "@Override\n\tpublic void callback(Object o) {}", "public interface GeneralService {\n\n /**\n * Returns general server data\n */\n Request getGeneralData(AsyncCallback<GeneralData> callback);\n\n}", "public interface AsynService {\n void asynMethod();\n}", "public interface RLatitudeServiceAsync {\r\n\r\n\tvoid sayHello(AsyncCallback<String> callback);\r\n\r\n\tvoid publishUser(String name, String firstName, String dateNaissance,\r\n\t\t\tAsyncCallback< String > callback );\r\n\t\r\n\tvoid checkPasswordLoginValidity( String login, String password, AsyncCallback< Boolean > callback );\r\n\t\r\n\tvoid publishAuthentication( String uid, String login, String password, AsyncCallback</*IUser*/Void> callback );\r\n\t\r\n\tvoid connect(String login, String password, AsyncCallback< String > callback);\r\n\t\r\n\tvoid disconnect(String uid, AsyncCallback< Boolean > callback);\r\n\t\r\n\tvoid changeMyVisibility(String uid, boolean visibility,\r\n\t\t\tAsyncCallback<Boolean> callback);\r\n\r\n\tvoid getVisibility(String uid, AsyncCallback<Boolean> callback);\r\n\t\r\n\tvoid setCurrentPostion(String uid, Position position,\r\n\t\t\tAsyncCallback<Void> callback);\r\n\t\r\n\tvoid addContact( String uidUser, String uidContact, AsyncCallback< Void > callback );\r\n\t\r\n\tvoid getContact( String uid,\r\n\t\t\tAsyncCallback< List< ResolvedContact > > callback );\r\n\t\r\n\tvoid getUser( String name, String lastName, AsyncCallback<ResolvedUser> callback );\r\n\t\r\n\tvoid getUser(String uid,AsyncCallback<ResolvedUser> callback);\r\n\r\n\tvoid getPosition( String uidUser, AsyncCallback< Position > callback );\r\n\r\n}", "public ScoringServiceCallbackHandler(){\r\n this.clientData = null;\r\n }", "public OrderServiceImplServiceCallbackHandler(){\n this.clientData = null;\n }", "public interface RequestCallbackListener {\n public void notifyToCaller(boolean isExecuted,Object obj);\n}", "public LoadBalanceCallbackHandler(){\n this.clientData = null;\n }", "interface InterfaceAsyncRequestData {\n\n /*\n * This is Interface used when a VALUE obtained from\n * an Async Thread (Class) has to be pass over to another\n * Class (probably UI thread for display to user),\n * but Async Thread and UI Thread are seperated in 2 different class.\n *\n * NOTE:\n * Implementation for these methods are\n * preferable to be\n * inside the necessary displayed UI Activity, e.g. MainActivity\n *\n * Summary:\n * - UI Thread = setup the methods, (activityRequestData = this), just for standby, NOT TO BE CALLED!\n *\n * - Background/Async Thread = invoke/call the methods, activityRequestData=null\n *\n * - Interface (or I called it \"Skin\") here = just a skin / head / methods name only, without implementation\n *\n *\n * UI Thread:\n * -implements and link->>\n *\n * ClassName implements AsyncRespondInterface {\n * ClassName(){\n * Async.activityRequestData = this;\n * }\n * // implements the rest of the methods()\n * }\n *\n * Background/Async Thread:\n * -prepare->> AsyncRespondInterface activityRequestData = null;\n * -invoke->> AsyncRespondInterface.someMethods();\n *\n */\n\n void getArrayListJSONResult(ArrayList<JSONObject> responses);\n}", "public interface MembershipsCallBack {\n void onCompleted(int statusCode, ArrayList<Membership> membershipArrayList);\n}", "public interface MyCallbackInterface {\n //its supposed to send the JSON object on request completed\n void onRequestCompleted(JSONArray result);\n }", "Single<WebClientServiceResponse> whenResponseReceived();", "Single<WebClientServiceResponse> whenResponseReceived();", "@Override\n public void getData(final int start, final ApiCallBack<List<ClassMyMessageBean>> callBack) {\n\n }", "@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}", "public interface HomepageServiceAsync {\n\tpublic void getProtectionInformation(AsyncCallback<ProtectionInformationModel[]> callback);\n\n\tpublic void getRecentBackups(int backupType, int backupStatus,int top, AsyncCallback<RecoveryPointModel[]> callback);\n\t\n\tpublic void getRecentBackupsByServerTime(int backupType, int backupStatus, String serverBeginDate, String serverEndDate, boolean needCatalogStatus, AsyncCallback<RecoveryPointModel[]> callback);\n\t\n\tpublic void getVMRecentBackupsByServerTime(int backupType, int backupStatus, String serverBeginDate, String serverEndDate, boolean needCatalogStatus, BackupVMModel vmModel,AsyncCallback<RecoveryPointModel[]> callback);\n\t\n\tpublic void getBackupInforamtionSummary(AsyncCallback<BackupInformationSummaryModel> callback);\n\t\n\tpublic void updateProtectionInformation(AsyncCallback<ProtectionInformationModel[]> callback);\n\t\n\tpublic void getDestSizeInformation(BackupSettingsModel model,AsyncCallback<DestinationCapacityModel> callback);\n\t\n\tpublic void getNextScheduleEvent(int in_iJobType,AsyncCallback<NextScheduleEventModel> callback);\n\n\tpublic void getTrustHosts(\n\t\t\tAsyncCallback<TrustHostModel[]> callback);\n\n\tvoid becomeTrustHost(TrustHostModel trustHostModel,\n\t\t\tAsyncCallback<Boolean> callback);\n\n\tvoid checkBaseLicense(AsyncCallback<Boolean> callback);\n\n\tvoid getBackupInforamtionSummaryWithLicInfo(AsyncCallback<BackupInformationSummaryModel> callback);\n\t\n\tvoid getLocalHost(AsyncCallback<TrustHostModel> callback);\n\n\tvoid PMInstallPatch(PatchInfoModel in_patchinfoModel,\n\t\t\tAsyncCallback<Integer> callback);\n\t\n\tvoid PMInstallBIPatch(PatchInfoModel in_patchinfoModel,\n\t\t\tAsyncCallback<Integer> callback);//added by cliicy.luo\n\t\n\tvoid getVMBackupInforamtionSummaryWithLicInfo(BackupVMModel vm,\n\t\t\tAsyncCallback<BackupInformationSummaryModel> callback);\n\n\tvoid getVMBackupInforamtionSummary(BackupVMModel vm,\n\t\t\tAsyncCallback<BackupInformationSummaryModel> callback);\n\n\tvoid getVMProtectionInformation(BackupVMModel vmModel,\n\t\t\tAsyncCallback<ProtectionInformationModel[]> callback);\n\n\tvoid getVMNextScheduleEvent(BackupVMModel vmModel,\n\t\t\tAsyncCallback<NextScheduleEventModel> callback);\n\tpublic void getVMRecentBackups(int backupType, int backupStatus,int top,BackupVMModel vmModel, AsyncCallback<RecoveryPointModel[]> callback);\n\n\tvoid updateVMProtectionInformation(BackupVMModel vm,\n\t\t\tAsyncCallback<ProtectionInformationModel[]> callback);\n\n\tvoid getArchiveInfoSummary(AsyncCallback<ArchiveJobInfoModel> callback);\n\n\tvoid getLicInfo(AsyncCallback<LicInfoModel> callback);\n\n\tvoid getVMStatusModel(BackupVMModel vmModel,\n\t\t\tAsyncCallback<VMStatusModel[]> callback);\n\n\tvoid getConfiguredVM(AsyncCallback<BackupVMModel[]> callback);\n\n\tvoid getMergeJobMonitor(String vmInstanceUUID,\n\t\t\tAsyncCallback<MergeJobMonitorModel> callback);\n\n\tvoid pauseMerge(String vmInstanceUUID, AsyncCallback<Integer> callback);\n\n\tvoid resumeMerge(String vmInstanceUUID, AsyncCallback<Integer> callback);\n\n\tvoid getMergeStatus(String vmInstanceUUID,\n AsyncCallback<MergeStatusModel> callback);\n\n\tvoid getBackupSetInfo(String vmInstanceUUID, \n\t\t\tAsyncCallback<ArrayList<BackupSetInfoModel>> callback);\n\t\n\tpublic void getDataStoreStatus(String dataStoreUUID, AsyncCallback<DataStoreInfoModel> callback);\n\n\tvoid getVMDataStoreStatus(BackupVMModel vm, String dataStoreUUID,\n\t\t\tAsyncCallback<DataStoreInfoModel> callback);\n\t\n}", "private void callWebServiceData() {\r\n\r\n\t\tif(Utility.FragmentContactDataFetchedOnce){\r\n\t\t\tgetDataFromSharedPrefernce();\r\n\t\t} else {\r\n\t\t\t//Utility.startDialog(activity);\r\n\t\t\tnew GetDataAsynRegistration().execute();\r\n\t\t}\r\n\t}", "public ApplicationManagementServiceCallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "public interface BankOfficeGWTServiceAsync {\n\tpublic void findById(Integer id, AsyncCallback<BankOfficeDTO> callback);\n\tpublic void saveOrUpdate(BankOfficeDTO entity, AsyncCallback<Integer> callback);\n\tpublic void getMyOffice(AsyncCallback<BankOfficeDTO> callback);\n\tpublic void findByExternalId(Long midasId, AsyncCallback<BankOfficeDTO> callback);\n\tpublic void findAll(AsyncCallback<ArrayList<BankOfficeDTO>> callback);\n\tpublic void findAllShort(AsyncCallback<ArrayList<ListBoxDTO>> asyncCallback);\n}", "public PartnerAPICallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "@Override\n\tpublic Response call() throws Exception {\n\t\tClientResponse response = callWebService(this.spaceEntry);\n\t\tthis.transId = (int) response.getEntity(Integer.class);\n\t\tresponse.close();\n\t\t/*wait for web service to provide tuple Object result*/\n\t\tawaitResult();\n\t\t\n\t\t/*return result*/\n\t\treturn result;\n\t}", "@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}", "Single<WebClientServiceResponse> whenComplete();", "Single<WebClientServiceResponse> whenComplete();", "public AsyncHttpCallback() {\n\t\tif(Looper.myLooper() != null) mHandler = new Handler(this);\n\t}", "public interface EPAsyncResponseListener {\n public void getJokesfromEndpoint(String result);\n}", "public UrbrWSServiceCallbackHandler(Object clientData){\r\n this.clientData = clientData;\r\n }", "public interface DepartmentCallBack {\n void getDepartmentList(List<Department> list, BmobException e);\n}", "public UserWSCallbackHandler(){\r\n this.clientData = null;\r\n }", "public interface InternalAuditServiceAsync {\n\n\tvoid signIn(String userid, String password, AsyncCallback<Employee> callback);\n\n\tvoid fetchObjectiveOwners(AsyncCallback<ArrayList<Employee>> callback);\n\n\tvoid fetchDepartments(AsyncCallback<ArrayList<Department>> callback);\n\n\tvoid fetchRiskFactors(int companyID, AsyncCallback<ArrayList<RiskFactor>> callback);\n\n\tvoid saveStrategic(Strategic strategic, HashMap<String, String> hm, AsyncCallback<String> callback);\n\n\tvoid fetchStrategic(HashMap<String, String> hm, AsyncCallback<ArrayList<Strategic>> callback);\n\n\tvoid fetchRiskAssesment(HashMap<String, String> hm, AsyncCallback<ArrayList<RiskAssesmentDTO>> callback);\n\n\tvoid saveRiskAssesment(HashMap<String, String> hm, ArrayList<StrategicDegreeImportance> strategicRisks,\n\t\t\tArrayList<StrategicRiskFactor> arrayListSaveRiskFactors, float resultRating, AsyncCallback<String> callback);\n\n\tvoid sendBackStrategic(Strategic strategics, AsyncCallback<String> callback);\n\n\tvoid declineStrategic(int startegicId, AsyncCallback<String> callback);\n\n\tvoid fetchStrategicAudit(AsyncCallback<ArrayList<StrategicAudit>> callback);\n\n\tvoid fetchDashBoard(HashMap<String, String> hm, AsyncCallback<ArrayList<DashBoardDTO>> callback);\n\n\tvoid fetchFinalAuditables(AsyncCallback<ArrayList<Strategic>> callback);\n\n\tvoid checkDate(Date date, AsyncCallback<Boolean> callback);\n\n\tvoid fetchSchedulingStrategic(HashMap<String, String> hm, AsyncCallback<ArrayList<StrategicDTO>> callback);\n\n\tvoid fetchSkills(AsyncCallback<ArrayList<Skills>> callback);\n\n\tvoid saveJobTimeEstimation(JobTimeEstimationDTO entity, ArrayList<SkillUpdateData> updateForSkills,\n\t\t\tAsyncCallback<Boolean> callback);\n\n\tvoid fetchJobTime(int jobId, AsyncCallback<JobTimeEstimationDTO> callback);\n\n\tvoid fetchEmployees(AsyncCallback<ArrayList<Employee>> callback);\n\n\tvoid fetchResourceUseFor(int jobId, AsyncCallback<ArrayList<ResourceUse>> callback);\n\n\tvoid fetchEmployeesByDeptId(ArrayList<Integer> depIds, AsyncCallback<ArrayList<Employee>> asyncCallback);\n\n\tvoid saveJobAndAreaOfExpertiseState(ArrayList<JobAndAreaOfExpertise> state, AsyncCallback<Void> callback);\n\n\tvoid fetchCheckBoxStateFor(int jobId, AsyncCallback<ArrayList<JobAndAreaOfExpertise>> callback);\n\n\tvoid saveCreatedJob(JobCreationDTO job, AsyncCallback<String> callback);\n\n\tvoid fetchCreatedJobs(boolean getEmpRelation, boolean getSkillRelation,\n\t\t\tAsyncCallback<ArrayList<JobCreationDTO>> asyncCallback);\n\n\tvoid getEndDate(Date value, int estimatedWeeks, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchEmployeesWithJobs(AsyncCallback<ArrayList<JobsOfEmployee>> callback);\n\n\tvoid updateEndDateForJob(int jobId, String startDate, String endDate, AsyncCallback<JobCreation> asyncCallback);\n\n\tvoid getMonthsInvolved(String string, String string2, AsyncCallback<int[]> callback);\n\n\tvoid fetchAllAuditEngagement(int loggedInEmployee, AsyncCallback<ArrayList<AuditEngagement>> callback);\n\n\tvoid fetchCreatedJob(int jobId, AsyncCallback<JobCreation> callback);\n\n\tvoid updateAuditEngagement(AuditEngagement e, String fieldToUpdate, AsyncCallback<Boolean> callback);\n\n\tvoid syncAuditEngagementWithCreatedJobs(int loggedInEmployee, AsyncCallback<Void> asyncCallback);\n\n\tvoid saveRisks(ArrayList<RiskControlMatrixEntity> records, AsyncCallback<Boolean> asyncCallback);\n\n\tvoid sendEmail(String body, String sendTo, AsyncCallback<Boolean> asyncCallback);\n\n\tvoid fetchAuditEngagement(int selectedJobId, AsyncCallback<AuditEngagement> asyncCallback);\n\n\tvoid fetchRisks(int auditEngId, AsyncCallback<ArrayList<RiskControlMatrixEntity>> asyncCallback);\n\n\t// void fetchEmpForThisJob(\n\t// int selectedJobId,\n\t// AsyncCallback<ArrayList<Object>> asyncCallback);\n\n\tvoid fetchEmployeeJobRelations(int selectedJobId, AsyncCallback<ArrayList<JobEmployeeRelation>> asyncCallback);\n\n\tvoid fetchJobs(AsyncCallback<ArrayList<JobCreation>> asyncCallback);\n\n\tvoid fetchEmployeeJobs(Employee loggedInEmployee, String reportingTab,\n\t\t\tAsyncCallback<ArrayList<JobCreation>> asyncCallback);\n\n\tvoid fetchJobExceptions(int jobId, AsyncCallback<ArrayList<Exceptions>> asyncCallbac);\n\n\tvoid fetchEmployeeExceptions(int employeeId, int jobId, AsyncCallback<ArrayList<Exceptions>> asyncCallbac);\n\n\tvoid sendException(Exceptions exception, Boolean sendMail, String selectedView, AsyncCallback<String> asyncCallbac);\n\n\tvoid saveAuditStepAndExceptions(AuditStep step, ArrayList<Exceptions> exs, AsyncCallback<Void> asyncCallback);\n\n\tvoid getSavedAuditStep(int selectedJobId, int auditWorkId, AsyncCallback<AuditStep> asyncCallback);\n\n\tvoid getSavedExceptions(int selectedJobId, AsyncCallback<ArrayList<Exceptions>> asyncCallback);\n\n\tvoid saveAuditWork(ArrayList<AuditWork> records, AsyncCallback<Void> asyncCallback);\n\n\tvoid updateKickoffStatus(int auditEngId, Employee loggedInUser, AsyncCallback<Void> asyncCallback);\n\n\tvoid fetchAuditHeadExceptions(int auditHeadId, int selectedJob, AsyncCallback<ArrayList<Exceptions>> asyncCallback);\n\n\tvoid fetchCreatedJob(int id, boolean b, boolean c, String string, AsyncCallback<JobCreationDTO> asyncCallback);\n\n\tvoid fetchAuditWorkRows(int selectedJobId, AsyncCallback<ArrayList<AuditWork>> asyncCallback);\n\n\tvoid fetchApprovedAuditWorkRows(int selectedJobId, AsyncCallback<ArrayList<AuditWork>> asyncCallback);\n\n\tvoid saveAuditNotification(int auditEngagementId, String message, String to, String cc, String refNo, String from,\n\t\t\tString subject, String filePath, String momoNo, String date, int status,\n\t\t\tAsyncCallback<String> asyncCallback);\n\n\tvoid logOut(AsyncCallback<String> asyncCallback);\n\n\tvoid selectYear(int year, AsyncCallback<Void> asyncCallback);\n\n\tvoid fetchNumberofPlannedJobs(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberofInProgressJobs(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberofCompletedJobs(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchJobsKickOffWithInaWeek(AsyncCallback<ArrayList<String>> asyncCallback);\n\n\tvoid fetchNumberOfAuditObservations(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberOfExceptionsInProgress(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberOfExceptionsImplemented(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberOfExceptionsOverdue(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchEmployeesAvilbleForNext2Weeks(AsyncCallback<ArrayList<String>> asyncCallback);\n\n\tvoid fetchStrategicDepartments(int strategicId, AsyncCallback<ArrayList<StrategicDepartments>> asyncCallback);\n\n\tvoid fetchResourceIds(int strategicId, AsyncCallback<ArrayList<Integer>> asyncCallback);\n\n\tvoid fetchJobSoftSkills(int strategicId, AsyncCallback<ArrayList<Integer>> asyncCallback);\n\n\tvoid fetchReportSearchResult(ArrayList<String> dept, ArrayList<String> domain, ArrayList<String> risk,\n\t\t\tArrayList<String> department, AsyncCallback<ArrayList<Strategic>> callback);\n\n\tvoid fetchReportWithResourcesSearchResult(ArrayList<String> dept, ArrayList<String> domain, ArrayList<String> risk,\n\t\t\tArrayList<String> resources, ArrayList<String> department, AsyncCallback<ArrayList<JobCreation>> callback);\n\n\tvoid fetchStrategicDepartmentsMultiple(ArrayList<Integer> ids,\n\t\t\tAsyncCallback<ArrayList<StrategicDepartments>> callback);\n\n\tvoid exportAuditPlanningReport(ArrayList<ExcelDataDTO> excelDataList, String btn, AsyncCallback<String> callback);\n\n\tvoid fetchReportAuditScheduling(ArrayList<String> dept, ArrayList<String> domain, ArrayList<String> jobStatus,\n\t\t\tArrayList<String> responsiblePerson, ArrayList<String> dep, AsyncCallback<ArrayList<Strategic>> callback);\n\n\tvoid approveFinalAuditable(Strategic strategic, AsyncCallback<String> callback);\n\n\tvoid declineFinalAuditable(Strategic strategic, AsyncCallback<String> asyncCallback);\n\n\tvoid saveUser(Employee employee, AsyncCallback<String> asyncCallback);\n\n\tvoid updateUser(int previousHours, Employee employee, AsyncCallback<String> asyncCallback);\n\n\tvoid getStartEndDates(AsyncCallback<ArrayList<Date>> asyncCallback);\n\n\tvoid fetchNumberOfDaysBetweenTwoDates(Date from, Date to, AsyncCallback<Integer> asyncCallback);\n\n\tvoid saveCompany(Company company, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchCompanies(AsyncCallback<ArrayList<Company>> asyncCallback);\n\n\tvoid updateStrategic(Strategic strategic, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteRisk(RiskControlMatrixEntity risk, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteAuditWork(int auditWorkId, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchCurrentYear(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchEmployeesBySkillId(int jobId, AsyncCallback<ArrayList<Employee>> asyncCallback);\n\n\tvoid checkNoOfResourcesForSelectedSkill(int noOfResources, int skillId, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteException(int exceptionId, AsyncCallback<String> asyncCallback);\n\n\tvoid approveScheduling(AsyncCallback<String> asyncCallback);\n\n\tvoid fetchSelectedEmployee(int employeeId, AsyncCallback<Employee> asyncCallback);\n\n\tvoid fetchExceptionReports(ArrayList<String> div, ArrayList<String> domain, ArrayList<String> risk,\n\t\t\tArrayList<String> resources, ArrayList<String> jobs, ArrayList<String> auditees,\n\t\t\tArrayList<String> exceptionStatus, ArrayList<String> department, AsyncCallback<ArrayList<Exceptions>> asyncCallback);\n\n\tvoid exportJobTimeAllocationReport(ArrayList<JobTimeAllocationReportDTO> excelDataList, String btn,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid exportAuditExceptionsReport(ArrayList<ExceptionsReportDTO> excelDataList, String btn,\n\t\t\tAsyncCallback<String> asyncCallback);\n\n\tvoid exportAuditSchedulingReport(ArrayList<AuditSchedulingReportDTO> excelDataList, String btn,\n\t\t\tAsyncCallback<String> asyncCallback);\n\n\tvoid isScheduleApproved(AsyncCallback<Boolean> asyncCallback);\n\n\tvoid fetchDashboard(HashMap<String, String> hm, AsyncCallback<DashBoardNewDTO> asyncCallback);\n\n\tvoid updateUploadedAuditStepFile(int auditStepId, AsyncCallback<String> asyncCallback);\n\n\tvoid saveSelectedAuditStepIdInSession(int auditStepId, AsyncCallback<String> asyncCallback);\n\n\tvoid submitFeedBack(Feedback feedBack, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchProcessDTOs(AsyncCallback<ArrayList<ProcessDTO>> callback);\n\n\tvoid fetchSubProcess(int processId, AsyncCallback<ArrayList<SubProcess>> callback);\n\n\tvoid saveActivityObjectives(ArrayList<ActivityObjective> activityObjectives, int jobid, int status,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid saveRiskObjectives(ArrayList<RiskObjective> riskObjectives, int jobid, int status,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid saveExistingControls(ArrayList<SuggestedControls> suggestedControls, AsyncCallback<String> callback);\n\n\tvoid saveAuditWorkProgram(ArrayList<AuditProgramme> auditWorkProgramme, int selectedJobId,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid fetchApprovedAuditProgrammeRows(int selectedJobId, AsyncCallback<ArrayList<AuditProgramme>> asyncCallback);\n\n\tvoid deleteRiskObjective(int riskId, int jobId, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchJobStatus(int jobId, AsyncCallback<JobStatusDTO> asyncCallback);\n\n\tvoid fetchDashBoardListBoxDTOs(AsyncCallback<ArrayList<DashboardListBoxDTO>> callback);\n\n\tvoid savetoDo(ToDo todo, AsyncCallback<String> callback);\n\n\tvoid saveinformationRequest(InformationRequestEntity informationrequest, String filepath,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid fetchEmailAttachments(AsyncCallback<ArrayList<String>> callback);\n\n\tvoid saveToDoLogs(ToDoLogsEntity toDoLogsEntity, AsyncCallback<String> callback);\n\n\tvoid saveInformationRequestLogs(InformationRequestLogEntity informationRequestLogEntity,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid fetchAuditStepExceptions(String id, AsyncCallback<ArrayList<String>> callback);\n\n\tvoid fetchAuditStepsProcerdure(String id, String mainFolder, AsyncCallback<ArrayList<String>> callback);\n\n\tvoid deleteAttachmentFile(String id, String mainFolder, String fileName, AsyncCallback<String> callback);\n\n\tvoid deleteUnsavedAttachemnts(String pathtodouploads, AsyncCallback<String> callback);\n\n\tvoid fetchAssignedFromToDos(AsyncCallback<ArrayList<ToDo>> callback);\n\n\tvoid fetchAssignedToToDos(AsyncCallback<ArrayList<ToDo>> callback);\n\n\tvoid fetchAssignedFromIRReLoad(AsyncCallback<ArrayList<InformationRequestEntity>> callback);\n\n\tvoid fetchJobExceptionWithImplicationRating(int jobId, int ImplicationRating,\n\t\t\tAsyncCallback<ArrayList<Exceptions>> callback);\n\n\tvoid fetchControlsForReport(int jobId, AsyncCallback<ArrayList<SuggestedControls>> callback);\n\n\tvoid fetchSelectedJob(int jobId, AsyncCallback<JobCreation> callback);\n\n\tvoid saveReportDataPopup(ArrayList<ReportDataEntity> listReportData12, AsyncCallback<String> callback);\n\n\tvoid fetchReportDataPopup(int jobId, AsyncCallback<ArrayList<ReportDataEntity>> callback);\n\n\tvoid saveAssesmentGrid(ArrayList<AssesmentGridEntity> listAssesment, int jobid, AsyncCallback<String> callback);\n\n\tvoid fetchAssesmentGrid(int jobId, AsyncCallback<ArrayList<AssesmentGridDbEntity>> callback);\n\n\tvoid deleteActivityObjective(int jobId, AsyncCallback<String> callback);\n\n\tvoid getNextYear(Date value, AsyncCallback<Date> asyncCallback);\n\n\tvoid readExcel(String subFolder, String mainFolder, AsyncCallback<ArrayList<SamplingExcelSheetEntity>> callback);\n\n\tvoid fetchAssignedToIRReLoad(AsyncCallback<ArrayList<InformationRequestEntity>> asyncCallback);\n\n\tvoid generateSamplingOutput(String populationSize, String samplingSize, String samplingMehod,\n\t\t\tArrayList<SamplingExcelSheetEntity> list, Integer auditStepId, AsyncCallback<ArrayList<SamplingExcelSheetEntity>> callback);\n\n\n\tvoid exportSamplingAuditStep(String samplingMehod, String reportFormat, ArrayList<SamplingExcelSheetEntity> list,\n\t\t\tInteger auditStepId, AsyncCallback<String> callback);\n\n\tvoid fetchDivision(AsyncCallback<ArrayList<Division>> asyncCallback);\n\n\tvoid fetchDivisionDepartments(int divisionID, AsyncCallback<ArrayList<Department>> asyncCallback);\n\n\tvoid fetchSavedSamplingReport(String folder, String auditStepId, AsyncCallback<String> callback);\n\n\tvoid fetchJobsAgainstSelectedDates(Date startDate, Date endDate, AsyncCallback<ArrayList<JobCreation>> callback);\n\n\tvoid fetchStrategicSubProcess(int id, AsyncCallback<StrategicSubProcess> asyncCallback);\n\n\tvoid fetchCompanyPackage(int companyId, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchCompanyLogoPath(int companyID, AsyncCallback<String> asyncCallback);\n\n\tvoid updatePassword(Employee loggedInUser, AsyncCallback<String> asyncCallback);\n\n\tvoid validateRegisteredUserEmail(String emailID, AsyncCallback<Integer> asyncCallback);\n\n\tvoid sendPasswordResetEmail(String emailBody, String value, AsyncCallback<Boolean> asyncCallback);\n\n\tvoid resetPassword(Integer employeeID, String newPassword, AsyncCallback<String> asyncCallback);\n\n\tvoid upgradeSoftware(AsyncCallback<String> asyncCallback);\n\n\tvoid addDivision(String divisionName, AsyncCallback<String> asyncCallback);\n\n\tvoid addDepartment(int divisionID, String departmentName, AsyncCallback<String> asyncCallback);\n\n\tvoid editDivisionName(Division division, AsyncCallback<String> asyncCallback);\n\n\tvoid editDepartmentName(Department department, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteDivision(int divisionID, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteDepartment(int departmentID, AsyncCallback<String> asyncCallback);\n\n\tvoid uploadCompanyLogo(String fileName, int companyID, AsyncCallback<String> callback);\n\n\tvoid fetchDegreeImportance(int companyID, AsyncCallback<ArrayList<DegreeImportance>> asyncCallback);\n\n\tvoid saveDegreeImportance(ArrayList<DegreeImportance> arrayListDegreeImportance, AsyncCallback<ArrayList<DegreeImportance>> asyncCallback);\n\n\tvoid deleteDegreeImportance(int degreeID, AsyncCallback<ArrayList<DegreeImportance>> asyncCallback);\n\n\tvoid saveRiskFactor(ArrayList<RiskFactor> arrayListRiskFacrors, AsyncCallback<ArrayList<RiskFactor>> asyncCallback);\n\n\tvoid deleteRiskFactor(int riskID, AsyncCallback<ArrayList<RiskFactor>> asyncCallback);\n\n\tvoid removeStrategicDegreeImportance(int id, AsyncCallback<String> asyncCallback);\n\n\tvoid removeStrategicRiskFactor(int id, AsyncCallback<String> callback);\n\n\tvoid fetchStrategicDuplicate(Strategic strategic, AsyncCallback<ArrayList<Strategic>> asyncCallback);\n\n}", "void onRecvObject(Object object);", "@Override\n public void run() {\n BeginTransactionMethodCall beginTransactionMethodCall = (BeginTransactionMethodCall) methodCall;\n long transactionTimeout = beginTransactionMethodCall.getTransactionTimeout();\n SpaceTransactionHolder spaceTransactionHolder = new SpaceTransactionHolder();\n spaceTransactionHolder.setSynchronizedWithTransaction( true );\n spaceTransactionHolder.setTimeoutInMillis( transactionTimeout );\n TransactionModificationContext mc = new TransactionModificationContext();\n mc.setProxyMode( true );\n spaceTransactionHolder.setModificationContext( mc );\n modificationContextFor( nodeRaised ).put( mc.getTransactionId(), spaceTransactionHolder );\n methodCall.setResponseBody( objectBuffer.writeObjectData( mc.getTransactionId() ) );\n }", "public interface AutoServiceRunningCallBack {\n void call();\n}", "public interface AsyncRpcCallback {\n\n void success(Object result);\n\n void fail(Exception e);\n\n}", "public interface ConnectionServiceAsync {\n void searchSynonyms(String input, AsyncCallback<List<String>> callback) throws IllegalArgumentException;;\n void callMaplabelsToSynonyms(AsyncCallback<Boolean> callback) throws IllegalArgumentException;;\n\n\n}", "@Override\n\t\tpublic void onServiceComplete(Boolean success, String jsonObj) {\n\n\t\t}", "public Object call() throws Exception {\n\t\t\t\t\tsynchronized (this) {\n\t\t\t\t\t\tif ( reference.asNativeRemoteFarReference().getTransmitting()){\n\t\t\t\t\t\t\t// if there is a thread transmitting a message for this reference:\n\t\t\t\t\t\t\t// resolve the future with a BlockingFuture to wait for the result of the transmission.\n\t\t\t\t\t\t\tBlockingFuture future = setRetractingFuture(reference);\n\t\t\t\t\t\t\treturn future.get();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// if there is no thread transmitting a message for this reference:\n\t\t\t\t\t\t\t// resolve the future immediately with the content of its oubox.\n\t\t\t\t\t\t\treturn reference.asNativeRemoteFarReference().impl_retractOutgoingLetters();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "public interface IOperationFinishWithDataCallback {\n\n void operationFinished(Object data);\n}", "@Override\n public void callSync() {\n\n }", "@Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }", "public RayTracerCallbackHandler(){\n this.clientData = null;\n }", "public interface AppServiceAsync {\r\n void addBookmark(Bookmark bookmark, AsyncCallback<Long> callback);\r\n\r\n void deleteBookmark(Long id, AsyncCallback<Void> callback);\r\n\r\n void getBookmarks(AsyncCallback<List<Bookmark>> callback);\r\n\r\n void isLogged(String location, AsyncCallback<String> callback);\r\n}", "protected abstract void onFinishObject(T result);", "public LoadBalanceCallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "@Override\n\tpublic void invoke(final Request request, final AsyncCallback<Response> callback) {\n\t\tcallback.callback(CallbackBus.super.invoke(request));\n\t}", "public SendSmsServiceCallbackHandler(){\n this.clientData = null;\n }", "public interface APICallBack {\n public void run(JSONArray array);\n}", "void invoke(\n @NotNull T request,\n @NotNull AsyncProviderCallback<T> callback,\n @NotNull WebServiceContext context);", "public interface RequestCallBack {\n void succes(String json);\n void fail();\n}", "public interface AsyncDelegate {\n\n public void asyncComplete(boolean success);\n\n\n}", "public interface CallBackData {\n\n public void getData(String data);\n\n}", "public interface ApplicationServletAsync {\r\n\r\n\tvoid sendRequest(Map<String, Serializable> requestParameters,\r\n\t\t\tMap<String, Serializable> responseParameters,\r\n\t\t\tAsyncCallback<Void> callback);\r\n}", "public interface IRequestHeartBeatBiz {\n interface OnRequestListener{\n void success(List<UserInformationBean> userInformation);\n void failed();\n }\n void requestData(String uuid, OnRequestListener requestListener);\n}", "@Override\n public void onSuccess() {\n threadExchangeObject.value = true;\n }", "@Override\n\t\t\tpublic Integer call() throws Exception {\n\t\t\t\treturn null;\n\t\t\t}", "public interface API_CallBack {\n\n void ArrayData(ArrayList arrayList);\n\n void OnSuccess(String responce);\n\n void OnFail(String responce);\n\n\n}", "public Object call() throws Exception {\n\t\t\t\t\t\tProducerSimpleNettyResponseFuture future;\n\t\t\t\t\t\tProducerSimpleNettyResponse responseFuture;\n\t\t\t\t\t\tfuture = clientProxy.request(message);\n\t\t\t\t\t\tresponseFuture = future\n\t\t\t\t\t\t\t\t.get(3000, TimeUnit.MILLISECONDS);\n\t\t\t\t\t\treturn responseFuture.getResponse();\n\t\t\t\t\t}", "private CallResponse() {\n initFields();\n }", "public interface CallBacksss {\n public void Call();\n}", "@Override\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\t getCallDetails();\n\t\t\treturn null;\n\t\t}", "public interface AcnServiceAsync {\r\n\t\r\n\tvoid ordernarSequencia(Integer num1, Integer num2, AsyncCallback<Integer[]> callback) throws Exception;\r\n\t\r\n\tvoid recuperarListaPessoa(int quantidade, AsyncCallback<Map<String, List<Pessoa>>> callback);\r\n\t\r\n}", "protected void doInvocation(){\n org.omg.CORBA.portable.Delegate delegate=StubAdapter.getDelegate(\n _target);\n // Initiate Client Portable Interceptors. Inform the PIHandler that\n // this is a DII request so that it knows to ignore the second\n // inevitable call to initiateClientPIRequest in createRequest.\n // Also, save the RequestImpl object for later use.\n _orb.getPIHandler().initiateClientPIRequest(true);\n _orb.getPIHandler().setClientPIInfo(this);\n InputStream $in=null;\n try{\n OutputStream $out=delegate.request(null,_opName,!_isOneWay);\n // Marshal args\n try{\n for(int i=0;i<_arguments.count();i++){\n NamedValue nv=_arguments.item(i);\n switch(nv.flags()){\n case ARG_IN.value:\n nv.value().write_value($out);\n break;\n case ARG_OUT.value:\n break;\n case ARG_INOUT.value:\n nv.value().write_value($out);\n break;\n }\n }\n }catch(Bounds ex){\n throw _wrapper.boundsErrorInDiiRequest(ex);\n }\n $in=delegate.invoke(null,$out);\n }catch(ApplicationException e){\n // REVISIT - minor code.\n // This is already handled in subcontract.\n // REVISIT - uncomment.\n //throw new INTERNAL();\n }catch(RemarshalException e){\n doInvocation();\n }catch(SystemException ex){\n _env.exception(ex);\n // NOTE: The exception should not be thrown.\n // However, JDK 1.4 and earlier threw the exception,\n // so we keep the behavior to be compatible.\n throw ex;\n }finally{\n delegate.releaseReply(null,$in);\n }\n }", "public interface TaskCallBack {\n\n void notifyTaskTheResultOfcallService(TaskEntity entity);\n}", "public interface AsyncResponse\n{\n void onAsyncJsonFetcherComplete(int mode, JSONArray json, boolean jsonException);\n}", "public Object consumeBloqueante();", "public interface RequestCallBack {\r\n void successCallback(String string);\r\n void failedCallback(String string);\r\n}", "public interface ServiceCallBack extends AppBaseServiceCallBack {\n void onSuccessLogout(JSONObject mJsonObject);\n}", "public interface ComCallBack {\n public void onCallBack(Object obj);\n}", "@Override\n\tpublic void callback() {\n\t}", "public abstract void onWait();", "public interface CallBackInterface {\n}", "public interface Async {\n public void afterExec(JSONObject jsonObject);\n}", "public interface TreeServiceAsync {\r\n\tvoid getChild(String book, String id, ContextTreeItem input,\r\n\t\t\tAsyncCallback<List<ContextTreeItem>> callback)\r\n\t\t\tthrows IllegalArgumentException;\r\n\r\n\tvoid getText(String book, String id, ContextTreeItem item,\r\n\t\t\tAsyncCallback<String> asyncCallback)\r\n\t\t\tthrows IllegalArgumentException;\r\n\r\n}", "public void deliver() {\n try {\n if (null != this.listener) {\n ContentObject pending = null;\n CCNInterestListener listener = null;\n synchronized (this) {\n if (null != this.data && null != this.listener) {\n pending = this.data;\n this.data = null;\n listener = (CCNInterestListener) this.listener;\n }\n }\n if (null != pending) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Interest callback (\" + pending + \" data) for: {0}\", this.interest.name());\n synchronized (this) {\n this.deliveryPending = false;\n }\n manager.unregisterInterest(this);\n Interest updatedInterest = listener.handleContent(pending, interest);\n if (null != updatedInterest) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Interest callback: updated interest to express: {0}\", updatedInterest.name());\n manager.expressInterest(this.owner, updatedInterest, listener);\n }\n } else {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Interest callback skipped (no data) for: {0}\", this.interest.name());\n }\n } else {\n synchronized (this) {\n if (null != this.sema) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Data consumes pending get: {0}\", this.interest.name());\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINEST)) Log.finest(Log.FAC_NETMANAGER, \"releasing {0}\", this.sema);\n this.sema.release();\n }\n }\n if (null == this.sema) {\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.FINER)) Log.finer(Log.FAC_NETMANAGER, \"Interest callback skipped (not valid) for: {0}\", this.interest.name());\n }\n }\n } catch (Exception ex) {\n _stats.increment(StatsEnum.DeliverContentFailed);\n Log.warning(Log.FAC_NETMANAGER, \"failed to deliver data: {0}\", ex);\n Log.warningStackTrace(ex);\n }\n }", "@Override\n\tpublic void replyOperationCompleted() { ; }", "public void callback() {\n showProgress(false);\n this.completed = true;\n if (!isActive()) {\n skip(this.url, this.result, this.status);\n } else if (this.callback != null) {\n Class[] clsArr = {String.class, this.type, AjaxStatus.class};\n AQUtility.invokeHandler(getHandler(), this.callback, true, true, clsArr, DEFAULT_SIG, this.url, this.result, this.status);\n } else {\n try {\n callback(this.url, this.result, this.status);\n } catch (Exception e) {\n AQUtility.report(e);\n }\n }\n filePut();\n if (!this.blocked) {\n this.status.close();\n }\n wake();\n AQUtility.debugNotify();\n }", "public interface Callback {\n\n /**\n * A callback method the user should implement. This method will be called when the send to the server has\n * completed.\n * @param send The results of the call. This send is guaranteed to be completed so none of its methods will block.\n */\n public void onCompletion(RecordSend send);\n}", "public interface CallBackListadoPlantilla extends CallBackBase {\n void OnSuccess(ArrayList<SearchBoxItem> listadoPlantilla);\n}", "void onResponseTaskCompleted(Request request, Response response, OHException ohex, Object data);", "public interface WebServiceListener {\n\n /**\n * Callback method indicating start event of the service. Call it from your service class in order to give begin callback to the presenter layer.\n * @param taskCode : Web service task code against which service has began. This is used for web service type identification.\n */\n void onServiceBegin(int taskCode);\n\n /**\n * Callback method on service success. Call it from your service class in order to give success callback to the presenter layer.\n * @param masterResponse : Response model from the server API\n * @param taskCode : Web service task code against which response is taken. This is used for web service type identification.\n */\n\n void onServiceSuccess(MasterResponse masterResponse, int taskCode);\n\n /**\n * Callback method on service error. Call it from your service class in order to give error callback to the presenter layer.\n * @param message : Error message.\n * @param taskCode : Web service task code against which error is taken. This is used for web service type identification.\n * @param errorType : Error type.\n */\n void onServiceError(String message, int taskCode, int errorType);\n void onValidationError(ValidationError[] validationError, int taskCode);\n\n}", "public void callback() {\n }", "public interface AsyncResponse {\n void processFinish(HttpJson output);\n}", "void consumeWorkUnit();", "public interface CallBackListener\n{\n public void drawbackTexto0(String response);\n}", "public void tellJoke(){\n new EndpointAsyncTask().execute(this);\n }", "public OrderServiceImplServiceCallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "public interface AsyncResponse {\n void processFinish(double calories, double date);\n}", "public interface GetRecoveryCallback {\n\n public abstract void done(RecoveryEx returnedRecovery);\n\n}", "@Override\n public void call(InterestResponse interestResponse) {\n if (interestResponse != null && interestResponse.details != null) {\n updateInterestsList(interestResponse.details);\n }\n\n mainHandler.post(new Runnable() {\n @Override\n public void run() {\n bus.post(new InterestUpdateEvent());\n\n\n// UIHelper.getInstance().dismissProgressDialog();\n }\n });\n\n }", "Request getGeneralData(AsyncCallback<GeneralData> callback);", "@Override\r\n \tpublic Object invoke(Object arg0, Method arg1, Object[] arg2)\r\n \t\t\tthrows Throwable {\n \t\tString urlfortheobject = baseUrl+methodToID(arg1);\r\n \t\t\r\n \t\t// Get the IRemoteRestCall object for this method...\r\n\t\tClientResource cr = new ClientResource(urlfortheobject);\r\n \t\tIRemoteRestCall resource = cr.wrap(IRemoteRestCall.class, arg1.getReturnType());\r\n \t\t\r\n \t\t// Call\r\n \t\tObject returnObject = resource.doCall(arg2);\r\n\t\tcr.release();\r\n \t\t\r\n \t\t// return\r\n \t\treturn returnObject;\r\n \t}", "@SuppressWarnings(\"WeakerAccess\")\n protected void makeRequest() {\n if (mCallback == null) {\n CoreLogger.logError(addLoaderInfo(\"mCallback == null\"));\n return;\n }\n\n synchronized (mWaitLock) {\n mWaitForResponse.set(true);\n }\n\n doProgressSafe(true);\n\n Utils.runInBackground(true, new Runnable() {\n @Override\n public void run() {\n try {\n CoreLogger.log(addLoaderInfo(\"makeRequest\"));\n makeRequest(mCallback);\n }\n catch (Exception exception) {\n CoreLogger.log(addLoaderInfo(\"makeRequest failed\"), exception);\n callbackHelper(false, wrapException(exception));\n }\n }\n });\n }", "protected AlarmRequestWithResponse(AlarmResponseListener<E> callBack ){\n\t\tthis.callBack = callBack;\n\t}" ]
[ "0.64292276", "0.6402391", "0.61146843", "0.60995615", "0.59913343", "0.59607553", "0.5958446", "0.59455246", "0.5889394", "0.58486867", "0.58273274", "0.5750216", "0.5735833", "0.5727095", "0.57231694", "0.57205844", "0.57126135", "0.5691236", "0.56634736", "0.56272954", "0.56272954", "0.5612482", "0.56088847", "0.5593311", "0.5574343", "0.55694884", "0.5556345", "0.55448574", "0.5538788", "0.55293036", "0.55216086", "0.55216086", "0.5518263", "0.54799324", "0.5463493", "0.5460838", "0.5454157", "0.5451069", "0.54506415", "0.54343075", "0.54260415", "0.5415499", "0.5414932", "0.54092693", "0.540505", "0.5401605", "0.53934115", "0.5390891", "0.5389802", "0.53749985", "0.5370658", "0.53683996", "0.53671354", "0.53508526", "0.5342451", "0.53413177", "0.5338719", "0.5319883", "0.5319397", "0.5313761", "0.53132623", "0.53091234", "0.5306779", "0.529121", "0.52903503", "0.52864456", "0.528477", "0.52837825", "0.5274859", "0.5274066", "0.5273166", "0.52730024", "0.52674556", "0.526536", "0.52650714", "0.5261965", "0.52614915", "0.5260018", "0.5259527", "0.5256993", "0.52560353", "0.52426505", "0.5234849", "0.5234751", "0.52282476", "0.5225965", "0.52248544", "0.5224684", "0.5220025", "0.521934", "0.5219296", "0.5214822", "0.52129817", "0.52074575", "0.52031034", "0.5201663", "0.51975924", "0.5192995", "0.5192507", "0.5191081", "0.51903814" ]
0.0
-1
Please use this constructor if you don't want to set any clientData
public RayTracerCallbackHandler(){ this.clientData = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Cliente() {\n\t\tsuper();\n\t}", "public ClientInformation(){\n clientList = new ArrayList<>();\n\n }", "public Client() {\r\n\t// TODO Auto-generated constructor stub\r\n\t \r\n }", "public Client() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "private CorrelationClient() { }", "public ServiceClient() {\n\t\tsuper();\n\t}", "public ClientDetailsEntity() {\n\t\t\n\t}", "public Cliente() {\n }", "public Client() {\n }", "public ClientData() {\n\n this.name = \"\";\n this.key = \"\";\n this.serverIpString = \"\";\n this.serverPort = 0;\n this.clientListenPort = 0;\n this.clientsSocketPort = 0;\n this.clientsLocalHostName = \"\";\n this.clientsLocalhostAddressStr = \"\";\n\n this.socket = new Socket();\n\n try {\n this.socket.bind(null);\n } catch (IOException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n \n try {\n this.clientsLocalHostName = InetAddress.getLocalHost().getHostName();\n this.clientsLocalhostAddressStr = InetAddress.getLocalHost().getHostAddress();\n } catch (UnknownHostException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n this.clientsSocketPort = socket.getLocalPort();\n\n parseClientConfigFile();\n\n //Initialize ServerSocket and bind to specific port.\n try {\n serverS = new ServerSocket(clientListenPort);\n } catch (IOException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n }", "public Client() {}", "public EO_ClientsImpl() {\n }", "public Client(Client client) {\n\n }", "public QuestionsListRowClient() {\r\n }", "Cliente(){}", "public WebserviceCallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "public Client() {\n _host_name = DEFAULT_SERVER;\n _port = PushCacheFilter.DEFAULT_PORT_NUM;\n }", "protected ClientStatus() {\n }", "public HGDClient() {\n \n \t}", "private ClientLoader() {\r\n }", "public Ctacliente() {\n\t}", "public InscriptionClient() {\n initComponents();\n }", "public GameClient() {\r\n super(new Client(Config.WRITE_BUFFER_SIZE, Config.OBJECT_BUFFER_SIZE), null, null);\r\n }", "public ClienteBean() {\n }", "public MySQLServiceEquipmentCallbackHandler(Object clientData) {\n this.clientData = clientData;\n }", "public LoadBalanceCallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "public ClientView() {\n initComponents();\n }", "public DataInputClientProperties() throws IOException {\n this(null);\n }", "public ClientConfiguration() {\n serverIp = DEFAULT_SERVER_IP;\n serverPort = DEFAULT_SERVER_PORT;\n }", "public CreChqTrnValVerUVOClient() {\n }", "public frmClient() {\n initComponents();\n clientside=new Client(this);\n \n }", "public ClienteServicio() {\n }", "public TurnoVOClient() {\r\n }", "public LpsClient() {\n super();\n }", "public AbaloneClient() {\n server = new AbaloneServer();\n clientTUI = new AbaloneClientTUI();\n }", "private NotificationClient() { }", "public ClipsManager()\n {\n setClientAuth( m_clientId, m_clientSecret );\n setAuthToken( m_authToken );\n }", "public Client() {\n initComponents();\n setIcon();\n }", "public Cliente(){\r\n this.nome = \"\";\r\n this.email = \"\";\r\n this.endereco = \"\";\r\n this.id = -1;\r\n }", "protected RestClient() {\n }", "public ProductsVOClient() {\r\n }", "public SubscriberClientJson (SubscriberData subscriberData) {\n\t\tsuper(subscriberData.getSubscriberEndpoint(),\n\t\t\t\tsubscriberData.getMessageMap(),\n\t\t\t\tsubscriberData.getMessageIds()\n\t\t\t\t);\n\t}", "public ClientCredentials() {\n }", "public PartnerAPICallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "private ClientController() {\n }", "public WebserviceCallbackHandler(){\n this.clientData = null;\n }", "public SampleModelDoctorImpl(Object client)\n {\n clientDoctor = (SampleClientDoctor) client;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "private Client buildClient() {\n\t\tClient client = new Client();\n\t\tclient.setName(clientNameTextBox.getValue());\n\t\tclient.setAddress(clientAddressTextBox.getValue());\n\t\tclient.setTelephone(clientTelephoneTextBox.getValue());\n\t\treturn client;\n\t}", "public MdrCreater()\n {\n super();\n client = new RawCdrAccess();\n }", "public PartnerAPICallbackHandler(){\n this.clientData = null;\n }", "public ClientInformationTest()\n {\n }", "public Client(int id, String name) {\n\t\tsuper(id, name);\n\t\tthis.jobs = new ArrayList<Job>();\n\t}", "private static Client createDummyClient() {\n\n PhoneNumber num1 = new PhoneNumber(\"Arnold Schubert\",\"0151234567\", \"Ehemann\");\n PhoneNumber num2 = new PhoneNumber(\"Helene Schubert\",\"0171234567\", \"Tochter\");\n ArrayList<PhoneNumber> phoneNumbers1 = new ArrayList<>();\n phoneNumbers1.add(num1);\n phoneNumbers1.add(num2);\n DummyVitalValues vital1 = new DummyVitalValues();\n\n ArrayList<Integer> pictograms1 = new ArrayList<>();\n\n DummyClientMedicine medicine1 = new DummyClientMedicine(DummyMedicine.ITEMS_PRESCRIBED_Erna, DummyMedicine.ITEMS_TEMPORARY, DummyMedicine.ITEMS_SELF_ORDERED);\n\n Client c = new Client(0,R.drawable.erna, \"Erna\",\"Schubert\",\"17.08.1943\",medicine1,DummyNotes.ITEMS_Erna, DummyFixedNotes.ITEMS_Erna, DummyToDos.ITEMS_Erna, vital1.vitalValues, \"Diabetes mellitus, Adipositas, Schilddrüsenunterfuntion\",1,\"Blankenfelder Str. 82, 13127 Berlin\",phoneNumbers1, pictograms1);\n\n return c;\n }", "protected AuctionServer()\n\t{\n\t}", "private MatterAgentClient() {}", "public Clientes() {\n initComponents();\n }", "public CadastroClientes() {\n initComponents();\n }", "public Factory() {\n this(getInternalClient());\n }", "public EchoCallbackHandler(Object clientData) {\n this.clientData = clientData;\n }", "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\r\n return clientData;\r\n }", "public client_settings_Fragment()\n {\n }", "public TestServiceClient(final ApiClient apiClient) {\n super(apiClient);\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public BrowseOffenceAMClient() {\r\n }", "public ApplicationManagementServiceCallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "public Client(ClientConfiguration conf) {\n clientMessages = new Stack<>();\n serverMessages = new Stack<>();\n this.conf = conf;\n encryptionSessionHashMap = new HashMap<>();\n savedMessage = new HashMap<>();\n }", "public ClientController() {\n }", "private APIClient() {\n }", "@Override\n protected byte[] getClientData() {\n return (clientData + \" individual\").getBytes(StandardCharsets.UTF_8);\n }", "protected void setClient(Client _client) {\n\t\tclient = _client;\n\t}", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "private void setClient(ClientImpl model) {\n if (client == null) {\n this.client = model;\n }\n }", "public DefaultHttpRequestBuilder (final DefaultHttpClient client) {\r\n\t\tif (client == null) {\r\n\t\t\tthrow new NullPointerException (\"client cannot be null\");\r\n\t\t}\r\n\t\t\r\n\t\tthis.client = client;\r\n\t}", "public MantClientesView() {\n initComponents();\n }", "private MyClientEndpoint(){\n // private to prevent anyone else from instantiating\n }", "public GerenciarCliente() {\n initComponents();\n }", "public LoadBalanceCallbackHandler(){\n this.clientData = null;\n }", "@Override\n\tpublic void setClient(Client client) {\n\t\tlog.warn(\"setClient is not implemented\");\n\t}", "public UrbrWSServiceCallbackHandler(Object clientData){\r\n this.clientData = clientData;\r\n }", "public JSipClient() {\n\t\tinitComponents();\n\t}", "public ClientEntity(final Entity e) {\r\n\t\tsuper(e);\r\n\t}", "public ClientServiceImpl() {\r\n\t}", "public Clientes() {\n\t\tclientes = new Cliente[MAX_CLIENTES];\n\t}", "public TelaPesquisarClientes() {\n initComponents();\n }", "public Client(String nom, String prenom, String adresse,CalculerTarif calculerTarif) {\n // Initialisation des données du client.\n this.nom = nom;\n this.prenom = prenom;\n this.adresse = adresse;\n this.calculerTarif = calculerTarif;\n this.listeVehicule = new ArrayList<Vehicule>();\n \n // On ajoute le client à la liste des clients du parking, car le client est forcément un client du parking.\n Parking.getInstance().addClient(this);\n }", "public GameServerClient(){\r\n\t\tinitComponents();\r\n\t\t}", "public ClientFrame() {\n\t\tinitComponents();\n\t}", "public OrderServiceImplServiceCallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "public Cliente(String nome) {\n super(nome);\n }" ]
[ "0.7273642", "0.72230405", "0.71211845", "0.71121013", "0.6987381", "0.6964745", "0.6948085", "0.68527573", "0.68126756", "0.67549497", "0.6686136", "0.66799", "0.6659861", "0.6639855", "0.6608235", "0.66023725", "0.6601425", "0.6587107", "0.65786386", "0.65716743", "0.6558522", "0.654716", "0.65336233", "0.6514779", "0.6505847", "0.6503165", "0.65006214", "0.64926505", "0.64886254", "0.6481411", "0.645817", "0.645423", "0.64437973", "0.64272827", "0.6419694", "0.6418292", "0.641666", "0.6409312", "0.63826454", "0.63807386", "0.6376374", "0.63754046", "0.63664806", "0.6363269", "0.63549197", "0.6343189", "0.6339401", "0.63339347", "0.63339347", "0.63339347", "0.63339347", "0.63339347", "0.63339347", "0.63339347", "0.6330482", "0.63226527", "0.6276763", "0.62732995", "0.62657464", "0.62650543", "0.62623996", "0.6261615", "0.6239028", "0.6222063", "0.62185097", "0.62140983", "0.6205692", "0.6205692", "0.6205692", "0.61874527", "0.6178767", "0.6163825", "0.6163825", "0.6163825", "0.6163825", "0.6160642", "0.6155609", "0.61548555", "0.61526346", "0.61513543", "0.6143862", "0.6142993", "0.6142885", "0.614159", "0.61406463", "0.6121116", "0.6115979", "0.61066115", "0.61064374", "0.61062586", "0.61049974", "0.6102859", "0.6096602", "0.6091186", "0.60872394", "0.6087082", "0.608472", "0.6074478", "0.60429895", "0.60429883", "0.60237104" ]
0.0
-1
Get the client data
public Object getClientData() { return clientData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\r\n\t\treturn clientData;\r\n\t}", "public Object getClientData() {\n\t\treturn clientData;\n\t}", "@Override\n protected byte[] getClientData() {\n return (clientData + \" individual\").getBytes(StandardCharsets.UTF_8);\n }", "public static Dataclient GetData(){\n return RetrofitClient.getClient(Base_Url).create(Dataclient.class);\n }", "void getDataFromServer();", "public ObservableList<Cliente> getClienteData() {\r\n return clienteData;\r\n }", "Object getData() { /* package access */\n\t\treturn data;\n\t}", "public String getData(){\r\n\t\t// Creating register message\r\n\t\tmessageToServer = GET_DATA_KEYWORD \r\n\t\t\t\t+ SEPARATOR + controller.getModel().getAuthUser().getToken();\r\n\r\n\t\t// Sending message\t\t\t\t\r\n\t\tpw.println(messageToServer);\r\n\t\tpw.flush();\r\n\t\tSystem.out.println(\"Message sent to server: \" + messageToServer);\r\n\r\n\t\t// Reading the answer from server, processing the answer\r\n\t\tString data = null;\r\n\t\ttry {\r\n\r\n\t\t\tdata = br.readLine();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, e.toString(), \"Error\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\r\n\t\treturn data;\r\n\t}", "String readData() {\n if (getLog().isDebugEnabled()) {\n getLog().debug(\"Waiting for synapse unit test agent response\");\n }\n\n if (clientSocket != null) {\n try (InputStream inputStream = clientSocket.getInputStream();\n ObjectInputStream objectInputStream = new ObjectInputStream(inputStream)) {\n\n return (String) objectInputStream.readObject();\n } catch (Exception e) {\n getLog().error(\"Error in getting response from the synapse unit test agent\", e);\n }\n }\n\n return null;\n }", "public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}", "public String getData()\n {\n return data;\n }", "public Object getData(){\n\t\treturn this.data;\n\t}", "public ClientInfo getClientInfo() {\n // Lazy initialization with double-check.\n ClientInfo c = this.clientInfo;\n if (c == null) {\n synchronized (this) {\n c = this.clientInfo;\n if (c == null) {\n this.clientInfo = c = new ClientInfo();\n }\n }\n }\n return c;\n }", "public BaseData[] getData()\n {\n return Cdata;\n }", "public ClientData() {\n\n this.name = \"\";\n this.key = \"\";\n this.serverIpString = \"\";\n this.serverPort = 0;\n this.clientListenPort = 0;\n this.clientsSocketPort = 0;\n this.clientsLocalHostName = \"\";\n this.clientsLocalhostAddressStr = \"\";\n\n this.socket = new Socket();\n\n try {\n this.socket.bind(null);\n } catch (IOException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n \n try {\n this.clientsLocalHostName = InetAddress.getLocalHost().getHostName();\n this.clientsLocalhostAddressStr = InetAddress.getLocalHost().getHostAddress();\n } catch (UnknownHostException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n this.clientsSocketPort = socket.getLocalPort();\n\n parseClientConfigFile();\n\n //Initialize ServerSocket and bind to specific port.\n try {\n serverS = new ServerSocket(clientListenPort);\n } catch (IOException ex) {\n ClientInterface.getjTextArea1().append(\"Error. Unable to load data and create client.\");\n }\n }", "public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public String getData()\n\t{\n\t\treturn data;\n\t}", "public String getData() {\n\treturn data;\n }", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public Object getData() {\n\t\treturn data;\n\t}", "private SOSCommunicationHandler getClient() {\r\n\t\treturn client;\r\n\t}", "Client getClient();", "@Override\n\tpublic HashMap<String, String> getData() {\n\t\treturn dataSourceApi.getData();\n\t}", "public synchronized Object getData() {\n return data;\n }", "public String getData() {\r\n\t\treturn data;\r\n\t}", "protected ScServletData getData()\n {\n return ScServletData.getLocal();\n }", "public String getData() {\r\n return this.data;\r\n }", "@RequestMapping(value = \"/clientData/{module}\", method = RequestMethod.GET)\n public @ResponseBody String getModuleClientData(@PathVariable String module, HttpServletResponse response) {\n return creatorService.getClientData(module);\n }", "double clientData(final int index, final int data);", "public java.lang.String getData() {\r\n return data;\r\n }", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "@Override\n\tpublic void readClient(Client clt) {\n\t\t\n\t}", "@java.lang.Override\n public com.clarifai.grpc.api.Data getData() {\n return data_ == null ? com.clarifai.grpc.api.Data.getDefaultInstance() : data_;\n }", "public String getData() {\r\n\t\t\treturn data;\r\n\t\t}", "Object getData();", "Object getData();", "@Override\n public io.emqx.exhook.ClientInfo getClientinfo() {\n return clientinfo_ == null ? io.emqx.exhook.ClientInfo.getDefaultInstance() : clientinfo_;\n }", "String getData();", "public Object getData() \n {\n return data;\n }", "private Client readClient() {\n System.out.println(\"Read client {id,name,age,membership}\");\n\n BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n try {\n Long id = Long.valueOf(bufferRead.readLine());// ...\n String name = bufferRead.readLine();\n int age = Integer.parseInt(bufferRead.readLine());\n String membership = bufferRead.readLine();\n\n Client client = new Client(name, age, membership);\n client.setId(id);\n\n return client;\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return null;\n }", "public abstract Client getClient();", "public Data getData() {\n return data;\n }", "public Data getData() {\n return data;\n }", "public Object getData();", "public String getData() {\r\n return Data;\r\n }", "public String getData() {\r\n return Data;\r\n }", "public Object data() {\n return this.data;\n }", "public static DucktalesClient getClient() {\n \treturn client;\n }", "public io.emqx.exhook.ClientInfo getClientinfo() {\n if (clientinfoBuilder_ == null) {\n return clientinfo_ == null ? io.emqx.exhook.ClientInfo.getDefaultInstance() : clientinfo_;\n } else {\n return clientinfoBuilder_.getMessage();\n }\n }", "T getData() {\n\t\treturn data;\n\t}", "@java.lang.Override\n public godot.wire.Wire.Value getData() {\n return data_ == null ? godot.wire.Wire.Value.getDefaultInstance() : data_;\n }", "public void retrieveData(){\n\t\tloaderImage.loadingStart();\n\t\tJsonClient js = new JsonClient();\n\t\tjs.retrieveData(JSON_URL, this);\n\t}", "public String getData() {\n\t\treturn this.data;\n\t}", "public Client getClient() {\r\n\t\treturn this.client;\r\n\t}", "private JsonObject getServerData() {\n // Minecraft specific data\n int playerAmount = Server.getInstance().getOnlinePlayers().size();\n int onlineMode = Server.getInstance().getPropertyBoolean(\"xbox-auth\", true) ? 1 : 0;\n String softwareVersion = Server.getInstance().getApiVersion() + \" (MC: \" + Server.getInstance().getVersion().substring(1) + \")\";\n String softwareName = Server.getInstance().getName();\n \n // OS/Java specific data\n String javaVersion = System.getProperty(\"java.version\");\n String osName = System.getProperty(\"os.name\");\n String osArch = System.getProperty(\"os.arch\");\n String osVersion = System.getProperty(\"os.version\");\n int coreCount = Runtime.getRuntime().availableProcessors();\n \n JsonObject data = new JsonObject();\n \n data.addProperty(\"serverUUID\", serverUUID);\n \n data.addProperty(\"playerAmount\", playerAmount);\n data.addProperty(\"onlineMode\", onlineMode);\n data.addProperty(\"bukkitVersion\", softwareVersion);\n data.addProperty(\"bukkitName\", softwareName);\n \n data.addProperty(\"javaVersion\", javaVersion);\n data.addProperty(\"osName\", osName);\n data.addProperty(\"osArch\", osArch);\n data.addProperty(\"osVersion\", osVersion);\n data.addProperty(\"coreCount\", coreCount);\n \n return data;\n }", "public java.util.List getData() {\r\n return data;\r\n }", "public ArrayList<ClientHandler> getClientList()\n {\n return clientList;\n }", "public JSONRPC2Session getClient()\n {\n return client;\n }", "public HashMap<Long, String> getData() {\n\t\treturn data;\n\t}", "java.lang.String getData();", "public ClientList getClients() {\r\n return this.clients;\r\n }", "public List<Data> getData() {\n return data;\n }", "public ArrayList<Client> getClientList() {\n return this.clientList;\n }", "public Client getClient() {\n return client;\n }", "public Client getClient() {\n return client;\n }", "Collection getData();", "@Override\n public Object getData() {\n return devices;\n }", "private String readFromClient() throws IOException {\n final String request = inFromClient.readLine();\n return request;\n }", "@Override\n public io.emqx.exhook.ClientInfoOrBuilder getClientinfoOrBuilder() {\n return getClientinfo();\n }", "public Client getClient() {\n\t\treturn client;\n\t}", "public Client getClient() {\n\t\treturn client;\n\t}", "public Message getResponseData();", "public String GET(String name){\n return \"OK \" + this.clientData.get(name);\n }", "public T getData() {\r\n return data;\r\n }", "public ClientI getClient() {\n\t\treturn client;\n\t}", "public String data() {\n return this.data;\n }", "public T getData()\n\t{\n\t\treturn this.data;\n\t}", "public IData getData() {\n return data;\n }", "Object getRawData();", "byte[] getData() {\n return data;\n }", "public List<String> getData() {\r\n\t\treturn data;\r\n\t}" ]
[ "0.8409291", "0.8409291", "0.8409291", "0.8323055", "0.8323055", "0.8323055", "0.8323055", "0.82401776", "0.81847", "0.74992526", "0.69628304", "0.680502", "0.6677934", "0.6615067", "0.6538602", "0.6524495", "0.64575994", "0.6441616", "0.64179564", "0.63876045", "0.6369232", "0.6360863", "0.6359634", "0.6358457", "0.6356433", "0.6345929", "0.6345929", "0.6345929", "0.6345929", "0.6335512", "0.6335219", "0.6316682", "0.6314866", "0.63038594", "0.6299806", "0.6298956", "0.6297912", "0.6293939", "0.6276389", "0.6272706", "0.6266621", "0.6266621", "0.6266621", "0.6266621", "0.62665963", "0.6261964", "0.6250891", "0.62470305", "0.62470305", "0.6240372", "0.62357736", "0.6225704", "0.62202704", "0.621008", "0.61850524", "0.61850524", "0.6174334", "0.617054", "0.617054", "0.6170371", "0.6154192", "0.6142933", "0.6140557", "0.6139329", "0.613671", "0.61310685", "0.60961336", "0.6093664", "0.6085896", "0.60799456", "0.60639954", "0.6062463", "0.6055378", "0.60517293", "0.6049715", "0.6049412", "0.603162", "0.603162", "0.6024444", "0.60159254", "0.60157424", "0.60157406", "0.5996174", "0.5996174", "0.5994447", "0.5988703", "0.59871036", "0.598527", "0.5978218", "0.59765834", "0.5973817", "0.59653825", "0.5963054", "0.59546" ]
0.8388037
8
auto generated Axis2 call back method for rayTrace method override this method for handling normal response from rayTrace operation
public void receiveResultrayTrace( RayTracerStub.RayTraceResponse result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Color traceRay(Ray ray);", "public abstract Color traceRay(Ray ray);", "public void receiveResultrayTraceSubView(\n RayTracerStub.RayTraceSubViewResponse result\n ) {\n }", "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}", "public void receiveResultrayTraceMovie(\n RayTracerStub.RayTraceMovieResponse result\n ) {\n }", "public void raycast(VrState state);", "private Vec3 trace(Ray ray) {\n\t\tSphere sphere = null;\n\n\t\tfor (int i = 0; i < spheres.size(); i++) {\n\t\t\tif (spheres.get(i).intersect(ray)) {\n\t\t\t\tsphere = spheres.get(i);\n\t\t\t}\n\t\t}\n\n\t\tif (sphere == null) {\n\t\t\treturn new Vec3(0.0f); // Background color.\n\t\t}\n\n\t\tVec3 p = ray.getIntersection(); // Intersection point.\n\t\tVec3 n = sphere.normal(p); // Normal at intersection.\n\n\t\treturn light.phong(sphere, p, n);\n\t}", "public native void raycast(Raycaster raycaster, Object[] intersects);", "@Override\r\n public void intersect( Ray ray, IntersectResult result ) {\n\t\r\n }", "public abstract int trace();", "public void receiveResultrayTraceURL(\n RayTracerStub.RayTraceURLResponse result\n ) {\n }", "public int getRayNum();", "public static Result\n traceRecursion(PointF vLaserSource, PointF vLaserDir, float fRefractionMultiplier, PointF[] geometry, float[] afRefractiveIndices, float fIntensity, int iRecursionDepth, float fFlightLength){\n\n Result res = new Result();\n //init return lists\n res.lineSegments = new ArrayList<>();\n res.intensities = new ArrayList<>();\n res.lightLengths = new ArrayList<>();\n res.hitIntensities = new ArrayList<>();\n res.hitSegments = new ArrayList<>();\n\n //important for angle calculation\n Vec2D.normalize(vLaserDir);\n\n //recursion limiter\n if(fIntensity < 0.05f || iRecursionDepth > 20)\n return res;\n\n //populate output structure\n res.lineSegments.add(vLaserSource);\n res.intensities.add(fIntensity);\n res.lightLengths.add(fFlightLength);\n\n //initialize to infinity\n float fNearestHit = Float.MAX_VALUE;\n int iHitIndex = -1;\n\n //check each geometry line against this ray\n for (int iLine = 0; iLine < geometry.length/2; iLine++) {\n //check if source on right side\n PointF line0 = geometry[iLine*2];\n PointF line1 = geometry[iLine*2 + 1];\n\n //calculate intersection with geometry line\n float fIntersection = intersectRayLine(vLaserSource, vLaserDir, line0, line1);\n\n if(fIntersection > 0.0f && fIntersection < 1.0f){\n //stuff intersects\n //calculate intersection PointF\n PointF vIntersection = Vec2D.add(line0, Vec2D.mul(fIntersection, Vec2D.subtract(line1, line0)) );\n //calculate distance to source\n float fHitDistance = Vec2D.subtract(vLaserSource, vIntersection).length();\n if(Vec2D.subtract(vLaserSource, vIntersection).length() < fNearestHit && fHitDistance > 0.001f) {\n //new minimum distance\n fNearestHit = fHitDistance;\n iHitIndex = iLine;\n }\n }\n }\n //check if we hit\n if(iHitIndex == -1)\n {\n //bigger than screen\n final float fInfLength = 3.0f;\n res.lineSegments.add(Vec2D.add(vLaserSource, Vec2D.mul(fInfLength, vLaserDir)) );\n res.lightLengths.add(fFlightLength + fInfLength);\n }\n else\n {\n //there was a hit somewhere\n //first re-evaluate\n PointF line0 = geometry[iHitIndex*2];\n PointF line1 = geometry[iHitIndex*2 + 1];\n\n res.hitSegments.add(iHitIndex);\n res.hitIntensities.add(fIntensity);\n //calculate point of impact\n float fIntersection = intersectRayLine(vLaserSource, vLaserDir, line0, line1);\n PointF vIntersection = Vec2D.add(line0, Vec2D.mul(fIntersection, Vec2D.subtract(line1, line0)) );\n\n //spam line end\n res.lineSegments.add(vIntersection);\n float fNextLength = fFlightLength + fNearestHit;\n res.lightLengths.add(fNextLength);\n\n if(afRefractiveIndices[iHitIndex] < 0.0f)\n return res;\n\n //calculate normalized surface normal\n PointF vLine = Vec2D.subtract(line1, line0);\n PointF vSurfaceNormal = Vec2D.flip(Vec2D.perpendicular(vLine));\n Vec2D.normalize(vSurfaceNormal);\n\n //calculate direction of reflection\n PointF vReflected = Vec2D.add(Vec2D.mul(-2.0f, Vec2D.mul(Vec2D.dot(vSurfaceNormal, vLaserDir), vSurfaceNormal)), vLaserDir);\n\n double fImpactAngle = Math.acos(Vec2D.dot(vSurfaceNormal, Vec2D.flip(vLaserDir)));\n\n double fRefractionAngle = 0.0f;\n float fRefracted = 0.0f;\n boolean bTotalReflection = false;\n\n if(afRefractiveIndices[iHitIndex] < 5.0f) {\n //calculate which side of the object we're on\n if (Vec2D.dot(vSurfaceNormal, Vec2D.subtract(vLaserSource, line0)) < 0) {\n //from medium to air\n //angle will become bigger\n double fSinAngle = Math.sin(fImpactAngle) * (afRefractiveIndices[iHitIndex] * fRefractionMultiplier);\n\n if (fSinAngle > 1.0f || fSinAngle < -1.0f)\n //refraction would be back into object\n bTotalReflection = true;\n else {\n //calculate refraction\n fRefractionAngle = Math.asin(fSinAngle);\n float fFlippedImpactAngle = (float) Math.asin(Math.sin(fImpactAngle));\n fRefracted = (float) (2.0f * Math.sin(fFlippedImpactAngle) * Math.cos(fRefractionAngle) / Math.sin(fFlippedImpactAngle + fRefractionAngle));\n\n //set refraction angle for direction calculation\n fRefractionAngle = Math.PI - fRefractionAngle;\n }\n } else {\n //from air to medium\n //angle will become smaller\n fRefractionAngle = Math.asin(Math.sin(fImpactAngle) / (afRefractiveIndices[iHitIndex] * fRefractionMultiplier));\n fRefracted = (float) (2.0f * Math.sin(fRefractionAngle) * Math.cos(fImpactAngle) / Math.sin(fImpactAngle + fRefractionAngle));\n }\n }\n else\n bTotalReflection = true;\n\n //give the refraction angle a sign\n if(Vec2D.dot(vLine, vLaserDir) < 0)\n fRefractionAngle = -fRefractionAngle;\n\n //calculate direction of refraction\n double fInvertedSurfaceAngle = Math.atan2(-vSurfaceNormal.y, -vSurfaceNormal.x);\n PointF vRefracted = new PointF((float)Math.cos(fInvertedSurfaceAngle - fRefractionAngle), (float)Math.sin(fInvertedSurfaceAngle - fRefractionAngle));\n\n //calculate amount of light reflected\n float fReflected = 1.0f - fRefracted;\n\n //continue with recursion, reflection\n Result resReflection = traceRecursion(vIntersection, vReflected, fRefractionMultiplier, geometry, afRefractiveIndices, fReflected * fIntensity, iRecursionDepth+1, fNextLength);\n //merge results\n res.lineSegments.addAll(resReflection.lineSegments);\n res.intensities.addAll(resReflection.intensities);\n res.lightLengths.addAll(resReflection.lightLengths);\n res.hitSegments.addAll(resReflection.hitSegments);\n res.hitIntensities.addAll(resReflection.hitIntensities);\n\n //continue with recursion, refraction\n if(!bTotalReflection) {\n Result resRefraction = traceRecursion(vIntersection, vRefracted, fRefractionMultiplier, geometry, afRefractiveIndices, fRefracted * fIntensity, iRecursionDepth+1, fNextLength);\n //merge results\n res.lineSegments.addAll(resRefraction.lineSegments);\n res.intensities.addAll(resRefraction.intensities);\n res.lightLengths.addAll(resRefraction.lightLengths);\n res.hitSegments.addAll(resRefraction.hitSegments);\n res.hitIntensities.addAll(resRefraction.hitIntensities);\n }\n }\n return res;\n }", "Reflexion(final Ray ray, final Raytracer tracer){\n\t\tthis.ray = ray;\n\t\tthis.tracer = tracer;\n\t}", "public RayTracerCallbackHandler(){\n this.clientData = null;\n }", "@Override\n public void\n doExtraInformation(Ray inRay, double inT,\n GeometryIntersectionInformation outData) {\n // TODO!\n }", "public Object handleCommandResponse(Object response) throws RayoProtocolException;", "private LightIntensity traceRay(Ray ray, int currentTraceDepth) {\n if (currentTraceDepth > MAX_TRACE_DEPTH) {\n return LightIntensity.makeZero();\n }\n\n currentTraceDepth += 1;\n\n Solid.Intersection solidIntersection = castRayOnSolids(ray);\n LightSource.Intersection lightIntersection = castRayOnLights(ray);\n\n LightIntensity result = LightIntensity.makeZero();\n if (solidIntersection == null && lightIntersection == null) {\n // Nothing to do\n } else if (solidIntersection == null && lightIntersection != null) {\n result = result.add(lightIntersection.intersectedLight.intensity);\n } else if (solidIntersection != null & lightIntersection == null) {\n result = handleSolidRayHit(ray, solidIntersection, result, currentTraceDepth);\n } else if (solidIntersection.info.pointOfIntersection.distance(ray.origin) < lightIntersection.info.pointOfIntersection.distance(ray.origin)) {\n result = handleSolidRayHit(ray, solidIntersection, result, currentTraceDepth);\n } else {\n result = result.add(lightIntersection.intersectedLight.intensity);\n }\n\n return result;\n }", "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 abstract void process(Ray ray, Stack<Ray> bifurcations);", "@Override\n public void onMoveLegResponse(MoveLegResponse ind) {\n\n }", "public interface Ray3 extends Path3, Serializable, Cloneable {\r\n\r\n /**\r\n * Creates a new ray from 3 coordinates for the origin point and 3 coordinates for the direction vector.\r\n *\r\n * @param xo the x-coordinate of the origin\r\n * @param yo the y-coordinate of the origin\r\n * @param zo the z-coordinate of the origin\r\n * @param xd the x-coordinate of the direction\r\n * @param yd the y-coordinate of the direction\r\n * @param zd the z-coordinate of the direction\r\n * @return a new ray\r\n */\r\n @NotNull\r\n static Ray3 fromOD(double xo, double yo, double zo, double xd, double yd, double zd) {\r\n return new Ray3Impl(xo, yo, zo, xd, yd, zd);\r\n }\r\n\r\n /**\r\n * Creates a new ray from an origin point and a direction vector.\r\n *\r\n * @param origin the origin\r\n * @param dir the direction\r\n * @return a new ray\r\n */\r\n @NotNull\r\n static Ray3 fromOD(Vector3 origin, Vector3 dir) {\r\n return new Ray3Impl(origin, dir);\r\n }\r\n\r\n /**\r\n * Creates a new ray between two points.\r\n * The origin will be a copy of the point {@code from}.\r\n * The directional vector will be a new vector from {@code from} to {@code to}.\r\n *\r\n * @param from the first point\r\n * @param to the second point\r\n * @return a new ray\r\n */\r\n @NotNull\r\n static Ray3 between(Vector3 from, Vector3 to) {\r\n return fromOD(from, Vector3.between(from, to));\r\n }\r\n\r\n /**\r\n * Creates a new ray between two points.\r\n *\r\n * @param ox the origin x\r\n * @param oy the origin x\r\n * @param oz the origin x\r\n * @param tx the target x\r\n * @param ty the target x\r\n * @param tz the target x\r\n * @return a new ray\r\n */\r\n @NotNull\r\n static Ray3 between(double ox, double oy, double oz, double tx, double ty, double tz) {\r\n return fromOD(ox, oy, oz, tx-ox, ty-oy, tz-oz);\r\n }\r\n\r\n // GETTERS\r\n\r\n /**\r\n * Returns the x-coordinate of the origin of this ray.\r\n *\r\n * @return the x-coordinate of the origin of this ray\r\n */\r\n abstract double getOrgX();\r\n\r\n /**\r\n * Returns the y-coordinate of the origin of this ray.\r\n *\r\n * @return the y-coordinate of the origin of this ray\r\n */\r\n abstract double getOrgY();\r\n\r\n /**\r\n * Returns the z-coordinate of the origin of this ray.\r\n *\r\n * @return the z-coordinate of the origin of this ray\r\n */\r\n abstract double getOrgZ();\r\n\r\n /**\r\n * Returns the x-coordinate of the direction of this ray.\r\n *\r\n * @return the x-coordinate of the direction of this ray\r\n */\r\n abstract double getDirX();\r\n\r\n /**\r\n * Returns the y-coordinate of the direction of this ray.\r\n *\r\n * @return the y-coordinate of the direction of this ray\r\n */\r\n abstract double getDirY();\r\n\r\n /**\r\n * Returns the z-coordinate of the direction of this ray.\r\n *\r\n * @return the z-coordinate of the direction of this ray\r\n */\r\n abstract double getDirZ();\r\n\r\n /**\r\n * Returns the length of this ray.\r\n *\r\n * @return the length of this ray\r\n */\r\n abstract double getLength();\r\n\r\n /**\r\n * Returns the squared length of this ray.\r\n *\r\n * @return the squared length of this ray\r\n */\r\n abstract double getLengthSquared();\r\n \r\n /**\r\n * Returns the origin of this ray in a new vector.\r\n *\r\n * @return the origin of this ray in a new vector\r\n */\r\n @Override\r\n default Vector3 getOrigin() {\r\n return Vector3.fromXYZ(getOrgX(), getOrgY(), getOrgZ());\r\n }\r\n \r\n /**\r\n * Returns the direction of this ray in a new vector.\r\n *\r\n * @return the direction of this ray in a new vector\r\n */\r\n default Vector3 getDirection() {\r\n return Vector3.fromXYZ(getDirX(), getDirY(), getDirZ());\r\n }\r\n \r\n default AxisAlignedBB getBoundaries() {\r\n return AxisAlignedBB.between(getOrigin(), getEnd());\r\n }\r\n\r\n // PATH IMPL\r\n \r\n /**\r\n * Returns the end of this ray in a new vector. This is equal to the sum of the origin and direction of the vector.\r\n *\r\n * @return the end of this ray in a new vector\r\n */\r\n @Override\r\n default Vector3 getEnd() {\r\n return Vector3.fromXYZ(getOrgX() + getDirX(), getOrgY() + getDirY(), getOrgZ() + getDirZ());\r\n }\r\n\r\n @Override\r\n default Vector3[] getControlPoints() {\r\n return new Vector3[] {getOrigin(), getEnd()};\r\n }\r\n\r\n // CHECKERS\r\n\r\n /**\r\n * Returns whether the ray is equal to the given point at any point.\r\n *\r\n * @param x the x-coordinate of the point\r\n * @param y the y-coordinate of the point\r\n * @param z the z-coordinate of the point\r\n * @return whether the ray is equal to the given point at any point\r\n */\r\n default boolean contains(double x, double y, double z) {\r\n return Vector3.between(getOrgX(), getOrgY(), getOrgZ(), x, y, z).isMultipleOf(getDirection());\r\n }\r\n\r\n /**\r\n * Returns whether the ray is equal to the given point at any point.\r\n *\r\n * @param point the point\r\n * @return whether the ray is equal to the given point at any point\r\n */\r\n default boolean contains(Vector3 point) {\r\n return contains(point.getX(), point.getY(), point.getZ());\r\n }\r\n\r\n /**\r\n * Returns whether this ray is equal to another ray. This condition is true\r\n * if both origin and direction are equal.\r\n *\r\n * @param ray the ray\r\n * @return whether this ray is equal to the ray\r\n */\r\n default boolean equals(Ray3 ray) {\r\n return\r\n getOrigin().equals(ray.getOrigin()) &&\r\n getDirection().isMultipleOf(ray.getDirection());\r\n }\r\n\r\n // SETTERS\r\n\r\n /**\r\n * Sets the origin of the ray to a given point.\r\n *\r\n * @param x the x-coordinate of the point\r\n * @param y the y-coordinate of the point\r\n * @param z the z-coordinate of the point\r\n */\r\n abstract void setOrigin(double x, double y, double z);\r\n\r\n /**\r\n * Sets the origin of the ray to a given point.\r\n *\r\n * @param point the point\r\n */\r\n default void setOrigin(Vector3 point) {\r\n setOrigin(point.getX(), point.getY(), point.getZ());\r\n }\r\n\r\n /**\r\n * Sets the direction of this ray to a given vector.\r\n *\r\n * @param x the x-coordinate of the vector\r\n * @param y the y-coordinate of the vector\r\n * @param z the z-coordinate of the vector\r\n */\r\n abstract void setDirection(double x, double y, double z);\r\n \r\n /**\r\n * Sets the direction of this ray to a given vector.\r\n *\r\n * @param v the vector\r\n */\r\n default void setDirection(Vector3 v) {\r\n setDirection(v.getX(), v.getY(), v.getZ());\r\n }\r\n\r\n /**\r\n * Sets the length of this ray to a given length.\r\n *\r\n * @param t the new hypot\r\n */\r\n default void setLength(double t) {\r\n scaleDirection(t / getLength());\r\n }\r\n\r\n default void normalize() {\r\n setLength(1);\r\n }\r\n \r\n //TRANSFORMATIONS\r\n \r\n default void scaleOrigin(double x, double y, double z) {\r\n setDirection(getOrgX()*x, getOrgY()*y, getOrgZ()*z);\r\n }\r\n \r\n default void scaleDirection(double x, double y, double z) {\r\n setDirection(getDirX()*x, getDirY()*y, getDirZ()*z);\r\n }\r\n \r\n default void scaleOrigin(double factor) {\r\n scaleOrigin(factor, factor, factor);\r\n }\r\n \r\n default void scaleDirection(double factor) {\r\n scaleDirection(factor, factor, factor);\r\n }\r\n \r\n default void scale(double x, double y, double z) {\r\n scaleOrigin(x, y, z);\r\n scaleDirection(x, y, z);\r\n }\r\n \r\n default void scale(double factor) {\r\n scale(factor, factor, factor);\r\n }\r\n \r\n /**\r\n * Translates the ray origin by a given amount on each axis.\r\n *\r\n * @param x the x-coordinate\r\n * @param y the y-coordinate\r\n * @param z the z-coordinate\r\n */\r\n abstract void translate(double x, double y, double z);\r\n\r\n // MISC\r\n\r\n /**\r\n * <p>\r\n * Returns a new interval iterator for this ray. This iterator will return all points in a given interval that\r\n * are on a ray.\r\n * </p>\r\n * <p>\r\n * For example, a ray with hypot 1 will produce an iterator that iterates over precisely 3 points if the\r\n * interval is 0.5 (or 0.4).\r\n * </p>\r\n * <p>\r\n * To get an iterator that iterates over a specified amount of points {@code x}, make use of\r\n * <blockquote>\r\n * {@code intervalIterator( getLength() / (x - 1) )}\r\n * </blockquote>\r\n * </p>\r\n *\r\n * @param interval the interval of iteration\r\n * @return a new interval iterator\r\n */\r\n default Iterator<Vector3> intervalIterator(double interval) {\r\n return new IntervalIterator(this, interval);\r\n }\r\n\r\n /**\r\n * <p>\r\n * Returns a new interval iterator for this ray. This iterator will return all points in a given interval that\r\n * are on a ray.\r\n * </p>\r\n * <p>\r\n * For example, a ray with hypot 1 will produce an iterator that iterates over precisely 3 points if the\r\n * interval is 0.5 (or 0.4).\r\n * </p>\r\n * <p>\r\n * To get an iterator that iterates over a specified amount of points {@code x}, make use of\r\n * <blockquote>\r\n * {@code intervalIterator( getLength() / (x - 1) )}\r\n * </blockquote>\r\n * </p>\r\n *\r\n * @return a new interval iterator\r\n */\r\n default Iterator<BlockVector> blockIntervalIterator() {\r\n return new BlockIntervalIterator(this);\r\n }\r\n\r\n /**\r\n * Returns a given amount of equally distributed points on this ray.\r\n *\r\n * @param amount the amount\r\n * @return an array containing points on this ray\r\n */\r\n @Override\r\n default Vector3[] getPoints(int amount) {\r\n if (amount < 0) throw new IllegalArgumentException(\"amount < 0\");\r\n if (amount == 0) return new Vector3[0];\r\n if (amount == 1) return new Vector3[] {getOrigin()};\r\n if (amount == 2) return new Vector3[] {getOrigin(), getEnd()};\r\n\r\n int t = amount - 1, i = 0;\r\n Vector3[] result = new Vector3[amount];\r\n\r\n Iterator<Vector3> iter = intervalIterator(getLengthSquared() / t*t);\r\n while (iter.hasNext())\r\n result[i++] = iter.next();\r\n\r\n return result;\r\n }\r\n\r\n abstract Ray3 clone();\r\n\r\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\n doExtraInformation(Ray inRay, double inT, \n GeometryIntersectionInformation outData) {\n outData.p = lastInfo.p;\n\n switch ( lastPlane ) {\n case 1:\n outData.n.x = 0;\n outData.n.y = 0;\n outData.n.z = 1;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = 1-(outData.p.x / size.x - 0.5);\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 2:\n outData.n.x = 0;\n outData.n.y = 0;\n outData.n.z = -1;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = outData.p.x / size.x - 0.5;\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 3:\n outData.n.x = 0;\n outData.n.z = 0;\n outData.n.y = 1;\n outData.u = 1-(outData.p.x / size.x - 0.5);\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = -1;\n outData.t.y = 0;\n outData.t.z = 0;\n break;\n case 4:\n outData.n.x = 0;\n outData.n.z = 0;\n outData.n.y = -1;\n outData.u = outData.p.x / size.x - 0.5;\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 1;\n outData.t.y = 0;\n outData.t.z = 0;\n break;\n case 5:\n outData.n.x = 1;\n outData.n.y = 0;\n outData.n.z = 0;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 6:\n outData.n.x = -1;\n outData.n.y = 0;\n outData.n.z = 0;\n outData.u = 1-(outData.p.y / size.y - 0.5);\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 0;\n outData.t.y = -1;\n outData.t.z = 0;\n break;\n default:\n outData.u = 0;\n outData.v = 0;\n break;\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 }", "Object getTrace();", "public void add(RayHandler rayHandler);", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1) {\n\n\t}", "@Override\n public void onRayCastClick(Vector2f mouse, CollisionResult result) {\n }", "protected synchronized void processRay (int iIndex, int rayTraceStepSize) {\r\n\r\n // Compute the number of steps to use given the step size of the ray.\r\n // The number of steps is proportional to the length of the line segment.\r\n m_kPDiff.sub(m_kP1, m_kP0);\r\n float fLength = m_kPDiff.length();\r\n int iSteps = (int)(1.0f/rayTraceStepSize * fLength);\r\n\r\n // find the maximum value along the ray\r\n if ( iSteps > 1 )\r\n {\r\n int iMaxIntensityColor = getBackgroundColor().getRGB();\r\n float fMax = -1.0f;\r\n boolean bHitModel = false;\r\n float fTStep = 1.0f/iSteps;\r\n for (int i = 1; i < iSteps; i++)\r\n {\r\n m_kP.scaleAdd(i*fTStep, m_kPDiff, m_kP0);\r\n if (interpolate(m_kP, m_acImageA) > 0) {\r\n bHitModel = true;\r\n float fValue = interpolate(m_kP, m_acImageI);\r\n if (fValue > fMax) {\r\n fMax = fValue;\r\n iMaxIntensityColor = interpolateColor(m_kP);\r\n }\r\n }\r\n }\r\n\r\n if (bHitModel) {\r\n m_aiRImage[iIndex] = iMaxIntensityColor;\r\n }\r\n }\r\n }", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2) {\n\n\t}", "public MovingObjectPosition rayTrace(World world, float rotationYaw, float rotationPitch, boolean collisionFlag, double reachDistance)\n {\n // Somehow this destroys the playerPosition vector -.-\n MovingObjectPosition pickedBlock = this.rayTraceBlocks(world, rotationYaw, rotationPitch, collisionFlag, reachDistance);\n MovingObjectPosition pickedEntity = this.rayTraceEntities(world, rotationYaw, rotationPitch, reachDistance);\n\n if (pickedBlock == null)\n {\n return pickedEntity;\n }\n else if (pickedEntity == null)\n {\n return pickedBlock;\n }\n else\n {\n double dBlock = this.distance(new Vector3(pickedBlock.hitVec));\n double dEntity = this.distance(new Vector3(pickedEntity.hitVec));\n\n if (dEntity < dBlock)\n {\n return pickedEntity;\n }\n else\n {\n return pickedBlock;\n }\n }\n }", "private Ray constructReflectedRay(Vector normal, Point3D point, Ray inRay){\n Vector R = inRay.get_direction();\n normal.scale(2*inRay.get_direction().dotProduct(normal));\n R.subtract(normal);\n Vector epsV = new Vector(normal);\n if (normal.dotProduct(R) < 0) {\n epsV.scale(-2);\n }\n else {\n epsV.scale(2);\n }\n //Vector epsV = new Vector(EPS, EPS, EPS);\n Point3D eps = new Point3D(point);\n\n eps.add(epsV);\n R.normalize();\n return new Ray(eps, R);\n }", "@Override\n\tpublic void trace(Marker marker, String message, Object p0) {\n\n\t}", "@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 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}", "public abstract long getTrace();", "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 }", "public Ray calculateReflectionRay() {\n Vec3 directN = mInRay.getDirection();\n\n if(mShape.getReflection().blurryness != 0){\n CoordinateSystem coordSys = this.calculateCoordinateSystem(directN);\n\n Vec3 directNB = coordSys.vecB;\n Vec3 directNC = coordSys.vecC;\n\n directN = this.calculateTransformedRandomEndDirection(directN, directNB, directNC, true);\n }\n\n return calculateReflectionRay(directN);\n }", "@Override\n public boolean\n doIntersection(Ray inOut_Ray) {\n // TODO!\n return false;\n }", "public String toString()\n {\n return \"Ray Origin: \" + origin + \"; Direction: \" + direction + \" T: \" + VSDK.formatDouble(t);\n }", "public RayTracerCallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "@Override\n public void evalTransmittance(Ray ray, Sampler sampler, Color3d output) {\n Ray localRay = new Ray();\n worldToMedium.m.transform(ray.o, localRay.o);\n worldToMedium.m.transform(ray.d, localRay.d);\n\n double[] nearFar = new double[2];\n boolean hit = bbox.rayIntersect(localRay, nearFar);\n double near = nearFar[0];\n double far = nearFar[1];\n if (!hit) {\n output.set(1,1,1);\n }\n\n localRay.mint = Math.max(ray.mint, near);\n localRay.maxt = Math.min(ray.maxt, far);\n\n double dist = localRay.maxt - localRay.mint;\n if (dist <= 0) {\n output.set(1,1,1);\n } else {\n double integral = data.integrateFloat(localRay);\n double value = Math.exp(-densityMultiplier * integral);\n output.set(value, value, value);\n }\n }", "public void startdirectOrderStateQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQuery directOrderStateQuery0,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directOrderStateQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directOrderStateQuery0,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultdirectOrderStateQuery(\n (net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrordirectOrderStateQuery(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectOrderStateQuery(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectOrderStateQuery(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrordirectOrderStateQuery(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrordirectOrderStateQuery(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrordirectOrderStateQuery(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[0].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[0].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "@Action\n public void addRay() {\n Point2D p1 = randomPoint(), p2 = randomPoint();\n TwoPointGraphic ag = new TwoPointGraphic(p1, p2, MarkerRenderer.getInstance());\n MarkerRendererToClip rend = new MarkerRendererToClip();\n rend.setRayRenderer(new ArrowPathRenderer(ArrowLocation.END));\n ag.getStartGraphic().setRenderer(rend);\n ag.setDefaultTooltip(\"<html><b>Ray</b>: <i>\" + p1 + \", \" + p2 + \"</i>\");\n ag.setDragEnabled(true);\n root1.addGraphic(ag); \n }", "@Override\n\tpublic void shade(Colord outIntensity, Scene scene, Ray ray, IntersectionRecord record, int depth) {\n\t\t// TODO#A7: fill in this function.\n\t\t// 1) Determine whether the ray is coming from the inside of the surface\n\t\t// or the outside.\n\t\t// 2) Determine whether total internal reflection occurs.\n\t\t// 3) Compute the reflected ray and refracted ray (if total internal\n\t\t// reflection does not occur)\n\t\t// using Snell's law and call RayTracer.shadeRay on them to shade them\n\n\t\t// n1 is from; n2 is to.\n\t\tdouble n1 = 0, n2 = 0;\n\t\tdouble fresnel = 0;\n\t\tVector3d d = new Vector3d(ray.origin.clone().sub(record.location)).normalize();\n\t\tVector3d n = new Vector3d(record.normal).normalize();\n\t\tdouble theta = n.dot(d);\n\n\t\t// CASE 1a: ray coming from outside.\n\t\tif (theta > 0) {\n\t\t\tn1 = 1.0;\n\t\t\tn2 = refractiveIndex;\n\t\t\tfresnel = fresnel(n, d, refractiveIndex);\n\t\t}\n\n\t\t// CASE 1b: ray coming from inside.\n\t\telse if (theta < 0) {\n\t\t\tn1 = refractiveIndex;\n\t\t\tn2 = 1.0;\n\t\t\tn.mul(-1.0);\n\t\t\tfresnel = fresnel(n, d, 1/refractiveIndex);\n\t\t\ttheta = n.dot(d);\n\t\t}\n\n\t\tVector3d reflectionDir = new Vector3d(n).mul(2 * theta).sub(d.clone()).normalize();\n\t\tRay reflectionRay = new Ray(record.location.clone(), reflectionDir);\n\t\treflectionRay.makeOffsetRay();\n\t\tColord reflectionColor = new Colord();\n\t\tRayTracer.shadeRay(reflectionColor, scene, reflectionRay, depth+1);\n\n\t\tdouble det = 1 - (Math.pow(n1, 2.0) * (1 - Math.pow(theta, 2.0))) / (Math.pow(n2, 2.0));\n\n\t\tif (det < 0.0) {\n\t\t\toutIntensity.add(reflectionColor);\n\t\t} else {\n\n\t\t\td = new Vector3d(record.location.clone().sub(ray.origin)).normalize();\n\n\t\t\tVector3d refractionDir = new Vector3d((d.clone().sub(n.clone().mul(d.dot(n))).mul(n1/n2)));\n\t\t\trefractionDir.sub(n.clone().mul(Math.sqrt(det)));\n\t\t\tRay refractionRay = new Ray(record.location.clone(), refractionDir);\n\t\t\trefractionRay.makeOffsetRay();\n\n\t\t\tColord refractionColor = new Colord();\n\t\t\tRayTracer.shadeRay(refractionColor, scene, refractionRay, depth+1);\n\n\t\t\trefractionColor.mul(1-fresnel);\n\t\t\treflectionColor.mul(fresnel);\n\t\t\toutIntensity.add(reflectionColor).add(refractionColor);\n\n\t\t}\n\t}", "@Override\n\tpublic void trace(Marker marker, Message msg) {\n\n\t}", "@Override\n protected void processTraceData(TraceData[] traceData, final String lineName) {\n _crossplotProcess.process(traceData);\n }", "@Override\n\tpublic void trace(String message, Object p0, Object p1) {\n\n\t}", "private static void tracer(Scene scene, Ray ray, short[] rgb) {\r\n\t\tRayIntersection closest = findClosestIntersection(scene, ray);\r\n\r\n\t\tif (closest == null) {\r\n\t\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\t\trgb[i] = 0;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tdetermineColor(scene, closest, rgb, ray.start);\r\n\t\t}\r\n\t}", "public void startorderRadiologyExamination(\n\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrder radiologyOrder4,\n\n final org.pahospital.www.radiologyservice.RadiologyServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"http://www.PAHospital.org/RadiologyService/OrderRadiologyExamination\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n radiologyOrder4,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"orderRadiologyExamination\")), new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"orderRadiologyExamination\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultorderRadiologyExamination(\n (org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrororderRadiologyExamination(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"OrderRadiologyExamination\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"OrderRadiologyExamination\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"OrderRadiologyExamination\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrororderRadiologyExamination(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrororderRadiologyExamination(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrororderRadiologyExamination(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrororderRadiologyExamination(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrororderRadiologyExamination(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[1].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[1].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "@Override\r\n\tpublic String toString(\r\n\t) {\r\n\t\treturn( \"Ray: \" + mDirection + \", Origin: \" + mOrigin );\r\n\t}", "@Override\n\tpublic void trace(Marker marker, Object message) {\n\n\t}", "@Override\n\tpublic void traceExit() {\n\n\t}", "@Override\n\tpublic void trace(Message msg) {\n\n\t}", "@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 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 MovingObjectPosition collisionRayTrace(World world, int x, int y, int z, Vec3 startVec, Vec3 endVec)\n\t {\n\t this.setBlockBoundsBasedOnState(world, x, y, z);\n\t return super.collisionRayTrace(world, x, y, z, startVec, endVec);\n\t }", "public net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse directOrderStateQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQuery directOrderStateQuery0)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directOrderStateQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directOrderStateQuery0,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "@Override\n\tpublic void trace(String message, Object p0, Object p1, Object p2) {\n\n\t}", "@Override\n\tpublic void trace(Marker marker, String message, Object... params) {\n\n\t}", "protected static void tracer(Scene scene, Ray ray, short[] rgb) {\n\t\trgb[0] = 0;\n\t\trgb[1] = 0;\n\t\trgb[2] = 0;\n\t\tRayIntersection closest = findClosestIntersection(scene, ray);\n\t\tif (closest == null) {\n\t\t\treturn;\n\t\t}\n\t\tList<LightSource> lights = scene.getLights();\n\t\t\n\t\trgb[0] = 15;\n\t\trgb[1] = 15;\n\t\trgb[2] = 15;\n\t\tPoint3D normal = closest.getNormal();\n\t\tfor (LightSource light : lights) {\n\t\t\tRay lightRay = Ray.fromPoints(light.getPoint(), closest.getPoint());\n\t\t\tRayIntersection lightClosest = findClosestIntersection(scene, lightRay);\n\n\t\t\tif(lightClosest == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif ( lightClosest.getPoint().sub(light.getPoint()).norm() + 0.001 < \n\t\t\t\t\tclosest.getPoint().sub(light.getPoint()).norm()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tPoint3D r = lightRay.direction.sub(normal.scalarMultiply(2*(lightRay.direction.scalarProduct(normal))));\n\t\t\t\n\t\t\trgb[0] += light.getR()*(closest.getKdr()*(Math.max(lightRay.direction.scalarProduct(normal),0)) + closest.getKrr() *\n\t\t\t\t\tMath.pow(ray.direction.scalarProduct(r),closest.getKrn()));\n\t\t\trgb[1] += light.getG()*(closest.getKdg()*(Math.max(lightRay.direction.scalarProduct(normal),0)) + closest.getKrg() *\n\t\t\t\t\tMath.pow(ray.direction.scalarProduct(r),closest.getKrn()));\n\t\t\trgb[2] += light.getB()*(closest.getKdb()*(Math.max(lightRay.direction.scalarProduct(normal),0)) + closest.getKrb() *\n\t\t\t\t\tMath.pow(ray.direction.scalarProduct(r),closest.getKrn()));\n\t\t}\n\t}", "@Override\n\tpublic void trace(Object message) {\n\n\t}", "private StaticPacketTrace getTrace(List<ConnectPoint> completePath, ConnectPoint in, StaticPacketTrace trace,\n boolean isDualHomed) {\n\n log.debug(\"------------------------------------------------------------\");\n\n //if the trace already contains the input connect point there is a loop\n if (pathContainsDevice(completePath, in.deviceId())) {\n trace.addResultMessage(\"Loop encountered in device \" + in.deviceId());\n completePath.add(in);\n trace.addCompletePath(completePath);\n trace.setSuccess(false);\n return trace;\n }\n\n //let's add the input connect point\n completePath.add(in);\n\n //If the trace has no outputs for the given input we stop here\n if (trace.getHitChains(in.deviceId()) == null) {\n TroubleshootUtils.computePath(completePath, trace, null);\n trace.addResultMessage(\"No output out of device \" + in.deviceId() + \". Packet is dropped\");\n trace.setSuccess(false);\n return trace;\n }\n\n //If the trace has outputs we analyze them all\n for (PipelineTraceableHitChain outputPath : trace.getHitChains(in.deviceId())) {\n\n ConnectPoint cp = outputPath.outputPort();\n log.debug(\"Connect point in {}\", in);\n log.debug(\"Output path {}\", cp);\n log.debug(\"{}\", outputPath.egressPacket());\n\n if (outputPath.isDropped()) {\n continue;\n }\n\n //Hosts for the the given output\n Set<Host> hostsList = hostNib.getConnectedHosts(cp);\n //Hosts queried from the original ip or mac\n Set<Host> hosts = getHosts(trace);\n\n if (in.equals(cp) && trace.getInitialPacket().getCriterion(Criterion.Type.VLAN_VID) != null &&\n outputPath.egressPacket().packet().getCriterion(Criterion.Type.VLAN_VID) != null\n && ((VlanIdCriterion) trace.getInitialPacket().getCriterion(Criterion.Type.VLAN_VID)).vlanId()\n .equals(((VlanIdCriterion) outputPath.egressPacket()\n .packet().getCriterion(Criterion.Type.VLAN_VID)).vlanId())) {\n if (trace.getHitChains(in.deviceId()).size() == 1 &&\n TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort())) {\n trace.addResultMessage(\"Connect point out \" + cp + \" is same as initial input \" + in);\n trace.setSuccess(false);\n }\n } else if (!Collections.disjoint(hostsList, hosts)) {\n //If the two host collections contain the same item it means we reached the proper output\n log.debug(\"Stopping here because host is expected destination, reached through {}\", completePath);\n if (TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort())) {\n trace.addResultMessage(\"Reached required destination Host \" + cp);\n trace.setSuccess(true);\n }\n break;\n\n } else if (cp.port().equals(PortNumber.CONTROLLER)) {\n //Getting the master when the packet gets sent as packet in\n NodeId master = mastershipNib.getMasterFor(cp.deviceId());\n // TODO if we don't need to print master node id, exclude mastership NIB which is used only here\n trace.addResultMessage(PACKET_TO_CONTROLLER + \" \" + master.id());\n TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort());\n } else if (linkNib.getEgressLinks(cp).size() > 0) {\n //TODO this can be optimized if we use a Tree structure for paths.\n //if we already have outputs let's check if the one we are considering starts from one of the devices\n // in any of the ones we have.\n if (trace.getCompletePaths().size() > 0) {\n ConnectPoint inputForOutput = null;\n List<ConnectPoint> previousPath = new ArrayList<>();\n for (List<ConnectPoint> path : trace.getCompletePaths()) {\n for (ConnectPoint connect : path) {\n //if the path already contains the input for the output we've found we use it\n if (connect.equals(in)) {\n inputForOutput = connect;\n previousPath = path;\n break;\n }\n }\n }\n\n //we use the pre-existing path up to the point we fork to a new output\n if (inputForOutput != null && completePath.contains(inputForOutput)) {\n List<ConnectPoint> temp = new ArrayList<>(previousPath);\n temp = temp.subList(0, previousPath.indexOf(inputForOutput) + 1);\n if (completePath.containsAll(temp)) {\n completePath = temp;\n }\n }\n }\n\n //let's add the ouput for the input\n completePath.add(cp);\n //let's compute the links for the given output\n Set<Link> links = linkNib.getEgressLinks(cp);\n log.debug(\"Egress Links {}\", links);\n //For each link we trace the corresponding device\n for (Link link : links) {\n ConnectPoint dst = link.dst();\n //change in-port to the dst link in port\n Builder updatedPacket = DefaultTrafficSelector.builder();\n outputPath.egressPacket().packet().criteria().forEach(updatedPacket::add);\n updatedPacket.add(Criteria.matchInPort(dst.port()));\n log.debug(\"DST Connect Point {}\", dst);\n //build the elements for that device\n traceInDevice(trace, updatedPacket.build(), dst, isDualHomed, completePath);\n //continue the trace along the path\n getTrace(completePath, dst, trace, isDualHomed);\n }\n } else if (edgePortNib.isEdgePoint(outputPath.outputPort()) &&\n trace.getInitialPacket().getCriterion(Criterion.Type.ETH_DST) != null &&\n ((EthCriterion) trace.getInitialPacket().getCriterion(Criterion.Type.ETH_DST))\n .mac().isMulticast()) {\n trace.addResultMessage(\"Packet is multicast and reached output \" + outputPath.outputPort() +\n \" which is enabled and is edge port\");\n trace.setSuccess(true);\n TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort());\n if (!hasOtherOutput(in.deviceId(), trace, outputPath.outputPort())) {\n return trace;\n }\n } else if (deviceNib.getPort(cp) != null && deviceNib.getPort(cp).isEnabled()) {\n EthTypeCriterion ethTypeCriterion = (EthTypeCriterion) trace.getInitialPacket()\n .getCriterion(Criterion.Type.ETH_TYPE);\n //We treat as correct output only if it's not LLDP or BDDP\n if (!(ethTypeCriterion.ethType().equals(EtherType.LLDP.ethType())\n && !ethTypeCriterion.ethType().equals(EtherType.BDDP.ethType()))) {\n if (TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort())) {\n if (hostsList.isEmpty()) {\n trace.addResultMessage(\"Packet is \" + ((EthTypeCriterion) outputPath.egressPacket()\n .packet().getCriterion(Criterion.Type.ETH_TYPE)).ethType() + \" and reached \" +\n cp + \" with no hosts connected \");\n } else {\n IpAddress ipAddress = null;\n if (trace.getInitialPacket().getCriterion(Criterion.Type.IPV4_DST) != null) {\n ipAddress = ((IPCriterion) trace.getInitialPacket()\n .getCriterion(Criterion.Type.IPV4_DST)).ip().address();\n } else if (trace.getInitialPacket().getCriterion(Criterion.Type.IPV6_DST) != null) {\n ipAddress = ((IPCriterion) trace.getInitialPacket()\n .getCriterion(Criterion.Type.IPV6_DST)).ip().address();\n }\n if (ipAddress != null) {\n IpAddress finalIpAddress = ipAddress;\n if (hostsList.stream().anyMatch(host -> host.ipAddresses().contains(finalIpAddress)) ||\n hostNib.getHostsByIp(finalIpAddress).isEmpty()) {\n trace.addResultMessage(\"Packet is \" +\n ((EthTypeCriterion) outputPath.egressPacket().packet()\n .getCriterion(Criterion.Type.ETH_TYPE)).ethType() +\n \" and reached \" + cp + \" with hosts \" + hostsList);\n } else {\n trace.addResultMessage(\"Wrong output \" + cp + \" for required destination ip \" +\n ipAddress);\n trace.setSuccess(false);\n }\n } else {\n trace.addResultMessage(\"Packet is \" + ((EthTypeCriterion) outputPath.egressPacket()\n .packet().getCriterion(Criterion.Type.ETH_TYPE)).ethType()\n + \" and reached \" + cp + \" with hosts \" + hostsList);\n }\n }\n trace.setSuccess(true);\n }\n }\n\n } else {\n TroubleshootUtils.computePath(completePath, trace, cp);\n trace.setSuccess(false);\n if (deviceNib.getPort(cp) == null) {\n //Port is not existent on device.\n log.warn(\"Port {} is not available on device.\", cp);\n trace.addResultMessage(\"Port \" + cp + \"is not available on device. Packet is dropped\");\n } else {\n //No links means that the packet gets dropped.\n log.warn(\"No links out of {}\", cp);\n trace.addResultMessage(\"No links depart from \" + cp + \". Packet is dropped\");\n }\n }\n }\n return trace;\n }", "public org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID orderRadiologyExamination(\n\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrder radiologyOrder4)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"http://www.PAHospital.org/RadiologyService/OrderRadiologyExamination\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n radiologyOrder4,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"orderRadiologyExamination\")), new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"orderRadiologyExamination\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"OrderRadiologyExamination\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"OrderRadiologyExamination\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"OrderRadiologyExamination\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetRoadwayPageResponse getRoadwayPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetRoadwayPage getRoadwayPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"urn:getRoadwayPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getRoadwayPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getRoadwayPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetRoadwayPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetRoadwayPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}", "@Override\n\tpublic void trace(Marker marker, Message msg, Throwable t) {\n\n\t}", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}", "public net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse terminalReturnCard(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCard terminalReturnCard4)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/terminalReturnCardRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n terminalReturnCard4,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "@Override\n\tpublic void trace(String message, Object p0) {\n\n\t}", "public void startdirectQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectQuery directQuery6,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directQuery6,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directQuery\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultdirectQuery(\n (net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrordirectQuery(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectQuery(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectQuery(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrordirectQuery(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrordirectQuery(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrordirectQuery(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[3].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[3].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8) {\n\n\t}", "public void startterminalReturnCard(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCard terminalReturnCard4,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/terminalReturnCardRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n terminalReturnCard4,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultterminalReturnCard(\n (net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorterminalReturnCard(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalReturnCard(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalReturnCard(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalReturnCard(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorterminalReturnCard(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorterminalReturnCard(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[2].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[2].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public BLine2D\ngetFivePrimeRay()\nthrows Exception\n{\n\tif (this.lastNuc2D() == null)\n\t\treturn (null);\n\treturn (new BLine2D(\n\t\tthis.getPoint2D(),\n\t\tthis.lastNuc2D().getPoint2D()));\n}", "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 }", "public sample.ws.HelloWorldWSStub.HelloAuthenticatedResponse helloAuthenticated(\n\n sample.ws.HelloWorldWSStub.HelloAuthenticated helloAuthenticated8)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[4].getName());\n _operationClient.getOptions().setAction(\"helloAuthenticated\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n helloAuthenticated8,\n optimizeContent(new javax.xml.namespace.QName(\"http://ws.sample/\",\n \"helloAuthenticated\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n sample.ws.HelloWorldWSStub.HelloAuthenticatedResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (sample.ws.HelloWorldWSStub.HelloAuthenticatedResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "@Override\r\n\tprotected Ray normalAt(double xx, double yy, double zz) {\n\t\treturn null;\r\n\t}", "@External\r\n\t@SharedFunc\r\n\tpublic MetaVar Trace(){throw new RuntimeException(\"Should never be executed directly, there is probably an error in the Aspect-coding.\");}", "public void startgetTerminalCardType(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardType getTerminalCardType2,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getTerminalCardTypeRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getTerminalCardType2,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getTerminalCardType\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getTerminalCardType\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultgetTerminalCardType(\n (net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorgetTerminalCardType(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetTerminalCardType(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetTerminalCardType(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorgetTerminalCardType(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorgetTerminalCardType(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorgetTerminalCardType(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[1].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[1].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public sample.ws.HelloWorldWSStub.HelloResponse hello(\n\n sample.ws.HelloWorldWSStub.Hello hello4)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());\n _operationClient.getOptions().setAction(\"hello\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n hello4,\n optimizeContent(new javax.xml.namespace.QName(\"http://ws.sample/\",\n \"hello\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n sample.ws.HelloWorldWSStub.HelloResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (sample.ws.HelloWorldWSStub.HelloResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4) {\n\n\t}", "public void startgetOrderStatus(\n\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID radiologyOrderID6,\n\n final org.pahospital.www.radiologyservice.RadiologyServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());\n _operationClient.getOptions().setAction(\"http://www.PAHospital.org/RadiologyService/GetOrderStatus\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n radiologyOrderID6,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"getOrderStatus\")), new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"getOrderStatus\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n org.pahospital.www.radiologyservice.RadiologyServiceStub.OrderStatus.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultgetOrderStatus(\n (org.pahospital.www.radiologyservice.RadiologyServiceStub.OrderStatus)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorgetOrderStatus(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"GetOrderStatus\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"GetOrderStatus\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"GetOrderStatus\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetOrderStatus(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetOrderStatus(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorgetOrderStatus(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorgetOrderStatus(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorgetOrderStatus(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[2].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[2].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "@Override\n\tpublic void hit(Direction dir) {\n\t\t\n\t}", "@SuppressWarnings(\"deprecation\")\n\t\tpublic void doTrend(final StaplerRequest request, final StaplerResponse response) throws IOException, InterruptedException {\n\t\t\t System.out.println(\"inside map\");\n\t\t\t/* AbstractBuild<?, ?> lastBuild = project.getLastBuild();\n\t\t\t while (lastBuild != null && (lastBuild.isBuilding() || lastBuild.getAction(BuildAction.class) == null)) {\n\t\t lastBuild = lastBuild.getPreviousBuild();\n\t\t }\n\t\t\t lastBuild = lastBuild.getPreviousBuild();\n\t\t BuildAction lastAction = lastBuild.getAction(BuildAction.class);*/\n\t\t ChartUtil.generateGraph(\n\t\t request,\n\t\t response,\n\t\t Text_HTMLConverter.buildChart(build),\n\t\t CHART_WIDTH,\n\t\t CHART_HEIGHT);\n\t\t }", "public org.pahospital.www.radiologyservice.RadiologyServiceStub.OrderStatus getOrderStatus(\n\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID radiologyOrderID6)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());\n _operationClient.getOptions().setAction(\"http://www.PAHospital.org/RadiologyService/GetOrderStatus\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n radiologyOrderID6,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"getOrderStatus\")), new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"getOrderStatus\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n org.pahospital.www.radiologyservice.RadiologyServiceStub.OrderStatus.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (org.pahospital.www.radiologyservice.RadiologyServiceStub.OrderStatus)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"GetOrderStatus\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"GetOrderStatus\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"GetOrderStatus\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "@Override\n\tpublic void trace(Marker marker, Object message, Throwable t) {\n\n\t}", "public void startgetDirectAreaInfo(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfo getDirectAreaInfo16,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getDirectAreaInfoRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDirectAreaInfo16,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectAreaInfo\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectAreaInfo\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultgetDirectAreaInfo(\n (net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorgetDirectAreaInfo(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectAreaInfo(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectAreaInfo(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectAreaInfo(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectAreaInfo(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorgetDirectAreaInfo(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[8].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[8].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "@Override\n\tpublic void trace(Marker marker, String message) {\n\n\t}", "public net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse getDirectAreaInfo(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfo getDirectAreaInfo16)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getDirectAreaInfoRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDirectAreaInfo16,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectAreaInfo\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectAreaInfo\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "protected abstract void trace_end_run();", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7) {\n\n\t}", "public abstract void retrain(Call serviceCall, Response serviceResponse, CallContext messageContext);", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5) {\n\n\t}", "@Override\n\t\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}", "public net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse getTerminalCardType(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardType getTerminalCardType2)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getTerminalCardTypeRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getTerminalCardType2,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getTerminalCardType\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getTerminalCardType\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "private Ray constructReflectedRay(Vector n, Point3D point, Ray ray) {\n Vector v = ray.getDirection();\n Vector r = null;\n try {\n r = v.subtract(n.scale(v.dotProduct(n)).scale(2)).normalized();\n }\n catch (Exception e) {\n return null;\n }\n return new Ray(point, r, n);\n }", "public static DirectQueryResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DirectQueryResponse object =\n new DirectQueryResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"directQueryResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DirectQueryResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"directQueryReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setDirectQueryReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setDirectQueryReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public void trace(int node) {\n\t\tsendMessage(\"/n_trace\", new Object[] { node });\n\t}", "public net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfoResponse getDirectSrvInfo(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfo getDirectSrvInfo10)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[5].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getDirectSrvInfoRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDirectSrvInfo10,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectSrvInfo\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectSrvInfo\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfoResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfoResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectSrvInfo\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectSrvInfo\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectSrvInfo\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }" ]
[ "0.6768748", "0.6768748", "0.6006229", "0.58522946", "0.58147174", "0.575117", "0.57207", "0.5666516", "0.5552347", "0.55440307", "0.5534694", "0.55295306", "0.54879904", "0.54250836", "0.5416138", "0.53858334", "0.5377938", "0.53305924", "0.5326726", "0.5315205", "0.5264699", "0.52582306", "0.5223801", "0.5218598", "0.51956487", "0.51809806", "0.5169896", "0.5149793", "0.5129403", "0.5113979", "0.50979865", "0.5086761", "0.50826555", "0.5078069", "0.5071555", "0.5046795", "0.50436914", "0.5039607", "0.50238955", "0.5016051", "0.5012127", "0.50007147", "0.49902475", "0.49857345", "0.49730766", "0.49713504", "0.49447644", "0.49204084", "0.49016914", "0.48977074", "0.4894669", "0.4889114", "0.48877057", "0.48819634", "0.48794717", "0.4861087", "0.48516732", "0.4849256", "0.48463854", "0.484196", "0.48374408", "0.4834683", "0.48344636", "0.483196", "0.48279163", "0.48157015", "0.48152986", "0.48115012", "0.48092544", "0.4808488", "0.4789455", "0.47884974", "0.47808275", "0.47796485", "0.47757554", "0.4764147", "0.4760769", "0.47601473", "0.47434533", "0.47425252", "0.47306654", "0.4727097", "0.47114018", "0.47106013", "0.47063172", "0.4704796", "0.4699724", "0.4698063", "0.4695912", "0.46944448", "0.46929657", "0.4687673", "0.46837318", "0.46807754", "0.46751446", "0.46613225", "0.46594048", "0.46504202", "0.46481776", "0.4647959" ]
0.69158053
0
auto generated Axis2 call back method for rayTraceMovie method override this method for handling normal response from rayTraceMovie operation
public void receiveResultrayTraceMovie( RayTracerStub.RayTraceMovieResponse result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void receiveResultrayTrace(\n RayTracerStub.RayTraceResponse result\n ) {\n }", "public void receiveResultrayTraceSubView(\n RayTracerStub.RayTraceSubViewResponse result\n ) {\n }", "public abstract Color traceRay(Ray ray);", "public abstract Color traceRay(Ray ray);", "public void raycast(VrState state);", "public native void raycast(Raycaster raycaster, Object[] intersects);", "public void receiveResultrayTraceURL(\n RayTracerStub.RayTraceURLResponse result\n ) {\n }", "public int getRayNum();", "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 abstract int trace();", "public Object handleCommandResponse(Object response) throws RayoProtocolException;", "@Override\n public void onMoveLegResponse(MoveLegResponse ind) {\n\n }", "public RayTracerBase(Scene scene) {\n _scene = scene;\n }", "public RayTracerBase(Scene scene) {\n _scene = scene;\n }", "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}", "public final void postEvent$sdk_core_api_release(com.bamtech.sdk4.internal.telemetry.RequestType r12) {\n /*\n r11 = this;\n boolean r0 = r11.isInitialized()\n if (r0 != 0) goto L_0x0007\n return\n L_0x0007:\n com.bamtech.sdk4.media.adapters.AbstractPlayerAdapter r0 = r11.playerAdapter\n com.bamtech.sdk4.media.adapters.PlaybackMetrics r0 = r0.getPlaybackMetrics()\n com.bamtech.sdk4.internal.media.StreamSample r1 = r11.createSample$sdk_core_api_release(r0)\n com.bamtech.sdk4.internal.telemetry.EventBuffer r2 = r11.streamBuffer\n r2.postEvent(r1, r12)\n com.bamtech.sdk4.media.MediaItem r12 = r11.getMediaItem()\n r2 = 0\n if (r12 == 0) goto L_0x002a\n com.bamtech.sdk4.media.MediaPlayhead r12 = r12.getPlayhead()\n if (r12 == 0) goto L_0x002a\n java.lang.String r12 = r12.getContentId()\n if (r12 == 0) goto L_0x002a\n goto L_0x003a\n L_0x002a:\n com.bamtech.sdk4.media.MediaItem r12 = r11.getMediaItem()\n if (r12 == 0) goto L_0x003c\n com.bamtech.sdk4.media.MediaDescriptor r12 = r12.getDescriptor()\n if (r12 == 0) goto L_0x003c\n java.lang.String r12 = r12.getCachedMediaId()\n L_0x003a:\n r5 = r12\n goto L_0x003d\n L_0x003c:\n r5 = r2\n L_0x003d:\n com.bamtech.sdk4.media.storage.PlayheadRecorder r3 = r11.recorder\n r12 = 0\n r4 = 1\n com.bamtech.sdk4.internal.service.ServiceTransaction r4 = serviceTransaction$default(r11, r12, r4, r2)\n long r6 = r0.getCurrentPlayheadInSeconds()\n com.bamtech.sdk4.internal.telemetry.TelemetryClientPayload r12 = r1.getClient()\n com.bamtech.sdk4.internal.media.StreamSampleTelemetryData r12 = (com.bamtech.sdk4.internal.media.StreamSampleTelemetryData) r12\n long r8 = r12.getTimestamp()\n com.bamtech.sdk4.media.MediaItem r12 = r11.getMediaItem()\n if (r12 == 0) goto L_0x0063\n com.bamtech.sdk4.media.MediaDescriptor r12 = r12.getDescriptor()\n if (r12 == 0) goto L_0x0063\n java.lang.String r2 = r12.getPlaybackUrl()\n L_0x0063:\n r10 = r2\n io.reactivex.Flowable r12 = r3.recordPlayheadAndBookmark(r4, r5, r6, r8, r10)\n io.reactivex.r r1 = p520io.reactivex.p525e0.C11934b.m38500b()\n io.reactivex.Flowable r12 = r12.mo30086b(r1)\n com.bamtech.sdk4.internal.media.DefaultStreamSampler$postEvent$1 r1 = com.bamtech.sdk4.internal.media.DefaultStreamSampler$postEvent$1.INSTANCE\n com.bamtech.sdk4.internal.media.DefaultStreamSampler$postEvent$2 r2 = com.bamtech.sdk4.internal.media.DefaultStreamSampler$postEvent$2.INSTANCE\n io.reactivex.disposables.Disposable r12 = r12.mo30077a(r1, r2)\n java.lang.String r1 = \"recorder.recordPlayheadA… .subscribe({}, {})\"\n kotlin.jvm.internal.Intrinsics.checkReturnedValueIsNotNull(r12, r1)\n io.reactivex.disposables.CompositeDisposable r1 = r11.compositeDisposable()\n p520io.reactivex.p524d0.C11917a.m38473a(r12, r1)\n com.bamtech.sdk4.media.MediaItem r12 = r11.getMediaItem()\n if (r12 == 0) goto L_0x00ad\n com.bamtech.sdk4.media.PlaybackContext r12 = r12.getPlaybackContext()\n if (r12 == 0) goto L_0x00ad\n java.lang.String r2 = r12.getPlaybackSessionId()\n if (r2 == 0) goto L_0x00ad\n com.bamtech.sdk4.media.DefaultQOSPlaybackEventListener r12 = r11.defaultQosPlaybackEventListener\n com.bamtech.sdk4.media.PlaybackSampledEventData r7 = new com.bamtech.sdk4.media.PlaybackSampledEventData\n long r3 = r0.getCurrentPlayheadInSeconds()\n java.lang.Long r5 = r0.getCurrentBitrate()\n com.bamtech.sdk4.media.BitrateType r6 = r0.getBitrateType()\n r1 = r7\n r1.<init>(r2, r3, r5, r6)\n r12.onEvent(r7)\n L_0x00ad:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bamtech.sdk4.internal.media.DefaultStreamSampler.postEvent$sdk_core_api_release(com.bamtech.sdk4.internal.telemetry.RequestType):void\");\n }", "@Override\n\t\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}", "private Vec3 trace(Ray ray) {\n\t\tSphere sphere = null;\n\n\t\tfor (int i = 0; i < spheres.size(); i++) {\n\t\t\tif (spheres.get(i).intersect(ray)) {\n\t\t\t\tsphere = spheres.get(i);\n\t\t\t}\n\t\t}\n\n\t\tif (sphere == null) {\n\t\t\treturn new Vec3(0.0f); // Background color.\n\t\t}\n\n\t\tVec3 p = ray.getIntersection(); // Intersection point.\n\t\tVec3 n = sphere.normal(p); // Normal at intersection.\n\n\t\treturn light.phong(sphere, p, n);\n\t}", "public void\n doExtraInformation(Ray inRay, double inT, \n GeometryIntersectionInformation outData) {\n outData.p = lastInfo.p;\n\n switch ( lastPlane ) {\n case 1:\n outData.n.x = 0;\n outData.n.y = 0;\n outData.n.z = 1;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = 1-(outData.p.x / size.x - 0.5);\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 2:\n outData.n.x = 0;\n outData.n.y = 0;\n outData.n.z = -1;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = outData.p.x / size.x - 0.5;\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 3:\n outData.n.x = 0;\n outData.n.z = 0;\n outData.n.y = 1;\n outData.u = 1-(outData.p.x / size.x - 0.5);\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = -1;\n outData.t.y = 0;\n outData.t.z = 0;\n break;\n case 4:\n outData.n.x = 0;\n outData.n.z = 0;\n outData.n.y = -1;\n outData.u = outData.p.x / size.x - 0.5;\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 1;\n outData.t.y = 0;\n outData.t.z = 0;\n break;\n case 5:\n outData.n.x = 1;\n outData.n.y = 0;\n outData.n.z = 0;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 6:\n outData.n.x = -1;\n outData.n.y = 0;\n outData.n.z = 0;\n outData.u = 1-(outData.p.y / size.y - 0.5);\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 0;\n outData.t.y = -1;\n outData.t.z = 0;\n break;\n default:\n outData.u = 0;\n outData.v = 0;\n break;\n }\n }", "@Override\r\n\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\r\n\t}", "public static Result\n traceRecursion(PointF vLaserSource, PointF vLaserDir, float fRefractionMultiplier, PointF[] geometry, float[] afRefractiveIndices, float fIntensity, int iRecursionDepth, float fFlightLength){\n\n Result res = new Result();\n //init return lists\n res.lineSegments = new ArrayList<>();\n res.intensities = new ArrayList<>();\n res.lightLengths = new ArrayList<>();\n res.hitIntensities = new ArrayList<>();\n res.hitSegments = new ArrayList<>();\n\n //important for angle calculation\n Vec2D.normalize(vLaserDir);\n\n //recursion limiter\n if(fIntensity < 0.05f || iRecursionDepth > 20)\n return res;\n\n //populate output structure\n res.lineSegments.add(vLaserSource);\n res.intensities.add(fIntensity);\n res.lightLengths.add(fFlightLength);\n\n //initialize to infinity\n float fNearestHit = Float.MAX_VALUE;\n int iHitIndex = -1;\n\n //check each geometry line against this ray\n for (int iLine = 0; iLine < geometry.length/2; iLine++) {\n //check if source on right side\n PointF line0 = geometry[iLine*2];\n PointF line1 = geometry[iLine*2 + 1];\n\n //calculate intersection with geometry line\n float fIntersection = intersectRayLine(vLaserSource, vLaserDir, line0, line1);\n\n if(fIntersection > 0.0f && fIntersection < 1.0f){\n //stuff intersects\n //calculate intersection PointF\n PointF vIntersection = Vec2D.add(line0, Vec2D.mul(fIntersection, Vec2D.subtract(line1, line0)) );\n //calculate distance to source\n float fHitDistance = Vec2D.subtract(vLaserSource, vIntersection).length();\n if(Vec2D.subtract(vLaserSource, vIntersection).length() < fNearestHit && fHitDistance > 0.001f) {\n //new minimum distance\n fNearestHit = fHitDistance;\n iHitIndex = iLine;\n }\n }\n }\n //check if we hit\n if(iHitIndex == -1)\n {\n //bigger than screen\n final float fInfLength = 3.0f;\n res.lineSegments.add(Vec2D.add(vLaserSource, Vec2D.mul(fInfLength, vLaserDir)) );\n res.lightLengths.add(fFlightLength + fInfLength);\n }\n else\n {\n //there was a hit somewhere\n //first re-evaluate\n PointF line0 = geometry[iHitIndex*2];\n PointF line1 = geometry[iHitIndex*2 + 1];\n\n res.hitSegments.add(iHitIndex);\n res.hitIntensities.add(fIntensity);\n //calculate point of impact\n float fIntersection = intersectRayLine(vLaserSource, vLaserDir, line0, line1);\n PointF vIntersection = Vec2D.add(line0, Vec2D.mul(fIntersection, Vec2D.subtract(line1, line0)) );\n\n //spam line end\n res.lineSegments.add(vIntersection);\n float fNextLength = fFlightLength + fNearestHit;\n res.lightLengths.add(fNextLength);\n\n if(afRefractiveIndices[iHitIndex] < 0.0f)\n return res;\n\n //calculate normalized surface normal\n PointF vLine = Vec2D.subtract(line1, line0);\n PointF vSurfaceNormal = Vec2D.flip(Vec2D.perpendicular(vLine));\n Vec2D.normalize(vSurfaceNormal);\n\n //calculate direction of reflection\n PointF vReflected = Vec2D.add(Vec2D.mul(-2.0f, Vec2D.mul(Vec2D.dot(vSurfaceNormal, vLaserDir), vSurfaceNormal)), vLaserDir);\n\n double fImpactAngle = Math.acos(Vec2D.dot(vSurfaceNormal, Vec2D.flip(vLaserDir)));\n\n double fRefractionAngle = 0.0f;\n float fRefracted = 0.0f;\n boolean bTotalReflection = false;\n\n if(afRefractiveIndices[iHitIndex] < 5.0f) {\n //calculate which side of the object we're on\n if (Vec2D.dot(vSurfaceNormal, Vec2D.subtract(vLaserSource, line0)) < 0) {\n //from medium to air\n //angle will become bigger\n double fSinAngle = Math.sin(fImpactAngle) * (afRefractiveIndices[iHitIndex] * fRefractionMultiplier);\n\n if (fSinAngle > 1.0f || fSinAngle < -1.0f)\n //refraction would be back into object\n bTotalReflection = true;\n else {\n //calculate refraction\n fRefractionAngle = Math.asin(fSinAngle);\n float fFlippedImpactAngle = (float) Math.asin(Math.sin(fImpactAngle));\n fRefracted = (float) (2.0f * Math.sin(fFlippedImpactAngle) * Math.cos(fRefractionAngle) / Math.sin(fFlippedImpactAngle + fRefractionAngle));\n\n //set refraction angle for direction calculation\n fRefractionAngle = Math.PI - fRefractionAngle;\n }\n } else {\n //from air to medium\n //angle will become smaller\n fRefractionAngle = Math.asin(Math.sin(fImpactAngle) / (afRefractiveIndices[iHitIndex] * fRefractionMultiplier));\n fRefracted = (float) (2.0f * Math.sin(fRefractionAngle) * Math.cos(fImpactAngle) / Math.sin(fImpactAngle + fRefractionAngle));\n }\n }\n else\n bTotalReflection = true;\n\n //give the refraction angle a sign\n if(Vec2D.dot(vLine, vLaserDir) < 0)\n fRefractionAngle = -fRefractionAngle;\n\n //calculate direction of refraction\n double fInvertedSurfaceAngle = Math.atan2(-vSurfaceNormal.y, -vSurfaceNormal.x);\n PointF vRefracted = new PointF((float)Math.cos(fInvertedSurfaceAngle - fRefractionAngle), (float)Math.sin(fInvertedSurfaceAngle - fRefractionAngle));\n\n //calculate amount of light reflected\n float fReflected = 1.0f - fRefracted;\n\n //continue with recursion, reflection\n Result resReflection = traceRecursion(vIntersection, vReflected, fRefractionMultiplier, geometry, afRefractiveIndices, fReflected * fIntensity, iRecursionDepth+1, fNextLength);\n //merge results\n res.lineSegments.addAll(resReflection.lineSegments);\n res.intensities.addAll(resReflection.intensities);\n res.lightLengths.addAll(resReflection.lightLengths);\n res.hitSegments.addAll(resReflection.hitSegments);\n res.hitIntensities.addAll(resReflection.hitIntensities);\n\n //continue with recursion, refraction\n if(!bTotalReflection) {\n Result resRefraction = traceRecursion(vIntersection, vRefracted, fRefractionMultiplier, geometry, afRefractiveIndices, fRefracted * fIntensity, iRecursionDepth+1, fNextLength);\n //merge results\n res.lineSegments.addAll(resRefraction.lineSegments);\n res.intensities.addAll(resRefraction.intensities);\n res.lightLengths.addAll(resRefraction.lightLengths);\n res.hitSegments.addAll(resRefraction.hitSegments);\n res.hitIntensities.addAll(resRefraction.hitIntensities);\n }\n }\n return res;\n }", "public RayTracerBasic(Scene scene)\r\n\t{\r\n\t\tsuper(scene);\r\n\t}", "Reflexion(final Ray ray, final Raytracer tracer){\n\t\tthis.ray = ray;\n\t\tthis.tracer = tracer;\n\t}", "com.google.speech.logs.timeline.InputEvent.Event getEvent();", "public RayTracerCallbackHandler(){\n this.clientData = null;\n }", "void mo23497a(MediaSource mediaSource, Timeline timeline, Object obj);", "@Override\n protected void processTraceData(TraceData[] traceData, final String lineName) {\n _crossplotProcess.process(traceData);\n }", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1) {\n\n\t}", "public String toString()\n {\n return \"Ray Origin: \" + origin + \"; Direction: \" + direction + \" T: \" + VSDK.formatDouble(t);\n }", "@Override\n\tpublic void trace(Marker marker, String message, Object p0) {\n\n\t}", "private static IRayTracerProducer getIRayTracerProducer() {\r\n\t\treturn new IRayTracerProducer() {\r\n\t\t\t@Override\r\n\t\t\tpublic void produce(Point3D eye, Point3D view, Point3D viewUp, double horizontal, double vertical,\r\n\t\t\t\t\tint width, int height, long requestNo, IRayTracerResultObserver observer) {\r\n\t\t\t\tSystem.out.println(\"Započinjem izračune...\");\r\n\t\t\t\tshort[] red = new short[width * height];\r\n\t\t\t\tshort[] green = new short[width * height];\r\n\t\t\t\tshort[] blue = new short[width * height];\r\n\r\n\t\t\t\t// norming the plane\r\n\t\t\t\tPoint3D OG = view.sub(eye).normalize();\r\n\t\t\t\tPoint3D yAxis = viewUp.normalize().sub(OG.scalarMultiply(OG.scalarProduct(viewUp.normalize())))\r\n\t\t\t\t\t\t.normalize();\r\n\t\t\t\tPoint3D xAxis = OG.vectorProduct(yAxis).normalize();\r\n\t\t\t\t// Point3D zAxis = yAxis.vectorProduct(xAxis).normalize(); - not\r\n\t\t\t\t// used for these computations\r\n\r\n\t\t\t\t// upper-left screen corner\r\n\t\t\t\tPoint3D screenCorner = view.sub(xAxis.scalarMultiply(horizontal / 2))\r\n\t\t\t\t\t\t.add(yAxis.scalarMultiply(vertical / 2));\r\n\t\t\t\tScene scene = RayTracerViewer.createPredefinedScene();\r\n\r\n\t\t\t\t// measuring calculation time\r\n\t\t\t\tdouble start = System.currentTimeMillis();\r\n\t\t\t\tForkJoinPool pool = new ForkJoinPool();\r\n\t\t\t\tpool.invoke(new Job(eye, scene, xAxis, yAxis, screenCorner, width, height, horizontal, vertical, 0,\r\n\t\t\t\t\t\theight, red, green, blue));\r\n\t\t\t\tpool.shutdown();\r\n\t\t\t\tdouble end = System.currentTimeMillis();\r\n\r\n\t\t\t\tSystem.out.println(\"Izračuni gotovi. Izračunato za: \" + (end - start) + \"ms\");\r\n\t\t\t\tobserver.acceptResult(red, green, blue, requestNo);\r\n\t\t\t\tSystem.out.println(\"Dojava gotova...\");\r\n\r\n\t\t\t}\r\n\r\n\t\t};\r\n\t}", "public static GetVehicleRecordPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleRecordPageResponse object =\n new GetVehicleRecordPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleRecordPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleRecordPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetDirectAreaInfoResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectAreaInfoResponse object =\n new GetDirectAreaInfoResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectAreaInfoResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectAreaInfoResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDirectAreaInfoReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDirectAreaInfoReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDirectAreaInfoReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2) {\n\n\t}", "@Override\r\n public void intersect( Ray ray, IntersectResult result ) {\n\t\r\n }", "@Override\n\tpublic void analyzing(DependencyFrame rFrame) {\n\t\t\n\t}", "public final void accept(Response<TopicMovieMetaIntro> response) {\n MutableLiveData oVar = this.f89535a.f89534b;\n if (oVar != 0) {\n oVar.postValue(response != null ? response.mo134997f() : null);\n }\n }", "public static GetRoadwayPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetRoadwayPageResponse object =\n new GetRoadwayPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getRoadwayPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetRoadwayPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\n public void\n doExtraInformation(Ray inRay, double inT,\n GeometryIntersectionInformation outData) {\n // TODO!\n }", "@Override\r\n\tpublic String toString(\r\n\t) {\r\n\t\treturn( \"Ray: \" + mDirection + \", Origin: \" + mOrigin );\r\n\t}", "public static TimeLine getReviewTimeLine(HttpServletRequest request,\r\n\t\t\tSessionObjectBase sob) {\r\n\t\t\r\n\t\tString rs_id = (String) request.getParameter(\"rs_id\");\r\n\t\r\n\t\tString targetRSID = \"\";\r\n\t\tif ((rs_id != null) && (rs_id.length() > 0) && (!(rs_id.equalsIgnoreCase(\"null\")))){\r\n\t\t\ttargetRSID = \"&rs_id=\" + rs_id;\r\n\t\t}\r\n\t\t\r\n\t\tString timelineToGet = \"actual\" + targetRSID;\r\n\t\t\r\n\t\tString timeline_to_show = (String) request.getParameter(\"timeline_to_show\");\r\n\t\t\r\n\t\tif ((timeline_to_show != null) && (timeline_to_show.equalsIgnoreCase(\"phases\"))){\r\n\t\t\ttimelineToGet = \"phases\";\r\n\t\t}\r\n\t\t\r\n\r\n\t\tTimeLine returnTimeLine = new TimeLine();\r\n\r\n\t\treturnTimeLine.runStart = TimeLine.similie_sdf.format(new java.util.Date());\r\n\t\treturnTimeLine.shortIntervalPixelDistance = 125;\r\n\t\treturnTimeLine.longIntervalPixelDistance = 250;\r\n\t\treturnTimeLine.timelineURL = \"similie_timeline_server.jsp?timeline_to_show=\" + timelineToGet;\r\n\t\t\r\n\t\tSystem.out.println(\"tlurl: \" + returnTimeLine.timelineURL);\r\n\r\n\t\treturn returnTimeLine;\r\n\t}", "public void movieEvent(Movie m) {\n m.read();\n}", "public static GetVehicleInfoPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleInfoPageResponse object =\n new GetVehicleInfoPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleInfoPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleInfoPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Action\n public void addRay() {\n Point2D p1 = randomPoint(), p2 = randomPoint();\n TwoPointGraphic ag = new TwoPointGraphic(p1, p2, MarkerRenderer.getInstance());\n MarkerRendererToClip rend = new MarkerRendererToClip();\n rend.setRayRenderer(new ArrowPathRenderer(ArrowLocation.END));\n ag.getStartGraphic().setRenderer(rend);\n ag.setDefaultTooltip(\"<html><b>Ray</b>: <i>\" + p1 + \", \" + p2 + \"</i>\");\n ag.setDragEnabled(true);\n root1.addGraphic(ag); \n }", "@Override\n public void onRayCastClick(Vector2f mouse, CollisionResult result) {\n }", "@Override\n\tpublic void trace(Marker marker, Message msg) {\n\n\t}", "protected synchronized void processRay (int iIndex, int rayTraceStepSize) {\r\n\r\n // Compute the number of steps to use given the step size of the ray.\r\n // The number of steps is proportional to the length of the line segment.\r\n m_kPDiff.sub(m_kP1, m_kP0);\r\n float fLength = m_kPDiff.length();\r\n int iSteps = (int)(1.0f/rayTraceStepSize * fLength);\r\n\r\n // find the maximum value along the ray\r\n if ( iSteps > 1 )\r\n {\r\n int iMaxIntensityColor = getBackgroundColor().getRGB();\r\n float fMax = -1.0f;\r\n boolean bHitModel = false;\r\n float fTStep = 1.0f/iSteps;\r\n for (int i = 1; i < iSteps; i++)\r\n {\r\n m_kP.scaleAdd(i*fTStep, m_kPDiff, m_kP0);\r\n if (interpolate(m_kP, m_acImageA) > 0) {\r\n bHitModel = true;\r\n float fValue = interpolate(m_kP, m_acImageI);\r\n if (fValue > fMax) {\r\n fMax = fValue;\r\n iMaxIntensityColor = interpolateColor(m_kP);\r\n }\r\n }\r\n }\r\n\r\n if (bHitModel) {\r\n m_aiRImage[iIndex] = iMaxIntensityColor;\r\n }\r\n }\r\n }", "@Override\n\tpublic void trace(Object message) {\n\n\t}", "@Override\n\tpublic void trace(Message msg) {\n\n\t}", "Object getTrace();", "public static GetVehicleAlarmInfoPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleAlarmInfoPageResponse object =\n new GetVehicleAlarmInfoPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleAlarmInfoPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleAlarmInfoPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@SuppressWarnings(\"deprecation\")\n\t\tpublic void doTrend(final StaplerRequest request, final StaplerResponse response) throws IOException, InterruptedException {\n\t\t\t System.out.println(\"inside map\");\n\t\t\t/* AbstractBuild<?, ?> lastBuild = project.getLastBuild();\n\t\t\t while (lastBuild != null && (lastBuild.isBuilding() || lastBuild.getAction(BuildAction.class) == null)) {\n\t\t lastBuild = lastBuild.getPreviousBuild();\n\t\t }\n\t\t\t lastBuild = lastBuild.getPreviousBuild();\n\t\t BuildAction lastAction = lastBuild.getAction(BuildAction.class);*/\n\t\t ChartUtil.generateGraph(\n\t\t request,\n\t\t response,\n\t\t Text_HTMLConverter.buildChart(build),\n\t\t CHART_WIDTH,\n\t\t CHART_HEIGHT);\n\t\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 }", "@Override\n\tpublic void trace(Marker marker, Object message) {\n\n\t}", "com.czht.face.recognition.Czhtdev.Response getResponse();", "@External\r\n\t@SharedFunc\r\n\tpublic MetaVar Trace(){throw new RuntimeException(\"Should never be executed directly, there is probably an error in the Aspect-coding.\");}", "@Override\r\n\t\t\tpublic void recognizerStarted() {\n\r\n\t\t\t}", "public static GetDirectSrvInfoResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectSrvInfoResponse object =\n new GetDirectSrvInfoResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectSrvInfoResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectSrvInfoResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDirectSrvInfoReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDirectSrvInfoReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDirectSrvInfoReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetVehicleRecordPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleRecordPage object =\n new GetVehicleRecordPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleRecordPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleRecordPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static DirectQueryResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DirectQueryResponse object =\n new DirectQueryResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"directQueryResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DirectQueryResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"directQueryReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setDirectQueryReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setDirectQueryReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetTerminalCardTypeResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetTerminalCardTypeResponse object =\n new GetTerminalCardTypeResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getTerminalCardTypeResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetTerminalCardTypeResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getTerminalCardTypeReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetTerminalCardTypeReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetTerminalCardTypeReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private LightIntensity traceRay(Ray ray, int currentTraceDepth) {\n if (currentTraceDepth > MAX_TRACE_DEPTH) {\n return LightIntensity.makeZero();\n }\n\n currentTraceDepth += 1;\n\n Solid.Intersection solidIntersection = castRayOnSolids(ray);\n LightSource.Intersection lightIntersection = castRayOnLights(ray);\n\n LightIntensity result = LightIntensity.makeZero();\n if (solidIntersection == null && lightIntersection == null) {\n // Nothing to do\n } else if (solidIntersection == null && lightIntersection != null) {\n result = result.add(lightIntersection.intersectedLight.intensity);\n } else if (solidIntersection != null & lightIntersection == null) {\n result = handleSolidRayHit(ray, solidIntersection, result, currentTraceDepth);\n } else if (solidIntersection.info.pointOfIntersection.distance(ray.origin) < lightIntersection.info.pointOfIntersection.distance(ray.origin)) {\n result = handleSolidRayHit(ray, solidIntersection, result, currentTraceDepth);\n } else {\n result = result.add(lightIntersection.intersectedLight.intensity);\n }\n\n return result;\n }", "@Override\n\tpublic void trace(String message, Object p0, Object p1) {\n\n\t}", "@Override\n\tpublic void trace(Marker marker, String message, Object... params) {\n\n\t}", "protected abstract void trace_end_run();", "@Override\n public void onResponse(Models.Scene response) {\n Toast.makeText(getBaseContext(), \"Scene Updated\", Toast.LENGTH_SHORT).show();\n }", "public static GetVehicleBookPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleBookPageResponse object =\n new GetVehicleBookPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleBookPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleBookPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Test\n\tpublic void testConstructRayThroughPixel() {\n\n\t\tCamera camera1 = new Camera(Point3D.ZERO, new Vector(0, 1, 0), new Vector(0, 0, 1));\n\n\t\t// 3X3\n\t\tRay ray11 = camera1.constructRayThroughPixel(3, 3, 1, 1, 100, 150, 150);\n\t\tRay expectedRay11 = new Ray(Point3D.ZERO, new Vector(50, 50, 100).normalize());\n\t\tassertEquals(\"positive up to vectors testing at 3X3 in pixel (1,1)\", ray11, expectedRay11);\n\n\t\tRay ray33 = camera1.constructRayThroughPixel(3, 3, 3, 3, 100, 150, 150);\n\t\tRay expectedRay33 = new Ray(Point3D.ZERO, new Vector(-50, -50, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X3 in pixel (3,3)\", ray33, expectedRay33);\n\n\t\tRay ray21 = camera1.constructRayThroughPixel(3, 3, 2, 1, 100, 150, 150);\n\t\tRay expectedRay21 = new Ray(Point3D.ZERO, new Vector(0, 50, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X3 in pixel (2,1)\", ray21, expectedRay21);\n\n\t\tRay ray23 = camera1.constructRayThroughPixel(3, 3, 2, 3, 100, 150, 150);\n\t\tRay expectedRay23 = new Ray(Point3D.ZERO, new Vector(0, -50, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X3 in pixel (2,3)\", ray23, expectedRay23);\n\n\t\tRay ray12 = camera1.constructRayThroughPixel(3, 3, 1, 2, 100, 150, 150);\n\t\tRay expectedRay12 = new Ray(Point3D.ZERO, new Vector(50, 0, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X3 in pixel (1,2)\", ray12, expectedRay12);\n\n\t\tRay ray32 = camera1.constructRayThroughPixel(3, 3, 3, 2, 100, 150, 150);\n\t\tRay expectedRay32 = new Ray(Point3D.ZERO, new Vector(-50, 0, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X3 in pixel (3,2)\", ray32, expectedRay32);\n\n\t\tRay ray22 = camera1.constructRayThroughPixel(3, 3, 2, 2, 100, 150, 150);\n\t\tRay expectedRay22 = new Ray(Point3D.ZERO, new Vector(0, 0, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X3 in pixel (2,2) - A case test that Pij is equal to Pc\", ray22,\n\t\t\t\texpectedRay22);\n\n\t\t// 3X4 Py={1,2,3} Px={1,2,3,4}\n\n\t\tRay rayS22 = camera1.constructRayThroughPixel(4, 3, 2, 2, 100, 200, 150);\n\t\tRay expectedRayS22 = new Ray(Point3D.ZERO, new Vector(25, 0, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X4 in pixel (2,2)\", rayS22, expectedRayS22);\n\n\t\tRay rayS32 = camera1.constructRayThroughPixel(4, 3, 3, 2, 100, 200, 150);\n\t\tRay expectedRayS32 = new Ray(Point3D.ZERO, new Vector(-25, 0, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X4 in pixel (3,2)\", rayS32, expectedRayS32);\n\n\t\tRay rayS11 = camera1.constructRayThroughPixel(4, 3, 1, 1, 100, 200, 150);\n\t\tRay expectedRayS11 = new Ray(Point3D.ZERO, new Vector(75, 50, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X4 in pixel (1,1)\", rayS11, expectedRayS11);\n\n\t\tRay rayS43 = camera1.constructRayThroughPixel(4, 3, 4, 3, 100, 200, 150);\n\t\tRay expectedRayS43 = new Ray(Point3D.ZERO, new Vector(-75, -50, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X4 in pixel (4,3)\", rayS43, expectedRayS43);\n\n\t\t// 4X3 Py={1,2,3,4} Px={1,2,3}\n\n\t\tRay ray_c22 = camera1.constructRayThroughPixel(3, 4, 2, 2, 100, 150, 200);\n\t\tRay expectedRay_c22 = new Ray(Point3D.ZERO, new Vector(0, 25, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 4X3 in pixel (2,2)\", ray_c22, expectedRay_c22);\n\n\t\tRay ray_c32 = camera1.constructRayThroughPixel(3, 4, 3, 2, 100, 150, 200);\n\t\tRay expectedRay_c32 = new Ray(Point3D.ZERO, new Vector(-50, 25, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 4X3 in pixel (3,2)\", ray_c32, expectedRay_c32);\n\n\t\tRay ray_c11 = camera1.constructRayThroughPixel(3, 4, 1, 1, 100, 150, 200);\n\t\tRay expectedRay_c11 = new Ray(Point3D.ZERO, new Vector(50, 75, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 4X3 in pixel (1,1)\", ray_c11, expectedRay_c11);\n\n\t\tRay ray_c43 = camera1.constructRayThroughPixel(3, 4, 3, 4, 100, 150, 200);\n\t\tRay expectedRay_c43 = new Ray(Point3D.ZERO, new Vector(-50, -75, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 4X3 in pixel (4,3)\", ray_c43, expectedRay_c43);\n\n\t\t// ======\n\t\t// Negative vectors.\n\t\tCamera camera2 = new Camera(Point3D.ZERO, new Vector(0, -1, 0), new Vector(0, 0, -1));\n\n\t\t// 3X3\n\t\tRay ray1 = camera2.constructRayThroughPixel(3, 3, 3, 3, 100, 150, 150);\n\t\tRay resultRay = new Ray(Point3D.ZERO,\n\t\t\t\tnew Vector(-1 / Math.sqrt(6), 1 / Math.sqrt(6), -(Math.sqrt((double) 2 / 3))));\n\t\tassertEquals(\"Negative vectors testing at 3X3 in pixel (3,3)\", ray1, resultRay);\n\n\t\t// 3X3\n\t\tRay ray_d11 = camera2.constructRayThroughPixel(3, 3, 1, 1, 100, 150, 150);\n\t\tRay expectedRay_d11 = new Ray(Point3D.ZERO, new Vector(50, -50, -100).normalize());\n\t\tassertEquals(\"negative up to vectors testing at 3X3 in pixel (1,1)\", ray_d11, expectedRay_d11);\n\n\t\tRay ray_d33 = camera2.constructRayThroughPixel(3, 3, 3, 3, 100, 150, 150);\n\t\tRay expectedRay_d33 = new Ray(Point3D.ZERO, new Vector(-50, 50, -100).normalize());\n\t\tassertEquals(\"negative up to vectors testing at 3X3 in pixel (3,3)\", ray_d33, expectedRay_d33);\n\n\t\tRay ray_d21 = camera2.constructRayThroughPixel(3, 3, 2, 1, 100, 150, 150);\n\t\tRay expectedRay_d21 = new Ray(Point3D.ZERO, new Vector(0, -50, -100).normalize());\n\t\tassertEquals(\"negative up to vectors testing at 3X3 in pixel (2,1)\", ray_d21, expectedRay_d21);\n\n\t\tRay ray_d23 = camera2.constructRayThroughPixel(3, 3, 2, 3, 100, 150, 150);\n\t\tRay expectedRay_d23 = new Ray(Point3D.ZERO, new Vector(0, 50, -100).normalize());\n\t\tassertEquals(\"negative up to vectors testing at 3X3 in pixel (2,3)\", ray_d23, expectedRay_d23);\n\n\t\tRay ray_d12 = camera2.constructRayThroughPixel(3, 3, 1, 2, 100, 150, 150);\n\t\tRay expectedRay_d12 = new Ray(Point3D.ZERO, new Vector(50, 0, -100).normalize());\n\t\tassertEquals(\"negative up to vectors testing at 3X3 in pixel (1,2)\", ray_d12, expectedRay_d12);\n\n\t\tRay ray_d32 = camera2.constructRayThroughPixel(3, 3, 3, 2, 100, 150, 150);\n\t\tRay expectedRay_d32 = new Ray(Point3D.ZERO, new Vector(-50, 0, -100).normalize());\n\t\tassertEquals(\"negative up to vectors testing at 3X3 in pixel (3,2)\", ray_d32, expectedRay_d32);\n\n\t\t// vTo negative vUp positive\n\t\tCamera camera3 = new Camera(Point3D.ZERO, new Vector(0, 1, 0), new Vector(0, 0, -1));\n\n\t\t// 3X4\n\n\t\tRay ray_e22 = camera3.constructRayThroughPixel(4, 3, 2, 2, 100, 200, 150);\n\t\tRay expectedRay_e22 = new Ray(Point3D.ZERO, new Vector(-25, 0, -100).normalize());\n\t\tassertEquals(\"vTo negative vUp positive vectors testing at 3X4 in pixel (2,2)\", ray_e22, expectedRay_e22);\n\n\t\tRay ray_e32 = camera3.constructRayThroughPixel(4, 3, 3, 2, 100, 200, 150);\n\t\tRay expectedRay_e32 = new Ray(Point3D.ZERO, new Vector(25, 0, -100).normalize());\n\t\tassertEquals(\"vTo negative vUp positive vectors testing at 3X4 in pixel (3,2)\", ray_e32, expectedRay_e32);\n\n\t\tRay ray_e11 = camera3.constructRayThroughPixel(4, 3, 1, 1, 100, 200, 150);\n\t\tRay expectedRay_e11 = new Ray(Point3D.ZERO, new Vector(-75, 50, -100).normalize());\n\t\tassertEquals(\"vTo negative vUp positive vectors testing at 3X4 in pixel (1,1)\", ray_e11, expectedRay_e11);\n\n\t\tRay ray_e43 = camera3.constructRayThroughPixel(4, 3, 4, 3, 100, 200, 150);\n\t\tRay expectedRay_e43 = new Ray(Point3D.ZERO, new Vector(75, -50, -100).normalize());\n\t\tassertEquals(\"vTo negative vUp positive vectors testing at 3X4 in pixel (4,3)\", ray_e43, expectedRay_e43);\n\n\t\t// ======\n\t\tCamera littlCam = new Camera(Point3D.ZERO, new Vector(0, 1, 0), new Vector(0, 0, 1));\n\t\tRay littl33 = littlCam.constructRayThroughPixel(3, 3, 3, 3, 10, 6, 6);\n\t\tRay checklittl33 = new Ray(Point3D.ZERO, new Vector(-2, -2, 10).normalize());\n\t\tRay littl11 = littlCam.constructRayThroughPixel(3, 3, 1, 1, 10, 6, 6);\n\t\tRay checklittl11 = new Ray(Point3D.ZERO, new Vector(2, 2, 10).normalize());\n\n\t\tassertEquals(\"3,3\", littl33, checklittl33);\n\t\tassertEquals(\"1,1\", littl11, checklittl11);\n\t}", "public net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse terminalReturnCard(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCard terminalReturnCard4)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/terminalReturnCardRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n terminalReturnCard4,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "@Override\n\tpublic void trace(String message, Object p0, Object p1, Object p2) {\n\n\t}", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}", "public void startterminalReturnCard(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCard terminalReturnCard4,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/terminalReturnCardRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n terminalReturnCard4,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultterminalReturnCard(\n (net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorterminalReturnCard(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalReturnCard(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalReturnCard(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalReturnCard(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorterminalReturnCard(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorterminalReturnCard(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[2].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[2].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public void add(RayHandler rayHandler);", "public Timeline createLineAnimation(AnchorPane anchor_pane_map, int duration, int stop_duration, ArrayList<Coordinate> affected_points, int slow_duration, int slow_stop_duration, EventHandler<MouseEvent> handler, boolean detour_delay)\r\n {\r\n // coordinates of path for vehicle on transportline\r\n ArrayList<Coordinate> line_coordinates = this.transportLinePath();\r\n // ids of coordinates of path for vehicle on transportline\r\n ArrayList<String> line_coordinates_ids = this.transportLinePathIDs();\r\n // all stops for transportline\r\n List<Stop> line_stops = this.getStopsMap();\r\n // create vehicle for line (circle)\r\n Circle vehicle = new Circle(this.getStopsMap().get(0).getCoordinate().getX(), this.getStopsMap().get(0).getCoordinate().getY(), 10);\r\n vehicle.setStroke(Color.AZURE);\r\n vehicle.setFill(this.getTransportLineColor());\r\n vehicle.setStrokeWidth(5);\r\n addLineVehicles(vehicle);\r\n vehicle.setOnMouseClicked(handler);\r\n\r\n Timeline timeline = new Timeline();\r\n int original_duration = duration;\r\n int original_stop_duration = stop_duration;\r\n\r\n // add all keyframes to timeline - one keyframe means path from one coordinate to another coordinate\r\n // vehicle waits in stop for 1 seconds and go to another coordinate for 2 seconds (in default mode)\r\n int delta_time = 0;\r\n KeyFrame waiting_in_stop = null;\r\n for (int i = 0; i < line_coordinates.size() - 1; i++) {\r\n // if we go through street affected by slow traffic\r\n if (line_coordinates.get(i).isInArray(affected_points) && line_coordinates.get(i+1).isInArray(affected_points))\r\n {\r\n // duration between coordinates and duration of waiting in stop is different\r\n duration = slow_duration;\r\n stop_duration = slow_stop_duration;\r\n }\r\n else\r\n {\r\n // else use default duration\r\n duration = original_duration;\r\n stop_duration = original_stop_duration;\r\n }\r\n\r\n for (Stop s : line_stops) {\r\n // if we are in stop, we wait 'stop_duration' time\r\n if (line_coordinates.get(i).getX() == s.getCoordinate().getX() && line_coordinates.get(i).getY() == s.getCoordinate().getY()) {\r\n waiting_in_stop = new KeyFrame(Duration.seconds(delta_time + stop_duration), // this means waiting in stop for some time\r\n new KeyValue(vehicle.centerXProperty(), line_coordinates.get(i).getX()),\r\n new KeyValue(vehicle.centerYProperty(), line_coordinates.get(i).getY()));\r\n\r\n delta_time = delta_time + stop_duration;\r\n break;\r\n }\r\n }\r\n // we travelled for 'duration' time\r\n KeyFrame end = new KeyFrame(Duration.seconds(delta_time + duration), // this means that the path from one coordinate to another lasts 2 seconds\r\n new KeyValue(vehicle.centerXProperty(), line_coordinates.get(i + 1).getX()),\r\n new KeyValue(vehicle.centerYProperty(), line_coordinates.get(i + 1).getY()));\r\n\r\n if (waiting_in_stop != null) {\r\n timeline.getKeyFrames().addAll(end, waiting_in_stop);\r\n } else {\r\n timeline.getKeyFrames().addAll(end);\r\n }\r\n\r\n delta_time = delta_time + duration;\r\n }\r\n\r\n timeline.setCycleCount(Timeline.INDEFINITE); // infinity number of repetitions\r\n anchor_pane_map.getChildren().add(vehicle);\r\n\r\n if (detour_delay == false)\r\n {\r\n this.setDelay(duration, slow_duration, affected_points.size());\r\n }\r\n else\r\n {\r\n this.delay = this.detour_streets.size() * duration - duration;\r\n }\r\n\r\n return timeline;\r\n }", "protected void m12510a(PersonalRecordResponseDTO personalRecordResponseDTO) {\n PersonalRecordActivity.e(this.f11744a);\n if (personalRecordResponseDTO == null) {\n PersonalRecordActivity.a(this.f11744a, null);\n PersonalRecordActivity.a(this.f11744a, -1, null);\n PersonalRecordActivity.f(this.f11744a).error(\"get personal record data information error with dataDTO is null!\");\n return;\n }\n PersonalRecordActivity.a(this.f11744a, personalRecordResponseDTO);\n int a = PersonalRecordActivity.a(this.f11744a, 0, null);\n if (a > 0) {\n PersonalRecordActivity.g(this.f11744a).getXAxis().a(a, true);\n if (PersonalRecordActivity.c(this.f11744a) != 0) {\n PersonalRecordActivity.g(this.f11744a).a((float) (a - 1), 0);\n } else {\n PersonalRecordActivity.g(this.f11744a).a(null);\n }\n PersonalRecordActivity.a(this.f11744a, a - 1);\n }\n }", "public Timeline createPartLineAnimation(int duration, int stop_duration, ArrayList<Coordinate> affected_points, int slow_duration, int slow_stop_duration, Circle vehicle, ArrayList<Coordinate> line_coordinates_part, EventHandler<MouseEvent> handler, boolean detour_delay)\r\n {\r\n Timeline affected_timeline = new Timeline();\r\n int original_duration = duration;\r\n int original_stop_duration = stop_duration;\r\n addLineVehicles(vehicle);\r\n vehicle.setOnMouseClicked(handler);\r\n\r\n // add all keyframes to timeline - one keyframe means path from one coordinate to another coordinate\r\n // vehicle waits in stop for 1 seconds and go to another coordinate for 2 seconds (in default mode)\r\n int delta_time = 0;\r\n KeyFrame waiting_in_stop = null;\r\n\r\n //int affected_stops_count = 0;\r\n for (int i = 0; i < line_coordinates_part.size() - 1; i++) {\r\n // if we go through street affected by slow traffic\r\n if (line_coordinates_part.get(i).isInArray(affected_points) && line_coordinates_part.get(i+1).isInArray(affected_points))\r\n {\r\n // duration between coordinates and duration of waiting in stop is different\r\n duration = slow_duration;\r\n stop_duration = slow_stop_duration;\r\n }\r\n else\r\n {\r\n // else use default duration\r\n duration = original_duration;\r\n stop_duration = original_stop_duration;\r\n }\r\n\r\n for (Stop s : this.getStopsMap()) {\r\n // if we are in stop, we wait 'stop_duration' time\r\n if (line_coordinates_part.get(i).getX() == s.getCoordinate().getX() && line_coordinates_part.get(i).getY() == s.getCoordinate().getY()) {\r\n waiting_in_stop = new KeyFrame(Duration.seconds(delta_time + stop_duration), // this means waiting in stop for some time\r\n new KeyValue(vehicle.centerXProperty(), line_coordinates_part.get(i).getX()),\r\n new KeyValue(vehicle.centerYProperty(), line_coordinates_part.get(i).getY()));\r\n\r\n delta_time = delta_time + stop_duration;\r\n\r\n break;\r\n }\r\n }\r\n // we travelled for 'duration' time\r\n KeyFrame end = new KeyFrame(Duration.seconds(delta_time + duration), // this means that the path from one coordinate to another lasts 2 seconds\r\n new KeyValue(vehicle.centerXProperty(), line_coordinates_part.get(i + 1).getX()),\r\n new KeyValue(vehicle.centerYProperty(), line_coordinates_part.get(i + 1).getY()));\r\n\r\n if (waiting_in_stop != null) {\r\n affected_timeline.getKeyFrames().addAll(end, waiting_in_stop);\r\n } else {\r\n affected_timeline.getKeyFrames().addAll(end);\r\n }\r\n\r\n delta_time = delta_time + duration;\r\n }\r\n\r\n this.setLineMovement(affected_timeline); // set movement of specified line\r\n\r\n if (detour_delay == false)\r\n {\r\n this.setDelay(duration, slow_duration, affected_points.size());\r\n }\r\n else\r\n {\r\n this.delay = this.detour_streets.size() * duration - duration;\r\n }\r\n\r\n\r\n return affected_timeline;\r\n }", "public abstract long getTrace();", "@Override\n\tpublic void shade(Colord outIntensity, Scene scene, Ray ray, IntersectionRecord record, int depth) {\n\t\t// TODO#A7: fill in this function.\n\t\t// 1) Determine whether the ray is coming from the inside of the surface\n\t\t// or the outside.\n\t\t// 2) Determine whether total internal reflection occurs.\n\t\t// 3) Compute the reflected ray and refracted ray (if total internal\n\t\t// reflection does not occur)\n\t\t// using Snell's law and call RayTracer.shadeRay on them to shade them\n\n\t\t// n1 is from; n2 is to.\n\t\tdouble n1 = 0, n2 = 0;\n\t\tdouble fresnel = 0;\n\t\tVector3d d = new Vector3d(ray.origin.clone().sub(record.location)).normalize();\n\t\tVector3d n = new Vector3d(record.normal).normalize();\n\t\tdouble theta = n.dot(d);\n\n\t\t// CASE 1a: ray coming from outside.\n\t\tif (theta > 0) {\n\t\t\tn1 = 1.0;\n\t\t\tn2 = refractiveIndex;\n\t\t\tfresnel = fresnel(n, d, refractiveIndex);\n\t\t}\n\n\t\t// CASE 1b: ray coming from inside.\n\t\telse if (theta < 0) {\n\t\t\tn1 = refractiveIndex;\n\t\t\tn2 = 1.0;\n\t\t\tn.mul(-1.0);\n\t\t\tfresnel = fresnel(n, d, 1/refractiveIndex);\n\t\t\ttheta = n.dot(d);\n\t\t}\n\n\t\tVector3d reflectionDir = new Vector3d(n).mul(2 * theta).sub(d.clone()).normalize();\n\t\tRay reflectionRay = new Ray(record.location.clone(), reflectionDir);\n\t\treflectionRay.makeOffsetRay();\n\t\tColord reflectionColor = new Colord();\n\t\tRayTracer.shadeRay(reflectionColor, scene, reflectionRay, depth+1);\n\n\t\tdouble det = 1 - (Math.pow(n1, 2.0) * (1 - Math.pow(theta, 2.0))) / (Math.pow(n2, 2.0));\n\n\t\tif (det < 0.0) {\n\t\t\toutIntensity.add(reflectionColor);\n\t\t} else {\n\n\t\t\td = new Vector3d(record.location.clone().sub(ray.origin)).normalize();\n\n\t\t\tVector3d refractionDir = new Vector3d((d.clone().sub(n.clone().mul(d.dot(n))).mul(n1/n2)));\n\t\t\trefractionDir.sub(n.clone().mul(Math.sqrt(det)));\n\t\t\tRay refractionRay = new Ray(record.location.clone(), refractionDir);\n\t\t\trefractionRay.makeOffsetRay();\n\n\t\t\tColord refractionColor = new Colord();\n\t\t\tRayTracer.shadeRay(refractionColor, scene, refractionRay, depth+1);\n\n\t\t\trefractionColor.mul(1-fresnel);\n\t\t\treflectionColor.mul(fresnel);\n\t\t\toutIntensity.add(reflectionColor).add(refractionColor);\n\n\t\t}\n\t}", "@Override\n\tpublic void trace(String message, Object p0) {\n\n\t}", "@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 interface Ray3 extends Path3, Serializable, Cloneable {\r\n\r\n /**\r\n * Creates a new ray from 3 coordinates for the origin point and 3 coordinates for the direction vector.\r\n *\r\n * @param xo the x-coordinate of the origin\r\n * @param yo the y-coordinate of the origin\r\n * @param zo the z-coordinate of the origin\r\n * @param xd the x-coordinate of the direction\r\n * @param yd the y-coordinate of the direction\r\n * @param zd the z-coordinate of the direction\r\n * @return a new ray\r\n */\r\n @NotNull\r\n static Ray3 fromOD(double xo, double yo, double zo, double xd, double yd, double zd) {\r\n return new Ray3Impl(xo, yo, zo, xd, yd, zd);\r\n }\r\n\r\n /**\r\n * Creates a new ray from an origin point and a direction vector.\r\n *\r\n * @param origin the origin\r\n * @param dir the direction\r\n * @return a new ray\r\n */\r\n @NotNull\r\n static Ray3 fromOD(Vector3 origin, Vector3 dir) {\r\n return new Ray3Impl(origin, dir);\r\n }\r\n\r\n /**\r\n * Creates a new ray between two points.\r\n * The origin will be a copy of the point {@code from}.\r\n * The directional vector will be a new vector from {@code from} to {@code to}.\r\n *\r\n * @param from the first point\r\n * @param to the second point\r\n * @return a new ray\r\n */\r\n @NotNull\r\n static Ray3 between(Vector3 from, Vector3 to) {\r\n return fromOD(from, Vector3.between(from, to));\r\n }\r\n\r\n /**\r\n * Creates a new ray between two points.\r\n *\r\n * @param ox the origin x\r\n * @param oy the origin x\r\n * @param oz the origin x\r\n * @param tx the target x\r\n * @param ty the target x\r\n * @param tz the target x\r\n * @return a new ray\r\n */\r\n @NotNull\r\n static Ray3 between(double ox, double oy, double oz, double tx, double ty, double tz) {\r\n return fromOD(ox, oy, oz, tx-ox, ty-oy, tz-oz);\r\n }\r\n\r\n // GETTERS\r\n\r\n /**\r\n * Returns the x-coordinate of the origin of this ray.\r\n *\r\n * @return the x-coordinate of the origin of this ray\r\n */\r\n abstract double getOrgX();\r\n\r\n /**\r\n * Returns the y-coordinate of the origin of this ray.\r\n *\r\n * @return the y-coordinate of the origin of this ray\r\n */\r\n abstract double getOrgY();\r\n\r\n /**\r\n * Returns the z-coordinate of the origin of this ray.\r\n *\r\n * @return the z-coordinate of the origin of this ray\r\n */\r\n abstract double getOrgZ();\r\n\r\n /**\r\n * Returns the x-coordinate of the direction of this ray.\r\n *\r\n * @return the x-coordinate of the direction of this ray\r\n */\r\n abstract double getDirX();\r\n\r\n /**\r\n * Returns the y-coordinate of the direction of this ray.\r\n *\r\n * @return the y-coordinate of the direction of this ray\r\n */\r\n abstract double getDirY();\r\n\r\n /**\r\n * Returns the z-coordinate of the direction of this ray.\r\n *\r\n * @return the z-coordinate of the direction of this ray\r\n */\r\n abstract double getDirZ();\r\n\r\n /**\r\n * Returns the length of this ray.\r\n *\r\n * @return the length of this ray\r\n */\r\n abstract double getLength();\r\n\r\n /**\r\n * Returns the squared length of this ray.\r\n *\r\n * @return the squared length of this ray\r\n */\r\n abstract double getLengthSquared();\r\n \r\n /**\r\n * Returns the origin of this ray in a new vector.\r\n *\r\n * @return the origin of this ray in a new vector\r\n */\r\n @Override\r\n default Vector3 getOrigin() {\r\n return Vector3.fromXYZ(getOrgX(), getOrgY(), getOrgZ());\r\n }\r\n \r\n /**\r\n * Returns the direction of this ray in a new vector.\r\n *\r\n * @return the direction of this ray in a new vector\r\n */\r\n default Vector3 getDirection() {\r\n return Vector3.fromXYZ(getDirX(), getDirY(), getDirZ());\r\n }\r\n \r\n default AxisAlignedBB getBoundaries() {\r\n return AxisAlignedBB.between(getOrigin(), getEnd());\r\n }\r\n\r\n // PATH IMPL\r\n \r\n /**\r\n * Returns the end of this ray in a new vector. This is equal to the sum of the origin and direction of the vector.\r\n *\r\n * @return the end of this ray in a new vector\r\n */\r\n @Override\r\n default Vector3 getEnd() {\r\n return Vector3.fromXYZ(getOrgX() + getDirX(), getOrgY() + getDirY(), getOrgZ() + getDirZ());\r\n }\r\n\r\n @Override\r\n default Vector3[] getControlPoints() {\r\n return new Vector3[] {getOrigin(), getEnd()};\r\n }\r\n\r\n // CHECKERS\r\n\r\n /**\r\n * Returns whether the ray is equal to the given point at any point.\r\n *\r\n * @param x the x-coordinate of the point\r\n * @param y the y-coordinate of the point\r\n * @param z the z-coordinate of the point\r\n * @return whether the ray is equal to the given point at any point\r\n */\r\n default boolean contains(double x, double y, double z) {\r\n return Vector3.between(getOrgX(), getOrgY(), getOrgZ(), x, y, z).isMultipleOf(getDirection());\r\n }\r\n\r\n /**\r\n * Returns whether the ray is equal to the given point at any point.\r\n *\r\n * @param point the point\r\n * @return whether the ray is equal to the given point at any point\r\n */\r\n default boolean contains(Vector3 point) {\r\n return contains(point.getX(), point.getY(), point.getZ());\r\n }\r\n\r\n /**\r\n * Returns whether this ray is equal to another ray. This condition is true\r\n * if both origin and direction are equal.\r\n *\r\n * @param ray the ray\r\n * @return whether this ray is equal to the ray\r\n */\r\n default boolean equals(Ray3 ray) {\r\n return\r\n getOrigin().equals(ray.getOrigin()) &&\r\n getDirection().isMultipleOf(ray.getDirection());\r\n }\r\n\r\n // SETTERS\r\n\r\n /**\r\n * Sets the origin of the ray to a given point.\r\n *\r\n * @param x the x-coordinate of the point\r\n * @param y the y-coordinate of the point\r\n * @param z the z-coordinate of the point\r\n */\r\n abstract void setOrigin(double x, double y, double z);\r\n\r\n /**\r\n * Sets the origin of the ray to a given point.\r\n *\r\n * @param point the point\r\n */\r\n default void setOrigin(Vector3 point) {\r\n setOrigin(point.getX(), point.getY(), point.getZ());\r\n }\r\n\r\n /**\r\n * Sets the direction of this ray to a given vector.\r\n *\r\n * @param x the x-coordinate of the vector\r\n * @param y the y-coordinate of the vector\r\n * @param z the z-coordinate of the vector\r\n */\r\n abstract void setDirection(double x, double y, double z);\r\n \r\n /**\r\n * Sets the direction of this ray to a given vector.\r\n *\r\n * @param v the vector\r\n */\r\n default void setDirection(Vector3 v) {\r\n setDirection(v.getX(), v.getY(), v.getZ());\r\n }\r\n\r\n /**\r\n * Sets the length of this ray to a given length.\r\n *\r\n * @param t the new hypot\r\n */\r\n default void setLength(double t) {\r\n scaleDirection(t / getLength());\r\n }\r\n\r\n default void normalize() {\r\n setLength(1);\r\n }\r\n \r\n //TRANSFORMATIONS\r\n \r\n default void scaleOrigin(double x, double y, double z) {\r\n setDirection(getOrgX()*x, getOrgY()*y, getOrgZ()*z);\r\n }\r\n \r\n default void scaleDirection(double x, double y, double z) {\r\n setDirection(getDirX()*x, getDirY()*y, getDirZ()*z);\r\n }\r\n \r\n default void scaleOrigin(double factor) {\r\n scaleOrigin(factor, factor, factor);\r\n }\r\n \r\n default void scaleDirection(double factor) {\r\n scaleDirection(factor, factor, factor);\r\n }\r\n \r\n default void scale(double x, double y, double z) {\r\n scaleOrigin(x, y, z);\r\n scaleDirection(x, y, z);\r\n }\r\n \r\n default void scale(double factor) {\r\n scale(factor, factor, factor);\r\n }\r\n \r\n /**\r\n * Translates the ray origin by a given amount on each axis.\r\n *\r\n * @param x the x-coordinate\r\n * @param y the y-coordinate\r\n * @param z the z-coordinate\r\n */\r\n abstract void translate(double x, double y, double z);\r\n\r\n // MISC\r\n\r\n /**\r\n * <p>\r\n * Returns a new interval iterator for this ray. This iterator will return all points in a given interval that\r\n * are on a ray.\r\n * </p>\r\n * <p>\r\n * For example, a ray with hypot 1 will produce an iterator that iterates over precisely 3 points if the\r\n * interval is 0.5 (or 0.4).\r\n * </p>\r\n * <p>\r\n * To get an iterator that iterates over a specified amount of points {@code x}, make use of\r\n * <blockquote>\r\n * {@code intervalIterator( getLength() / (x - 1) )}\r\n * </blockquote>\r\n * </p>\r\n *\r\n * @param interval the interval of iteration\r\n * @return a new interval iterator\r\n */\r\n default Iterator<Vector3> intervalIterator(double interval) {\r\n return new IntervalIterator(this, interval);\r\n }\r\n\r\n /**\r\n * <p>\r\n * Returns a new interval iterator for this ray. This iterator will return all points in a given interval that\r\n * are on a ray.\r\n * </p>\r\n * <p>\r\n * For example, a ray with hypot 1 will produce an iterator that iterates over precisely 3 points if the\r\n * interval is 0.5 (or 0.4).\r\n * </p>\r\n * <p>\r\n * To get an iterator that iterates over a specified amount of points {@code x}, make use of\r\n * <blockquote>\r\n * {@code intervalIterator( getLength() / (x - 1) )}\r\n * </blockquote>\r\n * </p>\r\n *\r\n * @return a new interval iterator\r\n */\r\n default Iterator<BlockVector> blockIntervalIterator() {\r\n return new BlockIntervalIterator(this);\r\n }\r\n\r\n /**\r\n * Returns a given amount of equally distributed points on this ray.\r\n *\r\n * @param amount the amount\r\n * @return an array containing points on this ray\r\n */\r\n @Override\r\n default Vector3[] getPoints(int amount) {\r\n if (amount < 0) throw new IllegalArgumentException(\"amount < 0\");\r\n if (amount == 0) return new Vector3[0];\r\n if (amount == 1) return new Vector3[] {getOrigin()};\r\n if (amount == 2) return new Vector3[] {getOrigin(), getEnd()};\r\n\r\n int t = amount - 1, i = 0;\r\n Vector3[] result = new Vector3[amount];\r\n\r\n Iterator<Vector3> iter = intervalIterator(getLengthSquared() / t*t);\r\n while (iter.hasNext())\r\n result[i++] = iter.next();\r\n\r\n return result;\r\n }\r\n\r\n abstract Ray3 clone();\r\n\r\n}", "public static TerminalReturnCardResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n TerminalReturnCardResponse object =\n new TerminalReturnCardResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"terminalReturnCardResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (TerminalReturnCardResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"terminalReturnCardReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setTerminalReturnCardReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setTerminalReturnCardReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetVehicleInfoPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleInfoPage object =\n new GetVehicleInfoPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleInfoPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleInfoPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\n\t\tpublic void onGetWalkingRouteResult(WalkingRouteResult walkingrouteresult) {\n\t\t\tnearby_baidumap.clear();// 清除图层覆盖物\n\t\t\tN_showdatainfotv.setText(\"\");\n\t\t\tSB.delete(0, SB.length());\n\t\t\tif (walkingrouteresult == null || walkingrouteresult.error != SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tToastUtil.CreateToastShow(navigation, null, \"温馨提示\", \"没有找到合适的路线\");\n\t\t\t}\n\t\t\tif (walkingrouteresult.error == SearchResult.ERRORNO.AMBIGUOUS_ROURE_ADDR) {\n\t\t\t\t// 起终点或途经点地址有岐义,通过以下接口获取建议查询信息\n\t\t\t\t// result.getSuggestAddrInfo()\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (walkingrouteresult.error == SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tN_routeline = walkingrouteresult.getRouteLines().get(0);// 第一方案\n\t\t\t\tLog.e(\"L\", \"显示步行\");\n\n\t\t\t\tSB.append(\"起点\\t\\t\" + N_currentaddress).append(\"\\t\\t\\t----\\t\\t\\t\").append(\"终点\\t\\t\" + N_targetaddress)\n\t\t\t\t\t\t.append(\"\\n\\n\");\n\t\t\t\tfor (int i = 0; i < N_routeline.getAllStep().size(); i++) {\n\t\t\t\t\tWalkingRouteLine.WalkingStep step = (WalkingStep) N_routeline.getAllStep().get(i);\n\t\t\t\t\tSB.append(i + \"\\t入口\\t:\" + step.getEntranceInstructions()).append(\"\\t\\t\\t\")\n\t\t\t\t\t\t\t.append(i + \"\\t出口\\t:\" + step.getExitInstructions()).append(\"\\t\\t\\t\");\n\t\t\t\t}\n\n\t\t\t\tN_showdatainfotv.setText(SB);\n\t\t\t\tWalkingOverlayUtil walkingoverlayutil = new WalkingOverlayUtil(nearby_baidumap, navigation);\n\t\t\t\twalkingoverlayutil.setData(walkingrouteresult.getRouteLines().get(0));\n\t\t\t\twalkingoverlayutil.addToMap();\n\t\t\t\twalkingoverlayutil.zoomToSpan();\n\t\t\t}\n\n\t\t}", "private static void tracer(Scene scene, Ray ray, short[] rgb) {\r\n\t\tRayIntersection closest = findClosestIntersection(scene, ray);\r\n\r\n\t\tif (closest == null) {\r\n\t\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\t\trgb[i] = 0;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tdetermineColor(scene, closest, rgb, ray.start);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}", "public void startgetTerminalCardType(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardType getTerminalCardType2,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getTerminalCardTypeRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getTerminalCardType2,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getTerminalCardType\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getTerminalCardType\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultgetTerminalCardType(\n (net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorgetTerminalCardType(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetTerminalCardType(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetTerminalCardType(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorgetTerminalCardType(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorgetTerminalCardType(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorgetTerminalCardType(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[1].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[1].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "@Override\n\tpublic Outcome extractMetric(XTrace trace) {\n\t\tXEvent lastEvent = trace.get(trace.size()-1);\n\t\tXAttribute attr = lastEvent.getAttributes().get(\"OUTCOME\");\n\t\t\n\t\t//String outcome = attr == null ? \"undecided\" : attr.toString();\n\t\t\n\t\tOutcome outcome = attr == null ? null : Outcome.fromString(attr.toString());\n\t\treturn outcome;\n\t\t//return Outcome.fromString(outcome);\n\t}", "@Override\n public void accVertical(int value, int timestamp) {\n }", "private AuthenticationResult processTokenResponse(HttpWebResponse webResponse, final HttpEvent httpEvent)\n throws AuthenticationException {\n final String methodName = \":processTokenResponse\";\n AuthenticationResult result;\n String correlationIdInHeader = null;\n String speRing = null;\n if (webResponse.getResponseHeaders() != null) {\n if (webResponse.getResponseHeaders().containsKey(\n AuthenticationConstants.AAD.CLIENT_REQUEST_ID)) {\n // headers are returning as a list\n List<String> listOfHeaders = webResponse.getResponseHeaders().get(\n AuthenticationConstants.AAD.CLIENT_REQUEST_ID);\n if (listOfHeaders != null && listOfHeaders.size() > 0) {\n correlationIdInHeader = listOfHeaders.get(0);\n }\n }\n\n if (webResponse.getResponseHeaders().containsKey(AuthenticationConstants.AAD.REQUEST_ID_HEADER)) {\n // headers are returning as a list\n List<String> listOfHeaders = webResponse.getResponseHeaders().get(\n AuthenticationConstants.AAD.REQUEST_ID_HEADER);\n if (listOfHeaders != null && listOfHeaders.size() > 0) {\n Logger.v(TAG + methodName, \"Set request id header. \" + \"x-ms-request-id: \" + listOfHeaders.get(0));\n httpEvent.setRequestIdHeader(listOfHeaders.get(0));\n }\n }\n\n if (null != webResponse.getResponseHeaders().get(X_MS_CLITELEM) && !webResponse.getResponseHeaders().get(X_MS_CLITELEM).isEmpty()) {\n final CliTelemInfo cliTelemInfo =\n TelemetryUtils.parseXMsCliTelemHeader(\n webResponse.getResponseHeaders()\n .get(X_MS_CLITELEM).get(0)\n );\n\n if (null != cliTelemInfo) {\n httpEvent.setXMsCliTelemData(cliTelemInfo);\n speRing = cliTelemInfo.getSpeRing();\n }\n }\n }\n\n final int statusCode = webResponse.getStatusCode();\n\n if (statusCode == HttpURLConnection.HTTP_OK\n || statusCode == HttpURLConnection.HTTP_BAD_REQUEST\n || statusCode == HttpURLConnection.HTTP_UNAUTHORIZED) {\n try {\n result = parseJsonResponse(webResponse.getBody());\n if (result != null) {\n if (null != result.getErrorCode()) {\n result.setHttpResponse(webResponse);\n }\n\n final CliTelemInfo cliTelemInfo = new CliTelemInfo();\n cliTelemInfo._setSpeRing(speRing);\n result.setCliTelemInfo(cliTelemInfo);\n httpEvent.setOauthErrorCode(result.getErrorCode());\n }\n } catch (final JSONException jsonException) {\n throw new AuthenticationException(ADALError.SERVER_INVALID_JSON_RESPONSE,\n \"Can't parse server response. \" + webResponse.getBody(),\n webResponse, jsonException);\n }\n } else if (statusCode >= HttpURLConnection.HTTP_INTERNAL_ERROR && statusCode <= MAX_RESILIENCY_ERROR_CODE) {\n throw new ServerRespondingWithRetryableException(\"Server Error \" + statusCode + \" \"\n + webResponse.getBody(), webResponse);\n } else {\n throw new AuthenticationException(ADALError.SERVER_ERROR,\n \"Unexpected server response \" + statusCode + \" \" + webResponse.getBody(),\n webResponse);\n }\n\n // Set correlationId in the result\n if (correlationIdInHeader != null && !correlationIdInHeader.isEmpty()) {\n try {\n UUID correlation = UUID.fromString(correlationIdInHeader);\n if (!correlation.equals(mRequest.getCorrelationId())) {\n Logger.w(TAG + methodName, \"CorrelationId is not matching\", \"\",\n ADALError.CORRELATION_ID_NOT_MATCHING_REQUEST_RESPONSE);\n }\n\n Logger.v(TAG + methodName, \"Response correlationId:\" + correlationIdInHeader);\n } catch (IllegalArgumentException ex) {\n Logger.e(TAG + methodName, \"Wrong format of the correlation ID:\" + correlationIdInHeader, \"\",\n ADALError.CORRELATION_ID_FORMAT, ex);\n }\n }\n\n if (null != webResponse.getResponseHeaders()) {\n final List<String> xMsCliTelemValues = webResponse.getResponseHeaders().get(X_MS_CLITELEM);\n if (null != xMsCliTelemValues && !xMsCliTelemValues.isEmpty()) {\n // Only one value is expected to be present, so we'll grab the first element...\n final String speValue = xMsCliTelemValues.get(0);\n final CliTelemInfo cliTelemInfo = TelemetryUtils.parseXMsCliTelemHeader(speValue);\n if (result != null) {\n result.setCliTelemInfo(cliTelemInfo);\n }\n }\n }\n\n return result;\n }", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4) {\n\n\t}", "@Override\n\tpublic void trace(String message, Object... params) {\n\n\t}", "@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}", "@Override\npublic void processDirection() {\n\t\n}", "public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n mRgba = inputFrame.rgba();\n Imgproc.resize(mRgba, mRgba, new Size(100,100));\n // Rotate mRgba 90 degrees\n Core.transpose(mRgba, mRgbaT);\n Imgproc.resize(mRgbaT, mRgbaF, mRgbaF.size(), 0,0, 0);\n Core.flip(mRgbaF, mRgba, 1 );\n //Blurs for smoother edgges\n Imgproc.blur(mRgba, mRgba, new Size(8,8));\n\n //Adds the counter to the instantiation of each object as it counts the frame number\n Object blue = new Object(\"blue\", counter);\n Object green = new Object(\"green\", counter);\n Object red = new Object(\"red\", counter);\n\n Mat threshold = new Mat();\n Mat HSV = new Mat();\n //Changes from BGR to HSV as HSV allow much easier colour ranges for creating a binary mat\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_RGB2HSV);\n //Creates blue binary mat\n Core.inRange(HSV, blue.HSVMin, blue.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(blue,threshold,HSV,mRgba, blue.type, counter);\n\n //TODO disabled the green markers for now\n /*\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_BGR2HSV);\n Core.inRange(HSV, green.HSVMin, green.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(green,threshold,HSV,mRgba, green.type, counter);\n */\n //creates red binary mat\n Imgproc.cvtColor(mRgba,HSV,Imgproc.COLOR_BGR2HSV);\n Core.inRange(HSV, red.HSVMin, red.HSVMax, threshold);\n morphOps(threshold);\n trackFilteredObject(red,threshold,HSV,mRgba, red.type, counter);\n\n //Colours the line that registers if a step has occured accordingly\n if(redGreenLine || blueGreenLine){\n Imgproc.line(mRgba, new Point(0, 150), new Point(500, 150), new Scalar(0, 255, 0), 2);\n }\n else if(!redGreenLine && !redGreenLine){\n Imgproc.line(mRgba, new Point(0, 150), new Point(500, 150), new Scalar(255, 0, 0), 2);\n }\n //Will write each frame to storage once the reoord button is pressed. This is used for setting ground truth data\n if(enableVideo) {\n Mat output = new Mat();\n Imgproc.cvtColor(mRgba, output, Imgproc.COLOR_RGB2BGR);\n Imgproc.resize(output, output, new Size(100,100));\n Imgcodecs.imwrite(fileName + BUILDING_NAME + FLOOR_NUMBER + \"(\" + startLat + \",\" + startLong + \")\" + \"to\" + \"(\" + endLat + \",\" + endLong + \")\" + Integer.toString(counter) + \".bmp\", output);\n }\n\n counter++;\n\n return mRgba; // This function must return\n }", "public static GetVehicleAlarmInfoPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleAlarmInfoPage object =\n new GetVehicleAlarmInfoPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleAlarmInfoPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleAlarmInfoPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public void processImpactResults(Object o)\r\n/* 259: */ {\r\n/* 260:220 */ if ((o instanceof BetterSignal))\r\n/* 261: */ {\r\n/* 262:221 */ BetterSignal signal = (BetterSignal)o;\r\n/* 263:222 */ String input = (String)signal.get(0, String.class);\r\n/* 264:223 */ Connections.getPorts(this).transmit(TO_TEXT_VIEWER, new BetterSignal(new Object[] { \"Commentary\", \"clear\" }));\r\n/* 265:224 */ translate(input);\r\n/* 266: */ }\r\n/* 267: */ }", "public static GetRoadwayPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetRoadwayPage object =\n new GetRoadwayPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getRoadwayPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetRoadwayPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public abstract void process(Ray ray, Stack<Ray> bifurcations);", "@Override\n\tpublic void trace(String message, Object p0, Object p1, Object p2, Object p3, Object p4) {\n\n\t}" ]
[ "0.657397", "0.6374284", "0.60090065", "0.60090065", "0.5636395", "0.55194926", "0.551844", "0.5190078", "0.50868344", "0.5074053", "0.50509787", "0.50130016", "0.4961065", "0.4961065", "0.4945387", "0.49415958", "0.4917736", "0.4908078", "0.48699692", "0.48415065", "0.48331702", "0.4826545", "0.48261815", "0.4817109", "0.4816504", "0.47775668", "0.4770705", "0.47668993", "0.47486547", "0.47452587", "0.4737247", "0.47351053", "0.4731871", "0.47303906", "0.47155374", "0.4712215", "0.47012204", "0.46958026", "0.4694015", "0.4690697", "0.46880883", "0.46770567", "0.46648422", "0.4653296", "0.46480182", "0.46438894", "0.46304032", "0.46144098", "0.46135482", "0.46056017", "0.46003395", "0.4583272", "0.45770314", "0.45759848", "0.45754066", "0.4574825", "0.45685604", "0.45674428", "0.4565325", "0.45624942", "0.4560992", "0.4559167", "0.45539346", "0.45472455", "0.45466337", "0.45454887", "0.45417035", "0.4539673", "0.45299292", "0.45265234", "0.4525432", "0.45210612", "0.45174697", "0.45094484", "0.4503883", "0.45003316", "0.44926047", "0.4488548", "0.448407", "0.4483882", "0.44825065", "0.44756714", "0.44742027", "0.44693193", "0.44559613", "0.44518864", "0.4450542", "0.44480398", "0.4445815", "0.44392923", "0.4437014", "0.4435716", "0.44295964", "0.44245708", "0.4420661", "0.44200146", "0.44197664", "0.4418761", "0.441779", "0.44121632" ]
0.75527686
0
auto generated Axis2 call back method for rayTraceSubView method override this method for handling normal response from rayTraceSubView operation
public void receiveResultrayTraceSubView( RayTracerStub.RayTraceSubViewResponse result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void receiveResultrayTrace(\n RayTracerStub.RayTraceResponse result\n ) {\n }", "public abstract Color traceRay(Ray ray);", "public abstract Color traceRay(Ray ray);", "public void receiveResultrayTraceMovie(\n RayTracerStub.RayTraceMovieResponse result\n ) {\n }", "public void\n doExtraInformation(Ray inRay, double inT, \n GeometryIntersectionInformation outData) {\n outData.p = lastInfo.p;\n\n switch ( lastPlane ) {\n case 1:\n outData.n.x = 0;\n outData.n.y = 0;\n outData.n.z = 1;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = 1-(outData.p.x / size.x - 0.5);\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 2:\n outData.n.x = 0;\n outData.n.y = 0;\n outData.n.z = -1;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = outData.p.x / size.x - 0.5;\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 3:\n outData.n.x = 0;\n outData.n.z = 0;\n outData.n.y = 1;\n outData.u = 1-(outData.p.x / size.x - 0.5);\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = -1;\n outData.t.y = 0;\n outData.t.z = 0;\n break;\n case 4:\n outData.n.x = 0;\n outData.n.z = 0;\n outData.n.y = -1;\n outData.u = outData.p.x / size.x - 0.5;\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 1;\n outData.t.y = 0;\n outData.t.z = 0;\n break;\n case 5:\n outData.n.x = 1;\n outData.n.y = 0;\n outData.n.z = 0;\n outData.u = outData.p.y / size.y - 0.5;\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 0;\n outData.t.y = 1;\n outData.t.z = 0;\n break;\n case 6:\n outData.n.x = -1;\n outData.n.y = 0;\n outData.n.z = 0;\n outData.u = 1-(outData.p.y / size.y - 0.5);\n outData.v = outData.p.z / size.z - 0.5;\n outData.t.x = 0;\n outData.t.y = -1;\n outData.t.z = 0;\n break;\n default:\n outData.u = 0;\n outData.v = 0;\n break;\n }\n }", "@Override\n public void\n doExtraInformation(Ray inRay, double inT,\n GeometryIntersectionInformation outData) {\n // TODO!\n }", "public abstract int trace();", "public void raycast(VrState state);", "public native void raycast(Raycaster raycaster, Object[] intersects);", "public static Result\n traceRecursion(PointF vLaserSource, PointF vLaserDir, float fRefractionMultiplier, PointF[] geometry, float[] afRefractiveIndices, float fIntensity, int iRecursionDepth, float fFlightLength){\n\n Result res = new Result();\n //init return lists\n res.lineSegments = new ArrayList<>();\n res.intensities = new ArrayList<>();\n res.lightLengths = new ArrayList<>();\n res.hitIntensities = new ArrayList<>();\n res.hitSegments = new ArrayList<>();\n\n //important for angle calculation\n Vec2D.normalize(vLaserDir);\n\n //recursion limiter\n if(fIntensity < 0.05f || iRecursionDepth > 20)\n return res;\n\n //populate output structure\n res.lineSegments.add(vLaserSource);\n res.intensities.add(fIntensity);\n res.lightLengths.add(fFlightLength);\n\n //initialize to infinity\n float fNearestHit = Float.MAX_VALUE;\n int iHitIndex = -1;\n\n //check each geometry line against this ray\n for (int iLine = 0; iLine < geometry.length/2; iLine++) {\n //check if source on right side\n PointF line0 = geometry[iLine*2];\n PointF line1 = geometry[iLine*2 + 1];\n\n //calculate intersection with geometry line\n float fIntersection = intersectRayLine(vLaserSource, vLaserDir, line0, line1);\n\n if(fIntersection > 0.0f && fIntersection < 1.0f){\n //stuff intersects\n //calculate intersection PointF\n PointF vIntersection = Vec2D.add(line0, Vec2D.mul(fIntersection, Vec2D.subtract(line1, line0)) );\n //calculate distance to source\n float fHitDistance = Vec2D.subtract(vLaserSource, vIntersection).length();\n if(Vec2D.subtract(vLaserSource, vIntersection).length() < fNearestHit && fHitDistance > 0.001f) {\n //new minimum distance\n fNearestHit = fHitDistance;\n iHitIndex = iLine;\n }\n }\n }\n //check if we hit\n if(iHitIndex == -1)\n {\n //bigger than screen\n final float fInfLength = 3.0f;\n res.lineSegments.add(Vec2D.add(vLaserSource, Vec2D.mul(fInfLength, vLaserDir)) );\n res.lightLengths.add(fFlightLength + fInfLength);\n }\n else\n {\n //there was a hit somewhere\n //first re-evaluate\n PointF line0 = geometry[iHitIndex*2];\n PointF line1 = geometry[iHitIndex*2 + 1];\n\n res.hitSegments.add(iHitIndex);\n res.hitIntensities.add(fIntensity);\n //calculate point of impact\n float fIntersection = intersectRayLine(vLaserSource, vLaserDir, line0, line1);\n PointF vIntersection = Vec2D.add(line0, Vec2D.mul(fIntersection, Vec2D.subtract(line1, line0)) );\n\n //spam line end\n res.lineSegments.add(vIntersection);\n float fNextLength = fFlightLength + fNearestHit;\n res.lightLengths.add(fNextLength);\n\n if(afRefractiveIndices[iHitIndex] < 0.0f)\n return res;\n\n //calculate normalized surface normal\n PointF vLine = Vec2D.subtract(line1, line0);\n PointF vSurfaceNormal = Vec2D.flip(Vec2D.perpendicular(vLine));\n Vec2D.normalize(vSurfaceNormal);\n\n //calculate direction of reflection\n PointF vReflected = Vec2D.add(Vec2D.mul(-2.0f, Vec2D.mul(Vec2D.dot(vSurfaceNormal, vLaserDir), vSurfaceNormal)), vLaserDir);\n\n double fImpactAngle = Math.acos(Vec2D.dot(vSurfaceNormal, Vec2D.flip(vLaserDir)));\n\n double fRefractionAngle = 0.0f;\n float fRefracted = 0.0f;\n boolean bTotalReflection = false;\n\n if(afRefractiveIndices[iHitIndex] < 5.0f) {\n //calculate which side of the object we're on\n if (Vec2D.dot(vSurfaceNormal, Vec2D.subtract(vLaserSource, line0)) < 0) {\n //from medium to air\n //angle will become bigger\n double fSinAngle = Math.sin(fImpactAngle) * (afRefractiveIndices[iHitIndex] * fRefractionMultiplier);\n\n if (fSinAngle > 1.0f || fSinAngle < -1.0f)\n //refraction would be back into object\n bTotalReflection = true;\n else {\n //calculate refraction\n fRefractionAngle = Math.asin(fSinAngle);\n float fFlippedImpactAngle = (float) Math.asin(Math.sin(fImpactAngle));\n fRefracted = (float) (2.0f * Math.sin(fFlippedImpactAngle) * Math.cos(fRefractionAngle) / Math.sin(fFlippedImpactAngle + fRefractionAngle));\n\n //set refraction angle for direction calculation\n fRefractionAngle = Math.PI - fRefractionAngle;\n }\n } else {\n //from air to medium\n //angle will become smaller\n fRefractionAngle = Math.asin(Math.sin(fImpactAngle) / (afRefractiveIndices[iHitIndex] * fRefractionMultiplier));\n fRefracted = (float) (2.0f * Math.sin(fRefractionAngle) * Math.cos(fImpactAngle) / Math.sin(fImpactAngle + fRefractionAngle));\n }\n }\n else\n bTotalReflection = true;\n\n //give the refraction angle a sign\n if(Vec2D.dot(vLine, vLaserDir) < 0)\n fRefractionAngle = -fRefractionAngle;\n\n //calculate direction of refraction\n double fInvertedSurfaceAngle = Math.atan2(-vSurfaceNormal.y, -vSurfaceNormal.x);\n PointF vRefracted = new PointF((float)Math.cos(fInvertedSurfaceAngle - fRefractionAngle), (float)Math.sin(fInvertedSurfaceAngle - fRefractionAngle));\n\n //calculate amount of light reflected\n float fReflected = 1.0f - fRefracted;\n\n //continue with recursion, reflection\n Result resReflection = traceRecursion(vIntersection, vReflected, fRefractionMultiplier, geometry, afRefractiveIndices, fReflected * fIntensity, iRecursionDepth+1, fNextLength);\n //merge results\n res.lineSegments.addAll(resReflection.lineSegments);\n res.intensities.addAll(resReflection.intensities);\n res.lightLengths.addAll(resReflection.lightLengths);\n res.hitSegments.addAll(resReflection.hitSegments);\n res.hitIntensities.addAll(resReflection.hitIntensities);\n\n //continue with recursion, refraction\n if(!bTotalReflection) {\n Result resRefraction = traceRecursion(vIntersection, vRefracted, fRefractionMultiplier, geometry, afRefractiveIndices, fRefracted * fIntensity, iRecursionDepth+1, fNextLength);\n //merge results\n res.lineSegments.addAll(resRefraction.lineSegments);\n res.intensities.addAll(resRefraction.intensities);\n res.lightLengths.addAll(resRefraction.lightLengths);\n res.hitSegments.addAll(resRefraction.hitSegments);\n res.hitIntensities.addAll(resRefraction.hitIntensities);\n }\n }\n return res;\n }", "private Vec3 trace(Ray ray) {\n\t\tSphere sphere = null;\n\n\t\tfor (int i = 0; i < spheres.size(); i++) {\n\t\t\tif (spheres.get(i).intersect(ray)) {\n\t\t\t\tsphere = spheres.get(i);\n\t\t\t}\n\t\t}\n\n\t\tif (sphere == null) {\n\t\t\treturn new Vec3(0.0f); // Background color.\n\t\t}\n\n\t\tVec3 p = ray.getIntersection(); // Intersection point.\n\t\tVec3 n = sphere.normal(p); // Normal at intersection.\n\n\t\treturn light.phong(sphere, p, n);\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}", "default void queryContextLineageSubgraph(\n com.google.cloud.aiplatform.v1.QueryContextLineageSubgraphRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.LineageSubgraph>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getQueryContextLineageSubgraphMethod(), responseObserver);\n }", "@Override\n\tpublic void shade(Colord outIntensity, Scene scene, Ray ray, IntersectionRecord record, int depth) {\n\t\t// TODO#A7: fill in this function.\n\t\t// 1) Determine whether the ray is coming from the inside of the surface\n\t\t// or the outside.\n\t\t// 2) Determine whether total internal reflection occurs.\n\t\t// 3) Compute the reflected ray and refracted ray (if total internal\n\t\t// reflection does not occur)\n\t\t// using Snell's law and call RayTracer.shadeRay on them to shade them\n\n\t\t// n1 is from; n2 is to.\n\t\tdouble n1 = 0, n2 = 0;\n\t\tdouble fresnel = 0;\n\t\tVector3d d = new Vector3d(ray.origin.clone().sub(record.location)).normalize();\n\t\tVector3d n = new Vector3d(record.normal).normalize();\n\t\tdouble theta = n.dot(d);\n\n\t\t// CASE 1a: ray coming from outside.\n\t\tif (theta > 0) {\n\t\t\tn1 = 1.0;\n\t\t\tn2 = refractiveIndex;\n\t\t\tfresnel = fresnel(n, d, refractiveIndex);\n\t\t}\n\n\t\t// CASE 1b: ray coming from inside.\n\t\telse if (theta < 0) {\n\t\t\tn1 = refractiveIndex;\n\t\t\tn2 = 1.0;\n\t\t\tn.mul(-1.0);\n\t\t\tfresnel = fresnel(n, d, 1/refractiveIndex);\n\t\t\ttheta = n.dot(d);\n\t\t}\n\n\t\tVector3d reflectionDir = new Vector3d(n).mul(2 * theta).sub(d.clone()).normalize();\n\t\tRay reflectionRay = new Ray(record.location.clone(), reflectionDir);\n\t\treflectionRay.makeOffsetRay();\n\t\tColord reflectionColor = new Colord();\n\t\tRayTracer.shadeRay(reflectionColor, scene, reflectionRay, depth+1);\n\n\t\tdouble det = 1 - (Math.pow(n1, 2.0) * (1 - Math.pow(theta, 2.0))) / (Math.pow(n2, 2.0));\n\n\t\tif (det < 0.0) {\n\t\t\toutIntensity.add(reflectionColor);\n\t\t} else {\n\n\t\t\td = new Vector3d(record.location.clone().sub(ray.origin)).normalize();\n\n\t\t\tVector3d refractionDir = new Vector3d((d.clone().sub(n.clone().mul(d.dot(n))).mul(n1/n2)));\n\t\t\trefractionDir.sub(n.clone().mul(Math.sqrt(det)));\n\t\t\tRay refractionRay = new Ray(record.location.clone(), refractionDir);\n\t\t\trefractionRay.makeOffsetRay();\n\n\t\t\tColord refractionColor = new Colord();\n\t\t\tRayTracer.shadeRay(refractionColor, scene, refractionRay, depth+1);\n\n\t\t\trefractionColor.mul(1-fresnel);\n\t\t\treflectionColor.mul(fresnel);\n\t\t\toutIntensity.add(reflectionColor).add(refractionColor);\n\n\t\t}\n\t}", "@Override\n protected void paintTrace(Painter aPntr)\n {\n // Get area bounds\n double areaW = getWidth();\n double areaH = getHeight();\n\n // Get whether TraceView/Trace is selected or targeted\n boolean isSelected = isSelectedOrTargeted();\n\n // Get Trace info\n Trace trace = getTrace();\n boolean showLine = trace.isShowLine();\n boolean showPoints = trace.isShowPoints();\n boolean showArea = trace.isShowArea();\n\n // Get DataColor, DataStroke\n Color dataColor = getDataColor();\n Stroke dataStroke = trace.getLineStroke();\n\n // If reveal is not full (1) then clip\n double reveal = getReveal();\n if (reveal < 1 && (showPoints || showArea)) {\n aPntr.save();\n aPntr.clipRect(0, 0, areaW * reveal, areaH);\n }\n\n // If ShowArea, fill path, too\n if (showArea) {\n Shape traceAreaShape = getTraceAreaShape();\n Color traceFillColor = trace.getFillColor();\n aPntr.setColor(traceFillColor);\n aPntr.fill(traceAreaShape);\n }\n\n // Get dataShape (path) (if Reveal is active, get shape as SplicerShape so we can draw partial/animated)\n Shape dataShape = getTraceLineShape();\n if (reveal < 1 && showLine)\n dataShape = new SplicerShape(dataShape, 0, reveal);\n\n // If ShowLine, draw path\n if (isSelected && showLine) {\n aPntr.setStrokePure(true);\n\n // If selected, draw path\n Color selColor = dataColor.blend(Color.CLEARWHITE, .75);\n Stroke selStroke = dataStroke.copyForWidth(dataStroke.getWidth() * 3 + 8).copyForDashes(null);\n aPntr.setColor(selColor);\n aPntr.setStroke(selStroke);\n aPntr.draw(dataShape);\n\n // If selected, draw path\n Color selColor2 = dataColor.blend(Color.WHITE, 1);\n Stroke selStroke2 = dataStroke.copyForWidth(dataStroke.getWidth() + 2);\n aPntr.setColor(selColor2);\n aPntr.setStroke(selStroke2);\n aPntr.draw(dataShape);\n\n aPntr.setStrokePure(false);\n aPntr.setColor(dataColor);\n aPntr.setStroke(dataStroke);\n }\n\n // Set color, stroke\n aPntr.setColor(dataColor);\n aPntr.setStroke(dataStroke);\n\n // If ShowLine, draw path\n if (showLine) {\n aPntr.setStrokePure(true);\n aPntr.draw(dataShape);\n aPntr.setStrokePure(false);\n }\n\n // If Reveal is active, paint TailShape\n if (dataShape instanceof SplicerShape)\n paintTailShape(aPntr, (SplicerShape) dataShape);\n\n // Paint selected point\n if (isSelected)\n paintSelDataPoint(aPntr);\n\n // If ShowPoints or ShowTags\n boolean showTags = trace.isShowTags();\n if (showPoints || showTags)\n _pointPainter.paintSymbolsAndTagsPrep();\n\n // If ShowPoints, paint symbols\n if (showPoints)\n paintSymbols(aPntr);\n\n // If reveal not full, resture gstate\n if (reveal < 1 && (showPoints || showArea))\n aPntr.restore();\n }", "@Override\r\n public void intersect( Ray ray, IntersectResult result ) {\n\t\r\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}", "@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 void receiveResultrayTraceURL(\n RayTracerStub.RayTraceURLResponse result\n ) {\n }", "public int getRayNum();", "public void onNestedScrollAccepted(android.view.View r1, android.view.View r2, int r3) {\n /*\n r0 = this;\n a.f.k.h r1 = r0.B\n r1.f320a = r3\n int r1 = r0.getActionBarHideOffset()\n r0.m = r1\n r0.h()\n androidx.appcompat.widget.ActionBarOverlayLayout$d r1 = r0.v\n if (r1 == 0) goto L_0x001d\n a.b.k.r r1 = (a.b.k.r) r1\n a.b.o.g r2 = r1.u\n if (r2 == 0) goto L_0x001d\n r2.a()\n r2 = 0\n r1.u = r2\n L_0x001d:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: androidx.appcompat.widget.ActionBarOverlayLayout.onNestedScrollAccepted(android.view.View, android.view.View, int):void\");\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 }", "@NonNull\n/* */ private Observable<double[]> touchEventToOutlineSegmentArray() {\n/* 207 */ return this.mTouchEventSubject.serialize().observeOn(Schedulers.computation()).map(new Function<InkEvent, double[]>()\n/* */ {\n/* */ public double[] apply(InkEvent inkEvent) throws Exception {\n/* 210 */ Utils.throwIfOnMainThread();\n/* */ \n/* */ \n/* 213 */ InkEventType eventType = inkEvent.eventType;\n/* 214 */ float x = inkEvent.x;\n/* 215 */ float y = inkEvent.y;\n/* 216 */ float pressure = inkEvent.pressure;\n/* */ \n/* 218 */ return PointProcessor.this.handleTouches(eventType, x, y, pressure);\n/* */ }\n/* */ });\n/* */ }", "@Override\n public void onMoveLegResponse(MoveLegResponse ind) {\n\n }", "public void XtestTwoLevelClippingInView() throws Throwable {\n mEvents.clear();\n getReactContext().getJSModule(SubviewsClippingTestModule.class).renderClippingSample2();\n waitForBridgeAndUIIdle();\n Assert.assertArrayEquals(\n new String[] {\"Attach_outer\", \"Attach_complexInner\", \"Attach_inner1\"}, mEvents.toArray());\n }", "@Override\n\tpublic void trace(Marker marker, String message, Object p0) {\n\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 }", "@Override\n public boolean\n doIntersection(Ray inOut_Ray) {\n // TODO!\n return false;\n }", "public void XtestOneLevelClippingInView() throws Throwable {\n mEvents.clear();\n getReactContext().getJSModule(SubviewsClippingTestModule.class).renderClippingSample1();\n waitForBridgeAndUIIdle();\n Assert.assertArrayEquals(new String[] {\"Attach_outer\", \"Attach_inner2\"}, mEvents.toArray());\n }", "@Override\n\t\tpublic void onGetWalkingRouteResult(WalkingRouteResult walkingrouteresult) {\n\t\t\tnearby_baidumap.clear();// 清除图层覆盖物\n\t\t\tN_showdatainfotv.setText(\"\");\n\t\t\tSB.delete(0, SB.length());\n\t\t\tif (walkingrouteresult == null || walkingrouteresult.error != SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tToastUtil.CreateToastShow(navigation, null, \"温馨提示\", \"没有找到合适的路线\");\n\t\t\t}\n\t\t\tif (walkingrouteresult.error == SearchResult.ERRORNO.AMBIGUOUS_ROURE_ADDR) {\n\t\t\t\t// 起终点或途经点地址有岐义,通过以下接口获取建议查询信息\n\t\t\t\t// result.getSuggestAddrInfo()\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (walkingrouteresult.error == SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tN_routeline = walkingrouteresult.getRouteLines().get(0);// 第一方案\n\t\t\t\tLog.e(\"L\", \"显示步行\");\n\n\t\t\t\tSB.append(\"起点\\t\\t\" + N_currentaddress).append(\"\\t\\t\\t----\\t\\t\\t\").append(\"终点\\t\\t\" + N_targetaddress)\n\t\t\t\t\t\t.append(\"\\n\\n\");\n\t\t\t\tfor (int i = 0; i < N_routeline.getAllStep().size(); i++) {\n\t\t\t\t\tWalkingRouteLine.WalkingStep step = (WalkingStep) N_routeline.getAllStep().get(i);\n\t\t\t\t\tSB.append(i + \"\\t入口\\t:\" + step.getEntranceInstructions()).append(\"\\t\\t\\t\")\n\t\t\t\t\t\t\t.append(i + \"\\t出口\\t:\" + step.getExitInstructions()).append(\"\\t\\t\\t\");\n\t\t\t\t}\n\n\t\t\t\tN_showdatainfotv.setText(SB);\n\t\t\t\tWalkingOverlayUtil walkingoverlayutil = new WalkingOverlayUtil(nearby_baidumap, navigation);\n\t\t\t\twalkingoverlayutil.setData(walkingrouteresult.getRouteLines().get(0));\n\t\t\t\twalkingoverlayutil.addToMap();\n\t\t\t\twalkingoverlayutil.zoomToSpan();\n\t\t\t}\n\n\t\t}", "public int getViewAreas(Map<String, ViewArea> _output)\n/* 207: */ {\n/* 208:281 */ if (_output != null) {\n/* 209:282 */ _output.put(\"_origin_VA\", this._origin_VA);\n/* 210: */ }\n/* 211:284 */ return 1 + super.getViewAreas(_output);\n/* 212: */ }", "TraceDataView data();", "default void queryArtifactLineageSubgraph(\n com.google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.LineageSubgraph>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getQueryArtifactLineageSubgraphMethod(), responseObserver);\n }", "private StaticPacketTrace getTrace(List<ConnectPoint> completePath, ConnectPoint in, StaticPacketTrace trace,\n boolean isDualHomed) {\n\n log.debug(\"------------------------------------------------------------\");\n\n //if the trace already contains the input connect point there is a loop\n if (pathContainsDevice(completePath, in.deviceId())) {\n trace.addResultMessage(\"Loop encountered in device \" + in.deviceId());\n completePath.add(in);\n trace.addCompletePath(completePath);\n trace.setSuccess(false);\n return trace;\n }\n\n //let's add the input connect point\n completePath.add(in);\n\n //If the trace has no outputs for the given input we stop here\n if (trace.getHitChains(in.deviceId()) == null) {\n TroubleshootUtils.computePath(completePath, trace, null);\n trace.addResultMessage(\"No output out of device \" + in.deviceId() + \". Packet is dropped\");\n trace.setSuccess(false);\n return trace;\n }\n\n //If the trace has outputs we analyze them all\n for (PipelineTraceableHitChain outputPath : trace.getHitChains(in.deviceId())) {\n\n ConnectPoint cp = outputPath.outputPort();\n log.debug(\"Connect point in {}\", in);\n log.debug(\"Output path {}\", cp);\n log.debug(\"{}\", outputPath.egressPacket());\n\n if (outputPath.isDropped()) {\n continue;\n }\n\n //Hosts for the the given output\n Set<Host> hostsList = hostNib.getConnectedHosts(cp);\n //Hosts queried from the original ip or mac\n Set<Host> hosts = getHosts(trace);\n\n if (in.equals(cp) && trace.getInitialPacket().getCriterion(Criterion.Type.VLAN_VID) != null &&\n outputPath.egressPacket().packet().getCriterion(Criterion.Type.VLAN_VID) != null\n && ((VlanIdCriterion) trace.getInitialPacket().getCriterion(Criterion.Type.VLAN_VID)).vlanId()\n .equals(((VlanIdCriterion) outputPath.egressPacket()\n .packet().getCriterion(Criterion.Type.VLAN_VID)).vlanId())) {\n if (trace.getHitChains(in.deviceId()).size() == 1 &&\n TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort())) {\n trace.addResultMessage(\"Connect point out \" + cp + \" is same as initial input \" + in);\n trace.setSuccess(false);\n }\n } else if (!Collections.disjoint(hostsList, hosts)) {\n //If the two host collections contain the same item it means we reached the proper output\n log.debug(\"Stopping here because host is expected destination, reached through {}\", completePath);\n if (TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort())) {\n trace.addResultMessage(\"Reached required destination Host \" + cp);\n trace.setSuccess(true);\n }\n break;\n\n } else if (cp.port().equals(PortNumber.CONTROLLER)) {\n //Getting the master when the packet gets sent as packet in\n NodeId master = mastershipNib.getMasterFor(cp.deviceId());\n // TODO if we don't need to print master node id, exclude mastership NIB which is used only here\n trace.addResultMessage(PACKET_TO_CONTROLLER + \" \" + master.id());\n TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort());\n } else if (linkNib.getEgressLinks(cp).size() > 0) {\n //TODO this can be optimized if we use a Tree structure for paths.\n //if we already have outputs let's check if the one we are considering starts from one of the devices\n // in any of the ones we have.\n if (trace.getCompletePaths().size() > 0) {\n ConnectPoint inputForOutput = null;\n List<ConnectPoint> previousPath = new ArrayList<>();\n for (List<ConnectPoint> path : trace.getCompletePaths()) {\n for (ConnectPoint connect : path) {\n //if the path already contains the input for the output we've found we use it\n if (connect.equals(in)) {\n inputForOutput = connect;\n previousPath = path;\n break;\n }\n }\n }\n\n //we use the pre-existing path up to the point we fork to a new output\n if (inputForOutput != null && completePath.contains(inputForOutput)) {\n List<ConnectPoint> temp = new ArrayList<>(previousPath);\n temp = temp.subList(0, previousPath.indexOf(inputForOutput) + 1);\n if (completePath.containsAll(temp)) {\n completePath = temp;\n }\n }\n }\n\n //let's add the ouput for the input\n completePath.add(cp);\n //let's compute the links for the given output\n Set<Link> links = linkNib.getEgressLinks(cp);\n log.debug(\"Egress Links {}\", links);\n //For each link we trace the corresponding device\n for (Link link : links) {\n ConnectPoint dst = link.dst();\n //change in-port to the dst link in port\n Builder updatedPacket = DefaultTrafficSelector.builder();\n outputPath.egressPacket().packet().criteria().forEach(updatedPacket::add);\n updatedPacket.add(Criteria.matchInPort(dst.port()));\n log.debug(\"DST Connect Point {}\", dst);\n //build the elements for that device\n traceInDevice(trace, updatedPacket.build(), dst, isDualHomed, completePath);\n //continue the trace along the path\n getTrace(completePath, dst, trace, isDualHomed);\n }\n } else if (edgePortNib.isEdgePoint(outputPath.outputPort()) &&\n trace.getInitialPacket().getCriterion(Criterion.Type.ETH_DST) != null &&\n ((EthCriterion) trace.getInitialPacket().getCriterion(Criterion.Type.ETH_DST))\n .mac().isMulticast()) {\n trace.addResultMessage(\"Packet is multicast and reached output \" + outputPath.outputPort() +\n \" which is enabled and is edge port\");\n trace.setSuccess(true);\n TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort());\n if (!hasOtherOutput(in.deviceId(), trace, outputPath.outputPort())) {\n return trace;\n }\n } else if (deviceNib.getPort(cp) != null && deviceNib.getPort(cp).isEnabled()) {\n EthTypeCriterion ethTypeCriterion = (EthTypeCriterion) trace.getInitialPacket()\n .getCriterion(Criterion.Type.ETH_TYPE);\n //We treat as correct output only if it's not LLDP or BDDP\n if (!(ethTypeCriterion.ethType().equals(EtherType.LLDP.ethType())\n && !ethTypeCriterion.ethType().equals(EtherType.BDDP.ethType()))) {\n if (TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort())) {\n if (hostsList.isEmpty()) {\n trace.addResultMessage(\"Packet is \" + ((EthTypeCriterion) outputPath.egressPacket()\n .packet().getCriterion(Criterion.Type.ETH_TYPE)).ethType() + \" and reached \" +\n cp + \" with no hosts connected \");\n } else {\n IpAddress ipAddress = null;\n if (trace.getInitialPacket().getCriterion(Criterion.Type.IPV4_DST) != null) {\n ipAddress = ((IPCriterion) trace.getInitialPacket()\n .getCriterion(Criterion.Type.IPV4_DST)).ip().address();\n } else if (trace.getInitialPacket().getCriterion(Criterion.Type.IPV6_DST) != null) {\n ipAddress = ((IPCriterion) trace.getInitialPacket()\n .getCriterion(Criterion.Type.IPV6_DST)).ip().address();\n }\n if (ipAddress != null) {\n IpAddress finalIpAddress = ipAddress;\n if (hostsList.stream().anyMatch(host -> host.ipAddresses().contains(finalIpAddress)) ||\n hostNib.getHostsByIp(finalIpAddress).isEmpty()) {\n trace.addResultMessage(\"Packet is \" +\n ((EthTypeCriterion) outputPath.egressPacket().packet()\n .getCriterion(Criterion.Type.ETH_TYPE)).ethType() +\n \" and reached \" + cp + \" with hosts \" + hostsList);\n } else {\n trace.addResultMessage(\"Wrong output \" + cp + \" for required destination ip \" +\n ipAddress);\n trace.setSuccess(false);\n }\n } else {\n trace.addResultMessage(\"Packet is \" + ((EthTypeCriterion) outputPath.egressPacket()\n .packet().getCriterion(Criterion.Type.ETH_TYPE)).ethType()\n + \" and reached \" + cp + \" with hosts \" + hostsList);\n }\n }\n trace.setSuccess(true);\n }\n }\n\n } else {\n TroubleshootUtils.computePath(completePath, trace, cp);\n trace.setSuccess(false);\n if (deviceNib.getPort(cp) == null) {\n //Port is not existent on device.\n log.warn(\"Port {} is not available on device.\", cp);\n trace.addResultMessage(\"Port \" + cp + \"is not available on device. Packet is dropped\");\n } else {\n //No links means that the packet gets dropped.\n log.warn(\"No links out of {}\", cp);\n trace.addResultMessage(\"No links depart from \" + cp + \". Packet is dropped\");\n }\n }\n }\n return trace;\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}", "@Override\n protected void afterHookedMethod(MethodHookParam param) throws Throwable {\n super.afterHookedMethod(param);\n XposedBridge.log(\"hook onResume\");\n Activity activity = (Activity) param.thisObject;\n FrameLayout decor = (FrameLayout) activity.getWindow().getDecorView();\n //View decor = (View) activity.getWindow().getDecorView();\n List<View> views=getAllChildViews(decor);\n XposedBridge.log(\"view size: \"+views.size());\n for(int i=0;i<views.size();i++){\n View view=views.get(i);\n Log.i(\"ViewName\", view.getClass().getName());\n// ImageView imageView=(ImageView)views.get(i);\n// imageView.getRight();\n }\n }", "private static void tracer(Scene scene, Ray ray, short[] rgb) {\r\n\t\tRayIntersection closest = findClosestIntersection(scene, ray);\r\n\r\n\t\tif (closest == null) {\r\n\t\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\t\trgb[i] = 0;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tdetermineColor(scene, closest, rgb, ray.start);\r\n\t\t}\r\n\t}", "public RayTracerBase(Scene scene) {\n _scene = scene;\n }", "public RayTracerBase(Scene scene) {\n _scene = scene;\n }", "public String toString()\n {\n return \"Ray Origin: \" + origin + \"; Direction: \" + direction + \" T: \" + VSDK.formatDouble(t);\n }", "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 }", "@Override\n public void onRayCastClick(Vector2f mouse, CollisionResult result) {\n }", "public void queryContextLineageSubgraph(\n com.google.cloud.aiplatform.v1.QueryContextLineageSubgraphRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.LineageSubgraph>\n responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getQueryContextLineageSubgraphMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public Object handleCommandResponse(Object response) throws RayoProtocolException;", "public RayTracerCallbackHandler(){\n this.clientData = null;\n }", "Object getTrace();", "@Override\n\t\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}", "@Override\n protected void processTraceData(TraceData[] traceData, final String lineName) {\n _crossplotProcess.process(traceData);\n }", "public void render(Graphics2D g, VisualItem item) \n {\n \tsuper.render(g, item);\n \t \t\n \t/*\n \t * \t\n \tEdgeItem edge = (EdgeItem)item;\n \t\n \tCallEdge callEdge = ReacherDisplay.Instance.getCallEdge(item); \n \t \n \t \n \tPathIterator itr = m_path.getPathIterator(null, 1.0);\n \t\n \titr.currentSegment(ptsArray);\n\t\tPoint2D start = new Point2D.Double(ptsArray[0], ptsArray[1]);\n\t\t\n \titr.next();\n \titr.currentSegment(ptsArray);\n\t\tPoint2D end = new Point2D.Double(ptsArray[0], ptsArray[1]);*/\n\n\t\t\n\t\t// Update the start and end of the line to the insersection with the methodNode box\t\t\n /*GraphicsLib.intersectLineRectangle(start, end, edge.getSourceItem().getBounds(), pts);\n start = new Point2D.Double(pts[0].getX(), pts[0].getY()); \n GraphicsLib.intersectLineRectangle(start, end, edge.getTargetItem().getBounds(), pts);\t\n\t\tend = new Point2D.Double(pts[0].getX(), pts[0].getY());;*/\n\t\t\t\t\n\t\t/*double width = end.getX() - start.getX();\n\t\tboolean slopedUpward = end.getY() > start.getY(); // Is the line sloped upward (in y coordinate space which increases down)\n\t\tdouble height = slopedUpward ? end.getY() - start.getY() : start.getY() - end.getY();\n */\n \n/* getAlignedPoint(m_tmpPoints[0], item1.getBounds(),\n m_xAlign1, m_yAlign1);\n getAlignedPoint(m_tmpPoints[1], item2.getBounds(),\n m_xAlign2, m_yAlign2);*/\n\t\t \t \t\n \t/*int pathCount = callEdge.getPathCount(); \t\n \tif (pathCount > 1)\n \t{\n \t\tdouble xCenter = start.getX() + width * 1.0;\n \t\tdouble yCenter = start.getY() + (slopedUpward ? 1 : -1) * height * 1.0; \t\t\n \t\tdrawText(g, xCenter, yCenter, item, \"\" + pathCount, true);\n \t}*/\n }", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1) {\n\n\t}", "public abstract long getTrace();", "public interface Ray3 extends Path3, Serializable, Cloneable {\r\n\r\n /**\r\n * Creates a new ray from 3 coordinates for the origin point and 3 coordinates for the direction vector.\r\n *\r\n * @param xo the x-coordinate of the origin\r\n * @param yo the y-coordinate of the origin\r\n * @param zo the z-coordinate of the origin\r\n * @param xd the x-coordinate of the direction\r\n * @param yd the y-coordinate of the direction\r\n * @param zd the z-coordinate of the direction\r\n * @return a new ray\r\n */\r\n @NotNull\r\n static Ray3 fromOD(double xo, double yo, double zo, double xd, double yd, double zd) {\r\n return new Ray3Impl(xo, yo, zo, xd, yd, zd);\r\n }\r\n\r\n /**\r\n * Creates a new ray from an origin point and a direction vector.\r\n *\r\n * @param origin the origin\r\n * @param dir the direction\r\n * @return a new ray\r\n */\r\n @NotNull\r\n static Ray3 fromOD(Vector3 origin, Vector3 dir) {\r\n return new Ray3Impl(origin, dir);\r\n }\r\n\r\n /**\r\n * Creates a new ray between two points.\r\n * The origin will be a copy of the point {@code from}.\r\n * The directional vector will be a new vector from {@code from} to {@code to}.\r\n *\r\n * @param from the first point\r\n * @param to the second point\r\n * @return a new ray\r\n */\r\n @NotNull\r\n static Ray3 between(Vector3 from, Vector3 to) {\r\n return fromOD(from, Vector3.between(from, to));\r\n }\r\n\r\n /**\r\n * Creates a new ray between two points.\r\n *\r\n * @param ox the origin x\r\n * @param oy the origin x\r\n * @param oz the origin x\r\n * @param tx the target x\r\n * @param ty the target x\r\n * @param tz the target x\r\n * @return a new ray\r\n */\r\n @NotNull\r\n static Ray3 between(double ox, double oy, double oz, double tx, double ty, double tz) {\r\n return fromOD(ox, oy, oz, tx-ox, ty-oy, tz-oz);\r\n }\r\n\r\n // GETTERS\r\n\r\n /**\r\n * Returns the x-coordinate of the origin of this ray.\r\n *\r\n * @return the x-coordinate of the origin of this ray\r\n */\r\n abstract double getOrgX();\r\n\r\n /**\r\n * Returns the y-coordinate of the origin of this ray.\r\n *\r\n * @return the y-coordinate of the origin of this ray\r\n */\r\n abstract double getOrgY();\r\n\r\n /**\r\n * Returns the z-coordinate of the origin of this ray.\r\n *\r\n * @return the z-coordinate of the origin of this ray\r\n */\r\n abstract double getOrgZ();\r\n\r\n /**\r\n * Returns the x-coordinate of the direction of this ray.\r\n *\r\n * @return the x-coordinate of the direction of this ray\r\n */\r\n abstract double getDirX();\r\n\r\n /**\r\n * Returns the y-coordinate of the direction of this ray.\r\n *\r\n * @return the y-coordinate of the direction of this ray\r\n */\r\n abstract double getDirY();\r\n\r\n /**\r\n * Returns the z-coordinate of the direction of this ray.\r\n *\r\n * @return the z-coordinate of the direction of this ray\r\n */\r\n abstract double getDirZ();\r\n\r\n /**\r\n * Returns the length of this ray.\r\n *\r\n * @return the length of this ray\r\n */\r\n abstract double getLength();\r\n\r\n /**\r\n * Returns the squared length of this ray.\r\n *\r\n * @return the squared length of this ray\r\n */\r\n abstract double getLengthSquared();\r\n \r\n /**\r\n * Returns the origin of this ray in a new vector.\r\n *\r\n * @return the origin of this ray in a new vector\r\n */\r\n @Override\r\n default Vector3 getOrigin() {\r\n return Vector3.fromXYZ(getOrgX(), getOrgY(), getOrgZ());\r\n }\r\n \r\n /**\r\n * Returns the direction of this ray in a new vector.\r\n *\r\n * @return the direction of this ray in a new vector\r\n */\r\n default Vector3 getDirection() {\r\n return Vector3.fromXYZ(getDirX(), getDirY(), getDirZ());\r\n }\r\n \r\n default AxisAlignedBB getBoundaries() {\r\n return AxisAlignedBB.between(getOrigin(), getEnd());\r\n }\r\n\r\n // PATH IMPL\r\n \r\n /**\r\n * Returns the end of this ray in a new vector. This is equal to the sum of the origin and direction of the vector.\r\n *\r\n * @return the end of this ray in a new vector\r\n */\r\n @Override\r\n default Vector3 getEnd() {\r\n return Vector3.fromXYZ(getOrgX() + getDirX(), getOrgY() + getDirY(), getOrgZ() + getDirZ());\r\n }\r\n\r\n @Override\r\n default Vector3[] getControlPoints() {\r\n return new Vector3[] {getOrigin(), getEnd()};\r\n }\r\n\r\n // CHECKERS\r\n\r\n /**\r\n * Returns whether the ray is equal to the given point at any point.\r\n *\r\n * @param x the x-coordinate of the point\r\n * @param y the y-coordinate of the point\r\n * @param z the z-coordinate of the point\r\n * @return whether the ray is equal to the given point at any point\r\n */\r\n default boolean contains(double x, double y, double z) {\r\n return Vector3.between(getOrgX(), getOrgY(), getOrgZ(), x, y, z).isMultipleOf(getDirection());\r\n }\r\n\r\n /**\r\n * Returns whether the ray is equal to the given point at any point.\r\n *\r\n * @param point the point\r\n * @return whether the ray is equal to the given point at any point\r\n */\r\n default boolean contains(Vector3 point) {\r\n return contains(point.getX(), point.getY(), point.getZ());\r\n }\r\n\r\n /**\r\n * Returns whether this ray is equal to another ray. This condition is true\r\n * if both origin and direction are equal.\r\n *\r\n * @param ray the ray\r\n * @return whether this ray is equal to the ray\r\n */\r\n default boolean equals(Ray3 ray) {\r\n return\r\n getOrigin().equals(ray.getOrigin()) &&\r\n getDirection().isMultipleOf(ray.getDirection());\r\n }\r\n\r\n // SETTERS\r\n\r\n /**\r\n * Sets the origin of the ray to a given point.\r\n *\r\n * @param x the x-coordinate of the point\r\n * @param y the y-coordinate of the point\r\n * @param z the z-coordinate of the point\r\n */\r\n abstract void setOrigin(double x, double y, double z);\r\n\r\n /**\r\n * Sets the origin of the ray to a given point.\r\n *\r\n * @param point the point\r\n */\r\n default void setOrigin(Vector3 point) {\r\n setOrigin(point.getX(), point.getY(), point.getZ());\r\n }\r\n\r\n /**\r\n * Sets the direction of this ray to a given vector.\r\n *\r\n * @param x the x-coordinate of the vector\r\n * @param y the y-coordinate of the vector\r\n * @param z the z-coordinate of the vector\r\n */\r\n abstract void setDirection(double x, double y, double z);\r\n \r\n /**\r\n * Sets the direction of this ray to a given vector.\r\n *\r\n * @param v the vector\r\n */\r\n default void setDirection(Vector3 v) {\r\n setDirection(v.getX(), v.getY(), v.getZ());\r\n }\r\n\r\n /**\r\n * Sets the length of this ray to a given length.\r\n *\r\n * @param t the new hypot\r\n */\r\n default void setLength(double t) {\r\n scaleDirection(t / getLength());\r\n }\r\n\r\n default void normalize() {\r\n setLength(1);\r\n }\r\n \r\n //TRANSFORMATIONS\r\n \r\n default void scaleOrigin(double x, double y, double z) {\r\n setDirection(getOrgX()*x, getOrgY()*y, getOrgZ()*z);\r\n }\r\n \r\n default void scaleDirection(double x, double y, double z) {\r\n setDirection(getDirX()*x, getDirY()*y, getDirZ()*z);\r\n }\r\n \r\n default void scaleOrigin(double factor) {\r\n scaleOrigin(factor, factor, factor);\r\n }\r\n \r\n default void scaleDirection(double factor) {\r\n scaleDirection(factor, factor, factor);\r\n }\r\n \r\n default void scale(double x, double y, double z) {\r\n scaleOrigin(x, y, z);\r\n scaleDirection(x, y, z);\r\n }\r\n \r\n default void scale(double factor) {\r\n scale(factor, factor, factor);\r\n }\r\n \r\n /**\r\n * Translates the ray origin by a given amount on each axis.\r\n *\r\n * @param x the x-coordinate\r\n * @param y the y-coordinate\r\n * @param z the z-coordinate\r\n */\r\n abstract void translate(double x, double y, double z);\r\n\r\n // MISC\r\n\r\n /**\r\n * <p>\r\n * Returns a new interval iterator for this ray. This iterator will return all points in a given interval that\r\n * are on a ray.\r\n * </p>\r\n * <p>\r\n * For example, a ray with hypot 1 will produce an iterator that iterates over precisely 3 points if the\r\n * interval is 0.5 (or 0.4).\r\n * </p>\r\n * <p>\r\n * To get an iterator that iterates over a specified amount of points {@code x}, make use of\r\n * <blockquote>\r\n * {@code intervalIterator( getLength() / (x - 1) )}\r\n * </blockquote>\r\n * </p>\r\n *\r\n * @param interval the interval of iteration\r\n * @return a new interval iterator\r\n */\r\n default Iterator<Vector3> intervalIterator(double interval) {\r\n return new IntervalIterator(this, interval);\r\n }\r\n\r\n /**\r\n * <p>\r\n * Returns a new interval iterator for this ray. This iterator will return all points in a given interval that\r\n * are on a ray.\r\n * </p>\r\n * <p>\r\n * For example, a ray with hypot 1 will produce an iterator that iterates over precisely 3 points if the\r\n * interval is 0.5 (or 0.4).\r\n * </p>\r\n * <p>\r\n * To get an iterator that iterates over a specified amount of points {@code x}, make use of\r\n * <blockquote>\r\n * {@code intervalIterator( getLength() / (x - 1) )}\r\n * </blockquote>\r\n * </p>\r\n *\r\n * @return a new interval iterator\r\n */\r\n default Iterator<BlockVector> blockIntervalIterator() {\r\n return new BlockIntervalIterator(this);\r\n }\r\n\r\n /**\r\n * Returns a given amount of equally distributed points on this ray.\r\n *\r\n * @param amount the amount\r\n * @return an array containing points on this ray\r\n */\r\n @Override\r\n default Vector3[] getPoints(int amount) {\r\n if (amount < 0) throw new IllegalArgumentException(\"amount < 0\");\r\n if (amount == 0) return new Vector3[0];\r\n if (amount == 1) return new Vector3[] {getOrigin()};\r\n if (amount == 2) return new Vector3[] {getOrigin(), getEnd()};\r\n\r\n int t = amount - 1, i = 0;\r\n Vector3[] result = new Vector3[amount];\r\n\r\n Iterator<Vector3> iter = intervalIterator(getLengthSquared() / t*t);\r\n while (iter.hasNext())\r\n result[i++] = iter.next();\r\n\r\n return result;\r\n }\r\n\r\n abstract Ray3 clone();\r\n\r\n}", "protected synchronized void processRay (int iIndex, int rayTraceStepSize) {\r\n\r\n // Compute the number of steps to use given the step size of the ray.\r\n // The number of steps is proportional to the length of the line segment.\r\n m_kPDiff.sub(m_kP1, m_kP0);\r\n float fLength = m_kPDiff.length();\r\n int iSteps = (int)(1.0f/rayTraceStepSize * fLength);\r\n\r\n // find the maximum value along the ray\r\n if ( iSteps > 1 )\r\n {\r\n int iMaxIntensityColor = getBackgroundColor().getRGB();\r\n float fMax = -1.0f;\r\n boolean bHitModel = false;\r\n float fTStep = 1.0f/iSteps;\r\n for (int i = 1; i < iSteps; i++)\r\n {\r\n m_kP.scaleAdd(i*fTStep, m_kPDiff, m_kP0);\r\n if (interpolate(m_kP, m_acImageA) > 0) {\r\n bHitModel = true;\r\n float fValue = interpolate(m_kP, m_acImageI);\r\n if (fValue > fMax) {\r\n fMax = fValue;\r\n iMaxIntensityColor = interpolateColor(m_kP);\r\n }\r\n }\r\n }\r\n\r\n if (bHitModel) {\r\n m_aiRImage[iIndex] = iMaxIntensityColor;\r\n }\r\n }\r\n }", "@Override\n\tpublic void traceExit() {\n\n\t}", "Reflexion(final Ray ray, final Raytracer tracer){\n\t\tthis.ray = ray;\n\t\tthis.tracer = tracer;\n\t}", "@Action\n public void addRay() {\n Point2D p1 = randomPoint(), p2 = randomPoint();\n TwoPointGraphic ag = new TwoPointGraphic(p1, p2, MarkerRenderer.getInstance());\n MarkerRendererToClip rend = new MarkerRendererToClip();\n rend.setRayRenderer(new ArrowPathRenderer(ArrowLocation.END));\n ag.getStartGraphic().setRenderer(rend);\n ag.setDefaultTooltip(\"<html><b>Ray</b>: <i>\" + p1 + \", \" + p2 + \"</i>\");\n ag.setDragEnabled(true);\n root1.addGraphic(ag); \n }", "@Override\n\tpublic void trace(Marker marker, Message msg) {\n\n\t}", "public MovingObjectPosition rayTrace(World world, float rotationYaw, float rotationPitch, boolean collisionFlag, double reachDistance)\n {\n // Somehow this destroys the playerPosition vector -.-\n MovingObjectPosition pickedBlock = this.rayTraceBlocks(world, rotationYaw, rotationPitch, collisionFlag, reachDistance);\n MovingObjectPosition pickedEntity = this.rayTraceEntities(world, rotationYaw, rotationPitch, reachDistance);\n\n if (pickedBlock == null)\n {\n return pickedEntity;\n }\n else if (pickedEntity == null)\n {\n return pickedBlock;\n }\n else\n {\n double dBlock = this.distance(new Vector3(pickedBlock.hitVec));\n double dEntity = this.distance(new Vector3(pickedEntity.hitVec));\n\n if (dEntity < dBlock)\n {\n return pickedEntity;\n }\n else\n {\n return pickedBlock;\n }\n }\n }", "public RayTracerBasic(Scene scene)\r\n\t{\r\n\t\tsuper(scene);\r\n\t}", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2) {\n\n\t}", "@Override\n\tpublic void analyzing(DependencyFrame rFrame) {\n\t\t\n\t}", "@Override\r\n\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\r\n\t}", "@Override\n\tpublic void outAMethodCallExpr(AMethodCallExpr node){\n\t\tString methodName = node.getId().getText();\n\t\tType targetType = nodeTypes.get(node.getTarget());\n\t\tboxIt(targetType); \n\t\tClassAttributes targetClass = topLevelSymbolTable.get(targetType.getTypeName());\n\t\tMethodAttributes methodAttributes = targetClass.getMethod(methodName);\n\t\tif (!(node.getTarget() instanceof ASuperExpr)){\n\t\t\til.append(fi.createInvoke(targetType.getTypeName(), methodName, getBecelType(methodAttributes.getReturnType()), getBecelType(methodAttributes.getParameterTypes()) , Constants.INVOKEVIRTUAL));\n\t\t}\n\t\telse {\n\t\t\til.append(fi.createInvoke(targetType.getTypeName(), methodName, getBecelType(methodAttributes.getReturnType()), getBecelType(methodAttributes.getParameterTypes()), Constants.INVOKESPECIAL)); \n\t\t}\n\t\tunboxIt(methodAttributes.getReturnType()); \n\t}", "@Override\n public ResponseReflectingOption adjustResponseReflecting() {\n return responseReflectingOption;\n }", "@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 }", "@Override\n\t\tpublic void onGetDrivingRouteResult(DrivingRouteResult drivingrouteresult) {\n\t\t\tnearby_baidumap.clear();// 清除图层覆盖物\n\t\t\tN_showdatainfotv.setText(\"\");\n\t\t\tSB.delete(0, SB.length());\n\t\t\tif (drivingrouteresult == null || drivingrouteresult.error != SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tToastUtil.CreateToastShow(navigation, null, \"温馨提示\", \"没有找到合适的路线\");\n\t\t\t}\n\t\t\tif (drivingrouteresult.error == SearchResult.ERRORNO.AMBIGUOUS_ROURE_ADDR) {\n\t\t\t\t// 起终点或途经点地址有岐义,通过以下接口获取建议查询信息\n\t\t\t\t// result.getSuggestAddrInfo()\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (drivingrouteresult.error == SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tN_routeline = drivingrouteresult.getRouteLines().get(0);// 第一方案\n\t\t\t\tSB.append(\"起点\\t\\t\" + N_currentaddress).append(\"\\t\\t\\t----\\t\\t\\t\").append(\"终点\\t\\t\" + N_targetaddress)\n\t\t\t\t\t\t.append(\"\\n\\n\");\n\t\t\t\tfor (int i = 0; i < N_routeline.getAllStep().size(); i++) {\n\n\t\t\t\t\tDrivingRouteLine.DrivingStep step = (DrivingStep) N_routeline.getAllStep().get(i);\n\n\t\t\t\t\tSB.append(i + \"\\t在\\t:\" + step.getEntranceInstructions() + \"\\t\\t\\t\")\n\t\t\t\t\t\t\t.append(i + \"\\t在\\t:\" + step.getExitInstructions() + \"\\t\\t\\t\");\n\t\t\t\t}\n\t\t\t\tN_showdatainfotv.setText(SB);\n\t\t\t\tDrivingOverlayUtil drivingoverlayutil = new DrivingOverlayUtil(nearby_baidumap, navigation);\n\t\t\t\tdrivingoverlayutil.setData(drivingrouteresult.getRouteLines().get(0));\n\t\t\t\tdrivingoverlayutil.addToMap();\n\t\t\t\tdrivingoverlayutil.zoomToSpan();\n\n\t\t\t}\n\n\t\t}", "private void processTraceForTraceExplorer()\r\n {\r\n // retrieve the error with a trace for which the trace explorer was run\r\n final TLCError originalErrorWithTrace = TraceExplorerHelper.getErrorOfOriginalTrace(getModel());\r\n if (originalErrorWithTrace == null)\r\n {\r\n // the trace explorer is meaningless if the original trace cannot be recovered\r\n // all errors should be cleared\r\n getErrors().clear();\r\n return;\r\n }\r\n\r\n /*\r\n * The following will point to the error containing the trace for the\r\n * run of the trace explorer, iff the run of the trace explorer was successful.\r\n * The run was successful if TLC was able to evaluate the trace explorer\r\n * expressions at every possible state of the original trace.\r\n * \r\n * The value of successfulTEError is set in the following while loop, if the\r\n * run was successful.\r\n */\r\n TLCError successfulTEError = null;\r\n\r\n final Map<String, Formula> traceExplorerExpressions = getModel().getNamedTraceExplorerExpressionsAsFormula();\r\n \r\n // retrieve the original trace\r\n // this is necessary for items (3) and (5) from the list in the\r\n // documentation for this method\r\n List<TLCState> originalTrace = originalErrorWithTrace.getStates(Length.ALL);\r\n Assert.isNotNull(originalTrace, \"Could not get original trace after running trace explorer. This is a bug.\");\r\n\r\n // iterate through the errors to find one with a trace\r\n Iterator<TLCError> it = getErrors().iterator();\r\n while (it.hasNext())\r\n {\r\n TLCError error = it.next();\r\n\r\n if (error.hasTrace())\r\n {\r\n // Set the message, cause, and code of the error to the message of the original\r\n // error for which the trace explorer was run if the new error\r\n // message is for an invariant or property violation or deadlock. An invariant\r\n // or property violation or deadlock indicates that the trace explorer ran\r\n // successfully. This is item (6).\r\n int errorCode = error.getErrorCode();\r\n if (errorCode == EC.TLC_DEADLOCK_REACHED || errorCode == EC.TLC_TEMPORAL_PROPERTY_VIOLATED\r\n || errorCode == EC.TLC_INVARIANT_VIOLATED_BEHAVIOR\r\n || errorCode == EC.TLC_INVARIANT_VIOLATED_INITIAL)\r\n {\r\n error.setErrorCode(originalErrorWithTrace.getErrorCode());\r\n error.setMessage(originalErrorWithTrace.getMessage());\r\n error.setCause(originalErrorWithTrace.getCause());\r\n\r\n successfulTEError = error;\r\n } else\r\n {\r\n error.setMessage(TE_ERROR_HEADER + error.getMessage());\r\n }\r\n \r\n // a comparator used for sorting the variables within each\r\n // state so that the variables representing the trace explorer\r\n // expressions appear first in each state\r\n final Comparator<TLCVariable> varComparator = new Comparator<TLCVariable>() {\r\n\r\n public int compare(TLCVariable var0, TLCVariable var1)\r\n {\r\n if ((var0.isTraceExplorerVar() && var1.isTraceExplorerVar())\r\n || (!var0.isTraceExplorerVar() && !var1.isTraceExplorerVar()))\r\n {\r\n // both represent TE expressions or neither does\r\n // use string comparison to make sure\r\n // that the variables appear in the same order\r\n // in every state\r\n return var0.getName().compareTo(var1.getName());\r\n } else if (var0.isTraceExplorerVar())\r\n {\r\n // var0 should appear before\r\n return -1;\r\n } else\r\n {\r\n // var1 represents TE expression, so it should appear before\r\n return 1;\r\n }\r\n }\r\n };\r\n\r\n // found an error with a trace\r\n\r\n // this is the trace produced by the run\r\n // of TLC for the trace explorer\r\n List<TLCState> newTrace = error.getStates();\r\n\r\n Iterator<TLCState> newTraceIt = newTrace.iterator();\r\n Iterator<TLCState> originalTraceIt = originalTrace.iterator();\r\n\r\n TLCState currentStateNewTrace = newTraceIt.next();\r\n TLCState nextStateNewTrace = null;\r\n\r\n TLCState currentStateOriginalTrace = originalTraceIt.next();\r\n\r\n /*\r\n * The following while loop performs items 1-4 for some of the states.\r\n * In particular, if the original trace has n states and the trace produced\r\n * by the trace explorer has m states, this loop performs\r\n * items 1-4 for states 1 through min(n-1, m-1). The trace produced by the\r\n * trace explorer can be shorter than the original trace if there is a TLC error\r\n * during evaluation of one of the states. The trace produced by the trace explorer\r\n * can be longer than the original trace as in the example of item 5.\r\n * \r\n * The final state of the trace produced by the trace explorer is processed\r\n * after this loop. Item 5 is also accomplished after this loop.\r\n */\r\n while (newTraceIt.hasNext() && originalTraceIt.hasNext())\r\n {\r\n\r\n // change the label of the state of newTrace to the label of the state\r\n // of the original trace\r\n currentStateNewTrace.setLabel(currentStateOriginalTrace.getLabel());\r\n\r\n // set the location of the current state of the new trace\r\n currentStateNewTrace.setLocation(currentStateOriginalTrace.getModuleLocation());\r\n\r\n // need to get the next state in order to perform any\r\n // shifting of expression values (item 2 in the documentation)\r\n nextStateNewTrace = (TLCState) newTraceIt.next();\r\n\r\n TLCVariable[] currentStateNewTraceVariables = currentStateNewTrace.getVariables();\r\n TLCVariable[] nextStateNewTraceVariables = nextStateNewTrace.getVariables();\r\n\r\n // iterate through the variables\r\n for (int i = 0; i < currentStateNewTraceVariables.length; i++)\r\n {\r\n // This code assumes that the variables are in the same order in each state\r\n String variableName = currentStateNewTraceVariables[i].getName();\r\n // if next state is back to state or stuttering, it has no variables, so the code\r\n // contained within the if block would cause an NPE\r\n if (!nextStateNewTrace.isBackToState() && !nextStateNewTrace.isStuttering())\r\n {\r\n Assert.isTrue(variableName.equals(nextStateNewTraceVariables[i].getName()),\r\n \"Variables are not in the same order in each state. This is unexpected.\");\r\n }\r\n\r\n // retrieve the object containing the data corresponding to the variable.\r\n // this object will be null if the variable currently being looked at does\r\n // not represent a trace explorer expression\r\n // If the variable does represent a trace explorer expression, then the following\r\n // object will contain the variable name, the expression, and the level of the expression\r\n TraceExpressionInformationHolder traceExpressionData = traceExpressionDataTable\r\n .get(variableName.trim());\r\n\r\n if (traceExpressionData != null)\r\n {\r\n // we have located a trace expression variable\r\n\r\n // If next state is back to state or stuttering, it has no variables, so the\r\n // code contained within this if block would not apply. It should be unnecessary\r\n // to check for this because the while loop should terminate before this happens.\r\n if (!nextStateNewTrace.isBackToState() && !nextStateNewTrace.isStuttering()\r\n && traceExpressionData.getLevel() == 2)\r\n {\r\n // found expression with primed variables\r\n // shift the value from the next state to the current state\r\n currentStateNewTraceVariables[i].setValue(nextStateNewTraceVariables[i].getValue());\r\n\r\n }\r\n\r\n // set the name to be the expression the variable represents\r\n currentStateNewTraceVariables[i].setName(traceExpressionData.getExpression());\r\n\r\n // flag this as a variable representing a trace explorer expression\r\n currentStateNewTraceVariables[i].setTraceExplorerVar(true);\r\n\r\n continue;\r\n }\r\n \r\n if (traceExplorerExpressions.containsKey(variableName.trim())) {\r\n \tcurrentStateNewTraceVariables[i].setTraceExplorerVar(true);\r\n }\r\n }\r\n\r\n // sort the variables so that the variables representing trace explorer\r\n // expressions appear first\r\n Arrays.sort(currentStateNewTraceVariables, varComparator);\r\n\r\n currentStateNewTrace = nextStateNewTrace;\r\n\r\n currentStateOriginalTrace = originalTraceIt.next();\r\n }\r\n\r\n /*\r\n * Remove any extra states (item 5).\r\n * \r\n * This is only necessary for looping or stuttering traces\r\n * (n elements in original trace, m elements in new trace)-\r\n * if (m >= n) remove states n..m\r\n * else do nothing\r\n * \r\n * if (m >= n), the new trace will be left with n-1 elements.\r\n * Later code adds the final stuttering or \"back to state\" state\r\n * to these traces.\r\n * \r\n * There should never be extra states for non-looping, non-stuttering\r\n * traces.\r\n */\r\n if ((currentStateOriginalTrace.isBackToState() || currentStateOriginalTrace.isStuttering())\r\n && newTrace.size() >= originalTrace.size())\r\n {\r\n newTrace.subList(originalTrace.size() - 1, newTrace.size()).clear();\r\n }\r\n\r\n error.restrictTraceTo(originalErrorWithTrace.getTraceRestriction());\r\n\r\n // new trace should now be no longer than the original trace\r\n Assert.isTrue(newTrace.size() <= originalTrace.size(),\r\n \"States from trace explorer trace not removed properly.\");\r\n\r\n // fix the final state\r\n TLCState finalStateOriginalTrace = (TLCState) originalTrace.get(originalTrace.size() - 1);\r\n\r\n if (newTrace.size() < originalTrace.size() - 1\r\n || (!finalStateOriginalTrace.isStuttering() && !finalStateOriginalTrace.isBackToState()))\r\n {\r\n /*\r\n * For a non-looping and non-stuttering state, just set the expressions\r\n * with primed variables equal to \"--\" for the last state.\r\n * \r\n * Do the same thing if the new trace is less than the original trace size minus 1.\r\n * This means there was a TLC error before evaluating all of the states, so\r\n * even if the original trace finished with a looping state or a stuttering state, the\r\n * trace that is displayed to the user should not. It should terminate before the TLC error\r\n * occurred.\r\n */\r\n\r\n TLCState finalStateNewTrace = (TLCState) newTrace.get(newTrace.size() - 1);\r\n\r\n // state in the original trace at the same position as finalStateNewTrace\r\n TLCState samePositionOriginalTrace = (TLCState) originalTrace.get(newTrace.size() - 1);\r\n\r\n // set the label of the final state of the new trace\r\n finalStateNewTrace.setLabel(samePositionOriginalTrace.getLabel());\r\n\r\n // set the location of the final state of the new trace\r\n finalStateNewTrace.setLocation(samePositionOriginalTrace.getModuleLocation());\r\n\r\n TLCVariable[] finalStateNewTraceVariables = finalStateNewTrace.getVariables();\r\n\r\n // iterate through the variables\r\n for (int i = 0; i < finalStateNewTraceVariables.length; i++)\r\n {\r\n\r\n TraceExpressionInformationHolder traceExpressionData = traceExpressionDataTable\r\n .get(finalStateNewTraceVariables[i].getName().trim());\r\n\r\n if (traceExpressionData != null)\r\n {\r\n // we have located a trace expression variable\r\n\r\n if (traceExpressionData.getLevel() == 2)\r\n {\r\n // expression with primed variables\r\n // shift the value from the next state to the current state\r\n finalStateNewTraceVariables[i].setValue(TLCVariableValue.parseValue(\"\\\"--\\\"\"));\r\n }\r\n\r\n // set the name to be the expression the variable represents\r\n finalStateNewTraceVariables[i].setName(traceExpressionData.getExpression());\r\n // flag this as a variable representing a trace explorer expression\r\n finalStateNewTraceVariables[i].setTraceExplorerVar(true);\r\n }\r\n }\r\n\r\n // sort the variables of the final state\r\n Arrays.sort(finalStateNewTraceVariables, varComparator);\r\n } else if (finalStateOriginalTrace.isBackToState())\r\n {\r\n\t\t\t\t\terror.addState(TLCState.BACK_TO_STATE(finalStateOriginalTrace.getStateNumber(),\r\n\t\t\t\t\t\t\tgetModel().getName()), stateSortDirection);\r\n } else\r\n {\r\n // stuttering trace\r\n\t\t\t\t\terror.addState(TLCState.STUTTERING_STATE(finalStateOriginalTrace.getStateNumber(),\r\n\t\t\t\t\t\t\tgetModel().getName()), stateSortDirection);\r\n }\r\n\r\n } else\r\n {\r\n // error does not have trace\r\n // indicate that it is an error from the trace explorer\r\n error.setMessage(TE_ERROR_HEADER + error.getMessage());\r\n }\r\n }\r\n\r\n /*\r\n * The following accomplishes item 7 from the above documentation.\r\n */\r\n if (successfulTEError != null)\r\n {\r\n List<TLCError> originalErrors = TLCOutputSourceRegistry.getModelCheckSourceRegistry().getProvider(getModel())\r\n .getErrors();\r\n List<TLCError> newErrors = new LinkedList<TLCError>();\r\n Iterator<TLCError> iterator = originalErrors.iterator();\r\n while (iterator.hasNext())\r\n {\r\n TLCError next = iterator.next();\r\n if (next == originalErrorWithTrace)\r\n {\r\n newErrors.add(successfulTEError);\r\n } else\r\n {\r\n newErrors.add(next);\r\n }\r\n }\r\n\r\n setErrors(newErrors);\r\n }\r\n\r\n }", "protected abstract void trace_end_run();", "@Override\n\tpublic void trace(String message, Object p0) {\n\n\t}", "@Override\r\n\tpublic void render(float[] mtrxProjectionAndView) {\n\t\t\r\n\t}", "public XnRegion sharedRegion(TracePosition trace) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9681:OrglRoot methodsFor: 'accessing'!\n{XnRegion} sharedRegion: trace {TracePosition}\n\t\"Return a region for all the stuff in this orgl that can backfollow to trace.\"\n\tself subclassResponsibility!\n*/\n}", "@Override\n\tpublic void trace(Marker marker, Message msg, Throwable t) {\n\n\t}", "@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 /* varargs */ void sendViewUpdateEvent(BaseFastViewFinder.ViewUpdateEvent viewUpdateEvent, Object ... arrobject) {\n switch (.$SwitchMap$com$sonyericsson$android$camera$fastcapturing$view$BaseFastViewFinder$ViewUpdateEvent[viewUpdateEvent.ordinal()]) {\n default: {\n return;\n }\n case 1: {\n super.setupHeadUpDisplay((BaseFastViewFinder.HeadUpDisplaySetupState)arrobject[0]);\n return;\n }\n case 2: {\n if (this.mActivity == null) return;\n if (this.mCameraDevice == null) return;\n if (this.mCameraDevice.getPreviewRect() == null) return;\n Rect rect = LayoutDependencyResolver.getSurfaceRect((Activity)this.mActivity, (float)this.mCameraDevice.getPreviewRect().width() / (float)this.mCameraDevice.getPreviewRect().height());\n int n = rect.width();\n int n2 = rect.height();\n Rect rect2 = new Rect(0, 0, this.mSurfaceView.getWidth(), this.mSurfaceView.getHeight());\n if (FastViewFinder.isNearSameSize(rect, rect2)) return;\n super.resizeEvfScope(n, n2);\n return;\n }\n case 3: {\n if (this.mSurfaceBlinderView == null) return;\n if (this.mSurfaceBlinderView.getVisibility() == 0) return;\n this.getBaseLayout().getPreviewOverlayContainer().addView(this.mSurfaceBlinderView);\n this.mSurfaceBlinderView.setVisibility(0);\n return;\n }\n case 4: {\n if (this.mSurfaceBlinderView == null) return;\n if (this.mSurfaceBlinderView.getVisibility() != 0) return;\n this.mSurfaceBlinderView.setVisibility(4);\n this.getBaseLayout().getPreviewOverlayContainer().removeView(this.mSurfaceBlinderView);\n return;\n }\n case 5: {\n if (this.getBaseLayout().getLowMemoryIndicator() == null) return;\n this.getBaseLayout().getLowMemoryIndicator().set(false);\n return;\n }\n case 6: {\n if (this.getBaseLayout().getLowMemoryIndicator() == null) return;\n this.getBaseLayout().getLowMemoryIndicator().set(true);\n return;\n }\n case 7: {\n if (this.getBaseLayout().getRecordingIndicator() == null) return;\n if (!((Boolean)arrobject[1]).booleanValue()) {\n this.getBaseLayout().getRecordingIndicator().setSequenceMode(true);\n }\n this.getBaseLayout().getRecordingIndicator().setConstraint((Boolean)arrobject[1]);\n this.getBaseLayout().getRecordingIndicator().prepareBeforeRecording((Integer)arrobject[0], (Boolean)arrobject[2]);\n return;\n }\n case 8: {\n super.onCameraModeChangedTo((Integer)arrobject[0]);\n return;\n }\n case 9: {\n super.onSceneModeChanged((CameraExtension.SceneRecognitionResult)arrobject[0]);\n return;\n }\n case 10: {\n this.mFocusRectangles.startFaceDetection();\n return;\n }\n case 11: {\n CameraExtension.FaceDetectionResult faceDetectionResult = (CameraExtension.FaceDetectionResult)arrobject[0];\n if (this.mIsFaceDetectionIdSupported == null) {\n if (!faceDetectionResult.extFaceList.isEmpty()) {\n this.mIsFaceDetectionIdSupported = FaceDetectUtil.hasValidFaceId(faceDetectionResult);\n }\n } else if (!this.mIsFaceDetectionIdSupported.booleanValue()) {\n FaceDetectUtil.setUuidFaceDetectionResult(faceDetectionResult);\n }\n super.onFaceDetected(faceDetectionResult);\n return;\n }\n case 12: {\n super.onFaceNameDetected((List)arrobject[0]);\n return;\n }\n case 13: {\n this.mFocusRectangles.startObjectTracking();\n return;\n }\n case 14: {\n super.onTrackedObjectStateUpdated((CameraExtension.ObjectTrackingResult)arrobject[0]);\n return;\n }\n case 15: {\n Camera.Parameters parameters = this.mStateMachine.getCurrentCameraParameters(false);\n int n = parameters == null ? 0 : parameters.getMaxZoom();\n int n3 = (Integer)arrobject[0];\n int n4 = this.mCameraDevice.getMaxSuperResolutionZoom();\n boolean bl = PlatformDependencyResolver.isSuperResolutionZoomSupported(parameters);\n Zoombar zoombar = this.getBaseLayout().getZoomBar();\n if (zoombar == null) return;\n if (bl && !this.mStateMachine.isInModeLessRecording()) {\n zoombar.updateZoombarType(Zoombar.Type.PARTIAL_SUPER_RESOLUTION);\n } else {\n zoombar.updateZoombarType(Zoombar.Type.NORMAL);\n }\n this.onZoomChanged(n3, n, n4);\n return;\n }\n case 16: {\n super.cancelSelfTimerCountDownView();\n return;\n }\n case 17: {\n super.setCount((Integer)arrobject[0]);\n return;\n }\n case 18: {\n Point point = (Point)arrobject[0];\n FocusRectangles.FocusSetType focusSetType = (FocusRectangles.FocusSetType)arrobject[1];\n this.mFocusRectangles.setFocusPosition(point, focusSetType);\n if (focusSetType != FocusRectangles.FocusSetType.FIRST) return;\n if (this.mCapturingMode.isFront()) return;\n this.mFocusRectangles.onAutoFocusStarted();\n return;\n }\n case 19: {\n this.mFocusRectangles.clearAllFocus();\n return;\n }\n case 20: {\n this.mFocusRectangles.clearAllFocusExceptFace();\n return;\n }\n case 21: {\n if (this.getBaseLayout().getRecordingIndicator() == null) return;\n this.getBaseLayout().getRecordingIndicator().updateRecordingTime((Integer)arrobject[0]);\n this.getBaseLayout().getOnScreenButtonGroup().restartAnimation();\n return;\n }\n case 22: {\n this.setOrientation((Integer)arrobject[0]);\n return;\n }\n case 23: {\n if (this.mCapturingMode.isFront()) return;\n this.mFocusRectangles.onAutoFocusCanceled();\n return;\n }\n case 24: {\n super.updateUiComponent(BaseFastViewFinder.UiComponentKind.SETTING_DIALOG);\n return;\n }\n case 25: {\n super.closeCurrentDisplayingUiComponent();\n return;\n }\n case 26: {\n StoreDataResult storeDataResult = (StoreDataResult)arrobject[0];\n this.openReviewWindow(storeDataResult.uri, storeDataResult.savingRequest);\n return;\n }\n case 27: {\n SavingRequest savingRequest = (SavingRequest)arrobject[1];\n String string = savingRequest.common.mimeType;\n AutoReviewWindow autoReviewWindow = this.mAutoReview;\n Uri uri = null;\n if (autoReviewWindow != null && (uri = this.mAutoReview.getUri()) != null) {\n AutoReviewWindow.launchAlbum((Activity)this.mActivity, uri, string);\n return;\n }\n if (string != \"video/mp4\" && string != \"video/3gpp\") {\n super.openInstantViewer((byte[])arrobject[0], null, savingRequest);\n return;\n }\n super.openInstantViewer(null, (String)arrobject[0], savingRequest);\n return;\n }\n case 28: {\n if (this.mAutoReview != null && this.mAutoReview.getUri() == null) {\n this.mAutoReview.setUri((Uri)arrobject[0]);\n }\n if (this.mAutoReview == null) return;\n if (!this.mIsInstantViewerOpened) return;\n this.mAutoReview.showRightIcons(Boolean.valueOf((boolean)true));\n return;\n }\n case 29: {\n this.startCaptureFeedbackAnimation();\n return;\n }\n case 30: {\n super.setEarlyThumbnailView((View)arrobject[0]);\n return;\n }\n case 31: {\n this.removeEarlyThumbnailView();\n return;\n }\n case 32: {\n int n = (Integer)arrobject[0];\n if (arrobject.length > 1) {\n this.startEarlyThumbnailInsertAnimation(n, (Animation.AnimationListener)arrobject[1]);\n return;\n }\n super.startEarlyThumbnailInsertAnimation(n);\n return;\n }\n case 33: {\n super.addCountUpView((Integer)arrobject[0]);\n return;\n }\n case 34: {\n super.removeCountUpView((Integer)arrobject[0]);\n return;\n }\n case 35: {\n super.onLazyInitializationTaskRun();\n return;\n }\n case 36: {\n super.addVideoChapter((ChapterThumbnail)arrobject[0]);\n return;\n }\n case 37: {\n this.onNotifyThermalStatus(false);\n return;\n }\n case 38: \n }\n this.onNotifyThermalStatus(true);\n }", "public ArrayList<Content> plotTrackNetTravel(int timestart, int timeend, ArrayList<TrajectoryObj> tList, ArrayList<Point3f> ref){\r\n\t\tint j = 0;\r\n\t\tArrayList<Double> \t\t\t\tdispA = new ArrayList<Double>(); //displacements array\r\n\t\tArrayList<ArrayList<Point3f>>\tvecs = new ArrayList<ArrayList<Point3f>>();\r\n\t\tPoint3f spoint, epoint;\t// start and end point of a track\t\r\n\t\tVector3D sev;\r\n\t\tdouble displacement;\r\n\t\tfor (TrajectoryObj curtraj : tList)\t{\r\n\t\t\tArrayList<Point3f> cvec = new ArrayList<Point3f>();\r\n\t\t\tspoint = curtraj.dotList.get(0);\r\n\t\t\tepoint = curtraj.dotList.get(curtraj.dotList.size()-1);\r\n\t\t\t\r\n\t\t\tDispVec dispV = calcNetDisp2Ref(spoint, epoint, ref);\r\n\t\t\t//this should be replaced with srv or dv\r\n\t\t\t//sev = new Vector3D(epoint.x - spoint.x, epoint.y - spoint.y, epoint.z - spoint.z); \r\n\t\t\tdisplacement = calcDisplacement(dispV);\r\n\t\t\tdispA.add(displacement);\r\n\t\t\t//if (j == 0) IJ.log(\"id\\t\" + \"theta\\t\" + \"CosTheta\\t\" + \"displacement\");\r\n\t\t\t//IJ.log(\"\" +j + \"\\t\" + theta + \"\\t\" + Math.cos(theta) + \"\\t\" + displacement);\r\n\t\t\tcvec.add(spoint);\r\n\t\t\tcvec.add(epoint);\r\n\t\t\tvecs.add(cvec);\r\n\t\t\tj++;\r\n\t\t\t\t\r\n\t\t}\r\n\t\tCustomMultiMesh clmmProLine = new CustomMultiMesh();\r\n\t\tdouble maxdisp = maxOfDisplacements(dispA);\r\n\t\tfor (j = 0; j < vecs.size(); j++){\t\t\t\r\n\t\t\tCustomLineMesh clm = new CustomLineMesh(vecs.get(j), CustomLineMesh.CONTINUOUS, colorCodeDisplacements(dispA.get(j), maxdisp), 0);\r\n\t\t\tclmmProLine.add(clm);\r\n\t\t\tclm.setLineWidth(2);\r\n\t\t}\r\n\t\tContent cc = ContentCreator.createContent(clmmProLine, \"NetTravelss\", 0);\t\r\n\t\tContent startpoint_spheres = createStartPointSphereContent(timestart, tList);\r\n\t\tlockCurrentContents(univ);\r\n\t\t\r\n\t\tArrayList<Content> packedcontents = new ArrayList<Content>(); //for packaging contents\r\n\t\tpackedcontents.add(cc);\r\n\t\tpackedcontents.add(startpoint_spheres);\r\n\t\treturn packedcontents;\r\n\t\t\r\n\t}", "@Override\r\n\tpublic String toString(\r\n\t) {\r\n\t\treturn( \"Ray: \" + mDirection + \", Origin: \" + mOrigin );\r\n\t}", "@Override\r\n\tpublic void increaseViewcnt(int r_idx) {\n\r\n\t}", "@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 }", "@Override\n\tpublic void trace(Message msg) {\n\n\t}", "void visit(TraceCell tc);", "public net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse getDirectAreaInfo(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfo getDirectAreaInfo16)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getDirectAreaInfoRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDirectAreaInfo16,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectAreaInfo\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectAreaInfo\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public boolean isXray();", "@Override\n\tpublic void trace(Marker marker, String message, Object... params) {\n\n\t}", "public abstract void recolocarHitbox();", "public final void a(@org.jetbrains.annotations.NotNull android.view.View r10) {\n /*\n r9 = this;\n r7 = 1\n java.lang.Object[] r0 = new java.lang.Object[r7]\n r8 = 0\n r0[r8] = r10\n com.meituan.robust.ChangeQuickRedirect r2 = f46777a\n java.lang.Class[] r5 = new java.lang.Class[r7]\n java.lang.Class<android.view.View> r1 = android.view.View.class\n r5[r8] = r1\n java.lang.Class r6 = java.lang.Void.TYPE\n r3 = 0\n r4 = 43457(0xa9c1, float:6.0896E-41)\n r1 = r9\n boolean r0 = com.meituan.robust.PatchProxy.isSupport(r0, r1, r2, r3, r4, r5, r6)\n if (r0 == 0) goto L_0x0032\n java.lang.Object[] r0 = new java.lang.Object[r7]\n r0[r8] = r10\n com.meituan.robust.ChangeQuickRedirect r2 = f46777a\n r3 = 0\n r4 = 43457(0xa9c1, float:6.0896E-41)\n java.lang.Class[] r5 = new java.lang.Class[r7]\n java.lang.Class<android.view.View> r1 = android.view.View.class\n r5[r8] = r1\n java.lang.Class r6 = java.lang.Void.TYPE\n r1 = r9\n com.meituan.robust.PatchProxy.accessDispatch(r0, r1, r2, r3, r4, r5, r6)\n return\n L_0x0032:\n java.lang.String r0 = \"v\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r10, r0)\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r9.f46788f\n if (r0 == 0) goto L_0x0044\n boolean r0 = r0.isCollected()\n if (r0 != r7) goto L_0x0044\n java.lang.String r0 = \"cancel_favourite_video\"\n goto L_0x0046\n L_0x0044:\n java.lang.String r0 = \"favourite_video\"\n L_0x0046:\n com.ss.android.ugc.aweme.app.d.d r1 = com.ss.android.ugc.aweme.app.d.d.a()\n java.lang.String r2 = \"enter_from\"\n java.lang.String r3 = r9.g\n com.ss.android.ugc.aweme.app.d.d r1 = r1.a((java.lang.String) r2, (java.lang.String) r3)\n java.lang.String r2 = \"group_id\"\n com.ss.android.ugc.aweme.feed.model.Aweme r3 = r9.f46788f\n r4 = 0\n if (r3 == 0) goto L_0x005e\n java.lang.String r3 = r3.getAid()\n goto L_0x005f\n L_0x005e:\n r3 = r4\n L_0x005f:\n com.ss.android.ugc.aweme.app.d.d r1 = r1.a((java.lang.String) r2, (java.lang.String) r3)\n java.lang.String r2 = \"author_id\"\n com.ss.android.ugc.aweme.feed.model.Aweme r3 = r9.f46788f\n if (r3 == 0) goto L_0x006d\n java.lang.String r4 = r3.getAuthorUid()\n L_0x006d:\n com.ss.android.ugc.aweme.app.d.d r1 = r1.a((java.lang.String) r2, (java.lang.String) r4)\n java.lang.String r2 = \"log_pb\"\n com.ss.android.ugc.aweme.feed.ai r3 = com.ss.android.ugc.aweme.feed.ai.a()\n com.ss.android.ugc.aweme.feed.model.Aweme r4 = r9.f46788f\n java.lang.String r4 = com.ss.android.ugc.aweme.u.aa.c((com.ss.android.ugc.aweme.feed.model.Aweme) r4)\n java.lang.String r3 = r3.a((java.lang.String) r4)\n com.ss.android.ugc.aweme.app.d.d r1 = r1.a((java.lang.String) r2, (java.lang.String) r3)\n java.lang.String r2 = \"enter_method\"\n java.lang.String r3 = \"long_press\"\n com.ss.android.ugc.aweme.app.d.d r1 = r1.a((java.lang.String) r2, (java.lang.String) r3)\n java.util.Map<java.lang.String, java.lang.String> r1 = r1.f34114b\n com.ss.android.ugc.aweme.common.r.a((java.lang.String) r0, (java.util.Map) r1)\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r9.f46788f\n boolean r0 = com.ss.android.ugc.aweme.commercialize.utils.c.L(r0)\n if (r0 == 0) goto L_0x00a9\n android.content.Context r0 = r10.getContext()\n r1 = 2131558510(0x7f0d006e, float:1.8742338E38)\n com.bytedance.ies.dmt.ui.d.a r0 = com.bytedance.ies.dmt.ui.d.a.b((android.content.Context) r0, (int) r1)\n r0.a()\n goto L_0x011d\n L_0x00a9:\n com.ss.android.ugc.aweme.IAccountUserService r0 = com.ss.android.ugc.aweme.account.d.a()\n java.lang.String r1 = \"AccountUserProxyService.get()\"\n kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(r0, r1)\n boolean r0 = r0.isLogin()\n if (r0 != 0) goto L_0x011a\n java.lang.Object[] r0 = new java.lang.Object[r8]\n com.meituan.robust.ChangeQuickRedirect r2 = f46777a\n r3 = 0\n r4 = 43458(0xa9c2, float:6.0898E-41)\n java.lang.Class[] r5 = new java.lang.Class[r8]\n java.lang.Class r6 = java.lang.Void.TYPE\n r1 = r9\n boolean r0 = com.meituan.robust.PatchProxy.isSupport(r0, r1, r2, r3, r4, r5, r6)\n if (r0 == 0) goto L_0x00dc\n java.lang.Object[] r0 = new java.lang.Object[r8]\n com.meituan.robust.ChangeQuickRedirect r2 = f46777a\n r3 = 0\n r4 = 43458(0xa9c2, float:6.0898E-41)\n java.lang.Class[] r5 = new java.lang.Class[r8]\n java.lang.Class r6 = java.lang.Void.TYPE\n r1 = r9\n com.meituan.robust.PatchProxy.accessDispatch(r0, r1, r2, r3, r4, r5, r6)\n return\n L_0x00dc:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r9.f46788f\n if (r0 == 0) goto L_0x00e6\n java.lang.String r0 = r0.getAid()\n if (r0 != 0) goto L_0x00e8\n L_0x00e6:\n java.lang.String r0 = \"\"\n L_0x00e8:\n com.ss.android.ugc.aweme.framework.core.a r1 = com.ss.android.ugc.aweme.framework.core.a.b()\n java.lang.String r2 = \"AppTracker.get()\"\n kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(r1, r2)\n android.app.Activity r1 = r1.a()\n java.lang.String r2 = r9.g\n java.lang.String r3 = \"click_favorite_video\"\n com.ss.android.ugc.aweme.utils.ad r4 = com.ss.android.ugc.aweme.utils.ad.a()\n java.lang.String r5 = \"group_id\"\n com.ss.android.ugc.aweme.utils.ad r4 = r4.a((java.lang.String) r5, (java.lang.String) r0)\n java.lang.String r5 = \"log_pb\"\n java.lang.String r0 = com.ss.android.ugc.aweme.u.aa.g((java.lang.String) r0)\n com.ss.android.ugc.aweme.utils.ad r0 = r4.a((java.lang.String) r5, (java.lang.String) r0)\n android.os.Bundle r0 = r0.f75487b\n com.ss.android.ugc.aweme.feed.ui.masklayer2.i$a r4 = new com.ss.android.ugc.aweme.feed.ui.masklayer2.i$a\n r4.<init>(r9)\n com.ss.android.ugc.aweme.base.component.f r4 = (com.ss.android.ugc.aweme.base.component.f) r4\n com.ss.android.ugc.aweme.login.e.a((android.app.Activity) r1, (java.lang.String) r2, (java.lang.String) r3, (android.os.Bundle) r0, (com.ss.android.ugc.aweme.base.component.f) r4)\n return\n L_0x011a:\n r9.a()\n L_0x011d:\n boolean r0 = com.ss.android.g.a.a()\n if (r0 == 0) goto L_0x0138\n com.ss.android.ugc.aweme.setting.AbTestManager r0 = com.ss.android.ugc.aweme.setting.AbTestManager.a()\n boolean r0 = r0.aW()\n if (r0 == 0) goto L_0x0138\n com.ss.android.ugc.aweme.base.sharedpref.f r0 = com.ss.android.ugc.aweme.base.sharedpref.e.d()\n java.lang.String r1 = \"last_share_type\"\n java.lang.String r2 = \"TYPE_FAVORITE\"\n r0.b((java.lang.String) r1, (java.lang.String) r2)\n L_0x0138:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.ugc.aweme.feed.ui.masklayer2.i.a(android.view.View):void\");\n }", "private LightIntensity traceRay(Ray ray, int currentTraceDepth) {\n if (currentTraceDepth > MAX_TRACE_DEPTH) {\n return LightIntensity.makeZero();\n }\n\n currentTraceDepth += 1;\n\n Solid.Intersection solidIntersection = castRayOnSolids(ray);\n LightSource.Intersection lightIntersection = castRayOnLights(ray);\n\n LightIntensity result = LightIntensity.makeZero();\n if (solidIntersection == null && lightIntersection == null) {\n // Nothing to do\n } else if (solidIntersection == null && lightIntersection != null) {\n result = result.add(lightIntersection.intersectedLight.intensity);\n } else if (solidIntersection != null & lightIntersection == null) {\n result = handleSolidRayHit(ray, solidIntersection, result, currentTraceDepth);\n } else if (solidIntersection.info.pointOfIntersection.distance(ray.origin) < lightIntersection.info.pointOfIntersection.distance(ray.origin)) {\n result = handleSolidRayHit(ray, solidIntersection, result, currentTraceDepth);\n } else {\n result = result.add(lightIntersection.intersectedLight.intensity);\n }\n\n return result;\n }", "@Override\r\n protected void drawDebugShape( PhysicsNode physicsNode, Renderer renderer ) {\n\r\n }", "@Override\n\tpublic void trace(Marker marker, Object message) {\n\n\t}", "protected static void tracer(Scene scene, Ray ray, short[] rgb) {\n\t\trgb[0] = 0;\n\t\trgb[1] = 0;\n\t\trgb[2] = 0;\n\t\tRayIntersection closest = findClosestIntersection(scene, ray);\n\t\tif (closest == null) {\n\t\t\treturn;\n\t\t}\n\t\tList<LightSource> lights = scene.getLights();\n\t\t\n\t\trgb[0] = 15;\n\t\trgb[1] = 15;\n\t\trgb[2] = 15;\n\t\tPoint3D normal = closest.getNormal();\n\t\tfor (LightSource light : lights) {\n\t\t\tRay lightRay = Ray.fromPoints(light.getPoint(), closest.getPoint());\n\t\t\tRayIntersection lightClosest = findClosestIntersection(scene, lightRay);\n\n\t\t\tif(lightClosest == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif ( lightClosest.getPoint().sub(light.getPoint()).norm() + 0.001 < \n\t\t\t\t\tclosest.getPoint().sub(light.getPoint()).norm()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tPoint3D r = lightRay.direction.sub(normal.scalarMultiply(2*(lightRay.direction.scalarProduct(normal))));\n\t\t\t\n\t\t\trgb[0] += light.getR()*(closest.getKdr()*(Math.max(lightRay.direction.scalarProduct(normal),0)) + closest.getKrr() *\n\t\t\t\t\tMath.pow(ray.direction.scalarProduct(r),closest.getKrn()));\n\t\t\trgb[1] += light.getG()*(closest.getKdg()*(Math.max(lightRay.direction.scalarProduct(normal),0)) + closest.getKrg() *\n\t\t\t\t\tMath.pow(ray.direction.scalarProduct(r),closest.getKrn()));\n\t\t\trgb[2] += light.getB()*(closest.getKdb()*(Math.max(lightRay.direction.scalarProduct(normal),0)) + closest.getKrb() *\n\t\t\t\t\tMath.pow(ray.direction.scalarProduct(r),closest.getKrn()));\n\t\t}\n\t}", "protected void onViewTreeNodeSelectionChanged(ViewNodeJSO viewNode, boolean selected){\n clearCanvas();\n mSelectedView = selected;\n if (selected) { \n onShowTableDetail(viewNode);\n drawRectForView(viewNode);\n } \n }", "private void handleTap(Frame frame, Camera camera) {\n MotionEvent tap = tapHelper.queuedSingleTapsPoll();\n if (anchors.size() < 2 && tap != null && camera.getTrackingState() == TrackingState.TRACKING) {\n for (HitResult hit : frame.hitTest(x,y)) {\n // Check if any plane was hit, and if it was hit inside the plane polygon\n Trackable trackable = hit.getTrackable();\n // Creates an anchor if a plane or an oriented point was hit.\n if ((trackable instanceof Plane\n && ((Plane) trackable).isPoseInPolygon(hit.getHitPose())\n && (PlaneRenderer.calculateDistanceToPlane(hit.getHitPose(), camera.getPose()) > 0))\n || (trackable instanceof Point\n && ((Point) trackable).getOrientationMode()\n == Point.OrientationMode.ESTIMATED_SURFACE_NORMAL)) {\n\n // Assign a color to the object for rendering based on the trackable type\n // this anchor attached to. - 파란색\n float[] objColor = new float[]{66.0f, 133.0f, 244.0f, 255.0f};\n\n // Adding an Anchor tells ARCore that it should track this position in\n // space.\n anchors.add(new ColoredAnchor(hit.createAnchor(), objColor));\n\n if (anchors.size() == 1) {\n float anchorX = anchors.get(0).anchor.getPose().tx();\n float anchorY = anchors.get(0).anchor.getPose().ty();\n float anchorZ = anchors.get(0).anchor.getPose().tz();\n float[] points = new float[]{anchorX, anchorY, anchorZ};\n mPoints[0] = points; // 해당 점의 좌표를 배열에 저장\n } else if (anchors.size() == 2) {\n float anchorX = anchors.get(1).anchor.getPose().tx();\n float anchorY = anchors.get(1).anchor.getPose().ty();\n float anchorZ = anchors.get(1).anchor.getPose().tz();\n float[] points = new float[]{anchorX, anchorY, anchorZ};\n mPoints[1] = points; // 해당 점의 좌표를 배열에 저장\n updateDistance(mPoints[0], mPoints[1]); //거리 업데이트\n }\n\n break;\n }\n }\n }\n else if(anchors.size() == 2 && long_pressed_flag==1) // 점이 꾹 눌리면, 점을 이동시킴\n {\n for (HitResult hit : frame.hitTest(x,y)) {\n handleMoveEvent(nowTouchingPointIndex, hit);\n }\n\n }\n\n }", "private static IRayTracerProducer getIRayTracerProducer() {\r\n\t\treturn new IRayTracerProducer() {\r\n\t\t\t@Override\r\n\t\t\tpublic void produce(Point3D eye, Point3D view, Point3D viewUp, double horizontal, double vertical,\r\n\t\t\t\t\tint width, int height, long requestNo, IRayTracerResultObserver observer) {\r\n\t\t\t\tSystem.out.println(\"Započinjem izračune...\");\r\n\t\t\t\tshort[] red = new short[width * height];\r\n\t\t\t\tshort[] green = new short[width * height];\r\n\t\t\t\tshort[] blue = new short[width * height];\r\n\r\n\t\t\t\t// norming the plane\r\n\t\t\t\tPoint3D OG = view.sub(eye).normalize();\r\n\t\t\t\tPoint3D yAxis = viewUp.normalize().sub(OG.scalarMultiply(OG.scalarProduct(viewUp.normalize())))\r\n\t\t\t\t\t\t.normalize();\r\n\t\t\t\tPoint3D xAxis = OG.vectorProduct(yAxis).normalize();\r\n\t\t\t\t// Point3D zAxis = yAxis.vectorProduct(xAxis).normalize(); - not\r\n\t\t\t\t// used for these computations\r\n\r\n\t\t\t\t// upper-left screen corner\r\n\t\t\t\tPoint3D screenCorner = view.sub(xAxis.scalarMultiply(horizontal / 2))\r\n\t\t\t\t\t\t.add(yAxis.scalarMultiply(vertical / 2));\r\n\t\t\t\tScene scene = RayTracerViewer.createPredefinedScene();\r\n\r\n\t\t\t\t// measuring calculation time\r\n\t\t\t\tdouble start = System.currentTimeMillis();\r\n\t\t\t\tForkJoinPool pool = new ForkJoinPool();\r\n\t\t\t\tpool.invoke(new Job(eye, scene, xAxis, yAxis, screenCorner, width, height, horizontal, vertical, 0,\r\n\t\t\t\t\t\theight, red, green, blue));\r\n\t\t\t\tpool.shutdown();\r\n\t\t\t\tdouble end = System.currentTimeMillis();\r\n\r\n\t\t\t\tSystem.out.println(\"Izračuni gotovi. Izračunato za: \" + (end - start) + \"ms\");\r\n\t\t\t\tobserver.acceptResult(red, green, blue, requestNo);\r\n\t\t\t\tSystem.out.println(\"Dojava gotova...\");\r\n\r\n\t\t\t}\r\n\r\n\t\t};\r\n\t}", "public void doTrendDeltaMap(final StaplerRequest request, final StaplerResponse response) throws IOException, InterruptedException {\n\t\t /*AbstractBuild<?,?> lastBuild = this.getLastFinishedBuild();\n\t\t SloccountBuildAction lastAction = lastBuild.getAction(SloccountBuildAction.class);*/\n\n\t\t ChartUtil.generateClickableMap(\n\t\t request,\n\t\t response,\n\t\t Text_HTMLConverter.buildChartDelta(build),\n\t\t CHART_WIDTH,\n\t\t CHART_HEIGHT);\n\t\t }", "@Override\n\t\tpublic void onGetTransitRouteResult(TransitRouteResult transitrouteresult) {\n\t\t\tnearby_baidumap.clear();// 清除图层覆盖物\n\t\t\tN_showdatainfotv.setText(\"\");\n\t\t\tSB.delete(0, SB.length());\n\t\t\tif (transitrouteresult == null || transitrouteresult.error != SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\tToastUtil.CreateToastShow(navigation, null, \"温馨提示\", \"没有找到合适的路线\");\n\t\t\t}\n\t\t\tif (transitrouteresult.error == SearchResult.ERRORNO.AMBIGUOUS_ROURE_ADDR) {\n\t\t\t\t// 起终点或途经点地址有岐义,通过以下接口获取建议查询信息\n\t\t\t\t// result.getSuggestAddrInfo()\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (transitrouteresult.error == SearchResult.ERRORNO.NO_ERROR) {\n\n\t\t\t\tN_routeline = transitrouteresult.getRouteLines().get(0);// 第一方案\n\t\t\t\tSB.append(\"起点\\t\\t\" + N_currentaddress).append(\"\\t\\t\\t----\\t\\t\\t\").append(\"终点\\t\\t\" + N_targetaddress)\n\t\t\t\t\t\t.append(\"\\n\\n\");\n\t\t\t\tfor (int i = 0; i < N_routeline.getAllStep().size(); i++) {\n\t\t\t\t\tTransitRouteLine.TransitStep step = (TransitStep) N_routeline.getAllStep().get(i);\n\t\t\t\t\tSB.append(i + \"\\t\\t:\" + step.getInstructions() + \"\\t\\t\\t\");\n\t\t\t\t}\n\n\t\t\t\tN_showdatainfotv.setText(SB);\n\t\t\t\tTransitOverlayUtil transitoverlayutil = new TransitOverlayUtil(nearby_baidumap, navigation);\n\t\t\t\ttransitoverlayutil.setData(transitrouteresult.getRouteLines().get(0));\n\t\t\t\ttransitoverlayutil.addToMap();\n\t\t\t\ttransitoverlayutil.zoomToSpan();\n\t\t\t}\n\n\t\t}", "public boolean onInterceptTouchEvent(android.view.MotionEvent r16) {\n /*\n r15 = this;\n r6 = r15\n r7 = r16\n int r0 = r16.getAction()\n r0 = r0 & 255(0xff, float:3.57E-43)\n r1 = -1\n r8 = 0\n r2 = 3\n if (r0 == r2) goto L_0x0119\n r9 = 1\n if (r0 != r9) goto L_0x0013\n goto L_0x0119\n L_0x0013:\n if (r0 == 0) goto L_0x001f\n boolean r2 = r6.mIsBeingDragged\n if (r2 == 0) goto L_0x001a\n return r9\n L_0x001a:\n boolean r2 = r6.mIsUnableToDrag\n if (r2 == 0) goto L_0x001f\n return r8\n L_0x001f:\n r2 = 2\n if (r0 == 0) goto L_0x00b9\n if (r0 == r2) goto L_0x002e\n r1 = 6\n if (r0 == r1) goto L_0x0029\n goto L_0x0107\n L_0x0029:\n r15.onSecondaryPointerUp(r16)\n goto L_0x0107\n L_0x002e:\n int r0 = r6.mActivePointerId\n if (r0 == r1) goto L_0x0107\n int r0 = android.support.v4.view.MotionEventCompat.findPointerIndex(r7, r0)\n float r10 = android.support.v4.view.MotionEventCompat.getX(r7, r0)\n float r1 = r6.mLastMotionX\n float r1 = r10 - r1\n float r11 = java.lang.Math.abs(r1)\n float r12 = android.support.v4.view.MotionEventCompat.getY(r7, r0)\n float r0 = r6.mInitialMotionY\n float r0 = r12 - r0\n float r13 = java.lang.Math.abs(r0)\n r0 = 0\n int r14 = (r1 > r0 ? 1 : (r1 == r0 ? 0 : -1))\n if (r14 == 0) goto L_0x0067\n float r0 = r6.mLastMotionX\n boolean r0 = r6.isGutterDrag(r0, r1)\n if (r0 != 0) goto L_0x0067\n r2 = 0\n int r3 = (int) r1\n int r4 = (int) r10\n int r5 = (int) r12\n r0 = r6\n r1 = r6\n boolean r0 = r0.canScroll(r1, r2, r3, r4, r5)\n if (r0 != 0) goto L_0x006d\n L_0x0067:\n boolean r0 = r6.canSelfScroll()\n if (r0 != 0) goto L_0x0074\n L_0x006d:\n r6.mLastMotionX = r10\n r6.mLastMotionY = r12\n r6.mIsUnableToDrag = r9\n return r8\n L_0x0074:\n int r0 = r6.mTouchSlop\n float r0 = (float) r0\n int r0 = (r11 > r0 ? 1 : (r11 == r0 ? 0 : -1))\n if (r0 <= 0) goto L_0x00a2\n r0 = 1056964608(0x3f000000, float:0.5)\n float r11 = r11 * r0\n int r0 = (r11 > r13 ? 1 : (r11 == r13 ? 0 : -1))\n if (r0 <= 0) goto L_0x00a2\n r6.mIsBeingDragged = r9\n r6.requestParentDisallowInterceptTouchEvent(r9)\n r6.setScrollState(r9)\n if (r14 <= 0) goto L_0x0094\n float r0 = r6.mInitialMotionX\n int r1 = r6.mTouchSlop\n float r1 = (float) r1\n float r0 = r0 + r1\n goto L_0x009a\n L_0x0094:\n float r0 = r6.mInitialMotionX\n int r1 = r6.mTouchSlop\n float r1 = (float) r1\n float r0 = r0 - r1\n L_0x009a:\n r6.mLastMotionX = r0\n r6.mLastMotionY = r12\n r6.setScrollingCacheEnabled(r9)\n goto L_0x00ab\n L_0x00a2:\n int r0 = r6.mTouchSlop\n float r0 = (float) r0\n int r0 = (r13 > r0 ? 1 : (r13 == r0 ? 0 : -1))\n if (r0 <= 0) goto L_0x00ab\n r6.mIsUnableToDrag = r9\n L_0x00ab:\n boolean r0 = r6.mIsBeingDragged\n if (r0 == 0) goto L_0x0107\n boolean r0 = r6.performDrag(r10)\n if (r0 == 0) goto L_0x0107\n android.support.v4.view.ViewCompat.postInvalidateOnAnimation(r6)\n goto L_0x0107\n L_0x00b9:\n float r0 = r16.getX()\n r6.mInitialMotionX = r0\n r6.mLastMotionX = r0\n float r0 = r16.getY()\n r6.mInitialMotionY = r0\n r6.mLastMotionY = r0\n int r0 = android.support.v4.view.MotionEventCompat.getPointerId(r7, r8)\n r6.mActivePointerId = r0\n r6.mIsUnableToDrag = r8\n android.widget.Scroller r0 = r6.mScroller\n r0.computeScrollOffset()\n int r0 = r6.mScrollState\n if (r0 != r2) goto L_0x0102\n android.widget.Scroller r0 = r6.mScroller\n int r0 = r0.getFinalX()\n android.widget.Scroller r1 = r6.mScroller\n int r1 = r1.getCurrX()\n int r0 = r0 - r1\n int r0 = java.lang.Math.abs(r0)\n int r1 = r6.mCloseEnough\n if (r0 <= r1) goto L_0x0102\n android.widget.Scroller r0 = r6.mScroller\n r0.abortAnimation()\n r6.mPopulatePending = r8\n r6.populate()\n r6.mIsBeingDragged = r9\n r6.requestParentDisallowInterceptTouchEvent(r9)\n r6.setScrollState(r9)\n goto L_0x0107\n L_0x0102:\n r6.completeScroll(r8)\n r6.mIsBeingDragged = r8\n L_0x0107:\n android.view.VelocityTracker r0 = r6.mVelocityTracker\n if (r0 != 0) goto L_0x0111\n android.view.VelocityTracker r0 = android.view.VelocityTracker.obtain()\n r6.mVelocityTracker = r0\n L_0x0111:\n android.view.VelocityTracker r0 = r6.mVelocityTracker\n r0.addMovement(r7)\n boolean r0 = r6.mIsBeingDragged\n return r0\n L_0x0119:\n r6.mIsBeingDragged = r8\n r6.mIsUnableToDrag = r8\n r6.mActivePointerId = r1\n android.view.VelocityTracker r0 = r6.mVelocityTracker\n if (r0 == 0) goto L_0x012b\n android.view.VelocityTracker r0 = r6.mVelocityTracker\n r0.recycle()\n r0 = 0\n r6.mVelocityTracker = r0\n L_0x012b:\n return r8\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.autonavi.map.widget.RecyclableViewPager.onInterceptTouchEvent(android.view.MotionEvent):boolean\");\n }", "public void startgetDirectAreaInfo(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfo getDirectAreaInfo16,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getDirectAreaInfoRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDirectAreaInfo16,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectAreaInfo\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectAreaInfo\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultgetDirectAreaInfo(\n (net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorgetDirectAreaInfo(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectAreaInfo(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectAreaInfo(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectAreaInfo(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectAreaInfo(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorgetDirectAreaInfo(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[8].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[8].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "TraceDefinedDataView definedData();", "@Override\n\tpublic void trace(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}", "public Vector2DLong[] getOutlineVectors(long extrapolateTime);", "public void renderImage() {\n Camera camera = scene.getCamera();//fot the function thats in the camera.constr.. to build the rays.\n Intersectable geometries = scene.getGeometries();//list of geomertries for the functon in geometries.findinter..\n java.awt.Color background = scene.getBackground().getColor();\n double distance = scene.getDistance();\n\n\n int width = (int) imageWriter.getWidth(); //width of the view plane\n int height = (int) imageWriter.getHeight();//height of the view plane\n int Nx = imageWriter.getNx(); // number of squares in the Row (shura). we need it for the for\n int Ny = imageWriter.getNy(); //number of squares in the column.(amuda). we need it for the for\n\n /**for each pixel we will send ray, and with the function findIntersection\n * we will get the Geo points(point 3d, color).\n * if we got nothing so we will color with the back round color\n * if we got the GeoPoints We will send to the function getClosestPoint and color*/\n Color pixelColor;\n for (int row = 0; row < Ny; ++row) {\n for (int column = 0; column < Nx; ++column) {\n if (amountRays > 1) { //if there is superSampling\n List<Ray> rays = camera.constructNRaysThroughPixel(Nx, Ny, column, row, distance, width, height,superSamplingRate, amountRays);\n Color averageColor;\n pixelColor = scene.getBackground();\n for (Ray ray : rays) {//for each ray from the list give the list of intersection geo-points.\n List<GeoPoint> intersectionPoints = geometries.findGeoIntersections(ray);\n averageColor = scene.getBackground();\n if (intersectionPoints != null) {\n GeoPoint closestPoint = getClosestPoint(intersectionPoints);//get the closest point for each ray.\n averageColor = calcColor(closestPoint, ray);//calculate the color and put in averageColor\n }\n pixelColor = pixelColor.add(averageColor);//befor we go to the next ray we add the averageColor to pixelColor.\n }\n pixelColor = pixelColor.reduce(rays.size());//we are doing the (memuza) and that is the color of that pixel.\n }\n else {//if there is no supersampling\n Ray ray = camera.constructRayThroughPixel(Nx, Ny, column, row, distance, width, height);\n List<GeoPoint> intersectionPoints = geometries.findGeoIntersections(ray);\n pixelColor = scene.getBackground();\n if (intersectionPoints != null) {\n GeoPoint closestPoint = getClosestPoint(intersectionPoints);\n pixelColor = calcColor(closestPoint, ray);\n }\n }\n imageWriter.writePixel(column, row, pixelColor.getColor());\n }\n }\n }" ]
[ "0.62519026", "0.6129533", "0.6129533", "0.57166415", "0.53052247", "0.52972287", "0.529293", "0.5275088", "0.5265227", "0.5229808", "0.51599306", "0.510521", "0.5088969", "0.5085803", "0.50813305", "0.5075629", "0.5066811", "0.5053373", "0.5019075", "0.499725", "0.4959767", "0.49272165", "0.4923013", "0.48516756", "0.48362514", "0.4799156", "0.47877148", "0.47738957", "0.47713053", "0.47707528", "0.47694635", "0.4767484", "0.47447354", "0.47333774", "0.47254482", "0.47121483", "0.47044104", "0.46758622", "0.46758622", "0.46750316", "0.4674186", "0.46730816", "0.46724424", "0.4648656", "0.4639457", "0.46383622", "0.46381998", "0.46308368", "0.4618404", "0.46084145", "0.460485", "0.45996332", "0.45923367", "0.45853478", "0.45804393", "0.45783442", "0.45722324", "0.45706445", "0.4568296", "0.45616257", "0.45581236", "0.45579043", "0.4552407", "0.4545419", "0.45359194", "0.4518196", "0.45152923", "0.45007986", "0.449611", "0.44858012", "0.44828084", "0.4479353", "0.44781184", "0.44704708", "0.4467718", "0.44631776", "0.44589996", "0.44586688", "0.44416863", "0.44401503", "0.44350854", "0.44306567", "0.44303364", "0.44216266", "0.44167858", "0.44060528", "0.44053975", "0.44039628", "0.4402127", "0.4396606", "0.43955868", "0.43866628", "0.43798792", "0.43784145", "0.43732074", "0.43731198", "0.43722844", "0.43714994", "0.4365818", "0.43643284" ]
0.7819805
0
auto generated Axis2 call back method for rayTraceURL method override this method for handling normal response from rayTraceURL operation
public void receiveResultrayTraceURL( RayTracerStub.RayTraceURLResponse result ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void receiveResultrayTrace(\n RayTracerStub.RayTraceResponse result\n ) {\n }", "public void receiveResultrayTraceSubView(\n RayTracerStub.RayTraceSubViewResponse result\n ) {\n }", "public void receiveResultrayTraceMovie(\n RayTracerStub.RayTraceMovieResponse result\n ) {\n }", "public abstract Color traceRay(Ray ray);", "public abstract Color traceRay(Ray ray);", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetRoadwayPageResponse getRoadwayPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetRoadwayPage getRoadwayPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"urn:getRoadwayPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getRoadwayPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getRoadwayPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetRoadwayPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetRoadwayPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetEntrancePageResponse getEntrancePage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetEntrancePage getEntrancePage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[4].getName());\n _operationClient.getOptions().setAction(\"urn:getEntrancePage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getEntrancePage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getEntrancePage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetEntrancePageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetEntrancePageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "com.google.search.now.wire.feed.ResponseProto.Response getResponse();", "com.google.search.now.wire.feed.ResponseProto.Response getResponse();", "public void startdirectOrderStateQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQuery directOrderStateQuery0,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directOrderStateQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directOrderStateQuery0,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultdirectOrderStateQuery(\n (net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrordirectOrderStateQuery(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectOrderStateQuery(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectOrderStateQuery(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectOrderStateQuery(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrordirectOrderStateQuery(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrordirectOrderStateQuery(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrordirectOrderStateQuery(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[0].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[0].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public Object handleCommandResponse(Object response) throws RayoProtocolException;", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleRecordPageResponse getVehicleRecordPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleRecordPage getVehicleRecordPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[5].getName());\n _operationClient.getOptions().setAction(\"urn:getVehicleRecordPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getVehicleRecordPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getVehicleRecordPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleRecordPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleRecordPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "public net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfoResponse getDirectSrvInfo(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfo getDirectSrvInfo10)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[5].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getDirectSrvInfoRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDirectSrvInfo10,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectSrvInfo\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectSrvInfo\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfoResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfoResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectSrvInfo\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectSrvInfo\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectSrvInfo\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public RayTracerCallbackHandler(){\n this.clientData = null;\n }", "public void request() {\n /*\n r11 = this;\n r0 = 0\n r11.mResponse = r0\n java.lang.String r1 = r11.mUrlString\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n r3 = 0\n r5 = r0\n r4 = 0\n L_0x000d:\n r6 = 1\n java.lang.String r7 = \"DistanceConfigFetcher\"\n if (r4 == 0) goto L_0x002a\n r1 = 2\n java.lang.Object[] r1 = new java.lang.Object[r1]\n java.lang.String r8 = r11.mUrlString\n r1[r3] = r8\n java.lang.String r8 = \"Location\"\n java.lang.String r9 = r5.getHeaderField(r8)\n r1[r6] = r9\n java.lang.String r9 = \"Following redirect from %s to %s\"\n org.altbeacon.beacon.logging.LogManager.d(r7, r9, r1)\n java.lang.String r1 = r5.getHeaderField(r8)\n L_0x002a:\n int r4 = r4 + 1\n r8 = -1\n r11.mResponseCode = r8\n java.net.URL r8 = new java.net.URL // Catch:{ Exception -> 0x0035 }\n r8.<init>(r1) // Catch:{ Exception -> 0x0035 }\n goto L_0x0044\n L_0x0035:\n r8 = move-exception\n java.lang.Object[] r9 = new java.lang.Object[r6]\n java.lang.String r10 = r11.mUrlString\n r9[r3] = r10\n java.lang.String r10 = \"Can't construct URL from: %s\"\n org.altbeacon.beacon.logging.LogManager.e(r7, r10, r9)\n r11.mException = r8\n r8 = r0\n L_0x0044:\n if (r8 != 0) goto L_0x004e\n java.lang.Object[] r6 = new java.lang.Object[r3]\n java.lang.String r8 = \"URL is null. Cannot make request\"\n org.altbeacon.beacon.logging.LogManager.d(r7, r8, r6)\n goto L_0x00a0\n L_0x004e:\n java.net.URLConnection r8 = r8.openConnection() // Catch:{ SecurityException -> 0x0093, FileNotFoundException -> 0x0086, IOException -> 0x0079 }\n java.net.HttpURLConnection r8 = (java.net.HttpURLConnection) r8 // Catch:{ SecurityException -> 0x0093, FileNotFoundException -> 0x0086, IOException -> 0x0079 }\n java.lang.String r5 = \"User-Agent\"\n java.lang.String r9 = r11.mUserAgentString // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n r8.addRequestProperty(r5, r9) // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n int r5 = r8.getResponseCode() // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n r11.mResponseCode = r5 // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n java.lang.String r5 = \"response code is %s\"\n java.lang.Object[] r6 = new java.lang.Object[r6] // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n int r9 = r8.getResponseCode() // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9) // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n r6[r3] = r9 // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n org.altbeacon.beacon.logging.LogManager.d(r7, r5, r6) // Catch:{ SecurityException -> 0x0077, FileNotFoundException -> 0x0075, IOException -> 0x0073 }\n goto L_0x009f\n L_0x0073:\n r5 = move-exception\n goto L_0x007c\n L_0x0075:\n r5 = move-exception\n goto L_0x0089\n L_0x0077:\n r5 = move-exception\n goto L_0x0096\n L_0x0079:\n r6 = move-exception\n r8 = r5\n r5 = r6\n L_0x007c:\n java.lang.Object[] r6 = new java.lang.Object[r3]\n java.lang.String r9 = \"Can't reach server\"\n org.altbeacon.beacon.logging.LogManager.w(r5, r7, r9, r6)\n r11.mException = r5\n goto L_0x009f\n L_0x0086:\n r6 = move-exception\n r8 = r5\n r5 = r6\n L_0x0089:\n java.lang.Object[] r6 = new java.lang.Object[r3]\n java.lang.String r9 = \"No data exists at \\\"+urlString\"\n org.altbeacon.beacon.logging.LogManager.w(r5, r7, r9, r6)\n r11.mException = r5\n goto L_0x009f\n L_0x0093:\n r6 = move-exception\n r8 = r5\n r5 = r6\n L_0x0096:\n java.lang.Object[] r6 = new java.lang.Object[r3]\n java.lang.String r9 = \"Can't reach sever. Have you added android.permission.INTERNET to your manifest?\"\n org.altbeacon.beacon.logging.LogManager.w(r5, r7, r9, r6)\n r11.mException = r5\n L_0x009f:\n r5 = r8\n L_0x00a0:\n r6 = 10\n if (r4 >= r6) goto L_0x00b2\n int r6 = r11.mResponseCode\n r8 = 302(0x12e, float:4.23E-43)\n if (r6 == r8) goto L_0x000d\n r8 = 301(0x12d, float:4.22E-43)\n if (r6 == r8) goto L_0x000d\n r8 = 303(0x12f, float:4.25E-43)\n if (r6 == r8) goto L_0x000d\n L_0x00b2:\n java.lang.Exception r0 = r11.mException\n if (r0 != 0) goto L_0x00e2\n java.io.BufferedReader r0 = new java.io.BufferedReader // Catch:{ Exception -> 0x00d8 }\n java.io.InputStreamReader r1 = new java.io.InputStreamReader // Catch:{ Exception -> 0x00d8 }\n java.io.InputStream r4 = r5.getInputStream() // Catch:{ Exception -> 0x00d8 }\n r1.<init>(r4) // Catch:{ Exception -> 0x00d8 }\n r0.<init>(r1) // Catch:{ Exception -> 0x00d8 }\n L_0x00c4:\n java.lang.String r1 = r0.readLine() // Catch:{ Exception -> 0x00d8 }\n if (r1 == 0) goto L_0x00ce\n r2.append(r1) // Catch:{ Exception -> 0x00d8 }\n goto L_0x00c4\n L_0x00ce:\n r0.close() // Catch:{ Exception -> 0x00d8 }\n java.lang.String r0 = r2.toString() // Catch:{ Exception -> 0x00d8 }\n r11.mResponse = r0 // Catch:{ Exception -> 0x00d8 }\n goto L_0x00e2\n L_0x00d8:\n r0 = move-exception\n r11.mException = r0\n java.lang.Object[] r1 = new java.lang.Object[r3]\n java.lang.String r2 = \"error reading beacon data\"\n org.altbeacon.beacon.logging.LogManager.w(r0, r7, r2, r1)\n L_0x00e2:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.altbeacon.beacon.distance.DistanceConfigFetcher.request():void\");\n }", "public static GetRoadwayPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetRoadwayPageResponse object =\n new GetRoadwayPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getRoadwayPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetRoadwayPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse directOrderStateQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQuery directOrderStateQuery0)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directOrderStateQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directOrderStateQuery0,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directOrderStateQuery\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.DirectOrderStateQueryResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directOrderStateQuery\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public void startgetDirectAreaInfo(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfo getDirectAreaInfo16,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getDirectAreaInfoRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDirectAreaInfo16,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectAreaInfo\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectAreaInfo\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultgetDirectAreaInfo(\n (net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorgetDirectAreaInfo(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectAreaInfo(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectAreaInfo(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectAreaInfo(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectAreaInfo(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectAreaInfo(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorgetDirectAreaInfo(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[8].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[8].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse getDirectAreaInfo(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfo getDirectAreaInfo16)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getDirectAreaInfoRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDirectAreaInfo16,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectAreaInfo\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectAreaInfo\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfoResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectAreaInfo\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse terminalReturnCard(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCard terminalReturnCard4)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/terminalReturnCardRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n terminalReturnCard4,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "@Override\n\tpublic void getSpendPointsResponse(String arg0, int arg1) {\n\t\t\n\t}", "public void startgetDirectSrvInfo(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfo getDirectSrvInfo10,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[5].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getDirectSrvInfoRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDirectSrvInfo10,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectSrvInfo\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDirectSrvInfo\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfoResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultgetDirectSrvInfo(\n (net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfoResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorgetDirectSrvInfo(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectSrvInfo\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectSrvInfo\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDirectSrvInfo\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectSrvInfo(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectSrvInfo(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectSrvInfo(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectSrvInfo(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectSrvInfo(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectSrvInfo(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectSrvInfo(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDirectSrvInfo(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectSrvInfo(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectSrvInfo(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorgetDirectSrvInfo(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorgetDirectSrvInfo(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[5].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[5].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public void startgetTerminalCardType(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardType getTerminalCardType2,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getTerminalCardTypeRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getTerminalCardType2,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getTerminalCardType\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getTerminalCardType\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultgetTerminalCardType(\n (net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorgetTerminalCardType(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetTerminalCardType(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetTerminalCardType(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetTerminalCardType(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorgetTerminalCardType(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorgetTerminalCardType(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorgetTerminalCardType(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[1].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[1].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public void startdirectQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectQuery directQuery6,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directQuery6,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directQuery\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultdirectQuery(\n (net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrordirectQuery(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectQuery(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectQuery(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectQuery(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrordirectQuery(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrordirectQuery(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrordirectQuery(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[3].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[3].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPageResponse getVehicleInfoPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPage getVehicleInfoPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"urn:getVehicleInfoPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getVehicleInfoPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getVehicleInfoPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "public void startorderRadiologyExamination(\n\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrder radiologyOrder4,\n\n final org.pahospital.www.radiologyservice.RadiologyServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"http://www.PAHospital.org/RadiologyService/OrderRadiologyExamination\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n radiologyOrder4,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"orderRadiologyExamination\")), new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"orderRadiologyExamination\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultorderRadiologyExamination(\n (org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrororderRadiologyExamination(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"OrderRadiologyExamination\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"OrderRadiologyExamination\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"OrderRadiologyExamination\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrororderRadiologyExamination(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrororderRadiologyExamination(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrororderRadiologyExamination(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrororderRadiologyExamination(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrororderRadiologyExamination(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrororderRadiologyExamination(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[1].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[1].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public void startterminalReturnCard(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCard terminalReturnCard4,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/terminalReturnCardRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n terminalReturnCard4,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalReturnCard\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultterminalReturnCard(\n (net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCardResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorterminalReturnCard(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalReturnCard\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalReturnCard(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalReturnCard(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalReturnCard(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalReturnCard(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorterminalReturnCard(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorterminalReturnCard(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[2].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[2].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse getTerminalCardType(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardType getTerminalCardType2)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getTerminalCardTypeRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getTerminalCardType2,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getTerminalCardType\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getTerminalCardType\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardTypeResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getTerminalCardType\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public org.pahospital.www.radiologyservice.RadiologyServiceStub.OrderStatus getOrderStatus(\n\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID radiologyOrderID6)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());\n _operationClient.getOptions().setAction(\"http://www.PAHospital.org/RadiologyService/GetOrderStatus\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n radiologyOrderID6,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"getOrderStatus\")), new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"getOrderStatus\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n org.pahospital.www.radiologyservice.RadiologyServiceStub.OrderStatus.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (org.pahospital.www.radiologyservice.RadiologyServiceStub.OrderStatus)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"GetOrderStatus\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"GetOrderStatus\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"GetOrderStatus\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse directQuery(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectQuery directQuery6)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directQueryRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directQuery6,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directQuery\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directQuery\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.DirectQueryResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directQuery\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "@Override\n\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\tpublic void onResponseReceived(Request request, Response response) {\n\t\t\t\t\t\n\t\t\t\t}", "public static GetRoadwayPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetRoadwayPage object =\n new GetRoadwayPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getRoadwayPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetRoadwayPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForDayResponse terminalDownloadQueryForDay(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForDay terminalDownloadQueryForDay12)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[6].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/terminalDownloadQueryForDayRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n terminalDownloadQueryForDay12,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalDownloadQueryForDay\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalDownloadQueryForDay\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForDayResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForDayResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalDownloadQueryForDay\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalDownloadQueryForDay\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalDownloadQueryForDay\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "@Override\n public void onMoveLegResponse(MoveLegResponse ind) {\n\n }", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPageResponse getParkPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPage getParkPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName());\n _operationClient.getOptions().setAction(\"urn:getParkPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getParkPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getParkPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "@Override\n\t\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}", "public void startgetOrderStatus(\n\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID radiologyOrderID6,\n\n final org.pahospital.www.radiologyservice.RadiologyServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());\n _operationClient.getOptions().setAction(\"http://www.PAHospital.org/RadiologyService/GetOrderStatus\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n radiologyOrderID6,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"getOrderStatus\")), new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"getOrderStatus\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n org.pahospital.www.radiologyservice.RadiologyServiceStub.OrderStatus.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultgetOrderStatus(\n (org.pahospital.www.radiologyservice.RadiologyServiceStub.OrderStatus)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorgetOrderStatus(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"GetOrderStatus\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"GetOrderStatus\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"GetOrderStatus\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetOrderStatus(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetOrderStatus(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetOrderStatus(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorgetOrderStatus(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorgetOrderStatus(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorgetOrderStatus(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[2].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[2].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID orderRadiologyExamination(\n\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrder radiologyOrder4)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"http://www.PAHospital.org/RadiologyService/OrderRadiologyExamination\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n radiologyOrder4,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"orderRadiologyExamination\")), new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"orderRadiologyExamination\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"OrderRadiologyExamination\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"OrderRadiologyExamination\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"OrderRadiologyExamination\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "Object getTrace();", "public static GetEntrancePageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetEntrancePageResponse object =\n new GetEntrancePageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getEntrancePageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetEntrancePageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@GET\n @Path(\"{path : .+}\")\n @Produces(value = MediaType.APPLICATION_JSON)\n// @ApiOperation(value = \"Retrieve a image by id\",\n// produces = MediaType.APPLICATION_JSON)\n// @ApiResponses({\n// @ApiResponse(code = HttpStatus.NOT_FOUND_404,\n// message = \"The requested image could not be found\"),\n// @ApiResponse(code = HttpStatus.BAD_REQUEST_400,\n// message = \"The request is not valid. The response body will contain a code and \" +\n// \"details specifying the source of the error.\"),\n// @ApiResponse(code = HttpStatus.UNAUTHORIZED_401,\n// message = \"User is unauthorized to perform the desired operation\")\n// })\n\n public Response getMethod(\n @ApiParam(name = \"id\", value = \"id of page to retrieve image content\", required = true)\n @PathParam(\"path\") String getpath, @Context HttpServletRequest httpRequest, @Context UriInfo uriInfo) {\n String contentType = \"application/json\";\n String method = \"getMethod\";\n String httpMethodType = \"GET\";\n String resolvedResponseBodyFile = null;\n Response.ResponseBuilder myresponseFinalBuilderObject = null;\n\n try {\n\n\n\n String paramPathStg = getpath.replace(\"/\", \".\");\n\n //Step 1: Get responseGuidanceObject\n //TODO: handle JsonTransformationException exception.\n LocationGuidanceDTO responseGuidanceObject = resolveResponsePaths(httpMethodType, paramPathStg);\n\n //Step 2: Create queryparams hash and headers hash.\n Map<String, String> queryParamsMap = grabRestParams(uriInfo);\n Map<String, String> headerMap = getHeaderMap(httpRequest);\n\n\n //Step 3: TODO: Resolve header and params variables from Guidance JSON Body.\n resolvedResponseBodyFile = findExtractAndReplaceSubStg(responseGuidanceObject.getResponseBodyFile(), HEADER_REGEX, headerMap);\n resolvedResponseBodyFile = findExtractAndReplaceSubStg(resolvedResponseBodyFile, PARAMS_REGEX, headerMap);\n\n //Step 4: TODO: Validate responseBody, responseHeader, responseCode files existence and have rightJson structures.\n\n //Step 6: TODO: Grab responses body\n\n String responseJson = replaceHeadersAndParamsInJson(headerMap, queryParamsMap, resolvedResponseBodyFile);\n\n //Step 5: TODO: Decorate with response header\n String headerStg = \"{\\\"ContentType\\\": \\\"$contentType\\\"}\";\n\n //Step 7: TODO: Grab response code and related responsebuilderobject\n Response.ResponseBuilder myRespBuilder = returnRespBuilderObject(responseGuidanceObject.getResponseCode(), null).entity(responseJson);\n\n //Step 5: TODO: Decorate with response headers\n myresponseFinalBuilderObject = decorateWithResponseHeaders(myRespBuilder, responseGuidanceObject.getResponseHeaderFile());\n\n return myresponseFinalBuilderObject.build();\n } catch (IOException ex) {\n logger.error(\"api={}\", \"getContents\", ex);\n mapAndThrow(ex);\n }\n return myresponseFinalBuilderObject.build();\n }", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPageResponse getDictionaryPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPage getDictionaryPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[6].getName());\n _operationClient.getOptions().setAction(\"urn:getDictionaryPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDictionaryPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getDictionaryPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "public void startterminalDownloadQueryForDay(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForDay terminalDownloadQueryForDay12,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[6].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/terminalDownloadQueryForDayRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n terminalDownloadQueryForDay12,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalDownloadQueryForDay\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalDownloadQueryForDay\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForDayResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultterminalDownloadQueryForDay(\n (net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForDayResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorterminalDownloadQueryForDay(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalDownloadQueryForDay\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalDownloadQueryForDay\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalDownloadQueryForDay\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalDownloadQueryForDay(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForDay(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForDay(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForDay(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForDay(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForDay(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForDay(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForDay(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalDownloadQueryForDay(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalDownloadQueryForDay(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorterminalDownloadQueryForDay(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorterminalDownloadQueryForDay(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[6].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[6].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public static GetVehicleInfoPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleInfoPageResponse object =\n new GetVehicleInfoPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleInfoPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleInfoPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetDirectSrvInfoResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectSrvInfoResponse object =\n new GetDirectSrvInfoResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectSrvInfoResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectSrvInfoResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDirectSrvInfoReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDirectSrvInfoReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDirectSrvInfoReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public abstract int trace();", "@Override\n\tpublic void getAwardPointsResponse(String arg0, int arg1) {\n\t\t\n\t}", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleBookPageResponse getVehicleBookPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleBookPage getVehicleBookPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[7].getName());\n _operationClient.getOptions().setAction(\"urn:getVehicleBookPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getVehicleBookPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getVehicleBookPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleBookPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleBookPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "public static GetVehicleRecordPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleRecordPageResponse object =\n new GetVehicleRecordPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleRecordPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleRecordPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleAlarmInfoPageResponse getVehicleAlarmInfoPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleAlarmInfoPage getVehicleAlarmInfoPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName());\n _operationClient.getOptions().setAction(\"urn:getVehicleAlarmInfoPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getVehicleAlarmInfoPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getVehicleAlarmInfoPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleAlarmInfoPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleAlarmInfoPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "public static DirectQueryResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DirectQueryResponse object =\n new DirectQueryResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"directQueryResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DirectQueryResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"directQueryReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setDirectQueryReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setDirectQueryReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\r\n\tpublic void onGetWalkingRouteResult(MKWalkingRouteResult arg0, int arg1) {\n\t\t\r\n\t}", "public net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForMonthResponse terminalDownloadQueryForMonth(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForMonth terminalDownloadQueryForMonth18)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[9].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/terminalDownloadQueryForMonthRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n terminalDownloadQueryForMonth18,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalDownloadQueryForMonth\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalDownloadQueryForMonth\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForMonthResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForMonthResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalDownloadQueryForMonth\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalDownloadQueryForMonth\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalDownloadQueryForMonth\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public RayTracerCallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "public static GetDirectAreaInfoResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDirectAreaInfoResponse object =\n new GetDirectAreaInfoResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDirectAreaInfoResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDirectAreaInfoResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"getDirectAreaInfoReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setGetDirectAreaInfoReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setGetDirectAreaInfoReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "fintech.HistoryResponse.Data getData();", "public abstract void retrain(Call serviceCall, Response serviceResponse, CallContext messageContext);", "Response call(String method, String url, Object payload, Map<String, Object> urlParameters, Map<String, Object> queryParameters) throws OnshapeException {\n URI uri = buildURI(url, urlParameters, queryParameters);\n // Create a WebTarget for the URI\n WebTarget target = client.target(uri);\n Response response;\n Invocation.Builder invocationBuilder = target.request(MediaType.APPLICATION_JSON_TYPE)\n .header(\"Accept\", \"application/vnd.onshape.v1+json\")\n .header(\"Content-Type\", \"application/json\");\n if (token != null) {\n if ((new Date().getTime() - tokenReceived.getTime()) / 1000 > token.getExpiresIn() * 0.9) {\n try {\n refreshOAuthToken();\n } catch (OnshapeException ex) {\n throw new OnshapeException(\"Error while refreshing access token\", ex);\n }\n }\n invocationBuilder = invocationBuilder.header(\"Authorization\", \"Bearer \" + token.getAccessToken());\n } else if (accessKey != null && secretKey != null) {\n invocationBuilder = signature(invocationBuilder, uri, method);\n }\n response = invocationBuilder.method(method.toUpperCase(),\n Entity.entity(\"GET\".equals(method.toUpperCase()) ? null : payload, MediaType.APPLICATION_JSON_TYPE));\n switch (response.getStatusInfo().getFamily()) {\n case SUCCESSFUL:\n return response;\n case REDIRECTION:\n return call(method, response.getHeaderString(\"Location\"), payload, urlParameters, queryParameters);\n default:\n throw new OnshapeException(response.getStatusInfo().getReasonPhrase());\n }\n }", "teledon.network.protobuffprotocol.TeledonProtobufs.TeledonResponse.Type getType();", "public static GetVehicleRecordPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleRecordPage object =\n new GetVehicleRecordPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleRecordPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleRecordPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetVehicleInfoPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleInfoPage object =\n new GetVehicleInfoPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleInfoPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleInfoPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public sample.ws.HelloWorldWSStub.HelloAuthenticatedResponse helloAuthenticated(\n\n sample.ws.HelloWorldWSStub.HelloAuthenticated helloAuthenticated8)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[4].getName());\n _operationClient.getOptions().setAction(\"helloAuthenticated\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n helloAuthenticated8,\n optimizeContent(new javax.xml.namespace.QName(\"http://ws.sample/\",\n \"helloAuthenticated\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n sample.ws.HelloWorldWSStub.HelloAuthenticatedResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (sample.ws.HelloWorldWSStub.HelloAuthenticatedResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "public void startdirectCharge(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectCharge directCharge14,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[7].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directChargeRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directCharge14,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directCharge\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directCharge\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectChargeResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultdirectCharge(\n (net.wit.webservice.TerminalServiceXmlServiceStub.DirectChargeResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrordirectCharge(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directCharge\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directCharge\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directCharge\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectCharge(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectCharge(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectCharge(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectCharge(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectCharge(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectCharge(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectCharge(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrordirectCharge(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrordirectCharge(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrordirectCharge(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrordirectCharge(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrordirectCharge(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[7].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[7].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "Object visitorResponse();", "public void startterminalDownloadQueryForMonth(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForMonth terminalDownloadQueryForMonth18,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[9].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/terminalDownloadQueryForMonthRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n terminalDownloadQueryForMonth18,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalDownloadQueryForMonth\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"terminalDownloadQueryForMonth\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForMonthResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultterminalDownloadQueryForMonth(\n (net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForMonthResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorterminalDownloadQueryForMonth(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalDownloadQueryForMonth\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalDownloadQueryForMonth\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"terminalDownloadQueryForMonth\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalDownloadQueryForMonth(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForMonth(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForMonth(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForMonth(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForMonth(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForMonth(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForMonth(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorterminalDownloadQueryForMonth(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalDownloadQueryForMonth(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorterminalDownloadQueryForMonth(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorterminalDownloadQueryForMonth(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorterminalDownloadQueryForMonth(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[9].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[9].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "public abstract String getResponse();", "@Override\n\t\tpublic void onGetTransitRouteResult(MKTransitRouteResult arg0, int arg1) {\n\t\t\t\n\t\t}", "protected com.android.volley.Response<T> parseNetworkResponse(com.android.volley.NetworkResponse r7) {\n /*\n r6 = this;\n r5 = 1;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"StatusCode=\";\n r0 = r0.append(r1);\n r1 = r7.statusCode;\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = \"infoss\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"code==\";\n r1 = r1.append(r2);\n r2 = r7.statusCode;\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r2 = \"\";\n r0 = r7.statusCode;\n r1 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;\n if (r0 != r1) goto L_0x013e;\n L_0x003b:\n r0 = org.greenrobot.eventbus.c.a();\n r1 = 3;\n r3 = 0;\n r1 = com.jd.fridge.bean.Event.newEvent(r1, r3);\n r0.c(r1);\n r1 = new java.lang.String;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r7.data;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = r7.headers;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r3 = com.android.volley.toolbox.HttpHeaderParser.parseCharset(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r1.<init>(r0, r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x00f0, Exception -> 0x0114 }\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n if (r0 == 0) goto L_0x005e;\n L_0x0059:\n r0 = r6.m;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.a(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x005e:\n r0 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = \"jsonStr===\";\n r0 = r0.append(r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.k.a(r0);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"jsonStr==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r1);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = \"infoss\";\n r2 = new java.lang.StringBuilder;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2.<init>();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = \"gson==\";\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r4 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r3 = r3.fromJson(r1, r4);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.append(r3);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r2.toString();\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n com.jd.fridge.util.r.c(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r6.d;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = r6.e;\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = r0.fromJson(r1, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r2 = com.android.volley.toolbox.HttpHeaderParser.parseCacheHeaders(r7);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n r0 = com.android.volley.Response.success(r0, r2);\t Catch:{ UnsupportedEncodingException -> 0x00bd, JsonSyntaxException -> 0x0187, Exception -> 0x0114 }\n L_0x00bc:\n return r0;\n L_0x00bd:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=1111111=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n L_0x00e6:\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n r0 = com.android.volley.Response.error(r0);\n goto L_0x00bc;\n L_0x00f0:\n r0 = move-exception;\n r1 = r2;\n L_0x00f2:\n r2 = r6.c;\n if (r2 == 0) goto L_0x00fb;\n L_0x00f6:\n r2 = r6.c;\n r2.a(r1);\n L_0x00fb:\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"JsonSyntaxException=222=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x0114:\n r0 = move-exception;\n r0.printStackTrace();\n r1 = r6.f;\n r1.a(r5);\n r1 = new com.jd.fridge.util.a.c;\n r1.<init>(r0);\n com.android.volley.Response.error(r1);\n r1 = \"infoss\";\n r2 = new java.lang.StringBuilder;\n r2.<init>();\n r3 = \"jsonStr=333=\";\n r2 = r2.append(r3);\n r0 = r2.append(r0);\n r0 = r0.toString();\n com.jd.fridge.util.r.c(r1, r0);\n goto L_0x00e6;\n L_0x013e:\n r0 = \"infos\";\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = \"response fail: \";\n r1 = r1.append(r2);\n r2 = r7.data;\n r2 = r2.toString();\n r1 = r1.append(r2);\n r1 = r1.toString();\n com.jd.fridge.util.r.c(r0, r1);\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r1 = \"result=\";\n r0 = r0.append(r1);\n r1 = r7.data;\n r1 = r1.toString();\n r0 = r0.append(r1);\n r0 = r0.toString();\n com.jd.fridge.util.k.a(r0);\n r0 = r6.f;\n r0.a(r5);\n r0 = new com.jd.fridge.util.a.c;\n r0.<init>(r7);\n com.android.volley.Response.error(r0);\n goto L_0x00e6;\n L_0x0187:\n r0 = move-exception;\n goto L_0x00f2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.jd.fridge.util.a.d.parseNetworkResponse(com.android.volley.NetworkResponse):com.android.volley.Response<T>\");\n }", "@SuppressWarnings(\"deprecation\")\n\t\tpublic void doTrend(final StaplerRequest request, final StaplerResponse response) throws IOException, InterruptedException {\n\t\t\t System.out.println(\"inside map\");\n\t\t\t/* AbstractBuild<?, ?> lastBuild = project.getLastBuild();\n\t\t\t while (lastBuild != null && (lastBuild.isBuilding() || lastBuild.getAction(BuildAction.class) == null)) {\n\t\t lastBuild = lastBuild.getPreviousBuild();\n\t\t }\n\t\t\t lastBuild = lastBuild.getPreviousBuild();\n\t\t BuildAction lastAction = lastBuild.getAction(BuildAction.class);*/\n\t\t ChartUtil.generateGraph(\n\t\t request,\n\t\t response,\n\t\t Text_HTMLConverter.buildChart(build),\n\t\t CHART_WIDTH,\n\t\t CHART_HEIGHT);\n\t\t }", "public sample.ws.HelloWorldWSStub.HelloAuthenticatedWithEntitlementPrecheckResponse helloAuthenticatedWithEntitlementPrecheck(\n\n sample.ws.HelloWorldWSStub.HelloAuthenticatedWithEntitlementPrecheck helloAuthenticatedWithEntitlementPrecheck2)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"helloAuthenticatedWithEntitlementPrecheck\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n helloAuthenticatedWithEntitlementPrecheck2,\n optimizeContent(new javax.xml.namespace.QName(\"http://ws.sample/\",\n \"helloAuthenticatedWithEntitlementPrecheck\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n sample.ws.HelloWorldWSStub.HelloAuthenticatedWithEntitlementPrecheckResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (sample.ws.HelloWorldWSStub.HelloAuthenticatedWithEntitlementPrecheckResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "public static void main(String[] args) {\n\t\tString url = \"http://qt.some.co.kr/TrendMap/JSON/ServiceHandler?lang=ko&source=twitter&startDate=20190101&endDate=20190924&keyword=%EC%95%84%EC%9D%B4%ED%8F%B0&topN=100&cutOffFrequencyMin=0&cutOffFrequencyMax=0&period=2&invertRowCol=on&start_weekday=SUNDAY&categorySetName=SM&command=GetAssociationTransitionBySentiment\";\n\t\tInputStream is = null;\n\t\ttry {\n\t\t\tis = new URL(url).openStream(); // URL객체로의 스트림 열기\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is, \"UTF-8\")); // 받는 스트림을 버퍼에 저장\n\t\t\tString str;\n\t\t StringBuffer buffer = new StringBuffer(); // 문자열 연산이나 추가시 객체 공간을 유연하게 동작하기 위함\n\t\t while ((str = br.readLine()) != null) {\n\t\t buffer.append(str);\n\t\t }\n\t\t String b_str = buffer.toString();\n\t\t //System.out.println(\"buffer에 저장된 데이터 : \" + b_str);\n\t\t JSONParser jsonParser = new JSONParser();\n\t\t JSONObject jsonObject = (JSONObject) jsonParser.parse(b_str); // jSONObject 형태로 꺼내와야 하기 때문에 형 변형\n\t\t //System.out.println(\"1번째 jsonObejct = \" + jsonObject);\n\t\t JSONArray jsonArray = (JSONArray) jsonObject.get(\"rows\"); // key값이 rows인 데이터들을 JSONArray에 담는다\n\t\t //System.out.println(\"2번째 jsonArray = \" + jsonArray);\n\t\t for(int i=0; i<jsonArray.size(); i++) { // JSONArray 사이즈 만큼 반복\n\t\t \tJSONObject dataObject = (JSONObject) jsonArray.get(i);\n\t\t \t//System.out.println(\"3번째 jsonObject = \"+ \"(\"+i+\")+\"+ dataObject); // 각각의 데이터를 꺼내오기 위함\n\t\t \tSystem.out.println((i+1)+\"번째 날짜 : \"+dataObject.get(\"date\"));\n\t\t \tSystem.out.println((i+1)+\"번째 데이터 : \"+dataObject.get(\"아이폰\"));\n\t\t \tSystem.out.println(\"----------------------------\");\n\t\t \tJSONObject data = (JSONObject) dataObject.get(\"아이폰\");\n\t\t \tSystem.out.println(\"과연\"+data.get(\"negative\"));\n\t\t }\n\t\t} catch (Exception e) { \n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {is.close();} catch (IOException e) {e.printStackTrace();}\n\t\t}\n\t}", "@Override\n\tpublic void handleResponse() {\n\t\t\n\t}", "public static GetVehicleBookPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleBookPageResponse object =\n new GetVehicleBookPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleBookPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleBookPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public void parseResponse();", "@Override\n\tpublic void getSpendPointsResponseFailed(String arg0) {\n\t\t\n\t}", "@Test\n void requestWithExistingTracingHeaders() throws Exception {\n String method = \"GET\";\n URI uri = resolveAddress(\"/success\");\n\n int responseCode = doRequestWithExistingTracingHeaders(method, uri);\n\n assertThat(responseCode).isEqualTo(200);\n\n testing.waitAndAssertTraces(\n trace -> {\n trace.hasSpansSatisfyingExactly(\n span -> assertClientSpan(span, uri, method, responseCode, null).hasNoParent(),\n span -> assertServerSpan(span).hasParent(trace.getSpan(0)));\n });\n }", "private AuthenticationResult processTokenResponse(HttpWebResponse webResponse, final HttpEvent httpEvent)\n throws AuthenticationException {\n final String methodName = \":processTokenResponse\";\n AuthenticationResult result;\n String correlationIdInHeader = null;\n String speRing = null;\n if (webResponse.getResponseHeaders() != null) {\n if (webResponse.getResponseHeaders().containsKey(\n AuthenticationConstants.AAD.CLIENT_REQUEST_ID)) {\n // headers are returning as a list\n List<String> listOfHeaders = webResponse.getResponseHeaders().get(\n AuthenticationConstants.AAD.CLIENT_REQUEST_ID);\n if (listOfHeaders != null && listOfHeaders.size() > 0) {\n correlationIdInHeader = listOfHeaders.get(0);\n }\n }\n\n if (webResponse.getResponseHeaders().containsKey(AuthenticationConstants.AAD.REQUEST_ID_HEADER)) {\n // headers are returning as a list\n List<String> listOfHeaders = webResponse.getResponseHeaders().get(\n AuthenticationConstants.AAD.REQUEST_ID_HEADER);\n if (listOfHeaders != null && listOfHeaders.size() > 0) {\n Logger.v(TAG + methodName, \"Set request id header. \" + \"x-ms-request-id: \" + listOfHeaders.get(0));\n httpEvent.setRequestIdHeader(listOfHeaders.get(0));\n }\n }\n\n if (null != webResponse.getResponseHeaders().get(X_MS_CLITELEM) && !webResponse.getResponseHeaders().get(X_MS_CLITELEM).isEmpty()) {\n final CliTelemInfo cliTelemInfo =\n TelemetryUtils.parseXMsCliTelemHeader(\n webResponse.getResponseHeaders()\n .get(X_MS_CLITELEM).get(0)\n );\n\n if (null != cliTelemInfo) {\n httpEvent.setXMsCliTelemData(cliTelemInfo);\n speRing = cliTelemInfo.getSpeRing();\n }\n }\n }\n\n final int statusCode = webResponse.getStatusCode();\n\n if (statusCode == HttpURLConnection.HTTP_OK\n || statusCode == HttpURLConnection.HTTP_BAD_REQUEST\n || statusCode == HttpURLConnection.HTTP_UNAUTHORIZED) {\n try {\n result = parseJsonResponse(webResponse.getBody());\n if (result != null) {\n if (null != result.getErrorCode()) {\n result.setHttpResponse(webResponse);\n }\n\n final CliTelemInfo cliTelemInfo = new CliTelemInfo();\n cliTelemInfo._setSpeRing(speRing);\n result.setCliTelemInfo(cliTelemInfo);\n httpEvent.setOauthErrorCode(result.getErrorCode());\n }\n } catch (final JSONException jsonException) {\n throw new AuthenticationException(ADALError.SERVER_INVALID_JSON_RESPONSE,\n \"Can't parse server response. \" + webResponse.getBody(),\n webResponse, jsonException);\n }\n } else if (statusCode >= HttpURLConnection.HTTP_INTERNAL_ERROR && statusCode <= MAX_RESILIENCY_ERROR_CODE) {\n throw new ServerRespondingWithRetryableException(\"Server Error \" + statusCode + \" \"\n + webResponse.getBody(), webResponse);\n } else {\n throw new AuthenticationException(ADALError.SERVER_ERROR,\n \"Unexpected server response \" + statusCode + \" \" + webResponse.getBody(),\n webResponse);\n }\n\n // Set correlationId in the result\n if (correlationIdInHeader != null && !correlationIdInHeader.isEmpty()) {\n try {\n UUID correlation = UUID.fromString(correlationIdInHeader);\n if (!correlation.equals(mRequest.getCorrelationId())) {\n Logger.w(TAG + methodName, \"CorrelationId is not matching\", \"\",\n ADALError.CORRELATION_ID_NOT_MATCHING_REQUEST_RESPONSE);\n }\n\n Logger.v(TAG + methodName, \"Response correlationId:\" + correlationIdInHeader);\n } catch (IllegalArgumentException ex) {\n Logger.e(TAG + methodName, \"Wrong format of the correlation ID:\" + correlationIdInHeader, \"\",\n ADALError.CORRELATION_ID_FORMAT, ex);\n }\n }\n\n if (null != webResponse.getResponseHeaders()) {\n final List<String> xMsCliTelemValues = webResponse.getResponseHeaders().get(X_MS_CLITELEM);\n if (null != xMsCliTelemValues && !xMsCliTelemValues.isEmpty()) {\n // Only one value is expected to be present, so we'll grab the first element...\n final String speValue = xMsCliTelemValues.get(0);\n final CliTelemInfo cliTelemInfo = TelemetryUtils.parseXMsCliTelemHeader(speValue);\n if (result != null) {\n result.setCliTelemInfo(cliTelemInfo);\n }\n }\n }\n\n return result;\n }", "public static DirectOrderStateQueryResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n DirectOrderStateQueryResponse object =\n new DirectOrderStateQueryResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"directOrderStateQueryResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (DirectOrderStateQueryResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"\",\"directOrderStateQueryReturn\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.setDirectOrderStateQueryReturn(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.setDirectOrderStateQueryReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else{\n // A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public net.wit.webservice.TerminalServiceXmlServiceStub.DirectChargeResponse directCharge(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectCharge directCharge14)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[7].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/directChargeRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n directCharge14,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directCharge\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"directCharge\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.DirectChargeResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.DirectChargeResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directCharge\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directCharge\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"directCharge\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public static GetEntrancePage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetEntrancePage object =\n new GetEntrancePage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getEntrancePage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetEntrancePage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "java.lang.String getResponse();", "public static Result\n traceRecursion(PointF vLaserSource, PointF vLaserDir, float fRefractionMultiplier, PointF[] geometry, float[] afRefractiveIndices, float fIntensity, int iRecursionDepth, float fFlightLength){\n\n Result res = new Result();\n //init return lists\n res.lineSegments = new ArrayList<>();\n res.intensities = new ArrayList<>();\n res.lightLengths = new ArrayList<>();\n res.hitIntensities = new ArrayList<>();\n res.hitSegments = new ArrayList<>();\n\n //important for angle calculation\n Vec2D.normalize(vLaserDir);\n\n //recursion limiter\n if(fIntensity < 0.05f || iRecursionDepth > 20)\n return res;\n\n //populate output structure\n res.lineSegments.add(vLaserSource);\n res.intensities.add(fIntensity);\n res.lightLengths.add(fFlightLength);\n\n //initialize to infinity\n float fNearestHit = Float.MAX_VALUE;\n int iHitIndex = -1;\n\n //check each geometry line against this ray\n for (int iLine = 0; iLine < geometry.length/2; iLine++) {\n //check if source on right side\n PointF line0 = geometry[iLine*2];\n PointF line1 = geometry[iLine*2 + 1];\n\n //calculate intersection with geometry line\n float fIntersection = intersectRayLine(vLaserSource, vLaserDir, line0, line1);\n\n if(fIntersection > 0.0f && fIntersection < 1.0f){\n //stuff intersects\n //calculate intersection PointF\n PointF vIntersection = Vec2D.add(line0, Vec2D.mul(fIntersection, Vec2D.subtract(line1, line0)) );\n //calculate distance to source\n float fHitDistance = Vec2D.subtract(vLaserSource, vIntersection).length();\n if(Vec2D.subtract(vLaserSource, vIntersection).length() < fNearestHit && fHitDistance > 0.001f) {\n //new minimum distance\n fNearestHit = fHitDistance;\n iHitIndex = iLine;\n }\n }\n }\n //check if we hit\n if(iHitIndex == -1)\n {\n //bigger than screen\n final float fInfLength = 3.0f;\n res.lineSegments.add(Vec2D.add(vLaserSource, Vec2D.mul(fInfLength, vLaserDir)) );\n res.lightLengths.add(fFlightLength + fInfLength);\n }\n else\n {\n //there was a hit somewhere\n //first re-evaluate\n PointF line0 = geometry[iHitIndex*2];\n PointF line1 = geometry[iHitIndex*2 + 1];\n\n res.hitSegments.add(iHitIndex);\n res.hitIntensities.add(fIntensity);\n //calculate point of impact\n float fIntersection = intersectRayLine(vLaserSource, vLaserDir, line0, line1);\n PointF vIntersection = Vec2D.add(line0, Vec2D.mul(fIntersection, Vec2D.subtract(line1, line0)) );\n\n //spam line end\n res.lineSegments.add(vIntersection);\n float fNextLength = fFlightLength + fNearestHit;\n res.lightLengths.add(fNextLength);\n\n if(afRefractiveIndices[iHitIndex] < 0.0f)\n return res;\n\n //calculate normalized surface normal\n PointF vLine = Vec2D.subtract(line1, line0);\n PointF vSurfaceNormal = Vec2D.flip(Vec2D.perpendicular(vLine));\n Vec2D.normalize(vSurfaceNormal);\n\n //calculate direction of reflection\n PointF vReflected = Vec2D.add(Vec2D.mul(-2.0f, Vec2D.mul(Vec2D.dot(vSurfaceNormal, vLaserDir), vSurfaceNormal)), vLaserDir);\n\n double fImpactAngle = Math.acos(Vec2D.dot(vSurfaceNormal, Vec2D.flip(vLaserDir)));\n\n double fRefractionAngle = 0.0f;\n float fRefracted = 0.0f;\n boolean bTotalReflection = false;\n\n if(afRefractiveIndices[iHitIndex] < 5.0f) {\n //calculate which side of the object we're on\n if (Vec2D.dot(vSurfaceNormal, Vec2D.subtract(vLaserSource, line0)) < 0) {\n //from medium to air\n //angle will become bigger\n double fSinAngle = Math.sin(fImpactAngle) * (afRefractiveIndices[iHitIndex] * fRefractionMultiplier);\n\n if (fSinAngle > 1.0f || fSinAngle < -1.0f)\n //refraction would be back into object\n bTotalReflection = true;\n else {\n //calculate refraction\n fRefractionAngle = Math.asin(fSinAngle);\n float fFlippedImpactAngle = (float) Math.asin(Math.sin(fImpactAngle));\n fRefracted = (float) (2.0f * Math.sin(fFlippedImpactAngle) * Math.cos(fRefractionAngle) / Math.sin(fFlippedImpactAngle + fRefractionAngle));\n\n //set refraction angle for direction calculation\n fRefractionAngle = Math.PI - fRefractionAngle;\n }\n } else {\n //from air to medium\n //angle will become smaller\n fRefractionAngle = Math.asin(Math.sin(fImpactAngle) / (afRefractiveIndices[iHitIndex] * fRefractionMultiplier));\n fRefracted = (float) (2.0f * Math.sin(fRefractionAngle) * Math.cos(fImpactAngle) / Math.sin(fImpactAngle + fRefractionAngle));\n }\n }\n else\n bTotalReflection = true;\n\n //give the refraction angle a sign\n if(Vec2D.dot(vLine, vLaserDir) < 0)\n fRefractionAngle = -fRefractionAngle;\n\n //calculate direction of refraction\n double fInvertedSurfaceAngle = Math.atan2(-vSurfaceNormal.y, -vSurfaceNormal.x);\n PointF vRefracted = new PointF((float)Math.cos(fInvertedSurfaceAngle - fRefractionAngle), (float)Math.sin(fInvertedSurfaceAngle - fRefractionAngle));\n\n //calculate amount of light reflected\n float fReflected = 1.0f - fRefracted;\n\n //continue with recursion, reflection\n Result resReflection = traceRecursion(vIntersection, vReflected, fRefractionMultiplier, geometry, afRefractiveIndices, fReflected * fIntensity, iRecursionDepth+1, fNextLength);\n //merge results\n res.lineSegments.addAll(resReflection.lineSegments);\n res.intensities.addAll(resReflection.intensities);\n res.lightLengths.addAll(resReflection.lightLengths);\n res.hitSegments.addAll(resReflection.hitSegments);\n res.hitIntensities.addAll(resReflection.hitIntensities);\n\n //continue with recursion, refraction\n if(!bTotalReflection) {\n Result resRefraction = traceRecursion(vIntersection, vRefracted, fRefractionMultiplier, geometry, afRefractiveIndices, fRefracted * fIntensity, iRecursionDepth+1, fNextLength);\n //merge results\n res.lineSegments.addAll(resRefraction.lineSegments);\n res.intensities.addAll(resRefraction.intensities);\n res.lightLengths.addAll(resRefraction.lightLengths);\n res.hitSegments.addAll(resRefraction.hitSegments);\n res.hitIntensities.addAll(resRefraction.hitIntensities);\n }\n }\n return res;\n }", "@Override\r\n\tpublic void onGetTransitRouteResult(MKTransitRouteResult arg0, int arg1) {\n\t\t\r\n\t}", "public void startgetDownLoadCard(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDownLoadCard getDownLoadCard20,\n\n final net.wit.webservice.TerminalServiceXmlServiceCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[10].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getDownLoadCardRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDownLoadCard20,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDownLoadCard\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDownLoadCard\"));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDownLoadCardResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultgetDownLoadCard(\n (net.wit.webservice.TerminalServiceXmlServiceStub.GetDownLoadCardResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorgetDownLoadCard(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDownLoadCard\"))){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDownLoadCard\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDownLoadCard\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDownLoadCard(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDownLoadCard(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDownLoadCard(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDownLoadCard(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDownLoadCard(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDownLoadCard(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDownLoadCard(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetDownLoadCard(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDownLoadCard(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorgetDownLoadCard(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorgetDownLoadCard(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorgetDownLoadCard(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[10].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[10].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "@Override\n public Call<List<Span>> getTrace(String traceId) {\n traceId = Span.normalizeTraceId(traceId);\n\n // Unless we are strict, truncate the trace ID to 64bit (encoded as 16 characters)\n if (!strictTraceId && traceId.length() == 32) traceId = traceId.substring(16);\n\n SearchRequest request = SearchRequest.create(asList(allSpanIndices)).term(\"traceId\", traceId);\n return search.newCall(request, BodyConverters.SPANS);\n }", "public interface HandleResponse {\n void downloadComplete(String output, DownloadImageJson.TaskType task);\n void imageDownloadComplete(float scale_x, float scale_y);\n void removeFromTtsList(Boundary b);\n void setUsername(String output);\n}", "public net.wit.webservice.TerminalServiceXmlServiceStub.QqChargeResponse qqCharge(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.QqCharge qqCharge8)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[4].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/qqChargeRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n qqCharge8,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"qqCharge\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"qqCharge\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.QqChargeResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.QqChargeResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"qqCharge\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"qqCharge\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"qqCharge\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public void starthelloAuthenticatedWithEntitlementPrecheck(\n\n sample.ws.HelloWorldWSStub.HelloAuthenticatedWithEntitlementPrecheck helloAuthenticatedWithEntitlementPrecheck2,\n\n final sample.ws.HelloWorldWSCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"helloAuthenticatedWithEntitlementPrecheck\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n helloAuthenticatedWithEntitlementPrecheck2,\n optimizeContent(new javax.xml.namespace.QName(\"http://ws.sample/\",\n \"helloAuthenticatedWithEntitlementPrecheck\")));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n sample.ws.HelloWorldWSStub.HelloAuthenticatedWithEntitlementPrecheckResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResulthelloAuthenticatedWithEntitlementPrecheck(\n (sample.ws.HelloWorldWSStub.HelloAuthenticatedWithEntitlementPrecheckResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(faultElt.getQName())){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Exception ex=\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(java.lang.Exception) exceptionClass.newInstance();\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(f);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorhelloAuthenticatedWithEntitlementPrecheck(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[1].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[1].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "private void onReceivedResponseData(org.apache.http.HttpResponse r14, com.tencent.tmassistantsdk.protocol.jce.DownloadChunkLogInfo r15) {\n /*\n r13 = this;\n r2 = 705; // 0x2c1 float:9.88E-43 double:3.483E-321;\n r6 = 206; // 0xce float:2.89E-43 double:1.02E-321;\n r7 = 0;\n r12 = 0;\n r0 = r14.getEntity();\n r1 = r13.verifyTotalLen(r14, r0);\n if (r1 != 0) goto L_0x0022;\n L_0x0010:\n r0 = \"_DownloadTask\";\n r1 = \"verifyTotalLen false\";\n com.tencent.tmassistantsdk.util.TMLog.i(r0, r1);\n r0 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\n r1 = \"totalLen is not match the requestSize\";\n r0.<init>(r2, r1);\n throw r0;\n L_0x0022:\n r1 = r13.mDownloadInfo;\n r2 = r1.getTotalSize();\n r4 = 0;\n r1 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r1 != 0) goto L_0x015c;\n L_0x002e:\n r1 = r14.getStatusLine();\n r1 = r1.getStatusCode();\n r2 = 200; // 0xc8 float:2.8E-43 double:9.9E-322;\n if (r1 != r2) goto L_0x00f9;\n L_0x003a:\n r1 = r13.mDownloadInfo;\n r2 = r0.getContentLength();\n r1.setTotalSize(r2);\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\n r3 = \"HTTPCode 200, totalBytes:\";\n r2.<init>(r3);\n r3 = r13.mDownloadInfo;\n r4 = r3.getTotalSize();\n r2 = r2.append(r4);\n r2 = r2.toString();\n com.tencent.tmassistantsdk.util.TMLog.i(r1, r2);\n L_0x005f:\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\n r3 = \"first start downloadinfoTotalSize = \";\n r2.<init>(r3);\n r3 = r13.mDownloadInfo;\n r4 = r3.getTotalSize();\n r2 = r2.append(r4);\n r2 = r2.toString();\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r2);\n r1 = \"content-range\";\n r1 = r14.getFirstHeader(r1);\n if (r1 == 0) goto L_0x00a0;\n L_0x0084:\n r1 = r1.getValue();\n r1 = com.tencent.tmassistantsdk.downloadservice.ByteRange.parseContentRange(r1);\n r2 = r1.getStart();\n r15.responseRangePosition = r2;\n r2 = r1.getEnd();\n r4 = r1.getStart();\n r2 = r2 - r4;\n r4 = 1;\n r2 = r2 + r4;\n r15.responseRangeLength = r2;\n L_0x00a0:\n r1 = r13.mDownloadInfo;\n r2 = r1.getTotalSize();\n r15.responseContentLength = r2;\n L_0x00a8:\n r1 = r13.mSaveFile;\n if (r1 != 0) goto L_0x00bb;\n L_0x00ac:\n r1 = new com.tencent.tmassistantsdk.storage.TMAssistantFile;\n r2 = r13.mDownloadInfo;\n r2 = r2.mTempFileName;\n r3 = r13.mDownloadInfo;\n r3 = r3.mFileName;\n r1.<init>(r2, r3);\n r13.mSaveFile = r1;\n L_0x00bb:\n r2 = 0;\n r10 = r0.getContent();\t Catch:{ SocketException -> 0x0406 }\n r0 = \"_DownloadTask\";\n r1 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x0406 }\n r4 = \"start write file, fileName: \";\n r1.<init>(r4);\t Catch:{ SocketException -> 0x0406 }\n r4 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x0406 }\n r4 = r4.mFileName;\t Catch:{ SocketException -> 0x0406 }\n r1 = r1.append(r4);\t Catch:{ SocketException -> 0x0406 }\n r1 = r1.toString();\t Catch:{ SocketException -> 0x0406 }\n com.tencent.tmassistantsdk.util.TMLog.i(r0, r1);\t Catch:{ SocketException -> 0x0406 }\n r8 = r2;\n L_0x00dc:\n r0 = r13.mRecvBuf;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = r10.read(r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r3 <= 0) goto L_0x00eb;\n L_0x00e4:\n r0 = r13.mStopTask;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r0 == 0) goto L_0x0262;\n L_0x00e8:\n r10.close();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x00eb:\n r0 = r13.mSaveFile;\n if (r0 == 0) goto L_0x00f6;\n L_0x00ef:\n r0 = r13.mSaveFile;\n r0.close();\n r13.mSaveFile = r12;\n L_0x00f6:\n r15.receiveDataSize = r8;\n return;\n L_0x00f9:\n r1 = r14.getStatusLine();\n r1 = r1.getStatusCode();\n if (r1 != r6) goto L_0x0135;\n L_0x0103:\n r1 = \"content-range\";\n r1 = r14.getFirstHeader(r1);\n r2 = r13.mDownloadInfo;\n r1 = r1.getValue();\n r4 = com.tencent.tmassistantsdk.downloadservice.ByteRange.getTotalSize(r1);\n r2.setTotalSize(r4);\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\n r3 = \"HTTPCode 206, totalBytes:\";\n r2.<init>(r3);\n r3 = r13.mDownloadInfo;\n r4 = r3.getTotalSize();\n r2 = r2.append(r4);\n r2 = r2.toString();\n com.tencent.tmassistantsdk.util.TMLog.i(r1, r2);\n goto L_0x005f;\n L_0x0135:\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\n r3 = \"statusCode=\";\n r2.<init>(r3);\n r3 = r14.getStatusLine();\n r3 = r3.getStatusCode();\n r2 = r2.append(r3);\n r3 = \" onReceivedResponseData error.\";\n r2 = r2.append(r3);\n r2 = r2.toString();\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r2);\n goto L_0x005f;\n L_0x015c:\n r1 = r14.getStatusLine();\n r1 = r1.getStatusCode();\n if (r1 != r6) goto L_0x00a8;\n L_0x0166:\n r1 = \"content-range\";\n r1 = r14.getFirstHeader(r1);\t Catch:{ Throwable -> 0x0214 }\n r2 = r1.getValue();\t Catch:{ Throwable -> 0x0214 }\n r2 = com.tencent.tmassistantsdk.downloadservice.ByteRange.parseContentRange(r2);\t Catch:{ Throwable -> 0x0214 }\n r3 = r1.getValue();\t Catch:{ Throwable -> 0x0214 }\n r4 = com.tencent.tmassistantsdk.downloadservice.ByteRange.getTotalSize(r3);\t Catch:{ Throwable -> 0x0214 }\n r8 = r2.getStart();\t Catch:{ Throwable -> 0x0214 }\n r15.responseRangePosition = r8;\t Catch:{ Throwable -> 0x0214 }\n r8 = r2.getEnd();\t Catch:{ Throwable -> 0x0214 }\n r10 = r2.getStart();\t Catch:{ Throwable -> 0x0214 }\n r8 = r8 - r10;\n r10 = 1;\n r8 = r8 + r10;\n r15.responseRangeLength = r8;\t Catch:{ Throwable -> 0x0214 }\n r15.responseContentLength = r4;\t Catch:{ Throwable -> 0x0214 }\n r3 = \"_DownloadTask\";\n r6 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x0214 }\n r8 = \"totalSize = \";\n r6.<init>(r8);\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r4);\t Catch:{ Throwable -> 0x0214 }\n r8 = \" downloadinfoTotalSize = \";\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = r13.mDownloadInfo;\t Catch:{ Throwable -> 0x0214 }\n r8 = r8.getTotalSize();\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.toString();\t Catch:{ Throwable -> 0x0214 }\n com.tencent.tmassistantsdk.util.TMLog.w(r3, r6);\t Catch:{ Throwable -> 0x0214 }\n r3 = \"_DownloadTask\";\n r6 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x0214 }\n r8 = \"mReceivedBytes = \";\n r6.<init>(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = r13.mDownloadInfo;\t Catch:{ Throwable -> 0x0214 }\n r8 = r8.mReceivedBytes;\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.toString();\t Catch:{ Throwable -> 0x0214 }\n com.tencent.tmassistantsdk.util.TMLog.i(r3, r6);\t Catch:{ Throwable -> 0x0214 }\n r3 = \"_DownloadTask\";\n r6 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x0214 }\n r8 = \"start = \";\n r6.<init>(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = r2.getStart();\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = \", end = \";\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r8 = r2.getEnd();\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.append(r8);\t Catch:{ Throwable -> 0x0214 }\n r6 = r6.toString();\t Catch:{ Throwable -> 0x0214 }\n com.tencent.tmassistantsdk.util.TMLog.i(r3, r6);\t Catch:{ Throwable -> 0x0214 }\n r2 = r2.getStart();\t Catch:{ Throwable -> 0x0214 }\n r6 = r13.mDownloadInfo;\t Catch:{ Throwable -> 0x0214 }\n r8 = r6.mReceivedBytes;\t Catch:{ Throwable -> 0x0214 }\n r2 = (r2 > r8 ? 1 : (r2 == r8 ? 0 : -1));\n if (r2 == 0) goto L_0x022a;\n L_0x0209:\n r0 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ Throwable -> 0x0214 }\n r1 = 706; // 0x2c2 float:9.9E-43 double:3.49E-321;\n r2 = \"The received size is not equal with ByteRange.\";\n r0.<init>(r1, r2);\t Catch:{ Throwable -> 0x0214 }\n throw r0;\t Catch:{ Throwable -> 0x0214 }\n L_0x0214:\n r0 = move-exception;\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ all -> 0x021d }\n r2 = 704; // 0x2c0 float:9.87E-43 double:3.48E-321;\n r1.<init>(r2, r0);\t Catch:{ all -> 0x021d }\n throw r1;\t Catch:{ all -> 0x021d }\n L_0x021d:\n r0 = move-exception;\n r1 = r13.mSaveFile;\n if (r1 == 0) goto L_0x0229;\n L_0x0222:\n r1 = r13.mSaveFile;\n r1.close();\n r13.mSaveFile = r12;\n L_0x0229:\n throw r0;\n L_0x022a:\n r2 = r13.mDownloadInfo;\t Catch:{ Throwable -> 0x0214 }\n r2 = r2.getTotalSize();\t Catch:{ Throwable -> 0x0214 }\n r2 = (r4 > r2 ? 1 : (r4 == r2 ? 0 : -1));\n if (r2 == 0) goto L_0x023f;\n L_0x0234:\n r0 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ Throwable -> 0x0214 }\n r1 = 705; // 0x2c1 float:9.88E-43 double:3.483E-321;\n r2 = \"The total size is not equal with ByteRange.\";\n r0.<init>(r1, r2);\t Catch:{ Throwable -> 0x0214 }\n throw r0;\t Catch:{ Throwable -> 0x0214 }\n L_0x023f:\n r2 = \"_DownloadTask\";\n r3 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x0214 }\n r4 = \"response ByteRange: \";\n r3.<init>(r4);\t Catch:{ Throwable -> 0x0214 }\n r1 = r3.append(r1);\t Catch:{ Throwable -> 0x0214 }\n r1 = r1.toString();\t Catch:{ Throwable -> 0x0214 }\n com.tencent.tmassistantsdk.util.TMLog.d(r2, r1);\t Catch:{ Throwable -> 0x0214 }\n r1 = r13.mSaveFile;\n if (r1 == 0) goto L_0x00a8;\n L_0x0259:\n r1 = r13.mSaveFile;\n r1.close();\n r13.mSaveFile = r12;\n goto L_0x00a8;\n L_0x0262:\n r0 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = (long) r3;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0 + r4;\n r2 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r2.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = (r0 > r4 ? 1 : (r0 == r4 ? 0 : -1));\n if (r2 > 0) goto L_0x03be;\n L_0x0272:\n r2 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r2.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = (r0 > r4 ? 1 : (r0 == r4 ? 0 : -1));\n if (r0 != 0) goto L_0x0315;\n L_0x027c:\n r6 = 1;\n L_0x027d:\n r0 = r13.mSaveFile;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mRecvBuf;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 0;\n r4 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r4.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.write(r1, r2, r3, r4, r6);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r0 != 0) goto L_0x03b4;\n L_0x028c:\n r0 = com.tencent.tmassistantsdk.storage.TMAssistantFile.getSavePathRootDir();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r1.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = com.tencent.tmassistantsdk.downloadservice.DownloadHelper.isSpaceEnough(r0, r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r0 == 0) goto L_0x0367;\n L_0x029c:\n r0 = com.tencent.tmassistantsdk.storage.TMAssistantFile.isSDCardExistAndCanWrite();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n if (r0 == 0) goto L_0x0318;\n L_0x02a2:\n r0 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"write file failed, fileName: \";\n r0.<init>(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r1.mFileName;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" receivedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r1.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" readedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" totalSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r1.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r2);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.toString();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"_DownloadTask\";\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 703; // 0x2bf float:9.85E-43 double:3.473E-321;\n r1.<init>(r2, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n throw r1;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x02ef:\n r0 = move-exception;\n r2 = r8;\n L_0x02f1:\n r1 = \"_DownloadTask\";\n r4 = \"\";\n r5 = 0;\n r5 = new java.lang.Object[r5];\t Catch:{ all -> 0x0305 }\n com.tencent.mm.sdk.platformtools.w.printErrStackTrace(r1, r0, r4, r5);\t Catch:{ all -> 0x0305 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ all -> 0x0305 }\n r4 = 605; // 0x25d float:8.48E-43 double:2.99E-321;\n r1.<init>(r4, r0);\t Catch:{ all -> 0x0305 }\n throw r1;\t Catch:{ all -> 0x0305 }\n L_0x0305:\n r0 = move-exception;\n r8 = r2;\n L_0x0307:\n r1 = r13.mSaveFile;\n if (r1 == 0) goto L_0x0312;\n L_0x030b:\n r1 = r13.mSaveFile;\n r1.close();\n r13.mSaveFile = r12;\n L_0x0312:\n r15.receiveDataSize = r8;\n throw r0;\n L_0x0315:\n r6 = r7;\n goto L_0x027d;\n L_0x0318:\n r0 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"write file failed, no sdCard! fileName: \";\n r0.<init>(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r1.mFileName;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" receivedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r1.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" readedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" totalSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r1.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r2);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.toString();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"_DownloadTask\";\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 711; // 0x2c7 float:9.96E-43 double:3.513E-321;\n r1.<init>(r2, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n throw r1;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x0365:\n r0 = move-exception;\n goto L_0x0307;\n L_0x0367:\n r0 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"write file failed, no enough space! fileName: \";\n r0.<init>(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r1.mFileName;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" receivedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r1.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" readedSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \" totalSize: \";\n r0 = r0.append(r1);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r1.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.append(r2);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = r0.toString();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = \"_DownloadTask\";\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 710; // 0x2c6 float:9.95E-43 double:3.51E-321;\n r1.<init>(r2, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n throw r1;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x03b4:\n r0 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = (long) r3;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0.updateReceivedSize(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r0 = (long) r3;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r8 = r8 + r0;\n goto L_0x00dc;\n L_0x03be:\n r0 = \"write file size too long.\";\n r1 = \"_DownloadTask\";\n r2 = new java.lang.StringBuilder;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = \"write file size too long.\\r\\nreadedLen: \";\n r2.<init>(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r2.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = \"\\r\\nreceivedSize: \";\n r2 = r2.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r3.mReceivedBytes;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r2.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = \"\\r\\ntotalSize: \";\n r2 = r2.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = r13.mDownloadInfo;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r4 = r3.getTotalSize();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r2.append(r4);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r3 = \"\\r\\nisTheEndData: false\";\n r2 = r2.append(r3);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = r2.toString();\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n com.tencent.tmassistantsdk.util.TMLog.w(r1, r2);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r1 = new com.tencent.tmassistantsdk.downloadservice.StopRequestException;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n r2 = 703; // 0x2bf float:9.85E-43 double:3.473E-321;\n r1.<init>(r2, r0);\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n throw r1;\t Catch:{ SocketException -> 0x02ef, all -> 0x0365 }\n L_0x0406:\n r0 = move-exception;\n goto L_0x02f1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.tmassistantsdk.downloadservice.DownloadTask.onReceivedResponseData(org.apache.http.HttpResponse, com.tencent.tmassistantsdk.protocol.jce.DownloadChunkLogInfo):void\");\n }", "private StaticPacketTrace getTrace(List<ConnectPoint> completePath, ConnectPoint in, StaticPacketTrace trace,\n boolean isDualHomed) {\n\n log.debug(\"------------------------------------------------------------\");\n\n //if the trace already contains the input connect point there is a loop\n if (pathContainsDevice(completePath, in.deviceId())) {\n trace.addResultMessage(\"Loop encountered in device \" + in.deviceId());\n completePath.add(in);\n trace.addCompletePath(completePath);\n trace.setSuccess(false);\n return trace;\n }\n\n //let's add the input connect point\n completePath.add(in);\n\n //If the trace has no outputs for the given input we stop here\n if (trace.getHitChains(in.deviceId()) == null) {\n TroubleshootUtils.computePath(completePath, trace, null);\n trace.addResultMessage(\"No output out of device \" + in.deviceId() + \". Packet is dropped\");\n trace.setSuccess(false);\n return trace;\n }\n\n //If the trace has outputs we analyze them all\n for (PipelineTraceableHitChain outputPath : trace.getHitChains(in.deviceId())) {\n\n ConnectPoint cp = outputPath.outputPort();\n log.debug(\"Connect point in {}\", in);\n log.debug(\"Output path {}\", cp);\n log.debug(\"{}\", outputPath.egressPacket());\n\n if (outputPath.isDropped()) {\n continue;\n }\n\n //Hosts for the the given output\n Set<Host> hostsList = hostNib.getConnectedHosts(cp);\n //Hosts queried from the original ip or mac\n Set<Host> hosts = getHosts(trace);\n\n if (in.equals(cp) && trace.getInitialPacket().getCriterion(Criterion.Type.VLAN_VID) != null &&\n outputPath.egressPacket().packet().getCriterion(Criterion.Type.VLAN_VID) != null\n && ((VlanIdCriterion) trace.getInitialPacket().getCriterion(Criterion.Type.VLAN_VID)).vlanId()\n .equals(((VlanIdCriterion) outputPath.egressPacket()\n .packet().getCriterion(Criterion.Type.VLAN_VID)).vlanId())) {\n if (trace.getHitChains(in.deviceId()).size() == 1 &&\n TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort())) {\n trace.addResultMessage(\"Connect point out \" + cp + \" is same as initial input \" + in);\n trace.setSuccess(false);\n }\n } else if (!Collections.disjoint(hostsList, hosts)) {\n //If the two host collections contain the same item it means we reached the proper output\n log.debug(\"Stopping here because host is expected destination, reached through {}\", completePath);\n if (TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort())) {\n trace.addResultMessage(\"Reached required destination Host \" + cp);\n trace.setSuccess(true);\n }\n break;\n\n } else if (cp.port().equals(PortNumber.CONTROLLER)) {\n //Getting the master when the packet gets sent as packet in\n NodeId master = mastershipNib.getMasterFor(cp.deviceId());\n // TODO if we don't need to print master node id, exclude mastership NIB which is used only here\n trace.addResultMessage(PACKET_TO_CONTROLLER + \" \" + master.id());\n TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort());\n } else if (linkNib.getEgressLinks(cp).size() > 0) {\n //TODO this can be optimized if we use a Tree structure for paths.\n //if we already have outputs let's check if the one we are considering starts from one of the devices\n // in any of the ones we have.\n if (trace.getCompletePaths().size() > 0) {\n ConnectPoint inputForOutput = null;\n List<ConnectPoint> previousPath = new ArrayList<>();\n for (List<ConnectPoint> path : trace.getCompletePaths()) {\n for (ConnectPoint connect : path) {\n //if the path already contains the input for the output we've found we use it\n if (connect.equals(in)) {\n inputForOutput = connect;\n previousPath = path;\n break;\n }\n }\n }\n\n //we use the pre-existing path up to the point we fork to a new output\n if (inputForOutput != null && completePath.contains(inputForOutput)) {\n List<ConnectPoint> temp = new ArrayList<>(previousPath);\n temp = temp.subList(0, previousPath.indexOf(inputForOutput) + 1);\n if (completePath.containsAll(temp)) {\n completePath = temp;\n }\n }\n }\n\n //let's add the ouput for the input\n completePath.add(cp);\n //let's compute the links for the given output\n Set<Link> links = linkNib.getEgressLinks(cp);\n log.debug(\"Egress Links {}\", links);\n //For each link we trace the corresponding device\n for (Link link : links) {\n ConnectPoint dst = link.dst();\n //change in-port to the dst link in port\n Builder updatedPacket = DefaultTrafficSelector.builder();\n outputPath.egressPacket().packet().criteria().forEach(updatedPacket::add);\n updatedPacket.add(Criteria.matchInPort(dst.port()));\n log.debug(\"DST Connect Point {}\", dst);\n //build the elements for that device\n traceInDevice(trace, updatedPacket.build(), dst, isDualHomed, completePath);\n //continue the trace along the path\n getTrace(completePath, dst, trace, isDualHomed);\n }\n } else if (edgePortNib.isEdgePoint(outputPath.outputPort()) &&\n trace.getInitialPacket().getCriterion(Criterion.Type.ETH_DST) != null &&\n ((EthCriterion) trace.getInitialPacket().getCriterion(Criterion.Type.ETH_DST))\n .mac().isMulticast()) {\n trace.addResultMessage(\"Packet is multicast and reached output \" + outputPath.outputPort() +\n \" which is enabled and is edge port\");\n trace.setSuccess(true);\n TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort());\n if (!hasOtherOutput(in.deviceId(), trace, outputPath.outputPort())) {\n return trace;\n }\n } else if (deviceNib.getPort(cp) != null && deviceNib.getPort(cp).isEnabled()) {\n EthTypeCriterion ethTypeCriterion = (EthTypeCriterion) trace.getInitialPacket()\n .getCriterion(Criterion.Type.ETH_TYPE);\n //We treat as correct output only if it's not LLDP or BDDP\n if (!(ethTypeCriterion.ethType().equals(EtherType.LLDP.ethType())\n && !ethTypeCriterion.ethType().equals(EtherType.BDDP.ethType()))) {\n if (TroubleshootUtils.computePath(completePath, trace, outputPath.outputPort())) {\n if (hostsList.isEmpty()) {\n trace.addResultMessage(\"Packet is \" + ((EthTypeCriterion) outputPath.egressPacket()\n .packet().getCriterion(Criterion.Type.ETH_TYPE)).ethType() + \" and reached \" +\n cp + \" with no hosts connected \");\n } else {\n IpAddress ipAddress = null;\n if (trace.getInitialPacket().getCriterion(Criterion.Type.IPV4_DST) != null) {\n ipAddress = ((IPCriterion) trace.getInitialPacket()\n .getCriterion(Criterion.Type.IPV4_DST)).ip().address();\n } else if (trace.getInitialPacket().getCriterion(Criterion.Type.IPV6_DST) != null) {\n ipAddress = ((IPCriterion) trace.getInitialPacket()\n .getCriterion(Criterion.Type.IPV6_DST)).ip().address();\n }\n if (ipAddress != null) {\n IpAddress finalIpAddress = ipAddress;\n if (hostsList.stream().anyMatch(host -> host.ipAddresses().contains(finalIpAddress)) ||\n hostNib.getHostsByIp(finalIpAddress).isEmpty()) {\n trace.addResultMessage(\"Packet is \" +\n ((EthTypeCriterion) outputPath.egressPacket().packet()\n .getCriterion(Criterion.Type.ETH_TYPE)).ethType() +\n \" and reached \" + cp + \" with hosts \" + hostsList);\n } else {\n trace.addResultMessage(\"Wrong output \" + cp + \" for required destination ip \" +\n ipAddress);\n trace.setSuccess(false);\n }\n } else {\n trace.addResultMessage(\"Packet is \" + ((EthTypeCriterion) outputPath.egressPacket()\n .packet().getCriterion(Criterion.Type.ETH_TYPE)).ethType()\n + \" and reached \" + cp + \" with hosts \" + hostsList);\n }\n }\n trace.setSuccess(true);\n }\n }\n\n } else {\n TroubleshootUtils.computePath(completePath, trace, cp);\n trace.setSuccess(false);\n if (deviceNib.getPort(cp) == null) {\n //Port is not existent on device.\n log.warn(\"Port {} is not available on device.\", cp);\n trace.addResultMessage(\"Port \" + cp + \"is not available on device. Packet is dropped\");\n } else {\n //No links means that the packet gets dropped.\n log.warn(\"No links out of {}\", cp);\n trace.addResultMessage(\"No links depart from \" + cp + \". Packet is dropped\");\n }\n }\n }\n return trace;\n }", "private void handleExceptions(Exception e,String uri) throws ServiceProxyException {\n \n //Step 1: Is error AdfInvocationRuntimeException, AdfInvocationException or AdfException? \n String exceptionPrimaryMessage = e.getLocalizedMessage();\n String exceptionSecondaryMessage = e.getCause() != null? e.getCause().getLocalizedMessage() : null;\n String combinedExceptionMessage = \"primary message:\"+exceptionPrimaryMessage+(exceptionSecondaryMessage!=null?(\"; secondary message: \"+exceptionSecondaryMessage):(\"\"));\n \n //chances are this is the Oracle MCS erro message. If so then ths message has a JSON format. A simple JSON parsing \n //test will show if our assumption is true. If JSONObject parsing fails then apparently the message is not the MCS\n //error message\n //{\n // \"type\":\".....\",\n // * \"status\": <error_code>,\n // * \"title\": \"<short description of the error>\",\n // * \"detail\": \"<long description of the error>\",\n // * \"o:ecid\": \"...\",\n // * \"o:errorCode\": \"MOBILE-<MCS error number here>\",\n // * \"o:errorPath\": \"<URI of the request>\"\n // }\n if(exceptionSecondaryMessage!=null){\n try {\n JSONObject jsonErrorObject = new JSONObject(exceptionSecondaryMessage);\n //if we get here, then its a Oracle MCS error JSON Object. Get the \n //status code or set it to 0 (means none is found)\n int statusCode = jsonErrorObject.optInt(\"status\", 0);\n throw new ServiceProxyException(statusCode, exceptionSecondaryMessage);\n \n } catch (JSONException jse) {\n //if parsing fails, the this is proof enough that the error message is not \n //an Oracle MCS message and we need to continue our analysis\n \n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Exception message is not a Oracle MCS error JSONObject\", this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n } \n }\n \n //continue message analysis and check for known error codes for the references MCS API\n \n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Rest invocation failed with following message\"+exceptionPrimaryMessage, this.getClass().getSimpleName(), \"getCurrentUserInformation\");\n \n int httpErrorCode = -1; \n String restoredOracleMcsErrorMessage = null;\n \n /*\n * Try to identify an MCS failure from the exception message.\n */\n if(combinedExceptionMessage.contains(\"400\")){\n httpErrorCode = 400; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(400, \"Invalid JSON payload\", \"One of the following problems occurred: \" +\n \"the user does not exist, the JSON is invalid, or a property was not found.\", uri);\n }\n else if(combinedExceptionMessage.contains(\"401\")){\n httpErrorCode = 401; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(401, \"Authorization failure\", \"The user is not authorized to retrieve the information for another user.\",uri); \n }\n else if(combinedExceptionMessage.contains(\"403\")){\n httpErrorCode = 404; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(403, \"Functionality is not supported\", \"Functionality is not supported.\",uri); \n }\n else if(combinedExceptionMessage.contains(\"403\")){\n httpErrorCode = 404; \n restoredOracleMcsErrorMessage =\n OracleMobileErrorHelper.createOracleMobileErrorJson(404, \"User not found\", \"The user with the specified ID does not exist.\",uri);\n }\n \n else{\n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Request failed with Exception: \"+e.getClass().getSimpleName()+\"; message: \"+e.getLocalizedMessage(), this.getClass().getSimpleName(), \"handleExcpetion\");\n throw new ServiceProxyException(e.getLocalizedMessage(), ServiceProxyException.ERROR);\n }\n //if we get here then again its an Oracle MCS error, though one we found by inspecting the exception message\n this.getMbe().getMbeConfiguration().getLogger().logFine(\"Request succeeded successful but failed with MCS application error. HTTP response: \"+httpErrorCode+\", Error message: \"+restoredOracleMcsErrorMessage, this.getClass().getSimpleName(), \"handleExcpetion\");\n throw new ServiceProxyException(httpErrorCode, restoredOracleMcsErrorMessage);\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray timeline) {\n }", "@Override\n public void onResponse(final Transaction transaction, final String requestId, final PoyntError poyntError) throws RemoteException {\n if (Boolean.TRUE.equals(transaction.getFundingSource().isDebit())) {\n listener.onResponse(transaction, requestId, null);\n return;\n }\n\n // update in converge\n final ElavonTransactionRequest request = convergeMapper.getTransactionUpdateRequest(\n transaction.getFundingSource().getEntryDetails(),\n transaction.getProcessorResponse().getRetrievalRefNum(),\n adjustTransactionRequest);\n convergeService.update(request, new ConvergeCallback<ElavonTransactionResponse>() {\n @Override\n public void onResponse(final ElavonTransactionResponse elavonResponse) {\n try {\n if (elavonResponse.isSuccess()) {\n // if it's MSR and if we have signature it's a separate call\n if (transaction.getFundingSource().getEntryDetails().getEntryMode() == EntryMode.TRACK_DATA_FROM_MAGSTRIPE\n && adjustTransactionRequest.getSignature() != null) {\n updateSignature(transaction, adjustTransactionRequest, requestId, listener);\n } else {\n listener.onResponse(transaction, requestId, null);\n }\n } else {\n listener.onResponse(transaction, requestId, new PoyntError(PoyntError.CODE_API_ERROR));\n }\n } catch (final RemoteException e) {\n Log.e(TAG, \"Failed to respond\", e);\n }\n }\n\n @Override\n public void onFailure(final Throwable t) {\n final PoyntError error = new PoyntError(PoyntError.CODE_API_ERROR);\n error.setThrowable(t);\n try {\n listener.onResponse(transaction, requestId, error);\n } catch (final RemoteException e) {\n Log.e(TAG, \"Failed to respond\", e);\n }\n }\n });\n }", "private void getTreeOperation(OperationResponse response, ObjectIdData requestData) throws ConnectorException {\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tint httpStatusCode = 200;\n\t\t\n\t\tLogger.severe(this.getContext().getObjectTypeId());\n\t\trestWrapper = MapsHelpers.initRestWrapperAndLogin(getContext());\n\t\t\n\t\tif ( restWrapper != null ) {\n\t\t\tTreeDTO[] loy = restWrapper.getListOfYears();\n\t\t\thttpStatusCode = restWrapper.getHttpClient().getLastStatus();\n\t\t\t\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\tmapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n\t\t\tmapper.setDateFormat(df);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tString jsonInString = mapper.writeValueAsString(loy);\n//\t\t\t\tLogger.severe(jsonInString);\n\t\t\t\t\n\t\t\t\tResponseUtil.addSuccess(response, requestData, String.valueOf(httpStatusCode), ResponseUtil.toPayload(jsonInString));\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t\t\n\t\t\t} catch (JsonProcessingException e) {\n\t\t\t\tLogger.log(Level.SEVERE, \"An error\", e);\n\t\t\t\tthrow new ConnectorException(e);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tresponse.addResult(requestData, OperationStatus.FAILURE, null, \"Authentication failed\", null);\n\t\t}\n\t}", "public abstract void onReceiveResponse(ExchangeContext context);", "public static GetVehicleBookPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleBookPage object =\n new GetVehicleBookPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleBookPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleBookPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\r\n\t public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution)\r\n\t throws IOException {\n\t\t StringBuffer finalBuffer = new StringBuffer();\r\n\t\t finalBuffer.append(System.lineSeparator());\r\n\t\t try\r\n\t\t\t {\r\n\t\t\t finalBuffer.append(\"request URI: \" + request.getMethod() + \" \" + request.getURI());\r\n\t\t\t\t HashMap<String, String> headersMap = new HashMap<String, String>();\r\n\t\t\t\t HttpHeaders httpHeaders = request.getHeaders();\r\n\t\t\t\t Set<String> headerNameSet = httpHeaders.keySet();\r\n\t\t\t\t for(String headerName : headerNameSet)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(HttpHeaders.ACCEPT_CHARSET.equalsIgnoreCase(headerName))\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t continue;\r\n\t\t\t\t\t }\r\n\t\t\t\t\t List list = httpHeaders.get(headerName);\r\n\t\t\t\t\t StringBuffer headerValue = new StringBuffer();\r\n\t\t\t\t\t if(list != null && list.size() > 0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t for(int i = 0; i < list.size(); i ++)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t if(i == 0)\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t headerValue.append(list.get(i));\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t else\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t headerValue.append(\";\"+list.get(i));\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t }\r\n\t\t\t\t\t headersMap.put(headerName, headerValue.toString());\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t String json = new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(headersMap);\r\n\t\t\t\t finalBuffer.append(System.lineSeparator()).append(\"request headers: \" + json);\r\n\t\t\t\t finalBuffer.append(System.lineSeparator()).append(\"request body: \"+ getRequestBody(body));\t \r\n\t\t\t }\r\n\t\t catch(Exception e)\r\n\t\t\t {\r\n\t\t \t logger.error(\"traceRequest got exception:\"+e.getMessage());\r\n\t\t\t }\r\n\t\t \r\n\t ClientHttpResponse clientHttpResponse = execution.execute(request, body);\r\n\t BufferingClientHttpResponseWrapper bufferingClientHttpResponseWrapper = new BufferingClientHttpResponseWrapper(clientHttpResponse);\r\n\r\n\t try\r\n\t\t {\r\n\t \t finalBuffer.append(System.lineSeparator()).append(\"response status code: \" + clientHttpResponse.getRawStatusCode());\r\n\t \t finalBuffer.append(System.lineSeparator()).append(\"response body: \" + getBodyString(bufferingClientHttpResponseWrapper));\r\n\t\t }\r\n\t\t catch(Exception e)\r\n\t\t {\r\n\t \t logger.error(\"traceResponse got exception:\"+e.getMessage());\r\n\t\t }\r\n\t logger.debug(finalBuffer.toString());\r\n\t return clientHttpResponse;\r\n\t }", "public net.wit.webservice.TerminalServiceXmlServiceStub.GetDownLoadCardResponse getDownLoadCard(\n\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDownLoadCard getDownLoadCard20)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[10].getName());\n _operationClient.getOptions().setAction(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml/TerminalServiceXml/getDownLoadCardRequest\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getDownLoadCard20,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDownLoadCard\")), new javax.xml.namespace.QName(\"http://www.epaylinks.cn/webservice/services/TerminalServiceXml\",\n \"getDownLoadCard\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n net.wit.webservice.TerminalServiceXmlServiceStub.GetDownLoadCardResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (net.wit.webservice.TerminalServiceXmlServiceStub.GetDownLoadCardResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDownLoadCard\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDownLoadCard\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"getDownLoadCard\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "public static GetDictionaryPageResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetDictionaryPageResponse object =\n new GetDictionaryPageResponse();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getDictionaryPageResponse\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetDictionaryPageResponse)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"return\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\n object.set_return(null);\n reader.next();\n \n reader.next();\n \n }else{\n \n object.set_return(WsPmsResult.Factory.parse(reader));\n \n reader.next();\n }\n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }" ]
[ "0.688146", "0.60656744", "0.58866656", "0.5627237", "0.5627237", "0.55880964", "0.5580267", "0.54999274", "0.54999274", "0.534245", "0.5332546", "0.53002435", "0.5291126", "0.52802175", "0.5274226", "0.52725065", "0.52651215", "0.525288", "0.52325636", "0.52254844", "0.52157795", "0.5214406", "0.5213491", "0.520488", "0.5190264", "0.515821", "0.51512516", "0.51314664", "0.5080946", "0.5062581", "0.50595546", "0.5057189", "0.5050299", "0.5047718", "0.50412065", "0.5015382", "0.50115937", "0.5008596", "0.5008462", "0.5004458", "0.49981147", "0.49963593", "0.49887675", "0.49882767", "0.4975603", "0.4971795", "0.4969805", "0.4967963", "0.49618736", "0.49594128", "0.49579093", "0.49503478", "0.49477804", "0.49427545", "0.49412087", "0.49338427", "0.4930509", "0.4892312", "0.48802954", "0.48758417", "0.487357", "0.4869651", "0.48681346", "0.48614466", "0.4861412", "0.48529735", "0.48370123", "0.48172182", "0.48170263", "0.48168373", "0.48146695", "0.48083395", "0.48064145", "0.48063752", "0.48022658", "0.47974703", "0.47837102", "0.4780161", "0.47779843", "0.47751755", "0.4767348", "0.47593784", "0.4758462", "0.4755032", "0.47485352", "0.47450468", "0.47432506", "0.4726855", "0.4721131", "0.47037917", "0.46986672", "0.46972474", "0.46944833", "0.46926484", "0.4691159", "0.46892384", "0.4687985", "0.46864614", "0.468607", "0.46856678" ]
0.7059088
0
ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml"); AccountService accountService = (AccountService) context.getBean("accountService"); accountService.searchAccount();
public static void main(String[] args) { System.out.println(MyEnum.monday.getKey()); System.out.println(MyEnum.monday.getValue()); BigDecimal bigDecimal = new BigDecimal("123456.789123"); bigDecimal.setScale(4,BigDecimal.ROUND_HALF_DOWN); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void findOne(){\n ApplicationContext ac = new AnnotationConfigApplicationContext(SpringConfiguration.class);\n\n AccountService as = ac.getBean(\"accountService\", AccountService.class);\n Account account = as.findAccountById(1);\n System.out.println(account);\n }", "public static void main(String[] args) {\n ApplicationContext context =new ClassPathXmlApplicationContext(\"spring.xml\");\n\t \n\t\tService ser= context.getBean(Service.class);\n\t\tSystem.out.println(ser.getAccountID());\n\t}", "public static void main(String[] args) {\r\n\tApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);\r\nBankAccountController bankAccountController = context.getBean(\"bankAccountController\", BankAccountController.class);\r\nSystem.out.println(bankAccountController.getBalance(2223));\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n}", "@Autowired\n public ExternalAccountServiceImpl(AccountService accountService) {\n this.accountService = accountService;\n }", "@Test\n public void updateAccount(){\n ApplicationContext ac = new AnnotationConfigApplicationContext(SpringConfiguration.class);\n\n AccountService as = ac.getBean(\"accountService\", AccountService.class);\n Account account = as.findAccountById(2);\n account.setMoney(123456f);\n as.updateAccount(account);\n\n }", "@Test\n public void test() {\n ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);\n AccountService accountService = applicationContext.getBean(AccountService.class);\n\n accountService.transferBalance(1, 2, 100);\n }", "@Test\n public void deleteAccount(){\n ApplicationContext ac = new AnnotationConfigApplicationContext(SpringConfiguration.class);\n\n AccountService as = ac.getBean(\"accountService\", AccountService.class);\n as.deletdAccount(3);\n }", "public AccountService getAccountService(){\n return accountService;\n }", "@Test\n public void saveAccount(){\n ApplicationContext ac = new AnnotationConfigApplicationContext(SpringConfiguration.class);\n\n AccountService as = ac.getBean(\"accountService\", AccountService.class);\n Account account = new Account();\n account.setName(\"zlsg\");\n account.setMoney(10000.00f);\n as.saveAccount(account);\n }", "public static void main(String[] args) {\r\nApplicationContext context=new ClassPathXmlApplicationContext(\"/beans.xml\");\t\t\r\n\tServlet s=(Servlet)context.getBean(\"servletRef\");\r\n\ts.serviceMethod();\r\n\t}", "public static void main(String[] args) {\n ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);\n//\n// SpeakerService service = context.getBean(\"speakerService\", SpeakerService.class);\n//\n// System.out.println(service);\n//\n// System.out.println(service.findAll().get(0).getFirstName());\n//\n /*\n * In case of Singleton\n * This will not instantiate new object of SpeakerService because it is singleton\n * Same reference will be returned\n * */\n// SpeakerService service2 = context.getBean(\"speakerService\", SpeakerService.class);\n// System.out.println(service2);\n\n // XML Configuration\n// ApplicationContext context = new ClassPathXmlApplicationContext(\"ApplicationContext.xml\");\n// SpeakerService service2 = context.getBean(\"speakerService\", SpeakerService.class);\n// System.out.println(service2);\n }", "public interface UserAccountService {\n\n\tpublic final static String BEAN_ID = \"userAccountService\";\n\n\tpublic UserAccount findById(ServiceContext ctx, Long id) throws UserAccountNotFoundException;\n\n\tpublic List<UserAccount> findAll(ServiceContext ctx);\n\n\tpublic UserAccount save(ServiceContext ctx, UserAccount entity);\n\n\tpublic void delete(ServiceContext ctx, UserAccount entity);\n\n}", "public static void main(String[] args) {\n AnnotationConfigApplicationContext context =\n new AnnotationConfigApplicationContext(DemoConfig.class);\n\n AccountDAO theAccountDAO = context.getBean(\"accountDAO\",AccountDAO.class);\n\n List<AccountDAO> theAccounts = theAccountDAO.findAccounts(false);\n\n System.out.println(\"\\nMain program: after returning demo app\");\n System.out.println(\"================\");\n System.out.println(theAccounts);\n\n context.close();\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Sample Spring Application!!\");\n\t\t\n\t\t//EmployeeService employeeService = new EmployeeServiceImpl();\n ApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\t\t\n\t\t\n\t\tEmployeeService employeeService = applicationContext.getBean(\"employeeService\", EmployeeService.class);\n\t\tSystem.out.println(employeeService.getAllEmployee().get(0).getName());\n\t}", "public static void main(String[] args) throws LowBalanceException {\n\tApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);\r\n\tDbUtil dbUtil = context.getBean(\"dbUtil\", DbUtil.class);\r\n\tdbUtil.getConnection();\r\n\tBankAccountController bankAccountController = context.getBean(\"bankAccountController\",BankAccountController.class);\r\n\tSystem.out.println(bankAccountController.getBalance(2201));\r\n\tSystem.out.println(bankAccountController.withdraw(2201,10));\r\n\tSystem.out.println(bankAccountController.deposit(2202, 60));\r\n\tSystem.out.println(bankAccountController.fundTransfer(2201,2202,30));\r\n}", "@Test\n public void testNotNull(){\n\n AccountService accountService = applicationContext.getBean(AccountService.class);\n assertNotNull(accountService);\n assertNotNull(((JdbcAccountService)accountService).getAccountRepsotiry());\n assertNotNull(((JdbcAccountRepository)((JdbcAccountService)accountService).getAccountRepsotiry()).getDataSource());\n\n\n }", "public static void testExampleBean(){\n ApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n //2. get TestService instance from container\n ExampleBean exampleBean = context.getBean(ExampleBean.class);\n exampleBean.outPutInfo();\n }", "public static void main(String[] args) {\n ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext(\"config.xml\");\n // ctx.start();\n Database d =ctx.getBean(\"mysql\",Database.class);\n System.out.println(\"name --->\" + d.getName() + \" port-->\" + d.getPort());\n d.connect();\n // d.getInteger();\n // d.throwException();\n // d.checkdata(\"richa\");\n // d.getIntdata(200);\n // Dummy dummy = ctx.getBean(\"dummy\", Dummy.class);\n // dummy.display();\n // ctx.stop();\n /* Dummytest dummytest=ctx.getBean(\"dummyTest\",Dummytest.class);\nSystem.out.print(dummytest);\n PersonalisedService personalisedService=ctx.getBean(\"personalisedService\",PersonalisedService.class);\n System.out.println(personalisedService);\n System.out.println(personalisedService.employee.getCity());\n*/\n\n }", "public interface IAccountbService {\n\n int add(Accountb account);\n\n int update(Accountb account);\n\n int delete(int id);\n\n Accountb findAccountById(int id);\n\n List<Accountb> findAccountList();\n\n Accountb findAccountByName(String name);\n\n\n\n\n}", "public static void main(String[] args) throws ClassNotFoundException, SQLException {\n\tApplicationContext context=new ClassPathXmlApplicationContext(\"beans.xml\");\n\tStudentDAO studentDao=context.getBean(\"studentDAO\",StudentDAO.class);\n\tstudentDao.selectAllRows(); \n\t((ClassPathXmlApplicationContext)context).close();\n\n}", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader read=new BufferedReader(new InputStreamReader(System.in));\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"spring4.xml\");\n\t\tSBU sbu = context.getBean(\"BU\", SBU.class);\n\n\t\tSystem.out.println(\"SBU details\");\n\t\tSystem.out.println(\"---------------------\");\n\t\tSystem.out.println(\"SBU Id : \"+sbu.getSbuId());\n\t\tSystem.out.println(\"SBU Head : \"+sbu.getSbuHead());\n\t\tSystem.out.println(\"SBU Name : \"+sbu.getSbuName());\n\n\t\t\n\t\tSystem.out.println(\"---------------------\");\n\t\tSystem.out.println(\"Employee details\");\n\t\tSystem.out.println(\"---------------------\");\n\t\tList<Employee> e=sbu.getEmpList();\n\t\tfor(Employee emp2:e){\n\t\t\tSystem.out.println(\"empId=\"+emp2.getEmployeeId()+\" \"+\"empName=\"+emp2.getEmployeeName()+\" \"+\"empSalary=\"+emp2.getSalary());\n\t\t}\n \n\t\tService service=new Service();\n\t\tSystem.out.println(\"enter the employee id you want to search\");\n int eid=Integer.parseInt(read.readLine());\n\t\tEmployee e2=service.getAll(eid);\n\t\tif(e2!=null)\n\t\t{\n\t\t\tSystem.out.println(e2.getEmployeeId()+\" \"+e2.getEmployeeName()+\" \"+e2.getSalary());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No employee found\"); \n\t\t\t\n\t\t}\n\t}", "@Service\npublic interface AccountService {\n void addAccount(Account account);\n\n void removeAccount(Account account);\n\n void addAccount(AccountJsonImportDto accountDto);\n\n void addAccount(AccountImportXmlDto accountDto);\n\n AccountsImportXmlDto findAll();\n}", "public static void main(String[] args) \r\n\t{\n\t\tString s = \"resources/spring.xml\";\r\nApplicationContext ac = new ClassPathXmlApplicationContext(s);\r\nCar c=(Car)ac.getBean(\"c\");\r\nc.printCarDetails();\r\n\t}", "@Test\n public void testOrders(){\n ClassPathXmlApplicationContext context=\n new ClassPathXmlApplicationContext(\"bean4.xml\");\n Orders orders = context.getBean(\"orders\", Orders.class);\n System.out.println(\"第四步 得到bean实例\");\n System.out.println(orders);\n// orders.initMethod();\n context.close();\n }", "public static void main(String[] args){\n ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n /*\n Check to see if the file exists\n File file = new File(\"src/main/java/applicationContext.xml\");\n System.out.println(file.exists());\n \n */\n \n //retrieve bean from spring container\n Coach theCoach = context.getBean(\"myCoach\", Coach.class);\n //call methods on the bean\n System.out.println(theCoach.getDailyWorkout());\n //close the context\n \n context.close();\n \n /*Note: PUT THE FILE IN THE RESOURCES FOLDER, OR ELSE YOU'LL GET A FILE NOT FOUND ERROR*/\n }", "public static void main(String[] args) {\nApplicationContext context=new ClassPathXmlApplicationContext(\"spring.xml\");\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\tCoach coach2=(Coach)context.getBean(\"myCCoach\");\r\n\r\n\t\r\n\tSystem.out.println(coach2);\r\n\t((ClassPathXmlApplicationContext)context).close();\r\n\t\r\n\t\r\n\tSystem.out.println(coach2.getDailyFortune());\r\n\t\r\n\t}", "public static void main(String[] args) {\n ApplicationContext ctx = new ClassPathXmlApplicationContext(\"beans-cp.xml\");\n \n SpringJdbc springJdbc=ctx.getBean(SpringJdbc.class);\n springJdbc.actionMethod();\n \n //Lectura de Bean \n //OrganizationDao organizationDao = (OrganizationDao) ctx.getBean(\"organizationDao\");\n \n ((ClassPathXmlApplicationContext) ctx).close();\n }", "public static void main(String[] args) {\n ApplicationContext context = new ClassPathXmlApplicationContext(\"classpath:data.xml\");\n\n Employee emp1 = context.getBean(\"employee1\", Employee.class);\n\n System.out.println(\"Employee Details \" + emp1);\n\n }", "public interface AccountService {\n\n /**\n * 登录\n * @param mobile\n * @param password\n * @return\n */\n Account login(String mobile, String password);\n\n /**\n * 添加新部门\n * @param deptName\n */\n void saveDept (String deptName) throws ServiceException;\n\n List<Dept> findAllDept();\n\n /**\n * 根据参数查找分页后的list\n * @param map\n * @return\n */\n List<Account> pageByParam(Map<String, Object> map);\n\n /**\n * 根据deptId查找account的总数\n * @param deptId\n * @return\n */\n Long countByDeptId(Integer deptId);\n\n /**\n * 添加新员工\n * @param userName\n * @param mobile\n * @param password\n * @param deptIdArray 部门可以多选\n */\n void saveEmployee(String userName, String mobile, String password, Integer[] deptIdArray);\n\n /**\n * 根据id删除员工\n * @param id\n */\n void delEmployeeById(Integer id);\n\n /**\n * 查找所有user\n * @return\n */\n List<Account> findAllAccount();\n}", "public static void main(String[] args) {\n ApplicationContext ctx=new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n HelloWord h=(HelloWord) ctx.getBean(\"helloWord\");\n h.sayHello();\n Car car=(Car) ctx.getBean(\"car\");\n System.out.println(car);\n Person person=(Person) ctx.getBean(\"person\");\n System.out.println(person);\n\t}", "@RequestMapping(value = \"/load\")\n public @ResponseBody void load(String username,String password) {\n System.out.print(username+\" \"+password);\n// ApplicationContext ctx = new ClassPathXmlApplicationContext(\"classpath:spring-config.xml\");\n// SQLDao dao = ctx.getBean(\"SQLDao\", SQLDao.class);\n\n }", "public interface AccountService {\n\n Double getBalanceByDate(Long id, Date date);\n\n List<Account> getAllByUser(String mobileNumber);\n}", "public static void main( String[] args )\n {\n \tApplicationContext context=new FileSystemXmlApplicationContext(\"beans.xml\");\n \tTraveller traveller=(Traveller)context.getBean(\"traveller\"); //SPRING CONTAINER\n \tSystem.out.println(traveller.getTravelDetails());\n\n }", "public interface BloggerService {\n public Blogger findBlogger(String userName);\n}", "public static void main(String args[])\n {\n ClassPathXmlApplicationContext context = new\n ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\n // retrieve bean from spring container\n Coach theCoach = context.getBean(\"myCoach\",Coach.class);\n\n// call methods on the bean\n System.out.println(theCoach.getDailyWorkout());\n\n// lest call our new method for fortunes\n System.out.println(theCoach.getDailyFortune());\n\n// close the context\n context.close();\n\n\n }", "ApplicationContext getAppCtx();", "public static void main(String[] args) {\n\t\tApplicationContext appContext = \n\t\t\t\tnew AnnotationConfigApplicationContext(AppConfig.class);\n\t\tCustomerService service = \n\t\t\t\tappContext.getBean(\"customerService\",CustomerService.class);\n\t\tSystem.out.println(service);\n\t\t\n\t\tCustomerService service2 = \n\t\t\t\tappContext.getBean(\"customerService\",CustomerService.class);\n\t\tSystem.out.println(service2);\n\t\t\n\t\tSystem.out.println(service.findAll().get(0).getFirstname());\n\t\t}", "public static void main(String[] args) {\n ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContextPart2.xml\");\n // get bean from the application context\n Coach theCoach = context.getBean(\"myCoach\", Coach.class);\n // call the method from the beans\n System.out.println(theCoach.getDailyWorkout());\n System.out.println(theCoach.getFortune());\n\n // close the application context\n context.close();\n\n }", "@Override\n\n protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\n protected void doGet(HttpServletRequest req, HttpServletResponse res)throws ServletException, IOException {\n //AccountDao dao = new AccountDao();\n\n DaoInterface<KeerthiAccount> dao = new AccountDaoImpl();\n KeerthiAccount keerthiAccount = new KeerthiAccount();\n String id = req.getParameter(\"id\");\n String name = req.getParameter(\"uname\");\n String accNum = req.getParameter(\"accNum\");\n String bal = req.getParameter(\"balance\");\n\n keerthiAccount.setId(Integer.parseInt(id));\n keerthiAccount.setUserName(name);\n keerthiAccount.setAccNumber(Long.parseLong(accNum));\n keerthiAccount.setBalance(Double.parseDouble(bal));\n\n dao.update(keerthiAccount);\n //DAO.updateAccount(Integer.parseInt(id), name, Long.parseLong(accNum), Double.parseDouble(bal));\n\n ServletContext ctxt = req.getSession().getServletContext();\n //get bean factory\n ApplicationContext appContext = WebApplicationContextUtils.getRequiredWebApplicationContext(ctxt);\n AccountDao accountDao = (AccountDao) appContext.getBean(\"keerthidAccDao\");\n accountDao.updateAccount(keerthiAccount);\n\n // dao.update(keerthiAccount);\n //dao.updateAccount(Integer.parseInt(id), name, Long.parseLong(accNum), Double.parseDouble(bal));\n\n\n RequestDispatcher rd = req.getRequestDispatcher(\"keeAccountList\");\n rd.forward(req, res);\n }\n }", "public interface AccountService extends BaseDao<Account>{\n}", "public static void main(String[] args) {\r\n\tAnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(SwimConfig.class);\r\n\tCoach myCoach=context.getBean(\"swimCoach\",Coach.class);\r\n\tSystem.out.println(myCoach.getDailyFortune());\r\n\tSystem.out.println(myCoach.getDailyWorkOut());\r\n\tcontext.close();\r\n\r\n}", "public static void main(String[] args) {\n\t\tAnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(DemoConfig.class);\n\t\t\n\t\t//get bean\n\t\tAccountDAO theAccountDAO = context.getBean(\"accountDAO\", AccountDAO.class);\n\t\t\n\t\t\n\t\t//get bean\n\t\tMembershipDAO theMembership = context.getBean(\"membershipDAO\", MembershipDAO.class);\n\t\t\n\t\t//call method\n\t\tAccount theAccount = new Account();\n\t\ttheAccountDAO.addAccount(theAccount,true);\n\t\ttheAccountDAO.DoHomeWork();\n\t\t\n\t\t//call setter/getter method\n\t\ttheAccountDAO.setName(\"Monay\");\n\t\ttheAccountDAO.setServiceCode(\"foo\");\n\t\ttheAccountDAO.getName();\n\t\ttheAccountDAO.getServiceCode();\n\t\t\n\t\t//call method\n\t\ttheMembership.addAccount();\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tcontext.close();\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\n\n\n\n\n ClassPathXmlApplicationContext contexto=new ClassPathXmlApplicationContext(\"applicationContext3.xml\");\n \n \n\n Empleados Maria=contexto.getBean(\"secretarioEmpleado2\",Empleados.class);\n\n \n \n \n //System.out.println(\"Tareas del director: \"+Maria.getTareas());\n System.out.println(\"Informes del director: \"+Maria.getInformes());\n //System.out.println(\"El correo es: \"+Maria.getEmail());\n //System.out.println(\"El nombre de la empresa es: \"+Maria.getNombreEmpresa());\n \n\n contexto.close();\n\n\n \n }", "public static AccountService getAccountService(){\n\t\treturn new AccountServiceProxy();\n\t}", "public PessoaService(){\n\t\n\t\tApplicationContext context =SpringUtil.getContext();\n\t\tdb = context.getBean(PessoaRepository.class);\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext springContainer =\n\t\t\t\tnew ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\t\t\n\t\t//retrieve a customerService bean from spring container\n\t\tCustomerService customerService = springContainer.getBean(\"customerService\",CustomerService.class);\n\t\t\n\t\tList<Customer> loadedCustomers = customerService.retrieveAllCustomers();\n\t\t\n\t\tfor(Customer customer : loadedCustomers) {\n\t\t\tSystem.out.println(customer.getName());\n\t\t}\n\t}", "protected AbstractApplicationContext getServicesContext() {\r\n\t\treturn this.servicesContext;\r\n\t}", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\t\r\n\t\tCricketCoach coach = context.getBean(\"myCricketCoach\", CricketCoach.class);\r\n\t\t\r\n\t\tSystem.out.println(coach.getDailyWorkout());\r\n\t\t\r\n\r\n\t\tSystem.out.println(coach.getDailyFortune());\r\n\t\t\r\n\t\tSystem.out.println(coach.getEmail());\r\n\t\t\r\n\t\tSystem.out.println(coach.getName());\r\n\t\t\r\n\t\tcoach.print();\r\n\t\t\r\n\t\tcontext.close();\r\n\r\n\t}", "public static void main(String[] args) {\n \n ApplicationContext context =\n new ClassPathXmlApplicationContext(\"spring-beans.xml\");\n \n \n Dependant dependant = context.getBean(\"dependant\", Dependant.class);\n \n }", "public static void main(String[] args){\n\n \tApplicationContext appContext = new AnnotationConfigApplicationContext(AppConfig.class);\n AnimalStoreService aService = appContext.getBean(\"animalStoreService\", AnimalStoreService.class);\n aService.execute();\n\n\n }", "public void setAccountService(AccountService accountService){\n this.accountService = accountService;\n }", "public static void main(String args[]) {\n\r\n\t\r\n\tApplicationContext ac = new ClassPathXmlApplicationContext(\"com/springcore/annotations/anootationconfig.xml\");\r\n\t \r\n Employee emp = ac.getBean(\"myemployee\", Employee.class);\r\n System.out.println(emp.toString());\r\n\t}", "public interface SearchStudentService {\n List<Student> searchStudentByName(String name);\n}", "public static void main(String[] args) {\n\t\tGenericXmlApplicationContext ctx = new GenericXmlApplicationContext(\"Echo.xml\");\r\n\t\t\r\n\t\tEchobean bean = ctx.getBean(\"aaa\", Echobean.class);\r\n\t\t \r\n\t\tOneService one = bean.getOne();\r\n\t\tTwoService two = bean.getTwo(); \r\n\t\t \r\n\t\tone.one();\r\n\t\ttwo.two();\r\n\t}", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext contexto= new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\t \r\n\t\tdirectorEmpleado Juan=contexto.getBean(\"miEmpleado\",directorEmpleado.class);\r\n\t\tSystem.out.println(Juan.getTareas());\r\n\t\tSystem.out.println(Juan.getInforme());\r\n\t\tSystem.out.println(Juan.getEmail());\r\n\t\tSystem.out.println(Juan.getNombreEmpresa());\r\n\t\t\r\n\t\t/*secretarioEmpleado Maria=contexto.getBean(\"miSecretarioEmpleado\",secretarioEmpleado.class);\r\n\t\tSystem.out.println(Maria.getTareas());\r\n\t\tSystem.out.println(Maria.getInforme());\r\n\t\tSystem.out.println(\"Email= \"+Maria.getEmail());\r\n\t\tSystem.out.println(\"Nombre Empresa= \"+Maria.getNombreEmpresa());*/\r\n\t\t\r\n\t\tcontexto.close();\r\n\t}", "public interface ApplicationService extends GenericService<Application, Long> {\n\n Page<Application> getPagedMerchantApplications(Long merchantId, int pagination, int capacity, String keyword, String... fetchs);\n\n boolean isAppIDExisted(String appID);\n\n boolean isOriginalIDExisted(String originalID);\n\n Application getApplicationByAppID(String appID, String... fetchs);\n\n boolean startPulling(String appID);\n\n boolean endPulling(String appID);\n\n boolean startRefreshing(String appID);\n\n boolean endRefreshing(String appID);\n\n int updateToVerified(String appID);\n\n}", "public static void main(String[] args) {\n\n ApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext_work.xml\");\n SqlSessionFactory c = context.getBean(\"C\", SqlSessionFactory.class);\n System.out.println(c);\n\n\n }", "@Override\n\tpublic void init() throws ServletException {\n\t\tsuper.init();\n\t\t\n\t\tApplicationContext applicationContext=new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\t\tmservice= (MemberService) applicationContext.getBean(\"memberservice\");\n\t\tbservice=(BookService) applicationContext.getBean(\"bookservice\");\n\t\toservice=(OrderService) applicationContext.getBean(\"orderservice\");\n\t\t\n\t}", "@Before\n public void setUp() {\n this.context = new AnnotationConfigApplicationContext(\"com.fxyh.spring.config\");\n// this.context = new ClassPathXmlApplicationContext(\"classpath*:applicationContext-bean.xml\");\n this.user = this.context.getBean(User.class);\n this.user2 = this.context.getBean(User.class);\n this.department = this.context.getBean(Department.class);\n this.userService = (UserService) this.context.getBean(\"userService\");\n }", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext();\n\n//\t\tCreating ConfigurableEnvironment object\n\t\tConfigurableEnvironment env = ctx.getEnvironment();\n\n//\t\tgetting active Profile\n\t\tenv.setActiveProfiles(new String[]{\"dev\"});//test,uat,prod,dev\n\n//\t\tspecifying spring bean cfgs file\n\t\tctx.setConfigLocation(\"com/nit/cfgs/applicationContext.xml\");\n//\t\trefreshing IOC container\n\n\t\tctx.refresh();\n\n//\t\tcreating BankController Class Object\n\t\tBankController controller = ctx.getBean(\"BankController\", BankController.class);\n\n//\t\tread Inputs from End user\n\t\tScanner scn = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter Customer Name:\");\n\t\tString cName = scn.next();\n\n\t\tSystem.out.println(\"Enter Customer Address:\");\n\t\tString cAddr = scn.next();\n\n\t\tSystem.out.println(\"Enter Principle Amount:\");\n\t\tString pAmt = scn.next();\n\n\t\tSystem.out.println(\"Enter Time:\");\n\t\tString time = scn.next();\n\n\t\tSystem.out.println(\"Enter Rate:\");\n\t\tString rate = scn.next();\n\n//\t\tclosing Scanner class object\n\t\tscn.close();\n\n//\t\tcreating CustomerVO object to Send End User Input values\n\t\tCustomerVO vo = new CustomerVO();\n\n\t\tvo.setCName(cName);\n\t\tvo.setCAddr(cAddr);\n\t\tvo.setPAmt(pAmt);\n\t\tvo.setRate(rate);\n\t\tvo.setTime(time);\n\n//\t\tuse Controller class\n\t\ttry {\n\t\t\tString result = controller.processCustomer(vo);\n\t\t\tSystem.out.println(result);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Problem in Customer Registration\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t((AbstractApplicationContext) ctx).close();\n\n\t}", "public interface AccountService {\n\tpublic Long getUserId(String name);\n\tpublic MessageSystem getMessageSystem();\n}", "public interface UserAccountService {\n public void addUserAccount(UserAccount user);\n\n public UserAccount getUserAccount(String uid);\n\n public void update(UserAccount user);\n\n public String login(String uid, String pwd);\n\n public UserAccount getByid(Long id);\n\n public List<String> getUids(List<Long> ids);\n\n public List<Friend> search(final String key);\n}", "public interface UserService {\n\n /**\n * <p>\n * This Method is used to add a new User.\n * </p>\n *\n * @param user a User object with the email and password to be added.\n *\n * @return boolean a boolean value indicating the successful addition of\n * a new User.\n *\n * @throws ApplicationException A Custom Exception created for catching\n * exceptions that occur while retrieving an\n * user.\n */\n public Boolean addUser(User user) throws ApplicationException;\n\n /**\n * <p>\n * This Method is used to search a User Entry and return the User\n * object. It returns null if no match is found.\n * </p>\n *\n * @param email a String indicating the email of the user that is\n * to be searched an returned.\n *\n * @return user an User object is returned if a valid match is\n * found, else returns null.\n *\n * @throws ApplicationException A Custom Exception created for catching\n * exceptions that occur while retrieving an\n * user.\n */\n public User retrieveUserByEmail(String email) throws ApplicationException;\n\n}", "public interface AccountSerialService extends BaseService<AccountSerialModel,AccountSerial>{\n\n\n /**\n * 分页查询记账明细\n * @param userId\n * @param accountType\n * @param tradeType\n * @param bookkeeping\n * @param page\n * @param orderBy\n * @param order\n * @return\n * @throws Exception\n */\n public Page queryForPage(Long userId, AccountType accountType, AccountTradeType tradeType, AccountTradeType bookkeeping, Page page, String orderBy,\n String order) throws Exception;\n\n}", "@Autowired\n public void setSearchService(SearchService searchService) {\n this.searchService = searchService;\n }", "@Test\r\n public void testSearch(){\r\n\r\n BusinessObjectService boService = KRADServiceLocator.getBusinessObjectService();\r\n String chartOfAccountsCode = \"BL\";\r\n String accountNumber = \"1222222\";\r\n String accountName = \"testTempRestricted\";\r\n String organizationCode = \"AAAI\";\r\n Date accountEffectiveDate = SpringContext.getBean(DateTimeService.class).getCurrentSqlDate();//\"03/07/2012\";\r\n String subFundGroupCode = \"AUXAMB\";\r\n String universityAccountNumber = \"1234\";\r\n String fiscalOfficerUserName = \"ole-cswinson\";\r\n String accountRestrictedStatusCode = \"T\";\r\n Date accountRestrictedStatusDate = SpringContext.getBean(DateTimeService.class).getCurrentSqlDate();\r\n String accountSufficientFundsCode = \"A\";\r\n String accountExpenseGuidelineText = \"test guide line text for temporary restricted\";\r\n\r\n Chart chartOfAccounts = new Chart();\r\n chartOfAccounts.setChartOfAccountsCode(chartOfAccountsCode);\r\n\r\n AccountGuideline accountGuideline = new AccountGuideline();\r\n accountGuideline.setAccountExpenseGuidelineText(accountExpenseGuidelineText);\r\n accountGuideline.setChartOfAccountsCode(chartOfAccountsCode);\r\n accountGuideline.setAccountNumber(accountNumber);\r\n\r\n\r\n Account account = new Account();\r\n account.setChartOfAccounts(chartOfAccounts);\r\n account.setChartOfAccountsCode(chartOfAccountsCode);\r\n account.getChartOfAccountsCode();\r\n account.setAccountNumber(accountNumber);\r\n account.setAccountName(accountName);\r\n account.setOrganizationCode(organizationCode);\r\n account.setAccountEffectiveDate(accountEffectiveDate);\r\n account.setSubFundGroupCode(subFundGroupCode);\r\n account.setUniversityAccountNumber(universityAccountNumber);\r\n ((PersonImpl)account.getAccountFiscalOfficerUser()).setName(fiscalOfficerUserName);\r\n account.setAccountRestrictedStatusCode(accountRestrictedStatusCode);\r\n account.setAccountRestrictedStatusDate(accountRestrictedStatusDate);\r\n account.setAccountSufficientFundsCode(accountSufficientFundsCode);\r\n account.setAccountGuideline(accountGuideline);\r\n\r\n boService.save(account);\r\n\r\n String chartOfAccountsCode1 = \"BL\";\r\n String accountNumber1 = \"1222223\";\r\n String accountName1 = \"testUnRestricted\";\r\n String organizationCode1 = \"AAAI\";\r\n Date accountEffectiveDate1 = SpringContext.getBean(DateTimeService.class).getCurrentSqlDate();//\"03/07/2012\";\r\n String subFundGroupCode1 = \"AUXAMB\";\r\n String universityAccountNumber1 = \"1245\";\r\n String fiscalOfficerUserName1 = \"ole-cswinson\";\r\n String accountRestrictedStatusCode1 = \"U\";\r\n String accountSufficientFundsCode1 = \"A\";\r\n String accountExpenseGuidelineText1 = \"test guide line text for un-restricted\";\r\n\r\n Chart chartOfAccounts1 = new Chart();\r\n chartOfAccounts1.setChartOfAccountsCode(chartOfAccountsCode1);\r\n\r\n AccountGuideline accountGuideline1 = new AccountGuideline();\r\n accountGuideline1.setAccountExpenseGuidelineText(accountExpenseGuidelineText1);\r\n accountGuideline1.setChartOfAccountsCode(chartOfAccountsCode1);\r\n accountGuideline1.setAccountNumber(accountNumber1);\r\n\r\n Account account1 = new Account();\r\n account1.setChartOfAccounts(chartOfAccounts1);\r\n account1.setChartOfAccountsCode(chartOfAccountsCode1);\r\n account1.setAccountNumber(accountNumber1);\r\n account1.setAccountName(accountName1);\r\n account1.setOrganizationCode(organizationCode1);\r\n account1.setAccountEffectiveDate(accountEffectiveDate1);\r\n account1.setSubFundGroupCode(subFundGroupCode1);\r\n account1.setUniversityAccountNumber(universityAccountNumber1);\r\n ((PersonImpl)account1.getAccountFiscalOfficerUser()).setName(fiscalOfficerUserName1);\r\n account1.setAccountRestrictedStatusCode(accountRestrictedStatusCode1);\r\n account1.setAccountSufficientFundsCode(accountSufficientFundsCode1);\r\n account1.setAccountGuideline(accountGuideline1);\r\n\r\n boService.save(account1);\r\n\r\n\r\n List<Account> accounts = (List<Account>) boService.findAll(Account.class);\r\n for(int i=0;i<accounts.size();i++){\r\n if(accounts.get(i).getAccountNumber().equalsIgnoreCase(accountNumber) || accounts.get(i).getAccountNumber().equalsIgnoreCase(accountNumber1)){\r\n if(accounts.get(i).getAccountRestrictedStatusCode().equalsIgnoreCase(\"T\")){\r\n accounts.remove(i);\r\n }\r\n assertEquals(accounts.get(i).getAccountName(), accountName1);\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext(\"contextApplicationXML.xml\");\n\n\t\t//retrieve bean from spring container\n\t\tCoach coach=context.getBean(\"myCoach\", Coach.class);\n\t\tSystem.out.println(coach.getWorkout());\n\t\t\n\t\t//close the context \n\t\tcontext.close();\n\t}", "public static void main(String args[]) {\r\n\t\tApplicationContext appContext=new ClassPathXmlApplicationContext(\"beans.xml\");\r\n\t\tEmployeeBean emp1=(EmployeeBean) appContext.getBean(\"Employee\");\r\n\t\tSystem.out.println(emp1.getName());\r\n\t}", "public interface FlexibleSearchBeanService extends BaseCrudService<SearchBean>{\n}", "private BookService getBookService() {\n return bookService;\n }", "@RequestMapping(\"/accounts\")\n public List<Account> getAllAccounts(){\n return accountService.getAllAccounts();\n }", "public static void main(String[] args){\n\t\tAnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(MyConfig.class);\n\t\t//applicationContext.addApplicationListener(new MyApplicationStartListener());\n\t\tapplicationContext.setParent(new ClassPathXmlApplicationContext(\"WEB-INF/application-context.xml\"));\n\t\tapplicationContext.start();\n\t\t\n\t\tHelloWorld helloWorld = (HelloWorld) applicationContext.getBean(\"helloWorld\");\n\t\thelloWorld.sayHello();\n\t\t\n\t\t/*BookJdbcTemplate bookJdbcTemplate = new BookJdbcTemplate();\n\t\tJdbcTemplate jdbcTemplate = (JdbcTemplate) applicationContext.getBean(\"jdbcTemplate\");\n\t\tbookJdbcTemplate.setJdbcTemplate(jdbcTemplate);\n\t\tSystem.out.println(\"Total pages are: \" + bookJdbcTemplate.getTotalPages((long)11));\n\t\tlogger.debug(\"Total pages are: \" + bookJdbcTemplate.getTotalPages((long)11));*/\n\t}", "public void findallstudentservice() {\n\t\t dao.findallstudent();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n\t\t//AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext(TennisCoach.class);\n\t\t//get the bean from spring container\n\t\t//1. Default bean id\n\t\tCoach theCoach=context.getBean(\"tennisCoach\", Coach.class);\n\t\t//2. Explicit bean id\n\t\t//Coach theCoach=context.getBean(\"thatCoach\", Coach.class);\n\t\tSystem.out.println(theCoach.getDailyWorkout());\n\t\t//call method to get a daily fortune\n\t\tSystem.out.println(theCoach.getDailyFortune());\n\t\tcontext.close();\n\t}", "@Autowired\n public BookService(BookRepository bookRepository) {\n\n this.bookRepository = bookRepository;\n }", "public static void main(String[] args) {\n\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"spring/config/application-context.xml\");\n\t\t\n\t\tAvengerService avengerService = (AvengerService) context.getBean(\"avengerService\");\n\t\t\n\t\tAgentService agentService = (AgentService) context.getBean(\"agentService\");\n\n\t\t\n//\t\tAvenger avenger = new Avenger();\n//\t\tavenger.setFirstName(\"Tony\");\n//\t\tavenger.setLastName(\"STARK\");\n//\t\tavenger.setAlias(\"Iron man\");\n//\t\tavenger.setPower(7);\n//\t\t\n//\t\tavengerService.save(avenger);\n//\t\t\n//\t\tSystem.out.println( avengerService.getAvenger(30).getAlias());\n//\t\t\n//\t\t\n//\t\tAgent agentFury = agentService.getAgent(10);\n//\t\t\n//\t\tSystem.out.println(\"nom : \" + agentFury.getLastName());\n//\t\tSystem.out.println(\"prénom : \" + agentFury.getFirstName());\n//\t\tSystem.out.println(\"liste des avengers recrutés : \");\n//\t\t\n//\t\t\n//\t\tfor (Avenger av : agentFury.getAvengers()) {\n//\t\t\n//\t\t\tSystem.out.println(\"-------------\");\n//\t\t\tSystem.out.println(av.getAlias());\n//\t\t}\n\t\n\t\tAvenger avengerIron = avengerService.getAvenger(30);\n\t\tavengerService.delete(avengerIron);\n\t\t\n\t}", "public AuthenticationBean(@Autowired SecurityServiceImpl securityService)\r\n {\r\n this.securityService = securityService;\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tIAccountService accountService = (IAccountService) BeanFactory.getBean(\"ACCOUNTSERVICE\");\r\n//\t\tIAccountService accountService2 = (IAccountService) BeanFactory.getBean(\"ACCOUNTSERVICE\");\r\n//\t\tSystem.out.println(accountService);\r\n//\t\tSystem.out.println(accountService2);\r\n\t\t\r\n\t\tfor(int i = 0;i<5;i++) {\r\n\t\t\tIAccountService aa = (IAccountService) BeanFactory.getBean(\"ACCOUNTSERVICE\");\r\n\t\t\tSystem.out.println(aa);\r\n\t\t}\r\n\t\taccountService.save();\r\n\t}", "public interface BankAccountService\n{\n BankAccount openAccount(long accountNumber, Date timeCreated);\n\n BankAccount getAccount(long accountNumber);\n\n void deposit(long accountNumber, double amount, String description, Date time);\n\n List<Transaction> getTransactions(BankAccount bankAccount, Date startTime, Date endTime);\n\n void withdraw(long testAccountNumber, double amount, String description, Date time);\n\n List<Transaction> getAllTransactions(BankAccount bankAccount);\n\n List<Transaction> getLatestTransactions(BankAccount bankAccount, int total);\n}", "public static void main(String[] args) {\n\r\n\t\tApplicationContext ctx = new ClassPathXmlApplicationContext(\"empaccconfig.xml\");\r\n\t\t\r\n\t\tEmployee em = (Employee)ctx.getBean(\"emp\");\r\n\t\tem.printValues();\r\n\t}", "public static void main(String[] args) {\n\t\tResource resource = new ClassPathResource(\"config/p51.xml\");\n\t\tBeanFactory factory = new XmlBeanFactory(resource);\n\t\t\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"config/p51.xml\");\n\t\t//context.getBean()....\n\t\t\n\t\t\n\t\tGreetingService greetingService =(GreetingService)factory.getBean(\"greeting\");\n\t\tSystem.out.println(greetingService.sayHello(\"아무거나 \"));\n\t\tGreetingService greetingService2 =(GreetingService)factory.getBean(\"greeting2\");\n\t\tSystem.out.println(greetingService2.sayHello(\"아무거나 \"));\n\n\t}", "public static void main(String[] args) {\n ApplicationContext ctx = new ClassPathXmlApplicationContext(\n \"springClient.xml\");\n AccountService accountService = (AccountService) ctx\n .getBean(\"mobileAccountService\");\n String result = accountService.shoopingPayment(\"13800138000\", (byte) 5);\n log.info(result);\n\n System.out.println( \"====\" + result );\n\n\n }", "public interface EmpService {\n List<Emp> queryEmp();\n}", "public static void main(String[] args) {\n\n ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{\"applicationContext.xml\",\"application.xml\"});\n\n Student student = (Student) context.getBean(\"student\");\n\n\n// ClassPathResource resource = new ClassPathResource(\"applicationContext.xml\");\n// XmlBeanFactory beanFactory = new XmlBeanFactory(resource);\n// Student student = (Student) beanFactory.getBean(\"student\");\n//\n// //资源\n// ClassPathResource resource = new ClassPathResource(\"applicationContext.xml\");\n// //容器\n// DefaultListableBeanFactory factory = new DefaultListableBeanFactory();\n// //BeanDefinition读取器,通过回调配置给容器\n// XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(factory);\n// //读取配置\n// reader.loadBeanDefinitions(resource);\n\n// Student student = (Student) factory.getBean(\"student\");\n// System.out.println(student);\n }", "public static void main(String[] args) {\n ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(ANNOTATE_XML);\n\n // ask container for the Bean that is ready to use\n Car car = appContext.getBean(\"dmc12autowire\", Car.class);\n car.go();\n\n System.out.println(car.getClass().getName());\n\n appContext.close();\n }", "public static void main(String[] args) {\n\t\tApplicationContext objctx = new ClassPathXmlApplicationContext(\"context.xml\");\n\t\tAdminService objService = (AdminService)objctx.getBean(\"adminService\");\n\t\tSystem.out.println(objService.saveStudents(10, \"prakash\", \"chennai\", 12500.50));\n\t\t\n\n\t}", "public interface AccountService {\n\n Account createAccount(Account account);\n\n AccountDto.ResponseAccount getAccountById(Long accountId);\n\n}", "public static IStrengthenService getInstance(ApplicationContext context) {\r\n\t\treturn (IStrengthenService) context.getBean(SERVICE_BEAN_ID);\r\n\t}", "public interface CommodityService {\n\n /**\n * 根據id 查詢\n * @return\n */\n Commodity findById(Long id);\n\n /**\n * 搜索\n * @param searchParameter\n * @return\n */\n Page<Commodity> search(SearchParameter searchParameter);\n}", "public interface RoleInfoService extends Service<RoleInfo> {\n RoleInfo queryRoleInfoById(int id);\n}", "public static void main(String[] args) {\n\t\tApplicationContext context =\n\t\t\t new ClassPathXmlApplicationContext(new String[] {\"services.xml\"});\n\t\t\tHelloBean xmlBean = (HelloBean)context.getBean(\"xmlHelloID\");\n\t\t\tSystem.out.println(xmlBean.getMsg() + \" called \" + xmlBean.getCount() + \" times.\");\n\t\t\t\n\t\t//\tAnnotation example\n\t\t\tApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class);\n\t\t\t HelloBean annotationBean = ctx.getBean(HelloBean.class);\n\t\t\t System.out.println(annotationBean.getMsg() + \" called \" + annotationBean.getCount() + \" times.\");\n\t}", "public interface LightTenantService {\n\n Result findAll();\n}", "public static void main(String[] args) {\n\t\tApplicationContext ac = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\r\n\t\t//System.out.println(ac.getBean(\"user\"));\r\n\t\t//User user = ac.getBean(User.class);\r\n\t\tString[] beanNames = ac.getBeanNamesForType(User.class);\r\n\t\t//System.out.println(user);\r\n\t\tfor (String string : beanNames) {\r\n\t\t\tSystem.out.println(string);\r\n\t\t\t\r\n\t\t}\r\n\t\tUser user = (User) ac.getBean(\"hkk.spring.javaBeans.User#0\");\r\n\t\tUser user2 = (User) ac.getBean(\"user\");\r\n\t\tUser user3 = (User) ac.getBean(\"user\");\r\n\t\tSystem.out.println(user3==user2);\r\n\t}", "public interface IUserAccountService {\n\n\t/**\n\t * The method is responsible for adding new user or registering new user\n\t * \n\t * @param transientUser\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic Long addUser(User transientUser) throws Exception;\n\n\t/**\n\t * The method is responsible for updating existing user information\n\t * \n\t * @param detachedUser\n\t * @throws Exception\n\t */\n\tpublic void updateUser(User detachedUser) throws Exception;\n\n\t/**\n\t * The method is responsible for deleting existing user.\n\t * \n\t * @param userToDelete\n\t * @throws Exception\n\t */\n\tpublic void deleteUser(User userToDelete) throws Exception;\n\n\t/**\n\t * This method returns the user with username passed in parameter\n\t * \n\t * @param username\n\t * @return\n\t * @throws Exception\n\t */\n\tpublic User findByUserName(String username) throws Exception;\n\n\t/**\n\t * This method returns all the users of the system\n\t * @return\n\t */\n\tpublic List<User> findAll();\n\n}", "public static IMarryService getInstance(ApplicationContext context) {\r\n\t\treturn (IMarryService) context.getBean(SERVICE_BEAN_ID);\r\n\t}", "public static void main(String[] args) {\n\t\tAnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);\n\t\tIndexService indexService = (IndexService) context.getBean(\"indexServiceImpl1\");\n\t\tindexService.query();\n\t}", "public interface UserService {\n\n public SysUser findByUserName();\n}", "@Test\n public void testAlians() {\n ApplicationContext context = new ClassPathXmlApplicationContext(\"section3_Bean_overview/config/spring.xml\");\n Car car = context.getBean(\"carAliasOut\", Car.class);\n Car car2 = context.getBean(\"carAliasIn\", Car.class);\n System.out.println(car.equals(car2));\n System.out.println(car.getEngineer());\n }", "public static void main(String[] args) throws Exception {\n\t\tApplicationContext factory = new AnnotationConfigApplicationContext(AppConfig.class);\n\t\t\n\t\t\n\t\tProductService service = (ProductServiceImpl) factory.getBean(ProductServiceImpl.class);\n\t\tSystem.out.println(\"Scanning Items.... \");\n\t\t\n\t\tservice.scanProductId(\"Item_1\");\n\t\tservice.scanProductId(\"Item_2\");\n\t\tservice.scanProductId(\"Item_3\");\n\t\tservice.scanProductId(\"Item_4\");\n\t\tservice.scanProductId(\"Item_5\");\n\t\tservice.scanProductId(\"Item_6\");\n\t\tservice.scanProductId(\"Item_7\");\n\t\t\n\t\tSystem.out.println(\"Calculating order amount....\");\n\t\tservice.calculateBill();\n\n\t\t//SpringApplication.run(OrderApplication.class, args);\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tApplicationContext context = new AnnotationConfigApplicationContext(JavaConfig.class);\n\nStudent s1 = context.getBean(\"s1\", Student.class);\n\nSystem.out.println(s1);\n\n\n\t}", "@Autowired\r\n public RentController(RentService rentService){\r\n this.rentService = rentService;\r\n }" ]
[ "0.77242184", "0.66126096", "0.65661067", "0.64903075", "0.6415929", "0.6349454", "0.6321963", "0.6283058", "0.62365025", "0.6110777", "0.60046756", "0.59631443", "0.5959265", "0.59239906", "0.591333", "0.58957446", "0.5895182", "0.5857788", "0.5852039", "0.5827998", "0.58035827", "0.575008", "0.5741226", "0.57371616", "0.5718825", "0.57067543", "0.5692995", "0.568112", "0.5679905", "0.5676238", "0.5668233", "0.5665527", "0.5665018", "0.5654576", "0.5650926", "0.56306946", "0.56285316", "0.5613431", "0.56063044", "0.5599331", "0.5597001", "0.5589703", "0.5578936", "0.5569672", "0.55692834", "0.55476", "0.55363065", "0.55348855", "0.5498887", "0.5468789", "0.54623485", "0.54463065", "0.5442244", "0.54405737", "0.543102", "0.54199666", "0.5412888", "0.54106385", "0.54082924", "0.5406312", "0.53907394", "0.53865826", "0.5378191", "0.5367261", "0.53530097", "0.5349936", "0.53447145", "0.5338091", "0.53293663", "0.5323767", "0.53180814", "0.5316348", "0.530993", "0.53072673", "0.5301318", "0.52998924", "0.528983", "0.5288089", "0.5286526", "0.5284185", "0.52720183", "0.525992", "0.5255511", "0.5245359", "0.5243363", "0.52277106", "0.5227273", "0.52262646", "0.5225861", "0.5223803", "0.52213085", "0.52197343", "0.5216061", "0.52142394", "0.52131844", "0.52066976", "0.5205483", "0.52044636", "0.5204365", "0.5201749", "0.5201209" ]
0.0
-1
Instantiates a new default append parameter.
public ProducerAppendParameter(InputStream inputPdf, InputStream attachmentFile, OutputStream resultingPdf, String zugferdVersion, String zugferdConformanceLevel) { super(inputPdf, attachmentFile, resultingPdf, zugferdVersion, zugferdConformanceLevel); producer = "Konik Library"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public E addDefault();", "public ParametersBuilder() {\n this(Parameters.DEFAULT);\n }", "public com.guidewire.datamodel.ParamDocument.Param addNewParam()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ParamDocument.Param target = null;\r\n target = (com.guidewire.datamodel.ParamDocument.Param)get_store().add_element_user(PARAM$14);\r\n return target;\r\n }\r\n }", "@Override\r\n public GenValueAppendStrategy getGenValueAppendStrategy() {\n return null;\r\n }", "ParameterableElement getDefault();", "@Override\n public String str() {\n return \"append\";\n }", "@Override\r\n public IPreExtensionStrategy setGenValueAppendStrategy(GenValueAppendStrategy strategy) {\r\n // TODO Auto-generated method stub\r\n return null;\r\n }", "ParameterableElement getOwnedDefault();", "protected static ParameterDef createOptionalParameter(final String param, final Value defaultValue) {\n return new ParameterDef(new Variable(param), ParameterType.READ_ONLY, new ValueExpr(defaultValue));\n }", "public com.isat.catalist.oms.order.OOSOrderLineItemParamType addNewParameters()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.isat.catalist.oms.order.OOSOrderLineItemParamType target = null;\n target = (com.isat.catalist.oms.order.OOSOrderLineItemParamType)get_store().add_element_user(PARAMETERS$16);\n return target;\n }\n }", "@Override\n\tpublic String addNew(String[] args) {\n\t\treturn null;\n\t}", "private void addDefaultPerson() {\n personNames.add(\"you\");\n personIds.add(STConstants.PERSON_NULL_ID);\n personPhotos.add(null);\n personSelections.add(new HashSet<Integer>()); \n }", "public DefaultAttribute( String upId, String... vals )\n {\n try\n {\n add( vals );\n }\n catch ( LdapInvalidAttributeValueException liave )\n {\n // Do nothing, it can't happen\n }\n\n setUpId( upId );\n }", "public native String appendItem(String newItem);", "public RTWLocation append(Object... list);", "@Override\n public <B extends SqlBuilder<B>> void append(List<? extends Consumer<? super B>> argumentAppend,\n B builder) {\n if (outerPriority.compareTo(builder.getPosition()) > 0) {\n builder.append(\"(\");\n }\n var matcher = ARGUMENT_PATTERN.matcher(template);\n builder.pushPosition(argumentPosition);\n int pos = 0;\n while (matcher.find()) {\n builder.append(template.substring(pos, matcher.start()));\n var argIndex = Integer.parseInt(template.substring(matcher.start() + 1, matcher.end() - 1));\n argumentAppend.get(argIndex).accept(builder);\n pos = matcher.end();\n }\n builder.append(template.substring(pos))\n .popPosition();\n if (outerPriority.compareTo(builder.getPosition()) > 0) {\n builder.append(\")\");\n }\n }", "public DefaultAttribute( String upId, byte[]... vals )\n {\n try\n {\n add( vals );\n }\n catch ( LdapInvalidAttributeValueException liave )\n {\n // Do nothing, this can't happen\n }\n\n setUpId( upId );\n }", "private Node append(E element) {\n \treturn new Node(sentinel.pred, element);\n }", "public com.isat.catalist.oms.order.OOSOrderLineItemParamType addNewRParameters()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.isat.catalist.oms.order.OOSOrderLineItemParamType target = null;\n target = (com.isat.catalist.oms.order.OOSOrderLineItemParamType)get_store().add_element_user(RPARAMETERS$20);\n return target;\n }\n }", "public Builder() {\n\t\t\tsuper(Defaults.NAME);\n\t\t}", "@Override\r\n\tpublic java.lang.String toString()\r\n\t{\r\n\t\treturn \"appendParamToUrl\";\r\n\t}", "private void addDefaultParameterInfo(MethodConfig argMethodConfig,\r\n\t\t\tString argParameterName, String argParameterClass) {\r\n\t\tParameterConfig param = new ParameterConfig();\r\n\t\tparam.setClassName(argParameterClass);\r\n\t\tparam.setName(argParameterName);\r\n\t\targMethodConfig.setConfigObject(param);\r\n\r\n\t\tCommentConfig paramComment = new CommentConfig();\r\n\t\tparamComment.setValue(\"Auto generated by Codegen.\");\r\n\t\tparam.setConfigObject(paramComment);\r\n\t}", "void generateDefaultValue(Builder methodBuilder);", "public void appendDesc(String append){\n this.append = append;\n }", "protected abstract boolean checkedParametersAppend();", "public Builder defaultArgs(List<String> args) {\n if (isValid(args)) {\n this.defaultArgs = split(args);\n }\n return this;\n }", "Builder addProducer(Person.Builder value);", "E createDefaultElement();", "public DraggableBehavior setAppendTo(String appendTo)\n\t{\n\t\tthis.options.putLiteral(\"appendTo\", appendTo);\n\t\treturn this;\n\t}", "public DefaultAttribute( String upId, Value... vals )\n {\n // The value can be null, this is a valid value.\n if ( vals[0] == null )\n {\n add( new Value( ( String ) null ) );\n }\n else\n {\n for ( Value val : vals )\n {\n add( val );\n }\n }\n\n setUpId( upId );\n }", "public Arguments getDefaultParameters()\n {\n Arguments params = new Arguments();\n params.addArgument(\"SleepTime\", String.valueOf(DEFAULT_SLEEP_TIME));\n params.addArgument(\n \"SleepMask\",\n \"0x\" + (Long.toHexString(DEFAULT_SLEEP_MASK)).toUpperCase());\n return params;\n }", "public ILoString append(String that) {\n return new ConsLoString(that, new MtLoString()); \n }", "@Override\n public StringBuilder appendAttributes(StringBuilder buf) {\n super.appendAttributes(buf);\n appendAttribute(buf, \"param\", param);\n return buf;\n }", "public CommandLineBuilder append( final String segment )\n {\n if( segment != null )\n {\n return append( new String[]{ segment } );\n }\n return this;\n }", "protected a generateDefaultLayoutParams() {\n return new a();\n }", "public static native ExtElement append(ExtElement parent, DomConfig config)/*-{\r\n\t\tvar configJS = [email protected]::getJsObject()();\r\n\t\tvar obj = $wnd.Ext.DomHelper.append(\r\n\t\t\t\[email protected]::getJsObj()(),\r\n\t\t\t\tconfigJS, true);\r\n\t\treturn @com.ait.toolkit.sencha.shared.client.dom.ExtElement::new(Lcom/google/gwt/core/client/JavaScriptObject;)(obj);\r\n\t}-*/;", "public Tag addDefaultTag(){\n StringProperty tagName = new SimpleStringProperty();\n tagName.setValue(\"New Tag\");\n Tag newTag = new Tag(tagName);\n\n\n /* verify if id is integer or string, we handle just strings here\n newTag.setIdProperty(0);\n */\n\n addTag(newTag);\n\n System.out.println(contentFromTags(tags));\n\n return newTag;\n }", "private static void appendTheSpecifiedElementToLinkedList() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\n\t}", "ILoLoString append(ILoString that);", "public Builder defaultArgs(String args) {\n defaultArgs(toList(args));\n return this;\n }", "@Test\n void appendTest() {\n var map = mock(SqlBuiltInMap.class);\n var builder = new DefaultSqlBuilder(SqlLiteralTypeHandlerMap.getDefaultMap(), map);\n var concatAppender = SqlRecursiveAppender.forTemplate(\"{0}||{1}\", EXPR_ADD, EXPR_ADD);\n concatAppender.append(\n List.of(SqlRecursiveAppenderTest::appendArg0, SqlRecursiveAppenderTest::appendArg1,\n SqlRecursiveAppenderTest::appendArg2), builder);\n assertThat(builder.getSql()).isEqualTo(\"?||??||?\");\n assertThat(builder.getBindsWithPos())\n .containsExactlyInAnyOrder(new BindWithPos(bindName1, Integer.class, List.of(1, 2)),\n new BindWithPos(bindName2, String.class, List.of(3, 4)));\n }", "private LiteralAnnotationTerm appendLiteralArgument(Node bme, Tree.Term literal) {\n if (spread) {\n bme.addError(\"Spread static arguments not supported\");\n }\n LiteralAnnotationTerm argument = new LiteralAnnotationTerm();\n argument.setTerm(literal);\n this.term = argument;\n return argument;\n }", "public void append(Object item);", "Builder addAbout(String value);", "public interface MargeDefaults {\n\n\tpublic static final String DEFAULT_UUID = \"D0FFBEE2D0FFBEE2D0FFBEE2D0FFBEE2\";\n \n public static final UUID[] DEFAULT_UUID_ARRAY = new UUID[] { new UUID(DEFAULT_UUID, false) };\n\n\tpublic static final String DEFAULT_SERVER_NAME = \"We_Love_Duff_Beer\";\n \n}", "private ConfigurationObject createParamReference(int num, String name) throws Exception {\r\n ConfigurationObject param = new DefaultConfigurationObject(\"param\" + num);\r\n param.setPropertyValue(PROPERTY_NAME, name);\r\n\r\n return param;\r\n }", "public Builder addParams(\n int index, com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter.Builder builderForValue) {\n if (paramsBuilder_ == null) {\n ensureParamsIsMutable();\n params_.add(index, builderForValue.build());\n onChanged();\n } else {\n paramsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }", "public Builder addParams(\n com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter.Builder builderForValue) {\n if (paramsBuilder_ == null) {\n ensureParamsIsMutable();\n params_.add(builderForValue.build());\n onChanged();\n } else {\n paramsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "public void append(T element);", "public void append(T element);", "public static native ExtElement append(Element parent, DomConfig config)/*-{\r\n\t\tvar configJS = [email protected]::getJsObject()();\r\n\t\tvar obj = $wnd.Ext.DomHelper.append(parent, configJS, true);\r\n\t\treturn @com.ait.toolkit.sencha.shared.client.dom.ExtElement::new(Lcom/google/gwt/core/client/JavaScriptObject;)(obj);\r\n\t}-*/;", "public DefaultAttribute( byte[] upId )\n {\n setUpId( upId );\n }", "XomNode appendElement(Element element) throws XmlBuilderException;", "public void addElement() {\n\t\tXmlNode newNode = new XmlNode(rootNode, this);// make a new default-type field\n\t\taddElement(newNode);\n\t}", "@Override\n public boolean insertparam(String name) {\n return false;\n }", "public abstract void append(String s);", "public DoubleParameter addParameter(DoubleParameter p)\n {\n params.add(p);\n return p;\n }", "public com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter.Builder addParamsBuilder() {\n return getParamsFieldBuilder().addBuilder(\n com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter.getDefaultInstance());\n }", "@Override\n public int addDefaultAttribute(String localName, String uri, String prefix,\n String value)\n {\n // nothing to do, but to indicate we didn't add it...\n return -1;\n }", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 3, 4, 5, 6, 11}, optParamIndex = {7, 8, 9, 10}, javaType = {java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"80020004\", \"80020004\", \"80020004\", \"80020004\"})\n @ReturnValue(index=11)\n com.exceljava.com4j.excel.Name add(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object name,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object visible,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object macroType,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object shortcutKey,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object category,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object nameLocal);", "public ILoLoString append(ILoString that) {\n return new ConsLoLoString(that, new MtLoLoString());\n }", "public void setParametersToDefaultValues()\n/* 65: */ {\n/* 66:104 */ super.setParametersToDefaultValues();\n/* 67:105 */ this.placeholder = _placeholder_DefaultValue_xjal();\n/* 68: */ }", "public void setAppend(boolean append) {\r\n redirector.setAppend(append);\r\n incompatibleWithSpawn = true;\r\n }", "public native void appendData(String arg) /*-{\r\n\t\tvar jso = [email protected]::getJsObj()();\r\n\t\tjso.appendData(arg);\r\n }-*/;", "public DampingParam(DoubleDiscreteConstraint dampingConstraint,\n double defaultDamping) {\n super(NAME, dampingConstraint, UNITS);\n dampingConstraint.setNonEditable();\n this.setInfo(INFO);\n setDefaultValue(defaultDamping);\n setNonEditable();\n }", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 3, 4, 5, 6, 7, 11}, optParamIndex = {8, 9, 10}, javaType = {java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"80020004\", \"80020004\", \"80020004\"})\n @ReturnValue(index=11)\n com.exceljava.com4j.excel.Name add(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object name,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object visible,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object macroType,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object shortcutKey,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object category,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object nameLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersToLocal);", "Builder addProducer(String value);", "public Builder addParameters(\n int index,\n com.google.cloud.dialogflow.cx.v3beta1.Intent.Parameter.Builder builderForValue) {\n if (parametersBuilder_ == null) {\n ensureParametersIsMutable();\n parameters_.add(index, builderForValue.build());\n onChanged();\n } else {\n parametersBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }", "DefaultAttribute()\n {\n }", "Builder addProvider(Person.Builder value);", "public void extend(String inputFileName) \n\t{\n\t\tsuper.append(inputFileName);\t\n\t}", "@Override\n\tpublic final CharTerm append(CharSequence csq) { \n\t\tif (csq == null) // needed for Appendable compliance\n\t\t\treturn appendNull();\n\t\t\n\t\treturn append(csq, 0, csq.length());\n\t}", "public Builder addParameters(\n com.google.cloud.dialogflow.cx.v3beta1.Intent.Parameter.Builder builderForValue) {\n if (parametersBuilder_ == null) {\n ensureParametersIsMutable();\n parameters_.add(builderForValue.build());\n onChanged();\n } else {\n parametersBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "public DefaultSortParameters() {\n\t\tthis(null, null, null, null, null);\n\t}", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 3, 4, 5, 6, 7, 8, 11}, optParamIndex = {9, 10}, javaType = {java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"80020004\", \"80020004\"})\n @ReturnValue(index=11)\n com.exceljava.com4j.excel.Name add(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object name,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object visible,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object macroType,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object shortcutKey,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object category,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object nameLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersToLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object categoryLocal);", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 3, 4, 5, 11}, optParamIndex = {6, 7, 8, 9, 10}, javaType = {java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\"})\n @ReturnValue(index=11)\n com.exceljava.com4j.excel.Name add(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object name,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object visible,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object macroType,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object shortcutKey,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object category);", "Builder addAccountablePerson(Person.Builder value);", "Param createParam();", "Param createParam();", "Param createParam();", "public abstract void appendHypervisorParameters(final String sb);", "@Test\n void appendSwitchedTest() {\n var map = mock(SqlBuiltInMap.class);\n var builder = new DefaultSqlBuilder(SqlLiteralTypeHandlerMap.getDefaultMap(), map);\n var concatAppender = SqlRecursiveAppender.forTemplate(\"{1}||{0}\", EXPR_ADD, EXPR_ADD);\n concatAppender.append(\n List.of(SqlRecursiveAppenderTest::appendArg0, SqlRecursiveAppenderTest::appendArg1,\n SqlRecursiveAppenderTest::appendArg2), builder);\n assertThat(builder.getSql()).isEqualTo(\"?||??||?\");\n assertThat(builder.getBindsWithPos())\n .containsExactlyInAnyOrder(new BindWithPos(bindName1, Integer.class, List.of(2, 4)),\n new BindWithPos(bindName2, String.class, List.of(1, 3)));\n }", "@Override\r\n public void addAdditionalParams(WeiboParameters des, WeiboParameters src) {\n\r\n }", "default void add(Criteria... criteria) {\n legacyOperation();\n }", "public ILoString append(String that) {\n return new ConsLoString(this.first, this.rest.append(that)); \n }", "public Builder addParameters(datawave.webservice.query.QueryMessages.QueryImpl.Parameter.Builder builderForValue) {\n ensureParametersIsMutable();\n parameters_.add(builderForValue.build());\n\n return this;\n }", "public Builder addArgs(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureArgsIsMutable();\n args_.add(value);\n onChanged();\n return this;\n }", "public Builder addArgs(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureArgsIsMutable();\n args_.add(value);\n onChanged();\n return this;\n }", "public AnnotationDefaultAttr(ElemValPair s) { //\r\n elem = s;\r\n }", "Builder addProducer(Person value);", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11}, optParamIndex = {10}, javaType = {java.lang.Object.class}, nativeType = {NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR}, literal = {\"80020004\"})\n @ReturnValue(index=11)\n com.exceljava.com4j.excel.Name add(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object name,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object visible,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object macroType,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object shortcutKey,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object category,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object nameLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersToLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object categoryLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersToR1C1);", "public godot.wire.Wire.Value.Builder addArgsBuilder() {\n return getArgsFieldBuilder().addBuilder(\n godot.wire.Wire.Value.getDefaultInstance());\n }", "public Builder<T> append(T value) {\n basicBuilder.append(value);\n return this;\n }", "public static native ExtElement append(String parentId, DomConfig config)/*-{\r\n\t\tvar configJS = [email protected]::getJsObject()();\r\n\t\tvar obj = $wnd.Ext.DomHelper.append(parentId, configJS, true);\r\n\t\treturn @com.ait.toolkit.sencha.shared.client.dom.ExtElement::new(Lcom/google/gwt/core/client/JavaScriptObject;)(obj);\r\n\t}-*/;", "public void setDefaultParameters()\n {\n parameters = new Vector(); // must do this to clear any old parameters\n\n Parameter parameter = new Parameter( \"DataSet to Divide\",\n DataSet.EMPTY_DATA_SET );\n addParameter( parameter );\n\n parameter = new Parameter( \"Create new DataSet?\", new Boolean(false) );\n addParameter( parameter );\n }", "public DiceParameter(String name, String key, String desc, boolean visible, boolean enabled, boolean required, Object defaultValue) {\n super(name,key,desc,visible,enabled,required,defaultValue);\n }", "public T getAppendable() {\n/* 63 */ return this.appendable;\n/* */ }", "public static DefaultExpression default_() { throw Extensions.todo(); }", "public Builder append(QueryParam...params) {\n this.parameters.addAll(Arrays.asList(params));\n \n return this;\n }", "public static void add_default(Object... args) {\n\t\tlogger.debug(\"Called 'add_default' with args: {}\", Arrays.asList(args));\n\n\t\tfor (Object arg : args) {\n\t\t\tif (arg instanceof Scannable) {\n\t\t\t\tScannable scannable = (Scannable) arg;\n\t\t\t\tFinder.getInstance().findSingleton(JythonServer.class).addDefault(scannable);\n\t\t\t\tJythonServerFacade\n\t\t\t\t\t\t.getInstance()\n\t\t\t\t\t\t.print(scannable.getName()\n\t\t\t\t\t\t\t\t+ \" added to the list of default Scannables. Remove from the list by using command: remove_default \"\n\t\t\t\t\t\t\t\t+ scannable.getName());\n\t\t\t}\n\t\t}\n\t}", "Report addParameter(String parameter, Object value);" ]
[ "0.56282306", "0.54842514", "0.54555726", "0.53928185", "0.5382512", "0.52964056", "0.52459353", "0.5237682", "0.5174934", "0.50876576", "0.50057364", "0.5003997", "0.50014937", "0.4974904", "0.49725246", "0.49430534", "0.4931795", "0.4903377", "0.48968342", "0.48718315", "0.48158127", "0.480261", "0.4802002", "0.48000604", "0.47862992", "0.4786168", "0.476532", "0.4760388", "0.47503552", "0.47389573", "0.47363895", "0.4724172", "0.47234812", "0.47109225", "0.47043535", "0.47015935", "0.4681158", "0.46789715", "0.46686137", "0.4652756", "0.4646564", "0.46440193", "0.46430913", "0.4628012", "0.4626986", "0.46256486", "0.4624904", "0.46234632", "0.46149737", "0.46149737", "0.4613429", "0.46096525", "0.45996132", "0.4595226", "0.45895338", "0.4578523", "0.45780727", "0.45730123", "0.45615834", "0.45446575", "0.45386687", "0.45382887", "0.4537123", "0.45366645", "0.45335785", "0.4526829", "0.45241818", "0.45193467", "0.45176318", "0.45172834", "0.45165595", "0.45126644", "0.45102102", "0.4503831", "0.44973037", "0.44930103", "0.44873133", "0.44842777", "0.44842777", "0.44842777", "0.44842726", "0.44824713", "0.44745642", "0.44729006", "0.4470993", "0.44656613", "0.4465422", "0.4465422", "0.446447", "0.44607812", "0.44563717", "0.44544277", "0.44489962", "0.44455516", "0.44430283", "0.44413275", "0.444126", "0.44403765", "0.4437478", "0.44342723", "0.4434217" ]
0.0
-1
Instantiates a new default append parameter.
public ProducerAppendParameter(InputStream inputPdf, InputStream attachmentFile, OutputStream resultingPdf, String zugferdVersion, String zugferdConformanceLevel, String producer) { super(inputPdf, attachmentFile, resultingPdf, zugferdVersion, zugferdConformanceLevel); this.producer = producer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public E addDefault();", "public ParametersBuilder() {\n this(Parameters.DEFAULT);\n }", "public com.guidewire.datamodel.ParamDocument.Param addNewParam()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ParamDocument.Param target = null;\r\n target = (com.guidewire.datamodel.ParamDocument.Param)get_store().add_element_user(PARAM$14);\r\n return target;\r\n }\r\n }", "@Override\r\n public GenValueAppendStrategy getGenValueAppendStrategy() {\n return null;\r\n }", "ParameterableElement getDefault();", "@Override\n public String str() {\n return \"append\";\n }", "@Override\r\n public IPreExtensionStrategy setGenValueAppendStrategy(GenValueAppendStrategy strategy) {\r\n // TODO Auto-generated method stub\r\n return null;\r\n }", "ParameterableElement getOwnedDefault();", "protected static ParameterDef createOptionalParameter(final String param, final Value defaultValue) {\n return new ParameterDef(new Variable(param), ParameterType.READ_ONLY, new ValueExpr(defaultValue));\n }", "public com.isat.catalist.oms.order.OOSOrderLineItemParamType addNewParameters()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.isat.catalist.oms.order.OOSOrderLineItemParamType target = null;\n target = (com.isat.catalist.oms.order.OOSOrderLineItemParamType)get_store().add_element_user(PARAMETERS$16);\n return target;\n }\n }", "@Override\n\tpublic String addNew(String[] args) {\n\t\treturn null;\n\t}", "private void addDefaultPerson() {\n personNames.add(\"you\");\n personIds.add(STConstants.PERSON_NULL_ID);\n personPhotos.add(null);\n personSelections.add(new HashSet<Integer>()); \n }", "public DefaultAttribute( String upId, String... vals )\n {\n try\n {\n add( vals );\n }\n catch ( LdapInvalidAttributeValueException liave )\n {\n // Do nothing, it can't happen\n }\n\n setUpId( upId );\n }", "public native String appendItem(String newItem);", "public RTWLocation append(Object... list);", "@Override\n public <B extends SqlBuilder<B>> void append(List<? extends Consumer<? super B>> argumentAppend,\n B builder) {\n if (outerPriority.compareTo(builder.getPosition()) > 0) {\n builder.append(\"(\");\n }\n var matcher = ARGUMENT_PATTERN.matcher(template);\n builder.pushPosition(argumentPosition);\n int pos = 0;\n while (matcher.find()) {\n builder.append(template.substring(pos, matcher.start()));\n var argIndex = Integer.parseInt(template.substring(matcher.start() + 1, matcher.end() - 1));\n argumentAppend.get(argIndex).accept(builder);\n pos = matcher.end();\n }\n builder.append(template.substring(pos))\n .popPosition();\n if (outerPriority.compareTo(builder.getPosition()) > 0) {\n builder.append(\")\");\n }\n }", "public DefaultAttribute( String upId, byte[]... vals )\n {\n try\n {\n add( vals );\n }\n catch ( LdapInvalidAttributeValueException liave )\n {\n // Do nothing, this can't happen\n }\n\n setUpId( upId );\n }", "private Node append(E element) {\n \treturn new Node(sentinel.pred, element);\n }", "public com.isat.catalist.oms.order.OOSOrderLineItemParamType addNewRParameters()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.isat.catalist.oms.order.OOSOrderLineItemParamType target = null;\n target = (com.isat.catalist.oms.order.OOSOrderLineItemParamType)get_store().add_element_user(RPARAMETERS$20);\n return target;\n }\n }", "public Builder() {\n\t\t\tsuper(Defaults.NAME);\n\t\t}", "@Override\r\n\tpublic java.lang.String toString()\r\n\t{\r\n\t\treturn \"appendParamToUrl\";\r\n\t}", "private void addDefaultParameterInfo(MethodConfig argMethodConfig,\r\n\t\t\tString argParameterName, String argParameterClass) {\r\n\t\tParameterConfig param = new ParameterConfig();\r\n\t\tparam.setClassName(argParameterClass);\r\n\t\tparam.setName(argParameterName);\r\n\t\targMethodConfig.setConfigObject(param);\r\n\r\n\t\tCommentConfig paramComment = new CommentConfig();\r\n\t\tparamComment.setValue(\"Auto generated by Codegen.\");\r\n\t\tparam.setConfigObject(paramComment);\r\n\t}", "void generateDefaultValue(Builder methodBuilder);", "public void appendDesc(String append){\n this.append = append;\n }", "protected abstract boolean checkedParametersAppend();", "public Builder defaultArgs(List<String> args) {\n if (isValid(args)) {\n this.defaultArgs = split(args);\n }\n return this;\n }", "Builder addProducer(Person.Builder value);", "E createDefaultElement();", "public DraggableBehavior setAppendTo(String appendTo)\n\t{\n\t\tthis.options.putLiteral(\"appendTo\", appendTo);\n\t\treturn this;\n\t}", "public DefaultAttribute( String upId, Value... vals )\n {\n // The value can be null, this is a valid value.\n if ( vals[0] == null )\n {\n add( new Value( ( String ) null ) );\n }\n else\n {\n for ( Value val : vals )\n {\n add( val );\n }\n }\n\n setUpId( upId );\n }", "public Arguments getDefaultParameters()\n {\n Arguments params = new Arguments();\n params.addArgument(\"SleepTime\", String.valueOf(DEFAULT_SLEEP_TIME));\n params.addArgument(\n \"SleepMask\",\n \"0x\" + (Long.toHexString(DEFAULT_SLEEP_MASK)).toUpperCase());\n return params;\n }", "public ILoString append(String that) {\n return new ConsLoString(that, new MtLoString()); \n }", "@Override\n public StringBuilder appendAttributes(StringBuilder buf) {\n super.appendAttributes(buf);\n appendAttribute(buf, \"param\", param);\n return buf;\n }", "public CommandLineBuilder append( final String segment )\n {\n if( segment != null )\n {\n return append( new String[]{ segment } );\n }\n return this;\n }", "protected a generateDefaultLayoutParams() {\n return new a();\n }", "public static native ExtElement append(ExtElement parent, DomConfig config)/*-{\r\n\t\tvar configJS = [email protected]::getJsObject()();\r\n\t\tvar obj = $wnd.Ext.DomHelper.append(\r\n\t\t\t\[email protected]::getJsObj()(),\r\n\t\t\t\tconfigJS, true);\r\n\t\treturn @com.ait.toolkit.sencha.shared.client.dom.ExtElement::new(Lcom/google/gwt/core/client/JavaScriptObject;)(obj);\r\n\t}-*/;", "public Tag addDefaultTag(){\n StringProperty tagName = new SimpleStringProperty();\n tagName.setValue(\"New Tag\");\n Tag newTag = new Tag(tagName);\n\n\n /* verify if id is integer or string, we handle just strings here\n newTag.setIdProperty(0);\n */\n\n addTag(newTag);\n\n System.out.println(contentFromTags(tags));\n\n return newTag;\n }", "private static void appendTheSpecifiedElementToLinkedList() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\n\t}", "ILoLoString append(ILoString that);", "public Builder defaultArgs(String args) {\n defaultArgs(toList(args));\n return this;\n }", "@Test\n void appendTest() {\n var map = mock(SqlBuiltInMap.class);\n var builder = new DefaultSqlBuilder(SqlLiteralTypeHandlerMap.getDefaultMap(), map);\n var concatAppender = SqlRecursiveAppender.forTemplate(\"{0}||{1}\", EXPR_ADD, EXPR_ADD);\n concatAppender.append(\n List.of(SqlRecursiveAppenderTest::appendArg0, SqlRecursiveAppenderTest::appendArg1,\n SqlRecursiveAppenderTest::appendArg2), builder);\n assertThat(builder.getSql()).isEqualTo(\"?||??||?\");\n assertThat(builder.getBindsWithPos())\n .containsExactlyInAnyOrder(new BindWithPos(bindName1, Integer.class, List.of(1, 2)),\n new BindWithPos(bindName2, String.class, List.of(3, 4)));\n }", "private LiteralAnnotationTerm appendLiteralArgument(Node bme, Tree.Term literal) {\n if (spread) {\n bme.addError(\"Spread static arguments not supported\");\n }\n LiteralAnnotationTerm argument = new LiteralAnnotationTerm();\n argument.setTerm(literal);\n this.term = argument;\n return argument;\n }", "public void append(Object item);", "Builder addAbout(String value);", "public interface MargeDefaults {\n\n\tpublic static final String DEFAULT_UUID = \"D0FFBEE2D0FFBEE2D0FFBEE2D0FFBEE2\";\n \n public static final UUID[] DEFAULT_UUID_ARRAY = new UUID[] { new UUID(DEFAULT_UUID, false) };\n\n\tpublic static final String DEFAULT_SERVER_NAME = \"We_Love_Duff_Beer\";\n \n}", "private ConfigurationObject createParamReference(int num, String name) throws Exception {\r\n ConfigurationObject param = new DefaultConfigurationObject(\"param\" + num);\r\n param.setPropertyValue(PROPERTY_NAME, name);\r\n\r\n return param;\r\n }", "public Builder addParams(\n int index, com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter.Builder builderForValue) {\n if (paramsBuilder_ == null) {\n ensureParamsIsMutable();\n params_.add(index, builderForValue.build());\n onChanged();\n } else {\n paramsBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }", "public Builder addParams(\n com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter.Builder builderForValue) {\n if (paramsBuilder_ == null) {\n ensureParamsIsMutable();\n params_.add(builderForValue.build());\n onChanged();\n } else {\n paramsBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "public void append(T element);", "public void append(T element);", "public static native ExtElement append(Element parent, DomConfig config)/*-{\r\n\t\tvar configJS = [email protected]::getJsObject()();\r\n\t\tvar obj = $wnd.Ext.DomHelper.append(parent, configJS, true);\r\n\t\treturn @com.ait.toolkit.sencha.shared.client.dom.ExtElement::new(Lcom/google/gwt/core/client/JavaScriptObject;)(obj);\r\n\t}-*/;", "public DefaultAttribute( byte[] upId )\n {\n setUpId( upId );\n }", "XomNode appendElement(Element element) throws XmlBuilderException;", "public void addElement() {\n\t\tXmlNode newNode = new XmlNode(rootNode, this);// make a new default-type field\n\t\taddElement(newNode);\n\t}", "@Override\n public boolean insertparam(String name) {\n return false;\n }", "public abstract void append(String s);", "public DoubleParameter addParameter(DoubleParameter p)\n {\n params.add(p);\n return p;\n }", "public com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter.Builder addParamsBuilder() {\n return getParamsFieldBuilder().addBuilder(\n com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCParameter.getDefaultInstance());\n }", "@Override\n public int addDefaultAttribute(String localName, String uri, String prefix,\n String value)\n {\n // nothing to do, but to indicate we didn't add it...\n return -1;\n }", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 3, 4, 5, 6, 11}, optParamIndex = {7, 8, 9, 10}, javaType = {java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"80020004\", \"80020004\", \"80020004\", \"80020004\"})\n @ReturnValue(index=11)\n com.exceljava.com4j.excel.Name add(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object name,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object visible,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object macroType,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object shortcutKey,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object category,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object nameLocal);", "public ILoLoString append(ILoString that) {\n return new ConsLoLoString(that, new MtLoLoString());\n }", "public void setParametersToDefaultValues()\n/* 65: */ {\n/* 66:104 */ super.setParametersToDefaultValues();\n/* 67:105 */ this.placeholder = _placeholder_DefaultValue_xjal();\n/* 68: */ }", "public void setAppend(boolean append) {\r\n redirector.setAppend(append);\r\n incompatibleWithSpawn = true;\r\n }", "public native void appendData(String arg) /*-{\r\n\t\tvar jso = [email protected]::getJsObj()();\r\n\t\tjso.appendData(arg);\r\n }-*/;", "public DampingParam(DoubleDiscreteConstraint dampingConstraint,\n double defaultDamping) {\n super(NAME, dampingConstraint, UNITS);\n dampingConstraint.setNonEditable();\n this.setInfo(INFO);\n setDefaultValue(defaultDamping);\n setNonEditable();\n }", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 3, 4, 5, 6, 7, 11}, optParamIndex = {8, 9, 10}, javaType = {java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"80020004\", \"80020004\", \"80020004\"})\n @ReturnValue(index=11)\n com.exceljava.com4j.excel.Name add(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object name,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object visible,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object macroType,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object shortcutKey,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object category,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object nameLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersToLocal);", "Builder addProducer(String value);", "public Builder addParameters(\n int index,\n com.google.cloud.dialogflow.cx.v3beta1.Intent.Parameter.Builder builderForValue) {\n if (parametersBuilder_ == null) {\n ensureParametersIsMutable();\n parameters_.add(index, builderForValue.build());\n onChanged();\n } else {\n parametersBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }", "DefaultAttribute()\n {\n }", "Builder addProvider(Person.Builder value);", "public void extend(String inputFileName) \n\t{\n\t\tsuper.append(inputFileName);\t\n\t}", "@Override\n\tpublic final CharTerm append(CharSequence csq) { \n\t\tif (csq == null) // needed for Appendable compliance\n\t\t\treturn appendNull();\n\t\t\n\t\treturn append(csq, 0, csq.length());\n\t}", "public Builder addParameters(\n com.google.cloud.dialogflow.cx.v3beta1.Intent.Parameter.Builder builderForValue) {\n if (parametersBuilder_ == null) {\n ensureParametersIsMutable();\n parameters_.add(builderForValue.build());\n onChanged();\n } else {\n parametersBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "public DefaultSortParameters() {\n\t\tthis(null, null, null, null, null);\n\t}", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 3, 4, 5, 6, 7, 8, 11}, optParamIndex = {9, 10}, javaType = {java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"80020004\", \"80020004\"})\n @ReturnValue(index=11)\n com.exceljava.com4j.excel.Name add(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object name,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object visible,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object macroType,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object shortcutKey,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object category,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object nameLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersToLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object categoryLocal);", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 3, 4, 5, 11}, optParamIndex = {6, 7, 8, 9, 10}, javaType = {java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT, NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_ERROR}, literal = {\"80020004\", \"80020004\", \"80020004\", \"80020004\", \"80020004\"})\n @ReturnValue(index=11)\n com.exceljava.com4j.excel.Name add(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object name,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object visible,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object macroType,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object shortcutKey,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object category);", "Builder addAccountablePerson(Person.Builder value);", "Param createParam();", "Param createParam();", "Param createParam();", "public abstract void appendHypervisorParameters(final String sb);", "@Test\n void appendSwitchedTest() {\n var map = mock(SqlBuiltInMap.class);\n var builder = new DefaultSqlBuilder(SqlLiteralTypeHandlerMap.getDefaultMap(), map);\n var concatAppender = SqlRecursiveAppender.forTemplate(\"{1}||{0}\", EXPR_ADD, EXPR_ADD);\n concatAppender.append(\n List.of(SqlRecursiveAppenderTest::appendArg0, SqlRecursiveAppenderTest::appendArg1,\n SqlRecursiveAppenderTest::appendArg2), builder);\n assertThat(builder.getSql()).isEqualTo(\"?||??||?\");\n assertThat(builder.getBindsWithPos())\n .containsExactlyInAnyOrder(new BindWithPos(bindName1, Integer.class, List.of(2, 4)),\n new BindWithPos(bindName2, String.class, List.of(1, 3)));\n }", "@Override\r\n public void addAdditionalParams(WeiboParameters des, WeiboParameters src) {\n\r\n }", "default void add(Criteria... criteria) {\n legacyOperation();\n }", "public ILoString append(String that) {\n return new ConsLoString(this.first, this.rest.append(that)); \n }", "public Builder addParameters(datawave.webservice.query.QueryMessages.QueryImpl.Parameter.Builder builderForValue) {\n ensureParametersIsMutable();\n parameters_.add(builderForValue.build());\n\n return this;\n }", "public Builder addArgs(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureArgsIsMutable();\n args_.add(value);\n onChanged();\n return this;\n }", "public Builder addArgs(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureArgsIsMutable();\n args_.add(value);\n onChanged();\n return this;\n }", "public AnnotationDefaultAttr(ElemValPair s) { //\r\n elem = s;\r\n }", "Builder addProducer(Person value);", "@VTID(10)\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11}, optParamIndex = {10}, javaType = {java.lang.Object.class}, nativeType = {NativeType.VARIANT}, variantType = {Variant.Type.VT_ERROR}, literal = {\"80020004\"})\n @ReturnValue(index=11)\n com.exceljava.com4j.excel.Name add(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object name,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object visible,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object macroType,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object shortcutKey,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object category,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object nameLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersToLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object categoryLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersToR1C1);", "public godot.wire.Wire.Value.Builder addArgsBuilder() {\n return getArgsFieldBuilder().addBuilder(\n godot.wire.Wire.Value.getDefaultInstance());\n }", "public Builder<T> append(T value) {\n basicBuilder.append(value);\n return this;\n }", "public static native ExtElement append(String parentId, DomConfig config)/*-{\r\n\t\tvar configJS = [email protected]::getJsObject()();\r\n\t\tvar obj = $wnd.Ext.DomHelper.append(parentId, configJS, true);\r\n\t\treturn @com.ait.toolkit.sencha.shared.client.dom.ExtElement::new(Lcom/google/gwt/core/client/JavaScriptObject;)(obj);\r\n\t}-*/;", "public void setDefaultParameters()\n {\n parameters = new Vector(); // must do this to clear any old parameters\n\n Parameter parameter = new Parameter( \"DataSet to Divide\",\n DataSet.EMPTY_DATA_SET );\n addParameter( parameter );\n\n parameter = new Parameter( \"Create new DataSet?\", new Boolean(false) );\n addParameter( parameter );\n }", "public DiceParameter(String name, String key, String desc, boolean visible, boolean enabled, boolean required, Object defaultValue) {\n super(name,key,desc,visible,enabled,required,defaultValue);\n }", "public T getAppendable() {\n/* 63 */ return this.appendable;\n/* */ }", "public static DefaultExpression default_() { throw Extensions.todo(); }", "public Builder append(QueryParam...params) {\n this.parameters.addAll(Arrays.asList(params));\n \n return this;\n }", "public static void add_default(Object... args) {\n\t\tlogger.debug(\"Called 'add_default' with args: {}\", Arrays.asList(args));\n\n\t\tfor (Object arg : args) {\n\t\t\tif (arg instanceof Scannable) {\n\t\t\t\tScannable scannable = (Scannable) arg;\n\t\t\t\tFinder.getInstance().findSingleton(JythonServer.class).addDefault(scannable);\n\t\t\t\tJythonServerFacade\n\t\t\t\t\t\t.getInstance()\n\t\t\t\t\t\t.print(scannable.getName()\n\t\t\t\t\t\t\t\t+ \" added to the list of default Scannables. Remove from the list by using command: remove_default \"\n\t\t\t\t\t\t\t\t+ scannable.getName());\n\t\t\t}\n\t\t}\n\t}", "Report addParameter(String parameter, Object value);" ]
[ "0.56282306", "0.54842514", "0.54555726", "0.53928185", "0.5382512", "0.52964056", "0.52459353", "0.5237682", "0.5174934", "0.50876576", "0.50057364", "0.5003997", "0.50014937", "0.4974904", "0.49725246", "0.49430534", "0.4931795", "0.4903377", "0.48968342", "0.48718315", "0.48158127", "0.480261", "0.4802002", "0.48000604", "0.47862992", "0.4786168", "0.476532", "0.4760388", "0.47503552", "0.47389573", "0.47363895", "0.4724172", "0.47234812", "0.47109225", "0.47043535", "0.47015935", "0.4681158", "0.46789715", "0.46686137", "0.4652756", "0.4646564", "0.46440193", "0.46430913", "0.4628012", "0.4626986", "0.46256486", "0.4624904", "0.46234632", "0.46149737", "0.46149737", "0.4613429", "0.46096525", "0.45996132", "0.4595226", "0.45895338", "0.4578523", "0.45780727", "0.45730123", "0.45615834", "0.45446575", "0.45386687", "0.45382887", "0.4537123", "0.45366645", "0.45335785", "0.4526829", "0.45241818", "0.45193467", "0.45176318", "0.45172834", "0.45165595", "0.45126644", "0.45102102", "0.4503831", "0.44973037", "0.44930103", "0.44873133", "0.44842777", "0.44842777", "0.44842777", "0.44842726", "0.44824713", "0.44745642", "0.44729006", "0.4470993", "0.44656613", "0.4465422", "0.4465422", "0.446447", "0.44607812", "0.44563717", "0.44544277", "0.44489962", "0.44455516", "0.44430283", "0.44413275", "0.444126", "0.44403765", "0.4437478", "0.44342723", "0.4434217" ]
0.0
-1
Button event that activates Login()
public void Login(ActionEvent event) throws Exception{ Login(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void LoginButton() {\n\t\t\r\n\t}", "public void btnLoginClicked() {\n String username = txfUsername.getText();\n String password = txfPassword.getText();\n DatabaseController database = new DatabaseController(new TuDbConnectionFactory());\n Authentication auth = new Authentication(database);\n if (auth.signIn(username, password)) {\n Player player = new Player(username, database.getPersonalTopScore(username));\n game.setScreen(new PreGameScreen(game,\"music/bensound-funkyelement.mp3\", player));\n } else {\n txfUsername.setColor(Color.RED);\n txfPassword.setColor(Color.RED);\n }\n }", "public void clickOnLoginButton(){\n\t\tthis.loginButton.click();\n\t}", "public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}", "private void btnLogin(ActionEvent e) {\n }", "@Override\n public void loginScreen() {\n logIn = new GUILogInScreen().getPanel();\n frame.setContentPane(logIn);\n ((JButton) logIn.getComponent(4)).addActionListener(e -> {\n setUsername();\n });\n }", "public void actionPerformed(ActionEvent e) {\n \t\t\t\tlogin();\n \t\t\t}", "public void clickLoginBtn() {\r\n\t\tthis.loginBtn.click(); \r\n\t}", "@OnClick(R.id.email_sign_in_button) public void onLoginClicked() {\n String uname = username.getText().toString();\n String pass = password.getText().toString();\n\n loginForm.clearAnimation();\n\n // Start login\n presenter.doLogin(new AuthCredentials(uname, pass));\n }", "public void onLoginButtonClicked() {\n // Start loading the process\n loginView.setProgressBarMessage(\"Logging in...\");\n loginView.showProgressBar();\n\n // Login using a username and password\n authService.login(loginView.getUsernameText(), loginView.getPasswordText())\n .subscribe(new Observer<AuthResponse>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onNext(AuthResponse authResponse) {\n respondToLoginResponse(authResponse);\n }\n\n @Override\n public void onError(Throwable e) {\n e.printStackTrace();\n loginView.showToastShort(\"Internal Error. Failed to login.\");\n loginView.dismissProgressBar();\n }\n\n @Override\n public void onComplete() {\n\n }\n });\n }", "public void login() {\n presenter.login(username.getText().toString(), password.getText().toString());\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tlogin();\n\t\t\t}", "public void clickLogin() {\n\t\tcontinueButton.click();\n\t}", "public void LogInOnAction(Event e) {\n\t \t\r\n\t \tif(BookGateway.getInstance().getAuthentication(this.userNameId.getText(), this.passwordId.getText())) {\r\n\t \t\tthis.whiteOutId.setVisible(false);\r\n\t \t\tthis.whiteOutId.setDisable(true);\r\n\t \t\t// TODO: Update label name in the corner.. \r\n\t \t\tthis.nameLabelId.setText(\"Hello, \" + BookGateway.currentUser.getFirstName());\r\n\t \t\r\n\t \t}else {\r\n\t \t\t// true\r\n\t \t\tmessAlert(\"Invalid\",\"Wrong Username or password\");\r\n\t \t\tthis.userNameId.setText(\"\");\r\n\t \t\tthis.passwordId.setText(\"\");\r\n\t \t\te.consume();\r\n\t \t}\r\n\t \t\r\n\t \t\r\n\t }", "@Override\n public void onLoginClicked(String username, String password) {\n loginView.showProgress();\n loginInteractor.authorize(username, password, this);\n }", "public void actionPerformedLogin(ActionListener login) {\n btnLogin.addActionListener(login);\n }", "public void navLogin() {\n container.getChildren().clear();\n loginText.setText(\"Vennligst skriv inn brukernavn og passord:\");\n Label name = new Label(\"Brukernavn:\");\n Label pwd = new Label(\"Passord:\");\n TextField username = new TextField(); /* Lager tekstfelt */\n username.getStyleClass().add(\"textField\");\n PasswordField password = new PasswordField(); /* Ditto */\n password.getStyleClass().add(\"textField\");\n password.setOnAction(new EventHandler<ActionEvent>() {\n public void handle(ActionEvent args) {\n handleLogin(login.checkLogin(username.getText(), password.getText()));\n }\n });\n username.getStyleClass().add(\"inpDefault\");\n password.getStyleClass().add(\"inpDefault\");\n Button logIn = new Button(\"Logg inn\"); /* Laget knapp, Logg inn */\n Button register = new Button(\"Registrer deg\"); /* Skal sende deg til en side for registrering */\n HBox buttons = new HBox();\n buttons.getChildren().addAll(logIn, register);\n container.setPadding(new Insets(15, 12, 15, 12));\n container.setSpacing(5);\n container.getChildren().addAll(loginText, name, username, pwd, password, buttons);\n register.setOnMouseClicked(event -> navRegister());\n logIn.setOnMouseClicked(event -> handleLogin(login.checkLogin(username.getText(), password.getText())));\n }", "private void setupLoginButton() {\n findViewById(R.id.loginActivityLoginButton).setOnClickListener(view -> {\n switch (\n this.loginController.verifyUserCredentials(\n ((TextView)findViewById(R.id.loginActivityEmailInput)).getText().toString().trim(),\n ((TextView)findViewById(R.id.loginActivityPasswordInput)).getText().toString().trim()\n )){\n case CORRECT_CREDENTIALS:\n Intent intent = new Intent(LoginActivity.this, MusicMatch.class);\n startActivity(intent);\n break;\n case INCORRECT_CREDENTIALS:\n Toast.makeText(getApplicationContext(), \"Error: Invalid Credentials\", Toast.LENGTH_LONG).show();\n break;\n default:\n Toast.makeText(getApplicationContext(), \"Network unavailable please try again later\", Toast.LENGTH_LONG).show();\n break;\n }\n });\n }", "private void onLoginButtonClicked() {\n this.loginManager = new LoginManager(this, this);\n this.password = passwordEditText.getText().toString().trim();\n this.username = usernameEditText.getText().toString().trim();\n if (username.isEmpty() || password.isEmpty()) {\n Snackbar.make(coordinatorLayout, R.string.fill_all_fields_snackbar, Snackbar.LENGTH_LONG).show();\n } else loginManager.fetchUsersToDatabase(username, password, serverName, serverPort);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(v==buttonlogin)\n\t\t\t\t{\n\t\t\t\t\tloginUser();\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tlogin();\r\n\t\t\t}", "public void actionPerformed(ActionEvent arg0) {\n\n\t\t\t\tlogin();\n\t\t\t\t\n\t\t\t}", "public void clickOnLoginButton() {\n\t\tutil.clickOnElement(this.loginPageLocators.getLoginButtonElement());\n\t}", "private void showLogin() {\n \t\tLogin.actionHandleLogin(this);\n \t}", "@FXML\r\n\tpublic void handleLoginButton() throws IOException{\r\n\t\tString username = tfUsernameLogin.getText();\r\n\t\tString password = pfPasswordLogin.getText();\r\n\t\tuserCred = theController.isValidUser(username, password);\r\n\t\tif(userCred.equals(\"manager\")){\r\n\t\t\tloginSuccess = true;\r\n\t\t\tconsoleScreen.setDisable(false);\r\n\t\t\tactionItemsScreen.setDisable(false);\r\n\t\t\tmemberScreen.setDisable(false);\r\n\t\t\tteamScreen.setDisable(false);\r\n\t\t\thandleConsoleButton();\r\n\t\t}\r\n\t\telse if(userCred.equals(\"employee\")){\r\n\t\t\tloginSuccess = true;\r\n\t\t\tconsoleScreen.setDisable(false);\r\n\t\t\tactionItemsScreen.setDisable(false);\r\n\t\t\tmemberScreen.setDisable(true);\r\n\t\t\tteamScreen.setDisable(true);\r\n\t\t\thandleConsoleButton();\r\n\t\t}\r\n\t\telse{\r\n\t\t\tlbAlertLogin.setTextFill(Color.RED);\r\n\t\t\tlbAlertLogin.setText(userCred);\r\n\t\t}\r\n\t}", "private void LoginActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void auto_log_in()\n {\n jtf_username.setText(Config.USERNAME);\n jpf_password.setText(Config.PASSWORD);\n jb_prijavi.doClick();\n\n }", "@FXML\n\tpublic void buttonLogIn(ActionEvent event) throws IOException {\n\t\tFXMLLoader loginScreen = new FXMLLoader(getClass().getResource(\"login.fxml\"));\n\t\tloginScreen.setController(this);\n\t\tParent changeToLogin = loginScreen.load();\n\t\tmainPaneRegister.getChildren().setAll(changeToLogin);\n\t}", "@Override\n public void onClick(View view) {\n attemptLogin();\n }", "public void clickOnLogin() {\n\t\tWebElement loginBtn=driver.findElement(loginButton);\n\t\tif(loginBtn.isDisplayed())\n\t\t\tloginBtn.click();\n\t}", "private void onLoginButtonClick() {\r\n\r\n //Validate the input\r\n Editable username = mUsernameInput.getText();\r\n Editable token = mTokenInput.getText();\r\n if (username == null) {\r\n mUsernameInput.setError(getString(R.string.text_profile_username_error));\r\n return;\r\n }\r\n if (token == null) {\r\n mTokenInput.setError(getString(R.string.text_profile_token_error));\r\n return;\r\n }\r\n mViewModel.logIn(username.toString(), token.toString());\r\n\r\n //Hide the keyboard\r\n FragmentActivity activity = getActivity();\r\n if (activity == null) {\r\n return;\r\n }\r\n InputMethodManager imm = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);\r\n View currentFocus = activity.getCurrentFocus();\r\n if (currentFocus == null) {\r\n currentFocus = new View(activity);\r\n }\r\n imm.hideSoftInputFromWindow(currentFocus.getWindowToken(), 0);\r\n }", "public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}", "public void mouseClicked(MouseEvent e) {\n\t\t\t\tlogin();\n\t\t\t}", "public void clickLogin() {\n\t\t driver.findElement(loginBtn).click();\n\t }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinputListenerForLoginButton();\n\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public void actionPerformed(ActionEvent e){\n if (e.getSource() == login_var){\r\n String username_input = userInp.getText();\r\n login_username = username_input;\r\n \r\n String password_input = passInp.getText();\r\n status = systemssoftwareproject.Authentication.login.login(username_input, password_input);\r\n \r\n // If credentials are a match - login successfully\r\n if(status) {\r\n setVisible(false);\r\n }\r\n \r\n // Else - display error\r\n else{\r\n JOptionPane.showMessageDialog(c, \"Incorrect Credentials! Try again.\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n \r\n // Send user to SignupForm\r\n if (e.getSource() == signup){\r\n setVisible(false);\r\n SignupForm signupForm = new SignupForm();\r\n signupForm.getLoginInstance(this);\r\n }\r\n }", "public void loginPressed(View view) {\n startActivity(new Intent(this, Login.class));\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tonLogin(v);\r\n\t\t\t\t}", "@Override\r\n public void onClick(View v) {\n userLogin();\r\n }", "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "public void loginClicked(View view) {\n setContentView(R.layout.activity_scanner);\n System.out.println(\"log in clicked\");\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t\t\t\tboolean approved = showLoginScreen();\n\t\t\t\tif(approved) {\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tGUIDriver.goToScreen(\"welcome\");\n\t\t\t\t} else {\n\t\t\t\t\tshowIncorrectMessage();\n\t\t\t\t}\n\t\t}", "public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }", "public abstract void onLogin();", "public void onLoginClick(View view) {\n dialog = initLoadingDialog();\n etUsername = findViewById(R.id.etUsername);\n etPassword = findViewById(R.id.etPassword);\n viewModel.login(etUsername.getText().toString().toLowerCase());\n }", "public void performLogin(View view) {\r\n // Do something in response to button\r\n\r\n Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://dev.m.gatech.edu/login/private?url=gtclicker://loggedin&sessionTransfer=window\"));\r\n startActivity(myIntent);\r\n }", "@Override\n public void onClick(View view) {\n onLoginClicked();\n }", "void onSignInButtonClicked();", "public void onSignInClick(MouseEvent e) {\n\t\tsignin();\n\t}", "@OnClick(R.id.btn_login)\n public void btnLoginClick(View v) {\n if (ButtonClicksHelper.canClickButton()) {\n KeyboardHelper.hideKeyboard(getDialog().getCurrentFocus());\n mPresenter.logIn();\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tf.dispose();\r\n\t\t\t\tnew Login();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}", "public login() {\n initComponents();\n \n \n }", "@OnClick(R.id.btnLogin)\n public void doLogin(View view) {\n email.setError(null);\n password.setError(null);\n\n if(email.getText().length() == 0){\n email.setError(getString(R.string.you_must_provide_your_email));\n return;\n }\n\n if(password.getText().length() == 0){\n password.setError(getString(R.string.you_must_provide_your_password));\n return;\n }\n\n // check if user && password match\n User user = User.login(email.getText().toString(), password.getText().toString());\n if(user == null){\n Toast.makeText(this, R.string.user_and_password_do_not_match, Toast.LENGTH_LONG).show();\n return;\n }\n\n // create session and start main\n startMain(user);\n }", "public void login(ActionEvent e) {\n boolean passwordCheck = jf_password.validate();\n boolean emailCheck = jf_email.validate();\n if (passwordCheck && emailCheck) {\n\n\n new LoginRequest(jf_email.getText(), jf_password.getText()) {\n @Override\n protected void success(JSONObject response) {\n Platform.runLater(fxMain::switchToDashboard);\n }\n\n @Override\n protected void fail(String error) {\n Alert alert = new Alert(Alert.AlertType.ERROR, error, ButtonType.OK);\n alert.showAndWait();\n }\n };\n\n\n }\n }", "public void inputListenerForLoginButton() throws SQLException, ParseException {\n\t\t// when Login is pressed\n\t\tString email = textField_Email.getText().toLowerCase();\n\t\ttextField_Email.setText(\"\");\n\n\t\t@SuppressWarnings(\"deprecation\")\n\t\tString password = passwordField.getText();\n\t\tpasswordField.setText(\"\");\n\n\t\tMember m = memberRepository.passwordMatchesForLogin(email, password);\n\n\t\tif (!isEmailFormatCorrect(email) || password.equals(\"\")) {\n\t\t\tlblLabel_Invalid.setVisible(true);\n\t\t\tpanel.revalidate();\n\t\t\tpanel.repaint();\n\t\t\treturn;\n\t\t}\n\n\t\tif (m != null) {\n\t\t\tif (m.isAdmin()) {\n\t\t\t\t// view el admin Panel\n\t\t\t\tAdminGUI admin = new AdminGUI();\n\t\t\t\tfrmLibraryManagementSystem.remove(panel11);\n\t\t\t\tfrmLibraryManagementSystem.getContentPane().add(admin);\n\t\t\t\tfrmLibraryManagementSystem.revalidate();\n\t\t\t\tfrmLibraryManagementSystem.repaint();\n\t\t\t} else {\n\t\t\t\t// go to BookGUI panel\n\t\t\t\tBooksGUI p = new BooksGUI(m);\n\t\t\t\tfrmLibraryManagementSystem.remove(panel11);\n\t\t\t\tfrmLibraryManagementSystem.getContentPane().add(p);\n\t\t\t\tfrmLibraryManagementSystem.revalidate();\n\t\t\t\tfrmLibraryManagementSystem.repaint();\n\t\t\t}\n\t\t} else {\n\t\t\tlblLabel_Invalid.setVisible(true);\n\t\t\tpanel.revalidate();\n\t\t\tpanel.repaint();\n\t\t}\n\n\t}", "@OnClick(R.id.buttonLogin)\n void login()\n {\n UtilsMethods.hideSoftKeyboard(this);\n if (from.equals(Keys.FROM_FIND_JOB))\n {\n\n Intent intent = new Intent(this, LoginSignUpSeekerActivity.class);\n intent.putExtra(Keys.CLICKED_EVENT, Keys.CLICKED_EVENT_LOGIN);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n else\n {\n Intent intent = new Intent(this, LoginSignUpRecruiterActivity.class);\n intent.putExtra(Keys.CLICKED_EVENT, Keys.CLICKED_EVENT_LOGIN);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n }", "private void signInEvt() {\n // Retrieve Details\n String email = this.view.getWelcomePanel().getSignInPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignInPanel().getPasswordText().getPassword()).trim();\n if (!email.equals(\"\") && !password.equals(\"\")) {\n if (model.getSudokuDB().checkLogin(email, password)) {\n // Set Player\n Player player = model.getSudokuDB().loadPlayer(email, password);\n if (player != null) {\n model.setPlayer(model.getSudokuDB().loadPlayer(email, password));\n // Clear Fields\n view.getWelcomePanel().getSignInPanel().clear();\n // Show Home Screen\n refreshHomePanel();\n view.getCardLayoutManager().show(view.getContent(), \"home\");\n } else {\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"An error occured during sign in, please try again.\", \"Sign In Error\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"The credentials you have provided are invalid, please enter them correctly or create a new account.\", \"Invalid Credentials\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to sign in, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }", "@Override\n public void onClick(View v) {\n username = mUsernameView.getText().toString();\n password = mPasswordView.getText().toString();\n login();\n }", "@FXML\n\tprivate void handleLogin() {\n\t \n\t\t\t\ttry {\n\t\t\t\t\tmain.showHomePageOverview(username.getText(),password.getText());\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\n\t}", "@Then(\"^The user clicks the login button$\")\n\tpublic void the_user_clicks_the_login_button() throws Throwable {\n\t\t\n\t lpw.click_login_button();\n\t}", "@Override\n public void onClick(View v) {\n loginUser(\"111111\");\n }", "@Override\n public void onClick(View v) {\n loginUser(\"333333\");\n }", "@OnClick(R.id.login_btn)\n void loginClick() {\n mPresenter.clickOnLogin();\n }", "public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }", "public String onClick() {\n final String login = getModel().getLogin();\n final String password = getModel().getPasssword();\n\n //Call Business\n Exception ex2 = null;\n User s = null;\n try {\n s = service.login(login, password);\n } catch (Exception ex) {\n ex2 = ex;\n }\n\n //Model to View\n if (ex2 == null) {\n getModel().setCurrentUser(s);\n return \"list\";\n } else {\n return null;\n }\n }", "public pageLogin() {\n initComponents();\n labelimage.setBorder(new EmptyBorder(0,0,0,0));\n enterButton.setBorder(null);\n enterButton.setContentAreaFilled(false);\n enterButton.setVisible(true);\n usernameTextField.setText(\"Username\");\n usernameTextField.setForeground(new Color(153,153,153));\n passwordTextField.setText(\"Password\");\n passwordTextField.setForeground(new Color(153,153,153));\n usernameAlert.setText(\" \");\n passwordAlert.setText(\" \");\n \n }", "@Override\n\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\n\t\tif(ae.getSource().equals(j_b_login)) {\n\t\t\tString username;\n\t\t\tString password;\n\t\t\t\n\t\t\tusername = j_text_Username.getText();\n\t\t\tpassword = j_text_password.getText();\n\t\t\tif(username.contentEquals(\"admin\") && password.equals(\"admin\")) {\n//\t\t\t\tnew Admin_Dashboard();\n\t\t\t\tAdmin_Dashboard AD =new Admin_Dashboard();\n\t\t\t\tAD.setVisible(true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Invalid Username or Password\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n loginUser(\"222222\");\n }", "public void login(View v) {\n\n // Disable the login button\n m_loginButton.setEnabled(false);\n\n if (validateInputs()) {\n\n if (verifyCredentials()) {\n\n // Start the home screen on successful login\n Intent intent = new Intent(LoginScreenActivity.this, HomeScreenActivity.class);\n intent.putExtra(RegistrationScreenActivity.KEY_MAIL_ID, strUserMailID);\n intent.putExtra(RegistrationScreenActivity.KEY_NAME, strUserName);\n startActivity(intent);\n }\n } else {\n\n // On Login failure, display error to the user\n Toast.makeText(getBaseContext(), \"Login failed. Check credentials\", Toast.LENGTH_LONG).show();\n }\n\n // Enable the login button for use\n m_loginButton.setEnabled(true);\n }", "public void login(ActionEvent e) throws IOException {\r\n\t\t\r\n \tString username = loginuser.getText().trim();\r\n \t//if user is admin, change to userlist screen\r\n \tif (username.equals(\"admin\")) {\r\n \tPhotos.userlistscreen();\r\n \t} else {\r\n \t\tUser user = currentAdmin.findUser(username);\r\n \t\t//if user is found, log into that user and show the album view for that user specifically\r\n \t\tif (user!=null) {\r\n \t\t\tAlbumController.currentUser = (NonAdmin) user;\r\n \t\t\tCopyController.currentUser = (NonAdmin) user;\r\n \t\t\tMoveController.currentUser = (NonAdmin) user;\r\n \t\t\tPhotos.albumscreen(user);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\r\n \t\t\talert.setTitle(\"Error\");\r\n \t\t\talert.setHeaderText(\"Invalid username\");\r\n \t\t\talert.setContentText(\"Please try again\");\r\n \t\t\talert.showAndWait();\r\n \t\t\tloginuser.setText(\"\");\r\n \t\t}\r\n \t}\r\n\t}", "public void onClickLogin(View v){\n //If the login was correct\n if (checkLogIn()) {\n // If the loggin is successfoul, save the user as a logged user into a shared preferences\n\n String username=etUser.getText().toString();\n SharedPreferences.Editor editor = sharedpreferences.edit();\n editor.putString(\"username\", username);\n editor.commit();\n\n //Create and launch a new activity\n Intent myIntent = new Intent(getApplicationContext(), EmMessage1.class);\n startActivity(myIntent);\n }\n //Wrong login\n else {\n //Change the retries text view\n tvFailLogin.setVisibility(View.VISIBLE);\n tvFailLogin.setBackgroundColor(Color.RED);\n retriesLogin--;\n tvFailLogin.setText(Integer.toString(retriesLogin));\n //If retries==0, set the login button to not enabled\n if (retriesLogin == 0) {\n bLogin.setEnabled(false);\n }\n }\n }", "public void onClick(View v) {\n\t\t\t\tString usernameField = username.getText().toString();\n\t\t\t\tString passwordField = password.getText().toString();\n\n\t\t\t\t// login with this information\n\t\t\t\tlogin(usernameField, passwordField);\n\t\t\t\t\n\t\t\t}", "public void onLoginSuccess() {\n loginButton.setEnabled(true);\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n intent.putExtra(\"email\", emailText.getText().toString());\n intent.putExtra(\"name\", loginDataBaseAdapter.getName(emailText.getText().toString()));\n startActivity(intent);\n //finish();\n }", "private void loginButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_loginButtonMouseClicked\n //Make a default user object and bind the input data\n User loginUser;\n loginUser = new User(emailField.getText(), new String(passwordField.getPassword()));\n //Check hashed credentials against database\n //JEncryption encrypter = new JEncryption();\n //loginUser.setPswd(new String(encrypter.encrypt(loginUser.getPswd())));\n try\n {\n if(loginUser.login())\n {\n //If successful load the view\n //System.out.println(loginUser.toString());\n View v = new View(loginUser.getRole(), loginUser.getUserId());\n v.setVisible(true);\n this.setVisible(false);\n }\n //If not, pop out a login failed message\n else\n {\n JOptionPane.showMessageDialog(null, \"No user with that e-mail/password combination found.\");\n }\n }\n catch(DLException d)\n {\n JOptionPane.showMessageDialog(null, \"Connection Error. Please contact an administrator if the problem persists.\");\n }\n }", "private void setupButtonClick()\n {\n settingsViewModel.getLoginFields().observe(this, new Observer<LoginFields>()\n {\n @Override\n public void onChanged(LoginFields loginModel)\n {\n //When the user has entered their credentials, set the values in the DB and for use in\n //the NetworkServiceController.\n settingsViewModel.setCredentials(loginModel.getEmail(), loginModel.getPassword());\n }\n });\n }", "public void login(ActionEvent event) throws IOException {\n\t\t//if user is admin, open admin screen\n\t\tif(username.getText().toLowerCase().equals(\"admin\")) {\n\t\t\t//open admin screen\n\t\t\tMain.changeScene(\"/view/admin.fxml\", \"Administrator Dashboard\");\t\t\t\n\t\t}\n\t\t//if user is blank, throw error\n\t\telse if(username.getText().isEmpty()){\n\t\t\tinvalidUserError.setVisible(true);\n\t\t}\n\t\t//otherwise make sure user exists and if they do set current user and change screen, if not throw error.\n\t\telse {\n\t\t\tfor(User user : UserState.getAllUsers()) {\n\t\t\t\tif(user.getUserName().toLowerCase().equals(username.getText().toLowerCase())) {\n\t\t\t\t\tUserState.setCurrentUser(user);\n\t\t\t\t\tMain.changeScene(\"/view/userhome.fxml\", \"User Home\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tinvalidUserError.setVisible(true);\n\t\t\tusername.setText(\"\");\n\t\t}\n\t}", "@Override\n public void onClick(View arg0)\n {\n if (enc.isRunning())\n {\n enc.rLogin(); // async\n }\n }", "@Override\n public void onClick(View view) {\n new ProcessLogin().execute();\n }", "void goToLogin() {\n mainFrame.setPanel(panelFactory.createPanel(PanelFactoryOptions.panelNames.LOGIN));\n }", "@Override\n public void onClick(View v) {\n openLogIn();\n\n }", "public Login() {\n initComponents();\n hideregister ();\n }", "public void loginButtonAction() {\n String username = usernameTextField.getText();\n String pass = passwordField.getText();\n\n if(checkFields()){\n if(am.login(username, pass)){\n LoginDetails.currentAdmin = am.getAdmin();\n try {\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n Stage stage = new Stage();\n Parent parent = FXMLLoader.load(getClass().getResource(\"/app/main/MainView.fxml\"));\n stage.setResizable(true);\n stage.setTitle(\"Admin Application\");\n stage.setScene(new Scene(parent, screenSize.getWidth() * 0.9, screenSize.getHeight() * 0.9));\n stage.show();\n\n Stage thisStage = (Stage) usernameTextField.getScene().getWindow();\n thisStage.close();\n\n stage.setOnCloseRequest(e -> {\n System.err.println(\"Main: Shutting down!\");\n });\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n else{\n setInfoMessage(\"Wrong username and/or password\", true);\n }\n }\n else{\n setInfoMessage(\"You have to enter username/password\", true);\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==login){\n\t\t\tnew Client();\n\t\t\tuser=username.getText();\n\t\t\t isLogin();\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n loginUser(\"999999\");\n }", "@FXML\n void doLogin(ActionEvent event) {\n try {\n loginModel.doLogin(new Login(textFieldUsername.getText(), passwordFieldPassword.getText()));\n } catch (WrongCredentialsException e) {\n e.printStackTrace();\n Alert alert = new Alert(Alert.AlertType.WARNING, \"Wrong username or password\");\n alert.showAndWait();\n } catch (Exception e) {\n e.printStackTrace();\n Alert alert = new Alert(Alert.AlertType.WARNING, \"Cannot load application. Goodbye!\");\n alert.showAndWait();\n Platform.exit();\n } finally {\n textFieldUsername.clear();\n passwordFieldPassword.clear();\n }\n }", "public void loginAlert() {\n\t\tDialog<Pair<String, String>> dialog = new Dialog<>();\n\t\tdialog.setTitle(\"Login Dialog\");\n\t\tdialog.setHeaderText(\"Look, a Custom Login Dialog\");\n\n\t\t// Set the icon (must be included in the project).\n\t\tdialog.setGraphic(new ImageView(this.getClass().getResource(\"file:src/vista/img/usuario.png\").toString()));\n\n\t\t// Set the button types.\n\t\tButtonType loginButtonType = new ButtonType(\"Login\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().addAll(loginButtonType, ButtonType.CANCEL);\n\n\t\t// Create the username and password labels and fields.\n\t\tGridPane grid = new GridPane();\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(10);\n\t\tgrid.setPadding(new Insets(20, 150, 10, 10));\n\n\t\tTextField username = new TextField();\n\t\tusername.setPromptText(\"Username\");\n\t\tPasswordField password = new PasswordField();\n\t\tpassword.setPromptText(\"Password\");\n\n\t\tgrid.add(new Label(\"Username:\"), 0, 0);\n\t\tgrid.add(username, 1, 0);\n\t\tgrid.add(new Label(\"Password:\"), 0, 1);\n\t\tgrid.add(password, 1, 1);\n\n\t\t// Enable/Disable login button depending on whether a username was entered.\n\t\tNode loginButton = dialog.getDialogPane().lookupButton(loginButtonType);\n\t\tloginButton.setDisable(true);\n\n\t\t// Do some validation (using the Java 8 lambda syntax).\n\t\tusername.textProperty().addListener((observable, oldValue, newValue) -> {\n\t\t loginButton.setDisable(newValue.trim().isEmpty());\n\t\t});\n\n\t\tdialog.getDialogPane().setContent(grid);\n\n\t\t// Request focus on the username field by default.\n\t\tPlatform.runLater(() -> username.requestFocus());\n\n\t\t// Convert the result to a username-password-pair when the login button is clicked.\n\t\tdialog.setResultConverter(dialogButton -> {\n\t\t if (dialogButton == loginButtonType) {\n\t\t return new Pair<>(username.getText(), password.getText());\n\t\t }\n\t\t return null;\n\t\t});\n\n\t\tOptional<Pair<String, String>> result = dialog.showAndWait();\n\n\t\tresult.ifPresent(usernamePassword -> {\n\t\t System.out.println(\"Username=\" + usernamePassword.getKey() + \", Password=\" + usernamePassword.getValue());\n\t\t});\n\t}", "public void actionPerformed(ActionEvent e){\n\t\tString command = e.getActionCommand();\n\t\tif(command == \"login\"){\n\t\t\tif(isUserValid(loginView.getUserNameTextField().getText(),\n\t\t\t\t\t\t loginView.getUserPasswordField().getPassword())){\n\t\t\t\tPosPiMenu posMenu = new PosPiMenu(this.dataConnection, this.dataUser, this.dataPassword);\n\t\t\t\tposMenu.showGUI();\n\t\t\t\tthis.loginView.getMainFrame().dispose();\n\t\t\t}\n\t\t}//end if\n\t}", "@And(\"click on login button\")\n\tpublic void click_on_login_button() {\n\t\tSystem.out.println(\"click on login button\");\n\t\tdriver.findElement(By.name(\"Submit\")).click();\n\t \n\t}", "@Override\n public void onClick(ClickEvent event) {\n String mobileNr = content.getLoginView().getMobilenrTxtBox().getText();\n String password = content.getLoginView().getPasswordTxtBox().getText();\n\n // RPC authenticating user method\n motionCBSTestService.authorizeUser(mobileNr, password, new AsyncCallback<User>() {\n\n @Override\n public void onFailure(Throwable caught) {\n Window.alert(\"Der skete en fejl\");\n }\n\n @Override\n public void onSuccess(User user) {\n\n // Failed to match input with User in database\n if (user == null) {\n Window.alert(\"Wrong password or mobile number!\");\n } else if (user.getIsApproved() != true) {\n Window.alert(\"User not approved!\");\n } else\n\n\n\n // Here we check the type and if they are type 1 we go to admin view and the other way around\n if (user.getType() == 1) {\n adminController.loadUser(user);\n content.changeView(content.getMainAdminView());\n } else if (user.getType() == 2) {\n userController.loadUser(user);\n content.changeView(content.getMainUserView());\n }\n\n // Clearing the text fields (mobileNr & password) from the login screen\n content.getLoginView().clearTextBoxFields();\n }\n });\n }", "public TWTRLogInButton() {}", "public void buttonSingIn(ActionEvent event) throws IOException {\n\n\t\tif (!txtSystemUserUsername.getText().equals(\"\") && !passFieldSystemUserPassword.getText().equals(\"\")) {\n\n\t\t\tString username = txtSystemUserUsername.getText();\n\t\t\tString password = passFieldSystemUserPassword.getText();\n\n\t\t\tboolean openWindow = restaurant.logInUser(username, password);\n\t\t\tboolean active = restaurant.conditionUser(username, password);\n\n\t\t\tif (openWindow == true && active == true) {\n\t\t\t\tif (username.equals(\"ADMINISTRATOR\")) {\n\t\t\t\t\tFXMLLoader optionsFxml = new FXMLLoader(\n\t\t\t\t\t\t\tgetClass().getResource(\"Administrator-Options-window.fxml\"));\n\t\t\t\t\toptionsFxml.setController(this);\n\t\t\t\t\tParent opWindow = optionsFxml.load();\n\t\t\t\t\tmainPaneLogin.getChildren().setAll(opWindow);\n\n\t\t\t\t} else {\n\t\t\t\t\tFXMLLoader optionsFxml = new FXMLLoader(getClass().getResource(\"Options-window.fxml\"));\n\t\t\t\t\toptionsFxml.setController(this);\n\t\t\t\t\tParent opWindow = optionsFxml.load();\n\t\t\t\t\tmainPaneLogin.getChildren().setAll(opWindow);\n\n\t\t\t\t}\n\t\t\t\tsetEmpleadoUsername(username);\n\t\t\t\tingredientsOptions.clear();\n\t\t\t\tingredientsOptions.addAll(restaurant.getStringIngredients());\n\t\t\t\ttypeOptions.clear();\n\t\t\t\ttypeOptions.addAll(restaurant.getStringProductTypes());\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\n\t\t\t} else {\n\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\n\t\t\t\t\t\t\"Este usuario no ha sido encontrado y/o se encuentra inactivo. Si desea crear uno ingrese a sign up o active su usuario\");\n\t\t\t\tdialog.setTitle(\"Usuario no encontrado\");\n\t\t\t\tdialog.show();\n\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error al cargar datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}", "@Override\n public void onLoginButtonClick(String email, String password) {\n AGConnectAuthCredential credential = EmailAuthProvider.credentialWithPassword(email, password);\n AGConnectAuth.getInstance().signIn(credential)\n .addOnSuccessListener(signInResult -> onLoginCorrect())\n .addOnFailureListener(e -> Toast.makeText(MainActivity.this, \"Bad credentials\", Toast.LENGTH_LONG).show());\n }", "private void createLoginEvents() {\n\t\t\n\t\t//Fires after the user clicks the login button. If they typed in the wrong creds or they have been inactivated\n\t\t//they will be given a proper pop up message notifying them\n\t\tbtnLogin.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tString pass = new String(passwordLogin.getPassword());\n\t\t\t\tUser u = jdbc.login(txtLoginUser.getText(), pass);\n\t\t\t\tif (u == null) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Incorrect Login Credentials\");\n\t\t\t\t} else if (!u.active()) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your account has been inactivated. Contact your manager for help\");\n\t\t\t } else {\n\t\t\t\t\tif (u.get_usertype() == 1) {\n\t\t\t\t\t\t//They are an Admin\n\t\t\t\t\t\tlayeredPane.setLayer(layeredPaneAdmin, 10);\n\t\t\t\t\t\tlayeredPane.setLayer(layeredPaneLogin, 0);\n\t\t\t\t\t\tlayeredPaneAdmin.setLayer(pnlAdmin, 10);\n\t\t\t\t\t\tSystem.out.println(\"logged in as Admin\");\n\t\t\t\t\t\tlblPortal.setText(\"Admin Portal - \"+u.get_firstname()+ \" \" + u.get_lastname());\t\t\t\t\t\t\n\t\t\t\t\t} else if (u.get_usertype() == 2) {\n\t\t\t\t\t\t//They are a Manager\n\t\t\t\t\t\tlayeredPane.setLayer(layeredPaneManagerWorker, 10);\n\t\t\t\t\t\tlayeredPane.setLayer(layeredPaneLogin, 0);\n\t\t\t\t\t\tlayeredPaneManagerWorker.setLayer(pnlManagerWorker, 10);\n\t\t\t\t\t\tSystem.out.println(\"logged in as Manager\");\n\t\t\t\t\t\tlblPortal.setText(\"Manager Portal - \"+u.get_firstname()+ \" \" + u.get_lastname());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//They are a Worker\n\t\t\t\t\t\tlayeredPane.setLayer(layeredPaneManagerWorker, 10);\n\t\t\t\t\t\tSystem.out.println(\"logged in as Worker\");\n\t\t\t\t\t\tlblPortal.setText(\"Worker Portal - \"+u.get_firstname()+ \" \" + u.get_lastname());\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tcurrentSessionUserID = u.get_userID();\n\t\t\t\t\tbtnLogout.setVisible(true);\n\t\t\t\t\tlblPortal.setVisible(true);\n\t\t\t\t\tbtn_settings.setVisible(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t//\n\t\tbtnLogout.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlayeredPane.setLayer(layeredPaneLogin, 10);\n\t\t\t\tlayeredPane.setLayer(layeredPaneAdmin, 0);\n\t\t\t\tlayeredPane.setLayer(layeredPaneManagerWorker, 0);\n\t\t\t\tbtnLogout.setVisible(false);\n\t\t\t\tlblPortal.setVisible(false);\n\t\t\t\tbtn_settings.setVisible(false);\n\t\t\t\ttxtLoginUser.setText(\"\");\n\t\t\t\tpasswordLogin.setText(\"\");\n\t\t\t}\n\t\t});\n\t}", "@FXML\r\n\tvoid loginButtonClicked(ActionEvent event) throws IOException, SQLException\r\n\t{\r\n\t\tif(isValidUsernameAndPassword(usernameTextField.getText(), passwordTextField.getText())) {\r\n\t\t\t\r\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(\"LoginTracker.txt\", true));\r\n\t\t\twriter.write(\"User: \"+usernameTextField.getText()+\", \");\r\n\t\t\twriter.write(\"Timestamp: \"+LocalDateTime.now().toString());\r\n\t\t\twriter.newLine();\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t\tsetUserName(usernameTextField.getText());\r\n\t\t\tParent parent = FXMLLoader.load(getClass().getResource\r\n\t\t\t\t\t(\"/com/nkris/scheduling_app/FXML/DashboardUI.fxml\"));\r\n\t\t\tScene homeScreen = new Scene(parent);\r\n\t\t\tStage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n\t\t\t\r\n\t\t\tDashboardController.loginTime = LocalTime.now();\r\n\t\t\t\r\n\t\t\tstage.setScene(homeScreen);\t\t\r\n\t\t\tstage.show();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdisplayAlert();\r\n\t\t}\r\n\t}", "public void clickLogin(){\n\t\tdriver.findElement(login).click();\n\t}", "public void clickLogin() {\r\n\t\tdriver.findElement(SignIn).click();\r\n\t\t//SignIn.click();\r\n\t\t//SignIn.click();\r\n\t\t//return new LoginPage();\r\n\t}", "public void doLogin() {\n\t\tSystem.out.println(\"loginpage ----dologin\");\n\t\t\n\t}", "@FXML\n\tpublic void btnAusloggenPressed(ActionEvent event) throws IOException {\n\n\t\tStage openStage = (Stage) shopButton.getScene().getWindow();\n\t\topenStage.close();\n\n\t\tLoginMain loginWindow = new LoginMain();\n\t\tloginWindow.Loginstarten();\n\n\t}", "@Override\n public void onClick(View v) {\n loginUser(\"666666\");\n }", "public void sendLoginClickPing() {\n WBMDOmnitureManager.sendModuleAction(new WBMDOmnitureModule(\"reg-login\", ProfessionalOmnitureData.getAppNamePrefix(this), WBMDOmnitureManager.shared.getLastSentPage()));\n }" ]
[ "0.8264278", "0.7934491", "0.7910657", "0.78912693", "0.7890201", "0.7844155", "0.7650849", "0.7634178", "0.7630178", "0.7628485", "0.75800735", "0.75416946", "0.7529391", "0.7515971", "0.75091505", "0.74754024", "0.74605197", "0.73888814", "0.73877597", "0.73771024", "0.7333274", "0.7331534", "0.7290685", "0.726253", "0.7258115", "0.7253109", "0.72421587", "0.72315526", "0.72260416", "0.71863896", "0.7174259", "0.7165772", "0.7161021", "0.713338", "0.7124089", "0.71104574", "0.710727", "0.71053547", "0.708303", "0.7074677", "0.70738274", "0.7067433", "0.7067228", "0.7062611", "0.7039585", "0.7015612", "0.70119506", "0.7009506", "0.70083475", "0.7008165", "0.7000663", "0.69982606", "0.6994876", "0.69945055", "0.69916654", "0.69870996", "0.698457", "0.6981526", "0.6970487", "0.6965025", "0.69608694", "0.69452935", "0.69432116", "0.6930625", "0.69217837", "0.6904941", "0.689926", "0.6897346", "0.6889097", "0.68879837", "0.68878734", "0.688207", "0.68703896", "0.68685186", "0.68679494", "0.6865809", "0.6865195", "0.68643475", "0.6864182", "0.6860881", "0.68604475", "0.6858791", "0.68573743", "0.6854396", "0.6852616", "0.68410856", "0.6839837", "0.68292636", "0.68210095", "0.6814994", "0.68073654", "0.68023425", "0.6802015", "0.680036", "0.67987174", "0.67915225", "0.67852044", "0.6781771", "0.6781222", "0.6780112" ]
0.77250856
6
Actually Check user Creditentials if so opens main menu.
public void Login()throws Exception{ if(eMailField.getText().equals("user") && PasswordField.getText().equals("pass")){ displayMainMenu(); } else{ System.out.println("Username or Password Does not match"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void VerifyMainMenuItems() {\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Dashboard);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Initiatives);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_LiveMediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_MediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Audiences);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Offers);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_CreativeAssets);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Reports);\n\t}", "@Override\n public boolean onMenuItemClick(MenuItem item) {\n if (item.getItemId() == R.id.flagAsAbusive) {\n if (mUserInfoHandler.isUserLoggedIn()) {\n mProductDetailsViewModel.callReportReviewApi(mReviewId);\n } else {\n startBoardingAct();\n }\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n Intent intentPurchase = new Intent(MonitorActivity.this, SalesActivity.class);\n if (mAuth.getCurrentUser() != null ) {\n if (item.getItemId() == R.id.menuLogout) {\n mAuth.signOut();\n\n } else if (item.getItemId() == R.id.menuMonitor) {\n Toast.makeText(this, \"You are in Monitor Page Already\", Toast.LENGTH_SHORT).show();\n\n } else if (item.getItemId() == R.id.menuPurchase) {\n startActivity(intentPurchase);\n\n }\n } else {\n Toast.makeText(this, \"Nobody Logged In\", Toast.LENGTH_SHORT).show();\n }\n\n\n return super.onOptionsItemSelected(item);\n }", "public int showMenu() {\n // Print out menu for user choice\n System.out.println(\"==================== Login Program ====================\");\n System.out.println(\"1. Add User\");\n System.out.println(\"2. Login\");\n System.out.println(\"3. Exit\");\n System.out.print(\"Please choice one option: \");\n\n // Return number if method to check validate of input is done\n return this.checkValidate();\n }", "public static void startMenu() {\n\t\tSystem.out.println(\"|**********************************|\");\n\t\tSystem.out.println(\"| |\");\n\t\tSystem.out.println(\"| Welcome to the Anny BankingApp! |\");\n\t\tSystem.out.println(\"| |\");\n\t\tSystem.out.println(\"************************************\");\n\n\t\tSystem.out.println(\"Please select your option:\");\n\t\tSystem.out.println(\"\\t[c]reate a new Account\");\n\t\tSystem.out.println(\"\\t[l]ogin to Your Account!\");\n\t\tSystem.out.println(\"\\t[a]dmin Menu\");\n\t\tSystem.out.println(\"\\t[e]mployee Menu\");\n\t\tSystem.out.println(\"\\t[o]Log Out\");\n\n\t\t//create variable to grab the input\n\t\tString option =scan.nextLine();\n\n\n\t\t//this switch case will based on chioce the users made////can be lowercase or uppercase letter\n\n\t\tswitch(option.toLowerCase()) {\n\t\tcase \"c\":\n\t\t\tcreateNewAccount();\n\t\t\tbreak;\n\t\tcase \"l\":\n\t\t\tloginToAccount();\n\t\t\t\n\t\t\tbreak;\n\t\tcase \"a\":\n\t\t\tadminMenu();\n\t\t\tbreak;\n\t\tcase \"e\":\n\t\t\temployeeMenu();\n\t\t\tbreak;\n\t\tcase \"o\":\n\t\t\tSystem.out.println(\"You Successfully logged out, back to main menu!!!\");\n\t\t\tstartMenu();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Try again\");\n\t\t\tstartMenu();//Return to startmenu if choice not match\n\t\t\tbreak;\n\t\t}\n\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 }", "private int mainMenu(){\n System.out.println(\" \");\n System.out.println(\"Select an option:\");\n System.out.println(\"1 - See all transactions\");\n System.out.println(\"2 - See all transactions for a particular company\");\n System.out.println(\"3 - Detailed information about a company\");\n System.out.println(\"0 - Exit.\");\n\n return getUserOption();\n }", "private void checkMenuItemStatus() {\n\t\tif (VozCache.instance().getCookies() == null) { // not logged in yet\n\t\t\tlogoutMenu.setVisible(false);\t\t\t\n\t\t\tloginMenu.setVisible(true);\n\t\t\tloginWithPresetMenu.setVisible(true);\n\t\t} else { // logged in\n\t\t\tlogoutMenu.setVisible(true);\t\t\t\n\t\t\tloginMenu.setVisible(false);\n\t\t\tloginWithPresetMenu.setVisible(false);\n\t\t}\t\t\n\t\tif (VozCache.instance().canShowReplyMenu()) {\n\t\t\tif(VozCache.instance().getCookies() != null) {// logged in\n\t\t\t\tquickRepMenu.setVisible(true);\n\t\t\t} else {\n\t\t\t\tquickRepMenu.setVisible(false);\n\t\t\t}\n\t\t} else {\n\t\t\tquickRepMenu.setVisible(false);\n\t\t}\n\t\t\n\t\tif (canShowPinnedMenu()) {\n\t\t\tpinMenu.setVisible(true);\n\t\t} else {\n\t\t\tpinMenu.setVisible(false);\n\t\t}\n\t\t\n\t\tif (canShowUnpinnedMenu()) {\n\t\t\tunpinMenu.setVisible(true);\n\t\t} else {\n\t\t\tunpinMenu.setVisible(false);\n\t\t}\n\t}", "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 }", "private void mainMenuDetails() {\r\n try {\r\n System.out.println(\"Enter your choice:\");\r\n int menuOption = option.nextInt();\r\n switch (menuOption) {\r\n case 1:\r\n showFullMenu();\r\n break;\r\n case 2:\r\n empLogin();\r\n break;\r\n case 3:\r\n venLogin();\r\n // sub menu should not be this\r\n break;\r\n case 4:\r\n Runtime.getRuntime().halt(0);\r\n default:\r\n System.out.println(\"Choose either 1,2,3\");\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n System.out.println(\"enter a valid value\");\r\n }\r\n option.nextLine();\r\n mainMenu();\r\n }", "private void checkIfLoggedIn() {\n LocalStorage localStorage = new LocalStorage(getApplicationContext());\n\n if(localStorage.checkIfAuthorityPresent()){\n Intent intent = new Intent(getApplicationContext(),AuthorityPrimaryActivity.class);\n startActivity(intent);\n } else if(localStorage.checkIfUserPresent()){\n Intent intent = new Intent(getApplicationContext(), UserPrimaryActivity.class);\n startActivity(intent);\n }\n }", "private void onMainMenuLogin() {\n Intent intent = new Intent(this, MainMenu.class);\n intent.putExtra(Constants.SHOWNOTIFICATION, isNotification);\n startActivity(intent);\n }", "public void checkEnabled(Activity context) {\r\n if(menuShown)\r\n this.show(context,false);\r\n }", "private void checkToSignup() {\n toolbar.setTitle(R.string.about);\n Intent intent = new Intent(this, SigninActivity.class);\n startActivityForResult(intent, ConstantValue.SIGN_UP_CODE);\n }", "public static void cusMain(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Create a new Customer Profile\");\n System.out.println(\"2 - Search for Customer Profile\\n\");\n\n System.out.println(\"0 - Continue\");\n }", "private static void userMenuLogic() {\n\n\t\tboolean onMenu = true;\n\n\t\twhile(onMenu) {\n\n\t\t\tmenuHandler.clrscr();\n\t\t\tint maxChoice = menuHandler.userMenu();\n\t\t\t\n\t\t\tint intChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t\tswitch(intChoice) {\n\t\t\tcase 1:\n\t\t\t\t// Create user\n\t\t\t\tdouble initBalance = menuHandler.doubleGTEInput(\"Please input an initial balance for the user (must be >= 0.0)\", 0);\n\t\t\t\tusers.put(\"User\" + users.size(), objectHandler.createUser(initBalance));\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t// List users\n\t\t\t\t\n\t\t\t\t// Check users exist\n\t\t\t\tif(users.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No users created! Please create one before using this menu.\");\n\t\t\t\t} else {\n\t\t\t\t\tmenuHandler.prettyPrintUsers(users, numColumns);\n\t\t\t\t}\n\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t// Add balance to user\n\t\t\t\t\n\t\t\t\t// Check users exist\n\t\t\t\tif(users.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No users created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tmenuHandler.prettyPrintUsers(users, numColumns);\n\t\t\t\t\tint userChoice = menuHandler.intRangeInput(\"Please input a number in range [0, \" + (users.size() - 1) + \"]\", 0, users.size() - 1);\n\t\t\t\t\t\n\t\t\t\t\tdouble addBal = menuHandler.doubleGTInput(\"Please input balance to add (must be > 0.0)\", 0);\n\t\t\t\t\t\n\t\t\t\t\t// Add balance to chosen user\n\t\t\t\t\tusers.get(\"User\" + userChoice).deposit(addBal);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t// List user documents\n\t\t\t\t\n\t\t\t\tint userChoice;\n\t\t\t\t// Check users exist\n\t\t\t\tif(users.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No users created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tmenuHandler.prettyPrintUsers(users, numColumns);\n\t\t\t\t\tuserChoice = menuHandler.intRangeInput(\"Please input a number in range [0, \" + (users.size() - 1) + \"]\", 0, users.size() - 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tVDMSet documentSet = users.get(\"User\" + userChoice).getDocumentList();\n\t\t\t\tif(documentSet.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"User selected has no documents! Please select another user.\");\n\t\t\t\t} else {\n\t\t\t\t\tmenuHandler.prettyPrintDocumentsSet(documents, users.get(\"User\" + userChoice).getDocumentList(), numColumns);\n\t\t\t\t}\n\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t// Add document to user\n\n\t\t\t\t// Check users exist\n\t\t\t\tif(users.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"No users created! Please create one before using this menu.\");\n\t\t\t\t\tmenuHandler.waitOnKey(keyMsg);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmenuHandler.prettyPrintUsers(users, numColumns);\n\t\t\t\tuserChoice = menuHandler.intRangeInput(\"Please input a number in range [0, \" + (users.size() - 1) + \"]\", 0, users.size() - 1);\n\t\t\t\t\n\t\t\t\t// Create document to add\n\t\t\t\tDocument toAdd = createDocumentMenuLogic(users.get(\"User\" + userChoice));\n\t\t\t\t\n\t\t\t\t// User backed out of menu\n\t\t\t\tif(toAdd == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tusers.get(\"User\" + userChoice).addDocument(toAdd);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tonMenu = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void displayMenu() {\r\n\t\tif (this.user instanceof Administrator) {\r\n\t\t\tnew AdminMenu(this.database, (Administrator) this.user);\r\n\t\t} else {\r\n\t\t\tnew BorrowerMenu(this.database);\r\n\t\t}\r\n\t}", "public void getAccess() {\n\t\t// Display menu options\n\t\tSystem.out.println(\n\t\t\t\"\\nWelcome to PittTours are you a:\" +\n\t\t\t\"\\n1: Administrator\" +\n\t\t\t\"\\n2: Customer\" +\n\t\t\t\"\\n3: Neither, Quit\\n\");\n\n\t\t// Get user input\n\t\tSystem.out.print(\"Enter menu choice: \");\n\t\tinputString = scan.nextLine();\n\t\t// Convert input to integer, if not convertable, set to 0 (invalid)\n\t\ttry { choice = Integer.parseInt(inputString);\n\t\t} catch(NumberFormatException e) {choice = 0;}\n\n\t\t// Handle user choices\n\t\tif(choice == 1)\n\t\t\tdisplayAdmInterface();\n\t\telse if(choice == 2)\n\t\t\tdisplayCusInterface();\n\t\telse if(choice == 3) {} // Simply drops back to main to properly exit\n\t\telse { // If invalid choice, recall method\n\t\t\tSystem.out.println(\"INVALID CHOICE\");\n\t\t\tgetAccess();\n\t\t}\n\t}", "public void customerMenu(String activeId) {\n try {\n do {\n System.out.println(EOL + \" ---------------------------------------------------\");\n System.out.println(\"| Customer Screen - Type one of the options below: |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 1. View games and albums |\");\n System.out.println(\"| - Sorted by Ratings (Best to worst) |\");\n System.out.println(\"| - Sorted by Album Year (Most recent) |\");\n System.out.println(\"| - Sorted by Title (A-Z) |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 2. Search game by Genre |\");\n System.out.println(\"| 3. Search album by Year |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 4. Rent a game |\");\n System.out.println(\"| 5. Rent an album |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 6. Send message to customer |\");\n System.out.println(\"| 7. Send message to employee |\");\n System.out.println(\"| 8. Read my messages \" + messageController.checkNewMsg(activeId, \"Customer\") + \" |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 9. Request membership upgrade |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 10. Return to Main Menu |\");\n System.out.println(\" ---------------------------------------------------\");\n\n String[] menuAcceptSet = new String[]{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\"}; // Accepted responses for menu options\n String userInput = getInput.getMenuInput(\"menuOptionPrompt\", menuAcceptSet); // Calling Helper method\n switch (userInput.toLowerCase()) {\n case \"1\" -> productSortView(activeId);\n case \"2\" -> dartController.searchProduct(\"Game\");\n case \"3\" -> dartController.searchProduct(\"Album\");\n case \"4\" -> dartController.checkRental(activeId, \"Game\");\n case \"5\" -> dartController.checkRental(activeId, \"Album\");\n case \"6\" -> messageController.buildMessage(activeId, \"Customer\", \"Customer\", null, \"message\", null);\n case \"7\" -> messageController.buildMessage(activeId, \"Customer\", \"Employee\", null, \"message\", null);\n case \"8\" -> messageController.openInbox(activeId, \"Customer\");\n case \"9\" -> userController.customerUpgradeRequest(activeId);\n case \"10\" -> mainMenu();\n default -> printlnInterfaceLabels(\"menuOptionNoMatch\");\n }\n } while (session);\n } catch (Exception e) {\n printlnInterfaceLabels(\"errorExceptionMenu\", String.valueOf(e));\n }\n }", "void userChoosesFromMainMenu() {\n\t\tScanner userInput = new Scanner(System.in);\n\t\tint userMenuChoice;\n\t\ttry { \n\t\t\tdo {\n\t\t\tdisplayMainMenu();\n\t\t\tuserMenuChoice = userInput.nextInt();\n\t\t\tif(userMenuChoice > 0 || userMenuChoice <= 5) {\n\t\t\t\tcheckUserChoice(userMenuChoice);\n\t\t\t}\n\t\t\telse if(userMenuChoice == 0) {\n\t\t\t\tSystem.out.println(\"The program will now be closed. Good Bye.\"); \n\t\t\t\tuserInput.close();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t} while(userMenuChoice < 0 || userMenuChoice > 5);\n\t\t}\n\t\tcatch (InputMismatchException ex) {\n\t\t\tSystem.out.println(\"You did not enter a number. Please enter a number.\");\n\t\t\tuserChoosesFromMainMenu();\n\t\t}\n\t}", "private void checkAccountLoggedIn()\r\n\t{\n\t\tSharedPreferences pref = this.getSharedPreferences(\"accountdata\", 0);\r\n\t\tSystem.out.println(\"Checking if an account is logged in\");\r\n\t\tif (pref.getBoolean(\"accountLoggedIn\", false))\r\n\t\t{\r\n\t\t\tloginButton.setEnabled(false);\r\n\t\t\tregisterButton.setEnabled(false);\r\n\r\n\t\t\t// Make a crouton notifying the user\r\n\t\t\tCrouton crouton = Crouton.makeText(this, this.getResources()\r\n\t\t\t\t\t.getString(R.string.activity_login_account_loggedin),\r\n\t\t\t\t\tStyle.INFO);\r\n\t\t\tConfiguration.Builder configBuild = new Configuration.Builder();\r\n\t\t\tconfigBuild.setDuration(Configuration.DURATION_INFINITE);\r\n\t\t\tcrouton.setConfiguration(configBuild.build());\r\n\t\t\tcrouton.setOnClickListener(new OnClickListener()\r\n\t\t\t{\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(View v)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Crouton clicked\");\r\n\t\t\t\t\t((LoginActivity) v.getContext()).onBackPressed();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tcrouton.show();\r\n\t\t}\r\n\t}", "private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}", "private void openCredits() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.credits);\n builder.setNeutralButton(R.string.dialog_ok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n AlertDialog dialog_credits = builder.create();\n dialog_credits.setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialogInterface) {\n isOpenCredits = false;\n }\n });\n dialog_credits.show();\n isOpenCredits = true;\n }", "public void ClickOnUserAgreement() {\n\t\tUserAgreement.click();\n\t}", "public void showCredit()\n { \n if (Greenfoot.mouseClicked(creditBtn)) { //if user clicked instructions button\n Greenfoot.setWorld(new CreditWorld()); //display credit world\n Greenfoot.stop();\n }\n }", "private void checkin() {\r\n\t\tif (admittedinterns < 20) {\r\n\t\t\tDoctorManage();\r\n\t\t\taddinterns(1);\r\n\t\t\tScreentocharge();\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Por el dia no se admiten mas pacientes\");\r\n\t\t\t\r\n\t\t}\r\n\t}", "public int displayMainMenu() {\n while (true) {\n int index = requestFromList(guestPresenter.getMenu(), true);\n if (index == -1) {\n return -1;\n }\n if (index == 0) {\n int id = logIn();\n if (id != -1) {\n return id;\n }\n }\n if (index == 1) {\n register();\n }\n }\n }", "public void loginMenu()\n\t{\n\t\tboolean flag = true; //Boolean set for the while loop to keep looping until the user makes the correct choice\n\t\tSystem.out.printf(\"\\n%-1s %s\\n\", \"\", \"Company Login\");\n\t\tSystem.out.printf(\"%s\\n\",\"---------------------------\");\n\t\tSystem.out.printf(\"%-3s %-2s %s\\n\", \"\", \"1.\", \"Login\");\n\t\tSystem.out.printf(\"%-3s %-2s %s\\n\", \"\", \"2.\", \"Register\");\n\t\tSystem.out.printf(\"%-3s %-2s %s\\n\", \"\", \"3.\", \"Exit\");\n\t\tScanner userInput = new Scanner(System.in);\n\t\twhile(flag)\n\t\t{\t\n\t\t\tSystem.out.printf(\"%s\\n%s\", \"Please chose a option between 1 and 2\", \"user> \");\n\t\t\t/*\n\t\t\t * Try catch checks the user input, throws an error if the incorrect data type is entered\n\t\t\t */\n\t\t\ttry\n\t\t\t{\n\t\t\t\tint choice = Integer.parseInt(userInput.nextLine());\n\t\t\t\tswitch(choice)\n\t\t\t\t{\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tlogin();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t//Todo\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tSystem.out.println(\"option not available, please choose again\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(NumberFormatException ex)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Invlid input, please enter your choice again\");\n\t\t\t}\n\t\t}\n\t\tuserInput.close();\n\t}", "@Override\r\n public void onClick() {\r\n if (!permissionsGranted()) {\r\n if (isNull(MainActivity.active) || !MainActivity.active) {\r\n requestPermissions();\r\n }\r\n }\r\n else{\r\n toggleLTE();\r\n }\r\n }", "void askMenu();", "public void loginMenu(){\n\t\tstate = ATM_State.LOGINID;\n\t\tgui.setDisplay(\"Enter your account ID: \\n\");\n\t}", "private void showCredits() {\n //show credit information\n //source: https://stackoverflow.com/questions/6264694/how-to-add-message-box-with-ok-button\n final AlertDialog.Builder dlgAlert = new AlertDialog.Builder(context);\n dlgAlert.setMessage(R.string.credits);\n dlgAlert.setTitle(\"Credits\");\n dlgAlert.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //for dismissing the dialog there is no action necessary\n }\n });\n dlgAlert.setCancelable(true);\n dlgAlert.create().show();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n\n //Reading the Preferences File\n SharedPreferences userDetails = this.getSharedPreferences(\"userdetails\", MODE_PRIVATE);\n String Uname = userDetails.getString(\"username\", \"\");\n String Utype = userDetails.getString(\"usertype\", \"\");\n\n TextView user_email = (TextView) findViewById(R.id.user_email);\n user_email.setText(Uname);\n\n if(Utype.equalsIgnoreCase(\"customer\")) {\n navigationView.getMenu().findItem(R.id.cook_home).setVisible(false);\n navigationView.getMenu().findItem(R.id.cook_profile).setVisible(false);\n navigationView.getMenu().findItem(R.id.view_customers).setVisible(false);\n navigationView.getMenu().findItem(R.id.add_food).setVisible(false);\n navigationView.getMenu().findItem(R.id.cook_bookings).setVisible(false);\n return true;\n }\n else {\n navigationView.getMenu().findItem(R.id.customer_home).setVisible(false);\n navigationView.getMenu().findItem(R.id.customer_profile).setVisible(false);\n navigationView.getMenu().findItem(R.id.make_booking).setVisible(false);\n navigationView.getMenu().findItem(R.id.view_bookings).setVisible(false);\n navigationView.getMenu().findItem(R.id.view_cooks).setVisible(false);\n return true;\n }\n }", "private void mainMenuDetails() {\n try {\n System.out.println(\"Enter your choice:\");\n final int menuOption = option.nextInt();\n switch (menuOption) {\n case 1:\n showFullMenu();\n break;\n case 2:\n acceptRejectResponse();\n break;\n case 3:\n placeOrder();\n break;\n case 4:\n showFullOrder();\n break;\n case 5:\n Runtime.getRuntime().halt(0);\n default:\n System.out.println(\"Choose either 1 or 2\");\n }\n } catch (final Exception e) {\n e.printStackTrace();\n System.out.println(\"enter a valid value\");\n }\n option.nextLine();\n mainMenu();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n //Reading the Preferences File\n SharedPreferences userDetails = this.getSharedPreferences(\"userdetails\", MODE_PRIVATE);\n String Uname = userDetails.getString(\"username\", \"\");\n String Utype = userDetails.getString(\"usertype\", \"\");\n\n TextView user_email = (TextView) findViewById(R.id.user_email);\n user_email.setText(Uname);\n\n if(Utype.equalsIgnoreCase(\"customer\")) {\n navigationView.getMenu().findItem(R.id.cook_home).setVisible(false);\n navigationView.getMenu().findItem(R.id.cook_profile).setVisible(false);\n navigationView.getMenu().findItem(R.id.view_customers).setVisible(false);\n navigationView.getMenu().findItem(R.id.add_food).setVisible(false);\n navigationView.getMenu().findItem(R.id.cook_bookings).setVisible(false);\n return true;\n }\n else {\n navigationView.getMenu().findItem(R.id.customer_home).setVisible(false);\n navigationView.getMenu().findItem(R.id.customer_profile).setVisible(false);\n navigationView.getMenu().findItem(R.id.make_booking).setVisible(false);\n navigationView.getMenu().findItem(R.id.view_bookings).setVisible(false);\n navigationView.getMenu().findItem(R.id.view_cooks).setVisible(false);\n return true;\n }\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t\t\t\tboolean approved = showLoginScreen();\n\t\t\t\tif(approved) {\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tGUIDriver.goToScreen(\"welcome\");\n\t\t\t\t} else {\n\t\t\t\t\tshowIncorrectMessage();\n\t\t\t\t}\n\t\t}", "public void displaymenu()\r\n\t{\r\n\t\tSystem.out.println(\"Welcome to the COMP2396 Authentication system!\");\r\n\t\tSystem.out.println(\"1. Authenticate user\");\r\n\t\tSystem.out.println(\"2. Add user record\");\r\n\t\tSystem.out.println(\"3. Edit user record\");\r\n\t\tSystem.out.println(\"4. Reset user password\");\r\n\t\tSystem.out.println(\"What would you like to perform?\");\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);\r\n FirebaseUser currentUser = mAuth.getCurrentUser();\r\n MenuItem itemLogin = menu.findItem(R.id.login);\r\n MenuItem itemLogout = menu.findItem(R.id.logout);\r\n if (currentUser != null) {\r\n itemLogin.setVisible(false);\r\n itemLogout.setVisible(true);\r\n } else {\r\n itemLogin.setVisible(true);\r\n itemLogout.setVisible(false);\r\n }\r\n return true;\r\n }", "public static void affichageDuMenuPrincipal() {\n\t\tSystem.out.println(\"\\n\\nMENU PRINCIPAL\");\n\t\tSystem.out.println(\"==============\");\n\t\tSystem.out.println(\"Choix 1 : Affichez les noms et prénoms de tous les apprenant(e)s.\");\n\t\tSystem.out.println(\"Choix 2 : Affichez la liste des apprenants pour chaque région.\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choix 3 : Recherchez un apprenant(e) (par son nom) et afficher la liste des activités qu’il ou qu’elle pratique.\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choix 4 : Recherchez les apprenants qui pratiquent une activité passée en paramètre d’une méthode.\");\n\t\tSystem.out.println(\"Choix 5 : Ajoutez un(e) nouvel(le) apprenant(e) à la base de données.\");\n\t\tSystem.out.println(\"Choix 6 : Affectez une activité à un(e) apprenant(e)\");\n\t\tSystem.out.println(\"Choix 7 : Affichez la liste des activités que personne ne fait.\");\n\t\tSystem.out.println(\"Choix 8 : Modifiez le nom d’un(e) apprenant(e).\");\n\t\tSystem.out.println(\"Choix 9 : Supprimez un(e) apprenant(e).\");\n\t\tSystem.out.println(\"Choix 10 : Quitter\");\n\t\tSystem.out.println(\n\t\t\t\t\"================================================================================================================\");\n\t}", "public void main_menu()\n\t{\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.println(\"Please Select an option\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tSystem.out.print(\"1.Add 2.Update 3.Delete 4.Exit\\n\");\n\t\tSystem.out.println(\"===========================================================\");\n\t\tchoice=me.nextInt();\n\t\tthis.check_choice(choice);\n\t}", "public void menu(){\n System.out.println(\"---------------------------Login------------------------------------\");\n \n System.out.println(\"Usuario:\");\n respuesta = scanner.nextLine();\n System.out.println(\"Contraseña:\");\n respuesta2 = scanner.nextLine();\n Usuario user = new Usuario();\n user.setNombre(respuesta);\n user.setPassword(respuesta2);\n idUser=modelo.validarUsuario(user);\n if(idUser<0){\n System.err.println(\"Usuario invalido\");\n \n }else{\n \n menuInterno();\n \n }\n//\n// menuInterno();\n// \n }", "@Override\n public void onClick(View view) {\n CheckUserPermsions();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (isLoggedIn()) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n } else {\n return false;\n }\n }", "public static void activateMenu() {\n instance.getMenu().show();\n }", "private static void displayMenu() {\n\t\tSystem.out.println(\"\\n\\nWelcome to Seneca@York Bank!\\n\" +\n\t\t\t\t\"1. Open an account.\\n\" +\n\t\t\t\t\"2. Close an account.\\n\" +\n\t\t\t\t\"3. Deposit money.\\n\" +\n\t\t\t\t\"4. Withdraw money.\\n\" +\n\t\t\t\t\"5. Display accounts. \\n\" +\n\t\t\t\t\"6. Display a tax statement.\\n\" +\n\t\t\t\t\"7. Exit\\n\");\n\t}", "@Override\r\n public boolean onNavigationItemSelected(@NonNull MenuItem item) {\n item.setChecked(true);\r\n // close drawer when item is tapped\r\n drawer.closeDrawers();\r\n switch (item.getItemId()){\r\n case R.id.nav_out:\r\n Logout();\r\n return true;\r\n case R.id.nav_choice:\r\n Intent choiceIntent = new Intent(getApplicationContext(), ChoiceMaker.class);\r\n choiceIntent.putExtra(\"username\", user.getUsername());\r\n startActivity(choiceIntent);\r\n return true;\r\n case R.id.nav_pref:\r\n Intent prefIntent = new Intent(getApplicationContext(), CarePreference.class);\r\n prefIntent.putExtra(\"username\", user.getUsername());\r\n startActivity(prefIntent);\r\n return true;\r\n case R.id.nav_display:\r\n Intent displayIntent = new Intent(getApplicationContext(), AcpResultDisplay.class);\r\n displayIntent.putExtra(\"username\", user.getUsername());\r\n startActivity(displayIntent);\r\n return true;\r\n\r\n }\r\n return false;\r\n }", "private void okEvent() {\n\t\tYAETMMainView.PRIVILEGE = (String)loginBox.getSelectedItem();\n\t\tshowMain();\n\t\tcloseDialog();\n\t}", "public static void openChallengeMenu() {\r\n\t\tif(!STATUS.equals(Gamestatus.STOPPED)) return;\r\n\t\tgui.setMenu(new ChallengeMenu(), true);\r\n\t}", "void checkUserChoice(int userChoice) {\n\t\tif (userChoice == 1) {\n\t\t\tNewBookRecord goToEnterABook = new NewBookRecord();\n\t\t\tgoToEnterABook.enterNewRecordForAbook();\n\t\t\tuserChoosesFromMainMenu();\n\t\t}\n\t\telse if(userChoice == 2) {\n\t\t\tRecordUpdater updateBook = new RecordUpdater();\n\t\t\tupdateBook.searchRecordToUpdate();\n\t\t\tuserChoosesFromMainMenu();\n\t\t}\n\t\telse if(userChoice == 3) {\n\t\t\tRecordRemover deleteAbook = new RecordRemover();\n\t\t\tdeleteAbook.searchRecordToDelete();\n\t\t\tuserChoosesFromMainMenu();\n\t\t}\n\t\telse if(userChoice == 4) {\n\t\t\tRecordLocator bookSearch = new RecordLocator();\n\t\t\tbookSearch.userChoosesSearchPref();\n\t\t}\n\t\telse if(userChoice == 5 ) {\n\t\t\tAccountOfAllRecords seeAllBooks = new AccountOfAllRecords();\n\t\t\tseeAllBooks.seeAllRecords();\n\t\t\tuserChoosesFromMainMenu();\n\t\t}\n\t}", "private static void mainMenuLogic() {\n\n\t\twhile(true) {\n\n\t\t\tmenuHandler.clrscr();\n\t\t\tint maxChoice = menuHandler.mainMenu();\n\n\t\t\tint userChoice = menuHandler.intRangeInput(\"Please input a number in range [1, \" + maxChoice + \"]\", 1, maxChoice);\n\n\t\t\tswitch(userChoice) {\n\t\t\tcase 1:\n\t\t\t\t// User menu\n\t\t\t\tuserMenuLogic();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t// Printer menu\n\t\t\t\tprinterMenuLogic();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t// Network menu\n\t\t\t\tnetworkMenuLogic();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"StatementWithEmptyBody\")\n @Override\n public boolean onNavigationItemSelected(MenuItem item) {\n // Handle navigation view item clicks here.\n int id = item.getItemId();\n\n if (id == R.id.nav_main_menu) {\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n\n // Skeleton of the Manager Mode card that requires the password \"WinITDMP01\"\n } else if (id == R.id.nav_managers) {\n final Dialog loginDialogue;\n TextView loginTitle, loginMsg;\n EditText ManagerModePasswordInput;\n Button dismissDis;\n\n final Intent intent = new Intent(getApplicationContext(), ManagerMode.class);\n loginDialogue = new Dialog(this);\n\n loginDialogue.setContentView(R.layout.manager_mode_login);\n dismissDis = loginDialogue.findViewById(R.id.btn_i_understand);\n\n loginDialogue.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n loginDialogue.show();\n\n dismissDis.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v) {\n loginDialogue.dismiss();\n startActivity(intent);\n }\n });\n\n }\n\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n drawer.closeDrawer(GravityCompat.START);\n return true;\n }", "public void home(View view){\n if(check.equals(\"true\")){\n Intent intent = new Intent(this, Menu_Admin.class);\n intent.putExtra(MainActivity.USER, this.email);\n intent.putExtra(MainActivity.CHECK_ADMIN, check);\n startActivity(intent);\n }\n else{\n Intent intent = new Intent(this, Menu_Client.class);\n intent.putExtra(MainActivity.USER, this.email);\n intent.putExtra(MainActivity.CHECK_ADMIN, check);\n startActivity(intent);\n }\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\r\n @Override\r\n public boolean onNavigationItemSelected(MenuItem item) {\r\n // Handle navigation view item clicks here.\r\n int id = item.getItemId();\r\n\r\n if (id == R.id.nav_main_menu) {\r\n Intent intent = new Intent(this, MainActivity.class);\r\n startActivity(intent);\r\n\r\n // Skeleton of the Manager Mode card that requires the password \"WinITDMP01\"\r\n } else if (id == R.id.nav_managers) {\r\n final Intent intent = new Intent(getApplicationContext(), ManagerMode.class);\r\n startActivity(intent);\r\n }\r\n\r\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\r\n drawer.closeDrawer(GravityCompat.START);\r\n return true;\r\n }", "public static void customerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the customers\");\n System.out.println(\"2 - Would you like to search for a customer's information\");\n System.out.println(\"3 - Adding a new customer's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }", "public boolean isOnMenu ();", "public void run() \n\t\t{\n\t\t\tboolean exitMenu = false;\n\t\t\tdo \n\t\t\t{\t\t\t\t\t\n\t\t\t\tmenu.display();\n\t\t\t\tint choice = menu.getUserSelection();\n\t\t\t\t// the above method call will return 0 if the user did not\n\t\t\t\t// entered a valid selection in the opportunities given...\n\t\t\t\t// Otherwise, it is valid...\n\t\t\t\tif (choice == 0)\n\t\t\t\t{\n\t\t\t\t\t// here the user can be informed that fail to enter a\n\t\t\t\t\t// valid input after all the opportunities given....\n\t\t\t\t\t// for the moment, just exit....\n\t\t\t\t\texitMenu = true;\n\t\t\t\t}\n\t\t\t\telse if (choice == 1) \n\t\t\t\t{\n\t\t\t\t\t// here goes your code to initiate action associated to\n\t\t\t\t\t// menu option 1....\n\t\t\t\t\tProjectUtils.operationsOnNumbers();\n\t\t\t\t}\n\t\t\t\telse if (choice == 2)\n\t\t\t\t{\n\t\t\t\t\tProjectUtils.operationsOnStrings();\n\t\t\t\t}\n\t\t\t\telse if (choice == 3) \n\t\t\t\t{\n\t\t\t\t\tProjectUtils.showStatistics();\n\t\t\t\t}\n\t\t\t\telse if (choice == 4)\n\t\t\t\t{\n\t\t\t\t\texitMenu = true; \n\t\t\t\t\tProjectUtils.println(\"Exiting now... \\nGoodbye!\");\n\t\t\t\t}\n\t\t\t} while (!exitMenu);\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.admin_login, menu);\n if(sharedPreferences.getString(\"clearanceLevel\",\"\")!=null){\n menu.removeItem(R.id.action_admin_login);\n }else{\n menu.removeItem(R.id.action_admin_logout);\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n// Handle action bar item clicks here. The action bar will\n// automatically handle clicks on the Home/Up button, so long\n// as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n//noinspection SimplifiableIfStatement\n// Display menu item's title by using a Toast.\n if (id == R.id.action_settings1) { //logout\n Toast.makeText(getApplicationContext(), \"User Menu1\", Toast.LENGTH_SHORT).show();\n finish();\n exit(0);\n return true;\n } else if (id == R.id.action_user) { //back\n if(compinfo.equals(\"reg\")) {\n Intent i = new Intent(this,MainActivity.class);\n this.startActivity(i);\n finish();\n }else{\n\n }\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n if(loadFinish==true) {\n if (loggedin == true) {\n menu.findItem(R.id.login).setVisible(false);\n menu.findItem(R.id.signout).setVisible(true);\n } else {\n menu.findItem(R.id.login).setVisible(true);\n menu.findItem(R.id.signout).setVisible(false);\n }\n }\n\n return true;\n }", "public void provideAccess() {\n\t\tint choice = View.NO_CHOICE;\n\t\twhile (choice != View.EXIT) {\n\t\t\tview.displayMenu();\n\t\t\tchoice = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\texecuteChoice(choice);\n\t\t}\n\t}", "public void acctCheck(User user) {\n\t\tif (user.getExec() == 0)\n\t\t\tLogging.logger.info(\"User \" + user.getuName() + \" has logged in\");\n\t\telse\n\t\t\tLogging.logger.info(\"Employee \" + user.getuName() + \" has logged in\");\n\t\tList<Account> accounts = udao.viewAcct(user);\n\n\t\tfor (int i = 0; i != 60; i++) {\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println(\"Welcome \" + user.getfName() + \" \" + user.getlName() + \"\\n\");\n\n\t\t// If the user has no account, tell them to go find a staff member\n\t\tif (accounts.isEmpty() && user.getExec() == 0) {\n\n\t\t\tLogging.logger.info(user.getuName() + \" has no active accounts\");\n\t\t\tSystem.out.println(\"You currently have no accounts with our bank. \\n \"\n\t\t\t\t\t+ \"Please see one of our representitives to open a new account.\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(6000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\t// Otherwise, lets do business\n\t\t} else {\n\t\t\tAccounting act = new Accounting(user);\n\t\t\ttry {\n\t\t\t\tact.accounting(accounts);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void CheckLogin()\n\t{\n\t\t\n\t\t\n\t\tinput = new Scanner(System.in);\n\t\tint checkans;\n\t\tSystem.out.println(\"\\t\\t===============================\");\n\t\tSystem.out.println(\"\\n\\t\\t\\tWELCOME BACK\\n\");\n\t\tSystem.out.println(\"\\t\\t===============================\");\n\t\tSystem.out.println(\"***********************************1-PRESS '1' EMPLOYEE\"\n\t\t\t\t+ \"\\n***********************************2-PRESS '2' CUSTOMER\"\n\t\t\t\t+ \"\\n***********************************3-PRESS '3' GO BACK TO THE PAGE \");\n\t\tdo{\tSystem.out.print(\">>>>>\");checkans=input.nextInt();\n\t\t\n\t\tswitch(checkans) {\n\t\tcase 1: EmpCheckLogin();\tbreak;\t\n\t\tcase 2: CustCheckLogin();\tbreak;\t\n\t\tcase 3: ms.pageoneScreen();\tbreak;\t\n\t\tdefault: System.out.println(\"Invalid choice\\n***********************************1-PRESS '1' EMPLOYEE\"\n\t\t\t\t+ \"\\n***********************************2-PRESS '2' CUSTOMER\"\n\t\t\t\t+ \"\\n***********************************3-PRESS '3' GO BACK TO THE PAGE\");}\n\t\t\n\t\t}while(checkans!=1 && checkans!=2&& checkans!=3);\n\t\t\n\t\t\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n //Inflates the menu menu_other which includes logout and quit functions.\n getMenuInflater().inflate(R.menu.my_account, menu);\n return true;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tcheckUser();\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n \n switch (item.getItemId())\n {\n case R.id.viewAccount:\n Intent intent = new Intent(this, ViewAccountActivity.class);\n Integer targetAccountID = FMSApplication.getInstance().getCurrentAccount().getAccountId();\n intent.putExtra(\"targetAccount\", targetAccountID);\n startActivity(intent);\n Toast.makeText(getApplicationContext(), \"\\\"Viewing your account.\\\"\", Toast.LENGTH_SHORT).show();\n return true;\n \n case R.id.logoutButton:\n Toast.makeText(getApplicationContext(), \"\\\"See you next time!\\\"\", Toast.LENGTH_SHORT).show();\n FMSApplication.getInstance().setCurrentAccount(null);\n startLoginActivity();\n return true;\n \n default:\n return super.onOptionsItemSelected(item);\n }\n }", "public void permission_check() {\n //Usage Permission\n if (!isAccessGranted()) {\n new LovelyStandardDialog(MainActivity.this)\n .setTopColorRes(R.color.colorPrimaryDark)\n .setIcon(R.drawable.ic_perm_device_information_white_48dp)\n .setTitle(getString(R.string.permission_check_title))\n .setMessage(getString(R.string.permission_check_message))\n .setPositiveButton(android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(android.provider.Settings.ACTION_USAGE_ACCESS_SETTINGS);\n startActivity(intent);\n }\n })\n .setNegativeButton(android.R.string.no, null)\n .show();\n }\n }", "@SuppressWarnings(\"StatementWithEmptyBody\")\r\n @Override\r\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == R.id.principal_zone) {\r\n if (MyPreference.isLogined()) {\r\n if (AppConstants.PRINCIPAL.equalsIgnoreCase(MyPreference.getLoginedAs()) ||\r\n AppConstants.VICE_PRINCIPAL.equalsIgnoreCase(MyPreference.getLoginedAs()) ||\r\n AppConstants.TEACHER.equalsIgnoreCase(MyPreference.getLoginedAs())) {\r\n startActivity(new Intent(mActivity, PrincipalZoneActivity.class));\r\n } else {\r\n Toast.makeText(mActivity, \"Sorry, This feature is not for students.\", Toast.LENGTH_SHORT).show();\r\n }\r\n } else {\r\n Utilz.showLoginFirstDialog(mActivity);\r\n }\r\n } else if (id == R.id.feedback) {\r\n startActivity(new Intent(mActivity, FeedbackActivity.class));\r\n } else if (id == R.id.share) {\r\n String msg = \"Download & install - \" + mActivity.getResources().getString(R.string.app_name) + \" app.\\nClick here to install\" + mActivity.getResources().getString(R.string.app_name) + \" : \" + ApiUrl.PLAYSTORE_LINK;\r\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\r\n shareIntent.setType(\"text/html\");\r\n shareIntent.putExtra(Intent.EXTRA_TEXT, msg);\r\n startActivity(Intent.createChooser(shareIntent, \"Share Using\"));\r\n } else if (id == R.id.fb_like) {\r\n try {\r\n getPackageManager().getPackageInfo(\"com.facebook.katana\", 0);\r\n Uri uri = Uri.parse(ApiUrl.FACEBOOK_LINK);\r\n startActivity(new Intent(Intent.ACTION_VIEW, uri));\r\n } catch (Exception e) {\r\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(ApiUrl.FACEBOOK_LINK)));\r\n }\r\n } else if (id == R.id.rate_app) {\r\n try {\r\n Uri uri = Uri.parse(ApiUrl.PLAYSTORE_LINK);\r\n Intent in = new Intent(Intent.ACTION_VIEW, uri);\r\n startActivity(in);\r\n } catch (ActivityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n } else if (id == R.id.change_password) {\r\n startActivity(new Intent(mActivity, ChangePasswordActivity.class));\r\n } else if (id == R.id.logout) {\r\n Utilz.logout(mActivity);\r\n } else if (id == R.id.nav_website) {\r\n Utilz.openBrowser(mActivity, ApiUrl.MAIN_URL);\r\n } else if (id == R.id.nav_map) {\r\n Utilz.openBrowser(mActivity, mActivity.getResources().getString(R.string.school_on_map_url));\r\n } else if (id == R.id.softgalli) {\r\n Intent i = new Intent(Intent.ACTION_VIEW);\r\n i.setData(Uri.parse(mActivity.getResources().getString(R.string.softgalli_website_link)));\r\n mActivity.startActivity(i);\r\n }\r\n\r\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\r\n drawer.closeDrawer(GravityCompat.START);\r\n return true;\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // We have only one menu option\n case R.id.preferences:\n // Launch Preference activity\n Intent i = new Intent(SendVoipSMS.this, Preferences.class);\n startActivity(i);\n // Some feedback to the user\n Toast.makeText(SendVoipSMS.this,\n \"Here you can enter your user credentials.\",\n Toast.LENGTH_LONG).show();\n break;\n\n }\n return true;\n }", "@Override\n public boolean onMenuItemClick(MenuItem item) {\n Block_Dialog();\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case R.id.logIn:\n Intent login = new Intent(this, SigninActivity.class);\n startActivity(login);\n Toast.makeText(getApplicationContext(),\"Log in\", Toast.LENGTH_SHORT).show();\n\n break;\n case R.id.SignUp:\n Intent signupIntent = new Intent(this, SignupActivity.class);\n startActivity(signupIntent);\n break;\n case R.id.logOut:\n\n if(helper.logout()){\n finish();\n Intent toSignin = new Intent(this, SigninActivity.class);\n startActivity(toSignin);\n }\n\n break;\n\n case R.id.profile:\n int user = helper.getCurrentUser();\n Intent toProfile;\n if(user == 0){\n toProfile = new Intent(MainActivity.this, BarberProfileMenu.class);\n\n toProfile.putExtra(\"EMAIL\", helper.getEMAIL());\n startActivity(toProfile);\n }\n else if(user == 1){\n System.out.println(\"It's User\");\n toProfile = new Intent(this, UserProfile.class);\n startActivity(toProfile);\n }\n else\n Toast.makeText(this,\"Invalid User\", Toast.LENGTH_SHORT).show();\n\n break;\n\n default:\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic void printMenuHeader() {\n\t\tSystem.out.println(\"***** CHECKOUT *****\");\n\t\tSystem.out.print(\"Enter your credit card number without spaces and press enter if you confirm purchase: \");\n\n\t}", "private void printMainMenu(){\n\t\tprint(\"Please choose from the options below\", System.lineSeparator()+\"1.Login\", \"2.Exit\");\n\t}", "public void clickOnPriorAuth() {\n\t\tscrollDown(element(\"link_priorAuth\"));\n\t\telement(\"link_priorAuth\").click();\n\t\tlogMessage(\"User clicks on Prior Authorizations on left navigation bar at Physician End\");\n\t}", "public static void mainMenu() \n\t{\n\t\t// display menu\n\t\tSystem.out.print(\"\\nWhat would you like to do?\" +\n\t\t\t\t\"\\n1. Enter a new pizza order (password required)\" +\n\t\t\t\t\"\\n2. Change information of a specific order (password required)\" +\n\t\t\t\t\"\\n3. Display details for all pizzas of a specific size (s/m/l)\" +\n\t\t\t\t\"\\n4. Statistics of today's pizzas\" +\n\t\t\t\t\"\\n5. Quit\" +\n\t\t\t\t\"\\nPlease enter your choice: \");\t\n\t}", "@And(\"^user clicks on credit cards link$\")\r\n\t public void userclicksoncreditcardslink() {\r\n\t\t dbsdriver.findElement(By.xpath(\"//a[starts-with(@data-flk-success,'atNodeInserted') and text()='Credit Cards']\")).click();\r\n\t\t test.log(LogStatus.INFO, \"credit cards link is displayed\");\r\n\t }", "public void mainMenu() {\n\t\t// main menu\n\t\tdisplayOptions();\n\t\twhile (true) {\n\t\t\tString choice = ValidInputReader.getValidString(\n\t\t\t\t\t\"Main menu, enter your choice:\",\n\t\t\t\t\t\"^[aAcCrRpPeEqQ?]$\").toUpperCase();\n\t\t\tif (choice.equals(\"A\")) {\n\t\t\t\taddPollingPlace();\n\t\t\t} else if (choice.equals(\"C\")) {\n\t\t\t\tcloseElection();\n\t\t\t} else if (choice.equals(\"R\")) {\n\t\t\t\tresults();\n\t\t\t} else if (choice.equals(\"P\")) {\n\t\t\t\tperPollingPlaceResults();\n\t\t\t} else if (choice.equals(\"E\")) {\n\t\t\t\teliminate();\n\t\t\t} else if (choice.equals(\"?\")) {\n\t\t\t\tdisplayOptions();\n\t\t\t} else if (choice.equals(\"Q\")) {\n\t\t\t\tSystem.out.println(\"Goodbye.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.action_post) {\n Intent intentMain = new Intent(CommunityGardenActivity.this,\n NewPostActivity.class);\n CommunityGardenActivity.this.startActivity(intentMain);\n\n return true;\n }\n if (id == R.id.action_viewProf) {\n return true;\n }\n if (id == R.id.action_donate) {\n\n Uri uri = Uri.parse(\"https://online.nwf.org/site/Donation2?df_id=32500&32500.donation=form1&s_subsrc=Web_Header_Donate_06302014_Wrapper_CONTROL\");\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\n startActivity(intent);\n\n return true;\n }\n if (id == R.id.action_settings) {\n return true;\n }\n if (id == R.id.action_logout) {\n return true;\n }\n\n if (id == R.id.action_branchout) {\n Intent intentMain = new Intent(CommunityGardenActivity.this,\n BranchOutActivity.class);\n CommunityGardenActivity.this.startActivity(intentMain);\n\n return true;\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_check_login_status, menu);\n return true;\n }", "public boolean onOptionsItemSelected(MenuItem menuitem_obj)\n\t{\n\t\tswitch(menuitem_obj.getItemId())\n\t\t{\n\t\tcase 1:\n\t\t\t // Navigating to Login Activity when clicked on Logout\n\t Intent intent_obj1=new Intent(Course.this,LoginActivity.class);\n\t\t\t startActivity(intent_obj1);\n\t\t\tbreak;\n\t\t default:\n\t\t break;\n\t\t}\n\t\treturn true;\n\t}", "public boolean onOptionsItemSelected(MenuItem menuItem)\n {\n try {\n switch(menuItem.getItemId()) {\n //If the back button is pressed, return the user to the last visited page\n case android.R.id.home:\n onBackPressed();\n return true;\n //If the settings button is pressed, direct the user to the settings page\n case R.id.action_settings:\n startActivity(new Intent(this, SettingsActivity.class));\n //If the disclaimer button is pressed, display the disclaimer in an alert dialog\n case R.id.action_disclaimer:\n DisclaimerAlertDialog dad = new DisclaimerAlertDialog();\n dad.showDisclaimer(this, getResources());\n return true;\n //If the log out button is pressed, send the user to the log in screen\n case R.id.action_logout:\n startActivity(new Intent(this, LoginCreatePasswordActivity.class));\n finish();\n return true;\n //If an unknown option is selected, display an error to the user\n default:\n Toast.makeText(getApplicationContext(), \"INVALID - Option not valid or completed\", Toast.LENGTH_SHORT).show();\n return false;\n }\n } catch(Exception e) {\n Toast.makeText(getApplicationContext(),\"EXCEPTION \" + e + \" occurred!\",Toast.LENGTH_SHORT).show();\n return false;\n }\n }", "private static void displayMainMenu() {\n\t\tSystem.out.println(\"\\t Main Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"au <username> : Registers as a new user \\n\"\n\t\t\t\t+ \"du <username> : De-registers a existing user \\n\"\n\t\t\t\t+ \"li <username> : To login \\n\"\n\t\t\t\t+ \"qu : To exit \\n\"\n\t\t\t\t+\"====================================\\n\");\n\t}", "public void credit(){\n\t\tSystem.out.println(\"hdfcbank credited\");\n\t\t\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_new) {\n new_user();\n return true;\n }\n if (id == R.id.action_exit) {\n verify_close();\n return true;\n }\n if (id == R.id.action_login) {\n user_login();\n return true;\n }\n if (id == R.id.action_view) {\n view_user();\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\n switch (id){\n case R.id.menu_parking:\n\n Intent In = new Intent(Secure.this,ParkingActivity.class);\n startActivity(In);\n finish();\n break;\n\n case R.id.menu_shuttle:\n Intent inti = new Intent(Secure.this,Shuttle.class);\n startActivity(inti);\n finish();\n break;\n case R.id.menu_wallet:\n Intent u =new Intent(Secure.this,Wallet.class);\n startActivity(u);\n finish();\n break;\n case R.id.menu_payment:\n Intent a = new Intent(Secure.this,Secure.class);\n startActivity(a);\n finish();\n break;\n case R.id.menu_contact:\n Intent b = new Intent(Secure.this,Contact.class);\n startActivity(b);\n finish();\n break;\n case R.id.menu_logout:\n editor.clear();\n editor.commit();\n Intent i = new Intent(Secure.this,LoinActivity.class);\n startActivity(i);\n finish();\n break;\n\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic BankPrompt run() {\n\t\tBankUser user = bankAuthUtil.getCurrentUser();\n\t\t// if(bankAuthUtil.getCurrentUser().getRole().contentEquals(\"Customer\")) {\n\t\tList<Transactions> transactions = transactionsDao.findAll(user.getUserId(), user.getRole());\n\n\t\tfor (int i = 0; i < transactions.size(); i++) {\n\t\t\tTransactions thisTransaction = transactions.get(i);\n\t\t\tint userId = thisTransaction.getUserId();\n\t\t\tBankUser thisUser = bankUserDao.findById(userId);\n\t\t\tString fullname = thisUser.getFullname();\n\n\t\t\t// bankUserDao.findById(accounts.get(i).getUserId()).getFullname();\n\n\t\t\t// if (accounts.get(i).getActiveStatus() == 1) {\n\t\t\tSystem.out.println(\"Enter \" + i + \"for: \" + transactions.get(i).getUserId() + \" \" + fullname\n\t\t\t\t\t+ transactions.get(i).getBankAccountId() + \" \" + transactions.get(i).getAction() + \" \"\n\t\t\t\t\t+ transactions.get(i).getAmount());\n\t\t}\n\t\t// }\n\n\t\t// System.out.println(\"Sorry, something went wrong.\");\n\n\t\tif (bankAuthUtil.getCurrentUser().getRole().contentEquals(\"Customer\")) {\n\t\t\treturn new CustomerMainMenuPrompt();\n\t\t} else {\n\n\t\t\treturn new AdminMainMenuPrompt();\n\n\t\t}\n\n\t}", "public void checkLogin() {\n // Check login status\n if (!this.isLoggedIn()) {\n // user is not logged in redirect him to Login Activity\n Intent intent = new Intent(context, MainActivity.class);\n // Closing all the Activities\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n // Add new Flag to start new Activity\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n // Staring Login Activity\n context.startActivity(intent);\n }\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\tIntent i= new Intent(\"com.speed_alert.Password\");\r\n\t\tstartActivity(i);\r\n\t\treturn false;\r\n\t}", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyNewUserDetailsactivation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Super User Overlay Yes Button Selection\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDatas\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.SuperUserCreation()\n\t\t.SuperUserOverlayyes(); \t \t \t \t \n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.paycheck, menu);\n\t\treturn true;\n\t}", "private void masuk(){\n Preferences.setLoggedInUser(getBaseContext(),Preferences.getRegisteredUser(getBaseContext()));\n Preferences.setLoggedInStatus(getBaseContext(), true);\n startActivity(new Intent(getBaseContext(),MainActivity.class));\n finish();\n }", "@FXML\n\tvoid mainMenuBtnClicked(ActionEvent event) {\n\t\t// if submitted before exam time ends ask the user if he sure of that\n\t\tif (flag1 && flag2) {\n\t\t\tAlert alert = new Alert(AlertType.CONFIRMATION);\n\t\t\talert.setTitle(\"Warning\");\n\t\t\talert.setHeaderText(\"Leaving the exam means you submitting a blank exam\");\n\t\t\talert.setContentText(\"Are you sure you want to do that?\");\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\tif (result.get() == ButtonType.OK) {\n\t\t\t\tsummbitBlank();\n\t\t\t\ttry {\n\t\t\t\t\tFXMLutil.swapScene(event, window.StudentMenu.toString());\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}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tFXMLutil.swapScene(event, window.StudentMenu.toString());\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n Intent intent;\n isOptionSelected = true;\n switch (item.getItemId()) {\n case R.id.about:\n intent = new Intent(this, AboutActivity.class);\n break;\n case R.id.dawson_website:\n intent = new Intent(Intent.ACTION_VIEW,\n Uri.parse(this.getString(R.string.urlToDawson)));\n break;\n case R.id.settings:\n intent = new Intent(this, SettingsActivity.class);\n break;\n default:\n isOptionSelected = super.onOptionsItemSelected(item);\n return isOptionSelected;\n }\n //will only reach here is isOptionsSelected = true;\n if (checkIfChanged()) {\n showDialog(intent);\n return true;\n } else {\n launchActivity(intent);\n finish();\n return true;\n }\n\n }", "static void mainMenu ()\r\n \t{\r\n \t\tfinal byte width = 45; //Menu is 45 characters wide.\r\n \t\tString label [] = {\"Welcome to my RedGame 2 compiler\"};\r\n \t\t\r\n \t\tMenu front = new Menu(label, \"Main Menu\", (byte) width);\r\n \t\t\r\n \t\tMenu systemTests = systemTests(); //Gen a test object.\r\n \t\tMenu settings = settings(); //Gen a setting object.\r\n \t\t\r\n \t\tfront.addOption (systemTests);\r\n \t\tfront.addOption (settings);\r\n \t\t\r\n \t\tfront.select();\r\n \t\t//The program should exit after this menu has returned. CLI-specific\r\n \t\t//exit operations should be here:\r\n \t\t\r\n \t\tprint (\"\\nThank you for using my program.\");\r\n \t}", "public void userMenu(AccountCreator account) {\n\n while (true) {\n\n System.out.println(\"Welcome. Please choose an option\");\n System.out.println(\"1: Display Balance\");\n System.out.println(\"2: Withdraw Cash\");\n System.out.println(\"3: Deposit Cash\");\n System.out.println(\"4: Transfer Cash\");\n System.out.println(\"5: Mini Statement\");\n System.out.println(\"6: Change PIN\");\n\n int menuInput = this.myScan.nextInt();\n\n switch (menuInput) {\n\n case 1:\n // display balance\n System.out.println(\"Balance: £\" + account.getBalance());\n TextSpacer();\n break;\n case 2:\n // withdraw cash\n System.out.println(\"How much would you like to withdraw?\");\n account.withdrawCash();\n System.out.println(\"Balance: £\" + account.getBalance());\n TextSpacer();\n break;\n case 3:\n // deposit cash\n System.out.println(\"How much cash would you like to deposit?\");\n account.depositCash();\n System.out.println(\"Balance: £\" + account.getBalance());\n TextSpacer();\n break;\n case 4:\n // TODO - Transfer cash to other accounts\n break;\n case 5:\n // TODO - mini statement\n break;\n case 6:\n // change pin\n System.out.println(\"Your current PIN is \" + account.getPIN());\n System.out.println(\"Would you like to change your PIN?\");\n System.out.println(\"1: yes || 2: no\");\n int decision = myScan.nextInt();\n\n switch (decision) {\n\n case 1:\n //change pin\n account.setPIN();\n System.out.println(\"Your new PIN is \" + account.getPIN());\n break;\n case 2:\n // don't change pin\n System.out.println(\"Your PIN remains \" + account.getPIN());\n break;\n default:\n System.out.println(\"Please select option 1 or 2\");\n\n }\n\n break;\n default:\n System.out.println(\"Please choose a valid option\");\n break;\n\n }\n\n\n }\n\n }", "public abstract void onFirstUserVisible();", "public void mainMenuOption() {\n\t\tScanner keyboard = new Scanner( System.in );\n\t\t\n\t\tfirstMenu();\n\t\t\n\t\tString input = keyboard.nextLine();\n\t\twhile(input != \"0\"){\n\t\t\t\n\t\t\t switch(input){\n\t case \"0\" : System.out.println(\"You close the App\"); \n\t \t\t\tSystem.exit(0);\n\t break;\n\t \n\t case \"1\" : IdentityMenu();\n\t break;\n\t \n\t case \"2\" : AddressMenu();\n\t \tbreak;\n\t \n\t default :\tSystem.out.println(\"Invalid selection\"); \n\t \t\t\tmainMenuOption();\n\t break;\t\n\t \n\t\t\t }\n\t\t break;\n\t\t}\n\t}", "private void checkToLogout() {\n logout();\n checkToHome();\n drawViewSideMenu();\n }", "private void menuPrincipal() {\r\n\t\ttelaPrincipal = new TelaPrincipal();\r\n\t\ttelaPrincipal.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\ttelaPrincipal.setVisible(true);\r\n\t\tsetVisible(false);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(ua.kpi.ecampus.R.menu.menu_main_not_auth, menu);\n return true;\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdatabseExecuteQuery(\"UPDATE userdetails SET verify=1 where username='\"+Username+\"'\");\n\t\t\t\t\n\t\t\t\t//after that make verifiacation GUI again \n\t\t\t\tnew Verification();\n\t\t\t}", "public static void checkFromUser() {\n\t\tif (askUser(\"Please type y to execute program and any other key to stop\").contentEquals(\"y\")) {\n\t\t\tSystem.out.println(\"Continuing\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Terminating program\");\n\t\t\tSystem.exit(0); \n\t\t}\n\t\tSystem.out.println(\"Calculating the greatest house income, the greatest income after expenditure and greatest savings from the given 3 families\");\n\t}" ]
[ "0.67152655", "0.6297396", "0.627611", "0.6265728", "0.62299865", "0.6213686", "0.61854005", "0.61835814", "0.60828334", "0.60822153", "0.60401106", "0.6005966", "0.6004286", "0.59995383", "0.59798986", "0.59654367", "0.5905148", "0.59023345", "0.5893202", "0.5872969", "0.58706224", "0.5864503", "0.58410525", "0.5835706", "0.583262", "0.5831251", "0.5811286", "0.5807229", "0.5798606", "0.57939917", "0.57924414", "0.5787678", "0.57743686", "0.5773006", "0.5768711", "0.5765453", "0.57589173", "0.57496786", "0.57443595", "0.5744241", "0.5740589", "0.5738782", "0.5736639", "0.57285094", "0.5726784", "0.5716208", "0.57117826", "0.5707983", "0.5702443", "0.57016855", "0.5692908", "0.5686832", "0.5677169", "0.56706065", "0.5669561", "0.56548893", "0.5654629", "0.5654008", "0.5653961", "0.5648114", "0.5638419", "0.56348205", "0.5626906", "0.56253433", "0.5624147", "0.562199", "0.56209165", "0.56125885", "0.5607322", "0.55950373", "0.5593558", "0.5592007", "0.55911064", "0.5587544", "0.5570956", "0.5566094", "0.5556934", "0.5552083", "0.55512697", "0.55488837", "0.55459535", "0.55345774", "0.5534523", "0.55329895", "0.5532649", "0.5525767", "0.5523117", "0.55227745", "0.5521362", "0.55195236", "0.55172986", "0.55107814", "0.55105764", "0.5507574", "0.5506345", "0.55061257", "0.55059683", "0.5502292", "0.55007595", "0.5498746", "0.54975533" ]
0.0
-1
Button event for Create profile Page
public void mmCreateClick(ActionEvent event) throws Exception{ displayCreateProfile(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveProfileCreateData() {\r\n\r\n }", "public void onClick(View view) {\n if(validate_info()){\n create_user();\n user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n submit_profile(user);\n }\n }\n else{\n return;\n\n\n }\n }", "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "private void setUpProfileButton() {\n profileButton = (ImageButton) findViewById(R.id.profile_button);\n profileButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startProfilePageActivity();\n }\n });\n }", "public CreateProfile() {\n initComponents();\n }", "public CreateJPanel(ProfileInfo profileInfo) {\n initComponents();\n \n this.profileInfo = profileInfo;\n btnSave.setEnabled(false);\n \n }", "@Override\n public void onClick(View v) {\n CreateAccount();\n }", "NewAccountPage openNewAccountPage();", "public void actionPerformed(ActionEvent e) {\n \t\t\t\tscreen.setScene(new CreateAccount(screen));\n \t\t\t}", "public void newuserclicked(View view) {\n Intent myuserIntent = new Intent(this, UserCreation.class);\n startActivity(myuserIntent);\n }", "public void saveProfileEditData() {\r\n\r\n }", "public void onSignupClick(MouseEvent e){signup();}", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tConfirmDialog.show(UI.getCurrent(), MESSAGE_1,\"\",\"Aceptar\",\"Crear mas Usuarios\",\n\t\t\t\t new ConfirmDialog.Listener() {\n\n\t\t\t\t public void onClose(ConfirmDialog dialog) {\t\n\t\t\t\t \tent= false;\n\t\t\t\t if (dialog.isConfirmed()) {\n\t\t\t\t // Confirmed to continue\t\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t } else {\n\t\t\t\t // User did not confirm\t\t\t \n\t\t\t\t \t//c.crearWindow(RegistrarUser.VIEW_NAME);\n\t\t\t\t \tc.navegar((StartView.VIEW_NAME));\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t });\n\t\t\t\t\n\t\t\t\t//Notification nota= new Notification(\"Registro Exitoso!\",Notification.Type.HUMANIZED_MESSAGE);\n\t\t\t\t//nota.setDelayMsec(-1);\n\t\t\t\t//nota.show(Page.getCurrent());\t\n\t\t\t\t\n\t\t\t\tclose();\t\t\t\n\t\t\t}", "@Override\n public void onSignUpBtnClick() {\n }", "@RequestMapping(value = \"/profile\", method = RequestMethod.GET)\n\tpublic String create(Model model) {\n\t\tmodel.addAttribute(\"profile\", new Profile());\n\t\treturn \"create\";\n\t}", "private void buttonAddFriends() {\n friendsButton.setText(\"Add Friends\");\n friendsButton.setOnClickListener(view -> launchProfilesActivity());\n profileOptions.setVisibility(View.VISIBLE);\n friendsView.setOnClickListener(view -> onFriendsClicked());\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "@Override\n public void getStartedSignUpClicked() {\n\n }", "@FXML\n private void openCreateUser(ActionEvent event) {\n CreateUserController createusercontroller = new CreateUserController();\n User user = createusercontroller.openCreateUser(event, roleTap);\n\n if (user != null) {\n userList.add(user);\n UsermanagementUtilities.setFeedback(event, user.getName().getFirstName()+LanguageHandler.getText(\"userCreated\"), true);\n } else {\n UsermanagementUtilities.setFeedback(event, LanguageHandler.getText(\"userNotCreated\"), false);\n\n }\n }", "void gotoEditProfile();", "private void profileButton1ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "private void createGuestProfile() {\n saveData();\n signupDelegate.enableNextButton(Boolean.FALSE);\n SwingUtil.setCursor(this, java.awt.Cursor.WAIT_CURSOR);\n errorMessageJLabel.setText(getString(\"SigningUp\"));\n errorMessageJLabel.paintImmediately(0, 0, errorMessageJLabel.getWidth(),\n errorMessageJLabel.getHeight());\n try {\n getSignupHelper().createGuestProfile();\n } catch (final OfflineException ox) {\n logger.logError(ox, \"An offline error has occured.\");\n addInputError(getSharedString(\"ErrorOffline\"));\n } catch (final ReservationExpiredException rex) {\n logger.logWarning(rex, \"The username/e-mail reservation has expired.\");\n addInputError(getString(\"ErrorReservationExpired\"));\n } catch (final Throwable t) {\n logger.logFatal(t, \"An unexpected error has occured.\");\n addInputError(getSharedString(\"ErrorUnexpected\"));\n } finally {\n errorMessageJLabel.setText(\" \");\n }\n }", "private void profileButton2ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 1).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == add && ! tfName.getText().equals(\"\")){\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" already exists.\");\n } else {\n FacePamphletProfile profile = new FacePamphletProfile(tfName.getText());\n profileDB.addProfile(profile);\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"New profile with the name \" + name + \" created.\");\n currentProfile = profile;\n }\n }\n if (e.getSource() == delete && ! tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (! profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" does not exist.\");\n } else {\n profileDB.deleteProfile(name);\n canvas.showMessage(\"Profile of \" + name + \" deleted.\");\n currentProfile = null;\n }\n }\n\n if (e.getSource() == lookUp && !tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"Displaying \" + name);\n currentProfile = profileDB.getProfile(name);\n } else {\n canvas.showMessage(\"A profile with the mane \" + name + \" does not exist\");\n currentProfile = null;\n }\n }\n\n if ((e.getSource() == changeStatus || e.getSource() == tfChangeStatus) && ! tfChangeStatus.getText().equals(\"\")){\n if (currentProfile != null){\n String status = tfChangeStatus.getText();\n profileDB.getProfile(currentProfile.getName()).setStatus(status);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Status updated.\");\n } else {\n canvas.showMessage(\"Please select a profile to change status.\");\n }\n }\n\n if ((e.getSource() == changePicture || e.getSource() == tfChangePicture) && ! tfChangePicture.getText().equals(\"\")){\n if (currentProfile != null){\n String fileName = tfChangePicture.getText();\n GImage image;\n try {\n image = new GImage(fileName);\n profileDB.getProfile(currentProfile.getName()).setImage(image);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Picture updated.\");\n } catch (ErrorException ex){\n canvas.showMessage(\"Unable to open image file: \" + fileName);\n }\n } else {\n canvas.showMessage(\"Please select a profile to change picture.\");\n }\n }\n\n if ((e.getSource() == addFriend || e.getSource() == tfAddFriend) && ! tfAddFriend.getText().equals(\"\")) {\n if (currentProfile != null){\n String friendName = tfAddFriend.getText();\n if (profileDB.containsProfile(friendName)){\n if (! currentProfile.toString().contains(friendName)){\n profileDB.getProfile(currentProfile.getName()).addFriend(friendName);\n profileDB.getProfile(friendName).addFriend(currentProfile.getName());\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(friendName + \" added as a friend.\");\n } else {\n canvas.showMessage(currentProfile.getName() + \" already has \" + friendName + \" as a friend.\");\n }\n } else {\n canvas.showMessage(friendName + \" does not exist.\");\n }\n } else {\n canvas.showMessage(\"Please select a profile to add friend.\");\n }\n }\n\t}", "private void profileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getUserProfileController();\n }", "@FXML\n private void handleNewPerson() {\n Shops tempShops = new Shops();\n boolean okClicked = mainApp.showPersonEditDialog(tempShops);\n if (okClicked) {\n mainApp.getPersonData().add(tempShops);\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n frame.setVisible(false);//when user clicks my profile button the visibility of the frame for the home screen will be set to false \n new MyProfile();//displays the user's profile page\n }", "@FXML\r\n\tpublic void viewProfile(ActionEvent event)\r\n\t{\r\n\t\t// TODO Autogenerated\r\n\t}", "@RequestMapping(\"/signup\")\n public String signupPage() {\n return \"createProfile\";\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "public void clickCreateButton() {\n this.action.click(this.createButton);\n }", "@Override\r\n public void handle(ActionEvent e) {\n CreateUser create = new CreateUser(txtUserName, txtEmail,\r\n txtFirstName, txtLastName, txtPassword);\r\n\r\n create.createUser(); //Call the createUser method.\r\n confirmUserStage.close(); //Close the confirm stage\r\n\r\n }", "public void setupUserProfile(TutorMeProfile tutorProfile) {\n\n //Grab views from screen\n LinearLayout layout = (LinearLayout) findViewById(R.id.subjectList);\n Button b = (Button) findViewById(R.id.addSubjButton);\n EditText bioField = (EditText) findViewById(R.id.BioField);\n\n //Set views appropriately\n if (tutorProfile != null) {\n if (tutorProfile.getSubjects() != null) {\n subjectList = tutorProfile.getSubjects();\n }\n\n if (tutorProfile.getDescription() != null) {\n bioField.setText(tutorProfile.getDescription());\n }\n\n TextView gradeField = (TextView) findViewById(R.id.GradeLevelField);\n if (tutorProfile.getGradeLevels() != null) {\n for (String s : tutorProfile.getGradeLevels()) {\n gradeField.setText(s + \", \");\n }\n }\n\n\n // Getting fields and setting test\n layout.removeView(findViewById(R.id.addSubjButton));\n if (subjectList != null) {\n for (String subject : subjectList) {\n Button newSkill = new Button(findViewById(R.id.subjectList).getContext());\n newSkill.setText(subjectList.get(0));\n\n //Add functionality to button\n newSkill.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n removeSkill(view);\n }\n });\n subjectButtons.add(newSkill);\n layout.addView(newSkill);\n disableSkillButtons();\n }\n }\n //Have the add button stay at the bottom\n layout.addView(b);\n }\n\n }", "private void profileButton5ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 4).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "public void newStudentButtonPushed() {\r\n String firstName = firstNameTextField.getText();\r\n String lastName = lastNameTextField.getText();\r\n LocalDate birthdayDate = birthdayDatePicker.getValue();\r\n \r\n // Firts Name Validation\r\n if (firstName != null && (firstName.length() < MIN_CHARS)) {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setTitle(\"Invalid Input\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\r\n \"First Name is not correct \"\r\n + \"(empty name or shorter that three characters)!\");\r\n alert.showAndWait();\r\n \r\n return;\r\n }\r\n \r\n // Last Name Validation\r\n if (lastName != null && (lastName.length() < MIN_CHARS)) {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setTitle(\"Invalid Input\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\r\n \"Last Name is not correct \"\r\n + \"(empty name or shorter that three characters)!\");\r\n alert.showAndWait();\r\n \r\n return;\r\n }\r\n \r\n // Date Validation\r\n if (birthdayDate == null || birthdayDate.isAfter(\r\n LocalDate.now().minusYears(MIN_YEARS_OLD))) {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setTitle(\"Invalid Input\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\r\n \"Date is not correct \"\r\n + \"(empty date or student < 17 years old)!\");\r\n alert.showAndWait();\r\n \r\n return;\r\n }\r\n \r\n // Construct new student\r\n Student newStudent = new Student(firstName, lastName, birthdayDate);\r\n \r\n try {\r\n newStudent = covidMngrService.addStudent(newStudent);\r\n \r\n // Get all the items from the table as a list, then add the \r\n // new student to the list\r\n tableView.getItems().add(newStudent);\r\n } catch (RemoteException ex) {\r\n Logger.getLogger(StudentMainCntrl.class.getName()).\r\n log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void editTheirProfile() {\n\t\t\n\t}", "public void onSignUpClick() {\n\t\tString uid = regview.getUsername();\n\t\tString pw = regview.getPassword();\n\t\tString na = regview.getName();\n\t\tString em = regview.getEmail();\n\t\tString text = \"\";\n\t\tif(uid.equals(\"\") || pw.equals(\"\") || na.equals(\"\")|| em.equals(\"\")){\n\t\t\ttext = \"Please fill out all fields!\";\n\t\t} else if(regview.findUser(uid)!=User.NULL_USER){\n\t\t\ttext = \"The username already exsit, please try another one!\";\n\t\t} else {\n\t\t\tregview.addUser(new User(uid,pw,na,em));\n\t\t\tregview.goLoginPage();\n\t\t}\n\t\tregview.setRegisterText(text);\n\t}", "@FXML\n\tpublic void createUser(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtUserNames.getText();\n\t\tString lastName = txtUserSurnames.getText();\n\t\tString id = txtUserId.getText();\n\t\tString username = txtUserUsername.getText();\n\t\tString password = PfUserPassword.getText();\n\n\t\tif (!name.equals(empty) && !lastName.equals(empty) && !id.equals(empty) && !username.equals(empty)\n\t\t\t\t&& !password.equals(empty)) {\n\t\t\tcreateSystemUser(name, lastName, id, username, password);\n\t\t\ttxtUserNames.setText(\"\");\n\t\t\ttxtUserSurnames.setText(\"\");\n\t\t\ttxtUserId.setText(\"\");\n\t\t\ttxtUserUsername.setText(\"\");\n\t\t\tPfUserPassword.setText(\"\");\n\t\t\t// labelUserMessage.setText(\"The user has been created\");\n\t\t} else if (name.equals(empty) && lastName.equals(empty) && id.equals(empty) && username.equals(empty)\n\t\t\t\t&& password.equals(empty)) {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "@FXML\n\tpublic void buttonSingUp(ActionEvent event) throws IOException {\n\t\tFXMLLoader addUserfxml = new FXMLLoader(getClass().getResource(\"Add-User.fxml\"));\n\t\taddUserfxml.setController(this);\n\t\tParent addUser = addUserfxml.load();\n\t\tmainPaneLogin.getChildren().setAll(addUser);\n\t}", "@Override\n public void onClick(View v) {\n signUp();\n }", "public void clickUserProfile(){\r\n driver.findElement(userTab).click();\r\n driver.findElement(profileBtn).click();\r\n }", "public void Create(View view) {\n disableButton = findViewById(R.id.newAccountButton);\n disableButton.setEnabled(false);\n username = ((EditText)findViewById(R.id.createName)).getText().toString();\n password = ((EditText)findViewById(R.id.createPassword)).getText().toString();\n String password2 = ((EditText)findViewById(R.id.recreatePassword)).getText().toString();\n if (username.length() == 0 || password.length() == 0) {\n Toast.makeText(this, \"Fill in all boxes\", Toast.LENGTH_SHORT).show();\n disableButton.setEnabled(true);\n } else if (!password.equals(password2)) {\n Toast.makeText(this, \"passwords must be the same\", Toast.LENGTH_SHORT).show();\n disableButton.setEnabled(true);\n } else {\n PostuserHelper helper = new PostuserHelper(username, password, getApplicationContext(),\n NewaccountActivity.this);\n }\n }", "public void handleNavMenuViewProfile() {\n if (user != null) {\n view.launchProfilePage(user);\n }\n }", "private void profileButton3ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 2).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "@Override\n public void onClick(View view) {\n registerUser();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString userName = input.getText().toString();\r\n\t\t\t\tString userColour = sprCoun.getSelectedItem()\r\n\t\t\t\t\t\t.toString();\r\n\t\t\t\tString userLangName = userLang;\r\n\r\n\t\t\t\tcontext.addNewUser(userName, userColour);\r\n\t\t\t\t\r\n\t\t\t\talertDialog.dismiss();\r\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n User instance = User.getInstance();\n instance.setName(name.getText().toString());\n instance.setEmail(email.getText().toString());\n Bitmap bitmap = ((BitmapDrawable)imageButton.getDrawable()).getBitmap();\n instance.setAvatar(bitmap);\n String json = buildJsonForSignUp();\n\n String result = \"\";\n result = PostUtil.POST(getString(R.string.signUp),json);\n\n try {\n JSONObject obj = new JSONObject(result).getJSONObject(\"0\");\n JSONObject info = obj.getJSONObject(\"info\");\n\n if(info.getBoolean(\"result\") && info.getString(\"userId\") != null){\n\n instance.setId(info.getString(\"userId\"));\n showToast(\"Your account is created!\");\n Intent intent = new Intent(ProfileActivity.this,MainActivity.class);\n startActivity(intent);\n finish();\n }\n else{\n showToast(\"Failed to create, please try again!\");\n User.clear();\n Intent intent = new Intent(ProfileActivity.this,LoginActivity.class);\n startActivity(intent);\n finish();\n }\n\n\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }).start();\n\n\t\t\t}", "public void newUserClicked(View view) {\r\n Intent intent = new Intent(this, SignUpActivity.class);\r\n startActivity(intent);\r\n }", "public void clickOnCreateButton() {\n\t\twaitForElement(createButton);\n\t\tclickOn(createButton);\n\t}", "public RegistrationRutPage clickOnAddUserButton() {\n Log.info(\"Clicking on Add user button\");\n clickElement(addUserButton);\n return this;\n }", "@Override\n public void onClick(View view) {\n registerUser();\n\n\n }", "WebElement getNewAccountButton();", "public void onClickcreateUserSignup(View view){\n\n String newName = ((EditText)findViewById(R.id.createUserUsername)).getText().toString();\n if(!newName.equals(\"\")) {\n Account.getInstance().setName(newName);\n\n SharedPreferences settings = getSharedPreferences(Utils.ACCOUNT_PREFS, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"accountName\", newName);\n editor.commit();\n\n startActivity(new Intent(this, MainActivity.class));\n }\n }", "@Override\n public void onClick(View v) {\n Phone = RegisterPhone.getText().toString();\n Password = RegisterPassword.getText().toString();\n Name = RegisterName.getText().toString();\n\n\n CreateNewAccount(Phone,Password,Name);\n }", "@RequestMapping(value = \"/profile\", method = RequestMethod.POST)\n\tpublic String createSuccess(@ModelAttribute Profile profile,\n\t\t\t@RequestParam(value = \"action\", required = true) String action,\n\t\t\tModel model) {\n\t\tif (action.equals(\"delete\")) {\n\t\t\tProfile profile1 = profileDao.findById(profile.getId());\n\t\t\tif (profile1 == null) {\n\t\t\t\tthrow new ResourceNotFoundException(\n\t\t\t\t\t\t\"Sorry, the requested user with id\" + profile.getId()\n\t\t\t\t\t\t\t\t+ \"does not exits!\");\n\t\t\t}\n\t\t\tthis.profileDao.delete(profile1);\n\t\t\tmodel.addAttribute(\"profile\", new Profile());\n\t\t\treturn \"redirect:/profile\";\n\t\t}\n\t\tif (action.equals(\"update\")) {\n\t\t\tProfile profile1 = profileDao.findById(profile.getId());\n\t\t\tif (profile1 == null) {\n\t\t\t\tthrow new ResourceNotFoundException(\n\t\t\t\t\t\t\"Sorry, the requested user with id\" + profile.getId()\n\t\t\t\t\t\t\t\t+ \"does not exits!\");\n\t\t\t}\n\t\t\tthis.profileDao.save(profile);\n\t\t\tmodel.addAttribute(\"profile\", profile);\n\t\t\treturn \"redirect:/profile/\" + profile.getId();\n\t\t}\n\t\tif (action.equals(\"create\")) {\n\t\t\tmodel.addAttribute(\"profile\", profile);\n\t\t\tthis.profileDao.save(profile);\n\t\t\treturn \"form\";\n\t\t}\n\t\treturn action;\n\t}", "void onFragmentAddNewUser();", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\tuf = new UserForm(AktuellerAnwender.getAnwender());\r\n\t\t\tRootPanel.get(\"details\").add(uf);\r\n\t\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getContext(), ProfileActivity.class);\n startActivity(intent);\n\n }", "public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}", "private void profileButton4ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 3).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "private void profileButton6ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 5).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "public void goToProfilePage() {\n\t\tUtil.element(userTab, driver).click();\n\t}", "@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }", "private void onSignUpPressed(View view) {\n Intent intent = new Intent(LoginActivity.this, CreateAccountActivity.class);\n startActivity(intent);\n }", "public void switchToCreateAccount() {\r\n\t\tlayout.show(this, \"createPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "public void OnSetAvatarButton(View view){\n Intent intent = new Intent(getApplicationContext(),ProfileActivity.class);\n startActivityForResult(intent,0);\n }", "@OnClick(R.id.setUserProfileEdits)\n public void onConfirmEditsClick() {\n if (UserDataProvider.getInstance().getCurrentUserType().equals(\"Volunteer\")){\n addSkills();\n addCauses();\n }\n updateUserData();\n // get intent information from previous activity\n\n// Intent intent = new Intent(getApplicationContext(), LandingActivity.class);\n\n\n// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n finish();\n// startActivity(intent);\n }", "public void onSignupClickedListener(View view) {\n\n Intent intent = new Intent(this, PersonalAccountActivity.class);\n startActivity(intent);\n }", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "private void initSignUpButton() {\n TextButton signUpButton = new TextButton(\"Sign up\", skin);\n signUpButton.setPosition(320, 125);\n signUpButton.addListener(new InputListener() {\n @Override\n public void touchUp(InputEvent event, float x, float y, int pointer, int button) {\n AuthService authService = new AuthService();\n RegistrationResponse response\n = authService.register(usernameField.getText(), passwordField.getText());\n switch (response) {\n case OCCUPIED_NAME:\n usernameTakenDialog();\n break;\n case SHORT_PASSWORD:\n passwordTooShortDialog();\n break;\n case SUCCESS:\n stateManager.setState(new LoginState(stateManager));\n break;\n default:\n }\n }\n\n @Override\n public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {\n System.out.println(\"pressed sign up\");\n return true;\n }\n });\n stage.addActor(signUpButton);\n }", "public void crearPersonaje(ActionEvent event) {\r\n\r\n\t\tthis.personaje.setAspecto(url);\r\n\r\n\t\tDatabaseOperaciones.guardarPersonaje(stats, personaje);\r\n\r\n\t\tvisualizaPersonajes();\r\n\t}", "@Override\n\tpublic void showProfile() {\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n\t \tIntent myIntent = new Intent(MainActivity.this, Profile.class);\n\t \t//myIntent.putExtra(\"key\", value); //Optional parameters\n\t \tMainActivity.this.startActivity(myIntent);\n }", "public void createAccountButtonClicked(ActionEvent event) {\n\n if (verifyFields()) {\n if (!checkUserName(userName)) {\n if (!checkEmail(email)) {\n if (comboBox.getValue().equals(\"Student\")) {\n try {\n Parent studentParent = FXMLLoader.load(getClass().getResource(\"Student.fxml\"));\n Scene studentScene = new Scene(studentParent, 1800, 1200);\n\n //gets stage information\n Stage window = (Stage) ((Node) event.getSource()).getScene().getWindow();\n window.setTitle(\"Student Page\");\n window.setScene(studentScene);\n window.show();\n\n String sql = \"INSERT INTO user(first_name, last_name, user_name, email, password, account_type) VALUES(?,?,?,?,?,?)\";\n PreparedStatement pst = connection.prepareStatement(sql);\n pst.setString(1, firstName.getText());\n pst.setString(2, lastName.getText());\n pst.setString(3, userName.getText());\n pst.setString(4, email.getText());\n pst.setString(5, password.getText());\n pst.setString(6, comboBox.getValue());\n\n pst.execute();\n\n outputText.setText(\"Account Created!\");\n\n\n } catch (SQLException | IOException e) {\n e.printStackTrace();\n }\n } else if (comboBox.getValue().equals(\"Tutor\")) {\n try {\n Parent tutorParent = FXMLLoader.load(getClass().getResource(\"Tutor.fxml\"));\n Scene tutorScene = new Scene(tutorParent, 1800, 1500);\n\n //gets stage information\n Stage window = (Stage) ((Node) event.getSource()).getScene().getWindow();\n window.setTitle(\"Tutor Page\");\n window.setScene(tutorScene);\n window.show();\n\n String sql = \"INSERT INTO user(first_name, last_name, user_name, email, password, account_type) VALUES(?,?,?,?,?,?)\";\n PreparedStatement pst = connection.prepareStatement(sql);\n pst.setString(1, firstName.getText());\n pst.setString(2, lastName.getText());\n pst.setString(3, userName.getText());\n pst.setString(4, email.getText());\n pst.setString(5, password.getText());\n pst.setString(6, comboBox.getValue());\n\n pst.execute();\n\n outputText.setText(\"Account Created!\");\n\n\n } catch (SQLException | IOException e) {\n e.printStackTrace();\n }\n } else if (comboBox.getValue().equals(\"Account Type\")) {\n outputText.setText(\"Select Account Type\");\n }\n }\n }\n }\n\n\n }", "public void clickHomeProfilePage() {\n wait.until(CustomWait.visibilityOfElement(profileHomePageButton));\n profileHomePageButton.click();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tIntent i = new Intent(NewProfileActivity.this,\n\t\t\t\t\t\tTBDispContacts.class);\n\t\t\t\ti.putExtra(\"Edit\", \"true\");\n\t\t\t\ti.putExtra(\"Details\", \"false\");\n\t\t\t\tstartActivity(i);\n\t\t\t}", "@Override\n public void onClick(View v) {\n startActivity(new Intent(mContext, ActivityProfile.class));\n }", "public void createnewusersubmitbutton( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Create new user button clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"createnewuserbutton\"));\r\n\t\t\tclick(locator_split(\"createnewuserbutton\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- create new user button clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- create new user button is not clicked \"+elementProperties.getProperty(\"createnewuserbutton\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"createnewuserbutton\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "private void clickEventProfileImage(){\n mProfileImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n ProfileFragment profileFragment = new ProfileFragment_();\n Bundle args = new Bundle();\n args.putBoolean(\"goal\",false);\n profileFragment.setArguments(args);\n ((MainActivity)getContext()).loadFragment(profileFragment, \"fm_profile\",true,getString(R.string.nav_menu_profile));\n }\n });\n }", "@Override\r\n public void onClick(View view) {\r\n switch (view.getId()){\r\n case R.id.Signup:\r\n\r\n registerUser();\r\n\r\n break;\r\n }\r\n }", "private void gotoUserProfile() {\n Intent launchUserProfile = new Intent(this, Profile.class);\n startActivity(launchUserProfile);\n }", "public void createButtonClicked() {\n clearInputFieldStyle();\n setAllFieldsAndSliderDisabled(false);\n setButtonsDisabled(false, true, true);\n setDefaultValues();\n Storage.setSelectedRaceCar(null);\n }", "@FXML\n\tpublic void buttonSignUpAdministrator(ActionEvent event) throws IOException {\n\t\tFXMLLoader addUserfxml = new FXMLLoader(getClass().getResource(\"Add-User.fxml\"));\n\t\taddUserfxml.setController(this);\n\t\tParent addUser = addUserfxml.load();\n\t\tmainPaneLogin.getChildren().setAll(addUser);\n\n\t\ttxtUserUsername.setText(\"ADMINISTRATOR\");\n\t\ttxtUserUsername.setEditable(false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_profile, container, false);\n nameText = (EditText) view.findViewById(R.id.nameText);\n nicText = (EditText) view.findViewById(R.id.nicText);\n saveBtn = (Button) view.findViewById(R.id.saveBtn);\n Log.d(TAG, \"view is creating................................\");\n saveBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n main.saveUser(nameText.getText().toString(), nicText.getText().toString());\n Log.d(TAG, \"user is saving \"+nameText.getText().toString()+\" \" + nicText.getText().toString());\n FragmentNavigator.navigateTo(\"homeFragment\");\n }\n });\n return view;\n }", "HasClickHandlers getCreateNewButton();", "@Override\n public void onClick(View v) {\n TextView nameView = (TextView) addPerson.findViewById(R.id.add_person_name);\n CircleImageView personImageView = (CircleImageView) addPerson.findViewById(R.id.friend_image);\n pDbHelper.createPerson(\n pDbHelper.getWritableDatabase(),\n nameView.getText().toString(),\n ((BitmapDrawable) personImageView.getDrawable()).getBitmap()\n );\n onBackPressed();\n }", "@Override\n public void onClick(View v) {\n\n String firstName = firstName_et.getText().toString();\n String lastName = lastName_et.getText().toString();\n String emailId = email_et.getText().toString();\n\n addMember(firstName, lastName, emailId);\n\n }", "@Override\n public void onClick(View view) {\n\n\n\n userDetail.setFname(fname.getText().toString());\n userDetail.setLname(lname.getText().toString());\n userDetail.setAge(Integer.parseInt(age.getText().toString()));\n userDetail.setWeight(Double.valueOf(weight.getText().toString()));\n userDetail.setAddress(address.getText().toString());\n\n try {\n new EditUserProfile(editUserProfileURL,getActivity(),userDetail).execute();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Toast.makeText(getActivity(), \"Saved Profile Successfully\",\n Toast.LENGTH_SHORT).show();\n getFragmentManager().popBackStack();\n\n }", "@FXML\r\n void ClickUserInformation(MouseEvent event) throws IOException {\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(\"UserInformation.fxml\"));\r\n //Load user information page\r\n loader.load();\r\n UserInformationController controller = loader.getController();\r\n controller.setUser(user);\r\n //Set user details in the user information page\r\n Parent root = loader.getRoot();\r\n Scene scene = new Scene(root);\r\n Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "@Override\n public void getStartedClicked() {\n startSignUpFragment();\n\n }", "@FXML\r\n void createAccount(MouseEvent event) throws SQLException {\r\n ta_employeeAccount.clear();\r\n account();\r\n\r\n }", "@Override\n public void onClick(ClickEvent event) {\n String fName = content.getRegisterView().getNewtxtFname().getText();\n String lName = content.getRegisterView().getNewtxtLname().getText();\n String email = content.getRegisterView().getNewtxtEmail().getText();\n String address = content.getRegisterView().getNewtxtAddress().getText();\n String mobileno = content.getRegisterView().getNewtxtMobileNo().getText();\n String education = content.getRegisterView().getNewtxtEducation().getText();\n String experience = content.getRegisterView().getNewtxtExperience().getText();\n Integer hoursPrWeek = content.getRegisterView().getNewtxtHoursPrWeek().getValue();\n String password = content.getRegisterView().getNewtxtPassword().getText();\n\n // Here we check which radiobutton the user choose and give them the right teamtype_teamID\n String teamtype = null;\n int teamtype_teamID = 0;\n\n if (content.getRegisterView().getNewCrossfitBtn().getValue() == true) {\n teamtype = \"Crossfit\";\n teamtype_teamID = 1;\n }\n if (content.getRegisterView().getNewSpinningBtn().getValue() == true) {\n teamtype = \"Spinning\";\n teamtype_teamID = 3;\n }\n if (content.getRegisterView().getNewHitBtn().getValue() == true) {\n teamtype = \"H.I.T.\";\n teamtype_teamID = 2;\n }\n if (content.getRegisterView().getNewStramopBtn().getValue() == true) {\n teamtype = \"Stram op\";\n teamtype_teamID = 4;\n }\n\n // Here we check for mistakes and if there is no mistake we create the user\n if (!FieldVerifier.isValidFname(fName)){content.getRegisterView().getNewtxtFname().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidLname(lName)){content.getRegisterView().getNewtxtLname().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidEmail(email)){content.getRegisterView().getNewtxtEmail().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidAddress(address)){content.getRegisterView().getNewtxtAddress().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidMobileNo(mobileno)){content.getRegisterView().getNewtxtMobileNo().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidEducation(education)){content.getRegisterView().getNewtxtEducation().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidExperience(experience)){content.getRegisterView().getNewtxtExperience().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidHoursPrWeek(hoursPrWeek)){content.getRegisterView().getNewtxtHoursPrWeek().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidPassword(password)){content.getRegisterView().getNewtxtPassword().setStyleName(\"textBox-invalidEntry\");}\n else {\n User user = new User();\n user.setFname(fName);\n user.setLname(lName);\n user.setEmail(email);\n user.setAddress(address);\n user.setMobilenr(mobileno);\n user.setEducation(education);\n user.setExperience(experience);\n user.setHoursPrWeek(hoursPrWeek);\n user.setPassword(password);\n user.setType(2);\n user.setIsApproved(false);\n user.setTeamtype(teamtype);\n user.setTeamtype_teamID(teamtype_teamID);\n\n // RPC authenticating user method\n motionCBSTestService.createUser(user, new AsyncCallback<Boolean>() {\n\n @Override\n public void onFailure(Throwable caught) {\n Window.alert(\"Something went wrong\");\n }\n\n @Override\n public void onSuccess(Boolean isCreated) {\n if (!isCreated) {\n Window.alert(\"Could not create user\");\n } else {\n content.getRegisterView().clearTextBoxFields();\n Window.alert(\"You have successfully been created. Please wait for Admin to approve you\");\n }\n }\n });\n }\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (!txtUserName.getText().isEmpty() && txtPassword.getPassword().length != 0) {\r\n\t\t\t\t\tString givenPassword = new String(txtPassword.getPassword());\r\n\t\t\t\t\tif (txtUserName.getText().indexOf(\"_\") == -1 && givenPassword.indexOf(\"_\") == -1\r\n\t\t\t\t\t\t\t&& txtUserName.getText().indexOf(\"/\") == -1 && givenPassword.indexOf(\"/\") == -1) {\r\n\t\t\t\t\t\tSignUp.printRecord(txtUserName.getText().toString(), givenPassword.toString());\r\n\t\t\t\t\t\tif (signedUpSuccessfully) {\r\n\t\t\t\t\t\t\tProfileLast.userName = txtUserName.getText();\r\n\t\t\t\t\t\t\tif (profileAddress.equals(\"Contact2.png\")) {\r\n\t\t\t\t\t\t\t\tProfileLast.main(txtUserName.getText() , \"Contact2.png\");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tProfileLast.main(txtUserName.getText() , txtUserName.getText() + \".jpg\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Wrong Inputs given !\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Enter The Fields Correctly !\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(context,ProfileActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "@FXML\r\n\tpublic void saveNewAccount( ) {\r\n\t\t// Save user input\r\n\t\tString name = userName.getText( );\r\n\t\tString mail = email.getText( );\r\n\r\n\t\t// Call the to file method to write to data.txt\r\n\t\tUserToFile.toFile(name, pin, mail);\r\n\t\t\r\n\t\t// View the test after the info is saved\r\n\t\tviewTest( );\r\n\t}" ]
[ "0.6938106", "0.69138426", "0.6880143", "0.66926306", "0.6573327", "0.64258295", "0.6357285", "0.6251822", "0.6248885", "0.62478405", "0.62439626", "0.6240286", "0.6213868", "0.62030494", "0.61899006", "0.6181487", "0.6179964", "0.6173527", "0.6169948", "0.6125026", "0.606892", "0.6067787", "0.6054487", "0.60415214", "0.599277", "0.5986398", "0.59505343", "0.59453195", "0.5938464", "0.5935783", "0.5920158", "0.59199834", "0.59179056", "0.5908851", "0.59040195", "0.58955085", "0.5894241", "0.58851033", "0.5882717", "0.58705455", "0.5868052", "0.586514", "0.58552814", "0.5848606", "0.58404315", "0.5826325", "0.582023", "0.58199143", "0.5818647", "0.58016956", "0.5797878", "0.5796606", "0.5795294", "0.5789081", "0.57826066", "0.5780763", "0.5777351", "0.5774717", "0.57731473", "0.57726854", "0.5769", "0.57379156", "0.5735327", "0.5729709", "0.5727068", "0.5722454", "0.5722113", "0.56995827", "0.569888", "0.56955194", "0.56913406", "0.56812364", "0.56759727", "0.56753165", "0.5661656", "0.56360877", "0.5635027", "0.5624061", "0.56205404", "0.561854", "0.56172305", "0.5616692", "0.56066406", "0.5601389", "0.5596893", "0.55967146", "0.5594416", "0.55901355", "0.55816674", "0.55815756", "0.5580164", "0.5562512", "0.5562083", "0.5560224", "0.55563194", "0.5544612", "0.55444413", "0.554387", "0.554387", "0.5541588" ]
0.75713485
0
Displays Create Profile Page
public void displayCreateProfile() throws Exception{ System.out.println("Username And Login Match"); currentStage.hide(); Stage primaryStage = new Stage(); System.out.println("Step 1"); Parent root = FXMLLoader.load(getClass().getResource("view/CreateProfile.fxml")); System.out.println("step 2"); primaryStage.setTitle("Main Menu"); System.out.println("Step 3"); primaryStage.setScene(new Scene(root, 600, 900)); primaryStage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"/profile\", method = RequestMethod.GET)\n\tpublic String create(Model model) {\n\t\tmodel.addAttribute(\"profile\", new Profile());\n\t\treturn \"create\";\n\t}", "public CreateProfile() {\n initComponents();\n }", "@RequestMapping(\"/signup\")\n public String signupPage() {\n return \"createProfile\";\n }", "@RequestMapping(value = \"/profile\", method = RequestMethod.POST)\n\tpublic String createSuccess(@ModelAttribute Profile profile,\n\t\t\t@RequestParam(value = \"action\", required = true) String action,\n\t\t\tModel model) {\n\t\tif (action.equals(\"delete\")) {\n\t\t\tProfile profile1 = profileDao.findById(profile.getId());\n\t\t\tif (profile1 == null) {\n\t\t\t\tthrow new ResourceNotFoundException(\n\t\t\t\t\t\t\"Sorry, the requested user with id\" + profile.getId()\n\t\t\t\t\t\t\t\t+ \"does not exits!\");\n\t\t\t}\n\t\t\tthis.profileDao.delete(profile1);\n\t\t\tmodel.addAttribute(\"profile\", new Profile());\n\t\t\treturn \"redirect:/profile\";\n\t\t}\n\t\tif (action.equals(\"update\")) {\n\t\t\tProfile profile1 = profileDao.findById(profile.getId());\n\t\t\tif (profile1 == null) {\n\t\t\t\tthrow new ResourceNotFoundException(\n\t\t\t\t\t\t\"Sorry, the requested user with id\" + profile.getId()\n\t\t\t\t\t\t\t\t+ \"does not exits!\");\n\t\t\t}\n\t\t\tthis.profileDao.save(profile);\n\t\t\tmodel.addAttribute(\"profile\", profile);\n\t\t\treturn \"redirect:/profile/\" + profile.getId();\n\t\t}\n\t\tif (action.equals(\"create\")) {\n\t\t\tmodel.addAttribute(\"profile\", profile);\n\t\t\tthis.profileDao.save(profile);\n\t\t\treturn \"form\";\n\t\t}\n\t\treturn action;\n\t}", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "@PostMapping(\"/user/new/\")\n\tpublic userprofiles createUser(@RequestParam String firstname, @RequestParam String lastname, @RequestParam String username, @RequestParam String password, @RequestParam String pic) {\n\t\treturn this.newUser(firstname, lastname, username, password, pic);\n\t}", "@GetMapping\n public String showProfilePage(Model model){\n user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\n model.addAttribute(\"profileForm\",ProfileForm.createProfileFormFromUser(user));\n model.addAttribute(\"image\",user.getProfileImage() != null);\n\n return PROFILE_PAGE_NAME;\n }", "@RequestMapping(value = {\"/register\"}, method = RequestMethod.GET)\n public String newUser(ModelMap model) {\n User user = new User();\n Customer customer = new Customer();\n List<UserProfile> userProfileList = new ArrayList();\n user.setCustomer(customer);\n user.setUserProfileList(userProfileList);\n model.addAttribute(\"user\", user);\n model.addAttribute(\"edit\", false);\n model.addAttribute(\"action\", \"newuser\");\n model.addAttribute(\"loggedinuser\", appService.getPrincipal());\n return \"registration\";\n }", "@Override\n\tpublic void showProfile() {\n\t\t\n\t}", "public CreateJPanel(ProfileInfo profileInfo) {\n initComponents();\n \n this.profileInfo = profileInfo;\n btnSave.setEnabled(false);\n \n }", "@RequestMapping(value = \"/profile/{id}\", method = RequestMethod.POST)\n\tpublic String createOrUpdateProfile(@PathVariable(value = \"id\") String id,\n\t\t\t@PathParam(value = \"firstname\") String firstname,\n\t\t\t@PathParam(value = \"lastname\") String lastname,\n\t\t\t@PathParam(value = \"email\") String email,\n\t\t\t@PathParam(value = \"address\") String address,\n\t\t\t@PathParam(value = \"organization\") String organization,\n\t\t\t@PathParam(value = \"aboutmyself\") String aboutmyself, Model model) {\n\t\ttry {\n\t\t\tProfile profile = profileDao.findById(id);\n\t\t\tif (profile == null) {\n\t\t\t\tprofile = new Profile();\n\t\t\t\tprofile.setId(id);\n\t\t\t}\n\t\t\tprofile.setFirstname(firstname);\n\t\t\tprofile.setLastname(lastname);\n\t\t\tprofile.setEmail(email);\n\t\t\tprofile.setAddress(address);\n\t\t\tprofile.setOrganization(organization);\n\t\t\tprofile.setAboutMyself(aboutmyself);\n\t\t\tmodel.addAttribute(\"profile\", profile);\n\t\t\tthis.profileDao.save(profile);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"redirect:/profile/{id}?brief=false\";\n\t}", "public void saveProfileCreateData() {\r\n\r\n }", "@RequestMapping(value = { \"/new\" }, method = RequestMethod.GET)\r\n public String newuser(ModelMap model) {\r\n User user = new User();\r\n model.addAttribute(\"user\", user);\r\n model.addAttribute(\"edit\", false);\r\n return \"registration\";\r\n\r\n }", "@RequestMapping(value = { \"/newuser\" }, method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String newUser(ModelMap model) {\n\t\tUser user = new User();\n\t\tmodel.addAttribute(\"user\", user);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\treturn \"registration\";\n\t}", "@RequestMapping(\"/su/profile\")\n\tpublic ModelAndView suprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.addObject(\"suinfo\", suinfoDAO.findSuinfoByPrimaryKey(yourtaskuser.getUserid()));\n\t\tmav.setViewName(\"profile/userprofile.jsp\");\n\t\treturn mav;\n\t}", "private void createGuestProfile() {\n saveData();\n signupDelegate.enableNextButton(Boolean.FALSE);\n SwingUtil.setCursor(this, java.awt.Cursor.WAIT_CURSOR);\n errorMessageJLabel.setText(getString(\"SigningUp\"));\n errorMessageJLabel.paintImmediately(0, 0, errorMessageJLabel.getWidth(),\n errorMessageJLabel.getHeight());\n try {\n getSignupHelper().createGuestProfile();\n } catch (final OfflineException ox) {\n logger.logError(ox, \"An offline error has occured.\");\n addInputError(getSharedString(\"ErrorOffline\"));\n } catch (final ReservationExpiredException rex) {\n logger.logWarning(rex, \"The username/e-mail reservation has expired.\");\n addInputError(getString(\"ErrorReservationExpired\"));\n } catch (final Throwable t) {\n logger.logFatal(t, \"An unexpected error has occured.\");\n addInputError(getSharedString(\"ErrorUnexpected\"));\n } finally {\n errorMessageJLabel.setText(\" \");\n }\n }", "private String renderCreatePage(Model model) {\n\t\tmodel.addAttribute(\"availableProviders\", providerService.getAllProviders());\n\t\treturn \"vm/create\";\n\t}", "public void showProfile() {\r\n\t\tprofile.setVisible(true);\r\n\t}", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "@RequestMapping(value = \"/creator\", method = RequestMethod.GET)\r\n public String creator(HttpServletRequest request, ModelMap model) throws ServletException, IOException { \r\n UserAuthorities ua = userAuthoritiesProvider.getInstance();\r\n if (ua.userIsAdmin() || ua.userIsSuperUser()) {\r\n return(renderPage(request, model, \"creator\", null, null, null, false));\r\n } else {\r\n throw new SuperUserOnlyException(\"You are not authorised to create maps\");\r\n }\r\n }", "public boolean createUser(UserProfile userProfile) {\n\t\tmongoTemplate.insert(userProfile, \"UserProfile_Details\");\n\t\treturn true;\n\t}", "public void onClick(View view) {\n if(validate_info()){\n create_user();\n user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n submit_profile(user);\n }\n }\n else{\n return;\n\n\n }\n }", "@POST\n\t @Path(\"create\")\n\t @Consumes(MediaType.APPLICATION_JSON)\n\t public Response createProfile(\n\t ProfileJson json) throws ProfileDaoException {\n\t Profile profile = json.asProfile();\n\t api.saveProfile(profile, datastore);\n\t\t//datastore.save(profile);\n\t return Response\n\t .created(null)\n\t .build();\n\t }", "public String create() {\n\n if (log.isDebugEnabled()) {\n log.debug(\"create()\");\n }\n FacesContext context = FacesContext.getCurrentInstance();\n StringBuffer sb = registration(context);\n sb.append(\"?action=Create\");\n forward(context, sb.toString());\n return (null);\n\n }", "@POST\n @Path(\"/create\")\n @Consumes(MediaType.APPLICATION_JSON)\n public Response createUser(ProfileJson json) throws ProfileDaoException {\n Profile profile = json.asProfile();\n profile.setPassword(BCrypt.hashpw(profile.getPassword(), BCrypt.gensalt()));\n //add checking if profile doesn't exit\n api.saveProfile(profile, datastore);\n return Response\n .created(null)\n .build();\n }", "public static void view() {\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\trender(user, userprofile);\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "@GetMapping(\"/profile\")\n\tpublic String showProfilePage(Model model, Principal principal) {\n\t\t\n\t\tString email = principal.getName();\n\t\tUser user = userService.findOne(email);\n\t\t\n\t\tmodel.addAttribute(\"tasks\", taskService.findUserTask(user));\n\t\t\n\t\t\n\t\treturn \"views/profile\";\n\t}", "@RequestMapping(\"/sc/profile\")\n\tpublic ModelAndView scprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.addObject(\"scinfo\", scinfoDAO.findScinfoByPrimaryKey(yourtaskuser.getUserid()));\n\t\tmav.setViewName(\"profile/companyprofile.jsp\");\n\t\treturn mav;\n\t}", "public UserProfile createUserProfile(String username, UserProfile newProfile);", "private void addProfile(String inputName) {\n \tif (! inputName.equals(\"\")) {\n\t\t\t///Creates a new profile and adds it to the database if the inputName is not found in the database\n \t\tif (database.containsProfile(inputName)) {\n \t\t\tlookUp(inputName);\n \t\t\tcanvas.showMessage(\"Profile with name \" + inputName + \" already exist.\");\n \t\t\treturn;\n \t\t}\n\t\t\tprofile = new FacePamphletProfile (inputName);\n\t\t\tdatabase.addProfile(profile);\n\t\t\tcurrentProfile = database.getProfile(inputName);\n \t\tcanvas.displayProfile(currentProfile);\n\t\t\tcanvas.showMessage(\"New profile created.\");\n\t\t\t\n \t}\n\t\t\n\t}", "public Profile() {\n initComponents();\n AutoID();\n member_table();\n \n }", "@RequestMapping(method = RequestMethod.POST,params = {\"save\"})\n public String saveProfile(@Valid ProfileForm profileForm, BindingResult bindingResult){\n\n if(bindingResult.hasErrors()){\n return PROFILE_PAGE_NAME;\n }\n\n user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n user.updateProfileFromProfileForm(profileForm);\n userService.saveAndFlush(user);\n\n return \"redirect:/profile\";\n }", "@RequestMapping(value = \"/success\", method = RequestMethod.POST)\r\n\tpublic String profileSave(@ModelAttribute(\"userForm\") UserDetails userForm,Principal principal ) throws IOException {\n\t\t\r\n\t\t\tuserService.saveEditProfile(userForm,principal);\r\n\t\t\t\r\n\t\treturn \"redirect:dashboard\";\r\n\t}", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "@FXML\n private void openCreateUser(ActionEvent event) {\n CreateUserController createusercontroller = new CreateUserController();\n User user = createusercontroller.openCreateUser(event, roleTap);\n\n if (user != null) {\n userList.add(user);\n UsermanagementUtilities.setFeedback(event, user.getName().getFirstName()+LanguageHandler.getText(\"userCreated\"), true);\n } else {\n UsermanagementUtilities.setFeedback(event, LanguageHandler.getText(\"userNotCreated\"), false);\n\n }\n }", "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "@RequestMapping(value = \"/signup\", method = RequestMethod.GET)\n\tpublic String signUpPage(Model model)\n\t{\n\t\t/* Initialize user registration form */\n\t\tmodel.addAttribute(\"userForm\", new UserDto());\n\t\treturn \"user/signup\";\n\t}", "private void createProfile(ParseUser parseUser){\n final Profile profile = new Profile();\n\n profile.setShortBio(\"\");\n profile.setLongBio(\"\");\n profile.setUser(parseUser);\n\n //default image taken from existing default user\n ParseQuery<ParseObject> query = ParseQuery.getQuery(\"Profile\");\n query.getInBackground(\"wa6q24VD5V\", new GetCallback<ParseObject>() {\n public void done(ParseObject searchProfile, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Couldn't retrieve default image\");\n e.printStackTrace();\n return;\n }\n else {\n defaultImage = searchProfile.getParseFile(\"profileImage\");\n\n if (defaultImage != null)\n profile.setProfileImage(defaultImage);\n else\n Log.d(TAG, \"Default image is null\");\n }\n }\n });\n\n profile.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Error while saving\");\n e.printStackTrace();\n return;\n }\n\n Log.d(TAG, \"Created and saved profile\");\n }\n });\n }", "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "public void displayDetails() {\r\n\t\tSystem.out.println(\"*******************Profile Details*********************\");\r\n\t\tSystem.out.println(\"\\tUsername :\\t\" + uName);\r\n\t\tSystem.out.println(\"\\tFull Name :\\t\" + fullName);\r\n\t\tSystem.out.println(\"\\tPhone :\\t\" + phone);\r\n\t\tSystem.out.println(\"\\tE-Mail :\\t\" + email);\r\n\t}", "void gotoEditProfile();", "@RequestMapping(\"/newuser\")\r\n\tpublic ModelAndView newUser() {\t\t\r\n\t\tRegister reg = new Register();\r\n\t\treg.setUser_type(\"ROLE_INDIVIDUAL\");\r\n\t\treg.setEmail_id(\"[email protected]\");\r\n\t\treg.setFirst_name(\"First Name\");\r\n\t\treg.setCity(\"pune\");\r\n\t\treg.setMb_no(new BigInteger(\"9876543210\"));\r\n\t\treturn new ModelAndView(\"register\", \"rg\", reg);\r\n\t}", "public MyProfilePage() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "NewAccountPage openNewAccountPage();", "@GetMapping(\"/showAddFormUser\")\n\tpublic String showAddForm(Model model) {\n\t\tUser user = new User();\n\t\tmodel.addAttribute(\"user\", user);\n\t\t\n\t\t// add page title\n\t\tmodel.addAttribute(\"pageTitle\", \"Add User\");\n\t\treturn \"user-form\";\n\t}", "@GetMapping(\"/registration\")\n public String getRegistration(Model model)\n {\n model.addAttribute(\"newAccount\", new Account());\n \n return \"registration\";\n }", "@RequestMapping(value = \"/create\", method = RequestMethod.GET)\n public final String create(final ModelMap model) {\n model.addAttribute(REGISTER, new Register());\n return \"create\";\n }", "@Override\r\n\tpublic int createProfileDAO() {\n\t\treturn 1;\r\n\t}", "@RequestMapping(value = {\"/profile\"})\n @PreAuthorize(\"hasRole('logon')\")\n public String showProfile(HttpServletRequest request, ModelMap model)\n {\n User currentUser = userService.getPrincipalUser();\n model.addAttribute(\"currentUser\", currentUser);\n return \"protected/profile\";\n }", "@Override\n public void execute() {\n\n ProfileModel profileModel = new ProfileModel(1,\"TestName\",\"TestLastName\", \"Nick\",1,new GregorianCalendar(1900,11,1),false,\n new GregorianCalendar(1925,6,11),10);\n ProfileView profileView = new ProfileView(profileModel);\n profileView.init();\n profileView.draw(new ConsoleCanvas(80,200));\n }", "@Override\n\tpublic long createProfile(Profile profile) {\n\t\treturn 0;\n\t}", "public void switchToCreateAccount() {\r\n\t\tlayout.show(this, \"createPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "private void composeProfile() {\n if(NetworkUtils.isConnectedToNetwork((ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE)) == false) {\n Toast.makeText(this.getApplicationContext(), \"Please check your network connection!\", Toast.LENGTH_LONG).show();\n return;\n }\n Intent i = new Intent(this, ProfileActivity.class);\n i.putExtra(\"screen_name\", (String) null);\n startActivity(i);\n }", "public SignUp() {\n Logger.log(\"SHOWING SIGN-UP PAGE\");\n\n displaySurnameFields();\n displayNameFields();\n displayNicknameFields();\n displayEmailFields();\n displayPasswordFields();\n displayConfirmPassword();\n displayBirthdayFields();\n displayCountryFields();\n\n displayBackButton();\n displaySubmitButton();\n\n setSceneMusic(\"pallet_town.mp3\");\n }", "@RequestMapping(value = \"/paas/appaas/create\", method = RequestMethod.GET)\n\tpublic String create(@CurrentUser PrismaUserDetails user, Model model) {\n\t\treturn \"pages/paas/appaas/create-appaas\";\n\t}", "@RequestMapping(value = \"/staff/studentcreate\")\n\tpublic String redirectToStudentCreate(Model model) {\n\t\tStudent studentUser = new Student();\n\t\tmodel.addAttribute(\"studentUser\", studentUser);\n\t\treturn \"staff/studentcreate\";\n\t}", "public void goToProfilePage() {\n\t\tUtil.element(userTab, driver).click();\n\t}", "@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}", "@RequestMapping(\"Home1\")\r\n\tpublic String createUser1(Model m) \r\n\t{\n\t\tm.addAttribute(\"employee\",new Employee());\r\n\t\treturn \"register\";//register.jsp==form action=register\r\n\t}", "@RequestMapping(value = \"/registration\", method = RequestMethod.GET)\n public String showPageRegistration(Model model)\n {\n model.addAttribute(\"registeredUser\", new User());\n return \"registration\";\n }", "public String createUserAction()throws Exception{\n\t\tString response=\"\";\n\t\tresponse=getService().getUserMgmtService().createNewUser(\n\t\t\t\tgetAuthBean().getUserName(),\n\t\t\t\tgetAuthBean().getFirstName(),\n\t\t\t\tgetAuthBean().getLastName(),\n\t\t\t\tgetAuthBean().getEmailId(),\n\t\t\t\tgetAuthBean().getRole()\n\t\t);\n\t\tgetAuthBean().setResponse(response);\n\t\tinputStream = new StringBufferInputStream(response);\n\t\tinputStream.close();\n\t\treturn SUCCESS;\n\t}", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "private void addProfile(ProfileInfo profileInfo)\r\n\t{\r\n\t\taddProfile(profileInfo.getProfileName(), \r\n\t\t\t\tprofileInfo.getUsername(), \r\n\t\t\t\tprofileInfo.getServer(),\r\n\t\t\t\tprofileInfo.getPort());\r\n\t}", "@RequestMapping(\"/admin/profile\")\n\tpublic ModelAndView adminprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.setViewName(\"profile/adminprofile.jsp\");\n\t\treturn mav;\n\t}", "public String gotoeditprofile() throws IOException {\n\t\treturn \"editProfil.xhtml?faces-redirect=true\";\n\t}", "@RequestMapping(value = \"/createUser\", method = RequestMethod.GET)\n\tpublic ModelAndView createUser(ModelMap model) throws CustomException {\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\t\tCollection<EndUser> endUsers = endUserDAOImpl.getList();\n\t\tList<Role> roles = endUserDAOImpl.findAll();\n\t\tmodel.put(\"roles\", roles);\n\n\t\tmodel.put(\"endUsers\", endUsers);\n\t\treturn new ModelAndView(\"createUser\", \"model\", model);\n\t}", "public void createAccount() {\n\t\t// Assigns variables based on user input\n\t\tString username = usernameField.getText();\n\t\tString firstName = firstNameField.getText();\n\t\tString lastName = lastNameField.getText();\n\t\tString address = addressField.getText();\n\t\tString postCode = postcodeField.getText();\n\t\tString phoneNumber = phoneNumberField.getText();\n\t\tlong phoneNumberLong;\n\t\tif (username.isEmpty() || firstName.isEmpty() || lastName.isEmpty() || address.isEmpty() || postCode.isEmpty()\n\t\t\t\t|| phoneNumber.isEmpty()) { // Checks if number is correct format\n\n\t\t\tAlert alert = new Alert(AlertType.ERROR); // Error message\n\t\t\talert.setTitle(\"Error\");\n\n\t\t\talert.setHeaderText(\"Could not create an user\");\n\t\t\talert.setContentText(\"Make sure you fill all fields and press button again\");\n\t\t\talert.showAndWait();\n\n\t\t\treturn;\n\t\t}\n\n\t\telse {\n\t\t\ttry {\n\t\t\t\tphoneNumberLong = Long.parseLong(phoneNumber);\n\t\t\t} catch (Exception e) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"Wrong format of phone number\");\n\t\t\t\talert.setContentText(\"Please enter correct phone number\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(FileReader.exists(username)) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"User with the username \"+ username +\" already exists. \");\n\t\t\t\talert.setContentText(\"Please choose another username\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tString userdata = \"\";\n\t\t\tuserdata += \"\\n Username: \" + username;\n\t\t\tuserdata += \"\\n First name: \" + firstName;\n\t\t\tuserdata += \"\\n Last name: \" + lastName;\n\t\t\tuserdata += \"\\n Address: \" + address;\n\t\t\tuserdata += \"\\n Post code: \" + postCode;\n\t\t\tuserdata += \"\\n Phone number: \" + phoneNumberLong;\n\t\t\t\n\n\t\t\tif(custom) {\n\t\t\t\tavatarIndex = 101;\n\t\t\t\t// Gives users the custom avatar\n\t\t\t\tFile file1 = new File(\"artworkImages/\" + username);\n\t\t\t\tfile1.mkdir();\n\t\t\t\tPath path = Paths.get(\"customAvatars/\" + username + \".png\");\n\t\t\t\tString path1 = \"tmpImg.png\";\n\t\t\t\tFile file = new File(path1);\n\n\t\t\t\ttry {\n\t\t\t\t\tFiles.copy(file.toPath(), path, StandardCopyOption.REPLACE_EXISTING);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tUser user = new User(username, firstName, lastName, address, postCode, phoneNumberLong, avatarIndex);\n\t\t\tFileReader.addUser(user); // Creates user\n\n\t\t\ttry {\n\t\t\t\tWriter.writeUserFile(user); // Adds user to memory\n\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION); // Success message\n\t\t\talert.setTitle(\"Success\");\n\n\t\t\talert.setHeaderText(\"The user has been created\");\n\t\t\talert.setContentText(\"Close this window to return to login screen\");\n\t\t\talert.showAndWait();\n\n\t\t\tcreateAccountButton.getScene().getWindow().hide();\n\t\t}\n\n\t}", "@FXML\n\tpublic void createUser(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString name = txtUserNames.getText();\n\t\tString lastName = txtUserSurnames.getText();\n\t\tString id = txtUserId.getText();\n\t\tString username = txtUserUsername.getText();\n\t\tString password = PfUserPassword.getText();\n\n\t\tif (!name.equals(empty) && !lastName.equals(empty) && !id.equals(empty) && !username.equals(empty)\n\t\t\t\t&& !password.equals(empty)) {\n\t\t\tcreateSystemUser(name, lastName, id, username, password);\n\t\t\ttxtUserNames.setText(\"\");\n\t\t\ttxtUserSurnames.setText(\"\");\n\t\t\ttxtUserId.setText(\"\");\n\t\t\ttxtUserUsername.setText(\"\");\n\t\t\tPfUserPassword.setText(\"\");\n\t\t\t// labelUserMessage.setText(\"The user has been created\");\n\t\t} else if (name.equals(empty) && lastName.equals(empty) && id.equals(empty) && username.equals(empty)\n\t\t\t\t&& password.equals(empty)) {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.setContentText(\"Todos los campos de texto deben ser llenados\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "public void handleNavMenuViewProfile() {\n if (user != null) {\n view.launchProfilePage(user);\n }\n }", "@RequestMapping(value = \"/displayUserForm\", method = RequestMethod.GET)\n public String displayUserForm(Model model) {\n User user = new User();\n model.addAttribute(\"user\", user);\n return \"admin/addUser\";\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n frame.setVisible(false);//when user clicks my profile button the visibility of the frame for the home screen will be set to false \n new MyProfile();//displays the user's profile page\n }", "@Test\n public void testGeneratedProfileFields() {\n Profile p = getProfile(BASIC_PROFILE_PATH);\n assertNotNull(\"Profile uniqueId was null\", p.getUniqueId());\n assertNotNull(\"Profile display name was null\", p.getDisplayName());\n }", "@RequestMapping(value = \"/create\", method = RequestMethod.GET)\n public String create(Model model) {\n model.addAttribute(\"roles\", getAllRoles());\n return \"object/create\";\n }", "@RequestMapping(value = \"/creatord\", method = RequestMethod.GET)\r\n public String creatorDebug(HttpServletRequest request, ModelMap model) throws ServletException, IOException {\r\n UserAuthorities ua = userAuthoritiesProvider.getInstance();\r\n if (ua.userIsAdmin() || ua.userIsSuperUser()) {\r\n return(renderPage(request, model, \"creator\", null, null, null, true));\r\n } else {\r\n throw new SuperUserOnlyException(\"You are not authorised to create maps\");\r\n }\r\n }", "@RequestMapping(\"/createnewuser\")\r\n\tpublic ModelAndView userCreated(@ModelAttribute(\"rg\") Register reg) {\r\n\t\t\r\n\t\tBigInteger num = reg.getMb_no();\r\n\t\tSystem.out.println(\"mbno=\"+num.toString());\r\n\t\t//Doing the entry of New User in Spring_Users table\r\n\t\t\r\n\t\tString username = reg.getEmail_id();\r\n\t\tString password = reg.getPassword();\r\n\t\tSpringUsers su = new SpringUsers();\r\n\t\tsu.setUsername(username);\r\n\t\tsu.setPassword(password);\r\n\t\tsu.setEnabled(1);\r\n\t\tSystem.out.println(\"username=\"+username);\r\n\t\tSystem.out.println(\"password=\"+password);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString r = reg.getUser_type();\r\n\t\t\r\n\t\t//if(r.equals(\"ROLE_INDIVIDUAL\"))\r\n\t\t\t//return new ModelAndView(\"individualhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BROKER\"))\r\n\t//\t\treturn new ModelAndView(\"brokerhomepage\");\r\n\t\t//if(r.equals(\"ROLE_BUILDER\"))\r\n\t\t//\treturn new ModelAndView(\"builderhomepage\");\r\n\t\t\r\n\t//\tint i = susvc.entryOfNewUser(su);\r\n\t\t\r\n\t\tint j = regsvc.registerNewUser(reg);\r\n\t\t \r\n\t\treturn new ModelAndView(\"usercreated\");\r\n\r\n\t}", "@RequestMapping(value = \"/addNewUser.html\", method = RequestMethod.GET)\n\tpublic ModelAndView addNewUser() {\n\n\t\treturn new ModelAndView(\"newUser\", \"form\", new FbUser());\n\n\t}", "public static void createProfile(String userName, String password, String ip, LoginDoctor window) {\r\n\t\tConnectionManager connectServer = null;\r\n\t\ttry {\r\n\t\t\tconnectServer = new ConnectionManager(ip);\r\n\t\t\ttry {\r\n\t\t\t\t// This method tries creating the credentials, if the server doesn't allow this it will throw an exception.\r\n\t\t\t\t// If everything goes fine it will open a window to type name and surname to create new profile.\r\n\t\t\t\t// Then the same login window will be opened to type name and password to enter the profile.\r\n\t\t\t\tconnectServer.createProfile(userName, password);\r\n\t\t\t\tnew UserConfiguration(connectServer);\r\n\t\t\t\t//window.profileCreated();\r\n\t\t\t\twindow.dispose();\r\n\t\t\t} catch(Exception e1) {\r\n\t\t\t\t// If the server response is not valid, the login window will display an error message saying it didn't like what it saw.\r\n\t\t\t\twindow.profileNotValid();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t/*same thing as before, if the server doesn't answer back tell the user the connection failed or something.*/\r\n\t\t\twindow.failedConnection();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@GetMapping(\"/myprofile\")\n\tpublic String customerProfile(Model model, Principal principal) {\n\t\tString name = principal.getName();\n\t\tCustomer customerDetails = customerService.getSingleCustomer(name);\n\t\tmodel.addAttribute(\"profile\", customerDetails);\n\t\treturn \"profile\";\n\t}", "@GetMapping(\"/ringCreator\")\n\tpublic String ringPage(@ModelAttribute(\"ring\") Ring ring, Model model, Principal principal, RedirectAttributes redirectAttributes) {\n \tString username=principal.getName();\n \tif(username==null) {\n \t\tredirectAttributes.addFlashAttribute(\"error\", \"You dont have access to this page!\");\n\t\t\treturn \"redirect:/dashboard\";\t\n \t}\n \tUser admin=userService.findByUsername(username);\t\n \tmodel.addAttribute(\"admin\",admin);\n\t\treturn \"ringPage.jsp\";\n\t}", "public AdminProfile_panel() {\n initComponents();\n \n }", "@GetMapping(\"/register-pro\")\n\tpublic ModelAndView goToRegisterProForm() {\n\t\t\n\t\tModelAndView mav = new ModelAndView(\"register-pro\");\n\t\tUser user = new User();\n\t\tmav.addObject(\"user\", user);\n\n\t\treturn mav;\n\t}", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "@GetMapping(\"/students/new\")\r\n\tpublic String createStudentForm(Model model) {\n\t\tStudent student =new Student();\r\n\t\tmodel.addAttribute(\"student\",student);\r\n\t\treturn \"create_student\";\r\n\t}", "@Override\n\t@RequestMapping(value = \"/showcreatecourse\", method = RequestMethod.GET)\n\tpublic String showCreateCourse(Model model) {\n\n\t\treturn \"createcourse\";\n\t}", "public CreateProfilePane getCreateProfilePane() {\n\t\treturn csp;\n\t}", "@GetMapping(\"/registration\")\n public String registration(Model model) {\n \t\n model.addAttribute(\"userForm\", new User());\n\n return \"registration\";\n }", "public sign_up_page() {\n initComponents();\n }", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == add && ! tfName.getText().equals(\"\")){\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" already exists.\");\n } else {\n FacePamphletProfile profile = new FacePamphletProfile(tfName.getText());\n profileDB.addProfile(profile);\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"New profile with the name \" + name + \" created.\");\n currentProfile = profile;\n }\n }\n if (e.getSource() == delete && ! tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (! profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" does not exist.\");\n } else {\n profileDB.deleteProfile(name);\n canvas.showMessage(\"Profile of \" + name + \" deleted.\");\n currentProfile = null;\n }\n }\n\n if (e.getSource() == lookUp && !tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"Displaying \" + name);\n currentProfile = profileDB.getProfile(name);\n } else {\n canvas.showMessage(\"A profile with the mane \" + name + \" does not exist\");\n currentProfile = null;\n }\n }\n\n if ((e.getSource() == changeStatus || e.getSource() == tfChangeStatus) && ! tfChangeStatus.getText().equals(\"\")){\n if (currentProfile != null){\n String status = tfChangeStatus.getText();\n profileDB.getProfile(currentProfile.getName()).setStatus(status);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Status updated.\");\n } else {\n canvas.showMessage(\"Please select a profile to change status.\");\n }\n }\n\n if ((e.getSource() == changePicture || e.getSource() == tfChangePicture) && ! tfChangePicture.getText().equals(\"\")){\n if (currentProfile != null){\n String fileName = tfChangePicture.getText();\n GImage image;\n try {\n image = new GImage(fileName);\n profileDB.getProfile(currentProfile.getName()).setImage(image);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Picture updated.\");\n } catch (ErrorException ex){\n canvas.showMessage(\"Unable to open image file: \" + fileName);\n }\n } else {\n canvas.showMessage(\"Please select a profile to change picture.\");\n }\n }\n\n if ((e.getSource() == addFriend || e.getSource() == tfAddFriend) && ! tfAddFriend.getText().equals(\"\")) {\n if (currentProfile != null){\n String friendName = tfAddFriend.getText();\n if (profileDB.containsProfile(friendName)){\n if (! currentProfile.toString().contains(friendName)){\n profileDB.getProfile(currentProfile.getName()).addFriend(friendName);\n profileDB.getProfile(friendName).addFriend(currentProfile.getName());\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(friendName + \" added as a friend.\");\n } else {\n canvas.showMessage(currentProfile.getName() + \" already has \" + friendName + \" as a friend.\");\n }\n } else {\n canvas.showMessage(friendName + \" does not exist.\");\n }\n } else {\n canvas.showMessage(\"Please select a profile to add friend.\");\n }\n }\n\t}", "public void saveProfileEditData() {\r\n\r\n }", "public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }", "public void createUser() throws ServletException, IOException {\n\t\tString fullname = request.getParameter(\"fullname\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString email = request.getParameter(\"email\");\n\t\tUsers getUserByEmail = productDao.findUsersByEmail(email);\n\t\t\n\t\tif(getUserByEmail != null) {\n\t\t\tString errorMessage = \"we already have this email in database\";\n\t\t\trequest.setAttribute(\"message\", errorMessage);\n\t\t\t\n\t\t\tString messagePage = \"message.jsp\";\n\t\t\tRequestDispatcher requestDispatcher = request.getRequestDispatcher(messagePage);\n\t\t\trequestDispatcher.forward(request, response);\n\t\t}\n\t\t// create a new instance of users class;\n\t\telse {\n\t\t\tUsers user = new Users();\n\t\t\tuser.setPassword(password);\n\t\t\tuser.setFullName(fullname);\n\t\t\tuser.setEmail(email);\n\t\t\tproductDao.Create(user);\n\t\t\tlistAll(\"the user was created\");\n\t\t}\n\n\t\t\n\t}", "public Profile() {}", "protected JComponent makeTeacherProfilePanel() {\n\t\t\n\t\t//Initiate profilePanel\n\t\tJPanel profilePanel = new JPanel();\n\t\tprofilePanel.setLayout(new BorderLayout());\n\t\tprofilePanel.setSize(teacherPortalWidth, teacherPortalHeight);\n\t\tprofilePanel.setBorder(compound);\n\t\t\n\t\t//Generate profilePanel's left component\n\t\tTitledBorder leftPanelTitle, usernameTitle, firstNameTitle, lastNameTitle, schoolNameTitle, sQ1Title, sQ2Title;\n\t\tleftPanelTitle = BorderFactory.createTitledBorder(\"Profile Information\");\n\t\tusernameTitle = BorderFactory.createTitledBorder(\"Username\");\n\t\tfirstNameTitle = BorderFactory.createTitledBorder(\"First\");\n\t\tlastNameTitle = BorderFactory.createTitledBorder(\"Last\");\n\t\tschoolNameTitle = BorderFactory.createTitledBorder(\"School\");\n\t\tsQ1Title = BorderFactory.createTitledBorder(\"Security Question 1\");\n\t\tsQ2Title = BorderFactory.createTitledBorder(\"Security Question 2\");\n\t\n\t\t//LeftPanel JPanel \n\t\tJPanel leftPanel = new JPanel();\n\t\tleftPanel.setLayout(new GridLayout(6,1,1,1));\n\t\tleftPanel.setBorder(leftPanelTitle);\n\t\t\n\t\t//Username JLabel\n\t\tJLabel usernameL = new JLabel(tUsernameTF.getText());\n\t\tusernameL.setBorder(usernameTitle);\n\t\tusernameL.setFont(new Font(\"Candara\", Font.BOLD, 20));\n\t\tleftPanel.add(usernameL);\n\t\t\n\t\t//FirstName JLabel\n\t\tJLabel firstNameL = new JLabel(tFirstNameTF.getText());\n\t\tfirstNameL.setBorder(firstNameTitle);\n\t\tfirstNameL.setFont(new Font(\"Candara\", Font.BOLD, 20));\n\t\tleftPanel.add(firstNameL);\n\t\t\n\t\t//LastName JLabel\n\t\tJLabel lastNameL = new JLabel(tLastNameTF.getText());\n\t\tlastNameL.setBorder(lastNameTitle);\n\t\tlastNameL.setFont(new Font(\"Candara\", Font.BOLD, 20));\n\t\tleftPanel.add(lastNameL);\n\t\t\n\t\t//SchoolName JLabel\n\t\tJLabel schoolNameL = new JLabel(tSchoolNameTF.getText());\n\t\tschoolNameL.setBorder(schoolNameTitle);\n\t\tschoolNameL.setFont(new Font(\"Candara\", Font.BOLD, 20));\n\t\tleftPanel.add(schoolNameL);\n\n\t\t//Security Question 1 JLabel\n\t\tJLabel sQ1L = new JLabel((String)tSecurityList1.getSelectedItem());\n\t\tsQ1L.setBorder(sQ1Title);\n\t\tsQ1L.setFont(new Font(\"Candara\", Font.BOLD, 20));\n\t\tleftPanel.add(sQ1L);\n\t\t\n\t\t//Security Question 2 JLabel\n\t\tJLabel sQ2L = new JLabel((String)tSecurityList2.getSelectedItem());\n\t\tsQ2L.setBorder(sQ2Title);\n\t\tsQ2L.setFont(new Font(\"Candara\", Font.BOLD, 20));\n\t\tleftPanel.add(sQ2L);\n\t\t\n\t\t//----------------------------------------------------------------------------\n\t\t\n\t\t//Generate profilePanel's right component \n\t\tTitledBorder topTitle, middleTitle, bottomTitle, controlsTitle;\n\t\ttopTitle = BorderFactory.createTitledBorder(\"Profile\");\n\t\tmiddleTitle = BorderFactory.createTitledBorder(\"Class\");\n\t\tbottomTitle = BorderFactory.createTitledBorder(\"Study\");\n\t\tcontrolsTitle = BorderFactory.createTitledBorder(\"Controls\");\n\t\t\n\t\t//Main rightPanel\n\t\tJPanel rightPanel = new JPanel();\n\t\trightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\t\n\t\t//TopRightPanel\n\t\tJPanel topRightPanel = new JPanel();\n\t\ttopRightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\ttopRightPanel.setBorder(topTitle);\n\t\t\n\t\t//EditProfile JButton\n\t\tJButton editProfileB = new JButton(\"Edit Profile\");\n\t\teditProfileB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tupdateTeacherProfile();\n\t }\n\t \t});\n\t\ttopRightPanel.add(editProfileB);\n\t\t\n\t\t//EditSecurity JButton\n\t\tJButton editSecurityB = new JButton(\"Edit Security\");\n\t\teditSecurityB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tupdateTeacherSecurity();\n\t }\n\t \t});\n\t\ttopRightPanel.add(editSecurityB);\n\t\t\n\t\t//Logout JButton\n\t\tJButton logoutB = new JButton(\"Logout\");\n\t\tlogoutB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\ttPortalWindow.dispose();\n\t \t\tloginScreen();\n\t }\n\t \t});\n\t\ttopRightPanel.add(logoutB);\n\t\t\n\t\t//MiddleRightPanel\n\t\tJPanel middleRightPanel = new JPanel();\n\t\tmiddleRightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\tmiddleRightPanel.setBorder(middleTitle);\n\t\t\n\t\t//NewClass JButton\n\t\tJButton newClassB = new JButton(\"New Class\");\n\t\tnewClassB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\taddClassTeacher();\n\t }\n\t \t});\n\t\tmiddleRightPanel.add(newClassB);\n\t\t\n\t\t//EditClass JButton\n\t\tJButton editClassB = new JButton(\"Edit Class\");\n\t\teditClassB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tdeleteClassTeacher();\n\t }\n\t \t});\n\t\tmiddleRightPanel.add(editClassB);\n\t\t\n\t\t//BottomRightPanel\n\t\tJPanel bottomRightPanel = new JPanel();\n\t\tbottomRightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\tbottomRightPanel.setBorder(bottomTitle);\n\t\t\n\t\t//NewStudy JButton\n\t\tJButton newStudyB = new JButton(\"New Study\");\n\t\tnewStudyB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tcreateStudyName();\n\t\t\t\tnewFlashCard = new FlashCard(subjectNameTF.getText());\n\t }\n\t \t});\n\t\tbottomRightPanel.add(newStudyB);\n\t\t\n\t\t//EditStudy JButton\n\t\tJButton editStudyB = new JButton(\"Edit Study\");\n\t\teditStudyB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tdeleteStudyMaterial();\n\t }\n\t \t});\n\t\tbottomRightPanel.add(editStudyB);\n\t\t\n\t\t//Add JPanel's to main JPanel\n\t\trightPanel.setBorder(controlsTitle);\n\t\trightPanel.add(topRightPanel);\n\t\trightPanel.add(middleRightPanel);\n\t\trightPanel.add(bottomRightPanel);\n\t\t\n\t\t//ProfileSplit JSplitPane\n\t\tJSplitPane profileSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,\n leftPanel, rightPanel);\n\t\tprofileSplit.setResizeWeight(0.75);\n\t\tprofileSplit.setDividerLocation(0.75);\n\t\t\n\t\tprofilePanel.add(profileSplit);\n\t\treturn profilePanel;\n\t}", "public ProfileFragment(){}", "@RequestMapping(value = \"/admin/signup\", method = RequestMethod.GET)\n public String adminSignupPage(Model model)\n {\n\t model.addAttribute(\"adminForm\", new UserDto());\n\t return \"admin/admin-signup\";\n }", "private JComponent makeStudentProfilePanel() {\n\t\t\n\t\t//Initiate profilePanel\n\t\tJPanel profilePanel = new JPanel();\n\t\tprofilePanel.setLayout(new GridLayout(1,3,1,1));\n\t\tprofilePanel.setSize(studentPortalWidth, studentPortalHeight);\n\t\tprofilePanel.setBorder(compound);\n\t\t\t\t\n\t\t//Generate profilePanel's left component\n\t\tTitledBorder leftPanelTitle, usernameTitle, firstNameTitle, lastNameTitle, schoolNameTitle, sQ1Title, sQ2Title;\n\t\tleftPanelTitle = BorderFactory.createTitledBorder(\"Profile Information\");\n\t\tusernameTitle = BorderFactory.createTitledBorder(\"Username\");\n\t\tfirstNameTitle = BorderFactory.createTitledBorder(\"First\");\n\t\tlastNameTitle = BorderFactory.createTitledBorder(\"Last\");\n\t\tschoolNameTitle = BorderFactory.createTitledBorder(\"School\");\n\t\tsQ1Title = BorderFactory.createTitledBorder(\"Security Question 1\");\n\t\tsQ2Title = BorderFactory.createTitledBorder(\"Security Question 2\");\n\t\t\n\t\t//Main leftPanel\n\t\tJPanel leftPanel = new JPanel();\n\t\tleftPanel.setLayout(new GridLayout(6,1,1,1));\n\t\tleftPanel.setBorder(leftPanelTitle);\n\t\t\t\t\n\t\t//Username JLabel\n\t\tJLabel username = new JLabel(student.getUsername());\n\t\tusername.setBorder(usernameTitle);\n\t\tusername.setFont(masterFont);\n\t\tleftPanel.add(username);\n\t\t\t\t\n\t\t//FirstName JLabel\n\t\tJLabel firstName = new JLabel(student.getFirstName());\n\t\tfirstName.setBorder(firstNameTitle);\n\t\tfirstName.setFont(masterFont);\n\t\tleftPanel.add(firstName);\n\t\t\t\t\n\t\t//LastName JLabel\n\t\tJLabel lastName = new JLabel(student.getLastName());\n\t\tlastName.setBorder(lastNameTitle);\n\t\tlastName.setFont(masterFont);\n\t\tleftPanel.add(lastName);\n\t\t\t\t\n\t\t//SchoolName JLabel\n\t\tJLabel schoolName = new JLabel(student.getSchoolName());\n\t\tschoolName.setBorder(schoolNameTitle);\n\t\tschoolName.setFont(masterFont);\n\t\tleftPanel.add(schoolName);\n\n\t\t//Security Question 1 JLabel | JTextField\n\t\tJLabel sQ1L = new JLabel((String)sSecurityList1.getSelectedItem());\n\t\tsQ1L.setBorder(sQ1Title);\n\t\tsQ1L.setFont(masterFont);\n\t\tleftPanel.add(sQ1L);\n\t\t\t\t\n\t\t//Security Question 2 JLabel | JTextField\n\t\tJLabel sQ2L = new JLabel((String)sSecurityList2.getSelectedItem());\n\t\tsQ2L.setBorder(sQ2Title);\n\t\tsQ2L.setFont(masterFont);\n\t\tleftPanel.add(sQ2L);\n\t\t\t\t\n\t\t//Generate middle component\n\t\tTitledBorder characterTitle, gameTitle;\n\t\tcharacterTitle = BorderFactory.createTitledBorder(\"Character\");\n\t\tgameTitle = BorderFactory.createTitledBorder(\"Game\");\n\t\t\n\t\t//Main middlePanel JPanel\n\t\tJPanel middlePanel = new JPanel();\n\t\tmiddlePanel.setLayout(new GridLayout(2,1,1,1));\n\t\t\n\t\t//MiddleTopPanel JPanel\n\t\tJPanel middleTopPanel = new JPanel();\n\t\tmiddleTopPanel.setBorder(characterTitle);\n\t\t\n\t\t//Character Image JLabel\n\t\tCharacter character = student.getCurrentCharacter();\n\t\tImageIcon icon = new ImageIcon(\"Resource/\" + character.getCharacterName() + \".png\");\n\t\tImage image = icon.getImage().getScaledInstance(200, 200, Image.SCALE_SMOOTH);\n\t\tcharacterImage = new JLabel(new ImageIcon(image));\n\t\tmiddleTopPanel.add(characterImage);\n\t\tmiddlePanel.add(middleTopPanel, BorderLayout.PAGE_START);\n\t\t\n\t\t//Student: \"Change Character\" JButton\n\t\tJButton changeCharacterB = new JButton(\"Change Character\");\n\t\tchangeCharacterB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tchangeC = true;\n\t \t\tchangeCharacter();\n\t }\n\t \t});\n\t\tmiddleTopPanel.add(changeCharacterB, BorderLayout.PAGE_END);\n\t\t\n\t\t//MiddleBottomPanel JPanel\n\t\tTitledBorder scoreTitle = BorderFactory.createTitledBorder(\"Score\");\n\t\tscoreTitle.setTitleColor(Color.WHITE);\n\t\tJPanel middleBottomPanel = new JPanel();\n\t\tmiddleBottomPanel.setBorder(gameTitle);\n\t\tmiddleBottomPanel.setLayout(new GridLayout(4,1,1,1));\n\n\t\t//ScoreL JLabel\n\t\tJLabel scoreL = new JLabel(Integer.toString(student.getScore()) + \" \");\n\t\tscoreL.setFont(new Font(\"Candara\", Font.PLAIN, 30));\n\t\tscoreL.setBackground(Color.BLUE);\n\t\tscoreL.setOpaque(true);\n\t\tscoreL.setForeground(Color.WHITE);\n\t\tscoreL.setHorizontalAlignment(SwingConstants.RIGHT);\n scoreL.setVerticalAlignment(SwingConstants.CENTER);\n\t\tscoreL.setBorder(scoreTitle);\n\t\tmiddleBottomPanel.add(scoreL);\n\t\t\n\t\t//Student \"New Game\" JButton\n\t\tJButton newGameB = new JButton(\"New Game\");\n\t\tnewGameB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tsPortalWindow.dispose();\n\t \t\trunGame();\n\t }\n\t \t});\n\t\tmiddleBottomPanel.add(newGameB);\n\t\t\n\t\t//Student \"Store\" JButtom\n\t\tJButton storeB = new JButton(\"Store\");\n\t\tstoreB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\t//store();\n\t }\n\t \t});\n\t\tmiddleBottomPanel.add(storeB);\n\t\t\n\t\t//Student \"Logout\" JButton\n\t\tJButton logoutB = new JButton(\"Logout\");\n\t\tlogoutB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \t\tsPortalWindow.dispose();\n\t \t\tloginScreen();\n\t }\n\t \t});\n\t\tmiddleBottomPanel.add(logoutB);\n\t\t\n\t\tmiddlePanel.add(middleBottomPanel, BorderLayout.PAGE_END);\n\t\n\t\t//Generate right component \n\t\tTitledBorder topTitle, middleTitle, bottomTitle, title;\n\t\ttopTitle = BorderFactory.createTitledBorder(\"Profile\");\n\t\tmiddleTitle = BorderFactory.createTitledBorder(\"Class\");\n\t\tbottomTitle = BorderFactory.createTitledBorder(\"Study\");\n\t\ttitle = BorderFactory.createTitledBorder(\"Controls\");\n\t\t\t\t\n\t\t//Main rightPanel\n\t\tJPanel rightPanel = new JPanel();\n\t\trightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\t\t\t\n\t\t//TopRightPanel\n\t\tJPanel topRightPanel = new JPanel();\n\t\ttopRightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\ttopRightPanel.setBorder(topTitle);\n\t\t\t\t\n\t\t//Student \"Edit Profile\" JButton\n\t\tJButton editProfileB = new JButton(\"Edit Profile\");\n\t\teditProfileB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tupdateStudentProfile();\n\t\t\t}\n\t\t});\n\t\ttopRightPanel.add(editProfileB);\n\t\t\n\t\t//Student \"Edit Security\" JButton\n\t\tJButton editSecurityB = new JButton(\"Edit Security\");\n\t\teditSecurityB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tupdateStudentSecurity();\n\t\t\t}\n\t\t});\n\t\ttopRightPanel.add(editSecurityB);\n\t\t\t\t\n\t\t//MiddleRightPanel\n\t\tJPanel middleRightPanel = new JPanel();\n\t\tmiddleRightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\tmiddleRightPanel.setBorder(middleTitle);\n\t\t\t\t\n\t\t//Student: \"Add Class\" JButton\n\t\tJButton addClassB = new JButton(\"Add Class\");\n\t\taddClassB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\taddClassStudent();\n\t\t\t}\n\t\t});\n\t\tmiddleRightPanel.add(addClassB);\n\t\t\t\t\n\t\t//Student: \"Edit Class\" JButton\n\t\tJButton editClassB = new JButton(\"Edit Class\");\n\t\teditClassB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdeleteClassStudent();\n\t\t\t}\n\t\t});\n\t\tmiddleRightPanel.add(editClassB);\n\t\t\t\t\n\t\t//BottomRightPanel\n\t\tJPanel bottomRightPanel = new JPanel();\n\t\tbottomRightPanel.setLayout(new GridLayout(3,1,1,1));\n\t\tbottomRightPanel.setBorder(bottomTitle);\n\t\t\n\t\t//Student: \"New Study\" JButton\n\t\tJButton newStudyB = new JButton(\"New Study\");\n\t\tnewStudyB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcreateStudyName();\n\t\t\t\tnewFlashCard = new FlashCard(subjectNameTF.getText());\n\t\t\t}\n\t\t});\n\t\tbottomRightPanel.add(newStudyB);\n\t\t\t\t\n\t\t//Student: \"Edit Study\" JButton\n\t\tJButton editStudyB = new JButton(\"Edit Study\");\n\t\teditStudyB.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdeleteStudentStudy();\n\t\t\t}\n\t\t});\n\t\tbottomRightPanel.add(editStudyB);\n\t\t\t\t\n\t\t//Add JPanel's to main JPanel\n\t\trightPanel.setBorder(title);\n\t\trightPanel.add(topRightPanel);\n\t\trightPanel.add(middleRightPanel);\n\t\trightPanel.add(bottomRightPanel);\n\t\t\t\t\n\t\tprofilePanel.add(leftPanel);\n\t\tprofilePanel.add(middlePanel);\n\t\tprofilePanel.add(rightPanel);\n\t\treturn profilePanel;\n\t}", "public void openProfile(){\n\t\t\n\t\tclickElement(profile_L, driver);\n\t}", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }" ]
[ "0.7659158", "0.7069179", "0.68992907", "0.68240565", "0.6668788", "0.6655493", "0.6616808", "0.6509348", "0.6499985", "0.6426939", "0.63792795", "0.6372881", "0.6291955", "0.62554353", "0.62492496", "0.6218099", "0.6110896", "0.6106233", "0.61041933", "0.6064063", "0.603121", "0.6000036", "0.59908473", "0.5987981", "0.59735656", "0.5967519", "0.5956549", "0.5930442", "0.5927362", "0.58850586", "0.58772415", "0.5862155", "0.5859369", "0.58381", "0.5815767", "0.58093023", "0.58035445", "0.5792206", "0.57882905", "0.5786626", "0.578442", "0.57726425", "0.57642287", "0.57605124", "0.575124", "0.5750519", "0.57481277", "0.5735193", "0.57175565", "0.5696106", "0.5692038", "0.5691347", "0.56902796", "0.56666577", "0.56664836", "0.56655437", "0.56598926", "0.5657395", "0.56533384", "0.5652943", "0.5651805", "0.5643094", "0.5625841", "0.5625486", "0.56252724", "0.56146055", "0.5604127", "0.5596955", "0.55903256", "0.55827284", "0.5580726", "0.5574386", "0.55677086", "0.5558906", "0.5557534", "0.5555191", "0.5555108", "0.55427295", "0.553847", "0.5534857", "0.55326134", "0.5531996", "0.5531577", "0.5522451", "0.5521279", "0.55126584", "0.55108947", "0.55011827", "0.54964083", "0.54893893", "0.5486616", "0.5484338", "0.54816246", "0.5478208", "0.54723", "0.5471926", "0.54710853", "0.54642016", "0.54630387", "0.5461632" ]
0.5753457
44
Button Click Event for Edit Profile Button
public void mmEditClick(ActionEvent event) throws Exception{ displayEditProfile(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }", "void gotoEditProfile();", "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "public void saveProfileEditData() {\r\n\r\n }", "@Override\n\t\t\t// On click function\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent(view.getContext(),\n\t\t\t\t\t\tEditProfileActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "void gotoEditProfile(String fbId);", "void onEditClicked();", "public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }", "public void editProfile(View v) {\n //Create map of all old info\n final Map tutorInfo = getTutorInfo();\n\n InputMethodManager imm = (InputMethodManager) this.getSystemService(Service.INPUT_METHOD_SERVICE);\n\n //Create animations\n final Animation animTranslate = AnimationUtils.loadAnimation(this, R.anim.translate);\n final Animation revTranslate = AnimationUtils.loadAnimation(this, R.anim.reverse_translate);\n\n //Enable Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.clearFocus();\n bioField.setTextIsSelectable(true);\n bioField.setEnabled(true);\n bioField.setBackgroundResource(android.R.color.black);\n imm.showSoftInput(bioField, 0);\n\n //Hide edit button\n v.startAnimation(animTranslate);\n v.setVisibility(View.GONE);\n\n //Show add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.VISIBLE);\n\n\n //Show save button\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveDialogue(tutorInfo);\n }\n });\n saveButton.startAnimation(revTranslate);\n saveButton.setVisibility(View.VISIBLE);\n\n enableSkillButtons();\n }", "private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "public void clickUpdateProfileLink()\n\t{\n \telementUtils.performElementClick(wbUpdateProfileLink);\n\t}", "@FXML\r\n\tpublic void viewProfile(ActionEvent event)\r\n\t{\r\n\t\t// TODO Autogenerated\r\n\t}", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}", "@Override\n public void onClick(View v) {\n Log.d(\"prof\",\"edit\");\n editDetails();\n// btn_prof_save.setVisibility(View.VISIBLE);\n// btn_prof_edit.setVisibility(View.INVISIBLE);\n }", "public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == statusfield || e.getActionCommand().equals(\"Change Status\")) {\n\t\t\tupdateStatus();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getSource() == picturefield || e.getActionCommand().equals(\"Change Picture\")) {\n\t\t\tupdatePicture();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getSource() == friendfield || e.getActionCommand().equals(\"Add Friend\")) {\n\t\t\taddFriend();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Add\")) {\n\t\t\taddName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Delete\")) {\n\t\t\tdeleteName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Lookup\")) {\n\t\t\tlookUpName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\t\t\n\t}", "public void selectEditProfileOption() {\n\t\ttry {\n\t\t\t//Utility.wait(editProfile);\n\t\t\teditProfile.click();\n\t\t\tLog.addMessage(\"Edit Profile option selected\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to select EditProfile option\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to select EditProfile option\");\n\t\t}\n\t}", "public void clickEditButton(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-tab-panel-noborder') and not(contains(@class,'x-hide-display'))]//button[contains(@class,'icon-ov-edit')]\").click();\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tIntent i = new Intent(NewProfileActivity.this,\n\t\t\t\t\t\tTBDispContacts.class);\n\t\t\t\ti.putExtra(\"Edit\", \"true\");\n\t\t\t\ti.putExtra(\"Details\", \"false\");\n\t\t\t\tstartActivity(i);\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == add && ! tfName.getText().equals(\"\")){\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" already exists.\");\n } else {\n FacePamphletProfile profile = new FacePamphletProfile(tfName.getText());\n profileDB.addProfile(profile);\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"New profile with the name \" + name + \" created.\");\n currentProfile = profile;\n }\n }\n if (e.getSource() == delete && ! tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (! profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" does not exist.\");\n } else {\n profileDB.deleteProfile(name);\n canvas.showMessage(\"Profile of \" + name + \" deleted.\");\n currentProfile = null;\n }\n }\n\n if (e.getSource() == lookUp && !tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"Displaying \" + name);\n currentProfile = profileDB.getProfile(name);\n } else {\n canvas.showMessage(\"A profile with the mane \" + name + \" does not exist\");\n currentProfile = null;\n }\n }\n\n if ((e.getSource() == changeStatus || e.getSource() == tfChangeStatus) && ! tfChangeStatus.getText().equals(\"\")){\n if (currentProfile != null){\n String status = tfChangeStatus.getText();\n profileDB.getProfile(currentProfile.getName()).setStatus(status);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Status updated.\");\n } else {\n canvas.showMessage(\"Please select a profile to change status.\");\n }\n }\n\n if ((e.getSource() == changePicture || e.getSource() == tfChangePicture) && ! tfChangePicture.getText().equals(\"\")){\n if (currentProfile != null){\n String fileName = tfChangePicture.getText();\n GImage image;\n try {\n image = new GImage(fileName);\n profileDB.getProfile(currentProfile.getName()).setImage(image);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Picture updated.\");\n } catch (ErrorException ex){\n canvas.showMessage(\"Unable to open image file: \" + fileName);\n }\n } else {\n canvas.showMessage(\"Please select a profile to change picture.\");\n }\n }\n\n if ((e.getSource() == addFriend || e.getSource() == tfAddFriend) && ! tfAddFriend.getText().equals(\"\")) {\n if (currentProfile != null){\n String friendName = tfAddFriend.getText();\n if (profileDB.containsProfile(friendName)){\n if (! currentProfile.toString().contains(friendName)){\n profileDB.getProfile(currentProfile.getName()).addFriend(friendName);\n profileDB.getProfile(friendName).addFriend(currentProfile.getName());\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(friendName + \" added as a friend.\");\n } else {\n canvas.showMessage(currentProfile.getName() + \" already has \" + friendName + \" as a friend.\");\n }\n } else {\n canvas.showMessage(friendName + \" does not exist.\");\n }\n } else {\n canvas.showMessage(\"Please select a profile to add friend.\");\n }\n }\n\t}", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "private void profileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getUserProfileController();\n }", "public ViewResumePage clickonedit() throws Exception{\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(edit);\r\n\t\t\t\tflag = element.isDisplayed() && element.isEnabled();\r\n\t\t\t\tAssert.assertTrue(flag, \"Edit button is not displayed\");\r\n\t\t\t\telement.click();\r\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Edit Button NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\treturn new ViewResumePage(driver);\r\n\t\t\r\n\t}", "public void clickEditLink() {\r\n\t\tbtn_EditLink.click();\r\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t case R.id.edit_profile:\n\t editProfileAlertDialog();\n\t return true;\n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}", "public void clickUserProfile(){\r\n driver.findElement(userTab).click();\r\n driver.findElement(profileBtn).click();\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\tString cmd = e.getActionCommand();\n\t\tString inputName = nameField.getText();\n\t\t\n\t\tswitch(cmd) {\n\t\tcase \"Add\":\n\t\t\taddProfile(inputName);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Delete\":\n\t\t\tdeleteProfile(inputName);\n\t\t\tbreak;\n\t\t\t \n\t\tcase \"Lookup\":\n\t\t\tlookUp(inputName);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Status\":\n\t\t\tupdateStatus();\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Picture\":\n\t\t\tupdatePicture();\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Friend\":\n\t\t\taddFriend();\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public void onPressEdit() {\r\n Intent intent = new Intent(this, CreateEventActivity.class);\r\n intent.putExtra(CreateEventActivity.EXTRA_EDIT_EVENT_UID, event.uid);\r\n startActivity(intent);\r\n }", "public void editProfile(View view){\n Intent intent = new Intent(this, EditProfileActivity.class);\n intent.putExtra(\"MY_NAME\", nameStr);\n intent.putExtra(\"MY_DESCRIPTION\", descriptionStr);\n intent.putExtra(\"MY_LOCATION\", locationStr);\n startActivityForResult(intent, 1);\n }", "public void editBtnOnclick()\r\n\t{\r\n\t\tif(cardSet.getCards().size() != 0)\r\n\t\t\tMainRunner.getSceneSelector().switchToCardEditor();\r\n\t}", "public void editButtonClicked() {\n setButtonsDisabled(false, true, true);\n setAllFieldsAndSliderDisabled(false);\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tif (!edited) {\n\t\t\t\t\t\topenEdit();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcloseEdit();\n\t\t\t\t\t\tif (newly) {\n\t\t\t\t\t\t\tnewly = false;\n\t\t\t\t\t\t\tvo = getUserVO();\n\t\t\t\t\t\t\tUserController.add(vo);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUserController.modify(vo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_edit) {\n Intent intent = new Intent(this, editProfile.class);\n startActivity(intent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void clickOnEditButton() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-btn.ant-btn-primary.ant-btn-circle\"), SHORTWAIT);\r\n\t}", "@FXML\n private void editSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"Edit DonorReceiver\");\n } else {\n EditPaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.EDIT);\n }\n }", "public String gotoeditprofile() throws IOException {\n\t\treturn \"editProfil.xhtml?faces-redirect=true\";\n\t}", "@Override\n public void onClick(View view) {\n Intent i = new Intent(view.getContext(), EditProfil.class);\n i.putExtra(\"fullName\", nameTextView.getText().toString());\n i.putExtra(\"email\", emailTextView.getText().toString());\n i.putExtra(\"phone\",phoneTextView.getText().toString());\n startActivity(i);\n }", "@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}", "public void editProfile() {\n dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.edit_profile);\n\n editUsername = dialog.findViewById(R.id.tv_uname);\n TextView editEmail = dialog.findViewById(R.id.tv_address);\n editImage = dialog.findViewById(R.id.imgUser);\n\n editUsername.setText(user.getUserID());\n editEmail.setText(user.getEmail());\n editEmail.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Email cannot be changed.\", Toast.LENGTH_SHORT).show();\n }\n });\n decodeImage(user.getProfilePic(), editImage);\n editImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3);\n }\n });\n\n TextView save = dialog.findViewById(R.id.save_edit);\n save.setOnClickListener(new View.OnClickListener() { // save changes\n @Override\n public void onClick(View v) {\n String username = editUsername.getText().toString();\n if(username.equals(\"\")) {\n Toast.makeText(getContext(), \"Username cannot be null\", Toast.LENGTH_SHORT).show();\n return;\n } else if (!checkUsername(username)) {\n Toast.makeText(getContext(), \"Username already exists\", Toast.LENGTH_SHORT).show();\n return;\n }\n user.setUserID(username);\n if(profilePicChanged) {\n user.setProfilePic(profilePic);\n profilePic = null;\n profilePicChanged = false;\n }\n docRef.set(user);\n dialog.dismiss();\n loadDataFromDB();\n }\n });\n\n TextView cancel = dialog.findViewById(R.id.cancel_edit);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss(); // cancel changes\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n }", "@Override\n public void onProfileClick(int position) {\n Log.d(TAG, \"onProfileClick: \" + position);\n Profile profile = mList.get(position);\n\n Intent intent = new Intent(CatalogActivity.this, EditorActivity.class);\n intent.putExtra(EDITOR_ACTIVITY_VALUE_EXTRA, profile.getProfileValues());\n startActivityForResult(intent, EDITOR_ACTIVITY_UPDATE_REQUEST_CODE);\n //overridePendingTransition( R.anim.left_to_right,R.anim.right_to_left);\n }", "public void editDogButtonClicked() {\r\n if (areFieldsNotBlank()) {\r\n viewModel.editDog();\r\n viewHandler.openView(\"home\");\r\n dogNameField.setStyle(null);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n startActivity(new Intent(EditProfile.this, ProfilePage.class));\n onPause();\n return super.onOptionsItemSelected(item);\n }", "public void Admin_Configuration_EmailSubscriptions_Editbtn()\n\t{\n\t\tAdmin_Configuration_EmailSubscriptions_Editbtn.click();\n\t}", "public void editButtonClicked(){\n String first = this.firstNameInputField.getText();\n String last = this.lastNameInputField.getText();\n String email = this.emailInputField.getText();\n String dep = \"\";\n String role=\"\";\n if(this.departmentDropdown.getSelectionModel().getSelectedItem() == null){\n dep= this.departmentDropdown.promptTextProperty().get();\n //this means that the user did not change the dropdown\n \n }else{\n dep = this.departmentDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.roleDropdown.getSelectionModel().getSelectedItem()== null){\n role = this.roleDropdown.promptTextProperty().get();\n }else{\n role = this.roleDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.isDefaultValue(first) && \n this.isDefaultValue(last) && \n this.isDefaultValue(email) && \n this.isDefaultValue(role) && \n this.isDefaultValue(dep)){\n //this is where we alert the user that no need for update is needed\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setContentText(\"User information has not changed...no update performed\");\n alert.showAndWait();\n \n }else{\n \n if(this.userNameLabel.getText().equals(\"User\")){\n System.out.println(\"This is empty\");\n }else{\n //create a new instance of the connection class\n this.dbConnection = new Connectivity();\n //this is where we do database operations\n if(this.dbConnection.ConnectDB()){\n //we connected to the database \n \n boolean update= this.dbConnection.updateUser(first, last, email, dep,role , this.userNameLabel.getText());\n \n \n }else{\n System.out.println(\"Could not connect to the database\");\n }\n \n }\n }\n }", "public void onClick(View view) {\n Log.d(\"Edit\",\"EDITED\");\n }", "@OnClick(R.id.setUserProfileEdits)\n public void onConfirmEditsClick() {\n if (UserDataProvider.getInstance().getCurrentUserType().equals(\"Volunteer\")){\n addSkills();\n addCauses();\n }\n updateUserData();\n // get intent information from previous activity\n\n// Intent intent = new Intent(getApplicationContext(), LandingActivity.class);\n\n\n// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n finish();\n// startActivity(intent);\n }", "private void setUpProfileButton() {\n profileButton = (ImageButton) findViewById(R.id.profile_button);\n profileButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startProfilePageActivity();\n }\n });\n }", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.btn_save:\n\t\ttxtt1 = (etxt1.getText().toString());\n\t\ttxtt2 = (etxt2.getText().toString());\n\t\ttxtt3 = (etxt3.getText().toString());\n\t\ttxtt4 = (etxt4.getText().toString());\n\t\ttxtt5 = (etxt5.getText().toString());\n\t\ttxtt6 = (etxt6.getText().toString());\n\t\ttxtt7 = (etxt7.getText().toString());\n\t\ttxtt8 = (etxt8.getText().toString());\n\t\tIntent R = new Intent(getApplicationContext(),ProfileActivity.class);\n\t\tR.putExtra(\"txtt1\", txtt1);\n\t\tR.putExtra(\"txtt2\", txtt2);\n\t\tR.putExtra(\"txtt3\", txtt3);\n\t\tR.putExtra(\"txtt4\", txtt4);\n\t\tR.putExtra(\"txtt5\", txtt5);\n\t\tR.putExtra(\"txtt6\", txtt6);\n\t\tR.putExtra(\"txtt7\", txtt7);\n\t\tR.putExtra(\"txtt8\", txtt8);\n\t\tstartActivity(R);\n\t\tbreak;\n\t\tdefault:\n\t\tbreak;\n\t\t}\n\t}", "public EditTeamPage pressEditButton() {\n controls.getEditButton().click();\n return new EditTeamPage();\n }", "public void setEditButtonPresentListener(EditButtonPresentListener listener);", "@Override\n public void edit(User user) {\n }", "public void OnSetAvatarButton(View view){\n Intent intent = new Intent(getApplicationContext(),ProfileActivity.class);\n startActivityForResult(intent,0);\n }", "private void profileButton1ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "@FXML\n private void handleEditPerson() {\n Shops selectedShops = personTable.getSelectionModel().getSelectedItem();\n if (selectedShops != null) {\n boolean okClicked = mainApp.showPersonEditDialog(selectedShops);\n if (okClicked) {\n showPersonDetails(selectedShops);\n }\n\n } else {\n // Nothing selected.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"No Selection\");\n alert.setHeaderText(\"No Shops Selected\");\n alert.setContentText(\"Please select a person in the table.\");\n \n alert.showAndWait();\n }\n }", "private void profileButton2ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 1).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "private void hitEditProfileApi() {\n appUtils.showProgressDialog(getActivity(), false);\n HashMap<String, String> params = new HashMap<>();\n params.put(ApiKeys.NAME, etFirstName.getText().toString().trim());\n params.put(ApiKeys.PHONE_NO, etPhoneNo.getText().toString().trim());\n params.put(ApiKeys.ADDRESS, etAdress.getText().toString().trim());\n params.put(ApiKeys.POSTAL_CODE, etPostal.getText().toString().trim());\n\n if (countryId != null) {\n params.put(ApiKeys.COUNTRY, countryId);\n }\n if (stateId != null) {\n params.put(ApiKeys.STATE, stateId);\n }\n if (cityId != null) {\n params.put(ApiKeys.CITY, cityId);\n }\n\n ApiInterface service = RestApi.createService(ApiInterface.class);\n Call<ResponseBody> call = service.editProfile(AppSharedPrefs.getInstance(getActivity()).\n getString(AppSharedPrefs.PREF_KEY.ACCESS_TOKEN, \"\"), appUtils.encryptData(params));\n ApiCall.getInstance().hitService(getActivity(), call, new NetworkListener() {\n @Override\n public void onSuccess(int responseCode, String response) {\n try {\n JSONObject mainObject = new JSONObject(response);\n if (mainObject.getInt(ApiKeys.CODE) == 200) {\n JSONObject dataObject = mainObject.getJSONObject(\"DATA\");\n changeEditMode(false);\n isEditModeOn = false;\n ((EditMyAccountActivity) getActivity()).setEditButtonLabel(getString(R.string.edit));\n\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_NAME, dataObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_MOBILE, dataObject.getString(ApiKeys.MOBILE_NUMBER));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ADDRESS, dataObject.getString(ApiKeys.ADDRESS));\n JSONObject countryObject = dataObject.getJSONObject(ApiKeys.COUNTRY_ID);\n JSONObject stateObject = dataObject.getJSONObject(ApiKeys.STATE_ID);\n JSONObject cityObject = dataObject.getJSONObject(ApiKeys.CITY_ID);\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_NAME, countryObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_NAME, stateObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_NAME, cityObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ISO_CODE, countryObject.getString(ApiKeys.ISO_CODE));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_ID, countryObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_ID, stateObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_ID, cityObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.POSTAL_CODE, dataObject.optString(ApiKeys.POSTAL_CODE));\n\n } else if (mainObject.getInt(ApiKeys.CODE) == ApiKeys.UNAUTHORISED_CODE) {\n appUtils.logoutFromApp(getActivity(), mainObject.optString(ApiKeys.MESSAGE));\n } else {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), mainObject.optString(ApiKeys.MESSAGE));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onSuccessErrorBody(String response) {\n\n }\n\n @Override\n public void onFailure() {\n\n }\n });\n\n }", "@Override\n public void onClick(View view) {\n\n\n\n userDetail.setFname(fname.getText().toString());\n userDetail.setLname(lname.getText().toString());\n userDetail.setAge(Integer.parseInt(age.getText().toString()));\n userDetail.setWeight(Double.valueOf(weight.getText().toString()));\n userDetail.setAddress(address.getText().toString());\n\n try {\n new EditUserProfile(editUserProfileURL,getActivity(),userDetail).execute();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Toast.makeText(getActivity(), \"Saved Profile Successfully\",\n Toast.LENGTH_SHORT).show();\n getFragmentManager().popBackStack();\n\n }", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "@FXML\r\n\tprivate void editEmployee(ActionEvent event) {\r\n\t\tbtEditar.setDisable(true);\r\n\t\tbtGuardar.setDisable(false);\r\n\t\tconmuteFields();\r\n\t}", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_profile);\n toolbar_profile = findViewById(R.id.pro_toolbar);\n setTitle(\"My Profile\");\n setSupportActionBar(toolbar_profile);\n\n proname = findViewById(R.id.profile_name);\n profoi = findViewById(R.id.profile_foi);\n proorg = findViewById(R.id.profile_orga);\n\n currentId=String.valueOf(Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID));\n //load user information\n userInfo();\n editProfile = findViewById(R.id.editprofile);\n editProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(Profile.this,Profile_Edit.class));\n }\n });\n }", "@FXML\n\tpublic void editClicked(ActionEvent e) {\n\t\tMain.getInstance().navigateToDialog(\n\t\t\t\tConstants.EditableCourseDataViewPath, course);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_edit:\n Intent intent = new Intent(getApplicationContext(), ProfileEditActivity.class);\n intent.putExtra(\"userName\", userName);\n startActivity(intent);\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 }", "@Override\n public void onClick(View view) {\n updatePerson();\n }", "public void clickOnProfile() {\n\t\telement(\"link_profile\").click();\n\t\tlogMessage(\"User clicks on Profile on left navigation bar\");\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tupdateUserDetails();\n\t\t\t\t}", "@FXML\n public void StudentSaveButtonPressed(ActionEvent e) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {\n AlertHandler ah = new AlertHandler();\n if (editMode){\n System.out.println(\"edit mode on: choosing student update\");\n if(txfFirstName.isDisabled()){\n ah.getError(\"Please edit student information\", \"Enable Student editing fields for saving\", \"Please edit before saving\");\n System.out.println(\"please edit data before saving to database\");\n } else {\n System.out.println(\"requesting confirmation for editing data to database\");\n confirmStudentUpdate();\n }\n }\n else {\n System.out.println(\"Edit mode off: choosing student insert\");\n confirmStudentInsert();\n }\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getContext(), ProfileActivity.class);\n startActivity(intent);\n\n }", "@Override\n public void onClick(View v) {\n\t \tIntent myIntent = new Intent(MainActivity.this, Profile.class);\n\t \t//myIntent.putExtra(\"key\", value); //Optional parameters\n\t \tMainActivity.this.startActivity(myIntent);\n }", "private void edit() {\n\n\t}", "void onEditFragmentInteraction(Student student);", "private void editUserCard() {\n getUserCard();\n }", "@Then(\"user clicks on edit consignment\")\r\n\tpublic void user_clicks_on_edit_consignment() {\n\t\tWebElement element = Browser.session.findElement(By.xpath(\"//*[@id='consignments-rows']//button[1]\"));\r\n\t\telement.click();\r\n\t\telement = Browser.session.findElement(By.xpath(\"//a[text()='Edit consignment info']\"));\r\n\t\telement.click();\r\n\t}", "@Override\n public void onCancel() {\n Log.d(TAG, \"User cancelled Edit Profile.\");\n Toast.makeText(getBaseContext(), getString(R.string.editFailure), Toast.LENGTH_SHORT)\n .show();\n }", "public void editProfile(String username, String fname, String lname, String email, String phoneno, String newpw) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\"); \n\t callStmt = con.prepareCall(\" {call team5.customer_updateProfile_Proc(?,?,?,?,?,?,?,?,?)}\");\n\t callStmt.setString(1,phoneno);\n\t callStmt.setString(2,email);\n\t callStmt.setString(3,fname);\n\t callStmt.setString(4,lname);\n\t callStmt.setString(5,\"Y\");\n\t callStmt.setString(6,\"Y\");\n\t callStmt.setString(7,username);\n\t callStmt.setString(8,newpw);\n\t callStmt.setInt(9,this.id);\n\t callStmt.execute();\n\t \n\t callStmt.close();\n\t }", "private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }", "@FXML\n void setBtnEditOnClick() {\n isEdit = true;\n isAdd = false;\n isDelete = false;\n }", "public void clickEdit(int editBtnIndex)\n\t{\n\t\t\n\t\tList<WebElement> editBtns=driver.findElements(By.xpath(\"//img[@title='Edit' and @src='/cmscockpit/cockpit/images/icon_func_edit.png']\"));\n\t\tif(editBtns!=null&&editBtns.size()>0)\n\t\t{\n\t\t\teditBtns.get(editBtnIndex).click();\n\t\t}\n\t}", "public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n SharedPreferences.Editor p_editor = myPrefs.edit();\n User viewProf = profiles.get(position);\n p_editor.putString(\"view_email\", viewProf.getUsername());\n p_editor.commit();\n main.viewProfile(position);\n }", "public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }", "private void profileButton3ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 2).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "public void DoEdit() {\n \n int Row[] = tb_User.getSelectedRows();\n if (Row.length > 1) {\n JOptionPane.showMessageDialog(null, \"You can choose only one user edit at same time!\");\n return;\n }\n if (tb_User.getSelectedRow() >= 0) {\n EditUser eu = new EditUser(this);\n eu.setVisible(true);\n\n } else {\n JOptionPane.showMessageDialog(null, \"You have not choose any User to edit\");\n }\n }", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "protected void enterEditMode(){\n saveButton.setVisibility(View.VISIBLE);\n //when editMode is active, allow user to input in editTexts\n //By default have the editTexts not be editable by user\n editName.setEnabled(true);\n editEmail.setEnabled(true);\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n userReference = FirebaseDatabase.getInstance().getReference(\"Users\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid());\n\n user = FirebaseAuth.getInstance().getCurrentUser();\n\n user.updateEmail(String.valueOf(editEmail.getText()))\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n userReference.child(\"name\").setValue(editName.getText().toString());\n userReference.child(\"email\").setValue(editEmail.getText().toString());\n final String TAG = \"EmailUpdate\";\n Log.d(TAG, \"User email address updated.\");\n Toast.makeText(getActivity().getApplicationContext(), \"Saved\", Toast.LENGTH_SHORT).show();\n }\n else {\n FirebaseAuthException e = (FirebaseAuthException)task.getException();\n Toast.makeText(getActivity().getApplicationContext(), \"Re-login to edit your profile!\", Toast.LENGTH_LONG).show();\n goToLoginActivity();\n }\n }\n });\n exitEditMode();\n\n }\n });\n }", "public void setEditButton(Button editButton) {\n\t\tthis.editButton = editButton;\n\t}", "@RequestMapping(value = \"/editAdminProfile\", method = RequestMethod.GET)\n\tpublic ModelAndView editAdminProfile(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser userProfile = endUserDAOImpl.findId(id);\n\n\t\tif (userProfile.getImageName() != null) {\n\t\t\tString type = ImageService.getImageType(userProfile.getImageName());\n\n\t\t\tString url = \"data:image/\" + type + \";base64,\" + Base64.encodeBase64String(userProfile.getImage());\n\t\t\tuserProfile.setImageName(url);\n\n\t\t\tendUserForm.setImageName(url);\n\t\t} else {\n\t\t\tendUserForm.setImageName(\"\");\n\t\t}\n\n\t\tendUserForm.setId(userProfile.getId());\n\t\tendUserForm.setDisplayName(userProfile.getDisplayName());\n\t\tendUserForm.setUserName(userProfile.getUserName());\n\t\tendUserForm.setAltContactNo(userProfile.getAltContactNo());\n\t\tendUserForm.setAltEmail(userProfile.getAltEmail());\n\t\tendUserForm.setContactNo(userProfile.getContactNo());\n\t\tendUserForm.setEmail(userProfile.getEmail());\n\n\t\tendUserForm.setPassword(userProfile.getPassword());\n\t\tendUserForm.setTransactionId(userProfile.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editAdminProfile\", \"model\", model);\n\n\t}", "private void profileButton5ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 4).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "public void editUser(User user) {\n\t\t\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tLog.e(\"edit pressed\", \"edit pressed\");\n\t\t\t\t\teditflag = !editflag;\n\t\t\t\t\tsetFieldEditFlag(editflag);\n\t\t\t\t\t//\tpicview1.setEnabled(true);\n\n\t\t\t\t}", "public void onClick(View view) {\n Log.d(\"Edit1\",\"EDITED1\");\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n updateProfile(interestsChanged, moreChanged, pictureChanged);\n\n }", "private void buttonAddFriends() {\n friendsButton.setText(\"Add Friends\");\n friendsButton.setOnClickListener(view -> launchProfilesActivity());\n profileOptions.setVisibility(View.VISIBLE);\n friendsView.setOnClickListener(view -> onFriendsClicked());\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "@Override\n public void onDialogPositiveClick(ProfileEditDialogFragment dialog) {\n String value = dialog.getValue();\n \n switch (this.field){\n case FIRST: updateFirst(value);\n break;\n case LAST: updateLast(value);\n break;\n case EMAIL: updateEmail(value);\n break;\n case STREET: updateStreet(value);\n break;\n case CITY: updateCity(value);\n break;\n case STATE: updateState(value);\n break;\n case ZIP: updateZip(value);\n break;\n case PHONE: updatePhone(value);\n break;\n default: break;\n }\n }" ]
[ "0.79937446", "0.75828886", "0.7523918", "0.750002", "0.7464146", "0.72323287", "0.68849653", "0.6869256", "0.6788999", "0.6747457", "0.6682173", "0.66460633", "0.6600574", "0.6543046", "0.65113556", "0.6468568", "0.6460372", "0.6452631", "0.6438042", "0.64376545", "0.64302874", "0.64302534", "0.64124084", "0.6406122", "0.6403156", "0.6394218", "0.6392381", "0.63837796", "0.63718975", "0.63519716", "0.634627", "0.63151777", "0.63076544", "0.630195", "0.62865806", "0.62708557", "0.6264254", "0.62434363", "0.6241755", "0.62353176", "0.6186776", "0.6181874", "0.61750716", "0.61516654", "0.61452293", "0.614255", "0.6129672", "0.6108978", "0.61022425", "0.6100763", "0.6100386", "0.6075666", "0.6060904", "0.6057108", "0.60443485", "0.60335153", "0.6032323", "0.6014722", "0.601417", "0.60140437", "0.5999849", "0.59923786", "0.59888214", "0.5972685", "0.59622294", "0.59597707", "0.5953338", "0.5951165", "0.5947387", "0.5946286", "0.5943842", "0.5923653", "0.59231895", "0.5917144", "0.59004796", "0.5899999", "0.5892887", "0.5888587", "0.58884466", "0.5880316", "0.58673453", "0.58650476", "0.5862365", "0.58603376", "0.5858958", "0.58576995", "0.58538836", "0.5852827", "0.5851366", "0.58453906", "0.5843949", "0.5842495", "0.58420366", "0.5840951", "0.5840206", "0.5794391", "0.5789968", "0.5786431", "0.5786431", "0.5783926" ]
0.79157114
1
Displays Edit Profile Page
public void displayEditProfile() throws Exception{ System.out.println("Username And Login Match"); currentStage.hide(); Stage primaryStage = new Stage(); System.out.println("Step 1"); Parent root = FXMLLoader.load(getClass().getResource("view/EditProfile.fxml")); System.out.println("step 2"); primaryStage.setTitle("Edit Profile"); System.out.println("Step 3"); primaryStage.setScene(new Scene(root, 600, 900)); primaryStage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}", "public String gotoeditprofile() throws IOException {\n\t\treturn \"editProfil.xhtml?faces-redirect=true\";\n\t}", "void gotoEditProfile();", "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "@RequestMapping(value = \"/editAdminProfile\", method = RequestMethod.GET)\n\tpublic ModelAndView editAdminProfile(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser userProfile = endUserDAOImpl.findId(id);\n\n\t\tif (userProfile.getImageName() != null) {\n\t\t\tString type = ImageService.getImageType(userProfile.getImageName());\n\n\t\t\tString url = \"data:image/\" + type + \";base64,\" + Base64.encodeBase64String(userProfile.getImage());\n\t\t\tuserProfile.setImageName(url);\n\n\t\t\tendUserForm.setImageName(url);\n\t\t} else {\n\t\t\tendUserForm.setImageName(\"\");\n\t\t}\n\n\t\tendUserForm.setId(userProfile.getId());\n\t\tendUserForm.setDisplayName(userProfile.getDisplayName());\n\t\tendUserForm.setUserName(userProfile.getUserName());\n\t\tendUserForm.setAltContactNo(userProfile.getAltContactNo());\n\t\tendUserForm.setAltEmail(userProfile.getAltEmail());\n\t\tendUserForm.setContactNo(userProfile.getContactNo());\n\t\tendUserForm.setEmail(userProfile.getEmail());\n\n\t\tendUserForm.setPassword(userProfile.getPassword());\n\t\tendUserForm.setTransactionId(userProfile.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editAdminProfile\", \"model\", model);\n\n\t}", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "void gotoEditProfile(String fbId);", "@RequestMapping(value = { \"/edit-{loginID}-user\" }, method = RequestMethod.GET)\r\n public String edituser(@PathVariable String loginID, ModelMap model) {\r\n\r\n User user = service.findUserByLoginID(loginID);\r\n model.addAttribute(\"user\", user);\r\n model.addAttribute(\"edit\", true);\r\n return \"registration\";\r\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "public static void editProfile(String form, String ly) {\n\t\tboolean layout;\n\t\tif(ly == null || ly.equalsIgnoreCase(\"yes\"))\n\t\t\tlayout = true;\n\t\telse\n\t\t\tlayout = false;\n\t\t\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\t//set password into session\n\t\tsession.put(\"edit_password\", user.password);\n\t\t\n\t\tif(form == null)\n\t\t\tform = \"account\";\n\t\t\n\t\trender(user, userprofile, layout, form);\n\t}", "private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }", "public void saveProfileEditData() {\r\n\r\n }", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }", "public User editProfile(String firstName, String lastName, String username, String password, char type, char status)\n {\n return this.userCtrl.editProfile(username, password, firstName, lastName, type, status);\n }", "@RequestMapping(value = { \"/edit-user-{loginId}\" }, method = RequestMethod.GET)\n\tpublic String editUser(@PathVariable String loginId, ModelMap model) {\n\t\tUser user = userService.findByLoginId(loginId);\n\t\tmodel.addAttribute(\"user\", user);\n\t\tmodel.addAttribute(\"edit\", true);\n\t\treturn \"registration\";\n\t}", "@RequestMapping(\"edit\")\n\tpublic String edit(ModelMap model, HttpSession httpSession) {\n\t\tCustomer user = (Customer) httpSession.getAttribute(\"user\");\n\t\tmodel.addAttribute(\"user\", user);\n\t\treturn \"user/account/edit\";\n\t}", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "@Override\n public void edit(User user) {\n }", "@GetMapping(\"/profile/{id}/edit\")\n public String edit(Model model, @PathVariable long id, Model viewModel) {\n int unreadNotifications = unreadNotificationsCount(notiDao, id);\n\n model.addAttribute(\"alertCount\", unreadNotifications); // shows count for unread notifications\n viewModel.addAttribute(\"users\", userDao.getOne(id));\n model.addAttribute(\"users\", userDao.getOne(id));\n model.addAttribute(\"smoke\", smokeDao.getOne(id));\n\n return \"editprofile\";\n }", "@RequestMapping(\"/editUsr\")\r\n\tpublic ModelAndView editUsr(@ModelAttribute(\"UserEditForm\") final UserEditForm form) {\r\n\t\tModelAndView mav = new ModelAndView(\"users/edit\");\r\n\t\t// GET ACTUAL SESSION USER\r\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n\t\tUser user = us.findUserSessionByUsername(principal);\r\n\t\tmav.addObject(\"user\", user);\r\n\t\treturn mav;\r\n\t}", "@Override\n\tpublic void showProfile() {\n\t\t\n\t}", "public void editProfile(View view){\n Intent intent = new Intent(this, EditProfileActivity.class);\n intent.putExtra(\"MY_NAME\", nameStr);\n intent.putExtra(\"MY_DESCRIPTION\", descriptionStr);\n intent.putExtra(\"MY_LOCATION\", locationStr);\n startActivityForResult(intent, 1);\n }", "public void editProfile(View v) {\n //Create map of all old info\n final Map tutorInfo = getTutorInfo();\n\n InputMethodManager imm = (InputMethodManager) this.getSystemService(Service.INPUT_METHOD_SERVICE);\n\n //Create animations\n final Animation animTranslate = AnimationUtils.loadAnimation(this, R.anim.translate);\n final Animation revTranslate = AnimationUtils.loadAnimation(this, R.anim.reverse_translate);\n\n //Enable Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.clearFocus();\n bioField.setTextIsSelectable(true);\n bioField.setEnabled(true);\n bioField.setBackgroundResource(android.R.color.black);\n imm.showSoftInput(bioField, 0);\n\n //Hide edit button\n v.startAnimation(animTranslate);\n v.setVisibility(View.GONE);\n\n //Show add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.VISIBLE);\n\n\n //Show save button\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveDialogue(tutorInfo);\n }\n });\n saveButton.startAnimation(revTranslate);\n saveButton.setVisibility(View.VISIBLE);\n\n enableSkillButtons();\n }", "@GetMapping(\"/updateUser/{id}\")\n\t public String editUser(@PathVariable(\"id\") Long userId, Model model) {\n\t\t model.addAttribute(\"userId\", userId);\n\t\t return \"updatePage.jsp\";\n\t }", "public String fillEditPage() {\n\t\t\n\t\ttry{\n\t\t\t// Putting attribute of playlist inside the page to view it \n\t\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"playlist\", service.viewPlaylist());\n\t\t\t\n\t\t\t// Send user to EditPlaylistPage\n\t\t\treturn \"EditPlaylistPage\";\n\t\t}\n\t\t// Catch exceptions and send to ErrorPage\n\t\tcatch(Exception e) {\n\t\t\treturn \"ErrorPage.xhtml\";\n\t\t}\n\t}", "public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }", "@RequestMapping(value = \"/edit/{id}\", method = RequestMethod.GET)\n public String editStudent(ModelMap view, @PathVariable int id) {\n Student student = studentService.findById(id);\n view.addAttribute(\"student\", student);\n view.addAttribute(\"updateurl\", updateurl);\n return(\"editstudent\");\n }", "public void editProfile(String username, String fname, String lname, String email, String phoneno, String newpw) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\"); \n\t callStmt = con.prepareCall(\" {call team5.customer_updateProfile_Proc(?,?,?,?,?,?,?,?,?)}\");\n\t callStmt.setString(1,phoneno);\n\t callStmt.setString(2,email);\n\t callStmt.setString(3,fname);\n\t callStmt.setString(4,lname);\n\t callStmt.setString(5,\"Y\");\n\t callStmt.setString(6,\"Y\");\n\t callStmt.setString(7,username);\n\t callStmt.setString(8,newpw);\n\t callStmt.setInt(9,this.id);\n\t callStmt.execute();\n\t \n\t callStmt.close();\n\t }", "@GetMapping\n public String showProfilePage(Model model){\n user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\n model.addAttribute(\"profileForm\",ProfileForm.createProfileFormFromUser(user));\n model.addAttribute(\"image\",user.getProfileImage() != null);\n\n return PROFILE_PAGE_NAME;\n }", "public void editUser(User user) {\n\t\t\n\t}", "private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "@RequestMapping(value = \"/edituserdetails/{id}\", method = RequestMethod.GET)\n\n\tpublic ModelAndView editUserDetails(HttpServletRequest request, HttpSession session, @PathVariable int id,\n\t\t\t@ModelAttribute(\"edituser\") UserBean edituser, Model model) {\n\n\t\tString adminId = (String) request.getSession().getAttribute(\"adminId\");\n\t\tif (adminId != null) {\n\t\t\tUserBean user = userdao.getUserById(id);\n\t\t\tmodel.addAttribute(\"user\", user);\n\n\t\t\treturn new ModelAndView(\"editUserDetailsForm\");\n\t\t}\n\n\t\telse\n\t\t\treturn new ModelAndView(\"redirect:/Login\");\n\t}", "public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }", "public void selectEditProfileOption() {\n\t\ttry {\n\t\t\t//Utility.wait(editProfile);\n\t\t\teditProfile.click();\n\t\t\tLog.addMessage(\"Edit Profile option selected\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to select EditProfile option\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to select EditProfile option\");\n\t\t}\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "@RequestMapping(value = \"/editAccountPage\", method = RequestMethod.GET)\n\tpublic String jobseekerEditAccount(Model m, HttpServletRequest req) {\n\t\tHttpSession session = req.getSession();\n\t\tString username = (String) session.getAttribute(\"username\");\n\t\tSystem.out.println(\"session username = \" + username);\n\t\tString firstname = (String) session.getAttribute(\"firstname\");\n\t\tm.addAttribute(\"firstname\", firstname);\n\t\tm.addAttribute(\"state\", \"editAccount\");\n\t\tSystem.out.println(\"I'm jobseeker editAccount\");\n\t\treturn \"js.editAccount\";\n\t\t// return \"redirect:../home\";\n\t}", "@GetMapping(\"/edit\")\r\n public String editView() {\r\n return \"modify\";\r\n }", "@RequestMapping(value = \"/editUser\", method = RequestMethod.GET)\n\tpublic ModelAndView editUser(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser endUser = endUserDAOImpl.findId(id);\n\n\t\tendUserForm.setId(endUser.getId());\n\t\tendUserForm.setBankId(endUser.getBankId());\n\t\tendUserForm.setRole(endUser.getRole());\n\t\tendUserForm.setContactNo(endUser.getContactNo());\n\t\tendUserForm.setEmail(endUser.getEmail());\n\t\tendUserForm.setDisplayName(endUser.getDisplayName());\n\t\t;\n\t\tendUserForm.setUserName(endUser.getUserName());\n\t\tendUserForm.setTransactionId(endUser.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editUser\", \"model\", model);\n\n\t}", "@RequestMapping(value = \"/editPersona\", method = RequestMethod.GET)\n\tpublic String showFormForUpdate(@RequestParam(\"id_persona\") int id_persona, Model model) {\n\t\tPersona Person = personaService.getPersona(id_persona);\n\t\tmodel.addAttribute(\"Person\", Person);\n\t\treturn \"editPersona\";\n\t}", "@GetMapping(\"/editUserInfo\")\n\tpublic String editUserInfo(@ModelAttribute(\"userInfo\")UserInfo userInfo, HttpSession session, RedirectAttributes redirectAttr, Model viewModel) {\n\t\tif(session.getAttribute(\"userId\") == null) {\n\t\t\tredirectAttr.addFlashAttribute(\"message\", \"You need to log in first!\");\n\t\t\treturn \"redirect:/auth\";\n\t\t}\n\t\tLong loginUserId = (Long)session.getAttribute(\"userId\"); //Login user\n\t\tUser loginUser = this.uServ.findUserById(loginUserId);\n\t\t\n\t\tUserInfo thisUserInfo = this.uServ.findSingleUserInfo(loginUser);\n\t\t\n\t\tviewModel.addAttribute(\"loguser\", loginUser);\n\t\tviewModel.addAttribute(\"userInfo\", thisUserInfo);\n\t\t\n\t\treturn \"EditUserInfo.jsp\";\n\t}", "public void showProfile() {\r\n\t\tprofile.setVisible(true);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_edit) {\n Intent intent = new Intent(this, editProfile.class);\n startActivity(intent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_profile);\n toolbar_profile = findViewById(R.id.pro_toolbar);\n setTitle(\"My Profile\");\n setSupportActionBar(toolbar_profile);\n\n proname = findViewById(R.id.profile_name);\n profoi = findViewById(R.id.profile_foi);\n proorg = findViewById(R.id.profile_orga);\n\n currentId=String.valueOf(Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID));\n //load user information\n userInfo();\n editProfile = findViewById(R.id.editprofile);\n editProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(Profile.this,Profile_Edit.class));\n }\n });\n }", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "@RequestMapping(value = \"edit/{id}\", method = RequestMethod.POST)\r\n\tpublic ModelAndView edit(@ModelAttribute Person editedPerson, @PathVariable int id) \r\n\t{\r\n\t\tpersonService.updatePerson(editedPerson);\r\n\t\treturn new ModelAndView(\"addEditConfirm\", \"person\", editedPerson);\r\n\t}", "@RequestMapping(\"/su/profile\")\n\tpublic ModelAndView suprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.addObject(\"suinfo\", suinfoDAO.findSuinfoByPrimaryKey(yourtaskuser.getUserid()));\n\t\tmav.setViewName(\"profile/userprofile.jsp\");\n\t\treturn mav;\n\t}", "@RequestMapping(\"/admin/profile\")\n\tpublic ModelAndView adminprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.setViewName(\"profile/adminprofile.jsp\");\n\t\treturn mav;\n\t}", "@GetMapping(\"/person/edit/{id}\")\n public String editPerson(@PathVariable(\"id\") int id, Model model) {\n Optional<Person> person = personRepo.get(id);\n if (person.isPresent()) {\n model.addAttribute(\"person\", person.get());\n }\n return \"personForm\";\n }", "@RequestMapping (value = \"/edit\", method = RequestMethod.GET)\r\n public String edit (ModelMap model, Long id)\r\n {\r\n TenantAccount tenantAccount = tenantAccountService.find (id);\r\n Set<Role> roles =tenantAccount.getRoles ();\r\n model.put (\"tenantAccount\", tenantAccount);\r\n if (roles != null && roles.iterator ().hasNext ())\r\n {\r\n model.put (\"roleInfo\", roles.iterator ().next ());\r\n }\r\n return \"tenantAccount/edit\";\r\n }", "@RequestMapping(value = \"/edit/{objectid}\", method = RequestMethod.GET)\n public String edit(@PathVariable String objectid, Model model) {\n DataObject object = dataObjectRepository.findOne(Long.valueOf(objectid));\n model.addAttribute(\"object\", object);\n model.addAttribute(\"roles\", getAllRoles());\n return \"object/edit\";\n }", "public String edit() {\n return \"edit\";\n }", "public void editProfile() {\n dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.edit_profile);\n\n editUsername = dialog.findViewById(R.id.tv_uname);\n TextView editEmail = dialog.findViewById(R.id.tv_address);\n editImage = dialog.findViewById(R.id.imgUser);\n\n editUsername.setText(user.getUserID());\n editEmail.setText(user.getEmail());\n editEmail.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Email cannot be changed.\", Toast.LENGTH_SHORT).show();\n }\n });\n decodeImage(user.getProfilePic(), editImage);\n editImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3);\n }\n });\n\n TextView save = dialog.findViewById(R.id.save_edit);\n save.setOnClickListener(new View.OnClickListener() { // save changes\n @Override\n public void onClick(View v) {\n String username = editUsername.getText().toString();\n if(username.equals(\"\")) {\n Toast.makeText(getContext(), \"Username cannot be null\", Toast.LENGTH_SHORT).show();\n return;\n } else if (!checkUsername(username)) {\n Toast.makeText(getContext(), \"Username already exists\", Toast.LENGTH_SHORT).show();\n return;\n }\n user.setUserID(username);\n if(profilePicChanged) {\n user.setProfilePic(profilePic);\n profilePic = null;\n profilePicChanged = false;\n }\n docRef.set(user);\n dialog.dismiss();\n loadDataFromDB();\n }\n });\n\n TextView cancel = dialog.findViewById(R.id.cancel_edit);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss(); // cancel changes\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n }", "@Action( value=\"editUser\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editUser() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ (String) contexto.getSession().get(\"loginId\")+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t rol=result1.getString(\"tipo\");\n }\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}", "@Execute(validator = true, input = \"error.jsp\", urlPattern = \"editpage/{crudMode}/{id}\")\n /* CRUD COMMENT: END */\n /* CRUD: BEGIN\n @Execute(validator = true, input = \"error.jsp\", urlPattern = \"editpage/{crudMode}/{${table.primaryKeyPath}}\")\n CRUD: END */\n public String editpage() {\n if (crudTableForm.crudMode != CommonConstants.EDIT_MODE) {\n throw new ActionMessagesException(\"errors.crud_invalid_mode\",\n new Object[] { CommonConstants.EDIT_MODE,\n crudTableForm.crudMode });\n }\n \n loadCrudTable();\n \n return \"edit.jsp\";\n }", "@RequestMapping(value = {\"/profile\"})\n @PreAuthorize(\"hasRole('logon')\")\n public String showProfile(HttpServletRequest request, ModelMap model)\n {\n User currentUser = userService.getPrincipalUser();\n model.addAttribute(\"currentUser\", currentUser);\n return \"protected/profile\";\n }", "@Override\n\t\t\t// On click function\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent(view.getContext(),\n\t\t\t\t\t\tEditProfileActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "@RequestMapping(\"/edit/{id}\")\r\n\tpublic ModelAndView editUser(@PathVariable int id,\r\n\t\t\t@ModelAttribute Employee employee) {\r\n\t\tSystem.out.println(\"------------- redirecting to emp edit page --------------\" + employee);\r\n\t\tEmployee employeeObject = dao.getEmployee(id);\r\n\t\treturn new ModelAndView(\"edit\", \"employee\", employeeObject);\r\n\t}", "private String renderEditPage(Model model, VMDTO vmdto) {\n\t\tmodel.addAttribute(\"vmDto\", vmdto);\n\t\tmodel.addAttribute(\"availableProviders\", providerService.getAllProviders());\n\t\treturn \"vm/edit\";\n\t}", "@FXML\r\n\tpublic void viewProfile(ActionEvent event)\r\n\t{\r\n\t\t// TODO Autogenerated\r\n\t}", "@RequestMapping(value = \"/{id}/edit\", method = RequestMethod.GET)\n public String editRole(@PathVariable Long id, Model model) {\n model.addAttribute(\"roleEdit\", roleFacade.getRoleById(id));\n return (WebUrls.URL_ROLE+\"/edit\");\n }", "private void edit() {\n\n\t}", "User editUser(User user);", "public static void view() {\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\trender(user, userprofile);\n\t}", "@GetMapping(\"/students/edit/{id}\")\n\tpublic String createEditStudentPage(@PathVariable long id, Model model)\n\t{\n\t\tmodel.addAttribute(\"student\", studentService.getStudentById(id));\n\t\treturn \"edit_student\"; \n\t\t\n\t}", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n startActivity(new Intent(EditProfile.this, ProfilePage.class));\n onPause();\n return super.onOptionsItemSelected(item);\n }", "UserEditForm getEditForm(User user);", "private void updateStudentProfileInfo() {\n\t\t\n\t\tstudent.setLastName(sLastNameTF.getText());\n\t\tstudent.setFirstName(sFirstNameTF.getText());\n\t\tstudent.setSchoolName(sSchoolNameTF.getText());\n\t\t\n\t\t//Update Student profile information in database\n\t\t\n\t}", "@GetMapping(\"/profile\")\n\tpublic String showProfilePage(Model model, Principal principal) {\n\t\t\n\t\tString email = principal.getName();\n\t\tUser user = userService.findOne(email);\n\t\t\n\t\tmodel.addAttribute(\"tasks\", taskService.findUserTask(user));\n\t\t\n\t\t\n\t\treturn \"views/profile\";\n\t}", "@Override\n public WalkerDetails editWalkerProfile(WalkerEdit walkerEdit) {\n Assert.notNull(walkerEdit, \"Walker object must be given\");\n Optional<Walker> walkerOpt = walkerRepo.findById(walkerEdit.getId());\n Optional<WalkerLogin> walkerLoginOpt = walkerLoginRepo.findById(walkerEdit.getId());\n\n if (walkerOpt.isEmpty()){\n throw new RequestDeniedException(\"Walker with ID \" + Long.toString(walkerEdit.getId()) + \" doesn't exist!\");\n }\n if(walkerLoginOpt.isEmpty()) {\n throw new RequestDeniedException(\"Error while fetching user with ID \" + Long.toString(walkerEdit.getId()));\n }\n\n Walker walker = walkerOpt.get();\n WalkerLogin walkerLogin = walkerLoginOpt.get();\n\n Assert.notNull(walkerEdit.getFirstName(), \"First name must not be null\");\n Assert.notNull(walkerEdit.getLastName(), \"Last name must not be null\");\n Assert.notNull(walkerEdit.getEmail(), \"Email must not be null\");\n\n if((!walker.getEmail().equals(walkerEdit.getEmail())) && (!emailAvailable(walkerEdit.getEmail()))) {\n throw new RequestDeniedException(\"User with email \"+ walkerEdit.getEmail() + \" already exists.\");\n }\n\n walker.setFirstName(walkerEdit.getFirstName());\n walker.setLastName(walkerEdit.getLastName());\n walker.setEmail(walkerEdit.getEmail());\n walker.setPhoneNumber(walkerEdit.getPhoneNumber());\n walker.setPublicStats(walkerEdit.isPublicStats());\n\n if((!walkerLogin.getUsername().equals(walkerEdit.getUsername())) && (!usernameAvailable(walkerEdit.getUsername()))) {\n throw new RequestDeniedException(\"User with username \"+ walkerEdit.getUsername() + \" already exists.\");\n }\n\n walkerLogin.setUsername(walkerEdit.getUsername());\n\n walkerRepo.save(walker);\n walkerLoginRepo.save(walkerLogin);\n\n return this.getWalkerDetailsById(walkerEdit.getId());\n }", "public static EditProfileDialogue newInstance(Profile profile){\n EditProfileDialogue dialogue = new EditProfileDialogue();\n\n // If we are editing a current profile\n Bundle args = new Bundle();\n args.putParcelable(\"profile\", profile);\n dialogue.setArguments(args);\n\n Log.d(TAG, \"newInstance: send profile object in args form. args = \" + args);\n return dialogue;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_edit:\n Intent intent = new Intent(getApplicationContext(), ProfileEditActivity.class);\n intent.putExtra(\"userName\", userName);\n startActivity(intent);\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 }", "@RequestMapping(\"/sc/profile\")\n\tpublic ModelAndView scprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.addObject(\"scinfo\", scinfoDAO.findScinfoByPrimaryKey(yourtaskuser.getUserid()));\n\t\tmav.setViewName(\"profile/companyprofile.jsp\");\n\t\treturn mav;\n\t}", "@RequestMapping(\"/editUser\")\n\tpublic ModelAndView editUser(@RequestParam (name=\"id\") Long id,@RequestParam (name=\"error\", required=false) boolean error)\n\t{\n\t\tModelAndView mv=new ModelAndView(\"editUserPage\");\n\t\tOptional<User> user=userService.findByid(id);\n\t\tOptional<UserExtra> userEx=userService.findExtraByid(id);\n\t\tmv.addObject(\"image\",Base64.getEncoder().encodeToString(userEx.get().getImage()));\n\t\tmv.addObject(\"user\",user.get());\n\t\tString date=userEx.get().getDob().toString();\n\t\tString join=userEx.get().getJoiningDate().toString();\n\t\tmv.addObject(\"date\",date);\n\t\tmv.addObject(\"join\",join);\n\t\t if(error)\n\t\t\t mv.addObject(\"error\",true);\n\n\t\treturn mv;\n\t}", "public void displayProfile(FacePamphletProfile profile) {\n\t\tremoveAll();\n\t\tdisplayName(profile.getName());\n\t\tdisplayImage(profile.getImage());\n\t\tdisplayStatus(profile.getStatus());\n\t\tdisplayFriends(profile.getFriends());\n\n\t}", "@RequestMapping(value = \"/jsEditAccounts\", method = RequestMethod.GET)\n\tpublic String jsEdit(Model m, @RequestParam(value = \"username\") String username, HttpServletRequest req) {\n\t\tSystem.out.println(\"Proceed to editAccountJobSeeker Page\");\n\t\tHttpSession session = req.getSession();\n\t\tsession.setAttribute(\"username\", username);\n\t\tm.addAttribute(\"state\", \"editAccount\");\n\t\tm.addAttribute(\"username\", username);\n\t\treturn \"js.home\";\n\t}", "public String toEdit() {\n\t\t HttpServletRequest request = (HttpServletRequest) FacesContext\n\t\t\t\t\t.getCurrentInstance().getExternalContext().getRequest();\n\t\t\t String idf = request.getParameter(\"idf\");\n\t log.info(\"----------------------------IDF--------------\"+idf);\n\t\t\treturn \"paramEdit?faces-redirect=true&idf=\"+idf;\n\t\n\t}", "private void profileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getUserProfileController();\n }", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == add && ! tfName.getText().equals(\"\")){\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" already exists.\");\n } else {\n FacePamphletProfile profile = new FacePamphletProfile(tfName.getText());\n profileDB.addProfile(profile);\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"New profile with the name \" + name + \" created.\");\n currentProfile = profile;\n }\n }\n if (e.getSource() == delete && ! tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (! profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" does not exist.\");\n } else {\n profileDB.deleteProfile(name);\n canvas.showMessage(\"Profile of \" + name + \" deleted.\");\n currentProfile = null;\n }\n }\n\n if (e.getSource() == lookUp && !tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"Displaying \" + name);\n currentProfile = profileDB.getProfile(name);\n } else {\n canvas.showMessage(\"A profile with the mane \" + name + \" does not exist\");\n currentProfile = null;\n }\n }\n\n if ((e.getSource() == changeStatus || e.getSource() == tfChangeStatus) && ! tfChangeStatus.getText().equals(\"\")){\n if (currentProfile != null){\n String status = tfChangeStatus.getText();\n profileDB.getProfile(currentProfile.getName()).setStatus(status);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Status updated.\");\n } else {\n canvas.showMessage(\"Please select a profile to change status.\");\n }\n }\n\n if ((e.getSource() == changePicture || e.getSource() == tfChangePicture) && ! tfChangePicture.getText().equals(\"\")){\n if (currentProfile != null){\n String fileName = tfChangePicture.getText();\n GImage image;\n try {\n image = new GImage(fileName);\n profileDB.getProfile(currentProfile.getName()).setImage(image);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Picture updated.\");\n } catch (ErrorException ex){\n canvas.showMessage(\"Unable to open image file: \" + fileName);\n }\n } else {\n canvas.showMessage(\"Please select a profile to change picture.\");\n }\n }\n\n if ((e.getSource() == addFriend || e.getSource() == tfAddFriend) && ! tfAddFriend.getText().equals(\"\")) {\n if (currentProfile != null){\n String friendName = tfAddFriend.getText();\n if (profileDB.containsProfile(friendName)){\n if (! currentProfile.toString().contains(friendName)){\n profileDB.getProfile(currentProfile.getName()).addFriend(friendName);\n profileDB.getProfile(friendName).addFriend(currentProfile.getName());\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(friendName + \" added as a friend.\");\n } else {\n canvas.showMessage(currentProfile.getName() + \" already has \" + friendName + \" as a friend.\");\n }\n } else {\n canvas.showMessage(friendName + \" does not exist.\");\n }\n } else {\n canvas.showMessage(\"Please select a profile to add friend.\");\n }\n }\n\t}", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "public String editEmploye(Employee emp){\n System.out.println(\"******* Edit employe ************\");\n System.out.println(emp.toString());\n employeeService.editEmployee(emp);\n sessionController.logInEmp();\n\n return \"/pages/childCareCenterDashboard.xhtml?faces-redirect=true\";\n }", "private void updateProfileViews() {\n if(profile.getmImageUrl()!=null && !profile.getmImageUrl().isEmpty()) {\n String temp = profile.getmImageUrl();\n Picasso.get().load(temp).into(profilePicture);\n }\n profileName.setText(profile.getFullName());\n phoneNumber.setText(profile.getPhoneNumber());\n address.setText(profile.getAddress());\n email.setText(profile.geteMail());\n initListToShow();\n }", "@RequestMapping(\"/editPass\")\r\n\tpublic ModelAndView editPass(@ModelAttribute(\"UserEditPassForm\") final UserEditPassForm form) {\r\n\t\treturn new ModelAndView(\"users/changePass\");\r\n\t}", "@Override\n\tpublic String editUser(Map<String, Object> reqs) {\n\t\treturn null;\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tif (!edited) {\n\t\t\t\t\t\topenEdit();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcloseEdit();\n\t\t\t\t\t\tif (newly) {\n\t\t\t\t\t\t\tnewly = false;\n\t\t\t\t\t\t\tvo = getUserVO();\n\t\t\t\t\t\t\tUserController.add(vo);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUserController.modify(vo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@RequestMapping(value = { \"/edit-{id}\" }, method = RequestMethod.GET)\n\tpublic String editEntity(@PathVariable ID id, ModelMap model,\n\t\t\t@RequestParam(required = false) Integer idEstadia) {\n\t\tENTITY entity = abm.buscarPorId(id);\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", true);\n\n\t\tif(idEstadia != null){\n\t\t\tmodel.addAttribute(\"idEstadia\", idEstadia);\n\t\t}\n\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}", "private void showEditForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n Customer customerEdit = CustomerDao.getCustomer(id);\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"customer/editCustomer.jsp\");\n dispatcher.forward(request, response);\n }", "public void loadProfileWindowEdit(DonorReceiver account) throws IOException {\n\n // Only load new window if childWindowToFront fails.\n if (!App.childWindowToFront(account)) {\n\n // Set the selected donorReceiver for the profile pane and confirm child.\n ViewProfilePaneController.setAccount(account);\n ViewProfilePaneController.setIsChild(true);\n\n // Create new pane.\n FXMLLoader loader = new FXMLLoader();\n AnchorPane profilePane = loader.load(getClass().getResourceAsStream(PageNav.VIEW));\n\n // Create new scene.\n Scene profileScene = new Scene(profilePane);\n\n // Create new stage.\n Stage profileStage = new Stage();\n profileStage.setTitle(\"Profile for \" + account.getUserName());\n profileStage.setScene(profileScene);\n profileStage.show();\n profileStage.setX(App.getWindow().getX() + App.getWindow().getWidth());\n\n App.addChildWindow(profileStage, account);\n\n loadEditWindow(account, profilePane, profileStage);\n }\n }", "@Override\n\tpublic void edit(HttpServletRequest request,HttpServletResponse response) {\n\t\tint id=Integer.parseInt(request.getParameter(\"id\"));\n\t\tQuestionVo qv=new QuestionVo().getInstance(id);\n\t\tcd.edit(qv);\n\t\ttry{\n\t\t\tresponse.sendRedirect(\"Admin/question.jsp\");\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t}", "public static EditProfileDialogue newInstance(){\n EditProfileDialogue dialogue = new EditProfileDialogue();\n\n Log.d(TAG, \"newInstance: NO ARGUMENTS because we are creating new profile.\" );\n return dialogue;\n }", "@Override\n public void onCancel() {\n Log.d(TAG, \"User cancelled Edit Profile.\");\n Toast.makeText(getBaseContext(), getString(R.string.editFailure), Toast.LENGTH_SHORT)\n .show();\n }", "@RequestMapping(value = { \"/edit-module-{code}\" }, method = RequestMethod.GET)\n\t\tpublic String editModule(@PathVariable String code, ModelMap model) {\n\n\t\t\tmodel.addAttribute(\"students\", studentService.listAllStudents());\n\t\t\tmodel.addAttribute(\"teachers\", teacherService.listAllTeachers());\n\t\t\tModule module = moduleService.findByCode(code);\n\t\t\tmodel.addAttribute(\"module\", module);\n\t\t\tmodel.addAttribute(\"edit\", true);\n\t\t\t\n\t\t\treturn \"addStudentToModule\";\n\t\t}", "@Action( value=\"editAdmin\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editAdmin() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ getNick()+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t \n }\n rol=\"ADMIN\";\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}", "@GetMapping(\"/{id}/edit\")\n public String edit(Model model,\n @PathVariable(\"id\") long id) {\n model.addAttribute(CUSTOMER, customerService.showCustomerById(id));\n return CUSTOMERS_EDIT;\n }", "public CustomerProfileDTO editCustomerProfile(CustomerProfileDTO customerProfileDTO)throws EOTException;", "private void editUserCard() {\n getUserCard();\n }" ]
[ "0.8270031", "0.7965229", "0.79234904", "0.76511425", "0.74334943", "0.71983594", "0.7162056", "0.70192707", "0.69591856", "0.6929046", "0.6915364", "0.6878458", "0.6852421", "0.67684793", "0.6747677", "0.67057973", "0.6697023", "0.66346276", "0.66334015", "0.6615053", "0.65685976", "0.65030265", "0.64734995", "0.64462805", "0.6428274", "0.6425246", "0.63991815", "0.6375194", "0.636173", "0.63553226", "0.6294758", "0.62942475", "0.6282849", "0.6239091", "0.62248427", "0.6219395", "0.6218075", "0.6210781", "0.62030315", "0.6201165", "0.6198044", "0.6154159", "0.6145304", "0.6099601", "0.6079557", "0.60655034", "0.6065447", "0.60496145", "0.6035457", "0.60354406", "0.60143936", "0.60055774", "0.59935117", "0.59900784", "0.5955101", "0.5947932", "0.5947906", "0.59380764", "0.59376734", "0.5923852", "0.5922526", "0.59201294", "0.59168047", "0.59148896", "0.5901659", "0.58910877", "0.58872014", "0.5872259", "0.58703834", "0.58702976", "0.58672297", "0.58671945", "0.5860779", "0.5853265", "0.58445054", "0.5843422", "0.5842702", "0.5837169", "0.5820364", "0.5815735", "0.57970405", "0.57954645", "0.57695115", "0.57627624", "0.574927", "0.57472616", "0.57302064", "0.5728042", "0.57265663", "0.5725789", "0.57229525", "0.5721176", "0.5710116", "0.57067496", "0.5704283", "0.57013524", "0.5700761", "0.56922126", "0.5688863", "0.5685667" ]
0.58463305
74
Button Click Event for Edit Profile Button
public void mmAddFriendSearchClick(ActionEvent event) throws Exception{ displayAddFriendSearch(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }", "void gotoEditProfile();", "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "public void saveProfileEditData() {\r\n\r\n }", "@Override\n\t\t\t// On click function\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent(view.getContext(),\n\t\t\t\t\t\tEditProfileActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "void gotoEditProfile(String fbId);", "void onEditClicked();", "public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }", "public void editProfile(View v) {\n //Create map of all old info\n final Map tutorInfo = getTutorInfo();\n\n InputMethodManager imm = (InputMethodManager) this.getSystemService(Service.INPUT_METHOD_SERVICE);\n\n //Create animations\n final Animation animTranslate = AnimationUtils.loadAnimation(this, R.anim.translate);\n final Animation revTranslate = AnimationUtils.loadAnimation(this, R.anim.reverse_translate);\n\n //Enable Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.clearFocus();\n bioField.setTextIsSelectable(true);\n bioField.setEnabled(true);\n bioField.setBackgroundResource(android.R.color.black);\n imm.showSoftInput(bioField, 0);\n\n //Hide edit button\n v.startAnimation(animTranslate);\n v.setVisibility(View.GONE);\n\n //Show add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.VISIBLE);\n\n\n //Show save button\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveDialogue(tutorInfo);\n }\n });\n saveButton.startAnimation(revTranslate);\n saveButton.setVisibility(View.VISIBLE);\n\n enableSkillButtons();\n }", "private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "public void clickUpdateProfileLink()\n\t{\n \telementUtils.performElementClick(wbUpdateProfileLink);\n\t}", "@FXML\r\n\tpublic void viewProfile(ActionEvent event)\r\n\t{\r\n\t\t// TODO Autogenerated\r\n\t}", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}", "@Override\n public void onClick(View v) {\n Log.d(\"prof\",\"edit\");\n editDetails();\n// btn_prof_save.setVisibility(View.VISIBLE);\n// btn_prof_edit.setVisibility(View.INVISIBLE);\n }", "public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == statusfield || e.getActionCommand().equals(\"Change Status\")) {\n\t\t\tupdateStatus();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getSource() == picturefield || e.getActionCommand().equals(\"Change Picture\")) {\n\t\t\tupdatePicture();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getSource() == friendfield || e.getActionCommand().equals(\"Add Friend\")) {\n\t\t\taddFriend();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Add\")) {\n\t\t\taddName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Delete\")) {\n\t\t\tdeleteName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Lookup\")) {\n\t\t\tlookUpName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\t\t\n\t}", "public void selectEditProfileOption() {\n\t\ttry {\n\t\t\t//Utility.wait(editProfile);\n\t\t\teditProfile.click();\n\t\t\tLog.addMessage(\"Edit Profile option selected\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to select EditProfile option\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to select EditProfile option\");\n\t\t}\n\t}", "public void clickEditButton(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-tab-panel-noborder') and not(contains(@class,'x-hide-display'))]//button[contains(@class,'icon-ov-edit')]\").click();\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tIntent i = new Intent(NewProfileActivity.this,\n\t\t\t\t\t\tTBDispContacts.class);\n\t\t\t\ti.putExtra(\"Edit\", \"true\");\n\t\t\t\ti.putExtra(\"Details\", \"false\");\n\t\t\t\tstartActivity(i);\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == add && ! tfName.getText().equals(\"\")){\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" already exists.\");\n } else {\n FacePamphletProfile profile = new FacePamphletProfile(tfName.getText());\n profileDB.addProfile(profile);\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"New profile with the name \" + name + \" created.\");\n currentProfile = profile;\n }\n }\n if (e.getSource() == delete && ! tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (! profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" does not exist.\");\n } else {\n profileDB.deleteProfile(name);\n canvas.showMessage(\"Profile of \" + name + \" deleted.\");\n currentProfile = null;\n }\n }\n\n if (e.getSource() == lookUp && !tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"Displaying \" + name);\n currentProfile = profileDB.getProfile(name);\n } else {\n canvas.showMessage(\"A profile with the mane \" + name + \" does not exist\");\n currentProfile = null;\n }\n }\n\n if ((e.getSource() == changeStatus || e.getSource() == tfChangeStatus) && ! tfChangeStatus.getText().equals(\"\")){\n if (currentProfile != null){\n String status = tfChangeStatus.getText();\n profileDB.getProfile(currentProfile.getName()).setStatus(status);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Status updated.\");\n } else {\n canvas.showMessage(\"Please select a profile to change status.\");\n }\n }\n\n if ((e.getSource() == changePicture || e.getSource() == tfChangePicture) && ! tfChangePicture.getText().equals(\"\")){\n if (currentProfile != null){\n String fileName = tfChangePicture.getText();\n GImage image;\n try {\n image = new GImage(fileName);\n profileDB.getProfile(currentProfile.getName()).setImage(image);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Picture updated.\");\n } catch (ErrorException ex){\n canvas.showMessage(\"Unable to open image file: \" + fileName);\n }\n } else {\n canvas.showMessage(\"Please select a profile to change picture.\");\n }\n }\n\n if ((e.getSource() == addFriend || e.getSource() == tfAddFriend) && ! tfAddFriend.getText().equals(\"\")) {\n if (currentProfile != null){\n String friendName = tfAddFriend.getText();\n if (profileDB.containsProfile(friendName)){\n if (! currentProfile.toString().contains(friendName)){\n profileDB.getProfile(currentProfile.getName()).addFriend(friendName);\n profileDB.getProfile(friendName).addFriend(currentProfile.getName());\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(friendName + \" added as a friend.\");\n } else {\n canvas.showMessage(currentProfile.getName() + \" already has \" + friendName + \" as a friend.\");\n }\n } else {\n canvas.showMessage(friendName + \" does not exist.\");\n }\n } else {\n canvas.showMessage(\"Please select a profile to add friend.\");\n }\n }\n\t}", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "private void profileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getUserProfileController();\n }", "public ViewResumePage clickonedit() throws Exception{\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(edit);\r\n\t\t\t\tflag = element.isDisplayed() && element.isEnabled();\r\n\t\t\t\tAssert.assertTrue(flag, \"Edit button is not displayed\");\r\n\t\t\t\telement.click();\r\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Edit Button NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\treturn new ViewResumePage(driver);\r\n\t\t\r\n\t}", "public void clickEditLink() {\r\n\t\tbtn_EditLink.click();\r\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t case R.id.edit_profile:\n\t editProfileAlertDialog();\n\t return true;\n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}", "public void clickUserProfile(){\r\n driver.findElement(userTab).click();\r\n driver.findElement(profileBtn).click();\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\tString cmd = e.getActionCommand();\n\t\tString inputName = nameField.getText();\n\t\t\n\t\tswitch(cmd) {\n\t\tcase \"Add\":\n\t\t\taddProfile(inputName);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Delete\":\n\t\t\tdeleteProfile(inputName);\n\t\t\tbreak;\n\t\t\t \n\t\tcase \"Lookup\":\n\t\t\tlookUp(inputName);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Status\":\n\t\t\tupdateStatus();\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Picture\":\n\t\t\tupdatePicture();\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Friend\":\n\t\t\taddFriend();\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public void onPressEdit() {\r\n Intent intent = new Intent(this, CreateEventActivity.class);\r\n intent.putExtra(CreateEventActivity.EXTRA_EDIT_EVENT_UID, event.uid);\r\n startActivity(intent);\r\n }", "public void editProfile(View view){\n Intent intent = new Intent(this, EditProfileActivity.class);\n intent.putExtra(\"MY_NAME\", nameStr);\n intent.putExtra(\"MY_DESCRIPTION\", descriptionStr);\n intent.putExtra(\"MY_LOCATION\", locationStr);\n startActivityForResult(intent, 1);\n }", "public void editBtnOnclick()\r\n\t{\r\n\t\tif(cardSet.getCards().size() != 0)\r\n\t\t\tMainRunner.getSceneSelector().switchToCardEditor();\r\n\t}", "public void editButtonClicked() {\n setButtonsDisabled(false, true, true);\n setAllFieldsAndSliderDisabled(false);\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tif (!edited) {\n\t\t\t\t\t\topenEdit();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcloseEdit();\n\t\t\t\t\t\tif (newly) {\n\t\t\t\t\t\t\tnewly = false;\n\t\t\t\t\t\t\tvo = getUserVO();\n\t\t\t\t\t\t\tUserController.add(vo);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUserController.modify(vo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_edit) {\n Intent intent = new Intent(this, editProfile.class);\n startActivity(intent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void clickOnEditButton() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-btn.ant-btn-primary.ant-btn-circle\"), SHORTWAIT);\r\n\t}", "@FXML\n private void editSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"Edit DonorReceiver\");\n } else {\n EditPaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.EDIT);\n }\n }", "public String gotoeditprofile() throws IOException {\n\t\treturn \"editProfil.xhtml?faces-redirect=true\";\n\t}", "@Override\n public void onClick(View view) {\n Intent i = new Intent(view.getContext(), EditProfil.class);\n i.putExtra(\"fullName\", nameTextView.getText().toString());\n i.putExtra(\"email\", emailTextView.getText().toString());\n i.putExtra(\"phone\",phoneTextView.getText().toString());\n startActivity(i);\n }", "@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}", "public void editProfile() {\n dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.edit_profile);\n\n editUsername = dialog.findViewById(R.id.tv_uname);\n TextView editEmail = dialog.findViewById(R.id.tv_address);\n editImage = dialog.findViewById(R.id.imgUser);\n\n editUsername.setText(user.getUserID());\n editEmail.setText(user.getEmail());\n editEmail.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Email cannot be changed.\", Toast.LENGTH_SHORT).show();\n }\n });\n decodeImage(user.getProfilePic(), editImage);\n editImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3);\n }\n });\n\n TextView save = dialog.findViewById(R.id.save_edit);\n save.setOnClickListener(new View.OnClickListener() { // save changes\n @Override\n public void onClick(View v) {\n String username = editUsername.getText().toString();\n if(username.equals(\"\")) {\n Toast.makeText(getContext(), \"Username cannot be null\", Toast.LENGTH_SHORT).show();\n return;\n } else if (!checkUsername(username)) {\n Toast.makeText(getContext(), \"Username already exists\", Toast.LENGTH_SHORT).show();\n return;\n }\n user.setUserID(username);\n if(profilePicChanged) {\n user.setProfilePic(profilePic);\n profilePic = null;\n profilePicChanged = false;\n }\n docRef.set(user);\n dialog.dismiss();\n loadDataFromDB();\n }\n });\n\n TextView cancel = dialog.findViewById(R.id.cancel_edit);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss(); // cancel changes\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n }", "@Override\n public void onProfileClick(int position) {\n Log.d(TAG, \"onProfileClick: \" + position);\n Profile profile = mList.get(position);\n\n Intent intent = new Intent(CatalogActivity.this, EditorActivity.class);\n intent.putExtra(EDITOR_ACTIVITY_VALUE_EXTRA, profile.getProfileValues());\n startActivityForResult(intent, EDITOR_ACTIVITY_UPDATE_REQUEST_CODE);\n //overridePendingTransition( R.anim.left_to_right,R.anim.right_to_left);\n }", "public void editDogButtonClicked() {\r\n if (areFieldsNotBlank()) {\r\n viewModel.editDog();\r\n viewHandler.openView(\"home\");\r\n dogNameField.setStyle(null);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n startActivity(new Intent(EditProfile.this, ProfilePage.class));\n onPause();\n return super.onOptionsItemSelected(item);\n }", "public void Admin_Configuration_EmailSubscriptions_Editbtn()\n\t{\n\t\tAdmin_Configuration_EmailSubscriptions_Editbtn.click();\n\t}", "public void editButtonClicked(){\n String first = this.firstNameInputField.getText();\n String last = this.lastNameInputField.getText();\n String email = this.emailInputField.getText();\n String dep = \"\";\n String role=\"\";\n if(this.departmentDropdown.getSelectionModel().getSelectedItem() == null){\n dep= this.departmentDropdown.promptTextProperty().get();\n //this means that the user did not change the dropdown\n \n }else{\n dep = this.departmentDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.roleDropdown.getSelectionModel().getSelectedItem()== null){\n role = this.roleDropdown.promptTextProperty().get();\n }else{\n role = this.roleDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.isDefaultValue(first) && \n this.isDefaultValue(last) && \n this.isDefaultValue(email) && \n this.isDefaultValue(role) && \n this.isDefaultValue(dep)){\n //this is where we alert the user that no need for update is needed\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setContentText(\"User information has not changed...no update performed\");\n alert.showAndWait();\n \n }else{\n \n if(this.userNameLabel.getText().equals(\"User\")){\n System.out.println(\"This is empty\");\n }else{\n //create a new instance of the connection class\n this.dbConnection = new Connectivity();\n //this is where we do database operations\n if(this.dbConnection.ConnectDB()){\n //we connected to the database \n \n boolean update= this.dbConnection.updateUser(first, last, email, dep,role , this.userNameLabel.getText());\n \n \n }else{\n System.out.println(\"Could not connect to the database\");\n }\n \n }\n }\n }", "public void onClick(View view) {\n Log.d(\"Edit\",\"EDITED\");\n }", "@OnClick(R.id.setUserProfileEdits)\n public void onConfirmEditsClick() {\n if (UserDataProvider.getInstance().getCurrentUserType().equals(\"Volunteer\")){\n addSkills();\n addCauses();\n }\n updateUserData();\n // get intent information from previous activity\n\n// Intent intent = new Intent(getApplicationContext(), LandingActivity.class);\n\n\n// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n finish();\n// startActivity(intent);\n }", "private void setUpProfileButton() {\n profileButton = (ImageButton) findViewById(R.id.profile_button);\n profileButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startProfilePageActivity();\n }\n });\n }", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.btn_save:\n\t\ttxtt1 = (etxt1.getText().toString());\n\t\ttxtt2 = (etxt2.getText().toString());\n\t\ttxtt3 = (etxt3.getText().toString());\n\t\ttxtt4 = (etxt4.getText().toString());\n\t\ttxtt5 = (etxt5.getText().toString());\n\t\ttxtt6 = (etxt6.getText().toString());\n\t\ttxtt7 = (etxt7.getText().toString());\n\t\ttxtt8 = (etxt8.getText().toString());\n\t\tIntent R = new Intent(getApplicationContext(),ProfileActivity.class);\n\t\tR.putExtra(\"txtt1\", txtt1);\n\t\tR.putExtra(\"txtt2\", txtt2);\n\t\tR.putExtra(\"txtt3\", txtt3);\n\t\tR.putExtra(\"txtt4\", txtt4);\n\t\tR.putExtra(\"txtt5\", txtt5);\n\t\tR.putExtra(\"txtt6\", txtt6);\n\t\tR.putExtra(\"txtt7\", txtt7);\n\t\tR.putExtra(\"txtt8\", txtt8);\n\t\tstartActivity(R);\n\t\tbreak;\n\t\tdefault:\n\t\tbreak;\n\t\t}\n\t}", "public EditTeamPage pressEditButton() {\n controls.getEditButton().click();\n return new EditTeamPage();\n }", "public void setEditButtonPresentListener(EditButtonPresentListener listener);", "@Override\n public void edit(User user) {\n }", "public void OnSetAvatarButton(View view){\n Intent intent = new Intent(getApplicationContext(),ProfileActivity.class);\n startActivityForResult(intent,0);\n }", "private void profileButton1ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "@FXML\n private void handleEditPerson() {\n Shops selectedShops = personTable.getSelectionModel().getSelectedItem();\n if (selectedShops != null) {\n boolean okClicked = mainApp.showPersonEditDialog(selectedShops);\n if (okClicked) {\n showPersonDetails(selectedShops);\n }\n\n } else {\n // Nothing selected.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"No Selection\");\n alert.setHeaderText(\"No Shops Selected\");\n alert.setContentText(\"Please select a person in the table.\");\n \n alert.showAndWait();\n }\n }", "private void profileButton2ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 1).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "private void hitEditProfileApi() {\n appUtils.showProgressDialog(getActivity(), false);\n HashMap<String, String> params = new HashMap<>();\n params.put(ApiKeys.NAME, etFirstName.getText().toString().trim());\n params.put(ApiKeys.PHONE_NO, etPhoneNo.getText().toString().trim());\n params.put(ApiKeys.ADDRESS, etAdress.getText().toString().trim());\n params.put(ApiKeys.POSTAL_CODE, etPostal.getText().toString().trim());\n\n if (countryId != null) {\n params.put(ApiKeys.COUNTRY, countryId);\n }\n if (stateId != null) {\n params.put(ApiKeys.STATE, stateId);\n }\n if (cityId != null) {\n params.put(ApiKeys.CITY, cityId);\n }\n\n ApiInterface service = RestApi.createService(ApiInterface.class);\n Call<ResponseBody> call = service.editProfile(AppSharedPrefs.getInstance(getActivity()).\n getString(AppSharedPrefs.PREF_KEY.ACCESS_TOKEN, \"\"), appUtils.encryptData(params));\n ApiCall.getInstance().hitService(getActivity(), call, new NetworkListener() {\n @Override\n public void onSuccess(int responseCode, String response) {\n try {\n JSONObject mainObject = new JSONObject(response);\n if (mainObject.getInt(ApiKeys.CODE) == 200) {\n JSONObject dataObject = mainObject.getJSONObject(\"DATA\");\n changeEditMode(false);\n isEditModeOn = false;\n ((EditMyAccountActivity) getActivity()).setEditButtonLabel(getString(R.string.edit));\n\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_NAME, dataObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_MOBILE, dataObject.getString(ApiKeys.MOBILE_NUMBER));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ADDRESS, dataObject.getString(ApiKeys.ADDRESS));\n JSONObject countryObject = dataObject.getJSONObject(ApiKeys.COUNTRY_ID);\n JSONObject stateObject = dataObject.getJSONObject(ApiKeys.STATE_ID);\n JSONObject cityObject = dataObject.getJSONObject(ApiKeys.CITY_ID);\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_NAME, countryObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_NAME, stateObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_NAME, cityObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ISO_CODE, countryObject.getString(ApiKeys.ISO_CODE));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_ID, countryObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_ID, stateObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_ID, cityObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.POSTAL_CODE, dataObject.optString(ApiKeys.POSTAL_CODE));\n\n } else if (mainObject.getInt(ApiKeys.CODE) == ApiKeys.UNAUTHORISED_CODE) {\n appUtils.logoutFromApp(getActivity(), mainObject.optString(ApiKeys.MESSAGE));\n } else {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), mainObject.optString(ApiKeys.MESSAGE));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onSuccessErrorBody(String response) {\n\n }\n\n @Override\n public void onFailure() {\n\n }\n });\n\n }", "@Override\n public void onClick(View view) {\n\n\n\n userDetail.setFname(fname.getText().toString());\n userDetail.setLname(lname.getText().toString());\n userDetail.setAge(Integer.parseInt(age.getText().toString()));\n userDetail.setWeight(Double.valueOf(weight.getText().toString()));\n userDetail.setAddress(address.getText().toString());\n\n try {\n new EditUserProfile(editUserProfileURL,getActivity(),userDetail).execute();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Toast.makeText(getActivity(), \"Saved Profile Successfully\",\n Toast.LENGTH_SHORT).show();\n getFragmentManager().popBackStack();\n\n }", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "@FXML\r\n\tprivate void editEmployee(ActionEvent event) {\r\n\t\tbtEditar.setDisable(true);\r\n\t\tbtGuardar.setDisable(false);\r\n\t\tconmuteFields();\r\n\t}", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_profile);\n toolbar_profile = findViewById(R.id.pro_toolbar);\n setTitle(\"My Profile\");\n setSupportActionBar(toolbar_profile);\n\n proname = findViewById(R.id.profile_name);\n profoi = findViewById(R.id.profile_foi);\n proorg = findViewById(R.id.profile_orga);\n\n currentId=String.valueOf(Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID));\n //load user information\n userInfo();\n editProfile = findViewById(R.id.editprofile);\n editProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(Profile.this,Profile_Edit.class));\n }\n });\n }", "@FXML\n\tpublic void editClicked(ActionEvent e) {\n\t\tMain.getInstance().navigateToDialog(\n\t\t\t\tConstants.EditableCourseDataViewPath, course);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_edit:\n Intent intent = new Intent(getApplicationContext(), ProfileEditActivity.class);\n intent.putExtra(\"userName\", userName);\n startActivity(intent);\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 }", "@Override\n public void onClick(View view) {\n updatePerson();\n }", "public void clickOnProfile() {\n\t\telement(\"link_profile\").click();\n\t\tlogMessage(\"User clicks on Profile on left navigation bar\");\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tupdateUserDetails();\n\t\t\t\t}", "@FXML\n public void StudentSaveButtonPressed(ActionEvent e) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {\n AlertHandler ah = new AlertHandler();\n if (editMode){\n System.out.println(\"edit mode on: choosing student update\");\n if(txfFirstName.isDisabled()){\n ah.getError(\"Please edit student information\", \"Enable Student editing fields for saving\", \"Please edit before saving\");\n System.out.println(\"please edit data before saving to database\");\n } else {\n System.out.println(\"requesting confirmation for editing data to database\");\n confirmStudentUpdate();\n }\n }\n else {\n System.out.println(\"Edit mode off: choosing student insert\");\n confirmStudentInsert();\n }\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getContext(), ProfileActivity.class);\n startActivity(intent);\n\n }", "@Override\n public void onClick(View v) {\n\t \tIntent myIntent = new Intent(MainActivity.this, Profile.class);\n\t \t//myIntent.putExtra(\"key\", value); //Optional parameters\n\t \tMainActivity.this.startActivity(myIntent);\n }", "private void edit() {\n\n\t}", "void onEditFragmentInteraction(Student student);", "private void editUserCard() {\n getUserCard();\n }", "@Then(\"user clicks on edit consignment\")\r\n\tpublic void user_clicks_on_edit_consignment() {\n\t\tWebElement element = Browser.session.findElement(By.xpath(\"//*[@id='consignments-rows']//button[1]\"));\r\n\t\telement.click();\r\n\t\telement = Browser.session.findElement(By.xpath(\"//a[text()='Edit consignment info']\"));\r\n\t\telement.click();\r\n\t}", "@Override\n public void onCancel() {\n Log.d(TAG, \"User cancelled Edit Profile.\");\n Toast.makeText(getBaseContext(), getString(R.string.editFailure), Toast.LENGTH_SHORT)\n .show();\n }", "public void editProfile(String username, String fname, String lname, String email, String phoneno, String newpw) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\"); \n\t callStmt = con.prepareCall(\" {call team5.customer_updateProfile_Proc(?,?,?,?,?,?,?,?,?)}\");\n\t callStmt.setString(1,phoneno);\n\t callStmt.setString(2,email);\n\t callStmt.setString(3,fname);\n\t callStmt.setString(4,lname);\n\t callStmt.setString(5,\"Y\");\n\t callStmt.setString(6,\"Y\");\n\t callStmt.setString(7,username);\n\t callStmt.setString(8,newpw);\n\t callStmt.setInt(9,this.id);\n\t callStmt.execute();\n\t \n\t callStmt.close();\n\t }", "private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }", "@FXML\n void setBtnEditOnClick() {\n isEdit = true;\n isAdd = false;\n isDelete = false;\n }", "public void clickEdit(int editBtnIndex)\n\t{\n\t\t\n\t\tList<WebElement> editBtns=driver.findElements(By.xpath(\"//img[@title='Edit' and @src='/cmscockpit/cockpit/images/icon_func_edit.png']\"));\n\t\tif(editBtns!=null&&editBtns.size()>0)\n\t\t{\n\t\t\teditBtns.get(editBtnIndex).click();\n\t\t}\n\t}", "public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n SharedPreferences.Editor p_editor = myPrefs.edit();\n User viewProf = profiles.get(position);\n p_editor.putString(\"view_email\", viewProf.getUsername());\n p_editor.commit();\n main.viewProfile(position);\n }", "public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }", "private void profileButton3ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 2).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "public void DoEdit() {\n \n int Row[] = tb_User.getSelectedRows();\n if (Row.length > 1) {\n JOptionPane.showMessageDialog(null, \"You can choose only one user edit at same time!\");\n return;\n }\n if (tb_User.getSelectedRow() >= 0) {\n EditUser eu = new EditUser(this);\n eu.setVisible(true);\n\n } else {\n JOptionPane.showMessageDialog(null, \"You have not choose any User to edit\");\n }\n }", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "protected void enterEditMode(){\n saveButton.setVisibility(View.VISIBLE);\n //when editMode is active, allow user to input in editTexts\n //By default have the editTexts not be editable by user\n editName.setEnabled(true);\n editEmail.setEnabled(true);\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n userReference = FirebaseDatabase.getInstance().getReference(\"Users\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid());\n\n user = FirebaseAuth.getInstance().getCurrentUser();\n\n user.updateEmail(String.valueOf(editEmail.getText()))\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n userReference.child(\"name\").setValue(editName.getText().toString());\n userReference.child(\"email\").setValue(editEmail.getText().toString());\n final String TAG = \"EmailUpdate\";\n Log.d(TAG, \"User email address updated.\");\n Toast.makeText(getActivity().getApplicationContext(), \"Saved\", Toast.LENGTH_SHORT).show();\n }\n else {\n FirebaseAuthException e = (FirebaseAuthException)task.getException();\n Toast.makeText(getActivity().getApplicationContext(), \"Re-login to edit your profile!\", Toast.LENGTH_LONG).show();\n goToLoginActivity();\n }\n }\n });\n exitEditMode();\n\n }\n });\n }", "public void setEditButton(Button editButton) {\n\t\tthis.editButton = editButton;\n\t}", "@RequestMapping(value = \"/editAdminProfile\", method = RequestMethod.GET)\n\tpublic ModelAndView editAdminProfile(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser userProfile = endUserDAOImpl.findId(id);\n\n\t\tif (userProfile.getImageName() != null) {\n\t\t\tString type = ImageService.getImageType(userProfile.getImageName());\n\n\t\t\tString url = \"data:image/\" + type + \";base64,\" + Base64.encodeBase64String(userProfile.getImage());\n\t\t\tuserProfile.setImageName(url);\n\n\t\t\tendUserForm.setImageName(url);\n\t\t} else {\n\t\t\tendUserForm.setImageName(\"\");\n\t\t}\n\n\t\tendUserForm.setId(userProfile.getId());\n\t\tendUserForm.setDisplayName(userProfile.getDisplayName());\n\t\tendUserForm.setUserName(userProfile.getUserName());\n\t\tendUserForm.setAltContactNo(userProfile.getAltContactNo());\n\t\tendUserForm.setAltEmail(userProfile.getAltEmail());\n\t\tendUserForm.setContactNo(userProfile.getContactNo());\n\t\tendUserForm.setEmail(userProfile.getEmail());\n\n\t\tendUserForm.setPassword(userProfile.getPassword());\n\t\tendUserForm.setTransactionId(userProfile.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editAdminProfile\", \"model\", model);\n\n\t}", "private void profileButton5ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 4).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "public void editUser(User user) {\n\t\t\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tLog.e(\"edit pressed\", \"edit pressed\");\n\t\t\t\t\teditflag = !editflag;\n\t\t\t\t\tsetFieldEditFlag(editflag);\n\t\t\t\t\t//\tpicview1.setEnabled(true);\n\n\t\t\t\t}", "public void onClick(View view) {\n Log.d(\"Edit1\",\"EDITED1\");\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n updateProfile(interestsChanged, moreChanged, pictureChanged);\n\n }", "private void buttonAddFriends() {\n friendsButton.setText(\"Add Friends\");\n friendsButton.setOnClickListener(view -> launchProfilesActivity());\n profileOptions.setVisibility(View.VISIBLE);\n friendsView.setOnClickListener(view -> onFriendsClicked());\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "@Override\n public void onDialogPositiveClick(ProfileEditDialogFragment dialog) {\n String value = dialog.getValue();\n \n switch (this.field){\n case FIRST: updateFirst(value);\n break;\n case LAST: updateLast(value);\n break;\n case EMAIL: updateEmail(value);\n break;\n case STREET: updateStreet(value);\n break;\n case CITY: updateCity(value);\n break;\n case STATE: updateState(value);\n break;\n case ZIP: updateZip(value);\n break;\n case PHONE: updatePhone(value);\n break;\n default: break;\n }\n }" ]
[ "0.79937446", "0.79157114", "0.75828886", "0.7523918", "0.750002", "0.7464146", "0.72323287", "0.68849653", "0.6869256", "0.6788999", "0.6747457", "0.6682173", "0.66460633", "0.6600574", "0.6543046", "0.65113556", "0.6468568", "0.6460372", "0.6452631", "0.6438042", "0.64376545", "0.64302874", "0.64302534", "0.64124084", "0.6406122", "0.6403156", "0.6394218", "0.6392381", "0.63837796", "0.63718975", "0.63519716", "0.634627", "0.63151777", "0.63076544", "0.630195", "0.62865806", "0.62708557", "0.6264254", "0.62434363", "0.6241755", "0.62353176", "0.6186776", "0.6181874", "0.61750716", "0.61516654", "0.61452293", "0.614255", "0.6129672", "0.6108978", "0.61022425", "0.6100763", "0.6100386", "0.6075666", "0.6060904", "0.6057108", "0.60443485", "0.60335153", "0.6032323", "0.6014722", "0.601417", "0.60140437", "0.5999849", "0.59923786", "0.59888214", "0.5972685", "0.59622294", "0.59597707", "0.5953338", "0.5951165", "0.5947387", "0.5946286", "0.5943842", "0.5923653", "0.59231895", "0.5917144", "0.59004796", "0.5899999", "0.5892887", "0.5888587", "0.58884466", "0.5880316", "0.58673453", "0.58650476", "0.5862365", "0.58603376", "0.5858958", "0.58576995", "0.58538836", "0.5852827", "0.5851366", "0.58453906", "0.5843949", "0.5842495", "0.58420366", "0.5840951", "0.5840206", "0.5794391", "0.5789968", "0.5786431", "0.5786431", "0.5783926" ]
0.0
-1
Displays Edit Profile Page
public void displayAddFriendSearch() throws Exception{ System.out.println("Username And Login Match"); currentStage.hide(); Stage primaryStage = new Stage(); System.out.println("Step 1"); Parent root = FXMLLoader.load(getClass().getResource("view/AddFriend.fxml")); System.out.println("step 2"); primaryStage.setTitle("Add Friend Search"); System.out.println("Step 3"); primaryStage.setScene(new Scene(root, 600, 400)); primaryStage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}", "public String gotoeditprofile() throws IOException {\n\t\treturn \"editProfil.xhtml?faces-redirect=true\";\n\t}", "void gotoEditProfile();", "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "@RequestMapping(value = \"/editAdminProfile\", method = RequestMethod.GET)\n\tpublic ModelAndView editAdminProfile(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser userProfile = endUserDAOImpl.findId(id);\n\n\t\tif (userProfile.getImageName() != null) {\n\t\t\tString type = ImageService.getImageType(userProfile.getImageName());\n\n\t\t\tString url = \"data:image/\" + type + \";base64,\" + Base64.encodeBase64String(userProfile.getImage());\n\t\t\tuserProfile.setImageName(url);\n\n\t\t\tendUserForm.setImageName(url);\n\t\t} else {\n\t\t\tendUserForm.setImageName(\"\");\n\t\t}\n\n\t\tendUserForm.setId(userProfile.getId());\n\t\tendUserForm.setDisplayName(userProfile.getDisplayName());\n\t\tendUserForm.setUserName(userProfile.getUserName());\n\t\tendUserForm.setAltContactNo(userProfile.getAltContactNo());\n\t\tendUserForm.setAltEmail(userProfile.getAltEmail());\n\t\tendUserForm.setContactNo(userProfile.getContactNo());\n\t\tendUserForm.setEmail(userProfile.getEmail());\n\n\t\tendUserForm.setPassword(userProfile.getPassword());\n\t\tendUserForm.setTransactionId(userProfile.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editAdminProfile\", \"model\", model);\n\n\t}", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "void gotoEditProfile(String fbId);", "@RequestMapping(value = { \"/edit-{loginID}-user\" }, method = RequestMethod.GET)\r\n public String edituser(@PathVariable String loginID, ModelMap model) {\r\n\r\n User user = service.findUserByLoginID(loginID);\r\n model.addAttribute(\"user\", user);\r\n model.addAttribute(\"edit\", true);\r\n return \"registration\";\r\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "public static void editProfile(String form, String ly) {\n\t\tboolean layout;\n\t\tif(ly == null || ly.equalsIgnoreCase(\"yes\"))\n\t\t\tlayout = true;\n\t\telse\n\t\t\tlayout = false;\n\t\t\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\t//set password into session\n\t\tsession.put(\"edit_password\", user.password);\n\t\t\n\t\tif(form == null)\n\t\t\tform = \"account\";\n\t\t\n\t\trender(user, userprofile, layout, form);\n\t}", "private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }", "public void saveProfileEditData() {\r\n\r\n }", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }", "public User editProfile(String firstName, String lastName, String username, String password, char type, char status)\n {\n return this.userCtrl.editProfile(username, password, firstName, lastName, type, status);\n }", "@RequestMapping(value = { \"/edit-user-{loginId}\" }, method = RequestMethod.GET)\n\tpublic String editUser(@PathVariable String loginId, ModelMap model) {\n\t\tUser user = userService.findByLoginId(loginId);\n\t\tmodel.addAttribute(\"user\", user);\n\t\tmodel.addAttribute(\"edit\", true);\n\t\treturn \"registration\";\n\t}", "@RequestMapping(\"edit\")\n\tpublic String edit(ModelMap model, HttpSession httpSession) {\n\t\tCustomer user = (Customer) httpSession.getAttribute(\"user\");\n\t\tmodel.addAttribute(\"user\", user);\n\t\treturn \"user/account/edit\";\n\t}", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "@Override\n public void edit(User user) {\n }", "@GetMapping(\"/profile/{id}/edit\")\n public String edit(Model model, @PathVariable long id, Model viewModel) {\n int unreadNotifications = unreadNotificationsCount(notiDao, id);\n\n model.addAttribute(\"alertCount\", unreadNotifications); // shows count for unread notifications\n viewModel.addAttribute(\"users\", userDao.getOne(id));\n model.addAttribute(\"users\", userDao.getOne(id));\n model.addAttribute(\"smoke\", smokeDao.getOne(id));\n\n return \"editprofile\";\n }", "@RequestMapping(\"/editUsr\")\r\n\tpublic ModelAndView editUsr(@ModelAttribute(\"UserEditForm\") final UserEditForm form) {\r\n\t\tModelAndView mav = new ModelAndView(\"users/edit\");\r\n\t\t// GET ACTUAL SESSION USER\r\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n\t\tUser user = us.findUserSessionByUsername(principal);\r\n\t\tmav.addObject(\"user\", user);\r\n\t\treturn mav;\r\n\t}", "@Override\n\tpublic void showProfile() {\n\t\t\n\t}", "public void editProfile(View view){\n Intent intent = new Intent(this, EditProfileActivity.class);\n intent.putExtra(\"MY_NAME\", nameStr);\n intent.putExtra(\"MY_DESCRIPTION\", descriptionStr);\n intent.putExtra(\"MY_LOCATION\", locationStr);\n startActivityForResult(intent, 1);\n }", "public void editProfile(View v) {\n //Create map of all old info\n final Map tutorInfo = getTutorInfo();\n\n InputMethodManager imm = (InputMethodManager) this.getSystemService(Service.INPUT_METHOD_SERVICE);\n\n //Create animations\n final Animation animTranslate = AnimationUtils.loadAnimation(this, R.anim.translate);\n final Animation revTranslate = AnimationUtils.loadAnimation(this, R.anim.reverse_translate);\n\n //Enable Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.clearFocus();\n bioField.setTextIsSelectable(true);\n bioField.setEnabled(true);\n bioField.setBackgroundResource(android.R.color.black);\n imm.showSoftInput(bioField, 0);\n\n //Hide edit button\n v.startAnimation(animTranslate);\n v.setVisibility(View.GONE);\n\n //Show add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.VISIBLE);\n\n\n //Show save button\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveDialogue(tutorInfo);\n }\n });\n saveButton.startAnimation(revTranslate);\n saveButton.setVisibility(View.VISIBLE);\n\n enableSkillButtons();\n }", "@GetMapping(\"/updateUser/{id}\")\n\t public String editUser(@PathVariable(\"id\") Long userId, Model model) {\n\t\t model.addAttribute(\"userId\", userId);\n\t\t return \"updatePage.jsp\";\n\t }", "public String fillEditPage() {\n\t\t\n\t\ttry{\n\t\t\t// Putting attribute of playlist inside the page to view it \n\t\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"playlist\", service.viewPlaylist());\n\t\t\t\n\t\t\t// Send user to EditPlaylistPage\n\t\t\treturn \"EditPlaylistPage\";\n\t\t}\n\t\t// Catch exceptions and send to ErrorPage\n\t\tcatch(Exception e) {\n\t\t\treturn \"ErrorPage.xhtml\";\n\t\t}\n\t}", "public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }", "@RequestMapping(value = \"/edit/{id}\", method = RequestMethod.GET)\n public String editStudent(ModelMap view, @PathVariable int id) {\n Student student = studentService.findById(id);\n view.addAttribute(\"student\", student);\n view.addAttribute(\"updateurl\", updateurl);\n return(\"editstudent\");\n }", "public void editProfile(String username, String fname, String lname, String email, String phoneno, String newpw) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\"); \n\t callStmt = con.prepareCall(\" {call team5.customer_updateProfile_Proc(?,?,?,?,?,?,?,?,?)}\");\n\t callStmt.setString(1,phoneno);\n\t callStmt.setString(2,email);\n\t callStmt.setString(3,fname);\n\t callStmt.setString(4,lname);\n\t callStmt.setString(5,\"Y\");\n\t callStmt.setString(6,\"Y\");\n\t callStmt.setString(7,username);\n\t callStmt.setString(8,newpw);\n\t callStmt.setInt(9,this.id);\n\t callStmt.execute();\n\t \n\t callStmt.close();\n\t }", "@GetMapping\n public String showProfilePage(Model model){\n user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\n model.addAttribute(\"profileForm\",ProfileForm.createProfileFormFromUser(user));\n model.addAttribute(\"image\",user.getProfileImage() != null);\n\n return PROFILE_PAGE_NAME;\n }", "public void editUser(User user) {\n\t\t\n\t}", "private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "@RequestMapping(value = \"/edituserdetails/{id}\", method = RequestMethod.GET)\n\n\tpublic ModelAndView editUserDetails(HttpServletRequest request, HttpSession session, @PathVariable int id,\n\t\t\t@ModelAttribute(\"edituser\") UserBean edituser, Model model) {\n\n\t\tString adminId = (String) request.getSession().getAttribute(\"adminId\");\n\t\tif (adminId != null) {\n\t\t\tUserBean user = userdao.getUserById(id);\n\t\t\tmodel.addAttribute(\"user\", user);\n\n\t\t\treturn new ModelAndView(\"editUserDetailsForm\");\n\t\t}\n\n\t\telse\n\t\t\treturn new ModelAndView(\"redirect:/Login\");\n\t}", "public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }", "public void selectEditProfileOption() {\n\t\ttry {\n\t\t\t//Utility.wait(editProfile);\n\t\t\teditProfile.click();\n\t\t\tLog.addMessage(\"Edit Profile option selected\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to select EditProfile option\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to select EditProfile option\");\n\t\t}\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "@RequestMapping(value = \"/editAccountPage\", method = RequestMethod.GET)\n\tpublic String jobseekerEditAccount(Model m, HttpServletRequest req) {\n\t\tHttpSession session = req.getSession();\n\t\tString username = (String) session.getAttribute(\"username\");\n\t\tSystem.out.println(\"session username = \" + username);\n\t\tString firstname = (String) session.getAttribute(\"firstname\");\n\t\tm.addAttribute(\"firstname\", firstname);\n\t\tm.addAttribute(\"state\", \"editAccount\");\n\t\tSystem.out.println(\"I'm jobseeker editAccount\");\n\t\treturn \"js.editAccount\";\n\t\t// return \"redirect:../home\";\n\t}", "@GetMapping(\"/edit\")\r\n public String editView() {\r\n return \"modify\";\r\n }", "@RequestMapping(value = \"/editUser\", method = RequestMethod.GET)\n\tpublic ModelAndView editUser(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser endUser = endUserDAOImpl.findId(id);\n\n\t\tendUserForm.setId(endUser.getId());\n\t\tendUserForm.setBankId(endUser.getBankId());\n\t\tendUserForm.setRole(endUser.getRole());\n\t\tendUserForm.setContactNo(endUser.getContactNo());\n\t\tendUserForm.setEmail(endUser.getEmail());\n\t\tendUserForm.setDisplayName(endUser.getDisplayName());\n\t\t;\n\t\tendUserForm.setUserName(endUser.getUserName());\n\t\tendUserForm.setTransactionId(endUser.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editUser\", \"model\", model);\n\n\t}", "@RequestMapping(value = \"/editPersona\", method = RequestMethod.GET)\n\tpublic String showFormForUpdate(@RequestParam(\"id_persona\") int id_persona, Model model) {\n\t\tPersona Person = personaService.getPersona(id_persona);\n\t\tmodel.addAttribute(\"Person\", Person);\n\t\treturn \"editPersona\";\n\t}", "@GetMapping(\"/editUserInfo\")\n\tpublic String editUserInfo(@ModelAttribute(\"userInfo\")UserInfo userInfo, HttpSession session, RedirectAttributes redirectAttr, Model viewModel) {\n\t\tif(session.getAttribute(\"userId\") == null) {\n\t\t\tredirectAttr.addFlashAttribute(\"message\", \"You need to log in first!\");\n\t\t\treturn \"redirect:/auth\";\n\t\t}\n\t\tLong loginUserId = (Long)session.getAttribute(\"userId\"); //Login user\n\t\tUser loginUser = this.uServ.findUserById(loginUserId);\n\t\t\n\t\tUserInfo thisUserInfo = this.uServ.findSingleUserInfo(loginUser);\n\t\t\n\t\tviewModel.addAttribute(\"loguser\", loginUser);\n\t\tviewModel.addAttribute(\"userInfo\", thisUserInfo);\n\t\t\n\t\treturn \"EditUserInfo.jsp\";\n\t}", "public void showProfile() {\r\n\t\tprofile.setVisible(true);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_edit) {\n Intent intent = new Intent(this, editProfile.class);\n startActivity(intent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_profile);\n toolbar_profile = findViewById(R.id.pro_toolbar);\n setTitle(\"My Profile\");\n setSupportActionBar(toolbar_profile);\n\n proname = findViewById(R.id.profile_name);\n profoi = findViewById(R.id.profile_foi);\n proorg = findViewById(R.id.profile_orga);\n\n currentId=String.valueOf(Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID));\n //load user information\n userInfo();\n editProfile = findViewById(R.id.editprofile);\n editProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(Profile.this,Profile_Edit.class));\n }\n });\n }", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "@RequestMapping(value = \"edit/{id}\", method = RequestMethod.POST)\r\n\tpublic ModelAndView edit(@ModelAttribute Person editedPerson, @PathVariable int id) \r\n\t{\r\n\t\tpersonService.updatePerson(editedPerson);\r\n\t\treturn new ModelAndView(\"addEditConfirm\", \"person\", editedPerson);\r\n\t}", "@RequestMapping(\"/su/profile\")\n\tpublic ModelAndView suprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.addObject(\"suinfo\", suinfoDAO.findSuinfoByPrimaryKey(yourtaskuser.getUserid()));\n\t\tmav.setViewName(\"profile/userprofile.jsp\");\n\t\treturn mav;\n\t}", "@RequestMapping(\"/admin/profile\")\n\tpublic ModelAndView adminprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.setViewName(\"profile/adminprofile.jsp\");\n\t\treturn mav;\n\t}", "@GetMapping(\"/person/edit/{id}\")\n public String editPerson(@PathVariable(\"id\") int id, Model model) {\n Optional<Person> person = personRepo.get(id);\n if (person.isPresent()) {\n model.addAttribute(\"person\", person.get());\n }\n return \"personForm\";\n }", "@RequestMapping (value = \"/edit\", method = RequestMethod.GET)\r\n public String edit (ModelMap model, Long id)\r\n {\r\n TenantAccount tenantAccount = tenantAccountService.find (id);\r\n Set<Role> roles =tenantAccount.getRoles ();\r\n model.put (\"tenantAccount\", tenantAccount);\r\n if (roles != null && roles.iterator ().hasNext ())\r\n {\r\n model.put (\"roleInfo\", roles.iterator ().next ());\r\n }\r\n return \"tenantAccount/edit\";\r\n }", "@RequestMapping(value = \"/edit/{objectid}\", method = RequestMethod.GET)\n public String edit(@PathVariable String objectid, Model model) {\n DataObject object = dataObjectRepository.findOne(Long.valueOf(objectid));\n model.addAttribute(\"object\", object);\n model.addAttribute(\"roles\", getAllRoles());\n return \"object/edit\";\n }", "public String edit() {\n return \"edit\";\n }", "public void editProfile() {\n dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.edit_profile);\n\n editUsername = dialog.findViewById(R.id.tv_uname);\n TextView editEmail = dialog.findViewById(R.id.tv_address);\n editImage = dialog.findViewById(R.id.imgUser);\n\n editUsername.setText(user.getUserID());\n editEmail.setText(user.getEmail());\n editEmail.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Email cannot be changed.\", Toast.LENGTH_SHORT).show();\n }\n });\n decodeImage(user.getProfilePic(), editImage);\n editImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3);\n }\n });\n\n TextView save = dialog.findViewById(R.id.save_edit);\n save.setOnClickListener(new View.OnClickListener() { // save changes\n @Override\n public void onClick(View v) {\n String username = editUsername.getText().toString();\n if(username.equals(\"\")) {\n Toast.makeText(getContext(), \"Username cannot be null\", Toast.LENGTH_SHORT).show();\n return;\n } else if (!checkUsername(username)) {\n Toast.makeText(getContext(), \"Username already exists\", Toast.LENGTH_SHORT).show();\n return;\n }\n user.setUserID(username);\n if(profilePicChanged) {\n user.setProfilePic(profilePic);\n profilePic = null;\n profilePicChanged = false;\n }\n docRef.set(user);\n dialog.dismiss();\n loadDataFromDB();\n }\n });\n\n TextView cancel = dialog.findViewById(R.id.cancel_edit);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss(); // cancel changes\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n }", "@Action( value=\"editUser\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editUser() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ (String) contexto.getSession().get(\"loginId\")+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t rol=result1.getString(\"tipo\");\n }\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}", "@Execute(validator = true, input = \"error.jsp\", urlPattern = \"editpage/{crudMode}/{id}\")\n /* CRUD COMMENT: END */\n /* CRUD: BEGIN\n @Execute(validator = true, input = \"error.jsp\", urlPattern = \"editpage/{crudMode}/{${table.primaryKeyPath}}\")\n CRUD: END */\n public String editpage() {\n if (crudTableForm.crudMode != CommonConstants.EDIT_MODE) {\n throw new ActionMessagesException(\"errors.crud_invalid_mode\",\n new Object[] { CommonConstants.EDIT_MODE,\n crudTableForm.crudMode });\n }\n \n loadCrudTable();\n \n return \"edit.jsp\";\n }", "@RequestMapping(value = {\"/profile\"})\n @PreAuthorize(\"hasRole('logon')\")\n public String showProfile(HttpServletRequest request, ModelMap model)\n {\n User currentUser = userService.getPrincipalUser();\n model.addAttribute(\"currentUser\", currentUser);\n return \"protected/profile\";\n }", "@Override\n\t\t\t// On click function\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent(view.getContext(),\n\t\t\t\t\t\tEditProfileActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "@RequestMapping(\"/edit/{id}\")\r\n\tpublic ModelAndView editUser(@PathVariable int id,\r\n\t\t\t@ModelAttribute Employee employee) {\r\n\t\tSystem.out.println(\"------------- redirecting to emp edit page --------------\" + employee);\r\n\t\tEmployee employeeObject = dao.getEmployee(id);\r\n\t\treturn new ModelAndView(\"edit\", \"employee\", employeeObject);\r\n\t}", "private String renderEditPage(Model model, VMDTO vmdto) {\n\t\tmodel.addAttribute(\"vmDto\", vmdto);\n\t\tmodel.addAttribute(\"availableProviders\", providerService.getAllProviders());\n\t\treturn \"vm/edit\";\n\t}", "@FXML\r\n\tpublic void viewProfile(ActionEvent event)\r\n\t{\r\n\t\t// TODO Autogenerated\r\n\t}", "@RequestMapping(value = \"/{id}/edit\", method = RequestMethod.GET)\n public String editRole(@PathVariable Long id, Model model) {\n model.addAttribute(\"roleEdit\", roleFacade.getRoleById(id));\n return (WebUrls.URL_ROLE+\"/edit\");\n }", "private void edit() {\n\n\t}", "User editUser(User user);", "public static void view() {\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\trender(user, userprofile);\n\t}", "@GetMapping(\"/students/edit/{id}\")\n\tpublic String createEditStudentPage(@PathVariable long id, Model model)\n\t{\n\t\tmodel.addAttribute(\"student\", studentService.getStudentById(id));\n\t\treturn \"edit_student\"; \n\t\t\n\t}", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n startActivity(new Intent(EditProfile.this, ProfilePage.class));\n onPause();\n return super.onOptionsItemSelected(item);\n }", "UserEditForm getEditForm(User user);", "private void updateStudentProfileInfo() {\n\t\t\n\t\tstudent.setLastName(sLastNameTF.getText());\n\t\tstudent.setFirstName(sFirstNameTF.getText());\n\t\tstudent.setSchoolName(sSchoolNameTF.getText());\n\t\t\n\t\t//Update Student profile information in database\n\t\t\n\t}", "@GetMapping(\"/profile\")\n\tpublic String showProfilePage(Model model, Principal principal) {\n\t\t\n\t\tString email = principal.getName();\n\t\tUser user = userService.findOne(email);\n\t\t\n\t\tmodel.addAttribute(\"tasks\", taskService.findUserTask(user));\n\t\t\n\t\t\n\t\treturn \"views/profile\";\n\t}", "@Override\n public WalkerDetails editWalkerProfile(WalkerEdit walkerEdit) {\n Assert.notNull(walkerEdit, \"Walker object must be given\");\n Optional<Walker> walkerOpt = walkerRepo.findById(walkerEdit.getId());\n Optional<WalkerLogin> walkerLoginOpt = walkerLoginRepo.findById(walkerEdit.getId());\n\n if (walkerOpt.isEmpty()){\n throw new RequestDeniedException(\"Walker with ID \" + Long.toString(walkerEdit.getId()) + \" doesn't exist!\");\n }\n if(walkerLoginOpt.isEmpty()) {\n throw new RequestDeniedException(\"Error while fetching user with ID \" + Long.toString(walkerEdit.getId()));\n }\n\n Walker walker = walkerOpt.get();\n WalkerLogin walkerLogin = walkerLoginOpt.get();\n\n Assert.notNull(walkerEdit.getFirstName(), \"First name must not be null\");\n Assert.notNull(walkerEdit.getLastName(), \"Last name must not be null\");\n Assert.notNull(walkerEdit.getEmail(), \"Email must not be null\");\n\n if((!walker.getEmail().equals(walkerEdit.getEmail())) && (!emailAvailable(walkerEdit.getEmail()))) {\n throw new RequestDeniedException(\"User with email \"+ walkerEdit.getEmail() + \" already exists.\");\n }\n\n walker.setFirstName(walkerEdit.getFirstName());\n walker.setLastName(walkerEdit.getLastName());\n walker.setEmail(walkerEdit.getEmail());\n walker.setPhoneNumber(walkerEdit.getPhoneNumber());\n walker.setPublicStats(walkerEdit.isPublicStats());\n\n if((!walkerLogin.getUsername().equals(walkerEdit.getUsername())) && (!usernameAvailable(walkerEdit.getUsername()))) {\n throw new RequestDeniedException(\"User with username \"+ walkerEdit.getUsername() + \" already exists.\");\n }\n\n walkerLogin.setUsername(walkerEdit.getUsername());\n\n walkerRepo.save(walker);\n walkerLoginRepo.save(walkerLogin);\n\n return this.getWalkerDetailsById(walkerEdit.getId());\n }", "public void displayEditProfile() 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/EditProfile.fxml\"));\r\n System.out.println(\"step 2\");\r\n primaryStage.setTitle(\"Edit Profile\");\r\n System.out.println(\"Step 3\");\r\n primaryStage.setScene(new Scene(root, 600, 900));\r\n primaryStage.show();\r\n }", "public static EditProfileDialogue newInstance(Profile profile){\n EditProfileDialogue dialogue = new EditProfileDialogue();\n\n // If we are editing a current profile\n Bundle args = new Bundle();\n args.putParcelable(\"profile\", profile);\n dialogue.setArguments(args);\n\n Log.d(TAG, \"newInstance: send profile object in args form. args = \" + args);\n return dialogue;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_edit:\n Intent intent = new Intent(getApplicationContext(), ProfileEditActivity.class);\n intent.putExtra(\"userName\", userName);\n startActivity(intent);\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 }", "@RequestMapping(\"/sc/profile\")\n\tpublic ModelAndView scprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.addObject(\"scinfo\", scinfoDAO.findScinfoByPrimaryKey(yourtaskuser.getUserid()));\n\t\tmav.setViewName(\"profile/companyprofile.jsp\");\n\t\treturn mav;\n\t}", "@RequestMapping(\"/editUser\")\n\tpublic ModelAndView editUser(@RequestParam (name=\"id\") Long id,@RequestParam (name=\"error\", required=false) boolean error)\n\t{\n\t\tModelAndView mv=new ModelAndView(\"editUserPage\");\n\t\tOptional<User> user=userService.findByid(id);\n\t\tOptional<UserExtra> userEx=userService.findExtraByid(id);\n\t\tmv.addObject(\"image\",Base64.getEncoder().encodeToString(userEx.get().getImage()));\n\t\tmv.addObject(\"user\",user.get());\n\t\tString date=userEx.get().getDob().toString();\n\t\tString join=userEx.get().getJoiningDate().toString();\n\t\tmv.addObject(\"date\",date);\n\t\tmv.addObject(\"join\",join);\n\t\t if(error)\n\t\t\t mv.addObject(\"error\",true);\n\n\t\treturn mv;\n\t}", "public void displayProfile(FacePamphletProfile profile) {\n\t\tremoveAll();\n\t\tdisplayName(profile.getName());\n\t\tdisplayImage(profile.getImage());\n\t\tdisplayStatus(profile.getStatus());\n\t\tdisplayFriends(profile.getFriends());\n\n\t}", "@RequestMapping(value = \"/jsEditAccounts\", method = RequestMethod.GET)\n\tpublic String jsEdit(Model m, @RequestParam(value = \"username\") String username, HttpServletRequest req) {\n\t\tSystem.out.println(\"Proceed to editAccountJobSeeker Page\");\n\t\tHttpSession session = req.getSession();\n\t\tsession.setAttribute(\"username\", username);\n\t\tm.addAttribute(\"state\", \"editAccount\");\n\t\tm.addAttribute(\"username\", username);\n\t\treturn \"js.home\";\n\t}", "public String toEdit() {\n\t\t HttpServletRequest request = (HttpServletRequest) FacesContext\n\t\t\t\t\t.getCurrentInstance().getExternalContext().getRequest();\n\t\t\t String idf = request.getParameter(\"idf\");\n\t log.info(\"----------------------------IDF--------------\"+idf);\n\t\t\treturn \"paramEdit?faces-redirect=true&idf=\"+idf;\n\t\n\t}", "private void profileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getUserProfileController();\n }", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == add && ! tfName.getText().equals(\"\")){\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" already exists.\");\n } else {\n FacePamphletProfile profile = new FacePamphletProfile(tfName.getText());\n profileDB.addProfile(profile);\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"New profile with the name \" + name + \" created.\");\n currentProfile = profile;\n }\n }\n if (e.getSource() == delete && ! tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (! profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" does not exist.\");\n } else {\n profileDB.deleteProfile(name);\n canvas.showMessage(\"Profile of \" + name + \" deleted.\");\n currentProfile = null;\n }\n }\n\n if (e.getSource() == lookUp && !tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"Displaying \" + name);\n currentProfile = profileDB.getProfile(name);\n } else {\n canvas.showMessage(\"A profile with the mane \" + name + \" does not exist\");\n currentProfile = null;\n }\n }\n\n if ((e.getSource() == changeStatus || e.getSource() == tfChangeStatus) && ! tfChangeStatus.getText().equals(\"\")){\n if (currentProfile != null){\n String status = tfChangeStatus.getText();\n profileDB.getProfile(currentProfile.getName()).setStatus(status);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Status updated.\");\n } else {\n canvas.showMessage(\"Please select a profile to change status.\");\n }\n }\n\n if ((e.getSource() == changePicture || e.getSource() == tfChangePicture) && ! tfChangePicture.getText().equals(\"\")){\n if (currentProfile != null){\n String fileName = tfChangePicture.getText();\n GImage image;\n try {\n image = new GImage(fileName);\n profileDB.getProfile(currentProfile.getName()).setImage(image);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Picture updated.\");\n } catch (ErrorException ex){\n canvas.showMessage(\"Unable to open image file: \" + fileName);\n }\n } else {\n canvas.showMessage(\"Please select a profile to change picture.\");\n }\n }\n\n if ((e.getSource() == addFriend || e.getSource() == tfAddFriend) && ! tfAddFriend.getText().equals(\"\")) {\n if (currentProfile != null){\n String friendName = tfAddFriend.getText();\n if (profileDB.containsProfile(friendName)){\n if (! currentProfile.toString().contains(friendName)){\n profileDB.getProfile(currentProfile.getName()).addFriend(friendName);\n profileDB.getProfile(friendName).addFriend(currentProfile.getName());\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(friendName + \" added as a friend.\");\n } else {\n canvas.showMessage(currentProfile.getName() + \" already has \" + friendName + \" as a friend.\");\n }\n } else {\n canvas.showMessage(friendName + \" does not exist.\");\n }\n } else {\n canvas.showMessage(\"Please select a profile to add friend.\");\n }\n }\n\t}", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "public String editEmploye(Employee emp){\n System.out.println(\"******* Edit employe ************\");\n System.out.println(emp.toString());\n employeeService.editEmployee(emp);\n sessionController.logInEmp();\n\n return \"/pages/childCareCenterDashboard.xhtml?faces-redirect=true\";\n }", "private void updateProfileViews() {\n if(profile.getmImageUrl()!=null && !profile.getmImageUrl().isEmpty()) {\n String temp = profile.getmImageUrl();\n Picasso.get().load(temp).into(profilePicture);\n }\n profileName.setText(profile.getFullName());\n phoneNumber.setText(profile.getPhoneNumber());\n address.setText(profile.getAddress());\n email.setText(profile.geteMail());\n initListToShow();\n }", "@RequestMapping(\"/editPass\")\r\n\tpublic ModelAndView editPass(@ModelAttribute(\"UserEditPassForm\") final UserEditPassForm form) {\r\n\t\treturn new ModelAndView(\"users/changePass\");\r\n\t}", "@Override\n\tpublic String editUser(Map<String, Object> reqs) {\n\t\treturn null;\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tif (!edited) {\n\t\t\t\t\t\topenEdit();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcloseEdit();\n\t\t\t\t\t\tif (newly) {\n\t\t\t\t\t\t\tnewly = false;\n\t\t\t\t\t\t\tvo = getUserVO();\n\t\t\t\t\t\t\tUserController.add(vo);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUserController.modify(vo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@RequestMapping(value = { \"/edit-{id}\" }, method = RequestMethod.GET)\n\tpublic String editEntity(@PathVariable ID id, ModelMap model,\n\t\t\t@RequestParam(required = false) Integer idEstadia) {\n\t\tENTITY entity = abm.buscarPorId(id);\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", true);\n\n\t\tif(idEstadia != null){\n\t\t\tmodel.addAttribute(\"idEstadia\", idEstadia);\n\t\t}\n\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}", "private void showEditForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n Customer customerEdit = CustomerDao.getCustomer(id);\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"customer/editCustomer.jsp\");\n dispatcher.forward(request, response);\n }", "public void loadProfileWindowEdit(DonorReceiver account) throws IOException {\n\n // Only load new window if childWindowToFront fails.\n if (!App.childWindowToFront(account)) {\n\n // Set the selected donorReceiver for the profile pane and confirm child.\n ViewProfilePaneController.setAccount(account);\n ViewProfilePaneController.setIsChild(true);\n\n // Create new pane.\n FXMLLoader loader = new FXMLLoader();\n AnchorPane profilePane = loader.load(getClass().getResourceAsStream(PageNav.VIEW));\n\n // Create new scene.\n Scene profileScene = new Scene(profilePane);\n\n // Create new stage.\n Stage profileStage = new Stage();\n profileStage.setTitle(\"Profile for \" + account.getUserName());\n profileStage.setScene(profileScene);\n profileStage.show();\n profileStage.setX(App.getWindow().getX() + App.getWindow().getWidth());\n\n App.addChildWindow(profileStage, account);\n\n loadEditWindow(account, profilePane, profileStage);\n }\n }", "@Override\n\tpublic void edit(HttpServletRequest request,HttpServletResponse response) {\n\t\tint id=Integer.parseInt(request.getParameter(\"id\"));\n\t\tQuestionVo qv=new QuestionVo().getInstance(id);\n\t\tcd.edit(qv);\n\t\ttry{\n\t\t\tresponse.sendRedirect(\"Admin/question.jsp\");\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t}", "public static EditProfileDialogue newInstance(){\n EditProfileDialogue dialogue = new EditProfileDialogue();\n\n Log.d(TAG, \"newInstance: NO ARGUMENTS because we are creating new profile.\" );\n return dialogue;\n }", "@Override\n public void onCancel() {\n Log.d(TAG, \"User cancelled Edit Profile.\");\n Toast.makeText(getBaseContext(), getString(R.string.editFailure), Toast.LENGTH_SHORT)\n .show();\n }", "@RequestMapping(value = { \"/edit-module-{code}\" }, method = RequestMethod.GET)\n\t\tpublic String editModule(@PathVariable String code, ModelMap model) {\n\n\t\t\tmodel.addAttribute(\"students\", studentService.listAllStudents());\n\t\t\tmodel.addAttribute(\"teachers\", teacherService.listAllTeachers());\n\t\t\tModule module = moduleService.findByCode(code);\n\t\t\tmodel.addAttribute(\"module\", module);\n\t\t\tmodel.addAttribute(\"edit\", true);\n\t\t\t\n\t\t\treturn \"addStudentToModule\";\n\t\t}", "@Action( value=\"editAdmin\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editAdmin() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ getNick()+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t \n }\n rol=\"ADMIN\";\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}", "@GetMapping(\"/{id}/edit\")\n public String edit(Model model,\n @PathVariable(\"id\") long id) {\n model.addAttribute(CUSTOMER, customerService.showCustomerById(id));\n return CUSTOMERS_EDIT;\n }", "public CustomerProfileDTO editCustomerProfile(CustomerProfileDTO customerProfileDTO)throws EOTException;", "private void editUserCard() {\n getUserCard();\n }" ]
[ "0.8270031", "0.7965229", "0.79234904", "0.76511425", "0.74334943", "0.71983594", "0.7162056", "0.70192707", "0.69591856", "0.6929046", "0.6915364", "0.6878458", "0.6852421", "0.67684793", "0.6747677", "0.67057973", "0.6697023", "0.66346276", "0.66334015", "0.6615053", "0.65685976", "0.65030265", "0.64734995", "0.64462805", "0.6428274", "0.6425246", "0.63991815", "0.6375194", "0.636173", "0.63553226", "0.6294758", "0.62942475", "0.6282849", "0.6239091", "0.62248427", "0.6219395", "0.6218075", "0.6210781", "0.62030315", "0.6201165", "0.6198044", "0.6154159", "0.6145304", "0.6099601", "0.6079557", "0.60655034", "0.6065447", "0.60496145", "0.6035457", "0.60354406", "0.60143936", "0.60055774", "0.59935117", "0.59900784", "0.5955101", "0.5947932", "0.5947906", "0.59380764", "0.59376734", "0.5923852", "0.5922526", "0.59201294", "0.59168047", "0.59148896", "0.5901659", "0.58910877", "0.58872014", "0.5872259", "0.58703834", "0.58702976", "0.58672297", "0.58671945", "0.5860779", "0.5853265", "0.58463305", "0.58445054", "0.5843422", "0.5842702", "0.5837169", "0.5820364", "0.5815735", "0.57970405", "0.57954645", "0.57695115", "0.57627624", "0.574927", "0.57472616", "0.57302064", "0.5728042", "0.57265663", "0.5725789", "0.57229525", "0.5721176", "0.5710116", "0.57067496", "0.5704283", "0.57013524", "0.5700761", "0.56922126", "0.5688863", "0.5685667" ]
0.0
-1
Button Click Event for Edit Profile Button
public void friendSearchClick(ActionEvent event) throws Exception{ displayAddFriendresults(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }", "void gotoEditProfile();", "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "public void saveProfileEditData() {\r\n\r\n }", "@Override\n\t\t\t// On click function\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent(view.getContext(),\n\t\t\t\t\t\tEditProfileActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "void gotoEditProfile(String fbId);", "void onEditClicked();", "public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }", "public void editProfile(View v) {\n //Create map of all old info\n final Map tutorInfo = getTutorInfo();\n\n InputMethodManager imm = (InputMethodManager) this.getSystemService(Service.INPUT_METHOD_SERVICE);\n\n //Create animations\n final Animation animTranslate = AnimationUtils.loadAnimation(this, R.anim.translate);\n final Animation revTranslate = AnimationUtils.loadAnimation(this, R.anim.reverse_translate);\n\n //Enable Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.clearFocus();\n bioField.setTextIsSelectable(true);\n bioField.setEnabled(true);\n bioField.setBackgroundResource(android.R.color.black);\n imm.showSoftInput(bioField, 0);\n\n //Hide edit button\n v.startAnimation(animTranslate);\n v.setVisibility(View.GONE);\n\n //Show add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.VISIBLE);\n\n\n //Show save button\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveDialogue(tutorInfo);\n }\n });\n saveButton.startAnimation(revTranslate);\n saveButton.setVisibility(View.VISIBLE);\n\n enableSkillButtons();\n }", "private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "public void clickUpdateProfileLink()\n\t{\n \telementUtils.performElementClick(wbUpdateProfileLink);\n\t}", "@FXML\r\n\tpublic void viewProfile(ActionEvent event)\r\n\t{\r\n\t\t// TODO Autogenerated\r\n\t}", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}", "@Override\n public void onClick(View v) {\n Log.d(\"prof\",\"edit\");\n editDetails();\n// btn_prof_save.setVisibility(View.VISIBLE);\n// btn_prof_edit.setVisibility(View.INVISIBLE);\n }", "public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == statusfield || e.getActionCommand().equals(\"Change Status\")) {\n\t\t\tupdateStatus();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getSource() == picturefield || e.getActionCommand().equals(\"Change Picture\")) {\n\t\t\tupdatePicture();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getSource() == friendfield || e.getActionCommand().equals(\"Add Friend\")) {\n\t\t\taddFriend();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Add\")) {\n\t\t\taddName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Delete\")) {\n\t\t\tdeleteName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Lookup\")) {\n\t\t\tlookUpName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\t\t\n\t}", "public void selectEditProfileOption() {\n\t\ttry {\n\t\t\t//Utility.wait(editProfile);\n\t\t\teditProfile.click();\n\t\t\tLog.addMessage(\"Edit Profile option selected\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to select EditProfile option\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to select EditProfile option\");\n\t\t}\n\t}", "public void clickEditButton(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-tab-panel-noborder') and not(contains(@class,'x-hide-display'))]//button[contains(@class,'icon-ov-edit')]\").click();\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tIntent i = new Intent(NewProfileActivity.this,\n\t\t\t\t\t\tTBDispContacts.class);\n\t\t\t\ti.putExtra(\"Edit\", \"true\");\n\t\t\t\ti.putExtra(\"Details\", \"false\");\n\t\t\t\tstartActivity(i);\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == add && ! tfName.getText().equals(\"\")){\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" already exists.\");\n } else {\n FacePamphletProfile profile = new FacePamphletProfile(tfName.getText());\n profileDB.addProfile(profile);\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"New profile with the name \" + name + \" created.\");\n currentProfile = profile;\n }\n }\n if (e.getSource() == delete && ! tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (! profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" does not exist.\");\n } else {\n profileDB.deleteProfile(name);\n canvas.showMessage(\"Profile of \" + name + \" deleted.\");\n currentProfile = null;\n }\n }\n\n if (e.getSource() == lookUp && !tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"Displaying \" + name);\n currentProfile = profileDB.getProfile(name);\n } else {\n canvas.showMessage(\"A profile with the mane \" + name + \" does not exist\");\n currentProfile = null;\n }\n }\n\n if ((e.getSource() == changeStatus || e.getSource() == tfChangeStatus) && ! tfChangeStatus.getText().equals(\"\")){\n if (currentProfile != null){\n String status = tfChangeStatus.getText();\n profileDB.getProfile(currentProfile.getName()).setStatus(status);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Status updated.\");\n } else {\n canvas.showMessage(\"Please select a profile to change status.\");\n }\n }\n\n if ((e.getSource() == changePicture || e.getSource() == tfChangePicture) && ! tfChangePicture.getText().equals(\"\")){\n if (currentProfile != null){\n String fileName = tfChangePicture.getText();\n GImage image;\n try {\n image = new GImage(fileName);\n profileDB.getProfile(currentProfile.getName()).setImage(image);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Picture updated.\");\n } catch (ErrorException ex){\n canvas.showMessage(\"Unable to open image file: \" + fileName);\n }\n } else {\n canvas.showMessage(\"Please select a profile to change picture.\");\n }\n }\n\n if ((e.getSource() == addFriend || e.getSource() == tfAddFriend) && ! tfAddFriend.getText().equals(\"\")) {\n if (currentProfile != null){\n String friendName = tfAddFriend.getText();\n if (profileDB.containsProfile(friendName)){\n if (! currentProfile.toString().contains(friendName)){\n profileDB.getProfile(currentProfile.getName()).addFriend(friendName);\n profileDB.getProfile(friendName).addFriend(currentProfile.getName());\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(friendName + \" added as a friend.\");\n } else {\n canvas.showMessage(currentProfile.getName() + \" already has \" + friendName + \" as a friend.\");\n }\n } else {\n canvas.showMessage(friendName + \" does not exist.\");\n }\n } else {\n canvas.showMessage(\"Please select a profile to add friend.\");\n }\n }\n\t}", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "private void profileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getUserProfileController();\n }", "public ViewResumePage clickonedit() throws Exception{\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(edit);\r\n\t\t\t\tflag = element.isDisplayed() && element.isEnabled();\r\n\t\t\t\tAssert.assertTrue(flag, \"Edit button is not displayed\");\r\n\t\t\t\telement.click();\r\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Edit Button NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\treturn new ViewResumePage(driver);\r\n\t\t\r\n\t}", "public void clickEditLink() {\r\n\t\tbtn_EditLink.click();\r\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t case R.id.edit_profile:\n\t editProfileAlertDialog();\n\t return true;\n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}", "public void clickUserProfile(){\r\n driver.findElement(userTab).click();\r\n driver.findElement(profileBtn).click();\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\tString cmd = e.getActionCommand();\n\t\tString inputName = nameField.getText();\n\t\t\n\t\tswitch(cmd) {\n\t\tcase \"Add\":\n\t\t\taddProfile(inputName);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Delete\":\n\t\t\tdeleteProfile(inputName);\n\t\t\tbreak;\n\t\t\t \n\t\tcase \"Lookup\":\n\t\t\tlookUp(inputName);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Status\":\n\t\t\tupdateStatus();\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Picture\":\n\t\t\tupdatePicture();\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Friend\":\n\t\t\taddFriend();\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public void onPressEdit() {\r\n Intent intent = new Intent(this, CreateEventActivity.class);\r\n intent.putExtra(CreateEventActivity.EXTRA_EDIT_EVENT_UID, event.uid);\r\n startActivity(intent);\r\n }", "public void editProfile(View view){\n Intent intent = new Intent(this, EditProfileActivity.class);\n intent.putExtra(\"MY_NAME\", nameStr);\n intent.putExtra(\"MY_DESCRIPTION\", descriptionStr);\n intent.putExtra(\"MY_LOCATION\", locationStr);\n startActivityForResult(intent, 1);\n }", "public void editBtnOnclick()\r\n\t{\r\n\t\tif(cardSet.getCards().size() != 0)\r\n\t\t\tMainRunner.getSceneSelector().switchToCardEditor();\r\n\t}", "public void editButtonClicked() {\n setButtonsDisabled(false, true, true);\n setAllFieldsAndSliderDisabled(false);\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tif (!edited) {\n\t\t\t\t\t\topenEdit();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcloseEdit();\n\t\t\t\t\t\tif (newly) {\n\t\t\t\t\t\t\tnewly = false;\n\t\t\t\t\t\t\tvo = getUserVO();\n\t\t\t\t\t\t\tUserController.add(vo);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUserController.modify(vo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_edit) {\n Intent intent = new Intent(this, editProfile.class);\n startActivity(intent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void clickOnEditButton() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-btn.ant-btn-primary.ant-btn-circle\"), SHORTWAIT);\r\n\t}", "@FXML\n private void editSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"Edit DonorReceiver\");\n } else {\n EditPaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.EDIT);\n }\n }", "public String gotoeditprofile() throws IOException {\n\t\treturn \"editProfil.xhtml?faces-redirect=true\";\n\t}", "@Override\n public void onClick(View view) {\n Intent i = new Intent(view.getContext(), EditProfil.class);\n i.putExtra(\"fullName\", nameTextView.getText().toString());\n i.putExtra(\"email\", emailTextView.getText().toString());\n i.putExtra(\"phone\",phoneTextView.getText().toString());\n startActivity(i);\n }", "@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}", "public void editProfile() {\n dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.edit_profile);\n\n editUsername = dialog.findViewById(R.id.tv_uname);\n TextView editEmail = dialog.findViewById(R.id.tv_address);\n editImage = dialog.findViewById(R.id.imgUser);\n\n editUsername.setText(user.getUserID());\n editEmail.setText(user.getEmail());\n editEmail.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Email cannot be changed.\", Toast.LENGTH_SHORT).show();\n }\n });\n decodeImage(user.getProfilePic(), editImage);\n editImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3);\n }\n });\n\n TextView save = dialog.findViewById(R.id.save_edit);\n save.setOnClickListener(new View.OnClickListener() { // save changes\n @Override\n public void onClick(View v) {\n String username = editUsername.getText().toString();\n if(username.equals(\"\")) {\n Toast.makeText(getContext(), \"Username cannot be null\", Toast.LENGTH_SHORT).show();\n return;\n } else if (!checkUsername(username)) {\n Toast.makeText(getContext(), \"Username already exists\", Toast.LENGTH_SHORT).show();\n return;\n }\n user.setUserID(username);\n if(profilePicChanged) {\n user.setProfilePic(profilePic);\n profilePic = null;\n profilePicChanged = false;\n }\n docRef.set(user);\n dialog.dismiss();\n loadDataFromDB();\n }\n });\n\n TextView cancel = dialog.findViewById(R.id.cancel_edit);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss(); // cancel changes\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n }", "@Override\n public void onProfileClick(int position) {\n Log.d(TAG, \"onProfileClick: \" + position);\n Profile profile = mList.get(position);\n\n Intent intent = new Intent(CatalogActivity.this, EditorActivity.class);\n intent.putExtra(EDITOR_ACTIVITY_VALUE_EXTRA, profile.getProfileValues());\n startActivityForResult(intent, EDITOR_ACTIVITY_UPDATE_REQUEST_CODE);\n //overridePendingTransition( R.anim.left_to_right,R.anim.right_to_left);\n }", "public void editDogButtonClicked() {\r\n if (areFieldsNotBlank()) {\r\n viewModel.editDog();\r\n viewHandler.openView(\"home\");\r\n dogNameField.setStyle(null);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n startActivity(new Intent(EditProfile.this, ProfilePage.class));\n onPause();\n return super.onOptionsItemSelected(item);\n }", "public void Admin_Configuration_EmailSubscriptions_Editbtn()\n\t{\n\t\tAdmin_Configuration_EmailSubscriptions_Editbtn.click();\n\t}", "public void editButtonClicked(){\n String first = this.firstNameInputField.getText();\n String last = this.lastNameInputField.getText();\n String email = this.emailInputField.getText();\n String dep = \"\";\n String role=\"\";\n if(this.departmentDropdown.getSelectionModel().getSelectedItem() == null){\n dep= this.departmentDropdown.promptTextProperty().get();\n //this means that the user did not change the dropdown\n \n }else{\n dep = this.departmentDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.roleDropdown.getSelectionModel().getSelectedItem()== null){\n role = this.roleDropdown.promptTextProperty().get();\n }else{\n role = this.roleDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.isDefaultValue(first) && \n this.isDefaultValue(last) && \n this.isDefaultValue(email) && \n this.isDefaultValue(role) && \n this.isDefaultValue(dep)){\n //this is where we alert the user that no need for update is needed\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setContentText(\"User information has not changed...no update performed\");\n alert.showAndWait();\n \n }else{\n \n if(this.userNameLabel.getText().equals(\"User\")){\n System.out.println(\"This is empty\");\n }else{\n //create a new instance of the connection class\n this.dbConnection = new Connectivity();\n //this is where we do database operations\n if(this.dbConnection.ConnectDB()){\n //we connected to the database \n \n boolean update= this.dbConnection.updateUser(first, last, email, dep,role , this.userNameLabel.getText());\n \n \n }else{\n System.out.println(\"Could not connect to the database\");\n }\n \n }\n }\n }", "public void onClick(View view) {\n Log.d(\"Edit\",\"EDITED\");\n }", "@OnClick(R.id.setUserProfileEdits)\n public void onConfirmEditsClick() {\n if (UserDataProvider.getInstance().getCurrentUserType().equals(\"Volunteer\")){\n addSkills();\n addCauses();\n }\n updateUserData();\n // get intent information from previous activity\n\n// Intent intent = new Intent(getApplicationContext(), LandingActivity.class);\n\n\n// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n finish();\n// startActivity(intent);\n }", "private void setUpProfileButton() {\n profileButton = (ImageButton) findViewById(R.id.profile_button);\n profileButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startProfilePageActivity();\n }\n });\n }", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.btn_save:\n\t\ttxtt1 = (etxt1.getText().toString());\n\t\ttxtt2 = (etxt2.getText().toString());\n\t\ttxtt3 = (etxt3.getText().toString());\n\t\ttxtt4 = (etxt4.getText().toString());\n\t\ttxtt5 = (etxt5.getText().toString());\n\t\ttxtt6 = (etxt6.getText().toString());\n\t\ttxtt7 = (etxt7.getText().toString());\n\t\ttxtt8 = (etxt8.getText().toString());\n\t\tIntent R = new Intent(getApplicationContext(),ProfileActivity.class);\n\t\tR.putExtra(\"txtt1\", txtt1);\n\t\tR.putExtra(\"txtt2\", txtt2);\n\t\tR.putExtra(\"txtt3\", txtt3);\n\t\tR.putExtra(\"txtt4\", txtt4);\n\t\tR.putExtra(\"txtt5\", txtt5);\n\t\tR.putExtra(\"txtt6\", txtt6);\n\t\tR.putExtra(\"txtt7\", txtt7);\n\t\tR.putExtra(\"txtt8\", txtt8);\n\t\tstartActivity(R);\n\t\tbreak;\n\t\tdefault:\n\t\tbreak;\n\t\t}\n\t}", "public EditTeamPage pressEditButton() {\n controls.getEditButton().click();\n return new EditTeamPage();\n }", "public void setEditButtonPresentListener(EditButtonPresentListener listener);", "@Override\n public void edit(User user) {\n }", "public void OnSetAvatarButton(View view){\n Intent intent = new Intent(getApplicationContext(),ProfileActivity.class);\n startActivityForResult(intent,0);\n }", "private void profileButton1ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "@FXML\n private void handleEditPerson() {\n Shops selectedShops = personTable.getSelectionModel().getSelectedItem();\n if (selectedShops != null) {\n boolean okClicked = mainApp.showPersonEditDialog(selectedShops);\n if (okClicked) {\n showPersonDetails(selectedShops);\n }\n\n } else {\n // Nothing selected.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"No Selection\");\n alert.setHeaderText(\"No Shops Selected\");\n alert.setContentText(\"Please select a person in the table.\");\n \n alert.showAndWait();\n }\n }", "private void profileButton2ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 1).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "private void hitEditProfileApi() {\n appUtils.showProgressDialog(getActivity(), false);\n HashMap<String, String> params = new HashMap<>();\n params.put(ApiKeys.NAME, etFirstName.getText().toString().trim());\n params.put(ApiKeys.PHONE_NO, etPhoneNo.getText().toString().trim());\n params.put(ApiKeys.ADDRESS, etAdress.getText().toString().trim());\n params.put(ApiKeys.POSTAL_CODE, etPostal.getText().toString().trim());\n\n if (countryId != null) {\n params.put(ApiKeys.COUNTRY, countryId);\n }\n if (stateId != null) {\n params.put(ApiKeys.STATE, stateId);\n }\n if (cityId != null) {\n params.put(ApiKeys.CITY, cityId);\n }\n\n ApiInterface service = RestApi.createService(ApiInterface.class);\n Call<ResponseBody> call = service.editProfile(AppSharedPrefs.getInstance(getActivity()).\n getString(AppSharedPrefs.PREF_KEY.ACCESS_TOKEN, \"\"), appUtils.encryptData(params));\n ApiCall.getInstance().hitService(getActivity(), call, new NetworkListener() {\n @Override\n public void onSuccess(int responseCode, String response) {\n try {\n JSONObject mainObject = new JSONObject(response);\n if (mainObject.getInt(ApiKeys.CODE) == 200) {\n JSONObject dataObject = mainObject.getJSONObject(\"DATA\");\n changeEditMode(false);\n isEditModeOn = false;\n ((EditMyAccountActivity) getActivity()).setEditButtonLabel(getString(R.string.edit));\n\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_NAME, dataObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_MOBILE, dataObject.getString(ApiKeys.MOBILE_NUMBER));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ADDRESS, dataObject.getString(ApiKeys.ADDRESS));\n JSONObject countryObject = dataObject.getJSONObject(ApiKeys.COUNTRY_ID);\n JSONObject stateObject = dataObject.getJSONObject(ApiKeys.STATE_ID);\n JSONObject cityObject = dataObject.getJSONObject(ApiKeys.CITY_ID);\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_NAME, countryObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_NAME, stateObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_NAME, cityObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ISO_CODE, countryObject.getString(ApiKeys.ISO_CODE));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_ID, countryObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_ID, stateObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_ID, cityObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.POSTAL_CODE, dataObject.optString(ApiKeys.POSTAL_CODE));\n\n } else if (mainObject.getInt(ApiKeys.CODE) == ApiKeys.UNAUTHORISED_CODE) {\n appUtils.logoutFromApp(getActivity(), mainObject.optString(ApiKeys.MESSAGE));\n } else {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), mainObject.optString(ApiKeys.MESSAGE));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onSuccessErrorBody(String response) {\n\n }\n\n @Override\n public void onFailure() {\n\n }\n });\n\n }", "@Override\n public void onClick(View view) {\n\n\n\n userDetail.setFname(fname.getText().toString());\n userDetail.setLname(lname.getText().toString());\n userDetail.setAge(Integer.parseInt(age.getText().toString()));\n userDetail.setWeight(Double.valueOf(weight.getText().toString()));\n userDetail.setAddress(address.getText().toString());\n\n try {\n new EditUserProfile(editUserProfileURL,getActivity(),userDetail).execute();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Toast.makeText(getActivity(), \"Saved Profile Successfully\",\n Toast.LENGTH_SHORT).show();\n getFragmentManager().popBackStack();\n\n }", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "@FXML\r\n\tprivate void editEmployee(ActionEvent event) {\r\n\t\tbtEditar.setDisable(true);\r\n\t\tbtGuardar.setDisable(false);\r\n\t\tconmuteFields();\r\n\t}", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_profile);\n toolbar_profile = findViewById(R.id.pro_toolbar);\n setTitle(\"My Profile\");\n setSupportActionBar(toolbar_profile);\n\n proname = findViewById(R.id.profile_name);\n profoi = findViewById(R.id.profile_foi);\n proorg = findViewById(R.id.profile_orga);\n\n currentId=String.valueOf(Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID));\n //load user information\n userInfo();\n editProfile = findViewById(R.id.editprofile);\n editProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(Profile.this,Profile_Edit.class));\n }\n });\n }", "@FXML\n\tpublic void editClicked(ActionEvent e) {\n\t\tMain.getInstance().navigateToDialog(\n\t\t\t\tConstants.EditableCourseDataViewPath, course);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_edit:\n Intent intent = new Intent(getApplicationContext(), ProfileEditActivity.class);\n intent.putExtra(\"userName\", userName);\n startActivity(intent);\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 }", "@Override\n public void onClick(View view) {\n updatePerson();\n }", "public void clickOnProfile() {\n\t\telement(\"link_profile\").click();\n\t\tlogMessage(\"User clicks on Profile on left navigation bar\");\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tupdateUserDetails();\n\t\t\t\t}", "@FXML\n public void StudentSaveButtonPressed(ActionEvent e) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {\n AlertHandler ah = new AlertHandler();\n if (editMode){\n System.out.println(\"edit mode on: choosing student update\");\n if(txfFirstName.isDisabled()){\n ah.getError(\"Please edit student information\", \"Enable Student editing fields for saving\", \"Please edit before saving\");\n System.out.println(\"please edit data before saving to database\");\n } else {\n System.out.println(\"requesting confirmation for editing data to database\");\n confirmStudentUpdate();\n }\n }\n else {\n System.out.println(\"Edit mode off: choosing student insert\");\n confirmStudentInsert();\n }\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getContext(), ProfileActivity.class);\n startActivity(intent);\n\n }", "@Override\n public void onClick(View v) {\n\t \tIntent myIntent = new Intent(MainActivity.this, Profile.class);\n\t \t//myIntent.putExtra(\"key\", value); //Optional parameters\n\t \tMainActivity.this.startActivity(myIntent);\n }", "private void edit() {\n\n\t}", "void onEditFragmentInteraction(Student student);", "private void editUserCard() {\n getUserCard();\n }", "@Then(\"user clicks on edit consignment\")\r\n\tpublic void user_clicks_on_edit_consignment() {\n\t\tWebElement element = Browser.session.findElement(By.xpath(\"//*[@id='consignments-rows']//button[1]\"));\r\n\t\telement.click();\r\n\t\telement = Browser.session.findElement(By.xpath(\"//a[text()='Edit consignment info']\"));\r\n\t\telement.click();\r\n\t}", "@Override\n public void onCancel() {\n Log.d(TAG, \"User cancelled Edit Profile.\");\n Toast.makeText(getBaseContext(), getString(R.string.editFailure), Toast.LENGTH_SHORT)\n .show();\n }", "public void editProfile(String username, String fname, String lname, String email, String phoneno, String newpw) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\"); \n\t callStmt = con.prepareCall(\" {call team5.customer_updateProfile_Proc(?,?,?,?,?,?,?,?,?)}\");\n\t callStmt.setString(1,phoneno);\n\t callStmt.setString(2,email);\n\t callStmt.setString(3,fname);\n\t callStmt.setString(4,lname);\n\t callStmt.setString(5,\"Y\");\n\t callStmt.setString(6,\"Y\");\n\t callStmt.setString(7,username);\n\t callStmt.setString(8,newpw);\n\t callStmt.setInt(9,this.id);\n\t callStmt.execute();\n\t \n\t callStmt.close();\n\t }", "private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }", "@FXML\n void setBtnEditOnClick() {\n isEdit = true;\n isAdd = false;\n isDelete = false;\n }", "public void clickEdit(int editBtnIndex)\n\t{\n\t\t\n\t\tList<WebElement> editBtns=driver.findElements(By.xpath(\"//img[@title='Edit' and @src='/cmscockpit/cockpit/images/icon_func_edit.png']\"));\n\t\tif(editBtns!=null&&editBtns.size()>0)\n\t\t{\n\t\t\teditBtns.get(editBtnIndex).click();\n\t\t}\n\t}", "public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n SharedPreferences.Editor p_editor = myPrefs.edit();\n User viewProf = profiles.get(position);\n p_editor.putString(\"view_email\", viewProf.getUsername());\n p_editor.commit();\n main.viewProfile(position);\n }", "public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }", "private void profileButton3ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 2).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "public void DoEdit() {\n \n int Row[] = tb_User.getSelectedRows();\n if (Row.length > 1) {\n JOptionPane.showMessageDialog(null, \"You can choose only one user edit at same time!\");\n return;\n }\n if (tb_User.getSelectedRow() >= 0) {\n EditUser eu = new EditUser(this);\n eu.setVisible(true);\n\n } else {\n JOptionPane.showMessageDialog(null, \"You have not choose any User to edit\");\n }\n }", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "protected void enterEditMode(){\n saveButton.setVisibility(View.VISIBLE);\n //when editMode is active, allow user to input in editTexts\n //By default have the editTexts not be editable by user\n editName.setEnabled(true);\n editEmail.setEnabled(true);\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n userReference = FirebaseDatabase.getInstance().getReference(\"Users\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid());\n\n user = FirebaseAuth.getInstance().getCurrentUser();\n\n user.updateEmail(String.valueOf(editEmail.getText()))\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n userReference.child(\"name\").setValue(editName.getText().toString());\n userReference.child(\"email\").setValue(editEmail.getText().toString());\n final String TAG = \"EmailUpdate\";\n Log.d(TAG, \"User email address updated.\");\n Toast.makeText(getActivity().getApplicationContext(), \"Saved\", Toast.LENGTH_SHORT).show();\n }\n else {\n FirebaseAuthException e = (FirebaseAuthException)task.getException();\n Toast.makeText(getActivity().getApplicationContext(), \"Re-login to edit your profile!\", Toast.LENGTH_LONG).show();\n goToLoginActivity();\n }\n }\n });\n exitEditMode();\n\n }\n });\n }", "public void setEditButton(Button editButton) {\n\t\tthis.editButton = editButton;\n\t}", "@RequestMapping(value = \"/editAdminProfile\", method = RequestMethod.GET)\n\tpublic ModelAndView editAdminProfile(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser userProfile = endUserDAOImpl.findId(id);\n\n\t\tif (userProfile.getImageName() != null) {\n\t\t\tString type = ImageService.getImageType(userProfile.getImageName());\n\n\t\t\tString url = \"data:image/\" + type + \";base64,\" + Base64.encodeBase64String(userProfile.getImage());\n\t\t\tuserProfile.setImageName(url);\n\n\t\t\tendUserForm.setImageName(url);\n\t\t} else {\n\t\t\tendUserForm.setImageName(\"\");\n\t\t}\n\n\t\tendUserForm.setId(userProfile.getId());\n\t\tendUserForm.setDisplayName(userProfile.getDisplayName());\n\t\tendUserForm.setUserName(userProfile.getUserName());\n\t\tendUserForm.setAltContactNo(userProfile.getAltContactNo());\n\t\tendUserForm.setAltEmail(userProfile.getAltEmail());\n\t\tendUserForm.setContactNo(userProfile.getContactNo());\n\t\tendUserForm.setEmail(userProfile.getEmail());\n\n\t\tendUserForm.setPassword(userProfile.getPassword());\n\t\tendUserForm.setTransactionId(userProfile.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editAdminProfile\", \"model\", model);\n\n\t}", "private void profileButton5ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 4).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "public void editUser(User user) {\n\t\t\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tLog.e(\"edit pressed\", \"edit pressed\");\n\t\t\t\t\teditflag = !editflag;\n\t\t\t\t\tsetFieldEditFlag(editflag);\n\t\t\t\t\t//\tpicview1.setEnabled(true);\n\n\t\t\t\t}", "public void onClick(View view) {\n Log.d(\"Edit1\",\"EDITED1\");\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n updateProfile(interestsChanged, moreChanged, pictureChanged);\n\n }", "private void buttonAddFriends() {\n friendsButton.setText(\"Add Friends\");\n friendsButton.setOnClickListener(view -> launchProfilesActivity());\n profileOptions.setVisibility(View.VISIBLE);\n friendsView.setOnClickListener(view -> onFriendsClicked());\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "@Override\n public void onDialogPositiveClick(ProfileEditDialogFragment dialog) {\n String value = dialog.getValue();\n \n switch (this.field){\n case FIRST: updateFirst(value);\n break;\n case LAST: updateLast(value);\n break;\n case EMAIL: updateEmail(value);\n break;\n case STREET: updateStreet(value);\n break;\n case CITY: updateCity(value);\n break;\n case STATE: updateState(value);\n break;\n case ZIP: updateZip(value);\n break;\n case PHONE: updatePhone(value);\n break;\n default: break;\n }\n }" ]
[ "0.79937446", "0.79157114", "0.75828886", "0.7523918", "0.750002", "0.7464146", "0.72323287", "0.68849653", "0.6869256", "0.6788999", "0.6747457", "0.6682173", "0.66460633", "0.6600574", "0.6543046", "0.65113556", "0.6468568", "0.6460372", "0.6452631", "0.6438042", "0.64376545", "0.64302874", "0.64302534", "0.64124084", "0.6406122", "0.6403156", "0.6394218", "0.6392381", "0.63837796", "0.63718975", "0.63519716", "0.634627", "0.63151777", "0.63076544", "0.630195", "0.62865806", "0.62708557", "0.6264254", "0.62434363", "0.6241755", "0.62353176", "0.6186776", "0.6181874", "0.61750716", "0.61516654", "0.61452293", "0.614255", "0.6129672", "0.6108978", "0.61022425", "0.6100763", "0.6100386", "0.6075666", "0.6060904", "0.6057108", "0.60443485", "0.60335153", "0.6032323", "0.6014722", "0.601417", "0.60140437", "0.5999849", "0.59923786", "0.59888214", "0.5972685", "0.59622294", "0.59597707", "0.5953338", "0.5951165", "0.5947387", "0.5946286", "0.5943842", "0.5923653", "0.59231895", "0.5917144", "0.59004796", "0.5899999", "0.5892887", "0.5888587", "0.58884466", "0.5880316", "0.58673453", "0.58650476", "0.5862365", "0.58603376", "0.5858958", "0.58576995", "0.58538836", "0.5852827", "0.5851366", "0.58453906", "0.5843949", "0.5842495", "0.58420366", "0.5840951", "0.5840206", "0.5794391", "0.5789968", "0.5786431", "0.5786431", "0.5783926" ]
0.0
-1
Displays Edit Profile Page
public void displayAddFriendresults() throws Exception{ System.out.println("Username And Login Match"); currentStage.hide(); Stage primaryStage = new Stage(); System.out.println("Step 1"); Parent root = FXMLLoader.load(getClass().getResource("view/SearchResults.fxml")); System.out.println("step 2"); primaryStage.setTitle("Friend Search Results"); System.out.println("Step 3"); primaryStage.setScene(new Scene(root, 600, 400)); primaryStage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}", "public String gotoeditprofile() throws IOException {\n\t\treturn \"editProfil.xhtml?faces-redirect=true\";\n\t}", "void gotoEditProfile();", "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "@RequestMapping(value = \"/editAdminProfile\", method = RequestMethod.GET)\n\tpublic ModelAndView editAdminProfile(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser userProfile = endUserDAOImpl.findId(id);\n\n\t\tif (userProfile.getImageName() != null) {\n\t\t\tString type = ImageService.getImageType(userProfile.getImageName());\n\n\t\t\tString url = \"data:image/\" + type + \";base64,\" + Base64.encodeBase64String(userProfile.getImage());\n\t\t\tuserProfile.setImageName(url);\n\n\t\t\tendUserForm.setImageName(url);\n\t\t} else {\n\t\t\tendUserForm.setImageName(\"\");\n\t\t}\n\n\t\tendUserForm.setId(userProfile.getId());\n\t\tendUserForm.setDisplayName(userProfile.getDisplayName());\n\t\tendUserForm.setUserName(userProfile.getUserName());\n\t\tendUserForm.setAltContactNo(userProfile.getAltContactNo());\n\t\tendUserForm.setAltEmail(userProfile.getAltEmail());\n\t\tendUserForm.setContactNo(userProfile.getContactNo());\n\t\tendUserForm.setEmail(userProfile.getEmail());\n\n\t\tendUserForm.setPassword(userProfile.getPassword());\n\t\tendUserForm.setTransactionId(userProfile.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editAdminProfile\", \"model\", model);\n\n\t}", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "void gotoEditProfile(String fbId);", "@RequestMapping(value = { \"/edit-{loginID}-user\" }, method = RequestMethod.GET)\r\n public String edituser(@PathVariable String loginID, ModelMap model) {\r\n\r\n User user = service.findUserByLoginID(loginID);\r\n model.addAttribute(\"user\", user);\r\n model.addAttribute(\"edit\", true);\r\n return \"registration\";\r\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "public static void editProfile(String form, String ly) {\n\t\tboolean layout;\n\t\tif(ly == null || ly.equalsIgnoreCase(\"yes\"))\n\t\t\tlayout = true;\n\t\telse\n\t\t\tlayout = false;\n\t\t\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\t//set password into session\n\t\tsession.put(\"edit_password\", user.password);\n\t\t\n\t\tif(form == null)\n\t\t\tform = \"account\";\n\t\t\n\t\trender(user, userprofile, layout, form);\n\t}", "private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }", "public void saveProfileEditData() {\r\n\r\n }", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }", "public User editProfile(String firstName, String lastName, String username, String password, char type, char status)\n {\n return this.userCtrl.editProfile(username, password, firstName, lastName, type, status);\n }", "@RequestMapping(value = { \"/edit-user-{loginId}\" }, method = RequestMethod.GET)\n\tpublic String editUser(@PathVariable String loginId, ModelMap model) {\n\t\tUser user = userService.findByLoginId(loginId);\n\t\tmodel.addAttribute(\"user\", user);\n\t\tmodel.addAttribute(\"edit\", true);\n\t\treturn \"registration\";\n\t}", "@RequestMapping(\"edit\")\n\tpublic String edit(ModelMap model, HttpSession httpSession) {\n\t\tCustomer user = (Customer) httpSession.getAttribute(\"user\");\n\t\tmodel.addAttribute(\"user\", user);\n\t\treturn \"user/account/edit\";\n\t}", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "@Override\n public void edit(User user) {\n }", "@GetMapping(\"/profile/{id}/edit\")\n public String edit(Model model, @PathVariable long id, Model viewModel) {\n int unreadNotifications = unreadNotificationsCount(notiDao, id);\n\n model.addAttribute(\"alertCount\", unreadNotifications); // shows count for unread notifications\n viewModel.addAttribute(\"users\", userDao.getOne(id));\n model.addAttribute(\"users\", userDao.getOne(id));\n model.addAttribute(\"smoke\", smokeDao.getOne(id));\n\n return \"editprofile\";\n }", "@RequestMapping(\"/editUsr\")\r\n\tpublic ModelAndView editUsr(@ModelAttribute(\"UserEditForm\") final UserEditForm form) {\r\n\t\tModelAndView mav = new ModelAndView(\"users/edit\");\r\n\t\t// GET ACTUAL SESSION USER\r\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n\t\tUser user = us.findUserSessionByUsername(principal);\r\n\t\tmav.addObject(\"user\", user);\r\n\t\treturn mav;\r\n\t}", "@Override\n\tpublic void showProfile() {\n\t\t\n\t}", "public void editProfile(View view){\n Intent intent = new Intent(this, EditProfileActivity.class);\n intent.putExtra(\"MY_NAME\", nameStr);\n intent.putExtra(\"MY_DESCRIPTION\", descriptionStr);\n intent.putExtra(\"MY_LOCATION\", locationStr);\n startActivityForResult(intent, 1);\n }", "public void editProfile(View v) {\n //Create map of all old info\n final Map tutorInfo = getTutorInfo();\n\n InputMethodManager imm = (InputMethodManager) this.getSystemService(Service.INPUT_METHOD_SERVICE);\n\n //Create animations\n final Animation animTranslate = AnimationUtils.loadAnimation(this, R.anim.translate);\n final Animation revTranslate = AnimationUtils.loadAnimation(this, R.anim.reverse_translate);\n\n //Enable Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.clearFocus();\n bioField.setTextIsSelectable(true);\n bioField.setEnabled(true);\n bioField.setBackgroundResource(android.R.color.black);\n imm.showSoftInput(bioField, 0);\n\n //Hide edit button\n v.startAnimation(animTranslate);\n v.setVisibility(View.GONE);\n\n //Show add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.VISIBLE);\n\n\n //Show save button\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveDialogue(tutorInfo);\n }\n });\n saveButton.startAnimation(revTranslate);\n saveButton.setVisibility(View.VISIBLE);\n\n enableSkillButtons();\n }", "@GetMapping(\"/updateUser/{id}\")\n\t public String editUser(@PathVariable(\"id\") Long userId, Model model) {\n\t\t model.addAttribute(\"userId\", userId);\n\t\t return \"updatePage.jsp\";\n\t }", "public String fillEditPage() {\n\t\t\n\t\ttry{\n\t\t\t// Putting attribute of playlist inside the page to view it \n\t\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"playlist\", service.viewPlaylist());\n\t\t\t\n\t\t\t// Send user to EditPlaylistPage\n\t\t\treturn \"EditPlaylistPage\";\n\t\t}\n\t\t// Catch exceptions and send to ErrorPage\n\t\tcatch(Exception e) {\n\t\t\treturn \"ErrorPage.xhtml\";\n\t\t}\n\t}", "public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }", "@RequestMapping(value = \"/edit/{id}\", method = RequestMethod.GET)\n public String editStudent(ModelMap view, @PathVariable int id) {\n Student student = studentService.findById(id);\n view.addAttribute(\"student\", student);\n view.addAttribute(\"updateurl\", updateurl);\n return(\"editstudent\");\n }", "public void editProfile(String username, String fname, String lname, String email, String phoneno, String newpw) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\"); \n\t callStmt = con.prepareCall(\" {call team5.customer_updateProfile_Proc(?,?,?,?,?,?,?,?,?)}\");\n\t callStmt.setString(1,phoneno);\n\t callStmt.setString(2,email);\n\t callStmt.setString(3,fname);\n\t callStmt.setString(4,lname);\n\t callStmt.setString(5,\"Y\");\n\t callStmt.setString(6,\"Y\");\n\t callStmt.setString(7,username);\n\t callStmt.setString(8,newpw);\n\t callStmt.setInt(9,this.id);\n\t callStmt.execute();\n\t \n\t callStmt.close();\n\t }", "@GetMapping\n public String showProfilePage(Model model){\n user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\n model.addAttribute(\"profileForm\",ProfileForm.createProfileFormFromUser(user));\n model.addAttribute(\"image\",user.getProfileImage() != null);\n\n return PROFILE_PAGE_NAME;\n }", "public void editUser(User user) {\n\t\t\n\t}", "private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "@RequestMapping(value = \"/edituserdetails/{id}\", method = RequestMethod.GET)\n\n\tpublic ModelAndView editUserDetails(HttpServletRequest request, HttpSession session, @PathVariable int id,\n\t\t\t@ModelAttribute(\"edituser\") UserBean edituser, Model model) {\n\n\t\tString adminId = (String) request.getSession().getAttribute(\"adminId\");\n\t\tif (adminId != null) {\n\t\t\tUserBean user = userdao.getUserById(id);\n\t\t\tmodel.addAttribute(\"user\", user);\n\n\t\t\treturn new ModelAndView(\"editUserDetailsForm\");\n\t\t}\n\n\t\telse\n\t\t\treturn new ModelAndView(\"redirect:/Login\");\n\t}", "public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }", "public void selectEditProfileOption() {\n\t\ttry {\n\t\t\t//Utility.wait(editProfile);\n\t\t\teditProfile.click();\n\t\t\tLog.addMessage(\"Edit Profile option selected\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to select EditProfile option\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to select EditProfile option\");\n\t\t}\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "@RequestMapping(value = \"/editAccountPage\", method = RequestMethod.GET)\n\tpublic String jobseekerEditAccount(Model m, HttpServletRequest req) {\n\t\tHttpSession session = req.getSession();\n\t\tString username = (String) session.getAttribute(\"username\");\n\t\tSystem.out.println(\"session username = \" + username);\n\t\tString firstname = (String) session.getAttribute(\"firstname\");\n\t\tm.addAttribute(\"firstname\", firstname);\n\t\tm.addAttribute(\"state\", \"editAccount\");\n\t\tSystem.out.println(\"I'm jobseeker editAccount\");\n\t\treturn \"js.editAccount\";\n\t\t// return \"redirect:../home\";\n\t}", "@GetMapping(\"/edit\")\r\n public String editView() {\r\n return \"modify\";\r\n }", "@RequestMapping(value = \"/editUser\", method = RequestMethod.GET)\n\tpublic ModelAndView editUser(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser endUser = endUserDAOImpl.findId(id);\n\n\t\tendUserForm.setId(endUser.getId());\n\t\tendUserForm.setBankId(endUser.getBankId());\n\t\tendUserForm.setRole(endUser.getRole());\n\t\tendUserForm.setContactNo(endUser.getContactNo());\n\t\tendUserForm.setEmail(endUser.getEmail());\n\t\tendUserForm.setDisplayName(endUser.getDisplayName());\n\t\t;\n\t\tendUserForm.setUserName(endUser.getUserName());\n\t\tendUserForm.setTransactionId(endUser.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editUser\", \"model\", model);\n\n\t}", "@RequestMapping(value = \"/editPersona\", method = RequestMethod.GET)\n\tpublic String showFormForUpdate(@RequestParam(\"id_persona\") int id_persona, Model model) {\n\t\tPersona Person = personaService.getPersona(id_persona);\n\t\tmodel.addAttribute(\"Person\", Person);\n\t\treturn \"editPersona\";\n\t}", "@GetMapping(\"/editUserInfo\")\n\tpublic String editUserInfo(@ModelAttribute(\"userInfo\")UserInfo userInfo, HttpSession session, RedirectAttributes redirectAttr, Model viewModel) {\n\t\tif(session.getAttribute(\"userId\") == null) {\n\t\t\tredirectAttr.addFlashAttribute(\"message\", \"You need to log in first!\");\n\t\t\treturn \"redirect:/auth\";\n\t\t}\n\t\tLong loginUserId = (Long)session.getAttribute(\"userId\"); //Login user\n\t\tUser loginUser = this.uServ.findUserById(loginUserId);\n\t\t\n\t\tUserInfo thisUserInfo = this.uServ.findSingleUserInfo(loginUser);\n\t\t\n\t\tviewModel.addAttribute(\"loguser\", loginUser);\n\t\tviewModel.addAttribute(\"userInfo\", thisUserInfo);\n\t\t\n\t\treturn \"EditUserInfo.jsp\";\n\t}", "public void showProfile() {\r\n\t\tprofile.setVisible(true);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_edit) {\n Intent intent = new Intent(this, editProfile.class);\n startActivity(intent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_profile);\n toolbar_profile = findViewById(R.id.pro_toolbar);\n setTitle(\"My Profile\");\n setSupportActionBar(toolbar_profile);\n\n proname = findViewById(R.id.profile_name);\n profoi = findViewById(R.id.profile_foi);\n proorg = findViewById(R.id.profile_orga);\n\n currentId=String.valueOf(Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID));\n //load user information\n userInfo();\n editProfile = findViewById(R.id.editprofile);\n editProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(Profile.this,Profile_Edit.class));\n }\n });\n }", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "@RequestMapping(value = \"edit/{id}\", method = RequestMethod.POST)\r\n\tpublic ModelAndView edit(@ModelAttribute Person editedPerson, @PathVariable int id) \r\n\t{\r\n\t\tpersonService.updatePerson(editedPerson);\r\n\t\treturn new ModelAndView(\"addEditConfirm\", \"person\", editedPerson);\r\n\t}", "@RequestMapping(\"/su/profile\")\n\tpublic ModelAndView suprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.addObject(\"suinfo\", suinfoDAO.findSuinfoByPrimaryKey(yourtaskuser.getUserid()));\n\t\tmav.setViewName(\"profile/userprofile.jsp\");\n\t\treturn mav;\n\t}", "@RequestMapping(\"/admin/profile\")\n\tpublic ModelAndView adminprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.setViewName(\"profile/adminprofile.jsp\");\n\t\treturn mav;\n\t}", "@GetMapping(\"/person/edit/{id}\")\n public String editPerson(@PathVariable(\"id\") int id, Model model) {\n Optional<Person> person = personRepo.get(id);\n if (person.isPresent()) {\n model.addAttribute(\"person\", person.get());\n }\n return \"personForm\";\n }", "@RequestMapping (value = \"/edit\", method = RequestMethod.GET)\r\n public String edit (ModelMap model, Long id)\r\n {\r\n TenantAccount tenantAccount = tenantAccountService.find (id);\r\n Set<Role> roles =tenantAccount.getRoles ();\r\n model.put (\"tenantAccount\", tenantAccount);\r\n if (roles != null && roles.iterator ().hasNext ())\r\n {\r\n model.put (\"roleInfo\", roles.iterator ().next ());\r\n }\r\n return \"tenantAccount/edit\";\r\n }", "@RequestMapping(value = \"/edit/{objectid}\", method = RequestMethod.GET)\n public String edit(@PathVariable String objectid, Model model) {\n DataObject object = dataObjectRepository.findOne(Long.valueOf(objectid));\n model.addAttribute(\"object\", object);\n model.addAttribute(\"roles\", getAllRoles());\n return \"object/edit\";\n }", "public String edit() {\n return \"edit\";\n }", "public void editProfile() {\n dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.edit_profile);\n\n editUsername = dialog.findViewById(R.id.tv_uname);\n TextView editEmail = dialog.findViewById(R.id.tv_address);\n editImage = dialog.findViewById(R.id.imgUser);\n\n editUsername.setText(user.getUserID());\n editEmail.setText(user.getEmail());\n editEmail.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Email cannot be changed.\", Toast.LENGTH_SHORT).show();\n }\n });\n decodeImage(user.getProfilePic(), editImage);\n editImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3);\n }\n });\n\n TextView save = dialog.findViewById(R.id.save_edit);\n save.setOnClickListener(new View.OnClickListener() { // save changes\n @Override\n public void onClick(View v) {\n String username = editUsername.getText().toString();\n if(username.equals(\"\")) {\n Toast.makeText(getContext(), \"Username cannot be null\", Toast.LENGTH_SHORT).show();\n return;\n } else if (!checkUsername(username)) {\n Toast.makeText(getContext(), \"Username already exists\", Toast.LENGTH_SHORT).show();\n return;\n }\n user.setUserID(username);\n if(profilePicChanged) {\n user.setProfilePic(profilePic);\n profilePic = null;\n profilePicChanged = false;\n }\n docRef.set(user);\n dialog.dismiss();\n loadDataFromDB();\n }\n });\n\n TextView cancel = dialog.findViewById(R.id.cancel_edit);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss(); // cancel changes\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n }", "@Action( value=\"editUser\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editUser() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ (String) contexto.getSession().get(\"loginId\")+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t rol=result1.getString(\"tipo\");\n }\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}", "@Execute(validator = true, input = \"error.jsp\", urlPattern = \"editpage/{crudMode}/{id}\")\n /* CRUD COMMENT: END */\n /* CRUD: BEGIN\n @Execute(validator = true, input = \"error.jsp\", urlPattern = \"editpage/{crudMode}/{${table.primaryKeyPath}}\")\n CRUD: END */\n public String editpage() {\n if (crudTableForm.crudMode != CommonConstants.EDIT_MODE) {\n throw new ActionMessagesException(\"errors.crud_invalid_mode\",\n new Object[] { CommonConstants.EDIT_MODE,\n crudTableForm.crudMode });\n }\n \n loadCrudTable();\n \n return \"edit.jsp\";\n }", "@RequestMapping(value = {\"/profile\"})\n @PreAuthorize(\"hasRole('logon')\")\n public String showProfile(HttpServletRequest request, ModelMap model)\n {\n User currentUser = userService.getPrincipalUser();\n model.addAttribute(\"currentUser\", currentUser);\n return \"protected/profile\";\n }", "@Override\n\t\t\t// On click function\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent(view.getContext(),\n\t\t\t\t\t\tEditProfileActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "@RequestMapping(\"/edit/{id}\")\r\n\tpublic ModelAndView editUser(@PathVariable int id,\r\n\t\t\t@ModelAttribute Employee employee) {\r\n\t\tSystem.out.println(\"------------- redirecting to emp edit page --------------\" + employee);\r\n\t\tEmployee employeeObject = dao.getEmployee(id);\r\n\t\treturn new ModelAndView(\"edit\", \"employee\", employeeObject);\r\n\t}", "private String renderEditPage(Model model, VMDTO vmdto) {\n\t\tmodel.addAttribute(\"vmDto\", vmdto);\n\t\tmodel.addAttribute(\"availableProviders\", providerService.getAllProviders());\n\t\treturn \"vm/edit\";\n\t}", "@FXML\r\n\tpublic void viewProfile(ActionEvent event)\r\n\t{\r\n\t\t// TODO Autogenerated\r\n\t}", "@RequestMapping(value = \"/{id}/edit\", method = RequestMethod.GET)\n public String editRole(@PathVariable Long id, Model model) {\n model.addAttribute(\"roleEdit\", roleFacade.getRoleById(id));\n return (WebUrls.URL_ROLE+\"/edit\");\n }", "private void edit() {\n\n\t}", "User editUser(User user);", "public static void view() {\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\trender(user, userprofile);\n\t}", "@GetMapping(\"/students/edit/{id}\")\n\tpublic String createEditStudentPage(@PathVariable long id, Model model)\n\t{\n\t\tmodel.addAttribute(\"student\", studentService.getStudentById(id));\n\t\treturn \"edit_student\"; \n\t\t\n\t}", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n startActivity(new Intent(EditProfile.this, ProfilePage.class));\n onPause();\n return super.onOptionsItemSelected(item);\n }", "UserEditForm getEditForm(User user);", "private void updateStudentProfileInfo() {\n\t\t\n\t\tstudent.setLastName(sLastNameTF.getText());\n\t\tstudent.setFirstName(sFirstNameTF.getText());\n\t\tstudent.setSchoolName(sSchoolNameTF.getText());\n\t\t\n\t\t//Update Student profile information in database\n\t\t\n\t}", "@GetMapping(\"/profile\")\n\tpublic String showProfilePage(Model model, Principal principal) {\n\t\t\n\t\tString email = principal.getName();\n\t\tUser user = userService.findOne(email);\n\t\t\n\t\tmodel.addAttribute(\"tasks\", taskService.findUserTask(user));\n\t\t\n\t\t\n\t\treturn \"views/profile\";\n\t}", "@Override\n public WalkerDetails editWalkerProfile(WalkerEdit walkerEdit) {\n Assert.notNull(walkerEdit, \"Walker object must be given\");\n Optional<Walker> walkerOpt = walkerRepo.findById(walkerEdit.getId());\n Optional<WalkerLogin> walkerLoginOpt = walkerLoginRepo.findById(walkerEdit.getId());\n\n if (walkerOpt.isEmpty()){\n throw new RequestDeniedException(\"Walker with ID \" + Long.toString(walkerEdit.getId()) + \" doesn't exist!\");\n }\n if(walkerLoginOpt.isEmpty()) {\n throw new RequestDeniedException(\"Error while fetching user with ID \" + Long.toString(walkerEdit.getId()));\n }\n\n Walker walker = walkerOpt.get();\n WalkerLogin walkerLogin = walkerLoginOpt.get();\n\n Assert.notNull(walkerEdit.getFirstName(), \"First name must not be null\");\n Assert.notNull(walkerEdit.getLastName(), \"Last name must not be null\");\n Assert.notNull(walkerEdit.getEmail(), \"Email must not be null\");\n\n if((!walker.getEmail().equals(walkerEdit.getEmail())) && (!emailAvailable(walkerEdit.getEmail()))) {\n throw new RequestDeniedException(\"User with email \"+ walkerEdit.getEmail() + \" already exists.\");\n }\n\n walker.setFirstName(walkerEdit.getFirstName());\n walker.setLastName(walkerEdit.getLastName());\n walker.setEmail(walkerEdit.getEmail());\n walker.setPhoneNumber(walkerEdit.getPhoneNumber());\n walker.setPublicStats(walkerEdit.isPublicStats());\n\n if((!walkerLogin.getUsername().equals(walkerEdit.getUsername())) && (!usernameAvailable(walkerEdit.getUsername()))) {\n throw new RequestDeniedException(\"User with username \"+ walkerEdit.getUsername() + \" already exists.\");\n }\n\n walkerLogin.setUsername(walkerEdit.getUsername());\n\n walkerRepo.save(walker);\n walkerLoginRepo.save(walkerLogin);\n\n return this.getWalkerDetailsById(walkerEdit.getId());\n }", "public void displayEditProfile() 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/EditProfile.fxml\"));\r\n System.out.println(\"step 2\");\r\n primaryStage.setTitle(\"Edit Profile\");\r\n System.out.println(\"Step 3\");\r\n primaryStage.setScene(new Scene(root, 600, 900));\r\n primaryStage.show();\r\n }", "public static EditProfileDialogue newInstance(Profile profile){\n EditProfileDialogue dialogue = new EditProfileDialogue();\n\n // If we are editing a current profile\n Bundle args = new Bundle();\n args.putParcelable(\"profile\", profile);\n dialogue.setArguments(args);\n\n Log.d(TAG, \"newInstance: send profile object in args form. args = \" + args);\n return dialogue;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_edit:\n Intent intent = new Intent(getApplicationContext(), ProfileEditActivity.class);\n intent.putExtra(\"userName\", userName);\n startActivity(intent);\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 }", "@RequestMapping(\"/sc/profile\")\n\tpublic ModelAndView scprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.addObject(\"scinfo\", scinfoDAO.findScinfoByPrimaryKey(yourtaskuser.getUserid()));\n\t\tmav.setViewName(\"profile/companyprofile.jsp\");\n\t\treturn mav;\n\t}", "@RequestMapping(\"/editUser\")\n\tpublic ModelAndView editUser(@RequestParam (name=\"id\") Long id,@RequestParam (name=\"error\", required=false) boolean error)\n\t{\n\t\tModelAndView mv=new ModelAndView(\"editUserPage\");\n\t\tOptional<User> user=userService.findByid(id);\n\t\tOptional<UserExtra> userEx=userService.findExtraByid(id);\n\t\tmv.addObject(\"image\",Base64.getEncoder().encodeToString(userEx.get().getImage()));\n\t\tmv.addObject(\"user\",user.get());\n\t\tString date=userEx.get().getDob().toString();\n\t\tString join=userEx.get().getJoiningDate().toString();\n\t\tmv.addObject(\"date\",date);\n\t\tmv.addObject(\"join\",join);\n\t\t if(error)\n\t\t\t mv.addObject(\"error\",true);\n\n\t\treturn mv;\n\t}", "public void displayProfile(FacePamphletProfile profile) {\n\t\tremoveAll();\n\t\tdisplayName(profile.getName());\n\t\tdisplayImage(profile.getImage());\n\t\tdisplayStatus(profile.getStatus());\n\t\tdisplayFriends(profile.getFriends());\n\n\t}", "@RequestMapping(value = \"/jsEditAccounts\", method = RequestMethod.GET)\n\tpublic String jsEdit(Model m, @RequestParam(value = \"username\") String username, HttpServletRequest req) {\n\t\tSystem.out.println(\"Proceed to editAccountJobSeeker Page\");\n\t\tHttpSession session = req.getSession();\n\t\tsession.setAttribute(\"username\", username);\n\t\tm.addAttribute(\"state\", \"editAccount\");\n\t\tm.addAttribute(\"username\", username);\n\t\treturn \"js.home\";\n\t}", "public String toEdit() {\n\t\t HttpServletRequest request = (HttpServletRequest) FacesContext\n\t\t\t\t\t.getCurrentInstance().getExternalContext().getRequest();\n\t\t\t String idf = request.getParameter(\"idf\");\n\t log.info(\"----------------------------IDF--------------\"+idf);\n\t\t\treturn \"paramEdit?faces-redirect=true&idf=\"+idf;\n\t\n\t}", "private void profileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getUserProfileController();\n }", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == add && ! tfName.getText().equals(\"\")){\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" already exists.\");\n } else {\n FacePamphletProfile profile = new FacePamphletProfile(tfName.getText());\n profileDB.addProfile(profile);\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"New profile with the name \" + name + \" created.\");\n currentProfile = profile;\n }\n }\n if (e.getSource() == delete && ! tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (! profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" does not exist.\");\n } else {\n profileDB.deleteProfile(name);\n canvas.showMessage(\"Profile of \" + name + \" deleted.\");\n currentProfile = null;\n }\n }\n\n if (e.getSource() == lookUp && !tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"Displaying \" + name);\n currentProfile = profileDB.getProfile(name);\n } else {\n canvas.showMessage(\"A profile with the mane \" + name + \" does not exist\");\n currentProfile = null;\n }\n }\n\n if ((e.getSource() == changeStatus || e.getSource() == tfChangeStatus) && ! tfChangeStatus.getText().equals(\"\")){\n if (currentProfile != null){\n String status = tfChangeStatus.getText();\n profileDB.getProfile(currentProfile.getName()).setStatus(status);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Status updated.\");\n } else {\n canvas.showMessage(\"Please select a profile to change status.\");\n }\n }\n\n if ((e.getSource() == changePicture || e.getSource() == tfChangePicture) && ! tfChangePicture.getText().equals(\"\")){\n if (currentProfile != null){\n String fileName = tfChangePicture.getText();\n GImage image;\n try {\n image = new GImage(fileName);\n profileDB.getProfile(currentProfile.getName()).setImage(image);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Picture updated.\");\n } catch (ErrorException ex){\n canvas.showMessage(\"Unable to open image file: \" + fileName);\n }\n } else {\n canvas.showMessage(\"Please select a profile to change picture.\");\n }\n }\n\n if ((e.getSource() == addFriend || e.getSource() == tfAddFriend) && ! tfAddFriend.getText().equals(\"\")) {\n if (currentProfile != null){\n String friendName = tfAddFriend.getText();\n if (profileDB.containsProfile(friendName)){\n if (! currentProfile.toString().contains(friendName)){\n profileDB.getProfile(currentProfile.getName()).addFriend(friendName);\n profileDB.getProfile(friendName).addFriend(currentProfile.getName());\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(friendName + \" added as a friend.\");\n } else {\n canvas.showMessage(currentProfile.getName() + \" already has \" + friendName + \" as a friend.\");\n }\n } else {\n canvas.showMessage(friendName + \" does not exist.\");\n }\n } else {\n canvas.showMessage(\"Please select a profile to add friend.\");\n }\n }\n\t}", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "public String editEmploye(Employee emp){\n System.out.println(\"******* Edit employe ************\");\n System.out.println(emp.toString());\n employeeService.editEmployee(emp);\n sessionController.logInEmp();\n\n return \"/pages/childCareCenterDashboard.xhtml?faces-redirect=true\";\n }", "private void updateProfileViews() {\n if(profile.getmImageUrl()!=null && !profile.getmImageUrl().isEmpty()) {\n String temp = profile.getmImageUrl();\n Picasso.get().load(temp).into(profilePicture);\n }\n profileName.setText(profile.getFullName());\n phoneNumber.setText(profile.getPhoneNumber());\n address.setText(profile.getAddress());\n email.setText(profile.geteMail());\n initListToShow();\n }", "@RequestMapping(\"/editPass\")\r\n\tpublic ModelAndView editPass(@ModelAttribute(\"UserEditPassForm\") final UserEditPassForm form) {\r\n\t\treturn new ModelAndView(\"users/changePass\");\r\n\t}", "@Override\n\tpublic String editUser(Map<String, Object> reqs) {\n\t\treturn null;\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tif (!edited) {\n\t\t\t\t\t\topenEdit();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcloseEdit();\n\t\t\t\t\t\tif (newly) {\n\t\t\t\t\t\t\tnewly = false;\n\t\t\t\t\t\t\tvo = getUserVO();\n\t\t\t\t\t\t\tUserController.add(vo);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUserController.modify(vo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@RequestMapping(value = { \"/edit-{id}\" }, method = RequestMethod.GET)\n\tpublic String editEntity(@PathVariable ID id, ModelMap model,\n\t\t\t@RequestParam(required = false) Integer idEstadia) {\n\t\tENTITY entity = abm.buscarPorId(id);\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", true);\n\n\t\tif(idEstadia != null){\n\t\t\tmodel.addAttribute(\"idEstadia\", idEstadia);\n\t\t}\n\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}", "private void showEditForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n Customer customerEdit = CustomerDao.getCustomer(id);\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"customer/editCustomer.jsp\");\n dispatcher.forward(request, response);\n }", "public void loadProfileWindowEdit(DonorReceiver account) throws IOException {\n\n // Only load new window if childWindowToFront fails.\n if (!App.childWindowToFront(account)) {\n\n // Set the selected donorReceiver for the profile pane and confirm child.\n ViewProfilePaneController.setAccount(account);\n ViewProfilePaneController.setIsChild(true);\n\n // Create new pane.\n FXMLLoader loader = new FXMLLoader();\n AnchorPane profilePane = loader.load(getClass().getResourceAsStream(PageNav.VIEW));\n\n // Create new scene.\n Scene profileScene = new Scene(profilePane);\n\n // Create new stage.\n Stage profileStage = new Stage();\n profileStage.setTitle(\"Profile for \" + account.getUserName());\n profileStage.setScene(profileScene);\n profileStage.show();\n profileStage.setX(App.getWindow().getX() + App.getWindow().getWidth());\n\n App.addChildWindow(profileStage, account);\n\n loadEditWindow(account, profilePane, profileStage);\n }\n }", "@Override\n\tpublic void edit(HttpServletRequest request,HttpServletResponse response) {\n\t\tint id=Integer.parseInt(request.getParameter(\"id\"));\n\t\tQuestionVo qv=new QuestionVo().getInstance(id);\n\t\tcd.edit(qv);\n\t\ttry{\n\t\t\tresponse.sendRedirect(\"Admin/question.jsp\");\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t}", "public static EditProfileDialogue newInstance(){\n EditProfileDialogue dialogue = new EditProfileDialogue();\n\n Log.d(TAG, \"newInstance: NO ARGUMENTS because we are creating new profile.\" );\n return dialogue;\n }", "@Override\n public void onCancel() {\n Log.d(TAG, \"User cancelled Edit Profile.\");\n Toast.makeText(getBaseContext(), getString(R.string.editFailure), Toast.LENGTH_SHORT)\n .show();\n }", "@RequestMapping(value = { \"/edit-module-{code}\" }, method = RequestMethod.GET)\n\t\tpublic String editModule(@PathVariable String code, ModelMap model) {\n\n\t\t\tmodel.addAttribute(\"students\", studentService.listAllStudents());\n\t\t\tmodel.addAttribute(\"teachers\", teacherService.listAllTeachers());\n\t\t\tModule module = moduleService.findByCode(code);\n\t\t\tmodel.addAttribute(\"module\", module);\n\t\t\tmodel.addAttribute(\"edit\", true);\n\t\t\t\n\t\t\treturn \"addStudentToModule\";\n\t\t}", "@Action( value=\"editAdmin\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editAdmin() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ getNick()+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t \n }\n rol=\"ADMIN\";\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}", "@GetMapping(\"/{id}/edit\")\n public String edit(Model model,\n @PathVariable(\"id\") long id) {\n model.addAttribute(CUSTOMER, customerService.showCustomerById(id));\n return CUSTOMERS_EDIT;\n }", "public CustomerProfileDTO editCustomerProfile(CustomerProfileDTO customerProfileDTO)throws EOTException;", "private void editUserCard() {\n getUserCard();\n }" ]
[ "0.8270031", "0.7965229", "0.79234904", "0.76511425", "0.74334943", "0.71983594", "0.7162056", "0.70192707", "0.69591856", "0.6929046", "0.6915364", "0.6878458", "0.6852421", "0.67684793", "0.6747677", "0.67057973", "0.6697023", "0.66346276", "0.66334015", "0.6615053", "0.65685976", "0.65030265", "0.64734995", "0.64462805", "0.6428274", "0.6425246", "0.63991815", "0.6375194", "0.636173", "0.63553226", "0.6294758", "0.62942475", "0.6282849", "0.6239091", "0.62248427", "0.6219395", "0.6218075", "0.6210781", "0.62030315", "0.6201165", "0.6198044", "0.6154159", "0.6145304", "0.6099601", "0.6079557", "0.60655034", "0.6065447", "0.60496145", "0.6035457", "0.60354406", "0.60143936", "0.60055774", "0.59935117", "0.59900784", "0.5955101", "0.5947932", "0.5947906", "0.59380764", "0.59376734", "0.5923852", "0.5922526", "0.59201294", "0.59168047", "0.59148896", "0.5901659", "0.58910877", "0.58872014", "0.5872259", "0.58703834", "0.58702976", "0.58672297", "0.58671945", "0.5860779", "0.5853265", "0.58463305", "0.58445054", "0.5843422", "0.5842702", "0.5837169", "0.5820364", "0.5815735", "0.57970405", "0.57954645", "0.57695115", "0.57627624", "0.574927", "0.57472616", "0.57302064", "0.5728042", "0.57265663", "0.5725789", "0.57229525", "0.5721176", "0.5710116", "0.57067496", "0.5704283", "0.57013524", "0.5700761", "0.56922126", "0.5688863", "0.5685667" ]
0.0
-1
Button Click Event for Edit Profile Button
public void mmAddFriendClick(ActionEvent event) throws Exception{ displayManageFriendsGroups(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }", "void gotoEditProfile();", "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "public void saveProfileEditData() {\r\n\r\n }", "@Override\n\t\t\t// On click function\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent(view.getContext(),\n\t\t\t\t\t\tEditProfileActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "void gotoEditProfile(String fbId);", "void onEditClicked();", "public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }", "public void editProfile(View v) {\n //Create map of all old info\n final Map tutorInfo = getTutorInfo();\n\n InputMethodManager imm = (InputMethodManager) this.getSystemService(Service.INPUT_METHOD_SERVICE);\n\n //Create animations\n final Animation animTranslate = AnimationUtils.loadAnimation(this, R.anim.translate);\n final Animation revTranslate = AnimationUtils.loadAnimation(this, R.anim.reverse_translate);\n\n //Enable Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.clearFocus();\n bioField.setTextIsSelectable(true);\n bioField.setEnabled(true);\n bioField.setBackgroundResource(android.R.color.black);\n imm.showSoftInput(bioField, 0);\n\n //Hide edit button\n v.startAnimation(animTranslate);\n v.setVisibility(View.GONE);\n\n //Show add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.VISIBLE);\n\n\n //Show save button\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveDialogue(tutorInfo);\n }\n });\n saveButton.startAnimation(revTranslate);\n saveButton.setVisibility(View.VISIBLE);\n\n enableSkillButtons();\n }", "private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "public void clickUpdateProfileLink()\n\t{\n \telementUtils.performElementClick(wbUpdateProfileLink);\n\t}", "@FXML\r\n\tpublic void viewProfile(ActionEvent event)\r\n\t{\r\n\t\t// TODO Autogenerated\r\n\t}", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}", "@Override\n public void onClick(View v) {\n Log.d(\"prof\",\"edit\");\n editDetails();\n// btn_prof_save.setVisibility(View.VISIBLE);\n// btn_prof_edit.setVisibility(View.INVISIBLE);\n }", "public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == statusfield || e.getActionCommand().equals(\"Change Status\")) {\n\t\t\tupdateStatus();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getSource() == picturefield || e.getActionCommand().equals(\"Change Picture\")) {\n\t\t\tupdatePicture();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getSource() == friendfield || e.getActionCommand().equals(\"Add Friend\")) {\n\t\t\taddFriend();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Add\")) {\n\t\t\taddName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Delete\")) {\n\t\t\tdeleteName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\telse if (e.getActionCommand().equals(\"Lookup\")) {\n\t\t\tlookUpName();\n\t\t\t//showCurrentProfile();\n\t\t}\n\t\t\t\n\t}", "public void selectEditProfileOption() {\n\t\ttry {\n\t\t\t//Utility.wait(editProfile);\n\t\t\teditProfile.click();\n\t\t\tLog.addMessage(\"Edit Profile option selected\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to select EditProfile option\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to select EditProfile option\");\n\t\t}\n\t}", "public void clickEditButton(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-tab-panel-noborder') and not(contains(@class,'x-hide-display'))]//button[contains(@class,'icon-ov-edit')]\").click();\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tIntent i = new Intent(NewProfileActivity.this,\n\t\t\t\t\t\tTBDispContacts.class);\n\t\t\t\ti.putExtra(\"Edit\", \"true\");\n\t\t\t\ti.putExtra(\"Details\", \"false\");\n\t\t\t\tstartActivity(i);\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == add && ! tfName.getText().equals(\"\")){\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" already exists.\");\n } else {\n FacePamphletProfile profile = new FacePamphletProfile(tfName.getText());\n profileDB.addProfile(profile);\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"New profile with the name \" + name + \" created.\");\n currentProfile = profile;\n }\n }\n if (e.getSource() == delete && ! tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (! profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" does not exist.\");\n } else {\n profileDB.deleteProfile(name);\n canvas.showMessage(\"Profile of \" + name + \" deleted.\");\n currentProfile = null;\n }\n }\n\n if (e.getSource() == lookUp && !tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"Displaying \" + name);\n currentProfile = profileDB.getProfile(name);\n } else {\n canvas.showMessage(\"A profile with the mane \" + name + \" does not exist\");\n currentProfile = null;\n }\n }\n\n if ((e.getSource() == changeStatus || e.getSource() == tfChangeStatus) && ! tfChangeStatus.getText().equals(\"\")){\n if (currentProfile != null){\n String status = tfChangeStatus.getText();\n profileDB.getProfile(currentProfile.getName()).setStatus(status);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Status updated.\");\n } else {\n canvas.showMessage(\"Please select a profile to change status.\");\n }\n }\n\n if ((e.getSource() == changePicture || e.getSource() == tfChangePicture) && ! tfChangePicture.getText().equals(\"\")){\n if (currentProfile != null){\n String fileName = tfChangePicture.getText();\n GImage image;\n try {\n image = new GImage(fileName);\n profileDB.getProfile(currentProfile.getName()).setImage(image);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Picture updated.\");\n } catch (ErrorException ex){\n canvas.showMessage(\"Unable to open image file: \" + fileName);\n }\n } else {\n canvas.showMessage(\"Please select a profile to change picture.\");\n }\n }\n\n if ((e.getSource() == addFriend || e.getSource() == tfAddFriend) && ! tfAddFriend.getText().equals(\"\")) {\n if (currentProfile != null){\n String friendName = tfAddFriend.getText();\n if (profileDB.containsProfile(friendName)){\n if (! currentProfile.toString().contains(friendName)){\n profileDB.getProfile(currentProfile.getName()).addFriend(friendName);\n profileDB.getProfile(friendName).addFriend(currentProfile.getName());\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(friendName + \" added as a friend.\");\n } else {\n canvas.showMessage(currentProfile.getName() + \" already has \" + friendName + \" as a friend.\");\n }\n } else {\n canvas.showMessage(friendName + \" does not exist.\");\n }\n } else {\n canvas.showMessage(\"Please select a profile to add friend.\");\n }\n }\n\t}", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "private void profileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getUserProfileController();\n }", "public ViewResumePage clickonedit() throws Exception{\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(edit);\r\n\t\t\t\tflag = element.isDisplayed() && element.isEnabled();\r\n\t\t\t\tAssert.assertTrue(flag, \"Edit button is not displayed\");\r\n\t\t\t\telement.click();\r\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Edit Button NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\treturn new ViewResumePage(driver);\r\n\t\t\r\n\t}", "public void clickEditLink() {\r\n\t\tbtn_EditLink.click();\r\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t case R.id.edit_profile:\n\t editProfileAlertDialog();\n\t return true;\n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}", "public void clickUserProfile(){\r\n driver.findElement(userTab).click();\r\n driver.findElement(profileBtn).click();\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\tString cmd = e.getActionCommand();\n\t\tString inputName = nameField.getText();\n\t\t\n\t\tswitch(cmd) {\n\t\tcase \"Add\":\n\t\t\taddProfile(inputName);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Delete\":\n\t\t\tdeleteProfile(inputName);\n\t\t\tbreak;\n\t\t\t \n\t\tcase \"Lookup\":\n\t\t\tlookUp(inputName);\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Status\":\n\t\t\tupdateStatus();\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Picture\":\n\t\t\tupdatePicture();\n\t\t\tbreak;\n\t\t\t\n\t\tcase \"Friend\":\n\t\t\taddFriend();\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public void onPressEdit() {\r\n Intent intent = new Intent(this, CreateEventActivity.class);\r\n intent.putExtra(CreateEventActivity.EXTRA_EDIT_EVENT_UID, event.uid);\r\n startActivity(intent);\r\n }", "public void editProfile(View view){\n Intent intent = new Intent(this, EditProfileActivity.class);\n intent.putExtra(\"MY_NAME\", nameStr);\n intent.putExtra(\"MY_DESCRIPTION\", descriptionStr);\n intent.putExtra(\"MY_LOCATION\", locationStr);\n startActivityForResult(intent, 1);\n }", "public void editBtnOnclick()\r\n\t{\r\n\t\tif(cardSet.getCards().size() != 0)\r\n\t\t\tMainRunner.getSceneSelector().switchToCardEditor();\r\n\t}", "public void editButtonClicked() {\n setButtonsDisabled(false, true, true);\n setAllFieldsAndSliderDisabled(false);\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tif (!edited) {\n\t\t\t\t\t\topenEdit();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcloseEdit();\n\t\t\t\t\t\tif (newly) {\n\t\t\t\t\t\t\tnewly = false;\n\t\t\t\t\t\t\tvo = getUserVO();\n\t\t\t\t\t\t\tUserController.add(vo);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUserController.modify(vo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_edit) {\n Intent intent = new Intent(this, editProfile.class);\n startActivity(intent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void clickOnEditButton() {\r\n\t\tsafeClick(addMarkerOkButton.replace(\".ant-modal-footer button.ant-btn.ant-btn-primary\",\r\n\t\t\t\t\".ant-btn.ant-btn-primary.ant-btn-circle\"), SHORTWAIT);\r\n\t}", "@FXML\n private void editSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"Edit DonorReceiver\");\n } else {\n EditPaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.EDIT);\n }\n }", "public String gotoeditprofile() throws IOException {\n\t\treturn \"editProfil.xhtml?faces-redirect=true\";\n\t}", "@Override\n public void onClick(View view) {\n Intent i = new Intent(view.getContext(), EditProfil.class);\n i.putExtra(\"fullName\", nameTextView.getText().toString());\n i.putExtra(\"email\", emailTextView.getText().toString());\n i.putExtra(\"phone\",phoneTextView.getText().toString());\n startActivity(i);\n }", "@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}", "public void editProfile() {\n dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.edit_profile);\n\n editUsername = dialog.findViewById(R.id.tv_uname);\n TextView editEmail = dialog.findViewById(R.id.tv_address);\n editImage = dialog.findViewById(R.id.imgUser);\n\n editUsername.setText(user.getUserID());\n editEmail.setText(user.getEmail());\n editEmail.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Email cannot be changed.\", Toast.LENGTH_SHORT).show();\n }\n });\n decodeImage(user.getProfilePic(), editImage);\n editImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3);\n }\n });\n\n TextView save = dialog.findViewById(R.id.save_edit);\n save.setOnClickListener(new View.OnClickListener() { // save changes\n @Override\n public void onClick(View v) {\n String username = editUsername.getText().toString();\n if(username.equals(\"\")) {\n Toast.makeText(getContext(), \"Username cannot be null\", Toast.LENGTH_SHORT).show();\n return;\n } else if (!checkUsername(username)) {\n Toast.makeText(getContext(), \"Username already exists\", Toast.LENGTH_SHORT).show();\n return;\n }\n user.setUserID(username);\n if(profilePicChanged) {\n user.setProfilePic(profilePic);\n profilePic = null;\n profilePicChanged = false;\n }\n docRef.set(user);\n dialog.dismiss();\n loadDataFromDB();\n }\n });\n\n TextView cancel = dialog.findViewById(R.id.cancel_edit);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss(); // cancel changes\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n }", "@Override\n public void onProfileClick(int position) {\n Log.d(TAG, \"onProfileClick: \" + position);\n Profile profile = mList.get(position);\n\n Intent intent = new Intent(CatalogActivity.this, EditorActivity.class);\n intent.putExtra(EDITOR_ACTIVITY_VALUE_EXTRA, profile.getProfileValues());\n startActivityForResult(intent, EDITOR_ACTIVITY_UPDATE_REQUEST_CODE);\n //overridePendingTransition( R.anim.left_to_right,R.anim.right_to_left);\n }", "public void editDogButtonClicked() {\r\n if (areFieldsNotBlank()) {\r\n viewModel.editDog();\r\n viewHandler.openView(\"home\");\r\n dogNameField.setStyle(null);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n startActivity(new Intent(EditProfile.this, ProfilePage.class));\n onPause();\n return super.onOptionsItemSelected(item);\n }", "public void Admin_Configuration_EmailSubscriptions_Editbtn()\n\t{\n\t\tAdmin_Configuration_EmailSubscriptions_Editbtn.click();\n\t}", "public void editButtonClicked(){\n String first = this.firstNameInputField.getText();\n String last = this.lastNameInputField.getText();\n String email = this.emailInputField.getText();\n String dep = \"\";\n String role=\"\";\n if(this.departmentDropdown.getSelectionModel().getSelectedItem() == null){\n dep= this.departmentDropdown.promptTextProperty().get();\n //this means that the user did not change the dropdown\n \n }else{\n dep = this.departmentDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.roleDropdown.getSelectionModel().getSelectedItem()== null){\n role = this.roleDropdown.promptTextProperty().get();\n }else{\n role = this.roleDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.isDefaultValue(first) && \n this.isDefaultValue(last) && \n this.isDefaultValue(email) && \n this.isDefaultValue(role) && \n this.isDefaultValue(dep)){\n //this is where we alert the user that no need for update is needed\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setContentText(\"User information has not changed...no update performed\");\n alert.showAndWait();\n \n }else{\n \n if(this.userNameLabel.getText().equals(\"User\")){\n System.out.println(\"This is empty\");\n }else{\n //create a new instance of the connection class\n this.dbConnection = new Connectivity();\n //this is where we do database operations\n if(this.dbConnection.ConnectDB()){\n //we connected to the database \n \n boolean update= this.dbConnection.updateUser(first, last, email, dep,role , this.userNameLabel.getText());\n \n \n }else{\n System.out.println(\"Could not connect to the database\");\n }\n \n }\n }\n }", "public void onClick(View view) {\n Log.d(\"Edit\",\"EDITED\");\n }", "@OnClick(R.id.setUserProfileEdits)\n public void onConfirmEditsClick() {\n if (UserDataProvider.getInstance().getCurrentUserType().equals(\"Volunteer\")){\n addSkills();\n addCauses();\n }\n updateUserData();\n // get intent information from previous activity\n\n// Intent intent = new Intent(getApplicationContext(), LandingActivity.class);\n\n\n// intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n finish();\n// startActivity(intent);\n }", "private void setUpProfileButton() {\n profileButton = (ImageButton) findViewById(R.id.profile_button);\n profileButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startProfilePageActivity();\n }\n });\n }", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.btn_save:\n\t\ttxtt1 = (etxt1.getText().toString());\n\t\ttxtt2 = (etxt2.getText().toString());\n\t\ttxtt3 = (etxt3.getText().toString());\n\t\ttxtt4 = (etxt4.getText().toString());\n\t\ttxtt5 = (etxt5.getText().toString());\n\t\ttxtt6 = (etxt6.getText().toString());\n\t\ttxtt7 = (etxt7.getText().toString());\n\t\ttxtt8 = (etxt8.getText().toString());\n\t\tIntent R = new Intent(getApplicationContext(),ProfileActivity.class);\n\t\tR.putExtra(\"txtt1\", txtt1);\n\t\tR.putExtra(\"txtt2\", txtt2);\n\t\tR.putExtra(\"txtt3\", txtt3);\n\t\tR.putExtra(\"txtt4\", txtt4);\n\t\tR.putExtra(\"txtt5\", txtt5);\n\t\tR.putExtra(\"txtt6\", txtt6);\n\t\tR.putExtra(\"txtt7\", txtt7);\n\t\tR.putExtra(\"txtt8\", txtt8);\n\t\tstartActivity(R);\n\t\tbreak;\n\t\tdefault:\n\t\tbreak;\n\t\t}\n\t}", "public EditTeamPage pressEditButton() {\n controls.getEditButton().click();\n return new EditTeamPage();\n }", "public void setEditButtonPresentListener(EditButtonPresentListener listener);", "@Override\n public void edit(User user) {\n }", "public void OnSetAvatarButton(View view){\n Intent intent = new Intent(getApplicationContext(),ProfileActivity.class);\n startActivityForResult(intent,0);\n }", "private void profileButton1ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "@FXML\n private void handleEditPerson() {\n Shops selectedShops = personTable.getSelectionModel().getSelectedItem();\n if (selectedShops != null) {\n boolean okClicked = mainApp.showPersonEditDialog(selectedShops);\n if (okClicked) {\n showPersonDetails(selectedShops);\n }\n\n } else {\n // Nothing selected.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"No Selection\");\n alert.setHeaderText(\"No Shops Selected\");\n alert.setContentText(\"Please select a person in the table.\");\n \n alert.showAndWait();\n }\n }", "private void profileButton2ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 1).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "private void hitEditProfileApi() {\n appUtils.showProgressDialog(getActivity(), false);\n HashMap<String, String> params = new HashMap<>();\n params.put(ApiKeys.NAME, etFirstName.getText().toString().trim());\n params.put(ApiKeys.PHONE_NO, etPhoneNo.getText().toString().trim());\n params.put(ApiKeys.ADDRESS, etAdress.getText().toString().trim());\n params.put(ApiKeys.POSTAL_CODE, etPostal.getText().toString().trim());\n\n if (countryId != null) {\n params.put(ApiKeys.COUNTRY, countryId);\n }\n if (stateId != null) {\n params.put(ApiKeys.STATE, stateId);\n }\n if (cityId != null) {\n params.put(ApiKeys.CITY, cityId);\n }\n\n ApiInterface service = RestApi.createService(ApiInterface.class);\n Call<ResponseBody> call = service.editProfile(AppSharedPrefs.getInstance(getActivity()).\n getString(AppSharedPrefs.PREF_KEY.ACCESS_TOKEN, \"\"), appUtils.encryptData(params));\n ApiCall.getInstance().hitService(getActivity(), call, new NetworkListener() {\n @Override\n public void onSuccess(int responseCode, String response) {\n try {\n JSONObject mainObject = new JSONObject(response);\n if (mainObject.getInt(ApiKeys.CODE) == 200) {\n JSONObject dataObject = mainObject.getJSONObject(\"DATA\");\n changeEditMode(false);\n isEditModeOn = false;\n ((EditMyAccountActivity) getActivity()).setEditButtonLabel(getString(R.string.edit));\n\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_NAME, dataObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_MOBILE, dataObject.getString(ApiKeys.MOBILE_NUMBER));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ADDRESS, dataObject.getString(ApiKeys.ADDRESS));\n JSONObject countryObject = dataObject.getJSONObject(ApiKeys.COUNTRY_ID);\n JSONObject stateObject = dataObject.getJSONObject(ApiKeys.STATE_ID);\n JSONObject cityObject = dataObject.getJSONObject(ApiKeys.CITY_ID);\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_NAME, countryObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_NAME, stateObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_NAME, cityObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ISO_CODE, countryObject.getString(ApiKeys.ISO_CODE));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_ID, countryObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_ID, stateObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_ID, cityObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.POSTAL_CODE, dataObject.optString(ApiKeys.POSTAL_CODE));\n\n } else if (mainObject.getInt(ApiKeys.CODE) == ApiKeys.UNAUTHORISED_CODE) {\n appUtils.logoutFromApp(getActivity(), mainObject.optString(ApiKeys.MESSAGE));\n } else {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), mainObject.optString(ApiKeys.MESSAGE));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onSuccessErrorBody(String response) {\n\n }\n\n @Override\n public void onFailure() {\n\n }\n });\n\n }", "@Override\n public void onClick(View view) {\n\n\n\n userDetail.setFname(fname.getText().toString());\n userDetail.setLname(lname.getText().toString());\n userDetail.setAge(Integer.parseInt(age.getText().toString()));\n userDetail.setWeight(Double.valueOf(weight.getText().toString()));\n userDetail.setAddress(address.getText().toString());\n\n try {\n new EditUserProfile(editUserProfileURL,getActivity(),userDetail).execute();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Toast.makeText(getActivity(), \"Saved Profile Successfully\",\n Toast.LENGTH_SHORT).show();\n getFragmentManager().popBackStack();\n\n }", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "@FXML\r\n\tprivate void editEmployee(ActionEvent event) {\r\n\t\tbtEditar.setDisable(true);\r\n\t\tbtGuardar.setDisable(false);\r\n\t\tconmuteFields();\r\n\t}", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_profile);\n toolbar_profile = findViewById(R.id.pro_toolbar);\n setTitle(\"My Profile\");\n setSupportActionBar(toolbar_profile);\n\n proname = findViewById(R.id.profile_name);\n profoi = findViewById(R.id.profile_foi);\n proorg = findViewById(R.id.profile_orga);\n\n currentId=String.valueOf(Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID));\n //load user information\n userInfo();\n editProfile = findViewById(R.id.editprofile);\n editProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(Profile.this,Profile_Edit.class));\n }\n });\n }", "@FXML\n\tpublic void editClicked(ActionEvent e) {\n\t\tMain.getInstance().navigateToDialog(\n\t\t\t\tConstants.EditableCourseDataViewPath, course);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_edit:\n Intent intent = new Intent(getApplicationContext(), ProfileEditActivity.class);\n intent.putExtra(\"userName\", userName);\n startActivity(intent);\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 }", "@Override\n public void onClick(View view) {\n updatePerson();\n }", "public void clickOnProfile() {\n\t\telement(\"link_profile\").click();\n\t\tlogMessage(\"User clicks on Profile on left navigation bar\");\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tupdateUserDetails();\n\t\t\t\t}", "@FXML\n public void StudentSaveButtonPressed(ActionEvent e) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {\n AlertHandler ah = new AlertHandler();\n if (editMode){\n System.out.println(\"edit mode on: choosing student update\");\n if(txfFirstName.isDisabled()){\n ah.getError(\"Please edit student information\", \"Enable Student editing fields for saving\", \"Please edit before saving\");\n System.out.println(\"please edit data before saving to database\");\n } else {\n System.out.println(\"requesting confirmation for editing data to database\");\n confirmStudentUpdate();\n }\n }\n else {\n System.out.println(\"Edit mode off: choosing student insert\");\n confirmStudentInsert();\n }\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getContext(), ProfileActivity.class);\n startActivity(intent);\n\n }", "@Override\n public void onClick(View v) {\n\t \tIntent myIntent = new Intent(MainActivity.this, Profile.class);\n\t \t//myIntent.putExtra(\"key\", value); //Optional parameters\n\t \tMainActivity.this.startActivity(myIntent);\n }", "private void edit() {\n\n\t}", "void onEditFragmentInteraction(Student student);", "private void editUserCard() {\n getUserCard();\n }", "@Then(\"user clicks on edit consignment\")\r\n\tpublic void user_clicks_on_edit_consignment() {\n\t\tWebElement element = Browser.session.findElement(By.xpath(\"//*[@id='consignments-rows']//button[1]\"));\r\n\t\telement.click();\r\n\t\telement = Browser.session.findElement(By.xpath(\"//a[text()='Edit consignment info']\"));\r\n\t\telement.click();\r\n\t}", "@Override\n public void onCancel() {\n Log.d(TAG, \"User cancelled Edit Profile.\");\n Toast.makeText(getBaseContext(), getString(R.string.editFailure), Toast.LENGTH_SHORT)\n .show();\n }", "public void editProfile(String username, String fname, String lname, String email, String phoneno, String newpw) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\"); \n\t callStmt = con.prepareCall(\" {call team5.customer_updateProfile_Proc(?,?,?,?,?,?,?,?,?)}\");\n\t callStmt.setString(1,phoneno);\n\t callStmt.setString(2,email);\n\t callStmt.setString(3,fname);\n\t callStmt.setString(4,lname);\n\t callStmt.setString(5,\"Y\");\n\t callStmt.setString(6,\"Y\");\n\t callStmt.setString(7,username);\n\t callStmt.setString(8,newpw);\n\t callStmt.setInt(9,this.id);\n\t callStmt.execute();\n\t \n\t callStmt.close();\n\t }", "private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }", "@FXML\n void setBtnEditOnClick() {\n isEdit = true;\n isAdd = false;\n isDelete = false;\n }", "public void clickEdit(int editBtnIndex)\n\t{\n\t\t\n\t\tList<WebElement> editBtns=driver.findElements(By.xpath(\"//img[@title='Edit' and @src='/cmscockpit/cockpit/images/icon_func_edit.png']\"));\n\t\tif(editBtns!=null&&editBtns.size()>0)\n\t\t{\n\t\t\teditBtns.get(editBtnIndex).click();\n\t\t}\n\t}", "public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n SharedPreferences.Editor p_editor = myPrefs.edit();\n User viewProf = profiles.get(position);\n p_editor.putString(\"view_email\", viewProf.getUsername());\n p_editor.commit();\n main.viewProfile(position);\n }", "public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }", "private void profileButton3ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 2).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "public void DoEdit() {\n \n int Row[] = tb_User.getSelectedRows();\n if (Row.length > 1) {\n JOptionPane.showMessageDialog(null, \"You can choose only one user edit at same time!\");\n return;\n }\n if (tb_User.getSelectedRow() >= 0) {\n EditUser eu = new EditUser(this);\n eu.setVisible(true);\n\n } else {\n JOptionPane.showMessageDialog(null, \"You have not choose any User to edit\");\n }\n }", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "protected void enterEditMode(){\n saveButton.setVisibility(View.VISIBLE);\n //when editMode is active, allow user to input in editTexts\n //By default have the editTexts not be editable by user\n editName.setEnabled(true);\n editEmail.setEnabled(true);\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n userReference = FirebaseDatabase.getInstance().getReference(\"Users\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid());\n\n user = FirebaseAuth.getInstance().getCurrentUser();\n\n user.updateEmail(String.valueOf(editEmail.getText()))\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n userReference.child(\"name\").setValue(editName.getText().toString());\n userReference.child(\"email\").setValue(editEmail.getText().toString());\n final String TAG = \"EmailUpdate\";\n Log.d(TAG, \"User email address updated.\");\n Toast.makeText(getActivity().getApplicationContext(), \"Saved\", Toast.LENGTH_SHORT).show();\n }\n else {\n FirebaseAuthException e = (FirebaseAuthException)task.getException();\n Toast.makeText(getActivity().getApplicationContext(), \"Re-login to edit your profile!\", Toast.LENGTH_LONG).show();\n goToLoginActivity();\n }\n }\n });\n exitEditMode();\n\n }\n });\n }", "public void setEditButton(Button editButton) {\n\t\tthis.editButton = editButton;\n\t}", "@RequestMapping(value = \"/editAdminProfile\", method = RequestMethod.GET)\n\tpublic ModelAndView editAdminProfile(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser userProfile = endUserDAOImpl.findId(id);\n\n\t\tif (userProfile.getImageName() != null) {\n\t\t\tString type = ImageService.getImageType(userProfile.getImageName());\n\n\t\t\tString url = \"data:image/\" + type + \";base64,\" + Base64.encodeBase64String(userProfile.getImage());\n\t\t\tuserProfile.setImageName(url);\n\n\t\t\tendUserForm.setImageName(url);\n\t\t} else {\n\t\t\tendUserForm.setImageName(\"\");\n\t\t}\n\n\t\tendUserForm.setId(userProfile.getId());\n\t\tendUserForm.setDisplayName(userProfile.getDisplayName());\n\t\tendUserForm.setUserName(userProfile.getUserName());\n\t\tendUserForm.setAltContactNo(userProfile.getAltContactNo());\n\t\tendUserForm.setAltEmail(userProfile.getAltEmail());\n\t\tendUserForm.setContactNo(userProfile.getContactNo());\n\t\tendUserForm.setEmail(userProfile.getEmail());\n\n\t\tendUserForm.setPassword(userProfile.getPassword());\n\t\tendUserForm.setTransactionId(userProfile.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editAdminProfile\", \"model\", model);\n\n\t}", "private void profileButton5ActionPerformed(ActionEvent e) {\n // TODO add your code here\n ViewBuffer.setBuffer(\"\");\n ViewBuffer.setBuffer(this.list.get(this.page*6 + 4).getClientID());\n ViewMemberProfile.run();\n this.dispose();\n }", "public void editUser(User user) {\n\t\t\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tLog.e(\"edit pressed\", \"edit pressed\");\n\t\t\t\t\teditflag = !editflag;\n\t\t\t\t\tsetFieldEditFlag(editflag);\n\t\t\t\t\t//\tpicview1.setEnabled(true);\n\n\t\t\t\t}", "public void onClick(View view) {\n Log.d(\"Edit1\",\"EDITED1\");\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n updateProfile(interestsChanged, moreChanged, pictureChanged);\n\n }", "private void buttonAddFriends() {\n friendsButton.setText(\"Add Friends\");\n friendsButton.setOnClickListener(view -> launchProfilesActivity());\n profileOptions.setVisibility(View.VISIBLE);\n friendsView.setOnClickListener(view -> onFriendsClicked());\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "@Override\n public void onClick(View view) {\n launchGridProfile(view);\n }", "@Override\n public void onDialogPositiveClick(ProfileEditDialogFragment dialog) {\n String value = dialog.getValue();\n \n switch (this.field){\n case FIRST: updateFirst(value);\n break;\n case LAST: updateLast(value);\n break;\n case EMAIL: updateEmail(value);\n break;\n case STREET: updateStreet(value);\n break;\n case CITY: updateCity(value);\n break;\n case STATE: updateState(value);\n break;\n case ZIP: updateZip(value);\n break;\n case PHONE: updatePhone(value);\n break;\n default: break;\n }\n }" ]
[ "0.79937446", "0.79157114", "0.75828886", "0.7523918", "0.750002", "0.7464146", "0.72323287", "0.68849653", "0.6869256", "0.6788999", "0.6747457", "0.6682173", "0.66460633", "0.6600574", "0.6543046", "0.65113556", "0.6468568", "0.6460372", "0.6452631", "0.6438042", "0.64376545", "0.64302874", "0.64302534", "0.64124084", "0.6406122", "0.6403156", "0.6394218", "0.6392381", "0.63837796", "0.63718975", "0.63519716", "0.634627", "0.63151777", "0.63076544", "0.630195", "0.62865806", "0.62708557", "0.6264254", "0.62434363", "0.6241755", "0.62353176", "0.6186776", "0.6181874", "0.61750716", "0.61516654", "0.61452293", "0.614255", "0.6129672", "0.6108978", "0.61022425", "0.6100763", "0.6100386", "0.6075666", "0.6060904", "0.6057108", "0.60443485", "0.60335153", "0.6032323", "0.6014722", "0.601417", "0.60140437", "0.5999849", "0.59923786", "0.59888214", "0.5972685", "0.59622294", "0.59597707", "0.5953338", "0.5951165", "0.5947387", "0.5946286", "0.5943842", "0.5923653", "0.59231895", "0.5917144", "0.59004796", "0.5899999", "0.5892887", "0.5888587", "0.58884466", "0.5880316", "0.58673453", "0.58650476", "0.5862365", "0.58603376", "0.5858958", "0.58576995", "0.58538836", "0.5852827", "0.5851366", "0.58453906", "0.5843949", "0.5842495", "0.58420366", "0.5840951", "0.5840206", "0.5794391", "0.5789968", "0.5786431", "0.5786431", "0.5783926" ]
0.0
-1
Displays Edit Profile Page
public void displayManageFriendsGroups() throws Exception{ System.out.println("Username And Login Match"); currentStage.hide(); Stage primaryStage = new Stage(); System.out.println("Step 1"); Parent root = FXMLLoader.load(getClass().getResource("view/ManageFriendsGroups.fxml")); System.out.println("step 2"); primaryStage.setTitle("Manage Friends and Groups"); System.out.println("Step 3"); primaryStage.setScene(new Scene(root, 600, 400)); primaryStage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}", "public String gotoeditprofile() throws IOException {\n\t\treturn \"editProfil.xhtml?faces-redirect=true\";\n\t}", "void gotoEditProfile();", "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "@RequestMapping(value = \"/editAdminProfile\", method = RequestMethod.GET)\n\tpublic ModelAndView editAdminProfile(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser userProfile = endUserDAOImpl.findId(id);\n\n\t\tif (userProfile.getImageName() != null) {\n\t\t\tString type = ImageService.getImageType(userProfile.getImageName());\n\n\t\t\tString url = \"data:image/\" + type + \";base64,\" + Base64.encodeBase64String(userProfile.getImage());\n\t\t\tuserProfile.setImageName(url);\n\n\t\t\tendUserForm.setImageName(url);\n\t\t} else {\n\t\t\tendUserForm.setImageName(\"\");\n\t\t}\n\n\t\tendUserForm.setId(userProfile.getId());\n\t\tendUserForm.setDisplayName(userProfile.getDisplayName());\n\t\tendUserForm.setUserName(userProfile.getUserName());\n\t\tendUserForm.setAltContactNo(userProfile.getAltContactNo());\n\t\tendUserForm.setAltEmail(userProfile.getAltEmail());\n\t\tendUserForm.setContactNo(userProfile.getContactNo());\n\t\tendUserForm.setEmail(userProfile.getEmail());\n\n\t\tendUserForm.setPassword(userProfile.getPassword());\n\t\tendUserForm.setTransactionId(userProfile.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editAdminProfile\", \"model\", model);\n\n\t}", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "void gotoEditProfile(String fbId);", "@RequestMapping(value = { \"/edit-{loginID}-user\" }, method = RequestMethod.GET)\r\n public String edituser(@PathVariable String loginID, ModelMap model) {\r\n\r\n User user = service.findUserByLoginID(loginID);\r\n model.addAttribute(\"user\", user);\r\n model.addAttribute(\"edit\", true);\r\n return \"registration\";\r\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "public static void editProfile(String form, String ly) {\n\t\tboolean layout;\n\t\tif(ly == null || ly.equalsIgnoreCase(\"yes\"))\n\t\t\tlayout = true;\n\t\telse\n\t\t\tlayout = false;\n\t\t\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\t//set password into session\n\t\tsession.put(\"edit_password\", user.password);\n\t\t\n\t\tif(form == null)\n\t\t\tform = \"account\";\n\t\t\n\t\trender(user, userprofile, layout, form);\n\t}", "private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }", "public void saveProfileEditData() {\r\n\r\n }", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }", "public User editProfile(String firstName, String lastName, String username, String password, char type, char status)\n {\n return this.userCtrl.editProfile(username, password, firstName, lastName, type, status);\n }", "@RequestMapping(value = { \"/edit-user-{loginId}\" }, method = RequestMethod.GET)\n\tpublic String editUser(@PathVariable String loginId, ModelMap model) {\n\t\tUser user = userService.findByLoginId(loginId);\n\t\tmodel.addAttribute(\"user\", user);\n\t\tmodel.addAttribute(\"edit\", true);\n\t\treturn \"registration\";\n\t}", "@RequestMapping(\"edit\")\n\tpublic String edit(ModelMap model, HttpSession httpSession) {\n\t\tCustomer user = (Customer) httpSession.getAttribute(\"user\");\n\t\tmodel.addAttribute(\"user\", user);\n\t\treturn \"user/account/edit\";\n\t}", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "@Override\n public void edit(User user) {\n }", "@GetMapping(\"/profile/{id}/edit\")\n public String edit(Model model, @PathVariable long id, Model viewModel) {\n int unreadNotifications = unreadNotificationsCount(notiDao, id);\n\n model.addAttribute(\"alertCount\", unreadNotifications); // shows count for unread notifications\n viewModel.addAttribute(\"users\", userDao.getOne(id));\n model.addAttribute(\"users\", userDao.getOne(id));\n model.addAttribute(\"smoke\", smokeDao.getOne(id));\n\n return \"editprofile\";\n }", "@RequestMapping(\"/editUsr\")\r\n\tpublic ModelAndView editUsr(@ModelAttribute(\"UserEditForm\") final UserEditForm form) {\r\n\t\tModelAndView mav = new ModelAndView(\"users/edit\");\r\n\t\t// GET ACTUAL SESSION USER\r\n\t\tObject principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n\t\tUser user = us.findUserSessionByUsername(principal);\r\n\t\tmav.addObject(\"user\", user);\r\n\t\treturn mav;\r\n\t}", "@Override\n\tpublic void showProfile() {\n\t\t\n\t}", "public void editProfile(View view){\n Intent intent = new Intent(this, EditProfileActivity.class);\n intent.putExtra(\"MY_NAME\", nameStr);\n intent.putExtra(\"MY_DESCRIPTION\", descriptionStr);\n intent.putExtra(\"MY_LOCATION\", locationStr);\n startActivityForResult(intent, 1);\n }", "public void editProfile(View v) {\n //Create map of all old info\n final Map tutorInfo = getTutorInfo();\n\n InputMethodManager imm = (InputMethodManager) this.getSystemService(Service.INPUT_METHOD_SERVICE);\n\n //Create animations\n final Animation animTranslate = AnimationUtils.loadAnimation(this, R.anim.translate);\n final Animation revTranslate = AnimationUtils.loadAnimation(this, R.anim.reverse_translate);\n\n //Enable Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.clearFocus();\n bioField.setTextIsSelectable(true);\n bioField.setEnabled(true);\n bioField.setBackgroundResource(android.R.color.black);\n imm.showSoftInput(bioField, 0);\n\n //Hide edit button\n v.startAnimation(animTranslate);\n v.setVisibility(View.GONE);\n\n //Show add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.VISIBLE);\n\n\n //Show save button\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveDialogue(tutorInfo);\n }\n });\n saveButton.startAnimation(revTranslate);\n saveButton.setVisibility(View.VISIBLE);\n\n enableSkillButtons();\n }", "@GetMapping(\"/updateUser/{id}\")\n\t public String editUser(@PathVariable(\"id\") Long userId, Model model) {\n\t\t model.addAttribute(\"userId\", userId);\n\t\t return \"updatePage.jsp\";\n\t }", "public String fillEditPage() {\n\t\t\n\t\ttry{\n\t\t\t// Putting attribute of playlist inside the page to view it \n\t\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"playlist\", service.viewPlaylist());\n\t\t\t\n\t\t\t// Send user to EditPlaylistPage\n\t\t\treturn \"EditPlaylistPage\";\n\t\t}\n\t\t// Catch exceptions and send to ErrorPage\n\t\tcatch(Exception e) {\n\t\t\treturn \"ErrorPage.xhtml\";\n\t\t}\n\t}", "public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }", "@RequestMapping(value = \"/edit/{id}\", method = RequestMethod.GET)\n public String editStudent(ModelMap view, @PathVariable int id) {\n Student student = studentService.findById(id);\n view.addAttribute(\"student\", student);\n view.addAttribute(\"updateurl\", updateurl);\n return(\"editstudent\");\n }", "public void editProfile(String username, String fname, String lname, String email, String phoneno, String newpw) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\"); \n\t callStmt = con.prepareCall(\" {call team5.customer_updateProfile_Proc(?,?,?,?,?,?,?,?,?)}\");\n\t callStmt.setString(1,phoneno);\n\t callStmt.setString(2,email);\n\t callStmt.setString(3,fname);\n\t callStmt.setString(4,lname);\n\t callStmt.setString(5,\"Y\");\n\t callStmt.setString(6,\"Y\");\n\t callStmt.setString(7,username);\n\t callStmt.setString(8,newpw);\n\t callStmt.setInt(9,this.id);\n\t callStmt.execute();\n\t \n\t callStmt.close();\n\t }", "@GetMapping\n public String showProfilePage(Model model){\n user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\n model.addAttribute(\"profileForm\",ProfileForm.createProfileFormFromUser(user));\n model.addAttribute(\"image\",user.getProfileImage() != null);\n\n return PROFILE_PAGE_NAME;\n }", "public void editUser(User user) {\n\t\t\n\t}", "private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "@RequestMapping(value = \"/edituserdetails/{id}\", method = RequestMethod.GET)\n\n\tpublic ModelAndView editUserDetails(HttpServletRequest request, HttpSession session, @PathVariable int id,\n\t\t\t@ModelAttribute(\"edituser\") UserBean edituser, Model model) {\n\n\t\tString adminId = (String) request.getSession().getAttribute(\"adminId\");\n\t\tif (adminId != null) {\n\t\t\tUserBean user = userdao.getUserById(id);\n\t\t\tmodel.addAttribute(\"user\", user);\n\n\t\t\treturn new ModelAndView(\"editUserDetailsForm\");\n\t\t}\n\n\t\telse\n\t\t\treturn new ModelAndView(\"redirect:/Login\");\n\t}", "public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }", "public void selectEditProfileOption() {\n\t\ttry {\n\t\t\t//Utility.wait(editProfile);\n\t\t\teditProfile.click();\n\t\t\tLog.addMessage(\"Edit Profile option selected\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to select EditProfile option\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to select EditProfile option\");\n\t\t}\n\t}", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "@RequestMapping(value = \"/editAccountPage\", method = RequestMethod.GET)\n\tpublic String jobseekerEditAccount(Model m, HttpServletRequest req) {\n\t\tHttpSession session = req.getSession();\n\t\tString username = (String) session.getAttribute(\"username\");\n\t\tSystem.out.println(\"session username = \" + username);\n\t\tString firstname = (String) session.getAttribute(\"firstname\");\n\t\tm.addAttribute(\"firstname\", firstname);\n\t\tm.addAttribute(\"state\", \"editAccount\");\n\t\tSystem.out.println(\"I'm jobseeker editAccount\");\n\t\treturn \"js.editAccount\";\n\t\t// return \"redirect:../home\";\n\t}", "@GetMapping(\"/edit\")\r\n public String editView() {\r\n return \"modify\";\r\n }", "@RequestMapping(value = \"/editUser\", method = RequestMethod.GET)\n\tpublic ModelAndView editUser(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser endUser = endUserDAOImpl.findId(id);\n\n\t\tendUserForm.setId(endUser.getId());\n\t\tendUserForm.setBankId(endUser.getBankId());\n\t\tendUserForm.setRole(endUser.getRole());\n\t\tendUserForm.setContactNo(endUser.getContactNo());\n\t\tendUserForm.setEmail(endUser.getEmail());\n\t\tendUserForm.setDisplayName(endUser.getDisplayName());\n\t\t;\n\t\tendUserForm.setUserName(endUser.getUserName());\n\t\tendUserForm.setTransactionId(endUser.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editUser\", \"model\", model);\n\n\t}", "@RequestMapping(value = \"/editPersona\", method = RequestMethod.GET)\n\tpublic String showFormForUpdate(@RequestParam(\"id_persona\") int id_persona, Model model) {\n\t\tPersona Person = personaService.getPersona(id_persona);\n\t\tmodel.addAttribute(\"Person\", Person);\n\t\treturn \"editPersona\";\n\t}", "@GetMapping(\"/editUserInfo\")\n\tpublic String editUserInfo(@ModelAttribute(\"userInfo\")UserInfo userInfo, HttpSession session, RedirectAttributes redirectAttr, Model viewModel) {\n\t\tif(session.getAttribute(\"userId\") == null) {\n\t\t\tredirectAttr.addFlashAttribute(\"message\", \"You need to log in first!\");\n\t\t\treturn \"redirect:/auth\";\n\t\t}\n\t\tLong loginUserId = (Long)session.getAttribute(\"userId\"); //Login user\n\t\tUser loginUser = this.uServ.findUserById(loginUserId);\n\t\t\n\t\tUserInfo thisUserInfo = this.uServ.findSingleUserInfo(loginUser);\n\t\t\n\t\tviewModel.addAttribute(\"loguser\", loginUser);\n\t\tviewModel.addAttribute(\"userInfo\", thisUserInfo);\n\t\t\n\t\treturn \"EditUserInfo.jsp\";\n\t}", "public void showProfile() {\r\n\t\tprofile.setVisible(true);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_edit) {\n Intent intent = new Intent(this, editProfile.class);\n startActivity(intent);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_profile);\n toolbar_profile = findViewById(R.id.pro_toolbar);\n setTitle(\"My Profile\");\n setSupportActionBar(toolbar_profile);\n\n proname = findViewById(R.id.profile_name);\n profoi = findViewById(R.id.profile_foi);\n proorg = findViewById(R.id.profile_orga);\n\n currentId=String.valueOf(Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID));\n //load user information\n userInfo();\n editProfile = findViewById(R.id.editprofile);\n editProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(Profile.this,Profile_Edit.class));\n }\n });\n }", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "@RequestMapping(value = \"edit/{id}\", method = RequestMethod.POST)\r\n\tpublic ModelAndView edit(@ModelAttribute Person editedPerson, @PathVariable int id) \r\n\t{\r\n\t\tpersonService.updatePerson(editedPerson);\r\n\t\treturn new ModelAndView(\"addEditConfirm\", \"person\", editedPerson);\r\n\t}", "@RequestMapping(\"/su/profile\")\n\tpublic ModelAndView suprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.addObject(\"suinfo\", suinfoDAO.findSuinfoByPrimaryKey(yourtaskuser.getUserid()));\n\t\tmav.setViewName(\"profile/userprofile.jsp\");\n\t\treturn mav;\n\t}", "@RequestMapping(\"/admin/profile\")\n\tpublic ModelAndView adminprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.setViewName(\"profile/adminprofile.jsp\");\n\t\treturn mav;\n\t}", "@GetMapping(\"/person/edit/{id}\")\n public String editPerson(@PathVariable(\"id\") int id, Model model) {\n Optional<Person> person = personRepo.get(id);\n if (person.isPresent()) {\n model.addAttribute(\"person\", person.get());\n }\n return \"personForm\";\n }", "@RequestMapping (value = \"/edit\", method = RequestMethod.GET)\r\n public String edit (ModelMap model, Long id)\r\n {\r\n TenantAccount tenantAccount = tenantAccountService.find (id);\r\n Set<Role> roles =tenantAccount.getRoles ();\r\n model.put (\"tenantAccount\", tenantAccount);\r\n if (roles != null && roles.iterator ().hasNext ())\r\n {\r\n model.put (\"roleInfo\", roles.iterator ().next ());\r\n }\r\n return \"tenantAccount/edit\";\r\n }", "@RequestMapping(value = \"/edit/{objectid}\", method = RequestMethod.GET)\n public String edit(@PathVariable String objectid, Model model) {\n DataObject object = dataObjectRepository.findOne(Long.valueOf(objectid));\n model.addAttribute(\"object\", object);\n model.addAttribute(\"roles\", getAllRoles());\n return \"object/edit\";\n }", "public String edit() {\n return \"edit\";\n }", "public void editProfile() {\n dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.edit_profile);\n\n editUsername = dialog.findViewById(R.id.tv_uname);\n TextView editEmail = dialog.findViewById(R.id.tv_address);\n editImage = dialog.findViewById(R.id.imgUser);\n\n editUsername.setText(user.getUserID());\n editEmail.setText(user.getEmail());\n editEmail.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Email cannot be changed.\", Toast.LENGTH_SHORT).show();\n }\n });\n decodeImage(user.getProfilePic(), editImage);\n editImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3);\n }\n });\n\n TextView save = dialog.findViewById(R.id.save_edit);\n save.setOnClickListener(new View.OnClickListener() { // save changes\n @Override\n public void onClick(View v) {\n String username = editUsername.getText().toString();\n if(username.equals(\"\")) {\n Toast.makeText(getContext(), \"Username cannot be null\", Toast.LENGTH_SHORT).show();\n return;\n } else if (!checkUsername(username)) {\n Toast.makeText(getContext(), \"Username already exists\", Toast.LENGTH_SHORT).show();\n return;\n }\n user.setUserID(username);\n if(profilePicChanged) {\n user.setProfilePic(profilePic);\n profilePic = null;\n profilePicChanged = false;\n }\n docRef.set(user);\n dialog.dismiss();\n loadDataFromDB();\n }\n });\n\n TextView cancel = dialog.findViewById(R.id.cancel_edit);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss(); // cancel changes\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n }", "@Action( value=\"editUser\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editUser() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ (String) contexto.getSession().get(\"loginId\")+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t rol=result1.getString(\"tipo\");\n }\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}", "@Execute(validator = true, input = \"error.jsp\", urlPattern = \"editpage/{crudMode}/{id}\")\n /* CRUD COMMENT: END */\n /* CRUD: BEGIN\n @Execute(validator = true, input = \"error.jsp\", urlPattern = \"editpage/{crudMode}/{${table.primaryKeyPath}}\")\n CRUD: END */\n public String editpage() {\n if (crudTableForm.crudMode != CommonConstants.EDIT_MODE) {\n throw new ActionMessagesException(\"errors.crud_invalid_mode\",\n new Object[] { CommonConstants.EDIT_MODE,\n crudTableForm.crudMode });\n }\n \n loadCrudTable();\n \n return \"edit.jsp\";\n }", "@RequestMapping(value = {\"/profile\"})\n @PreAuthorize(\"hasRole('logon')\")\n public String showProfile(HttpServletRequest request, ModelMap model)\n {\n User currentUser = userService.getPrincipalUser();\n model.addAttribute(\"currentUser\", currentUser);\n return \"protected/profile\";\n }", "@Override\n\t\t\t// On click function\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent(view.getContext(),\n\t\t\t\t\t\tEditProfileActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "@RequestMapping(\"/edit/{id}\")\r\n\tpublic ModelAndView editUser(@PathVariable int id,\r\n\t\t\t@ModelAttribute Employee employee) {\r\n\t\tSystem.out.println(\"------------- redirecting to emp edit page --------------\" + employee);\r\n\t\tEmployee employeeObject = dao.getEmployee(id);\r\n\t\treturn new ModelAndView(\"edit\", \"employee\", employeeObject);\r\n\t}", "private String renderEditPage(Model model, VMDTO vmdto) {\n\t\tmodel.addAttribute(\"vmDto\", vmdto);\n\t\tmodel.addAttribute(\"availableProviders\", providerService.getAllProviders());\n\t\treturn \"vm/edit\";\n\t}", "@FXML\r\n\tpublic void viewProfile(ActionEvent event)\r\n\t{\r\n\t\t// TODO Autogenerated\r\n\t}", "@RequestMapping(value = \"/{id}/edit\", method = RequestMethod.GET)\n public String editRole(@PathVariable Long id, Model model) {\n model.addAttribute(\"roleEdit\", roleFacade.getRoleById(id));\n return (WebUrls.URL_ROLE+\"/edit\");\n }", "private void edit() {\n\n\t}", "User editUser(User user);", "public static void view() {\n\t\tUser user = UserService.getUserByUsername(session.get(\"username\"));\n\t\tUserProfile userprofile = null;\n\n\t\t// check if user object is null\n\t\tif (user != null)\n\t\t\tuserprofile = UserProfileService.getUserProfileByUserId(user.id);\n\n\t\trender(user, userprofile);\n\t}", "@GetMapping(\"/students/edit/{id}\")\n\tpublic String createEditStudentPage(@PathVariable long id, Model model)\n\t{\n\t\tmodel.addAttribute(\"student\", studentService.getStudentById(id));\n\t\treturn \"edit_student\"; \n\t\t\n\t}", "public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n startActivity(new Intent(EditProfile.this, ProfilePage.class));\n onPause();\n return super.onOptionsItemSelected(item);\n }", "UserEditForm getEditForm(User user);", "private void updateStudentProfileInfo() {\n\t\t\n\t\tstudent.setLastName(sLastNameTF.getText());\n\t\tstudent.setFirstName(sFirstNameTF.getText());\n\t\tstudent.setSchoolName(sSchoolNameTF.getText());\n\t\t\n\t\t//Update Student profile information in database\n\t\t\n\t}", "@GetMapping(\"/profile\")\n\tpublic String showProfilePage(Model model, Principal principal) {\n\t\t\n\t\tString email = principal.getName();\n\t\tUser user = userService.findOne(email);\n\t\t\n\t\tmodel.addAttribute(\"tasks\", taskService.findUserTask(user));\n\t\t\n\t\t\n\t\treturn \"views/profile\";\n\t}", "@Override\n public WalkerDetails editWalkerProfile(WalkerEdit walkerEdit) {\n Assert.notNull(walkerEdit, \"Walker object must be given\");\n Optional<Walker> walkerOpt = walkerRepo.findById(walkerEdit.getId());\n Optional<WalkerLogin> walkerLoginOpt = walkerLoginRepo.findById(walkerEdit.getId());\n\n if (walkerOpt.isEmpty()){\n throw new RequestDeniedException(\"Walker with ID \" + Long.toString(walkerEdit.getId()) + \" doesn't exist!\");\n }\n if(walkerLoginOpt.isEmpty()) {\n throw new RequestDeniedException(\"Error while fetching user with ID \" + Long.toString(walkerEdit.getId()));\n }\n\n Walker walker = walkerOpt.get();\n WalkerLogin walkerLogin = walkerLoginOpt.get();\n\n Assert.notNull(walkerEdit.getFirstName(), \"First name must not be null\");\n Assert.notNull(walkerEdit.getLastName(), \"Last name must not be null\");\n Assert.notNull(walkerEdit.getEmail(), \"Email must not be null\");\n\n if((!walker.getEmail().equals(walkerEdit.getEmail())) && (!emailAvailable(walkerEdit.getEmail()))) {\n throw new RequestDeniedException(\"User with email \"+ walkerEdit.getEmail() + \" already exists.\");\n }\n\n walker.setFirstName(walkerEdit.getFirstName());\n walker.setLastName(walkerEdit.getLastName());\n walker.setEmail(walkerEdit.getEmail());\n walker.setPhoneNumber(walkerEdit.getPhoneNumber());\n walker.setPublicStats(walkerEdit.isPublicStats());\n\n if((!walkerLogin.getUsername().equals(walkerEdit.getUsername())) && (!usernameAvailable(walkerEdit.getUsername()))) {\n throw new RequestDeniedException(\"User with username \"+ walkerEdit.getUsername() + \" already exists.\");\n }\n\n walkerLogin.setUsername(walkerEdit.getUsername());\n\n walkerRepo.save(walker);\n walkerLoginRepo.save(walkerLogin);\n\n return this.getWalkerDetailsById(walkerEdit.getId());\n }", "public void displayEditProfile() 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/EditProfile.fxml\"));\r\n System.out.println(\"step 2\");\r\n primaryStage.setTitle(\"Edit Profile\");\r\n System.out.println(\"Step 3\");\r\n primaryStage.setScene(new Scene(root, 600, 900));\r\n primaryStage.show();\r\n }", "public static EditProfileDialogue newInstance(Profile profile){\n EditProfileDialogue dialogue = new EditProfileDialogue();\n\n // If we are editing a current profile\n Bundle args = new Bundle();\n args.putParcelable(\"profile\", profile);\n dialogue.setArguments(args);\n\n Log.d(TAG, \"newInstance: send profile object in args form. args = \" + args);\n return dialogue;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_edit:\n Intent intent = new Intent(getApplicationContext(), ProfileEditActivity.class);\n intent.putExtra(\"userName\", userName);\n startActivity(intent);\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 }", "@RequestMapping(\"/sc/profile\")\n\tpublic ModelAndView scprofile() {\n\t\tModelAndView mav = new ModelAndView();\n\t\tYourtaskuser yourtaskuser = authentication.getActiveUser();\n\t\tmav.addObject(\"yourtaskuser\", yourtaskuser);\n\t\tmav.addObject(\"scinfo\", scinfoDAO.findScinfoByPrimaryKey(yourtaskuser.getUserid()));\n\t\tmav.setViewName(\"profile/companyprofile.jsp\");\n\t\treturn mav;\n\t}", "@RequestMapping(\"/editUser\")\n\tpublic ModelAndView editUser(@RequestParam (name=\"id\") Long id,@RequestParam (name=\"error\", required=false) boolean error)\n\t{\n\t\tModelAndView mv=new ModelAndView(\"editUserPage\");\n\t\tOptional<User> user=userService.findByid(id);\n\t\tOptional<UserExtra> userEx=userService.findExtraByid(id);\n\t\tmv.addObject(\"image\",Base64.getEncoder().encodeToString(userEx.get().getImage()));\n\t\tmv.addObject(\"user\",user.get());\n\t\tString date=userEx.get().getDob().toString();\n\t\tString join=userEx.get().getJoiningDate().toString();\n\t\tmv.addObject(\"date\",date);\n\t\tmv.addObject(\"join\",join);\n\t\t if(error)\n\t\t\t mv.addObject(\"error\",true);\n\n\t\treturn mv;\n\t}", "public void displayProfile(FacePamphletProfile profile) {\n\t\tremoveAll();\n\t\tdisplayName(profile.getName());\n\t\tdisplayImage(profile.getImage());\n\t\tdisplayStatus(profile.getStatus());\n\t\tdisplayFriends(profile.getFriends());\n\n\t}", "@RequestMapping(value = \"/jsEditAccounts\", method = RequestMethod.GET)\n\tpublic String jsEdit(Model m, @RequestParam(value = \"username\") String username, HttpServletRequest req) {\n\t\tSystem.out.println(\"Proceed to editAccountJobSeeker Page\");\n\t\tHttpSession session = req.getSession();\n\t\tsession.setAttribute(\"username\", username);\n\t\tm.addAttribute(\"state\", \"editAccount\");\n\t\tm.addAttribute(\"username\", username);\n\t\treturn \"js.home\";\n\t}", "public String toEdit() {\n\t\t HttpServletRequest request = (HttpServletRequest) FacesContext\n\t\t\t\t\t.getCurrentInstance().getExternalContext().getRequest();\n\t\t\t String idf = request.getParameter(\"idf\");\n\t log.info(\"----------------------------IDF--------------\"+idf);\n\t\t\treturn \"paramEdit?faces-redirect=true&idf=\"+idf;\n\t\n\t}", "private void profileButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileButtonActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n this.parentNavigationController.getUserProfileController();\n }", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == add && ! tfName.getText().equals(\"\")){\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" already exists.\");\n } else {\n FacePamphletProfile profile = new FacePamphletProfile(tfName.getText());\n profileDB.addProfile(profile);\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"New profile with the name \" + name + \" created.\");\n currentProfile = profile;\n }\n }\n if (e.getSource() == delete && ! tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (! profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" does not exist.\");\n } else {\n profileDB.deleteProfile(name);\n canvas.showMessage(\"Profile of \" + name + \" deleted.\");\n currentProfile = null;\n }\n }\n\n if (e.getSource() == lookUp && !tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"Displaying \" + name);\n currentProfile = profileDB.getProfile(name);\n } else {\n canvas.showMessage(\"A profile with the mane \" + name + \" does not exist\");\n currentProfile = null;\n }\n }\n\n if ((e.getSource() == changeStatus || e.getSource() == tfChangeStatus) && ! tfChangeStatus.getText().equals(\"\")){\n if (currentProfile != null){\n String status = tfChangeStatus.getText();\n profileDB.getProfile(currentProfile.getName()).setStatus(status);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Status updated.\");\n } else {\n canvas.showMessage(\"Please select a profile to change status.\");\n }\n }\n\n if ((e.getSource() == changePicture || e.getSource() == tfChangePicture) && ! tfChangePicture.getText().equals(\"\")){\n if (currentProfile != null){\n String fileName = tfChangePicture.getText();\n GImage image;\n try {\n image = new GImage(fileName);\n profileDB.getProfile(currentProfile.getName()).setImage(image);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Picture updated.\");\n } catch (ErrorException ex){\n canvas.showMessage(\"Unable to open image file: \" + fileName);\n }\n } else {\n canvas.showMessage(\"Please select a profile to change picture.\");\n }\n }\n\n if ((e.getSource() == addFriend || e.getSource() == tfAddFriend) && ! tfAddFriend.getText().equals(\"\")) {\n if (currentProfile != null){\n String friendName = tfAddFriend.getText();\n if (profileDB.containsProfile(friendName)){\n if (! currentProfile.toString().contains(friendName)){\n profileDB.getProfile(currentProfile.getName()).addFriend(friendName);\n profileDB.getProfile(friendName).addFriend(currentProfile.getName());\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(friendName + \" added as a friend.\");\n } else {\n canvas.showMessage(currentProfile.getName() + \" already has \" + friendName + \" as a friend.\");\n }\n } else {\n canvas.showMessage(friendName + \" does not exist.\");\n }\n } else {\n canvas.showMessage(\"Please select a profile to add friend.\");\n }\n }\n\t}", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "public String editEmploye(Employee emp){\n System.out.println(\"******* Edit employe ************\");\n System.out.println(emp.toString());\n employeeService.editEmployee(emp);\n sessionController.logInEmp();\n\n return \"/pages/childCareCenterDashboard.xhtml?faces-redirect=true\";\n }", "private void updateProfileViews() {\n if(profile.getmImageUrl()!=null && !profile.getmImageUrl().isEmpty()) {\n String temp = profile.getmImageUrl();\n Picasso.get().load(temp).into(profilePicture);\n }\n profileName.setText(profile.getFullName());\n phoneNumber.setText(profile.getPhoneNumber());\n address.setText(profile.getAddress());\n email.setText(profile.geteMail());\n initListToShow();\n }", "@RequestMapping(\"/editPass\")\r\n\tpublic ModelAndView editPass(@ModelAttribute(\"UserEditPassForm\") final UserEditPassForm form) {\r\n\t\treturn new ModelAndView(\"users/changePass\");\r\n\t}", "@Override\n\tpublic String editUser(Map<String, Object> reqs) {\n\t\treturn null;\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tif (!edited) {\n\t\t\t\t\t\topenEdit();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcloseEdit();\n\t\t\t\t\t\tif (newly) {\n\t\t\t\t\t\t\tnewly = false;\n\t\t\t\t\t\t\tvo = getUserVO();\n\t\t\t\t\t\t\tUserController.add(vo);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUserController.modify(vo);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@RequestMapping(value = { \"/edit-{id}\" }, method = RequestMethod.GET)\n\tpublic String editEntity(@PathVariable ID id, ModelMap model,\n\t\t\t@RequestParam(required = false) Integer idEstadia) {\n\t\tENTITY entity = abm.buscarPorId(id);\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", true);\n\n\t\tif(idEstadia != null){\n\t\t\tmodel.addAttribute(\"idEstadia\", idEstadia);\n\t\t}\n\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}", "private void showEditForm(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n Customer customerEdit = CustomerDao.getCustomer(id);\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"customer/editCustomer.jsp\");\n dispatcher.forward(request, response);\n }", "public void loadProfileWindowEdit(DonorReceiver account) throws IOException {\n\n // Only load new window if childWindowToFront fails.\n if (!App.childWindowToFront(account)) {\n\n // Set the selected donorReceiver for the profile pane and confirm child.\n ViewProfilePaneController.setAccount(account);\n ViewProfilePaneController.setIsChild(true);\n\n // Create new pane.\n FXMLLoader loader = new FXMLLoader();\n AnchorPane profilePane = loader.load(getClass().getResourceAsStream(PageNav.VIEW));\n\n // Create new scene.\n Scene profileScene = new Scene(profilePane);\n\n // Create new stage.\n Stage profileStage = new Stage();\n profileStage.setTitle(\"Profile for \" + account.getUserName());\n profileStage.setScene(profileScene);\n profileStage.show();\n profileStage.setX(App.getWindow().getX() + App.getWindow().getWidth());\n\n App.addChildWindow(profileStage, account);\n\n loadEditWindow(account, profilePane, profileStage);\n }\n }", "@Override\n\tpublic void edit(HttpServletRequest request,HttpServletResponse response) {\n\t\tint id=Integer.parseInt(request.getParameter(\"id\"));\n\t\tQuestionVo qv=new QuestionVo().getInstance(id);\n\t\tcd.edit(qv);\n\t\ttry{\n\t\t\tresponse.sendRedirect(\"Admin/question.jsp\");\n\t\t\t}\n\t\t\tcatch(Exception e){}\n\t}", "public static EditProfileDialogue newInstance(){\n EditProfileDialogue dialogue = new EditProfileDialogue();\n\n Log.d(TAG, \"newInstance: NO ARGUMENTS because we are creating new profile.\" );\n return dialogue;\n }", "@Override\n public void onCancel() {\n Log.d(TAG, \"User cancelled Edit Profile.\");\n Toast.makeText(getBaseContext(), getString(R.string.editFailure), Toast.LENGTH_SHORT)\n .show();\n }", "@RequestMapping(value = { \"/edit-module-{code}\" }, method = RequestMethod.GET)\n\t\tpublic String editModule(@PathVariable String code, ModelMap model) {\n\n\t\t\tmodel.addAttribute(\"students\", studentService.listAllStudents());\n\t\t\tmodel.addAttribute(\"teachers\", teacherService.listAllTeachers());\n\t\t\tModule module = moduleService.findByCode(code);\n\t\t\tmodel.addAttribute(\"module\", module);\n\t\t\tmodel.addAttribute(\"edit\", true);\n\t\t\t\n\t\t\treturn \"addStudentToModule\";\n\t\t}", "@Action( value=\"editAdmin\", results= {\n @Result(name=SUCCESS, type=\"dispatcher\", location=\"/jsp/editauser.jsp\") } ) \n public String editAdmin() \n {\n \t ActionContext contexto = ActionContext.getContext();\n \t \n \t ResultSet result1=null;\n \t\n \t PreparedStatement ps1=null;\n \t try \n \t {\n \t\t getConection();\n \t\t \n \t if ((String) contexto.getSession().get(\"loginId\")!=null)\n \t {\n String consulta1 =(\"SELECT * FROM USUARIO WHERE nick= '\"+ getNick()+\"';\");\n ps1 = con.prepareStatement(consulta1);\n result1=ps1.executeQuery();\n \n while(result1.next())\n {\n nombre= result1.getString(\"nombre\");\n apellido=result1.getString(\"apellido\");\n nick= result1.getString(\"nick\");\n passwd=result1.getString(\"passwd\");\n mail=result1.getString(\"mail\");\n \t \n }\n rol=\"ADMIN\";\n }\n \t } catch (Exception e) \n \t { \n \t \t System.err.println(\"Error\"+e); \n \t \t return SUCCESS;\n \t } finally\n \t { try\n \t {\n \t\tif(con != null) con.close();\n \t\tif(ps1 != null) ps1.close();\n \t\tif(result1 !=null) result1.close();\n \t\t\n } catch (Exception e) \n \t \t {\n \t System.err.println(\"Error\"+e); \n \t \t }\n \t }\n \t\t return SUCCESS;\n \t}", "@GetMapping(\"/{id}/edit\")\n public String edit(Model model,\n @PathVariable(\"id\") long id) {\n model.addAttribute(CUSTOMER, customerService.showCustomerById(id));\n return CUSTOMERS_EDIT;\n }", "public CustomerProfileDTO editCustomerProfile(CustomerProfileDTO customerProfileDTO)throws EOTException;", "private void editUserCard() {\n getUserCard();\n }" ]
[ "0.8270031", "0.7965229", "0.79234904", "0.76511425", "0.74334943", "0.71983594", "0.7162056", "0.70192707", "0.69591856", "0.6929046", "0.6915364", "0.6878458", "0.6852421", "0.67684793", "0.6747677", "0.67057973", "0.6697023", "0.66346276", "0.66334015", "0.6615053", "0.65685976", "0.65030265", "0.64734995", "0.64462805", "0.6428274", "0.6425246", "0.63991815", "0.6375194", "0.636173", "0.63553226", "0.6294758", "0.62942475", "0.6282849", "0.6239091", "0.62248427", "0.6219395", "0.6218075", "0.6210781", "0.62030315", "0.6201165", "0.6198044", "0.6154159", "0.6145304", "0.6099601", "0.6079557", "0.60655034", "0.6065447", "0.60496145", "0.6035457", "0.60354406", "0.60143936", "0.60055774", "0.59935117", "0.59900784", "0.5955101", "0.5947932", "0.5947906", "0.59380764", "0.59376734", "0.5923852", "0.5922526", "0.59201294", "0.59168047", "0.59148896", "0.5901659", "0.58910877", "0.58872014", "0.5872259", "0.58703834", "0.58702976", "0.58672297", "0.58671945", "0.5860779", "0.5853265", "0.58463305", "0.58445054", "0.5843422", "0.5842702", "0.5837169", "0.5820364", "0.5815735", "0.57970405", "0.57954645", "0.57695115", "0.57627624", "0.574927", "0.57472616", "0.57302064", "0.5728042", "0.57265663", "0.5725789", "0.57229525", "0.5721176", "0.5710116", "0.57067496", "0.5704283", "0.57013524", "0.5700761", "0.56922126", "0.5688863", "0.5685667" ]
0.0
-1
Saves Data from Edit Profile Page
public void saveProfileEditData() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void editTheirProfile() {\n\t\t\n\t}", "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }", "private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }", "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "private void updateStudentProfileInfo() {\n\t\t\n\t\tstudent.setLastName(sLastNameTF.getText());\n\t\tstudent.setFirstName(sFirstNameTF.getText());\n\t\tstudent.setSchoolName(sSchoolNameTF.getText());\n\t\t\n\t\t//Update Student profile information in database\n\t\t\n\t}", "public void saveProfileCreateData() {\r\n\r\n }", "private void saveInfoFields() {\n\n\t\tString name = ((EditText) getActivity().findViewById(R.id.profileTable_name))\n\t\t\t\t.getText().toString();\n\t\tint weight = Integer\n\t\t\t\t.parseInt(((EditText) getActivity().findViewById(R.id.profileTable_weight))\n\t\t\t\t\t\t.getText().toString());\n\t\tboolean isMale = ((RadioButton) getActivity().findViewById(R.id.profileTable_male))\n\t\t\t\t.isChecked();\n\t\tboolean smoker = ((CheckBox) getActivity().findViewById(R.id.profileTable_smoker))\n\t\t\t\t.isChecked();\n\t\tint drinker = (int) ((RatingBar) getActivity().findViewById(R.id.profileTable_drinker))\n\t\t\t\t.getRating();\n\n\t\tif (!name.equals(storageMan.PrefsName)) {\n\t\t\tstorageMan = new StorageMan(getActivity(), name);\n\t\t}\n\n\t\tstorageMan.saveProfile(new Profile(weight, drinker, smoker, isMale));\n\t\t\n\t\ttoast(\"pref saved\");\n\t}", "public void createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "@Override\n public void onClick(View view) {\n\n\n\n userDetail.setFname(fname.getText().toString());\n userDetail.setLname(lname.getText().toString());\n userDetail.setAge(Integer.parseInt(age.getText().toString()));\n userDetail.setWeight(Double.valueOf(weight.getText().toString()));\n userDetail.setAddress(address.getText().toString());\n\n try {\n new EditUserProfile(editUserProfileURL,getActivity(),userDetail).execute();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Toast.makeText(getActivity(), \"Saved Profile Successfully\",\n Toast.LENGTH_SHORT).show();\n getFragmentManager().popBackStack();\n\n }", "private void saveData() {\r\n\t\tif(mFirstname.getText().toString().trim().length() > 0 &&\r\n\t\t\t\tmLastname.getText().toString().trim().length() > 0 &&\r\n\t\t\t\tmEmail.getText().toString().trim().length() > 0) {\r\n\t\t\tmPrefs.setFirstname(mFirstname.getText().toString().trim());\r\n\t\t\tmPrefs.setLastname(mLastname.getText().toString().trim());\r\n\t\t\tmPrefs.setEmail(mEmail.getText().toString().trim());\r\n\t\t\tif(mMaleBtn.isChecked())\r\n\t\t\t\tmPrefs.setGender(0);\r\n\t\t\telse if(mFemaleBtn.isChecked())\r\n\t\t\t\tmPrefs.setGender(1);\r\n\t\t\tif(!mCalendarSelected.after(mCalendarCurrent)) \r\n\t\t\t\tmPrefs.setDateOfBirth(mCalendarSelected.get(Calendar.YEAR), \r\n\t\t\t\t\t\tmCalendarSelected.get(Calendar.MONTH), \r\n\t\t\t\t\t\tmCalendarSelected.get(Calendar.DAY_OF_MONTH));\r\n\t\t\tToast.makeText(getActivity(), R.string.msg_changes_saved, Toast.LENGTH_LONG).show();\r\n\t\t} else \r\n\t\t\tToast.makeText(getActivity(), R.string.msg_registration_empty_field, Toast.LENGTH_LONG).show();\r\n\t}", "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 }", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "public void editProfile() {\n dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.edit_profile);\n\n editUsername = dialog.findViewById(R.id.tv_uname);\n TextView editEmail = dialog.findViewById(R.id.tv_address);\n editImage = dialog.findViewById(R.id.imgUser);\n\n editUsername.setText(user.getUserID());\n editEmail.setText(user.getEmail());\n editEmail.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Email cannot be changed.\", Toast.LENGTH_SHORT).show();\n }\n });\n decodeImage(user.getProfilePic(), editImage);\n editImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3);\n }\n });\n\n TextView save = dialog.findViewById(R.id.save_edit);\n save.setOnClickListener(new View.OnClickListener() { // save changes\n @Override\n public void onClick(View v) {\n String username = editUsername.getText().toString();\n if(username.equals(\"\")) {\n Toast.makeText(getContext(), \"Username cannot be null\", Toast.LENGTH_SHORT).show();\n return;\n } else if (!checkUsername(username)) {\n Toast.makeText(getContext(), \"Username already exists\", Toast.LENGTH_SHORT).show();\n return;\n }\n user.setUserID(username);\n if(profilePicChanged) {\n user.setProfilePic(profilePic);\n profilePic = null;\n profilePicChanged = false;\n }\n docRef.set(user);\n dialog.dismiss();\n loadDataFromDB();\n }\n });\n\n TextView cancel = dialog.findViewById(R.id.cancel_edit);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss(); // cancel changes\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n }", "public void editProfile(View view){\n Intent intent = new Intent(this, EditProfileActivity.class);\n intent.putExtra(\"MY_NAME\", nameStr);\n intent.putExtra(\"MY_DESCRIPTION\", descriptionStr);\n intent.putExtra(\"MY_LOCATION\", locationStr);\n startActivityForResult(intent, 1);\n }", "void gotoEditProfile();", "private void updateProfile(PrivateProfile p) {\n final ProgressDialog dialog = new ProgressDialog(SettingsActivity.this);\n dialog.setMessage(getString(R.string.progress_update_profile));\n dialog.show();\n\n // Prepare user inputs for validator\n HashMap<String, Object> fields = new HashMap<String, Object>();\n fields.put(\"firstName\", mFirstName.getText().toString().trim());\n fields.put(\"lastName\", mLastName.getText().toString().trim());\n fields.put(\"homeCity\", mHomeCity.getText().toString().trim());\n fields.put(\"phone\", mPhone.getText().toString().trim());\n fields.put(\"arriveHQBy\", mArriveHQBy.getText().toString().trim());\n fields.put(\"arriveHomeBy\", mArriveHomeBy.getText().toString().trim());\n\n validateFields(fields);\n\n userProfile.setFirstName((String) fields.get(\"firstName\"));\n userProfile.setLastName((String) fields.get(\"lastName\"));\n userProfile.setHomeCity((String) fields.get(\"homeCity\"));\n userProfile.setPhoneNumber((String) fields.get(\"phone\"));\n userProfile.setDriverStatus((Boolean) fields.get(\"driving\"));\n userProfile.setDriverCar((String) fields.get(\"car\"));\n userProfile.setArriveHQBy((String) fields.get(\"arriveHQBy\"));\n userProfile.setArriveHomeBy((String) fields.get(\"arriveHomeBy\"));\n\n userProfile.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n dialog.dismiss();\n if (e != null) {\n // Show the error message\n Toast.makeText(SettingsActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n } else {\n // show user the activity was complete\n Toast.makeText(SettingsActivity.this, R.string.profile_saved, Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void editProfile(View v) {\n //Create map of all old info\n final Map tutorInfo = getTutorInfo();\n\n InputMethodManager imm = (InputMethodManager) this.getSystemService(Service.INPUT_METHOD_SERVICE);\n\n //Create animations\n final Animation animTranslate = AnimationUtils.loadAnimation(this, R.anim.translate);\n final Animation revTranslate = AnimationUtils.loadAnimation(this, R.anim.reverse_translate);\n\n //Enable Bio EditText, change color\n EditText bioField = (EditText) findViewById(R.id.BioField);\n bioField.clearFocus();\n bioField.setTextIsSelectable(true);\n bioField.setEnabled(true);\n bioField.setBackgroundResource(android.R.color.black);\n imm.showSoftInput(bioField, 0);\n\n //Hide edit button\n v.startAnimation(animTranslate);\n v.setVisibility(View.GONE);\n\n //Show add subject button\n Button addSubjButton = (Button) findViewById(R.id.addSubjButton);\n addSubjButton.setVisibility(View.VISIBLE);\n\n\n //Show save button\n Button saveButton = (Button) findViewById(R.id.save_button);\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n saveDialogue(tutorInfo);\n }\n });\n saveButton.startAnimation(revTranslate);\n saveButton.setVisibility(View.VISIBLE);\n\n enableSkillButtons();\n }", "@RequestMapping(method = RequestMethod.POST,params = {\"save\"})\n public String saveProfile(@Valid ProfileForm profileForm, BindingResult bindingResult){\n\n if(bindingResult.hasErrors()){\n return PROFILE_PAGE_NAME;\n }\n\n user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n user.updateProfileFromProfileForm(profileForm);\n userService.saveAndFlush(user);\n\n return \"redirect:/profile\";\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}", "private void saveUserData() {\n mSharedPreferences.clearProfile();\n mSharedPreferences.setName(mName);\n mSharedPreferences.setEmail(mEmail);\n mSharedPreferences.setGender(mGender);\n mSharedPreferences.setPassWord(mPassword);\n mSharedPreferences.setYearGroup(mYearGroup);\n mSharedPreferences.setPhone(mPhone);\n mSharedPreferences.setMajor(mMajor);\n\n mImageView.buildDrawingCache();\n Bitmap bmap = mImageView.getDrawingCache();\n try {\n FileOutputStream fos = openFileOutput(getString(R.string.profile_photo_file_name), MODE_PRIVATE);\n bmap.compress(Bitmap.CompressFormat.PNG, 100, fos);\n fos.flush();\n fos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n\n if (entryPoint.getStringExtra(SOURCE).equals(MainActivity.ACTIVITY_NAME)) {\n Toast.makeText(RegisterActivity.this,\n R.string.edit_success, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(RegisterActivity.this,\n R.string.register_success, Toast.LENGTH_SHORT).show();\n }\n\n }", "Accessprofile save(Accessprofile accessprofile);", "@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }", "public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\n }", "private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }", "private void hitEditProfileApi() {\n appUtils.showProgressDialog(getActivity(), false);\n HashMap<String, String> params = new HashMap<>();\n params.put(ApiKeys.NAME, etFirstName.getText().toString().trim());\n params.put(ApiKeys.PHONE_NO, etPhoneNo.getText().toString().trim());\n params.put(ApiKeys.ADDRESS, etAdress.getText().toString().trim());\n params.put(ApiKeys.POSTAL_CODE, etPostal.getText().toString().trim());\n\n if (countryId != null) {\n params.put(ApiKeys.COUNTRY, countryId);\n }\n if (stateId != null) {\n params.put(ApiKeys.STATE, stateId);\n }\n if (cityId != null) {\n params.put(ApiKeys.CITY, cityId);\n }\n\n ApiInterface service = RestApi.createService(ApiInterface.class);\n Call<ResponseBody> call = service.editProfile(AppSharedPrefs.getInstance(getActivity()).\n getString(AppSharedPrefs.PREF_KEY.ACCESS_TOKEN, \"\"), appUtils.encryptData(params));\n ApiCall.getInstance().hitService(getActivity(), call, new NetworkListener() {\n @Override\n public void onSuccess(int responseCode, String response) {\n try {\n JSONObject mainObject = new JSONObject(response);\n if (mainObject.getInt(ApiKeys.CODE) == 200) {\n JSONObject dataObject = mainObject.getJSONObject(\"DATA\");\n changeEditMode(false);\n isEditModeOn = false;\n ((EditMyAccountActivity) getActivity()).setEditButtonLabel(getString(R.string.edit));\n\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_NAME, dataObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.USER_MOBILE, dataObject.getString(ApiKeys.MOBILE_NUMBER));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ADDRESS, dataObject.getString(ApiKeys.ADDRESS));\n JSONObject countryObject = dataObject.getJSONObject(ApiKeys.COUNTRY_ID);\n JSONObject stateObject = dataObject.getJSONObject(ApiKeys.STATE_ID);\n JSONObject cityObject = dataObject.getJSONObject(ApiKeys.CITY_ID);\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_NAME, countryObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_NAME, stateObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_NAME, cityObject.getString(ApiKeys.NAME));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.ISO_CODE, countryObject.getString(ApiKeys.ISO_CODE));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.COUNTRY_ID, countryObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.STATE_ID, stateObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.CITY_ID, cityObject.getString(ApiKeys.ID));\n AppSharedPrefs.getInstance(getActivity()).putString(AppSharedPrefs.PREF_KEY.POSTAL_CODE, dataObject.optString(ApiKeys.POSTAL_CODE));\n\n } else if (mainObject.getInt(ApiKeys.CODE) == ApiKeys.UNAUTHORISED_CODE) {\n appUtils.logoutFromApp(getActivity(), mainObject.optString(ApiKeys.MESSAGE));\n } else {\n appUtils.showSnackBar(getActivity().findViewById(android.R.id.content), mainObject.optString(ApiKeys.MESSAGE));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onSuccessErrorBody(String response) {\n\n }\n\n @Override\n public void onFailure() {\n\n }\n });\n\n }", "private void saveUserData() {\n\t\ttry {\n\t\t\t// if the user did not change default profile\n\t\t\t// picture, mProfilePictureArray will be null.\n\t\t\tif (bytePhoto != null) {\n\t\t\t\tFileOutputStream fos = openFileOutput(\n\t\t\t\t\t\tgetString(R.string.profile_photo_file_name),\n\t\t\t\t\t\tMODE_PRIVATE);\n\t\t\t\tfos.write(bytePhoto);\n\t\t\t\tfos.flush();\n\t\t\t\tfos.close();\n\t\t\t}\n\t\t} catch (Exception ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\tdb = new PersonalEventDbHelper(this);\n\t\t// Getting the shared preferences editor\n\t\tString mKey = getString(R.string.preference_name);\n\t\tSharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n\t\tSharedPreferences.Editor mEditor = mPrefs.edit();\n\t\tmEditor.clear();\n\n\t\tFriend user = new Friend();\n\t\tArrayList<Event> list = new ArrayList<Event>();\n\n\t\t// Save name information\n\t\tmKey = getString(R.string.name_field);\n\t\tString mValue = (String) ((EditText) findViewById(R.id.editName))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\t\tname = mValue;\n\t\tuser.setName(mValue);\n\n\t\t// PARSE\n\t\tGlobals.USER = name;\n\n\t\t// Save class information\n\t\tmKey = getString(R.string.class_field);\n\t\tmValue = (String) ((EditText) findViewById(R.id.editClass)).getText()\n\t\t\t\t.toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\tuser.setClassYear(mValue);\n\n\t\t// Save major information\n\t\tmKey = getString(R.string.major_field);\n\t\tmValue = (String) ((EditText) findViewById(R.id.editMajor)).getText()\n\t\t\t\t.toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Save course information\n\t\t// Course 1\n\t\t// Course name\n\t\tmKey = \"Course #1 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse1name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\tEvent event1 = new Event();\n\t\tevent1.setEventName(mValue);\n\t\tevent1.setColor(Globals.USER_COLOR);\n\t\t// Course time period\n\t\tmKey = \"Course #1 Time\";\n\t\tSpinner mSpinnerSelection = (Spinner) findViewById(R.id.course1TimeSpinner);\n\t\tint selectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\n\t\tevent1.setClassPeriod(selectedCourse);\n\n\t\t// Course location\n\t\tmKey = \"Course #1 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse1loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course 2\n\t\tevent1.setEventLocation(mValue);\n\t\tevent1.setOwnerName(name);\n\t\t// if (!Globals.classList.contains(event1.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event1.getString(\"objectId\"));\n\t\t// System.out.println(event1.getString(\"objectId\"));\n\t\tevent1.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY1, event1.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(0));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event1.getClassPeriod());\n\t\t// event.setEventLocation(event1.getEventLocation());\n\t\t// event.setEventName(event1.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\n\t\tdb.insertEntry(event1);\n\t\tlist.add(event1);\n\n\t\t// Course 2\n\n\t\t// Save course information\n\t\t// Course name\n\t\tmKey = \"Course #2 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse2name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course time period\n\t\tmKey = \"Course #2 Time\";\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course2TimeSpinner);\n\t\tselectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\t\tEvent event2 = new Event();\n\t\tevent2.setEventName(mValue);\n\t\tevent2.setColor(Globals.USER_COLOR);\n\n\t\t// Course time period\n\t\tmKey = \"Course #2 Time\";\n\t\tSpinner mSpinnerSelection2 = (Spinner) findViewById(R.id.course2TimeSpinner);\n\t\tint selectedCourse2 = mSpinnerSelection2.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse2);\n\n\t\tevent2.setClassPeriod(selectedCourse2);\n\n\t\t// Course location\n\t\tmKey = \"Course #2 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse2loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course 3\n\t\tevent2.setEventLocation(mValue);\n\t\tevent2.setOwnerName(name);\n\t\t// System.out.println(event2.getString(\"objectId\"));\n\t\t// if (!Globals.classList.contains(event2.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event2.getString(\"objectId\"));\n\t\tevent2.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY2, event2.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(1));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event2.getClassPeriod());\n\t\t// event.setEventLocation(event2.getEventLocation());\n\t\t// event.setEventName(event2.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\t\tdb.insertEntry(event2);\n\t\tlist.add(event2);\n\n\t\t// Course 3\n\n\t\t// Save course information\n\t\t// Course name\n\t\tmKey = \"Course #3 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse3name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course time period\n\t\tmKey = \"Course #3 Time\";\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course3TimeSpinner);\n\t\tselectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\n\t\tEvent event3 = new Event();\n\t\tevent3.setEventName(mValue);\n\t\tevent3.setColor(Globals.USER_COLOR);\n\n\t\t// Course time period\n\t\tmKey = \"Course #3 Time\";\n\t\tSpinner mSpinnerSelection3 = (Spinner) findViewById(R.id.course3TimeSpinner);\n\t\tint selectedCourse3 = mSpinnerSelection3.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse3);\n\n\t\tevent3.setClassPeriod(selectedCourse3);\n\n\t\t// Course location\n\t\tmKey = \"Course #3 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse3loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course 4\n\t\tevent3.setEventLocation(mValue);\n\t\tevent3.setOwnerName(name);\n\t\t// if (!Globals.classList.contains(event3.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event3.getString(\"objectId\"));\n\t\tevent3.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY3, event3.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(2));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event3.getClassPeriod());\n\t\t// event.setEventLocation(event3.getEventLocation());\n\t\t// event.setEventName(event3.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\t\tdb.insertEntry(event3);\n\t\tlist.add(event3);\n\t\t// Course 4\n\n\t\t// Save course information\n\t\t// Course name\n\t\tmKey = \"Course #4 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse4name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course time period\n\t\tmKey = \"Course #4 Time\";\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course4TimeSpinner);\n\t\tselectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\t\tEvent event4 = new Event();\n\t\tevent4.setEventName(mValue);\n\t\tevent4.setColor(Globals.USER_COLOR);\n\n\t\t// Course time period\n\t\tmKey = \"Course #4 Time\";\n\t\tSpinner mSpinnerSelection4 = (Spinner) findViewById(R.id.course4TimeSpinner);\n\t\tint selectedCourse4 = mSpinnerSelection4.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse4);\n\n\t\tevent4.setClassPeriod(selectedCourse4);\n\n\t\t// Course location\n\t\tmKey = \"Course #4 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse4loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\tevent4.setEventLocation(mValue);\n\n\t\tlist.add(event4);\n\t\tevent4.setOwnerName(name);\n\t\t// if (!Globals.classList.contains(event4.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event4.getString(\"objectId\"));\n\t\tevent4.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY4, event4.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(3));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event4.getClassPeriod());\n\t\t// event.setEventLocation(event4.getEventLocation());\n\t\t// event.setEventName(event4.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\t\tdb.insertEntry(event4);\n\t\tuser.setSchedule(list);\n\n\t\t// Call method to get all entries from the datastore!!!\n\n\t\t// EventDbHelper db = new EventDbHelper(this);\n\t\t// try {\n\t\t// db.insertEntry(user);\n\t\t// } catch (IOException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\n\t\t// Commit all the changes into the shared preference\n\t\tmEditor.commit();\n\t\tGlobals.isProfileSet = true;\n\t}", "public void editProfile(String username, String fname, String lname, String email, String phoneno, String newpw) throws SQLException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\"); \n\t callStmt = con.prepareCall(\" {call team5.customer_updateProfile_Proc(?,?,?,?,?,?,?,?,?)}\");\n\t callStmt.setString(1,phoneno);\n\t callStmt.setString(2,email);\n\t callStmt.setString(3,fname);\n\t callStmt.setString(4,lname);\n\t callStmt.setString(5,\"Y\");\n\t callStmt.setString(6,\"Y\");\n\t callStmt.setString(7,username);\n\t callStmt.setString(8,newpw);\n\t callStmt.setInt(9,this.id);\n\t callStmt.execute();\n\t \n\t callStmt.close();\n\t }", "protected void enterEditMode(){\n saveButton.setVisibility(View.VISIBLE);\n //when editMode is active, allow user to input in editTexts\n //By default have the editTexts not be editable by user\n editName.setEnabled(true);\n editEmail.setEnabled(true);\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n userReference = FirebaseDatabase.getInstance().getReference(\"Users\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid());\n\n user = FirebaseAuth.getInstance().getCurrentUser();\n\n user.updateEmail(String.valueOf(editEmail.getText()))\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n userReference.child(\"name\").setValue(editName.getText().toString());\n userReference.child(\"email\").setValue(editEmail.getText().toString());\n final String TAG = \"EmailUpdate\";\n Log.d(TAG, \"User email address updated.\");\n Toast.makeText(getActivity().getApplicationContext(), \"Saved\", Toast.LENGTH_SHORT).show();\n }\n else {\n FirebaseAuthException e = (FirebaseAuthException)task.getException();\n Toast.makeText(getActivity().getApplicationContext(), \"Re-login to edit your profile!\", Toast.LENGTH_LONG).show();\n goToLoginActivity();\n }\n }\n });\n exitEditMode();\n\n }\n });\n }", "public void UpdatePrefs()\r\n {\r\n \t\r\n \t// Data from the first name field is being stored into persistent storage\r\n \teditor.putString\r\n \t(\"name\", \r\n \tfNameField.getText()\r\n \t.toString());\r\n \t\r\n \t// Data from the last name field is being stored into persistent storage\r\n editor.putString\r\n (\"lName\",\r\n lNameField.getText()\r\n .toString());\r\n \r\n // Data from the phone number field is being stored into persistent storage\r\n editor.putString\r\n (\"phoneNum\"\r\n , phoneNumField.getText()\r\n .toString());\r\n \r\n // Data from the address field is being stored into persistent storage\r\n editor.putString\r\n (\"address\"\r\n , homeAddressField.getText()\r\n .toString());\r\n \r\n // Push all fields data to persistent storage forever\r\n editor.commit();\r\n }", "private void populateProfile() {\n mPassword_input_layout.getEditText().setText(mSharedPreferences.getPassWord());\n mEmail_input_layout.getEditText().setText(mSharedPreferences.getEmail());\n mEdit_name_layout.getEditText().setText(mSharedPreferences.getName());\n ((RadioButton) mRadioGender.getChildAt(mSharedPreferences.getGender())).setChecked(true);\n mPhone_input_layout.getEditText().setText(mSharedPreferences.getPhone());\n mMajor_input_layout.getEditText().setText(mSharedPreferences.getMajor());\n mClass_input_layout.getEditText().setText(mSharedPreferences.getYearGroup());\n\n // Load profile photo from internal storage\n try {\n FileInputStream fis = openFileInput(getString(R.string.profile_photo_file_name));\n Bitmap bmap = BitmapFactory.decodeStream(fis);\n mImageView.setImageBitmap(bmap);\n fis.close();\n } catch (IOException e) {\n // Default profile\n }\n }", "@Override\n\tpublic boolean updateProfile(String name, String address, String dob, String gender, String phone, String email,\n\t\t\t String status, int id) {\n\t\treturn false;\n\t}", "private void callUpdateProfile() {\n String userStr = CustomSharedPreferences.getPreferences(Constants.PREF_USER_LOGGED_OBJECT, \"\");\n Gson gson = new Gson();\n User user = gson.fromJson(userStr, User.class);\n LogUtil.d(\"QuyNT3\", \"Stored profile:\" + userStr +\"|\" + (user != null));\n //mNameEdt.setText(user.getName());\n String id = user.getId();\n String oldPassword = mOldPassEdt.getText().toString();\n String newPassword = mNewPassEdt.getText().toString();\n String confirmPassword = mConfirmPassEdt.getText().toString();\n String fullName = mNameEdt.getText().toString();\n String profileImage = user.getProfile_image();\n UpdateUserProfileRequest request = new UpdateUserProfileRequest(id, fullName, profileImage,\n oldPassword, newPassword, confirmPassword);\n request.setListener(callBackEvent);\n new Thread(request).start();\n }", "private void saveUserInformation() {\n name.setText(nameInput.getText().toString());\n\n if (name.getText().toString().isEmpty()) {\n name.setError(\"Name required\");\n name.requestFocus();\n return;\n }\n\n FirebaseUser user = mAuth.getCurrentUser();\n if (user != null) {\n if (isBname()) {\n updateName(user);\n }\n if (isBtitle()) {\n updateTitle(user);\n }\n }\n }", "@Override\n public void onClick(View v) {\n if(editName.getText().toString().isEmpty() || editEmail.getText().toString().isEmpty() || editStudentID.getText().toString().isEmpty() || editAddress.getText().toString().isEmpty() || editStudentID.getText().toString().isEmpty() || editProfession.getText().toString().isEmpty()){\n Toast.makeText(EditProfile.this, \"Fields not valid\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n //update users registered email\n String email = editEmail.getText().toString();\n user.updateEmail(email).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n //update the users information\n public void onSuccess(Void aVoid) {\n DocumentReference ref = fStore.collection(\"users\").document(user.getUid());\n Map<String,Object> edited = new HashMap<>();\n edited.put(\"Address\",editAddress.getText().toString());\n edited.put(\"Email\",editEmail.getText().toString());\n edited.put(\"FullName\",editName.getText().toString());\n edited.put(\"Profession\",editProfession.getText().toString());\n edited.put(\"UTAid\",editStudentID.getText().toString());\n ref.update(edited).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(EditProfile.this, \"Profile Updated\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(getApplicationContext(), Profile.class));\n finish();\n }\n });\n Toast.makeText(EditProfile.this, \"Email is Updated\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(getApplicationContext(), Profile.class));\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(EditProfile.this, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "private void updateTeacherProfileInfo() {\n\t\t\n\t\tteacher.setLastName(tLastNameTF.getText());\n\t\tteacher.setFirstName(tFirstNameTF.getText());\n\t\tteacher.setSchoolName(tSchoolNameTF.getText());\n\t\t\n\t\t//Update Teacher profile information in database\n\t\t\n\t}", "@RequestMapping(value=\"/ExternalUsers/EditProfile\", method = RequestMethod.GET)\n\t\tpublic String editProfile(ModelMap model) {\n\t\t\t// redirect to the editProfile.jsp\n\t\t\treturn \"/ExternalUsers/EditProfile\";\n\t\t\t\n\t\t}", "private void restoringDataProfile() {\n mSharedPreferences = getSharedPreferences(Constants.PROFILE_NAME, MODE_PRIVATE);\n avatar = mSharedPreferences.getString(Constants.EDIT_PROFILE_PREFERENCES_KEY_PICTURE_PROFILE, \"\");\n Bitmap savingAvatar = AppSingleton.decodeBase64(avatar);\n if (savingAvatar != null) {\n mImageAvatar.setImageBitmap(savingAvatar);\n }\n\n mEmail.setText(mSharedPreferences.getString(Constants.EDIT_PROFILE_PREFERENCES_KEY_EMAIL, \"[email protected]\"));\n mName.setText(mSharedPreferences.getString(Constants.EDIT_PROFILE_PREFERENCES_KEY_NAME, \"StarMovie\"));\n mBirthDay.setText(mSharedPreferences.getString(Constants.EDIT_PROFILE_PREFERENCES_KEY_BIRTHDAY, \"01/01/1994\"));\n mGender.setText(mSharedPreferences.getString(Constants.EDIT_PROFILE_PREFERENCES_KEY_GENDER, \"Male\"));\n }", "public boolean updateProfile(int Id,T deliEntry);", "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 }", "@RequestMapping(value = \"/success\", method = RequestMethod.POST)\r\n\tpublic String profileSave(@ModelAttribute(\"userForm\") UserDetails userForm,Principal principal ) throws IOException {\n\t\t\r\n\t\t\tuserService.saveEditProfile(userForm,principal);\r\n\t\t\t\r\n\t\treturn \"redirect:dashboard\";\r\n\t}", "void gotoEditProfile(String fbId);", "public void saveData(){\n SharedPreferences sharedPreferences = getSharedPreferences(\"SHARED_PREFS\",MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"email_pref\",email.getText().toString());\n editor.putString(\"password_pref\",uPassword.getText().toString());\n editor.apply();\n }", "private void saveData() {\n\n SharedPreferences sharedPreferences=getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n\n editor.putString(\"name\",name.getText().toString());\n editor.putString(\"regnum\",regnum.getText().toString());\n editor.putInt(\"count\", count);\n editor.apply();\n\n }", "private void 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}", "void EditWorkerProfileUser(String uid, boolean isWorker, List<Skill> skills);", "public void setUserProfile(UserProfile userProfile) {this.userProfile = userProfile;}", "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 }", "public void saveInfo(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userinfo\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n\n editor.apply();\n Toast.makeText(this,\"Saved!\",Toast.LENGTH_LONG).show();\n }", "public void saveAccount(View view) {\n\t\tdata.setmSearchFilter(data.getmSearchFilterEdit().getText().toString());\n\t\tif(data.getmFirstNameEdit()!= null)\n\t\t{\n\t\t\tdata.setmBaseDN(data.getmBaseDNSpinner().getText().toString());\n\t\t\tdata.setmFirstName((String)data.getmFirstNameEdit().getSelectedItem());\n\t\t\tdata.setmLastName((String)data.getmLastNameEdit().getSelectedItem());\n\t\t\tdata.setmOfficePhone((String)data.getmOfficePhoneEdit().getSelectedItem());\n\t\t\tdata.setmCellPhone((String)data.getmCellPhoneEdit().getSelectedItem());\n\t\t\tdata.setmHomePhone((String)data.getmHomePhoneEdit().getSelectedItem());\n\t\t\tdata.setmEmail((String)data.getmEmailEdit().getSelectedItem());\n\t\t\tdata.setmImage((String)data.getmImageEdit().getSelectedItem());\n\t\t\tdata.setmStreet((String)data.getmStreetEdit().getSelectedItem());\n\t\t\tdata.setmCity((String)data.getmCityEdit().getSelectedItem());\n\t\t\tdata.setmZip((String)data.getmZipEdit().getSelectedItem());\n\t\t\tdata.setmState((String)data.getmStateEdit().getSelectedItem());\n\t\t\tdata.setmCountry((String)data.getmCountryEdit().getSelectedItem());\n\t\t}\n\t\t\n\t\tif (!data.ismConfirmCredentials()) {\n\t\t\tfinishLogin();\n\t\t} else {\n\t\t\tfinishConfirmCredentials(true);\n\t\t}\n\t}", "private void updateProfile() {\r\n\r\n builder.setMessage(\"Are you sure you want to update?\")\r\n .setCancelable(false)\r\n .setTitle(\"Profile Update\")\r\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\r\n\r\n if (user == null) {\r\n return;\r\n }\r\n\r\n //Validate fields\r\n if (!validateData()){\r\n return;\r\n }\r\n\r\n String userId = user.getUid();\r\n String email = user.getEmail();\r\n DocumentReference reference = mFirebaseFirestore.collection(\"users\").document(userId);\r\n reference.update(\"contact\", mTextViewContact.getText().toString());\r\n reference.update(\"estate\", mTextViewEstate.getText().toString());\r\n reference.update(\"houseno\", mTextViewHouseNo.getText().toString());\r\n reference.update(\"name\", mTextViewName.getText().toString())\r\n .addOnSuccessListener(new OnSuccessListener<Void>() {\r\n @Override\r\n public void onSuccess(Void aVoid) {\r\n Toast.makeText(Testing.this, \"User: \" + mTextViewName.getText().toString() + \" Profile updated successfully!\", Toast.LENGTH_LONG).show();\r\n resetFieldData();\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Toast.makeText(Testing.this, \"Error while updating your profile. KIndly check your internet connection!\" + e.toString(), Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n }\r\n })\r\n .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n dialogInterface.cancel();\r\n }\r\n });\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }", "@RequestMapping(value = \"/editAdminProfile\", method = RequestMethod.GET)\n\tpublic ModelAndView editAdminProfile(ModelMap model, @RequestParam(\"id\") Long id, RedirectAttributes attributes)\n\t\t\tthrows CustomException {\n\n\t\tEndUser userProfile = endUserDAOImpl.findId(id);\n\n\t\tif (userProfile.getImageName() != null) {\n\t\t\tString type = ImageService.getImageType(userProfile.getImageName());\n\n\t\t\tString url = \"data:image/\" + type + \";base64,\" + Base64.encodeBase64String(userProfile.getImage());\n\t\t\tuserProfile.setImageName(url);\n\n\t\t\tendUserForm.setImageName(url);\n\t\t} else {\n\t\t\tendUserForm.setImageName(\"\");\n\t\t}\n\n\t\tendUserForm.setId(userProfile.getId());\n\t\tendUserForm.setDisplayName(userProfile.getDisplayName());\n\t\tendUserForm.setUserName(userProfile.getUserName());\n\t\tendUserForm.setAltContactNo(userProfile.getAltContactNo());\n\t\tendUserForm.setAltEmail(userProfile.getAltEmail());\n\t\tendUserForm.setContactNo(userProfile.getContactNo());\n\t\tendUserForm.setEmail(userProfile.getEmail());\n\n\t\tendUserForm.setPassword(userProfile.getPassword());\n\t\tendUserForm.setTransactionId(userProfile.getTransactionId());\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\n\t\treturn new ModelAndView(\"editAdminProfile\", \"model\", model);\n\n\t}", "public void saveInfo(View view) {\n SharedPreferences sharedPref = getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n editor.putString(\"password\", passwordInput.getText().toString());\n editor.apply();\n\n usernameInput.setText(\"\");\n passwordInput.setText(\"\");\n\n Toast.makeText(this, \"Saved!\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void onChanged(@Nullable final Profile profile) {\n userProfile = profile;\n }", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == add && ! tfName.getText().equals(\"\")){\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" already exists.\");\n } else {\n FacePamphletProfile profile = new FacePamphletProfile(tfName.getText());\n profileDB.addProfile(profile);\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"New profile with the name \" + name + \" created.\");\n currentProfile = profile;\n }\n }\n if (e.getSource() == delete && ! tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (! profileDB.containsProfile(name)){\n canvas.showMessage(\"A profile with the name \" + name + \" does not exist.\");\n } else {\n profileDB.deleteProfile(name);\n canvas.showMessage(\"Profile of \" + name + \" deleted.\");\n currentProfile = null;\n }\n }\n\n if (e.getSource() == lookUp && !tfName.getText().equals(\"\")) {\n String name = tfName.getText();\n if (profileDB.containsProfile(name)){\n canvas.displayProfile(profileDB.getProfile(name));\n canvas.showMessage(\"Displaying \" + name);\n currentProfile = profileDB.getProfile(name);\n } else {\n canvas.showMessage(\"A profile with the mane \" + name + \" does not exist\");\n currentProfile = null;\n }\n }\n\n if ((e.getSource() == changeStatus || e.getSource() == tfChangeStatus) && ! tfChangeStatus.getText().equals(\"\")){\n if (currentProfile != null){\n String status = tfChangeStatus.getText();\n profileDB.getProfile(currentProfile.getName()).setStatus(status);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Status updated.\");\n } else {\n canvas.showMessage(\"Please select a profile to change status.\");\n }\n }\n\n if ((e.getSource() == changePicture || e.getSource() == tfChangePicture) && ! tfChangePicture.getText().equals(\"\")){\n if (currentProfile != null){\n String fileName = tfChangePicture.getText();\n GImage image;\n try {\n image = new GImage(fileName);\n profileDB.getProfile(currentProfile.getName()).setImage(image);\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(\"Picture updated.\");\n } catch (ErrorException ex){\n canvas.showMessage(\"Unable to open image file: \" + fileName);\n }\n } else {\n canvas.showMessage(\"Please select a profile to change picture.\");\n }\n }\n\n if ((e.getSource() == addFriend || e.getSource() == tfAddFriend) && ! tfAddFriend.getText().equals(\"\")) {\n if (currentProfile != null){\n String friendName = tfAddFriend.getText();\n if (profileDB.containsProfile(friendName)){\n if (! currentProfile.toString().contains(friendName)){\n profileDB.getProfile(currentProfile.getName()).addFriend(friendName);\n profileDB.getProfile(friendName).addFriend(currentProfile.getName());\n canvas.displayProfile(profileDB.getProfile(currentProfile.getName()));\n canvas.showMessage(friendName + \" added as a friend.\");\n } else {\n canvas.showMessage(currentProfile.getName() + \" already has \" + friendName + \" as a friend.\");\n }\n } else {\n canvas.showMessage(friendName + \" does not exist.\");\n }\n } else {\n canvas.showMessage(\"Please select a profile to add friend.\");\n }\n }\n\t}", "@Override\n\tpublic void updateProfile(UsersDto dto) {\n\t\tsession.update(\"users.updateProfile\", dto);\n\t}", "@RequestMapping(\"/admin/profile/save\")\n\tpublic String saveAdminProfile(@ModelAttribute Yourtaskuser yourtaskuser) { // retournait un String avant\n\t\tyourtaskuserService.saveYourtaskuser(yourtaskuser);\n\t\treturn \"redirect:/admin/profile\";\n\t\t\n\t}", "void saveUserData(User user);", "public abstract VisitorProfile save(VisitorProfile profile);", "@Test\n public void tcEditProfileWithValidData() {\n for (User user : EditProfileTestData.validUsers) {\n loginPage.open();\n loginPage.populateUsername(user.getUsername());\n loginPage.populatePassword(user.getPassword());\n loginPage.login();\n\n common.openEditProfilePage();\n\n editProfilePage.editProfile(user.getEmail(), user.getName(), user.getPhone(), user.getAddress());\n\n // do some verification\n\n common.logout();\n }\n }", "@Override\n\tpublic void updateUserProfileInfo(String name) throws Exception {\n\n\t}", "void setUserProfile(Map<String, Object> profile);", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_profile);\n toolbar_profile = findViewById(R.id.pro_toolbar);\n setTitle(\"My Profile\");\n setSupportActionBar(toolbar_profile);\n\n proname = findViewById(R.id.profile_name);\n profoi = findViewById(R.id.profile_foi);\n proorg = findViewById(R.id.profile_orga);\n\n currentId=String.valueOf(Settings.Secure.getString(getContentResolver(),Settings.Secure.ANDROID_ID));\n //load user information\n userInfo();\n editProfile = findViewById(R.id.editprofile);\n editProfile.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(Profile.this,Profile_Edit.class));\n }\n });\n }", "public void saveInfo(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE); //This means the info is private and hence secured\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n editor.putString(\"password\", passwordInput.getText().toString());\n editor.apply();\n\n Toast.makeText(this, \"Saved!\", Toast.LENGTH_LONG).show();\n }", "private void setValuesInSharedPrefernce() {\r\n\r\n\t\tmSharedPreferences_reg.edit().putString(\"ProfileImageString\", profileImageString).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"PseudoName\", psedoName).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"Pseudodescription\", profiledescription).commit();\r\n\t}", "public void save(View view) {\n if (!editText.getText().toString().matches(\"\")) { //editText'e herhangi bir değer girilmişse\n int userAge = Integer.parseInt(editText.getText().toString()); //yazılan değer userAge şeklinde bir değişkene alınır.\n textView.setText(\"Your age: \" + userAge); //Yazılan değer alttaki textView'a yazdırılır.\n sharedPreferences.edit().putInt(\"storedAge\", userAge).apply(); //Yazdırılan değer saklanan SharedPreference'ta da değiştirilerek güncellenir.\n }\n }", "public User editProfile(String firstName, String lastName, String username, String password, char type, char status)\n {\n return this.userCtrl.editProfile(username, password, firstName, lastName, type, status);\n }", "@RequestMapping(value = \"/user/profile\", method = RequestMethod.POST)\n\tpublic String updateUserProfile(@ModelAttribute(\"washeeRequestModel\") WasheeRegModel washeeRegModel,\n\t\t\tPrincipal principal) {\n\n\t\tuserService.update(washeeRegModel, principal.getName());\n\t\treturn \"redirect:/user/profile.html?success=true\";\n\t}", "@RequestMapping(value = \"/profile/{id}\", method = RequestMethod.POST)\n\tpublic String createOrUpdateProfile(@PathVariable(value = \"id\") String id,\n\t\t\t@PathParam(value = \"firstname\") String firstname,\n\t\t\t@PathParam(value = \"lastname\") String lastname,\n\t\t\t@PathParam(value = \"email\") String email,\n\t\t\t@PathParam(value = \"address\") String address,\n\t\t\t@PathParam(value = \"organization\") String organization,\n\t\t\t@PathParam(value = \"aboutmyself\") String aboutmyself, Model model) {\n\t\ttry {\n\t\t\tProfile profile = profileDao.findById(id);\n\t\t\tif (profile == null) {\n\t\t\t\tprofile = new Profile();\n\t\t\t\tprofile.setId(id);\n\t\t\t}\n\t\t\tprofile.setFirstname(firstname);\n\t\t\tprofile.setLastname(lastname);\n\t\t\tprofile.setEmail(email);\n\t\t\tprofile.setAddress(address);\n\t\t\tprofile.setOrganization(organization);\n\t\t\tprofile.setAboutMyself(aboutmyself);\n\t\t\tmodel.addAttribute(\"profile\", profile);\n\t\t\tthis.profileDao.save(profile);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"redirect:/profile/{id}?brief=false\";\n\t}", "private void saveSettings(){\n // get current user from shared preferences\n currentUser = getUserFromSharedPreferences();\n\n final User newUser = currentUser;\n Log.i(\"currentUser name\",currentUser.getUsername());\n String username = ((EditText)findViewById(R.id.usernameET)).getText().toString();\n\n if(\"\".equals(username)||username==null){\n Toast.makeText(getApplicationContext(),\"Failed to save, user name cannot be empty\",Toast.LENGTH_LONG).show();\n return;\n }\n\n newUser.setUsername(username);\n\n // update user data in firebase\n Firebase.setAndroidContext(this);\n Firebase myFirebaseRef = new Firebase(Config.FIREBASE_URL);\n\n // set value and add completion listener\n myFirebaseRef.child(\"users\").child(newUser.getFireUserNodeId()).setValue(newUser,new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n\n Toast.makeText(getApplicationContext(),\"Data could not be saved. \" + firebaseError.getMessage(),Toast.LENGTH_SHORT).show();\n } else {\n // if user info saved successfully, then save user image\n uploadPhoto();\n Toast.makeText(getApplicationContext(),\"User data saved successfully.\",Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "private void saveData() {\n firebaseUser = firebaseAuth.getInstance().getCurrentUser();\n String uID = firebaseUser.getUid();\n\n //Get auth credentials from the user for re-authentication\n credential = EmailAuthProvider.getCredential(mEmailField, mPassField);\n\n\n final DatabaseReference userDatabase = firebaseDatabase.getInstance().getReference().child(\"users\").child(uID);\n //Get the value of edit text\n editTextValue = changeFieldEt.getText().toString().trim();\n //Check whether edit text is empty\n if (!TextUtils.isEmpty(editTextValue)) {\n //if change name\n if (mNameField.equals(\"name\")) {\n UserProfileChangeRequest userProfileChangeRequest = new UserProfileChangeRequest.Builder()\n .setDisplayName(editTextValue).build();\n firebaseUser.updateProfile(userProfileChangeRequest).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.i(\"PROFILE\", \"User profile updated.\");\n updateDatabase(userDatabase);\n spotsDialog.dismiss();\n }\n }\n });\n }//if change password\n else if (mNameField.equals(\"password\")) {\n\n firebaseUser.reauthenticate(credential)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n firebaseUser.updatePassword(editTextValue).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.i(\"PASSWORD\", \"User password updated.\");\n updateDatabase(userDatabase);\n } else {\n Log.i(\"PASSWORD\", \"User cannot updated.\");\n Utility.MakeLongToastToast(activity, \"Password must have more than 7 characters\");\n spotsDialog.dismiss();\n }\n }\n });\n } else {\n Log.i(\"AUTH\", \"Error auth failed\");\n }\n }\n });\n }//if change email\n else if (mNameField.equals(\"email\")) {\n firebaseUser.reauthenticate(credential)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n firebaseUser.updateEmail(editTextValue).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.i(\"EMAIL\", \"User email address updated.\");\n updateDatabase(userDatabase);\n } else {\n Utility.MakeLongToastToast(activity, \"Cannot Updated. Please try another name \");\n spotsDialog.dismiss();\n }\n }\n });\n } else {\n Log.i(\"AUTH\", \"Error auth failed\");\n }\n }\n });\n\n }\n\n\n } else {\n Utility.MakeLongToastToast(getActivity(), \"Please enter your change.\");\n spotsDialog.dismiss();\n }\n }", "public void saveChanges(View v){\n Boolean saveSucceeded = null;\n\n int userId = users.get(userSpinner.getSelectedItemPosition() - 1).getId();\n String newUsername = editUsername.getText().toString();\n String newPassword = editPassword.getText().toString();\n int newUserType = 1; // Type = normal user by default\n\n // Checks for empty entries and sets them to null so they won't be updated\n if(newUsername.equals(\"\")){\n newUsername = null;\n }\n if(newPassword.equals(\"\")){\n newPassword = null;\n }\n // Hashes new password with selected users salt\n else{\n byte[] userSalt = users.get(userSpinner.getSelectedItemPosition() - 1).getSalt();\n newPassword = passwordHasher.hash(newPassword, userSalt);\n }\n\n if(isAdmin.isChecked()){\n newUserType = 2; // Admin\n }\n\n // Edit user in database\n saveSucceeded = udbHelper.editUser(userId, newUsername, newPassword, newUserType);\n\n String message = \"\";\n if(saveSucceeded){\n message = \"Successfully saved changes to user {\" + newUsername + \"} to database!\";\n }\n else {\n message = \"Failed to save changes!\";\n }\n Toast.makeText(ManageAccountsActivity.this, message, Toast.LENGTH_LONG).show();\n\n reloadUserLists();\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n UserProfile userProfile = dataSnapshot.getValue(UserProfile.class);\n profileName.setText(userProfile.getname());\n profileEmail.setText(userProfile.getemail());\n profilePhone.setText(userProfile.getphone());\n /* profileName.setText(fname);\n profileEmail.setText(cemail);\n profilePhone.setText(cphone);*/\n\n\n\n }", "@Override\n\tpublic void updateArtikUserProfile(HashMap<String, Object> map) {\n\t\tsqlSession.insert(PATH + \"updateArtikUserProfile\", map);\n\t}", "private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }", "private void observeData() {\n viewModel.profile.observe(this, new Observer<User>() {\n @Override\n public void onChanged(User user) {\n if (user != null) {\n if (etUsername.getText().toString().toLowerCase().equals(user.getUsername())\n && etPassword.getText().toString().toLowerCase().equals(user.getPassword())) {\n saveUserData();\n navigateTo(new UserListActivity());\n } else {\n showErrorMessage();\n }\n } else {\n showErrorMessage();\n }\n }\n });\n }", "private void updateUserDetailsFromView() {\n\t\tcurrentDetails.setFirstName(detailDisplay.getFirstName().getValue());\n\t\tcurrentDetails.setLastName(detailDisplay.getLastName().getValue());\n\t\tcurrentDetails.setMiddleInitial(detailDisplay.getMiddleInitial().getValue());\n\t\tcurrentDetails.setTitle(detailDisplay.getTitle().getValue());\n\t\tcurrentDetails.setEmailAddress(detailDisplay.getEmailAddress().getValue());\n\t\tcurrentDetails.setPhoneNumber(detailDisplay.getPhoneNumber().getValue());\n\t\tcurrentDetails.setActive(detailDisplay.getIsActive().getValue());\n\t\t//currentDetails.setRootOid(detailDisplay.getRootOid().getValue());\n\t\tcurrentDetails.setRole(detailDisplay.getRole().getValue());\n\t\t\n\t\tcurrentDetails.setOid(detailDisplay.getOid().getValue());\n\t\tString orgId = detailDisplay.getOrganizationListBox().getValue();\n\t\tcurrentDetails.setOrganizationId(orgId);\n\t\tResult organization = detailDisplay.getOrganizationsMap().get(orgId);\n\t\tif (organization != null) {\n\t\t\tcurrentDetails.setOrganization(organization.getOrgName());\n\t\t} else {\n\t\t\tcurrentDetails.setOrganization(\"\");\n\t\t}\n\t}", "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}", "private void putPersonalInformation() throws SQLException, FileNotFoundException, IOException {\n AdUserPersonalData personal;\n try {\n personal = PersonalDataController.getInstance().getPersonalData(username);\n staff_name = personal.getGbStaffName();\n staff_surname = personal.getGbStaffSurname();\n id_type = \"\"+personal.getGbIdType();\n id_number = personal.getGbIdNumber();\n putProfPic(personal.getGbPhoto());\n phone_number = personal.getGbPhoneNumber();\n mobile_number = personal.getGbMobileNumber();\n email = personal.getGbEmail();\n birthdate = personal.getGbBirthdate();\n gender = \"\"+personal.getGbGender();\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putException(ex);\n }\n }", "private void saveUserInformation() {\n String name = editTextName.getText().toString().trim();\n String add = editTextAddress.getText().toString().trim();\n\n //creating a userinformation object\n UserInformation userInformation = new UserInformation(name, add);\n\n //getting the current logged in user\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n //saving data to firebase database\n /*\n * first we are creating a new child in firebase with the\n * unique id of logged in user\n * and then for that user under the unique id we are saving data\n * for saving data we are using setvalue method this method takes a normal java object\n * */\n databaseReference.child(user.getUid()).setValue(userInformation);\n\n //displaying a success toast\n Toast.makeText(this, \"Information Saved...\", Toast.LENGTH_LONG).show();\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "@Override\n public void onClick(View view) {\n Intent i = new Intent(view.getContext(), EditProfil.class);\n i.putExtra(\"fullName\", nameTextView.getText().toString());\n i.putExtra(\"email\", emailTextView.getText().toString());\n i.putExtra(\"phone\",phoneTextView.getText().toString());\n startActivity(i);\n }", "public void saveData(){\n\n if(addFieldstoLift()) {\n Intent intent = new Intent(SetsPage.this, LiftsPage.class);\n intent.putExtra(\"lift\", lift);\n setResult(Activity.RESULT_OK, intent);\n finish();\n }else{\n AlertDialog.Builder builder = new AlertDialog.Builder(SetsPage.this);\n builder.setCancelable(true);\n builder.setTitle(\"Invalid Entry\");\n builder.setMessage(\"Entry is invalid. If you continue your changes will not be saved\");\n builder.setPositiveButton(\"Continue\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n }", "private void saveInfoHelper(){\n\n if(!isAnyEmpty()) {\n boolean firstSave = (prefs.getString(\"email\", null) == null);\n //store first name\n editor.putString(\"fname\", fname.getText().toString());\n // store last name\n editor.putString(\"lname\", lname.getText().toString());\n // store email\n editor.putString(\"email\", email.getText().toString());\n // store password\n editor.putString(\"password\", password.getText().toString());\n // store currency\n editor.putInt(\"curr\", spinner_curr.getSelectedItemPosition());\n // store stock\n editor.putInt(\"stock\", spinner_stock.getSelectedItemPosition());\n // store date\n editor.putString(\"date\", new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").format(Calendar.getInstance().getTime()));\n\n editor.putString(\"token\", \"\");\n\n editor.commit();\n\n Toast.makeText(this, R.string.data_saved, Toast.LENGTH_SHORT).show();\n\n loadInfo(); //to show new data immediately without refreshing the page\n\n requestToken();\n\n if(firstSave){\n finish();\n }\n\n }else{\n Toast.makeText(this, R.string.data_empty, Toast.LENGTH_SHORT).show();\n }\n\n }", "public void saveDataToSharedPreference(View view) {\n email = emailEditText.getText().toString();\n name = nameEditText.getText().toString();\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n\n editor.putString(\"name\",name);\n editor.putString(\"email\",email);\n editor.apply();\n\n Toast.makeText(context, \"Data saved successfully into SharedPreferences!\", Toast.LENGTH_SHORT).show();\n clearText();\n }", "@Override\n public void edit(){\n Integer Pointer=0;\n FileWriter editDetails = null;\n ArrayList<String> lineKeeper = saveText();\n\n /* Search into the list to find the Username, if it founds it, changes the\n * old information with the new information.\n * Search*/\n if(lineKeeper.contains(getUsername())){\n Pointer=lineKeeper.indexOf(getUsername());\n\n //Write the new information\n lineKeeper.set(Pointer+1, getPassword());\n lineKeeper.set(Pointer+2, getFirstname());\n lineKeeper.set(Pointer+3, getLastname());\n lineKeeper.set(Pointer+4, DMY.format(getDoB()));\n lineKeeper.set(Pointer+5, getContactNumber());\n lineKeeper.set(Pointer+6, getEmail());\n lineKeeper.set(Pointer+7, String.valueOf(getSalary()));\n lineKeeper.set(Pointer+8, getPositionStatus());\n Pointer=Pointer+9;\n homeAddress.edit(lineKeeper,Pointer);\n }//end if\n\n try{\n editDetails= new FileWriter(\"employees.txt\",false);\n for( int i=0;i<lineKeeper.size();i++){\n editDetails.append(lineKeeper.get(i));\n editDetails.append(System.getProperty(\"line.separator\"));\n }//end for\n editDetails.close();\n editDetails = null;\n }//end try\n catch (IOException ioe) {}//end catch\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.btn_save:\n\t\ttxtt1 = (etxt1.getText().toString());\n\t\ttxtt2 = (etxt2.getText().toString());\n\t\ttxtt3 = (etxt3.getText().toString());\n\t\ttxtt4 = (etxt4.getText().toString());\n\t\ttxtt5 = (etxt5.getText().toString());\n\t\ttxtt6 = (etxt6.getText().toString());\n\t\ttxtt7 = (etxt7.getText().toString());\n\t\ttxtt8 = (etxt8.getText().toString());\n\t\tIntent R = new Intent(getApplicationContext(),ProfileActivity.class);\n\t\tR.putExtra(\"txtt1\", txtt1);\n\t\tR.putExtra(\"txtt2\", txtt2);\n\t\tR.putExtra(\"txtt3\", txtt3);\n\t\tR.putExtra(\"txtt4\", txtt4);\n\t\tR.putExtra(\"txtt5\", txtt5);\n\t\tR.putExtra(\"txtt6\", txtt6);\n\t\tR.putExtra(\"txtt7\", txtt7);\n\t\tR.putExtra(\"txtt8\", txtt8);\n\t\tstartActivity(R);\n\t\tbreak;\n\t\tdefault:\n\t\tbreak;\n\t\t}\n\t}", "@FXML\n private void saveSettings()\n {\n boolean changes = false;\n String newUsername = changeUsernameField.getText();\n\n if (checkChangeUsernameValidity(newUsername) && checkUsername(newUsername, changeUsernameErrorLabel)) {\n changeUsername(newUsername);\n changeUsernameField.setPromptText(newUsername);\n updateProfileLabels();\n changes = true;\n }\n if (bufferImage != null)\n {\n controllerComponents.getAccount().setProfilePicture(bufferImage);\n updateProfilePictures();\n changes = true;\n }\n bufferImage = null;\n if (changes)\n {\n saveFeedbackLabel.setText(\"Changes saved.\");\n } else\n {\n saveFeedbackLabel.setText(\"You have not made any changes.\");\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 }", "@Override\n public void edit(User user) {\n }", "public String gotoeditprofile() throws IOException {\n\t\treturn \"editProfil.xhtml?faces-redirect=true\";\n\t}", "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 }", "@Override\r\n\tpublic User editdata(User usr) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void saveUserSettingProfile(UserProfile userProfile)\n\t\t\tthrows Exception {\n\n\t}", "public void editStaffMember(){\n Intent intent = new Intent(this, EditStaffMemberActivity.class);\n intent.putExtra(\"SelectedStaffMemberID\", selectedStaffMember._id);\n intent.putExtra(\"SelectedStaffMemberName\", selectedStaffMember.name);\n intent.putExtra(\"SelectedStaffMemberSalary\", selectedStaffMember.salaryPerHour);\n intent.putExtra(\"SelectedStaffMemberEmail\", selectedStaffMember.email);\n startActivity(intent);\n}", "@Override\n\tpublic void save(Account userForm) {\n\t\taccount.save(userForm);\n\n\t}", "private void saveDetails() {\n //get the editted data\n String name = m_ChangeName.getText().toString();\n final String age = m_ChangeAge.getText().toString();\n final String bio = m_ChangeBio.getText().toString();\n\n //get the image from the image view\n final Bitmap img = ((BitmapDrawable) m_ProfilePic.getDrawable()).getBitmap();\n\n //get a reference to firebase database\n final DatabaseReference ref = FirebaseDatabase.getInstance().getReference();\n\n //get the current logged in user\n final FirebaseUser fUser = FirebaseAuth.getInstance().getCurrentUser();\n\n // add the new name of the user\n ref.child(\"user\").child(fUser.getUid()).child(\"name\").setValue(name);\n\n // when the name is updated, update the other relevant info\n ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // update the age and bio\n ref.child(\"user\").child(fUser.getUid()).child(\"age\").setValue(age);\n ref.child(\"user\").child(fUser.getUid()).child(\"bio\").setValue(bio);\n //object to convert image to byte array for storage on firebase\n ByteArrayOutputStream imgConverted = new ByteArrayOutputStream();\n\n //save the image as a .jpg file\n img.compress(Bitmap.CompressFormat.JPEG, 100, imgConverted);\n\n String imageEncoded = Base64.encodeToString(imgConverted.toByteArray(), Base64.DEFAULT);\n ref.child(\"user\").child(fUser.getUid()).child(\"image\").setValue(imageEncoded);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n //display error if any occur\n Toasty.error(m_context, \"Error\" + databaseError, Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "@SuppressWarnings(\"unchecked\")\r\n\tUserInfo saveAndFlush(UserInfo ui);", "@Override\r\n public void updateProfile(Profile newProfile, Profile oldProfile) {\r\n profileDAO.updateProfile(oldProfile, newProfile);\r\n }", "@RequestMapping(\"/su/profile/save\")\n\tpublic String saveUserProfile(@ModelAttribute Yourtaskuser yourtaskuser) { // retournait un String avant\n\t\tyourtaskuserService.saveYourtaskuser(yourtaskuser);\n\t\treturn \"redirect:/su/profile\";\n\t\t\n\t}" ]
[ "0.7732041", "0.7571258", "0.7460043", "0.7207561", "0.7198759", "0.71493804", "0.7146714", "0.71357113", "0.71345586", "0.69578826", "0.6915382", "0.68721074", "0.6826205", "0.6754667", "0.67385525", "0.66586477", "0.66480005", "0.65858114", "0.6547052", "0.6506699", "0.6505187", "0.6500237", "0.64938724", "0.6491177", "0.64824563", "0.64775586", "0.64724606", "0.64708495", "0.6469406", "0.646746", "0.64163476", "0.64113086", "0.6405081", "0.6374458", "0.6364184", "0.63589466", "0.6343229", "0.6342958", "0.63412887", "0.6336079", "0.6320764", "0.6318708", "0.63051075", "0.62867624", "0.62578624", "0.62542707", "0.6233406", "0.62140584", "0.6196061", "0.6144972", "0.6132854", "0.61309433", "0.61217415", "0.6102237", "0.60890836", "0.6070226", "0.60670847", "0.6053729", "0.6042224", "0.604068", "0.6038545", "0.60367984", "0.60335493", "0.6023913", "0.6023486", "0.6016584", "0.60110193", "0.6008245", "0.6007691", "0.6004493", "0.6003779", "0.6000686", "0.6000117", "0.5981996", "0.5980576", "0.5975204", "0.59664565", "0.59647006", "0.5945224", "0.59440255", "0.5940921", "0.59407955", "0.593811", "0.593297", "0.5924307", "0.59239835", "0.5922894", "0.5916152", "0.5906924", "0.59026796", "0.5890264", "0.5887485", "0.588103", "0.5874636", "0.58628106", "0.5861514", "0.5855044", "0.5853734", "0.5851188", "0.5840875" ]
0.87036973
0
Saves Data from Create Profile Page
public void saveProfileCreateData() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveProfileEditData() {\r\n\r\n }", "public void saveOrUpdateProfile(){\n try {\n \n if(PersonalDataController.getInstance().existRegistry(username)){\n PersonalDataController.getInstance().update(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender), birthdate);\n }else{\n PersonalDataController.getInstance().create(username, staff_name, staff_surname, \n Integer.parseInt(id_type), \n id_number, imagePic, phone_number, mobile_number, email, birthdate, \n Integer.parseInt(gender));\n }\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putMessage(GBEnvironment.getInstance().getError(32), null);\n }\n GBMessage.putMessage(GBEnvironment.getInstance().getError(33), null);\n }", "private void saveInfoFields() {\n\n\t\tString name = ((EditText) getActivity().findViewById(R.id.profileTable_name))\n\t\t\t\t.getText().toString();\n\t\tint weight = Integer\n\t\t\t\t.parseInt(((EditText) getActivity().findViewById(R.id.profileTable_weight))\n\t\t\t\t\t\t.getText().toString());\n\t\tboolean isMale = ((RadioButton) getActivity().findViewById(R.id.profileTable_male))\n\t\t\t\t.isChecked();\n\t\tboolean smoker = ((CheckBox) getActivity().findViewById(R.id.profileTable_smoker))\n\t\t\t\t.isChecked();\n\t\tint drinker = (int) ((RatingBar) getActivity().findViewById(R.id.profileTable_drinker))\n\t\t\t\t.getRating();\n\n\t\tif (!name.equals(storageMan.PrefsName)) {\n\t\t\tstorageMan = new StorageMan(getActivity(), name);\n\t\t}\n\n\t\tstorageMan.saveProfile(new Profile(weight, drinker, smoker, isMale));\n\t\t\n\t\ttoast(\"pref saved\");\n\t}", "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 createEditProfileSession(Profile profile) {\n editor.putString(KEY_EMAIL, profile.getMail());\n editor.putString(KEY_NAME, profile.getName());\n editor.putString(KEY_NUMBER,profile.getMobile());\n editor.commit();\n }", "Accessprofile save(Accessprofile accessprofile);", "@RequestMapping(value = \"/profile/{id}\", method = RequestMethod.POST)\n\tpublic String createOrUpdateProfile(@PathVariable(value = \"id\") String id,\n\t\t\t@PathParam(value = \"firstname\") String firstname,\n\t\t\t@PathParam(value = \"lastname\") String lastname,\n\t\t\t@PathParam(value = \"email\") String email,\n\t\t\t@PathParam(value = \"address\") String address,\n\t\t\t@PathParam(value = \"organization\") String organization,\n\t\t\t@PathParam(value = \"aboutmyself\") String aboutmyself, Model model) {\n\t\ttry {\n\t\t\tProfile profile = profileDao.findById(id);\n\t\t\tif (profile == null) {\n\t\t\t\tprofile = new Profile();\n\t\t\t\tprofile.setId(id);\n\t\t\t}\n\t\t\tprofile.setFirstname(firstname);\n\t\t\tprofile.setLastname(lastname);\n\t\t\tprofile.setEmail(email);\n\t\t\tprofile.setAddress(address);\n\t\t\tprofile.setOrganization(organization);\n\t\t\tprofile.setAboutMyself(aboutmyself);\n\t\t\tmodel.addAttribute(\"profile\", profile);\n\t\t\tthis.profileDao.save(profile);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn \"redirect:/profile/{id}?brief=false\";\n\t}", "@RequestMapping(method = RequestMethod.POST,params = {\"save\"})\n public String saveProfile(@Valid ProfileForm profileForm, BindingResult bindingResult){\n\n if(bindingResult.hasErrors()){\n return PROFILE_PAGE_NAME;\n }\n\n user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n user.updateProfileFromProfileForm(profileForm);\n userService.saveAndFlush(user);\n\n return \"redirect:/profile\";\n }", "public abstract VisitorProfile save(VisitorProfile profile);", "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 }", "private void saveUserData() {\n\t\ttry {\n\t\t\t// if the user did not change default profile\n\t\t\t// picture, mProfilePictureArray will be null.\n\t\t\tif (bytePhoto != null) {\n\t\t\t\tFileOutputStream fos = openFileOutput(\n\t\t\t\t\t\tgetString(R.string.profile_photo_file_name),\n\t\t\t\t\t\tMODE_PRIVATE);\n\t\t\t\tfos.write(bytePhoto);\n\t\t\t\tfos.flush();\n\t\t\t\tfos.close();\n\t\t\t}\n\t\t} catch (Exception ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\tdb = new PersonalEventDbHelper(this);\n\t\t// Getting the shared preferences editor\n\t\tString mKey = getString(R.string.preference_name);\n\t\tSharedPreferences mPrefs = getSharedPreferences(mKey, MODE_PRIVATE);\n\n\t\tSharedPreferences.Editor mEditor = mPrefs.edit();\n\t\tmEditor.clear();\n\n\t\tFriend user = new Friend();\n\t\tArrayList<Event> list = new ArrayList<Event>();\n\n\t\t// Save name information\n\t\tmKey = getString(R.string.name_field);\n\t\tString mValue = (String) ((EditText) findViewById(R.id.editName))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\t\tname = mValue;\n\t\tuser.setName(mValue);\n\n\t\t// PARSE\n\t\tGlobals.USER = name;\n\n\t\t// Save class information\n\t\tmKey = getString(R.string.class_field);\n\t\tmValue = (String) ((EditText) findViewById(R.id.editClass)).getText()\n\t\t\t\t.toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\tuser.setClassYear(mValue);\n\n\t\t// Save major information\n\t\tmKey = getString(R.string.major_field);\n\t\tmValue = (String) ((EditText) findViewById(R.id.editMajor)).getText()\n\t\t\t\t.toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Save course information\n\t\t// Course 1\n\t\t// Course name\n\t\tmKey = \"Course #1 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse1name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\tEvent event1 = new Event();\n\t\tevent1.setEventName(mValue);\n\t\tevent1.setColor(Globals.USER_COLOR);\n\t\t// Course time period\n\t\tmKey = \"Course #1 Time\";\n\t\tSpinner mSpinnerSelection = (Spinner) findViewById(R.id.course1TimeSpinner);\n\t\tint selectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\n\t\tevent1.setClassPeriod(selectedCourse);\n\n\t\t// Course location\n\t\tmKey = \"Course #1 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse1loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course 2\n\t\tevent1.setEventLocation(mValue);\n\t\tevent1.setOwnerName(name);\n\t\t// if (!Globals.classList.contains(event1.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event1.getString(\"objectId\"));\n\t\t// System.out.println(event1.getString(\"objectId\"));\n\t\tevent1.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY1, event1.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(0));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event1.getClassPeriod());\n\t\t// event.setEventLocation(event1.getEventLocation());\n\t\t// event.setEventName(event1.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\n\t\tdb.insertEntry(event1);\n\t\tlist.add(event1);\n\n\t\t// Course 2\n\n\t\t// Save course information\n\t\t// Course name\n\t\tmKey = \"Course #2 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse2name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course time period\n\t\tmKey = \"Course #2 Time\";\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course2TimeSpinner);\n\t\tselectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\t\tEvent event2 = new Event();\n\t\tevent2.setEventName(mValue);\n\t\tevent2.setColor(Globals.USER_COLOR);\n\n\t\t// Course time period\n\t\tmKey = \"Course #2 Time\";\n\t\tSpinner mSpinnerSelection2 = (Spinner) findViewById(R.id.course2TimeSpinner);\n\t\tint selectedCourse2 = mSpinnerSelection2.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse2);\n\n\t\tevent2.setClassPeriod(selectedCourse2);\n\n\t\t// Course location\n\t\tmKey = \"Course #2 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse2loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course 3\n\t\tevent2.setEventLocation(mValue);\n\t\tevent2.setOwnerName(name);\n\t\t// System.out.println(event2.getString(\"objectId\"));\n\t\t// if (!Globals.classList.contains(event2.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event2.getString(\"objectId\"));\n\t\tevent2.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY2, event2.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(1));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event2.getClassPeriod());\n\t\t// event.setEventLocation(event2.getEventLocation());\n\t\t// event.setEventName(event2.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\t\tdb.insertEntry(event2);\n\t\tlist.add(event2);\n\n\t\t// Course 3\n\n\t\t// Save course information\n\t\t// Course name\n\t\tmKey = \"Course #3 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse3name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course time period\n\t\tmKey = \"Course #3 Time\";\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course3TimeSpinner);\n\t\tselectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\n\t\tEvent event3 = new Event();\n\t\tevent3.setEventName(mValue);\n\t\tevent3.setColor(Globals.USER_COLOR);\n\n\t\t// Course time period\n\t\tmKey = \"Course #3 Time\";\n\t\tSpinner mSpinnerSelection3 = (Spinner) findViewById(R.id.course3TimeSpinner);\n\t\tint selectedCourse3 = mSpinnerSelection3.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse3);\n\n\t\tevent3.setClassPeriod(selectedCourse3);\n\n\t\t// Course location\n\t\tmKey = \"Course #3 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse3loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course 4\n\t\tevent3.setEventLocation(mValue);\n\t\tevent3.setOwnerName(name);\n\t\t// if (!Globals.classList.contains(event3.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event3.getString(\"objectId\"));\n\t\tevent3.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY3, event3.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(2));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event3.getClassPeriod());\n\t\t// event.setEventLocation(event3.getEventLocation());\n\t\t// event.setEventName(event3.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\t\tdb.insertEntry(event3);\n\t\tlist.add(event3);\n\t\t// Course 4\n\n\t\t// Save course information\n\t\t// Course name\n\t\tmKey = \"Course #4 Name\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse4name))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\t// Course time period\n\t\tmKey = \"Course #4 Time\";\n\t\tmSpinnerSelection = (Spinner) findViewById(R.id.course4TimeSpinner);\n\t\tselectedCourse = mSpinnerSelection.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse);\n\t\tEvent event4 = new Event();\n\t\tevent4.setEventName(mValue);\n\t\tevent4.setColor(Globals.USER_COLOR);\n\n\t\t// Course time period\n\t\tmKey = \"Course #4 Time\";\n\t\tSpinner mSpinnerSelection4 = (Spinner) findViewById(R.id.course4TimeSpinner);\n\t\tint selectedCourse4 = mSpinnerSelection4.getSelectedItemPosition();\n\t\tmEditor.putInt(mKey, selectedCourse4);\n\n\t\tevent4.setClassPeriod(selectedCourse4);\n\n\t\t// Course location\n\t\tmKey = \"Course #4 Location\";\n\t\tmValue = (String) ((EditText) findViewById(R.id.editCourse4loc))\n\t\t\t\t.getText().toString();\n\t\tmEditor.putString(mKey, mValue);\n\n\t\tevent4.setEventLocation(mValue);\n\n\t\tlist.add(event4);\n\t\tevent4.setOwnerName(name);\n\t\t// if (!Globals.classList.contains(event4.getString(\"objectId\"))){\n\t\t// Globals.classList.add(event4.getString(\"objectId\"));\n\t\tevent4.saveInBackground();\n\t\t// mEditor.putString(Globals.CLASS_KEY4, event4.getString(\"objectId\"));\n\t\t// }\n\t\t// else{\n\t\t// ParseQuery<Event> query = ParseQuery.getQuery(Event.class);\n\t\t// query.whereEqualTo(\"objectId\", Globals.classList.get(3));\n\t\t// try {\n\t\t// Event event = query.getFirst();\n\t\t// event.setClassPeriod(event4.getClassPeriod());\n\t\t// event.setEventLocation(event4.getEventLocation());\n\t\t// event.setEventName(event4.getEventName());\n\t\t// event.saveInBackground();\n\t\t// } catch (ParseException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\t\t// }\n\t\tdb.insertEntry(event4);\n\t\tuser.setSchedule(list);\n\n\t\t// Call method to get all entries from the datastore!!!\n\n\t\t// EventDbHelper db = new EventDbHelper(this);\n\t\t// try {\n\t\t// db.insertEntry(user);\n\t\t// } catch (IOException e) {\n\t\t// // TODO Auto-generated catch block\n\t\t// e.printStackTrace();\n\t\t// }\n\n\t\t// Commit all the changes into the shared preference\n\t\tmEditor.commit();\n\t\tGlobals.isProfileSet = true;\n\t}", "@RequestMapping(value = \"/profile\", method = RequestMethod.GET)\n\tpublic String create(Model model) {\n\t\tmodel.addAttribute(\"profile\", new Profile());\n\t\treturn \"create\";\n\t}", "private void updateStudentProfileInfo() {\n\t\t\n\t\tstudent.setLastName(sLastNameTF.getText());\n\t\tstudent.setFirstName(sFirstNameTF.getText());\n\t\tstudent.setSchoolName(sSchoolNameTF.getText());\n\t\t\n\t\t//Update Student profile information in database\n\t\t\n\t}", "public void editTheirProfile() {\n\t\t\n\t}", "private void saveUserData() {\n mSharedPreferences.clearProfile();\n mSharedPreferences.setName(mName);\n mSharedPreferences.setEmail(mEmail);\n mSharedPreferences.setGender(mGender);\n mSharedPreferences.setPassWord(mPassword);\n mSharedPreferences.setYearGroup(mYearGroup);\n mSharedPreferences.setPhone(mPhone);\n mSharedPreferences.setMajor(mMajor);\n\n mImageView.buildDrawingCache();\n Bitmap bmap = mImageView.getDrawingCache();\n try {\n FileOutputStream fos = openFileOutput(getString(R.string.profile_photo_file_name), MODE_PRIVATE);\n bmap.compress(Bitmap.CompressFormat.PNG, 100, fos);\n fos.flush();\n fos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n\n if (entryPoint.getStringExtra(SOURCE).equals(MainActivity.ACTIVITY_NAME)) {\n Toast.makeText(RegisterActivity.this,\n R.string.edit_success, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(RegisterActivity.this,\n R.string.register_success, Toast.LENGTH_SHORT).show();\n }\n\n }", "private void createProfile(ParseUser parseUser){\n final Profile profile = new Profile();\n\n profile.setShortBio(\"\");\n profile.setLongBio(\"\");\n profile.setUser(parseUser);\n\n //default image taken from existing default user\n ParseQuery<ParseObject> query = ParseQuery.getQuery(\"Profile\");\n query.getInBackground(\"wa6q24VD5V\", new GetCallback<ParseObject>() {\n public void done(ParseObject searchProfile, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Couldn't retrieve default image\");\n e.printStackTrace();\n return;\n }\n else {\n defaultImage = searchProfile.getParseFile(\"profileImage\");\n\n if (defaultImage != null)\n profile.setProfileImage(defaultImage);\n else\n Log.d(TAG, \"Default image is null\");\n }\n }\n });\n\n profile.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Error while saving\");\n e.printStackTrace();\n return;\n }\n\n Log.d(TAG, \"Created and saved profile\");\n }\n });\n }", "private void saveUserInformation() {\n String name = editTextName.getText().toString().trim();\n String add = editTextAddress.getText().toString().trim();\n\n //creating a userinformation object\n UserInformation userInformation = new UserInformation(name, add);\n\n //getting the current logged in user\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n //saving data to firebase database\n /*\n * first we are creating a new child in firebase with the\n * unique id of logged in user\n * and then for that user under the unique id we are saving data\n * for saving data we are using setvalue method this method takes a normal java object\n * */\n databaseReference.child(user.getUid()).setValue(userInformation);\n\n //displaying a success toast\n Toast.makeText(this, \"Information Saved...\", Toast.LENGTH_LONG).show();\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}", "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 saveUserData(User user);", "@RequestMapping(value = \"/success\", method = RequestMethod.POST)\r\n\tpublic String profileSave(@ModelAttribute(\"userForm\") UserDetails userForm,Principal principal ) throws IOException {\n\t\t\r\n\t\t\tuserService.saveEditProfile(userForm,principal);\r\n\t\t\t\r\n\t\treturn \"redirect:dashboard\";\r\n\t}", "@FXML\r\n\tpublic void saveNewAccount( ) {\r\n\t\t// Save user input\r\n\t\tString name = userName.getText( );\r\n\t\tString mail = email.getText( );\r\n\r\n\t\t// Call the to file method to write to data.txt\r\n\t\tUserToFile.toFile(name, pin, mail);\r\n\t\t\r\n\t\t// View the test after the info is saved\r\n\t\tviewTest( );\r\n\t}", "private void saveUserInformation() {\n name.setText(nameInput.getText().toString());\n\n if (name.getText().toString().isEmpty()) {\n name.setError(\"Name required\");\n name.requestFocus();\n return;\n }\n\n FirebaseUser user = mAuth.getCurrentUser();\n if (user != null) {\n if (isBname()) {\n updateName(user);\n }\n if (isBtitle()) {\n updateTitle(user);\n }\n }\n }", "private void onEditProfileClicked() {\n Intent intent = new Intent(this, ProfileCreationActivity.class);\n intent.putExtra(ProfileCreationActivity.EDIT_USER_PROFILE, true);\n intent.putExtra(ProfileCreationActivity.RETURN_TO_PREVIOUS, true); // we want to return to here, not HomeActivity on cancel or submit\n startActivity(intent);\n }", "private void saveProfile()\n {\n mFirebaseUser = mFirebaseAuth.getCurrentUser();\n mDatabase = FirebaseDatabase.getInstance().getReference();\n mUserId = mFirebaseUser.getUid();\n\n StorageReference filePath = mStorage.child(\"UserPic\").child(mImageUri.getLastPathSegment());\n //UserProfile userProfile = new UserProfile();\n filePath.putFile(mImageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n mDatabase.child(\"users\").child(mUserId).child(\"userName\").setValue(fname);\n mDatabase.child(\"users\").child(mUserId).child(\"userImage\").setValue(downloadUrl.toString());\n }\n });\n\n }", "@RequestMapping(value = \"/profile\", method = RequestMethod.POST)\n\tpublic String createSuccess(@ModelAttribute Profile profile,\n\t\t\t@RequestParam(value = \"action\", required = true) String action,\n\t\t\tModel model) {\n\t\tif (action.equals(\"delete\")) {\n\t\t\tProfile profile1 = profileDao.findById(profile.getId());\n\t\t\tif (profile1 == null) {\n\t\t\t\tthrow new ResourceNotFoundException(\n\t\t\t\t\t\t\"Sorry, the requested user with id\" + profile.getId()\n\t\t\t\t\t\t\t\t+ \"does not exits!\");\n\t\t\t}\n\t\t\tthis.profileDao.delete(profile1);\n\t\t\tmodel.addAttribute(\"profile\", new Profile());\n\t\t\treturn \"redirect:/profile\";\n\t\t}\n\t\tif (action.equals(\"update\")) {\n\t\t\tProfile profile1 = profileDao.findById(profile.getId());\n\t\t\tif (profile1 == null) {\n\t\t\t\tthrow new ResourceNotFoundException(\n\t\t\t\t\t\t\"Sorry, the requested user with id\" + profile.getId()\n\t\t\t\t\t\t\t\t+ \"does not exits!\");\n\t\t\t}\n\t\t\tthis.profileDao.save(profile);\n\t\t\tmodel.addAttribute(\"profile\", profile);\n\t\t\treturn \"redirect:/profile/\" + profile.getId();\n\t\t}\n\t\tif (action.equals(\"create\")) {\n\t\t\tmodel.addAttribute(\"profile\", profile);\n\t\t\tthis.profileDao.save(profile);\n\t\t\treturn \"form\";\n\t\t}\n\t\treturn action;\n\t}", "private void sendUserData() {\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\n DatabaseReference myref = firebaseDatabase.getReference(Objects.requireNonNull(firebaseAuth.getUid()));\n UserProfile userProfile = new UserProfile(name, email, post, 0);\n myref.setValue(userProfile);\n }", "private void populateProfile() {\n mPassword_input_layout.getEditText().setText(mSharedPreferences.getPassWord());\n mEmail_input_layout.getEditText().setText(mSharedPreferences.getEmail());\n mEdit_name_layout.getEditText().setText(mSharedPreferences.getName());\n ((RadioButton) mRadioGender.getChildAt(mSharedPreferences.getGender())).setChecked(true);\n mPhone_input_layout.getEditText().setText(mSharedPreferences.getPhone());\n mMajor_input_layout.getEditText().setText(mSharedPreferences.getMajor());\n mClass_input_layout.getEditText().setText(mSharedPreferences.getYearGroup());\n\n // Load profile photo from internal storage\n try {\n FileInputStream fis = openFileInput(getString(R.string.profile_photo_file_name));\n Bitmap bmap = BitmapFactory.decodeStream(fis);\n mImageView.setImageBitmap(bmap);\n fis.close();\n } catch (IOException e) {\n // Default profile\n }\n }", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "@Override\n public void onClick(View view) {\n\n\n\n userDetail.setFname(fname.getText().toString());\n userDetail.setLname(lname.getText().toString());\n userDetail.setAge(Integer.parseInt(age.getText().toString()));\n userDetail.setWeight(Double.valueOf(weight.getText().toString()));\n userDetail.setAddress(address.getText().toString());\n\n try {\n new EditUserProfile(editUserProfileURL,getActivity(),userDetail).execute();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Toast.makeText(getActivity(), \"Saved Profile Successfully\",\n Toast.LENGTH_SHORT).show();\n getFragmentManager().popBackStack();\n\n }", "@ApiMethod(name = \"saveProfile\", path = \"profile\", httpMethod = HttpMethod.POST)\n // The request that invokes this method should provide data that\n // conforms to the fields defined in ProfileForm\n public Profile saveProfile(final User user, ProfileForm profileForm)\n throws UnauthorizedException {\n\n // If the user is not logged in, throw an UnauthorizedException\n if (user == null) {\n throw new UnauthorizedException(\"Authorization required\");\n }\n\n // Get the userId and mainEmail\n String mainEmail = user.getEmail();\n String userId = user.getUserId();\n\n // Get the displayName, city, state, & phone number sent by the request.\n String displayName = profileForm.getDisplayName();\n String phoneNumber = profileForm.getPhoneNumber();\n String city = profileForm.getCity();\n String state = profileForm.getState();\n String pictureUrl = profileForm.getPictureUrl();\n \n // Get the Profile from the datastore if it exists\n // otherwise create a new one\n Profile profile = ofy().load().key(Key.create(Profile.class, userId))\n .now();\n\n if (profile == null) {\n // Populate the displayName with default values\n // if not sent in the request\n if (displayName == null) {\n displayName = extractDefaultDisplayNameFromEmail(user\n .getEmail());\n }\n\n // Now create a new Profile entity\n profile = new Profile(userId, displayName, mainEmail, city, state, phoneNumber, pictureUrl);\n } else {\n // The Profile entity already exists\n // Update the Profile entity\n profile.update(displayName, city, state, phoneNumber, pictureUrl);\n }\n\n // Save the entity in the datastore\n ofy().save().entity(profile).now();\n // Return the profile\n return profile;\n }", "private void saveData() {\n\n SharedPreferences sharedPreferences=getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n\n editor.putString(\"name\",name.getText().toString());\n editor.putString(\"regnum\",regnum.getText().toString());\n editor.putInt(\"count\", count);\n editor.apply();\n\n }", "private void saveMeetup() {\n if (!binding.infoField.getText().toString().isEmpty()) {\n PassNewInfo mHost = (PassNewInfo) this.getTargetFragment();\n mHost.passMeetupInformation(type.toLowerCase(), binding.infoField.getText().toString());\n }\n dismiss();\n }", "private void putPersonalInformation() throws SQLException, FileNotFoundException, IOException {\n AdUserPersonalData personal;\n try {\n personal = PersonalDataController.getInstance().getPersonalData(username);\n staff_name = personal.getGbStaffName();\n staff_surname = personal.getGbStaffSurname();\n id_type = \"\"+personal.getGbIdType();\n id_number = personal.getGbIdNumber();\n putProfPic(personal.getGbPhoto());\n phone_number = personal.getGbPhoneNumber();\n mobile_number = personal.getGbMobileNumber();\n email = personal.getGbEmail();\n birthdate = personal.getGbBirthdate();\n gender = \"\"+personal.getGbGender();\n } catch (GB_Exception ex) {\n LOG.error(ex);\n GBMessage.putException(ex);\n }\n }", "private void updateProfile(PrivateProfile p) {\n final ProgressDialog dialog = new ProgressDialog(SettingsActivity.this);\n dialog.setMessage(getString(R.string.progress_update_profile));\n dialog.show();\n\n // Prepare user inputs for validator\n HashMap<String, Object> fields = new HashMap<String, Object>();\n fields.put(\"firstName\", mFirstName.getText().toString().trim());\n fields.put(\"lastName\", mLastName.getText().toString().trim());\n fields.put(\"homeCity\", mHomeCity.getText().toString().trim());\n fields.put(\"phone\", mPhone.getText().toString().trim());\n fields.put(\"arriveHQBy\", mArriveHQBy.getText().toString().trim());\n fields.put(\"arriveHomeBy\", mArriveHomeBy.getText().toString().trim());\n\n validateFields(fields);\n\n userProfile.setFirstName((String) fields.get(\"firstName\"));\n userProfile.setLastName((String) fields.get(\"lastName\"));\n userProfile.setHomeCity((String) fields.get(\"homeCity\"));\n userProfile.setPhoneNumber((String) fields.get(\"phone\"));\n userProfile.setDriverStatus((Boolean) fields.get(\"driving\"));\n userProfile.setDriverCar((String) fields.get(\"car\"));\n userProfile.setArriveHQBy((String) fields.get(\"arriveHQBy\"));\n userProfile.setArriveHomeBy((String) fields.get(\"arriveHomeBy\"));\n\n userProfile.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n dialog.dismiss();\n if (e != null) {\n // Show the error message\n Toast.makeText(SettingsActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n } else {\n // show user the activity was complete\n Toast.makeText(SettingsActivity.this, R.string.profile_saved, Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "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 }", "@POST\n\t @Path(\"create\")\n\t @Consumes(MediaType.APPLICATION_JSON)\n\t public Response createProfile(\n\t ProfileJson json) throws ProfileDaoException {\n\t Profile profile = json.asProfile();\n\t api.saveProfile(profile, datastore);\n\t\t//datastore.save(profile);\n\t return Response\n\t .created(null)\n\t .build();\n\t }", "private void updateProfile() {\n usuario.setEmail(usuario.getEmail());\n usuario.setNome(etName.getText().toString());\n usuario.setApelido(etUsername.getText().toString());\n usuario.setPais(etCountry.getText().toString());\n usuario.setEstado(etState.getText().toString());\n usuario.setCidade(etCity.getText().toString());\n\n showLoadingProgressDialog();\n\n AsyncEditProfile sinc = new AsyncEditProfile(this);\n sinc.execute(usuario);\n }", "private void createGuestProfile() {\n saveData();\n signupDelegate.enableNextButton(Boolean.FALSE);\n SwingUtil.setCursor(this, java.awt.Cursor.WAIT_CURSOR);\n errorMessageJLabel.setText(getString(\"SigningUp\"));\n errorMessageJLabel.paintImmediately(0, 0, errorMessageJLabel.getWidth(),\n errorMessageJLabel.getHeight());\n try {\n getSignupHelper().createGuestProfile();\n } catch (final OfflineException ox) {\n logger.logError(ox, \"An offline error has occured.\");\n addInputError(getSharedString(\"ErrorOffline\"));\n } catch (final ReservationExpiredException rex) {\n logger.logWarning(rex, \"The username/e-mail reservation has expired.\");\n addInputError(getString(\"ErrorReservationExpired\"));\n } catch (final Throwable t) {\n logger.logFatal(t, \"An unexpected error has occured.\");\n addInputError(getSharedString(\"ErrorUnexpected\"));\n } finally {\n errorMessageJLabel.setText(\" \");\n }\n }", "public void setUserProfile(UserProfile userProfile) {this.userProfile = userProfile;}", "public void onClick(View view) {\n if(validate_info()){\n create_user();\n user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n submit_profile(user);\n }\n }\n else{\n return;\n\n\n }\n }", "public void addUser(Profile profile) throws JSONException {\n\t\tofy().save().entity(profile).now();\n\t}", "public void saveProfile(WSSecurityProfile profile) throws WSSecurityProfileManagerException{\n \t\n\t\tsynchronized(profilesFile_UserDefined){\n\t\t\t // If the file does not exist yet\n\t\t if (!profilesFile_UserDefined.exists()){\n\t\t \t//Create a new file\n\t\t \t try {\n\t\t \t\tprofilesFile_UserDefined.createNewFile();\n\t\t \t }\n\t\t \t catch(IOException ex)\n\t\t \t {\n\t\t \t\t String exMessage = \"WSSecurityProfileManager failed to create a file for user-defined profiles.\";\n\t\t \t\t logger.error(exMessage, ex);\n\t\t \t\t throw new WSSecurityProfileManagerException(exMessage);\n\t\t \t }\n\t\t }\n\n\t\t BufferedWriter userProfilesFileWriter = null;\n\t\t try{\n\t\t \t// Open the file for writing (i.e. appending)\n\t\t \t userProfilesFileWriter = new BufferedWriter((new FileWriter(profilesFile_UserDefined, true)));\n\t\t \t // Add a new profile entry\n\t\t String profileEntry ;\n\t\t profileEntry = \"-----BEGIN PROFILE-----\\n\";\n\t\t \t // Profile name\n\t\t profileEntry = profileEntry +\"Name=\"+ profile.getWSSecurityProfileName() +\"\\n\";\n\t\t \t // Profile description\n\t\t profileEntry = profileEntry +\"Description=\" + profile.getWSSecurityProfileDescription() +\"\\n\";\n\t\t \t // Profile itself\n\t\t profileEntry = profileEntry +\"Profile=\" + profile.getWSSecurityProfileString();\n\t\t profileEntry = profileEntry + \"-----END PROFILE-----\\n\";\n\t\t \n\t\t \t userProfilesFileWriter.append(profileEntry);\n\t\t \t userProfilesFileWriter.newLine();\n\t\t \t \n\t\t \t // Also add to the list with user defined profiles \n\t\t \t wsSecurityProfiles_UserDefined.add(profile);\n\t\t \t wsSecurityProfileNames_UserDefined.add(profile.getWSSecurityProfileName());\n\t\t \t wsSecurityProfileDescriptions_UserDefined.add(profile.getWSSecurityProfileDescription());\n\t\t \t \n\t\t }\n\t\t catch(FileNotFoundException ex){\n\t\t \t // Should not happen\n\t\t }\n\t\t catch(IOException ex){\n\t\t \t String exMessage = \"WSSecurityProfileManager failed to save the new user-defined profile.\";\n\t\t \t logger.error(exMessage, ex);\n\t\t \t throw new WSSecurityProfileManagerException(exMessage);\n\t\t }\n\t\t finally {\n\t\t \tif (userProfilesFileWriter != null)\n\t\t \t{\n\t\t \t\ttry {\n\t\t \t\t\tuserProfilesFileWriter.close();\n\t\t \t\t}\n\t\t \t\tcatch (IOException e) { \n\t\t \t//ignore\n\t\t \t\t}\n\t\t \t}\n\t\t } \n\t\t}\n\t}", "@POST\n @Path(\"/create\")\n @Consumes(MediaType.APPLICATION_JSON)\n public Response createUser(ProfileJson json) throws ProfileDaoException {\n Profile profile = json.asProfile();\n profile.setPassword(BCrypt.hashpw(profile.getPassword(), BCrypt.gensalt()));\n //add checking if profile doesn't exit\n api.saveProfile(profile, datastore);\n return Response\n .created(null)\n .build();\n }", "@Override\n\tpublic void saveUserSettingProfile(UserProfile userProfile)\n\t\t\tthrows Exception {\n\n\t}", "public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\n }", "public UserProfile createUserProfile(String username, UserProfile newProfile);", "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 }", "private void saveRegistration() {\n if (hasCorrectDetails()) {\n if (entryPoint != null) {\n switch (entryPoint.getStringExtra(SOURCE)) {\n case MainActivity.ACTIVITY_NAME:\n // Check any change in password? We know mPassword is never null since it's required\n if (!mPassword.equals(mSharedPreferences.getPassWord())) {\n saveUserData();\n startActivity(new Intent(RegisterActivity.this,\n LoginActivity.class)\n .putExtra(SOURCE, RegisterActivity.ACTIVITY_NAME));\n finish();\n } else {\n saveUserData();\n finish();\n }\n break;\n case LoginActivity.ACTIVITY_NAME:\n saveUserData();\n finish();\n break;\n }\n }\n\n }\n }", "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 }", "public void mySaveInfo(View view){\n\n String fname = fName.getText().toString();\n String lname = lName.getText().toString();\n String my_address = address.getText().toString();\n\n // Checks field for empty or not\n if(isEmptyField(fName))return;\n if(isEmptyField(lName))return;\n if(isEmptyField(address))return;\n\n Map<String,Object> myMap = new HashMap<String,Object>();\n myMap.put(KEY_FNAME,fname);\n myMap.put(KEY_LNAME,lname);\n myMap.put(KEY_ADDRESS, my_address);\n myMap.put(\"role\", \"user\");\n\n /*\n By geting rid of the document, Firestore will generate a new Id each time a\n new user is created.\n */\n db.collection(\"users\").document(RegisteredUserID)\n .set(myMap).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(UserSignUp.this, \"User Saved\", Toast.LENGTH_SHORT).show();\n // This should go to the home screen if the user is succesfully entered\n startActivity(new Intent(UserSignUp.this,MainActivity.class));\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(UserSignUp.this, \"Error!\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, e.toString());\n }\n });\n }", "@Override\n\tpublic void saveUserProfile(UserProfile userProfile, boolean isOption,\n\t\t\tboolean isBan) throws Exception {\n\n\t}", "private void saveStudent(){\n StudentGroupThrift group = mainWindow.getStudentClient().getStudentGroupByName\n (this.group.getSelectedItem().toString());\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\n String birthDate = format.format(jDateChooser.getDate());\n StudentThrift studentThrift = new StudentThrift(\n id,\n getTextID(FIRST_NAME),\n getTextID(LAST_NAME),\n getTextID(MIDDLE_NAME),\n birthDate,\n getTextID(ADDRESS),\n group\n );\n mainWindow.getStudentClient().saveStudent(studentThrift);\n closeDialog();\n }", "public void editProfile() {\n\n\t\tAccount account = getInputOfUsersAccount();\n\t\tSystem.out.println(account.getUser().toString());\n\n\t\taccount = userBo.handleProfileOption(account);\n\n\t\tif (userDAO.editProfile(account))\n\t\t\tSystem.out.println(\"User edited!\");\n\n\t\telse\n\t\t\tSystem.out.println(\"Something went wrong!\");\n\n\t\tAdminMenu.getAdminMenu();\n\t}", "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 }", "private void saveInfoHelper(){\n\n if(!isAnyEmpty()) {\n boolean firstSave = (prefs.getString(\"email\", null) == null);\n //store first name\n editor.putString(\"fname\", fname.getText().toString());\n // store last name\n editor.putString(\"lname\", lname.getText().toString());\n // store email\n editor.putString(\"email\", email.getText().toString());\n // store password\n editor.putString(\"password\", password.getText().toString());\n // store currency\n editor.putInt(\"curr\", spinner_curr.getSelectedItemPosition());\n // store stock\n editor.putInt(\"stock\", spinner_stock.getSelectedItemPosition());\n // store date\n editor.putString(\"date\", new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").format(Calendar.getInstance().getTime()));\n\n editor.putString(\"token\", \"\");\n\n editor.commit();\n\n Toast.makeText(this, R.string.data_saved, Toast.LENGTH_SHORT).show();\n\n loadInfo(); //to show new data immediately without refreshing the page\n\n requestToken();\n\n if(firstSave){\n finish();\n }\n\n }else{\n Toast.makeText(this, R.string.data_empty, Toast.LENGTH_SHORT).show();\n }\n\n }", "private void editProfile() {\n Log.d(TAG, \"Starting volley request to API\");\n try {\n String authority = String.format(Constants.AUTHORITY,\n Constants.TENANT,\n Constants.EDIT_PROFILE_POLICY);\n\n User currentUser = Helpers.getUserByPolicy(\n sampleApp.getUsers(),\n Constants.EDIT_PROFILE_POLICY);\n\n sampleApp.acquireToken(\n this,\n Constants.SCOPES.split(\"\\\\s+\"),\n currentUser,\n UiBehavior.SELECT_ACCOUNT,\n null,\n null,\n authority,\n getEditPolicyCallback());\n } catch(MsalClientException e) {\n /* No User */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n }\n\n }", "public void saveData(){\n SharedPreferences sharedPreferences = getSharedPreferences(\"SHARED_PREFS\",MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"email_pref\",email.getText().toString());\n editor.putString(\"password_pref\",uPassword.getText().toString());\n editor.apply();\n }", "void savePreference(SignUpResponse response);", "private void restoringDataProfile() {\n mSharedPreferences = getSharedPreferences(Constants.PROFILE_NAME, MODE_PRIVATE);\n avatar = mSharedPreferences.getString(Constants.EDIT_PROFILE_PREFERENCES_KEY_PICTURE_PROFILE, \"\");\n Bitmap savingAvatar = AppSingleton.decodeBase64(avatar);\n if (savingAvatar != null) {\n mImageAvatar.setImageBitmap(savingAvatar);\n }\n\n mEmail.setText(mSharedPreferences.getString(Constants.EDIT_PROFILE_PREFERENCES_KEY_EMAIL, \"[email protected]\"));\n mName.setText(mSharedPreferences.getString(Constants.EDIT_PROFILE_PREFERENCES_KEY_NAME, \"StarMovie\"));\n mBirthDay.setText(mSharedPreferences.getString(Constants.EDIT_PROFILE_PREFERENCES_KEY_BIRTHDAY, \"01/01/1994\"));\n mGender.setText(mSharedPreferences.getString(Constants.EDIT_PROFILE_PREFERENCES_KEY_GENDER, \"Male\"));\n }", "private void setValuesInSharedPrefernce() {\r\n\r\n\t\tmSharedPreferences_reg.edit().putString(\"ProfileImageString\", profileImageString).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"PseudoName\", psedoName).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"Pseudodescription\", profiledescription).commit();\r\n\t}", "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}", "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 boolean createUser(UserProfile userProfile) {\n\t\tmongoTemplate.insert(userProfile, \"UserProfile_Details\");\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void save() {\n\t\tif (section != null && !section.isEmpty()) {\r\n\t\t\tif (gradeLevel == null || gradeLevel.isEmpty()) {\r\n\t\t\t\tSection sec = (Section) Section.extractObject(Section.class.getSimpleName(), section);\r\n\t\t\t\tgradeLevel = sec.gradeLevel;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (course == null && gradeLevel != null && !gradeLevel.isEmpty()) {\r\n\t\t\tGradeLevel lvl = (GradeLevel) GradeLevel.extractObject(GradeLevel.class.getSimpleName(), gradeLevel);\r\n\t\t\tcollege = lvl.college;\r\n\t\t\tcourse = lvl.course;\r\n\t\t}\r\n\t\tif (course!=null && course.startsWith(\"B\")) {\r\n\t\t\tcollege = true;\r\n\t\t}\r\n\t\tif (!isEmptyKey()) {\r\n//\t\t\twe can get the latest enrollment schoolyear\r\n\t\t\ttry {\r\n\t\t\t\tif (\"ENROLLED\".equals(status)) {\r\n\t\t\t\t\tString sc = DBClient.getSingleColumn(BeanUtil.concat(\"SELECT a.schoolYear FROM Enrollment a WHERE a.studentId=\",personId,\" ORDER BY a.schoolYear DESC\")).toString();\r\n\t\t\t\t\tlatestSchoolYear = sc;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (schoolYear==null || schoolYear.isEmpty()) {\r\n\t\t\tschoolYear = AppConfig.getSchoolYear();\r\n\t\t}\r\n\t\tpersonType = \"STUDENT\";\r\n\t\tif (isEmptyKey()) {\r\n\t\t\tsuper.save();\r\n new springbean.SchoolDefaultProcess().createAllSubjects(this);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsuper.save();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void save(Account userForm) {\n\t\taccount.save(userForm);\n\n\t}", "public void upload() {\n try {\n BufferedImage bufferedProfile = ImageIO.read(profilePicture.getInputStream());\n FaceImage face = new FaceImage(bufferedProfile);\n\n if (face.foundFace()) {\n\n face.setNoCropMultiplier(1);\n face.setAdditionPadding(20);\n face.setDimension(128, 128);\n BufferedImage profilePicture = face.getScaledProfileFace();\n\n File outfile = new File(Settings.NEW_PROFILE_IMAGE_PATH.replace(\"~~username~~\", student.getUserName()));\n ImageIO.write(profilePicture, \"png\", outfile);\n\n success = true;\n\n student.setProfilePicturePath(\"profile/\" + student.getUserName() + \".png\");\n save();\n\n } else {\n FacesContext.getCurrentInstance().addMessage(\"imageContainer:file\", new FacesMessage(\"Kein Gesicht gefunden!\"));\n\n }\n\n } catch (IOException e) {\n System.err.println(\"something went wrong \" + e.getMessage());\n }\n\n }", "public void saveUserData(UserData userData){\n userDataRepository.save(userData);\n }", "@Override\n public void copyTo(UserProfile userProfile) {\n userProfile.setId(getId());\n userProfile.setCity(getCity());\n userProfile.setZipcode(getZipcode());\n userProfile.setCountry(getCountry());\n userProfile.setTitle(getTitle());\n userProfile.setName(getName());\n userProfile.setFirstName(getFirstName());\n userProfile.setLastName(getLastName());\n userProfile.setUsername(getUsername());\n userProfile.setGender(getGender());\n userProfile.setPoints(getPoints());\n userProfile.setNotifyReportDue(isNotifyReportDue());\n }", "private void callUpdateProfile() {\n String userStr = CustomSharedPreferences.getPreferences(Constants.PREF_USER_LOGGED_OBJECT, \"\");\n Gson gson = new Gson();\n User user = gson.fromJson(userStr, User.class);\n LogUtil.d(\"QuyNT3\", \"Stored profile:\" + userStr +\"|\" + (user != null));\n //mNameEdt.setText(user.getName());\n String id = user.getId();\n String oldPassword = mOldPassEdt.getText().toString();\n String newPassword = mNewPassEdt.getText().toString();\n String confirmPassword = mConfirmPassEdt.getText().toString();\n String fullName = mNameEdt.getText().toString();\n String profileImage = user.getProfile_image();\n UpdateUserProfileRequest request = new UpdateUserProfileRequest(id, fullName, profileImage,\n oldPassword, newPassword, confirmPassword);\n request.setListener(callBackEvent);\n new Thread(request).start();\n }", "@PostMapping(\"/user/new/\")\n\tpublic userprofiles createUser(@RequestParam String firstname, @RequestParam String lastname, @RequestParam String username, @RequestParam String password, @RequestParam String pic) {\n\t\treturn this.newUser(firstname, lastname, username, password, pic);\n\t}", "public void saveProfiles() throws IOException\n {\n try\n {\n profFile.getParentFile().mkdirs();\n profFile.delete();\n profFile.createNewFile();\n PrettyPrinterXmlWriter pp = new PrettyPrinterXmlWriter(new SimpleXmlWriter(new FileWriter(profFile)));\n pp.writeXmlVersion();\n pp.writeEntity(\"XNATProfiles\");\n if (this.size() != 0)\n {\n for (XNATProfile ip : this)\n {\n pp.writeEntity(\"XNATProfile\")\n .writeAttribute(\"profileName\", ip.getProfileName())\n \n .writeEntity(\"serverURL\")\n .writeText(ip.getServerURL().toString())\n .endEntity() \n // encrypt(sc.getServerURL().toString()));\n \n .writeEntity(\"userid\")\n .writeText(ip.getUserid())\n .endEntity()\n \n .writeEntity(\"projectList\");\n \n for (String is : ip.getProjectList())\n pp.writeEntity(\"project\")\n .writeText(is)\n .endEntity();\n \n pp.endEntity()\n .writeEntity(\"dicomReceiverHost\")\n .writeText(ip.getDicomReceiverHost())\n .endEntity()\n \n .writeEntity(\"dicomReceiverPort\")\n .writeText(ip.getDicomReceiverPort())\n .endEntity()\n \n .writeEntity(\"dicomReceiverAeTitle\")\n .writeText(ip.getDicomReceiverAeTitle())\n .endEntity()\n \n .endEntity();\n }\n }\n pp.writeEntity(\"preferredProfile\")\n .writeText(currentProfile)\n .endEntity()\n .endEntity()\n .close();\n }\n catch (IOException exIO)\n \t\t{\n throw exIO;\n }\n }", "@Override\n\tpublic void saveData()\n\t{\n ssaMain.d1.pin = ssaMain.tmp_pin1;\n ssaMain.d1.balance = ssaMain.tmp_balance1;\n System.out.println(\"Your account has been established successfully.\");\n\t}", "private void 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 saveAccount(View view) {\n\t\tdata.setmSearchFilter(data.getmSearchFilterEdit().getText().toString());\n\t\tif(data.getmFirstNameEdit()!= null)\n\t\t{\n\t\t\tdata.setmBaseDN(data.getmBaseDNSpinner().getText().toString());\n\t\t\tdata.setmFirstName((String)data.getmFirstNameEdit().getSelectedItem());\n\t\t\tdata.setmLastName((String)data.getmLastNameEdit().getSelectedItem());\n\t\t\tdata.setmOfficePhone((String)data.getmOfficePhoneEdit().getSelectedItem());\n\t\t\tdata.setmCellPhone((String)data.getmCellPhoneEdit().getSelectedItem());\n\t\t\tdata.setmHomePhone((String)data.getmHomePhoneEdit().getSelectedItem());\n\t\t\tdata.setmEmail((String)data.getmEmailEdit().getSelectedItem());\n\t\t\tdata.setmImage((String)data.getmImageEdit().getSelectedItem());\n\t\t\tdata.setmStreet((String)data.getmStreetEdit().getSelectedItem());\n\t\t\tdata.setmCity((String)data.getmCityEdit().getSelectedItem());\n\t\t\tdata.setmZip((String)data.getmZipEdit().getSelectedItem());\n\t\t\tdata.setmState((String)data.getmStateEdit().getSelectedItem());\n\t\t\tdata.setmCountry((String)data.getmCountryEdit().getSelectedItem());\n\t\t}\n\t\t\n\t\tif (!data.ismConfirmCredentials()) {\n\t\t\tfinishLogin();\n\t\t} else {\n\t\t\tfinishConfirmCredentials(true);\n\t\t}\n\t}", "private void saveInfoAndGotoMainAct(String uID) {\n\n User mUser = new User(\n acc_type_spinner.getSelectedItem().toString(),\n place_picker_field.getText().toString(),\n phone_number_field.getText().toString(),\n sex_spinner.getSelectedItem().toString(),\n user_name_text_field.getText().toString());\n\n mDatabase.child(\"Users\").child(uID).setValue(mUser)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n toastMsg(\"Cập nhật hồ sơ người dùng thành công!\");\n gotoMainAct();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n toastMsg(\"Cập nhật hồ sơ người dùng thất bại!\");\n }\n });\n\n if (mUser.getAcc_type().equals(\"Người dân\")) {\n mDatabase.child(\"uIDs\").push().setValue(uID);\n }\n\n }", "private void updateTeacherProfileInfo() {\n\t\t\n\t\tteacher.setLastName(tLastNameTF.getText());\n\t\tteacher.setFirstName(tFirstNameTF.getText());\n\t\tteacher.setSchoolName(tSchoolNameTF.getText());\n\t\t\n\t\t//Update Teacher profile information in database\n\t\t\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 }", "private void saveSettings(){\n // get current user from shared preferences\n currentUser = getUserFromSharedPreferences();\n\n final User newUser = currentUser;\n Log.i(\"currentUser name\",currentUser.getUsername());\n String username = ((EditText)findViewById(R.id.usernameET)).getText().toString();\n\n if(\"\".equals(username)||username==null){\n Toast.makeText(getApplicationContext(),\"Failed to save, user name cannot be empty\",Toast.LENGTH_LONG).show();\n return;\n }\n\n newUser.setUsername(username);\n\n // update user data in firebase\n Firebase.setAndroidContext(this);\n Firebase myFirebaseRef = new Firebase(Config.FIREBASE_URL);\n\n // set value and add completion listener\n myFirebaseRef.child(\"users\").child(newUser.getFireUserNodeId()).setValue(newUser,new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n\n Toast.makeText(getApplicationContext(),\"Data could not be saved. \" + firebaseError.getMessage(),Toast.LENGTH_SHORT).show();\n } else {\n // if user info saved successfully, then save user image\n uploadPhoto();\n Toast.makeText(getApplicationContext(),\"User data saved successfully.\",Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "private void addProfile(String inputName) {\n \tif (! inputName.equals(\"\")) {\n\t\t\t///Creates a new profile and adds it to the database if the inputName is not found in the database\n \t\tif (database.containsProfile(inputName)) {\n \t\t\tlookUp(inputName);\n \t\t\tcanvas.showMessage(\"Profile with name \" + inputName + \" already exist.\");\n \t\t\treturn;\n \t\t}\n\t\t\tprofile = new FacePamphletProfile (inputName);\n\t\t\tdatabase.addProfile(profile);\n\t\t\tcurrentProfile = database.getProfile(inputName);\n \t\tcanvas.displayProfile(currentProfile);\n\t\t\tcanvas.showMessage(\"New profile created.\");\n\t\t\t\n \t}\n\t\t\n\t}", "void setUserProfile(Map<String, Object> profile);", "void save(UserDetails userDetails);", "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 }", "@Override\n\tpublic long createProfile(Profile profile) {\n\t\treturn 0;\n\t}", "@RequestMapping(\"/sc/profile/save\")\n\tpublic String saveCompanyProfile(@ModelAttribute Yourtaskuser yourtaskuser) { // retournait un String avant\n\t\tyourtaskuserService.saveYourtaskuser(yourtaskuser);\n\t\treturn \"redirect:/sc/profile\";\n\t\t\n\t}", "public static void SaveUser(StandardUserModel user, Context context) {\n\t\tfilename = userprofile;\n\t\tString modelJson = gson.toJson(user);\n\t\t\n\t\twriteuser(modelJson, context);\n\t}", "@Override\n\tpublic void createUserProfile(User user) throws Exception {\n\n\t}", "@RequestMapping(\"/admin/profile/save\")\n\tpublic String saveAdminProfile(@ModelAttribute Yourtaskuser yourtaskuser) { // retournait un String avant\n\t\tyourtaskuserService.saveYourtaskuser(yourtaskuser);\n\t\treturn \"redirect:/admin/profile\";\n\t\t\n\t}", "void save(Account account);", "@RequestMapping(\"/su/profile/save\")\n\tpublic String saveUserProfile(@ModelAttribute Yourtaskuser yourtaskuser) { // retournait un String avant\n\t\tyourtaskuserService.saveYourtaskuser(yourtaskuser);\n\t\treturn \"redirect:/su/profile\";\n\t\t\n\t}", "@Test\n public void tcEditProfileWithValidData() {\n for (User user : EditProfileTestData.validUsers) {\n loginPage.open();\n loginPage.populateUsername(user.getUsername());\n loginPage.populatePassword(user.getPassword());\n loginPage.login();\n\n common.openEditProfilePage();\n\n editProfilePage.editProfile(user.getEmail(), user.getName(), user.getPhone(), user.getAddress());\n\n // do some verification\n\n common.logout();\n }\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 saveDetailsOnClick(View view)\n {\n\n //Create Picture object by passing String params set by user.\n Picture picture = new Picture(locationEditText.getText().toString(),\n pictureNameEditText.getText().toString());\n\n //call pushPicture method using instance of Picture to push picture to Firebase\n picture.pushPicture(picture.getLocation(),picture.getName());\n\n\n //Display Toast to let user know that picture has been saved.\n Toast.makeText(PictureActivity.this, R.string.save_toast,\n Toast.LENGTH_SHORT).show();\n\n }", "public void saveInfo(View view){\n SharedPreferences sharedPref = getSharedPreferences(\"userinfo\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"username\", usernameInput.getText().toString());\n\n editor.apply();\n Toast.makeText(this,\"Saved!\",Toast.LENGTH_LONG).show();\n }", "private void addProfile(ProfileInfo profileInfo)\r\n\t{\r\n\t\taddProfile(profileInfo.getProfileName(), \r\n\t\t\t\tprofileInfo.getUsername(), \r\n\t\t\t\tprofileInfo.getServer(),\r\n\t\t\t\tprofileInfo.getPort());\r\n\t}", "public void UpdatePrefs()\r\n {\r\n \t\r\n \t// Data from the first name field is being stored into persistent storage\r\n \teditor.putString\r\n \t(\"name\", \r\n \tfNameField.getText()\r\n \t.toString());\r\n \t\r\n \t// Data from the last name field is being stored into persistent storage\r\n editor.putString\r\n (\"lName\",\r\n lNameField.getText()\r\n .toString());\r\n \r\n // Data from the phone number field is being stored into persistent storage\r\n editor.putString\r\n (\"phoneNum\"\r\n , phoneNumField.getText()\r\n .toString());\r\n \r\n // Data from the address field is being stored into persistent storage\r\n editor.putString\r\n (\"address\"\r\n , homeAddressField.getText()\r\n .toString());\r\n \r\n // Push all fields data to persistent storage forever\r\n editor.commit();\r\n }", "void save(User user);", "public void saveData(){\n String name = editTextName.getText().toString();\n if(!name.isEmpty()){\n DataManager.getInstance().addName(name);\n }\n\n finish();\n }", "public void editProfile() {\n dialog = new Dialog(getContext());\n dialog.setContentView(R.layout.edit_profile);\n\n editUsername = dialog.findViewById(R.id.tv_uname);\n TextView editEmail = dialog.findViewById(R.id.tv_address);\n editImage = dialog.findViewById(R.id.imgUser);\n\n editUsername.setText(user.getUserID());\n editEmail.setText(user.getEmail());\n editEmail.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Toast.makeText(getContext(), \"Email cannot be changed.\", Toast.LENGTH_SHORT).show();\n }\n });\n decodeImage(user.getProfilePic(), editImage);\n editImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivityForResult(new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI), 3);\n }\n });\n\n TextView save = dialog.findViewById(R.id.save_edit);\n save.setOnClickListener(new View.OnClickListener() { // save changes\n @Override\n public void onClick(View v) {\n String username = editUsername.getText().toString();\n if(username.equals(\"\")) {\n Toast.makeText(getContext(), \"Username cannot be null\", Toast.LENGTH_SHORT).show();\n return;\n } else if (!checkUsername(username)) {\n Toast.makeText(getContext(), \"Username already exists\", Toast.LENGTH_SHORT).show();\n return;\n }\n user.setUserID(username);\n if(profilePicChanged) {\n user.setProfilePic(profilePic);\n profilePic = null;\n profilePicChanged = false;\n }\n docRef.set(user);\n dialog.dismiss();\n loadDataFromDB();\n }\n });\n\n TextView cancel = dialog.findViewById(R.id.cancel_edit);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss(); // cancel changes\n }\n });\n\n dialog.show();\n dialog.getWindow().setLayout(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n }" ]
[ "0.77352834", "0.7581732", "0.7224493", "0.68888825", "0.6762849", "0.6726855", "0.6704674", "0.66201735", "0.65882474", "0.6585841", "0.65558606", "0.65188426", "0.6458898", "0.64131045", "0.6410765", "0.63908684", "0.63645667", "0.6325455", "0.63164306", "0.63096917", "0.63013387", "0.62953794", "0.6295137", "0.6233549", "0.6233319", "0.6230717", "0.6224547", "0.62109613", "0.6166489", "0.6164645", "0.6162377", "0.6161656", "0.6125829", "0.61257124", "0.6122742", "0.6122304", "0.61013615", "0.6101129", "0.6091206", "0.60823", "0.6070786", "0.60699964", "0.60674167", "0.60649484", "0.6063146", "0.6053282", "0.6052988", "0.605212", "0.60240036", "0.60073376", "0.59989583", "0.594814", "0.59295523", "0.5918081", "0.59113234", "0.5908487", "0.5905929", "0.5886768", "0.5884828", "0.58835965", "0.5882734", "0.58776605", "0.58760107", "0.5875223", "0.58724356", "0.5831516", "0.5831391", "0.58202857", "0.58138305", "0.5812172", "0.5805814", "0.58045805", "0.57948065", "0.5787303", "0.5783565", "0.5782052", "0.57735664", "0.5773416", "0.5772926", "0.5766115", "0.5764594", "0.57640004", "0.57609946", "0.5743494", "0.5736921", "0.57368064", "0.5729808", "0.5715492", "0.57122844", "0.57010794", "0.56996673", "0.56923354", "0.56900644", "0.56847817", "0.56790316", "0.5677847", "0.5671262", "0.5670709", "0.56478786", "0.5646936" ]
0.829513
0
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.weights, 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 public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\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}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\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\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\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 void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_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, 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\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic 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\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.menu, menu);\r\n return true;\r\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.72497207", "0.72041494", "0.7198533", "0.71808106", "0.71110344", "0.7044596", "0.7042557", "0.7015272", "0.70119643", "0.6984017", "0.6950008", "0.6944079", "0.6937662", "0.6921333", "0.6921333", "0.6894039", "0.6887707", "0.6880534", "0.68777215", "0.6867014", "0.6867014", "0.6867014", "0.6867014", "0.68559307", "0.6852073", "0.68248004", "0.6820769", "0.68184304", "0.68184304", "0.6817935", "0.6810622", "0.6804502", "0.68026507", "0.67964166", "0.67932844", "0.6791405", "0.67871046", "0.6762318", "0.67619425", "0.67528236", "0.6749201", "0.6749201", "0.6745379", "0.6743501", "0.6731059", "0.67279845", "0.6727818", "0.6727818", "0.67251533", "0.67155576", "0.6709411", "0.6708032", "0.67033577", "0.67028654", "0.67017025", "0.669979", "0.66913515", "0.6688428", "0.6688428", "0.66866416", "0.6685591", "0.6683817", "0.6682796", "0.66729134", "0.6672762", "0.6666433", "0.66600657", "0.66600657", "0.66600657", "0.6659591", "0.6659591", "0.6659591", "0.66593474", "0.66565514", "0.6655428", "0.6654482", "0.665351", "0.665207", "0.6651319", "0.6649983", "0.66496044", "0.6649297", "0.66489553", "0.6648444", "0.6648406", "0.6645919", "0.66434747", "0.66401505", "0.66370535", "0.66367626", "0.66367304", "0.66367304", "0.66367304", "0.6633702", "0.6633666", "0.6631505", "0.6629352", "0.6629109", "0.6624368", "0.66234607", "0.66223407" ]
0.0
-1