Posts by Giuliana Bezerra • 3,707 points
133 posts
-
3
votes3
answers16842
viewsA: What is Batch and Online Processing?
Batch systems or batch processing systems are a type of application that processes a large amount of data (batch data) during its execution. They differ from traditional online systems (web) mainly…
batchanswered Giuliana Bezerra 3,707 -
1
votes1
answer547
viewsA: Run a Spring Batch job several times
To invoke the incrementer, it is only necessary to call the getNextJobParameters. For this, it is also necessary to inject the jobExplorer. Would look like this: @RestController public class…
-
3
votes1
answer547
viewsQ: Run a Spring Batch job several times
By default, Spring Batch does not allow you to execute a job that already has a complete execution with the same parameters. If you try to run, get the message: "A job instance already exists and is…
-
3
votes2
answers62
viewsA: Why do we use the word 'value' in the function?
The valor is the name of a variable that is a parameter of a Arrow Function. Note that the subscribe receives a callback function as a parameter, which traditionally would be written as: function…
-
1
votes1
answer421
viewsA: Promise return
To return the value of the file you need to make your operation synchronous, so that the log waits for the file to be resolved and then prints the returned value. This can be done using the await…
-
1
votes1
answer905
viewsA: How to configure Bootstrap 4 with Angular 8.3.6 using angular.json
In fact adding to the angular.json file the bootstrap does not load the styles. To solve the problem, it is necessary: Add the bootstrap scripts to your index.html after the app-root, inside the…
-
0
votes1
answer452
viewsQ: Use proxy in nodejs to access external files
I have a service on Nodejs that does a fetch to access an external api: const express = require('express'); const middlewares = require('./middlewares/middlewares'); const routes =…
-
1
votes1
answer828
viewsQ: How to Save and Recover Images in Base64 using Mongoose in a Nodejs Service?
I need to save and recover an image in Base64 through a REST service developed with Nodejs. For this, I have created the following schema on Mongo: const userSettingsSchema = new Schema( { 'avatar':…
-
3
votes2
answers89
viewsA: Calculate number of sales of a seller
To help you create an entity model, think like this: What is quantity? Does it contain attributes, data that describe it? Or is it a property of something else that contains it? In your case, note…
-
0
votes0
answers40
viewsQ: Redux with multiple application instances
If Redux maintains a single component state and I have multiple instances of the application being used by multiple users, this means that users will view the same state in components? How to solve…
-
0
votes2
answers177
viewsA: Replace string with items from an object
You can do this natively using strings template Javascript. For this, you will change the ' of the string by ` and will directly access the properties of your object within the string template: let…
javascriptanswered Giuliana Bezerra 3,707 -
2
votes1
answer36
viewsA: Is it too expensive to search directly for the key?
The optimal approach depends on your knowledge of the javascript object properties. If you know the name of the property, the best approach is to access it with the .. Thus, no query needs to be…
javascriptanswered Giuliana Bezerra 3,707 -
2
votes3
answers352
viewsA: HTML5 validation before preventing form submission
The problem is that you are treating the event click, which occurs before actual submission, and before validation: $("#troca-senha").on("click", function (event) { event.preventDefault();…
-
3
votes1
answer22
viewsA: How to include unit test artifacts in a simple Java application?
You need to add the tag dependencies in your pom, after or before the tag build: [...] </build> <name>GamerGourmet</name> <dependencies> <dependency>…
-
4
votes2
answers160
viewsA: Insert Javascript line
The problem is the bond you make: $(".idemp").each(function(index, value) { This loop is used to verify that the company has already been added by traversing all items in the table. The problem is…
javascriptanswered Giuliana Bezerra 3,707 -
1
votes1
answer170
viewsA: POST disabled in JBOSS EAP 7
The problem occurred because the person responsible for exposing these endpoints in Jboss, which is the Application, had to be created: package br.gov.dataprev.servicorestfuljavaee; import…
-
1
votes1
answer170
viewsQ: POST disabled in JBOSS EAP 7
I implemented a service with JAX-RS that features GET and POST operations: @Path("/funcionario") @Singleton public class FuncionarioService { private List<Funcionario> funcionarios = new…
-
0
votes1
answer230
viewsA: Curl: (92) HTTP/2 stream 1 was not closed cleanly: REFUSED_STREAM (err 7)
The problem is that the Gitlab API was set to disable the use of the verb POST. That’s why the get calls worked but this particular call wasn’t working. I found the problem as follows: curl -i -X…
-
3
votes1
answer983
viewsA: Docker Compose does not work using proxy
I was able to solve by configuring the Docker client [1]: { "proxies": { "default": { "httpProxy": "http://10.100.5.107:3128", "noProxy": "*.test.example.com,.example2.com" } } } Follow here, for…
-
2
votes2
answers60
viewsA: Problems displaying an array of functionalities in a Main class
See the error message: Error: The method println(Boolean) in the type Printstream is not applicable for the Arguments (void). This means that in the line you are printing, a method is being called…
javaanswered Giuliana Bezerra 3,707 -
2
votes1
answer983
viewsQ: Docker Compose does not work using proxy
I’m creating a file docker-compose to upload a system with multiple nodes. To start testing, I created only one service in that file docker-compose.yml: version: '3' networks: production-network:…
-
1
votes1
answer3765
viewsA: Error while running default springboot project
You need to add access settings to your bank to let Spring know how to make the connection. This can be done programmatically: @Bean public DataSource dataSource() { DriverManagerDataSource…
-
0
votes1
answer79
viewsA: Return from database values
You have recovered data from an object that has not received the result of your query to the database: Produto bean = new Produto(); [...] if (dao.CHECKPRODUTO(prod)) { id = bean.getId(); prod =…
-
1
votes1
answer230
viewsQ: Curl: (92) HTTP/2 stream 1 was not closed cleanly: REFUSED_STREAM (err 7)
I am trying to register a Gitlab Runner, but when I run the registry command specified in the API, error occurs. The command I try to run is like the one described in the API: curl --request POST…
-
0
votes2
answers56
viewsA: Linux using on Travis
It is possible to do this through an outline solution: Place a virtualizator within virtualization. If you add a Docker container to Travis it will be possible to run your build within any OS. The…
travis-cianswered Giuliana Bezerra 3,707 -
-1
votes1
answer2560
viewsQ: What API to use for Java Desktop applications
I am looking to develop a Java Desktop project and would like to analyze what would be the best API for it. I’m in need of something like the state of the art of desktop Apis for Java. I did a…
-
5
votes1
answer396
viewsQ: How to expose a bean method to use spring dependency injection
I need to expose a method like a bean on ApplicationContext of Spring to use it in the injection of an attribute, which has more than one implementation. What I did was the following: I added the…
-
2
votes2
answers870
viewsA: How to use a file . JSP
You cannot open a JSP file directly in the browser as it is an "above" HTML language. This means that you need a web container to identify the JSP components of the file and allow it to be viewed as…
-
1
votes1
answer2921
viewsA: Percentage Postgresql
First, you need a query that returns the sum of all values in the column valor_convenio. The query would then be simple: select sum (valor_convenio) as total from paraiba.vigente WHERE convenente…
-
4
votes2
answers82
viewsA: Working with vectors / matrices
What you want to do is actually a Matrix data structure. What you need to understand better is that the access to the matrix should be done not through the name of the vector of that position, but…
-
2
votes2
answers374
viewsA: git hub ! [Rejected] - I can’t find the files for github
The git is already showing you the problem and the solution: Updates were rejected because the tip of your current branch is behind That is, you have the outdated branch because someone has already…
-
1
votes1
answer783
viewsA: How to sync my project with Github
GIT is a version control system that works with 4 workspaces, 3 of which are local: Working, Staging, and Local. When you create the project it is initially in the area Working. When you modify data…
-
4
votes2
answers636
viewsA: I calculate Java water consumption using Eclipse IDE
You are not printing the tax and consumption values. What you do is print only the text: System.out.println("O imposto é "); ... System.out.println("O Valor é de: R$ "); See that in your Visualg…
javaanswered Giuliana Bezerra 3,707 -
2
votes2
answers73
viewsA: problems with consultation in hql
Your mistake is very clear on this line: Exception Description: Conflicting Annotations with the same name [SEQ_STORE] Were found. the first one…
javaanswered Giuliana Bezerra 3,707 -
2
votes1
answer34
viewsA: Select number of returned lines
Yes, it is possible through the function Count. The syntax is as follows: select count(*) from tabela where condição; The Count can also be used in conjunction with other functions to perform a more…
postgresqlanswered Giuliana Bezerra 3,707 -
2
votes1
answer628
viewsA: How do I work with git release?
The release feature is platform-level, something higher, but conceptually it applies to Git through tag creation, which are stable versions made available for users to use. Thus, what github calls a…
-
2
votes3
answers8105
viewsA: LIKE and IN command in the same SQL command
You need to separate in 3 conditions: numeroserieequal to 'SCAB171293E29' or 'SCAB171293E4E', or numeroserie similar to 'SCAB171293E29%', or serial number similar to 'SCAB171293E4E%'. The result…
-
1
votes1
answer342
viewsA: Circular Foreign Key
Is there any documentation that defines this modeling as right or wrong? What exists is not right or wrong, but the ideal model for each application. In some cases, the use of standardisation is…
-
0
votes2
answers612
viewsA: How to make unique record query
The problem is the scope of the bean you are using, which when undeclared is Singleton. This scope loses the information saved at each request. If you change the scope for Session, for example, the…
-
1
votes1
answer66
viewsA: JSF REQUESTS
You can update the bean through the Ajax. Using Primefaces you can use a component that performs paging, such as Datatable and so this control would be done by the framework in the view. Already in…
-
2
votes2
answers1665
viewsA: Limit Inner Join Result
To filter repeated results on a Join you can use a group by. For example, let’s assume that the table that has duplicated records for the same property is the imagem_imovel: In this case, there is…
-
2
votes2
answers405
viewsA: Oracle order by
The order by is used next to the column name used for sorting. Translating, it would be something like "sort by column". Just put the column name after the command order by that the consultation…
oracleanswered Giuliana Bezerra 3,707 -
5
votes1
answer88
viewsA: Why are you not entering the if?
Your code is comparing character 2 with the full string typed by the user, so it will never work: if(caractere.substring(1,2).toUpperCase().equals(caractere)){ What you need to do is just check if…
-
2
votes1
answer50
viewsA: References lost at persistence time
The problem is that you did not associate the order reference in the event listing. One way to do this is to add a foreach to load the object into each item in the event list: public void salvar()…
-
1
votes1
answer365
viewsA: What is Optimistic JPA Locking Field
The purpose of Lock is to prevent inconsistencies arising due to concurrent access to a resource. There are basically two lock strategies: The optimist and the pessimist. The pessimist simply blocks…
-
0
votes1
answer3136
viewsA: An error occurred while performing resource injection on the managed bean paisControler
The log is already pointing out the error: java.lang.NullPointerException at br.com.netsoft.desif.controler.endereco.PaisControler.init(PaisControler.java:39) This NPE occurs in the following code…
-
1
votes2
answers413
viewsA: Display 5 latest postgresql results
To solve your problem you can use the clause IN. It allows you to be informed a set of values for a test. In this case, your query would be: SELECT id, project_id, name, subject FROM "issues" where…
postgresqlanswered Giuliana Bezerra 3,707 -
6
votes4
answers6919
viewsA: SELECT of month/year in DATES
You can use the function EXTRACT to test pieces of a date. Your query would look like this: SELECT * FROM FRCAST WHERE extract(month from DATA_ID) = 7 and extract (year from DATA_ID) = 2010;…
-
2
votes1
answer58
viewsA: Remove n lines from a string
You can use the substring method as follows: texto.substring(texto.indexOf("<objeto>"), texto.indexOf("</objeto>") + 10) The text variable would contain the text read from the XML file.…
javaanswered Giuliana Bezerra 3,707 -
2
votes2
answers123
viewsA: Date to String to Pyhton conversion
The function date_format allows formatting the date returned in the Mysql database query: select date_format(MAX(PAYMENT_DATE), '%Y-%m-%d') from fact_cashflow WHERE DOCUMENT_ID = 'SALDO FINAL' and…