Posts by Lucas Schneider • 430 points
16 posts
-
0
votes1
answer77
viewsQ: Findall using Elementtree does not return expected result
I am trying to find a specific element within a python XML file. I use Elementtree for this. The following code: root = ET.fromstring(response.content.decode('utf-8')) print(root.findall('.//*'))…
-
0
votes1
answer230
viewsQ: Save() method of Mongoose not saved
I have the following problem: When calling the Mongoose save method it seems to be doing nothing. The save code is as follows:: var newProjects = new projectModel({ "teste":"teste" });…
-
2
votes2
answers268
viewsA: Error when compiling Cmake project
I found out what I was doing wrong. I’m not sure, though, why it wasn’t working. I was not selecting the correct Generator, and the following command solved my problem: cmake -G "MinGW Makefiles" ..…
-
1
votes2
answers268
viewsQ: Error when compiling Cmake project
I have the following problem when trying to build a project using Cmake: -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:2…
-
0
votes1
answer35
viewsQ: Parameters in the Signals Handler
I have a doubt and even after searching I could not solve. Let’s say I have the following signal handler: struct sigaction conf_signal; conf_signal.sa_flags = 0;…
casked Lucas Schneider 430 -
2
votes1
answer199
viewsQ: Wrong return of ping command
Taking into account that the ${parameters} is an array that can contain valid IP addresses or not, I wrote the following code: for ((i=0; i<$#; i++)); do eval "arg=\${$i}" ping ${parameters[i]}…
-
3
votes2
answers437
viewsQ: Hide error messages
Consider the following shell script: ping 8.asd.8.8 -c1 -q > /dev/null if [ $? == 0 ] then echo 'ok' else echo 'erro' fi This ping will return an error and this error is dealt with in else right…
-
0
votes1
answer244
viewsQ: Build error -lpthread
I am trying to compile a file. c, but whenever I call gcc filename. c, I have the following error: c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -lpthread…
-
1
votes1
answer783
viewsQ: Error with GET HTTP Special characters
I’m having some trouble doing Gets HTTP. When the page text has some special character, the answer ends up deforming. Example: os participantes dever&atilde;o: when the original text was os…
-
1
votes1
answer6763
viewsQ: Unable to find or load the main file class.java
Hi, I’ve been trying to make a code run in a new environment, but I’m not succeeding. Whenever I open the cmd and execute the java arquivo.java I have as return the error Não foi possível localizar…
javaasked Lucas Schneider 430 -
3
votes2
answers1783
viewsQ: Error starting Tomcat 9 as a service
I am having a problem starting Tomcat service. When I try to start the service, some problem happens and it is not initialized. The log in the C:\Program Files\Apache Software Foundation\Tomcat…
-
1
votes2
answers89
viewsQ: Methods Running in Parallel
Hi. I think this is going to be a very simple answer, but it’s something I still have doubts about how to do. Let’s say I have a class PedidosListener responsible for reading a . csv file and…
javaasked Lucas Schneider 430 -
6
votes4
answers1739
viewsA: Expire php link
I believe this can be solved as follows: $hora = time(); $id = //id qualquer; $seulink = "ativacao.php?id=" . $id . "&hora'=" . $hora; And in the active.php file you do the logica to check if…
-
1
votes1
answer890
viewsA: How to maintain multiple connections with postgresql in Node.js?
Hi. I believe this can be solved more or less like this: var pg = require('pg'); //bancoA var conString = "postgres://username:password@localhost/database"; var client1 = new pg.Client(conString);…
-
2
votes1
answer1395
viewsA: How to pick up Form value - Java - Swing
Edit: Hadn’t seen the comments, it was bad. The following code should work: String s = textField.getText() And then you take it from there s as necessary. Should further doubts arise regarding…
-
1
votes2
answers767
viewsA: How to treat exception that cannot delete as it is a Foreign key
Hi. This is because codeigniter does not make an exception in this case. What you can do is: Open the database.php file, find the line $db['default']['db_debug'] and seven a to FALSE. And in your…