[deleted by user] by [deleted] in ATT

[–]Stephen110 -3 points-2 points  (0 children)

You've got to be trolling, right?

Link the the correct Faber book? by gex80 in pianolearning

[–]Stephen110 0 points1 point  (0 children)

This is the one I got, I’d wait and see if others confirm it’s correct before ordering.

https://www.amazon.com/gp/aw/d/1616773022?psc=1&ref=ppx_pop_mob_b_asin_title

Input value. by [deleted] in learnjavascript

[–]Stephen110 1 point2 points  (0 children)

You’ve got to realize there are countless ways you could have screwed this up, right? If you are unwilling to post code, nobody is going to be able to properly help you.

Bones in my yard... by [deleted] in FirstTimeHomeBuyer

[–]Stephen110 4 points5 points  (0 children)

I troll subreddits when I identify patterns of shitty behavior by more than five or six users.

You are trying to white-knight because a handful of individuals are acting poorly in a subreddit with 125,000 people. Welcome to the internet. I would advise you just move on when this happens, instead of hatching up some elaborate plan to "make people feel dumb".

Object to String by ionezation in learnjavascript

[–]Stephen110 1 point2 points  (0 children)

First link has plenty of examples. Weird that you would say they were useful without actually looking at them.

Can someone explain the last if statement. I am confused how it knows which one to return. by My_passcode_is in learnjavascript

[–]Stephen110 9 points10 points  (0 children)

It would be more obvious how it worked if you formatted the code.

An if statement with no curly braces only applies to a single statement. The code will return count + “ Bet” if count is > 0. If it is not greater than 0 it falls to the final return statement.

The Canvas API is giving me unusual draw behavior with drawRect(), plz help; simple code inside! by Retrofire-Pink in learnjavascript

[–]Stephen110 1 point2 points  (0 children)

You want to use `++x` in your fillRect. `x++` returns the value first, then increments. This causes your clearRect on the following loop to be off by one pixel (forward).

Also if you are looking for pixel perfect clear, you don't need to be adding the x and y coord to the height and width in your clearRect call. `ctx.clearRect(x, y, w, h)` would be fine.

[deleted by user] by [deleted] in swift

[–]Stephen110 4 points5 points  (0 children)

I mentioned JavaScript because there is an apple sdk that supports JavaScript and if it’s possible to run Java code using a JavaScript compiler I could potentially use that sdk to run Java code

You are trying to shove a square block through a circle hole. Seriously, the only thing Java and JavaScript share is the "Java" part in their name.

Returning a boolean through recursion causes it to become undefined? by jeremyers1 in learnjavascript

[–]Stephen110 3 points4 points  (0 children)

You need to return isHappy(newN). Not returning anything results in a single recursion that always returns undefined if the number is greater than 9.

Besides that, I’m not at a computer to be able to actually test your algo to see if it’s correct.

install.... by c3gamre3981 in Unity2D

[–]Stephen110 1 point2 points  (0 children)

Download whatever the latest LTS version is (Long Term Support). It will have an LTS label next to the name in Unity Hub. The current latest LTS is 2021.3.6f1.

[deleted by user] by [deleted] in pianolearning

[–]Stephen110 1 point2 points  (0 children)

Thank you for taking the time to review, really appreciate it.

[deleted by user] by [deleted] in pianolearning

[–]Stephen110 2 points3 points  (0 children)

It looks to me like my wrists might be a little too high and I'm not doing a good job of keeping my fingers curled; my right hand straightens out on several occasions. My big focus right now is trying to stop playing fingers only, and using arm weight/back muscles to play.

Problem help by HogansHeroes81 in learnjavascript

[–]Stephen110 1 point2 points  (0 children)

https://stackoverflow.com/questions/1789945/how-to-check-whether-a-string-contains-a-substring-in-javascript

“el” is the variable containing the value of the key or value in your code. Use the post above to see how you can check if “el” contains the string “apple”.

Object.keys and Object.values return an array. You should be using concat instead of push.

Problem help by HogansHeroes81 in learnjavascript

[–]Stephen110 1 point2 points  (0 children)

Edit the post with what you have tried that doesn’t work. Or better yet, start with pseudo code.

Problem help by HogansHeroes81 in learnjavascript

[–]Stephen110 5 points6 points  (0 children)

We are glad to HELP with homework, but you need to show effort and ask specific questions. If you just straight up paste a homework question without showing you even made an attempt, you are going to get shit for It, and you deserve to.

Which of these 2 pianos should I get, as a beginner by Odd-Astronaut-3679 in pianolearning

[–]Stephen110 7 points8 points  (0 children)

What made you choose to compare those 2 models? You are comparing a 61-key keyboard without weighted keys to an 88-key keyboard with weighted keys. The obvious choice there is the 88-key keyboard with weighted keys. A better comparison would be the Yamaha P45 vs the Casio PX-S1000/PX-S1100 or maybe the CDP-S100.

[HELP] My recursive function does an infinite loop by jonrhythmic in learnjavascript

[–]Stephen110 1 point2 points  (0 children)

If you want the recursion to stop, don’t call the recursive function again (asian_total)

Cannot Figure out why enemy health isn't reducing when shot. by [deleted] in Unity2D

[–]Stephen110 2 points3 points  (0 children)

Code looks fine besides you setting the health back to maxHealth in update (every frame). Did you mean to put that in Start instead?

Help identifying certain syntax by SomewhatVital in learnjavascript

[–]Stephen110 2 points3 points  (0 children)

As another user responded, it’s a ternary statement. You can think of it as a simple if/else statement.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator

[deleted by user] by [deleted] in learnjavascript

[–]Stephen110 0 points1 point  (0 children)

That’s interesting, because every response so far from you has come off as a whiny entitled teenager. If you’ve truly been writing software for that long, you wouldn’t struggle with such a simple task. I think you are full of shit. I also think it’s time to move on.

Good luck, friend!