|
by: Nicolas Fleury |
last post by:
Hi,
I've made a small utility to re-raise an exception with the same stack
as before with additional information in it. Since I want to keep the
same exception type and that some types have very specific constructors
(which take, for example, more than one parameter), the only safe way I
have found to made it is by hacking the str representation:
import sys
|
by: Stephan Diehl |
last post by:
I just found out by accident, that slice indices can be larger than
the length of the object. For example
>>> 'test'
'test'
>>> 'test'
''
I'd rather expected to be confronted with an IndexError.
(This is actually described in
http://docs.python.org/lib/typesseq.html, so my expectation was wrong :))
|
by: Michael Culley |
last post by:
I have an MDI application that was occasionally refusing to close. When clicking on the cross at the top right the app would just
not do anything and the only way to close it was to terminate it. The problem ended up being that in the Form_Closing event had
e.Cancel = True even though I've not set it to true (it took a while to find because it only ever happened once in the IDE). Setting
it to false fixed the problem. I've done a fair bit of...
|
by: tom |
last post by:
Hi,
I am developing a WinForm application and I am looking for a guide on where
to place Exception Handling. My application is designed into three tiers
UI, Business Objects, and Data Access Layer. My questions is where should I
put exception handling:
1) Should it be put in all significant methods in all layers?
2) Should I create an exception base class that will handle the errors and
pass useful error messages to the user?
|
by: tshad |
last post by:
I was curious if there is some reason why you don't need the "then" in the
if test of VB.Net or is it just ASP.NET.
I just noticed that I don't really need to explicitly put the word "then" as
part of my if statement.
For example:
if a = b
b= 10
|
|
by: CoreyWhite |
last post by:
I wrote a program that shows some incredibly curious probabilities. It
is a simple game where you guess a number between 0 and 2 that the
computer thinks up. What is origonal about this game is the computer
tells you before hand if you got the number right and you can decide if
you want to play or not. The computer keeps track of all your wins,
all your losses, and as is possible all of your didn't wins but didn't
loses. What is...
|
by: Jim B. Wilson |
last post by:
Am I nuts? Or only profoundly confused? I expected the this little script
to print "0":
class foo(int):
def __init__(self, value):
self = value & 0xF
print foo(0x10)
Instead, it prints "16" (at least on python 2.4.4 (Linux) and 2.5 (Wine).
|
by: Boris Borcic |
last post by:
>>x = (lambda : ((yield 666),(yield 777),(yield 888)))()
666
777
888
(None, None, None)
666
777
888
Traceback (most recent call last):
|
by: Liz |
last post by:
anyone have any idea why there have been (at least) 82 VS 2008 post-release
messages here on the C# board but only 5 on the VB.NET board; are the VB
crowd just not interested??
strikes me as a significant difference but I'm not sure what to make of it
....
|
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: 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: 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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|