All Questions

2
answers

How do I return a given character from a text?

How do I return a particular character from a text? For example: text = "Eu sou vegano" How do I detect the 5th letter of text ? If someone helps me, I'll be grateful.     
asked on 19.12.2016 / 00:22
1
answer

When should I use __init__ in functions within classes?

From the book I'm studying, at times the author uses __init__ as being a first function of a class. This function (and others) always have self as one of the variables (something that I still do not understand why). When should (an...
asked on 19.01.2016 / 03:04
1
answer

Type Int8 in Swift does not store the maximum integer 255

Doing some play on the Playground, With Swift 2.2 we can declare constant let testeIntOitoBits: Int8 = 127 //maximo - deveria ser 255 let testeIntOitoBits2: UInt8 = 255 Why can not I store 255 in type Int8 and in type UInt8 yes?     
asked on 18.06.2016 / 01:36
3
answers

How to use the result of a select to mount another?

I've mounted a select that concatenates a String. I want to use the result of this select in another select SELECT * FROM (SELECT CONCAT('caminho da tabela') AS caminho FROM tabela) AS result Can you do it? How can I use it?     
asked on 06.01.2016 / 16:31
1
answer

How to prevent caching in Ajax requests in IE 6?

I have the following code to update a DIV on a page: var req; // FUNÇÃO BUSCA ROMANEIOS PARA EXIBIR NA TELA DE MENU. function buscarRomaneio() { // Verificando Browser if(window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if(wind...
asked on 23.08.2016 / 21:43
2
answers

When to use "inline"?

Everyone says that you do not have to use inline in the functions since the compiler knows what to do better than the programmer. But if it has in the language it should serve something. Is it useful in any case? When to use it then?...
asked on 14.02.2017 / 13:47
1
answer

Paging with large amount of data

Thinking about performance, what is the best way to page a large amount of data? I'm currently using a List<Produtos> , saving around 500 products in it, and using subList(min,max) , returns what I need. However, I think t...
asked on 27.04.2016 / 16:28
1
answer

Pros and cons of securing the contract of an interface through a subclass

This article presents a interface IList<T> containing Add(T item) and Count() methods. The interface contract expects that when an item is added, the Count() method reflects the new quantity of items in the li...
asked on 08.07.2016 / 22:16
2
answers

What is the Microsoft Bot Framework?

I was browsing the Microsoft Developer Network and previewed the Microsoft Bot Framework . I have two questions: What is Microsoft Bot Framework and what is it for? Actually the name is already very intuitive but I think it would b...
asked on 20.05.2016 / 21:32
2
answers

How to convert binary to decimal?

I had to do a huge equation to convert a binary number into a decimal. What is the best way to do such a conversion? For example 0011 1011 0101 = 949 At the suggestion of Jorge B., I am putting my conversion attempt, just for illustra...
asked on 15.09.2016 / 09:44