Posts by Paulo Henrique Rodrigues Grund • 317 points
13 posts
-
0
votes0
answers50
viewsQ: Sort strings on a struct array in C
I’m trying to sort alphabetically strings in a string array in a struct, but for some reason the names get bugged #define TV 10 #define TC 100 typedef struct ficha { char nome[TC]; int dependentes;…
-
2
votes2
answers1208
viewsQ: cannot set Property 'innerHTML'
I’m trying to make a hangman’s game and I want you to show the correctly typed letters on the Divs, but give the following error on Chrome forca.js:95 Uncaught Typeerror: Cannot set Property…
javascriptasked Paulo Henrique Rodrigues Grund 317 -
1
votes1
answer57
viewsQ: Return in array js
I’m trying to make an old game of js, but I can’t check if the filled-in index is different from 1 or 2. Any solution? I’m trying to re-turn the array but it doesn’t seem to go. Code:…
javascriptasked Paulo Henrique Rodrigues Grund 317 -
8
votes4
answers320
viewsQ: Check if a string is only composed of 0
I want to check if for example a string "00000000" is composed only of zeros and give true, but a "0000a0e0b" is false, because I tried with ! isNaN and gives true having at least 1 number var…
javascriptasked Paulo Henrique Rodrigues Grund 317 -
3
votes1
answer142
viewsQ: JS replaces all characters equal
I’m trying to use the replace function to turn a letter to 0, but it doesn’t work when I want to test the letter inside a var. var palavra = "abelha"; var letra = 'A'; palavra =…
-
0
votes2
answers47
viewsQ: disable buttons by name
I’m trying to give disabled on all buttons with the same name, but it doesn’t work, what I’m doing wrong? //HTML BOTÃO QUE EU QUERO DESATIVAR <button class="teclado" id="Q" name="nameTeclado"…
javascriptasked Paulo Henrique Rodrigues Grund 317 -
-1
votes2
answers1598
viewsQ: Send value of a <a> onclick
I’m trying to get the value of one <a> send it to a Javascript function, but I don’t know what’s going wrong. //HTML <div id="dicaDiv" class="text-center"> <p id="pDica1"…
-
3
votes1
answer3056
viewsQ: Grab button value in js
Hi, I’m trying to take the value of a button and put it into a variable, but it doesn’t seem to help at all? ///HTML <button class="teclado" id="qTeclado" onClick="clickTeclado(this.value);"…
javascriptasked Paulo Henrique Rodrigues Grund 317 -
0
votes1
answer109
viewsQ: help setting char inside the if in C
Hello, I’m trying to set the char variable filename[100] inside if, but the compiler error, but if I set it outside of if it works good, any pls help? (#defines are stdio. h stdlib. h time. h and…
casked Paulo Henrique Rodrigues Grund 317 -
0
votes1
answer358
viewsQ: printf %s integer in C
I’m trying to make appear on the screen all characters of the string typePersonagem[0], but only the last letter of the string is coming out, someone helps me in what I’m missing? #include…
-
2
votes1
answer663
viewsQ: Fibonacci in JS with arrays
Hello, I’m trying to make a code in JS that shows the value of Fibonacci in the chosen position using vectors but I don’t know why I’m not getting, does anyone help me in what I’m missing? (The…
javascriptasked Paulo Henrique Rodrigues Grund 317 -
1
votes1
answer2040
viewsQ: call a function within another function in js
Hello, to not have to repeat the same code 2x and change only the little one I wanted to do 3 different functions, the vectors() and the two that will call the vectors() and then execute their code,…
javascriptasked Paulo Henrique Rodrigues Grund 317 -
0
votes1
answer17
viewsQ: Get input ids using for no js
Hello, I’m trying to take the value of 10 inputs and put them in a vector of 10 houses, but I’m not able to do it for the sake of, can someone help me to get no off var n[0] for example take the…
javascriptasked Paulo Henrique Rodrigues Grund 317