All Questions

2
answers

How and when should we use Interface to document systems in PHP?

I've always wanted to know exactly, if it's a good practice, to make a system always using Interfaces, or is it not necessary? Interface People { public function getName(); public function setName($string); public function getAge(); pu...
asked on 26.11.2015 / 12:45
2
answers

What is FastExpando / FastExpandoObject?

I was reading about Dapper and came across a feature of it called FastExpando or FastExpandoObject , I did not understand very well and I had some doubts about this feature. Questions What is FastExpando / FastExpandoObject? What i...
asked on 01.02.2017 / 03:01
2
answers

What is the difference, in practice, between Session and Application?

I'm studying about Web Technologies , and during my class a topic about concepts involving Session and Application came up. The technology covered during class was C# . I did not quite understand the differences between them...
asked on 27.11.2015 / 16:35
2
answers

Imperative and Declarative Paradigm

What are the differences between imperative and declarative programming paradigms? Advantages and disadvantages?     
asked on 21.08.2015 / 17:02
1
answer

What is Maven for?

I often find large projects that have the pom.xml file, but I never understood the utility of it, I just discovered that it is something related to maven. Anyway: What is Maven for? What is the pom.xml file for?
asked on 20.04.2015 / 05:19
2
answers

What is the question mark in a query?

Does%% use of a query really prevent SQL injection ? Avoid 100%? I saw this code and I heard lots of people talking about it, saying it helps in this case and how to use it? Could someone give a better example? $query = "SELECT * FROM tabel...
asked on 26.06.2014 / 23:18
4
answers

Contest question: logic error and semantic error?

I participated in a contest and fell the following question:    33 - Analyze the algorithm and tick the correct option for this algorithm. Calculation_Media Algorithm: Var N1, N2, MEDIA: Inteiro Início Leia N1, N2 MEDIA ← (N1 + N2)...
asked on 18.01.2016 / 16:51
2
answers

What's the difference between using (int) variable or Convert.ToInt32 (variable)?

What's the difference between them? When is it best to use one or the other? Examples: string palavra = "10"; var numero = Convert.ToInt32(palavra); // ou (int)palavra ? string palavra2 = "10.50"; var numero2 = (double)palavra2; // ou Conv...
asked on 06.10.2015 / 15:39
1
answer

What is the purpose of the RESTRICT, CASCADE, SET NULL, and NO ACTION options?

When I'm going to create a foreign key type relationship between two tables in MySQL, I can specify some additional options in the ON UPDATE and ON DELETE events that are associated with the change and deleting records. The options are:...
asked on 09.06.2017 / 19:16
2
answers

What is the problem of queries N + 1?

Whenever we work with some ORM, it is common to fall into the queries N + 1 problem. It's something about performance, called up to antipattern . But what is really this problem, why it happens, what are its main causes and how, in theory,...
asked on 15.06.2018 / 05:00