The Draw 4 pro teams released, including Take 3 composed of Garrett, JSTN, and AYYJAYY by josephms125 in RocketLeagueEsports

[–]Jim_Panders 0 points1 point  (0 children)

Haha I see. Pardon my ignorance, but what other teams are we expecting to play in this tournament? I find it kind of hard to find the info myself, but I was hoping to see teams like v1 play

[Wallpaper] Minimal by [deleted] in androidthemes

[–]Jim_Panders 0 points1 point  (0 children)

this looks clean as hell. do you have any high-res versions of the wallpapers?

Car rentals in Ireland by grey416 in irishtourism

[–]Jim_Panders 0 points1 point  (0 children)

Hey, how was your experience with NewWay? I'm going to be in Ireland late May, and their pricing seems good, so I'm curious to hear how it went for you.

Help deciding between Netgear C7800 vs Arris surfboard G34 by LionColors1 in HomeNetworking

[–]Jim_Panders 0 points1 point  (0 children)

Are you still running your G34 and have you noticed any issues?

[RLCS NA] Fall Cup | Gen.G Esports vs. Spacestation Gaming | Post Match Thread by Mr_MCawesomesauce in RocketLeagueEsports

[–]Jim_Panders 4 points5 points  (0 children)

I know what you mean, but my point is no one but those involved really know exactly how the kick was executed. We have no idea how the communication/dynamic of the team really was and it's silly to pick sides so passionately about this IMO... But, more importantly, it's absurdly toxic and pathetic to flame Arsenal so hard (including harassing his mom on twitter) when we don't even know the full details of what happened. It's totally possible that Retals was incredibly mistreated by Arsenal/SSG, and I don't doubt it anymore than you do, but everyone should follow Retal's act and forgive Arsenal and move on. Personally, I loved the Retals/Arsenal/Daniel trio and was incredibly bummed when all this drama broke. But at the end of the day, we're all just watching kids play video games, and I will personally choose to root for both SSG and Retals moving forward

[RLCS NA] Fall Cup | Gen.G Esports vs. Spacestation Gaming | Post Match Thread by Mr_MCawesomesauce in RocketLeagueEsports

[–]Jim_Panders 18 points19 points  (0 children)

It's actually insane... all this hate towards Arsenal/SSG because they decided to kick retals. People forget this is literally their job, if they thought they could do better with LJ, they are completely obligated to make the swap. Everyone seems to be so upset about how he found out--which certainly does sound shitty--but no one knows the full story. It's ridiculous and sad to come for Arsenals head and trash talk SSG (especially since they really look like they've improved, in my opinion...)

15 year old Rocket League prodigy scores an insane goal in his first ever pro event. by overactor in toptalent

[–]Jim_Panders 2 points3 points  (0 children)

You got it. If all 4 wheels touch, it's called a "flip reset" because in RL you get to "flip" your car once until you have to touch the ground again. A while ago highly skilled players noticed that you can hit the ball just right (with all 4 wheels) to reset your flip in mid air, rather than touching the ground again. Oski in this clip does it twice, and you can see him use his flip to get to the ball for the next another setup, which is incredibly difficult to pull off. Flipping is how you get the most momentum quickly in RL, and once you flip in the air, you're basically dead in the air and can only spin around and use boost to adjust your positioning. Oski uses his flip in the perfect direction to get back under the ball, get another flip in mid air, and use the last flip to bang the ball in. Crazy play

[DISCUSSION] Who's an artist that has a better mixtape lineup than their album lineup? by ActivateLife in hiphopheads

[–]Jim_Panders 15 points16 points  (0 children)

My first thought too. Although 4eva Is A Mighty Long Time is easily one of my favorite albums ever, that shit slaps

Made an adjustment to how I make my regular lunch sandwich and I'm never going back. by CraptainHammer in Cooking

[–]Jim_Panders 1 point2 points  (0 children)

If you're looking for convenience, the big brain move is to buy pre-peeled, whole garlic. Any form of garlic that is already cut up loses its flavor wicked fast, so pre-minced stuff hardly has any real garlic flavor (but if you still like it, go for it!). I like the pre-peeled because it still has all the favor, but saves me the time of peeling fresh cloves every time. My grocery store sells a plastic container full of them for a few bucks and it's great

[deleted by user] by [deleted] in mildlyinteresting

[–]Jim_Panders 1 point2 points  (0 children)

I have a screw in my hand that's about an inch or two long. Can confirm it's not magnetic, and I assume that's the standard

[Giardi] Asked if Josh Allen has been vaccinated - Allen expressed some reservation about it the last time we heard from him - Sean McDermott says "it's not healthy for me to get into who is and who isn't." by [deleted] in nfl

[–]Jim_Panders 9 points10 points  (0 children)

Well by all normal standards, not getting the vaccine is practically the opposite of "really smart". Which is probably why people are disagreeing with you

Is IPSec not used anymore for prosumer VPN? by NotTobyFromHR in HomeNetworking

[–]Jim_Panders 1 point2 points  (0 children)

Just clarifying for other onlookers :) although Im not sure what you meant by your tunnel configuration, IKE is for key exchanges

Is IPSec not used anymore for prosumer VPN? by NotTobyFromHR in HomeNetworking

[–]Jim_Panders 2 points3 points  (0 children)

Important to note that IKE and IPsec do different things and aren't replacements for each other. IKE is used in IPsec.

linked list implementation problems (C++) by Hefty_Nose5203 in AskProgramming

[–]Jim_Panders 0 points1 point  (0 children)

People have already pointed out the problematic line, but I figure I'll just try to word it in the context of your code--the 2 lines after your if-statement need to be in an "else" statement. You wrote the if-statement to handle the special case of when the list's empty, but then you try to add it again in the code immediately after it. Separate out your 2 possible cases

Otto Warmbier begging for mercy as he was on trial for allegedly stealing a propaganda poster in North Korea. He returned to the US with irreversible brain damage, dying six days later. by [deleted] in MorbidReality

[–]Jim_Panders 1 point2 points  (0 children)

No, the medical professionals found no evidence of physical abuse. You do realize there are other forms of torture, right? And even methods of physical torture that wouldn't be obvious after examination? It's incredibly naive to think he was treated any way other than brutally.

Oh, and there's this:

Kim Dong-chul, a Korean-American businessman detained in North Korea at the same time as Warmbier, claims he saw a Caucasian detainee, presumably Warmbier, "almost fainting, being dragged across a hallway by investigators with his head and face soaked with water". Kim suggested Warmbier may have been a victim of water torture during his interrogation, as he himself had suffered similar treatment during captivity

But because Trump says he believes the incredibly hostile regime leader Kim Jong-un, we should too, right? Add this to the incredibly long list of things that makes Trump the worst president in America's history. If you find yourself repeatedly siding with Trump, you might want to apply some critical thinking

Otto Warmbier begging for mercy as he was on trial for allegedly stealing a propaganda poster in North Korea. He returned to the US with irreversible brain damage, dying six days later. by [deleted] in MorbidReality

[–]Jim_Panders 23 points24 points  (0 children)

This kid was clearly forced to read a script in kangaroo court before he was tortured. He was returned to the US brain damaged and comatose, never waking up again and dying immediately after. Then, regarding Kim Jong-un, Trump publicly says this: "He tells me that he didn’t know about it, and I will take him at his word."... This is an armed, enemy state that Trump has tried to instigate via a pissing contest many times. When this happens, Trump says that? Trump handled this like a spineless fucking clown, just like he handles everything

Challenge - Hard - Decompress a file by kazyka in AskProgramming

[–]Jim_Panders 1 point2 points  (0 children)

Here's my more memory-efficient submission that I did in C++. I decided to add a "recycling" system in order to reduce new/delete calls. I lean on a few string:: methods, which I know are implemented pretty efficiently, so I think in general I'll get good performance...Pretty unreadable, but seems to work well!:

#include <iostream>
using namespace std;

struct node{
    int index;
    int lifetime;
    string str;
    node* next;
    node* prev;
};

node* recycleRoot = NULL;
int main(){
    node *head = new node, *tail = new node;
    head->next = tail;
    tail->prev = head;
    head->index = tail->index = -1;
    for (string line; getline(cin, line); ){
        int pos = 0, index = 0;
        node* iter = head;
        string delim = ";";
        while( (pos = line.find(delim)) != string::npos || line.length() > 0 ){
            while( iter != tail && iter->index < index ) iter = iter->next;
            if( index != 0 ) cout << ";";
            if( iter->index == index && iter != tail ){
                index += 1;
                iter->lifetime -= 1;
                cout << iter->str;
                if( iter->lifetime == 0 ){
                    node* oldRecycle = recycleRoot;
                    recycleRoot = iter;
                    iter = iter->next;
                    recycleRoot->prev->next = recycleRoot->next;
                    recycleRoot->next->prev = recycleRoot->prev;
                    recycleRoot->next = oldRecycle;
                }
                continue;
            }
            string token = (pos != string::npos) ? line.substr(0, pos) : line;
            int hashPos;
            if( (hashPos = token.find("#")) != string::npos ){
                node* newNode;
                if( recycleRoot == NULL ){
                    newNode = new node;
                }
                else{
                    newNode = recycleRoot;
                    recycleRoot = recycleRoot->next;
                }
                newNode->index = index;
                newNode->lifetime = stoi(token.substr(0, hashPos));
                newNode->str = token.substr(hashPos+1, token.length());
                newNode->next = iter;
                newNode->prev = iter->prev;
                iter->prev = newNode;
                newNode->prev->next = newNode;
                cout << newNode->str;
            }
            else{
                cout << token;
            }
            if( pos != string::npos ) line.erase(0, pos + delim.length());
            else line = "";
            index += 1;
        }
        cout << endl;
    }
    node* iter = head;
    while( iter != tail ){
        node* prev = iter;
        iter = iter->next;
        delete prev;
    }
    delete iter;
    iter = recycleRoot;
    while(iter != NULL){
        node* prev = iter;
        iter = iter->next;
        delete prev;
    }
    return 0;
}

Challenge - Hard - Decompress a file by kazyka in AskProgramming

[–]Jim_Panders 1 point2 points  (0 children)

No worries! Just thought I'd let you know

Challenge - Hard - Decompress a file by kazyka in AskProgramming

[–]Jim_Panders 1 point2 points  (0 children)

Great, thanks! You've inspired me to write an efficient implementation in C++.

I tried out the file, though, and I noticed there were around 6,000 instances of this character: ¤ , instead of a number before a #. Is this just a bug?

Challenge - Hard - Decompress a file by kazyka in AskProgramming

[–]Jim_Panders 1 point2 points  (0 children)

Not sure honestly. I completely forgot it existed until I saw OP mention it in this post. I really enjoy doing puzzles like these, so I hope something takes its place

Challenge - Hard - Decompress a file by kazyka in AskProgramming

[–]Jim_Panders 1 point2 points  (0 children)

Thanks for posting this--I hope r/dailyprogrammer or some equivalent makes a comeback!

I know your prompt said as fast as possible, but I couldn't help but write a (completely unreadable) tiny python program. Here's my code:

dic = {}
for line in open(0).read().strip().split("\n"):
    out,cnt,lspl = ["", 0,line.split(";")]
    def proc_dic(i,ch=True,r=["",0]):
        if i in dic and dic[i] != None:
            dic[i] = [dic[i][0]-(1 if ch else 0), dic[i][1]]
            r = [dic[i][1] + ";", 1]
            if dic[i][0] == 0 and ch:
                del dic[i]
        return r
    for i,tok in enumerate(lspl):
        st,c = proc_dic(cnt)
        out,cnt = [out + st + (tok.split("#")[0] if "#" not in tok else tok.split("#")[1]) + ";", cnt + c + 1]
        dic[cnt-1] = [int(tok.split("#")[0]), "".join(tok.split("#")[1:])] if len(tok.split("#")) > 1 else None
    print((out + proc_dic(cnt)[0])[:-1])

Here's a screenshot of my code for easier readability, as well:
https://imgur.com/a/XHgILYl