All Questions

1
answer

What is the most performative way of converting an int to the sum of its digits?

I have a certain int and would like to turn it into another one that is the result of summing your digits in the best possible way. For example: int n = 2601; Should result in 9 since this is the result of 2+6+0+1 . What...
asked on 27.11.2017 / 05:50
1
answer

How to change the font in a chart in R?

I want to use use the font Times New Roman in the chart, but the R / rstudio returns an error message saying can not find it. Obviously the font is somewhere because I use it in MS Word , for example. Some time ago the following command...
asked on 03.12.2017 / 22:34
1
answer

EFD-Reinf: Invalid signature - Failed to verify XML document signature (using C #)

Good afternoon, has anyone managed to sign the EFD-Reinf event using C #? I am sending the signed event and it is returning the following occurrence: { <?xml version=""1.0"" encoding=""utf-8""?> <dadosRegistroOcorrenciaEvento>...
asked on 22.12.2017 / 17:57
1
answer

How to use more than two types in function parameters?

Suppose the following function in PHP: function parse (string $text, array $callback) { # ... } In theory, the parameter $callback must be an array , but can also be accepted as string . How do I accept both arrays and str...
asked on 29.12.2017 / 22:07
1
answer

How to find out the file extension through the Bytes array?

I wonder if it is possible to give a get in the file extension through the Bytes Array. Well, I downloaded a file from the server, and it can be either .JPEG or .EPS, but I'm not able to know what file I got and I can not set the MIME / Extensio...
asked on 26.12.2017 / 17:30
1
answer

Organize a time series

I have a base with information collected on weight gain per animal. They were collected at different intervals for each animal. Follow part of the base just below Animal Dia Ganho 5 2 0.99 5 9 1.01 5 16 1.03 5 23 1.08 5 30 1.08 5 37...
asked on 27.11.2017 / 10:07
1
answer

Optimize factorial calculation using vector

Issue statement:    Read an array A of the vector type with 5 integer numeric elements.   Construct a matrix B of the same type, each element of matrix B being the factorial of the corresponding element of matrix A.   Display the elements of...
asked on 10.12.2017 / 20:43
1
answer

Height of the div is greater than the height of the image. Because?

I have the following pure HTML, without CSS <div> <img src="_img/_banner/banner1.jpg" /> </div> The banner1.jpg image has 300px height and div has not been set. Looking at inspector to imagem...
asked on 16.11.2017 / 12:31
1
answer

Why normalized schemes up to 3FN do not have N: N?

Explanation of concept I understand that by definition a database schema is in 3FN , when it is in 1FN, 2FN and does not have transitive dependency. Transitive dependency is when a NOT attribute depends on a / strong> key. Examp...
asked on 02.11.2017 / 15:45
1
answer

How to read a list of serialized objects saved in a file in java? [duplicate]

I was looking to work with serialization in java files and read this tutorial on how to write the object in the file and this one on the how to read the file object Then I created the following class that saves the Adreess object in the...
asked on 17.10.2017 / 00:53