Posts by Diogo Aguiar • 166 points
9 posts
-
0
votes2
answers47
viewsA: Check if there is a value in Node JS
Utilizes the hasOwnProperty which verifies that an object has a certain key: let var = { '$instance': {} }; var.hasOwnProperty('numeropessoas'); // false var = { '$instance': { numeropessoas: […
-
4
votes4
answers798
viewsA: Search id in object array with Javascript
Like technologies is an array, you have to iterate over the array and see if there is an object with the id you want. For example: developers.find(dev => { let hasReact = false;…
javascriptanswered Diogo Aguiar 166 -
1
votes1
answer132
viewsA: Manipulating XML text to display the user with javascript vuejs
You can use Domparser to make the XML interface. Since you’re using vuejs, you can do Binding field with v-model and then perform a function on methods to do the interpretation. Example: <div…
-
1
votes1
answer122
viewsA: Opening page inside a DIV (problem with home page)
I think the problem is the part where you check the $_GET['pg']. Since you’re not handling the case $_GET['pg'] is not set if you access the homepage without ?pg=home url, will not be done include…
phpanswered Diogo Aguiar 166 -
2
votes2
answers120
viewsA: Approximation mysql filter
Replace the spaces by % in the search term before using it in the query. This way you will get names that exist in between. select * from usuarios where nome like '%João%da%Silva%'; Adding your…
mysqlanswered Diogo Aguiar 166 -
2
votes1
answer39
viewsA: Time format with sprintf
Just change the last line to the following: print sprintf( '%02d:%02d', $minutos / 60, $minutos % 60 );
phpanswered Diogo Aguiar 166 -
1
votes2
answers393
viewsA: How to create a volume of a single file on Docker?
To synchronize a single file you must use the absolute path in the volume setting. For example: volumes: - /home/user/stateful/deathrun/sv.db:/server/garrysmod/sv.db or else volumes: -…
-
0
votes2
answers548
viewsA: How to convert the hash() value of a string back to the original string?
You can’t. Hash works only one way and it’s not possible to reverse. If you want to reverse you must use encryption. If you only want to validate passwords, you can hash: hashed_orig_password =…
-
0
votes2
answers103
viewsA: Error giving python Mysql Insert
It seems to me you’re defining the value of Candidate incorrectly. Instead of {1} you shouldn’t have something like {id_candidato}? Kind of: id_candidato = <ID do candidato aqui>…