Posts by Lenon S. De Paula • 349 points
22 posts
-
0
votes3
answers103
viewsA: Am I doing polymorphism the right way?
In addition, a reply I found in the book Design standards, Chapter 5, page 301, on Pattern Template Method, where the following is highlighted in the text: Or maybe my point of view is not so wrong,…
-
1
votes3
answers103
viewsQ: Am I doing polymorphism the right way?
I have a major sales class, and other subclasses that would inherit the sales class. I thought of using polymorphism, in addition to using common methods as inheritance, I thought of injecting…
-
1
votes2
answers52
viewsA: I cannot complete the push command, the command starts the execution but does not finish
I entered your git via link would not be master but main; $ git init $ git add * $ git commit -m "commit inicial" $ git remote add origin https://github.com/anthony-farias/projeto-dotnet.git $ git…
-
2
votes2
answers56
viewsA: Merge arrays and merge in php
Follows a solution. $resultado = []; $umDois = 1; foreach ($musica as $mIndex => $mValue) { $resultado[] = $mValue; $resultado[] = 'aviso' . $umDois; $umDois = $umDois == 1 ? 2 : 1; } echo…
phpanswered Lenon S. De Paula 349 -
0
votes1
answer24
viewsA: Autocomplete shows options but does not filter as typed
If you are not using any queries in the database, you can search directly in the PHP server-side array: Example: $input = preg_quote($valorDigitadoNoAutoComplete, '~'); $data =…
-
0
votes1
answer11
viewsA: Woocommerce - special field within the jquery and use split handlers
If selectors are classes would be in this example: var ex = parseFloat($('.price').val()) + (parseFloat($('.pa_custo').val()) / parseFloat($('.pa_qdy').val());
-
0
votes1
answer60
viewsA: Fill inputs after insertion via Jquery
You can build dynamically on the return of the request the inputs via jquery example: ........ success: function(result){ $('#insert_edit').empty() $('#nome_edit').val(result['nome_convenio'])…
-
0
votes1
answer35
viewsA: Create a table separating dates by quarter with React and Node
If the date records come sorted within each unit I imagine you can do this way: {Object.keys(unidades).map((unidade, i) => ( <TableRow className={classes.row} key={i}> <TableCell…
-
0
votes1
answer279
viewsA: Error executing npx command React-Native init
This is a problem in the node that is caused by the blank space in the user’s name between the name and the surname in Windows. execute the following command after replacing the name with the…
-
0
votes1
answer42
viewsA: How to recover ID in JQUERY
I tried this to get the id value, currently selected. $('#adms_grps_prod option:selected').attr('id')
-
0
votes1
answer39
viewsA: Add class in Javascript?
Hello, from what I understand you want instead of using a direct function in the element, create an event through the class. <input class="minhafuncao" type="text"> <script…
-
0
votes1
answer48
viewsA: Storage of Cookies and Requests with Cookies
1- An HTTP cookie (a web cookie or browser cookie) is usually used to identify whether two requests came from the same browser - by keeping a user logged in, for example. It stores dynamic…
-
0
votes1
answer85
viewsA: I no longer know how to give the deploy of the chat Rocket on Heroku. Help?
A classic root cause for this last message is: when Reset was initialized, but no confirmation was made If you haven’t added and committed yourself at least once, there won’t be a local affiliate…
-
0
votes1
answer49
viewsA: Help! Cookies and javascript for affiliate program creation
You can do this right in Javascript, when you render the document, take the link hash, and save the coockie. var url = "exemplo.com/afiliadoid?4312123"; var parametrosDaUrl = url.split("?")[1];…
-
1
votes1
answer241
viewsA: Yup: How to make a conditional rule?
Try this. const schema = Yup.object().shape({ login: Yup.string() .email('Email don"t valid') .required('Fill the email!'), password: Yup.string().when('userId', (user.hasOwnProperty('id'), field)…
-
1
votes1
answer70
viewsA: Modal Bootstrap - php | Jquery | Hidden
Hello, use cookie to store data in browser, https://www.w3schools.com/php/php_cookies.asp Example: if($stringReplace == date('m-d') && !isset($_COOKIE['aniversario']){ echo…
-
0
votes1
answer64
viewsA: Separate arrays in columns in an html table
I would have to understand why you store the "Cost Name" data in this way "a,b", it seems some modeling error, changing the Insert to individualize the cost name you would not have this problem. An…
-
1
votes2
answers35
viewsA: How to find out which of the id’s triggered a javascript function
Go to the click() function, and if you are using jquery example, $(this). val(); Inside the function, place a console.log to verify.
-
1
votes1
answer39
viewsA: Error in XML import
This declaring the variable $s as string, right after(line 126) trying to allocate as array 125 $s=""; 126 $s['codigo']=tagValue($item,"cProd"); Declare the $s variable as an array $s = [];…
-
0
votes2
answers124
viewsA: Error saving JSON via fopen, downloaded via Curl
Change the treatment to json_decode ne file writing. $caminhoArquivo = 'logs/'.$nomeDir.'/json-fornecedor-'.$hora.'.json'; $arquivo = fopen($caminhoArquivo, 'w+'); fwrite($arquivo,…
-
1
votes1
answer68
viewsA: Alert keeps popping up no matter what I do!
Remove the alert(res); ajax load, I don’t understand why I use the die, return a string, treat its return with the function success ajax.
-
3
votes3
answers140
viewsA: I can’t view all data with foreach in PHP with data from an API
Note that inside the foreach, there are two variables $data1 and $data2, they will store the last information that was iterated in the loop, as it is a simple variable. If you want to change the…