Antonio Wang
Antonio Wang
KPCKevin Powell - Community
Created by Antonio Wang on 12/15/2022 in #back-end
Is it a good practice to put functions inside of class objects?
I am currently making a class called MainRESTHandler and it's going to have many functions, so I wanted to categorise the many functions in various objects. For example
export class MainRESTHandler {
constructor() {
this.auth.register = this.auth.register.bind(this);
this.restaurants.location = this.restaurants.location.bind(this);
}

auth = {
register() {
// ...
}
}

restaurants = {
location() {
// ...
}
}
}
export class MainRESTHandler {
constructor() {
this.auth.register = this.auth.register.bind(this);
this.restaurants.location = this.restaurants.location.bind(this);
}

auth = {
register() {
// ...
}
}

restaurants = {
location() {
// ...
}
}
}
4 replies
KPCKevin Powell - Community
Created by Antonio Wang on 12/4/2022 in #os-and-tools
Installing an OS on a laptop with broken screen
Okay, so I have a old laptop (HP if I remember correctly that came with Windows XP) and the screen is like completely broken (the pixels don't turn on, even though you can see that there is actual output onto it) and I would like to wipe the disk and install Ubuntu Server onto it so that I can use it with SSH. Is there any way to do that without actually unmounting the laptop, installing the OS through my current laptop and reputting the hard disk on the old one? Any help is appreciated :P
104 replies