Category "java"

How to set Chrome Options when using WebDriverManager?

I'm using Web driver manager to setup chrome driver. When setting up the driver I want to add some chrome options? How can I do it when using web driver manager

YUV buffer size not matching image size

I am currently using Android Camera2 API and decoding the frames through an ImageReader in a YUV_420_888 format. I managed to get everything working, all looks

Adding Material effects to java swing

I am trying to make a Java Swing application using NetBeans 8, and I was wondering if there is any possible way I could apply materialize effects to my Java Swi

Trying to connect to Firebase but crashes when adding button

I'm trying to set an app to just enter something on the textEdit and change it in real time in the Firebase database. The app works just fine if I just do myRef

Maven: How to fix foreign imports? (in Azure Function)

when I try to start my Azure function locally in Visual Studio Code I get a Maven error as following: [ERROR] Failed to execute goal com.microsoft.azure:azure-f

Get Linux file descriptor of FileChannel

Is there a way to get the Linux file descriptor for an opened FileChannel? I need it to call mount.fuse -o fd=... (for implementing FUSE). As a hacky workaround

Mockito argument matcher and hibernate lazyinitialization

I've created the following captor: public class CompanyOwnerMatcher extends ArgumentMatcher<CompanyOwner> { private String uuid; CompanyOwnerMa

Selenium handling html elements inside object tag

I'm struggling with validating html elements inside html object tag. Following is my test html (test1.html). <html> <body> <h1>this is t

No implementation was created for Mapper due to having a problem in the erroneous element

I'm trying to use Mapstruct to map my classes in a spring boot project. My dependencies : <?xml version="1.0" encoding="UTF-8"?> <project xmlns="ht

How to use lombok with Kapt3

When I try to run Java/Kotlin android application with Lombok while using Kapt3: apply plugin: 'kotlin-kapt' javac compilation fails with numerous error: ca

How can we programmatically get call hierarchy for methods in IntelliJ

Getting call hierarchy is easy in IntelliJ. Simply use the built in tool. But is there a way to do it using code? Eclipse internal JDT has two classes called Ca

I have migrated code from struts-2.1 to struts-2.5,its working fine for all locales. Except for en_UK locale

I have migrated code from struts-2.1 to struts-2.5,its working fine for all locales. Except for en_UK locale where in WW_TRANS_I18N_LOCALE value fetched is en

How to remove text between <script></script> tags

I want to remove the content between <script></script>tags. I'm manually checking for the pattern and iterating using while loop. But, I'm getting S

Sometime video buffering very slowly in exoplayer?

I don't know why, but sometimes Exoplayer buffers my video very slowly. My server is responding properly and the internet is also fast but sometimes Exoplayer b

Files.exists(path) is false but file.exists() is true

Why does this code return false? Path path = Paths.get("C:\\aaa\\bbb\\ccc"); Files.exists(path); // false!? Even when I convert to it from a File (which exis

RestTemplate get body with ResourceAccessException

I'm sending API and receiving status code 400 with body I need to parse When working with RestTemplate I failed to parse response: try { ResponseEntity<

Java Mongodb regex query

I have to run this query in Java db.Users.find({"name": /^ind/i}) My Java code is Document findQuery = new Document(); findQuery.append("name", Pattern.co

Cannot resolve symbol Theme.MaterialComponents.Light.NoActionBar (Android Studio)

I've got an error for 'Theme.MaterialComponents.Light.NoActionBar' in styles.xml (the 'Theme.MaterialComponents.Light.NoActionBar' is colored red because of err

Java Swing - Maskformatter digits from Right to Left

I would like to enter in a JFormattedTextfield with a Maskformatter digits for inserting time units (min:sec with mask ##:##) from Right to the Left. I used Set

Java: Telling whether a byte array is a zip file

I have a server written in Java, that in a single request, gets a whole file from the client. The file is passed to the server as a list of bytes, and is finall