Posts by Raul Sena Ferreira • 757 points
24 posts
-
-1
votes7
answers49622
viewsA: How to add elements from a list and return the result as an integer?
Like Pablo mentioned, using the built-in sum(sua_lista) will add the vector efficiently and simply. However, what many people do not know is that using the sum method of numpy library (…
pythonanswered Raul Sena Ferreira 757 -
-1
votes2
answers2913
viewsA: Change value of a variable with PHP button
The right thing would be for you to put in something more complete than you already have and are trying to do, but I’ll try to give you an idea so you can try to implement, so you won’t need to…
phpanswered Raul Sena Ferreira 757 -
6
votes2
answers1886
viewsA: Gets function on Linux
What happens is that the gets picks up the " n" that the scanf leaves, so much so that if you reverse the order of the scanf with the gets will work. In this case, use the fgets as Broly mentioned,…
-
9
votes3
answers10734
viewsA: Recursion to return numbers from 0 to n
A small correction, you want it to return from N to 0 and not from 0 to N, since you are decreasing recursively, if you really want to go from 0 to N I change the code. Another thing you forgot is…
canswered Raul Sena Ferreira 757 -
1
votes2
answers992
viewsA: How to query the DB without refresh and write the returned data?
Put this code inside some Function that will be called to do what you want, remember to extract from the Response the data you want. I haven’t tested the code but that’s basically what you have to…
-
1
votes1
answer15977
viewsQ: add user to sudoers group on Ubuntu
How to create a user and put it in the sudoers list on linux? How to take an existing user and change your group to sweat?
-
3
votes1
answer15977
viewsA: add user to sudoers group on Ubuntu
I tried to find here in SOPT and did not find, I even looked in SOEN but I found a more complete answer in askubuntu, so I will put here what I did to solve, in case the question is duplicated…
-
20
votes3
answers10053
viewsQ: Why is it not good practice to use namespace "Std" in C++?
I was using using namespace (nomeDaBiblioteca); in my code and ended up having some conflicts with another library. Why these conflicts happen and what is the best solution?…
-
3
votes3
answers10053
viewsA: Why is it not good practice to use namespace "Std" in C++?
The problem I faced was due to two libraries that contained the same method name and so the use of "using namespace Std" is not good practice, follows below example: We have two libraries using…
-
0
votes3
answers755
viewsA: Can you click on a <TD> and get the value of another <TD> Hide?
Let’s say your hidden TD has a name: <td class="escondida" style="display:none;">Valor escondido</td> Then just change your code to: $('#nmUsuario').on("dblclick", '.clique', function ()…
-
4
votes1
answer227
viewsA: CSS display and visibility - SEO effects
This will have a bad impact on SEO if this tag is a tag you want to use for the purpose of delivering content to search engines (it can be mistaken for cloacking). Ideally, you don’t hide tags that…
-
3
votes2
answers888
viewsA: Are there BI/OLAP tools for the MEAN.JS platform?
There is an open-source option, which is Cubes, which uses the Slicer tool http://cubes.databrewery.org/ It is made in Python and has a Javascript client library: https://github.com/Stiivi/cubes.js/…
-
1
votes2
answers4711
viewsA: Calendar in PHP
function linha($semana){ $dias = count($semana); echo "<tr>"; for ($i = 1; $i < $dias; $i++){ if(isset($semana[$i])){ echo "<td>{$semana[$i]}</td>"; } else{ echo…
phpanswered Raul Sena Ferreira 757 -
1
votes1
answer317
viewsA: Security in consultations with Redis and Mongodb and Nodejs
If you are using PHP, yes, you may suffer from SQL Injection, but the format that is used to write data to Mongodb (BSON) is a format where your query is interpreted as an object and not as a…
-
1
votes1
answer230
viewsA: Does not return value pro javascript
Just add a Hidden field in your view that receives the value of your request from the controller and it will remain persisted. To pick up and resubmit the request you just pick up with javascript o…
-
1
votes1
answer426
viewsA: Configuring jsTree for AJAX
Because you do not call the tables each one at a time? var urls = []; urls[0] = "/tabela1.json"; urls[1] = "/tabela2.json"; urls[2] = "/tabela3.json"; urls[3] = "/tabela4.json"; for(i=0; i <…
-
0
votes3
answers647
viewsA: Dynamically load from the bank and mount a treeview in cshtml I’m not getting
When you use the method $('#jqxTree').html(str); vc overwrite everything that is inside the div id="jqxTree", and the checkbox (jqxCheckBox) you do not touch at any time. Another thing is that if…
-
1
votes1
answer156
viewsA: remove javascript file from a page header
You can add in your script those that are important and overwrite the page head by placing these important and deleting the unnecessary ones, example: var scriptsNecessarios = [];…
-
0
votes1
answer141
viewsA: Error 405 when using Httppost on Android
I will put the answer here so that others can see that the question has been answered: " the problem was related to the domain that had not been propagated. "
-
1
votes1
answer53
viewsA: Alternative to File API for outdated browser
Can’t you store the file even temporarily? If yes, you could do the following: 1) You create an ajax that uploads the file to a /tmp folder (purposely for the file to be deleted later); 2) This ajax…
-
0
votes1
answer4745
viewsA: Run shellscript on an android mobile
From what I understand, what you want is to run reading shell script files on android and this you can do as if it were on your pc. You can write all the routine you want in the script and then run…
-
0
votes1
answer1956
viewsA: How to pass filename with accentuation and spaces as parameter for shell script file
The exit was to use double quotes like Wakim and Antonio mentioned, so I’m marking the issue as resolved.
-
2
votes1
answer758
viewsA: Simple data replication in Postgresql
From what I understand, your concept of replication is simple copy, from one database to another. In this case, the simplest way is to use the "pg_dump" command, if you only have these 2 tables and…
-
2
votes1
answer1956
viewsQ: How to pass filename with accentuation and spaces as parameter for shell script file
I densenveloped a shell script that gets the location of a file and does several manipulations on it, e.g.: ./processes.sh path/file.txt However, when I send a file name as a parameter that contains…