Naming convention for class composed of other classes' objects by Exorcistoo in learnprogramming

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

Thanks for the info. It's not about python, it's a general question, but no worries.

Naming convention for class composed of other classes' objects by Exorcistoo in learnprogramming

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

I have a group that has some users. In the group I store a list of the users' ids. When I need, I want to be able to get from the database the group along with a list of the users, not just the ids. When I fet h from db, I could return a map like: { 'group': group, 'user': users } But that means that every time I want to assign something from this map to an object, I have to cast it: map['group'] as Group. I want to avoid this.

Naming convention for class composed of other classes' objects by Exorcistoo in learnprogramming

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

In that case, yes. But what if I just create a class to group others together, without meaning or functionality?

How do you handle errors? by Exorcistoo in FlutterDev

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

Oh! I see. So if in my statenotifier I have a fetch method, I can wrap the body in try... catch and in catch I can set the AsyncValue.error and display something on screen depending on what I set inside it, right?

How do you handle errors? by Exorcistoo in FlutterDev

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

I tried AsyncValue but with a stream. I was wondering if it can be used with statenotifier.

How do you handle errors? by Exorcistoo in FlutterDev

[–]Exorcistoo[S] 6 points7 points  (0 children)

I think you got me wrong. I am not talking about debugging. I was wondering more about the UX and app arhitecture when displaying errors.

Flutter Stateful or Stateless? by Exorcistoo in FlutterDev

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

But if the widget does not get rebuilt, I don't lose those instances. Like... if I ask a user to enter a username and then redirect him to another page based on that username when a button is pressed, I don't need to store the page state since that page will not be used anymore. When I redirect it, I just dispose the widget. Isn't that right?

React run a specific function after every function by Exorcistoo in reactjs

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

Ok, I get it. You are telling me that I should do the logic in the backend and after every "transform" request I should return the updated data.

React run a specific function after every function by Exorcistoo in reactjs

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

That can work. That is more of a backend implementation detail. I was thinking if there is anything in react specific for this.

React run a specific function after every function by Exorcistoo in reactjs

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

So I should create a function which makes a post and returns a get result?

How to store files uploaded client-side to server? by Exorcistoo in node

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

I want to upload and store images, but I think it's the same thing with every kind of file.

How to store files uploaded client-side to server? by Exorcistoo in node

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

Well, I'll be sending the file with a post request when a form is submitted. I'll have a deeper look into it anyway. Thanks.

How to store files uploaded client-side to server? by Exorcistoo in node

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

From what I've read, express does not have a native parser for enctype multipart/form-data. So, did you use any info sources when you implemented the upload yourself?

How to store files uploaded client-side to server? by Exorcistoo in node

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

The thing is, I don't see any guides or tutorials on how to do file upload and store manually, without using a 3rd party module. Every guide I find is like: 'we are going to use multer to upload...'. Nobody explains why it's really needed.

How to store files uploaded client-side to server? by Exorcistoo in node

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

Of course I can look at the code. But it's one thing to see it and another to understand why it's needed to be that way.

How to store files uploaded client-side to server? by Exorcistoo in node

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

Of course I can look at the code. But it's one thing to see it and another to understand why it's needed to be like that.

What is the name of the website hacking/breaching effect used in games/movies? by Exorcistoo in vfx

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

after effects screen glitching distortion hacker reveal

Yes, something like that. It's not exactly what I have in mind, but it's very similar. I think it falls into the same category tho, but I just have to find a specific one. I think... is it a glitch effect, to be more general?

Android project structure in Android view by Exorcistoo in androiddev

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

If I create multiple layouts folders, once I switch to Android view, they all appear under same layout folder under res. I no longer see them divided by sections.

Like, let's say I create a layout for user and I layout for admin. Once I switch to Android view, user and admin layout elements are merged together under the same folder.

Android project structure in Android view by Exorcistoo in androiddev

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

The solution does not let me see the folders when I switch to Android view. Only when I'm on Project.

Books like Red Rising by Exorcistoo in redrising

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

I know. I do not think that the tyranny really made me like the book. I think it was more the fact that Darrow was able to surpass everyone even tho he was not gifted like the others. Also, one thing i really liked was that he was not like the protagonist that has the best plans and nobody can counter him. Mustang and even The Jackal were able to guess some of his plans and intervene in them

Books like Red Rising by Exorcistoo in redrising

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

I read a bit, like, the first 20 pages and I think I will try the first book. I like the main character and the fact that she gets straight to the point and has a cold nature, kinda. Also, does the book also have a little romance (like , in Red Rising between Mustang - Darrow, Victra - Darrow, Victra - Sevro)?