Posts by Guilherme Nagatomo • 494 points
20 posts
-
2
votes2
answers1067
viewsA: How to avoid jquery library conflicts?
If you look at documentation of .noConflict() will see that it serves only to avoid conflict with other libs that use the symbol $. In your case, I think the problem is in the script tag. Script…
-
2
votes1
answer262
viewsA: Validate CNPJ countries Latin America
The mask you used (AAA000000aaa) makes the first and last 3 characters just letters, not alphanumerics and symbols too. An approximation of the solution would be the expression: /^.{3,4}\d{6}.{3}$/…
regexanswered Guilherme Nagatomo 494 -
3
votes2
answers816
viewsA: Make one asynchronous function wait for another
The ideal would be that everything inside the for occur within a separate function, but I believe only change this: for (var i = 0; i < req.body.Acoes.length ; i++) { //... } for:…
-
1
votes3
answers452
viewsA: Settings of the Go language
Supposing that the project gocode to which it refers is this: https://github.com/nsf/gocode, just turn the command: go get -u github.com/nsf/gocode This will make the package properly installed and…
golanganswered Guilherme Nagatomo 494 -
1
votes2
answers220
viewsA: How does Nodejs manage package.json in sub-folders?
Currently npm does not allow two versions of the same package, since in package.json packages are managed by name. In the case of subfolders, npm does not manage them as if they were submodules, as…
-
3
votes1
answer132
viewsA: How to disable the Opera 33 cache so that it does not cache the js scripts?
This is not cache, as the browser is not aware of file modification. If you want the browser to update every file change, set up a setup with livereload type tools with Grunt. As you are starting to…
-
0
votes1
answer201
viewsA: How to create relationships using the HTML 5 Indexed Database API?
I recommend using Google lib for Indexeddb lovefield. Example of use: # pseudo código da query SELECT * FROM photo INNER JOIN album ON photo.albumId = album.id WHERE album.id = '1' // Usando o…
-
1
votes1
answer319
viewsA: Intermittent problem with Uncaught Typeerror: Cannot read Property 'locac' of Undefined
There are no apparent errors in your code, but I believe the solution is to place your script inside the ready jQuery. Read here. Do so: $(function () { function fnc(){ var evt = (window.event ?…
-
1
votes1
answer842
viewsA: Next and Prev button of the datapicker does not appear
You’ve probably changed the folder hierarchy for jQuery UI. The briefcase images jQuery UI must be inside your folder /css/, because the paths to the images in css are relative, example: .ui-icon,…
-
2
votes1
answer860
viewsA: Image in Javascript does not appear
The image paths in js are relative, different from the ones in HTML. I believe that changing: <img alt='volume on button' src='../images/video/mutado.png' id='js-imagem' /> To: <img…
-
1
votes1
answer191
viewsA: foreach filtering by the parameter that was passed
Supposing titulacao be a string, and data be an object array, you can filter the array using the method .filter() array, thus: function carregarDadosJ(titulacao) { // O método filter itera entre os…
-
2
votes1
answer265
viewsA: Different divs in loop
First of all, don’t try to use the id when in place should be class. Equal id’s make HTML invalid. Correct is to use class, especially if the intention is to use the property in css. Use the foreach…
-
2
votes2
answers2366
viewsA: How to order Datatables by ignoring accents?
You need to create your own sort algorithm, using type detection sort as described here. It is necessary to have a function that normalizes the string, that is, remove the special characters and…
javascriptanswered Guilherme Nagatomo 494 -
1
votes2
answers227
viewsA: Use Promise in a Web Worker
It is not possible, as there is no mention of any Promises in API of Webworkers. The worker has nothing implemented and is not asynchronous processing like ajax. It is possible to talk to him only…
-
2
votes1
answer427
viewsA: Problem with Spring MVC + javascript
I believe that the problem can be solved by preventing the default behavior of the button, which in case is to send the form. This can be solved as follows: In the html button add the parameter…
-
1
votes3
answers1954
viewsA: Problems adding item to array with Angularjs
If you have a guarantee that each item will be a list containing the details of the item in index 0 and the quantity in index 1, you can iterate between the keys of the quantity object and insert…
-
1
votes1
answer158
viewsA: jQuery.load() error in Safari (OSX) only
If you have control of the server that responds to the ajax request, try to configure the header Response with: Access-Control-Allow-Origin: * Even small variations such as www can influence how the…
-
2
votes3
answers3404
viewsA: Force popup opening on a website, after onclick, in javascript
Just to complement the @ooredroxoo response, there is no way to bypass the popup security policy, as it is at the level of OS/browser. If your popup falls within the rules of the blocker, there is,…
-
1
votes1
answer915
viewsA: Tree menu / Collapse with three levels
It is possible to achieve the desired result through directives, since it is possible to have recursion within directives, using the $compile, that allows a directive to have directives in its…
-
2
votes1
answer181
viewsA: Audio player slows down and hangs after playing about ten songs
The main problem may be that with each music exchange you make the bind of events loadedmetadata, ended and timeupdate. Over time the element audioElement has dozens of eventlisteners. Think about a…