« first day (4341 days earlier)      last day (831 days later) » 

04:52
@Max_98 Please read the room rules linked in the sidebar, especially the first one in the section titled "Asking a Question".
stackoverflow.com/questions/73596823 no MRE, no attempt at debugging, code example is a complete mess, question is unclear... where on earth did that upvote come from, I'm out of downvotes for the day
user19876853
why is the code a complete mess?
that comment is referring to a different question.
please read the room rules to understand how the flow of conversation works here.
user19876853
okokù
user19876853
ok, sorry
I was doing www.learngitbranching.js which is a wonderful resource (recommended by @AndrasDeak , just that I had a question in one exercise.
Why does rebase remember the old branch, I mean when I do the third branch does rebase remember that "side" branch was at c6 and "another" is at c7 so only add branches diverging from their earlier common ancestor (c5) and not the present common ancestor (c0)
05:20
I don't understand the question. Are you asking why C6 and C7 still exist even though they have no children?
06:10
@Aran-Fey no i am asking what rebase actually is doing, doesnt it find the lowest common ancestor and replicate it to anohter branch
Yeah. That's what is happening, isn't it?
but in the last rebase command, another and side have lowest ancestor common as c0 rught
right
in the second last image it is seen
Rebasing "bugfix" doesn't copy anything because C1 is already a parent of "main". Rebasing "side" copies C5 and C4. Rebasing "another" doesn't copy anything because C5 and C4 were already copied
so in the last rebase git kinda knows that c4, c5 have been already copied
i thought it will copy c4,c5,c7 again because the common ancestor changed
common ancestor of side and another
06:49
@KarlKnechtel several years ago I was very much in the position where I would have to pull rank to get rid of some very disruptive people, mostly during the global lockdown, though
It's been nothing like that these days
 
1 hour later…
07:52
Hello! I have an an enum, and the name in lowercase are private attributes. Is it better to check for the name of the enum to do self.__enumname or should I just do setattr(self, f"_Class__{EnumName.lower()}")?
I don't think I'm following this at all. You shouldn't be using __ really at all. I've never known one good use of it
I'm using __name since name becomes a property
I want it to be editable, but not directly
A single leading underscore is enough to indicate "private" without name mangling. What is setting the attribute?
Should I just make it public?
@soupless Is this not a case to use @property?
Everything is public in python
Whether you want it to be or not
07:56
I used self.__name = "value" and used @property for def name
@soupless Is it better to use self.name or do this?
Just use a single underscore in that case. I think name mangling is only really useful for inheritance and I've never found cause to use it so I couldn't speak confidently about cases where it's needed though I have a decent idea
The property is kind of overkill IMO, since only a moron would even try to reassign an attribute of an enum member. self.name = 'value' should be good enough here
I'm not planning to make a class that will inherit this. Single underscores will do, to be sure?
I'm inclined to agree with Aran-Fey but it's not totally unreasonable to use a single leading underscore either. The double underscore seems too much
Seconded
08:09
I've just had to faff around updating the rust-analyser plugin for VSCode (the de facto IDE for development in the language) to stop it flagging its own "Hello World" default code that comes with new packages as a syntax error. I should have screenshotted it and framed it above my desk for when I'm having a bad day at work - "Could be worse - someone managed to do this..."
"faff around" that's a fun phrase (new to me)
I mean, I guess there could be innumerable technical issues behind it but that's boring to think about; I'll just take it on face value as the most severe regression I've seen in the wild, when it flags a Hello World program as a syntax error
@0x263A surprisingly versatile in conveying the message, too :)
09:04
It certainly falls out of the mouth well.
Like the word "bog" that word just makes sense...
As in "toilet"? That's not frequently used and is a bit crude :P
Er no, more like swamp en.wikipedia.org/wiki/Bog
Funny how the (English) language changes on different sides of the pond.
Ah, ok. Terrible misunderstanding :P
I didn't realise "bog" wasn't used in the capacity of something like a peat bog in other places
Actually, what would you call it? Wetland?
On the concept of SQLAlchemy's joined table inheritance, I would like to update the models using an ORM, specifically the flask-sqlalchemy ORM since this is intended for a flask app. I am having a problem designing an appropriate logic within a view function to do this. This is what I have tried dpaste.com/FSC5M5XN8 I have provided minimal reproducible examples, my attempts and background information. How can I appropriately enough create an accurate logic to update the models?
lass Employee(UserMixin, db.Model): <- New syntax for creating female employees? :D
09:13
This inheritance stuff tied me in knots last time, but one thing I note is that you're missing the user loader
@login.user_loader
def load_user(id):
    return Users.query.get(int(id))
Without that, flask-login is basically headless because it can't convert between an ID and an actual user object. Do you have that somewhere in your code?
@roganjosh Most people here (US/Eastern) would probably default to "swamp" or "wetland", but there's a poet named Mary Oliver who had a piece that used the word "bog" in a kinda funny way that's always stuck with me for whatever reason.
And now, the more I think about it, I don't know exactly how the user_loader works with this inheritance pattern because it's all going into the same table, but you're not always looking for a distinct User object but rather a child class of it. Iteration 2 of your question @GitauHarrison and my confusion just intensifies :(
My honest opinion is that this just isn't the right way to set this up and you could just use something like flask-principal or roll your own multi-level access control (which I can give you code for). My only hesitancy is that I could be recommending that based on ignorance on my part, but this setup is really difficult for me to reason about
The fact that you're following the official documentation almost exactly here just adds to the confusion. I just wonder whether the pattern being demonstrated in the docs is compatible with the functionality you actually want :/
09:39
I guess the one thing I have on my side is that this isn't how permissions are handled in the sopython code and that's maintained by the lead maintainer of Flask, so I should at least be able to sleep at night
09:55
Actually, no, I've just gone back through the code and this just isn't going to work. You aren't making use of @login_required in your routes, and you have a separate "Manager" registration form, which has totally generic parameters making this WET rather than DRY. And then you'll fall over when you try to actually make distinctions on specific functionality that is/is not accessible on a per-user basis.
This is the auth code from my old dashboard. I might be able to improve on it now as this was nearly 4 years ago. That will allow you to define "rank" (such that managers can see stuff/do actions that shop floor staff couldn't) but also distinguish between departments - Managers of Dept A can't meddle with Dept B even if they're of sufficient authority
10:30
@Aran-Fey honestly, it's unclear to me why enum members have attributes at all. Some kind of caching of @property results maybe? but they should be immutable and their "value" is implied by the name/position in the enumeration
Why shouldn't they have attributes? An enum means "these instances exist and you can't make more", but it says nothing about the complexity or meaning of the instances. You could make a Language enum such that Language.ENGLISH.abbr == 'en', for example
mm, I misremembered how the 'planet' example worked in the documentation
11:07
Apologies for beating a dead horse on this one but I haven't been able to mentally drop it; it would be easier if you stuck around after dropping questions @GitauHarrison to discuss things, though I appreciate RL is unpredictable . How does one get to `ManagerRegistration`? You have a "register" page and, since they are by definition unregistered, and therefore unknown to you, how do you present this? Do you give them checkboxes:
- Register as pleb
- Register as Cthulhu
To determine what registration form they get given? I'm fully confident now that this doesn't work, though I appreciate yo
11:19
@PM2Ring yeah, and I agree, problem is that on some SE, you can sometimes see every comments deleted as if the mod that did it didn't check the content/or context, and thought it could do without them. Not saying everyone on SE sites does this but, if you go through a couple post, you might notice such instances at least once. I think it doesn't happen too much if at all on SO though
in any cases, It isn't that much of an important problem, especially if there are decent answers on said posts, so I was just pointing this out (or I guess I was closer to ranting about it? my bad if that's the case)
@Aran-Fey Thanks to what you said last time about sounds/volume being unequalized, I can't help but notice it everywhere now :D
You're welcome :D
this is so horrible I might just try and make something in ffmpeg and python to fix this. I don't even care if it look hacky, I just know I need this somehow
in hindsight, I think I kind of noticed sounds wasn't always the same volume, but never noticed it to this extent.
Worse is that the problem is actually, seemingly, exploited by things like Netflix. No different, really, than just having mega explosions in films for totally pointless reasons. I can imagine the boardroom - "How can we make this better?" -> "Lower the volume of 90% of the film and then make the explosions unreasonably loud. That'll grab 'em"
yeah :/ You would think it's only on youtube, but once you notice it, it's everywhere.
11:35
Youtube is probably due to poor recording in most cases. Guess it depends what you're watching. But on media dedicated to professional entertainment, it's totally deliberate and beyond annoying
Our system at work automatically mutes on applause for our company standup. I really would like such a plugin for youtube - I go to sleep with really long debates running on low volume because they're usually monotonous... until the sound is suddenly swamped by everyone clapping at the end, which inevitably wakes me up
Hi guys! I don't understand him(in comments), what is the problem? stackoverflow.com/questions/73598851/…
There are no comments under that answer
They have presumably since been deleted?
Who caan delete them?
11:44
The original poster or a moderator
so what was the point?
do you mean "why would they say that and then delete it?"
I don't think they really had one. The comment seems totally unreasonable to me
I didn't take the point. what was the solution's problem?
what's weird is that they edited OP's post but didn't answer (yet) even though they might know more about opencv (at least based on their profile and comment)
11:49
why they downvote without any comments?
Maybe setting the stage for their answer. But the comment is uncalled for because it doesn't say anything other than "go away"
@ShahabRahnama They did comment
Just not usefully
As far as I can tell, the np.any needs to be np.all and the np.where seems unnecessary
actually np.all didn't work.
Works for me
for np.all output is []
11:53
Because your image doesn't have any [57, 207, 247] pixels?
I was just about to ask - what are we benchmarking on here? I don't use openCV but I can't see that it loads some default img here that we can all agree on?
I got the poit all means 'and' operator for all inputs but any means 'or'
Am I right?
Yeah
@roganjosh True, but I think we can all agree that np.all is closer to the OP's (img[:, :, 0] == 57) & (img[:, :, 1] == 207) & (img[:, :, 2] == 247) than np.any ;)
@ShahabRahnama to answer your question more directly. I think that person is getting fed up of untested code being posted as answers very quickly. The fact that the context (that they make the main point) is image recognition is probably off-course.
Hmm, now that I think about it, I actually have no clue why OP's code isn't working
11:58
It wouldn't make any difference if it's image processing (sorry, not "recognition") or a multi-dimensional array with no physical representation is a nothing
@roganjosh actually with np.any the output was clear :)) specially for my image :))
Then we should close it pending further detail. I don't know why Community Bot got involved here in the comments already - that's not something I've seen in this kind of situation before
Actually the OP didn't even ask for a solution, they asked why their code doesn't work
 
3 hours later…
15:03
ay wsg ppl
 
1 hour later…
16:24
Searching wsg meaning bring up "what's good". Hmm, didn't know that one
anyway, making multiprocessing work on your code feels weird. I had to use number of cores + 1 to be able to fully utilize a 4 core CPU (4 threads)
not that I'm complaining. went from 28 minutes to 7 minutes on something I was doing, so that's nice
Does anyone have any knowledge of optapy library?
17:32
@Fawaz if it's about vehicle routing problems, I think someone here might know about it. ws your question related to that or something else?
17:50
If it's about vehicle routing problems then I'm your guy, ut I'm probably going to say how everything is broken. Not sure where VRP came from
 
2 hours later…
19:45
Does anyone have a dupe for the situation where someone is trying to web-scrape a page, but they're not getting the same HTML content as their browser b/c the page was generated by Javascript, so they should use Selenium instead?
20:28
The JS audio API is weird... it's only possible to alter the volume of <audio> and <video> HTML elements; if the audio is being generated by JS then you can't do anything :/
20:56
if you're already generating the audio, then what's another multiplication to atenuate the volume?
I'm not the one generating it, I want to insert a volume multiplier into a 3rd party website

« first day (4341 days earlier)      last day (831 days later) »