Questions tagged as 'javascript'

1
answer

Comments with the license in CSS or JavaScript files should be maintained or not?

This question comes up when I finalize a bundle mechanism for CSS and JS files with consequent cache . In many projects we all use mechanisms that allow us to reduce the size of CSS and JS files in our projects, however a legal issue arises....
asked by 12.08.2015 / 16:49
1
answer

Difference between scroll functions?

Is there a difference in using: $(window).scrollTop(_Altura_); Or window.scroll(0,_Altura_); Without controlling the position of the horizontal axis? (consider _Altura_ as a variable)     
asked by 18.10.2017 / 13:43
2
answers

Open link in a new tab without the target or window.open

I have a function that does a redirect: vm.pagarUpload = function() { $http({ method: 'POST', url: API.url + 'app/service.php?t=pagarUpload', data: { nome: vm.nomeUpload, email: vm.emailUploa...
asked by 18.12.2017 / 12:38
2
answers

How to capture audio from microphone using HTML5 audio API?

How do I capture audio from the microphone using the HTML5 Audio API and play it at the same time?     
asked by 03.04.2014 / 18:59
1
answer

How to download automatic in site that calls JavaScript?

I need to make a program that downloads PDFs from several sites daily and automatically. It is very easy to perform this operation using the C # WebClient command, however, on certain sites it is not possible to find the download URL in any way....
asked by 30.05.2014 / 16:33
2
answers

What is cufon and what is it for?

Recently when I was to see the source code of an old Wordpress theme, I came across a javaScript code that contained the following: Cufon.replace('#navigation > ul > li > a', { textShadow: '1px 1px rgba(0, 0, 0, 0.2)', hover:...
asked by 22.06.2015 / 21:05
3
answers

How to get data from a tag and calculate?

I have a jquery question. Is it possible for me to get a value inside a <span></span> tag that in this case would be an ex:%. 5% and make the calculation of a discount on a value? Example: Iwanttogetthe5%valuethatisinth...
asked by 15.09.2015 / 14:23
1
answer

Functional Programming and Referential Transparency

Referential transparency ensures that given the same input values for a function, it will always give me the same return value. How would I have to do in the case of a function that accesses the database that has state, for example at the tim...
asked by 16.07.2015 / 01:57
1
answer

How to implement the "evaluate ()" and "successor ()" method of the Hill Rise algorithm?

I'm trying to implement the Hill Climbing algorithm and this algorithm should return the sequence of cities considered good (with the smallest distance between cities) from the traveling salesman problem based on an adjacency array, however, I...
asked by 17.04.2018 / 01:16
3
answers

window.showModalDialog does not work in Google Chrome, is there something equivalent?

Hello, I'm trying to open a modal in google Chrome ... The current application already uses window.showModalDialog for years, it works in IE ... I can not make changes using the html 5 dialog tag, there is some other method or a jquey / javascri...
asked by 13.11.2017 / 14:40