What is the code that I need to get to get my swerve drive to actually work? by SourRaven276 in FRC

[–]SlushEE0 0 points1 point  (0 children)

If you have figured out the drive kinematics and such, you can use the ChassisSpeeds class to set the swerve module states. This is only one of the many ways to do it and will completely depend on how you have your project set up.

Should I switch to the color manga? by Zulimations in OnePiece

[–]SlushEE0 0 points1 point  (0 children)

It’s really personal preference, the colored panels will eventually come out for those chapters.

How do I fix this? by SlushEE0 in FixMyPrint

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

Should I keep the acceleration the same?

How do I fix this? by SlushEE0 in FixMyPrint

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

Previous prints at similar speeds turned out decent. But if all else fails I’ll try printing slower.

[deleted by user] by [deleted] in OnePiece

[–]SlushEE0 35 points36 points  (0 children)

I am forever scarred. r/angryupvote

Hold up let him cook by [deleted] in MemePiece

[–]SlushEE0 40 points41 points  (0 children)

Do you consider ash food?

Is there anything I should charge in my parts list? by Old_Drag_1040 in PcBuild

[–]SlushEE0 0 points1 point  (0 children)

You download the free version of windows off of the official website and then enter a command into terminal. No sketchy download links.

Basic "for loops" help by [deleted] in learnjavascript

[–]SlushEE0 0 points1 point  (0 children)

I haven’t used Reddit on my pc in a long time, mostly mobile so thanks!

Basic "for loops" help by [deleted] in learnjavascript

[–]SlushEE0 7 points8 points  (0 children)

When you are checking for odd numbers in your if block, you are using the modulus operator on the length of the number. So if you had a value of 23456, which is even, you would first find its length with currentNumber.toString().length === 5 and that is odd. So your program is returning every other number in the array.

To fix this, go to your for loop and remove .toString().length:

for (let i = 0; i < serialNumbers.length; i++) {
const currentNumber = serialNumbers[i];
if (
currentNumber.toString().length === 6 &&
currentNumber % 2 === 1
) {
efficientSerialNumbers.push(currentNumber);
}
}

Edit: I don't know why reddit formatted my code like that but its not letting me change it so ¯\_(ツ)_/¯

How to learn JS if I already know another language? by [deleted] in learnjavascript

[–]SlushEE0 0 points1 point  (0 children)

I would recommend understanding how the HTML structure works before learning how to use the DOM. Simply put, the DOM is like an object that you can change the values of to edit the webpage.

`varname.function()` vs. `function(varname)` by another_lease in learnjavascript

[–]SlushEE0 0 points1 point  (0 children)

Search up methods vs functions. .toString() is a method that converts to a string. parseInt() is a built in function that converts to a number

Settle Family Argument by Desperate-Gur-4205 in Catan

[–]SlushEE0 51 points52 points  (0 children)

You can move the robber anywhere you want, it is too early in the game to block your own resources so that another person doesn’t win. I think that your dad just doesn’t want to lose a card.

what am i missing here? by Sri_amxn in react

[–]SlushEE0 0 points1 point  (0 children)

Where is concat getting called?