All Questions

6
answers

Is it wrong to write byte of images in the database?

When should I make this direct recording at the bank? What are the situations? I know I can save the image path to the bank.     
asked on 11.04.2014 / 18:53
4
answers

What is dependency injection?

I've heard a lot about dependency injection. The question is: How, when and what to use?     
asked on 10.06.2014 / 15:47
5
answers

Is there any algorithm to check the validity of a RG number in Brazil using digits checkers?

Is there any algorithm to check the validity of a RG number in Brazil using digits checkers, as with the CPF? If so, what is this algorithm like?     
asked on 11.12.2013 / 18:27
4
answers

Why in PHP is the expression "2 + '6 apples'' equal to 8?

I found the example to be funny, but the question is valid in understanding why PHP behaves this way. When we make the sum shown below (an integer added to a string): $numero_macas = 2 + '6 maçãs'; The result is: 8 But in this case,...
asked on 14.08.2015 / 14:37
7
answers

What are lambda expressions? And what is the purpose of using them?

When I first started using LINQ I saw that I could use the famous lambda expressions . I even know that x => x * x is a lambda expression, but I could not explain to a colleague what they really are, and what the advantage is in us...
asked on 29.01.2014 / 18:36
3
answers

What's the difference between IEnumerable, IQueryable and List?

What is the difference between IEnumerable , IQueryable and List in .NET? When is it better to use one or the other? Why does ReSharper suggest changing the return of this function, for example, from List<T> : private Li...
asked on 27.05.2014 / 18:50
4
answers

How to compare Strings in Java?

The == operator says that the Strings are different, and they store the same literal value, see example: public class TesteString { public static void main(String[] args) { String str1 = "teste"; String str2 = "Otes...
asked on 03.02.2014 / 16:19
8
answers

How to format date in javascript?

I want to play the current date in an input, but in the "Brazilian" format dd / mm / yyyy. My code: var data = new Date(); dataFormatada = ????? $("#Data").val(dataFormatada);     
asked on 19.02.2014 / 18:54
5
answers

Regular expression to detect the credit card flag

I need the Regex to detect when the credit card banner is Hipercard, Aura and Elo. I already have regexes for Amex, Martercard, Diners Club, Visa, Discover and JCB: Visa: ^4[0-9]{12}(?:[0-9]{3}) Mastercard: ^5[1-5][0-9]{14} Amex: ^3[47][0-9...
asked on 01.02.2014 / 12:18
5
answers

How to check if an email really exists?

I made an email field for the user to register, and now I need a system that checks to see if this email exists. I need when the user enters their email a system to verify that it exists, if it even has that email. For example, the user types...
asked on 05.03.2014 / 01:05