import fractions
a = int(input())
b = 1 / a
b = fractions.Fraction(b)
print(b)
This is part of a code I'm developing. This part had the function of taking the decimal resulting from the division "1 / a" and transforming it into fraction and ap...
What is the best practice for working with selectors in css?
Use
.menu li { }
ou
.item {}
.menu .item { }
ou
.menu-item { } //aqui usamos para atribuir propriedades para as <li> por exemplo
What would be the best practice for thi...
I'm trying to manipulate a file in Byte with Java.
In writing the file I have the following code:
FileOutputStream fos = new FileOutputStream("files\Produtos.dat",true);
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(P);...
I have the following <select> :
<select id="multiselect" multiple="multiple">
<option value="pedra">Pedra</option>
<option value="papel">Papel</option>
<option value="tesoura">Tesoura</o...
Suppose the following data.frame :
set.seed(1)
dados <- data.frame(y=rnorm(100), x1=rnorm(100), x2=rnorm(100), x3=rnorm(100), x4=rnorm(100))
If I want to run a regression of y against x1 ... xn , I can do it as fol...
If I have a ArrayList<Integer> listInt for example, suppose that ArrayList has:
int a, int b, int c; //a = 2 b=3 c=4
and then I change the value of a , b and c eg to a=1 b=2 c=3
Because I ha...
I recently had a problem with Unknow type name 'Class' because I was doing import in the header of 2 classes. I discovered that this is a classic headers error importing headers .
I was directed to change the import of on...
Information: I would like to know how to do Agendamento of an event, ie any function I would pass as a parameter, which would execute such dia tal mês : ano that I would also pass as a parameter.
Example:
agenda...
I have the image below that shows a form HTML .
IwantedtomakethiseffectintheformbutIcouldnot.Cananyonehelpme?Followmyattempt.
body {
font-family: 'Roboto', sans-serif;
background-color: rgb(40, 22, 111);
}
.logon {
position:...
I have a code that is basically like this:
<input type="text" value="" onfocus="myFunction(this);" onblur="alert('1');">
<script>
function myFunction(obj) {
obj.onblur = function() {
alert("2");
};
}
</script...