Category "class"

python: apply all functions inside a class to a user input

I have a class and a some functions that changes the user input and saves it in a file as follows. import os import pandas as pd from langdetect import detect

How do I compose different objects from a package/framework into a class or object the pythonic way?

Lets say I a have two objects of different framework that I cant alter (one is C implemented and the other uses a nested factory to instantiate): # framework_a.

Storing Objects assigned to user while using Flask [duplicate]

I come here to ask you a question about the way session can handle Objects in Flask. I have a Flask application and I want all my users to hav

Is there a way I can break up into more than 2 classes

I am wondering how/if I could possibly break this up into multiple classes but keep the values across objects to pass between both. I am unable to get things wo

I imported jsx files but can't use/ import it in ReactJS [closed]

I use these 2 classes : auth.js import React from 'react'; import log from './../components/log/'; const auth = () => { return (

CSV to PHP class properties

I'm working on an assignment right now, and I'm trying to take the data from a CSV and make them into class objects. So each item in the CSV row needs to be a c

error: new initializer expression list treated as compound expression [-fpermissive]

I am trying to write a playlist method for songs in c++, however, I keep running into frequent errors. template <typename T> struct cir_list_node {

Print data from Class instance

I want to print out data from a Class instance. I tried including data in str function, but this only works when value is at its default (an empty list). After

How can the __init__ method accept objects and assign attributes if the attributes have not been created in the Constructor? [duplicate]

I am new to OOP in Python. As the title suggests, I am unsure as to how the __init__ method can assign attributes to an object of a given clas

How can I access class members after creating a new object for that class?

I know my question doesn't really explain my problem all that well, but I'll try my best here. I have a graph program. It should add new vertices and edges, and

Tailwind CSS classes is not working in my project?

Here is my HTML link https://play.tailwindcss.com/fbB4GCL0ht VS Code setup pictures Tailwind.Config.js All files warn - No utility classes were detected in your

Architecture of sub-classes in C++

I learn C++ OOP-paradigm and want to ask related question: Assumption We have a base class: class Base { public: virtual SomeType PowerMethod() { return So

How does a Python class within another class work w/o Inheritance? (Python Beginner)

I'm a python beginner just ran threw a book that includes this MiniProject at the very end.The exercise reads: Your task is to create a deck of cards class. Th

Unable to access variable that has been declared inside a class, outside of it

class makequestions(QMainWindow): def __init__(self): super(makequestions, self).__init__() uic.loadUi("Addquestions.ui", self) self

Specifying a type in an interface of the type that inherits this interface

Need a real implementation of this code interface IExample{ public this ReturnMe(); } class Example : IExample { public this ReturnMe(){...} //returns an

JavaScript externe class or array visible into onmessage worker

With p5.js in a first time I cannot draw gradually the Koch snowflake: when a click to perform I see the result of the drawing when the recursion is gone. so I

How to access a class object inside a list when a value for one of the class attributes is given in Python?

I have a list of class objects and I want to know how can I print a particular class object inside the list given a value for one of its attributes. Here is my

wrap inherited classes in Python

Let's say I have a number of inherited classes class Bird: def __init__(self): pass def identify(self): print("I am a generic bird!")

How to fix/ learning help understanding basic method and classes, Java code and word Problem

I'm struggling on this problem, given that I'm probably making a basic mistake or I haven't got a clue what I'm doing. platform being a Zybook the problem rea

Typescript: how to inference class type that implements an interface

Giving an interface interface IAnInterface { } How to reference and point to a class type that implements that interface! Meaning! Giving a class: class AClas