Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #8954 > unrolled thread

Have I been staring at the screen too long?

Started byRichard Yates <richard@yatesguitar.com>
First post2013-04-05 18:20 -0700
Last post2013-04-11 03:57 -0700
Articles 9 — 6 participants

Back to article view | Back to comp.lang.php


Contents

  Have I been staring at the screen too long? Richard Yates <richard@yatesguitar.com> - 2013-04-05 18:20 -0700
    Re: Have I been staring at the screen too long? Jerry Stuckle <jstucklex@attglobal.net> - 2013-04-05 22:04 -0400
    Re: Have I been staring at the screen too long? Scott Johnson <noonehome@chalupasworld.com> - 2013-04-06 06:22 -0700
    Re: Have I been staring at the screen too long? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-04-06 17:50 +0200
      Re: Have I been staring at the screen too long? Scott Johnson <noonehome@chalupasworld.com> - 2013-04-06 09:27 -0700
        Re: Have I been staring at the screen too long? The Natural Philosopher <tnp@invalid.invalid> - 2013-04-06 19:58 +0100
          Re: Have I been staring at the screen too long? Scott Johnson <noonehome@chalupasworld.com> - 2013-04-06 15:02 -0700
    Re: Have I been staring at the screen too long? Scott Johnson <noonehome@chalupasworld.com> - 2013-04-06 09:36 -0700
    Re: Have I been staring at the screen too long? mirceatanasie94@gmail.com - 2013-04-11 03:57 -0700

#8954 — Have I been staring at the screen too long?

FromRichard Yates <richard@yatesguitar.com>
Date2013-04-05 18:20 -0700
SubjectHave I been staring at the screen too long?
Message-ID<72pul85s8q79k1m99mkblm7pfq2tdd7vku@4ax.com>
I ran across this line that is apparently generated by Dreamweaver
CS4's function for checking authorization for page access. Doesn't the
content of the 'if' clause ALWAYS evaluate to false regardless of the
value of $strUsers? 

    if (($strUsers == "") && false) { $isValid = true; } 

If so, is there some obscure purpose anyone can think of for this
line?

Richard Yates

[toc] | [next] | [standalone]


#8955

FromJerry Stuckle <jstucklex@attglobal.net>
Date2013-04-05 22:04 -0400
Message-ID<kjnvnb$r3d$2@dont-email.me>
In reply to#8954
On 4/5/2013 9:20 PM, Richard Yates wrote:
> I ran across this line that is apparently generated by Dreamweaver
> CS4's function for checking authorization for page access. Doesn't the
> content of the 'if' clause ALWAYS evaluate to false regardless of the
> value of $strUsers?
>
>      if (($strUsers == "") && false) { $isValid = true; }
>
> If so, is there some obscure purpose anyone can think of for this
> line?
>
> Richard Yates
>

Another good reason not to use Dreamweaver.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#8956

FromScott Johnson <noonehome@chalupasworld.com>
Date2013-04-06 06:22 -0700
Message-ID<kjp7f1$1t0$1@dont-email.me>
In reply to#8954
On 4/5/2013 6:20 PM, Richard Yates wrote:
> I ran across this line that is apparently generated by Dreamweaver
> CS4's function for checking authorization for page access. Doesn't the
> content of the 'if' clause ALWAYS evaluate to false regardless of the
> value of $strUsers?
>
>      if (($strUsers == "") && false) { $isValid = true; }
>
> If so, is there some obscure purpose anyone can think of for this
> line?
>
> Richard Yates
>

At first glance it looks like it is taking something that would 
otherwise be false and making evaluate to true.

[toc] | [prev] | [next] | [standalone]


#8957

From"M. Strobel" <sorry_no_mail_here@nowhere.dee>
Date2013-04-06 17:50 +0200
Message-ID<asauj3Fjg5mU1@mid.uni-berlin.de>
In reply to#8954
Am 06.04.2013 03:20, schrieb Richard Yates:
> I ran across this line that is apparently generated by Dreamweaver
> CS4's function for checking authorization for page access. Doesn't the
> content of the 'if' clause ALWAYS evaluate to false regardless of the
> value of $strUsers? 
> 
>     if (($strUsers == "") && false) { $isValid = true; } 
> 
> If so, is there some obscure purpose anyone can think of for this
> line?

Yes, ($b && false) is always false, ($b || false) is always $b.

/Str.

[toc] | [prev] | [next] | [standalone]


#8958

FromScott Johnson <noonehome@chalupasworld.com>
Date2013-04-06 09:27 -0700
Message-ID<kjpia4$bup$1@dont-email.me>
In reply to#8957
On 4/6/2013 8:50 AM, M. Strobel wrote:
> Am 06.04.2013 03:20, schrieb Richard Yates:
>> I ran across this line that is apparently generated by Dreamweaver
>> CS4's function for checking authorization for page access. Doesn't the
>> content of the 'if' clause ALWAYS evaluate to false regardless of the
>> value of $strUsers?
>>
>>      if (($strUsers == "") && false) { $isValid = true; }
>>
>> If so, is there some obscure purpose anyone can think of for this
>> line?
>
> Yes, ($b && false) is always false, ($b || false) is always $b.
>
> /Str.
>

Certainly right.  Now that I look at the logical operator, it will 
always be false no matter the comparison and the if statement will never 
be executed.

Strange code.

Scotty

[toc] | [prev] | [next] | [standalone]


#8966

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2013-04-06 19:58 +0100
Message-ID<kjpr8p$lmq$2@news.albasani.net>
In reply to#8958
On 06/04/13 17:27, Scott Johnson wrote:
> On 4/6/2013 8:50 AM, M. Strobel wrote:
>> Am 06.04.2013 03:20, schrieb Richard Yates:
>>> I ran across this line that is apparently generated by Dreamweaver
>>> CS4's function for checking authorization for page access. Doesn't the
>>> content of the 'if' clause ALWAYS evaluate to false regardless of the
>>> value of $strUsers?
>>>
>>>      if (($strUsers == "") && false) { $isValid = true; }
>>>
>>> If so, is there some obscure purpose anyone can think of for this
>>> line?
>>
>> Yes, ($b && false) is always false, ($b || false) is always $b.
>>
>> /Str.
>>
>
> Certainly right.  Now that I look at the logical operator, it will
> always be false no matter the comparison and the if statement will never
> be executed.
>
> Strange code.
>

according to the link posted abobe, its so the false can be toggled to 
rue easily by Dreamweaver.

I spent two days turning dreamweaver code into respectable HTML, got it 
down from 40k to 3k..


> Scotty
>
>


-- 
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to 
lead are elected by the least capable of producing, and where the 
members of society least likely to sustain themselves or succeed, are 
rewarded with goods and services paid for by the confiscated wealth of a 
diminishing number of producers.

[toc] | [prev] | [next] | [standalone]


#8968

FromScott Johnson <noonehome@chalupasworld.com>
Date2013-04-06 15:02 -0700
Message-ID<kjq5tv$nq9$1@dont-email.me>
In reply to#8966
On 4/6/2013 11:58 AM, The Natural Philosopher wrote:
> On 06/04/13 17:27, Scott Johnson wrote:
>> On 4/6/2013 8:50 AM, M. Strobel wrote:
>>> Am 06.04.2013 03:20, schrieb Richard Yates:
>>>> I ran across this line that is apparently generated by Dreamweaver
>>>> CS4's function for checking authorization for page access. Doesn't the
>>>> content of the 'if' clause ALWAYS evaluate to false regardless of the
>>>> value of $strUsers?
>>>>
>>>>      if (($strUsers == "") && false) { $isValid = true; }
>>>>
>>>> If so, is there some obscure purpose anyone can think of for this
>>>> line?
>>>
>>> Yes, ($b && false) is always false, ($b || false) is always $b.
>>>
>>> /Str.
>>>
>>
>> Certainly right.  Now that I look at the logical operator, it will
>> always be false no matter the comparison and the if statement will never
>> be executed.
>>
>> Strange code.
>>
>
> according to the link posted abobe, its so the false can be toggled to
> rue easily by Dreamweaver.
>
> I spent two days turning dreamweaver code into respectable HTML, got it
> down from 40k to 3k..
>
>
>> Scotty
>>
>>
>
>

I think you are right, DW used many coding 'wizards' with several options.

Yeah I remember using DW when Macromedia had it and it did add a great 
deal of 'one size fits all' coding.

[toc] | [prev] | [next] | [standalone]


#8959

FromScott Johnson <noonehome@chalupasworld.com>
Date2013-04-06 09:36 -0700
Message-ID<kjpipi$fk7$1@dont-email.me>
In reply to#8954
On 4/5/2013 6:20 PM, Richard Yates wrote:
> I ran across this line that is apparently generated by Dreamweaver
> CS4's function for checking authorization for page access. Doesn't the
> content of the 'if' clause ALWAYS evaluate to false regardless of the
> value of $strUsers?
>
>      if (($strUsers == "") && false) { $isValid = true; }
>
> If so, is there some obscure purpose anyone can think of for this
> line?
>
> Richard Yates
>

Maybe this can shed some light, a few ideas about it.

http://stackoverflow.com/questions/9494564/if-strusers-false-what-the-false-is-referring-to

Scotty

[toc] | [prev] | [next] | [standalone]


#9027

Frommirceatanasie94@gmail.com
Date2013-04-11 03:57 -0700
Message-ID<26e3a263-5586-49bf-8045-3efdbdc615af@googlegroups.com>
In reply to#8954
Il giorno sabato 6 aprile 2013 03:20:00 UTC+2, Richard Yates ha scritto:
> I ran across this line that is apparently generated by Dreamweaver
> 
> CS4's function for checking authorization for page access. Doesn't the
> 
> content of the 'if' clause ALWAYS evaluate to false regardless of the
> 
> value of $strUsers? 
> 
> 
> 
>     if (($strUsers == "") && false) { $isValid = true; } 
> 
> 
> 
> If so, is there some obscure purpose anyone can think of for this
> 
> line?
> 
> 
> 
> Richard Yates

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web