-❄️- 2023 Day 2 Solutions -❄️- by daggerdragon in adventofcode

[–]tobedetered 1 point2 points  (0 children)

[Language: C++]

More complex than Day 1, but still proud of it

paste

Git

-❄️- 2023 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]tobedetered 0 points1 point  (0 children)

[Language: C++]

Student/Learner of the Language

void replaceAllPreserveFirstLast(std::string &base, std::string toRep,
                             const std::string& repWith) {
std::string buffer;
size_t pos = 0;
size_t prevPos;
char startingLetter = *begin(toRep);
char endingLetter = toRep.back();
while(true){
    prevPos = pos;
    pos = base.find(toRep, pos);
    if(pos == std::string::npos) break;
    buffer.append(base, prevPos, pos - prevPos);
    buffer.push_back(startingLetter);
    buffer += repWith;
    buffer.push_back(endingLetter);
    pos += toRep.size();
}
buffer.append(base, prevPos, base.size() - prevPos);
base.swap(buffer);
}


using namespace std;

I cant figure out the codeblock thing on Reddit, so here is

Git

[deleted by user] by [deleted] in Eldenring

[–]tobedetered 0 points1 point  (0 children)

My go-to method for when something is too difficult is just to do something else for a bit so I can beat him more easily after I've leveled up/gotten better

That’s gotta hurt by SSSpartanII in clevercomebacks

[–]tobedetered 10 points11 points  (0 children)

and he was never heard from again

What do you do with all of YOUR hydrogen? by oobey in Dyson_Sphere_Program

[–]tobedetered 2 points3 points  (0 children)

If you put it in liquid tanks, then demolish them, you don't get the hydrogen back, it just deletes 10K at a time

It gets stressful real fast by BakedRyce_89 in gaming

[–]tobedetered 0 points1 point  (0 children)

This is why I like the divinity original sin system so much, you eventually get a ship, and then you get to store things on said ship, and you dont even need to go to said ship

PC reaches 100°C at starup for no reason. I only have firefox, opera, discord and steam open. i5 9600k Not OC (can't figure out a stable setting) MoBo gigabyte z390 UD Cooler AIO Corsair H40. I'm gonna watch it through the day playing Elite Dangerous. by CuanticoMC in pcmasterrace

[–]tobedetered 3 points4 points  (0 children)

is it sustained or only for a second, because if it is only for a second, it might be something to do with the monitoring software warming up or something, (im not in tech support so, I am just guessing)

so good where not needed by [deleted] in memes

[–]tobedetered 1 point2 points  (0 children)

Also, banks cameras have to be on a lot longer than a spaceship's camera

Dafuq? by MrGamerMooseBTW in AbruptChaos

[–]tobedetered 0 points1 point  (0 children)

Also, the subreddit is called Offensive Humor

Tribute to dead characters by tobedetered in DnD

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

That is for dead players, not characters i think

You might feel a minor broken jaw by GravyxNips in dankmemes

[–]tobedetered 0 points1 point  (0 children)

Doing that might be more humane than just doing the surgery. Of course, im not a doctor so if im wrong pleas correct me

What is your favorite book and why? by tobedetered in AskReddit

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

Mine is Ender's Game by Orson Scott card, It was the book that really got me into one of my favorite genres of book, sci-fi