473,573 Members | 5,087 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I use __setitem__ method of dict object?

Please excuse me if this is obvious to others, but I can't figure it
out. I am subclassing dict, but want to prevent direct changing of
some key/value pairs. For this I thought I should override the
__setitem__ method as such:
class xs(dict):
"""
XS is a container object to hold information about cross sections.
"""

def __new__(cls, xS=1.0, xF=1.0, xG=1.0, nu=1.0, debug=0):
"""
"""
x = {}
x['xS'] = xS
x['xF'] = xF
x['nu'] = nu
x['xG'] = xG
x['xA'] = x['xG'] + x['xF']
x['xT'] = x['xA'] + x['xS']

return x

def __setitem__(sel f, key, value):
"""
I have overridden this method to prevent setting xT or xA
outside the
class.
"""
print "I am in __setitem__"
if key == 'xT':
raise AttributeError( """Can't change xT. Please change,
xF, xS, or xG""")
But I can't even get __setitem__ to run. Example:
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright" , "credits" or "license" for more information.
>>import xs
cs = xs.xs()
cs
{'xA': 2.0, 'xF': 1.0, 'xG': 1.0, 'xS': 1.0, 'nu': 1.0, 'xT': 3.0}
>>cs['xT'] = 3.1415
cs
{'xA': 2.0, 'xF': 1.0, 'xG': 1.0, 'xS': 1.0, 'nu': 1.0, 'xT':
3.1415000000000 002}
Is this what the __setitem__ method is for? If not, how can I do what
I want to do?
Thanks in advance,
Jeremy

Feb 6 '07 #1
12 9728
jeremito wrote:
Please excuse me if this is obvious to others, but I can't figure it
out. I am subclassing dict, but want to prevent direct changing of
some key/value pairs. For this I thought I should override the
__setitem__ method as such:
class xs(dict):
"""
XS is a container object to hold information about cross sections.
"""

def __new__(cls, xS=1.0, xF=1.0, xG=1.0, nu=1.0, debug=0):
"""
"""
x = {}
x['xS'] = xS
x['xF'] = xF
x['nu'] = nu
x['xG'] = xG
x['xA'] = x['xG'] + x['xF']
x['xT'] = x['xA'] + x['xS']

return x

def __setitem__(sel f, key, value):
"""
I have overridden this method to prevent setting xT or xA
outside the
class.
"""
print "I am in __setitem__"
if key == 'xT':
raise AttributeError( """Can't change xT. Please change,
xF, xS, or xG""")
But I can't even get __setitem__ to run. Example:
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright" , "credits" or "license" for more information.
>>>import xs
cs = xs.xs()
cs
{'xA': 2.0, 'xF': 1.0, 'xG': 1.0, 'xS': 1.0, 'nu': 1.0, 'xT': 3.0}
>>>cs['xT'] = 3.1415
cs
{'xA': 2.0, 'xF': 1.0, 'xG': 1.0, 'xS': 1.0, 'nu': 1.0, 'xT':
3.1415000000000 002}
Is this what the __setitem__ method is for? If not, how can I do what
I want to do?
>>class d(dict):
... def __setitem__(sel f, k, v):
... print "Setting", k
... dict.__setitem_ _(self, k, v)
...
>>dd = d()
dd['steve'] = 'holden'
Setting steve
>>dd['steve']
'holden'
>>>
I believe the problem is that your __new__ method does not return an
object of type xs but a dict, so it does not inherit the __getitem__
method from xs but instead from dict.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Blog of Note: http://holdenweb.blogspot.com
See you at PyCon? http://us.pycon.org/TX2007

Feb 6 '07 #2
On 6 fév, 16:23, "jeremito" <jerem...@gmail .comwrote:
Please excuse me if this is obvious to others, but I can't figure it
out. I am subclassing dict, but want to prevent direct changing of
some key/value pairs. For this I thought I should override the
__setitem__ method as such:

class xs(dict):
"""
XS is a container object to hold information about cross sections.
"""

def __new__(cls, xS=1.0, xF=1.0, xG=1.0, nu=1.0, debug=0):
"""
"""
x = {}
x['xS'] = xS
x['xF'] = xF
x['nu'] = nu
x['xG'] = xG
x['xA'] = x['xG'] + x['xF']
x['xT'] = x['xA'] + x['xS']

return x
replace this with:
def __init__(self, xS=1.0, xF=1.0, xG=1.0, nu=1.0, debug=0):
dict.__init__(
self,
xS=xS,
xF=xF,
xG=xG,
nu=nu,
xA=xG + xF,
xT=xG + xF + xS
)
def __setitem__(sel f, key, value):
"""
I have overridden this method to prevent setting xT or xA
outside the
class.
"""
print "I am in __setitem__"
if key == 'xT':
raise AttributeError(
"Can't change xT. Please change, xF, xS, or xG"
)
dict.__setitem_ _(self, key, value)
But I can't even get __setitem__ to run.
of course, since your __new__ method returns a dict instance, not a xs
instance...
There are very few cases where you really need to override the __new__
method.
Example:
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright" , "credits" or "license" for more information.>>> import xs
>cs = xs.xs()
cs

{'xA': 2.0, 'xF': 1.0, 'xG': 1.0, 'xS': 1.0, 'nu': 1.0, 'xT': 3.0}>>cs['xT'] = 3.1415
>cs

{'xA': 2.0, 'xF': 1.0, 'xG': 1.0, 'xS': 1.0, 'nu': 1.0, 'xT':
3.1415000000000 002}

Is this what the __setitem__ method is for?
Yes. But note that you you need to manually call the superclass's
overriden method - unless you
really want to replace it with your own, which is obviously not the
case here...

Note that if someone manually changes the values of xG, xF, or xS, the
computed values of xA and/or xT
won't reflect this change. Is that what you want ?

Finally, and if I may ask, what is your use-case for subclassing
dict ? You don't need this to implement a dict-like object,
and it might be simpler in your case to write an ordinary class, then
add support for the required subset of the dict interface.

My 2 cents...

Feb 6 '07 #3
On Feb 6, 10:59 am, "bruno.desthuil li...@gmail.com "
<bruno.desthuil li...@gmail.com wrote:
On 6 fév, 16:23, "jeremito" <jerem...@gmail .comwrote:
Please excuse me if this is obvious to others, but I can't figure it
out. I am subclassing dict, but want to prevent direct changing of
some key/value pairs. For this I thought I should override the
__setitem__ method as such:
class xs(dict):
"""
XS is a container object to hold information about cross sections.
"""
def __new__(cls, xS=1.0, xF=1.0, xG=1.0, nu=1.0, debug=0):
"""
"""
x = {}
x['xS'] = xS
x['xF'] = xF
x['nu'] = nu
x['xG'] = xG
x['xA'] = x['xG'] + x['xF']
x['xT'] = x['xA'] + x['xS']
return x

replace this with:
def __init__(self, xS=1.0, xF=1.0, xG=1.0, nu=1.0, debug=0):
dict.__init__(
self,
xS=xS,
xF=xF,
xG=xG,
nu=nu,
xA=xG + xF,
xT=xG + xF + xS
)
def __setitem__(sel f, key, value):
"""
I have overridden this method to prevent setting xT or xA
outside the
class.
"""
print "I am in __setitem__"
if key == 'xT':
raise AttributeError(

"Can't change xT. Please change, xF, xS, or xG"
)
dict.__setitem_ _(self, key, value)
But I can't even get __setitem__ to run.

of course, since your __new__ method returns a dict instance, not a xs
instance...
There are very few cases where you really need to override the __new__
method.
The reason I create my object with __new__ instead of __init__ is
because when I use __init__ when a value is set it calls __setitem__.
This is what I want to happen, but not inside of __init__. Does this
make sense? I'm sure there is a better/more pythonic way to do this,
but I'm unsure of what it is. Can someone show me an example of how
this should work?

>
Example:
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright" , "credits" or "license" for more information.>>i mport xs
>>cs = xs.xs()
>>cs
{'xA': 2.0, 'xF': 1.0, 'xG': 1.0, 'xS': 1.0, 'nu': 1.0, 'xT': 3.0}>>cs['xT'] = 3.1415
>>cs
{'xA': 2.0, 'xF': 1.0, 'xG': 1.0, 'xS': 1.0, 'nu': 1.0, 'xT':
3.1415000000000 002}
Is this what the __setitem__ method is for?

Yes. But note that you you need to manually call the superclass's
overriden method - unless you
really want to replace it with your own, which is obviously not the
case here...

Note that if someone manually changes the values of xG, xF, or xS, the
computed values of xA and/or xT
won't reflect this change. Is that what you want ?
Eventually (when I figure out how to use __setitem__) I will change
what happens when xG, xF, or xS are changed so that it also changes xA
and xT.
Finally, and if I may ask, what is your use-case for subclassing
dict ? You don't need this to implement a dict-like object,
and it might be simpler in your case to write an ordinary class, then
add support for the required subset of the dict interface.
Eventually I am going to add other features to my class (as I have
mentioned) so I can't simply use a dict object.
>
My 2 cents...
Thanks again,
Jeremy

Feb 6 '07 #4
"jeremito" <je******@gmail .comescribió en el mensaje
news:11******** **************@ k78g2000cwa.goo glegroups.com.. .
Please excuse me if this is obvious to others, but I can't figure it
out. I am subclassing dict, but want to prevent direct changing of
some key/value pairs. For this I thought I should override the
__setitem__ method as such:
if key == 'xT':
raise AttributeError( """Can't change xT. Please change,
xF, xS, or xG""")
Why using a dictionary? I'd use a simple class with properties:

pyclass Xs(object): # class names should be Uppercase
.... def __init__(self, xS=1.0, xF=1.0, xG=1.0, nu=1.0, debug=0):
.... self.xS = xS
.... self.xF = xF
.... self.nu = nu
.... self.xG = xG
.... xA = property(fget=l ambda self: self.xG + self.xF)
.... xT = property(fget=l ambda self: self.xA + self.xS)
....
pyxs = Xs(1.0, 0.95, 0.80, 0.70)
pyprint xs.xG
0.8
pyprint xs.xA
1.75
pyprint xs.xT
2.75
pyxs.xG = 0.5
pyprint xs.xA
1.45
pyprint xs.xT
2.45
pyxs.xA = 1.5
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: can't set attribute
pyxs.xT = 1.2
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: can't set attribute
py>

--
Gabriel Genellina
Feb 6 '07 #5
jeremito a écrit :
On Feb 6, 10:59 am, "bruno.desthuil li...@gmail.com "
<bruno.desthuil li...@gmail.com wrote:
>>On 6 fév, 16:23, "jeremito" <jerem...@gmail .comwrote:
(snip)
>>>But I can't even get __setitem__ to run.

of course, since your __new__ method returns a dict instance, not a xs
instance...
There are very few cases where you really need to override the __new__
method.


The reason I create my object with __new__ instead of __init__ is
because when I use __init__ when a value is set it calls __setitem__.
This is what I want to happen, but not inside of __init__. Does this
make sense?
It would make sens - if you couldn't call dict.__setitem_ _ directly.
I'm sure there is a better/more pythonic way to do this,
but I'm unsure of what it is. Can someone show me an example of how
this should work?

(snip)
>>>Is this what the __setitem__ method is for?

Yes. But note that you you need to manually call the superclass's
overriden method - unless you
really want to replace it with your own, which is obviously not the
case here...

Note that if someone manually changes the values of xG, xF, or xS, the
computed values of xA and/or xT
won't reflect this change. Is that what you want ?


Eventually (when I figure out how to use __setitem__) I will change
what happens when xG, xF, or xS are changed so that it also changes xA
and xT.
Which is not the best way to go IMHO. Unless the computation is very
intensive (which doesn't seem to be the case here) or it's heavily used
in big loops *and* the perfs are not good enough, it's better to
recompute on the fly at read time. And if one of the above cases arises,
then it will be time to use memoization (ie: cache the result of
computation, invalidating the cache when needed).
>
>>Finally, and if I may ask, what is your use-case for subclassing
dict ? You don't need this to implement a dict-like object,
and it might be simpler in your case to write an ordinary class, then
add support for the required subset of the dict interface.


Eventually I am going to add other features to my class (as I have
mentioned) so I can't simply use a dict object.
I already understood this. My question is : why do you want to
*subclass* dict. In Python, inheritence is only about implementation,
it's *not* needed for polymorphism to work. So you don't have to
subclass dict to have an object behaving (more or less, that's up to
you) like a dict.

Here's an alternative implementation, so you get the idea. Note that it
behaves mostly like a dict (well, not totally, but since we don't know
which subset of the dict interface you need...), but also like a
'standard' object, so you can use either cs.['xT'] or cs.xT with the
same result.

class Xs(dict):
"""
Xs is a container object to hold information about cross sections.
"""
_computedkeys = 'xA', 'xT'

def __init__(self, xS=1.0, xF=1.0, xG=1.0, nu=1.0, debug=0):
self.xS = xS
self.xF = xF
self.xG = xG
self.nu = nu

# xA and xT as properties (AKA computed attributes)
def _get_xA(self):
return self.xG + self.xF
def _set_xA(self, dummy):
raise AttributeError(
"%s.xA is read-only" % self.__class__. __name__
)
xA = property(fset=_ set_xA, fget=_get_xA)

def _get_xT(self):
return self.xA + self.xS
def _set_xT(self, dummy):
raise AttributeError(
"%s.xT is read-only" % self.__class__. __name__
)
xT = property(fset=_ set_xT, fget=_get_xT)

# dict interface support, to be extended if needed
def __setitem__(sel f, key, value):
setattr(self, key, value)

def __getitem__(sel f, key):
return getattr(self, key)

def keys(self):
return self.__dict__.k eys() + list(self._comp utedkeys)

def values(self):
return self.__dict__.v alues() \
+ [getattr(self, key) for key in self._computedk eys]

def items(self):
return zip(self.keys() , self.values())

def __iter__(self):
for k in self.keys():
yield k
raise StopIteration

def __contains__(se lf, key):
return key in self.keys()

def __repr__(self):
return repr(dict(self. items()))

Feb 6 '07 #6
On Feb 6, 2:36 pm, Bruno Desthuilliers
<bdesth.quelque ch...@free.quel quepart.frwrote :
jeremito a écrit :
On Feb 6, 10:59 am, "bruno.desthuil li...@gmail.com "
<bruno.desthuil li...@gmail.com wrote:
>On 6 fév, 16:23, "jeremito" <jerem...@gmail .comwrote:

(snip)
>>But I can't even get __setitem__ to run.
>of course, since your __new__ method returns a dict instance, not a xs
instance...
There are very few cases where you really need to override the __new__
method.
The reason I create my object with __new__ instead of __init__ is
because when I use __init__ when a value is set it calls __setitem__.
This is what I want to happen, but not inside of __init__. Does this
make sense?

It would make sens - if you couldn't call dict.__setitem_ _ directly.


I'm sure there is a better/more pythonic way to do this,
but I'm unsure of what it is. Can someone show me an example of how
this should work?

(snip)
>>Is this what the __setitem__ method is for?
>Yes. But note that you you need to manually call the superclass's
overriden method - unless you
really want to replace it with your own, which is obviously not the
case here...
>Note that if someone manually changes the values of xG, xF, or xS, the
computed values of xA and/or xT
won't reflect this change. Is that what you want ?
Eventually (when I figure out how to use __setitem__) I will change
what happens when xG, xF, or xS are changed so that it also changes xA
and xT.

Which is not the best way to go IMHO. Unless the computation is very
intensive (which doesn't seem to be the case here) or it's heavily used
in big loops *and* the perfs are not good enough, it's better to
recompute on the fly at read time. And if one of the above cases arises,
then it will be time to use memoization (ie: cache the result of
computation, invalidating the cache when needed).
>Finally, and if I may ask, what is your use-case for subclassing
dict ? You don't need this to implement a dict-like object,
and it might be simpler in your case to write an ordinary class, then
add support for the required subset of the dict interface.
Eventually I am going to add other features to my class (as I have
mentioned) so I can't simply use a dict object.

I already understood this. My question is : why do you want to
*subclass* dict. In Python, inheritence is only about implementation,
it's *not* needed for polymorphism to work. So you don't have to
subclass dict to have an object behaving (more or less, that's up to
you) like a dict.

Here's an alternative implementation, so you get the idea. Note that it
behaves mostly like a dict (well, not totally, but since we don't know
which subset of the dict interface you need...), but also like a
'standard' object, so you can use either cs.['xT'] or cs.xT with the
same result.

class Xs(dict):
"""
Xs is a container object to hold information about cross sections.
"""
_computedkeys = 'xA', 'xT'

def __init__(self, xS=1.0, xF=1.0, xG=1.0, nu=1.0, debug=0):
self.xS = xS
self.xF = xF
self.xG = xG
self.nu = nu

# xA and xT as properties (AKA computed attributes)
def _get_xA(self):
return self.xG + self.xF
def _set_xA(self, dummy):
raise AttributeError(
"%s.xA is read-only" % self.__class__. __name__
)
xA = property(fset=_ set_xA, fget=_get_xA)

def _get_xT(self):
return self.xA + self.xS
def _set_xT(self, dummy):
raise AttributeError(
"%s.xT is read-only" % self.__class__. __name__
)
xT = property(fset=_ set_xT, fget=_get_xT)

# dict interface support, to be extended if needed
def __setitem__(sel f, key, value):
setattr(self, key, value)

def __getitem__(sel f, key):
return getattr(self, key)

def keys(self):
return self.__dict__.k eys() + list(self._comp utedkeys)

def values(self):
return self.__dict__.v alues() \
+ [getattr(self, key) for key in self._computedk eys]

def items(self):
return zip(self.keys() , self.values())

def __iter__(self):
for k in self.keys():
yield k
raise StopIteration

def __contains__(se lf, key):
return key in self.keys()

def __repr__(self):
return repr(dict(self. items()))
Thanks a lot for your help. I think what you have written is much
better than what I could have come up with on my own. I guess I just
need more experience.
Thanks,
Jeremy

Feb 6 '07 #7
jeremito a écrit :
On Feb 6, 2:36 pm, Bruno Desthuilliers
<bdesth.quelque ch...@free.quel quepart.frwrote :
(snip)
>>Here's an alternative implementation, so you get the idea.

class Xs(dict):
oops ! I meant:
class Xs(object):

of course...

(snip)
I guess I just
need more experience.
Possibly - but not only. You may want to have a look at the
FineManual(tm) for all this kind of "magic", starting with :
http://docs.python.org/ref/specialnames.html
http://docs.python.org/ref/sequence-types.html

HTH
Feb 6 '07 #8
On Feb 6, 5:10 pm, Bruno Desthuilliers
<bdesth.quelque ch...@free.quel quepart.frwrote :
jeremito a écrit :
On Feb 6, 2:36 pm, Bruno Desthuilliers <bdesth.quelque ch...@free.quel quepart.frwrote :
>
(snip)
>>Here's an alternative implementation, so you get the idea.
>>
>>class Xs(dict):

oops ! I meant:
class Xs(object):

of course...

(snip)
I guess I just
need more experience.

Possibly - but not only. You may want to have a look at the
FineManual(tm) for all this kind of "magic", starting with :http://docs.python.org/ref/specialna...nce-types.html

HTH
Thanks again! Sometimes the problem is simply not knowing where to
find the documentation, or finding the right portion of the
documentation. Your help has been invaluable.

Jeremy

Feb 7 '07 #9
On Feb 7, 8:28 am, "jeremito" <jerem...@gmail .comwrote:
On Feb 6, 5:10 pm, Bruno Desthuilliers

<bdesth.quelque ch...@free.quel quepart.frwrote :
jeremito a écrit :
On Feb 6, 2:36 pm, Bruno Desthuilliers <bdesth.quelque ch...@free.quel quepart.frwrote :
(snip)
>>Here's an alternative implementation, so you get the idea.
>>class Xs(dict):
oops ! I meant:
class Xs(object):
of course...
(snip)
I guess I just
need more experience.
Possibly - but not only. You may want to have a look at the
FineManual(tm) for all this kind of "magic", starting with :http://docs..python.org/ref/specialn....python.org/re...
HTH

Thanks again! Sometimes the problem is simply not knowing where to
find the documentation, or finding the right portion of the
documentation. Your help has been invaluable.

Jeremy
One more question. I will be asking for the value of cs.xT *many*
(~millions) times. Therefore I don't want it's value to be calculated
on the fly. How can I set the value of xT whenever xS, xF, or xG are
changed, but not allow it to be set directly? From the example given
previously, it seems like it can't be done this way.

Thans,
Jeremy

Feb 7 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1882
by: Paul | last post by:
Hi I'm implementing a few COM classes using Python. I've come across a problem when I'm trying the return an instance of a class from a method on one of my classes. The code is as follows, with two classes - clsDividend and clsDividendEsimate. The clsDividend.GetDividendEstimates method tries to return a new instance of the...
7
15583
by: Edward Diener | last post by:
This simple code example gives me the message, "TypeError: 'staticmethod' object is not callable". class X(object): def Y(x): print x Y = staticmethod(Y) ad = { 1 : Y } def Z(self): self.ad(3)
12
1890
by: Donnal Walter | last post by:
The following method is defined in one of my classes: def setup(self, items={}): """perform setup based on a dictionary of items""" if 'something' in items: value = items # now do something with value if 'another' in items: value = items # do something else with value
9
1719
by: Ron Garret | last post by:
Is this a bug or a feature? class mydict(dict): def __setitem__(self, key, val): print 'foo' dict.__setitem__(self, key, val) >>> d=mydict() >>> d=2 foo
3
2046
by: Bengt Richter | last post by:
Has anyone found a way besides not deriving from dict? Shouldn't there be a way? TIA (need this for what I hope is an improvement on the Larosa/Foord OrderedDict ;-) I guess I can just document that you have to spell it dict(d.items()), but I'd like to hide the internal shenanigans ;-) Regards, Bengt Richter
8
1525
by: Almad | last post by:
Hello, I discovered this behaviour in dictionary which I find confusing. In SneakyLang, I've tried to extend dictionary so it visits another class after something is added: class RegisterMap(dict): def __setitem__(self, k, v): dict.__setitem__(self, k,v) self.visit_register_map(self)
3
1703
by: Tor Erik Soenvisen | last post by:
Hi, What do I need to do to make the code below work as expected: class str2(str): def __setitem__(self, i, y): assert type(y) is str assert type(i) is int assert i < len(self)
0
1199
by: sapsi | last post by:
Hi, I am writing a SIMBL plugin for Mail.app, so far it loads and the correct method has been swizzled. However, i would like to call the original method and that is where the problem lies. If you could see the code(below), in console.app, i get the following error because of old(x) " 2007-06-26 03:42:04.053 Mail *** NSRunLoop ignoring...
0
168
by: Jean-Paul Calderone | last post by:
On Wed, 22 Oct 2008 08:29:08 -0400, Neal Becker <ndbecker2@gmail.comwrote: I don't really know anything about the kind of classes that boost makes, however the behavior you describe is like the behavior of new-style classes: ... 10 ... Traceback (most recent call last):
0
7792
marktang
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...
0
7709
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...
1
7800
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...
0
8091
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5605
isladogs
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...
0
5296
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...
0
3744
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1330
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1049
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.