RE: Format cfdump
Sure, right your own. ;) Seriously though, the default cfdump tag doesn't have any options like that. You may want to consider fdump, found on my blog, which allows you to filter the dump results. You can tell it to only show certain columns, or hide certain colums, show top x results, etc. Filters can be applied to arrays, structs, and queries. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Is this a DateDiff() bug?
Yeah, I wrote it to help someone out with a specific problem. Glad it can give you something to start with. Pascal > -Original Message- > From: Jim McAtee [mailto:[EMAIL PROTECTED] > Sent: zaterdag 5 juni 2004 20:58 > To: CF-Talk > Subject: Re: Is this a DateDiff() bug? > > OK. I see that now in the documentation. Doesn't make much > sense to me, but I'm guessing there's some use for that behavior. > > I've looked at your function and it's close to what I'm > looking for, but I need to modify it to make it inclusive of > the end dates. > > > > - Original Message - > From: "Pascal Peters" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Saturday, June 05, 2004 2:14 AM > Subject: RE: Is this a DateDiff() bug? > > > > Not a bug, look in the help: > > "w" number of weeks between the two dates > > "ww" number of calendar weeks (Sundays) between the two dates > > > > The result between the two would differ if you have less than 7 days > > with a Sunday that doesn't fall on the first date. > > > > I think posted a function to return the number of weekdays (as you > > define it) on this list a few days ago: > > > > function WeekdaysBetween(date1,date2){ > > var out = 0; > > var tmp = ""; > > if(DateCompare(date1,date2) GT 0){ > > tmp = date1; > > date1 = date2; > > date2 = tmp; > > } > > if(DayOfWeek(date1) IS 1) date1 = DateAdd("d",-2,date1); > > if(DayOfWeek(date1) IS 7) date1 = DateAdd("d",-1,date1); > > if(DayOfWeek(date2) IS 1) date2 = DateAdd("d",+1,date2); > > if(DayOfWeek(date2) IS 7) date2 = DateAdd("d",+2,date2); > > out = DateDiff("d",date1,date2); > > if(DayOfWeek(date2) LT DayOfWeek(date1)) out = out - 2; > > out = out - (out\7)*2; > > return out; > > } > > > > Pascal > > > > > -Original Message- > > > From: Jim McAtee [mailto:[EMAIL PROTECTED] > > > Sent: zaterdag 5 juni 2004 2:52 > > > To: CF-Talk > > > Subject: Is this a DateDiff() bug? > > > > > > ColdFusion 5: > > > > > > > > > > > > DateDiff("d", "5/1/2004", "5/31/2004") = #DateDiff("d", > > > "5/1/2004", "5/31/2004")# DateDiff("w", "5/1/2004", > > > "5/31/2004") = #DateDiff("w", "5/1/2004", "5/31/2004")# > > > DateDiff("ww", "5/1/2004", "5/31/2004") = #DateDiff("ww", > > > "5/1/2004", "5/31/2004")# > > > > > > Gives: > > > > > > DateDiff("d", "5/1/2004", "5/31/2004") = 30 DateDiff("w", > > > "5/1/2004", "5/31/2004") = 4 DateDiff("ww", "5/1/2004", > > > "5/31/2004") = 4 > > > > > > The docs state that "w" should return the number of > > > "Weekdays", which I take to mean the number days between the > > > two dates, minus days that fall on a weekend. > > > > > > By poking different dates into the two fields I can get the w > > > and ww results to differ by one, but most often they're the same. > > > > > > Bug? > > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Is this a DateDiff() bug?
OK. I see that now in the documentation. Doesn't make much sense to me, but I'm guessing there's some use for that behavior. I've looked at your function and it's close to what I'm looking for, but I need to modify it to make it inclusive of the end dates. - Original Message - From: "Pascal Peters" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Saturday, June 05, 2004 2:14 AM Subject: RE: Is this a DateDiff() bug? > Not a bug, look in the help: > "w" number of weeks between the two dates > "ww" number of calendar weeks (Sundays) between the two dates > > The result between the two would differ if you have less than 7 days > with a Sunday that doesn't fall on the first date. > > I think posted a function to return the number of weekdays (as you > define it) on this list a few days ago: > > function WeekdaysBetween(date1,date2){ > var out = 0; > var tmp = ""; > if(DateCompare(date1,date2) GT 0){ > tmp = date1; > date1 = date2; > date2 = tmp; > } > if(DayOfWeek(date1) IS 1) date1 = DateAdd("d",-2,date1); > if(DayOfWeek(date1) IS 7) date1 = DateAdd("d",-1,date1); > if(DayOfWeek(date2) IS 1) date2 = DateAdd("d",+1,date2); > if(DayOfWeek(date2) IS 7) date2 = DateAdd("d",+2,date2); > out = DateDiff("d",date1,date2); > if(DayOfWeek(date2) LT DayOfWeek(date1)) out = out - 2; > out = out - (out\7)*2; > return out; > } > > Pascal > > > -Original Message- > > From: Jim McAtee [mailto:[EMAIL PROTECTED] > > Sent: zaterdag 5 juni 2004 2:52 > > To: CF-Talk > > Subject: Is this a DateDiff() bug? > > > > ColdFusion 5: > > > > > > > > DateDiff("d", "5/1/2004", "5/31/2004") = #DateDiff("d", > > "5/1/2004", "5/31/2004")# DateDiff("w", "5/1/2004", > > "5/31/2004") = #DateDiff("w", "5/1/2004", "5/31/2004")# > > DateDiff("ww", "5/1/2004", "5/31/2004") = #DateDiff("ww", > > "5/1/2004", "5/31/2004")# > > > > Gives: > > > > DateDiff("d", "5/1/2004", "5/31/2004") = 30 DateDiff("w", > > "5/1/2004", "5/31/2004") = 4 DateDiff("ww", "5/1/2004", > > "5/31/2004") = 4 > > > > The docs state that "w" should return the number of > > "Weekdays", which I take to mean the number days between the > > two dates, minus days that fall on a weekend. > > > > By poking different dates into the two fields I can get the w > > and ww results to differ by one, but most often they're the same. > > > > Bug? [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Apache, CF5 and CFMX Question
I dont think the order matters as I have a number of virtual hosts ( about 10) for each project, some have CF5 and some dont. that works fine.. the module that is being loaded for MX is different as it is the JRun module A novel idea? well I am running Spectra of CF5... gasp! Regards Mark Drew > > I've never tried that myself, but it seems like a pretty novel idea. > > I'm curious, if you reverse the order of the VirtualHosts in the > httpd.conf file, does anything change? (I.E., CFMX works but CF5 doesn't?) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Apache, CF5 and CFMX Question
> > I am trying to set up a local dev server that is running Virtual Hosts. > > I would like some of the virtual hosts to run on CF 5 and another to > run on CFMX, has anyone achieved this? Mark, I've never tried that myself, but it seems like a pretty novel idea. I'm curious, if you reverse the order of the VirtualHosts in the httpd.conf file, does anything change? (I.E., CFMX works but CF5 doesn't?) - Brandon -- http://devnulled.com [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: url string parameter question.
that checks to see if there is 1 parameter, and if there is, check to make sure its numeric only, and if so, ROCK ON :) it works. Ill try that other one Sunday. thanks dave. im off to my surprise 31st birthday something, my wife has a weekend planned, and I have no idea what is going on later, maybe ? :) tony Tony Weeg sr. web applications architect navtrak, inc. [EMAIL PROTECTED] 410.548.2337 www.navtrak.net Visit http://www.antiwrap.com the next time you want to send a link to a friend. -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Saturday, June 05, 2004 10:57 AM To: CF-Talk Subject: RE: url string parameter question. > in a url string... > > http://www.antiwrap.com/?a=1 > > I can get to a, because its url.a, and I know it equals 1 > > however, how do I get to this? > > http://www.somedomain.com/? > > = nothing. > > I guess it's a struct, called url, and it has a thing called > , but I guess, how do I get to the freakin thing, so I > can use the name of the thing? I don't think the URL scope will be especially useful for this. Just examine CGI.QUERY_STRING directly. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Apache, CF5 and CFMX Question
Hi Dave, That would be great! Regards Mark Drew > I've done this on my laptop, using Apache 2.0.4x, CF 5 and CFMX 6.1. > Unfortunately, I don't have my httpd.conf file handy, but can get it later > this weekend. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Flagging when a file download is complete
Is there any way to increment a counter when a download has completed (the download logic is using CFCONTENT). How would it be done? I have access to file size vars from a database. Thanks, Mark [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: User Authentication
FWIW, my testing on CF5 using GetTickCount() has indicated about a 15ms difference between using session versus db-stored client variables. Obviously, that's specific to my setup and app and assumes GetTickCount() provides a reasonably accurate way of measuring it. What is considered the best method if you need to support a cluster, don't want to rely on sticky sessions and aren't using the J2EE install of CFMX? Ken From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Sat 6/5/2004 10:58 AM To: CF-Talk Subject: RE: User Authentication > Maybe I am off-base, but I only use session variables for > login management purposes -- instead I mostly use client > variables to gain inter-template communication -- the > advantage of this is that no locking is required. > > Guess there are some disadvantages, but I haven't found them > yet and would like to be enlightened, etc. The obvious disadvantage is that client variables are significantly slower to access if they're stored in a database, which is the only decent place to store them. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: User Authentication
> Maybe I am off-base, but I only use session variables for > login management purposes -- instead I mostly use client > variables to gain inter-template communication -- the > advantage of this is that no locking is required. > > Guess there are some disadvantages, but I haven't found them > yet and would like to be enlightened, etc. The obvious disadvantage is that client variables are significantly slower to access if they're stored in a database, which is the only decent place to store them. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: url string parameter question.
> in a url string... > > http://www.antiwrap.com/?a=1 > > I can get to a, because its url.a, and I know it equals 1 > > however, how do I get to this? > > http://www.somedomain.com/? > > = nothing. > > I guess it's a struct, called url, and it has a thing called > , but I guess, how do I get to the freakin thing, so I > can use the name of the thing? I don't think the URL scope will be especially useful for this. Just examine CGI.QUERY_STRING directly. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Apache, CF5 and CFMX Question
> I am trying to set up a local dev server that is running > Virtual Hosts. > > I would like some of the virtual hosts to run on CF 5 and > another to run on CFMX, has anyone achieved this? > > I can get the CF5 Virtual Hosts working but the CFMX one > gives me an error 500. I've done this on my laptop, using Apache 2.0.4x, CF 5 and CFMX 6.1. Unfortunately, I don't have my httpd.conf file handy, but can get it later this weekend. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Get Database Tables, etc
What database? MSSQL I use sp_tables. -Original Message- From: Robert Shaw [mailto:[EMAIL PROTECTED] Sent: Friday, June 04, 2004 11:48 AM To: CF-Talk Subject: Get Database Tables, etc I know I have seen this on the list before but I can't find the exact code. Does anyone have the code for querying a database and returning a list of tables and/or column info? TIA, Robbie [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Apache, CF5 and CFMX Question
I am trying to set up a local dev server that is running Virtual Hosts. I would like some of the virtual hosts to run on CF 5 and another to run on CFMX, has anyone achieved this? I can get the CF5 Virtual Hosts working but the CFMX one gives me an error 500. This is how I am configuring it in httpd.conf ServerAdmin [EMAIL PROTECTED] DocumentRoot "c:/www/cf5site/" ServerName cf5site ErrorLog logs/cf5site-error_log CustomLog logs/cf5site-access_log common Alias /cfide/ "c:/Inetpub/wwwroot/cfide/" Alias /Main/ "c:/Inetpub/wwwroot/Main/" LoadModule coldfusion_module modules/mod_coldfusion.so AddHandler type-coldfusion cfm dbm ServerAdmin [EMAIL PROTECTED] DocumentRoot "c:/www/cfmxsite/" ServerName cfmxsite ErrorLog logs/icfmxsite-error_log CustomLog logs/cfmxsite-access_log common Alias /cfide/ "C:/CFusionMX/wwwroot/cfide/" Alias /Main/ "C:/CFusionMX/wwwroot/cfide/" # JRun Settings LoadModule jrun_module "C:/CFusionMX/runtime/lib/wsconfig/1/mod_jrun20.so" JRunConfig Verbose false JRunConfig Apialloc false JRunConfig Ssl false JRunConfig Ignoresuffixmap false JRunConfig Serverstore "C:/CFusionMX/runtime/lib/wsconfig/1/jrunserver.store" JRunConfig Bootstrap 127.0.0.1:51010 #JRunConfig Errorurl AddHandler jrun-handler .jsp .jws .cfm .cfc (running under Windows by the way) Thanks in advance Mark Drew http://cybersonic.blogspot.com mailto:[EMAIL PROTECTED] [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Password in Image Technology
I think the question is more a how-to, I have been reading the image functions in PHP for creatnig new images from PNG's or simply from scratch. That is how a lot of sites do it by adding an overlay and adding a filter to a set of characters... so you could do the following in PGP: Create image add text add overlay to confuse it add a distortion filter to confuse OCR systems I hope this helps (as you can run PGP and CF together on most systems!) Regards Mark Drew On Fri, 04 Jun 2004 15:02:48 -0400, Claude Schneegans <[EMAIL PROTECTED]> wrote: > > >>the image is obscurred so OCR software can't read the "special code" > > Exact, and some use similar character, like I and 1, Z and 2, S and 5, etc. in order to goof the OCR systems even more. > > -- > ___ > REUSE CODE! Use custom tags; > See http://www.contentbox.com/claude/customtags/tagstore.cfm > (Please send any spam to this address: [EMAIL PROTECTED]) > Thanks. > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: Is this a DateDiff() bug?
Not a bug, look in the help: "w" number of weeks between the two dates "ww" number of calendar weeks (Sundays) between the two dates The result between the two would differ if you have less than 7 days with a Sunday that doesn't fall on the first date. I think posted a function to return the number of weekdays (as you define it) on this list a few days ago: function WeekdaysBetween(date1,date2){ var out = 0; var tmp = ""; if(DateCompare(date1,date2) GT 0){ tmp = date1; date1 = date2; date2 = tmp; } if(DayOfWeek(date1) IS 1) date1 = DateAdd("d",-2,date1); if(DayOfWeek(date1) IS 7) date1 = DateAdd("d",-1,date1); if(DayOfWeek(date2) IS 1) date2 = DateAdd("d",+1,date2); if(DayOfWeek(date2) IS 7) date2 = DateAdd("d",+2,date2); out = DateDiff("d",date1,date2); if(DayOfWeek(date2) LT DayOfWeek(date1)) out = out - 2; out = out - (out\7)*2; return out; } Pascal > -Original Message- > From: Jim McAtee [mailto:[EMAIL PROTECTED] > Sent: zaterdag 5 juni 2004 2:52 > To: CF-Talk > Subject: Is this a DateDiff() bug? > > ColdFusion 5: > > > > DateDiff("d", "5/1/2004", "5/31/2004") = #DateDiff("d", > "5/1/2004", "5/31/2004")# DateDiff("w", "5/1/2004", > "5/31/2004") = #DateDiff("w", "5/1/2004", "5/31/2004")# > DateDiff("ww", "5/1/2004", "5/31/2004") = #DateDiff("ww", > "5/1/2004", "5/31/2004")# > > Gives: > > DateDiff("d", "5/1/2004", "5/31/2004") = 30 DateDiff("w", > "5/1/2004", "5/31/2004") = 4 DateDiff("ww", "5/1/2004", > "5/31/2004") = 4 > > The docs state that "w" should return the number of > "Weekdays", which I take to mean the number days between the > two dates, minus days that fall on a weekend. > > By poking different dates into the two fields I can get the w > and ww results to differ by one, but most often they're the same. > > Bug? > > > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]