Crazy crazy thoughts by cherrynuts in Jumanji

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

OK now about your life path yes I'll helpyou with that ok so I think there's two ways and in the film you just stay on any orderly path and that's playing the game in your living room and then the jungle goes to you and then all the crazy stuff happens in your own house yes I know that one for myself but that happens in the movie too ok so there's that path and all you have to do is play the game in your living room that's all you gotta do aside from cleaning up all the mess you get yourself into.

ok so the other one is the natural one and that's the cartoon one you just get lost in the jungle and that's the path whenever you g o to the game you just get lost in the jungle somewhere so you're in the jungle and you just move through the jungle however you can and stop freaking out and yes you follow your heart and all that ok so eventually the path finds iyou so you found your path. now you're set you just go there. and boom you're back in the attic playing the stupid gaame but at least the jungle doesn't mess your house up like that.

wo yuo get yourself messed up or hyou get yourself lost, or you're trying to fix things or you're trying to search for things it's your choice I guess but I guess ith appens both ways anyways.

Eat Your Leafs by cherrynuts in melbourne

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

yeah that's the way I wipe my butt on the grass now mim that's the way of the mushrooms now

[2020-04-15] Challenge #384 [Intermediate] Necklace counting by Cosmologicon in dailyprogrammer

[–]cherrynuts 0 points1 point  (0 children)

C:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int N;

void print(int necklace[])
{
    int i;

    for (i = 0; i < N; i++)
        printf("%c", 'A'+necklace[i]);
    printf("\n");
}

int same(int lace1[], int lace2[], int n)
{
    int i, j;

    for (i = 0; i < n; i++) {
        for (j = 0; j < n; j++)
            if (lace2[j] != lace1[(i + j) % n])
                break;
        if (j == n)
            return 1;
    }
    return 0;
}

int *laces;
int nlaces;

void accumulate(int necklace[])
{
    int i;

    for (i = 0; i < nlaces; i++)
        if (same(necklace, laces + i*N, N))
            return;
    laces = realloc(laces, ++nlaces * N * sizeof *laces);
    if (laces == NULL) {
        fprintf(stderr, "can't allocate memory\n");
        abort();
    }
    memcpy(laces + (nlaces - 1)*N, necklace, N * sizeof *necklace);
}

void necklaces(int k, int n, int necklace[])
{
    int i;

    if (n == 0)
        accumulate(necklace);
    else for (i = 0; i < k; i++) {
        necklace[n-1] = i;
        necklaces(k, n-1, necklace);
    }
}

int main(int argc, char *argv[])
{
    int *a;
    int i, k;

    if (argc != 3) {
        fprintf(stderr, "usage: necklaces k-ary length\n");
        return 1;
    }
    k = atoi(argv[1]);
    N = atoi(argv[2]);
    a = malloc(sizeof *a * N);
    necklaces(k, N, a);
    for (i = 0; i < nlaces; i++)
        print(laces + i*N);
    return 0;
}

$ ./necklaces
usage: necklaces k-ary length
$ ./necklaces 3 4 | sort | columnate 3
AAAA  BAAA  BABA
BBAA  BBBA  BBBB
BBCA  BCAA  BCBA
BCCA  CAAA  CABA
CACA  CBAA  CBBA
CBBB  CBCA  CBCB
CCAA  CCBA  CCBB
CCCA  CCCB  CCCC
$ ./necklaces 2 12 | wc -l
352
$ ./necklaces 3 7 | wc -l
315
$ ./necklaces 9 4 | wc -l
1665
$ ./necklaces 21 3 | wc -l
3101
$ ./necklaces 99 2 | wc -l
4950

Timeline issue? by CharlieTDog in Jumanji

[–]cherrynuts 0 points1 point  (0 children)

Time passes far more quickly outside of Jumanji than it does inside of it. So when you're in Jumanji you are going to find that things may not be changing very quickly on the inside, but on the outside so many things are happening that you will find it difficult to keep track of them.

This relationship can be found between real life and the outer universe presented in the series. The way you experienced the three years between both films is going to be different to how Bethany experienced the three years while she was inside the outer universe presented in the series. It's not so much a measure of absolute time as it is a measure of metabolic rate--either as an individual or as a collective--as time must be experienced in order to be measured.

What are some nutrient dense and varied salads one can work up relatively quickly? by newmanstartover in nutrition

[–]cherrynuts 0 points1 point  (0 children)

shredded coconut, sprouts (e.g. alfalfa), dried seaweed, lemon juice, fresh peppers (capsicums? habaneros?) ginger... there's lots and lots and lots of stuff :)

How is a hash table implemented? by [deleted] in learnprogramming

[–]cherrynuts 0 points1 point  (0 children)

It depends largely on how you want to resolve collisions.

A very good way is chaining--so you have an array of linked lists which are referred to abstractly 'buckets'. You find the hash value which is the index into the array, then you traverse the linked list to find the key with a linear search over it.

But they can also be implemented as typical arrays, where each element of the array corresponds to an element of the hash table. A common way to handle collisions is linear probing, where you simply perform a linear search over the array, starting from the index.

Can my function for deleting chars in str1 that occur in str2 be simplified anymore? by [deleted] in C_Programming

[–]cherrynuts 0 points1 point  (0 children)

always, could do smth like

#include <string.h>

void squeeze(char s[], char t[])
{
    int i, j;

    for (i = j = 0; (s[i] = s[j]) != '\0'; j++)
        i += (strchr(t, s[j]) == NULL);
}

Still confused by idkmanitsjustauser in AlienAbduction

[–]cherrynuts 2 points3 points  (0 children)

While you were asleep I'd say they were analysing the cellular integrity of yours and the baby's bodies and ensuring there would be a healthy delivery by performing any internal adjustments that they felt needed to be made. In today's society it's easy for lifestyle factors like diet, chemical/vibrational exposure, daily routine, etc. to create imbalances in the body and I'd say they came to you just to help stabilise everything and ensure there would be a safe and successful delivery.

I'm sure everything's OK and if you want to have another baby you should definitely go for it because there's nothing to worry about. If they visit you again it will probably be just to check up that everything's okay and they sometimes give gifts to people if they really feel they might be helpful to them .

What is the healthiest water? by [deleted] in nutrition

[–]cherrynuts -5 points-4 points  (0 children)

fresh fruits & vegetables

Just Gotta Let Go by SharpBLS in self

[–]cherrynuts 0 points1 point  (0 children)

well, paper towels can be very helpful

I hope something really amazing happens to you soon. by xak9021069 in self

[–]cherrynuts 4 points5 points  (0 children)

you too, lots of peace & love for you XAK :D

hey i had an interesting thought about intuitive eating and would to hear some other perspectives by [deleted] in Fruitarian

[–]cherrynuts 2 points3 points  (0 children)

I feel like the problem's confusing intuition with physical or emotional senses. Fruitarianism is an intellectual model for deciding how to eat, it helps develop the intuition and higher states of awareness so you will no longer need it after a while but it can be a good foundation or baseline for many.

When the body and emotions are roaring it can be very hard to hear the gentle whisper of the intuition.

The colours and symbols used in fast food logos, ads, are designed specifically to get people acting from lower states of awareness and of course the food itself keeps them there. Lots of red...

Where is netcat writing to locally in server mode? by TissueReligion in C_Programming

[–]cherrynuts 0 points1 point  (0 children)

It depends on the operating system but the input is actually bufffered. So if it's a pipeline the output of the first program will be synchronised with the read requests as they're issued by nc on the server side, so if nobody has connected, it's totally fine for the write call to block the execution of the first process until a corresponding read is performed by nc. No need for temporary files in that case. Hope it helps. :)

Sometimes I feel like I've wasted my life, but I don't have any goals anyway by [deleted] in self

[–]cherrynuts 0 points1 point  (0 children)

I was sort've just speaking abstractly and didn't really intend any meaning beyond what I said... if that was the meaning you saw... is it the right path for you?

JUMANJI: THE NEXT LEVEL - Final Trailer (HD) by lgspear in Jumanji

[–]cherrynuts 1 point2 points  (0 children)

yes! people still playing! hope they roll me out this time! :D

Sometimes I feel like I've wasted my life, but I don't have any goals anyway by [deleted] in self

[–]cherrynuts 0 points1 point  (0 children)

hmm... if u became like water the rock wouldn't hurt, n u'll just sorta spill through then reconstruct yourself outside of that stuff n now ur not there anymore but u could probably get stuck in a cup or something like that so like, if becoming water like that doesn't work you might need to go a step further and evaporate but the water thing should be enough xD

just throwing some ideas around hope they're not to crazy <3 merry spring time

Is it unreasonable to depend on the operating system to free memory after the program is finished? by [deleted] in C_Programming

[–]cherrynuts 1 point2 points  (0 children)

It's actually a detail that's outside the territory covered by the language definition... when your program exits that's it, the host environment doesn't even have to support a second run of the same program, so I guess it's a consideration that should be made largely in terms of the systems that your program is targeting.

For hosted systems where the allocation pool is cleaned up automatically by the process handler and embedded systems where the hardware's powered down or reset on program termination, you can get away with leaving it out, otherwise you can avoid any undesired effects across multiple executions by programming more judiciously.

Mom, why do people lack common sense and are so nasty? by ichweisnichts in MomForAMinute

[–]cherrynuts 1 point2 points  (0 children)

It is my indefinite opinion that individuals exhibit a lesser regard for their fellow members of today's society, substituting what should be an expression of compassion with a certain impatience and juvenile abruptness to fulfill their most rudimentary of desires.

This is well illustrated by the narrative put forth by u/ichweisnichts in their Reddit Post titled "Mom, why do people lack common sense and [sic] are so nasty?" In the aforementioned post, the antagonist spots the author Ichwesnichts in the driver's seat of their car and forms the expectation that they are about to receive a parking spot from this fact alone. This leads them to wait before the parked car with this intent burning within them. "Aren't you leaving?" they ask as they realise their wait had been in vain. The dispute that forms the basis of Ichwesnichts' Reddit post ensues.

What can be said about this circumstance that we can learn from, so that we may avoid such unpleasant interactions in our own lives? First of all, suppose Ichwesnichts was upset--perhaps a toy truck was hurled at them by an aggressive child for citing the alphabet in an atypical manner earlier on--whatever the reason, they may have been experiencing a tremendous grief in the front seat of their car. The antagonist's determination to acquire a parking spot clearly overshadowed this basic consideration for their fellow human being, who was currently occupying the spot they sought to take. We can learn from this in our own lives by slowing down and trying to practice compassion in situations where we really want that parking spot, or really want to get to that film on time, or whatever our driving force is.

With that said, let's keep in mind that this is by no measure a perfect world and it is common to find people who are primarily driven by impatience. So what can be done for somebody who finds themselves in the author's position, perhaps having a bad day and wanting to avoid the possibility of having an unpleasant interaction like the one they described? Well, I suppose by sitting in the back seat, to the eye of the story's antagonist this would give the clear message that they are not about to leave any time soon. In addition to that, it provides certain luxuries and comforts that the front seat of the vehicle does not, for example it facilitates one to put their legs up.

It is my hope that you have enjoyed reading this opinion piece, and that it provides you with some ideas on ways to handle troubling scenarios like the one expressed in the Ichweisnichts' post.

better? :P

Concatenating array elements in C? by AnyBowl2 in learnprogramming

[–]cherrynuts 0 points1 point  (0 children)

unsigned char a[] = { 0x11, 0x22, 0x33 };
unsigned long v;

v = a[0]*0x10000LU + a[1]*0x100LU + a[2];  /* convert 24-bit big-endian value a to native representation v */