Posts by Lucas Marinzeck • 318 points
19 posts
-
0
votes0
answers56
viewsQ: Reverse git checkout -f
By giving a git checkout -f in a modified file is it possible to recover the lost changes? Some way to reverse git checkout -f
gitasked Lucas Marinzeck 318 -
1
votes0
answers39
viewsQ: Is it necessary to use any CI tool to build and build Docker-Compose with Maven?
I am building a web application with Spring MVC and Postgres, my problem here is with using pom.xml to create a Docker-Compose file to deploy in containers. Is it possible to add commands to pom.xml…
-
0
votes1
answer60
viewsA: How could I replace a row of multiple txt files that would come from an output of ls -l?
I was able to find an alternative to edit all the files inside the directory: sudo find . -type f -name "*. txt" | xargs sed -i "s/data"
-
1
votes1
answer60
viewsQ: How could I replace a row of multiple txt files that would come from an output of ls -l?
What I’d like to do is more or less that: ls -l | xargs sed’s/regex of the pattern I want to replace/new data/g' for each output of ls, a replacement is done inside the file using sed. Can you do…
-
0
votes1
answer24
viewsQ: Very fickle output in multithreaded application along with Exception
I’m seeing threads now and doing some experiments. It’s a simple test, I want to print on the console ten times the name of each thread by inserting into the same object of type List in a…
-
0
votes2
answers567
viewsQ: Is it possible to use the external terminal when running a Java program through Netbeans?
What I mean is, I can switch to getting Netbeans output out on Linux bash or Windows cmd instead of using the internal Netbeans application console?
-
3
votes3
answers1706
viewsQ: Hibernate and JPA are the same thing?
It is a question of who just took this subject to study but confuses me a lot. I read some articles about ORM and did not understand very well what is one and what is the other, are the same thing?…
-
1
votes1
answer47
viewsQ: Falling in catch while trying to establish a connection
I’m using Netbeans and can’t establish a connection. I added . postgre jar (postgresql-42.2.5.jar) in the lib folder and tested the connection in the Netbeans tab (Service > database), ok worked.…
-
1
votes1
answer236
viewsQ: How to rename a file with lib.io’s File class?
I’m having trouble understanding what the method really is .renameTo(); does. Follow the example: File arquivo = new File("caminho/nomeAtual.txt"); System.out.println(arquivo.getName());…
javaasked Lucas Marinzeck 318 -
1
votes1
answer291
viewsQ: Statement or Preparedstatement, for what reason avoid using Statement
What problems can happen if I use Statement instead of Preparedstatement on the JDBC connection to the database //Code using Preparedstatement, setting query values through methods Connection con =…
-
2
votes1
answer174
viewsQ: How to run find -exec on files that have been modified for more than 15 days?
I am trying to remove some files from a directory, but I cannot mount a command. What I want would be more or less like this: find -name '*.log*' -mtime 15 -exec rm -f {} Find the default name and…
-
0
votes2
answers74
viewsA: How do I find the largest number read and the smallest number read?
Well, there are some ways to find the lowest and highest value of a set of numbers. Ideally, you understand logic and not just copy a ready-made answer. The simplest way I consider it is to put all…
python-3.xanswered Lucas Marinzeck 318 -
2
votes2
answers1022
viewsA: Error: incompatible type for argument 1 of 'printf'
I believe it’s a syntax error in printf, try to write this way: printf("%d", valor2) Note also that you used print(valor1) and changed to print"f" (value2).…
-
0
votes4
answers153
viewsA: Public Static Void Does Not Work Properly - NETBEANS
The main method is where your application will start running, the starting point, without this method your application will not know where to start. public static void main(String[] args) { /*Seu…
javaanswered Lucas Marinzeck 318 -
5
votes1
answer158
viewsQ: Has some real use when implementing non-abstract methods in an abstract class
Have some real use when implementing a method that has a field, (implemented code) in an abstract class that cannot be instantiated, since no compilation error occurs? public abstract class…
-
2
votes1
answer109
viewsQ: Problems with 2 vectors joining
I have a problem joining two sets of integer numbers into one vector, without repeating numbers that are in Set A and Set B. The following error is shown in row 13: error: Unknown type name ?bool';…
-
-1
votes1
answer54
viewsQ: Why is my array not sorted? (Bubble Sort)
I fed the array with the user input, but the algorithm doesn’t give the output in an orderly way, which I did wrong? int main() { // variáveis int vetor[5] = {0}; int aux, i=0, j=0; printf("Entre…
-
0
votes0
answers118
viewsQ: Segmentation fault (core dumped) in matrix data scanf
This following piece of error code, does not read user data to allocate in 5x2 matrix, can not find the problem int linha=0, coluna=0; int matriz[5][2]; for(linha=0;linha < 5; linha++){…
-
0
votes2
answers128
viewsQ: If Else Statement problems chained in C language
I’m starting in programming and had enough difficulty to understand If Else in a chained way. I came across the following situation, when running the code only the first or second condition…