Posts by nelson450 • 118 points
19 posts
-
-3
votes2
answers1117
viewsQ: Link button is not clickable
The problem is that I cannot click the button or the icon, how do I fix it? Code: .heroimg{ position: relative; background-repeat: no-repeat; background-image: url('../img/fjords.png');…
-
0
votes1
answer123
viewsQ: Problems when encrypting text with matrices
Here comes the code: import numpy as np def invert(matrix): try: new = list(np.linalg.inv(matrix)) except np.linalg.LinAlgError: return "Matrix not inversible!" for i in range(len(new)): new[i] =…
python-3.xasked nelson450 118 -
0
votes1
answer258
viewsA: Form in Flask does not work
solved, there was a problem with a hidden Angularjs...
-
0
votes1
answer258
viewsQ: Form in Flask does not work
When I click the Send button nothing happens, if I leave a blank field, idem. File Routes.py from flask import * from forms import * app=Flask(__name__) @app.route('/') @app.route('/home') def…
-
0
votes1
answer527
viewsQ: Tkinter function running even without clicking the button
Here is my code: from tkinter import * from tkinter import messagebox def add(a, b): messagebox.showinfo("Resultado", a.get()+b.get()) win=Tk() win.geometry('300x200') a=StringVar() b=StringVar()…
-
1
votes1
answer39
viewsQ: Python c/ swapcaser problem
The program must convert a letter in schema A->a or a->A and works normally, except that at the end of the string a None appears. Does anyone know how I can get it out? def swap_case(s): for x…
-
1
votes1
answer54
viewsQ: Strange error in class c++
I have the following code: #include <iostream> using namespace std; class guns{ public: string name; int ammo; void reload(){ ammo = pente; } void shoot(){ ammo -= 1; } private: int pente =…
-
1
votes1
answer138
viewsQ: How to remove the style when the checkbox is unchecked in Angularjs?
I need to change the background color of the page when I check box and return the original color when I uncheck, I only got the first step and I can’t get back the original color, someone help.…
-
0
votes1
answer5072
viewsQ: How to close a modal by clicking outside it?
I made a modal and I need it to be closed by clicking outside of it or the close button. I’ve tried to do with onblur only it doesn’t work, it’s only for tag input. How should I do? function abre()…
-
0
votes4
answers248
viewsA: Problems with Javascipt calculator
I was able to solve using Number(), thanks for helping with the resolution. function p(n) { return Number(n); } function tabuada() { var oper =…
-
-2
votes4
answers248
viewsQ: Problems with Javascipt calculator
When I do an operation, the result is always the same: Nan. What my mistake? function show() { var oper = document.querySelector('input[name="oi"]:checked').value; return oper; } function…
-
2
votes1
answer354
viewsQ: 'querySelectorAll' does not work
I was doing a test that when clicking the button all 'p' should turn red. Someone knows what is wrong? function test() { document.querySelectorAll('p').style.color = 'red'; } <!DOCTYPE html>…
-
0
votes2
answers48
viewsQ: Problems with 'onsubmit' in 'setTimeout' form and function
When I invoke the 'validate' function nothing happens. What is my mistake? I also need to make the message 'validate' and 'like' functions disappear after 5s (I could not use setTimeout) function…
-
-1
votes1
answer273
viewsQ: Button when clicked has effect on other
I made a button using ID’s and still when clicked it gives a margin-top=10px in both. What is my mistake? I want it to take effect only on the button that was clicked! button{ border: none;…
-
0
votes1
answer60
viewsQ: Background animation does not work on Microsoft Edge
I tested the code on Chrome and it worked normally, someone knows what that is?? body{ background-image: url("blo.jpg"); background-position: center center; background-attachment: fixed;…
-
-3
votes1
answer82
viewsA: Would you like to take an element of a page, through its "coordinates"?
Don’t get it right, try to use document.getElementsByTagName("coloque uma tag html(div, p etc.)")…
-
4
votes1
answer850
viewsQ: How to put special characters with ::after?
Here’s the code, I want to put the character : h1::after{ content: © }…
-
0
votes2
answers50
viewsQ: How to make a script that generates a random background color on the site?
Here’s my code, I don’t know what’s wrong: var x = Math.random(); if (x < 0.5) { document.getElementsByTagName('body').style.backgroundColor = "lightgrey"; } else {…
-
-3
votes1
answer480
viewsQ: How to hide/show one div at a time with Javascript?
function show() { var x = document.getElementsByClassName('bla').style.display; if (x == "none") { document.getElementsByClassName('bla').style.display = "inline"; } else {…