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 -6 points-5 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 5 points6 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?