All Questions

2
answers

How to validate a Brazilian civil name?

How to validate people's names in Brazilian Portuguese?     
asked on 07.01.2014 / 14:51
1
answer

What are the advantages and disadvantages between Apache and nginx?

I see a lot of people recommending nginx on Apache [HTTP Server], and I can well understand why the first event-driven it brings scalability advantages (ie low memory consumption under load heavy) over the process-based approach of the secon...
asked on 10.07.2014 / 18:01
3
answers

What's the difference between using Object.toString () and String.valueOf ()?

I was doing some tests and realized that using one or the other, the result ends up being the same. I made this code to exemplify: public class ParseToStringTest { public static void main(String[] args) { new ParseToStringTest().p...
asked on 29.05.2017 / 16:49
4
answers

Getters and Setters are obligatory or facilitators?

Lately I have read some Java books, but there is a part that makes me confused in this kind of accessor methods - gettters and setters. The question is: I'm forced to write in this type of methods, for example, getName () or just have to w...
asked on 24.09.2014 / 15:49
3
answers

Check if a table exists in the database

How to check if a table exists in the database before attempting to use it? <?php // define a tabela $table = 'banana'; // verificar se tabela "banana" existe aqui // $tableExists = ?? // executa consulta se existir if ($tableExists) {...
asked on 16.01.2014 / 14:11
2
answers

What is the difference between charset and collation in database?

Every time I create a database, I always come across these definitions and I do not really know the difference. I understand what is charset , but not collation .     
asked on 26.08.2014 / 16:16
6
answers

How to do SELECT with ORDER BY and different criteria?

How can I make a select with 2 "ORDER BY"? CATEGORY table: If I do a SELECT like this: select id,nome from CATEGORIA ORDER BY nome ASC MySQL returns the names in alphabetical order, but I need them to always return the id: 10...
asked on 20.06.2016 / 22:04
7
answers

How do I know if a variable is of type Number in JavaScript?

In javascript, because there is no declaration of variable types such as Integer , String , Boolean , etc., it is a difficult task to know what kind of value you are dealing with in a particular variable. / p> So, to make my...
asked on 04.02.2014 / 16:47
3
answers

Should I free up all allocated memory at the end of a program?

It is commonly accepted that when I allocate a block of memory I am responsible for releasing it. This is particularly true when programming based on RAII. However the following program works perfectly: int main() { int* ptr = new int[9999...
asked on 16.02.2014 / 15:49
5
answers

How to validate with regex a string containing only letters, blanks and letters with an accent?

I want to validate an input text for full name in order to accept only letters, blanks and accented letters.    Valid Formats:   Leandro Moreira   leandro moreira   Kézia Maria   kezia maria   Cabaço da silva   Cabaço da Silva This...
asked on 14.05.2014 / 00:05