Posts by Guilherme Henriques • 572 points
18 posts
-
6
votes2
answers96
viewsA: Deserializing JSON in PHP
The format of this JSON is wrong, it should be like this: {"id":"1","cpf":"09871204922","score":"400"} as it is in the wrong shape, the json_decode is returning NULL, it is important to make an…
-
2
votes2
answers174
viewsA: Create stylized HTML element using Javascript
Missing vc define width and Heigh measurement unit function criar(){ let box = document.querySelector('.box'); box.style.width = '100px'; box.style.height = '100px'; box.style.background = '#f00';…
-
-1
votes1
answer34
viewsA: You are not passing JS variable value to PHP via ajax
You need to send the variable in a JS object $('#delete-update').click(function (info) { info.preventDefault(); let eventID = $('#save-update').data('eventId'); $.ajax({ type: 'POST', url:…
-
1
votes1
answer35
viewsA: add_action functioning
Yes, you can do so... you can also use remove_action to remove the action from the default theme remove the action that adds the scripts # exemplo function theme_name_scripts() { wp_enqueue_script(…
wordpressanswered Guilherme Henriques 572 -
2
votes4
answers5284
viewsA: How to center the elements within a div?
.ligado { background: yellow; width: 150px; height: 150px; border-radius: 50%; margin: 0 auto;…
-
2
votes2
answers401
viewsA: does not work when you put in the onchange javascript form
Try adding an event to the element, I believe it is the best option function teste() { valor = this.value; console.log( 'mudou para: '+ valor ) if( valor == 'novo' ) {…
javascriptanswered Guilherme Henriques 572 -
1
votes1
answer90
viewsA: Catch current time in Python
Try to use the library time python import time #importa a biblioteca start_time = time.time() # pega o tempo de inicio i = 0 # variavel de exemplo while True: # loop de exemplo i = i + 1 # soma…
-
0
votes1
answer28
viewsA: I’m making a calculator, but I want the program to ask the user if he wants to use it again,
Entering the answer for "s", it will continue in the while loop def add(x, y): return x + y def subtract (x, y): return x - y def multiply (x, y): return x * y def divide (x, y): return x / y while…
python-3.xanswered Guilherme Henriques 572 -
9
votes2
answers231
viewsA: What does " | " mean in Typescript?
A type of union describes a value that can be one of several types. We use the vertical bar (|) to separate each type, so [ number | string | boolean ] is the type of value that can be a number, a…
-
0
votes2
answers749
viewsA: Does anyone know the possible cause of the "Uncaught Error: Syntax error, unrecognized Expression" error?
the error is in the way that is caught the value of the variable pegar_status if input let pegar_status = $(pegar_tr).val(); ↑ if it is another type of element use let pegar_status =…
-
1
votes3
answers480
viewsA: Pick the date range separately by weeks of the current month
Depending on the day, there may be some errors in your application, so it is important to check which week is getting the days (this is because some places the week starts on Monday, not Sunday)…
-
0
votes1
answer705
viewsA: Uncaught Referenceerror: das is not defined at Htmlanchorelement.onclick
part of the error is in function called js in element [...] getCli(" + cli.getCpfCli().toString() + "); [...] as it is a variable string, need to pass between quotes, in your code, is passing [...]…
-
0
votes4
answers171
viewsA: How to find a vector using a JAVASCRIPT function
In this case you are renaming the array variable var skills = [ "JavaScript", "ReactJS", "React Native"]; function temhabilidade(search){ var resultado = skills.indexOf(search); return resultado…
javascriptanswered Guilherme Henriques 572 -
4
votes1
answer946
viewsA: Date format in python
try this using datetime from datetime import datetime print(datetime.today().strftime('%d/%m/%Y'))
-
1
votes1
answer335
viewsA: Align button underneath CSS
Bootstrap 4 Add this class next to the item that has the class 'Row' align-items-end Bootstrap 3 .container-row { display: flex; align-items: flex-end; } .bottom-column { float: none; display:…
-
2
votes2
answers156
viewsA: Check if automatically filled field is "True" jQuery
Try if( $("#campoRecebeDados").val().length > 0 ){} Or if( $("#campoRecebeDados").val() != "" ){}
jqueryanswered Guilherme Henriques 572 -
3
votes1
answer64
viewsA: contender by changing and changing size of img
Leave the image width at 100% and the height in auto, not to deform the image also see if you have viewport in header <meta name="viewport" content="width=device-width, initial-scale=1.0">…
-
2
votes3
answers885
viewsA: Table not getting Responsive bootstrap 4
Missing the div around the table <div class="table-responsive-sm"> </div>