[25334] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 7579 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Dec 27 18:10:46 2004

Date: Mon, 27 Dec 2004 15:10:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 27 Dec 2004     Volume: 10 Number: 7579

Today's topics:
    Re: Is zero even or odd? <jfields@austininstruments.com>
    Re: Is zero even or odd? <invalid@msgid.michael.mendelsohn.de>
    Re: Is zero even or odd? <invalid@msgid.michael.mendelsohn.de>
    Re: Is zero even or odd? <george@briar.demon.co.uk>
    Re: Is zero even or odd? <jamie_5_not_valid_after_5_Please@charter.net>
    Re: Is zero even or odd? <rphenry@home.com>
    Re: Is zero even or odd? <gweast@mathworks.com>
    Re: Is zero even or odd? <invalid@msgid.michael.mendelsohn.de>
    Re: Is zero even or odd? <jfields@austininstruments.com>
    Re: Is zero even or odd? <jfields@austininstruments.com>
    Re: Loading Modules with "require" amerar@iwc.net
    Re: Loading Modules with "require" <noreply@gunnar.cc>
        Perl CGI script using Win::ODBC module - failed login o byoukstetter@hotmail.com
    Re: regexp match large file <downview@gmail.com>
    Re: regexp match large file ioneabu@yahoo.com
    Re: regexp match large file <abigail@abigail.nl>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 27 Dec 2004 13:25:31 -0600
From: John Fields <jfields@austininstruments.com>
Subject: Re: Is zero even or odd?
Message-Id: <1pl0t01nkne3vn771q23upffooddlo5qvv@4ax.com>

On Mon, 27 Dec 2004 16:51:57 -0000, "George Dishman"
<george@briar.demon.co.uk> wrote:

>
>"John Fields" <jfields@austininstruments.com> wrote in message 
>news:h8c0t0dvf5fq2ig0uqgaihf89ovrikmsn2@4ax.com...
>> On Mon, 27 Dec 2004 15:47:32 -0000, "George Dishman"
>> <george@briar.demon.co.uk> wrote:
>>
>>>
>>>"John Fields" <jfields@austininstruments.com> wrote in message
>>>news:2dvvs0ppsmtl1tgcpv4rp4fd8a5cko8bak@4ax.com...
>>>> On Mon, 27 Dec 2004 02:23:11 +0100, Michael Mendelsohn
>>>> <invalid@msgid.michael.mendelsohn.de> wrote:
>>>>
><snip>
>>>> Your circuit:
>>>>
>>>>
>>>>         +---------------------(V)----+
>>>>         |                            |
>>>> (-)-----o-------[__R__]---o---(A)----o--------(+)
>>>>         |____________________________|
>>>>                the short
>>>>
>>>> contrives to hide the resistance while purporting to use Ohms law to
>>>> determine the resistance so, quite clearly, the results obtained will
>>>> be nonsensical.
><snip second circuit>
>
>> In the above circuit, as in the previous, the instrumentation is
>> assumed to be perfect, so there will be no current required to read
>> the voltage.
>
>If the instrumentation is assumed to be perfect, there
>will be no voltage dropped across the ammeter and hence
>the first circuit (above) is equally valid.

---
LOL! In the first circuit, the short is also assumed to be perfect, so
there will be no need for instrumentation, perfect or not.
---

>> If that's not satisfactory then a wheatstone bridge can
>> be used to measure the voltage with no regard given to the impedance
>> of the voltmeter.
>
>Agreed, it is easier to achieve it in reality that
>way, but for the purposes of considering 0/0 that
>is academic.

---
Then so is considering the meter resistance at all.  I'm starting to
think that you're not so much interested in considering 0/0 as you are
in being argumentative and confrontational.  If that's the case, then
this 'discussion' is over.
---

>>>Neither circuit gives both readings accurately.
>>
>> ---
>> Knowing the meter resistance, the second circuit does.
>
>The point was, knowing the meter resistance,
>both circuits do.

---
No. In the case of the first circuit, it's not necessary to know
anything about the meters since even if they're not there it doesn't
matter.  

In the case of the second circuit it's only necessary to know the
resistance of the voltmeter to determine its contribution to the
current flowing in the ammeter.
---


>>><snip proof that 1=1>
>>>
>>>If you want to use an Ohms Law example to
>>>understand this, realise that when you try to
>>>calculate 0/0, you are asking "what resistance
>>>will allow zero current to flow when zero voltage
>>>is applied. The answer is any resistance.
>>
>> ---
>> Yes, and that's why I wouldn't ordinarily use Ohm's law to try to
>> prove that 0/0 = 1.
>
>Neither would I, but I'm not the OP.

---
Which is supposed to mean what, exactly?
---

>> In this case, however, to indicate to the OP that
>> when the current through the resistor and the voltage across it are
>> both numerically equal, the value of the resistance will be one ohm
>> and will remain one ohm as the voltage across the resistance goes to
>> zero.
>
>Sure, but as has been pointed out, if you start
>by assuming any other value of resistance, the
>numerical value of the ratio also remains constant
>at that other value. You have simply illustrated a
>particular example, not proven any general rule.

---
Yes, that's what I was trying to do. (Illustrate a particular example,
that is.) By writing:
 
"In this case, however, to indicate to the OP that
when the current through the resistor and the voltage across it are
both numerically equal, the value of the resistance will be one ohm
and will remain one ohm as the voltage across the resistance goes to
zero."

I thought that I was making it clear that I was talking about a
particular instance by writing "In this case"... and "when the current
through the resistor and the voltage across it are both numerically
equal"...  Both rather limiting.  

Sorry if I confused you.
---  

>>>Equally, you could ask what current flowing through a
>>>superconductor produces zero volts and again the
>>>answer is any current. Hence 0/0 can have any
>>>value and it is therefore undefined.

---
See John Woodgate's reply.
---

>> The very notion of a superconductor renders Ohm's law unfit to
>> characterized it,
>
>Not at all, R is defined as V/I and for any current
>(below the level that destroys the superconduction
>obviously), V=0 hence R=0.

---
Yes, I should have thought through that one a little more critically.
Thanks.
---

>> so saying that 0/0 can have any value because Ohm's
>> law doesn't work for superconductors is nonsensical.
>
>I wouldn't have chosen Ohms Law myself but since that
>is the topic, you should at least get the arguments
>right.

---
Are you _intentionally_ being arrogant, is it something over which you
have little control, or am I misreading your tone?

-- 
John Fields


------------------------------

Date: Mon, 27 Dec 2004 20:58:44 +0100
From: Michael Mendelsohn <invalid@msgid.michael.mendelsohn.de>
Subject: Re: Is zero even or odd?
Message-Id: <41D06974.D0E26079@msgid.michael.mendelsohn.de>

John Fields schrieb:
> On Mon, 27 Dec 2004 02:23:11 +0100, Michael Mendelsohn
> >John Fields schrieb:
> >> On Sat, 25 Dec 2004 00:23:49 +0100, Michael Mendelsohn
> >> <invalid@msgid.michael.mendelsohn.de> wrote:
> >> >John Fields schrieb:
> >> >> ---
> >> >> I'm not trying to be insulting, but would you mind explaining how the
> >> >> current was measured?
> >> >
> >> >By putting an instrument into the circuit where I wanted to measure the
> >> >current.
> >>
> >> ---
> >> OK, but, unfortunately, placing the ammeter inside the short can only
> >> give ambiguous results.
> >
> >That is my point exactly. A mathematical situation where you get 0/0 is
> >ambiguous. If there is an unambiguous way to resolve it, you should have
> >thought about it before. (See below).
> 
> ---
> Was that meant to be insulting?

No, sorry. The "you" should be read as "one", i.e. in the general sense.
I've no reason to insult you.
If there's an unambiguous way to resolve it, you can phrase your
computation so that the term 0/0 doesn't occur, which requires changing
things "upstream" in the computation process (canceling x/x, for
example).

> >Indeed, you got my point. You cannot determine if 0/0 should have a
> >finite value, and even if, you can't determine what its value should be.
> 
> ---
> Yes, you can.  I described how below.


Below, you remove the short from my diagram.
However, you also remove the power supply, which achieves the same
thing.

> The proper circuit:
> 
>       +---(V)---+
>       |         |
> (-)---o---[R]---o---(A)---o---(+)
> 
> Will yield the proper results if examined using Ohm's law.
> 
> Assuming that the voltage across the resistance is 1V and the current
> through it is 1A, then the resistance will be:
> 
>              E     1V
>         R = --- = ---- = 1 ohm                       (1)
>              I     1A
> 

Assuming that the voltage across the resistance is 2V and the current
through it is 1A, then the resistance will be: 2 ohm.

> If we now reduce the voltage to 0.5V and rearrange to solve for I,
> we'll now have:
> 
>              E     0.5V
>         I = --- = ------ = 0.5A                      (2)
>              R      1R

We'll then have I = 1V/2R = 0.5 A

> plugging that current into (1) gives us
> 
>              0.5V
>         R = ------ = 1 ohm
>              0.5A


R = 1V / 0.5 A = 2 ohm

 
> If we continue to reduce the voltage, the current and voltage will
> always be numerically equal, R will remain at 1 ohm and, clearly, will
> remain at 1 ohm even if we disconnect the voltage supply, forcing both
> the voltmeter and ammeter to read 0, in which case we'll have:
> 
>              0V
>         R = ---- = 1 ohm
>              0A


If we continue to reduce the voltage, the current will always be
numerically half of the voltage, R will remain at 2 ohm and, clearly,
will remain at 2 ohm even if we disconnect the voltage supply, forcing
both the voltmeter and ammeter to read 0, in which case we'll have:
 R = 0V / 0A = 2 ohm


> Now, if we go to the more general case of:
> 
>              x
>         y = ---
>              x
> 
> we can see that for any value of x, as x goes to zero, y will remain
> constant, and exactly equal to 1.  Therefore,
> 
> 
>           0
>          --- = 1
>           0

This is only true because you assumed a resistor of 1 ohm. If you assume
a resistor of 2 ohm, then 0/0 = 2.
Again, you can only state with concidence that 0/0 = 1 in this case
because you already *know* that the resistance is 1; you have not
computed it from 0/0, because the 0/0 quotient doesn't help you to know
that the resistance is 1 ohm.

> ---
> >> Consider: Since
> >>
> >>               x
> >>          y = --- = 1
> >>               x
> >>
> >> is certainly true for x = 1, x = 0.5, x = 0.25, and doesn't seem to
> >> change as x diminishes toward, through and into the negative realm on
> >> the other side of zero, why should there be an anomaly where x = 0?.
> >
> >Because you can't see from 0/0
> >that it is the result of putting x=0 into x/x.
> 
> ---
> The value of x is unimportant.  What does matter is that the numerator
> and denominator be numerically equal.

No, it matters that they are algebraically equal.
When they are numerically equal, that is only useful if the number's not
zero.
You can cancel out the "x"s, and you should definitely do that if you
can, but you can't cancel out the zeroes.

> >It might have been the result of putting 0 into 2x/x,
> >in which case the result ought to be 2.
> 
> ---
> It might have been, but it wasn't.

How do you know?

If I give you a resistor to measure, but no power supply, you will
measure 0A and 0V, but must the resistor always be 1 ohm, then?


> >In fact, any c = cx/x = 0/0 for any c in R with x=0,
> >so 0/0 could be any number c in R.

In other words, your above experiment could have been carried out with
any resistor of c ohm.

Cheers
Michael
-- 
Still an attentive ear he lent        Her speech hath caused this pain
But could not fathom what she meant   Easier I count it to explain
She was not deep, nor eloquent.       The jargon of the howling main
                 -- from Lewis Carroll: The Three Usenet Trolls


------------------------------

Date: Mon, 27 Dec 2004 21:00:03 +0100
From: Michael Mendelsohn <invalid@msgid.michael.mendelsohn.de>
Subject: Re: Is zero even or odd?
Message-Id: <41D069C3.FF9AFE3@msgid.michael.mendelsohn.de>

Gordon Weast schrieb:
> It's over here, right next to my picture of -1 apples...

With all those digital cameras around nowadays, most people seem to have
forgotten about photographic negatives. ;)

Cheers
Michael
-- 
Still an attentive ear he lent        Her speech hath caused this pain
But could not fathom what she meant   Easier I count it to explain
She was not deep, nor eloquent.       The jargon of the howling main
                 -- from Lewis Carroll: The Three Usenet Trolls


------------------------------

Date: Mon, 27 Dec 2004 20:17:28 -0000
From: "George Dishman" <george@briar.demon.co.uk>
Subject: Re: Is zero even or odd?
Message-Id: <cqpqir$cef$1@news.freedom2surf.net>


"John Fields" <jfields@austininstruments.com> wrote in message 
news:1pl0t01nkne3vn771q23upffooddlo5qvv@4ax.com...
> On Mon, 27 Dec 2004 16:51:57 -0000, "George Dishman"
> <george@briar.demon.co.uk> wrote:
>
>>
>>"John Fields" <jfields@austininstruments.com> wrote in message
>>news:h8c0t0dvf5fq2ig0uqgaihf89ovrikmsn2@4ax.com...
>>> On Mon, 27 Dec 2004 15:47:32 -0000, "George Dishman"
>>> <george@briar.demon.co.uk> wrote:
>>>

<snip>

> ...  I'm starting to
> think that you're not so much interested in considering 0/0 as you are
> in being argumentative and confrontational.  If that's the case, then
> this 'discussion' is over.

OK, the point on the circuits was an aside anyway so
let's drop it.

<more snipped>
>>> Yes, and that's why I wouldn't ordinarily use Ohm's law to try to
>>> prove that 0/0 = 1.
>>
>>Neither would I, but I'm not the OP.
>
> ---
> Which is supposed to mean what, exactly?

Simply agreeing with your view.

>>> In this case, however, to indicate to the OP that
>>> when the current through the resistor and the voltage across it are
>>> both numerically equal, the value of the resistance will be one ohm
>>> and will remain one ohm as the voltage across the resistance goes to
>>> zero.
>>
>>Sure, but as has been pointed out, if you start
>>by assuming any other value of resistance, the
>>numerical value of the ratio also remains constant
>>at that other value. You have simply illustrated a
>>particular example, not proven any general rule.
>
> ---
> Yes, that's what I was trying to do. (Illustrate a particular example,
> that is.) By writing:
>
> "In this case, however, to indicate to the OP that
> when the current through the resistor and the voltage across it are
> both numerically equal, the value of the resistance will be one ohm
> and will remain one ohm as the voltage across the resistance goes to
> zero."
>
> I thought that I was making it clear that I was talking about a
> particular instance by writing "In this case"... and "when the current
> through the resistor and the voltage across it are both numerically
> equal"...  Both rather limiting.
>
> Sorry if I confused you.
> ---

I think if you look at Mike Kent's reply I'm not the
only one who mistook your motive. It appeared to me
that you were trying to prove that 0/0=1. Going back
to the post to which I first replied, you said in
reply to Michael Mendelsohn:

"John Fields" <jfields@austininstruments.com> wrote in message 
news:2dvvs0ppsmtl1tgcpv4rp4fd8a5cko8bak@4ax.com...
> On Mon, 27 Dec 2004 02:23:11 +0100, Michael Mendelsohn
> <invalid@msgid.michael.mendelsohn.de> wrote:
>>
>>Indeed, you got my point. You cannot determine if 0/0 should have a
>>finite value, and even if, you can't determine what its value should be.
>
> ---
> Yes, you can.  I described how below.

A little later you seemed to repeat your claim:

> Now, if we go to the more general case of:
>
>      x
> y = --- 
>      x
>
> we can see that for any value of x, as x goes to zero, y will remain
> constant, and exactly equal to 1.  Therefore,
>
>
>  0
> --- = 1
>  0

Are you now clarifying that you only used the value
of 1 as an example and 0/0 could equally well have
other values?

>>>>Equally, you could ask what current flowing through a
>>>>superconductor produces zero volts and again the
>>>>answer is any current. Hence 0/0 can have any
>>>>value and it is therefore undefined.
>
> ---
> See John Woodgate's reply.
> ---

I did. By undefined I mean it does not have a unique
value. I'm an engineer reading this in sci.astro (beats
me why it's here) so perhaps other people are looking at
the question with a more mathematical viewpoint. Anyway,
it seemed to me you were arguing that 0/0 has a specific
value of 1 which is not correct.

>>> The very notion of a superconductor renders Ohm's law unfit to
>>> characterized it,
>>
>>Not at all, R is defined as V/I and for any current
>>(below the level that destroys the superconduction
>>obviously), V=0 hence R=0.
>
> ---
> Yes, I should have thought through that one a little more critically.
> Thanks.
> ---
>
>>> so saying that 0/0 can have any value because Ohm's
>>> law doesn't work for superconductors is nonsensical.
>>
>>I wouldn't have chosen Ohms Law myself but since that
>>is the topic, you should at least get the arguments
>>right.
>
> ---
> Are you _intentionally_ being arrogant, is it something over which you
> have little control, or am I misreading your tone?

Perhaps I misread your tone. When you seemed to suggest
my comments on a superconductor as "nonsensical" and my
mention of Ohms Law as "unfit to characterized it", I
answered in kind.

If you can clarify whether or not you were suggesting
that 0/0 has the unique value of 1, perhaps we can get
away from that style.

best regards
George




------------------------------

Date: Mon, 27 Dec 2004 15:46:51 -0800
From: Jamie <jamie_5_not_valid_after_5_Please@charter.net>
Subject: Re: Is zero even or odd?
Message-Id: <9e_zd.31260$uM.28297@fe06.lga>

John Woodgate wrote:

> I read in sci.electronics.design that George Dishman
> <george@briar.demon.co.uk> wrote (in <cqpaom$7rf$1@news.freedom2surf.net
> 
>>) about 'Is zero even or odd?', on Mon, 27 Dec 2004:
> 
> 
>>Hence 0/0 can have any value and it is therefore undefined.
> 
> 
> You just *defined* it. 0/0 = any value. For specific instances, a value
> exists, and several examples have been given, but *in general*, it can
> take any value.
i think this whole thread is getting out of hand.
looking at it from a binary point its very simple.
   bool odd = (value & 0x1 == 0x1);
oh well, what does my opinion mean!



------------------------------

Date: Mon, 27 Dec 2004 12:31:00 -0800
From: "Richard Henry" <rphenry@home.com>
Subject: Re: Is zero even or odd?
Message-Id: <3i_zd.4653$yW5.4342@fed1read02>


"Michael Mendelsohn" <invalid@msgid.michael.mendelsohn.de> wrote in message
news:41D069C3.FF9AFE3@msgid.michael.mendelsohn.de...
> Gordon Weast schrieb:
> > It's over here, right next to my picture of -1 apples...
>
> With all those digital cameras around nowadays, most people seem to have
> forgotten about photographic negatives. ;)

But with digital images, it is possible to show the bit-wise negation of an
image of an apple.





------------------------------

Date: Mon, 27 Dec 2004 16:00:46 -0500
From: Gordon Weast <gweast@mathworks.com>
Subject: Re: Is zero even or odd?
Message-Id: <cqpt5u$i6o$3@fred.mathworks.com>

Groan.....  8-)

Richard Henry wrote:

> "Michael Mendelsohn" <invalid@msgid.michael.mendelsohn.de> wrote in message
> news:41D069C3.FF9AFE3@msgid.michael.mendelsohn.de...
> 
>>Gordon Weast schrieb:
>>
>>>It's over here, right next to my picture of -1 apples...
>>
>>With all those digital cameras around nowadays, most people seem to have
>>forgotten about photographic negatives. ;)
> 
> 
> But with digital images, it is possible to show the bit-wise negation of an
> image of an apple.
> 
> 
> 


------------------------------

Date: Mon, 27 Dec 2004 23:06:28 +0100
From: Michael Mendelsohn <invalid@msgid.michael.mendelsohn.de>
Subject: Re: Is zero even or odd?
Message-Id: <41D08764.5CE4605A@msgid.michael.mendelsohn.de>

Richard Henry schrieb:
> "Michael Mendelsohn" <invalid@msgid.michael.mendelsohn.de> wrote in message
> > Gordon Weast schrieb:
> > > It's over here, right next to my picture of -1 apples...
> >
> > With all those digital cameras around nowadays, most people seem to have
> > forgotten about photographic negatives. ;)
> 
> But with digital images, it is possible to show the bit-wise negation of an
> image of an apple.

Hmm, I'm not 100% sure, but if I multiply i to the coordinates of every
pixel, given as x+iy, isn't the picture rotated?
i apple is then 1 apple rotated.

Cheers
Michael
-- 
Still an attentive ear he lent        Her speech hath caused this pain
But could not fathom what she meant   Easier I count it to explain
She was not deep, nor eloquent.       The jargon of the howling main
                 -- from Lewis Carroll: The Three Usenet Trolls


------------------------------

Date: Mon, 27 Dec 2004 16:14:48 -0600
From: John Fields <jfields@austininstruments.com>
Subject: Re: Is zero even or odd?
Message-Id: <kdt0t0ddceqrf3lg4hgjcl8mf7pbp2kvar@4ax.com>

On Mon, 27 Dec 2004 20:58:44 +0100, Michael Mendelsohn
<invalid@msgid.michael.mendelsohn.de> wrote:


>Below, you remove the short from my diagram.
>However, you also remove the power supply, which achieves the same
>thing.

---
I don't know what you mean, since the + and - terminals are there and
I refer to the voltage across the resistance as being 1V.
>
>> The proper circuit:
>> 
>>       +---(V)---+
>>       |         |
>> (-)---o---[R]---o---(A)---o---(+)
>> 
>> Will yield the proper results if examined using Ohm's law.
>> 
>> Assuming that the voltage across the resistance is 1V and the current
>> through it is 1A, then the resistance will be:
>> 
>>              E     1V
>>         R = --- = ---- = 1 ohm                       (1)
>>              I     1A
>> 
>
>Assuming that the voltage across the resistance is 2V and the current
>through it is 1A, then the resistance will be: 2 ohm.

---
Why would I want to do that?  I'm specifically setting up a set of
conditions to illustrate _my_ point, not yours.
---


>> If we now reduce the voltage to 0.5V and rearrange to solve for I,
>> we'll now have:
>> 
>>              E     0.5V
>>         I = --- = ------ = 0.5A                      (2)
>>              R      1R
>
>We'll then have I = 1V/2R = 0.5 A
>
>> plugging that current into (1) gives us
>> 
>>              0.5V
>>         R = ------ = 1 ohm
>>              0.5A
>
>
>R = 1V / 0.5 A = 2 ohm
>
> 
>> If we continue to reduce the voltage, the current and voltage will
>> always be numerically equal, R will remain at 1 ohm and, clearly, will
>> remain at 1 ohm even if we disconnect the voltage supply, forcing both
>> the voltmeter and ammeter to read 0, in which case we'll have:
>> 
>>              0V
>>         R = ---- = 1 ohm
>>              0A
>
>
>If we continue to reduce the voltage, the current will always be
>numerically half of the voltage, R will remain at 2 ohm and, clearly,
>will remain at 2 ohm even if we disconnect the voltage supply, forcing
>both the voltmeter and ammeter to read 0, in which case we'll have:
> R = 0V / 0A = 2 ohm
>
>
>> Now, if we go to the more general case of:
>> 
>>              x
>>         y = ---
>>              x
>> 
>> we can see that for any value of x, as x goes to zero, y will remain
>> constant, and exactly equal to 1.  Therefore,
>> 
>> 
>>           0
>>          --- = 1
>>           0
>
>This is only true because you assumed a resistor of 1 ohm. If you assume
>a resistor of 2 ohm, then 0/0 = 2.

---
Yes, of course.  But I didn't "assume" a resistance of one ohm, I
selected the voltage and current to force the resistance to one ohm.
---
 
>Again, you can only state with concidence that 0/0 = 1 in this case
>because you already *know* that the resistance is 1; you have not
>computed it from 0/0, because the 0/0 quotient doesn't help you to know
>that the resistance is 1 ohm.

---
The game being to prove that 0/0 = 1, I'm not looking so much for a
resistance of 1 ohm as I am a set of values which when divided by
themselves will result in a quotient of 1.  1 volt and one ampere are
convenient, easy to visualize, and yield the quotient I'm looking for,
so that's why I chose them.  I could just as easily have chosen a
zillion amps and a zillion volts or one picovolt and one picoamp, the
point being to get a numerator and a denominator which were the same
value, numerically.

By doing that, we can say:

             E     1 gazillion volts
	R = --- = ------------------- = 1 ohm
             I     1 gazillion amps

or, more generally:

            1 gazillion
       x = ------------- = 1 
            1 gazillion

Now, let's reduce the numerator and the denominator by enough each to
make them each equal to a million:


            1 million
       x = ----------- = 1 
            1 million

      
Notice that x is still equal to 1.


Now, let's reduce the numerator and the denominator by enough each to
make them each equal to 100000:


            100000
       x = -------- = 1 
            100000

Notice that x is still equal to 1


Now, let's take a HUGE step and reduce the numerator and the
denominator by enough each to make them each equal to 1:


            1
       x = --- = 1 
            1

Notice that x has been oblivious to all of this and is still equal to
1!  When will it change?  Obviously not if we make the numerator and
denominator very large, but maybe if we make them very small?  Let's
see...

Let's make them each equal to 1E-40:


            1E-40
       x = ------- = 1 
            1E-40

Damn! That x is still equal to 1!

It seems that no matter what we do, as long as the numerator and
denominator are equal, the quotient will always be 1. So, if the
smallest number we can come up with is 0, and if 0 = 0, then it seems
we can say:

            0
       x = --- = 1 
            0

!
---

>> >> Consider: Since
>> >>
>> >>               x
>> >>          y = --- = 1
>> >>               x
>> >>
>> >> is certainly true for x = 1, x = 0.5, x = 0.25, and doesn't seem to
>> >> change as x diminishes toward, through and into the negative realm on
>> >> the other side of zero, why should there be an anomaly where x = 0?.
>> >
>> >Because you can't see from 0/0
>> >that it is the result of putting x=0 into x/x.

---
See above
---

>> The value of x is unimportant.  What does matter is that the numerator
>> and denominator be numerically equal.
>
>No, it matters that they are algebraically equal.

---
Yeah, good point. they have to have the same sign in order for the
quotient to come out positive.
---

>When they are numerically equal, that is only useful if the number's not
>zero.

---
Actually, the only time the sign doesn't matter is _when_ they're
zero!
---

>You can cancel out the "x"s, and you should definitely do that if you
>can, but you can't cancel out the zeroes.

---
sure you can, but it would look like this :


	x = ---


so you don't cancel them out, you divide the denominator into the
numerator.
---

>
>> >It might have been the result of putting 0 into 2x/x,
>> >in which case the result ought to be 2.
>> 
>> ---
>> It might have been, but it wasn't.
>
>How do you know?

---
Because that's not what I did.
---

>If I give you a resistor to measure, but no power supply, you will
>measure 0A and 0V, but must the resistor always be 1 ohm, then?

---
Since R = E/I, I won't be able to make a measurement, so the cat will
be both dead and alive.
---
     
>> >In fact, any c = cx/x = 0/0 for any c in R with x=0,
>> >so 0/0 could be any number c in R.
>
>In other words, your above experiment could have been carried out with
>any resistor of c ohm.

---
Of course it "could have been", but then it would have defeated my
purpose. Duh.

-- 
John Fields


------------------------------

Date: Mon, 27 Dec 2004 16:33:56 -0600
From: John Fields <jfields@austininstruments.com>
Subject: Re: Is zero even or odd?
Message-Id: <mo21t0h2g8lgk2ej6ce3d98bdi45f6tf1f@4ax.com>

On Mon, 27 Dec 2004 20:17:28 -0000, "George Dishman"
<george@briar.demon.co.uk> wrote:


>If you can clarify whether or not you were suggesting
>that 0/0 has the unique value of 1, perhaps we can get
>away from that style.

---
Yes.  I apologize for the crankiness...

That 0/0 has the unique value of 1 is precisely what I was suggesting,
and I've written it up in 

kdt0t0ddceqrf3lg4hgjcl8mf7pbp2kvar@4ax.com

(my last post to Michael Mendelsohn on sci.electronics.design)  


-- 
John Fields


------------------------------

Date: 27 Dec 2004 13:14:34 -0800
From: amerar@iwc.net
Subject: Re: Loading Modules with "require"
Message-Id: <1104182074.383037.48550@f14g2000cwb.googlegroups.com>


If I can ask a stupid question:  If the module is loaded only once with
'require', then what good is it?  If I have several procedures that use
the same code and I want to make an 'include', which may get used
several times in the same procedure, it seems that it serves no
purpose.

The idea is to have code that you can make generic and use in many
different scripts, load as many times as you need to, etc......



------------------------------

Date: Mon, 27 Dec 2004 22:57:00 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Loading Modules with "require"
Message-Id: <33bepvF3ur15tU1@individual.net>

amerar@iwc.net wrote:
> Gunnar Hjalmarsson wrote:
>> Put the code in a subroutine and call that routine rather than
>> requiring the library repeatedly.
> 
> If I can ask a stupid question:  If the module is loaded only once
> with 'require', then what good is it?  If I have several procedures
> that use the same code and I want to make an 'include', which may get
> used several times in the same procedure, it seems that it serves no
> purpose.

If you put the code in a subroutine, it gets compiled when you "require"
(or "use") it, while it gets executed each time you call the subroutine.

See also Paul's example.

> The idea is to have code that you can make generic and use in many
> different scripts, load as many times as you need to, etc......

I did understand that.

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


------------------------------

Date: 27 Dec 2004 14:28:42 -0800
From: byoukstetter@hotmail.com
Subject: Perl CGI script using Win::ODBC module - failed login on
Message-Id: <1104186522.138162.41690@f14g2000cwb.googlegroups.com>

Ok I have an issue with a CGI script that I have written in Perl using
the Win::ODBC module for db access.  I have a System DSN that I have
setup on the server and I want the script to use that ODBC DSN for
security reasons.  The bit something like:

$DSN = "vrs";
if (!($db = new Win32::ODBC($DSN))){
print "Content-type: text/html\n\n";
print "Error connecting to $DSN\n";
print "Error: " . Win32::ODBC::Error() . "\n";
exit;
}
 .
 .
 .


>From all the examples I've seen, this work.  However, when the script
is run I always get an error like: "the user '(null)' is not
associated with  a trusted SQL server connection".

If I change the script to:
$DSN = "vrs";
if (!($db = new Win32::ODBC("dsn=vrs; uid=xx; pwd=blah;"))){
print "Content-type: text/html\n\n";
print "Error connecting to $DSN\n";
print "Error: " . Win32::ODBC::Error() . "\n";
exit;
}

The new Win32::ODBC object is created with out a problem, but I want to
encapsulate the login credentials into the DSN.

I am using IIS (v 6.0 and 5.1).  At first I thought this was a system
resource access issue with the user account that IIS uses for this web
site, but after giving this user full access, Im still at a loss.  Can
anyone shed some light on my delema?  Thanks in advance.

Brandon



------------------------------

Date: 27 Dec 2004 13:51:18 -0800
From: "A Down View" <downview@gmail.com>
Subject: Re: regexp match large file
Message-Id: <1104184278.392223.79670@z14g2000cwz.googlegroups.com>

What's the easiest way to match regexp in an entire .txt file against a
set of keywords?

For example, a script that would search an e-mail for the words "hello"
"computer" "johnny" and then return the results?

Sorry if this question is a bit obtuse, I merely exploring an idea...
Thanks.

downview



------------------------------

Date: 27 Dec 2004 14:23:21 -0800
From: ioneabu@yahoo.com
Subject: Re: regexp match large file
Message-Id: <1104186201.045542.19590@f14g2000cwb.googlegroups.com>

You could load the whole file into a string and go from there or, if it
is a big big file, read it in one line at a time.

As far as the matching part, I have asked for help on this topic in the
past so maybe a few links to recent discussion might help:

http://groups-beta.google.com/group/comp.lang.perl.misc/browse_thread/thread/7a08f9ff2325d553/57ac337ed73b655f?q=ioneabu@yahoo.com&_done=%2Fgroup%2Fcomp.lang.perl.misc%2Fsearch%3Fgroup%3Dcomp.lang.perl.misc%26q%3Dioneabu@yahoo.com%26qt_g%3D1%26searchnow%3DSearch+this+group%26&_doneTitle=Back+to+Search&&d#57ac337ed73b655f


http://groups-beta.google.com/group/comp.lang.perl.misc/browse_thread/thread/e25f24bd906270b5/0caf2c9d445a9258?q=ioneabu@yahoo.com&_done=%2Fgroup%2Fcomp.lang.perl.misc%2Fsearch%3Fq%3Dioneabu@yahoo.com%26start%3D10%26&_doneTitle=Back+to+Search&&d#0caf2c9d445a9258



------------------------------

Date: 27 Dec 2004 22:44:47 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: regexp match large file
Message-Id: <slrnct142v.non.abigail@alexandra.abigail.nl>

A Down View (downview@gmail.com) wrote on MMMMCXXXVI September MCMXCIII
in <URL:news:1104184278.392223.79670@z14g2000cwz.googlegroups.com>:
''  What's the easiest way to match regexp in an entire .txt file against a
''  set of keywords?
''  
''  For example, a script that would search an e-mail for the words "hello"
''  "computer" "johnny" and then return the results?
''  
''  Sorry if this question is a bit obtuse, I merely exploring an idea...
''  Thanks.


    $ grep 'hello|computer|johnny' e.mail

Or:

    $ for w in hello computer johnny; do grep $w e.mail; done



Abigail
-- 
#!/opt/perl/bin/perl -w
$\ = $"; $; = $$; END {$: and print $:} $SIG {TERM} = sub {$ := $_}; kill 15 =>
fork and ($; == getppid and exit or wait) foreach qw /Just another Perl Hacker/


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 7579
***************************************


home help back first fref pref prev next nref lref last post