I am trying to convert strings like 1h 30m 5s or 5m or 38s or 1h 3s into an integer value representing total time in seconds. So for example, 1m 20s would result in an integer value of 80 for 80 seconds. I am using Joda Time: Throws an IllegalArgumentException with practically every string i pass in, saying &…
Tag: java
Moving character efficiently on a row
Given input (items = 6, position = 3) creates a row of 6 items and a character positioned on item 3 {0,1,2,[3],4,5} A call to left() moves the character two positions to the left and the item at position 3 is removed {0,[1],2,4,5} The next call to right() moves the character two positions to the right and the…
How to receive additional information by using firebase in android
When the user signs up the first time, I use sendEmailVerification by the following code: and here is useAccount.java Firebase information after signing up and as you can see All the information was received accurately. But I want to receive additional information when user first use the app. SO i tried to re…
Tranforming a Map containing Sets into a Map of Set-Sizes [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed last month. Improve this question This i…
JVMTI Invoke toString(); on an Java object from C++ code
So, I was trying to invoke the toString(); method on an object (in this case an enum). This immediately crashed my application. I am assuming that, since the toString(); method isn’t declared directly in the enum but inherited from the Object class (Enum in this case) it is not able to find the method a…
What is the meaning of breaking code while implementing new features?
I was reading a text about SOLID principles and Open/Close principle and it said that : “The main idea of this principle is to keep existing code from breaking when you implement new features” what it means by breaking code? Answer You “break” existing code when you modify it in a way …
relations between log levels and stdErr/stdOut
i read many informations on the net but i’d like to summarize, and still no understand how it works. I’d like to know the relation betwenn log levels and stdOut vs stdErr in java ? what about these kinds of logs ? what do these logs go ? i absolutly don’t see relation between java logs and s…
Is webcam detection still supported vlcj-4.7.3
Is webcam detection still supported? The MediaDiscovererTest.java file does not seem to detect any capture devices. (win/mac) It seems to me that the device detection was working with earlier versions of vlcj on MAC webcam-capture driver for vlcj VLC is able to detect the capture devices. Thanks in advance fo…
SpringBoot. Thymeleaf. How to make table’s column clickable to send request to Controller?
I’ve created table with 8 columns: In fact each column (tag “td”) should serve as a button and after clicking send me to controller (@PostMapping or @GetMapping), where I will try to read th:value. How to make it? Instead of th:attr=”action=@{/}” I’ve tried to use th:href=&…
using the Hazelcast distributed locks with Coroutines in Kotlin and Spring webflux
My question is as the documentation says, fencedlocks are reentrant locks for “THREADS” and I am using spring boot with Kotlin and webflux so in my application I am using Coroutines for concurrency and as you probably know spring webflux provides an event-loop with a limited number of threads to fulfilling th…