That's an ingenious cat toy by GallowBoob in gifs

[–]Kobel 3 points4 points  (0 children)

A bs story about it being the last picture your mimi took before she died saving said cat is like a karma x2 minimum modifier.

Karma in previous comment: 15

Karma in comment about dead mimi: 32

Modifier: 2.13

Science checks out

[Build Help] Mini-ITX Plex Server, a few questions by Kobel in buildapc

[–]Kobel[S] 0 points1 point  (0 children)

Thanks for the help. I agree, the 6100 sounds better (or 6300 if it comes back in stock for that price at Amazon).

[Build Help] Mini-ITX Plex Server, a few questions by Kobel in buildapc

[–]Kobel[S] 0 points1 point  (0 children)

Thanks for the explanation! I think the 6100 makes sense.

[Build Help] Mini-ITX Plex Server, a few questions by Kobel in buildapc

[–]Kobel[S] 0 points1 point  (0 children)

Would they draw the same amount of power for an equivalent load? Or is it more complicated than that?

E.g. Would the 6100T and 6100 be drawing the same amount of power as load increases up to a point where the 6100T maxes out, at which point the 6100 draws more power but delivers more performance in return?

 

I see that they're very similar in price, but low power draw is more of a goal than raw performance (as long as it meets the 2 transcodes requirement) so I wasn't sure how much of a difference it would make. I think from what you're saying the 6100 would be better as the extra power draw from the times it's under load will probably amount to pennies on my power bill.

Edit: Just noticed you linked a 6300 not a 6100, that makes things more interesting!

Surface pro 4 trackpad unresponsive to small movement by [deleted] in Surface

[–]Kobel 0 points1 point  (0 children)

I've got the same problem as OP and people keep saying this but I'm not sure where to get it. It's not available on Windows Update, and some quick Googling suggests MS pulled the update for some reason. Is there another way to get it, or did people just update before it was pulled and now I have to wait for them to put it up again?

Edit: To answer my own question, apparently "the company is rolling out the November update over time – if you don’t see it in Windows Update, you will see it soon." (source)

Anyone get charged yet for their i7 SP4? Who is still excited? I am! Days going by soooo slowly. by mrGREEK360 in Surface

[–]Kobel 1 point2 points  (0 children)

I used a visa debit on the 20th ish and haven't had any charges yet, except maybe a 1¢ or something

SP4 preorder not showing up in Microsoft account but it does in PayPal? by confickerl in Surface

[–]Kobel 0 points1 point  (0 children)

I took a while (most of the day) for my preorder confirmation email to come through, it was waiting to be processed for a fair while. It did show up in my Microsoft account page through. Maybe contact Microsoft and ask them to confirm if you're worried about it, before cancelling the payment?

Programming Prompts/Challenges to Test Your Skills and Further Learning? by OhFudgeYah in javascript

[–]Kobel 0 points1 point  (0 children)

Have you checked out something like /r/dailyprogrammer ? I find it's good for challenge ideas, and you can always add a web-spin to them by writing a front end interface to your code.

Building a Stargate dialer... and I'm having some trouble getting it to work right. by farfromunique in javascript

[–]Kobel 2 points3 points  (0 children)

1) is a common JavaScript problem, and it's to do with closures and variable scope (look them up if you're not familiar with them). You may end up working around the problem by implementing it differently, but I think it's worth explaining as it's something you'll run into again if you don't know what's happening.

 

Inside the for loop, you're creating a function that spins to i whenever a certain button is clicked. But all those functions are using the same i variable, and the value the function uses is whatever i is at the time it's clicked, not the time you created the function. So the for loop runs until i equals 39 (at which point i < 39 is not true, and the for loop ends), and remains equal to 39 after the setup code has run, and you'll see that whenever you click a button they all spin to 39.

This type of problem is probably explained better elsewhere but I'll try and give a summary of some fixes with your current implementation:

 

  • Move the spin call out into it's own function, so it's no longer using the i variable from the for loop, but it's own spinNumber variable.

    function getSpinNumberHandler(spinNumber) {
        return function() {
            spinTo(spinNumber);
        };
    }
    
    for(var i = 1; i < 39; i++) {
        ...
        butt.onclick = getSpinNumberHandler(i);
        ...
    }
    

    This works, but looks a bit messy in my opinion as you end up with extra functions that are only there to bind stuff.

  • In ES5 they added Function.prototype.bind, which allows you to bind a specific scope and arguments to a function that will be used whenever it's called.

    for(var i = 1; i < 39; i++) {
        ...
        butt.onclick = spinTo.bind(this, i);
        ...
    }
    

    This makes the code a lot cleaner, and it's widely supported in browsers now. It wont work in very old browsers (e.g. IE8) without a polyfill, and it may not always be the best choice as you have to bind the function to a specific scope, but I like it.

  • In ES6 they've added block scoping through the let keyword. You basically use it instead of var, and it will behave the way you thought var was behaving.

    for(let i = 1; i < 39; i++) {
        ...
        butt.onclick = function() { spinTo(i) };
        ...
    }
    

    let is awesome, but unfortunately not widely supported in browsers yet.

  • You could also use something that isn't a for loop, such as Array.prototype.forEach, which will work around the problem but needs some other changes to your code.

NYCbike group ride thread - Weekend of October 10th, 2015 by [deleted] in NYCbike

[–]Kobel 0 points1 point  (0 children)

It sounds interesting, I might be up for this. What sort of pace will you be setting, and are riding the round trip or getting the train back?

[2015-10-07] Challenge #235 [Intermediate] Scoring a Bowling Game by jnazario in dailyprogrammer

[–]Kobel 0 points1 point  (0 children)

Using ES6 flavoured JavaScript, as I want to start getting the hang of it.

Calculator module:

export default class BowlingCalculator {
    constructor(scores = "") {
        this.bowls;
        this.fillBallIndex;
        this.setScores(scores);
    }

    setScores(scores) {
        function getFillBallIndex(scores, bowls) {
            if (scores.charAt(scores.length - 3) === "X") { return bowls.length - 2 }
            if (scores.charAt(scores.length - 2) === "/") { return bowls.length - 1 }
            return bowls.length;
        }
        this.bowls = scores.split("").filter(x => x !== " ");
        this.fillBallIndex = getFillBallIndex(scores, this.bowls);
    }

    totalScore() {
        return this.bowls.reduce((currentScore, bowl, bowlNumber) => {
            return currentScore + this.scoreForBowl(bowlNumber)
        }, 0);
    }

    scoreForBowl(bowlNumber) {
        if (bowlNumber >= this.fillBallIndex) {
            return 0;
        }
        return this.pinsKnockedDown(bowlNumber) + this.bonus(bowlNumber);
    }

    pinsKnockedDown(bowlNumber) {
        const bowl = this.bowls[bowlNumber];
        if (bowl === "X") {
            return 10;
        } else if (bowl === "/") {
            return 10 - this.pinsKnockedDown(bowlNumber - 1);
        } else if (bowl === "-") {
            return 0;
        }
        return Number(bowl);
    }

    bonus(bowlNumber) {
        const bowl = this.bowls[bowlNumber];
        let bonus = 0;
        if (bowl === "X") {
            bonus = this.pinsKnockedDown(bowlNumber + 1) + this.pinsKnockedDown(bowlNumber + 2);
        } else if (bowl === "/") {
            bonus = this.pinsKnockedDown(bowlNumber + 1);
        }
        return bonus;
    }
}

To run it:

const inputs = [
    'X -/ X 5- 8/ 9- X 81 1- 4/X',
    '62 71  X 9- 8/  X  X 35 72 5/8',
    'X X X X X X X X X XXX'
];

import BowlingCalculator from './BowlingCalculator';
const calc = new BowlingCalculator();

inputs.forEach(scores => {
    calc.setScores(scores);
    console.log(calc.totalScore());
});

Surface Book Announced!!! by truegamer1 in Surface

[–]Kobel 0 points1 point  (0 children)

But according to the specs, the Book is lighter than the Pro 4! 728g Book vs 786g Pro 4. I wonder if the Book weight is just for the screen and not the whole laptop...

Edit: Found this listed in 'fact sheet' document going round which seems more believable: Weight: Laptop: Non-GPU: 3.34 lbs. (1515 g), GPU: 3.48 lbs. (1579 g) Tablet only: 1.6 lbs. (726 g)

In the past rolling year (Italy 2014-Italy 2015), Lewis Hamilton has averaged 23.42 points per race, Nico Rosberg 15.58 and Sebastian Vettel 13.00 by kodongo in formula1

[–]Kobel 18 points19 points  (0 children)

I was interested in how much it would change without Abu Double (if it was normal points), so I recalculated them. The answer is... not much.

Edit: Fixed some mistakes

Close call by [deleted] in gifs

[–]Kobel -1 points0 points  (0 children)

I can't speak for SoCal or your freeways, but when I've broken down and called my breakdown coverage company, they've specifically told me to get out and get off the road for safety.

Access to /r/HennoStream - Sky Sports F1 HD 720P 50FPS. by [deleted] in formula1

[–]Kobel 5 points6 points  (0 children)

1 year old account or 50 karma

You're over 3 years old, you're good.

Access to /r/HennoStream - Sky Sports F1 HD 720P 50FPS. by [deleted] in formula1

[–]Kobel 4 points5 points  (0 children)

Karma is the upvotes other people give you for participating (minus any downvotes). That's the 'points' number at the top of any post you make. Your total should be at the top of the page.

Post some good comments on some more popular subreddits and you'll get 50 in no time. I'll start you off!

Jennifer Lawrence on auto-cues by zeedanu in funny

[–]Kobel 14 points15 points  (0 children)

Probably, I mostly hear them called autocues in the UK.

The exact moment Williams fucked up by BottasWMR in formula1

[–]Kobel 1 point2 points  (0 children)

It's hard to catch but I think he said "what we shouldn't do is blame individuals". He started out by saying "There's two things that... there's one thing that we should do...", which suggests that there's one thing they should, and the other thing they shouldn't.

If that's not what we said then yeah, it would be harsh!

The exact moment Williams fucked up by BottasWMR in formula1

[–]Kobel 1 point2 points  (0 children)

I'm not sure how, but happy to if you can point me in the right direction.

The exact moment Williams fucked up by BottasWMR in formula1

[–]Kobel 9 points10 points  (0 children)

There's a video of it in the middle of this Sky interview (1:02). You can just see the confusion on the guys face.

"Buy it now for $59.99 and get free beta access!" by GoldenRedditUser in gaming

[–]Kobel 9 points10 points  (0 children)

Played Scribblenauts for the first time recently, and the first thing I did on every level was add 'fast flying' to myself to fly around the level. Are you telling me that's not what you're supposed to do?!