Posts by cpll • 438 points
25 posts
-
-1
votes0
answers11
viewsQ: How would be a good practice to create a new standard record for entities?
How good would be a practice to create a new default record of the entities below? I need this because front-end requirements require at least one record for an editable table to be shown. I thought…
-
1
votes2
answers61
viewsQ: What is the static method of that returns an object instance in Java
I believe this method serves to "circumvent" the nay possibility of a method builder static. But what is the function of this? public static MinhaClasse of(OutraClasse outraClasse, Departamento…
-
0
votes2
answers387
viewsA: How to do concurrency control in Hibernate for INSERT in the database
As Dherik commented. Having the possibility to create a Constraint I think is the best option. something like that: ALTER TABLE pacienteInternado ADD CONSTRAINT CPFUNICO UNIQUE (cpf); The error that…
-
3
votes2
answers41
viewsA: Error in java code
your code has some problems, I will explain about the error and the other problems I see. in the main method you are trying to instantiate a Player, this class does not exist, the one you wrote is…
-
0
votes1
answer12
viewsA: aquivo . conf do Swagger error:Ismatched Ccharacter expecting Eclipse
As suggested in the comments, the problem is Eclipse configuration. Changing the file associations the error warnings disappear. That way Windows -> Preferences -> General -> Editor ->…
-
0
votes1
answer12
viewsQ: aquivo . conf do Swagger error:Ismatched Ccharacter expecting Eclipse
My Eclipse shows me that the Cors.conf and Nginx.conf files are in error. When analyzing it points out the following problems. In Cors.conf: add_header 'Access-Control-Allow-Origin' '*' always;…
-
0
votes2
answers736
viewsA: Error: non-static variable this cannot be referenced from a Static context
Understand the modifier static. A definition would be that when we declare a variable as Static, it becomes an attribute of the class and not of the instance. We can also think of this variable as a…
-
0
votes0
answers358
viewsQ: eclipse does not recognize jdk 9, 11 or 14 (Target is not a JDK root. System library was not found.) windows 10
I’m trying to test JDK9 with Eclipse (version 2020-09 M3 (4.17.0 M3) and also tested with Oxygen Release (4.7.0)) on Windows 10. I installed jdk with the installer for windows…
-
1
votes2
answers84
viewsA: How do I create a time interval in the execution of a for?
To "delay" the execution of something, just involve what you want to delay with setTimeout and determine the time in milliseconds. As in the example: setTimeout(function Linha1() { for (var i1 = 0;…
-
0
votes1
answer50
viewsQ: How do I add the "same" object to a list and change a property?
I have to send a list of entitys to a method that will make the Insert of these entitys in the bank. This entity represents an inscription of a patient who will enter some waiting queues of…
-
2
votes2
answers203
viewsQ: date.getHours with 0 more elegant
I need to assemble a JSON with a property in hours and minutes. I use a Timepicker on the front and it returns a date: Fri Feb 15 2019 05:52:09 GMT-0200 (Horário de Verão de Brasília) To build JSON…
-
0
votes1
answer55
viewsQ: manipulating JSON JS
I want to know why it works to change but not to create var obj = {}; obj.teste = {id:1}; //esse funciona para criar obj.teste.id = 2; //e assim eu altero console.log(JSON.stringify(obj)); var obj2…
-
2
votes0
answers84
viewsQ: System search using Angularjs and java
I have a Java back-end: JPA, Hibernate. Entities working correctly, I even have a class Searchresource @Path("/search") @ApiDefinitionBase @Produces(MediaType.APPLICATION_JSON)…
-
3
votes1
answer155
viewsQ: Use multi-tenancy model or other types?
I am working on several systems for a single company. In some cases, the systems must integrate and in others not. For example, user access control must communicate with all other systems, since…
-
1
votes1
answer380
viewsA: Services of Windows 10
Remove the windows service. To do so, open a prompt as administrator and run the command: sc delete 'service_name' replacing 'service_name' by the exact name of the service you want to remove, in…
-
0
votes1
answer74
viewsQ: Refusing to install Gulp as a dependency of itself
When I run: npm install --save-dev Gulp The mistake happens: npm ERR! Windows_NT 10.0.15063 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program…
-
4
votes1
answer74
viewsA: Refusing to install Gulp as a dependency of itself
I found that I can’t call my project in the package.json from Gulp, so I switched to gulpProject { "name": "gulpProject", "version": "1.0.0", "description": "", "main": "index.js", "scripts": {…
-
0
votes3
answers720
viewsA: Separating text with Javascript
If the string always follow this pattern, you can try something like this: var endereco = 'Rua tal Muniz, 124 - ramones, Sapucaia - SP'; var separado = endereco.split(','); var rua =…
javascriptanswered cpll 438 -
0
votes1
answer29
viewsQ: code Smell - select max(numeroProntuario)+1, but how to fix it?
I have a table Paciente mysql, in it I have the column id, nome, numeroProntuario etc. This column numeroProntuario is defined by the increment of +1 resulting from select max(numeroProntuario)…
-
1
votes1
answer541
viewsA: How to generate random numbers starting from 00000 to 99999 without repetition using Mysql only
Good morning Bruno. I think you can use this here: select FLOOR(RAND() * 99999) Or rather: BEGIN DECLARE valorRand bigint; set valorRand = select FLOOR(RAND() * 99999); if exists (select * from…
-
2
votes1
answer1245
viewsQ: How to handle Null records? In the database or app? (java & Mysql)
I am integrating a legacy database (Mysql) with a new module (Java - this problem object is a bean) that I am developing. I have a method that makes a select and returns some results that eventually…
-
0
votes0
answers23
viewsQ: PHP application windows server migration
Good afternoon guys. I am with an application on a server with encoding in ISO-8859-1 and I am migrating to another server with window. The application is working, except for errors with the special…
-
1
votes0
answers554
views -
0
votes1
answer295
viewsQ: Enum returns null from the database
Hello, I’m implementing a DAO and doing some tests, I’m having some problems in enums. When running the test class the Enum Size returns null, but in the database I have records filled correctly.…
-
4
votes0
answers73
viewsQ: Error opening git hub
Hello, when starting github, it shows me a screen with this error: error: inflate: data stream error (Unknown Compression method) error: Unable to unpack 54012a5c5cbe332cb2e1f18539085b14bc0d8542…