All Questions

3
answers

What does "??! ??!" mean in C language?

I once saw a code in C with the following line: ... if (condicao1 ??!??! condicao2){ /* faca algo */ } ... What does "??! ??!" mean? in C language?     
asked on 04.02.2014 / 12:20
4
answers

Where should I put a JavaScript code in an HTML document?

Where JavaScript should be placed in an HTML document: in element <head> or <body> ? At the beginning or the end of each? Is there any performance difference or any other related to this?     
asked on 26.12.2013 / 18:18
1
answer

Is it possible to do an UPDATE with data from another table?

I know that it is possible to execute a INSERT with data from another table: INSERT INTO Tabela (Col01, Col02, Col03) SELECT Col01, Col02, Col03 FROM Outra_tabela WHERE Condicao = 'qualquer coisa' But I would like to do t...
asked on 08.12.2016 / 22:03
2
answers

Why using global variables is not a good practice?

I'm reading a JavaScript book called "JavaScript The Good Parts" and in it several times the author says that one should not use global variables because they are "evil". Why are they considered "evil"? What kind of problems can they cause?    ...
asked on 23.12.2013 / 21:57
4
answers

IF, ELSE IF, ELSE or IF IF IF. When to use, what's the difference?

It's a very basic question, but it intrigues me a lot. See the code below: var bola = "redonda"; if(bola == "comestivel") return comer(); if(bola == "liquida") return beber(); if(bola == "redonda") chutar(); Now see the same with if ,...
asked on 23.11.2014 / 01:18
3
answers

How to make case-insensitive comparisons in SQLite?

As there is an obsession with questions with accents, here's mine:) SQLite allows you to make direct comparisons or through like with any encoding / charset from byte to . It only allows comparisons to be made regardless of case...
asked on 09.01.2014 / 14:01
3
answers

Is there a difference between reporting the size of the loop condition or outside it?

If I have an array or collection in a Arraylist and need to traverse its elements, I occasionally need to make use of loop repetition. Ex: for(int i = 0; i < arrayList.size(); i++){ //iteração... } or in the case of a simple...
asked on 13.09.2016 / 15:45
14
answers

Determine if all digits are equal

Parameterized by a numeric value. For example, 888 or 546. And I have a function that returns a boolean true value if all numbers are equal or false if they are different. How do I proceed with the algorithm?     
asked on 23.10.2015 / 00:45
3
answers

How to use the current value of a variable in an inner function?

The following code "prints" 50 times the text "Message 50" in a textarea . for (var i = 0; i < 50; i++) { setTimeout(function() { textArea.value += 'Mensagem ' + i + '\n'; textArea.scrollTop = textArea.scrollHeig...
asked on 27.12.2013 / 14:47
7
answers

Should I use input type="submit" or button type="submit" in the forms?

I usually use <button type="submit"></button> , but I see in most forms the use of <input type="submit" /> , is there any difference? Which is the ideal?     
asked on 08.04.2014 / 21:26