Skip to content
Advertisement

Tag: kotlin

Get the max value using kotlin-exposed

I want to simulate this query using kotlin exposed framework: I tried the next one query: But this query just results in: and the max value is selected in the code. How to perform finding max value on the side of the database and map it to Int? Answer I tried similar query and I believe it fits your need.

Java.lang.UnsupportedOperationException Android Studio

My app keeps on crashing on launch because of several errors. java.lang.InvocationTargetException java.lang.UnsupportedOperationException Here is the logcat error for the second exception. From the last line it says my error is from my MAFTextViewBold.kt file } What could be causing the error? It was compiling before but after I did a factory reset on Android Studio I could not ran

Complex function to cut a different decimal places after comma

The input data for the program is JSON with BigDecimal value like this example: 345.0197 I have 2 problems: Some fields has to display different number of digits after comma: 3 digits after comma like: 345.019 2 digits, like: 345.01 1 digit, like: 345.0 The integer before comma must have bigger text size than decimals after comma. Like on this

I tried to set enum field by reflection

I have two enums with vararg property and @FieldEnrich annotation. Annotation looks like Annotation is processing by object The logic is as follows. We annotate an enum member with the annotation @FieldEnrich and pass the property we would like to read value from and the name of the field to which we set the value of the property. I was

How to split an array of objects in java or Kotlin?

I have already asked one question about this here but, that answers about only strings. I could not edit that as there a couple of answers there already. Now, I get it how to split it with a space as given in that post. But, how can I split it with objects of custom class like this: Now, I want

Can run in Intellij, but jar file fails

Instead of running Quarkus, I’m running OptaPlanner through a Main class entry point in Kotlin. This works great within Intellij where I have a simple Run Configuration set up for it. However, when I create an Intellij artifact for a jar and try to run it, I get this: In solverConfig.xml I’m using <domainAccessType>REFLECTION</domainAccessType> because I cannot get Gizmo to

Advertisement