All Questions

4
answers

How to apply readonly in a select?

I think most here know the difference between readonly and disabled . Select Readonly readonly does not apply correctly to select <select name="field" readonly="readonly"> <option value=""...
asked on 12.05.2016 / 19:43
3
answers

What is boilerplate code?

I have noticed the frequent use of the term in some forums and I was wondering what its meaning was and where it came from.     
asked on 26.03.2014 / 06:03
4
answers

How to check if an image exists on a remote URL?

In order to be able to administer a website from a server other than the one on which the website is hosted, the problem of dealing with remote images has arisen. Common problems: Verify that the image actually exists before creating link...
asked on 10.01.2014 / 00:17
2
answers

What is MVP and MVVM?

It is very common to talk about the MVC (Model-View-Controller) standard. But the acronyms MVP (Model-View-Presenter) and MVVM (Model-View-View-Model) are little mentioned. What are they and what is their relationship with MVC?     
asked on 16.06.2014 / 17:59
5
answers

What is the difference between string vs string?

I'd like to know what the actual difference is between String (upper case s) and string (lowercase s). Apparently the two have the same goals, but which one is "better" to use?     
asked on 01.02.2014 / 11:31
2
answers

Why use WHERE 1 = 1 in a SQL query?

During the maintenance of a legacy system I noticed the following procedure : DECLARE @sql AS varchar(MAX); DECLARE @param as varchar(50); SET @sql = 'SELECT * FROM Destinatario where 1 = 1'; IF(@param IS NOT NULL) SET @sql = (@sql + '...
asked on 10.04.2014 / 18:53
6
answers

Use a semicolon at the end of lines in javascript?

I've read some web comments about whether or not to use ; at the end of the lines when writing JavaScript. Some say yes, others say they have no need, but none can explain the reasons for the divergences. Example: var ola = "Olá"; //...
asked on 31.01.2014 / 01:18
3
answers

Why use getElementById if the id is in the window?

Recently in my study I noticed an object that manipulated the DOM of the element that had the same name in its id . teste.style.border = '1px solid #CCC'; teste.style.width = '500px'; teste.style.height = '50px'; <div id="teste">...
asked on 13.04.2016 / 14:23
2
answers

Why green = blue + yellow, but in RGB yellow = green and red?

Why does color formation in RGB does not follow the same pattern as nature, and does it work anyway? For example: In RGB, yellow = red and green: # FF0000 + # 00FF00 = # FFFF00. But if we take a yellow and a blue colored pencil (or paint,...
asked on 06.06.2014 / 00:01
6
answers

Using many interfaces is a bad programming practice?

I'm a student in Information Systems and I'm modeling a game, a virtual pet that has its needs and talks with its owner, below follows the modeling of classes and interfaces. I showed it to a friend in Computer Science, he thought it had a lo...
asked on 09.07.2014 / 16:23