All Questions

5
answers

How to use ajax and php to call a function in php?

I'm having trouble requesting a PHP function via Ajax AJAX Code: $.ajax({ url: 'geraSenhaProvisoria.php', type: 'POST', cache: false, data: {geraSenha(6, true, true, true)}, error: function() { alert('Erro ao t...
asked on 04.02.2015 / 12:24
2
answers

Good practices in declaration of variables in a for

Lately I've been using Resharper and I've enjoyed the experience of using it, but something has intrigued me. At times it suggests that certain variables be declared within some scopes, as in the example below: var a = 0; for(var i = 0; i&...
asked on 08.12.2016 / 12:34
2
answers

What does it mean - in R?

What does the <<- operator in R mean, what are their differences from <- , and under what circumstances can it be useful?     
asked on 22.09.2014 / 04:01
8
answers

Check if variable contains a well-formatted e-mail address in PHP

The variable receives a value that is supposed to be an email address, but the doubts arise: Will it be an email address, a random text, or something else? Being an email address, is it well formatted? Assuming a valida_email() f...
asked on 05.03.2014 / 18:24
3
answers

How to return key of object with greater value in Javascript?

Let's say I have the following object: var obj = {"frutas": 50, "vegetais": 100, "carnes": 150 }; How would I be able to return the key of the highest value item? Example: obj.maxKey(); // "carnes" I have tried some functions that trea...
asked on 16.03.2015 / 20:57
2
answers

Object declaration in Javascript

function List(){ this.listSize = 0; this.pos = 0; this.dataStore = []; }; Can I consider this code snippet as creating a List object?     
asked on 21.05.2015 / 00:29
1
answer

Javac is not recognized as internal or external command [closed]

I'm trying to compile a class in java via the command line (cmd), however I can not, the error shown is:    'java is not recognized as an internal or external command, operable program or batch file. Image of the prompt with the error:...
asked on 12.09.2015 / 20:47
1
answer

How to show an element for a few seconds and then hide it?

How can I report a visible : true per time? I want it to be true only for a few seconds then return to false .     
asked on 29.08.2015 / 21:46
1
answer

What are the advantages of using a Generator (yield) in PHP?

Since PHP 5.5 was implemented in the Generator language. It can be used inside a function from the keyword yield . In the Manual , we have an example where one is compared to the function range(0, 1000000) (which theoretically...
asked on 10.02.2015 / 18:27
3
answers

How to enable and disable fields when clicking button

I have a page made with bootstrap 3 where I show some fields coming from my DB, now when opening the page I need all fields except for a Iniciar Tarefa to be disabled, the Iniciar Tarefa button will be responsible for enabling the...
asked on 01.04.2015 / 20:10