Gel! This is the loopy-code guy from last week...the one that turned your
brain to mush!! Beat him with a stale muffin!!!

See email with subject line... Loaded Evaluation for those who like to wait

** Waking Python to go after guy from Australia.... ***
WHEEEEEEEEEEEeeeeee.....

<grin>

Erika
(with a *K*)

"Blessed are they who can laugh at themselves, for they shall never cease to
be amused."

-----Original Message-----
From: another programmer [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 11:53 PM
To: CF-Community
Subject: What's the diff?


I just made a boo boo and emailed CF-Talk instead of CF-Community... sigh...
anyway, here's my mail:

So your wondering, if I'm working on some system on the other side of the
panet, or just in another time zone, but I want it working off my time, not
the servers', what do I do?
And perhaps you don't want to fiddle with JavaScript. :-P

Well, I wrote an email awhile back answering something like this, but I want
to know: was my answer the best way, or the worst?

<cfscript>
// calculate the current Diff (your local time) from GMT/UTC in seconds as
request.remoteDiff_seconds then this'll do the rest
// lets pick the east side of Australia (+10 GMT)
request.remoteDiff_seconds = 36000;
request.remoteDate = DateAdd("s", request.remoteDiff_seconds, DateAdd("s",
StructFind(GetTimeZoneInfo(), "utcTotalOffset"), Now()));
// now use request.remoteDate instead of now() (hey, it'll likely only be
seconds out, what's the fuss?)
</cfscript>



<cf_info source="brain">
    okay, I admit it, I just wanted to communicate with human beings for a
minute.... sure, I like code, but I want to participate in conversation with
real beings...
    <cf_dream>
        One day I'll write good enough code that someone will say "hey, have
a break and go talk to people for a couple of days" ahh
    </cf_dream>
</cf_info>

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

-----Original Message-----
From: Programmer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 01, 2001 2:55 AM
To: CF-Community
Subject: Loaded Evaluation for those who like to wait


The indefinables
----------------

In the 1st installment of a one part series, we'll look at indefinable
statements, indefinable in that they can't be completely evaluated before
time ends.
:-P

Looping statements
------------------

<cfif setVariable("i", "evaluate(i)") and evaluate(i)>

A tunnelish loop.  The first time we set i and evaluate i, from that time we
go straight down, evaluate i, evaluate i etc.
Function calls in counting layers can be described as 2
(setVariable,evaluate), 1 (evaluate), 1 (evaluate), 1 (evaluate) etc. (where
(n is integer),  f(n) = 1 where n > 2, f(n) = 2 where n = 1 else undefined)

<cfif setVariable("i", 1) and setVariable("v1", "setVariable(""i"", i + 1)
and setVariable(""v##i##"", v1) and evaluate(evaluate(""v##i##""))") and
evaluate(v1)>

A systematically widening loop where every iteration creates a variable and
revalues a variable.
Can also be written

<cfif setVariable("i", 1) and setVariable("v1", "setVariable(""i"", i + 1)
and setVariable(""v##i##"", v1) and evaluate(evaluate(""v1""))") and
evaluate(v1)>

however, under passing examination it can be seen this expanding code has
the same functioning as <cfif setVariable("i", "evaluate(i)") and
evaluate(i)> of evaluating itself.

Anyone managed an infinite-long evaluation (in a single line) that doesn't
occur from evaluating a variable?  Or at least not in this same manner?
Hmm. I wonder if any of this code runs... should try that sometime... of
course, i do need a </cfif> somewhere... ;-P
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to