|
by: Dan Perl |
last post by:
There is something with initializing mutable class attributes that I am
struggling with. I'll use an example to explain:
class Father:
attr1=None # this is OK
attr2= # this is wrong
def foo(self, data):
self.attr1=data
self.attr2.append(data)
The initialization of attr1 is obviously OK, all instances of Father
redefine it in the method foo. But the initialization of attr2 is wrong
|
by: Doug Holland |
last post by:
Often you see code where an empty interface is used to
indicate something about the class that realizes it. In
the .NET world this can be done with custom attributes
too, so which is better:
public class SomeClass : IEmptyInterface
or
|
by: Davide M3xican Coppola |
last post by:
Hi, I would realize an interface (interface) for a pair of concrete
classes (concrete & concrete2), but I have a problem because I have to
access to a third class (element) and if I try to declare interface
class as friend, I obtain this (right) error:
main2.cpp: In member function `virtual void
concrete::method(element&)':
main2.cpp:8: error: `int element::a_int' is protected
main2.cpp:31: error: within this context
|
by: Microsoft |
last post by:
Hello there,
I have following situation , how can I solve this puzzle in
C#.
I have interface called IVendor with some custom attributes applied to it
interface IVendor
{
|
by: tron.thomas |
last post by:
Please consider the following code:
class Abstract
{
public:
virtual ~Abstract() {}
virtual void Method() = 0;
};
class Concrete : public virtual Abstract
|
|
by: Eric |
last post by:
Hi,
I am kind of new to OO and I have the following problem :
I have a class containing a huge list of functions for accessing an SQL
database.
Public Class Transaction
#region "Client"
Public function GetClientInfos() as Dataset ...
Public sub InsertClientInfos() ...
|
by: mvanroshum |
last post by:
Hi,
I have the following problem:
The DataSource of a DataGrid can be set to an IList. The DataGrid
nicely lists the objects in the IList,
showing all the public properties of the objects as the columns of the
datagrid...
The public properties with a primitive type are shown
The public properties with userdefined types are also shown, using the
eventually overridden ToString method.
|
by: florin |
last post by:
hi
Is there a "simple" way to add attributes to a class/property at
runtime?
What I try to do is set the default editor for a class/property at
runtime (I know I can set this very easy by decorating the class/
property code), but I would like to do this at runtime.
Is there another way to tell the PropertyGrid what editor to use for a
|
by: tjhnson |
last post by:
Hi,
With properties, attributes and methods seem very similar. I was
wondering what techniques people use to give clues to end users as to
which 'things' are methods and which are attributes. With ipython, I
use tab completion all the time, but I can rarely tell from the names
alone whether it is an attribute or method.
Tips? Ideas? Best practices?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|