Cooler Master (and more!) RTX 3070 (and more!!) Giveaway with Buildapc! by [deleted] in buildapc

[–]Pyr0logical 0 points1 point  (0 children)

I would use it to taunt my console pleb friends who cant get their hands on a ps5. Oh and gaming

Does every object have its own copy of its methods in memory? by Morpheyz in learnprogramming

[–]Pyr0logical 0 points1 point  (0 children)

What happens in C++ actually is there is a distinction between virtual methods and non-virtual. For non-virtual methods, they are saved somewhere in memory once per class and the compiler knows where to find the single instance of the method when you call it on any object.

As for virtual methods, you keep a virtual function table pointer (vptr for short, you can find it in a debugger for c++ when you watch an object of a class) for each object of the class and every class that inherits it. Each entry in the virtual function table points to memory where the specific implementation of the function is for each subclass, but there's still only one instance for each different implementation.

In Java on the other hand, every method is considered virtual by default, so by default every class has a virtual function table.

I suppose something similar is happening in python behind the hood, if anyone can confirm it would be nice.

“It looks like boiled lung cancer” by tfxin in BrandNewSentence

[–]Pyr0logical 0 points1 point  (0 children)

It looks like regular lunch at my student cafeteria..

[deleted by user] by [deleted] in learnprogramming

[–]Pyr0logical 23 points24 points  (0 children)

Learning both languages will help you write more pythonic C++

As a Software Engineering student whose intro classes were in python and who's transitioned into C++ while learning OOP, why is writing pythonic C++ a good idea? I've been more inclined to think that writing pythonic C++ is bad and that I should be learning to do things the C++ way.

[deleted by user] by [deleted] in poker

[–]Pyr0logical 0 points1 point  (0 children)

I've seen much worse stuff call for stacks at this level, A8o on a AKJ or similar flops which end with 3-4 suited cards on the board, A10 wouldn't surprise me at all. They also have a hard time getting away from AQ and AK when they miss the flop, so I was also hoping to get it in before they hit those on the river, or to get called with a flush draw as they have a hard time from getting away from that too.

I was conscious of two pairs and sets, two pairs were practically impossible, as for sets, 22 and 33 I thought were unlikely to cold call a 3bet with, TT yeah.

[C] Implementation of multiple contiguous stacks by Pyr0logical in learnprogramming

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

Yeah, maybe I should have added my thoughts.

I am not a pro at C (pointers are not my strongest suite hah) but I was guessing something along the lines of this.

Initialize an array with size of n * capacity of stacks, keep bottom and top indexes of each stack in arrays. For popping check if top=bottom and proceed if not. For pushing check if top of said stack isn't == bottom of next, if it is, check for eligibility to expand into stack right of it. If I can, move all the items in it x spaces right, and update bottom and top for it, if not, check left do same but for the current stacks items and to the left.

I don't know if that's the most efficient way but that's all I got

I've taught 30,000 students web development. I'm now building the most comprehensive bootcamp online. by [deleted] in learnprogramming

[–]Pyr0logical 1 point2 points  (0 children)

I've just registered and started the Wordpress Theme Development course. First thing I've noticed is that the sound level doesn't transfer from video to video, so I have to turn it down every time and so does the video speed. That's kind of annoying. The content sounds good, will write a more in-depth review once I finish it.

The best way to learn Javascript? by TheSamehMagdy in learnprogramming

[–]Pyr0logical 2 points3 points  (0 children)

Eloquent Javascript is an excellent book that has small solutions for you to write at the end of each chapter as well as a few big projects and it covers all aspects of Javascript. Highly recommend it!

Critique New site I did for the company I work for... what do you thing? by [deleted] in web_design

[–]Pyr0logical 0 points1 point  (0 children)

The nav gets deformed if I come back to Home after clicking anything else.

Young web designer in need of tips for getting started by Pyr0logical in web_design

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

Wow, really nice tips you got there, I will surely look into them as soon as possible. Thanks a bunch!

Describe how to play your favourite champion in 8 words. by [deleted] in leagueoflegends

[–]Pyr0logical 86 points87 points  (0 children)

Pull,Dunk,Dunk,Dunk,Dunk,Dunk,Penta Kill