Questions tagged as 'javascript'

2
answers

I can not access global variable

I am trying to use the heap algorithm to find the possible permutations of a string. The problem is that I create a variable perm global to count every time I have a permutation but I can not see it in an alert. var perm=0; function pe...
asked by 20.11.2016 / 23:29
1
answer

Variables in ng-repeat directive Angularjs

With the ng-repeat directive can I store two different variables? Example: ng-repeat="valor1 in valores1 & valor2 in valores2" I have problems getting the key of my string in Firebase 3 and I want to extract the key...
asked by 23.11.2016 / 17:35
2
answers

Some operations are overflowed in javascript [duplicated]

Good afternoon. guys I have the following problem. with a simple addition operation the following happens to me: 99.92+0.04 99.96000000000001 I do not know why that 1 is added at the end. This makes the results of operations do not give m...
asked by 28.10.2016 / 21:22
1
answer

Obtain data of a promise in an Angular directive

I am working on a directive that needs information to work. This information must come from a promise. The problem is that the directive loads without the information because the promise takes more time to execute than the directive itself. Then...
asked by 22.09.2016 / 21:25
1
answer

Paint a pixel with WebGL

I am trying to implement the Bresenham algorithm to paint lines with WebGL . I want to paint pixel by pixel of the line thanks to this algorithm. My question is, is there any way to paint a pixel in WebGL?     
asked by 06.09.2016 / 20:48
2
answers

TypeScript default constant export

We have a TypeScript library that we are publishing to a private NPM environment and we want to use it in other projects whether they are in TS, ES6 or ES5. Let's say that the library is a npm package called foo , whose main file works...
asked by 23.09.2016 / 11:28
2
answers

CSS error when applying events to buttons - jQuery

I'm doing an image viewer with four buttons (First, Previous, Next, Last). Initially, an image is loaded randomly (I have them stored in a folder called "images"), and then we can move through events of those four buttons. Why do not I app...
asked by 30.05.2017 / 13:18
2
answers

How to get the value of an attribute in an html tag with JQuery

Friends What happens is that I need to capture the value of an attribute of an html tag in this case. <input class="btn btn-danger link1" type="button" value="Delete" data="@item.MunicipalityId" /> I have this tag inside a cyc...
asked by 13.06.2016 / 20:06
1
answer

Create addEventListener in a span whose id is contained in a variable

good morning. First of all I apologize for how unclear the title is, I have not been able to describe it better. Secondly, I clarify that what I am going to put here is an invented and simple example so that you understand what is my doubt and a...
asked by 21.02.2017 / 15:19
1
answer

consequences of stopPropagation

I have a website, mostly made with Bootstrap and certain not so powerful PCs (I saw a Core 2 Duo with 4gb of RAM) as an example, my web experiences some "latency" when clicking on form elements like inputs, buttons, selects and the css animation...
asked by 16.02.2017 / 03:25