Telegram, I need to get channel’s data list. I use for this case TdApi. Documentation: https://javadoc.tlgrm.ru/org/drinkless/td/libcore/telegram/TdApi.html I do it based on this example: https://core.telegram.org/tdlib/tdlib.zip. I still got chat’s list by this example. Check here my way: I tried…
Calculate product in Java, term vs. a ‘for’ loop, different results
Consider: Why are the results different although the calculation is even? Is there an explanation? Answer 49*48*47*46*45*44 is a multiplication of int literals, and therefore performs int multiplications resulting in an int value. It overflows in this case (since the result is larger than Integer.MAX_VALUE) b…
Google Calendar API v3 always returns BadRequest when creating events
I created a shared calendar and want to add events to the calendar. I created a project and set up a Service Account xxx@xxx.iam.gserviceaccount.com. Then I shared the calendar to the Service Account as owner. Then I noticed Service Account must manually add shared calendar as described here https://stackover…
How is Kotlin able to call Java 11 code using JDK 1.8?
I was playing around with a Kotlin project which has some Java 11 calls and noticed that it seems to build and run fine using Java 8. The call in particular is to java.lang.String#isBlank(), which was introduced in Java 11. I’m using Gradle to build and run tests. Build JDK is set to JDK 1.8 and Kotlin …
Programmatically restart HikariPool in Spring Boot application?
I have a Spring Boot application which uses Hibernate, and HikariDataSource / HikariPool to talk to the database. A special feature in the app triggers database restart. Currently this breaks the connections in HikariPool: Old version of the app does call programmatically org.hibernate.SessionFactory.close();…
Downloaded file share to other app like Whasapp, Facebook from my app
THIS error show my code i try set share option in my app for downloaded video java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/VideoDownloadFAST/20200816190612.mp4 at androidx.core.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:744) …
Eclipse JDT core Java runtime error – java.lang.NoSuchMethodError
I could not find any helping document regarding this error hence I am posting this question. I am trying to use locally built Eclipse JDT core jar in my project. I followed the flowing steps. Created an eclipse workspace as described in Link Built eclipse.jdt.core using the mvn -P build-individual-bundles pac…
How to configure separately both consumer and producer spring boot app when using rabbitmq?
I watched a tutorial that explains how to integrate RabbitMQ into Spring Boot app. In the tutorial, the ReceiveMessageHandler.java (Consumer) and SendMessageController.java (Producer) classes were in the same project. I want to implement them in two different Spring Boot application. However I can’t spl…
Anylogic: Use individual RandomNumberGenerator for each ressource
We are working on a simulation of a production chain of six machines connected in a series. For all of them, we need failure times etc. which are distributed differently. I am looking for a way to implement an individual RNG for each of the resources used. We need six different RNGs. Unfortunately, we struggl…
Android Sensor return null?
The Android Java app that I am writing has a simple principle of operation: it reads data from sensors and displays it in a TextView. The first version of the application worked without any problems, but I wanted to improve it and work on the design. I decided to add a slideout side menu and that’s when…