Posts by Jonathan Freitas • 134 points
7 posts
-
2
votes3
answers292
viewsA: Remove only numeric elements from an array
You can make use of the function unset php to remove the array elements, but before removing, you need to check if the element is a number, a numeric string, or just a string, for this you can use…
phpanswered Jonathan Freitas 134 -
3
votes2
answers325
viewsA: How to test the factorial in Main()?
Here is a recursive function and an iterative function, where both compute the factorial #include <stdio.h> #include <stdlib.h> int fatorialRecursivo(int n) { if(n < 0) { return -1; }…
-
4
votes2
answers2300
viewsA: Jquery, . val() does not take input text
Simply use: $('#contact-input').val(); Or $('.input-search-doc').val();
-
0
votes3
answers425
viewsA: Format CSS with PHP
Try using the scape character: \' Use the following code: <?php echo '<div value="6_1" style="background-image: url(\'../img/banner-product.png\')"></div>'; ?>…
-
1
votes2
answers105
viewsA: Parameters, functions in C
argc (argument Count) and argv (argument vector) are arguments that are passed from the command line to the main function in C and C++. argc is the amount of string sent by the command line and argv…
-
1
votes3
answers850
viewsA: Remove field Hidden jQuery
Here’s a simpler way to do that. If you don’t want to, add the value $value->int_cod in the class and not in the element id, because by adding the value $value->int_cod in the element id, you…
jqueryanswered Jonathan Freitas 134 -
0
votes3
answers1486
viewsA: Send form with ajax and return errors in a div
I always do like this: $.ajax({ method: 'POST', url: 'http://suaUrl.com', data: { nomeValor: 'Valor para enviar para o servidor', outroValor: 133434 }, success: function(data) { if(data.error === 1)…