Posts by Max Porcento • 157 points
17 posts
-
0
votes0
answers28
viewsQ: Nested return in PHP
public function form($request) { $cadastro = $this->cadastrar(['cpf' => $request['cpf'], 'nome' => $request['nome']]); if ($cadastro) { echo 'CPF cadastrado com sucesso'; } else { echo…
phpasked Max Porcento 157 -
1
votes0
answers32
viewsQ: Mysql has Gone away when running 'DELETE' using PHP connection
When I run the SQL statement delete from proposta_envio_fisico WHERE idProposta = 209940, my Mysql connection is disabled (mysql has Gone away) after 40 seconds. When monitoring the execution of…
-
0
votes0
answers45
viewsQ: How to use cursor() with associated data in Laravel?
$arrayCarros = []; $model = new Carros(); $carros = $model->with('montadoras')->cursor(); foreach($carros as $carros) { array_push($arrayCarros, $carro->toArray()); } Running the above…
-
2
votes1
answer3484
viewsQ: Console.log displaying all array data
When I run the javascript code below: var dados = Array(); for (var i = 0; i < 2; ++i) { dados.push({index: i}); console.log(dados); } The browser console output for the first interaction will…
-
0
votes2
answers1691
viewsQ: How to prevent a form from being reloaded when updating your browser page?
I have a form with the following structure below: <?php //Lógica em php.... ?> <html> ..... <form method="post" action=""> ..... <input type="submit"> ..... By clicking the…
-
2
votes1
answer48
viewsQ: SQL with data associated with Laravel?
I have the following tables listed below Products id product value validity Consultation id user_id Consults_products id query product Whenever a user performs a query, the history is saved in the…
-
0
votes0
answers163
viewsQ: Format all Date objects in Cakephp 3
In my database I have some fields with the Date type. Therefore the data is stored in the format '2016-01-23'. However, when I retrieve this data to display it in the VIEW, it appears in the format…
-
0
votes1
answer438
viewsQ: Inserting duplicate data into Javascript Array (push)
I found a certain problem in a code snippet that I was developing. Suspicious that the problem could be in some other part of the project, I decided to create a smaller test environment (with…
javascriptasked Max Porcento 157 -
4
votes0
answers44
viewsQ: Remote Video Stop - Webrtc
It is possible to control the audio and video of all users in a conference system (Rtcmulticonnection)?
webrtcasked Max Porcento 157 -
1
votes1
answer73
viewsQ: WEBRTC - Socket Node.js
I am developing an application using the following socket system (Using Firebase) for communication: openSocket: function(config) { var channel = config.channel || location.href.replace(…
-
3
votes4
answers1255
viewsQ: Index returning -1 in Java Arraylist
Good morning. For study purposes, I am making a simple application in Java RMI that simulates some operations (create account, check balance, debit etc.) on one or more accounts. For each account I…
-
0
votes1
answer141
viewsA: Save Data Associated with Cakephp 3
The error was in the "date". I was missing pass the (s) id(s) of the "products" table. Instead of going through: { "nome_cliente": "João", "produto": "maça" } I should pass: { "nome_cliente":…
cakephpanswered Max Porcento 157 -
1
votes1
answer141
viewsQ: Save Data Associated with Cakephp 3
Good afternoon. I am trying to save associated data in Cakephp 3. For this I have created three tables: sales(id, customer name), products(id, product) and sales(id, products_id, sales_id). On sale…
cakephpasked Max Porcento 157 -
0
votes0
answers468
viewsQ: invalid stream header: 00000000
Good evening. I am trying to read all the files from a directory on one machine (client) and send to another machine (server) using Java Socket. However, at the end of the transfer I get the…
-
0
votes2
answers54
viewsA: Error converting to vector (->toArray()) in Cakephp
First of all I would like to thank @Danielomine again, who is helping me here at Stack Overflow. And I would like to apologize, because I accidentally posted the code already with the solution of…
cakephpanswered Max Porcento 157 -
0
votes2
answers54
viewsQ: Error converting to vector (->toArray()) in Cakephp
Good night. I’m creating a file function 'src/Model/Table/ProdutosTable.php', using version 3 of Cakephp. The function must return information in a vector of a list of products according to the date…
cakephpasked Max Porcento 157 -
0
votes1
answer57
viewsQ: MAX and MIN functions in Cakephp 3
I am trying to perform a database search that returns the lowest and highest value of the 'time' (time) field using the following code in Cakephp 3: $pedidos = TableRegistry::get('Pedidos');…
cakephp-3asked Max Porcento 157