All Questions

1
answer

How does "umask" work in PHP and when should we use it?

I was reading umask documentation and came across this:    When PHP is being used as a server module, the umask is restored when each request is finished.       Translating: When PHP is being used in a server module, umask is rest...
asked on 31.08.2018 / 18:30
1
answer

Exceptions cause performance problem?

When working on an application whose performance is important, we recommend NOT USE exceptions . With this comes the question " what makes exceptions so much for performance? " In practical terms what is the need to use noexcept in...
asked on 03.10.2018 / 14:33
2
answers

For what is a TXT (TXT record) entry in a domain?

Generally, the TXT (TXT record) entry is used when setting up a domain to point to an e-mail server. I'd like to know what the goal of TXT is. What is a TXT entry? How do I read the TXT setting for a given...
asked on 21.06.2018 / 20:37
1
answer

Should I avoid operations between constants in a loop?

In C ++ is there any sort of optimization or caching that prevents the same mathematical operation between constants from being repeated, especially in loops , thus decreasing application performance? For example: for (int i=0; i<=100;...
asked on 23.04.2018 / 00:56
1
answer

What is the need to use the suffix "f" in a numeric constant in C?

Is it necessary to add f to a float value within the parameters of a if ? Example: if (a == 2.5f && a > 2.0f) {}     
asked on 28.08.2018 / 17:41
1
answer

How do I delete a file from all commits?

On my first commit I sent a binary file that has no reason to stay. And I sent a configuration file with real passwords. I changed the password to a fake, I deleted the binary, but if I go back to an old commit the data is still there. I did...
asked on 13.06.2018 / 19:48
2
answers

How to initialize an array in Kotlin?

I need to initialize an array in Kotlin but I do not know how to do it, in Java I did so: int numeros[] = new int[] {0,1,3,4,5,6,7,8,9};     
asked on 19.04.2018 / 21:58
1
answer

How to filter separated dates by day, month and year in MySQL

Hello, I have a table "Meetings" in MySQL with the following structure:    id: Int (11), subject: String (40), day: String (2), month: String (2),   year: String (4), active: String (2) Save in the field day the day of the meeting, mes th...
asked on 23.03.2016 / 04:22
1
answer

My factorial function does not return the expected value! C language

My teacher is starting to go through functions, and asked us to do a factorial function of a number, but it always returns the wrong value and I do not know what happens. Code: int fatorial(int n) { int ans = 1; while(n>1){ ans*=n;...
asked on 26.08.2018 / 18:39
1
answer

Why is it recommended to use "sp" instead of "dp" in text sizes?

Given that when we use the drive sp in TextView a warning always appears like this:    Should use "sp" instead of "dp" for text sizes This SOpt response shows exactly the difference between units of measure: Doubt over px,...
asked on 21.09.2016 / 20:04