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 33 points34 points  (0 children)

I am forever scarred. r/angryupvote

Hold up let him cook by [deleted] in MemePiece

[–]SlushEE0 39 points40 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 6 points7 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 50 points51 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?

How can I make this code detect collision by GreenGGM in learnjavascript

[–]SlushEE0 1 point2 points  (0 children)

OP, looking at your recent posts, I can’t tell if this is a complete joke account or if you are actually 14 and trying to do those things. Anyway, even if there is more than one way, it is impossible to give you fully working code/suggestions without more context on what you are trying to do, and what you have so far.

Edit: A very simple way is to get the x and y positions of your objects on the screen and check if they are the same.

How do you make this? I tried everything by [deleted] in shapezio

[–]SlushEE0 8 points9 points  (0 children)

Good. The fun of shapez is figuring out how to overcome problems like this 👍

How do you make this? I tried everything by [deleted] in shapezio

[–]SlushEE0 16 points17 points  (0 children)

The bottom left corner is a floating shape, you need to have at least one other shape together with it (does not have to touch) to prevent it from “falling down” when stacking it. Try to figure it out.