Questions tagged as 'return'

1
answer

What is the "return" JavaScript function for?

One of the functions I hate the most is "return" because I do not understand what it does or does not do, I'll give you an example: var quarter = function(number){ number / 4; } if (quarter(12) % 3 === 0 ) { console.log("A declaração é verda...
asked by 19.06.2016 / 23:44
2
answers

Do RETURN when the function is finished

How do I return to alert("SUCESSO") as soon as I drop into return alert("ELSE"); ? sincronizar: function () { sincronizarCliente().then(function () { alert("SUCESSO"); }, function () { alert("SEM SUCESSO");...
asked by 12.04.2016 / 15:06
2
answers

How to return the page in LARAVEL 5.4

I have a problem, I have 4 table, Courses, subjects, teachers and templates, each with a page for you, when I change or delete something in disciplines, teachers I return to page courses, I want to return to the page itself. I'm using laravel...
asked by 03.04.2018 / 15:02
1
answer

Return entire page via cURL

I need to return a page that is in text / html , but it is encoded with zlib , yes I tried to decode but no chances, http://php.net/manual/pt_BR/function.zlib-decode.php">zlib_decode , is not documented so I did searches but everything without...
asked by 03.01.2018 / 21:50
1
answer

Dictionary as input argument is being modified within function

In the code below the dictionary used as input argument is also being modified by the function. Do I have to% always%? def muda(a): a['valor'] = 50 return a dic1 = {'valor': 12} dic2 = muda(dic1) print(dic1) {'valor': 50} print(dic2)...
asked by 05.10.2017 / 02:46
2
answers

Return 2 values in a foreach

I would like to return two values in a foreach , can you help me? For Each item In Funcao() teste1 = gostaria de pegar aqui o resultado 1 teste2 = gostaria de pegar aqui o resultado 2 Next Private Function Funcao...
asked by 04.09.2017 / 21:35
1
answer

Return of asynchronous methods javascript

I would like to save the return of an asynchronous function. The function is as follows: cb.tabela(serie).then(function(tabela) { console.log(tabela); }, function(err){ console.log(err); }); What I wanted was to be able to do someth...
asked by 15.09.2017 / 01:53
1
answer

Convert String Json CSS Inline to an array or json with PHP

I have a database in json and inside it there is a style object in which it has an inline css code, such as: "padding: 90px 0px 20px 0px; background: # 000000; display: block;" Let's say the return would be: { "style" : "padding: 90px 0p...
asked by 02.06.2017 / 16:32
3
answers

return fetch_object ()

My script is a function (query.php) that does a query in the mysql database and with the while I go through all the contents of the object ($ qr = $ query-> fetch_object ())) If I give a print_r here inside I can see all the data but when I try...
asked by 06.04.2016 / 22:08
2
answers

How to use function return in Scilab or MatLab?

I'm doing a simple numerical program. But I can not use return of functions in Scilab can anyone help me? The function has to solve a calculation and then return the value for this variable to continue to be manipulated by the program....
asked by 11.06.2015 / 13:03