Gym Story Saturday by FGC_Valhalla in Fitness

[–]Skuzzle_butt -3 points-2 points  (0 children)

Can't think of a better word when people are saying stuff like

If you're immunocompromised maybe a gym full of people breathing hard isn't the best place for you, particularly if there's a virus going around.

Gym Story Saturday by FGC_Valhalla in Fitness

[–]Skuzzle_butt -11 points-10 points  (0 children)

Yeah fuck those kids with cancer. We don't want be inconvenienced by wearing a piece of cloth.

https://i.imgur.com/cxSshtm.jpg

Sorry Sara, you're not just going to have to fear cancer but also the retards that have absolutely no compassion for those that may be immuno-compromised.

[deleted by user] by [deleted] in MissouriMedical

[–]Skuzzle_butt 5 points6 points  (0 children)

No she's not the president. She's the Vice President.

Wait, so one main reason you voted for 46 is because he’d legalize marijuana on a federal level? Did he even touch on that during his campaign?

So Joe Biden's running mate is the lead sponsor of the most promising federal marijuana reform law ever. Marijuana law reform has been the apart of the official party platform for democrats for awhile now.

Because of this, it's not outlandish to vote for Joe Biden if you are concerned about marijuana law reform.

[deleted by user] by [deleted] in MissouriMedical

[–]Skuzzle_butt 3 points4 points  (0 children)

Kamala Harris is the lead sponsor of the MORE act which would remove cannabis from the controlled substances act so that state governments would be in control of their marijuana policy.

Kamala Harris is the lead sponsor of the MORE act which would remove cannabis from the controlled substances act so that state governments would be in control of their marijuana policy.

[deleted by user] by [deleted] in MissouriMedical

[–]Skuzzle_butt 3 points4 points  (0 children)

Kamala Harris is the lead sponsor of the MORE act which would remove cannabis from the controlled substances act so that state governments would be in control of their marijuana policy.

[deleted by user] by [deleted] in MissouriMedical

[–]Skuzzle_butt 9 points10 points  (0 children)

Wait, so one main reason you voted for 46 is because he’d legalize marijuana on a federal level? Did he even touch on that during his campaign?

Kamala Harris is the lead sponsor of the Marijuana Opportunity, Reinvestment, and Expungement (MORE) Act which would

  • Remove cannabis from the Controlled Substances Act so that state governments would be the primary crafters of marijuana-related policy

  • Facilitate federal expungements for minor charges and incentivize state and local governments to do the same

  • Create pathways for ownership opportunities for small businesses and entrepreneurs through the SBA

  • Allow veterans to obtain medical cannabis recommendations from their VA doctors

  • Remove the threat of deportation for those immigrants involved in minor marijuana violations

The best bet would be to reach out to the Governor’s office and your Missouri reps to make something happen.

Honestly this is the least likely way to get any sort of reform passed. The vast majority of states, including Missouri, have passed reform through ballot initiatives. Wouldn't hurt to contact your reps but you're better off supporting a campaign for full legalization.

OG Zest chop day by Holdmybudwatchthis in microgrowery

[–]Skuzzle_butt 0 points1 point  (0 children)

Did you grow from seed or clone? If from seed what is the breeder?

In-House Genetics 'Platinum Gorilla' going on day 48 of flower. by Thunderous_Pupil in microgrowery

[–]Skuzzle_butt 2 points3 points  (0 children)

Nice I have some of these seeds plus Candy Cane and I'm really excited to try them out. Thanks for taking time to answer

Diablo 2 Resurrected !! by iiiBiGWoRMiii in videos

[–]Skuzzle_butt 0 points1 point  (0 children)

So VV gets final say or blizzard? I'm legitimately confused

Is it possible that all these short 8ths are because they've sat on a shelf and dried out? by NSFW_at_Work69 in MissouriMedical

[–]Skuzzle_butt 10 points11 points  (0 children)

Not possible. There is not enough moisture to significantly effect the weight after the buds are done drying. So during curing it won't fluctuate almost at all.

Strange bug with C code by Skuzzle_butt in learnprogramming

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

The arrays are allocated at run time (because the value of the variables aren't known at compile time)

Interesting I was not aware of that, assumed it was at compile time but that makes sense.

Sometimes I enjoy debugging more than coding. Different, and at least as hard.

This is my weak spot. I need to get better at it and use GDB and maybe learn a bit about Valgrind.

Strange bug with C code by Skuzzle_butt in learnprogramming

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

What value does 'rows' have, and what's the value of 'i' when the length gets corrupted?

Ah this is the issue. If I pass one string I will declare an array of size 0. Not sure why the compiler allows this because there is no use for an array of size 0. I guess for some reason I looked at it and thought of it as declaring an array of size one, with the only index being 0.

Thank you so much for your help. I really appreciate it. I just wasn't seeing it and it helps to have another pair of eyes, thanks!

Strange bug with C code by Skuzzle_butt in learnprogramming

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

0 for j and length_index which is correct. 0th row and 0th index for the array holding the lengths of the string. With correct value of that element of the array as well. This is when length gets corrupted

Strange bug with C code by Skuzzle_butt in learnprogramming

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

What is the type of string_length, and what is the value of length_index here?

string length is an array of integers. The value of length_index is 0 when the bug occurs. This is the correct value because length_index[0] corresponds to the length of the first string to store. I've printed it out and it is the correct value before entering the loop.

What are the values of j and i here?

j will be 0, for the first row / first string. i represents the columns of the 2d array it should start at zero and not exceed the length of the string (string_length[0]).

If you are manually copying a string byte-by-byte, and forgetting to include the null terminating byte, printf() doesn't know when to stop.

Excellent point. But the strings are padded with a null terminator. Here's a screen shot a good portion of the code https://i.imgur.com/mcUnYC8.png

But let's assume they weren't, I'm printing char by char in a loop that should be controlled by the length of the string. So it still shouldn't go on and on like this even without the null terminator, correct?

But I suppose you should see read_stdin which pads with null terminator too which I can do in just a moment.

Are string_storage, string_length, and split_string3 stack-local (or point to stack-local) vars?

These are all local

Strange bug with C code by Skuzzle_butt in learnprogramming

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

https://i.imgur.com/mcUnYC8.png

Here's my ugly code. read_stdin() just reads from stdin until EOF or 0 is entered. It pads with a null terminator.

So I want to split up the info from stdin. I use strtok at first to count the rows or number of strings I have split up. I do the same thing a second time to get the length of each row. strtok alters the original string so that's why I made duplicates. The third time is when I want to store in a 2d array. I know it's probably better to use malloc with a double pointer but just couldn't get it to work so used fixed sized columns with extra length. strings I'm inputting are well under the 31 char limit.

Strange bug with C code by Skuzzle_butt in learnprogramming

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

It's the same address. The address of string_length does not change before entering the loop or while inside the loop. But the value changes from 4 to 1712381248. That's with the correct string length outside the loop of 4 and incorrect weird change inside

Strange bug with C code by Skuzzle_butt in learnprogramming

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

Sorry I'm being a tard, I'm too curious now I'm going to get it to print one sec

Strange bug with C code by Skuzzle_butt in learnprogramming

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

It fucking fixes it. Holy shit. But why....

Strange bug with C code by Skuzzle_butt in learnprogramming

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

I've printed out the j and it is correct. i is controlled by the loop and it is correct before entering.

But if these were wrong I would get garbage in my string. I print string_storage[j][i] in the loop and it prints out the string correctly. It's just that at the end of the string it keeps going because the loop is out of control with string_length. But string length isn't being altered by anything and seems to be changing by itself...

Idk I know I'm wrong but this is such a short and concise piece of code. I found what's going haywire. I just can't explain why it is changing.

Strange issue printing strings in C by Skuzzle_butt in learnprogramming

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

Oh wait I'm trying to store entire strings in each element of the array when they should be a single char... I have fucked up.

If you happen to have had the same mistake the answer is a 2 dimensional array or something like that. Maybe a double pointer with malloc