POST request in Postman {“data”:[“dog”,45,256,256,2,5]} Answer i think that you First need to create your post request like this: (you will need to change the headers and parameters depending on what you are currently using in your Postman The previous one is a normal way of sending HT…
Tag: java
How to catch an out of bounds exception in Java and continue?
I am writing a program that converts a prefix expression to a postfix expression. For an expression like ” x-x-ABC+BA ” the program should throw an out of bounds exception, and the program should continue onto the next line (from the input document), I have managed to make it work for one expressi…
Java – Android Media Player – change icon play to pause. Back not working
i have a code for playing sound from firebase storage. I setting now for ImageView change icon play to pause for playing music. I need the icon to go back to play after playing. Does anyone know how to do this? Thank you for your help. Answer Just add a setOnCompletionListener:
Cardview not displaying
I am trying to use com.google.android.material.card.MaterialCardView to display images and text. In the xml file it appears to be correct but when running the application, the card view is blank not even a text. Below are my xml file and grade file. The actual output I want also is shown in the picture (expec…
Pass data from recyclerView to another in fragment
I want to pass data from recyclerview to another both in fragment, first adapter for display item, and second adapter for basket fragment that want to put selected item in. Adapter I want to take data from: this is adapter for basket fragment that I want to put the data in Now, what I can use to pass data bet…
Create structured archive with files in java
I want to implement GET api that returns ZIP file. I defined api using openapi As far as I understand my api should return byte[], so my controller looks like below Is it ok to return byte[] or it should be some stream, end user will get the zip? Implementation. I have map of objects that I am parsing using
Java Specific webclient connect timeout per request
I have to call different urls with different connection timeout with webclient. But i found that we can set connect timeout globally only and not per resquest .. what to do please to set this timeout on a request without creating a new weblient each time. Answer You need to instantiate one webclient per url. …
Trying to change custom dialog Background color
Ok so I am trying change my background of my dialog box from white to a dark blue. However when I long press on one of the grid elements the dialog box looks like this: I am trying to make it look something like this (this is a photoshop): Here is snipet of my XML code for the edit dialog
How to make Views iterating on data objects (without ListView / RecyclerView)?
I am trying to spawn some XML view for each instance of POJO data objects in a list, similar to how a ListView would do it, but it’s not a ListView actually, but an empty LinearLayout instead, which is inside a ScrollView below other Fragment’s content. This is the item.xml file I want to inflate …
Spring retry exception handling execution behavior
I am trying to get to the best way to wrap spring-retry @Retryable annotation around external service call. Here is my code: I have a few questions on what happens when a RestClientException occurs : Is the catch block executed before retry kicks in or does the retry kicks in before the catch block execution?…