All Questions

1
answer

What is the purpose of an empty parenthesis in a Lambda declaration?

I created an example of a Lambda declaration with no arguments, however, I am in doubt about omission of the empty parenthesis () in the declaration. See the example: class Program { public delegate void MyDelegate(); static...
asked on 23.06.2016 / 00:34
1
answer

Get index backwards

Imagine I have the following string: string texto = "Stackoverflow em Português"; If I want to know the index of the first space, just: int index = texto.IndexOf(" "); But in this case I have two spaces, and I would like to get the ind...
asked on 18.11.2015 / 11:30
2
answers

Synchronous requests

I need to make requests, however the first must be GET (getByName) and then execute the rest because they depend on it. It turns out that my code is sending an undefined as the requests depend on the contactsUri that is defined in this...
asked on 23.07.2015 / 18:15
1
answer

Libraries, interface, classes and methods

What's the difference between libraries and interfaces? For example, in the line: import java.util.Scanner; Would util be the interface and Scanner of the class? Or would util be the library and Scanner would...
asked on 08.09.2015 / 14:43
1
answer

What's the difference between AppCompatActivity and Activity?

What's the difference between AppCompatActivity and Activity ? From which version did AppCompatActivity be added to Android ?
asked on 18.03.2016 / 11:04
3
answers

Is the finally block always executed in Java? [duplicate]

In this code there is a try / catch block with a return inside it. try { alguma_coisa(); return successo; } catch (Exception e) { return falha; } finally { System.out.println("Eu não sei se será possível...
asked on 24.08.2015 / 22:18
4
answers

What would be a good way to apply events: onMouseOver and onMouseOut, for all img tag?

I need this function to be automated so that it applies to all images made on the HTML document without any exception Code function aumenta(obj) { obj.height = obj.height * 2; obj.width = obj.width * 2; } function diminui(...
asked on 08.02.2017 / 18:28
2
answers

Is it a good practice to use summary for documentation?

Is this the best way to document code in C #? /// <summary> /// Descrição /// </summary>     
asked on 19.03.2014 / 20:19
5
answers

How to do with CSS a paragraph with capitular letter (Drop Caps)

I'd like to stylize only the first letter of each paragraph in my text, but I do not want to have to separate that letter with a <span> because I want to keep the correct semantics of the word, and not have to "break" with a tag....
asked on 31.10.2018 / 13:14
4
answers

How do I assign a value to an enum with binary notation?

To work with hexadecimal numbers, just add 0x in front of the number, like this: var numeroHexa = 0xff1120; The same goes for octal numbers, adding 0 : var numeroOct = 037; But how do you declare binary numbers? var nume...
asked on 23.04.2014 / 15:53