Posts by Rodrigo Carvalho de Brito • 379 points
29 posts
-
-2
votes1
answer44
viewsA: What is the Regexp equivalent of split("") in JS?
Forehead there, here it worked: const pi = 3.141593; const piArray = pi.toString().replace(".", "").split(""); console.log(piArray); If you need to mount a string and not an array, apply toString()…
-
-2
votes1
answer54
viewsA: Css not working in firefox
Only "border-Radius: 80px;" in "Progress::-Moz-Progress-bar", which is what precisely defines the style of the progressibar for firefox. progress { text-align: center; height: 20px; width: 70px;…
cssanswered Rodrigo Carvalho de Brito 379 -
-1
votes3
answers175
viewsA: Typewriter effect is not working properly
Follow a simple code below in pure JS (super simple)! I put a step by step on the following link: https://www.rodrigobrito.dev.br/blog/js-e01-efeito-maquina-de-escrever-com-javascript //EFEITO…
-
1
votes5
answers54
viewsA: Close modal after saving to Bank
You are using the Hide mode, which only decreases the opacity of the modal. From one remove, ". remove()", the modal will be undone. You can even put a fade so it’s not too dry. Change the Hide to…
-
2
votes1
answer39
viewsA: Remove Characters from String
To specify a literal backslash, fold it ( ). All other occurrences of the backslash will be treated as a literal backslash: this means that other exhaust sequences you are used to using, such as r…
-
0
votes1
answer61
viewsA: HOW JAVASCRIPT SOURCE CHANGES
The way you are coding, applying in Canvas, you can put the font-family in its text function, in ctx.font, as follows: function text (){ ctx.font = "40pt Digital-7 Italic"; ctx.fillText("teste",…
javascriptanswered Rodrigo Carvalho de Brito 379 -
0
votes2
answers40
viewsA: I am unable to run this command line due to an error in php but n know which one!
In this line of the file salva_mensagem.php: $msg_contact = "INSERT INTO messages_contact(name, email, message) VALUES ('$name', '$email', '$email', NOW())"; The correct one has to be the passage of…
-
0
votes1
answer36
viewsA: Sub-volume and average in Mysql
SELECT m.name, s.year FROM municipio as m LEFT JOIN senso as s.cod_mun = m.cod_mun WHERE s.populacao > (SELECT AVG(populacao) FROM senso WHERE ano = s.ano) as media_populacao GROUP BY s.ano,…
-
-1
votes2
answers36
viewsA: Delete only if there is - in the word
DELETE FROM table WHERE data2 LIKE '-%'
-
0
votes2
answers47
viewsA: How do I make an delete button disappear after it appears when it is called in a click-like addeventlistener?
Your question is very confusing. If you use jQuery it will be much simpler, simple!!! $('rm-time').hide(); $('add_time').on("click", function(){ $('rm-time').show(); }); To hide the rm-time:…
-
0
votes3
answers75
viewsA: How to leave a text (on the left) on the photo side (right side) in the same div? I am new and I am very lost
Your question doesn’t sound very good. In addition to the title, put a text describing your problem, however, there is a super simple way for you to perform this action: Use a div to wrap the…
-
0
votes3
answers48
viewsA: How can I put this image next to the buttons?
Use a div that involves the div you want to organize, apply the property in the css "display: flex", "flex-wrap: wrap" to break and in each div apply the "flex-Basis" according to the percentage you…
-
0
votes1
answer113
viewsA: I can’t change files in htdocs without creating a copy
These are the file permissions inside the folder. If using linux, chmod -R +x /opt/lammp/htdocs If you are using windows, change manually with the right mouse button, or use the command.
-
1
votes2
answers274
viewsA: Doubt/problem scanning QR Code with javascript and displaying the result in input
I also use Instascan for the same purpose. Inside the addListener method, in place or even next to Alert, use the following, replacing the "id_field_de_send" with the id of the element that will…
-
0
votes2
answers101
viewsA: (JAVASCRIPT) How to style the layout of this JS code?
You can seamlessly insert html tags into the script, but it’s not ideal by programming patterns (harms maintenance)... unless it’s really necessary in terms of scope. I put only the opening of a div…
-
2
votes1
answer90
viewsA: How to make a div fill the remaining width with pure Css
Hello! apply the "display:flex" property to the parent div, which will allow the easing of the arrangement of your child elements and to the div that will take over the rest of the container space…
cssanswered Rodrigo Carvalho de Brito 379 -
0
votes1
answer71
viewsA: What is the importance of using ON DELETE CASCADE and ON UPDATE CASCADE in a table with foreign key(s)?
The importance of using CASCADE is to ensure the referential integrity of the database, which ensures that a record (parent) that has a data referenced by another record (child), when updated…
mysqlanswered Rodrigo Carvalho de Brito 379 -
3
votes1
answer33
viewsA: Stop motion with css Animation
You can use jQuery, very simple, as follows: In CSS insert a class with the animation property "paused": .paused { -ms-animation-play-state:paused; -o-animation-play-state:paused;…
-
1
votes1
answer66
viewsA: My footer is not at the bottom of the page in smaller screen
In your css, in the footer element, replace it with the following (just add position, left and bottom): footer{ background: blue; padding: 20px 0; text-align: center; color: white; font-weight:…
-
0
votes1
answer610
viewsA: Open modal pop-up automatically when opening the site only once
You can use jQuery’s remove or Detached function to perform this function after the modal close click. The remove will delete permanently, turning off the DOM element, while Detached will remove but…
-
0
votes2
answers37
viewsA: Link does not return to page. previous
Your href are pointing to specific id, which would work if the references were from the same page. You can enter the address (url) instead of an id, since they are on different pages. Also, the…
-
0
votes2
answers44
viewsA: How to center an image vertically within a div?
It’s a little messy!! Just use flex display in the div container of the items, and in each element, put a div for each and put a flex-Basis with the percentage for each element. In this case I put…
-
1
votes2
answers78
viewsA: Align menu icons inside a <li>
Put the img tag on the link only. Follow the code below: /*====Menu Esquerda====*/ nav#menu_esquerda { background-color: #E1F0DB; border: 0.5px solid #999999; border-radius: 5px; font-family:…
-
0
votes1
answer28
viewsA: Pass inputs from one page to another in php
What you need to do is "form Wizard". There are several ways to do it. Follow an example: var currentTab = 0; // Current tab is set to be the first tab (0) showTab(currentTab); // Display the…
-
1
votes2
answers53
viewsA: I need to change the background color of a link in a Nav tag dynamically by clicking on it
You can change the css of this link with a javascript or Jquery (simpler): $('#Cadastro')on('click', function(){ $(this).css('background-color', '#C9CBCC'); }); #C9CBCC is the exact background color…
-
0
votes2
answers104
viewsA: Run Javascript commands by PHP
Just put it this way: <?= ("<script>alert('teste')</script>");?> Open the php tags, close and then put the script, this example does not bring us the scope of need... can not help…
-
0
votes2
answers72
viewsA: Select all months of the year in postgres
I did it exactly this week to calculate hours worked in the month of employees!! Just use a GROUP BY!! Put an alias for your "Extract(Month from datahorainicio)" as for example "Extract(Month from…
postgresqlanswered Rodrigo Carvalho de Brito 379 -
0
votes3
answers914
viewsA: Insert two points into the string
You can use the function strtotime php, formatting the time as your need: $valor = "0050"; $time = date("H:i", strtotime($valor)); echo $time; The result will be a string of value 00:50.…
-
0
votes2
answers37
viewsA: How to unify 2 consultations?
You have to have something that links one table to another. Using wp_post, in the first query you select the id of this table, which will allow JOIN with the second query when the id of the wp_post…