Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Matthew Conquergood
    @kristjin
    Any TA's around?
    Matthew Conquergood
    @kristjin
    Hey everyone, I happened to sign up for the JavaScript F2 class starting tonight when I was under the impression there wouldn't be a Python F2 until next Spring, but they went ahead and set one up for November 24, so I'm switching to that. This means that if you were interested in the JavaScript F2 but missed the enrollment before it filled up, you could possibly take my spot. It does start tonight though so time is of the essence.
    Sheyna Watkins
    @sheyna
    Anyone here?

    I'm having trouble getting parseInt() to work. I've got an <li> list with the ids set to numbers. And I'm trying to use .attr() to extract the value and then parseInt() to turn it into a number. But it's not working. Here is my code:

    var thisIDtoN = $('.card:eq(' + i + ')').attr('id');
    var thisToSort = parseInt(thisIDtoN);

    It's giving me the correct number when I print to my console but it's printing as a string. Any ideas?

    Dale Corns
    @dcorns
    @sheyna Try thisSort = thisIDtoN*1
    Kim Cole
    @kcole009
    has anyone here been playing with Ruby at all?
    Crystal Gomes
    @thedriftofwords
    It is on my to-do list from when my brain is done exploding from F1.
    Zac Mrowicki
    @zmrow
    @kcole009 I have a bit
    Sheyna Watkins
    @sheyna
    Thanks @dcorns I was able to work out the problem!
    Rachel Kudrna
    @rkudrna
    @kristjin do you know if your spot in the .js class has been filled already? I'm in the front end class but I really want to switch.
    Matthew Conquergood
    @kristjin
    I don't know if it was filled or not. I'd try getting in touch with hello@codefellows but in my experience it takes a day or so to get a reply so be prepared to wait a bit...
    Rachel Kudrna
    @rkudrna
    Thanks. I've sent a couple of messages that way with a pretty slow response time. Fingers crossed!
    Emre Surmeli
    @emresurmeli
    @rkudrna, I got an email from them yesterday saying there was a spot open, I did not take it, I know a couple people wanted to drop it.
    Rachel Kudrna
    @rkudrna
    @emresurmeli Oh, cool - thank you!
    if it works for me to switch - would someone who went to yesterday's class let me know what the homework was?
    aaroncrows
    @aaroncrows
    Having a jquery problem! HALP. Here is a fiddle. The thing is by and large working like it's supposed to but there's one hitch and I'm running my head into a wall about it. I have a function set to run on an interval and it's supposed to cancel itself out based on a condition inside the function. Everything goes fine until it hits that condition and then it tries to tell me that the name I'm using for the interval isn't defined.
    I've tried a few different things but all of the examples I found for setInterval look pretty similar to the way I have it set up so I don't know what to do.
    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.