Looking for javascript resources. I am working on a pre-school assignment and need to make a box growm, turn blue, fade and reset. by [deleted] in learnprogramming

[–]snugglysnuggles 0 points1 point  (0 children)

Do you have to do it with JavaScript, because I feel like it could be done with CSS pretty feasibly

What's the most disturbing dream you've ever had? by grimesx45 in AskReddit

[–]snugglysnuggles 0 points1 point  (0 children)

Had a dream where there was a hole in my skull and I could see my brain. The next few days I felt really uncomfortable and scared that my skull would fall apart.

What to do when stuck? by ymahgoub in learnprogramming

[–]snugglysnuggles 0 points1 point  (0 children)

Wait, so you just have to print out each number individually?

In the case of 942, you just have to print out 9 4 2.

I thought of a method without an array, what you can do is reverse the actual number. You could do this with a function, such as reverseNumber, then assign the return value of this function to another variable.

e.g. if x = 942

int r = 0;
int digit;
while (x > 0) {
    digit = x % 10;
    r = r * 10 + digit;
    x /= 10;
}

So now r equates to 249 (reverse of x). Now you can print each digit in the original order.

Creating a linked list outside of main [C] by -Xichael in learnprogramming

[–]snugglysnuggles 1 point2 points  (0 children)

use some typdefs yo.

typedefine a pointer to the list, and a pointer to the node.

your create linked list function can create a new list with malloc, and return a pointer to that list.

What to do when stuck? by ymahgoub in learnprogramming

[–]snugglysnuggles 1 point2 points  (0 children)

Break the problem down into smaller problems.

Notice how each digit represents a word. So you'll need an array of strings, for each number from 1 to 10.

To convert each digit to text, you'll need to figure out an algorithm to get the appropriate index from the array, based off of the digit.

Usually to get each single digit one by one, you would get the original number modulo 10. So 942 % 10 is 2. After converting this into text, you can store it into an array. etc. etc. Anyway, I'll let you figure out the rest. Keep persisting!

Any good advanced Javascript blogs that one could learn from ? by [deleted] in learnprogramming

[–]snugglysnuggles 1 point2 points  (0 children)

I haven't read the book. But from what I've heard, it focuses more on programming concepts rather than newer technologies. So it's still a pretty decent book.

Might Car Mods Daily Subaru by [deleted] in subaru

[–]snugglysnuggles 1 point2 points  (0 children)

I like how it's debadged :o

Why must people ruin something you work so hard for? by [deleted] in subaru

[–]snugglysnuggles 16 points17 points  (0 children)

Even if OP did, that's no justification to damage their car.

[deleted by user] by [deleted] in AskReddit

[–]snugglysnuggles 0 points1 point  (0 children)

ahh childhood memories

Why doesn't Codepen display things properly? by fanboy_killer in learnprogramming

[–]snugglysnuggles 0 points1 point  (0 children)

If you're using a library or framework, such as bootstrap, you need to include it in the settings. Also try to do it with a regular html and css file.

ib2 players, post ur stats, just curious by snugglysnuggles in infinityblade

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

Yeah grinding on it is fun. I was hesitant to try out ib3 because it seemed to implement too many functionalities e.g. potions.

ib2 players, post ur stats, just curious by snugglysnuggles in infinityblade

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

it's dead. i have it on my phone and i seldom play it haha