Posts by Marcus Pereira • 409 points
20 posts
-
0
votes1
answer213
viewsA: Flask ajax html communication
In this case you will have to render the table by javascript and not by html has a function called innerHtml, take a look at it. https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML…
-
0
votes1
answer275
viewsA: How do I make a translation system in PHP and keep the translation when switching pages?
There are several ways of doing translation, one of them is using database and referencing the word for each of the languages. The other way would be to store in a text file. Which one should I use?…
phpanswered Marcus Pereira 409 -
1
votes1
answer105
viewsA: Microservices and Clusters
There is no right way to do it, of course it can exist to form more coherent for you. Each case is a case, if I was with the same problem as you I user only 1 cluster depending on the demand, it all…
-
1
votes2
answers724
viewsA: Flask MVC - doubts
See how the ocomunitário was made. https://github.com/DwarfTeam/ocomunitario I try to follow good practices always. Understand something, this is your code: app =…
-
0
votes2
answers111
viewsA: List in HTML table separated by category
When you bring data from the database you should set it as order_by desc. Ex: Atletas.objects.filter(categorias='spfc').order_by('-tempo') Bring all players who are on the spfc team with decreasing…
-
1
votes2
answers136
viewsA: How to transform a list [['a'], ['b']] into a string: ab
If I understand your question, you want to extract the data from a list and string it, if that’s it, there are several to do, one of them is using Listcomps. alfabeto = [['a'], ['b'], ['c']]…
-
1
votes1
answer87
viewsA: Python function equivalent to Crypt in PHP
import crypt hash = '$1$/E0xe3/3$yPzJElk.aVSd5JoQTopDZ/' crypt.crypt('marcus.mann', hash)
-
0
votes1
answer1391
viewsA: Error installing python library
You will have to download the installer and install manually, unfortunately windows does not support many python libs, I strongly recommend using linux-based systems, more to solve your problem,…
-
0
votes2
answers38
viewsA: Help Foreach stdClass
The die() inside the foreach, put it outside that will work.
-
-1
votes3
answers215
viewsA: Dynamic background in relation to div
It has nothing to do with PHP, this is Javascript, you have to capture the event Hover mouse and change the image. I created this example, see: function trocaImagem() { var element =…
-
0
votes4
answers4522
viewsA: Count number of records in a Mysql table with PHP?
When you make an appointment at the bank, you can pass the Count: $sql = "SELECT COUNT(*) FROM fruit WHERE calories > 100";
-
1
votes2
answers24
viewsA: Show the three best rated vehicles from a table
forehead there: select vec.nome, classic.nome from veiculos as vec inner join classificacoes as classic on classic.id_veiculos = vec.id where classic.estrelas > 3 order by classic.estrelas asc…
-
2
votes1
answer78
viewsA: How to capture form field with . htaccess?
The confusion ta no . htaccess, vc ta making a POST request and waiting for a GET. I made this code and here ta working, test ai. .htaccess <IfModule mod_rewrite.c> RewriteEngine On…
-
1
votes1
answer124
viewsA: How to replace data with php mysql EX:
For this you have to make a Join, it is not a substitution but bring the data that belongs to that determined region, example: $sql = "SELECT u.id as usuarioID, u.nome, e.id as estadoID, e.uf from…
phpanswered Marcus Pereira 409 -
5
votes1
answer238
viewsA: Difference between base_url(); and base_url('Assets/example');? >
Very simple, base_url() in codeigniter returns the base url, let’s say your site is: http://meusite.com.br vc calling the function base_url() will return this. If you pass the parameter, it will…
-
0
votes2
answers921
viewsA: Import/insert other files - go (golang)
as it ta inside the main directory, it is not necessary to matter, in this case just call the functions and variables that are inside the test.go file if your file was between or package as for…
-
0
votes2
answers157
viewsA: Change view/component but not URL
puts a preventdefault(), so it won’t redirect.
-
1
votes1
answer12653
viewsA: How to make a POST in Javascript
Try a JQUERY, remembering that you have to have a POST enabled route. Then it would look like this: <script src="https://code.jquery.com/jquery-3.2.1.min.js"…
-
1
votes2
answers181
viewsA: vscode removing Imports when saved file
It is not VS code that removes import but the compiler from GO, in theory GO removes all imports that you are not using for performance reasons. When you import from a library, you have to inform…
-
1
votes1
answer919
viewsA: Open text file and handle by line
Do not use split, it removes the character passed in the second parameter and returns a string from the content result. When you made one for you compared if the whole file is equal to C100, but you…
golanganswered Marcus Pereira 409