Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Leah
    @severe13
    @rkudrna NOOO!! Don't leave me!
    Matthew Conquergood
    @kristjin
    @aaroncrows You are calling shuffleDisplay without the necessary () after. It thinks you are trying to pass a variable, not a function. Line 58.
    Dale Corns
    @dcorns
    I will be at HQ from now until 8:30 pm less a lunch break for anyone needing assistance.
    Zac Mrowicki
    @zmrow
    @dcorns are you at HQ?
    Dale Corns
    @dcorns
    @zmrow Yup
    Zac Mrowicki
    @zmrow
    2nd floor?
    Dale Corns
    @dcorns
    Yup, but about to step out for a couple of minutes, first table, on the end
    aaroncrows
    @aaroncrows
    @kristjin didn't work. All the examples I've seen don't include braces there which I assume is because it is actually expecting a variable. It just expects that variable to be a function, so I suppose I would figure that it gets the function passed in by name and then calls it based on the interval.
    see the answer for an idea of the examples I've been referencing. Anybody else got any ideas?
    aaroncrows
    @aaroncrows
    @rkudrna the only thing that's happened so far is an assessment quiz and some review.
    Nicholas Harberg
    @harberg
    Good evening everyone. I am in the corner with a green hoodie on if anyone has questions. Just come on over.
    Andrew Michael Potter
    @AMPotter
    I'm not there physically, but I'm there in spirit. I'm also online if anyone has any questions.
    aaroncrows
    @aaroncrows
    @AMPotter don't suppose you'd take a sec to look over my setInterval woes?
    Andrew Michael Potter
    @AMPotter
    Yeah dude, I'll DM you.
    Hannah Won
    @nowhannahwon
    Just arrived. We're running a lighter crew tonight, so feel free to ask if a TA is available here if you can't flag someone down.
    Emily Doherty
    @edohert
    @dcorns here is the website with the filtering issue, currently the Paiting.html page. https://github.com/edohert/casey.git
    Emily Doherty
    @edohert
    Emily Doherty
    @edohert
    @harberg all of those lovely spaces have been removed.
    Nicholas Harberg
    @harberg
    @edohert
    $('#filters').on('click', 'button', function() {
            var filterValue = $(this).attr('data-filter');
            $paintingPageContent.isotope({
                filter: filterValue
            });
            return false;
        });
    @edohert All we were missing was returning false at the end of the .on()
    Emily Doherty
    @edohert
    @harberg YESSS!! Thank you!!!!
    Sheyna Watkins
    @sheyna
    For the Algorithm assignment, is there anyone here using insertion sort who has been successfully able to slow down their animation? I just spend 2.5 hours at the lab discovering it's almost impossible to slow mine done. I'm going to keep working on it but I was wondering if anyone else has gotten it to work?
    Zac Mrowicki
    @zmrow
    Does anyone know how to get the value of a custom attribute from an HTML element contained in an array?
    Nicholas Harberg
    @harberg
    Custom attribute?
    Adam Caldwell
    @adamrcaldwell
    I've been having trouble animating my sort as well. Putting setTimeout() in the loop produces a completely different result. From what I'm reading it has something to do with closure, which I don't really understand. I'll post again if I get it to work.
    Adam Caldwell
    @adamrcaldwell
    function bubbleSort() {
        var $len = $(".num").length;
        for (i = 0; i < $len; i++) {
            for(j = 0, stop = $len - i; j < stop; j++) {
                if(liToVal(j) > liToVal(j + 1)) {
                    swap(j, j + 1);
                }
            }
        }
    };
    Sorry for the spam. liToVal returns the number in the list element and swap does what you'd expect. This code works, but when I put in setTimeout with the correct syntax, a little animation happens but the page remains in its unsorted state. I've now spent about 4 hours stuck on this step. Anyone have a guess?
    Brian Caldwell
    @Caldwerl
    setTimeout only performs once after waiting a set amount of time,
    setInterval will perform every set amount of time until clearInterval is called
    Adam Caldwell
    @adamrcaldwell
    I was under the impression that setTimeout within a for loop would produce the right result. I'll give setInterval a try, thank you!
    Adam Caldwell
    @adamrcaldwell

    Nope, setInterval didn't work either. I can't see why when I change the swap line above to:

    setTimeout(swap, 25, j, j+1);

    It doesn't wait 25 ms before each swap instead of leaving me with the same unsorted page (as noted, it works as posted above). I may just turn it in for partial credit, 5 hours with no progress is enough.

    Sheyna Watkins
    @sheyna
    @adamrcaldwell I had the same problem. As I understand it setinterval and setTimeout can only return values, they can't just slow data processing.
    Sheyna Watkins
    @sheyna
    So unless you code as something to return setTimeout and setInterval will not work. Someone in the computing universe needs to invent a sleep() function to tell the computer to just pause for a moment. I'm trying to find a way around this by putting an unrelated for loop in the middle of the code where I want to computer to slow down. In other words I'm slowing the computer down by handing it too much information to process at the that moment. It's a hack, and I don't know if I can get to to work entirely, but we'll see.
    *your code has
    Adam Caldwell
    @adamrcaldwell
    @sheyna thanks so much for this, it makes sense the way you've put it. I will renew my efforts and post here if I come up with anything.
    Sheyna Watkins
    @sheyna
    Let me know if you find an answer. I'm working on mine as well. And if I come up with anything I'll let you know.
    Sheyna Watkins
    @sheyna
    HA HA! I got it to slow down! Only now after it finishes sorting it crashes the browser. I'm using setInterval(). How to I get SetInterval to stop?
    Sheyna Watkins
    @sheyna
    I'm having trouble getting clearInterval() to work. Where should I place it? I have the sorting process divided into two functions. And a button calls the first function which calls the second. I've tried to put the clear inside the button and inside both the functions. Only I'm having no luck. What am I doing wrong?
    Adam Caldwell
    @adamrcaldwell
    I wish I knew, I haven't even gotten setInterval to work yet. Among the many examples I looked at was one where clearInterval was called with a second button after the algorithm finished, so that's what I'll try if I get that far. :)
    Sheyna Watkins
    @sheyna

    clearInterval() is not working in any of these:

    VERSION 1:
    alt

    VERSION 2:
    alt

    VERSION 3:
    alt

    Any ideas?

    @adamrcaldwell Yes, most of what i'm seeing online has setInterval clear with entirely separate button. But I'm trying to figure out how this works:

    http://stackoverflow.com/questions/10485385/how-do-i-correctly-use-setinterval-and-clearinterval-to-switch-between-two-diffe

    Sheyna Watkins
    @sheyna
    I know the project is due tonight. But when is the deadline to get feedback? I still can't get clearInterval() to work. Should I turn it in and get partial credit? Will I be penalized if I don't get it in today?
    Adam Caldwell
    @adamrcaldwell
    I know that we have hitherto been able to turn things in late with no penalty, but I'm not sure how long the TAs will be around to grade since we've had our last class. Brook said "for a week" on Monday. I'm turning in mine now with the comment that I will push a new version if/when I get it to work right.
    Sheyna Watkins
    @sheyna
    That's probably what I will end up doing. I just hate to mess up my 99.7% any more.
    Sheyna Watkins
    @sheyna
    Of course, NOW at 12:30 I figure it out. I was using my variables with setInterval() incorrectly! Now it works! I'm updating my submission.
    Dale Corns
    @dcorns
    Don't give up. They will get graded
    Matthew Conquergood
    @kristjin
    i've been working with the setInterval used in Brook's code and do not understand why his call of setInterval with 3 parameters works. On the deck.html code. Very lost on that front.
    Sheyna Watkins
    @sheyna
    I could never get setInterval to take parameters. When I tired it completely ignored the time delay I was trying to impose. So I put the parameters inside another function which then launched the function I was trying to launch to begin with.