Posts by gabrielfalieri • 1,231 points
132 posts
-
1
votes3
answers60
viewsQ: Arrendondamento of javascript values
I would like to make a "rounding" of values within javascript. I know the function Math.Round() round, but only decimal, I need the following situations. 1 - From 10 to 10... If the user type 155,…
javascriptasked gabrielfalieri 1,231 -
0
votes1
answer928
viewsA: Check checkbox only when checked
$("#SavePaper").click(function(e) { if($(this).is(':checked')){ if ( $("input[type='radio'][name='Licenciamentodeusuários']").is(':checked') ){ valor =…
-
2
votes1
answer928
viewsQ: Check checkbox only when checked
I am checking a check box to see if you have a type="radio" selected. The problem that check is running the calculation even when I uncheck the check box. I did the following test to see what was…
-
0
votes2
answers275
viewsA: Disable bootstrap modal
The solution was to change: $("#dtTarget").attr('target', '#termosContrato'); for: $("#dtTarget").attr('data-target', '#termosContrato');…
-
-1
votes2
answers275
viewsQ: Disable bootstrap modal
I am trying to disable a bootstrap modal. I need it to start by default on the disabled page, not calling the bootstrap modal, then be activated by selecting an option. Well, I’ve tried some…
-
0
votes1
answer141
viewsQ: How to disable a link that is calling a modal bootstrap?
I’m trying to make a <a href> not call a modal of the Bootstrap. <div class="row"> <div class="col-md-6"> <div class="form-group"> <div class="md-checkbox-list…
-
0
votes1
answer1479
viewsA: PHP 7 - Logged in user(AD) and hostname
Try doing by running the following command. <?php $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); echo $hostname; ?> Testing it worked perfectly, I understood what I understood what you…
-
0
votes1
answer139
viewsQ: Error in the past
I created this procedure to test whether a field exists in a database, if it does not exist, the procedure would create. DELIMITER || CREATE PROCEDURE sp_verificarLinhas(IN colunas VARCHAR(50))…
-
0
votes2
answers97
viewsQ: How to take content from a div with the same class?
I think the title is quite self-explanatory but come on, I have a return of a json that comes from an sql, which can give me the following situation <div class="conteudo-select" style="display:…
jqueryasked gabrielfalieri 1,231 -
1
votes1
answer34
viewsQ: Request not working in firefox
I’m making an Ajax request, where it works on Chrome perfectly but firefox does not work. He tells me that Event is not defined function pegarValor() { dado = event.srcElement.innerText; var XMLHttp…
-
2
votes0
answers329
viewsQ: correct sql query does not work in php
I have a query, where this query works perfectly in mysql Workbench, but in php does not work. $dados = explode("-",$ids); $sql = "SELECT prt_produto_item.nome as nome_item,…
-
1
votes1
answer34
viewsQ: Stop running a particular php snippet
I am in need of stopping the functioning of a particular chunk of code. Exit, how die, stops the whole foreach code block. I just need it to stop inside the if, but keep running the foreach, then go…
-
1
votes0
answers259
viewsQ: Pick up a php array after an ajax request
I’m having to make an ajax request, which returns more than one value and as soon as I click on that value, another ajax request would be executed. It turns out that to make this request, I send to…
-
5
votes2
answers354
viewsQ: Why does max not even min return the expected value?
I need to take the highest and lowest value of a given field to be able to make a filter, only SELECT MAX or MIN does not work. As you can see in the image below, I need this amount of users Table…
-
0
votes3
answers64
viewsQ: Grab piece of text in php
I have a return of any error in php, for example. QLSTATE[23000]: Integrity Constraint Violation: 1062 Duplicate entry I wish I could get that specific code in case the 1062, recalling that the…
phpasked gabrielfalieri 1,231 -
0
votes2
answers560
viewsA: accentuation problem when saved in the database
Fixed problem, the error was when I tried to send the data with utf8_encode, since I had passed everything to utf8
-
1
votes2
answers560
viewsQ: accentuation problem when saved in the database
There’s a problem with me, when I save a value in the database, it saves without accentuation. All my code on the page is utf8, all my database is utf8, the tables are utf8 and where does the Insert…
-
2
votes2
answers363
viewsQ: how to find if it contains text inside a javascript array
I created two arrays, one with questions and the other with answers. Follows the model. perguntas[0] = "que sao dinossauros"; respostas[0] = ["Constituem um grupo de diversos animais membros do…
javascriptasked gabrielfalieri 1,231 -
1
votes1
answer141
viewsQ: Filter does not work because of return accentuation problem, what to do?
I am working with datatables and php, so server side. I have been making custom filters with it, everything working ok, with a save exception, the words that have accentuation, does not work in the…
-
0
votes2
answers244
viewsQ: query sql does not work
My system is generating a query from a filter. All query that I use in a given field do not find anything, as simple as the query down. select * from prt_license WHERE organization_type =…
-
4
votes4
answers2570
viewsQ: How to take the penultimate and antipenultímo item from an array
I have a array that comes from a return of a form and would like to know how to get the penultimate and antepenultimate position of the same in PHP.
phpasked gabrielfalieri 1,231 -
1
votes1
answer2149
viewsQ: Error Delimiter must not be alphanumeric or backslash
Good afternoon, stackoverflow crew. Is there a date in an array? I’ve been trying, using it like this: for($i = 0; $i < count($array); $i++){ if(preg_match( "\d{1,2}/\d{1,2}/\d{4}$" , $array[$i]…
-
0
votes1
answer40
viewsQ: Generate sql from a js return
Good morning, stack overflow. It’s been a while since I’ve been hammering to look for a solution to a problem that came up, that nothing comes to mind. I have a form, where this form will make a…
-
0
votes0
answers265
viewsQ: how to get the return of an array sent by a datatable ajax?
I am using the datatables to show my table data... and in it I need to make some simultaneous custom filters. I basically until then, I’m sending the requisition in the following way:…
-
0
votes0
answers33
viewsQ: Value sent to the database becomes zero after sql return
Good afternoon stack overflow. I have the following situation. I need to calculate the amount of days a status takes to change. For example, the registration of my partner is with the status of…
-
0
votes0
answers20
viewsQ: Php data Insert error
I’m trying to insert date into a php record, only it’s presenting an error, which I imagine is quite simple, but it’s taking me a precious little time. I’ve tried to put date('Y-m-d H:i:s',…
-
3
votes1
answer186
viewsQ: Datatables processes only one request
So I’m making a system of custom selects with the datatable, only the request only processes once. Example of my php, js and html <div class="input-group has-feedback" id="divCidade"> <div…
-
3
votes1
answer1227
viewsQ: Get the previous record of a date
I need to make a query, where I need to get the penultimate record, IE, the previous record and the date also. SELECT DISTINCT prt_partner.razao_social, prt_partner.end_cidade,…
-
2
votes1
answer101
viewsQ: Split whole text into javascript pieces
Good afternoon, stackoverflow guys I need to share the text I get from an ajax return. That my return has the following pattern It starts with what will be value, the rest will be the content of an…
-
0
votes2
answers368
viewsQ: Select dynamic as you type in a Textbox
I have a scenario, which is this: I have a table, where there is a field called promotional code, where this promotional code can be typed and when it is typed it will have to do a SELECT in a…
-
1
votes2
answers2487
viewsA: What is a recursive function?
The function is recursive is a function that calls itself, always. It is actually horrible, mainly for treatment and memory management. EXAMPLE OF RECURSIVE FUNCTION #include <stdio.h> void…
-
0
votes0
answers30
viewsQ: Warning: Pdostatement::execute(): SQLSTATE[HY093]: Invalid Parameter number: Parameter was not defined in
I know what the error is. It says that the number of parameters is not equal to the number of variables. I just can’t find where the error is. If anyone can see something I didn’t see, I’m grateful…