Posts by lucasbento • 856 points
94 posts
-
0
votes0
answers335
viewsQ: How to use WYSIHTML5 translation?
The documentation says the following: You can use Bootstrap-wysihtml5 in other Languages. There are some Translations available in the src/locales directory. You can include your desired one after…
-
0
votes0
answers158
viewsQ: How to perform SOAP request with and without proxy
Good afternoon, everyone, Setting: "The company where I work has a proxy. But time and again there is the need to disable it and set Ipv4 settings manually." Therefore, I can consume Soapclient for…
-
2
votes0
answers42
viewsQ: How to create generic function for different inputs
I own 3 inputs, where each should use the same autocomplete. However, each will carry out the consultation with their respective val(). How should I change the code below, so that this function…
-
0
votes0
answers66
viewsQ: How to perform nested data query in JSON type column
I have the data (nested) below in a column of type JSON: [{"modSelecionado": "13"}, {"modSelecionado": "15"}, {"modSelecionado": "16"}, {"supMaxima": "5,00", "tensaoMotor": "1", "comunicacaoMotor":…
mysqlasked lucasbento 856 -
1
votes1
answer634
viewsQ: How to recognize button/element click inside a modal window?
How to recognize button/element click inside a modal window? I tried the following, without success: $("#modalEscolha").bind('click', function () { if ($("#escolherComp").data('clicked')) {…
-
0
votes1
answer29
viewsA: How to pass attached object without losing array structure
jQuery: var formCad = $('#formCadMaterial').serialize(); var formComp = $('#formComposicao').serialize(); var data = new FormData(); data.append('formCad', formCad); data.append('formComp',…
-
0
votes1
answer29
viewsQ: How to pass attached object without losing array structure
How do I attach an array, via jQuery/AJAX, and continue to receive data in a PHP page in the following structure: Array ( [cadeia-suprimento] => Produto final [produto] => 2 [categoria] =>…
-
1
votes1
answer85
viewsQ: Query by index in column of type JSON
How to perform a query, by index, where column data is of type JSON? For example: I want to get all data where the voltage is equal to 220: table material id | descricao | extra 2 | Altus |…
mysqlasked lucasbento 856 -
0
votes1
answer38
viewsQ: How to perform query in two tables by doing data combination
I have two tables: material id | categoria | subcategoria | codigo 1 | 3 | 15 | FS-5600 2 | 0 | 16 | FA-4500 subcategory id | descricao | id_categoria | id_produto 1 | Alasca | 3 | 2 4 | Aragon | 3…
-
0
votes0
answers37
viewsQ: How to control reading txt file
I have the following entry in a file .txt: var a; var b; var c; a = (10+2)/2; b = a*2; c = a*b; print a; print b; print c; Where the getToken() function will return me the current token, containing…
c++asked lucasbento 856 -
0
votes1
answer186
viewsQ: could not Convert | Error returning object
The purpose of the code below is to return the tokens of a particular expression, for example: 50+30*(30-10)+(10/2). Where the tokens would be: [number, 50], [sum, +], [number, 30], [mult,*] and so…
-
1
votes2
answers308
viewsQ: How to duplicate select without previous option
The code below performs the insertion of a new select by clicking the button, but this new list should be composed only with the remaining items, ie the new select shall not possess the option…
-
0
votes2
answers124
viewsA: Go to anchor before full page loading
$(window).load(function(){ if(window.location.hash) { $('html, body').animate({ scrollTop: $(window.location.hash).offset().top + 'px' }, 1000, 'swing'); } }); …
-
1
votes2
answers124
viewsQ: Go to anchor before full page loading
I have a page that every time when updating, returns to the top after the full upload. However, I have a second page that has a link as follows: index.html#empresa, I would like it to stop,…
-
0
votes1
answer31
viewsQ: How to run the same query for different "ids"
I have an array with the following Ids: Array ( [0] => 2 ) Array ( [0] => 3 ) Array ( [0] => 5 ) The query should return all the values found for these Ids, so, how will the assembly of the…
-
3
votes3
answers1560
viewsQ: Insertion of the letter "e" in type number
I would like to know how not to allow the letter to be inserted "and", which probably represents the number of Euler, in the input type="number.…
htmlasked lucasbento 856 -
0
votes0
answers87
viewsQ: Limit upload size with PHP to more than one file
Assuming there is a single array in the variable $_FILES, the code below limits the upload size of a file: if(empty($_FILES) && empty($_POST) && isset($_SERVER['REQUEST_METHOD'])…
phpasked lucasbento 856 -
0
votes1
answer32
viewsQ: How best to update inputs alternately
I have some inputs, however I should only update the fields that have been filled: For example: Logo and Digital Certificate are blank. UPDATE should not occur to these fields. Logo and Password are…
mysqlasked lucasbento 856 -
0
votes1
answer96
viewsQ: How to pass, via AJAX, multiple forms with multiple files
I have 3 forms on the same page, where each form has inputs of the file type. I need that when clicking a single button, it is possible to forward, using Ajax, correctly all fields (mainly that…
-
1
votes1
answer253
viewsQ: What is the best way to store a multi-valued item
When issuing a NF-e it is possible to insert up to 990 products/items per document . Each product has several attributes. What would be the best way to store and link each product, and its…
mysqlasked lucasbento 856 -
2
votes3
answers1206
viewsQ: Statement "Return" does not work within foreach. Why?
I have the following code snippet, which is executed when trying to insert an item into $scope.items{}: $scope.items.forEach(function(item, i) { if (item.codigo == $('#codigo').val()) {…
javascriptasked lucasbento 856 -
0
votes0
answers1660
viewsQ: 1452 Cannot add or update a Child Row: a Foreign key Constraint fails
SQL Query: INSERT INTO tributos_prod (codigo, ncm, Descricao, preco, quantidade, v_total, situacao_trib_icms, origem_trib_icms, aliquota_icms, credito_icms, situacao_trib_pis, valor_base_pis,…
-
5
votes1
answer169
viewsQ: removeAttr('required') obsolete?
I have the following line in my code: $('#infs').removeAttr('required'); And when using the plugin jQuery Migrate, get the following Warning in debug: JQMIGRATE: jQuery.fn.removeAttr no longer sets…
jqueryasked lucasbento 856 -
1
votes0
answers249
viewsQ: How best to store an array in a single field in the database
Is usually used implode/explode or serialize/unserialize to store multiple information of a particular item in the database. Using PDO, which would be the best and whether there is another way to…
-
0
votes1
answer822
viewsQ: How to update image cache via PHP
I have a thumbnail image on header.php, but when sending a request to update this image to another PHP page (which updates it in the database), it is not automatically updated on the page. Obs.: I…
-
0
votes0
answers346
viewsQ: autocomplete="off" does not work
I own two camps: <label>Imagem do perfil:</label> <input><input type="file" value="<?php echo $img; ?>" name="img[]"/><br/> <label>Senha:</label>…
-
0
votes1
answer86
viewsA: Highlight current page button based on another page
Following @Andersoncarloswoss' advice, a possible solution is to rename the page name editar-empresas.php for empresas-editar.php and use the function indexOf(): (function () { var nav =…
-
2
votes1
answer41
viewsQ: Error updating AUTO INCREMENT
I have the following code: $sql='ALTER TABLE tributos_prod AUTO_INCREMENT=:ultimo_id'; try { $query_delete=$conecta->prepare($sql); $query_delete->bindValue('ultimo_id', $ultimo_idTP+1, PDO: :…
-
1
votes0
answers110
viewsQ: Edit fields individually in modal window
I have a list of customers that is displayed using a foreach, where it is possible to open a modal window individually. However, when editing a given field for such a client, this information is…
-
2
votes1
answer61
viewsQ: Body or entity setting standards for web development
Sometimes, the consensus between designers and web developers regarding the standards in the "strength", almost exclusively, to use actual standards. I would like to know if there is any body or…
nomenclatureasked lucasbento 856 -
1
votes1
answer318
viewsQ: How to create editable form using "Popover"
How should I modify the code below to work with the class popover-wrapper angular-xeditable Demo. var app = angular.module("app", ["xeditable"]) .run(function(editableOptions) {…
angularjsasked lucasbento 856 -
0
votes1
answer86
viewsQ: Highlight current page button based on another page
I have the bottom menu, which is contained in the page empresas.php and "Edit" a company becomes editar-empresa.php?id=x: The function that adds the class active to the current page is the…
-
0
votes3
answers1589
viewsQ: How to read file line . txt from index 0
I have the following excerpt of code that reads line by line from a text file, ending until the beginning of string. How should I change it, so that such action occurs in reverse? while (getline…
-
7
votes3
answers1044
viewsQ: How to edit and load class only for a single element
I have the following HTML structure below. However, when clicking on one of the "items" the class (editing) is displayed for both elements. What should I do to make it happen only in the clicked…
angularjsasked lucasbento 856 -
0
votes1
answer51
viewsA: How to update $Scope.items using xeditable within form
Solution: http://jsfiddle.net/NfPcH/19443/ HTML: <h4>Angular-xeditable Text (Bootstrap 3)</h4> <form ng-app="app" ng-controller="Ctrl" editable-form name="formulario"> <a…
-
0
votes1
answer51
viewsQ: How to update $Scope.items using xeditable within form
In this example it is possible to update the value of the field by clicking the confirmation button, however in my form there is no such button. What should I do to update this item/field? My…
-
1
votes1
answer103
viewsQ: click() does not recognize button inserted dynamically inside tr
Insert items dynamically into a table using the following function: $("#inserir-item").click(function (){ ... $("table#tb-itens tbody" ).append(retorno); } The return variable contains something…
-
-1
votes1
answer685
viewsQ: Import workbook from another worksheet to a new workbook in the current worksheet
Using the example past in Microsoft MSDN, the following error is displayed: Run-time error '9': Subscript out of range VBA code: Sub Principal() Dim PathName As String Dim Filename As String Dim…
-
6
votes4
answers7295
viewsQ: How to generate a spreadsheet from another using VBA
I have the worksheet below with the following columns: I would like to generate a second spreadsheet based on the above information, following the following conditions: a) If categoria ==…
-
2
votes0
answers370
viewsQ: No payment options available
The problem is this: when finalizing the purchase as a visitor (without being properly logged in) the checkout page correctly displays the payment option by Pagseguro, however when logging into the…
opencartasked lucasbento 856 -
0
votes2
answers5148
viewsQ: How to remove value accentuation in Mysql
How can I remove the accentuation of all values of a(a) column/field using Mysql commands? Trying: UPDATE tabela SET campo = REPLACE(campo ,'Á','A'), campo = REPLACE(campo ,'À','A'), . . . campo =…
mysqlasked lucasbento 856 -
3
votes1
answer883
viewsQ: How to convert values from one column to UPPERCASE
Using Mysql commands, it would be possible to convert all values from one column to UPPERCASE?
mysqlasked lucasbento 856 -
1
votes0
answers181
viewsQ: What alternative to Sql_latin1_general_cp1251_cs_as in Mysql
What would be an alternative, in Mysql, for COLLATION Sql_latin1_general_cp1251_cs_as for Mysql or how to remove the accent from a string (or for any table or column) using commands? Reference:…
mysqlasked lucasbento 856 -
0
votes2
answers548
viewsQ: How to detect change in input value with active readonly
HTML: <!-- Campo preenchido com retorno AJAX --> <input type="text" name="estado-cliente" hidden id="estado-cliente" readonly="readonly"/> How do I stop detecting any change in value?…
-
0
votes1
answer264
viewsQ: How to capture Javascript value with PHP
The input below is loaded along with the page script: $("[name='estado-cliente']").attr('value', obj['uf_cliente']); However, this value will be used for a PHP comparison. I’ve tried the following,…
-
-1
votes1
answer286
viewsA: AJAX no response from SUCCESS
Hello @Danielmarques, I simplified and improved your code [look to usePdo], however I believe that his "problem" may have been the absence of lib of jQuery. <!DOCTYPE html PUBLIC "-//W3C//DTD…
-
2
votes4
answers4228
viewsQ: How to perform query with some null values?
The SQL below returns the values correctly only if the field data_emissao be as nonzero in my BD table (independent if the parameter cliente was passed or not), but I wish to return the values where…
-
5
votes1
answer649
viewsQ: How to use LIKE in bindValue?
How to use the operator %, to the bindValue(), in query down below: $sql = 'SELECT * FROM nfe WHERE (cliente LIKE :cliente OR :cliente_ IS NULL)';…
-
1
votes1
answer983
viewsQ: SQLSTATE[42000]: Syntax error or access Violation
SQL: "SELECT * FROM produto WHERE ($cliente=null OR cliente LIKE '%".$cliente."%') AND ($n_cad=NULL OR n_cad=$n_cad) AND ($cod=NULL OR id=$cod) AND ($dt_inicial=NULL OR data_emissao >=…
-
0
votes3
answers596
viewsQ: How to optimize SQL to filter results
The filter may occur in the following scenarios: Without any input filled 1 (a) input filled Combinations of inputs, including all SQL to be optimized: $cnpj = isset($_GET['cnpj']) ? $_GET['cnpj'] :…