Skip to content

Tag: java

Search in a circularly-sorted array Java

i really got stuck on this and i’d love your help. I’m trying to write a method with the signature: The method gets as parameters two-dimensional array that is circularly-sorted, and a value to search for num. If the value num is in the mat array, the method returns true. If the num value is not i…

Developing job for Flink

I am building a simple data pipeline for learning purposes. I have real time data coming from Kafka, I would like to do some transformations using Flink. Unfortunately, I’m not sure if I understand correctly deployment options. In the the Flink docs I have found section about Docker Compose and applicat…

Processing a string formatted as a JSONArray

We have some code where we read a JSON file into a string and then use Json-lib to process it as follows: We now have a situation where the file is actually a JSONArray (i.e. starts with [ and ends with ]). The file passes all JSON validation tests but our code raises the following exception: We are able to

Endpoint overloading in Rest controller

I have a REST Controller in my Spring Boot application as follows: Upon trying to start the application, I get the following error: Upon changing the endpoints(in the getmapping part), this works perfectly. I fail to understand that since it does not recognise one with query param and one without as 2 separat…

Assign random class object (image) to ImageView

I’m developing a card game, based on higher wins. From my first question here assign int value to image for compare I’ve rewritten my code but now I’m stuck on randomization of cards and assignment to ImageView. I have a class card. In MainActivity: I have array of this cards: Now I need to …