Posts by Murillo Goulart • 3,391 points
135 posts
-
-2
votes1
answer127
viewsA: Using Middleware in System Integration
Using a message-oriented middleware is a great alternative, as it ensures greater decoupling and scalability due to its asynchronous nature.
-
1
votes5
answers14274
viewsA: psql command at prompt. (postgresql database)
Add -w as follows: psql -d mydb -U myuser -W
-
2
votes5
answers1923
viewsA: Is it possible to update the first 100 lines in sql(server)?
Use the reserved word top, as follows: UPDATE top (100) tbl_venda SET produto=1 WHERE produto=3
-
1
votes2
answers81
viewsA: How to print Ipv6 Global using grep and awk?
If you are on the second or last line, just make a Tail, as follows: ifconfig | grep 'inet6' | tail -n1 | awk {'print $2'}
-
2
votes2
answers1769
viewsA: Execute SQL command in the terminal
Use the tool psql, present in the Postgresql installation. To log in, type: psql -U usuarioDoBanco nomeDeUmBanco Then you can execute commands such as: select datname, oid from pg_database; Command…
-
1
votes1
answer1358
viewsA: Change regional to "en" datepicker with Angularjs
Add the respective locale file to the page header, as an example: <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.6.2/angular.js"></script> <script…
angularjsanswered Murillo Goulart 3,391 -
0
votes1
answer116
viewsA: Alternativa Cron Job
Simply remove the redirect, so: wget --spider -O - http://dominio.com/cron
-
0
votes1
answer59
viewsA: Order by timestamp dataTables Angular js
An alternative is to change the date mask to: 'yyyy-MM-dd HH:mm:ss'
-
5
votes2
answers606
viewsA: What is a tail recursion?
Tail recursion is a recursion technique that uses less memory during the stacking process, which makes it faster than common recursion. In a common recursion, every recursive call made, it is…
-
5
votes3
answers302
viewsA: What is the cost of calling many functions?
I suggest doing looping tests measuring the total time of at least 1 million iterations. Even in high-level languages, as mentioned, such as Java, in which I have reasonable experience, the total…
-
0
votes2
answers634
viewsA: Error with @Autowired annotation
Try declaring the interface: @Controller public class UserController { @Autowired private UserDAO userDAO; @RequestMapping("user/userRegistered") public String userRegistered(User user) {…
-
2
votes2
answers2781
viewsA: How to limit the size(kb) of a photo with JS?
View this format with Jquery: $('#inputFile').bind('change', function(e) { var data = e.originalEvent.target.files[0]; // Exibe o tamanho no console console.log(data.size + "is my file's size"); //…
-
1
votes1
answer56
viewsA: Windows Scheduling System ,SQL
You can use a scheduling feature that runs within Postgresql, allowing you to run updates in the database, as in this example: -- Delete old data on Saturday at 3:30am (GMT) SELECT cron.schedule('30…
-
1
votes1
answer876
viewsA: How to make an INSERT in postgresql with conditional default value?
The default value of the field must be informed at the time of table creation, as follows: CREATE TABLE products ( product_no integer DEFAULT nextval('products_product_no_seq'), price numeric…
-
2
votes3
answers404
viewsA: Java JSON, Socket, or RMI integration
For data integrations between front of box and server, where the front of box should work even when it totally loses access with the server, I have seen successful application of the following…
-
1
votes3
answers388
viewsA: View images side by side using Javascript/Bootstrap
Below is an example with Bootstrap. <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> <script…
-
2
votes1
answer161
viewsA: 2 FK to 1 PK
Try changing the name of the Constraint as follows: ALTER TABLE prestadora.cartao_credito ADD CONSTRAINT FK_Pagamento FOREIGN KEY(PagamentoID_Pagamento) REFERENCES prestadora.pagamento…
mysqlanswered Murillo Goulart 3,391 -
0
votes1
answer74
viewsA: How to group and aggregate child items in Mongodb?
After much research and testing, I arrived at the result as follows: @Repository public class GoleadorRepository { private final MongoTemplate mongoTemplate; @Autowired public…
-
1
votes1
answer74
viewsQ: How to group and aggregate child items in Mongodb?
I am developing a Web Services REST application with Spring Boot and need to group the goals by players in order to show the scorers from the following records: [ { "id": 1, "adversario": "Dois…
-
-1
votes2
answers256
viewsA: Data field update in string format
Makes the adjustment fixed, IE: 3/3/1980 If the second character is "/", add 0 at the first position; 03/3/1980 If the third character is "/" adds 0 in the third position; 03/03/1980…
-
3
votes1
answer1069
viewsA: How to implement a video player with quality options for online playback?
There is the Video js., an open-source library with good popularity on Github, used on more than 400,000 websites, according to the page itself. There is also the JW Player, the most popular…
-
2
votes2
answers632
viewsA: Assign directory of a searched file to a CMD variable
I suggest creating a batch mydir.bat: @echo off set MASK=*.java for /F %%i in ('dir %MASK% /S /B' ) do ( rem nome de arquivo e extensão (arquivo.txt) set FON=%%~nxi rem extensão (.txt) set EXT=%%~xi…
-
2
votes2
answers4724
viewsA: search text in all files of a library
On Notepad++ activate CTRL + SHIFT + F.…
-
1
votes2
answers302
viewsA: Questions about the Spring XML file?
Utilize Spring Boot and escape unnecessary Xmls by performing all convention settings and application claspath tracking.…
-
0
votes2
answers4588
viewsA: define environment variable in application.properties
Use the following syntax: spring.datasource.username = ${MYSQL_DB_USERNAME} spring.datasource.password = ${MYSQL_DB_PORT}
-
0
votes2
answers146
viewsA: Use spring-boot and @Component with @scheduled and it hangs every 12 hours
Is there an Exception? Or simply Scheduler does not start new threads? I suggest connecting the Jvisualvm the moment the application is locked to inspect the threads on the fly. I suggest this…
-
7
votes3
answers614
viewsA: What happens to three-digit hexadecimal colors?
The 3-digit hexadecimal colors are expanded by folding each character (see W3 spec). Thus the code #F3A is transformed to #FF33AA. Translated from https://stackoverflow.com/a/10230746/5230740.…
-
13
votes3
answers3408
viewsA: How to find out if a hexadecimal color is dark or light?
The library Tinycolor provides various functions to inspect and manipulate colors, including: isLight Returns a Boolean indicating if the perceived brightness for the color is clear.…
-
0
votes1
answer96
viewsA: Move Text+location to google maps app
If you have the address, you can get the longitude and latitude coordinates by Geocoding, according to the documentation of API of Geocoding. This example demonstrates the use of the JSON API:…
-
3
votes1
answer324
viewsA: How to integrate spring batch+spring boot+Quartz
Use the annotation @Scheduled spring. Create class to run scheduled task: @Service public class AgendadorService { @Scheduled(fixedRate = 5000) public void executaBatch() { //Implementar chamada…
-
2
votes1
answer1746
viewsA: Send a list of objects to Spring using Thymeleaf
Value must be the id attribute, as follows:: th:value="${turma.id}"
-
1
votes1
answer1055
viewsA: How to configure Lo4j in a Spring Boot project
You need to add the following configuration to application.properties: spring.jpa.properties.hibernate.show_sql=true
-
0
votes4
answers2773
viewsA: How to mount buttons with Angular?
If you are using Angular with Bootstrap, a very popular CSS HTML framework, focused on responsiveness, can assemble using the following code: <!-- Latest compiled and minified CSS --> <link…
-
0
votes1
answer119
viewsQ: What is the most appropriate format for the Localdate field in JSON?
I have seen date fields returned in the following ways: "2012-04-23" //Padrão ISO 8601 "23/04/2012" //Pronto para renderização no front-end Considering the use and flexibility in the front-end, how…
-
1
votes3
answers2409
viewsA: What is the best way to send my Spring Boot project to the server?
Running the application with java -jar project.jar is really a very simple option. This error is occurring because you did not generate the jar in the correct way. For this it is necessary to create…