Posts by Emir Marques • 3,586 points
120 posts
-
3
votes3
answers3091
viewsA: Ordering select in alfábetica order with jQuery
Try the following: var options = $('select.whatever option'); var arr = options.map(function(_, o) { return { t: $(o).text(), v: o.value }; }).get(); arr.sort(function(o1, o2) { return o1.t >…
-
6
votes1
answer8737
viewsA: How to fix "Sqlexception: No suitable driver found" error while making a connection?
Before creating the connection you need to register the mysql driver. It will look like this: public class ConexaoBd { public static void main(String[] args) throws SQLException{…
-
2
votes2
answers2632
viewsA: What’s wrong with this query? Not Unique table/alias
The problem is that you are not actually using for the joins. Try so: SELECT DISTINCT catalog_product_entity.entity_id, sku, price as preco, qty as quantidade, stock_status as estoque,…
-
2
votes1
answer969
viewsA: Table paging with Angularjs
Here I have an example almost the same as yours except that in my case is an infinite scroll similar to facebook. Observer the following, when the user opens the page will be displayed…
-
1
votes1
answer366
viewsA: Load HTML into received DIV via AJAX request by converting special characters
I tried the following: var html = String(data[0].TemplateText).replace(/&/g, '&') .replace(/"/g, '"') .replace(/'/g, "'") .replace(/</g, '<')…
-
3
votes2
answers1205
viewsA: Jquery Autocomplete
The problem is with jquery compatibility with the plugin. Try jquery version 1.8.3. $("#marcas").autocomplete({ source: function(request, response) { $.ajax({ type: 'GET', url:…
-
2
votes2
answers413
viewsA: My jquery Cycle 2 slide code does not work. Wondering where the bug is?
Two things, first, see if the jquery version you are using is compatible with the Cycle plugin. According to the style you are using (". slideshow") I did not find in your code. As far as I know you…
-
2
votes1
answer2375
viewsA: Dynamic Table Paging with Angularjs
Do so: public List<Colaborador> listarColaboradores(Integer paginaInicio, Integer paginaFim) { List<Colaborador> lista = new ArrayList<>(); Session sessao =…
-
1
votes1
answer944
viewsA: Update table after entering data in the Angularjs database
In your code instead of: $Scope.contributors = contributors.data change to: $Scope.colaboradores.push(collaborator) Note that you are setting the initial value to $Scope.contributors after saving a…
-
5
votes3
answers115
viewsA: Is there any way to generalize library imports into Java?
Import like this: import Banco.* Just put . * after the last package you want to import
-
3
votes1
answer434
viewsA: My application does not recognize my Bean
The class 'br.com.Erezinha.adm.model.Modelo' does not have the Property 'valorImovel'. See your model class does not have the "moveable value attribute"
-
2
votes2
answers72
viewsA: Convert string in array format into an array and retrieve values
Follows: public static void main(String[] args) { String str = "[[ resumo: null ] [ datainicio: 2015-09-17T00:00:00.000-0300 ] [ datafim: 2015-09-22T00:00:00.000-0300 ] [ equipamento: 3421 ]]"…
-
1
votes1
answer985
viewsA: Problems setting up a Maven project to place CDI
You look like a problem related to library conflict. See if this site helps you: https://github.com/emirdeliz/meus-projetos/blob/master/scroll-infinito-angular-rest-datafactory/pom.xml…
-
2
votes1
answer275
viewsA: jQuery does not add "+"
In doing: var subtotalcomfrete = parseFloat(subtotal+frete).toFixed(2); You are concatenating a number with a string. The correct one would be: var subtotalcomfrete = subtotal +…
-
2
votes2
answers84
viewsA: How to work with Angularjs without the API being ready?
There’s this one: http://johansson.jp/angular-apimock Example on github: https://github.com/seriema/angular-apimock/blob/gh-pages-dev/app/scripts/controllers/demo-simple.js…
-
1
votes2
answers858
viewsA: Calculate time difference in Angularjs
Example co filter: generalFilters.filter('dateDiff', function () { var magicNumber = (1000 * 60 * 60 * 24); return function (toDate, fromDate) { if(toDate && fromDate){ var dayDiff =…
-
-1
votes3
answers30862
viewsA: When to use Stateful or Stateless
As far as I know Stateful keeps the status of the object during the session. Stateless keeps it independent of the session. Example you have a program of buying and selling dollars. In this case you…
-
0
votes2
answers165
viewsA: How to consult a table in a limited (partial) way?
You can use the top of SQL. In this case you can filter by punctuation. For example: "select TOP(5) name, score from player Where score order by score > DESC;". If the query is the first the…
-
0
votes3
answers1363
viewsA: Detect when input value is changed via js
Thank you so much for the support. The option I was using setInterval. Even though it was not the most elegant option the code was not so bad. I used the following link:…
javascriptanswered Emir Marques 3,586 -
3
votes3
answers1363
viewsQ: Detect when input value is changed via js
I have a third system that fills a field through a zoom. Below this zoom I have a product grid (my specific). I need to include a product in this grid whenever the system fills this product field.…
javascriptasked Emir Marques 3,586