All Questions

4
answers

I can not disable a checkbox with enable = false

In certain situations, I need to enable or disable a checkbox. I made a function in JavaScript and I can not enable / disable it. Here is the function: function ValidaCampoInserirAutorizacao(){ var vTussMed = document.getElementById('...
asked on 05.01.2017 / 19:44
7
answers

How to insert data in DB with jQuery / Javascript without using PHP?

I'm learning Javascript and jQuery and am wanting to make a small website to test the insertion of data into a database. I have no knowledge in PHP, I would like to know if it is possible to insert data into a database only with Javascript or jQ...
asked on 30.01.2014 / 00:24
4
answers

Trying to condense conditional with three possibilities

The problem is to present a result by flexing to the plural if necessary, or "none": Let ni 1 always responds "1 item". The idea is to condense an if, else if, else into a line, but not if it is possible, since the logic seems correct. Is...
asked on 03.12.2014 / 01:25
6
answers

How do I know which is the last element in a list?

I am doing a dynamic sql query, in which I use lists, my problem is, how to know which last element of this list Follow the code you have made so far: List<string> campos = new List<string>(); campos.Add("id"); campos.Add("desc...
asked on 25.06.2015 / 15:42
2
answers

How to use Traits in PHP?

I'm creating namespaces for my traits and using them directly, without using them within a specific class, for example: OBS: The code below is just an example. namespace Decrypt; trait Rc4 { public function nome() { retu...
asked on 10.07.2017 / 13:58
3
answers

_ (underline) in consultation with LIKE

I'm doing a query where I need to return all the information in a given table, which contains " _R _ " in the nomenclature. However, when using WHERE NM_CAMPAIGN LIKE '%_R_%' it returns me to other cases that only have " R _ ". How...
asked on 16.08.2017 / 14:55
2
answers

Which loop is faster for or foreach in C #?

I've read articles from some programming languages that the for loop is faster than the foreach , and was wondering if C # has performance differences? >     
asked on 12.10.2016 / 23:21
4
answers

After all, why does not the PHP source code appear in the browser?

Well, I know that PHP is an HTML preprocessor, I know it's interpreted by PHP and it's rendered on the page but the source code does not appear. But is it really safe? I know it's possible to capture the results of the page, but I do not know to...
asked on 02.03.2018 / 13:36
4
answers

How to sort an array of objects with array.sort ()

How would I specify for the array.sort(); method how is the sort order? For example, I have an array of person objects, and person has name and number I wanted to sort by name. How would I specify this for my sort method?     
asked on 12.01.2015 / 19:41
4
answers

Equivalent to the conditional or ternary operator in Kotlin

Below I'm logging into the Android Studio in JAVA a short phrase using conditional or ternary operator ( ?) in . See: Log.wtf(GOT, (valirianSteel == 0 && glassOfDragon==0) ? "Run!" : "Run too!"); What would be equivalent to the...
asked on 10.08.2017 / 17:05