Tagged Questions
3
votes
1answer
86 views
Iterate through a LinkedList in a cleaner manner
I have a collection of PlaylistItem objects. They are linked together such that each item knows the ID of its next/previous item. I am iterating over this collection of objects, starting at a known ...
4
votes
1answer
64 views
Looping through Radgrid in JS is slow, can this be faster?
I do a single select in one radgrid, and based upon that selection I want to select multiple rows in a different radgrid:
<telerik:RadGrid ID="rgPaymentLines"> <ClientEvents ...
5
votes
4answers
260 views
Improve speed for looping through 1,000's of items in javascript?
This is a script I use to count how many items are selected in a form. Currently it loops through the entire form to count how many check boxes are selected, each time a checkbox is clicked. The form ...
1
vote
3answers
305 views
Optimize Array.indexOf
How can I optimize checking a value in recursion before operating on it? I'm using Array.indexOf (this is Javascript)
var nums = [], lengths = [];
function findNumLength(n) {
//preliminary check ...
1
vote
2answers
97 views
Refactoring 3 level depth for loops in JavaScript
I'm trying to get rid of some of the horrible nested loops in the following code.
Essentially is moving TDs to top rows based on whether the current row has the current cell. You can see the ...
2
votes
2answers
119 views
What do you think about this usage of for loop in JavaScript?
Algorithm that I had to write is a perfect case for while, or do..while loop, however I found out that if I will implement it with a for loop I will save few lines of code and also scope of variables ...