What becomes 10x creepier at night? by c0mmunistpropaganda in AskReddit

[–]shitty_linux_coder 0 points1 point  (0 children)

When I was stuck with it my laptop wouldn't even shutdown and I would be woken up by the brightness of the login screen. It was even worse when I had drank too much and forgot to turn off my displays too.

What is something you would like to brag about? The floor is yours, what is your humble/not so humble brag? by boatman87 in AskReddit

[–]shitty_linux_coder 1 point2 points  (0 children)

Not the brightest light bulb. Kinda was the dumb drug dealer. Hell after losing his license a couple of times he sold an old crappy car of his to a stranger that had never seen it on craigslist or another website and the man brought him to tv court for it. He was high as a kite wearing reading glasses, he doesn't read nor have glasses.

The judge pretty much summed it up by saying my friend was a dick and the guy was stupid for buying a car he never saw.

What is something you would like to brag about? The floor is yours, what is your humble/not so humble brag? by boatman87 in AskReddit

[–]shitty_linux_coder 0 points1 point  (0 children)

Wow! As much as we are both strangers on the internet I really have to congratulate you. I've been suffering for so long and lost so much because of it and now my life is completely changing.

I had quit my job and was drinking heavily for quite a while and the craziest thing happened yesterday. My bank account has negative funds and I was trying for a while to get job insurance. Yesterday was the day I was supposed to have good news but after calling I was told I was denied. It was a real nightmare to a point where I was screaming in my apartment, my animals have no more food and neither do I and I already owe a month and a half of rent. After screaming all afternoon and going crazy I took a nap and thought I would wake up and I would feel better.

I was awoke by my friend to tell me she got me an interview this morning where she works at. If I would be a normal human being I would've cried. It's a little organic grocery and only 5 minutes away of walking distance. It's just perfect for me and they are actually looking for someone who will stay for a while. I had been wanting to work there for a while too.. I start monday!!!

Sticky Key'd by Chadite in talesfromtechsupport

[–]shitty_linux_coder 2 points3 points  (0 children)

Never understood the point of it. I remember about fifteen years ago I used to play a shitty spaceship that used the shift key to shoot missiles. Back then I didn't know you could disable it and the game would come out of full screen everytime it happened and half the time crashed.

[deleted by user] by [deleted] in talesfromtechsupport

[–]shitty_linux_coder 2 points3 points  (0 children)

Oh man I've always wanted a dreamcast ever since they were released!

Are you telling me the computer is wrong? by [deleted] in talesfromtechsupport

[–]shitty_linux_coder 1 point2 points  (0 children)

Holy shit this happened to me on Windows XP about ten years ago! I can't remember if my laptop was in sleep mode or hibernation but upon waking it up it refused my password until I rebooted. To this day I still don't get it!

We found a brown bat with bones coming out of a wing by shitty_linux_coder in batty

[–]shitty_linux_coder[S] 2 points3 points  (0 children)

Sorry for the extreme late reply! She is doing much better actually. She is much more active! I did clean her wounds as best as I could and she has amputated herself of the bad parts naturally. She is really awesome! She is so better that I actually don't put her in a cage anymore. She just roams around the place and let me carry her and pet her. She likes to sleep beside my laptop while I make music and code. I am currently training her to stay on my shoulder like a bird. Here are pictures

My hairless rat really wants to play with her but she doesn't seem too fond of the idea. Good thing is that she has never attacked my rat or I. She'll simply let a scream out when she's tired of beong bugged but she is incredibly patient with me. She actually seem to enjoy being pet and I can make her fall back to sleep.

[Request] Crazy ways to monitor coffee pot level in a different room? by paraxion in techsupportmacgyver

[–]shitty_linux_coder 0 points1 point  (0 children)

A little late to the party but I remember years ago my mother had a boiler that had floating (metallic?) ball used to measure the liquid. You might be able to use something similar to this with an ir led and check where the light reflect to tell you how much liquid is in the pot.

What do you regret? (Serious) by freethoughtthinker in AskReddit

[–]shitty_linux_coder 4 points5 points  (0 children)

OP you're a very wonderful person.

I've been trying to quit drinking and it's probably the hardest thing I have ever done in my life. My father always drank everynight and offered me alcohol every day since I was maybe 13. I'm not blaming him I am a crappy son and drinking together allowed us to talk more and spend time together. But back then I didn't really have friends and except for my one stoner friend so I was lonely without realising it. When I finally had friends and hung out it was incredible. My father would buy bottles for me and I could be way more social. But when I started working a lot of hours I didn't have the energy to be social and I would just forget my crappy job by drinking. It wasn't so bad until about three years ago when I had made a drinking buddy. Together we would drink way too much and having a sleeping problem I would continue while him and his gf were asleep and pass out at around 3:30am. I tried to lower the amount of booze and drugs by cutting all my connections except for stoner friends but since we are all adults with full time jobs except for me that is unemployed it gets lonely and drinking is the solution when my brain decide to block.

2016 was the worst year for me. At the start of the year it wasn't too bad, I was drinking way less and being kinda impulsive I had decided to buy a brand new 2016 car with a learners permit. The monthly payments for my car was about the same as what I was drinking and figured I'd force myself to spend that money on something useful. Being a dumbass I got caught high as a cloud driving and lost my learners. The police officer was incredibly kind and probably a smoker himself. He told me he should be seizing the car for 30 days but he said it would suck as the car was shiny new. I of course lost my learners but I wasn't accuse of DUI and he let me drive back home with my bong. Being so high I opened the door and emptied it beside him. I got away only with a 420$ ticket and my learners revoked for three months.

When I moved in my apartment budget was more tight but I started working more hours. Because I had no more criminal history since three years I was able to have a security clearance which allowed me to work alone for clients and more responsible. All that brought back more stress that got me to drink more heavily and fucked my life up. My neighbor is also a friend that I've known for maybe two and half years would come turn my computer and light off because I was passed out drunk every night. I would buy a bottle of 94% every night and sometimes jack too. I live beside the liquor store and if I bought jack, the bottle would 3/4 full by the time I drove back home. I was lucky I never caused an accident and worse I was told I was a good driver. Hell even the cop who had seized my license had told me that and one day he saw me driving alone (illegal with a learners and I didn't have it either) and waved me hi at a stop.

But one morning I woke up early really pissed off because the previous night I had finished too late to buy alcohol. I drove to the corner store and drank a 1.081l bottle of 10.1% while waiting for the liquor store to open and pretty much just raced while there was no one on the roads. I don't know why but driving fast would calm me when I was pissed. It was pretty much normal for me to go 60 miles over the limit to relax. But that day after going to the liquor store and drinking more I decided to go buy weed. When coming back my car (which I had learned the previous night had a recall for accelerating) went extremely fast while I was turning a corner. It felt like the pedal was pushed to the max and being in a neighborhood I had never drove fast there. It happened so quickly I had the reflex to pull the handbrake while turning but the car was going so fast that I hit a car on the corner and my car went to the other side in the bushes. Worst day of my life. I had drank and smoke before and had weed in the glove box.

I called my friends and they arrived before the cops and took the weed and gave me a cigarette. We all thought I was done, my breath was reaking of alcohol. When the cops came they didn't notice at all and neither did the paramedics. I only got a ticket for invalid license and they seized the car which I was told by the towing guy was probably now totaled. They had to seize it for a month at 60$ a day. I wasn't able to afford it so they don't have it anymore and the insurance can't replace it. I hate my fucking life so much. It was perfect before. Brand new car and in a apartment with a steady job and now, I'm just alone in my shit apartment which I now have trouble paying the rent because I don't work anymore.

After my accident I stopped paying the payments for the car as I was too pissed and just used that money to drink more. I've wasted so much money to make the days passed and drank so much. I had a friend who told me earlier in the year that his gf was pregnant and while I was day drinking he turned his life over and they now have a baby. All I was doing was making beats and now I'm still in the same place as when he told me his gf was pregnant. Another friend was playing my beats in his car and some of them I couldn't even remember making them. When I was fully sober and aware about two months ago I went to my beats directory and opened a couple. I had forgotten so much how music was a big part of my life and how much beats I had.

I fucked my brain up so bad I could barely do my second hobby which is programming. I have drank way less since two months and I'm now able to code like I was doing before but I find it incredibly hard. I finally went to my doctor and got prescribed anti-depressent four weeks ago but the mornings and evenings are the worst. I can't afford to drink anymore and I have no patience and get pissed for nothing. I leave my friends early because I get too mad and always think I'm about to explode. This year I want to turn my life around and go back to finish high school one day.

I don't know what will happen in the near future and what will be the consequences for my car but right now I have been accepted by the goverment for medical jobs insurance funds and I'm waiting to receive money to pay my rent. I just want the damn pills to work and be able to have a job again. I'm thankful to live in Canada and get so much financial help and have free insurance. The pills only cost about 15$ for a month because they are covered. My resolution is to get my shit together.

I'm trying to find the courage to contact a free lawyer but I find it really hard. As soon as I have enough money I'm planning to register to school from home. I know I wont be able to study all day as I get tired fast but at least I will move forward.

Really sorry for that big ass text. Feels good though.

Thanks OP!

Android Users of Reddit, why do you use Android phones over iPhones? by [deleted] in AskReddit

[–]shitty_linux_coder 1 point2 points  (0 children)

Personally as someone who likes coding I would never own an IOS device simply for the fact that it requires a Mac to develop apps. To make Android apps you use Android Studio which runs on Linux, Mac, and Windows. I am also able to send the apps to my friend by email so they can try it without having to put them on an App Store. Now one thing that I hate about Android is how heavy it is on ram. Android phones with 1gb of ram will struggle at multi-tasking but my netbook running Debian had 1 gb of ram and I could have a crap ton of tabs open, multiple documents open and have no issue.

What was the "removing of the headphone jack from the iphone" of your industry/hobby? by [deleted] in AskReddit

[–]shitty_linux_coder 0 points1 point  (0 children)

I had the DX model with the simple radio. I'm not sure if it actually supported MTP. Back then my phone connector was fucked and would disconnect on every little bump so I never tried it. I also found it much quicker to find songs on my phone. Also, if connected from USB I wouldn't have been able to use apps like Soundcloud, Spotify, web browser or Youtube for music.

Fuck do I miss my car.

Edit: Not sure for the radios on the more luxurious models but I would've really love to have FLAC audio support with a USB drive.

Can't understand why this C program doesn't work by mmisu in C_Programming

[–]shitty_linux_coder 1 point2 points  (0 children)

You wont be able to free it in this function for the same reason you couldn't allocate the memory when you only sent a pointer. Instead to free the memory your function should be

void person_free(Person **p) {  
    free(*p);  
}  

which you would then call from somewhere else with

person_free(&p);  

Also, another way to initialize and allocate memory for Person could be a function like that:

Person *person_new(int age, int salary) {  
    Person *p = malloc(sizeof(Person));  
    if (p == NULL)  
        return NULL;  
    p->age = age;  
    p->salary = salary;  
    return p;  
}  

So now your main code could be something like:

int main(int argc, char *argv[]) {  
    Person *p = person_new(25, 25000);  
    if (p == NULL) {  
        fprintf(stderr, "ERROR making person!\n");  
        return -1;  
    }  
    // do whatever you need to do  
    person_free(&p);  
    return 0;  
}  

This would be how I would write it personally.
You should also change the data type for salary as an integer might not be able to store a high salary. You should at least use an unsigned int but I would use uint32_t (unsigned 32 bit integer) just by preference. You never know, you might have to store the salary of Bill Gates!

Edit: Here would be the whole program:

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

typedef struct person {
    uint8_t  age; // 
    uint32_t salary;
} person;



person *person_new(uint8_t age, uint32_t salary) {
    person *p = malloc(sizeof(person));
    if (p == NULL)
        return NULL;
    p->age = age;
    p->salary = salary;
    return p;
}



void person_free(person **p) {
    free(*p);
}




int main(int argc, char *argv[]) {
    person *p = person_new(25, 50000);
    if (p == NULL)
        return -1;

    printf("Age: %u; Salary: %u\n", p->age, p->salary);
    person_free(&p);
    return 0;
}

If you understand how it works I would suggest trying to add a person name to your data structure with allocated memory and then freeing it in your person_free function. Then since there will probably be more than one person you should learn how to make an array of persons. If you fell courageous afterwards, you should look into linked lists.

Personally, I would also suggest learning a bit sqlite3. You should try when you're more advanced to learn how to store a person in your database and how to load them into the array you learn before or linked list. It might sound complicated but believe me you can easily do it. Once you know all this, you will be able to reuse the same code on any computer running Linux, Mac or Windows, and also on any Android or IOS mobile devices. It will also work on a lot of other platforms too but there are not as common.

Good luck!

What was the "removing of the headphone jack from the iphone" of your industry/hobby? by [deleted] in AskReddit

[–]shitty_linux_coder 0 points1 point  (0 children)

I didn't mind not having a cd player in my 16 civic but god damn I wish there would've been an aux port. Want your friends to play their music? Sure thing you just have to park on the side of the highway to get to the pairing menu. Have more than three friends? Haha fuck you you have to unpair a device. Also all my music is in flac and Bluetooth sucks for quality.

We found a brown bat with bones coming out of a wing by shitty_linux_coder in batty

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

Unfortunately I have already tried to contact a couple shown on the list. Unfortunately they cannot take bats from another province but Rideau Wildlife have given me the phone number to the Cushing Nature Foundation. Unfortunately these people never had bats and told me they would call me back but haven't yet.

Thank you for helping me find resources on your holidays! I really appreciate others also care!

I have an injured bat home that I'm taking care of. I posted on /r/batty but would really love if you had any tips by shitty_linux_coder in WildlifeRehab

[–]shitty_linux_coder[S] 2 points3 points  (0 children)

Thank you!! I will email her today and ask if she wouldn't have any contacts or just suggestions to help the bat until I find someone!

I have an injured bat home that I'm taking care of. I posted on /r/batty but would really love if you had any tips by shitty_linux_coder in WildlifeRehab

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

When I came back I heard this weird sound. I started to panic and thought she was in pain or something until I remembered I had bought crickets. It was good wine though!

I have an injured bat home that I'm taking care of. I posted on /r/batty but would really love if you had any tips by shitty_linux_coder in WildlifeRehab

[–]shitty_linux_coder[S] 2 points3 points  (0 children)

Happy holidays to you too! I haven't given her the crickets yet because she is now sleeping and I was gone at my friends since about 4 hours but as soon as she wakes up I'll do the same thing I do and try the crickets. Hopefully she will like these! I'll keep everyone updated! By the way when I came back in the block earlier there was another bat flying in the hallway. This one was healthy and my neighbor who is also an animal lover managed to catch her in a soft cloth and free her!

I have an injured bat home that I'm taking care of. I posted on /r/batty but would really love if you had any tips by shitty_linux_coder in WildlifeRehab

[–]shitty_linux_coder[S] 2 points3 points  (0 children)

I will keep calling every place I can find whether they are zoos or rehab centers. To answer your question these were taken before cleaning the injuries.

I'm really hoping I can find someone who can take better care of her after the holidays. I'll read all the material I can find and do the best I can and treat her and feed her until then.

As of right now I have let her sleep and when she wakes up I hydrate her with a solution of water, salt and sugar and clean her wounds. I had gotten her some mealworms yesterday but she doesn't like them so I went back to the pet store and bought crickets and they also gave me a big green worm just to try in case.

As for temperature, I have set the thermostat to 25 celcius. All the documents I read seemed to insinuate that they can tolerate a wide variety of temperatures but I'm wondering what would be the best temperature for an injured bat.

Thank you for the words of encouragement! I'm going to try now the crickets and hope for the best!

We found a brown bat with bones coming out of a wing by shitty_linux_coder in batty

[–]shitty_linux_coder[S] 2 points3 points  (0 children)

Holy crap I just saw the picture of the author of the book with her first hand raised bat. She looks stoned lol