Posts by Marcus Becker • 724 points
14 posts
-
0
votes1
answer5711
viewsA: Spring boot error called controller "This application has no Explicit Mapping for /error"
It is necessary to add the dependency: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId>…
-
2
votes2
answers490
viewsA: Why is it not recommended to use Defaulttablemodel?
This website (Matheus Piscioneri) summarized the reasons very well. It’s harder than writing your own Tablemodel (fact); It is slower (uses synchronized classes) (if you look at the code you will…
-
16
votes2
answers418
viewsQ: How does a Java Virtual Machine written in Java work?
Seeing the Jikes RVM I was curious to know how this works (in theory), but only found material in English. I am correct in assuming that the JVM today is done in C/C++, which in turn is done in…
-
2
votes1
answer405
viewsQ: Optimized word counter in C
I’m trying to understand an example of code in C to count words (from the book Programming Pearls). But I’m having doubts in some parts of the code (maybe I didn’t type correctly): nodeptr…
casked Marcus Becker 724 -
4
votes1
answer820
viewsQ: Is it possible to edit and re-compile by reverting the source code?
For example, assuming I take an Atari ROM, if I reverse engineer this ROM I would have to make edits (change a color or change a text) and generate a valid ROM only with the information contained in…
reverse-engineeringasked Marcus Becker 724 -
6
votes4
answers517
viewsQ: Why Artificial Intelligence and Machine Learning are different subjects?
When looking for specialized programming courses or with market demand, two of them stand out: IA - Artificial Intelligence (or AI - Artificial Intelligence) AM - Machine Learning (or ML - Machine…
-
6
votes1
answer67
viewsQ: How to apply Pathfinding in a structure of nodes?
I have a node structure that represents my pages and their links, for example, from page A I can go to page B or page C. In addition I can have page A pointing to page B pointing to C pointing again…
logicasked Marcus Becker 724 -
13
votes3
answers2628
viewsQ: How to optimize this function for Fibonacci sequence?
On the website codility there is an initial challenge for you to refactor this code: var yourself = { fibonacci : function(n) { if (n === 0) { return 0; } if (n === 1) { return 1; } else { return…
-
0
votes1
answer133
viewsA: How to close a Serversocketchannel?
I ran a test using the piece of code you posted and verified that the connection is closing correctly. When trying to listen to a door while your service is running, I get the following exception:…
-
0
votes2
answers1536
viewsA: Format Date Return with Date and Non-string Format
The way to display the date the way you want it is by using Simpledateformat (or another library or own code). Note that there is a difference between java.sql.Date (used to record dates in the…
-
2
votes1
answer350
viewsA: php browser information and operating system
According to this article, you just need to get the $_SERVER['HTTP_USER_AGENT'];. To display the browser name or operating system in a more readable way, it compares the received value with a proper…
-
1
votes2
answers731
viewsA: Priority in progress
Diego, I see some strange things in your code, for example, you’re calling the method AlertDialog alertDialog = new AlertDialog.Builder(context).create(); inside the loop (while). Second, you are…
-
1
votes1
answer836
viewsA: How to read a local json file using retrofit 2.0?
Okhttp which was optional in version 1.9 is now required and automatically integrated. This has brought several benefits to the library. In this version, to parse Json, you need to declare Gson…
-
1
votes1
answer740
viewsA: Sqlite and Mysql synchronization
You can create a scheduled task in the App to perform the query at the base and check if there are new users. There are two concepts here, one in which everyone consults the server to find out if…