|
by: Neil Zanella |
last post by:
Hello,
I would like to know whether it is possible to define static class methods
and data members in Python (similar to the way it can be done in C++ or Java).
These do not seem to be mentioned in "Learning Python" by Mark Lutz and David
Ascher. It seems like they are a relatively new feature... It seems to me that
any truly OO programming language should support these so I'm sure that Python
is no exception, but how can these be...
|
by: Matthew Bell |
last post by:
Hi,
I've got a question about whether there are any issues with directly
calling attributes and/or methods of a threaded class instance. I
wonder if someone could give me some advice on this.
Generally, the documentation suggests that queues or similar constructs
should be used for thread inter-process comms. I've had a lot of
success in doing that (generally by passing in the queue during the
__init__ of the thread) and I can see...
|
by: John M. Gabriele |
last post by:
I've done some C++ and Java in the past, and have recently learned
a fair amount of Python. One thing I still really don't get though
is the difference between class methods and instance methods. I
guess I'll try to narrow it down to a few specific questions, but
any further input offered on the subject is greatly appreciated:
1. Are all of my class's methods supposed to take 'self' as their
first arg?
2. Am I then supposed to call...
|
by: DBA |
last post by:
Hi All,
What is the diff. between a singleton class and a static class in C#?
|
by: huzz |
last post by:
I am trying to create instance of class and and call a method of this class
that creates a global variable which is available in anywhere in the page..
Here is what i am doing.. but i am getting build error message as shown:
C:\Inetpub\aspnet\intranet\bs\request.aspx.cs(45):
'intranet.departments.building_services.request.NTSecurity' denotes a 'field'
where a 'class' was expected
The line in question is:
|
|
by: Diffident |
last post by:
Hello All,
I am designing a class based on singleton pattern. Inside this class I have
multiple instance methods. My question is since there will be only one
instance of this class at any instance of time in the whole application there
is no use in having these methods as instance methods I can as well have
static methods....correct?
If I leave these methods as instance methods would they have any wrong
impact on my application?
|
by: Mike C# |
last post by:
Suppose I have a base class "foo". Another class, "bar" derives from it.
Base class "foo" has a method called "rob_the_liquor_store()", and the
inherited class "bar" overrides this method with one of its own, maybe
specifying the liquor store over on 44th Street and 5th Avenue or something.
Anyway this is what we have so far:
base class: "foo"
|------------method: "rob_the_liquor_store()"
|
|
by: Pyenos |
last post by:
class pid:
"pid"
def add(original_pid,toadd):
"add pid"
original_pid.append(toadd)
return original_pid
def remove(something_to_remove_from,what):
"remove pid"
something_to_remove_from.remove(what)
return something_to_remove_from
|
by: Anthony Smith |
last post by:
I can call a class using "->", but it complains about the ::
I see on the net where :: is used. Is there a good explanation on when
to use one over the other or the differences?
$help = new help();
$help->foo();
$help::foo();
class help{
|
by: vbgunz |
last post by:
I remember learning closures in Python and thought it was the dumbest
idea ever. Why use a closure when Python is fully object oriented? I
didn't grasp the power/reason for them until I started learning
JavaScript and then BAM, I understood them.
Just a little while ago, I had a fear of decorators because I really
couldn't find a definitive source to learn them (how to with with @).
How important are they? They must be important...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
|