Questions tagged as 'callback'

1
answer

Callback logic

I have a small problem and I would like an aid to understand and if possible an indication of the Srs to help this problem. Let's start, I currently have a loop, I'm doing it in a for something like the code below: for(var i = 0; i < 150...
asked by 30.05.2016 / 18:32
1
answer

Node js, promises, callback

I need to perform certain updates and delete within a return of a query in my controller. but only the last function is executed I do not think I understand how to use promises. api.adMaster = function (req, res) { var dados = req.bo...
asked by 01.09.2017 / 14:46
2
answers

How to remove level 1 keys using only one Callback method

I do not want to use foreach and for . For example, I have the following array structure: Array ( [0] => Array ( [0] => Array ( [id_usuario] => 1 )...
asked by 27.10.2015 / 20:24
1
answer

How to do is_unique of two fields?

I have a need that I do not know how to accomplish. Well, my problem: I have a is_unique field that refers to two fields in my DB, IDENTIFIER, and PLANT. Would you like to know how to perform this validation? For a single field I use...
asked by 10.07.2015 / 13:42
0
answers

Promises serve to replace the callback functions? [duplicate]

promises replace the callback functions ? Or are promises used only in asynchronous functions?     
asked by 03.07.2018 / 18:34
1
answer

Problem executing a query on a loop repeat in the Mssql Node

So, I am using node and mssql package (sql-server) to query my database. however I am facing a difficulty to return queries that need to be executed within a loop. Maybe it's something to do with the way I'm performing the callback. In...
asked by 21.08.2017 / 22:06
1
answer

Android SurfaceView Synchronous Creation

I created a subclass of SurfaceView to abstract canvas operations, such as drawBitmap (among others), as shown below: public class MyView extends SurfaceView { public MyView(Context c) { super(c); this.canvasHolder = this.ge...
asked by 10.12.2015 / 15:05
1
answer

Callback after moveCamera in Google Maps

I have a PageView that, in one of your Fragments, houses a MapView with a map in "Lite" mode. Clicking on this map launches a second activity ( startActivityForResult ) that is composed of a complete map, where it is possible to mark a cer...
asked by 04.03.2015 / 06:45
1
answer

How does callback work in PHP?

I was studying a bit of PHP until I came across this code: $this->form_validation->set_rules("nome", "nome", "required|min_length[5]|callback_nao_tenha_a_palavra_melhor"); public function nao_tenha_a_palavra_melhor($nome) { $posicao...
asked by 08.04.2016 / 23:05
2
answers

How to execute a callback when a CSS animation is closed?

I've seen angular-animate able to detect when a CSS transaction is in progress or not to take certain actions. I need to figure out how they do it! Example: #square{ background-color: tomato; height: 100px; width: 100px...
asked by 18.01.2018 / 16:49