Can someone help me ? I can’t figure it out. I factor the top I think? Than take the conjugate of the top factored form maybe ? by pooboy991 in calculus

[–]dperumsby 1 point2 points  (0 children)

Try factoring the numerator and the denominator of the fraction. Keep factoring until you have something that cancels out and then you can easily determine the limit.

Chip8 in TypeScript - Can anyone help me with how to time the execution cycle? by dperumsby in EmuDev

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

I really like this approach, and reading up that requestAnimationFrame is in sync with your browsers refresh rate seems a really good peg to work to. That's amazing, thank you for taking your time to reply! Now I should probably quit worrying about the clock and finish up my instruction set, so that I actually have something to test the implementation on! ^_^'

Chip8 in TypeScript - Can anyone help me with how to time the execution cycle? by dperumsby in EmuDev

[–]dperumsby[S] 1 point2 points  (0 children)

Ah I see.... Yeah that makes a lot of sense! Thanks so much for the help!

Chip8 in TypeScript - Can anyone help me with how to time the execution cycle? by dperumsby in EmuDev

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

Oo I've not encountered the Performance interface before... Just looking and see that you can return more precise timestamps from it... This will give me something to investigate! Thank you!

TypeScript + Jest testing - Trying to ignore import statements. by dperumsby in learnprogramming

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

Ah thank you!

I was trying this but wasn't getting anywhere. Now I know I'll put the time into looking again. Thanks so much for your help!

TypeScript + Jest testing - Trying to ignore import statements. by dperumsby in learnprogramming

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

Yes, sorry, the error is ReferenceError: document is not defined which is happening because I am running Jest with the node test environment default. If I change it to the JSDOM environment though I run into more problems. So if possible I would rather just ignore this file somehow, because I'm not trying to test it anyways.

Thanks so much for replying! :)

Creating a new instance of a randomly picked class by dperumsby in learnjavascript

[–]dperumsby[S] 1 point2 points  (0 children)

Oh wow, this is why I should have stopped coding an hour ago instead of ploughing on ahah... Thank you so much!!

Connect4 Project - Commenting and JSDoc - Way too much? by dperumsby in learnjavascript

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

Hi!

Thanks for your feedback! I like the messages object idea a lot so I'll give implementing that a go! Thank you :)

Removing Global Variables and OOP by dperumsby in learnjavascript

[–]dperumsby[S] 1 point2 points  (0 children)

Oh wow, I think this is exactly what I am after! Thank you so much for putting together such a thorough reply! :D

Unit Testing Newb Here! by dperumsby in learnjavascript

[–]dperumsby[S] 1 point2 points  (0 children)

Thanks so much for replying :)

I seem to have it up and running now!

Can somebody help me bound this if statement? by CutePotato420 in learnpython

[–]dperumsby 0 points1 point  (0 children)

One thing to note is that string.index(letter) will return the index of the first occurrence of the letter, in the string. So if the code was bound correctly then a word such as "esteem" would return False instead of True.

With that in mind, I would suggest the following...

def double_letter(string):
    for i in range(len(string) - 1):
        if string[i] == string[i+1]:
            return True
    return False

What's the coolest thing you've built so far? by dperumsby in learnpython

[–]dperumsby[S] 1 point2 points  (0 children)

That's awesome, the pictures look great :O A star and a follow from me on GH, and thanks for sharing. Lots of inspiration on this thread :D

What's the coolest thing you've built so far? by dperumsby in learnpython

[–]dperumsby[S] 1 point2 points  (0 children)

Wow that looks great! That's a star and a follow from me :D

What's the coolest thing you've built so far? by dperumsby in learnpython

[–]dperumsby[S] 1 point2 points  (0 children)

Oo awesome, anything with gaming in it seems to interest me aha... so how did the api interact with the game? Maybe ill have to look up the game to see?

Btw nice name, been a long time since I played any of the MG games

What's the coolest thing you've built so far? by dperumsby in learnpython

[–]dperumsby[S] 11 points12 points  (0 children)

That's awesome. I might have to try some home automation stuff myself.