RE: Time zone mask characters

2003-08-21 Thread Bill Henderson
Here is what I ended up doing:

cffunction name=ExtendedTimeFormat returntype=string
cfargument name=time type=string required=true
cfargument name=mask type=string required=false default=hh:mm tt
cfset var timezone = ListLast( TimeFormat( Now( ),long ),  )
cfset var resultstring = TimeFormat( time,mask )
cfset resultstring = Replace( resultstring,zz,timezone,ALL )
cfreturn resultstring
/cffunction

#ExtendedTimeFormat( Now(),HH:mm zz )# returns what I am looking for.

I have decided to challenge myself, however. Aside from the use of
cffunction, the above udf will not work on CF5 because of the lack of
support for long and full as masks, and the fact that any non-mask
characters are converted into an apos' delimitated list. If you have any
insight, please let me know. I am looking into GetTimeZoneInfo() then hand
writing a struct of arrays holding time zones and offsets, then picking one
based on offset. This also allows for zzz for outputting the full time
zone name.  Thanks for the help

Bill Henderson
[EMAIL PROTECTED]

-Original Message-
From: Matthew Walker [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 20, 2003 7:17 PM
To: CF-Talk
Subject: RE: Time zone mask characters

I think the best solution might be to write a udf:

Function getTimeZone() {
Return ListLast(TimeFormat(Now(),long), )
}

or you could write your own extraspecialtimeformat() function that applied
the regular timeformat() fn then replaced any z with the tz.


 -Original Message-
 From: Bill Henderson [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 21 August 2003 1:16 p.m.
 To: CF-Talk
 Subject: RE: Time zone mask characters
 
 Thanks, I was hoping that was not going to be the only way, because I
 would
 have to do it like this:
 
 #TimeFormat( Now( ),HH:mm )# #ListLast( TimeFormat( Now( ),long ), 
 )# 
 
 In order return a string of 23:05 PDT - And that seems a bit kludgy. I
 submitted a feature request to MM, although I believe that this would
 probably not be a commonly needed feature.
 
 Bill Henderson
 [EMAIL PROTECTED]
 
 -Original Message-
 From: Matthew Walker [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 20, 2003 3:16 PM
 To: CF-Talk
 Subject: RE: Time zone mask characters
 
 You could use listlast(TimeFormat( Now( ),long ),  ) as a work around
 to
 get the time zone.
 
  -Original Message-
  From: Bill Henderson [mailto:[EMAIL PROTECTED]
  Sent: Thursday, 21 August 2003 8:23 a.m.
  To: CF-Talk
  Subject: Time zone mask characters
 
  Hello All -
 
  When you do TimeFormat( Now( ),long ) or TimeFormat( Now( ),full )
 it
  returns strings with the time zone at the end like so: 2:25:18 AM PDT.
 
  My question is, what are the mask characters to get the time zone to
  display
  if you don't use long or full as the mask? I can't find anything in
  the
  docs about it.
 
  More specifically, I want to show the date as 24 hour time, like this:
  TimeFormat( Now( ),HH:mm ZZ ) with ZZ being the time zone.
 
 
  Bill Henderson
  [EMAIL PROTECTED]
 
 
 
 

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


Time zone mask characters

2003-08-20 Thread Bill Henderson
Hello All - 

When you do TimeFormat( Now( ),long ) or TimeFormat( Now( ),full ) it
returns strings with the time zone at the end like so: 2:25:18 AM PDT. 

My question is, what are the mask characters to get the time zone to display
if you don't use long or full as the mask? I can't find anything in the
docs about it.

More specifically, I want to show the date as 24 hour time, like this:
TimeFormat( Now( ),HH:mm ZZ ) with ZZ being the time zone.


Bill Henderson
[EMAIL PROTECTED]

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: Time zone mask characters

2003-08-20 Thread Bill Henderson
Thanks, I was hoping that was not going to be the only way, because I would
have to do it like this: 

#TimeFormat( Now( ),HH:mm )# #ListLast( TimeFormat( Now( ),long ), 
)#  

In order return a string of 23:05 PDT - And that seems a bit kludgy. I
submitted a feature request to MM, although I believe that this would
probably not be a commonly needed feature.

Bill Henderson
[EMAIL PROTECTED]

-Original Message-
From: Matthew Walker [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 20, 2003 3:16 PM
To: CF-Talk
Subject: RE: Time zone mask characters

You could use listlast(TimeFormat( Now( ),long ),  ) as a work around to
get the time zone.

 -Original Message-
 From: Bill Henderson [mailto:[EMAIL PROTECTED]
 Sent: Thursday, 21 August 2003 8:23 a.m.
 To: CF-Talk
 Subject: Time zone mask characters
 
 Hello All -
 
 When you do TimeFormat( Now( ),long ) or TimeFormat( Now( ),full ) it
 returns strings with the time zone at the end like so: 2:25:18 AM PDT.
 
 My question is, what are the mask characters to get the time zone to
 display
 if you don't use long or full as the mask? I can't find anything in
 the
 docs about it.
 
 More specifically, I want to show the date as 24 hour time, like this:
 TimeFormat( Now( ),HH:mm ZZ ) with ZZ being the time zone.
 
 
 Bill Henderson
 [EMAIL PROTECTED]
 
 

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: How to compute this DAY (not Date) last year?

2003-08-07 Thread Bill Henderson
If it helps, you add an extra day (02/29) every 4 years except IF the year
ends in 00 and is divisible by 400.

Maybe you could make a UDF with a version of the following code called
isLeapYear(). If #somedate# were 02/29/2003, you have 28 days in feb, and if
#somedate# were 02/29/2004, you have 29 days in feb.

cfif isdate( somedate )
29 days in February
cfelse
28 days in February
/cfif

I am still a bit confused by what you want, though. Are you looking for 2nd
Monday in June, but last year, or 20th Monday of last year? Basically, how
are you defining what this day is.

Bill Henderson
[EMAIL PROTECTED]



-Original Message-
From: Jim Campbell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003 9:21 AM
To: CF-Talk
Subject: Re: How to compute this DAY (not Date) last year?

Don't forget about leap years - that'll be off by a day if you go back 
over one.

- Jim

DURETTE, STEVEN J (AIT) wrote:

wouldn't that be dateadd('d', -365, now()) ?



-Original Message-
From: Tony Schreiber [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 05, 2003 10:59 AM
To: CF-Talk
Subject: RE: How to compute this DAY (not Date) last year?


  

For a sales report, I need to figure out what the date is for
this DAY last year. So for today, 8/5/2003 Tuesday, I need to
figure out what the date was for this Tuesday last year
(which was 8/6/2002).

It's not as simple as today-364 days right? You've got leap
years of course and probably some other wrenches in there as
well. It's actually probably simple, but my brain is fried
right now. ;)
  

Use DateAdd() to take a year off, then DateFormat() or
DayofWeekAsString(DayOfWeek()) to get the Day name



No, I don't want the day of this DATE last year. I want the date of this
DAY last year. ;)

Tony Schreiber, Senior Partner  Man and Machine, Limited
mailto:[EMAIL PROTECTED]   http://www.technocraft.com

http://www.is300.net The Enthusiast's Home of the Lexus IS300 since 1999
  * PARTS STORE NOW OPEN * http://www.is300.net/store/
http://www.simplemessageboard.comFree Forum Software for Cold Fusion




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



OT: Leap Years (Was How to compute this DAY (not Date) last year?)

2003-08-07 Thread Bill Henderson
Oops, I wrote that wrong. It should be:

Years ending in '00 are not leap years but those divisible by 400, are.
(Year with 02/29 = Leap Year, year w/o 02/29 = Common Year)

So:
1600 = Leap Year
1700 = Common Year
1800 = Common Year
1900 = Common Year
2000 = Leap Year

If it helps, each solar year is 365.24219 days long.

The real fun is in the leap seconds that were added to UTC to sync with
International Atomic Time. To account for variations in the Earth's
rotation, varying lengths of time (between 25 and 32 seconds) were added to
all the years of the '90s except 98 and 95. 

I am getting most of this from an old textbook of mine, but the leap seconds
stuff I found at http://www.nmm.ac.uk/site/navId/00500300f00h. It is written
for kids, but has some really cool info.

Bill Henderson
[EMAIL PROTECTED]




-Original Message-
From: Scott Brady [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 05, 2003 2:08 PM
To: CF-Talk
Subject: RE: How to compute this DAY (not Date) last year?

-- Original Message --
From: Bill Henderson [EMAIL PROTECTED]

If it helps, you add an extra day (02/29) every 4 years except IF the year
ends in 00 and is divisible by 400.

Actually, if it's divisible by 400 then there is a Feb. 29(there was a Feb.
29, 2000, but there wasn't a Feb. 29, 1900), for what it's worth.

Scott Brady
http://www.scottbrady.net/
 
 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: TOT (Totally Off Topic): other prime CF community around? URL?

2003-07-25 Thread Bill Henderson
You may have hit the subscribe link on the site. That refers to the
magazine, but you can go to http://www.sys-con.com/fusetalk/ and select you
mailing list from there. 

Bill Henderson
[EMAIL PROTECTED]

-Original Message-
From: Chunshen (Don) Li [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 25, 2003 12:09 PM
To: CF-Talk
Subject: TOT (Totally Off Topic): other prime CF community around? URL?

The CDDJ is like HOF, bidirectional. Multidirectional. Whatever. :)
I don't know how it works.  I signed up via the URL you offered, got an
email, reading like:
 ...
Thank you for your request for a FREE SUBSCRIPTION to the ColdFusion
Developer's Journal 
Industry Newsletter. 

CFDJ's mission is to serve the greater ColdFusion community as the premier
source of quality ColdFusion information. We appreciate your feedback which
helps us serve our readers better. 
...
SYS-CON Media 
[EMAIL PROTECTED] 


No where it says something like to post to the list send email to
[EMAIL PROTECTED]  I'm afraid of sending the post to
[EMAIL PROTECTED]

Thanks.






===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email: [EMAIL PROTECTED]
Blog : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda 

 -Original Message-
 From: Chunshen (Don) Li [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, July 24, 2003 1:55 PM
 To: CF-Talk
 Subject: TOT (Totally Off Topic): other prime CF community 
 around? URL?
 
 
 Thanks, Jedi :) would cfdj newsletter be one directional 
 (from cfjd to subscribers)? or like houseoffusion, true 
 mailing list? devmx.com seems clearly mailing list.
 
 Don
 Are you asking about other listservs? There is the cfdj list 
 (http://www.sys-con.com/coldfusion/newslettersubscribe.cfm). 
 There is 
 mxdev at devmx.com.
 


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: TOT (Totally Off Topic): other prime CF community around? URL?

2003-07-24 Thread Bill Henderson
Another one that needs more traffic, but gets some really cool threads once
and a while (Like today: CFC constructors) is the CFCDev list on
cfczone.org. It is geared just toward CFCs, as you might imagine.

Bill Henderson
[EMAIL PROTECTED]

-Original Message-
From: LI, Chunshen (Don) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 24, 2003 11:50 AM
To: CF-Talk
Subject: TOT (Totally Off Topic): other prime CF community around? URL?

First my apology for TOT.  I like this community a lot
but I need to expand reach.

Thanks.

Don
Li, Chunshen (Don)

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Quick question- get rid of 1st 2 characters

2003-06-02 Thread Bill Henderson
newstring = left( string,( len( string ) - 2 ) )

-Original Message-
From: Janine Jakim [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 01, 2003 11:24 AM
To: CF-Talk
Subject: Quick question- get rid of 1st 2 characters

I know I know this, yet the answer isn't coming immediately...
I just need to strip the 1st 2 charaters off a field before sending it to
the database.  So if this is typed in LV1234 I only want the 1234. 
Left won't work because the part on right side can be a variable length
thanks,
j

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Quick question- get rid of 1st 2 characters

2003-06-02 Thread Bill Henderson
Sorry, brain fart, it's:

newstring = right( string,( len( string ) - 2 ) )

-Original Message-
From: Janine Jakim [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 01, 2003 11:24 AM
To: CF-Talk
Subject: Quick question- get rid of 1st 2 characters

I know I know this, yet the answer isn't coming immediately...
I just need to strip the 1st 2 charaters off a field before sending it to
the database.  So if this is typed in LV1234 I only want the 1234. 
Left won't work because the part on right side can be a variable length
thanks,
j

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Tell Us How You Use ColdFusion, You May Win $100 at Amazon

2003-01-15 Thread Bill Henderson
Hey all - 

Just wanted to know if I am way off-base here, but if somebody on the
list decided to promote a survey/product/contest, etc, they would
probably get nailed and asked to take it to the community list or told
where to put it.

I know that Macromedia makes ColdFusion, but is really OK for them to
use CF-Talk as a promotional tool? I think the just very spam-style
subject line might be getting to me. I am not trying to be a we don't
do that here sort of guy, but I would hope that MM would show a little
more respect. Announcements about updaters, new versions, etc make
sense, but a self serving marketing survey seems over the line.

Just trying to annoy somebody,
Bill Henderson
[EMAIL PROTECTED]


 -Original Message-
 From: Frank Mamone [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 15, 2003 11:09 AM
 To: CF-Talk
 Subject: Re: Tell Us How You Use ColdFusion, You May Win $100 at
Amazon
 
 Excluding Quebec as usual:(
 
 - Original Message -
 From: Jochem van Dieten [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Wednesday, January 15, 2003 1:47 PM
 Subject: Re: Tell Us How You Use ColdFusion, You May Win $100 at
Amazon
 
 
  Phil Costa wrote:
  
   And if you complete the survey, you'll be automatically entered in
a
 contest to win one of two $100 gift certificates at Amazon.com.
 
  As usual:
  THIS PROMOTION IS INTENDED FOR PARTICIPATION IN THE UNITED
  STATES AND CANADA ONLY, AND SHALL BE CONSTRUED AND
  EVALUATED ACCORDING TO US OR CANADIAN LAW.
 
  Jochem
 
 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4




RE: Tell Us How You Use ColdFusion, You May Win $100 at Amazon

2003-01-15 Thread Bill Henderson
non_confrontationally

I can understand why MM sees this list a good place to advertise a
marketing survey, and that's not why I object. (And I'm not sure that I
do, completely.) I would think that a survey of this sort is not done to
create a new tool, per se, but in an effort to come up with better
advertising, figure who to market products to, and how much they can get
away with raising/lowering prices when selling to companies. I could be
wrong, and quite a few of my friends say that is frequently the case. I
just question advertising in any form, before accepting it. 

There is a better place to give feedback and feature requests to MM:
http://www.macromedia.com/support/email/wishform/?6213=3
Developers seem to use it, and MM seems to respond to this very nicely.

I am not saying MM should not use CF-Talk as a place to post links to
surveys, but like posting help wanted ads, maybe there are better places
to do it.

/non_confrontationally

Bill Henderson
[EMAIL PROTECTED]


 I have to say that I disagree with your statement. If anything, this
list
 is
 perfect for that sort of survey. Taking that survey, it was apparent
to me
 that MM is developing some sort of reporting tool, a tool that will no
 doubt
 effect us as developers in one way or another in the future. As such,
I
 think we're the perfect target audience, as we're in the trenches
with
 CF
 every day.
 
 Further, while I in no way speak for MM, I think they recognize the
list
 members of cf-talk as skilled CF professionals, and any feedback they
 receive from this list will be weighted accordingly.
 
 Sure, dangling the $100 gift certificate gives the impression of some
sort
 of market gimmick, but I don't really care about the gift. I care that
 they
 are taking the time to ask for feedback from the development
community,
 which is something that, if you've been on this list a while, you'll
have
 to
 admit a lot of people have given them a lot of heat for not doing in
the
 past (rightly or wrongly is another matter!).
 
 Just my $.02.
 
 Regards,
 Dave.


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4




RE: CF4K was Re: Macromedia listening? is RE: ColdFusion for kids

2002-12-07 Thread Bill Henderson
This led me to do some searching for Logo and turtle graphics (2nd grade
for me) and I found this, and it actually pertains to the original
thread (kind of)
http://c2.com/cgi/wiki?WhatSortOfComputationWouldInterestJuniorSchoolCh
ildren

This is an off-shoot of an article talking about Logo in general. The
link for that is: http://c2.com/cgi/wiki?LogoLanguage




 -Original Message-
 From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, December 07, 2002 5:13 PM
 To: CF-Talk
 Subject: Re: CF4K was Re: Macromedia listening? is RE: ColdFusion for
kids
 
 Yes!
 
 Logo!
 
 Who can forget the turtle  turtlegraphics?
 
 Dick
 
 On Saturday, December 7, 2002, at 05:02 PM, Stacy Young wrote:
 
  I would say they do...school system is quite good in most areas. We
  had a
  computer lab when I was in elementary school. (All
  MACs/Apples)...There were
  maybe 15 machinesand that was back in..um...83-84 maybe?
 
  Most projects involved working with a program called Logo...it was a
  little
  turtle that u would program to draw pictures. That's actually what
  generated
  my first interest in puters.
 
  FD 60   (forward 60 pixels)
  RT 45   (right turn 45 degrees)
  FD 100
  LT 90
  FD 150
 
  There were school contests for drawing more elaborate things that
  involved
  some flash-like programming...
 
  Stace
 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



OT: Submitting flash forms to CF

2002-11-16 Thread Bill Henderson
Hey all - 

I am starting to mess around with flash forms, and I was looking for a
way to send all the form fields in the submission. In the forms I have
built so far, it seems that only the inputs that the user enter data
into get sent in the submission. I am looking for some way to send blank
fields without having to cfparam them on the submitted page. Also, does
any body know any action script to loop around the flash form fields and
create a form.fieldnames variable? Or do I need to set this manually?

(Flash MX, IIS 5, CF 5)

Thanks - 
Bill Henderson
[EMAIL PROTECTED]


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



CFMX serving up XML

2002-11-12 Thread Bill Henderson
Hey all - 

Has anybody had CFMX suddenly start serving up CF templates as XML? I am
running the trial version of MX on a Win XP professional box. (IIS 5.1)
After installing MX and viewing 5 or 6 pages correctly, every page
started coming up as XML. I tried playing around with the DOCTYPE  XML
declarations, (moving from strict to loose, removing them, using XHTML
1.1, etc) messing around with IIS settings, CF admin settings, viewing
from different browsers and different computers, but nothing has worked.
The only templates that seem to run properly are the CF admin pages.

Sorry if this has been covered on the list, but I have had very little
success getting results in the archives here or at the MM site.

Thank you,
Bill Henderson
[EMAIL PROTECTED]





~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



CF variable naming conventions

2002-10-24 Thread Bill Henderson
Hey all - 

Does anybody know of any good resources concerning naming conventions
for variables? I would like to stick as close to a standard as possible,
and although I know there are many 'standards' out there for
conventions, I would like to know what developers are actually using.

Bill Henderson
[EMAIL PROTECTED]





~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: Max length of Text Data?

2002-10-24 Thread Bill Henderson
MAX(DATALENGTH(textdatafield)) 

Bill Henderson
[EMAIL PROTECTED]


 -Original Message-
 From: Lee Fuller [mailto:leelistnew;primedna.net]
 Sent: Thursday, October 24, 2002 12:26 PM
 To: CF-Talk
 Subject: Max length of Text Data?
 
 Someone help me out here.. brain-fart occurring..
 
 Need to look at all the values in the ntext field of a datasource,
 calculate the length (in characters) of the data contained in each
 field, and select only the longest field, then display it's length.
 
 So.. Something like Max(Len(textdatafield)))  sorta..
 
 Ideas?
 
 TTAIA
 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



Really big file manipulation

2002-10-21 Thread Bill Henderson
Hey all - 

I have got a 76,000+ line data file (ZipUSA comma delim file) that I
need to break into smaller tables in my DB. This needs to happen at
least monthly, so I wrote a cfm template to automate the process. The
problem I am having is speed and server load. I have tried using the
following methods, and am wondering if anybody has any suggestions
(apart from using SQL's DTS) Platform info: CF 5 on Win2k, IIS 5 writing
to MSSQL 2000

The tables I am putting everything into are a state table, county table
w/state reference, city table w/county reference, location/district
table w/city reference and zip table w/district reference

1) Create temp SQL table, loop over file, write to temp table, query
temp table, loop over query, and using conditional logic - break into
table structure defined above, and drop temp table. This is the shortest
method taking 20 minutes or so. The problem is that my SQL service's
memory usage spirals out of control and when the template is finished,
it never returns to normal. I have to restart the service to right it.

2) Same as above, but converts the data file into a CF function-made
query and then do a query of query. (This is necessary to re-order data
for break-down step) This one takes forever (an hour on the slowest run)
and both the CF services and the SQL service take over the machine.

3) Read the data file, write a new one, then read that data file and
loop over the lines, breaking it into the table structure above. This
one also takes forever.

Any suggestions at all on how to streamline the process would be really
helpful, Thanks in advance

Bill Henderson
[EMAIL PROTECTED]



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



RE: Really big file manipulation

2002-10-21 Thread Bill Henderson
Thanks for the tip on text drivers, I always forget to try that.

Now to take this thread OT:
The problem I have with DTS is that I am unfamiliar with how to do
advanced data manipulation. In this case, I have to take every row of
the text file, make a new county entry, take the identity for the city
table, make a new entry for the city table with the county identity as a
foreign key, and so on down the levels until I get to the zip table.
And, of course, avoid multiple entries in the county, city and location
tables. To make matters worse, I need the full state names in the state
table, and the csv only has short state names. So, I have to start with
an existing table that I made with stateID, name and short name for the
states and reference this when inputting the counties. 
All this without any knowledge of how to set up advanced stuff in DTS.
If you have a couple of key words for me to search for when looking up
help in DTS, based on what I need to do, that would a big help. 

Or, is there a site somewhere with DTS packages for download similar to
the MM developer's exchange?

Bill Henderson
[EMAIL PROTECTED]


 -Original Message-
 From: jon hall [mailto:jonhall;ozline.net]
 Sent: Monday, October 21, 2002 12:03 PM
 To: CF-Talk
 Subject: Re: Really big file manipulation
 
 Well DTS, possibly using cursors if you need to manipulate the data in
 some way would be the best way imho, but other than that, using an
ODBC
 Text DSN would be a decent way to handle the job with just CF.
 
 Set up an ODBC Text datasource for your csv file. Then select all
 records out of the file into a query (it's blazingly fast), and use
 CF's query of queries to manipulate the data, then insert...or write
 out new files that map directly to the tables and use dts to run the
 import...
 
 Honestly though...using DTS is really the best way. If nothing is
 being done other than inserting data into the right places and maybe
 some string manipulation, SQL Server provides all the necessary tools
 to do this very fast.
 
 --
  jon
  mailto:jonhall;ozline.net
 



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: Really big file manipulation

2002-10-21 Thread Bill Henderson
Tried these - I thought not committing was the problem at first, but
there was no appreciable change. Same with the nologged bulk, this
lightened the load, but not much. And I always use queryparams.

Bill Henderson
[EMAIL PROTECTED]



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:kpeterson;sehinc.com]
 Sent: Monday, October 21, 2002 1:25 PM
 To: CF-Talk
 Subject: Re: Really big file manipulation
 
 Your SQL server memory is mostly likely climbing trying to keep track
of
 rollback information.
 
 Try using a nologged bulk copy when you create and load the temp
table.
 
 If possible use update select or insert select for moving the data.
 
 Commit your transaction(s) more often if possible.
 
 Use cfqueryparm for all changing values (variables)  in your SQL
 statments.
 
 
 Kore Peterson
 Database Development Specialist
 SEH - Minneapolis
 612.758.6739
 
 
 
 
 
 Randell B
 Adkins  To: CF-Talk cf-
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]   cc:
 OV  Subject: Re: Really big
file
 manipulation
 
 10/21/2002
 01:25 PM
 Please respond
 to cf-talk
 
 
 
 
 
 
 I at one time had a 500,000 byte file to import 5 days a week.
 But that had to go to one table.
 
 Sorry my recommendations is on MSSQL DTS.
 
 
 
 
  [EMAIL PROTECTED] 10/21/02 02:23PM 
 Hey all -
 
 I have got a 76,000+ line data file (ZipUSA comma delim file) that I
 need to break into smaller tables in my DB. This needs to happen at
 least monthly, so I wrote a cfm template to automate the process. The
 problem I am having is speed and server load. I have tried using the
 following methods, and am wondering if anybody has any suggestions
 (apart from using SQL's DTS) Platform info: CF 5 on Win2k, IIS 5
 writing
 to MSSQL 2000
 
 The tables I am putting everything into are a state table, county
 table
 w/state reference, city table w/county reference, location/district
 table w/city reference and zip table w/district reference
 
 1) Create temp SQL table, loop over file, write to temp table, query
 temp table, loop over query, and using conditional logic - break into
 table structure defined above, and drop temp table. This is the
 shortest
 method taking 20 minutes or so. The problem is that my SQL service's
 memory usage spirals out of control and when the template is finished,
 it never returns to normal. I have to restart the service to right it.
 
 2) Same as above, but converts the data file into a CF function-made
 query and then do a query of query. (This is necessary to re-order
 data
 for break-down step) This one takes forever (an hour on the slowest
 run)
 and both the CF services and the SQL service take over the machine.
 
 3) Read the data file, write a new one, then read that data file and
 loop over the lines, breaking it into the table structure above. This
 one also takes forever.
 
 Any suggestions at all on how to streamline the process would be
 really
 helpful, Thanks in advance
 
 Bill Henderson
 [EMAIL PROTECTED]
 
 
 
 
 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: Really big file manipulation

2002-10-21 Thread Bill Henderson
As far as I can tell, if I am relying on SQL (as opposed to CF) for the
bulk of the work, the insert into the temp table seems to be the hog. I
am using cfflush to send progress reports to the browser, and when it
hits the inserts it starts to bog down. The memory spike takes place
somewhere between the 6,000th and 12,000th record, and stays spiked
until I restart the MSSQLSERVER service. 

Bill Henderson
[EMAIL PROTECTED]

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:kpeterson;sehinc.com]
 Sent: Monday, October 21, 2002 1:52 PM
 To: CF-Talk
 Subject: RE: Really big file manipulation
 
 Do you know which phase of the process is eating the memory?
 
 Kore Peterson
 Database Development Specialist
 SEH - Minneapolis
 612.758.6739
 
 
 
 
 
 Bill
 Henderson   To: CF-Talk cf-
 [EMAIL PROTECTED]
 cf-talk@uutil   cc:
 ity.com Subject: RE: Really big
file
 manipulation
 
 10/21/2002
 03:44 PM
 Please respond
 to cf-talk
 
 
 
 
 
 
 Tried these - I thought not committing was the problem at first, but
 there was no appreciable change. Same with the nologged bulk, this
 lightened the load, but not much. And I always use queryparams.
 
 Bill Henderson
 [EMAIL PROTECTED]
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:kpeterson;sehinc.com]
  Sent: Monday, October 21, 2002 1:25 PM
  To: CF-Talk
  Subject: Re: Really big file manipulation
 
  Your SQL server memory is mostly likely climbing trying to keep
track
 of
  rollback information.
 
  Try using a nologged bulk copy when you create and load the temp
 table.
 
  If possible use update select or insert select for moving the data.
 
  Commit your transaction(s) more often if possible.
 
  Use cfqueryparm for all changing values (variables)  in your SQL
  statments.
 
 
  Kore Peterson
  Database Development Specialist
  SEH - Minneapolis
  612.758.6739
 
 
 
 
 
  Randell B
  Adkins  To: CF-Talk cf-
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]   cc:
  OV  Subject: Re: Really big
 file
  manipulation
 
  10/21/2002
  01:25 PM
  Please respond
  to cf-talk
 
 
 
 
 
 
  I at one time had a 500,000 byte file to import 5 days a week.
  But that had to go to one table.
 
  Sorry my recommendations is on MSSQL DTS.
 
 
 
 
   [EMAIL PROTECTED] 10/21/02 02:23PM 
  Hey all -
 
  I have got a 76,000+ line data file (ZipUSA comma delim file) that I
  need to break into smaller tables in my DB. This needs to happen at
  least monthly, so I wrote a cfm template to automate the process.
The
  problem I am having is speed and server load. I have tried using the
  following methods, and am wondering if anybody has any suggestions
  (apart from using SQL's DTS) Platform info: CF 5 on Win2k, IIS 5
  writing
  to MSSQL 2000
 
  The tables I am putting everything into are a state table, county
  table
  w/state reference, city table w/county reference, location/district
  table w/city reference and zip table w/district reference
 
  1) Create temp SQL table, loop over file, write to temp table, query
  temp table, loop over query, and using conditional logic - break
into
  table structure defined above, and drop temp table. This is the
  shortest
  method taking 20 minutes or so. The problem is that my SQL service's
  memory usage spirals out of control and when the template is
finished,
  it never returns to normal. I have to restart the service to right
it.
 
  2) Same as above, but converts the data file into a CF function-made
  query and then do a query of query. (This is necessary to re-order
  data
  for break-down step) This one takes forever (an hour on the slowest
  run)
  and both the CF services and the SQL service take over the machine.
 
  3) Read the data file, write a new one, then read that data file and
  loop over the lines, breaking it into the table structure above.
This
  one also takes forever.
 
  Any suggestions at all on how to streamline the process would be
  really
  helpful, Thanks in advance
 
  Bill Henderson
  [EMAIL PROTECTED]
 
 
 
 
 
 
 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



RE: Really big file manipulation

2002-10-21 Thread Bill Henderson
Outside

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:kpeterson;sehinc.com]
 Sent: Monday, October 21, 2002 3:03 PM
 To: CF-Talk
 Subject: RE: Really big file manipulation
 
 When you are looping through and doing your inserts is the loop inside
the
 cfquery tag or outside?
 
 Kore Peterson
 Database Development Specialist
 SEH - Minneapolis
 612.758.6739
 
 
 
 
 
 Bill
 Henderson   To: CF-Talk cf-
 [EMAIL PROTECTED]
 cf-talk@uutil   cc:
 ity.com Subject: RE: Really big
file
 manipulation
 
 10/21/2002
 04:32 PM
 Please respond
 to cf-talk
 
 
 
 
 
 
 As far as I can tell, if I am relying on SQL (as opposed to CF) for
the
 bulk of the work, the insert into the temp table seems to be the hog.
I
 am using cfflush to send progress reports to the browser, and when it
 hits the inserts it starts to bog down. The memory spike takes place
 somewhere between the 6,000th and 12,000th record, and stays spiked
 until I restart the MSSQLSERVER service.
 
 Bill Henderson
 [EMAIL PROTECTED]
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:kpeterson;sehinc.com]
  Sent: Monday, October 21, 2002 1:52 PM
  To: CF-Talk
  Subject: RE: Really big file manipulation
 
  Do you know which phase of the process is eating the memory?
 
  Kore Peterson
  Database Development Specialist
  SEH - Minneapolis
  612.758.6739
 
 
 
 
 
  Bill
  Henderson   To: CF-Talk cf-
  [EMAIL PROTECTED]
  cf-talk@uutil   cc:
  ity.com Subject: RE: Really big
 file
  manipulation
 
  10/21/2002
  03:44 PM
  Please respond
  to cf-talk
 
 
 
 
 
 
  Tried these - I thought not committing was the problem at first, but
  there was no appreciable change. Same with the nologged bulk, this
  lightened the load, but not much. And I always use queryparams.
 
  Bill Henderson
  [EMAIL PROTECTED]
 
 
 
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:kpeterson;sehinc.com]
   Sent: Monday, October 21, 2002 1:25 PM
   To: CF-Talk
   Subject: Re: Really big file manipulation
  
   Your SQL server memory is mostly likely climbing trying to keep
 track
  of
   rollback information.
  
   Try using a nologged bulk copy when you create and load the temp
  table.
  
   If possible use update select or insert select for moving the
data.
  
   Commit your transaction(s) more often if possible.
  
   Use cfqueryparm for all changing values (variables)  in your SQL
   statments.
  
  
   Kore Peterson
   Database Development Specialist
   SEH - Minneapolis
   612.758.6739
  
  
  
  
  
   Randell B
   Adkins  To: CF-Talk cf-
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]   cc:
   OV  Subject: Re: Really
big
  file
   manipulation
  
   10/21/2002
   01:25 PM
   Please respond
   to cf-talk
  
  
  
  
  
  
   I at one time had a 500,000 byte file to import 5 days a week.
   But that had to go to one table.
  
   Sorry my recommendations is on MSSQL DTS.
  
  
  
  
[EMAIL PROTECTED] 10/21/02 02:23PM 
   Hey all -
  
   I have got a 76,000+ line data file (ZipUSA comma delim file) that
I
   need to break into smaller tables in my DB. This needs to happen
at
   least monthly, so I wrote a cfm template to automate the process.
 The
   problem I am having is speed and server load. I have tried using
the
   following methods, and am wondering if anybody has any suggestions
   (apart from using SQL's DTS) Platform info: CF 5 on Win2k, IIS 5
   writing
   to MSSQL 2000
  
   The tables I am putting everything into are a state table, county
   table
   w/state reference, city table w/county reference,
location/district
   table w/city reference and zip table w/district reference
  
   1) Create temp SQL table, loop over file, write to temp table,
query
   temp table, loop over query, and using conditional logic - break
 into
   table structure defined above, and drop temp table. This is the
   shortest
   method taking 20 minutes or so. The problem is that my SQL
service's
   memory usage spirals out of control and when the template is
 finished,
   it never returns to normal. I have to restart the service to right
 it.
  
   2) Same as above, but converts the data file into a CF
function-made
   query and then do a query of query. (This is necessary to re-order
   data
   for break-down step) This one takes forever (an hour on the
slowest
   run)
   and both the CF services and the SQL service take over the
machine.
  
   3) Read the data file, write a new

Can anybody see a problem with this?

2002-08-01 Thread Bill Henderson

Hey All - 
 
The marketing department of my company wanted to have a list of
directories with names of marketing contacts.
(http://www.mycompany.com/BillHenderson/, etc) I first set up a tool
using cfdirectory and cffile to create the directories and put the files
in them. I found that making changes to the files in the directories or
adding new directories or deleting the directories caused quite a lot of
problems, not to mention the clutter it caused in the root directory of
the site, so I came up with this idea, that does not actually use any
custom directories at all, and I want to know if anybody can see
possible security problems, server resource issues, etc.
 
1. The user enters the URL in browser with custom directory at the end 
 
2. IIS catches the 404 error and uses a custom cfm template 
 
3. The cfm template pulls the directory out of the url and checks it
against a list of names from a cached query 
 
4. If it find a match, it cf_locations to a template with custom content
for the marketing contact 
 
5. If no match is found, it cf_locations to the standard 404b.htm from
IIS.
 
Any insight would be appreciated.
 
Bill Henderson
[EMAIL PROTECTED]
 


__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Can anybody see a problem with this?

2002-08-01 Thread Bill Henderson

Dan - you wrote:

2) In IIS, for that directory or subdomain, go to properties and choose
the
directory tab.  Change the 'When connecting to this resource, the
content
should come from:' option to 'A redirection to a URL', and enter in the
redirect to box /people.cfm?person=$0.  (use the help on that tab to
see
other options)


I would love to do this, however, boss wants
http://www.mydomain.com/BillHenderson format only. Is there any way I
can do something close to what you suggested without straying from the
boss man's idea?

And as far as the URL rewrites, I found a IIS mod_rewrite and started
playing around with it, it looks like I can do what I need, but I need
to have that format showing in the browser's address bar. Any
workarounds?

Bill At least my nit-picky boss is a nice guy Henderson
[EMAIL PROTECTED]




__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



JS/CF script problem

2002-06-30 Thread Bill Henderson

Can anybody help me do one of two things:

A.) Make a call from a JavaScript function to a function written in
CFScript,
Or
B.) Reference form elements (before a submission) in CFScript, like
JavaScript does. Example:
myform.mystring.innerText=myform.mystring2.innerText will copy the value
of a text input to another.

Can I do either of these?

Bill Henderson
[EMAIL PROTECTED]



__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Looking for tutorials (Was: security: attacks through submission of script)

2002-06-27 Thread Bill Henderson

 Yes, that means one set of validating scripts for the client before 
 submission and another on the action page to filter
 attacks. Slower? A little. Safer? Oh yes!

I've done a little of this kind of thing when screwing around with forms
 validation, but I would like to know more. Almost all of the work I
have done up to this point has been with secure Intranet sites, but now
I need to know about real security (for the big, bad web) beyond just
checking to see if the data being passed is malicious or not. Any links
or book recommendations would be helpful.

Bill Henderson
[EMAIL PROTECTED]


__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFSCRIPT help

2002-06-27 Thread Bill Henderson

Just screwing around - I took the earlier post and tweaked it some. It
now has more function as a formatter than a validator. This function
allows the user to enter any punctuation or spaces between the numbers,
as well as extra punctuation (mistyped double hyphens and such) as long
as it falls between 3 sets of numbers. The user could enter
mm-dd@@#/ and it would return mm/dd/ I don't know why
this is useful, but it might be. This code also allows for 2 digit
years. 

If anybody has any shortcuts to check for word months (June, July, etc)
in the same function, I would love to know.

I am really just killing time trying not to get back to real work.
Please help me achieve my goal.

cfscript
function checkDate(date) {
if (not
ReFind(^([0-9]{1,2})([[:punct:]]|[[:space:]]){1,}[0-9]{1,2}?(([[:punct:
]]|[[:space:]]){1,}([0-9]{2}|[0-9]{4}))$,date)) { return Inavlid date
mask; }
date =
ReReplace(date,([[:punct:]]|[[:space:]]){1,},/,ALL);
month = listfirst(date,/); 
day = listgetat(date,2,/); 
year = listlast(date, /); 
tempdate = CreateDate(year,month,1); 
if (day gt daysinmonth(tempdate)) { return Date exceeds
days in month.; }
date = CreateDate(year,month,day); 
return DateFormat(date,mm/dd/); 
}
/cfscript
cfoutput#checkDate(form.mydate)#/cfoutput


Bill Henderson
[EMAIL PROTECTED]


-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 27, 2002 11:31 AM
To: CF-Talk
Subject: Re: CFSCRIPT help

 At 01:46 PM 6/27/02 -0400, S. Isaac Dealey wrote:
function validDate(mydate) {
 if (not
 ReFind(mydate,[0-9][0-9]?/[0-9][0-9]?/[0-9][0-9][0-9][0-9])) {
return
 Inavlid Date Mask; }
 var day = listfirst(mydate,/);
 var month = listgetat(mydate,2,/);
 var year = listlast(mydate, /);
 tempdate = CreateDate(year,month,1);
 if (day gt daysinmonth(tempdate)) { return Date exceeds days
in
 month.; }
 return CreateDate(year,month,day);
}

 Wow!  This is why I read this list.  It shows me how much better other
 people are at CF than I am.  :)  Thanks.  I'd like to be able to
accept
 any mask (mm/dd/, dd/mm/, /mm/dd - depending on the
customer)
 so I guess I could add something to read the mask first and the pull
the
 information out in the correct order.

I wouldn't necessarily say better ... I may have been around the block
a bit longer ... You'll probably have to know in advance what format the
users are giving you the dates in (which I'm guessing you already do
based on your previous posts), so, you'd just add a parameter to the
function, so it'd be validDate(mydate,euro) ... then in the section
where you're setting the month and year, you determine which is which
based on that mask... 

var month = listgetat(mydate,iif(euro, 2, 1),/);
var day = listgetat(mydate,iif(euro, 1, 2),/); 

this will swap the month and day based on whether it's a european or a
us user entering the information... 

hope this helps, 

Isaac
www.turnkey.to
954-776-0046


__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFSCRIPT help

2002-06-27 Thread Bill Henderson

Thank You, I have been successful in avoiding real work!

I added a check for month abbreviations, full month names, as well as a
check for th,nd,rd,st. I think I am finished.


cfscript
function checkDate(date) {
date = ReReplace(date,([[:punct:]]|[[:space:]])+,/,ALL);
date = ReReplaceNoCase(date,(th|nd|st|rd),,ALL);
mmm =
ListContainsNoCase(jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec,lis
tfirst(date,/));
if (mmm neq 0) { date =
ReplaceNoCase(date,listfirst(date,/),mmm); }
 =
ListContainsNoCase(january,february,march,april,may,june,july,august,se
ptember,october,november,december,listfirst(date,/));
if ( neq 0) { date =
ReplaceNoCase(date,listfirst(date,/),); }

if (not ReFind(^[0-9]{1,2}/[0-9]{1,2}/([0-9]{2}|[0-9]{4})$,date)) {
return Inavlid date mask; }
month = listfirst(date,/); 
day = listgetat(date,2,/); 
year = listlast(date, /); 
if (month gt 12) { return Date exceeds months in year.; }
tempdate = CreateDate(year,month,1); 
if (day gt daysinmonth(tempdate)) { return Date exceeds days in
month.; }
date = CreateDate(year,month,day); 
return DateFormat(date,mm/dd/); 
}
/cfscript

Bill Henderson
[EMAIL PROTECTED]

-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 27, 2002 7:15 PM
To: CF-Talk
Subject: RE: CFSCRIPT help

Not sure aobut the months other than using
(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Nov) ... though it looks like your
regex has a few extra characters...


ReFind(^([0-9]{1,2})([[:punct:]]|[[:space:]]){1,}[0-9]{1,2}?(([[:punct:
]]|[[:space:]]){1,}([0-9]{2}|[0-9]{4}))$,date))

Looking at it... this in particular ([[:punct:]]|[[:space:]]){1,} may be
better represented by [[:punct:][:space:]]+ ... the outer pair of
brackets
[] makes the or | unnecessary... + ensures at least one character with
no
maximum, the same as {1,} ... and the parenthesis are generally
unecessary...

in retrospect, you may want to place this line :

date = ReReplace(date,[[:punct:][:space:]]+,/,ALL);

prior to your ReFind for validation, which would then mean the
validation
ReFind() could be much simpler, which is always a good thing. :)

Then you could use something like FindOneOf(date,Jan,Feb,Mar,Apr...)
(there may be a good list-udf for this at cflib.org) to determine if one
of
the items is a month abbreviation and return the list index...

 I am really just killing time trying not to get back to real work.
 Please help me achieve my goal.

Hope this helps! :)

Isaac

www.turnkey.to
954-776-0046


__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



.NET Framework on CF Server

2002-06-20 Thread Bill Henderson

Has anybody experienced any trouble with installing .NET framework on a
CF 4.5 Server? I had an app running at a client's site for almost a year
with no changes, and all of a sudden, they started getting errors. Most
of the errors have to do with form and URL variables not being passed
properly. The code worked without any changes, and then all of a sudden:
new=no in a href on the calling page starts showing up as nmo in the
cgi.query_string of the called page. The only change to the server in
the time period immediately before these errors started was the .NET
framework patch from Windows. The Macromedia site does not have any
info. Has anybody had this problem?
 
CF Version: 4.5.1.0 Professional
OS Version: NT 5.0 SP1 build 2195
 
Any help would be much appreciated
 
Bill Henderson
[EMAIL PROTECTED]
 

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Complex List Delimiter

2002-03-28 Thread Bill Henderson

Mike - 

It's a little clunky, and could probably benefit from some optimization,
but it's a start. It returns the array newcontent - 


cfset newcontent = ArrayNew(1)
cfset i = 1

cfloop condition=len(content) neq 0
cfif FindNoCase([pagebreak], content)   
cfscript
count = FindNoCase([pagebreak], content);
newcontent[#i#] = Left(content, (count - 1));
content = RemoveChars(content, 1, (count + 10));
i = i + 1;
/cfscript
cfelse
cfscript
count = Len(content);
newcontent[#i#] = Right(content, count);
content = RemoveChars(content, 1, Len(content));
i = i + 1;
/cfscript
/cfif
/cfloop

Bill Henderson
[EMAIL PROTECTED]



-Original Message-
From: Wallick, Mike [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 28, 2002 8:54 AM
To: CF-Talk
Subject: Complex List Delimiter

Quick question for you gurus out there


I want to use a text delimiter for my content that's in a database. I
want
to use [pagebreak] as the delimiter. In php, I would use:

// Split the text into an array of pages
$textarray = split(\[pagebreak], $content);

However, in ColdFusion, ListToArray(content, [pagebreak]) (or some
similar
function) is interpreted as any of the characters in the [pagebreak]
string
could be a delimiter (i.e. [ p a g e b r e a k ]).

Any ideas?

mike wallick
* web application developer
* [EMAIL PROTECTED]
* 651.628.5377
* http://www.securecomputing.com


__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: studio issue creating files in file explorer

2002-03-25 Thread Bill Henderson

Robert - 

I get this all the time, but it always follows me creating a directory.
I have not found a real fix, but I just create the directory, click on
another directory, click back to the one I created, and then create a
file. This seems to work without the error.

Bill Henderson
[EMAIL PROTECTED]


-Original Message-
From: Robert Gatton [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 25, 2002 11:05 AM
To: CF-Talk
Subject: studio issue creating files in file explorer

Not often, maybe 10% of the time I try to right click in studio's file
list
and 'create file here'
I get a message box 'system could not find the specified path' or
similar
and the create fails
but an untitled.cfm is created in the folder. Not really a major problem
but
a hassle I could
do without.  I'm using studio 4.5; anybody else run into this and know
the
fix?




__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Form Validation

2002-03-22 Thread Bill Henderson

When I was first using CF a while ago, I came across a web page talking
about form validation, and they used this piece of code:
REFindNoCase([[:digit:]]|[[:punct:]], myvariable, 1)
 
I have reused it now and again, but I really want to know what the
[[:digit:]]|[[:punct:]] thing is all about. Are there more of these?
Where can I get documentation? What are they called? I have looked at
various times, but to no avail.
 
 
Thanks - 
Bill Henderson
[EMAIL PROTECTED]



_

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com



__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Form Validation

2002-03-22 Thread Bill Henderson

When I was first using CF a while ago, I came across a web page talking
about form validation, and they used this piece of code:
REFindNoCase([[:digit:]]|[[:punct:]], myvariable, 1)
 
I have reused it now and again, but what I have always wondered is what
the [[:digit:]] and the [[:punct:]] things are all about. I know what
they do, but are there more of these? Where can I get documentation?
What are they called? I have looked at various times, but to no avail.
 
 
Thanks - 
Bill Henderson
[EMAIL PROTECTED]
 



_

Do You Yahoo!?

Get your free @yahoo.com address at http://mail.yahoo.com



__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Help, fresh eyes needed! (Solved)

2002-03-22 Thread Bill Henderson

The other way to do it is to enclose all in brackets like this:

cfquery name=AddRecord datasource=andes dbtype=ODBC
INSERT INTO tunetips (title, blurb, [all])
VALUES ('#Form.title#', '#Form.blurb#', '#Form.all#');
/cfquery

That way, you don't have to rename your table.
Hope this helps - Bill

-Original Message-
From: Scott Van Vliet [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 22, 2002 6:56 PM
To: CF-Talk
Subject: RE: Help, fresh eyes needed! (Solved)

The word all is a reserved word, thus the error.  Just rename your
table column and everything should work.

I am off to get faded at the Block.  Have a good night all!

-Original Message-
From: Jeff Fongemie [mailto:[EMAIL PROTECTED]] 
Sent: Friday, March 22, 2002 6:04 PM
To: CF-Talk
Subject: Help, fresh eyes needed!

Hello cftalk,


  Too long of a day. Cold fusion keeps telling me I have a syntax
  error with this very simple insert. I see nothing wrong. Am I
  missing something?


 cfquery name=AddRecord datasource=andes dbtype=ODBC
INSERT INTO tunetips
(title,
blurb,
all)

  VALUES
('#Form.title#',
'#Form.blurb#',
'#Form.all#');
/cfquery




Best regards,
 Jeff Fongemie  mailto:[EMAIL PROTECTED]
 



__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists