Posts by Augusto Neto • 116 points
9 posts
-
1
votes3
answers1269
viewsA: Get file folder with Nodejs
Use path dirname. // filePath deve ser C:\node\pasta\onde\esta\o var filePath = require('path').dirname('C:\node\pasta\onde\esta\o\arquivo.js'); var currentDirectory =…
-
0
votes4
answers52
viewsA: Is my char checking logic wrong?
This logic solves, so the String Instruction will not have blank space and the equality symbol. for (int i = 0; i < line.length(); i++){ if (line.charAt(i) == ' ' || line.charAt(i) == '='){…
javaanswered Augusto Neto 116 -
1
votes1
answer1332
viewsA: How to create War to deploy on Tomcat with Spring-Boot?
Are you running the command to generate the build? To do this if you are using spring tools or eclipse you must right-click the project choose "Run as" -> "Maven build." and put in "Goals": clean…
-
1
votes1
answer29
viewsA: Problem when receiving value in a select with richfaces
The best way for you to do this is by using ajax, for JSF there is a component for you to work with ajax using richfaces is a4j. In their showcase you can see this example. Remembering that the…
-
2
votes2
answers31
viewsA: Select as a result of one day of the week
You must truncate the date using the mysql DATE function and use the GROUP BY clause: SELECT DATE(data), SUM(valor) FROM pedidos WHERE YEARWEEK(data) = YEARWEEK(NOW()) GROUP BY DATE(data) ORDER BY…
mysqlanswered Augusto Neto 116 -
1
votes2
answers567
viewsA: Is it possible to use the external terminal when running a Java program through Netbeans?
Assuming your class is an executable class, has a main method, navigate the terminal to the directory your class is in, then type: // command to compile javac Suaclasse.java // Command to execute…
-
0
votes1
answer25
viewsA: Jtable - Nullpointerexception when I addRow() in jTable from another class
You missed instantiating the Statistic object, using the reserved word "new": public class II { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code…
-
1
votes4
answers460
viewsA: How do you separate word into letters in php?
You can use the function str_split to convert a string into an array. Code Example: <?php $string = 123; $split_length = 1; $result = str_split ($string, $split_length); ?> Upshot: <?php…
-
0
votes1
answer73
viewsA: Select from today until a week ago
You can do so using DATE_ADD() or DATE_SUB(): SELECT * FROM tabela WHERE coluna_date_time >= DATE_ADD(CURDATE(),INTERVAL -7 DAY); or SELECT * FROM tabela WHERE coluna_date_time >=…