All Questions

1
answer

Why fractions.Fraction (1/3) does not return "1/3"?

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...
asked on 03.01.2019 / 18:45
2
answers

Good practice with selectors in css

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...
asked on 19.03.2014 / 18:23
2
answers

ObjectOutputStream only saves the first object

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);...
asked on 08.02.2014 / 03:30
3
answers

Get the value of the "option" that was clicked to either select / deselect

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...
asked on 11.02.2014 / 15:50
3
answers

How to select all data.frame variables at once for a regression?

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...
asked on 19.02.2014 / 14:37
2
answers

Change nodes ArrayList

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...
asked on 08.02.2014 / 06:48
3
answers

Composition: use @class or #import?

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...
asked on 03.02.2014 / 15:08
1
answer

How to schedule a Javascript event?

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...
asked on 11.02.2014 / 18:51
1
answer

Mounting CSS from Image

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:...
asked on 02.01.2019 / 11:39
3
answers

How to add an onBlur event without overwriting the original?

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...
asked on 14.03.2014 / 14:13