I’m making an app for an ice cream shop where I need at some point to know how many ice cream from a specific flavor were sold. I have to write the flavor of the ice cream when I add it to the stock, so the ArrayList that contains the flavor is initially empty. Then I need another ArrayList which
Tag: java
Automate status checkbox to verify active/inactive
I wish to automate a scenario, where in a data grid I have a checkbox for Status for a user, whether the user is active or not, now what I am doing is: 1. Creating a list of checkboxes on the Grid, and if the size > 0 then I gettext() of the first record in the grid and store
Naming Buttons through User Input
So I´m having three Buttons which lead to other Activities with a normal Click. Now i want to name the buttons through a longer Click and User Input. So short click goes forward, long Click ability to rename it. So far i was able to rename the button with a long click, but only to a predetermined String. My c…
How to verify ‘Open xdg-open popup’ in Chrome via Selenium Webdriver?
I am writing a testcase where if a certain link is clicked a “Open xdg-open” Popup is triggered in the chrome browser. I want to verify in my testcase if an “Open xdg-open” Popup actually appears. I tried to use the following Code block: However the “Open xdg-open” Popup tr…
Updating CroneSchedule & Job Dynamically without stopping server
I need help in externalizing the below cron schedule or executing it dynamically. For example, in the below code it is hardcoded to perform every Saturday: cronSchedule(“0 0 12 ? * SAT”). I want the value inside the cronSchedule() to externalize so that even after the server is started, I can stil…
How to sort the hashmap in descending order by values and if the values are the same then by key in ascending order
I have a HashMap<Integer, Integer> named “relevance” e.g {2: 3, 1: 3, 3: 3, 5: 4, 4: 4, 6: 3} and I want do DESC sorting by values. I get a hashmap {5: 4, 4: 4, 2: 3, 1: 3, 3: 3, 6: 3}. How can I sort ascending keys with the same values? Answer You can “chain” Comparators by
Jackson module not registered after update from Spring Boot 2.4.x to 2.5.x [duplicate]
This question already has answers here: Spring Boot 2.5.0 and InvalidDefinitionException: Java 8 date/time type `java.time.Instant` not supported by default (4 answers) Closed 6 months ago. After updating my spring-boot-starter-parent version from 2.4.8 to 2.5.4, I started having this error with jackson seria…
CRATE db tables are causing an error when upgrading to CRATE:4.3.4 from CRATE:4.2.7
Facing the below error while restoring snapshots or upgrade cratedb to a higher version from 4.2.7 to 4.3.4 Below is the sample table creation schema. As field3 is the dynamic object, it’ll allow adding more attributes into it. So, now after data is inserted into the table the current schema is as follo…
auto changing data with Hibernate
I have problem with Hibernate. I have next method: This method should assign user on task and send message to kafka consumer with TaskBeforeUpdate and TaskAfterUpdate. But I have problem when I try to assign user, my BeforeUpdateTask change all his fields to TaskAfterUpdate. And this dont work, but i dont kno…
is it possible to make swagger do not show the reference project api
Recently I found my swagger UI document shows so much api entry point. Finally I found that the document also shows other project entry point. For example, Spring Boot project A imported Spring Boot project B and C, but the Spring Boot project A shows A + B + C’s api entry point in project A’s swa…